Live data from Hacker News

Prologue: A web framework written in Nim

github.com

41–50 of 72 posts

Re: Prologue: A web framework written in Nim

#41

Earlier quoted context omitted.

Why even bring up that style gripe? You acknowledge it's relatively small and inconsequential. If you're excited to see where the language goes, don't drag things down with completely subjective aesthetic criticisms.

Simply, I'm not one to give praise through a rose colored lens. This is especially true in a place like HN, where its entirely possible the core maintainers of a project may read my feedback, and may or may not feel inclined to clarify, quantify, or at least acknowledge what I have to say about a project. I'm not bringing it down by being honest in how I feel. My praise for nim is genuine and forthright, and I've rec…

And where criticism is substantive, that's valuable. It isn't in this case, and it's hardly dishonest to keep subjective preferences in their place: within our own heads.

There's a culture of reflexive criticism in intelligent communities, and I think it has negative side effects we haven't acknowledged. Yeah, it feels good to give one's full-throated opinion without bothering to edit oneself, but we build a better world with more encouragement and more restraint when it comes to nitpicking.

Re: Prologue: A web framework written in Nim

#42
post #22

Earlier quoted context omitted.

But is is confusing if you know what Prolog is. Real world example: Once there was a new browser from Mozilla called Firebird. There was also a previously established RDBMS called Firebird. No one believed the browser and the RDBMS would be confused, but none the less Firebird the Browser is now called Firefox. The reason is a little confused - Mozilla at the time claimed something like "Firefox was only the code nam…

> Edit: also, searching for "prolog web framework" gets you stuff about using prolog for web application development. So, yeah, naming is not great and your assertion is not entirely correct. Is this a typo? I would certainly hope that a search for " prolog web framework" would not include results about a web framework written in Nim named " Prologue " "Prolog" and "prologue" are completely different words with diffe…

> Is this a typo? I would certainly hope that a search for "prolog web framework" would not include results about a web framework written in Nim named "Prologue"

Unfortunately not. It's caused by fuzzy matching and happens with other words (and languages) too. Annoying but I don't think we should start avoiding certain words because google search (and some people apparently) can't make the distinction.

Re: Prologue: A web framework written in Nim

#43

I've been following Nim for a while now (including back when it was called Nimrod), but the big reason I've never dug much more into it is because it repeats the Billion Dollar Mistake[1] of allowing values (yes, not all values, but important ones) to be nil without explicitly using Option types. It's disappointing that Nim has not (perhaps cannot, for backwards compatibility) learned the same lesson here that most o…

This is currently being remedied as we speak:

https://github.com/nim-lang/RFCs/issues/250

https://github.com/nim-lang/Nim/pull/15287

Re: Prologue: A web framework written in Nim

#44

I've been following Nim for a while now (including back when it was called Nimrod), but the big reason I've never dug much more into it is because it repeats the Billion Dollar Mistake[1] of allowing values (yes, not all values, but important ones) to be nil without explicitly using Option types. It's disappointing that Nim has not (perhaps cannot, for backwards compatibility) learned the same lesson here that most o…

Unfortunately, it'd be impossible to work effectively with C code without `nil`. You can create objects set to `not nil`. To be fair, I've had a few points when creating a new type that I forgot to allocate a new instance properly, but option types wouldn't have saved me any work. It would've produced a similar stacktrace. I think the compiler produces a warning, but I'm still working down the warning's lists. You can see more discussion on defaulting not nil here: https://github.com/nim-lang/Nim/issues/6638

Re: Prologue: A web framework written in Nim

#45

I've been following Nim for a while now (including back when it was called Nimrod), but the big reason I've never dug much more into it is because it repeats the Billion Dollar Mistake[1] of allowing values (yes, not all values, but important ones) to be nil without explicitly using Option types. It's disappointing that Nim has not (perhaps cannot, for backwards compatibility) learned the same lesson here that most o…

I am the guy assigned to work on that: sorry for the delay, but it is being worked on.

Re: Prologue: A web framework written in Nim

#46

