Had a lovely bike ride through the rain just now; I'm quite tired, but it was fun.
Definitely much faster than walking, and a good exercise as well.
An RSS feed is available here
Here are the 10 most recent blips:
Had a lovely bike ride through the rain just now; I'm quite tired, but it was fun.
Definitely much faster than walking, and a good exercise as well.
I really like my corridor this year; it's a lot quieter and more chill than where I was last year, and I roughly know most of the guys here and get along with them.
got basic tokenisation working!
absinhcos5-67
Got input: absinhcos5-67
Tokenised input: ((undefined "ab") "sinh" "cos" (number 5) (number -67))
(for MCSP #0)
People are insane...
I really recommend giving it a watch, and staying for the translation.
And I've got return values working! Well, all except floats and pointers, which should be pretty trivial, and structures, which I don't know how difficult it'll be. But I can query the width of a Raylib window!
In the above example, I had rl-call defined as (defn rl-call (name ret () args) (call !ffi-call (cons (!ffi-sym raylib name) (cons ret args)))).
Finally I have working ffi in rholisp! Well, almost working. Return types other than void isn't implemented, and support for floats, doubles, and pointers are not implemented either, but I have enough to open and close a window using Raylib!
> (def raylib (!ffi-load "../ffi_playground/raylib-5.5_linux_amd64/lib/libraylib.so"))
()
> raylib
(clib 94797688994320)
> (def InitWindow (!ffi-sym raylib "InitWindow"))
()
> InitWindow
(csym 139655444555879)
> (!ffi-call InitWindow () ' i32 800 ' i32 600 ' u64 0)
INFO: Initializing raylib 5.5
INFO: Platform backend: DESKTOP (GLFW)
INFO: Supported raylib modules:
INFO: > rcore:..... loaded (mandatory)
INFO: > rlgl:...... loaded (mandatory)
INFO: > rshapes:... loaded (optional)
INFO: > rtextures:. loaded (optional)
INFO: > rtext:..... loaded (optional)
INFO: > rmodels:... loaded (optional)
INFO: > raudio:.... loaded (optional)
INFO: DISPLAY: Device initialized successfully
INFO: > Display size: 1920 x 1080
INFO: > Screen size: 800 x 600
INFO: > Render size: 800 x 600
INFO: > Viewport offsets: 0, 0
INFO: GLAD: OpenGL extensions loaded successfully
INFO: GL: Supported extensions count: 233
INFO: GL: OpenGL device information:
INFO: > Vendor: Intel
INFO: > Renderer: Mesa Intel(R) HD Graphics 520 (SKL GT2)
INFO: > Version: 4.6 (Core Profile) Mesa 25.3.5-arch1.1
INFO: > GLSL: 4.60
INFO: GL: VAO extension detected, VAO functions loaded successfully
INFO: GL: NPOT textures extension detected, full NPOT textures supported
INFO: GL: DXT compressed textures supported
INFO: GL: ETC2/EAC compressed textures supported
INFO: PLATFORM: DESKTOP (GLFW - X11): Initialized successfully
INFO: TEXTURE: [ID 1] Texture loaded successfully (1x1 | R8G8B8A8 | 1 mipmaps)
INFO: TEXTURE: [ID 1] Default texture loaded successfully
INFO: SHADER: [ID 1] Vertex shader compiled successfully
INFO: SHADER: [ID 2] Fragment shader compiled successfully
INFO: SHADER: [ID 3] Program shader loaded successfully
INFO: SHADER: [ID 3] Default shader loaded successfully
INFO: RLGL: Render batch vertex buffers loaded successfully in RAM (CPU)
INFO: RLGL: Render batch vertex buffers loaded successfully in VRAM (GPU)
INFO: RLGL: Default OpenGL state initialized successfully
INFO: TEXTURE: [ID 2] Texture loaded successfully (128x128 | GRAY_ALPHA | 1 mipmaps)
INFO: FONT: Default font loaded successfully (224 glyphs)
INFO: SYSTEM: Working Directory: /home/ruan/Documents/programmeering/c/rholisp
()
> (!ffi-call (!ffi-sym raylib "CloseWindow") ())
INFO: TEXTURE: [ID 2] Unloaded texture data from VRAM (GPU)
INFO: SHADER: [ID 3] Default shader unloaded successfully
INFO: TEXTURE: [ID 1] Default texture unloaded successfully
INFO: Window closed successfully
()
>
Above you can see a demonstration of the current ffi capabilities
I've been working a few hours a day to get a foreign function interface implemented for rholisp, and at last I have something which can load a library, find a symbol in said library, and parse (at least in theory) the arguments and return type for the function. All that remains is to call it!
> (!ffi-load "libm.so.6")
(clib 94310737492496)
> (def libm _)
()
> (!ffi-sym libm "sin")
(csym 139683202493344)
> (def sin _)
()
> (!ffi-call sin ' i64 ' i64 1024) ; yes, this is incorrect, but floats will trigger an assertion for now, so I'm just going to pretend it takes and returns integers
Calling function 0x7f0a87aa6ba0 with 1 arguments...
()
> (!ffi-unload libm)
()
>
Above is some output demonstrating a seemingly working implementation
Finally got a working command-line interface for interacting with dynamically loaded libraries! Inspired by a tsoding video I watched a few months ago.
And finally I have a preliminary working implementation of blips! We'll see if and how much I use this...
Honestly, I might just use it quite a bit, but just update the website every second or third day.
...and now I wanna make an rss feed for this. That'd be fun. But who's gonna subscribe to essentially just the one dude's tweets? Idk. Probably nobody's gonna subscribe to my blog either, so I might as well
hello world