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

That last change is motived by wanting to be able to keep a webdir server running without removing the directory from under it
So, https://stk.junglecoder.com now has widespread playground links! I -think- most of them should be working, feel free to mention me here if one is broken
StackTalk[ About ]

And finally, the change I've been working towards for the last few days: Autoboxing!

Autoboxing is basically that StackTalk will now automatically "box" (aka wrap in an object) strings, booleans and numbers that get pushed onto the me stack.

This means that you can call methods defined in the string, bool and number modules, respectively.

I mostly did this because I was copying an example from the Ruby homepage, and realized that say String .upper print looked a sight uglier than say .upper print.

But, I didn't want to be copying the string module into every string that got put onto the me stack.

So first, change modules to be less expensive to attach to objects
Second, autobox values to allow for method calls.

All the while shaving yaks as is tradition