søren peter mørch

Timeline

Recent posts from feeds followed by sorenpeter@darch.dk

bender (twtxt.net)

@prologic maybe they should dedicate one of their advent days to make sure their site is responsive. 😂

In reply to: #fribjaa 1 year ago
bender (twtxt.net)

I see beer, and I upvote. I see "amazinf" beer, and I am thirsty already, and it's not even 07:00! 😂

In reply to: #t7ihcvq 1 year ago
prologic (twtxt.net)

For those visiting Hanoi in the Old Quarters that are beer snobs like me; highly recommend this place called Local Craft Beer 🤩

In reply to: #t7ihcvq 1 year ago
prologic (twtxt.net)

Found this place in Hanoi in Vietnam 🥳 Amazinf beer!!! 🍺

Read replies 1 year ago
prologic (twtxt.net)

completely untested as i have no remote way of running mu code from Vietnam 🤣

In reply to: #uul7hua 1 year ago
prologic (twtxt.net) Read replies 1 year ago
prologic (twtxt.net)

Hmmmm the AoC site is not mobile friendly 😢 Can someone post the puzzles as Twts? 🤣

Read replies 1 year ago
prologic (twtxt.net)

The most interesting part about mu is that the language is actually self-hosted and written in itself. There is a stage zero compound written and go on a stage one compiler written in mu

In reply to: #qsrwpva 1 year ago
prologic (twtxt.net)

Thinking about doing Advent of Code in my own tiny language mu this year.

mu is:

  • Dynamically typed
  • Lexically scoped with closures
  • Has a Go-like curly-brace syntax
  • Built around lists, maps, and first-class functions

Key syntax:

  • Functions use fn and braces:
fn add(a, b) {
    return a + b
}
  • Variables use := for declaration and = for assignment:
x := 10
x = x + 1
  • Control flow includes if / else and while:
if x > 5 {
    println("big")
} else {
    println("small")
}
while x < 10 {
    x = x + 1
}
  • Lists and maps:
nums := [1, 2, 3]
nums[1] = 42
ages := {"alice": 30, "bob": 25}
ages["bob"] = ages["bob"] + 1

Supported types:

  • int
  • bool
  • string
  • list
  • map
  • fn
  • nil

mu feels like a tiny little Go-ish, Python-ish language — curious to see how far I can get with it for Advent of Code this year. 🎄

Read replies 1 year ago
prologic (twtxt.net)

Oh dear god 😱 The level of pollution on Hanoi is insane 🥺 I can't stop coughing outside 🤯

Read replies 1 year ago
Reply via email