Live data from Hacker News

A Programming Language Underdog

totallywearingpants.com

181–190 of 238 posts

Re: A Programming Language Underdog

#181
post #7

Earlier quoted context omitted.

What are Nim’s main weaknesses?

Post author here. A few things that make me sad in the pants: - js doesn't have source maps (kinda of a big deal to me) - some error messages are head scratchers (seem to remember trying to add things to an immutable array not being clear) - docs could use love (eg seeing more examples of macros in action) - devel (their nightly compiler) can be rough (e.g. i found the "strings cannot be null" cutover a bit rocky --…

I have implemented source maps for the js backend : https://github.com/nim-lang/Nim/pull/7508

They aren't merged yet in the upstream compiler because I wasn't sure if I wanted to refactor the jsgen with them, but otherwise they are almost there: I use them in a personal project in a forked branch

Re: A Programming Language Underdog

#182
post #171

Earlier quoted context omitted.

> you have to set your text editor to make those invisible characters visible Or you set it to replace one with the other, and not bother you.

Still more work than just using braces.

>Still more work than just using braces.

How so? It's a one time change to a setting in your editor, vs thousands and thousands of keystrokes.

Re: A Programming Language Underdog

#183

I read the article. Still no idea what Nim is good for and why it's better than some other language.. and for which use cases?

I've tried it out and read the Nim book, but I'm not using it for any larger project right now. So here is a biased opinion. Pros: Nim is about as easy to program as Python, has the same speed as C, a working FFI, and all the usual bells and whistles of modern "battery included" languages like a package manager with lots of packages. It is garbage collected, which is good -- about this, some will disagree, of course.…

I am curious to know what you find limiting about the Racket GUI. There have been some interesting[1] things[2] being developed with it recently. I have been able to use it to write a stock trading simulator[3] with price charts.

[1] https://alex-hhh.github.io/2018/06/a-racket-gui-widget-to-di...

[2] https://alex-hhh.github.io/2018/05/running-and-cycling-worko...

[3] https://github.com/evdubs/chart-simulator

Re: A Programming Language Underdog

#184
post #165

Nim is my favorite language right now. If you look at the different metrics that we use when discussing programming languages, it might not be the best of any category, but its "good enough" in every category. It might not have as powerful a type system as Haskell, but it's safe enough. It might not be as fast as C, but its fast enough. It might not be as easy as Python or Ruby, but it's pretty easy to get started wi…

What does it use for desktop UI dev?

There are a couple different libraries, not sure which one is the best though. I know an official one is in development as well. https://github.com/VPashkov/awesome-nim/blob/master/README.m...

Re: A Programming Language Underdog

#185

I read the article. Still no idea what Nim is good for and why it's better than some other language.. and for which use cases?

I read the article, and I’ve been spending the past 20 minutes looking at the SPA framework. I’m still not sure what it is or why anyone would use it. It looks extremely complicated and verbose.

Don't know why you're being downvoted. I had the same experience reading through Karax GitHub. I might be spoiled by other docs.

Re: A Programming Language Underdog

#186
post #165

Earlier quoted context omitted.

What does it use for desktop UI dev?

There are a couple different libraries, not sure which one is the best though. I know an official one is in development as well. https://github.com/VPashkov/awesome-nim/blob/master/README.m...

Thanks.

Re: A Programming Language Underdog

#187
post #183

Earlier quoted context omitted.

I've tried it out and read the Nim book, but I'm not using it for any larger project right now. So here is a biased opinion. Pros: Nim is about as easy to program as Python, has the same speed as C, a working FFI, and all the usual bells and whistles of modern "battery included" languages like a package manager with lots of packages. It is garbage collected, which is good -- about this, some will disagree, of course.…

I am curious to know what you find limiting about the Racket GUI. There have been some interesting[1] things[2] being developed with it recently. I have been able to use it to write a stock trading simulator[3] with price charts. [1] https://alex-hhh.github.io/2018/06/a-racket-gui-widget-to-di... [2] https://alex-hhh.github.io/2018/05/running-and-cycling-worko... [3] https://github.com/evdubs/chart-simulator

