Live data from Hacker News

Nim 0.13.0 has been released

nim-lang.org

61–70 of 80 posts

Re: Nim 0.13.0 has been released

#61
post #48

Earlier quoted context omitted.

> Case-sensitivity is the opposite though: it's making two things that look the same be different. I can see why you would say that, but (as my comment suggests) I'm with wtetzner ( https://news.ycombinator.com/item?id=10932471 ) on this one: I think that `variable` and `VARIABLE` look different. I am willing to believe, though, that this may just be a result of my training (as a mathematician); my students often gen…

I think the point in the "variable"/"VARIABLE" difference is that, although they visually look very different, their meaning does not. In a more practical case, if I read some code which has two variables within the same score with names "last_value" and "LAST_VALUE", I would not be able to tell what should they contain: one has the last value in a sequence (which one?), and the other... what?

I agree that, in that example, it's hard to think why one would want both. I not infrequently find it happening (that I want the same name with different capitalisations to mean different things) in TeX, but that's probably not a good example of programming practice (and I can't think of a recent example anyway). It is probably most prevalent in mathematics, where, for example, one will often use `a` for the length of the side of a triangle opposite the angle labelled `A`. Again, though, it's fair to argue that good mathematical practice in naming variables is not good programming practice!

Re: Nim 0.13.0 has been released

#62
post #60
post #58

Earlier quoted context omitted.

I enjoyed starting to learn about Nim, but the worst case of NIH is the forum. There is good forum software out there. This thing that Araq wrote in his spare time is not good forum software. It is outright painful to participate in a discussion there.

As somebody who has written most of the Nim Forum, I'm really sad to hear that. I appreciate good feedback though. What would you say should be improved in the forum to make it less painful to use?

Not the parent, but: I disagree and think it's very good — much better than your average phpBB ugliness.

But I would cut down on the pagination. 10 comments per page is insane on even small devices. A 70-comment thread (not long even by HN standards) means 10 page jumps. Those really mess with your ability to follow anything.

I've not participated, but if I reply to something, do I then "follow" that thread, so I can get reply notifications?

Re: Nim 0.13.0 has been released

#63
post #27
post #22

Earlier quoted context omitted.

> Case sensitivity makes life harder for beginners I think that I disagree. In general (not all the time, but often), things that look different should be different; allowing them to be treated the same is offering beginners a short-time advantage, while preventing them from making, or even understanding, distinctions that they may want to make in the long term. Imagine, for example, a car where both pedals behave th…

> In general (not all the time, but often), things that look different should be different Case-sensitivity is the opposite though: it's making two things that look the same be different. I could maybe support a rule (or even just a linter) that each variable had to be written in a consistent case throughout the project, but two different variables that differ only in case should definitely be disallowed, IMO. > It w…

> I could maybe support a rule (or even just a linter) that each variable had to be written in a consistent case throughout the project, but two different variables that differ only in case should definitely be disallowed, IMO.

By the way, it occurred to me several hours later that this sounds a lot like HFS's "case preserving" approach, where case is ignored when matching (so that you cannot have a directory with separate files `a` and `A`), but preserved when displaying (so that a file created as `a` will never display as `A`, and vice versa). I don't want to speak for everyone, but my understanding is that this behaviour is regarded as a wart.

Re: Nim 0.13.0 has been released

#65
post #60
post #58

Earlier quoted context omitted.

I enjoyed starting to learn about Nim, but the worst case of NIH is the forum. There is good forum software out there. This thing that Araq wrote in his spare time is not good forum software. It is outright painful to participate in a discussion there.

As somebody who has written most of the Nim Forum, I'm really sad to hear that. I appreciate good feedback though. What would you say should be improved in the forum to make it less painful to use?

Ah, sorry that I assumed it was all Araq's doing. Here's my feedback:

I see no way to keep track of threads I've posted in, or threads I am interested in, or get notifications when people reply. That would be the most important thing. Maybe I'm missing something, because right now I read down the list of subjects for threads I'm interested in, and look for whether the most recent responder is different from who I remember.

Writing forum comments in ReStructuredText is not friendly. Anyone who is not wise to the ways of the forum is going to fail the first time they try to post code, and I still have to look up a ReStructuredText reference, because I never use RST for anything else. Just use GitHub-flavored Markdown, the markup language of least surprise for developers.

As another person responded, reading a thread longer than 10 messages is unnecessarily awkward. The navigation buttons -- which must be used frequently -- are not particularly prominent on a computer screen, and on a phone they're like a millimeter in diameter.

Interface elements are strange. Why is someone's username a link if the page behind it doesn't do anything useful such as list their posts? Why does the timestamp have a dotted line under it? What am I supposed to be able to do with the timestamp? I would expect from other places that it would be a permalink, but it seems to just be nothing.

Re: Nim 0.13.0 has been released

#66
post #65
post #60

Earlier quoted context omitted.

As somebody who has written most of the Nim Forum, I'm really sad to hear that. I appreciate good feedback though. What would you say should be improved in the forum to make it less painful to use?

Ah, sorry that I assumed it was all Araq's doing. Here's my feedback: I see no way to keep track of threads I've posted in, or threads I am interested in, or get notifications when people reply. That would be the most important thing. Maybe I'm missing something, because right now I read down the list of subjects for threads I'm interested in, and look for whether the most recent responder is different from who I rem…

There is a syntax cheatsheet link under the text entry for forum posts.

Since its still not a huge forum, adding notifications would create a lot of overhead and I'm not sure it is that much better than looking for your icon in the threads and using the fact that threads are ordered by most recent posts. At this point it seems unnecessary.

If you have ideas for improving it though you can make a PR: https://github.com/nim-lang/nimforum . Best to discuss on the IRC channel with dom96 and them first though (or on the forum).

I agree it would be nice if it loaded a little more than 10 at a time, but the nav arrows aren't that bad for me.

Re: Nim 0.13.0 has been released

#67
post #6
post #2

I will definitely be keeping an eye on Nim. That aside, does anyone else find the fact that Nim treats "-1" differently to "- 1" (quotes added for clarity) a bit disconcerting?

In Lisps, this: (- 1) and this: (-1) Are completely different things (the latter is actually an error). Also in LiveScript ls> (- 2) [Function] ls> (-2) -2 Also in Smalltalk, this: -3. "=> -1" - 3. "=> Error!!!" That's off the top of my head, I'm sure there are many other languages with this characteristic. Why would that be a problem? It's just a single (or a couple) parse rules to remember (but you get other benefi…

Comparing Nim to Lisps doesn't make much sense. Lists in Lisp are whitespace-separated, so `(- 1)` is different from `(-1)` for the same reason that `(a b)` is different from `(ab)`.

Re: Nim 0.13.0 has been released

#68
post #63
post #27

Earlier quoted context omitted.

> In general (not all the time, but often), things that look different should be different Case-sensitivity is the opposite though: it's making two things that look the same be different. I could maybe support a rule (or even just a linter) that each variable had to be written in a consistent case throughout the project, but two different variables that differ only in case should definitely be disallowed, IMO. > It w…

> I could maybe support a rule (or even just a linter) that each variable had to be written in a consistent case throughout the project, but two different variables that differ only in case should definitely be disallowed, IMO. By the way, it occurred to me several hours later that this sounds a lot like HFS's "case preserving" approach, where case is ignored when matching (so that you cannot have a directory with se…

> By the way, it occurred to me several hours later that this sounds a lot like HFS's "case preserving" approach, where case is ignored when matching (so that you cannot have a directory with separate files `a` and `A`), but preserved when displaying (so that a file created as `a` will never display as `A`, and vice versa). I don't want to speak for everyone, but my understanding is that this behaviour is regarded as a wart.

That behaviour's very surprising because it means you can e.g. open a file by name, then check its name, and get a different name from the one you opened it under.

What I'm suggesting is equivalent to: variable names are case-sensitive, but it's an error to ever have two variables in scope that differ only in case (maybe only applied when you actually access one - depends on your views on wildcard imports).

Re: Nim 0.13.0 has been released

#69
post #56

Earlier quoted context omitted.

In Lisp, a parenthesized expression is a function call by default, if not explicitly transformed in some way (for example with `quote`). `(f 1 2 3)` would be written as `f(1, 2, 3)` in other languages, and `(f)` would be `f()`. So `(-1)` would translate to `(-1)()` which doesn't make sense. Well, not exactly, as for example in CL and Elisp you have a `1+` function[1], which... well, adds 1 to its argument. The differ…

Thanks for the answer. I know very little Lisp, though I find it interesting. > `|-1|` Is there a name for that | operator - if it is one?

I didn't find any specific name for it. I think it's just a part of atom syntax, like " is part of string syntax. But it could also be a reader macro - in Common Lisp you can override parts of a parsing process. You can write similar macros yourself. For example, Common Lisp doesn't have a dict object literal ({} in json), but as you can see here: https://gist.github.com/chaitanyagupta/9324402 you can add it.

Re: Nim 0.13.0 has been released

#70
post #23

Earlier quoted context omitted.

In Python there is a convention for naming classes with `CamelCase` and instances with `snake_case`. It works very well, you can always tell if you are dealing with a class or an instance. Personally I believe code is harder to read than to write, so I favor languages that are easier to read.

If such a convention applied consistently that would be great. But my Python experience is that it isn't, and an inconsistent convention is worse than useless. If such a distinction is to be meaningful then IMO the language itself needs to enforce it.

Exactly why I like Go's conventions for public/private, when I was younger and less experienced I always thought that it was great to have freedom to name things however I wanted but now I can't find a good argument against opinionated and enforced conventions for naming.

I actually would appreciate if someone could provide me one.

Post reply on HN