Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
PMunch
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
151.
▲
by
PMunch
7y ago
Surprised to see Nim that slow, typically it ranks much higher in benchmarks. But without looking at the code and compiler options its hard to tell if it is simply the problem or the implementation that's to blame.
152.
▲
by
PMunch
7y ago
Nitpick, but it actually compiles down to C. Nim works at a higher abstraction and the compilation is a one-way street. But what is more important is that it generates efficient C code, it looks ugly, and it's not something you would e
153.
▲
by
PMunch
7y ago
Not only a good resource to learn Nim, but also an excellent programming book in general!
154.
▲
by
PMunch
7y ago
Not agreeing or disagreeing with either of you just wanted to add some details to the garbage collector thing. Nims GC is able to either be controlled in terms of when and how long it runs, and it can be completely disabled in favour of man
155.
▲
by
PMunch
7y ago
WxWidgets works great, Gtk(2/3) also works great (both have macros that make actually creating UI's much easier than in most other languages). There is also wNim for making Windows UIs and NiGui for pure Nim cross platform UIs (th
156.
▲
by
PMunch
7y ago
Without knowing any more specifics about your problem it seems like this would be possible in Nim. It is cross platform and can generate dynamic libraries across them. I guess you could somehow also set up a static library, but I've ne
157.
▲
by
PMunch
7y ago
I can see where you get that idea from, indeed the httpclient module doesn't have timeout flags for it's async recieve. But the asyncdispatch has a withTimeout procedure that should happily take the Future that you get from an asy
158.
▲
by
PMunch
7y ago
As someone who usually develops in Nim but is now stuck with delivering some Python scripts that runs embedded in a C program I feel your pain.. The first time I had to deploy some Nim code and could just copy a single binary to the target
159.
▲
by
PMunch
7y ago
Don't forget that Nim can compile down to JavaScript as well :) So you can actually use Nim to create your JS frontend and your C-compiled back-end.
160.
▲
by
PMunch
7y ago
Absolutely! I hear this complaint a lot for people who seem to read about the language without ever trying it out. It does sound a bit crazy to begin with, but not having to write code that's a mish-mash of styles while still being abl
161.
▲
by
PMunch
8y ago
I find it a big nuisance to use different casings in my code, but obviously people are different. Most of the type you won't be using the style insensitivity though, so for the most part a simple case-sensitive search will give you exa
162.
▲
by
PMunch
8y ago
That is also a valid concern, with nimsuggest (and soon nimlsp) you will be able to easily find every instance in your editor (as well as rename them). For searching through files however nimgrep is probably your best bet, but that might br
163.
▲
by
PMunch
8y ago
In a perfect world, yes. But having worked with Python I must say not all Python libraries are PEP 8, and I've more than once ended up with a strange mix of styles. Nim on the other hand takes a different approach, don't trust any
164.
▲
by
PMunch
8y ago
This is a reasonable concern, but after having used Nim for a couple of years I have never run into this as an actual issue. The benefit of being able to keep your entire program in one casing style outweighs these concerns. For that is the
165.
▲
by
PMunch
8y ago
With version 0.19.0 Nim also moved away from nilable seqs and strings, so they are much safer to use. An empty string and a nil string is now the same, and a nil seq and a seq without elements is the same. Saves you from that one missing ni
166.
▲
by
PMunch
8y ago
Nope, it can only call other side-effect free things. Note however if you call a procedure from a function the function will try to see if the proc is actually side effect free, just not marked as such. So you can still call a proc, but onl
167.
▲
by
PMunch
8y ago
Well: https://github.com/PMunch/nim-persistent-vector But not built in. The basic data types are very light-weight in their implementations to cover a large range of needs.
168.
▲
by
PMunch
8y ago
I can agree that 1.0 is an important milestone. At least as many people seem to treat it as "not ready" until it hits this milestone. I've been using Nim for the past couple of years, and keeping up to date with the version h
169.
▲
by
PMunch
8y ago
AFAIK the original Skam also featured social media uploads along with the linear TV content. During the week (it was on once a week, and uploaded online at the same time), you were able to follow the characters from the show on Facebook (an
170.
▲
by
PMunch
8y ago
Nim has type inference as well, but the type still has to be known before we can use a value. From the tutorial: > Nim also has type inference ability — the compiler can automatically detect the type of a name assignment from its value,
171.
▲
by
PMunch
8y ago
Not 100% sure what you mean by works, but Nim has been used to create various things. For one the entire Nim forum: https://forum.nim-lang.org/ is written in Nim (both back-end and front-end), the game "Reel Valley&quo
172.
▲
by
PMunch
8y ago
This tutorial obviously only scratches the surface of what is possible in Nim. If you want to dig deeper I recommend reading through the learnxinyminutes entry, along with maybe https://xmonader.github.io/nimdays to see som
173.
▲
by
PMunch
8y ago
Yeah Narimiran did a good job of breaking it down. I prompted him to add details here and there, but he was quick to rein me in when I wanted to dig too deep.
174.
▲
by
PMunch
8y ago
I've been meaning to try this tutorial out on some non-programming friends of mine. But time is unfortunately a limited resource, so I haven't gotten around to it. I helped proof read the texts and clear up some stuff, so if you h
175.
▲
by
PMunch
9y ago
Yes, that way my code looks more like one entity than a mess of different things. I can see why you are skeptical of it but once you've used it for a while it becomes second nature. And you can always mix if you want to. The thing is t
176.
▲
by
PMunch
9y ago
This. I can't count the number of times I've used two libraries with different casing just to have my own code end up as a mess of both.. I can see the point though that grepping, and things like editors which highlight the select
177.
▲
by
PMunch
10y ago
As a CS student normally working with lower level languages and IoT devices using Arduino I was a bit skeptical when first trying out this. I've tried MicroPython based devices before but they have left a bad taste in my mouth with the