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

Tom Lieber 2024-11-19 02:57:55

I finished the lab notebook entry that my earlier posts were about. πŸ™‚ I was burnt out on the ugly charts I was making before, and the outcome of this experiment with schematic tables is: I am pumped to keep going!!

exam-fairness-schematic-table.gif

Ivan Reese 2024-11-19 13:58:45

This is getting really interesting!

Kartik Agaram 2024-11-20 17:30:35

Oh cool, so you too have been watching the Subtext videos recently!

Tom Lieber 2024-11-20 18:48:46

Kartik Agaram I wish. I haven’t made progress on my reading list in months. πŸ₯²

Paul Tarvydas 2024-11-21 12:35:30

I've been experimenting and thinking about just how little we need to worry about "efficiency" these days, and how to expand the gamut of notations for programming. A snapshot of my thoughts... programmingsimplicity.substack.com/p/building-software-using-black-boxes?r=1egdky

πŸ“ Building Software Using Black Boxes

Structured Asynchronous Message Passing 2024-11-19

Kartik Agaram 2024-11-23 01:28:21

What does 1then2 do?

Paul Tarvydas 2024-11-23 11:35:47

1then2 is an ordering primitive. It guarantees that the outputs are emitted in order (1, then, 2), regardless of in which order the inputs arrived.

Justification: I believe that we've beaten the 1-in, 1-out paradigm to death and have jumped the shark by inserting more and more baubles and band-aids into the 1-in/1-out paradigm. The problem we need to solve today is different from the problem faced in 1950. Using 1950s tech to attempt to solve today's problems leads to a dead end (IMO). Today's hardware consists of many, many nodes (CPU, GPU, no-CPU, etc., etc.). 1950s programming languages were designed as IDEs for programming single-cpu systems. To solve today's problems, we need to do like what they did in the 1950s - invent new IDEs for programming, whilst realizing that the giants in the 1950s weren't solving the same problems as we need to solve, hence, their ideas are not applicable.

Note that I use the word "IDE" instead of "programming language". Thinking that the solution must involve a "programming language" taints one's thinking right out of the gate.

Kartik Agaram 2024-11-23 14:39:08

I understand your justification at this point πŸ˜„ just need the semantics. If the two ports come from different places as happens here, they may receive data at very different rates. What should happen if you get 2 values on the second port before 1 on the first? How about 100 on the second port? Given there's only one queue, it's not clear how the system should deal with that. It feels like using 1then2 may turn into a more global exercise for the programmer, trying to match rates through the system. Does that seem accurate?

Paul Tarvydas 2024-11-23 16:22:47

