Seems not so simple at all. copyMem ? Missing constants. I'm not so sure about
menu handling either.
If this is a binary package then you should just add `skipExt = @["nim"]`.
Thanks for all the helpful advice.
I am trying out this structure:
bin
docs
tests
nim.cfg which contains one line: --path:"../project/"
test_project.nim
test_file1.nim
project.nimble
project
project.nim
file.nim
private
I come from the Land of Java ... I guess my "pain threshold" for long names is
higher.
I used to code in C++, when "The C++ Programming Language" was still in it's
_first edition_. And I'm here because for my "at home" coding, I'd like
something that doesn't force me to choose between:
1. A
Why not do something like:
template withFile(f: string, mode: string, statements: untyped) =
var fileMode: FileMode
case mode
of "r": fileMode = FileMode.fmRead
of "w": fileMode = FileMode.fmWrite
of "a+":fileMode = FileMode.fmReadW
It could be helpful to support something like the `contextmanager` decorator in
Python, which lets the user specify "enter" and "exit" as the code before and
after `yield`, e.g.
*
[https://stackoverflow.com/a/24176022/263998](https://stackoverflow.com/a/24176022/263998)
*
[https://docs.pyt
I want to be able to do true parallel processing of highly numerical
algorithms, and currently I don't know if Nim can do this, and if so, I can't
find many coding examples of more than rudimentary examples. So I was wondering
since Nim compiles to C/C++ whether it currently can work with OpenMP
On the one hand, long module names are annoying to keyboard.
On the other, module names must be unique within a module. If would be great if
aliasing allowed collisions of the source, e.g.
import "me/foo" as foo1
import "you/foo" as foo2
> If you are looking for a simple graph library in Nim:
> [https://github.com/superfunc/charlotte](https://github.com/superfunc/charlotte)
@RPG, Any idea what happened to Charlotte?
I am porting parts of networkx to pure Nim now, with a friend. We like your
IntSets idea for non-multi digraphs.
Yeah, I'm fairly interested in hot loading. I also think that it is a killer
feature for a language (especially game development). No, I haven't tried to
use hot loading in any real Nim program I've done. I wrote that article after
reading another article about a game dev who said he used it in
monster: you wouldn't get only "syntax highlighting" with VSCode. Nim plugin
also supports "nim check" \- checking files for errors, and nimsuggest - code
completion (it knows everything about Nim)
> "It needs to be as short as possible"
>
> Why? Is that your personal preference, or is there some actual technical
> reason for this?
There is no technical reason, it's just easier for users to use your package if
its name is short. Writing `import mylongpackagethatisawesome` everywhere would
I'd like to have things like that in the std lib.
If it's for windows, the API itself is quite simple (maybe it's not hard for
other platforms too). There are several gui frameworks available, there may be
this functionality available, better check them first.
A quick example for WInAPI (`nimble install oldwinapi` to make `windows`
available):
Hi Dominik. You misread me; I "must" have "Visual Studio" installed, because of
something that has nothing to do with Nim...
_Now that I have your attention_ ... I have a question relating to your book,
"Nim in Action" (I haven't finished it yet; I might have more questions later).
I hope it's
You could go a step further and create a proper high level SDL2 module. For
example, use sets and define flags as enums instead of using this bitwise ORing.
That said, it might be better for you to create a high level,
graphics-library-agnostic, 2D graphics package. Better yet, update this:
[ht
> I guess the "VSCode" editor is the "main" one, since it's the first in the
> list, but since I already must have Visual Studio installed, it seemed to me
> like overkill to bloat my drive with VSCode as well just to get "syntax
> highlight".
Huh? What makes you think you "must have Visual Stu
(This is a copy of a [Reddit thread I posted
yesterday](https://www.reddit.com/r/nim/comments/73dssr/advent_of_nim/))
* * *
I'm a complete beginner in Nim, and I've been trying to learn the basics by
solving [Advent of Code](http://adventofcode.com/2016) tasks.
I have previous Python experienc
I don't think is worth the effort for roughly 5 or 6 template lines, but i
think there is already a pythonesque library in nimble.
Either call your directory `myNamePkg` (i.e. with a `pkg` suffix), or add
`binDir = "bin"` to your nimble file and compile using `nimble build`, or
compile using `nim c --out:myName src/myName`
[https://gist.github.com/stisa/09474a952a420448778685507d3fbd51](https://gist.github.com/stisa/09474a952a420448778685507d3fbd51)
Hi there.
I brought this up before as a question - I don't like the lack of
error-checking around some c wrapper functions (eg, in sdl2 wrappers); but now
I have a very basic implementation.
Have updated the classic platformer.nim so that it delegates all of its
SDL2-related error checking ove
Thanks for the replies!
No worries, any kind of reply is greatly appreciated as it looks like the
number of people interested in hot loading their nim code is rather limited
(while to me it's like THE feature).
After you had implemented the hot loading on which your article is based, have
you used it in a project and
> the compiler cannot find the imports when building the test files even though
> I have a nim.cfg file.
You can use the compiler option path = "$projectDir".
Sorry for the belated reply.
I'm a little confused at what you're trying to achieve here. Can you explain it
in a few words what you want? It it something with trying to get dynamically
allocated memory to place nice with hot-loaded code?
How do you set up a directory structure for a multi-file project with test
files and doc files? How do you name the files and how do you run tests?
I'm trying to follow this page without much luck:
[https://github.com/nim-lang/nimble#project-structure](https://github.com/nim-lang/nimble#project-
27 matches
Mail list logo