Interesting hoe everthing inter related, Literally, in this PR
[https://github.com/nim-lang/Nim/pull/10819](https://github.com/nim-lang/Nim/pull/10819)
I have added the implementation hashes very surprisingly very close to what
described in the unison link. You can start using it in macros for v
@alexeypetrushin `tolower` would work too as Nim is case sensitive only with
the starting letter. So using either `toLower` or `tolower` would work. But
`ToLower` would be different.
Though, it's suggested to follow lower camelcase in general.
> I like these ideas very much but Nim can't innovate on all fronts at the same
> time.
I did not mean to say I want this feature now. Nim's current direction is
great! This post was about my day dreams :-P
> Sounds roughly similar to what "incremental compilation" will bring to Nim.
I had to
Thanks, I saw tolower in some nim word count demo, maybe it was outdated.
Can you please also explain about the types, is there any convention to its
naming string vs Natural \- why one is lowercased and another is not?
It is written `toLower`, see
[https://nim-lang.org/docs/theindex.html#toLower](https://nim-lang.org/docs/theindex.html#toLower)
The type names all follow capitalization except for the really common one we
found to annoying to type this way. They also predate our style guide,
[https://nim-lang.o
I like these ideas very much but Nim can't innovate on all fronts at the same
time. I'm also a big fan of Mathematica, programming based on this silly
"sequence of bytes" notion should have died a decade ago. But it didn't.
So my hope is that editors let us get further and further away from the
Offtopic but programming related philosophy question. I've been following the
Unison programming language a little bit, and I'm very interested in their idea
of keeping a code base as a database of hash id's -> function definitions,
instead of just "bags of text files" that get compiled.
[http:
Just checked out Nim, lots of things and design decision that I like about the
language.
But I noticed that there are some inconsistencies with how things are named,
example: function names tolower vs toSeq or types string vs Natural \- really
weird. Why in some cases they start with capital le
I didn't see nim-csfml when I was checking them out a few weeks ago, but I
found
[https://github.com/Vladar4/nimgame2](https://github.com/Vladar4/nimgame2) to
be by far the best documented and most extensive of the game frameworks that I
reviewed.
I've had good experiences with SFML via the csfml wrapper:
[https://github.com/oprypin/nim-csfml](https://github.com/oprypin/nim-csfml)
It may need some updates and you need to be comfortable using the SFML docs and
applying them to Nim.
I would like to make a 2D game with Nim, but I can't find any game library with
documentation or recently updated, can you suggest me one ?
Thank you
If found some discussion and ideas:
*
[https://forum.nim-lang.org/t/3798#23682](https://forum.nim-lang.org/t/3798#23682)
*
[https://github.com/status-im/nim-ttmath/blob/master/src/ttmath.nim#L5](https://github.com/status-im/nim-ttmath/blob/master/src/ttmath.nim#L5)
const ttma
Cheers for your help. You are right, compiling Nim is not that hard. Just for
anyone who finds this thread:
sudo apt install nim
git clone https://github.com/Araq/Nim
cd Nim
sh build_all.sh
Run
and I have nim 0.19.9 (compiled, but not installed). Whilst th
[https://github.com/nim-lang/Nim/issues/10971](https://github.com/nim-lang/Nim/issues/10971)
The problem is hard to describe and even harder to search for. Any ideas?
The way I got around this in the past was to symlink my dependencies into
project's directory. That way, to Nim, they are all par
0.19.0 is very old in "Nim years" { like "dog years", but even more compressed
;-) }. 0.19.2 works better, but personally I would recommend `git clone
https://github.com/Araq/Nim` and learning how to build that/run right out of
the build. It's not too hard to follow the instructions. I think `sh
> I'm pretty sure you're joking, but that's absolutely not what the Nim
> community should do.
Thank you for picking up on this @bpr. I definitely wasn't serious and I agree
with your points 100%.
Agreed, I don't want to waste your time, and am happy to update. I am using
Nim Compiler Version 0.19.0 [Linux: amd64]
Compiled at 2018-10-27
Copyright (c) 2006-2018 by Andreas Rumpf
active boot switches: -d:release
Run
Which was installed from the def
Well, to make it work without the rest of your type environment, I changed just
the first couple lines of your posted code to:
import posix, selectors
proc readDevice(dev: string) =
let devfd = posix.open(dev, posix.O_RDWR)
Run
Then it compiled fine for me.
I've tried your solution, but it does not work. When I execute the command it
gives the following result:
$ nim --cc:clang
--clang.exe:/home/hdias/tmp/android-ndk-r19c/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang
--clang.linkerexe:/home/hdias/tmp/androi
Thank you very much. You are quite correct. An unbuffered file is ideal, and
yes, linux only (OpenWrt). Thank you for pointing me to the posix module (and
getFileHandle()). I am trying to decipher the most elegant way of accomplishing
this, but am failing miserably. this is what I have (UsbDevic
There is also `proc open*(a1: cstring, a2: cint)` in the `posix` module:
import posix
let fd = open("/dev/mydevice", O_RDONLY)
Run
if you want an unbuffered raw file handle which sounds like it might be the
case (and you don't need portability which is implied by
In that aspect nim is unique. Crystal comes the closest, but it only works for
linux.
> function main is undeclared in the main module.
Cool example you got there. Personally speaking, once you go full identation,
you cannot go back.
You probably want `proc getFileHandle*(f: File): FileHandle` from the system
module (no need to import). That just calls through to the C fileno().
Because I'm looking for a cross-platform[Windows +Linux, etc], fast, relatively
easy language that compiles to C or C++, and which can interop or imbed with
code +libs from C or C++. Of the 100s of languages, that eliminates about all,
except Freebasic, and Nim and Haxe. Of the 3, it seems Freeb
Ah please support "0 or more", it sucks to write simple loops as recursion.
The answer to this question is probably very simple, but I can't seem to get it
to work, and the documnetation is very sparse for these functions for some
reason. I need to read a linux device file until there is nothing left to read
for 0.1 second. I know that I need to use a selector, but I ca
27 matches
Mail list logo