freenode/#lisp - IRC Chatlog
Search
15:41:58
jackdaniel
because there is quite a few unusual implementation choices (and hacks), plus undocumented dependencies
15:42:51
jackdaniel
sometimes you encounter a memory leak that can't be easily fixed, because the function only pushed to closed over variable
15:47:20
_death
I use dexador and hunchentoot as well.. unfortunately dexador picked drakma's nasty habit of returning the response as a bunch of values instead of a response object
15:49:01
easye
_death: eh, I find that the styles of multiple values isn't bad. At least dexdor tries to return a reference to text as the first value. I still have to use FLEXI-STREAMS:MUMBLE-AS-OCTETS with drakma
15:49:09
theothornhill
jackdaniel: yason is the one I've used until now, I actually found that to be the simplest. Only because it just gave me a hash-table of the thing, avoing the whole mop business for simple queries
15:49:57
easye
ACTION has been working with jsown. I have the start of a JSONpath library with jsown
15:50:09
jackdaniel
by being hard to use I mean that I've found it tricky to extend it to accept my own objects for serialization
15:51:55
_death
easye: well, I guess our usage differs.. the big reason why it's an annoyance is that I need to reach for the definition/docstring whenever I use it.. I always have lots of :force-binary t anyway
15:54:09
_death
I could write a wrapper and be done with it.. trouble is I use it in many projects and don't want them to depend on yet another one just for this
15:56:21
easye
_death: thinking of the values for an HTTP request: it is probably worth it two create two facades, one for text oriented navigation, and one for binary requests, that call the underlying request method with appropiate defaults.
15:58:33
etimmons
Dexador has the benefit of tying into windows libraries to handle https. I've never gotten openssl through drakma to really work for me on windows.
16:00:26
jackdaniel
I had one biggish problem in hunchentoot -- when you serve a file, you first need to load it into memory
16:01:00
theothornhill
jackdaniel: cl-json seemed pretty simple with class, though: (cl-json:encode-json (make-instance 'x :name "something"))
16:01:24
_death
jackdaniel: ouch.. though I have it behind nginx and user the latter to serve most static files
16:03:22
jackdaniel
or 403, that was a long time ago, and I wasn't the main implementer of that part
16:04:27
jackdaniel
we've solved that with an obscure hack by creating a temporary symlink and letting (indeed) nginx to handle the request - the link was sent to the requestor and they were able to download the file
16:05:05
_death
jackdaniel: I think hunchentoot also lets you get a hold of the stream so you can diy.. and then, it can also be patched ;)
16:05:37
jackdaniel
I'm not saying that it disqualifies hunchentoot, still it is a problematic limitation
16:48:16
citizenajb
I have a type question. I think the result type of (* 3.0 x) where we know nothing about x (type t) is (or float (complex float))? sbcl does not seem to derive this, which to me means I might be wrong! See https://pastebin.com/MDm6fsrX for a case where it matters to me.
16:51:37
aeth
afaik, every number would become a (complex long-float) over time if you just kept doing generic arithmetic on randomly-typed things (in SBCL, though, a long-float is a double-float)
16:53:44
aeth
The 3.0 assuming 3.0f0 means it has to be (or single-float double-float long-float (complex single-float) (complex double-float) (complex long-float)) and in SBCL long-float is double-float
16:54:36
aeth
Technically, a compiler might choose that over (or float (complex float)) if it has a short-float, since it won't be a short-float.
16:55:26
aeth
It always goes to the most precise float: http://www.lispworks.com/documentation/HyperSpec/Body/12_add.htm
16:57:09
pfdietz
I'll look at it. Is datafly recommended? It's Fukamachi, which might be a negative.
16:58:01
aeth
(to be very clear because someone is going to poke me in 15 hours about it... all CL compilers have short-float. What I meant by "if it has a short-float" is "if it has a distinct short-float")
17:01:34
pfdietz
(reads about manardb) This is a persistent object store; I was thinking more of a relational db.
17:02:07
aeth
citizenajb: and to really go into detail, SBCL supports rational as a *read-default-float-format* so without context (* 3.0 x) might result in a rational, but that would be resolved at read time, ahead of compiling it. I always do "3.0f0" when I mean single-float because sometimes I have it set to double-float when I'm using the REPL as a calculator.
17:51:36
pfdietz
Really any system in quicklisp. Every one of them should use packages in some way. Pick a small one, then work up.
17:52:24
phoe
Wezl: have you read the PCL chapter about packages and/or http://www.flownet.com/gat/packages.pdf ?
17:58:41
phoe
get yourself a C environment and a conforming Lisp implementation, like an earlier build of SBCL
17:59:08
remby
I'm trying to think about how compilers integrate well with unixy like systems, it's a complex task, but when I think about it, not a lot
17:59:43
remby
just in general, I've been keeping that in mind now that I'm trying to pick a lisp implementation
18:01:53
remby
no, but an example would be how to get the compiler up and running on another operating system
18:47:22
jasom
remby: the interface of a compiler and an OS is very narrow. The interface of the runtime and the OS is very broad though.
18:48:04
jasom
Any self-hosting compiler will tend to require (a subset of) the runtime to run the compiler though.
20:08:02
didi
So Costanza is writing Go: <https://p-cos.blogspot.com/2021/01/the-slick-programming-language.html>
22:01:53
stylewarning
I hereby vow to never write a blog post stating I’ve switched to a Lisp façade for an employer, and I hereby vow to never pull a Norvig and write 5 line Python scripts making claims it’s comparable to Lisp because I’ve lost the big picture of big software.
22:02:13
stylewarning
(What I can’t guarantee is that I’ll ever write a book as cool as Norvig’s hit)
22:10:39
stylewarning
Just as a sort of joke. Lots of career Lispers eventually fold and write something about their acceptance of some other state of affairs (which is of course fine).
22:23:51
aeth
"y = m x + b" or "a x + b y + c = 0" or "y = y1 + m (x - x1)" or something else? So many different line equations.
22:28:17
jeosol
aeth: lol, not what I meant but I get your point. Holding the line like in lisp line of defence
22:40:52
zulu-inuoe
Hey all - Is there a way to make a two-way string stream, so that I can (write-line "foo" stream) and then (read-line stream) and get back "foo" ?
22:53:55
stylewarning
zulu-inuoe: and you want to be able to extract the complete string at any time?
22:55:06
stylewarning
zulu-inuoe: http://www.lispworks.com/documentation/HyperSpec/Body/f_mk_two.htm#make-two-way-stream
23:06:31
zulu-inuoe
stylewarning: I don't want/need the full string. I basically want a stream that never EOF's (until closed or something) that I can keep writing to
23:08:21
zulu-inuoe
BTW I realized I could solve my problem by using `:stream` for `:input` on `sb-ext:run-program`, but that still had me curious if creating this sort of stream was possible in standard CL (easy with gray streams)
23:48:44
mfiano
zero-length PLNs are pointlessly valid it seems :) (:local-nicknames (#: #:alexandria))
0:08:23
Nilby
I make the same vow as stylewarning, but irrelevantly, since I've classic-lisp-cursed myself to live out my years in 90% oblivion, and I'll never write a book, blog, or be employed.
3:25:22
pfdietz
mfiano: the package with zero-length name is valid. Escape the package name with ||. So: ||::|| is the zero-length symbol in the zero-length package.
3:30:10
aeth
And this also seems to work as an alternative: (defpackage #: (:use #:cl) (:export #:))