IndexedDB, GIN and Isolated Web Apps

39 views
Skip to first unread message

John

unread,
Dec 1, 2024, 9:12:23 AM12/1/24
to Newspeak Programming Language
Hi fellow Newspeakers!
I wanted to share some of things I have been able to accomplish with this wonderful tool. It turns out the browser APIs offer quite the plethora of shiny toys with which to play.
I wrote an ORM using IndexedDB. I learned many things, mixins, mirrors, tons of fun. The repo contains a modified Todo app to persist your Todos and a bank account app where your deposits no longer disappear. Both are available directly from https://chalculator.com/newspeak.html 

Google has a $12k prize available for the best app using chrome's experimental, early preview Built-In AI. After only a few hours getting it to "work" I am fairly certain that my 8GB Mac Book is not up the challenge of loading an LLM. If you have a beefier machine you might like to try it, I have no idea how many GB you will need. Documentation is scant. This article gives a good rundown of the setup needed to use it. For these early previews there are some sign up steps as well. Chrome Canary is required. Gemini INewspeak is not very many lines of code; but the easter egg is sublime if I do say so.

The most challenging API, also experimental: Direct Sockets. These are only available to an Isolated Web App
https://chromeos.dev/en/tutorials/getting-started-with-isolated-web-apps/1 seems simple. I posted a zip of the hacked up pwa that got it running. Its still has some quirks to iron out, but seeing this in a workspace this morning was pretty sweet:
platform js global at: 'TCPSocket' => [object TCPSocket] { [ native code ] } 

I hope you find some of this useful. 

Happy Trails,
John

John

unread,
Dec 1, 2024, 9:22:17 AM12/1/24
to Newspeak Programming Language

Gilad Bracha

unread,
Dec 1, 2024, 2:12:09 PM12/1/24
to newspeak...@googlegroups.com
John,

This is cool! I tried the BankAccount app, it works. TodoMVC isn't clear to me yet - could not get it to accept todos. The most exciting thing is GIN - I will try and get it to work. I have access to some pretty healthy machines.

--
You received this message because you are subscribed to the Google Groups "Newspeak Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to newspeaklangua...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/newspeaklanguage/e159dfe6-b65f-4baf-85b2-0b22973157ccn%40googlegroups.com.


--
Cheers, Gilad

John

unread,
Dec 1, 2024, 6:03:31 PM12/1/24
to Newspeak Programming Language
The git gods were not favoring me this morning when I tried to push my latest code. I suspect they did not care for how I set up that repository so I broke them out into their own repos and the gods are happy now. Ginger's main:args: method was changed to handle the Asynchrony of the Promises, something that has given me a little trouble. I have taken to using the current pattern to load stuff before the subject/presenters are brought up to speed. If there is a better way I would be glad for any advice. 

I also posted an updated Todo app. Thanks for checking them out! And apologies for the snafu's 
Cheers

Gilad Bracha

unread,
Dec 2, 2024, 1:25:07 PM12/2/24
to newspeak...@googlegroups.com
Hi John,

Great, I'll take another look soon (I've been distracted by Thanksgiving).



--
Cheers, Gilad

Sriram Panyam

unread,
Dec 3, 2024, 11:46:05 AM12/3/24
to newspeak...@googlegroups.com
John

    (NS Noob here).   This is amazing.   Love what you have done.  IndexedDB was on my mind for a while and your experiments were just the trigger to start tinkering with it!   Also luckily I happen to have a beefier machine so would love to try out GIN :)

Just one little thing - the static resources werent quite showing up for me on the TODO demo but it seemed smoother otherwise.   Will play with it a lot more!

cheers and keep em coming
Sri



On Sun, Dec 1, 2024 at 6:22 AM John <p3an...@gmail.com> wrote:
--

John

unread,
Dec 5, 2024, 7:43:54 AM12/5/24
to Newspeak Programming Language
Thank you Sri. I appreciate the encouragement.
I probably should have said more about it. I bear no illusion as to the quality of this library. It is very naive; "the simplest thing that could possibly work"; will not handle anything except the simplest of data objects; any sort of complex object graph will break it, etc etc.
In short, it needs a lot of work. I hope to improve it as I delve into more complicated use cases.
Happy Trails
John
Reply all
Reply to author
Forward
0 new messages