Live data from Hacker News

A Programming Language Underdog

totallywearingpants.com

171–180 of 238 posts

Re: A Programming Language Underdog

#171
post #64

Earlier quoted context omitted.

To me, braces are simpler and more explicit, but then I drank the C/C++ koolaid. Whitespace is intended for human readability, with spaces and tabs not having any implicitly contradictory meaning. In a whitespace sensitive language, you have to set your text editor to make those invisible characters visible to make certain to only use the correct invisible character, then employ multiple such characters based on the…

> 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.

Re: A Programming Language Underdog

#172
post #16

Another interesting upcoming language ist JAI: https://inductive.no/jai/ Its purpose is to become a better C++ for game development (high performance, simplicity).

Can anyone explain what "designed for good programmers" means?

Doesn't even try to prevent mistakes that a good programmer would avoid anyway.

For instance, C++ has operator overloading, which when misused leads do horrible, unreadable code. Still, the feature can be useful in some cases (vector/matrix library comes to mind). Java on the other hand avoids this feature because it doesn't trust the programmers with it.

As for JAI, it mostly means Jonathan Blow and his peers. I mean, he's obviously making a language for himself and whoever he hires. There's no point in catering to a different, wider audience. (The reason there's no point is because he doesn't need a whole ecosystem to support his language. He's trying to make it worth the effort even if he was the sole user.)

Re: A Programming Language Underdog

#173
post #66

I do not think all this language fragmentation is a good thing. A million little obscure languages that all at the end of the day do the same thing. Yeah, we need language research to keep devising new features and more efficient ways of programming, but this is different. I wish the world would get behind a couple well thought out languages that cover most programming needs (functional, systems/bare metal, scripting…

People make the same argument against having dozens of Linux distributions and dozens of window managers. Having a lot of choice doesn't hurt anything, and benefits everybody in the long run. > I wish the world would get behind a couple well thought out languages that cover most programming needs (functional, systems/bare metal, scripting) and stick with those. For the most part, "the world" has got behind a small ha…

> Having a lot of choice doesn't hurt anything, and benefits everybody in the long run.

But it does hurt in many cases; there is only so much programmer time; if people would invest their time in less projects, they would move on quicker.

I am as guilty of this as probably most people here, having written frameworks, orm’s, parsers, libs, languages, game engines etc instead of helping out on existing projects. I know I did it because I thought I could do better than what was there; usually that was false, however sometimes, at least I thought, it was true. For the bigger ones; frameworks, linux distros, languages, it was always false though so I would say it does hurt; I wasted time and the world did not improve. Only I improved as I liked it and learned, but I would have done as well if I had helped an existing project.

Another point to that is that a lot of people, especially people who solely use computers to make money to survive, really do not like choice in my experience. A lot of my colleagues ask me what to use and hate the fact that when they Google that there is a choice. They do not want choice, they want to use what is the de facto standard for the particular case in every case. With choice and fast change, the de facto standard isn’t there and even more experienced people experience the same angst beginners have when learning frontend web dev. It causes a lot of (probably underestimated) stress in the workplace.

Re: A Programming Language Underdog

#175

Since I have used Nim in a small team effort creating an enterprise data analysis application, let me put in a good word. The ease of coding and speed of execution was what caught our attention. I was expecting the worst (from past experiences with new languages) but we were so surprised that we could complete our project all in Nim. These are a few things that I love with Nim: - One's knowledge of Python jives reall…

What about run-time safety? e.g. are the pointers? does it have builtin in array bounds checking? (Heck, does it even have arrays?)

yes to all of these -- Nim also has those intrinsic benefits that statically checked and compiled languages bring.

Arrays? As pleasantly nimble as Python arrays to say the least. Pointers are lengthy discussion, but suffice to say that pointers are smartly handled to avoid their pitfalls at runtime (while integrating with external C if you really need to)

Time time and again as I went through using Nim, what really stuck with me was that the designers had thought through these practical matters so very well, and even in its current < 1 version the language is remarkably complete and robust for practical programmers.

Re: A Programming Language Underdog

#176
post #48

Really excited to see Nim here on top of HN. I wish it would gain more traction. I like the pythonic syntax and easy 'fast code'.

I like the concept of Nim, as in: fast, statically typed, inferred, compiled etc. but I do not enjoy whitespace-sensitive languages, so am keeping an eye on Crystal more than Nim. If that doesn't bother you, Nim is really neat.

Last I checked, Crystal had a tendency to use union types where it should use sum types. For example, if you have an array and you pop it and get nil, there's no way of knowing if you got nil because the array was empty or because the popped element was nil.

Re: A Programming Language Underdog

#177

Earlier quoted context omitted.

Nim disallows tabs entirely, and in Python 3 it's an error to mix the two in the same file. So those errors can't happen anymore. Out of your list, the only one that seems like a real problem is recreating blocks if the code lost all formatting.

You just described two errors that do actually happen and in the next sentence say those errors can't happen anymore. What am I missing here?

The comment I replied to was talking about errors arising from mixing tabs and spaces and incorrect indentation levels that arise from it.

If a language either disallows tabs entirely or will refuse to run/compile code that mixes tabs and spaces in the same source file, you obviously can't get errors related to mixing tabs and spaces.

Re: A Programming Language Underdog

#178
The tutorial starts with a quote from a song by Rammstein.

"Der Mensch ist doch ein Augentier -- schöne Dinge wünsch ich mir."

Humans are just creatures of the eye -- Beautiful things are what I want

Re: A Programming Language Underdog

#179

Earlier quoted context omitted.

In this very article, which is pretty light on details, one of the few facts presented is that you can disable GC.

Agreed. I purged a bunch of stuff and still feel like I left too much in. A couple of bonus facts for you: - they've got an effects tracking system where you can have the compiler track (and whistleblow!) which functions are pure or not - their multi-phase compiler allows you to read in source code at build time (from files or external programs!) - their macro system is typesafe as it operates at the AST level - the…

> - the guy who created it will always tell you how he feels

What does this mean?

Re: A Programming Language Underdog

#180
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 --…

[deleted]
Post reply on HN