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

Paul Tarvydas 2024-09-16 03:25:14

... Chipping away at articles regarding a bunch of experiments towards creating higher level syntax for programming languages. Thus far, I've managed to consolidate t2t (text-to-text transpilation) into a single .mjs file and to redocument it. Wrote an adjunct article about experimenting with "t2t" using a toy meta-programming language to generate code in existing languages. "T2T creates DSLs. T2T reduces the amount of work required to build a DSL. You should be able to create a new DSL in an afternoon. ..." open.substack.com/pub/programmingsimplicity/p/experiments-with-text-to-text-transpilation?r=1egdky&utm_campaign=post&utm_medium=web

📝 Experiments With Text to Text Transpilation

Towards Higher Level Syntax for Programming Languages 2024-09-07

Kartik Agaram 2024-09-18 03:35:09

Very initial draft of a notebook UI.

There are 2 kinds of lines here:

  • Regular lines are prose, but you can also insert named blanks into them using the syntax [value|name] , which renders vertically across 2 lines. You can't nest blanks within blanks. These lines can wrap, but a single blank can't wrap across multiple lines on screen.
  • Indented lines (though the indentation is currently subtle) are code. They can render fractions using the syntax (a/b) as I showed before. (Not sure I'll keep this in the long term.) You can nest fractions within fractions. These lines don't support wrapping.

Planned:

  • synchronizing blanks with the same name
  • using code in indented lines to compute derived names without values inline.

Inspirations:

20240917-notebook.png

Kartik Agaram 2024-09-20 05:49:55

Today I've added some rudimentary styling syntax to my notebook.

It looks like I care about always making the styling very transparent, so it's possible in principle to guess what characters one needs to type to copy the look of something one sees on screen. So the style directives will never be hidden.

Konrad Hinsen 2024-09-20 06:58:48

The notebook pages in Glamorous Toolkit use a slightly more sophisticated method, which I like: full markup is shown only when the cursor is near it. Elsewhere you only see the rendered markup. No visual clutter, and yet all markup at your fingertips.

Paul Tarvydas 2024-09-20 09:17:22

The current Obsidian editor does something like that, too.

As a user, when writing a long essay, I occasionally find this behaviour disconcerting - the appearance on the screen changes so dramatically that it is disconcerting. I feel "not in control".

The older Obsidian editor had two modes (1) writing and (2) reading. That felt clumsy. I guess that I could enable that behaviour with some option, but, I never do.

Emacs md-mode shows a hint of the styling, e.g. _abc_ is displayed with abc italicized but leaving the underscores visible and taking up space that doesn't appear in the final rendering in a browser.

Traditional WYSIWYG editors like Microsoft Word and Apple Pages make formatting characters invisible, but, show formatting details in a property box off to the side (where you're not looking) while binding formatting operations to certain keystrokes, e.g. command-I for italic.

PlantUML uses two side-by-side Siamese Twin windows - a writing window and a preview window. Our "Slider" app in the Handmade Jam (last year?) did that (two windows), too.

A freebie "user-friendly" LaTeX editor (LyX) tries to straddle both views at once - like the new Obsidian editor - but, I find myself not using it.

Thus far, as a user, I find all of the above choices evil. I tend to favour WYSIWYG, but, wonder if the two-window approach would be better if the tool made the windows entirely separate instead of being bolted together.

I find translucency intriguing (futureofcoding.slack.com/archives/C5T9GPWFL/p1726773202938769), but haven't used a word processing editor that contains it.

Currently, I use the lesser of two evils. I switched from using Obsidian (out-of-human-control formatting) to using Pages (WYSIWYG with a property box at the side). My frequency of swearing hasn't decreased, but the target of swearing has moved.

[September 19th, 2024 12:13 PM] chris.shank.23: I like this metaphor of translucent software both as a callback to the translucent hardware aesthetic of the 2000s, but also to progressively display the underlying mechanisms of software if you want to see it.

https://x.com/lesliexin/status/1836643348490187183|https://x.com/lesliexin/status/1836643348490187183

Kartik Agaram 2024-09-22 18:32:22

There's a bug in my parser. Here's a debug UI showing it at a glance. The parse tree in the background is for the line the mouse pointer is hovering on.

One fun thing is the couple of lines in the middle there. I reached for a notebook to scribble some equations for myself, but then realized all I wanted was to be able to draw the fraction line horizontally -- and I'm sitting in a tool that can do that. Using the tool to debug the tool 💥 (At least until I have no tools because I broke my tools using my tools. 💬 #of-ai@2024-09-22)

notebook-debug.png