Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
def-
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
17 ms
·
151.
▲
Nim binary size from 160 KB to 150 Bytes
(hookrace.net)
145 points
by
def-
11y ago
|
66 comments
152.
▲
by
def-
11y ago
The problem is that an operation can have variable number of cycles depending on what addressing mode it uses as each opcode.
153.
▲
by
def-
11y ago
C89, so it's also compatible to Microsoft's vcc. There are quite some compiler bugs remaining in Nim and the standard library could be improved.
154.
▲
by
def-
11y ago
I'm a big Haskell fan (it was my favorite language before discovering Nim), but here's my personal list of Nim advantages over Haskell: - Predictable performance (lazy evaluation is problematic) - Easy to achieve high pe
155.
▲
by
def-
11y ago
It does have other advantages though, like inheriting C's excellent portability.
156.
▲
by
def-
11y ago
Not all games work. Only the most popular mappers are implemented, which covers about 85% of games.
157.
▲
by
def-
11y ago
https://www.destroyallsoftware.com/talks/the-birth-and-death...
158.
▲
by
def-
11y ago
The Nim binary dynamically links against glibc and SDL2. If you really want to statically link against a C standard library, musl works just fine: @if musl: passL = "-static" gcc.exe = "/usr/local&
159.
▲
by
def-
11y ago
I did it by hand, changing the code as I saw fit and learning as much about the NES as I could. I haven't tried GopherJS, but I don't have much Go experience apart from reading it. On a related note, I read that porting the Go ver
160.
▲
by
def-
11y ago
Two of my old posts may answer that question: - http://hookrace.net/blog/what-is-special-about-nim/ - http://hookrace.net/blog/what-makes-nim-practical/ Summary by benhoyt: https:/
161.
▲
Porting a NES Emulator from Go to Nim
(hookrace.net)
158 points
by
def-
11y ago
|
81 comments
162.
▲
Show HN: NimES – A NES Emulator in Nim, Compiles to JS
(github.com)
3 points
by
def-
11y ago
|
0 comments
163.
▲
NimES: NES emulator in Nim
(github.com)
5 points
by
def-
11y ago
|
1 comments
164.
▲
by
def-
11y ago
Yes, Nim still uses partial case insensitivity: http://nim-lang.org/manual.html#identifier-equality I agree that it's a problem with grep, there's a nimgrep tool that you could use instead, but I don't. The n
165.
▲
Nim Programming Language 0.11.0 released
(nim-lang.org)
162 points
by
def-
11y ago
|
128 comments
166.
▲
by
def-
12y ago
http://flint.cs.yale.edu/cs421/case-for-ml.html
167.
▲
by
def-
12y ago
Those are full, runnable programs. Nim's boilerplate is similar to Python's here.
168.
▲
by
def-
12y ago
This uses the code snippets from http://rosettacode.org/wiki/Rosetta_Code . I wrote many of the Nim ones and collected them over at http://github.com/def-/nim-unsorted/ . But since the Rosett
169.
▲
by
def-
12y ago
Now that I think about it, I could have used implicit converters to make it look more like Python, but that would probably lead to confusion.
170.
▲
by
def-
12y ago
I have no idea, I didn't run the benchmarks. I only have a few of these languages on my system.
171.
▲
by
def-
12y ago
Yes, I updated it already.
172.
▲
by
def-
12y ago
It wasn't a direct port of the Python one. Instead I mostly followed the guide and looked at the Python code when something was unclear to me. Nim being statically typed meant I had to create many MalTypes instead of just using the bui
173.
▲
Make a Lisp in Nim
(hookrace.net)
102 points
by
def-
12y ago
|
44 comments
174.
▲
by
def-
12y ago
While unsigned arithmetic is not "enabled by-default", a simple `import unsigned` and you have it. If you want the language to handle overflows for you, you can enable runtime overflow checks for your whole code or any specific pa
175.
▲
by
def-
12y ago
Well, it was named "Nimrod" before, but there were other problems with that name, which prompted the rename. "Nim" was a good choice because it was the file ending already. Also, easier to google than C and Go at least.
176.
▲
by
def-
12y ago
Instead of ADTs there are object variants in Nim: http://nim-lang.org/manual.html#object-variants With ADTs: data Shape a = Rectangle { x :: Float , y :: Float , width :: Float , height :: Fl
177.
▲
by
def-
12y ago
> Rust is more of a 'big idea' language, so it makes sense a corporation is pushing it. Araq just announced that Nim has financial backing now: http://forum.nim-lang.org/t/870
178.
▲
by
def-
12y ago
Wow, that should have been its own post! Great to hear how you get along with Nim.
179.
▲
by
def-
12y ago
> Compiling to C shouldn't hurt reliability anymore than compiling to LLVM. Performance will likely be somewhat less, particularly as "readable C" is the target, not arbitrary C. I would say "performant C" is the
180.
▲
by
def-
12y ago
There was a discussion about this on r/rust before: https://www.reddit.com/r/rust/comments/2vqy81/author_of_unix... My reasons for using Nim can be found in my blog: http://hookrace.net&#
More ›