Hacker News new | past | comments | ask | show | jobs | submit login

Craig here from Crunchy. Pretty excited to ship this. It started with one of our engineers showing up in slack 6 weeks ago "So I did something crazy over the weekend..." from there it evolved into much more.

The post explains a lot of the high level, but we're going to being doing some deeper dives as well including the build process, but also some of how the tutorials are powered by an internal notion doc which allows us to easily iterate and collaborate on the tutorials themselves.

Perhaps our favorite easter egg is that you can bring your own SQL into it for example: https://www.crunchydata.com/developers/playground?sql=https:...




Maybe I missed it, but is the licensing info available anywhere? The playground seems to be using v86.js I don't see the required "Redistributions in binary form must reproduce the above copyright notice" -- https://github.com/copy/v86/blob/master/LICENSE


Late to this, hadn't noticed until now. We have the license included and linked from from inside the VM as it starts up.


v86 is an interesting choice, I wonder why they couldn't compile Postgres itself with Emscripten (AFAIK it's all C code).


I'm assuming there are too many details like syscalls and file system specific APIs that they needed a lower level virtualization?


Your scientists were so preoccupied with whether they could, they didn’t stop to think if they should.

Great job!


What were the hardest parts of getting it to compile for WASM?


Very cool, I work on https://sqlpad.io which allows people to practice sql coding interview questions online.

Do you provide 3rd party hosting? Might consider replacing ours to something more flexible like yours in the future.


Feel free to drop me a note craig.kerstiens at crunchydata and happy to have a conversation to see what options may exist.


Any chance you can give us access to the PSQL sandbox without it being attached to a tutorial. Would both be a great way to learn and also function as a productivity tool if one could fool around with PSQL "scratch pad"


That's a heck of an easter egg. It's like the TS playground feature, letting people explore exactly what you mean with a bug, etc. Kudos.


Broke it trying to load our db schema at https://www.crunchydata.com/developers/playground?sql=https:...

Any ideas?


Maybe give it another shot or two, it's definitely a slow process to import. We have some improvements coming there in time but it's ideal at moment for smaller schemas and datasets.


You definitely seem to have some issues with memory usage, crashes my tab when trying to load that link on a device with low amount of memory (4GB).


Maybe a per tab memory limit. Step 11 talks about increasing memory.

https://www.guidingtech.com/fix-google-chrome-out-of-memory-...


This is awesome. Can you talk about how was it implemented? Is it actually a port of the postgres code that's been compiled to WASM?


This is definitely our plan, we've got some follow on posts that go into much more detail on how we built it so stay tuned for those.


Would love to see this! I could see a wasm version of postgres being useful for all sorts of things, especially an easy dev instance of pg runing inside a node app.


This is great, I can't wait for someone to get python in the browser talking to postgres in the browser (and hopefully very soon afterward Django in the browser).


You are going to need K8S in there to manage all the complexity.


And Docker in between to properly isolate processes and dependencies.


I agree. Those damn computers are becoming too fast. It is time to to slow'em down proper so we can pay more for a hardware.


Bring back the turbo button


> Perhaps our favorite easter egg is that you can bring your own SQL into it for example

That is super awesome! I plan to use it to allow people to peruse our table structure easily.


This is great. Have you done any benchmarking? I am currently looking to find/create good Wasm benchmarks, and it seems like this might be a good workload.


@Craig, I wonder if you've thought of making this available (would it work??) for test case construction. Today (working in Go) I start a postgres in a docker container for testing database code. Could I instead use a go wasm runtime, and start postgres inside of it? That would potentially free me from the docker dependency in these tests.


The communication in and out is a bit of extra work at the moment. We've got some thoughts on improving this in the future, but it's a bit unclear on timeline and roadmap. We're excited to hear what people want from it and how they use it and that'll inform a lot of how we move forward.


> Perhaps our favorite easter egg is that you can bring your own SQL into it

This is very cool but I wouldn't call it an easter egg, I'd just call it a feature!


This is a really cool tool. Nice work


Pretty cool project!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: