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

Nate Ferrero 2022-05-16 16:02:53

Hello Future of Coding community, I have finally had time to put together a draft of a concept I've had for a few months now - ReadableScript is a very simple 'javascript virtual machine language' that uses assembly-like syntax. Would love any and all feedback, do you think this could be a more accessible style of programming for beginners? Also as it's a "vm" it may be well suited to low-code programming environments. My next milestone goal is to integrate the language into a REPL. Note that this is a very rough draft, you can't even make strings! But the concept should be clear.

readablescript.com

Fabian Iwand 2022-05-16 16:05:58

I hope I'm not bikeshedding if I recommend that you increase the overall text contrast of that page. Especially the red on black in the sample code and output image will be invisible to many people. And if you add white-space: pre to your textarea you'll ensure that lines won't wrap.

Nate Ferrero 2022-05-16 16:10:24

Thank you so much for the feedback @Fabian Iwand! I've deployed your suggestions

Fabian Iwand 2022-05-16 16:10:48

Much better, thanks! 😅

Kartik Agaram 2022-05-16 16:15:17

Don't the long multi-line and blocks hinder read-aloud-ability? I can imagine listening on the phone and having to periodically ask, "how many quotes is that?"

I didn't design github.com/akkartik/mu to be read aloud, but now that I think about it, it feels a bit nicer to read aloud since statements really occupy a single line and are therefore constrained to be short. The cost: lots more temporary variable names, so you'd have to ensure they're don't sound too similar to each other.

Have you considered creating just a style of JavaScript that is convenient to read aloud?

Fabian Iwand 2022-05-16 16:21:40

I'm curious if you've given thought to the treatment of camelCase words. For example, in createElement do you consider the function to be known to the receiving party so that any ambiguity would be acceptable? Or did you use a specific diction in the past?

Dragon NS for example seems to require post editing commands, which doesn't seem like a reasonable workaround for natural language.

Fabian Iwand 2022-05-16 16:30:47

(Perhaps all special characters should be aliased to onomatopoeias like "Pow" and "Whoosh" ... 😬)

Nate Ferrero 2022-05-16 17:49:47

@Fabian Iwand I'd almost rather enforce everything be lowercase as far as language keywords go (but symbol names and strings should be able to contain any character)

Nate Ferrero 2022-05-16 19:12:39

Kartik Agaram thanks for calling that out - note that putting many lines on one line with ' is optional, so the following are identical:

at foo ' add 40 ' log

and

at foo

add 40

log

so you can trade vertical and horizontal space when writing the language

I will check out Mu - about to catch a ✈

Nate Ferrero 2022-05-16 19:13:07

The quotes as the start of a block are not optional, however

Riley Stewart 2022-05-17 03:05:51

The quotes as semicolons seem to hurt readoutability - you would want that boundary to either be uniform, saying "ret" each time eg, or best yet unnecessary by making statements expressions that are bounded in arity. I keep getting confused by the structure of it as the semantics of the at/call/push paradigm are nearly inside out from the standard ALGOL style procedure call. The simplicity of your approach is very refreshing compared to JS; however, I only wish it could sit under it rather than above it.

Ultimately, I think the most "readable" languages look like en.wikipedia.org/wiki/HyperTalk or Ruby - quite verbose, though with linguistic affordances carrying a lot of context. We have communication hard-wired into our brains, but inventing languages that take advantage of this is more of an art than a science. The more whoever is learning it knows a different type of language, the more the impedance mismatches between them will trip them up compared to an absolute beginner.

Jack Rusher 2022-05-18 13:42:13

Have you read the papers around Applescript? It might be interesting to see how they approached some very similar design constraints.

Alex Thompson 2022-05-16 17:29:01

I'm working on a unification of programming languages, databases and network protocols by starting with the serialization.

github.com/bintoca/dbuf

Alex Cruise 2022-05-17 00:01:50

if only serialization were one of the hard parts 😕

Alex Thompson 2022-05-17 01:57:57

@Alex Cruise Agreed its not the hard part but I feel leaving it to the end breeds fragmentation and becomes an obstacle to interoperability

Tom Larkworthy 2022-05-17 10:13:09

The main gain of dbuf over protobuf is self-describing, are you aware of gRPC reflection? github.com/grpc/grpc/blob/master/doc/server-reflection.md (protobuffer can do it too but its not well documented)

Alex Cruise 2022-05-17 16:10:40

I use msgpack.org at my day job (it was originally created by one of our founders), it also has that property 🙂

Alex Thompson 2022-05-17 17:55:35

Tom Larkworthy That’s a nice help tool but my goal is to go much further. Instead of having dedicated endpoints that each accept a specific data layout, have a server that could natively understand requests of different shapes.

Alex Thompson 2022-05-17 17:56:37

@Alex Cruise Since you brought up out of the tar pit in a different channel, that is where I’m going with this. Using the same type system for the wire, relations, indexes, cached intermediate values and having it all be more runtime adaptive.

Alex Cruise 2022-05-17 18:14:08

You might be interested in the various WebAssembly efforts to standardize struct/reference/complex types

Alex Thompson 2022-05-17 18:35:36

I have followed the progress of the GC proposal. I think its going to have limited usefulness as it tries to cater to a wide variety of type systems

Alex Cruise 2022-05-17 18:36:42

My snarky impression is they’re reinventing IDL and large parts of the JVM but apparently there are enough people involved who have been around awhile that they have a decent shot at success 😕

Alex Thompson 2022-05-17 19:16:25

Yeah there's plenty of talent involved. I guess part of what makes any big system is just belief

Oleksandr Kryvonos 2022-05-16 21:37:14

I am adding some basic types to my Lisperanto project [ uprun.github.io/lisperanto ], some one asked me recently how would I represent booleans, and now I have an answer: It is a record with type “boolean” and value either “true” or “false” in terms of JavaScript it is:

{ type: "boolean",

value: "true" }

Corey Montella 2022-05-18 15:32:39

Hi all, I've got an update on the Mech language ready to go live. I thought I'd post it here first to get some eyes and feedback if possible: mech-lang.org/post/2022-05-20-spring-update

I've only just finished writing it last night so I've got some proofreading to do myself. But there are a lot of cool videos in there so I hope you'll check it out and let me know what you think!

Chris Knott 2022-05-19 07:27:56

It's a good update (looks like you've accomplished a lot ). You probably know this but parts would be difficult to understand for someone new to the project, I would probably just chuck a link to the Welcome page at the top if you are planning to send it out to a wider audience.

Corey Montella 2022-05-20 03:20:09

Thanks that's a great idea!

Tony O'Dell 2022-05-18 17:10:38
Alex Cruise 2022-05-18 21:09:20

I really think state machines are one of the major missing abstractions in the industry… So far every attempt I’ve seen to make them generic has a pretty thin and/or tortured encoding

Tony O'Dell 2022-05-18 21:11:31

they'd certainly be easier to prove correct and it'd require a big shift in thinking for a business process to translate to state machines. docker solved half of the problem but it solved the wrong half

Alex Cruise 2022-05-18 21:12:14

I wouldn’t call it “wrong”, just extremely Necessary But Not Sufficient. 😉

Tony O'Dell 2022-05-18 21:15:11

haha, "wrong" in a sense that it doesn't solve a problem it wasn't designed to solve - it does certainly have its place