HackerTrans
TopNewTrendsCommentsPastAskShowJobs

atomfinger

no profile record

Submissions

Brunost: The Nynorsk Programming Language

lindbakk.com
140 points·by atomfinger·3 miesiące temu·72 comments

comments

atomfinger
·3 miesiące temu·discuss
That is kinda interesting as a concept tbh.

  open peker er 10
  peker er aldri < 5
  peker er aldri > 10
  // Masse kode
  peker er 30 // Error 
Or alternatively:

  open peker er 10
  peker er aldri < 5 eller > 10
  // Masse kode
  peker er 30 // Error
atomfinger
·3 miesiące temu·discuss
Classic. Kamelåså.

Maybe I should throw that into the language somewhere.
atomfinger
·3 miesiące temu·discuss
I use an English keyboard myself. I have to switch between layouts every other character.

I've made my own hell with this language.
atomfinger
·3 miesiące temu·discuss
Ah.

I don't disagree with you per se, but I think we can look at it another way: See assignments as statements of fact. The sky is blue. Himmelen er blå.

aka himmelen er blå. A statement of fact.

Also, "blir" becomes yet another keyword. More keywords, more to remember. Not that this has been a real consideration or worry in Brunost so far. The design so far is very much "What I felt was okay that day".

I do agree with the fact that this reads nicely:

  open fart er 80
  fart blir 50
atomfinger
·3 miesiące temu·discuss
I have actually changes this in a newer version of the language.

Now it is "låst" and "open", as in:

  låst fart er 80

  open fartsgrense er 110
Mostly because the length difference between "endreleg" and "låst" triggered me.
atomfinger
·3 miesiące temu·discuss
If there is a market for that, then I would build a new language from the ground up that is... better designed.

Brunost is just me throwing syntax at the wall to make a "nynorsk programming language". Less about careful design and more about getting something to work.

If I were to make a language intended for an important production system, it would be a compiled language that (probably) would go the Gleam route and compile to JS and some other language, while also being typesafe, having a package manager and so forth.
atomfinger
·3 miesiące temu·discuss
I don't know how far I want to take this language, but if there is a market for an actual nordic/norwegian language then it shouldn't be Brunost.

I would want something that compiles down to something, not interpreted, typesafe, with a proper package manager, etc.

My initial goal was always to take it far enough to do file I/O and sockets, so I could make a Brunost website in Brunost.

If there is interest in the language from the POV of education and so forth I'd be happy to tailor it away from goofs and gafs and into something a little more usable, but I don't want the language to become a full-on production language.
atomfinger
·3 miesiące temu·discuss
Sant sant, legger det til!
atomfinger
·3 miesiące temu·discuss
Well, I got a 2 in nynorsk, so I expected to have some mistakes going into this. Not sure I can handle also being graded by it.

I have replaced endreleg with "open", and the immutable variable with "open" in later versions (done after the article).

So now the "endreleg" is less of an annoyance, both because it no longer exists and because it has the same number of characters as the immutable keyword.
atomfinger
·3 miesiące temu·discuss
This tickles me:

> `ei fylke er alltid ["Vestland", "Rogaland", "Troms" og "Finnmark"]`

Might even consider adding that.

I have renamed the "endreleg" since the article release to "låst" and "open".

The thought process was:

- Variabelen er låst for endringer.

- Variabelen er open for endringer.

But I really like the "alltid" suggestion.
atomfinger
·3 miesiące temu·discuss
I have actually changed this since the post's release.

I got annoyed that "fast" and "endreleg" have different numbers of characters (regardless of whether endreleg is nynorsk. I got a 2 in Nynorsk in school, so........)

Now it is "open" and "låst".

As in:

- Variabelen er open for endringer.

- Variabelen er låst for endringer.
atomfinger
·11 miesięcy temu·discuss
> Isn't it obvious that "nazi bullshit" isn't welcome? Like a no-brainer?

Unfortunately, not in this day and age.

> Why does a programming language feel the need to say this?

It's less about "the language saying it" and more about the standards of the community that surrounds the language.

For a language to thrive, it needs a community of people contributing to it. If it doesn't, it'll eventually die unused. As such, there's more than "just the language"; it is also a community-building effort.

> Also, the phrase "nazi bullshit" is severely...

IMHO, you're reading too much into the word "bullshit".