Who else is gearing up for Advent of Code? This year I'm planning to do it in Lua, on my https://github.com/akkartik/teliva environment. Here's a 15-minute video of me warming up: https://archive.org/details/akkartik-teliva-2021-11-30
π Advent of Future of Code Day 01 is out! BMI Calculator with Flowrunner-canvas
Check instructions here: https://buttondown.email/reviewjam/archive/advent-of-foc-day-1-bmi-calculator-with/
π§΅ Conversation about the task as comments to this message!
Subscribe to the mailing list to avoid missing the announcements or keep an eye on this channel, one message like this every day π
Maikel van de Lisdonk Here's my review: https://archive.org/details/akkartik-reviewjam-1
(Everyone else: spoiler alert.)
Thanks for trying out flowrunner-canvas! I think you already found some ux improvements within the first minutesπ. (and small bugs: the selected node is not very visible). Very interesting to see someone else work with your own tool. I probably should have mentioned that I am working from the dutch metric system (kilograms and meters) regarding the BMI calculation
π Day 2 of Advent of Future of Code: Brutalist Convivial Computing with Teliva
Check instructions here: https://buttondown.email/reviewjam/archive/advent-of-foc-day-2-brutalist-convivial-computing/
π§΅ Conversation about the task as comments to this message!
No video from me, I haven't yet figured out how to do screen recordings under Linux (which I switched to from macOS in October). Just written feedback.
Following the instructions blindly failed pretty quickly: "make linux" stopped because it didn't find gcc. Normal, since I do all serious work with Guix packages (even though the host system is Ubuntu 20.04). So: better list the dependencies in the instructions!
A quick look at the Nix script suggested what I needed, and I ended up doing
guix shell -D lua openssl -- make linux
That makes an environment containing all packages required to compile lua, plus openssl.
Figuring out the counter wasn't hard, but trying to edit it turned out to be tough: as the screenshot shows, there's a color problem that makes the text in the fields invisible. Started from Ubuntu's default terminal, which uses a dark theme.
I had the screen in the instructions, so I typed "main" to continue. I got an editor, but neither "delete" nor "backspace" works, so I couldn't do what I wanted (change the numbers in the initial loop). "Delete" insets "J" on my machine, "backspace" inserts "?" with inverted colors.
Without any way to get the source code back into something correct, I went for "abort" (^C), which exits Teliva completely, no questions asked. But then, the title did say "brutalist" π
Of course I opened counter.tlv in Emacs in order to fix my mess, but to my surprise I found a lot more stuff in there than just the Lua code, and preferred to give up - downloading a fresh copy looked easier. Good old git habits π
Inserting "hello world" succeeded at first try. Lucky for me, since without being able to delete text, experimenting would have been hard!
Task 2 looks impossible without deleting a character, but I did succeed to make the counter jump by 10.
Task 2 is easier than Task 1, so from a pedagogical point of view, it's perhaps better to invert them.
Would have loved to tackle the Towers of Hanoi, but with the "big picture" screen illegible, this looks hopeless.
Thanks a lot Sol Bekic, J. Ryan Stinnett and Konrad Hinsen! My first lesson here is that I need to include a list of known issues in the Readme. Backspace/delete handling was a known issue; sorry to waste your time, Konrad. I knew there was no way an international keyboard was going to work. I don't know what smarts I need on top of ncurses, but I think I'll pause features to first get this right.
I'd hoped I'd fixed the color issues the last time they came up, but clearly they still need testing with a wider variety of terminals. iTerm2 is an obvious miss since it's so ubiquitous. I'll also include the Nix/Guix instructions in the Readme; thanks to Mariano Guerra for creating them for the jam.
Now to go watch Sol Bekic's video..
Kartik Agaram My laptop has a US keyboard, or more precisely what Dell calls an "international keyboard" here in France.
Could both you and Sol Bekic try typing ctrl-h? Does that work like backspace for you?
The ? in reverse video indicates that backspace on your keyboard is emitting ^?, which is the delete keycode in ASCII. I thought only Macs did that.. π€
I resisted learning about these long-tail compatibility issues for years -- which is how I ended up up the Mu tree π’ I need to just gear up and get through them.
Edit: (By long tail I mean not that they're unimportant, just that there's a combinatorial explosion of cases here, spanning OS, terminal emulator, color scheme and keyboard)
Of course I opened counter.tlv in Emacs in order to fix my mess, but to my surprise I found a lot more stuff in there than just the Lua code
.tlv files are currently a single literal Lua array consisting of a series of edits. Each edit consists of the final state (a Lua string between [==[ and ]==]) of a single definition when you switched files or ran the program. Each edit also contains a couple of bits of metadata: a timestamp and an optional note (commit message). Unlike other version control systems, Teliva lets you modify the description of a commit after the fact. The code itself is immutable, though.
Anyways, if you go to the bottom of the file you should see your most recent edits.
Kartik Agaram Ctrl-H works fine for backspace. I should have thought of it, being old enough to have used terminals without a backspace key.
I think I've improved the situation with colors and the backspace key. Konrad Hinsen your backspace isn't yet supported, but I've at least tried to make the ctrl-h hotkey a bit more discoverable.
I'd appreciate some eyes on the state of the menu in various contexts:
Do the tips make sense?
In particular, I'm not sure how to describe what the backspace key does. Feedback appreciated.
Hi, I have built a serverless runtime for observablehq.com called https://webcode.run. This extends Observable's reactive notebooks to the backend. Its unique features are instant deploys, and it can redirect traffic to your browser, so you can do devtool or console.log debugging against production traffic. It's a unique way of sharing code across frontend and backend.
My aim is to create a serverless environment that is a pleasure to use as a developer. I am really desperate for feedback, so if you give it a go let know the positives and negatives.
π WEBcode.run
Interesting! Also a bit frustrating for me. This looks like something I could and would like to use, for making custom computations easily accessible as Web services, but it also seems to be aimed at Web professionals familiar with a lot of technology that I merely know the names of.
You are not the first person to say this. I am a bit worried about getting sucked into an effort vortex to teach HTTP fundamentals. I am also worried about making a simplified version that cannot be applied to novel situations because expressivity has been lost. It is as complicated as HTTP is (i.e. very).
Though perhaps it is time to think of a simple version. If you want to expose a computation maye could be guided with functional programming.
//server
remoteFunction = serve((x) => x*x), options)answer = await remoteFunction(5)I think there is enough wiggle room for people to add their own abstractions, and because the result is a promise we can put in network errors.
Would this cover your usecase? (if anyone knows of any simple RPC abstractions I should draw inspiration from I would love to see)
Is this hlepful?
https://observablehq.com/@endpointservices/servefunction
but I am wondering how you could use this outside the ecosystem as it has some custom encoding on the URL endpoint
π serveFunction
π§βπ§ Day 3 of Advent of Future of Code: Mechanical Piano with MockMechanics
Check instructions here: https://buttondown.email/reviewjam/archive/advent-of-foc-day-3-mechanical-piano-with/
π§΅ Conversation about the task as comments to this message!