Show newer

@technomancy oh really??

it didn't instantly highlight in the gist editor when i gave it a fnl filename, but i'll have to try that next time!

@technomancy underrated phenomenon tbh

because i think trying things out is infinitely cooler too

(also thank you..!)

@bx i can see that now!

admittedly, i mostly stole the idea from @technomancy after seeing it used for scenario code here technomancy.us/188 (you can see the yield loops in both things)

it just seemed significantly nicer than making a more explicit super-linear state machine for something i'd want to isolate, and i just legit didn't even know this was an option

the end result wasn't particularly functional, but it was still a fun exercise i might actually use~

@bx it's still a miracle to me that this exists, hahah

@bx it does, thank you~ ^^

i've known about the existence of generators, coroutines, and continuations for a pretty long time, but i just never used them, so i didn't really internalize the differences between the three

so, when i finally had a reason to actually try out coroutines in fennel, it really seemed like something i could apply a lot more generally--but it also seemed similar to what i remembered thinking when looking at call/cc, hence my curiosity

@bx oh, interesting!

i remember thinking i grokked how this worked a while ago, but never had an opportunity to try it in practice

it didn't even occur to me that continuations could be continued as many times as you liked from the same spot rather than just pausing a function and resuming

anyway, fennel continues to be a super-cool language that i like lots, so it's cool finding excuses to use it more

Show thread

oh, and if you are curious about the faces i drew in literally 5 seconds in mspaint because i needed something to test with, here they are!

Show thread

the magic is that resuming a coroutine just jumps right back to the place i yielded from, so i can break this coroutine into tiny pieces that get rendered every frame

meaning, i only ever need to interact with it in once place after making it; it's completely self-contained!

(i wonder how this compares to how scheme continuations work?)

Show thread

this is what the closure actually looks like if you're curious! gist.github.com/Archenoth/d189

(i named it .clj because github doesn't recognize fennel)

basically, every tick, the coroutine to render a single line of dialogue resumes with a new time in scope, and based on that, renders a subset of text

after it renders a full line, it continues to a new yield loop to render the bouncy triangle at the bottom to note you can progress

and when the coroutine finally finishes, a new line takes its place

Show thread

this is the *entire* code to use this

render-text literally is just a coroutine closure that gets resumed every tick, and automatically handles how to render it based on the current time

Show thread

small victory: i managed to implement a love2d dialogue textbox system in fennel using only coroutines

oh! i'm not sure how many emacs peeps follow me, but i finally updated Archemacs' readme so that it would be easier to setup for others~

i tend to try and stick pretty close to the defaults, so the end result is really light, and i use tangling to trim support for things you don't have installed making it even lighter!

the end goal is basically having a really light emacs that looks good (i use doom's dracula style), but also has a lot of modern niceties

github.com/Archenoth/Archemacs

humanity has evolved beyond the need to secretly think aqua created some real bangers

@monorail i turned it into a personal challenge to listen to the entire thing

don't be like me

@noiob also, oh no! i forgot the timestamp for when he hastily put together a thing after finding out that the 10 hour limit got him in the cyberpunk review D:

youtu.be/LnBKX_vdYQI?t=3770

@noiob hee, because they aren't just reviews--they are journeys

like, legit, sometimes the videos on that channel are more entertaining than the thing they are talking about (also hbomberguy is the top comment, which is a fun little seal of approval)

i think my favorite one is still the doom review: youtube.com/watch?v=38zduHkwGc

Show older
Awoo Space

Awoo.space is a Mastodon instance where members can rely on a team of moderators to help resolve conflict, and limits federation with other instances using a specific access list to minimize abuse.

While mature content is allowed here, we strongly believe in being able to choose to engage with content on your own terms, so please make sure to put mature and potentially sensitive content behind the CW feature with enough description that people know what it's about.

Before signing up, please read our community guidelines. While it's a very broad swath of topics it covers, please do your best! We believe that as long as you're putting forth genuine effort to limit harm you might cause – even if you haven't read the document – you'll be okay!