Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
arc619
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
arc619
5y ago
TBF the reply in that link was written 4 years ago, before the language went 1.0 > Nim lacks official support to multiple inheritance or interfaces Multiple inheritance is a bit of a trainwreck IMO (see diamond problem). The language isn
32.
▲
by
arc619
5y ago
UBI is added on top of work so work will always mean you're better off. Would you give up your job just to spend all day doing nothing, or would you end up doing something productive? If you had infinite money, would you do nothing? Wh
33.
▲
by
arc619
5y ago
With noting that the GC in Nim (not "stop the world" BTW) is attached to the type. Unless you declare a type as `ref`, you're using stack allocation. Even if you do use the GC, the compiler elides GC work if the type doesn&#x
34.
▲
by
arc619
5y ago
...both Rust and C have runtimes: https://blog.mgattozzi.dev/rusts-runtime/
35.
▲
by
arc619
5y ago
They're probably laughing because a) you're suggesting manually doing the work static typing does in a dynamic language because its untenable not to for large projects, and b) you can't easily add type hints to other people&#
36.
▲
by
arc619
5y ago
In other words, in Python you have to rely on your colleagues manually writing documentation, and if they don't you're out of luck and they're 'bad developers' and potentially the whole product is affected. In stati
37.
▲
by
arc619
5y ago
This entire article can be summarised as "compile time stuff should use the same language as run time". I guess the author just hasn't encountered Nim before, where anything becomes compile time by just assigning to a const,
38.
▲
by
arc619
5y ago
I do what you described too. I think of it as neural degaussing.
39.
▲
by
arc619
5y ago
> the downside is there is significant compile time and link time cost to generics. Are we talking statistically significant or productivity significant compile time cost? Go has a fairly fast compiler, it would be a shame if generics ma
40.
▲
by
arc619
5y ago
I've never used Qt myself, but the Status messaging app written in Nim does, so it's definitely doable: https://github.com/status-im/status-desktop There's also a QML wrapper here: https://git
41.
▲
by
arc619
5y ago
Oops wrong link for nimporter. Actual link: https://github.com/Pebaz/Nimporter
42.
▲
by
arc619
5y ago
Nim can use Python's ecosystem in both directions with nimpy https://github.com/yglukhov/nimpy and nimporter https://github.com/yglukhov/nimpy This lets you gradually transition hot path Pyth
43.
▲
by
arc619
5y ago
You only need to map the database types to the language types at worst. So int, string, timestamps, binary, maybe GUID. Or you could just use string for all data and then you're pretty much matching a dynamic language. Results from joi
44.
▲
by
arc619
5y ago
> just have things called “entities” which own things called “components” - are hard to work with, almost by definition (ie you have to be very explicit about data layout and dependencies). My experience has been completely the opposite
45.
▲
by
arc619
5y ago
Nim is built like this. The gc is opt-in by type and manual memory management is simple. All other types are stack allocated by default. The new gc is pretty much compiler assisted scope managed smart pointers as well. Also when using the g
46.
▲
by
arc619
6y ago
Not yet, no. I hope with companies like JetBrains working on their Nim plugin https://plugins.jetbrains.com/plugin/15128-nim we'll see more focus put on a smooth IDE based debugging experience in particular.
47.
▲
by
arc619
6y ago
Yes, if the target is C++ then the whole output will be in C++, including code for GC operations, so you can directly inspect how this is translated. You can actually choose between several GCs for different needs: https://nim-la
48.
▲
by
arc619
6y ago
Technically yes, but directives are inserted so GDB reports the line number, source code, and parameters of the Nim file. However GDB shows the name mangling suffix in generated code, and types are their native types. There's a script
49.
▲
by
arc619
6y ago
In VSCode and Neovim there's a visual debugger but in general you can compile with `--debugger:native` and use GDB, for example: A guide to debugging and profiling: https://nim-lang.org/blog/2017/10/02&#x
50.
▲
by
arc619
6y ago
Another option is to gradually replace parts of the C++ with Nim code set to output to C++. As such you get the advantages of a high level, low friction language with fast compile times and move semantics, ABI compatibility with C++, and a
51.
▲
by
arc619
6y ago
> No algebraic datatypes Not sure what you mean there, there's product types with tuples and objects, and sum types as object variants. > Pattern matching Eh, I mean it's just sugar over a case statement. let num = 5
52.
▲
by
arc619
6y ago
Why not just use Nim? The language is rapidly converging on an ownership model similar to rust anyway and has better metaprogramming, more compile targets and a high development velocity (plus faster compile times). Rust has a bigger ecosys
53.
▲
by
arc619
6y ago
What is the perceived penalty of unqualified imports in Nim specifically? The only one that seems valid is you can't immediately see the module a proc is defined in, but you can opt in as you say with module qualifiers if you want to.
54.
▲
by
arc619
6y ago
The tl;dr is that Nim is statically typed so two functions that take different types are not ambiguous. If there is something that takes the same parameters, of the same type, in the same order it wont compile and you would use the module p
55.
▲
by
arc619
7y ago
I agree with the central thrust of what you're saying here; its definitely easier now than it has ever been, and things are now moving towards the simplicity of how it used to be when creating desktop apps using web tech with the advan
56.
▲
by
arc619
7y ago
>If frontend was bicycle science then I must have missed that in my 10+yrs writing frontends with JS+CSS. What you've said directly proves OPs point - you've missed the central message: UIs used to be bicycle science before e
57.
▲
by
arc619
7y ago
I think the article's overall stride is not so much about how these things are represented in neuronal mapping per se, and more that we shouldn't apply the idea of computer mechanics to organisms. Less load/process/store