You are viewing archived messages.
Go here to search the history.

Kartik Agaram 2021-11-30 23:22:13

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

Mariano Guerra 2021-12-01 10:10:47

πŸš€ 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 πŸ™‚

Kartik Agaram 2021-12-01 19:07:36

Maikel van de Lisdonk Here's my review: https://archive.org/details/akkartik-reviewjam-1

(Everyone else: spoiler alert.)

Maikel van de Lisdonk 2021-12-01 19:47:47

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

Mariano Guerra 2021-12-02 08:42:23

πŸ— 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!

Konrad Hinsen 2021-12-02 16:29:57

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.

Konrad Hinsen 2021-12-02 16:32:27

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.

Konrad Hinsen 2021-12-02 16:33:58

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.

Konrad Hinsen 2021-12-02 16:37:24

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.

Konrad Hinsen 2021-12-02 16:39:27

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" πŸ˜‰

Konrad Hinsen 2021-12-02 16:41:13

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 πŸ˜‰

Konrad Hinsen 2021-12-02 16:48:17

Inserting "hello world" succeeded at first try. Lucky for me, since without being able to delete text, experimenting would have been hard!

Konrad Hinsen 2021-12-02 16:49:49

Task 2 looks impossible without deleting a character, but I did succeed to make the counter jump by 10.

Konrad Hinsen 2021-12-02 16:50:51

Task 2 is easier than Task 1, so from a pedagogical point of view, it's perhaps better to invert them.

Konrad Hinsen 2021-12-02 16:52:21

Would have loved to tackle the Towers of Hanoi, but with the "big picture" screen illegible, this looks hopeless.

Konrad Hinsen 2021-12-02 16:52:25

End of report!

Kartik Agaram 2021-12-02 17:25:54

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..

Konrad Hinsen 2021-12-02 17:39:39

Kartik Agaram My laptop has a US keyboard, or more precisely what Dell calls an "international keyboard" here in France.

Kartik Agaram 2021-12-02 17:47:52

Could both you and Sol Bekic try typing ctrl-h? Does that work like backspace for you?

Kartik Agaram 2021-12-02 18:23:42

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.. πŸ€”

Kartik Agaram 2021-12-02 18:25:58

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)

Kartik Agaram 2021-12-03 06:42:38

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.

Konrad Hinsen 2021-12-03 09:58:04

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.

Kartik Agaram 2021-12-04 02:17:22

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:

  • big picture view
  • recent changes
  • editing a definition
  • ctrl-f when editing a definition
  • ctrl-g when editing a definition

Do the tips make sense?

In particular, I'm not sure how to describe what the backspace key does. Feedback appreciated.

Tom Larkworthy 2021-12-03 08:08:00

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

Konrad Hinsen 2021-12-03 10:06:58

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.

Tom Larkworthy 2021-12-03 10:57:31

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)

Tom Larkworthy 2021-12-03 12:27:26

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

Mariano Guerra 2021-12-04 19:24:18

πŸ§‘β€πŸ”§ 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!