freenode/#lisp - IRC Chatlog
Search
23:08:38
jasom
zch: I wrote a *bad* example of a web application using common lisp; it works, but I wouldn't necessarily suggest it as a shining beacon of design.
23:10:24
zch
jasom: Well, I was trying to show a fellow that CL is probably fine for writing web applications, so perhaps a *bad* example would scare him off haha
23:12:53
jasom
The frontend code isn't too scary: https://github.com/jasom/cl-fccs/blob/master/src/view.lisp
23:13:24
jasom
there's a react version in the history as well, but I dropped react as it was slow and hard to debug compared to mithril.
23:14:04
whartung
how is the back end so bad then? At that level, it’s hardly a web app, really, right? just a bunch of client server?
23:14:36
jasom
whartung: I said "This is simple I don't need a routing library" and then I proceeded to accidentally write a routing library
23:19:21
jasom
Actually, now that I think about it, it should work with other clack backends, but the mongrel2 clack backend supports per-worker-thread bindings, which I take advantage of for having 1 persistent DB connection per worker. If anyone knows how to get that to work with e.g. hunchentoot, let me know.
23:20:51
jasom
It also uses an NIH half-assed object system that is portable between parenscript and CL.
23:21:42
jasom
https://github.com/jasom/cl-fccs/blob/master/src/ps-compat.lisp#L202 <-- at least the doc string is honest.
23:23:32
jasom
Also it uses immutableJS poorly, which was a last-ditch effort to get react to have anywhere near acceptible performance on android.
23:23:33
fiddlerwoaroof
I've been off-and-on working of a pure-js implementation of AMOP's generic function protocols
23:26:19
jasom
I'll start working on it again if I ever get a fantasy craft group together again. I learned a lot while doing it though.
23:29:06
jasom
ACTION works in embedded software by day, so webapps are something he learns only in his free time
3:09:14
Jachy
I met the CL Cookbook maintainer once at a clojure meetup, so you might find interest crashing those and inviting people?
4:24:45
elderK
:) So far when I've found code that uses macrolet, I've had to factor the macros out to be global so that I can expand them to learn from.
4:25:59
Bike
(defmacro expand-helper (form &environment env) `',(macroexpand-1 form env)) (macrolet ((foo () ...)) (expand-helper (foo))) i think
4:34:57
makomo
elderK: emacs' package macrostep (and the accompanying SLIME contrib) can expand macrolets for you in-place
8:10:11
emaczen
What are the performance differences between CFFI and a FFI provided by a CL compiler?
8:11:52
no-defun-allowed
i think it should be zilch-ish since most of CFFI would be wrappers like most compatibility packages (closer-mop, bordeaux-threads, usocket, etc etc)
8:17:51
p_l
emaczen: there might be a small overhead, probably on the order of one-two funcalls depending on what you're doing exactly, can also drop to as low as zero
8:18:54
jackdaniel
ecl's default static methods is tens of times faster (but it can't be used by default with cffi due to (fixable) architectural problem in the library)
8:19:20
jackdaniel
but in principle cffi expands into whatever your implementation provides, so overhead is most likely close to 0 indeed
8:23:46
jackdaniel
i.e defcfun on sbcl expands into (defun foo () (alien-funcall (some-alien-internals)))
9:33:09
fiddlerwoaroof
I wish there was a way to express a composition of FFI calls without an intermediate FFI boundary
10:18:47
muyinliu
It's there function md5sum-file exists in LispWorks ? (ironclad:digest-file :md5 xxx) seems very slow on LispWorks(1G file took 2345s).
10:21:44
beach
muyinliu: Freenode is for free software. For commercial Common Lisp implementations, you are better off contacting the supplier directly .