Same as OP but posted from another account. Well, it always depends on the application. Here are the main limitations:

1. no internal drag&drop from control to control in a frame or from frame to frame, like from an editor snip to a listbox, or from a listbox item to a text field or canvas

2. text% and editor-canvas% are too slow for some applications, esp. for displaying lots of data fast or styling snips

3. text% does not allow associating arbitrary data with ranges (strange enough, list-box% has this)

4. text% uses a nonstandard format, neither RTF, XML, HTML, rich text is not easily drag&droppable or copy&pastable to other applications in a platform-compliant way without writing your own converter

5. no images in list-boxes, and generally speaking no advanced custom "grid" control (e.g. also no editable fields in list-boxes or similar table features)

6. no images in menu items

7. no toolbar, you have to make one your own and it will not be platform-compliant (macOS)

8. no docking manager or other advanced user configuration controls (we could implement these easily if we had frame-internal drag&drop, but we don't, so we can't)

9. no built-in input validation for text fields, like limiting one to integers, floats, dates, you have to do that on your own

10. it appears that some icons are not properly installed by Racket's deployment functions even if you specify them in the #:aux argument of create-embedding-executable

11. no access to tray icon

12. no way to obtain system colors from the system color scheme for custom controls, so you cannot create theme compliant custom controls

13. clipboard operations are limited (unless this has changed since I checked last time), meaning e.g. you cannot easily implement a "receiver" for some mime type data

14. related to the previous one, only whole frames can receive drag&drop objects and you basically just get a file path

That are all the points off the top of my head. For me, only 1, 3, 4, and 5 are problematic and 1 is a show-stopper. 3 is also important, since implementing this on your own can lead to a vast range of problems (you'd have to constantly maintain a data structure in sync with the snips in the editor).

Re: A Programming Language Underdog

#188
post #7

Earlier quoted context omitted.

What are Nim’s main weaknesses?

Post author here. A few things that make me sad in the pants: - js doesn't have source maps (kinda of a big deal to me) - some error messages are head scratchers (seem to remember trying to add things to an immutable array not being clear) - docs could use love (eg seeing more examples of macros in action) - devel (their nightly compiler) can be rough (e.g. i found the "strings cannot be null" cutover a bit rocky --…

> nim's stdlib is massive (too big?)

It has less modules than Python.

Re: A Programming Language Underdog

#189
post #47

Interesting! Minus: yet another proprietary package manager, bypassing the operating system's software management subsystem (operational maintainability) Plus: finally a language which compiles to binary executable machine code. Plus: transpiles to multiple "backend" languages (but transpilers incur a performance penalty). Plus: can link with shared object libraries, thus having instantaneous integration choices with…

> Minus: yet another proprietary package manager, bypassing the operating system's software management subsystem (operational maintainability)

False. Nimble installs packages only in the current user's home.

It's one of the few package managers that does not encourage the dreadful "sudo pip/npm/... install"

Re: A Programming Language Underdog

#190
post #47

Interesting! Minus: yet another proprietary package manager, bypassing the operating system's software management subsystem (operational maintainability) Plus: finally a language which compiles to binary executable machine code. Plus: transpiles to multiple "backend" languages (but transpilers incur a performance penalty). Plus: can link with shared object libraries, thus having instantaneous integration choices with…

i must admit that i'm not a big fan of nimble (nim's package manager; for a few reasons) but on the other site you have apt, pacman, yum, whatelsenot, afaik most of them are not even able to install two versions of the same library side by side. The situation is so bad that most applications these days are packed with `flatpack` or something else, because of the so broken linux package management... In contrast to eg…

> most of them are not even able to install two versions of the same library

That's entirely by design.

Distributions exist to provide a set of packages that are well tested, and work reliably, together.

And then guarantee that such set will stay the same and receive timely security updates for 3 or 5 or more years so that people can reliably use it in production.

Post reply on HN