I've been following Nim for a while now (including back when it was called Nimrod), but the big reason I've never dug much more into it is because it repeats the Billion Dollar Mistake[1] of allowing values (yes, not all values, but important ones) to be nil without explicitly using Option types. It's disappointing that Nim has not (perhaps cannot, for backwards compatibility) learned the same lesson here that most o…

> ... allowing values (yes, not all values, but important ones) to be nil ... What!? What that even means? Value types can't be nil in nim-lang, these are always initialized, but you can use Option[T] when you need it. If you mean reference types (`ref`) hopefully this PR will land soon https://github.com/nim-lang/Nim/pull/15287 .

Reference types were indeed what I was referring to.

Re: Prologue: A web framework written in Nim

#47

I've been following Nim for a while now (including back when it was called Nimrod), but the big reason I've never dug much more into it is because it repeats the Billion Dollar Mistake[1] of allowing values (yes, not all values, but important ones) to be nil without explicitly using Option types. It's disappointing that Nim has not (perhaps cannot, for backwards compatibility) learned the same lesson here that most o…

I am the guy assigned to work on that: sorry for the delay, but it is being worked on.

Excellent news! I read the discussion that has since been linked elsewhere, and got the general impression that there wasn't going to be a change for backwards compatibility reasons. Glad to be proven wrong!

Re: Prologue: A web framework written in Nim

#48

I've been following Nim for a while now (including back when it was called Nimrod), but the big reason I've never dug much more into it is because it repeats the Billion Dollar Mistake[1] of allowing values (yes, not all values, but important ones) to be nil without explicitly using Option types. It's disappointing that Nim has not (perhaps cannot, for backwards compatibility) learned the same lesson here that most o…

Unfortunately, it'd be impossible to work effectively with C code without `nil`. You can create objects set to `not nil`. To be fair, I've had a few points when creating a new type that I forgot to allocate a new instance properly, but option types wouldn't have saved me any work. It would've produced a similar stacktrace. I think the compiler produces a warning, but I'm still working down the warning's lists. You ca…

Having all references that are returned from C be treated as Option types would resolve this difficulty, no?

Likewise, your type system can prevent you from using uninitialized values in other languages, without the need for Option (and indeed the unwrap() call you imply you would have used) from being needed.

Though yes, I'm glad to see this is being addressed :).

Re: Prologue: A web framework written in Nim

#49

Earlier quoted context omitted.

I am the guy assigned to work on that: sorry for the delay, but it is being worked on.

Excellent news! I read the discussion that has since been linked elsewhere, and got the general impression that there wasn't going to be a change for backwards compatibility reasons. Glad to be proven wrong!

the default might not be changed in 1.x, but this shouldn't make it less typesafe: access to nilable types would be checked.

there are also the z3-integration related checks which might even apply to index bounds or eventually other invariants, so this kind of safety is important for Araq and Nim https://nim-lang.org/docs/drnim.html

Re: Prologue: A web framework written in Nim

#50

Earlier quoted context omitted.

> Edit: also, searching for "prolog web framework" gets you stuff about using prolog for web application development. So, yeah, naming is not great and your assertion is not entirely correct. Is this a typo? I would certainly hope that a search for " prolog web framework" would not include results about a web framework written in Nim named " Prologue " "Prolog" and "prologue" are completely different words with diffe…

> Is this a typo? I would certainly hope that a search for "prolog web framework" would not include results about a web framework written in Nim named "Prologue" Unfortunately not. It's caused by fuzzy matching and happens with other words (and languages) too. Annoying but I don't think we should start avoiding certain words because google search (and some people apparently) can't make the distinction.

Re-read what the comment I replied to said:

> searching for "prolog web framework" gets you stuff about using prolog for web application development ... And no sniff of this new framework.

The comment I replied to described that they searched for "prolog web framework", which is NOT the name of this project. The name of this project is "prologue".

"prolog" != "prologue"

Searching for "prolog web framework" should not return results about the "Prologue" web framework. What the commenter I replied to described is the correct behavior.

Edit: I understand that contrived searches might be constructed to fall victim to fuzzy matching, but what the comment I replied to confirmed is that it's probably not an issue in this case.

Post reply on HN