Email or username:

Password:

Forgot your password?
16 posts total
WimⓂ️

GO!GO!7188 瑠璃色
#theStudio
"Ruri-iro", "lapis lazuli blue"

瑠璃色の炎燃やしながら星になるまで
burning with a bright blue flame until I become a star

youtube.com/watch?v=xAhfgLHy4h

WimⓂ️

Factorial with fixpoint combinator in #Uxntal lambdas, because we can:

#05
{ ROT DUP
?{ POP POP2 #01 JMP2r }
DUP #01 SUB
SWP2 DUP2 JSR2 MUL JMP2r } STH2r
{ DUP2 JSR2 JMP2r } STH2r JSR2

( returns 120 )

WimⓂ️

happy to explain this if anyone is interested

Devine Lu Linvega

@wim_v12e 🤔 we must be working on very similar things at the moment..

WimⓂ️

It has taken me an inordinately long time, but finally my #Fortran to #Uxntal compiler can now successfully compile the Uxn dvd example.

So you can now write your Uxn games in valid Fortran.

Devine Lu Linvega

@wim_v12e Add the repo to this post! I'd love to see the dvd example now :D And what it compiles to

WimⓂ️

Writing a compiler for a new language is a lonely task, but at least you can hope your language will become cool.
I'm writing a compiler for an old, decidedly uncool language so I don't have that hope. Luckily I'm targeting Uxn, purely for the cool factor of course.

WimⓂ️

I've been chipping away at it quietly for over a year now, and I am finally at the stage were I can read a file provided on command line and print it (!)

(Well, that, and a bit more. But getting IO and strings working was the biggest task).

WimⓂ️

Oh rascal children of Gaza.
You who constantly disturbed me
with your screams under my window.
You who filled every morning
with rush and chaos.
You who broke my vase
and stole the lonely flower on my balcony.
Come back,
and scream as you want
and break all the vases.
Steal all the flowers.
Come back...
Just come back...

Khaled Juma

(via postersforpalestine.org/)

Oh rascal children of Gaza.
You who constantly disturbed me
with your screams under my window.
You who filled every morning
with rush and chaos.
You who broke my vase
and stole the lonely flower on my balcony.
Come back,
and scream as you want
and break all the vases.
Steal all the flowers.
Come back...
Just come back...

WimⓂ️

So a green-painted SUV is now solarpunk

WimⓂ️

I made some estimates on what OpenAI's chip needs mean for global CO2 emissions. I call it "
The insatiable hunger of (Open)AI"

wimvanderbauwhede.codeberg.pag

WimⓂ️

If anyone would be interested in giving an online talk related to #FrugalComputing or #LowCarbonComputing or #SustainableComputing for my research group, some time in October, November or December, please let me know. You don't have to be an academic researcher.

For info, my research group page: gla.ac.uk/schools/computing/re

WimⓂ️

I wrote a blog post on how Funktal handles Uxn/Varvara I/O devices and state, with examples of a few GUI-based programs.

wimvanderbauwhede.codeberg.pag
#Funktal
#Uxn

WimⓂ️

I will give an online talk for the fedi Solstice School on 2023-07-26 (Wed) 13:00 UTC

"Funktal: a frugal functional programming language"

Funktal is a "modern" functional programming language for the Uxn virtual machine, a tiny VM with 64 kB of memory. I will explain why I created it, some of the cool functional features it has, how it is implemented and why, and where it could be going.

Sign up at

solsticeschool.scholar.social/

or just ask me for the link

#FrugalComputing #SolsticeSchool2023

I will give an online talk for the fedi Solstice School on 2023-07-26 (Wed) 13:00 UTC

"Funktal: a frugal functional programming language"

Funktal is a "modern" functional programming language for the Uxn virtual machine, a tiny VM with 64 kB of memory. I will explain why I created it, some of the cool functional features it has, how it is implemented and why, and where it could be going.

WimⓂ️

I'm doing the slides for my Solstice School talk on Funktal in Adelie. It's fun to create dithered lores versions of images.

#SolsticeSchool2023 #Uxn

Alexander Cobleigh

@wim_v12e lmao i interpreted "lores" not as low resolution, but as "lore" versions. honestly could see dithered lore versions of images

Devine Lu Linvega

@wim_v12e Have a look at the strangeloop repo on ~rabbits sr.ht if you're looking for ideas on how to handle fades and so on. There's an undocumented RGB4 command that lets you transition between colors, it's pretty useful.

WimⓂ️

My little functional language for Uxn, Funktal, is finally in a state good enough for a blog post:

"Funktal: a frugal functional programming language"

wimvanderbauwhede.codeberg.pag

You can also try it out:

codeberg.org/wimvanderbauwhede

#Funktal #Uxn

Show previous comments
sejo

@wim_v12e The write-up is slightly over my head for now, but I think it's fantastic you managed to achieve it! 👏

⛧ esoterik ⛧

@wim_v12e this is great work. 🏆 thanks for sharing!

Devine Lu Linvega

@wim_v12e I'm going through the project atm, but before I forget, I meant to send you this paper trying to do a similar RPN lambda implementation: complang.tuwien.ac.at/anton/eu

WimⓂ️

I got recursion working in #Funktal, and now I can write this fixedpoint factorial:

-- the fixedpoint function
functions {
fix = (\f. f f apply )
}

main {
5
`(\ n <- f .
`(1)
`( n n 1 - f f apply * )
n 1 ==
if
) fix print
}

This actually works, even if it is still a bit rough around the edges.

Devine Lu Linvega

@wim_v12e Oh, that is cool. Could you make me a rom of this one? I'd love to run it through beetbug

WimⓂ️

Finally, my #Funktal compiler can emit correct #Uxntal for some simple examples.

The first one shows named functions, lambda functions and primitive types:

functions {
sq = (\Int <- x:Int. x x *)
}

main {
6 7 (\ Int <- x:Int <- y:Int . x y * sq )
print
}

Funktal uses postfix notation for expressions and types. In Haskell, the sq function would be

sq :: Int -> Int
sq = \x -> x*x

Finally, my #Funktal compiler can emit correct #Uxntal for some simple examples.

The first one shows named functions, lambda functions and primitive types:

functions {
sq = (\Int <- x:Int. x x *)
}

main {
6 7 (\ Int <- x:Int <- y:Int . x y * sq )
print
}

Funktal uses postfix notation for expressions and types. In Haskell, the sq function would be

WimⓂ️

The second example shows the use of an algebraic data type, a tuple:

types {
Tup = Int Int MkTup
}

main {
6 7 MkTup (\ Int <- (x y MkTup): Tup . x y * )
print
}

MkTup creates a tuple of two integers. In Haskell this would be

data Tup = MkTup Int Int

The lambda function pattern matches on the type, so x and y bind to the stored values.

#Funktal

The second example shows the use of an algebraic data type, a tuple:

types {
Tup = Int Int MkTup
}

main {
6 7 MkTup (\ Int <- (x y MkTup): Tup . x y * )
print
}

MkTup creates a tuple of two integers. In Haskell this would be

data Tup = MkTup Int Int

The lambda function pattern matches on the type, so x and y bind to the stored values.

WimⓂ️

I wrote a blog post about my Uxntal to C compiler.

"Compiling stack-based assembly to C"

Apart from the explanations it has some performance and power results.

tl;dr: for compute-intensive code, the compiled version gives up to 12x speed-up.
For interactive GUI code, there is no speed-up and no difference in power consumption, confirming the point I made in another post: Uxn efficiency is a red herring.

wimvanderbauwhede.github.io/ar

#Uxntal #Uxn #compiler

I wrote a blog post about my Uxntal to C compiler.

"Compiling stack-based assembly to C"

Apart from the explanations it has some performance and power results.

tl;dr: for compute-intensive code, the compiled version gives up to 12x speed-up.
For interactive GUI code, there is no speed-up and no difference in power consumption, confirming the point I made in another post: Uxn efficiency is a red herring.

Devine Lu Linvega

@wim_v12e

"jumps to computed addresses, because that is a concept that is not supported in C"

TIL.

Go Up