And now I'm announcing the second and final project I'm starting today: "Memex", a new and hopefully more hackable, less crackable browser engine.

It won't support JavaScript, and instead try out some alternative ideas that aren't Turing Complete. Because I want to show The Web can be better that way.

I'll only be able to implement the absolute basics of Memex, so if any of you want it to actually be something please, please contribute!

@alcinnz i wrote a thing in javascript.. Basically a server sends patterns, and data to fill in the patterns. Patterns can also have sublists;

Into the stream, it inserts the pattern,(if not sent yet) and then the stream of objects the function_name produces.

I also got static pages going.(right now, just running the javascript server-side)

The idea is to add basic forms too, so a sublist can be extended/replaced.(bit like html forms)

@jasper Do you mind sending me links?

I'd like to bring it up on a mailing list I've got.

@alcinnz it was a bit tangled up with another project, but i untangled it.

@jasper Interesting read! What was that other project btw? I'd like to see how JSPat can be used.

And can I summarise JSPat by saying it works by substituting arguments in where "{%"..."}" is encountered, and evaluating any template expressions that generates?


1. the macros depend on what the object is providing.
2. sublists correspond to methods on the objects, and return lists(generators) of objects that then do the same.

It's hoped to easily compose pages this way.
3. no back and forth, patterns are pre-read for info on what sublists are needed.

It is also partially avoiding logic constructing things browser-side, yet construct them there anyway.

Of course, it includes javascript, but perhaps an addon or userscript can take over.

@jasper There did seem to be something about macros being involved in the definition of macros, but maybe I didn't understand that right. Some sample usage would be a help in wrapping my mind around it.

Avoiding logic is definitely a goal of mine, so it's good that the output isn't regarded for patterns. Because then you'd have an interesting expression of Lambda Calculus.


@alcinnz when in the string it sees something like `{%fun_name|arg1|arg2...}` just calls a function by the name, with those arguments, and a state.

With the return value, if a string, it just inserts in place.(even if it contains `{%..}`) If a list, it contains more things to expand, so it will do that.

The state is used to pre-calculate what is needed, for instance `{%c|name}` lists `name` as a needed part of the object. And `{%sublist|...}` figures needed patterns.

@alcinnz JSPat/obj/ contains some examples..

asset_page = ["div.html", "<h3>{%c|path}</h3><p>{%c|mode} creation time:{%c|ctime}</p>{%sublist|table|dirlist|entry}"]

Put in a `<div>` tag, the tag component (returned by `jspat_data` above) creation time, etc.

After the </p> sublist, tells it to use pattern below(`entry`). And `jstpat_subgen_dirlist`, and to put it in a `<table>`.

asset_entry = ["tr.htm", "<td>{%c|path}</td><td>{%c|size}</td><td>{%c|ctime}</td>"]

@alcinnz it `asset_entry` doesn't use {%sublist, so the recursion stops.

The other, `asset_sub_entry` and `asset_sub_page` are used to (limitedly)test if it can do a layer deeper. It uses the `JSPat.obj.Date` object which is the same kind of thing.

Sign in to participate in the conversation

Mastodon-instance voor de Nederlandse gemeenschap, maar open voor iedereen. Voertaal voornamelijk Nederlands en Engels.

Mastodon instance for the Dutch community, but open to anyone. Primary languages Dutch and English.

Maintained by / Hosting kindly offered by and Azure