The 1then2 component should send an error if it doesn't see message-on-input-port-1 followed by message-on-input-port-2 or moip-2 followed by moip-1. The diagram is incorrect as shown, in that 1then2 should, also, have an error output port. Thanks for pointing that out. Every 2nd message causes a decision - OK, or error. So, 100 consecutive inputs on "2" should result in 50 error outputs along with 0 outputs on output port 1 and 0 outputs on output port 2. Under-the-hood magic not allowed. If the Architect gets 50 error messages, then the Architect needs to revamp the Architecture, e.g. in order to debug the cause, or, to handle such cases - the engine doesn't do this for the Architect (that's the intent, at least, did I get it right?). Aside: unlike functions which must always return something , sending nothing on output-1 or output-2 in the error case, really means not sending anything (not Undefined, not NIL, nothing). The 1then2 part needs to clear its internal buffer on every 2nd input. If an upstream parts runs so fast that it fills the input queue of a target component, that's an "overrun" condition (like infinite recursion in current software) which is a bug that the Architect needs to do something about. If only one message arrives, and a second message never arrives on input-1 nor on input-2, then the 1then2 part appears to hang - yet another bug that the Architect need to do something about. Further aside: sticking probes into the circuit looks like "printf debugging" on the surface, but, is a more powerful technique in this kind of stuff.

Kartik Agaram 2024-11-23 16:24:19

Ah, got it!

Kartik Agaram 2024-11-23 16:36:19

Zooming out, I think at this point I buy your argument that this methodology leads to more correct, parsimonious programs. The big question for me is how onerous the Architect's task is.

There have been other practices in the past that have decent track records of improving the state of software. Stuff like cleanroom and so on. Wikipedia has a long list. I get the sense many of these practices don't get used much because they make the human task too onerous. Or to put it differently, in our current society there's often a mismatch between the amount of attention a task needs from a human and the amount of attention society is organized to provide to it. It's unclear how much a new methodology benefits just from making humans pay more attention.

I guess I'm repeating something I've said in the past: the best way to make your case is to go forth and write more programs, more non-trivial programs. What's the most complex program you've written so far? Well, "complex" is a bit of an unfortunate word in this conversation. Perhaps I should ask what program has most impacted your life by the results of running it (ignoring the intellectual process of creating it, which provides its own benefits for sure)

This has basically been my tack to my own solutions. By trying to minimize software updates, forking instead of updating a shared codebase, etc, I'm hopefully providing more evidence to persuade others to use those practices (or persuade myself to stop using them)

Paul Tarvydas 2024-11-23 16:51:29

Thanks for the suggestions! The most "complex" program I've written is "t2t", or "kinopio2md", or "arith" (small "compiler" that emits Python and Javascript and Common Lisp and WASM all at the same time). I guess "t2t", since I'm currently using it to rewrite 0D (1,400 Python LOC) in a VHLL which emits Python and Common Lisp ("real soon now") and Javascript ("future"). I wonder if I misunderestimate what is "complex" or not. Kinopio2md creates one program by using 3 languages as assembler (Prolog, Javascript, Bash). I cheat a lot - I use existing work (OhmJS, Prolog, Javascript, Bash, Python, etc.),,, but, then, I can,,, and, combining them makes me think of different ways to solve problems, ways I wouldn't think of when using function-based thinking only. Oh, maybe Kagi.com is the most "complex" and "real" application of these ideas?

Kartik Agaram 2024-11-23 06:28:01

I haven't really felt like building in a while, but there's a cricket match on and today I felt moved to use my notebook app to create a little scenario calculator for the world championship.

This requires LΓ–VE (basically some way to draw pixels on a canvas) and 2.8kLoC of Lua. Compare Excel, or Google sheets + a web browser, or Jupyter. Much fewer features, of course, but well-sized for things like this. Though I did find myself wishing I could sort lines, the notebook doesn't support that yet..

notebook.png

calculations.png

πŸ—’οΈ wtc

Tom Lieber 2024-11-23 17:48:58

A small update today: I draped flags onto the bar charts so that you can answer "how do the observations affect the priors?" with a glance.

final-chart-with-flags.gif

Pietu 2024-11-24 17:10:48

Hi again πŸ‘‹.

Continuing my journey on building an experimental markup language based on blocks.

Someone was already πŸ’¬ #devlog-together@2024-11-16 last week and suggested that blocks should be executable.

I've got now the bare minimum demo of executing inline code embedded in markup documents.

Paul Tarvydas 2024-11-24 20:07:15

brainstorming: In what I'm writing these days, I want to include lots of diagrams / figures. Currently, I'm using Apple Pages and just drag'n'dropping screenshots into documents then publishing them to Substack (a painful process). I happen to use draw.io and excalidraw for diagramming. For a while, I was using markdown editors, but they didn't give me a WYSIWYG editing experience. I used Obsidian for a while - it did give me WYSIWYG for excalidraw diagrams, but wanted $$$s to allow me use their publishing mechanism and made it difficult to use Github Pages for $-less publishing. I keep thinking that I should just cobble together an RTF parser and use only a markdown-ish subset of features in Apple's RTF editors, but, I don't want to get side-tracked [I would use 't2t' to parse and transmogrify RTF, I think, and, use it to transpile subsetted-RTF to markdown - what's needed is an RTF-to-markdown or RTF-to-murkdown tool, I think]