9 ms·
Ceramic – Turn Lisp web applications into desktop apps
- mark_l_watson 11y agoThis certainly looks interesting, but it might help generate interest if the landing page addressed two questions: what is the application size overhead (how large is a hello world app) and what is the app startup overhead. I used to make standalone apps from SBCL Common Lisp, and they were not too large (even though SBCL has no tree shaker unused code remover).
- eggy 11y agoI agree final app size would be a further selling point for me too. I am glad to see Lisp, CL, in the headlines other than clojure. I guess the ubiquity of JS has lead to the possibility Ceramic offers due to Electron. Slightly, OT, but I am reading 'The Handbook of Neuroevolution Through Erlang', and I am waiting to learn enough Erlang to jump over to using LFE (Lisp flavored Erlang) mid-book. @mark_l_watson, I started with your 'Common Lisp Modules:..' book, and now I am hooked on AI, NN and Lisp. Thanks! Rob
- mark_l_watson 11y agoThanks! Richard Stallman asked me several years ago about releasing my old Lisp book under a FSF documentation license, but I can't find my old manuscript files. Maybe I will ask my wife to re-type it all.
- jakub_h 11y agoWhat about crowdsourcing the job? I'm sure people would be willing to help.
- pavelludiq 11y agoI am glad to see Lisp, CL, in the headlines other than clojure. We've had a string of really cool lisp projects this year, web frameworks, implementations, web servers, libraries, etc. Couple that with Edi Weitz's upcoming book, it's as exiting to be a lisper now as ever. Hack gloriously and eat your parenthesis for breakfast my lispy friends :)
- hellofunk 11y agowow that's an expensive book! even the ebook is $150
- eggy 11y agoWhich? Mark's book or the Erlang book I cited above? Mark's book can be found used for $3.00 on Amazon.
- mark_l_watson 11y agoCertainly not my book :-) Edi's upcoming book on Amazon is listed as $56, due December 2015. I will probably buy a copy when it ships. EDIT: I just pre ordered a copy on Amazon to lock in that price.
- mark_l_watson 11y agoThanks for the $3 Amazon reference. I only have one copy of my (very) old book, and just ordered a used copy so I have a spare. I was surprised to see that Springer Verlag still sells it new - I thought that it was out of print a long time ago.
- hellofunk 11y agoThe Erlang book direct from publisher has to be one of the highest ebook prices I've ever seen.
- aidenn0 11y agoThis doesn't include ceramic, but: I did a benchmark of executable image sizes and startup times for the popular open-source implementations[1] it depends on cl-launch since asdf:program-op was still experimental at the time. A few points I discovered: SBCL and CCL are neck-on-neck for startup time; very slightly longer than a hello-world in python, but much faster than any python script that has to do any significant importing. SBCL has by far the largest image size overhead ~80MB for "hello world". It has an option to compress the image with zlib, but that is a big impact on image startup time. I did a proof of concept of an lz4hc image compressor, and it made for acceptable startup times while taking the overhead down to under 30MB. Someone else turned this into a real patch, and it is waiting to be merged. CCL's image size is about 1/2 that of sbcl. ECL has, by far, the smallest image size, even including the DLL (3.2MB for a lisp runtime is tiny!). However, it has a startup time that is two orders of magnitude higher than sbcl/ccl clisp was ind the middle of things; executable image was about double that of ecl, it's startup performance is better. 1: https://github.com/jasom/image-bench https://github.com/jasom/image-bench
- mark_l_watson 11y agoThanks for the info on CCL's image size - that makes CCL worth switching to for bundling applications, but your SBCL patch sounds even better. That said, it has been a number of years since I sold a Lisp application - but still good to know!
- eudox 11y agoThe hello world app (bundle) is like 250 megabytes. Half of that is the Electron release, the rest is the Lisp image, whose size you can cut significantly using core compression (this isn't enabled, I'm looking into doing it through Buildapp without it crashing if it's not available).
- falcolas 11y agoYikes. One would think that could be pared down by a significant amount: Node is only ~40mb installed, and the various webkit browsers aren't much bigger than that.
- aidenn0 11y agoSee my other comment about implementations' core image sizes. SBCL is the worst offender for runtime space overhead[1], and it's CLOS implementation is heavily biased towards the "space" side of the time/space tradeoff, and a brief look at the implementation of this shows a lot of CLOS usage. I would expect that delivering with a different implementation would show a significant reduction in size. Barring that, most GUI executables are fairly insensitive to startup time, so SBCL core compression would the lisp image down by a factor of 4:1. Lastly, you can always just not worry about it: du -s /Applications/*.app | sh ~/avg.sh Total: 28529040; Count: 126; Mean: 226420; Median: 56752; Min: 8; Max: 6132408 1: Note that SBCL generates the best code of any Free lisp implementation, and makes it the easiest to tune your code for better performance. As disk space is cheap, it's what I use for most of my applications.
- 616c 11y agoHey, eudox! We wanted to ask you, but we did not see you on the Reddit thread. Someone asked: https://www.reddit.com/r/Common_Lisp/comments/3d3oqh/ceramic_turn_web_applications_into_native_desktop/ https://www.reddit.com/r/Common_Lisp/comments/3d3oqh/ceramic... The gist is: for the Javascript parts on your site, any plans to integrate Parenscript for the full Lisp experience? Thanks for your work. I saw again it was posted before today on /r/lisp and /r/programming, but I missed it.
- jahnu 11y agoThe links to Electron and Atom point to this page. Can someone provide correct links please?
- aidenn0 11y agohttp://electron.atom.io/ http://electron.atom.io/
- thisishugo 11y agoI just had a pull request accepted so the correct links now show on the homepage.
- sfilipov 11y agoHow much work it is to extend Electron to create the same thing but for a different language i.e. "Turn Haskell/Python web applications into native desktop apps"?
- WorldWideWayne 11y agoAlong the same lines - how hard would it be to let Electron create more native widgets instead of just Window, Menu and BrowserWindow.
- fnordsensei 11y agoI'd be stoked if something like React Native (or indeed, React Native itself) landed for desktop development. I guess I'm not alone in thinking so: https://github.com/facebook/react-native/issues/247 https://github.com/facebook/react-native/issues/247
- nahiluhmot 11y agoIs there any reason that this wouldn't be able to work with another language? If the interface is an HTTP port, it seems like this isn't necessarily tied to Common Lisp.
- orthecreedence 11y agoYes, you could rebuild the project in any language if you wanted. Ceramic opens an HTTP server (in lisp), starts electron (using a shell command), communicates to the electron process via streaming, then electron sends back HTTP requests to the lisp process. However this is tied to Common Lisp because the containing project itself is built in Common Lisp and can't be switched out without completely rebuilding in another language.
- gaze 11y agoCan we PLEASE just work on writing a decent native GUI library for lisp? Making QT work better? Something?
- oskarth 11y agoYou are more than welcome to work on it and submit it to HN. However, please refrain from being gratuitously negative in this forum; someone just spent a lot of time and effort into making something, and your comment - which took less than a minute to write - is purely negative and adds nothing to the discussion.
- gdrherh 11y agoI wish someone forced me to read this before making any comment...
- krick 11y agoIt adds much more to discussion than your comment, TBH.
- tomjen3 11y agoIt is entirely legitimate to point out that somebody the submission is going in the wrong direction, yes they spend a bunch of time on it, but that is sunk cost and better they not waste any more. GP was to the point, but not mean and added something to the discussion (even if you disagree with it). You, however, were rude.
- gaze 11y agoYeah, you're right. I apologize.
- Jimmy 11y agoI can't see it ever happening. I first started learning Lisp in 2006. Some of the most common messages on Lisp forums were things like "what GUI library should I use?", "why is there no standard GUI?", "this library works but it's incomplete and looks abandoned," along with calls for the Common Lisp community to standardize around one GUI library. If the situation hasn't gotten better since then, well... what are people waiting for?
- mariusmg 11y agoA "app" running in a webview on a desktop is NOT "native". A Swing app is not native nevermind these web apps running in chrome.
- rubiquity 11y agoYou'll be sad to known a ton of OS X and Windows applications these days are just running in web views. Heck, even a lot of iOS apps are partially/mostly UIWebViews.
- Ramiuz 11y agoCan you give some examples?. (genuinely curious btw).
- Mister_Snuggles 11y agoIsn't the Atom text editor mainly a Chromium web view running on the desktop?
- cosarara97 11y agoYes, and many people don't think of it as native for that reason.
- MisterBastahrd 11y agoThe colloquial definition of a native desktop application is an application that runs from a binary on your system. So yes, most people DO think of these as native applications.
- FigBug 11y agoIt's beyond that. I also uses the native APIs to create the user interface.
- 11y ago
- giancarlostoro 11y agoIf a given language you enjoy can run a web server, you could potentially take advantage of Electron. This of course includes Go, D, C#, Java, Clojure and plenty of other languages everyone loves. Not telling everyone to do this for every type of application though, but it is definitely not impossible to approach making a desktop application with web technologies.
- orthecreedence 11y agoThis is a really cool/interesting way of packaging an entire app. I never even thought to have a CL backend in a separate process that you could communicate with via HTTP. I've done the same thing (browser, embedded lisp) using nanomsg, but this seems a lot more straightforward. Good work =]! I also really need to look more into Electron. I've only used node-webkit (before it was NW.js).
- ragna_rock_rock 11y agoWhy don't use haxe and openfl/nme and transpiling lisp code in haxe?
- fnordsensei 11y agoWhat do you reckon the benefits would be over this solution?
- StudyAnimal 11y agoHeh weird. 15 years ago my job was porting apps the other way. Turning lisp desktop apps into lisp web apps with cl-http. Of course that was hard. Turning a web app into a desktop app is just a matter of embedding a browser. The other way around requires work.