Wouter van Oortmerssen 2023-06-11 17:58:23 Mariano Guerra 2023-06-11 19:37:07 "Bla, a more academic language where stack frames and objects where the same interchangeable things!"
I had that idea once ๐ do you have anything to recommend about stack frames? I find it's a thing that most programming languages "take for granted"
Wouter van Oortmerssen 2023-06-11 22:26:48 Mariano Guerra yeah it's not a first class citizen in almost all languages.. I guess the classical language to look into for "stack frames as objects" is continuations in scheme, but even there they a bit implicit about the link, in the Bla language you had an explicit self
reference to the stack frame
Konrad Hinsen 2023-06-12 06:07:11 In Pharo (descendent of Smalltalk 80 via Squeak), stack frames are plain objects. You can access (inspect, even modify) the current stack frame as thisContext
anywhere you like.
It is mostly used by debugging tools and exception handlers, but I suspect that more creative uses have been envisaged.
Mariano Guerra 2023-06-12 06:29:56 In python it's not hard to access them and are very OO but they are really similar to any other stack frame in other languages, I think having them first class and adding functionality to them would be useful, for example adding metadata to make debugging and stack traces more useful
Konrad Hinsen 2023-06-12 09:01:14 Python provides some access, but Python stack frames are hardly first-class objects. For comparison: in Pharo, you can serialize a stack frame object, then deserialize it elsewhere and do some debugging.
William Taysom 2023-06-13 06:41:48 Thinking of Scheme, continuations have the same flavor as lambda in that they capture something and then put it in a black box. I came to respect the Scheme Report for steering clear of features requiring implementations to be dynamic.
Kevin Greer 2023-06-12 17:34:11 Not my main work, but a fun little programming project that's relevant in a number of ways, despite apparently being more about the Past of Coding, than the Future.
I wrote a small (<500 lines of code) BASIC to JS compiler, that lets me run the programs from the class book 101 BASIC Computer Games from 1978. It's interesting for two reasons I think: 1. for those who want to learn about languages and compilers, this provides a very simple example 2. philosophically, I think BASIC really exemplifies the Worse is Better approach outlined by Richard Gabriel and covered in a FOC podcast. It is a terrible language in many ways, but it was small enough to be stored in a 4k ROM and be used to to useful things on an early microcomputer with only 4k of RAM. If we had waited for machines with enough memory to run Lisp, Smalltalk or Algol, the microcomputer revolution would have been delayed by a decade or more. Source: github.com/kgrgreer/foam3/tree/429f2fd2b4cef0e37996a4c4ad35cdf5f83a8b97/src/foam/demos/basic
Online version: codepen.io/kgr/details/yLQyLjR
๐ BASIC to JS Compiler
A BASIC to JS compiler that lets you compile classic programs written in the BASIC programming language to JS and then run them in your browser. To us...
Konrad Hinsen 2023-06-13 05:10:55
If we had waited for machines with enough memory to run Lisp, Smalltalk or Algol, the microcomputer revolution would have been delayed by a decade or more.
By my personal tastes, the best language for early microcomputers would have been Forth. It was around by then, but maybe not known widely enough. Or maybe someone decided it was too weird for ordinary people. There was one home computer model based on Forth (the Jupiter Ace), which was not much of a commercial success, but it also appeared too late - BASIC was already everywhere.
Kevin Greer 2023-06-13 12:45:02 Yes, that's true. I'm a big fan of FORTH, having used it a lot in the 80's and am even writing a lexically-scoped OO FORTH-like system: github.com/kgrgreer/TURTLES/tree/main . Also, some early microcomputers (en.wikipedia.org/wiki/MCM/70) used APL, but neither APL nor FORTH were as accessible as BASIC. LOGO, which is a simplified dialect of LISP, and actually a pretty good language, might have been a better choice. But people looked down on it because of its use with Turtle graphics and being for kids, but it is actually a much better language than BASIC (or just about anything else at the time).
Kevin Greer 2023-06-13 13:20:57 Also, I think that a big difference between FORTH and BASIC was that BASIC was suitable for use with a tape drive, whereas FORTH required a much more expensive floppy. This is because you would need to save much more frequently with FORTH because it wasn't memory safe and running your program could crash your machine and lose your changes. BASIC, on the other hand, would just give something like a 'SYNTAX ERROR: line 20', and nothing would be lost. With BASIC, you could program for hours and just save once at the end, which is something you couldn't do with FORTH. This effectively raised the price of a minimally viable machine.
Marcel Weiher 2023-06-15 19:08:53 I think BASIC is underappreciated these days.
Apart from memory safety (with the concept really not even surfacing), BASIC also has some advantages in being very straightforward and linear, rather than hierarchical. Which is not just easy to understand. but actually also a close analogue to how the CPU executes instructions, at least conceptually.
That also enables a very direct transition from immediate mode execution to stored program: just add a line number in front.
Konrad Hinsen 2023-06-16 07:36:48 That's an interesting observation for me because (1) it's clearly true, (2) looks like a good characteristic for newbies but (3) is also exactly why I didn't like BASIC. I wanted to get details out of my view, to focus on a bigger picture. My solution was printing the code, with subroutines on separate pages, starting with a comment that gave a name to the subroutine. Each gosub
also had a comment with the name of the subroutine being called.
Matt Webb 2023-06-14 13:23:50 Iโve been sketching multiplayer UIs. Folks who came to the most recent London meet will recognise these from my demo. Iโm trying not to converge on anything right now โ how we interact with AI NPCs is still so open.
I made a new one today, with spatial multiplayer chatrooms and an NPC inhabiting each. Itโs on Twitter twitter.com/genmon/status/1668948562460266497
An archive of all of my sketches, including a bonus gesture-controlled lamp actsnotfacts.com/made/multiplayer
๐ฆ Matt Webb ๐ธ๐ผ๐ธ on Twitter: what if you had one chatroom with an AI for wild ideas... and another next door for a dose of reality?
and you travel between AI NPC chatrooms like a spatial map?
yeah and it's all multiplayer so your friends can be there too?
oh yes ALSO one of the rooms is haunted ๐ป
๐ Multiplayer sketches
A series of software sketches exploring multiplayer UI.
Lu Wilson 2023-06-14 19:05:55 I really enjoyed your presentation Matt! I especially love the "commute" concept. I'd use that in a heartbeat :)
Evan Conrad 2023-06-15 22:20:34 with encouragement from @Joe Grossberg, down to share what Iโm doingโฆ
I make lintrule.com, a little CLI for having a language model do your code review.
You write rules in plain text, and then it checks them against your code, like a test framework. Hereโs an example rule that runs on SQL migrations:
```
include: ["migrations/*.sql"]
Make sure our postgres migrations follow these rules:
ensure new tables are at least 3NF (third normal form). If they're not, fail and give an example of what's wrong, assuming the reader does not know terms like "BNCF", "3NF", "BCNF", and so on.
make sure that all tables have a created_at and updated_at
make sure migrations don't have breaking changes. For example, removing a table, removing column, and so on.
3.1 It's okay to have a breaking change if there's a comment on the migration that explains why it's safe to have that change.
prefer 'uuid' over 'serial' or 'int' for primary keys. Ignore this check if it's primary key made up of two columns.
```
Jason Morris 2023-06-16 19:20:27 That's pretty cool. Are you generating a symbolic representation of the rule in the background? (Generating symbolic representations of natural language rules is my day job.)