[HN Gopher] Brunost: The Nynorsk Programming Language
___________________________________________________________________
Brunost: The Nynorsk Programming Language
Author : atomfinger
Score : 129 points
Date : 2026-04-13 18:49 UTC (5 days ago)
(HTM) web link (lindbakk.com)
(TXT) w3m dump (lindbakk.com)
| kreyenborgi wrote:
| Funny :) but I think it would work better if the language not
| only required Nynorsk, but used Nynorsk and not Bokmal for all
| keywords:
|
| https://ordbokene.no/nob/nn/ellers
|
| I think I also saw "ikke" in there.
|
| And https://ordbokene.no/nob/nn/endreleg isn't a word in any
| language? The Nynorsk word for it is sadly just "variabel". To
| make it more interesting, you could require agreement, and
| instead of "endreleg fart", how about just using the _indefinite_
| article for things that are changeable since things that are
| changeable seem kind of indefinite: ei fart =
| 70 eit smell = "bang" eit fag = "naturfag"
| ein slutt = "."
|
| And of course forKvar fart forKvar
| slutt
|
| but forKvart smell forKvart fag
|
| And if you mess up the agreement you get a red squiggly line, and
| for every such your grade goes down from 6 and if it's less than
| 2 your program fails.
| atomfinger wrote:
| 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.
| kingofmen wrote:
| What the devil kind of "Nynorsk" allows "kalkuler" in place of
| "beregn"? And as the other poster pointed out, 'endre' does not
| actually take the '-leg' ending to make an adjective; not in the
| written language at least. Your dialect may allow it but that
| hardly matters. Try 'foranderlig', although I do like the idea of
| using articles. However, as we have three articles but
| variability is binary, I suggest we assign 'en' (masculine, firm,
| rigid) to constants, 'et' (neuter, indecisive, wibbly-wobbly) to
| variables, and of course 'ei' (feminine) as referring only to
| collections, into which things may be inserted. That does leave
| us with the difficulty of how to declare a collection as
| constant; I suggest
|
| `ei fylke er alltid ["Vestland", "Rogaland", "Troms",
| "Finnmark"]`
|
| which on second thought suggests that we can just have `alltid`
| as a const-modifier on `er`. Simpler.
|
| Another point to note is that Norwegian does not allow the Oxford
| comma; correct grammar is "Johan, Fredrik og Martin". To follow
| this rule you should require the last separator of a list to be
| 'og':
|
| `ei fylke er alltid ["Vestland", "Rogaland", "Troms" og
| "Finnmark"]`
| lrasinen wrote:
| This is the kind of quality response that makes HN great.
| botto wrote:
| Yeah, this is HN at its peak, commentary on a Norwegian based
| programming language in English :D
| atomfinger wrote:
| 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
| "last" and "open".
|
| The thought process was:
|
| - Variabelen er last for endringer.
|
| - Variabelen er open for endringer.
|
| But I really like the "alltid" suggestion.
| kingofmen wrote:
| > I have renamed the "endreleg" since the article release to
| "last" and "open".
|
| I like that - much shorter and also the two keywords are the
| same length, which is always nice when you're making a list.
| I have to say I would prefer 'apen', though, just to make
| extra trouble for people who don't have a keyboard with
| Correct letters on it. :D
|
| A further thought on `alltid` - you could add the keyword
| `aldri`, which makes it a runtime error for the variable to
| take that value. Maybe add ranges as well, for easy bounds
| checking, e.g.
|
| ``` en peker er aldri = null en indeks er aldri > 5 ```
| atomfinger wrote:
| 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
| freekh wrote:
| As a fellow Norwegian and nerd I have always wanted to be better
| at Nynorsk. Maybe this is what I need to get better at it!
| vidarh wrote:
| Word Basic back in the Word 95 days _translated keywords_.
|
| The source was saved tokenized, so the program would have
| different keywords when loaded in different version of Word. I
| don't know if there was a Nynorsk version, but I presume there
| must have been.
|
| (I once had a contract where I spent the first week sorting out
| problems caused by someone managing to move Word Basic from a
| Danish version of Word to a Norwegian version untokenised; the
| problem being of course that the Danish and Norwegian keywords
| had a lot of overlap, read just fine to a Norwegian reader, but
| there were differences and so everything broken and the
| original Word Basic files were not available to me so I
| couldn't just load that into Norwegian Word... Fun times. This
| was also the first time I had ever seen Word Basic, after
| confidently telling the recruiter that of course I knew it, as
| I was desperate to land the contract - in the end I finished
| ahead of time, so it was all good)
| ivolimmen wrote:
| This was the reason I installed only the English version of
| windows and office. I do not like Dutch, even though it's my
| native tongue. I grew up with os and programming languages in
| English because translation was too expensive and I got used
| to it
| vidarh wrote:
| Yeah, same thing for me. The article is funny, but I'd hate
| to actually use a language using non-English keywords.
| fph wrote:
| Excel _still_ translates keywords in 2026.
| Kaliboy wrote:
| After spending way too much time thinking about how I would
| program in a language I never heard about I realized that as a
| native Dutch speaker Nynorsk is fairly readable.
|
| I'm sold.
| vidarh wrote:
| As a Norwegian with passable German, written Dutch feels almost
| like just jumbling some letters around and adding unnecessary
| consonants... (Spoken Dutch, though, is entirely
| incomprehensible to me) The language continuum around the North
| Sea is fairly tight (more so if you consider Low German instead
| of standard German so you don't need to deal with the effects
| of the annoying High German consonant shift (think Dag -> Tag,
| Schip -> Schiff etc.))
| mhd wrote:
| I once had some Norwegian room mates in Ireland, and whenever
| we collectively couldn't find the proper English word, we
| usually got lucky with our native tongues. When listening to
| Scandi TV series, I'm still surprised more than I should be
| by the occasional match (recently: suddenly -> "plutselig",
| similar to German "plotzlich").
|
| Now, as for the _Danish_ room mate, he might as well have
| been speaking Greek.
| dottedmag wrote:
| However if you asked your Danish roommate to write down
| what he said it would make perfect sense.
| vidarh wrote:
| In Norway, Danish is sometimes subjected to friendly
| ridicule as sounding like Norwegian spoken with a potato in
| your mouth...
|
| Danish is if anything ever so slightly closer to German in
| vocabulary and grammar, but the pronunciation is another
| matter.
|
| The effect is bigger in writing. In high school I worked my
| way through Faust in German by finding an old Danish
| translation as a parallel text - the old Danish version was
| a decent halfway point when I struggled too much with the
| German, and helped me find similarities I wouldn't
| otherwise.
| T-A wrote:
| > In Norway, Danish is sometimes subjected to friendly
| ridicule
|
| Case in point:
|
| https://www.youtube.com/watch?v=ykj3Kpm3O0g
| atomfinger wrote:
| Classic. Kamelasa.
|
| Maybe I should throw that into the language somewhere.
| hencq wrote:
| I studied in Trondheim for a semester and learned some
| Norwegian. Whenever I didn't know a word, I just pronounced
| the Dutch or English word in a 'Norwegian way'. Most of the
| time people didn't even blink. So much so that I'd then ask
| them if the word I just used existed and invariably the
| answer was that that was the correct word.
| wodenokoto wrote:
| "Fast" means firm or constant. "Fart" means speed.
|
| The examples have nothing to do with quick flatulence.
| ivolimmen wrote:
| But it was an intended joke...
| wodenokoto wrote:
| Now ruined by an intended explanation.
| kreyenborgi wrote:
| It's hn. We require all jokes to come with disassembly
| instructions.
| lrasinen wrote:
| One of these years I'm going to make a Finnish programming
| language that enforces the correct case in arguments. And I don't
| mean silly arguments like camelCase vs kebab-case, I mean
| grammar.
|
| Some examples to illustrate: tiedosto on
| "foo.txt" avattuna tulostin on PRN1
| kirjoita(tiedostoon, "a") kirjoita(tulostimelle, "b")
|
| Job security for DECADES.
| onre wrote:
| This is equal parts brilliant and demented. Thank you.
| syote olkoon vakiosyote yrita tee syotteen
| kullekin alkiolle: kasittele(alkio) paitsi
| poikkeustilanteessa liukulukuylivuoto:
| kirjoita(virhetulosteeseen, "liukulukuylivuoto") muutoin:
| kirjoita(virhetulosteeseen, "odottamaton poikkeus")
| aapoalas wrote:
| Remember to be careful with looping lest you create an
| ikikierio.
| mhd wrote:
| Like a more devious Lingua::Romana::Perligata?
|
| https://metacpan.org/dist/Lingua-Romana-Perligata/view/lib/L...
| lrasinen wrote:
| Perhaps more inspired by the INTERCAL's PLEASE.
| marmakoide wrote:
| And with all the maths in balanced ternary
| kingofmen wrote:
| And call it AivotP*rkele?
| vidarh wrote:
| > One can make similar arguments about Bokmal and Sami, but
| people speak Sami. And I would argue that a lot more people speak
| "pure Bokmal" than Nynorsk.
|
| Very, very few. I used to, as a side effect of being quite
| asocial and reading a lot as a child, and reinforced by my dads
| very conservative dialect for western Oslo despite where we were
| living (half an hour drive out the other side of Oslo; dialects
| in Norway are very local - in that span you pass through at least
| one other dialect area). The dialect differences were significant
| enough that an exchange student in high school who was speaking
| close to perfect Norwegian toward the end of the year still
| struggled to understand me.
|
| But even then, I adopted more and more of the regional dialect
| over time. Unless you're a hermit it's hard not to. And there are
| basically no place in Norway where the local dialect is pure
| Bokmal.
|
| There might well be more people who _can switch_ to speak pure
| Bokmal than Nynorsk, though, because it is the primary written
| language of far more people, and so its the easiest to slip into
| if you want to speak "formal" Norwegian. This was more
| pronounced before, when there was a tendency to see the written
| languages, and especially Bokmal, as more prestigious, and so you
| might hold a speech in Bokmal instead of your own dialect, TV
| presenters favoured "pure" Bokmal or Nynorsk instead of their
| dielcts etc. That's thankfully changed
| keybored wrote:
| What do you know about Bokmal being more prestigious in the
| past? You don't respect the other form enough to cognize that
| it exists.[1] I don't think that lends itself to a well thought
| out comparison.
|
| [1] https://news.ycombinator.com/item?id=47072436
| vidarh wrote:
| > What do you know about Bokmal being more prestigious in the
| past?
|
| Having grown up in Norway and seen first hand how it was
| treated that way.
|
| > You don't respect the other form enough to cognize that it
| exists.[1]
|
| I don't like Nynorsk, sure, but that has zero relevance to
| the point I made, which was if anything a point of contention
| for those who _do_ like Nynorsk for decades, and a subject of
| intense activism.
|
| EDIT: You seem to think that I am suggesting that makes one
| better than the other, or that it _should be_ that way.
| Neither is the case - there 's a reason I wrote "That's
| thankfully changed". But it was very much the case up until
| at least the 1980's that Bokmal was treated more favourably
| than Nynorsk in all kinds of contexts. E.g. companies
| expecting communication with customers should be done in
| Bokmal, for example, was an actual thing.
| keybored wrote:
| > Having grown up in Norway and seen first hand how it was
| treated that way.
|
| In Oslo.
|
| > I don't like Nynorsk, sure,
|
| That's not what respect or disrespect is about.
|
| > but that has zero relevance to the point I made,
|
| No. The relevance is what I stated, in the next sentence
| that you did not quote.
|
| > which was if anything a
|
| What I questioned was its truthfulness. Not what kind of
| person would say it.
|
| > You seem to think that I am suggesting that makes one
| better than the other, or that it should be that way.
|
| I did not state or think that you were making a normative
| statement.
|
| > But it was very much the case up until at least the
| 1980's that Bokmal was treated more favourably than Nynorsk
| in all kinds of contexts. ...
|
| Being used more including being dictated from some top-down
| direction does not necessarily have anything to do with
| prestige and could be entirely prosaic.
| vidarh wrote:
| > What I questioned was its truthfulness
|
| You can question the truthfulness all you want.
|
| It doesn't change the fact that this has been a well
| established aspect of the language struggle in Norway for
| well over a century, to the point that when I went to
| school it was even covered in history lessons.
|
| I'm mystified with how you are ignorant of this. Bokmal
| has it's origin firmly in being derived from Danish via
| Riksmal, as based on how the elites spoke.
|
| The spread of Bokmal was a direct consequence of its
| prestige as a consequence of for a very long time being
| the favoured written language of the elite, leading to
| adoption even in areas where the spoken dialect was
| closer to Nynorsk.
| keybored wrote:
| Prestige = elite strata. That answers my question.
| vidarh wrote:
| Yes, coming from the elite strata is and has objectively
| been considered signifiers of high status and prestige in
| most societies throughout human history.
|
| I sense that you are trying to imply that I am applying
| some kind of value judgement in recognising what people
| have historically found prestigiuous.
|
| If so you are completely missing the point.
| keybored wrote:
| That the elite strata is prestigious according to History
| is tautological considering what History is.
| vidarh wrote:
| Of course that is not at all what I wrote.
| keybored wrote:
| You said history. I thought you were referring to that
| empirical discipline.
|
| What is prestigious is an empirical question.
| thomasfl wrote:
| The brunost programming language could be very useful for
| norwegian government agencies. It is common to use norwegian
| names for variables and functions at the Norwegian Labour and
| Welfare Administration (NAV in Norwegian). A subset of typescript
| where the reserved words are written in nynorsk, would help
| prevent misunderstanding.
| keybored wrote:
| I don't understand how having 65-100 keywords localized makes
| any difference. People can use these kinds of mixed registers
| for specific niches and it seems seamless to everyone.
| starefossen wrote:
| Most of the source code for the Norwegian welfare system is
| published openly on https://github.com/navikt (4K repos)
| thomasfl wrote:
| It is a lot of good code there.
| atomfinger wrote:
| 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.
| n0rlant1s wrote:
| Spenstig!! Mangler bare "endeleg" i Exception handling :)
| atomfinger wrote:
| Sant sant, legger det til!
| starefossen wrote:
| If you have not tasted brunost you should definitely try it
| https://en.wikipedia.org/wiki/Brunost
| cryptocod3 wrote:
| Yep, I just had a slice of bread with strawberry jam and
| brunost on top
|
| 10/10
| gpvos wrote:
| I have tasted it, once. Downvoted.
| tilt_error wrote:
| Eg saknar kvisleis.
| s1mplicissimus wrote:
| I was somewhat skeptical, but this got me:
|
| ``` fast fartsgrense er 80 fast minFart er 90
|
| ```
| benj111 wrote:
| Slightly off topic.
|
| "Now, the keyword fast here is saying that the variable fart
| cannot be changed - it is immutable"
|
| So would this be the same 'fast' as you'd find in 'steadfast' or
| as in stuck?
| vages wrote:
| Yes. And as in fastness (which would be <<fastheit>> in
| Nynorsk): https://www.etymonline.com/word/fastness
| ethan_smith wrote:
| Yes, exactly - same Germanic root. "Fast" in Scandinavian
| languages means firm/fixed/stuck, which is also the original
| meaning in English (as in "hold fast", "steadfast", "fasten").
| The "quick" meaning in English is actually the newer one,
| derived from the idea of being "stuck" on a course.
| vintermann wrote:
| "endreleg"? Are you sure that word is in your own nynorsk
| dictionary?
| atomfinger wrote:
| 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 "last".
|
| As in:
|
| - Variabelen er open for endringer.
|
| - Variabelen er last for endringer.
| kreyenborgi wrote:
| Bonus points for requiring 'a' to program in Brunost.
| atomfinger wrote:
| I use an English keyboard myself. I have to switch between
| layouts every other character.
|
| I've made my own hell with this language.
| mstade wrote:
| As a Swede I am surprisingly drawn to this. At first I read this
| as a fun joke, an art project if you will. By the end after
| reading the code and being surprised by how comfortably it reads
| to me I find myself kind of wanting to use this. In a way it is
| exactly like brunost, surprisingly good.
| atomfinger wrote:
| 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.
| skrebbel wrote:
| I understand "fast fart er 80" and it makes sense, but I think
| present tense "er" for mutable variables is super weird, and
| implies functional semantics in an imperative world. Like eg
| this: endreleg fart er 80
|
| This is weird! It can change but it _is_ 80? Was it already? Will
| it forever? Should that maybe be "blir" instead? (pardon my
| nonexisting Nynorsk, I'm extrapolanorsking from Danish "bliver")
| Eg: endrelig fart blir 80
|
| So that later it can become a different value, eg
| fart blir 90
|
| And the imperative nature of this bit of code is immediately
| clear to the reader.
| atomfinger wrote:
| I have actually changes this in a newer version of the
| language.
|
| Now it is "last" and "open", as in: last fart
| er 80 open fartsgrense er 110
|
| Mostly because the length difference between "endreleg" and
| "last" triggered me.
| skrebbel wrote:
| Yeah but my beef is not with "endrelig" but with "er".
| atomfinger wrote:
| 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 bla.
|
| aka himmelen er bla. 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
| skrebbel wrote:
| > See assignments as statements of fact.
|
| This makes sense in functional languages where variables
| can't change, but not in imperative languages like
| Brunost. When a fact changes halfway the story, it wasn't
| much of a fact. Himmelen er bla, inntil den blir rosa.
|
| I too like your final example.
| ggsp wrote:
| > extrapolanorsking
|
| <3
| yalok wrote:
| For those in the USA - if you never tried brunost (brown cheese)
| - look at specialty cheeses of a larger grocery chain (Whole
| Foods, Safeway, ...) - it's called "Ski Queen" here, and is sold
| as a perfect cube in red/brown plastic pack.
|
| It's very delicious.
|
| I was ecstatic when I found it quite a few years ago in a regular
| store. A Norwegian friend of mine used to send me a brick of this
| cheese once a year for Christmas, when I was a student, and I
| treasured it as one of the most valuable possessions :)
|
| Also, fun fact - the reason this cheese tastes sweet is due to
| caramelization - the milk gets boiled for a long time (hours) to
| get the brown color and sweetness. So it's completely natural,
| zero added sugar ;)
| unixhero wrote:
| Nynorsk destroyed my future
| reerdna wrote:
| This brings back good memories from when a friend made C in
| nynorsk: https://www.pvv.ntnu.no/~andreer/nynorsk/
___________________________________________________________________
(page generated 2026-04-18 23:01 UTC)