<doulos05>
Anybody here doing web work with Caveman2?
<doulos05>
Or Clack/Lack for that matter (That might have the answer). I need to include Single Sign On with Google (based on OAuth2) in an app. I've found clath, which looks like what I need.
<doulos05>
But I can't figure out where in the caveman2:make-package skeleton, I should put the call to `(clath:component "127.0.0.1") that I see in the documentation.
<doulos05>
I've tried everywhere that seems obvious to me. lack:builder call in app.lisp, the start function in main.lisp, right after the *web* variable is instantiated in web.lisp...
Fare has quit [Ping timeout: 255 seconds]
gxt has quit [Remote host closed the connection]
gxt has joined #commonlisp
gxt has quit [Ping timeout: 255 seconds]
dec0d3r has joined #commonlisp
gxt has joined #commonlisp
aartaka has joined #commonlisp
Lord_of_Life has quit [Ping timeout: 256 seconds]
Lord_of_Life has joined #commonlisp
nij- has left #commonlisp [Using Circe, the loveliest of all IRC clients]
<doulos05>
Nevermind, I have found an error in the documentation for clath and will be submitting a pull request. The endpoint to verify clath is working is *server-url*/clath/login/, not *server-ulr*/clath/login
seletz has joined #commonlisp
seletz has quit [Ping timeout: 260 seconds]
rgherdt has joined #commonlisp
zagura___ is now known as zagura
kstuart has joined #commonlisp
igemnace has joined #commonlisp
Inline has joined #commonlisp
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
szkl has quit [Quit: Connection closed for inactivity]
Inline has quit [Remote host closed the connection]
<Nilby>
jackdaniel: having sufferd from having some accidentally fearless handlers, i can say you'll likely spend a lot of time back at top-level without much clue why
<pjb>
(handler-bind ((error #'continue)) …)
<jackdaniel>
_death: right you are :)
<jackdaniel>
Nilby: I wouldn't put it in the code; I'm tinkering with the bootstrap environment (there is no debugger available then, so it is either _ecl_unrecoverable_error(c); or cl_funcall(1, continuation);
<Nilby>
heh, then i guess replace top-level with c debugger command line
<Nilby>
what's extra fun is fearless handlers in print-object or the debugger
<nij->
pjb, thanks for your informative example!
<nij->
In the case of (g), the backtrace doesn't even mention (error "foo")!!
<nij->
Why would anyone use handler-case then?
tyson2 has joined #commonlisp
<pjb>
because in general it's enough to report the error.
<jackdaniel>
handler-case is a syntactic sugar that returns when you have an error
<jackdaniel>
also if you are clever enough, you don't need to cons a function for the handler body
<jackdaniel>
aren't you asking too many specific questions for an early stage of the project?
<phoe>
well, mmmmaybe
<jackdaniel>
'whole cl runtime' is a vague term, especially when we assume that some modules may be lazily loaded (or error if they requested but not present)
<Bike>
(reduce (lambda (l1 l2) (merge 'list l1 l2 #'<)) '((3 4) (3 7) (5 7 9))), just to actually use merge for once
<jackdaniel>
and what is common lisp if not a dozen of special operators plus a huge standard library, hm?
<phoe>
just three smaller lisp dialects in a trench coat
<jackdaniel>
and yes, I'm jelly of what ulisp achieved portability-wise ;)
<Nilby>
to fit CL in small things you'd probably have to discard modern things such as unicode
<jackdaniel>
well, I'll update you on the progress if I have anything to show, probably on my blog ;p
MajorBiscuit has joined #commonlisp
<Nilby>
just char-name on unicode is huge
<jackdaniel>
Nilby: the lazy loading thing something
<varjag>
thanks
<phoe>
Nilby: store it in ROM, it's so much cheaper than RAM on many platforms
<jackdaniel>
generally if we are picky, then storing all standard symbol names in memory is huge
<Nilby>
I've seen lisps with symbols stored as prefix trees, slower but small
<jackdaniel>
another thing is that common lisp symbols are fat
* Nilby
used to run lisp 1.X on a pdp8 with maybe 6k ram?
<jackdaniel>
you have a name, two values (function and variable), type, home package, property list
Bike has quit [Quit: leaving]
<Nilby>
no strings only symbols
Bike has joined #commonlisp
<beach>
Nah, you can put all but the name and the package in the environment.
<beach>
... as we do in SICL.
<phoe>
even then, I assume you could stuff all standard CL symbols into ROM; the only "property" that can change about them is symbol-plist, right?
<jackdaniel>
yes, and still the fattest part is the name
<phoe>
also ROMable in case of CL and many keywords
random-nick has quit [Ping timeout: 268 seconds]
attila_lendvai has quit [Remote host closed the connection]
pfd has quit [Quit: Client closed]
<jackdaniel>
either way even if I fail, some improvements are already made in a process, most notably delimited continuations are back (not pushed yet)
<Bike>
oh, that's cool. in ecl generally?
<jackdaniel>
yes
varjag has quit [Quit: ERC (IRC client for Emacs 27.1)]
<Bike>
what's the interface look like?
<jackdaniel>
I've defined it the same as it used to be in ecl before green threads were removed (see commit 0312839e1 for documentation)
<jackdaniel>
some things may still change of course
<jackdaniel>
(make-continuation <thread>) and (resume <continuation>)
<Bike>
you can only use the continuation once?
<jackdaniel>
yes
<Bike>
i don't understand how you could do like shift/reduce with this. having external continuations is cool, though
attila_lendvai has joined #commonlisp
<jackdaniel>
shift/reset ?
attila_lendvai has quit [Remote host closed the connection]
<jackdaniel>
I'll see how these examples may be implemented with what ecl has now before making a pull request; that will surely make a good program for examples/
chrcav has quit [Quit: Lost terminal]
chrcav has joined #commonlisp
Fare has joined #commonlisp
morganw has joined #commonlisp
thuna` has joined #commonlisp
waleee has joined #commonlisp
Inline has joined #commonlisp
aartaka has joined #commonlisp
son0p has quit [Ping timeout: 256 seconds]
MajorBiscuit has joined #commonlisp
jeosol has quit [Quit: Client closed]
Cymew has quit [Ping timeout: 256 seconds]
nij- has joined #commonlisp
rangahy has quit [Ping timeout: 256 seconds]
<nij->
With CFFI, can I execute any C code on the fly? Something like (cffi:execute "int fn () { \n return 0;\n }")?
<nij->
Or I must use that code to produce a shared library separately, and load it with CFFI?
<phoe>
Nilby: the latter
<phoe>
if anything, use ECL, it has an option for inline C code
<Bike>
cffi would need to be or include a c compiler to do that, nij-
attila_lendvai has quit [Read error: Connection reset by peer]
<nij->
Is there a C interpreter?
attila_lendvai_ has quit [Remote host closed the connection]
<Bike>
there are c interpreters, but not in cffi
attila_lendvai_ has joined #commonlisp
<Bike>
cffi is for calling c code, not writing c code.
attila_lendvai_ has quit [Remote host closed the connection]
<nij->
Got it. But I can always write a wrapper in C that writes the C code, compiled to SO, and load.
<nij->
Thanks!
<nij->
I've heard though that C oughts to be compiled, and no interprettor can really do what the compile does semantically.
MajorBiscuit has joined #commonlisp
<Bike>
nah, there are c interpreters. and actually, in modern C++ (which isn't C, but eh) constexpr probably means a compiler has to have some kind of interpreter in it as well.
<nij->
Are they semantically the same?
<nij->
Oh, I even recall that emacs have both (compiler and interpreter), and it's hard to converge their semantics.
<Bike>
eh, CL does it
<beach>
There is a long-ish Lisp tradition that the interpreter uses dynamic variable bindings and the compiler uses lexical variable bindings, but that tradition was abandoned (luckily) in Common Lisp.
<beach>
Maybe that's what Emacs Lisp does.
<nij->
beach in CL both use lexical?
<beach>
Yes.
<Bike>
there are differences between compiling and evaluating, but they're pretty minor and mostly relate to redefinitions.
<nij->
Nice.
<nij->
If C even has a JIT compiler, then we don't need to worry about possible divergence in semantics.
<phoe>
and one edge case wrt load-time-value
<beach>
I also recall that Franz Lisp (not Allegro) went to a lot of trouble to make the compiler respect dynamic variable bindings for many things.
markb1 has joined #commonlisp
karlosz has joined #commonlisp
cage has joined #commonlisp
cosimone` has joined #commonlisp
cosimone has quit [Ping timeout: 252 seconds]
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
cosimone` has quit [Ping timeout: 246 seconds]
szkl has joined #commonlisp
Oladon has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
son0p has joined #commonlisp
junkrunner has joined #commonlisp
<White_Flame>
nij-: I think it would actually be harder to write a JIT compiler for C than other languages. It would be harder to infer what runtime heuristic info you need to collect to get any benefit
Fare has quit [Ping timeout: 252 seconds]
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
notzmv has joined #commonlisp
<nij->
You mean it's harder to optimize a JIT compiler for C?
morganw has quit [Remote host closed the connection]
<luis>
Someone at ELS did some work on method inlining, or some sort of class sealing and I can't recall who. Does anybody have any idea what I'm talking about?
<Bike>
Is there any way to wrap quicklisp dependency resolution around a dynamic extent? So that e.g. (with-quicklisp (asdf:load-system :foo)) will try getting the system from quicklisp if it's not available. I think quicklisp internally establishes a handler on asdf:missing-dependency
Bung has joined #commonlisp
anticomputer has quit [Remote host closed the connection]
anticomputer has joined #commonlisp
<_death>
so.. what would be the problem of writing such an operator?
<Bike>
the way quicklisp does it internally involves asdf internals and some kind of table to avoid loops
rgherdt_ has joined #commonlisp
rgherdt has quit [Ping timeout: 255 seconds]
<_death>
by "asdf internals" do you mean the readers for the condition?
<_death>
I would think these ought be exported (and get better names)
<yitzi>
I think clpm does that?
<yitzi>
You can wire it into load-system or require
<yitzi>
Bike: ^
<Bike>
_death: i agree. i just don't want to do this myself if it exists already, mainly
<Bike>
I can check out clpm
rainthree3 has joined #commonlisp
rainthree has quit [Read error: Connection reset by peer]
qhong has quit [Ping timeout: 246 seconds]
qhong has joined #commonlisp
varjag has joined #commonlisp
qhong has quit [Ping timeout: 260 seconds]
<pjb>
Bike: (defmacro with-quicklisp (load-form) `(ql:quickload ,@(rest load-form))) (with-quicklisp (asdf:load-system :foo)) #| ERROR: System "foo" not found |#
rainthree3 has quit [Quit: see you later]
qhong has joined #commonlisp
ym has joined #commonlisp
causal has joined #commonlisp
junkrunner has joined #commonlisp
aartaka has quit [Ping timeout: 260 seconds]
aartaka has joined #commonlisp
Fare has quit [Ping timeout: 260 seconds]
Brucio-61 has quit [Ping timeout: 260 seconds]
scymtym has quit [Ping timeout: 252 seconds]
lisp123 has joined #commonlisp
waleee has joined #commonlisp
frgo has joined #commonlisp
shka has quit [Ping timeout: 248 seconds]
rgherdt_ has quit [Remote host closed the connection]
contrapunctus has joined #commonlisp
lisp123 has quit [Read error: Connection reset by peer]
Brucio-61 has joined #commonlisp
cage has quit [Quit: rcirc on GNU Emacs 27.1]
Bung has quit [Remote host closed the connection]
Fare has joined #commonlisp
aartaka has quit [Ping timeout: 255 seconds]
seok has joined #commonlisp
<seok>
is there a resource for clojure from the perspective of a common lisp programmer? or a reference to the differences
<seok>
Looking to use some java api's
<contrapunctus>
seok: is ABCL not an option?
<seok>
hadn't thought about that, indeed that could be better
frgo has quit []
sedzcat has quit [Quit: sedzcat]
euandreh has quit [Quit: euandreh]
euandreh has joined #commonlisp
euandreh has quit [Remote host closed the connection]
euandreh has joined #commonlisp
euandreh has quit [Ping timeout: 260 seconds]
varjag has quit [Read error: Connection reset by peer]
varjag has joined #commonlisp
varjag has quit [Client Quit]
dra has joined #commonlisp
seok has quit [Quit: Leaving]
euandreh has joined #commonlisp
Fare has quit [Read error: Connection reset by peer]
<nij->
I'm doing a long computation with many intermediate result. At the end, I need to analyze that result. However, the intermediate results are too large, and sometimes it fill the heaps. I wonder if there are some data structure that is persistant and doesn't use memory at all (hopefully, it feels like using a hash table)?
<phoe>
a data structure that uses no memory at all
<phoe>
oh boy
<nij->
? what's wrong? I don't mind the poset-analysis being slow, so I think it's fine if it's backended by files on disks.
<Nilby>
nij-: stream to a file
jeosol has joined #commonlisp
<nij->
Yeah, i'm really looking for an existing CL system that does that for me (with nice abstraction, so I feel like I'm using a hash table).
rangahy has quit [Ping timeout: 260 seconds]
<Nilby>
maybe a simple key store like zcdb
Fare has quit [Ping timeout: 260 seconds]
<nij->
Hmmm "cdb can handle any database up to 4 gigabytes."
<nij->
This is less than the 8GB I allow my lisp to have. :-(
<_death>
my old leveldb bindings may do the job
<nij->
_death: could you briefly describe what it does?
<_death>
back then I used it for some bitcoin index dbs, which took a few gigs
<nij->
> LevelDB is not an SQL database. Like other NoSQL and dbm stores, it does not have a relational data model and it does not support SQL queries.
<nij->
How does its query lang look like, then @@?
<_death>
like a hash table, basically.. (leveldb:puts db "Hello" "World") (leveldb:gets db "Hello") => "World"
<nij->
How well does it handle higher dimensional database?
<nij->
(By that I mean the keys will be lists..)
<_death>
it doesn't do that out of the box.. you will need to encode them into octets or strings
brettgilio has quit [Ping timeout: 268 seconds]
<nij->
How about.. if my keys are plists (:x _ :y _ :z _)
<nij->
and say I want to get all values of keys with :y = 2 and :z = 1?
<_death>
again, you'll need to do that yourself or use another system.. leveldb is rather low level
<nij->
Got it. Thank you, _death.
<_death>
maybe fact-base or something.. I don't remember if it stores everything in memory or not, though