3 ms·
I can't do any kind of IO in a webworker, which means things like indexing the filesystem are impossible there. The vast majority of cases where I need to do ba
by ibdknox 13y ago
I can't do any kind of IO in a webworker, which means things like indexing the filesystem are impossible there. The vast majority of cases where I need to do background work I also need access to the host.
EDIT: I should note that I did start with webworkers for things like auto-complete, but what I'm doing now (spinning up another instance of node) is a lot more powerful and robust. As scary and sad as that may be.
- airlocksoftware 13y agoKinda tangential, but mentioning threads brought it up. I have core.async on the brain, so I was just wondering if you've looked at it or plan on using it for anything. David Nolen had a cool example using it for event handling.
- ibdknox 13y agoThere are places where it'd be useful, no doubt about that. Mainly it will be really useful in the cases where you want to ask a client something "synchronously". For example it'll make doing things like asking a language client where function boundaries are much nicer than the way I was going to have to do it before (waiting for events to be triggered async-style).
- pjmlp 13y agoWhy to use node instead of Clojure then? This seems just like hacking around a non-existing problem if JS wasn't being used.
- ibdknox 13y agobecause I wanted to use html/css as the UI toolkit and utilizing JS gives me a bunch of stuff for "free." I looked into using javafx and various other java-y things that embed webkit but they are painfully slow, to the point where it wasn't practical to even try using them.
- pjmlp 13y agoGiven the work you have to do now, it wasn't for "free".
- ibdknox 13y agoI tried the alternatives and they were fundamentally unworkable. The cost here wasn't that great, mostly it was a matter of figuring out the least bad solution to the problem. Compared to the issues I ran into with java-based integrations, this really was of negligible cost.
- pjmlp 13y agoPersonally I would have used Swing and avoid any integration issues, but it is not my product. Good luck with Lighttable, all the luck to make it successful.
- vosper 13y agoThat makes sense - if I was building any kind of UI these days it'd take a very strong argument to convince me not to build it with HTML/CSS. Working around some JS issues seems like a relatively small price to pay.
- city41 13y agoWould you be able to quickly explain LT's architecture from a mile above? node-webkit for an HTML based UI. How does clojure come into it? Or is clojurescript the workhorse?
- ibdknox 13y agoSee my "The IDE as a value" post which gives a good overview of how it all works: http://www.chris-granger.com/2013/01/24/the-ide-as-data/ http://www.chris-granger.com/2013/01/24/the-ide-as-data/ It's all ClojureScript all the time :) Clojure is only used for evaling Clojure and doing languagy things. Not much has changed since the above post except that behaviors are now added to tags outside of code in .behaviors files.