Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
PMunch
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
121.
▲
by
PMunch
5y ago
> That's the weird thing about Nim. It's not really a new language so much as a syntax and front end to several existing languages. This is a bit of an over-simplification. Nim does a lot of stuff on its own, so you w
122.
▲
by
PMunch
5y ago
For the specific case of Python executing Nim code you might be interested in [nimporter]( https://github.com/Pebaz/nimporter ) instead. Genny would definitely work for you as well, but it seems to be more geared towards
123.
▲
by
PMunch
5y ago
Imagine playing Monopoly but one player starts with a couple properties and a little extra cash in hand. As if that game wasn't bad enough as it is.
124.
▲
by
PMunch
5y ago
What is the mechanic in Settlers that enables this? Can't think of anything apart from how resources seems to be unevenly used throughout the game (wood and brick being more sought after early on to build roads and settlements, while i
125.
▲
by
PMunch
6y ago
Great to see that Nim grows ever faster and more stable. Been a fan of the language for quite a while now and while I miss the old days of new and exiting changes with every release it's much easier to target Nim now that it has become
126.
▲
by
PMunch
6y ago
It used to be the case that you turned the GC off when running on embedded, but you are correct that ARC/ORC runs on embedded devices and will indeed make these even easier to program against in the future. Whether running things that
127.
▲
by
PMunch
6y ago
It entirely depends on what kind of things you want to do. For example if you want to program microcontrollers with a modern language and 0 overhead over C then Nim is a great language to learn. Or if you want to write a web front-end and b
128.
▲
by
PMunch
6y ago
Very interesting to see this being added to the language. Definitely hits closer to the definition I would expect from "noSideEffects". Are there any plans for moving forward and hopefully out of the "experimental" phase
129.
▲
by
PMunch
6y ago
Nim has been trimming stuff out of its stdlib instead of adding them lately. And because of its huge focus on meta-programming almost anything can fit in an external package anyways (even async is a module in Nim, without any specific suppo
130.
▲
by
PMunch
6y ago
The ARC option does indeed leak cycles. But with ORC (which is ARC with a cycle detector) this is mitigated.
131.
▲
by
PMunch
6y ago
Yes, it's compiled into two different libraries. Nim hasn't magically made cross-platform dynamic libraries. But the code for both libraries is the same, just compiled for two different platforms.
132.
▲
by
PMunch
6y ago
Nim has thread support natively. And an async implementation in it's standard library which is made entirely as a library, so you're free to write your own, in fact there exists alternative implementations of async/await in N
133.
▲
by
PMunch
6y ago
This, for sure. For my work I wrote a dynamic library in Nim. The library is loaded by an application written in C, and I needed it to work on both Windows and Linux (Windows for customers, Linux for myself and the server back-end). Setting
134.
▲
by
PMunch
7y ago
https://peterme.net - If you've heard about Nim and want to see what someone is doing with it. Along with various other projects and presentations I do.
135.
▲
by
PMunch
7y ago
Extremely well I'd say. Nim has a very powerful macro system, and DSLs are very common across various modules. Haven't used Django myself, but something like Jester ( https://github.com/dom96/jester ) or Karax
136.
▲
by
PMunch
7y ago
Really fast! Even with heavy meta-programming it stays fast. As an example bootstrapping the latest stable release on my machine takes 1m06s. This is a process that involves compiling the compiler multiple times, just compiling the compiler
137.
▲
by
PMunch
7y ago
I should really have a Serif version as well. Not a huge fan of the "casual" look, but going in the opposite direction to a "stricter" Serif would be nice.
138.
▲
by
PMunch
7y ago
Nim projects typically use `nimble` that ships with the install. So all you would need to do is `nimble build` in the root folder and voilà! Of course that also pulls the dependencies from the package manager, so you might want to just extr
139.
▲
by
PMunch
7y ago
I think he meant that if the worst thing people can say about a language is that it has slightly quirky syntax it must've done a lot of things right.
140.
▲
by
PMunch
7y ago
I thought this feature was a bit odd once I first started using Nim. But by now I'm a huge fan, and I'll explain why. But first I'll just say that yes, it is slightly harder to search for identifiers. But libraries will stick
141.
▲
by
PMunch
7y ago
Again just for correctness your last identifier isn't legal in Nim. You aren't allowed to start an identifier with an underscore, and you can't have two underscores together.
142.
▲
by
PMunch
7y ago
Well thank you :) Meet up at FOSDEM and you can buy me a sandwich there!
143.
▲
by
PMunch
7y ago
Audio programming? And why is it frowned upon? If it is because of the Java-like GC freezes that is something you can ensure will not happen in Nim by turning on manual control and only running it when its suitable.
144.
▲
by
PMunch
7y ago
Not a Lisp user, but a heavy Nim macro user. Nim macros are AST based, which means that after the parser part of the compiler have read the code and created a tree structure of it your macro is called on this tree. Then you can modify this
145.
▲
by
PMunch
7y ago
They work only as long as they don't use any garbage collected types (the compiler will warn you of this when you turn the GC off). Unfortunately this means most libraries are out, and you have to do your own thing. Turning the GC off
146.
▲
by
PMunch
7y ago
Let's try to fill out some of this grid: Who started this? - That would be Andreas Rumpf, or Araq as he is known on IRC Is it corporately affiliated? - No, it was created by Andreas, and has stayed independent. But it has corporate bac
147.
▲
by
PMunch
7y ago
Well it all started when I wrote the genui macros for wxNim and the Gtk wrappers. I started working on a rather simple note-taking application and had an idea in mind for what I wanted it to look like. Turns out this look wasn't possib
148.
▲
by
PMunch
7y ago
As other have mentioned Nim is style insensitive. This might sound odd at first, but it allows you to use snake_case in your code even though the standard library is camelCase. It also allows me to use your snake_case library in my camelCas
149.
▲
by
PMunch
7y ago
Not really, when you want to import things from C you simply name them what you like and then you can call them in a case-insensitive fashion. When writing code that should be imported into C code it will either have its name exactly as typ
150.
▲
by
PMunch
7y ago
As the others have said it should be possible. Nim is already pretty good at cross-compiling, but it is also able to just spit out the C files it generates and allow you to play with those.
More ›