Fork me on GitHub

Hi, I'm curious about embedding sci (or cherry or squint) into a custom node runtime (Google App Script). Wondering where I should start. I've got a self-hosted CLJS running on GAS, so you can run code in formulas in Google Sheets and what not, which is interesting. But it's a bit heavy weight, having the whole self host in there. And 99% of your GAS code is going to be interop with GAS libs, so even squint might be a fit.


So that might work. But is it possible to share a namespace/context environment across different evalString calls, so that diffrent sheet cells can refer to the same definitions?


Still figuring out how to send cells in as parameters to clojure functions defined in a cell formula, but it might be an interesting tool


Using the whole self hosted compiler on every call is too heavyweight though and slows the call down


The great thing about Google App Script, by the way, is that 1) it's free, and 2), which you can use to build a bot that can scrape the internet and store results in google sheets, for free, so that's pretty sweet


GAS is serverless node before serverless was even a thing lol


Anyway, no reason to write scripts on there in an uncivilized manner, so I figure I'll try one of these slimmer alternatives to cljs for wrapping GAS


And with you can just deploy from the cli. So a cljs->gs build/deploy pipeline would be easy. There's no reason we shouldn't be just firing off scripts to the cloud using our personal hosted google node servers using our google accounts. It's a free lambda. Maybe that's what I should turn my clgs project into. A tool like nbb, but sends it to GAS. Not sure how a repl would work - it's ephemeral, like a lambda :thinking_face:


Would probably be pretty easy to host a free ngrok/pagekite thing, for getting repls out from behind firewalls, etc


And it could probably be as easy as nbb -e '(+ 1 2 3)', but it just runs it on gas


Has that ugly ToS banner bar at the top, but good enough to get stuff done for free


> Hi, I'm curious about embedding sci (or cherry or squint) into a custom node runtime (Google App Script). Wondering where I should start. I guess you figured it out?


Well, I guess a number of different paths could work. Sorry about the longwindedness above, kinda pitching it and ruminating options at the same time


And I guess there's a free threshold there too yeah?


not sure, but I would assume so


first two million are free


Cloud Functions provides a perpetual free tier for compute-time resources, which includes an allocation of both GB-seconds and GHz-seconds. In addition to the 2 million invocations, the free tier provides 400,000 GB-seconds, 200,000 GHz-seconds of compute time and 5GB of Internet egress traffic per month.


That's probably even more than the GAS quotas anyway


GAS is an interesting stack though, with the webservices and docs integration


You could spin up a form from the CLI to take community comments that auto populated a google sheet