idk if y’all remember my idea for a #Lisp where all expressions are actually #Lua -style tables, instead of linked lists like a normal Lisp. (I’m calling these expressions T-expressions btw, since they’re not quite the same thing as S-expressions, and they make Tables)

but lately I’ve been trying to figure out a way to add symmetry between defining a variable and adding a key to a table. like here’s a table literal:

'([key value] [key2 value2])

and ideally I’d love to be able to reuse this concept as the way to define variables. because I want this language to have as little magic as possible and as few discrete concepts to learn as possible, and a special form like (define) would be a discrete concept that I want to get rid of. so I considered letting people do something like this:

[variable 666] (print variable) ; -> 666

and it would work for any nested T-expressions too:

[variable "foo"] (do [variable 666] (print variable)) ; -> 666) (print variable) ; -> foo (print [variable "bar"] variable) ; -> bar

but the main problem is that in order to resolve this, the reader would have to work in phases with the interpreter:

(do [variable 666] (print variable) ; ↑ the reader only goes this far, ; then this gets interpreted [variable "foo"] (print variable) ; ↑ now the reader stops here and ; lets the interpreter work again )

which intuitively seems to me like it would probably be a terrible idea. alternatively, it would be a syntax error to redefine the same {variable / table key} in the same scope, which might work well enough

this would also mean that sending keyword arguments to a function would have to use less elegant semantics:

; if these are variables instead of ; kwargs: (func ['kwarg0 value0] ['kwarg1 value1]) ; then kwargs would have to just be ; this, like a normal Lisp. which ; isn't as elegant :/ (func :kwarg0 value0 :kwarg1 value1) ; alternatively, you could do ; something like this, which is IMO ; a bit better (func [:kwarg0 value0] [:kwarg1 value1])

but the biggest problem with this idea is that they would be absolutely terrible in any kind of deeply-nested data structure, since every single key-value declaration would also be clobbering a variable:

[id 666] `([name "Earth Machine"] [element ""] [id 667] [submachine ([name "Earth Submachine"] [id ,id] ; <- oops! this is ; 667, but I wanted ; 666 ))

I could fix this by saying that “by convention, all variables declared in a table should start with a $“ or, “by convention, all table keys that will be used as table keys (and not as variables) should be keywords”. and the latter does sound kind of reasonable

actually, yeah. I really really like that last option. because then you can create variables with any arbitrary scope that you want, inside of literally any T-expression that you want, without increasing the level of indentation, and you can define them pretty much anywhere, and they won’t interfere with deeply-nested data structures at all, and they won’t mess with the reader -> interpreter pipeline either! that’s actually an amazing solution, unless I’m missing some reason why it won’t work

Note Release Gate.

What it does: Hold a MIDI note → effect is ON. Release → effect hard-cuts instantly. Exactly the Squarepusher "effect builds while you hold, then vanishes the moment you let go" thing.

The key difference from Signal Follower: Signal Follower needs audio signal to drive it — so if you're holding a silent sustain or a note has decayed, the effect dies too. Note Release Gate is purely

Link to Patreon in bio.

#paketti #tracker #patreon #lua #renoise #demoscene #trackermusic

Haskell — separate process, pandoc pipes JSON AST through stdin/stdout-

pandoc → JSON AST → your binary (stdin) → transformed JSON → pandoc

Lua — runs inside pandoc's Lua interpreter, no subprocess:

pandoc → Lua VM → transformed AST → pandoc

#pandoc ast filters in #lua vs #haskell

Improvement: I have added "Open Folder to Paketti KeyBindings" to Paketti Preferences - for easier discoverability. Theres the "This is the one I use on macOS" one that i have been building for multiple years, and then the "convert that to windows-linux and fingers crossed" versions there. and also some Akai MIDIMIX mappings that might be of interest.

Link to Patreon in bio.

#paketti #tracker #patreon #lua #renoise #demoscene #trackermusic

Check out Defold Fake Real Glass - a nice glass effect made by Youssef Afella and ported from Unity to Defold by @witchcrafter :

https://forum.defold.com/t/defold-fake-real-glass/82734

#opensource #MadeWithDefold #vfx #shaders #glsl #lua #gamedev #indiedev

How it feels to open a repo and see .lua files.

(Image is licensed CC0-1.0, so feel free to do whatever with it.)

#Lua #LuaLanguage #Programming

A nova corrida espacial reflete a disputa entre EUA e China pelo avanço tecnológico e exploração lunar:

• Busca por recursos naturais e hélio-3
• Instalação de bases de pesquisa
• Testes para missões em Marte

Entenda os bastidores dessa exploração 🚀🌕

#Artemis #ProgramaEspacial #Lua

Improvement: I have made an experimental Paketti KeyBindings xml available for Windows/Linux - basically a conversion of the macOS shortcuts. give it a go. its in the KeyBindings folder inside Paketti.

Link to Patreon in bio.

#paketti #tracker #patreon #lua #renoise #demoscene #trackermusic

Ho cominciato la riscrittura di tutto #adventodcode usando #lua dentro #love2d .
Il secondo giorno del 2015 mi ha dato alcune noie per le righe con valori duplicati, e ammetto che ho trovato il problema confrontando i risultati riga per riga con la soluzione scritta dentro excel in 2 minuti 😆
Oltre a questo, non ho ancora capito come fargli escludere la famosa riga finale vuota, ormai in javascript avevo il mio "template" vuoto con gia la parte di caricamento e sanificazione del file di input