I'd just like to second this endeavor.
I've always wanted to tinker with getting
[djgpp](http://www.delorie.com/djgpp/zip-picker.html) (or one of the
abandonware compilers) in dosbox to work with Nim-generated C89 code, but never
found the time / energy.
DOS support is the ultimate retroNerdCr
Hi, I recently started toying with templates and macros in nim and even though
they seem very powerful I haven't been able to correctly use macros yet.
I'm trying to create a macro that would generate a proc with some fixed parts
in its body when being called, something in the lines of (not work
Maybe you want something like:
import os, osproc, posix, strutils
proc userEditString(content = "", editor = "vim"): string =
let tmpPath = getTempDir() / "userEditString"
let tmpFile = tmpPath / $getpid()
createDir tmpPath
writeFile tmpFile, content
I already posted this on reddit
[https://www.reddit.com/r/nim/comments/9x641g/how_to_run_vim_and_get_output](https://www.reddit.com/r/nim/comments/9x641g/how_to_run_vim_and_get_output)/
I was trying to use osproc to run vim and grab the text the user entered but it
just crashes.
le
Yeah that is the right idea. I think you did it very complicated. I would just
put:
{.emit:"""
#include "GL/glew.h"
#include "GLFW/glfw3.h" //glfw3 must be the last include
""".}
Run
At the top of your main file.
Ok, thank you !
`ref object` can still be nil and is for your case.
since `Example` is a ref object, it default initialises to nil. You need to
initialise it:
type Example = ref object
a:seq[string]
# you can change it from var to let and still modify the memory the
reference is pointing to,
# though not reassign the pointer
I tried to do a search but it's not helpful (the forum search should look in
the titles first)
type Example = ref object
a:seq[string]
var anExample:Example
proc function(ex:Example, txt:string) =
ex.a.add(txt) # " SIGSEGV: Illegal storage access. (A
Hmmm I got summoned here. Libraries that don't follow Nim's conventions are bad
but worse for Nim are non-existing libraries so go ahead and do what you
consider the best solution.
But fwiw, the reason why we make `foo_bar` the same as `fooBar` is that
`foo_bar` shouldn't exist to begin with :P
Issue is resolved. The issue was bcz the llvm-clang was crashing with clang in
emscripten.
11 matches
Mail list logo