Copenhagen_Bram has quit [Read error: Connection reset by peer]
Roy_Fokker has quit [Read error: Connection reset by peer]
Copenhagen_Bram has joined #lisp
Bike has quit [Quit: Lost terminal]
kamog has joined #lisp
Balooga_ has joined #lisp
aindilis has quit [Read error: Connection reset by peer]
aindilis has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
elfmacs has joined #lisp
frgo has quit [Ping timeout: 244 seconds]
holycow has joined #lisp
astronavt has joined #lisp
pjb has joined #lisp
anewuser has quit [Quit: anewuser]
<no-defun-allowed>
bored, writing a http server
<p_l>
beach: Common LISP: The reference was published
<p_l>
I had it in my hands, even
<beach>
p_l: What I meant was that it was perhaps never put up on the Internet as PDF.
<p_l>
ahh
<p_l>
yeah
<p_l>
interestingly enough, it looks like Google doesn't have an example of its cover
<p_l>
at least the version I had in my hands
<no-defun-allowed>
i wonder if lparallel has good latency
sunset_NOVA has joined #lisp
mkolenda has quit [Remote host closed the connection]
mkolenda has joined #lisp
razzy has quit [Ping timeout: 268 seconds]
ryan_vw has joined #lisp
frgo has joined #lisp
shifty has quit [Ping timeout: 272 seconds]
<no-defun-allowed>
2383requests/second
<no-defun-allowed>
not too bad tbh
pjb has quit [Ping timeout: 252 seconds]
frgo has quit [Ping timeout: 252 seconds]
razzy has joined #lisp
shka_ has quit [Ping timeout: 246 seconds]
frgo has joined #lisp
frodef has joined #lisp
vlatkoB has joined #lisp
Balooga_ has quit [Quit: Balooga_]
<no-defun-allowed>
ab and wrk can't agree on if my server is creating "read errors"
<no-defun-allowed>
now ab is convinced i'm doing 24,000 requests/second and wrk only thinks i'm doing about 1000
Balooga_ has joined #lisp
linack has quit [Quit: Leaving]
sunset_NOVA has quit [Quit: Leaving]
orivej has joined #lisp
scymtym has quit [Ping timeout: 268 seconds]
JohnMS_WORK has joined #lisp
bacterio has joined #lisp
bacterio has left #lisp [#lisp]
shka_ has joined #lisp
flamebeard has joined #lisp
holycow has quit [Quit: Lost terminal]
Oladon has quit [Quit: Leaving.]
daniel-s has quit [Read error: Connection reset by peer]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mingus has joined #lisp
orivej has quit [Ping timeout: 252 seconds]
<splittist>
Good morning
<no-defun-allowed>
morning splittist
rozenglass has quit [Remote host closed the connection]
dented42 has joined #lisp
<beach>
Hello splittist. Long time no see.
<beach>
splittist: Did you notice the creation of the channel #sicl, where I can blab as much as I want about what I am doing?
<splittist>
I'm usually lurking. I did not. I will join and lurk there, too (:
<beach>
Great!
<beach>
I have no news right now, but I am working pretty hard on bootstrapping at the moment.
<beach>
Though, I also have to finish my report on Jim Newton's thesis.
<splittist>
sicl (and the general beachverse of projects) is one of my favourite contemporary examples of people (not you) overestimating what can be done in a year, but underestimating what can be done in 5/10 years.
<beach>
Interesting observation.
<beach>
Yeah, I never said I would finish in 10 years. :)
<beach>
Instead, I planned it so that intermediate results are independently useful.
<shka_>
'beachverse'
<shka_>
i literally loled at this
<no-defun-allowed>
using sbcl internals to turn off nagles algorithm takes the speed from 24,000 to 31,800 requests a second.
<zigpaw>
the "character not found" (empty box) glyph on the last line was intentional?
<jackdaniel>
yes
<shka_>
jackdaniel: looks cool
<zigpaw>
looks cool :)
Balooga_ has quit [Quit: Balooga_]
<no-defun-allowed>
actually, nagles doesn't really slow it down
<jackdaniel>
I still need to get the whole bounding box right, but I need other codebases to attend to now
<no-defun-allowed>
sbcl decided to go 8000 reqs/second faster cause it could
<shka_>
this should be really useful
<no-defun-allowed>
ab and wrk still aren't agreeing, wrk says woo is two magnitudes faster than my http server but ab says they're about the same
<galdor>
isn't ab the one which isn't that good at parallelizing connections ?
<galdor>
wrk is much more efficient iirc
<galdor>
in your case you would be limited by ab, not by the server
<no-defun-allowed>
that's a shame
robotoad has quit [Quit: robotoad]
<no-defun-allowed>
):
<no-defun-allowed>
wrk goes slower than ab too
astronavt_ has joined #lisp
<galdor>
in any case, most of these benchmarks actually measure the kernel
astronavt has quit [Disconnected by services]
astronavt_ is now known as astronavt
<galdor>
unless you manage to test with access patterns and data related to your real workload, it's not really significant
<no-defun-allowed>
i'm fairly confident this lparallel-based solution is pretty fast but i can't tell
<shka_>
lparallel based solution to what?
<no-defun-allowed>
multithreaded http server
<shka_>
eeee, that does not sound like a great idea
domovod has joined #lisp
<galdor>
you can use a thread pool to process requests
<galdor>
as long as you are not using one thread per request, you're fine
shifty has joined #lisp
<no-defun-allowed>
yeah, that's where i'm getting the thread pool from
<shka_>
using one thread per request is not always wrong
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
ryan_vw has quit [Ping timeout: 252 seconds]
<no-defun-allowed>
i tried different thread counts and cpu count seemed to work best
<shka_>
no-defun-allowed: in lparallel? Yes.
<shka_>
anyway, don't dismiss one thread per request so easy
<shka_>
sometimes it is perfectly sufficient approach
<no-defun-allowed>
this worked fine here
<no-defun-allowed>
i've done one thread per request before
frgo has quit [Ping timeout: 252 seconds]
pjb has joined #lisp
prrs has quit [Ping timeout: 268 seconds]
varjag has joined #lisp
<russellw>
What are the situations where a dot can occur in lisp source code, apart from 'loop for (a . more) on s'? It's not used for rest parameters of functions the way it is in scheme, right?
angavrilov has joined #lisp
<no-defun-allowed>
you can use it in destructuring-bind, and it's also used a lot in alists
<phoe>
russellw: anywhere
<no-defun-allowed>
eg (loop for (key . value) in '((a . 42) (b . 3)))
<phoe>
'(a . b) denotes a quoted cons
<phoe>
these are very common when you create alists
fiddlerwoaroof has quit [Ping timeout: 260 seconds]
asymptotically has quit [Quit: Leaving]
fiddlerwoaroof has joined #lisp
ym has joined #lisp
FreeBirdLjj has joined #lisp
anewuser has joined #lisp
pjb has joined #lisp
fiddlerwoaroof has quit [Ping timeout: 260 seconds]
lavaflow has quit [Read error: No route to host]
<hjudt>
phoe: didn't know about spacemacs, but then i like following the standard emacs way because that's what my distribution provides... i also think about that way about sly, but quicklisp now provides it too so in that case it is fine and i like the features stickers and repl backreferences.
lavaflow has joined #lisp
<shka_>
so btw
<shka_>
why sly?
<shka_>
is it any better then slime?
<jackdaniel>
I think that tasks like codegolf are superficial - there is quite a lot occasions when programmer is in need for small one-time utility during normal course of coding, that's a perfect occasion to make something and be proud of it
<hjudt>
shka_: it is like slime but has some additional nifty features (i also like the fuzzy search btw) and spares you some config lines. but that's probably it. might also be a matter of taste, but some things just seem to be easier to handle to me.
<hjudt>
i've only started using it a week ago and never was a very experienced slime user though.
<hjudt>
the only thing you have to set up in contrast to slime is a keymap for the selector which comes out-of-the-box with slime. that hasn't been very difficult to achieve though.
<hjudt>
it also has good documentation which helped me a lot, though slime isn't bad in that regard too
FreeBirdLjj has quit [Remote host closed the connection]
<hjudt>
the great thing was that you can also try it without removing slime. so it's easy to switch back and forth.
* hjudt
now feels like an advocate but is still not sure what to use
<shka_>
hjudt: well, i should give it a try i guess!
<shka_>
well, if it is in the spacemacs, setup should be trivial
<hjudt>
would be glad if you share your experience with it since you're probably a more experienced slime user than me
elfmacs has quit [Ping timeout: 272 seconds]
FreeBirdLjj has joined #lisp
<shka_>
hjudt: animated gifs look cool up to this point ;-)
<hjudt>
yes, and there is also a tutorial or walkthrough that works and is perhaps more easier to follow (at least if you aren't a 144hz-accustomed hardcore gamer).
FreeBirdLjj has quit [Ping timeout: 250 seconds]
<hjudt>
(which means i have been too slow to follow these in detail)
<hjudt>
but i found those pretty cool too
dyelar has joined #lisp
gector has quit [Read error: Connection reset by peer]
gector has joined #lisp
kajo has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
jmarciano has quit [Ping timeout: 268 seconds]
razzy has quit [Ping timeout: 252 seconds]
shka_ has quit [Quit: WeeChat 1.9.1]
knicklux has joined #lisp
<russellw>
How do you programmatically generate '(1 2 3 . 4)? cons wants just two parameters, and append and list* both correctly complain that the last element is not a list
<Bike>
(list* 1 2 3 4)?
<beach>
APPEND should not complain.
<Bike>
(append '(1 2 3) 4) also works
<beach>
Nor should LIST*.
gector has quit [Ping timeout: 245 seconds]
<russellw>
ah, you're right, I was actually calling them wrong. thanks!
<Bike>
no problem
gector has joined #lisp
Roy_Fokker has joined #lisp
Oladon has joined #lisp
FreeBirdLjj has joined #lisp
flamebeard has quit []
<russellw>
What's the best way to test if a value is an improper list?
<beach>
I am sure there is something in Alexandria.
<beach>
But there is a little trick you can use if you don't want to use an external library.
<russellw>
list-length: Returns the length of list if list is a proper list. Returns nil if list is a circular list. ... It doesn't say what the result is for a dotted list?
<beach>
Should signal an error of type type-error if list is not a proper list or a circular list.
<russellw>
I forgot about circular lists. To clarify: what I actually need to test for is a dotted list. - ah! okay, thanks
<beach>
So you wrap it in ignore-errors.
sjl has joined #lisp
<beach>
russellw: Are you saying you don't need to take circular lists into account?
<on_ion>
alexandria has fallen long agop
<beach>
Then it is easy.
<russellw>
I'll probably write my own function, so that will probably involve (and (consp a) (not (consp (cdr a))))?
razzy has joined #lisp
<russellw>
right, don't need to take circular lists into account
<beach>
russellw: (null (cdr (last list)))
<russellw>
thanks!
<beach>
russellw: rather (not (null (cdr (last list))))
<beach>
returns true if the list is dotted.
kuwze has joined #lisp
<Shinmera>
(loop for (_ . r) on list while r never (not (consp r)))
<Shinmera>
I think the bug was in relation to destructuring-bind accepting the same, then
<|3b|>
yeah, that sounds familiar
zfree has quit [Quit: zfree]
nowhereman_ has quit [Ping timeout: 260 seconds]
SenasOzys has quit [Ping timeout: 246 seconds]
shka_ has joined #lisp
<shka_>
good evening
nixfreak has joined #lisp
<nixfreak>
Does anyone use lisp to create bash 1liners like to find something or parse something out, trying to see if its better to use lisp than bash on linux ?
linack has joined #lisp
<|3b|>
CL tends to be a bit verbose for things that you would usually do in bash, but i think some people have utility libs for making shell-like things more convenient
<|3b|>
though also depends on whether you already have the data in memory in a running lisp image
<Shinmera>
As soon as you need to use arrays in bash it gets terrible enough so quick that pretty much anything else would be better.
<|3b|>
yeah, i guess it depends on where you cutoff is for "something reasonable to do in bash"
<|3b|>
the further you are pushing bash, the more competitive CL is
<on_ion>
nixfreak: i would look at emacs' eshell and elisp. it allows mixing lisp (without parens usually) and bash.
<on_ion>
(bash=i mean shell commands)
<on_ion>
and you can pipe with emacs buffers and other nice things
<|3b|>
also CL's spec for file naming and operations doesn't make it very nice for general processing of files at the name/directory level
knicklux has quit [Ping timeout: 245 seconds]
<nixfreak>
I was thinking it could be used to create little scripts to mimic unix tools
<|3b|>
i think there are a few libs for that sort of thing, but i haven't used any of them
knicklux has joined #lisp
<shka_>
nixfreak: i wrote find-like utility in lisp
<shka_>
it takes more lines to get done simple things
<nixfreak>
do you have a repo I can see the code shka ?
<shka_>
but is is so much easier for more complicated stuff
orivej has quit [Ping timeout: 252 seconds]
<shka_>
nixfreak: it is not exactly self contained
<nixfreak>
ahh ok , so for 1liners stick to bash and more complicated programs use lisp
<shka_>
so this one simply reads file line by line
<shka_>
i like it because (again) it works with other stuff i have
<shka_>
and i quite often deal with large files that store data in each line
knicklux has joined #lisp
<shka_>
this does not require reading everything to memory at once, works with my aggregation functions, can be chained into multithreaded processing and so one
<shka_>
it is sort of like apache spark streams in this regard
<shka_>
anyway, that's just my impression
<nixfreak>
ok thanks again
asymptotically has joined #lisp
<shka_>
nixfreak: anyway, i really prefer to write in lisp so if there is simply no tool that cuts it for me it is natural choice
<shka_>
i think you may be the same
makomo has quit [Ping timeout: 246 seconds]
<nixfreak>
shka I'm still a big noob in CL but I'm going to focus my attention to it instead of other languages
<jasom>
the thing I like about the random version is that it is only probabalistically defined to terminate from the standard, but most (all?) real-world implementations it is guaranteed to terminate.
mfiano has joined #lisp
<Bike>
huh? how would it not terminate?
<Bike>
i guess the standard doesn't guarantee that the distribution doesn't suck
<jasom>
Bike: if a non-cyclic rng is used, then the probability approaches 1 of it terminating over time, but never reaches it. Real prngs tend to be cyclic though, so there is bounded time for it to terminate (even if it's absurdly large).
<Bike>
oh it does say it should be "approximately" uniform, huh
astronavt_ has joined #lisp
<Bike>
what the heck is a non cyclic rng
<Bike>
there are only finitely many return values
astronavt has quit [Read error: Connection reset by peer]
<jasom>
Bike: It's conjectured that pi is non-cyclic, right?
<Shinmera>
computer words are finite tho.
<Bike>
"A cyclic number is an integer in which cyclic permutations of the digits are successive multiples of the number." uh
<jasom>
rational expansions of pi that is.
<adlai>
someone could plausibly set it up to read from a nondeterministic hardware device
<Bike>
i guess it's not proven that pi is normal
<Bike>
but i don't understand why it matters
<Bike>
most-positive-fixnum is finite, and since it's an integer the distribution is discrete
<jasom>
Bike: consider flipping a fair coin. Let's say I flip the coin until I get 5 heads in a row. That is not guaranteed to terminate, though it is very likely to for any large number of iterations.
nixfreak has quit [Ping timeout: 256 seconds]
<Bike>
oh. yeah. ok
<Bike>
i'm being stupid.
<Bike>
taking limits too soon
<jasom>
similarly an implementation with less than (integer-length most-positive-fixnum) state in its prng might never terminate on that.
<jasom>
and it's guaranteed that there are some values it will never return from (random most-positive-fixnum) if there are that few bits of state in the prng.
<aeth>
(true-statement-p "This sentence is false.") => ?
<Shinmera>
jasom: Though the spec does say: If limit is an integer, each of the possible results occurs with (approximate) probability 1/limit.
<Shinmera>
So arguably it does not allow holes.
<jasom>
Shinmera: 0 is approximately 1/limit if limit is very large
<Shinmera>
I'd read that as "explicitly not zero"
<jasom>
Shinmera: no finite state prng can do this when you consider bignums, unless you think the spec implies the state must be larger than the largest allowed bignum.
<jasom>
Shinmera: if it required each possible result to occure with identical probability, then it would explicitly not allow holes.
<jasom>
but "approximately" implies that holes are allowed to me.
<Shinmera>
to me it implies that the prng can be imperfect (which it will be+
<Shinmera>
but not that it can have holes.
<jasom>
Shinmera: there are lots of imperfect prng with 100% even distribution of values (a simple LCG does this, for example).
<Shinmera>
Aight
Bike has quit [Ping timeout: 256 seconds]
robotoad has joined #lisp
<adlai>
phoe: /buffer 29
<adlai>
oops.
m3tti has quit [Ping timeout: 252 seconds]
<Ober>
irc is hard
<phoe>
adlai: I don't even have 29 buffers
<adlai>
re: "most interesting way to get the value NIL" ... how about "as return value of #'type-of"
<pjb>
(length (buffer-list)) -> 39 ; not even trying.
jack_rabbit has joined #lisp
kushal has quit [Remote host closed the connection]
<jasom>
adlai: is that possible?
<adlai>
it should not be, which is what would make it so interesting