So, last night and today was a lot of work on an X in Y minutes for StackTalk

It's about 70% of the way through the first draft.

It's funny, it feels like there is quite a lot of ground to cover with this, -and- I need to make sure that it all works correctly too, later.

That being said, I will probably be going on a short hiatus from StackTalk work for the next few days.

#StackTalk

StackTalk/lib/examples/x-in-y.stk at main

StackTalk

Forgejo: Beyond coding. We Forge.

I also added first?, more? and last? as functions defined inside each? for the purposes of being able to format playground output more easily, but also so that "print in a loop" can work more nicely w/o having to use Array's join.

#array: module/extend[
Playground/dump: fn[
Playground .[
you each[
first?[ "/#[ " dump/string ]
dump more?[ ", " dump/string ]
last?[ " ]" dump/string ]
]
]
]
]

^ this is the code that's motivated this batch of changes. Takes me from an awkward "dump array like an object (which honestly kinda sucks)" to "Dump array as it's own literal", which I like quite a bit.

And I like more? as a way to do join-like things.

#StackTalk #yakshaving

StackTalk changes for this morning:

  • Updated how modules work. Now, instead of having their contents copied into objects when used, they get attached to a metaObject field. Well, after the concatenation of all of the modules a particular object is using is built, if it doesn't yet exist.
  • Updated the StackTalk website so that -most- of the code examples have playground links. This is the first time I've ever taken advantage of running the same JS on the front and backend of a website, using fflate.js in the site generator to build the playground links
  • Updated the StackTalk site gen to remove the contents of the site/ directory, rather than removing the directory itself:

old:

Directory .[
try[ site: rmr ] :catch void ]
static: site: copy
site/rx: ensure
]

new:

Directory .[
try[ site: ls each[ .[ path "/" + name + ] rmr ] :catch /l ]
static: site: copy
site/rx: ensure
]

#StackTalk #DevLog

So, I think I'm going to try to make little posts every time I make commits to StackTalk

Tonight's commit was using negative lookbehind to resolve comment nesting issues in StackTalk's vim syntax file, as well as telling vim to sync parsing from the beginning of the file, because of how multiline strings seem to consistently break vim's highlighting atm w/o that.

#StackTalk