troydm1 has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
fikka has joined #lisp
comborico1611 has quit [Quit: Konversation terminated!]
Kundry_Wag has joined #lisp
smurfrobot has joined #lisp
attila_lendvai has joined #lisp
smurfrob_ has joined #lisp
FreeBirdLjj has joined #lisp
smurfrobot has quit [Ping timeout: 252 seconds]
BitPuffin has quit [Remote host closed the connection]
troydm has joined #lisp
Kundry_Wag_ has joined #lisp
Kundry_W_ has joined #lisp
aindilis` has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
aindilis has quit [Ping timeout: 248 seconds]
FreeBirdLjj has joined #lisp
Kundry_W_ has quit [Remote host closed the connection]
Kundry_Wag_ has quit [Ping timeout: 252 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
fikka has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
smurfrob_ has quit [Remote host closed the connection]
smurfrobot has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
smurfrobot has quit [Ping timeout: 256 seconds]
FreeBirdLjj has joined #lisp
Tobbi has quit [Quit: Leaving]
smokeink has joined #lisp
willmichael has quit [Ping timeout: 245 seconds]
willmichael has joined #lisp
smurfrobot has joined #lisp
smasta has joined #lisp
Kundry_Wag has joined #lisp
learning has quit [Remote host closed the connection]
mareskeg has joined #lisp
smurfrobot has quit [Ping timeout: 252 seconds]
learning has joined #lisp
mareskeg has quit [Client Quit]
Kundry_Wag has quit [Ping timeout: 252 seconds]
smurfrobot has joined #lisp
pierpa has joined #lisp
fikka has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
learning has quit [Remote host closed the connection]
mareskeg has joined #lisp
damke_ has joined #lisp
FreeBirdLjj has quit [Ping timeout: 248 seconds]
smurfrobot has quit [Ping timeout: 252 seconds]
Rawriful has quit [Quit: WeeChat 1.4]
Kundry_Wag has joined #lisp
FreeBirdLjj has joined #lisp
jstypo has quit [Ping timeout: 245 seconds]
mareskeg has quit [Quit: mareskeg]
emaczen has quit [Read error: Connection reset by peer]
emaczen has joined #lisp
smasta has quit [Ping timeout: 245 seconds]
attila_lendvai has quit [Ping timeout: 245 seconds]
mareskeg has joined #lisp
smasta has joined #lisp
aindilis` has quit [Remote host closed the connection]
jason_m has joined #lisp
igemnace has joined #lisp
FreeBirdLjj has quit [Ping timeout: 248 seconds]
jonh has left #lisp ["WeeChat 0.4.2"]
Kundry_Wag_ has joined #lisp
EvW has quit [Ping timeout: 252 seconds]
mareskeg has quit [Client Quit]
mareskeg has joined #lisp
tessier_ has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
tessier has joined #lisp
kark has quit [Ping timeout: 256 seconds]
borei has joined #lisp
<borei>
hi all
<borei>
quick question
<borei>
i have several methods on top of generic function
<borei>
how to disassemble particular method ?
jstypo has joined #lisp
<Bike>
I guess (disassemble (mop:method-function (find-method ...)))
<Bike>
but i'd probably just throw the method body in a lambda and disassemble that.
kark has joined #lisp
<borei>
thanks Bike !
spacepluk has quit [Ping timeout: 268 seconds]
shifty has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Ping timeout: 256 seconds]
aindilis has joined #lisp
spacepluk has joined #lisp
FreeBirdLjj has joined #lisp
Mutex7 has quit [Remote host closed the connection]
Kundry_Wag_ has quit [Ping timeout: 252 seconds]
smasta has quit [Ping timeout: 240 seconds]
mareskeg has quit [Read error: Connection reset by peer]
mareskeg has joined #lisp
smasta has joined #lisp
Kundry_Wag has joined #lisp
learning has joined #lisp
mareskeg has quit [Client Quit]
FreeBirdLjj has quit [Ping timeout: 256 seconds]
wigust has joined #lisp
jason_m has quit [Ping timeout: 245 seconds]
quotation has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Kundry_Wag_ has joined #lisp
jkjjkjkjkjkj has left #lisp [#lisp]
Kundry_Wag has quit [Ping timeout: 245 seconds]
zmt00 has quit [Quit: Leaving]
zmt00 has joined #lisp
fikka has joined #lisp
d4ryus1 has joined #lisp
fisxoj has joined #lisp
asarch has joined #lisp
d4ryus has quit [Ping timeout: 256 seconds]
Kundry_Wag_ has quit [Ping timeout: 252 seconds]
Oladon has quit [Quit: Leaving.]
mareskeg has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag_ has joined #lisp
Oladon has joined #lisp
dieggsy has quit [Quit: ERC (IRC client for Emacs 27.0.50)]
SaganMan has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
smurfrobot has joined #lisp
parjanya has quit [Read error: Connection reset by peer]
smasta has quit [Ping timeout: 245 seconds]
damke has joined #lisp
ioa_ has joined #lisp
mrottenkolber has quit [Read error: Connection reset by peer]
ioa has quit [Read error: Connection reset by peer]
mrottenkolber has joined #lisp
smasta has joined #lisp
mrottenkolber is now known as Guest66484
damke_ has quit [Ping timeout: 264 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag_ has quit [Ping timeout: 252 seconds]
aindilis has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Ping timeout: 245 seconds]
shifty has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
rumbler31 has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
Kundry_Wag has joined #lisp
arescorpio has joined #lisp
fikka has joined #lisp
jstypo has quit [Ping timeout: 245 seconds]
energizer has joined #lisp
groovy2shoes has joined #lisp
parjanya has joined #lisp
parjanya has quit [Remote host closed the connection]
parjanya has joined #lisp
Kundry_Wag_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
makomo has quit [Ping timeout: 245 seconds]
fourroot has joined #lisp
python476 has quit [Ping timeout: 252 seconds]
<fourroot>
why is this 0.000002 + 0.000003 == 0.000005 not true when evaluated by a machine?
<Zhivago>
Floating point values represent intervals. They may not align as you expect.
nowhereman_ has joined #lisp
Kundry_Wag_ has quit [Ping timeout: 240 seconds]
<Zhivago>
Above, you are printing one edge of that interval at some precision and assuming that it corresponds with the identity of the inteval, which is not true.
pjb has quit [Ping timeout: 252 seconds]
nowhere_man has quit [Ping timeout: 252 seconds]
pjb has joined #lisp
<fourroot>
Thank you so much
Kundry_Wag has quit [Ping timeout: 245 seconds]
<Zhivago>
You are welcome.
fisxoj has quit [Quit: fisxoj]
asarch has quit [Quit: Leaving]
<pierpa>
try (decode-float 0.00002), (decode-float 0.00003), etc, then check references to understand what the results mean.
fikka has quit [Ping timeout: 245 seconds]
dddddd has quit [Remote host closed the connection]
dieggsy has joined #lisp
fikka has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
<beach>
Good morning everyone!
<pillton>
Good morning beach.
<beach>
fourroot: It is not that floating-point arithmetic is inexact. It isn't. At least not with IEEE floating point numbers. But, for a decimal fraction like the ones you give as examples, there is no exact binary floating point value for them, so you typically get the closest available one.
mareskeg has quit [Quit: mareskeg]
schoppenhauer has quit [Ping timeout: 256 seconds]
Kundry_Wag has joined #lisp
schoppenhauer has joined #lisp
Kundry_Wag_ has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
kark has quit [Ping timeout: 252 seconds]
Kundry_Wag has quit [Ping timeout: 252 seconds]
deng_cn has joined #lisp
smasta has quit [Ping timeout: 268 seconds]
igemnace has quit [Quit: WeeChat 2.0.1]
smasta has joined #lisp
kark has joined #lisp
figurehe4d has joined #lisp
Kundry_Wag has joined #lisp
Chream_ has quit [Read error: Connection reset by peer]
Chream_ has joined #lisp
Kundry_Wag_ has quit [Ping timeout: 240 seconds]
arescorpio has quit [Excess Flood]
quotation has quit [Quit: Connection closed for inactivity]
fikka has quit [Ping timeout: 252 seconds]
Kevslinger has quit [Quit: Connection closed for inactivity]
fikka has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
deng_cn has quit [Read error: Connection reset by peer]
deng_cn has joined #lisp
quazimodo has quit [Ping timeout: 240 seconds]
quazimodo has joined #lisp
igemnace has joined #lisp
damke_ has joined #lisp
safe has joined #lisp
damke has quit [Ping timeout: 264 seconds]
Chream_ has quit [Ping timeout: 245 seconds]
smasta has quit [Ping timeout: 240 seconds]
Digit has joined #lisp
smokeink has quit [Read error: Connection reset by peer]
sshirokov has joined #lisp
pierpa has quit [Quit: Page closed]
smokeink has joined #lisp
damke_ has quit [Read error: Connection reset by peer]
damke_ has joined #lisp
saki has quit [Remote host closed the connection]
<energizer>
How do I turn '(+ 1 2) into 4 ?
<stacksmith>
type in 4
<Bike>
what a question
<energizer>
ahahah
Bike has quit [Quit: Lost terminal]
<energizer>
How do i turn '(+ 2 2) into 4?
<stacksmith>
energizer: you don't
<energizer>
stacksmith: why not?
<stacksmith>
Your question makes no sense. '(+ 2 2) is a list. You could compile it, make a function, and run it - is that what you mean?
smasta has joined #lisp
<stacksmith>
If you want to evaluate it, try (eval '(+ 2 2)).
<energizer>
stacksmith: yeah i think eval is what i wanted
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
<Digit>
hi. (presumably) quick question, why does (- 9000 (* (round 9000 100) 99.99)) return 0.9003906, instead of just 0.9? ( same behaviour with s/round/floor|truncate|ceiling/ ) ~ poking around in ghci (which i'm similarly incompetent in), and i get the likes of "9000-8999.1" giving 0.8999999999996362. !? why's this madness not corrected? or is it correct, and i'm the one who's gone mad? srsly tho, there's a word for this, right? (to
<Digit>
help me past my search fails)
<energizer>
thanks
<stacksmith>
floats don't always have an exact representation, so you get the nearest one. It is not a Lisp issue.
<beach>
It is interesting that people discover this problem only when they start using Common Lisp, having used floating point numbers with other languages for many years, without knowing how they work. This is very scary to me, because who knows how many professional developers have made software that is relied upon, but that is buggy?
<Zhivago>
Hard to imagine, since the same problems exist pretty much everywhere else, also.
<beach>
Yes, that's what I mean.
<beach>
Most people never get to use Common Lisp, so they never discover the problem like this.
<Zhivago>
But these problems exist everywhere else, also.
<Zhivago>
So you'll discover them in C, python, java, etc.
<beach>
Other than in software development?
saki has joined #lisp
<beach>
My point is that people seem not to notice those problems with other languages, presumably because of the way those numbers are printed, with a limited precision.
<beach>
I see it over and over again.
<beach>
So, while, as I pointed out, the problems exists everywhere, it goes unnoticed even by professional developers using floating-point numbers in the software they write.
<beach>
smokeink: That's a good video acutally.
energizer has quit [Ping timeout: 240 seconds]
igemnace has quit [Remote host closed the connection]
<aeth>
Other languages tend to default to double-float instead of single-float. The issues with floating point are more obvious in single-float.
smurfrobot has quit [Remote host closed the connection]
<aeth>
(Combine that *with* rounding when printing, of course. The example still fails with double float, just more decimal points down.)
orivej has quit [Ping timeout: 252 seconds]
EvW has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
EvW has quit [Ping timeout: 252 seconds]
igemnace has joined #lisp
shka_ has joined #lisp
chiyosaki has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<parjanya>
is sbcl.org responsive at all?
saki has quit [Ping timeout: 240 seconds]
oleo has quit [Quit: Leaving]
<Digit>
Thankyou all, very helpful, got my ball rolling again. :)
smasta has quit [Ping timeout: 245 seconds]
learning has quit [Remote host closed the connection]
fikka has joined #lisp
smasta has joined #lisp
<fourroot>
why does index starts from zero
<Zhivago>
Zero is the additive identity.
fikka has quit [Ping timeout: 240 seconds]
<aeth>
If you think in terms of counting cells: | 1 | 2 | 3 | 4 | 5 | (first, second, third, etc.), but if you think in terms of *offsets* from the start: | 0 | 1 | 2 | 3 | 4 | (i.e. add 0 to get to the first one, add 1 to get to the second, etc.)
Kundry_Wag has joined #lisp
krwq has joined #lisp
<aeth>
Most languages choose to think in offsets
<Zhivago>
Now imagine that you're transforming from two dimensional to one dimensional coordinates.
<Zhivago>
If you're based on the additive identity, you can just say y * w + x.
<Zhivago>
If you're based on some crazy number like 1 ...
<aeth>
It raises an interesting point with how do you deal with empty ranges?
fourroot has quit [Read error: Connection reset by peer]
<shka_>
… like literally everyone else?
fourroot has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
damke_ has joined #lisp
<aeth>
To translate what I think the article is saying into CL terms, compare the 1-based (let ((end 10)) (loop for i from 1 to end collect i)) to the 0-based (let ((end 10)) (loop for i from 0 below end collect i)) and they seem fairly equivalent, but how do you get an empty one? You set end to 0. Going "from 0 below 0" seems more intuitive than going "from 1 to 0".
<aeth>
i.e. dealing with the range "start <= i < end" instead of "start <= i <= end" makes more sense when it's empty
chiyosaki has quit [Quit: chiyosaki]
<krwq>
does anyone know how do you define array of structs with cffi (argument to a function)
<krwq>
fixed size
<stylewarning>
beach: Submitted 2 1/2 papers!
energizer has joined #lisp
<stylewarning>
beach: The other 1/2 hopefully I'll be granted an additional evening to add to. :)
Kundry_Wag has quit [Ping timeout: 245 seconds]
<Zhivago>
Just describe the end of the range in terms of the start of the following partition -- e.g., 1~3 contains 1 and 2. Now 1~1 contains nothing.
igemnace has quit [Ping timeout: 252 seconds]
fourroot has quit [Read error: Connection reset by peer]
fourroot1 has joined #lisp
<beach>
stylewarning: Congratulations.
<beach>
stylewarning: It is probably still Sunday in some time zone.
<stylewarning>
Maybe. It's 11 PM here and I need to sleep soon. (:
damke has joined #lisp
mishoo has joined #lisp
smokeink has quit [Remote host closed the connection]
saki has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
Oladon has quit [Quit: Leaving.]
Mutex7 has joined #lisp
<phoe>
11 PM is still Sunday enough. (:
<krwq>
trying to define following c function with cffi: int utimens(const char *, const struct timespec tv[2]); - I've tried defining tv[2] as a struct with two fields but defcfun doesn't let me use (:struct mytype) as a type
fikka has quit [Ping timeout: 248 seconds]
<krwq>
I think C in this case is not using pointer since the size is known
<phoe>
krwq: I am not *too* sure but I remember this might be a CFFI limitation that doesn't let you address struct arrays directly but only indirectly via a pointer.
<phoe>
But then again, I have no concrete knowledge to back myself up with.
<krwq>
phoe: do you think splitting args in some way would be equivalent? what i mean that they end up on the stack either way - I'd rather avoid such hacks but on the other hand don't want to write C-wrapper for that
<phoe>
krwq: I'd avoid hacks completely when interacting with the C layer. But that's just my paranoia.
heurist`_ has quit [Read error: Connection reset by peer]
energizer has quit [Disconnected by services]
energizer has joined #lisp
fikka has joined #lisp
heurist`_ has joined #lisp
easye has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 276 seconds]
damke_ has quit [Ping timeout: 264 seconds]
smurfrobot has quit [Remote host closed the connection]
leedleLoo has joined #lisp
leedleLoo has left #lisp [#lisp]
leedleLoo has joined #lisp
minion has quit [Read error: No route to host]
specbot has quit [Read error: Connection reset by peer]
minion has joined #lisp
specbot has joined #lisp
damke_ has joined #lisp
<p_l>
krwq: pretty sure arrays are always passed by reference in C
<leedleLoo>
Hi, I was wondering how read-line is buffered. When the read-line function is called, is only one line read from the stream, or are potentially multiple lines read and stored (up to 4096 bytes, for example)?
smasta has quit [Ping timeout: 245 seconds]
fikka has joined #lisp
<krwq>
p_l: i see that now - I previously thought that when you have fixed size arrays they are treated as large struct (n*sizeof(struct)) but seems that's not the case
<jackdaniel>
leedleLoo: read-line always reads one line
<p_l>
krwq: given that arrays are the only place pointer arithmetic is allowed in C... ;-)
<jackdaniel>
leedleLoo: if you are interested in bigger reads, take a look at library alexandria
<jackdaniel>
and function alexandria:read-stream-content-into-string
<jackdaniel>
(and this function indeed has `buffer-size' argument)
Kundry_Wag has joined #lisp
<krwq>
is there any way to check if defgeneric has specialization given its arguments?
<leedleLoo>
jackdaniel: Thanks, that function is actually similar to what I was going to do: use read-sequence and then pass into read-line
fikka has quit [Ping timeout: 276 seconds]
<krwq>
or do you just handle specific condition
varjag has joined #lisp
<p_l>
krwq: I think MOP has something for that
<krwq>
p_l: will take a look, thanks
<leedleLoo>
krwq: To define an array of structs, I think you'll have to pass in a pointer and the number of elements in that pointer: int utimens(const char *c, const struct timespec *tv, int n)
<krwq>
leedleLoo: that's what I did already, I didn't realize that C was passing pointers for fixed-size arrays
greaser|q has quit [Changing host]
greaser|q has joined #lisp
schweers` has quit [Ping timeout: 265 seconds]
greaser|q is now known as GreaseMonkey
mlf has quit [Read error: Connection reset by peer]
schweers` has joined #lisp
orivej has joined #lisp
krwq has quit [Remote host closed the connection]
fikka has joined #lisp
figurehe4d has quit [Ping timeout: 245 seconds]
leedleLoo has left #lisp [#lisp]
<jackdaniel>
if you hadn't left I'd tell you, that usually you may pass array as a pointer and vice versa, but it is not conforming C code
<jackdaniel>
and breaks in least expected moments
Kundry_Wag_ has joined #lisp
Chream_ has joined #lisp
d4ryus1 is now known as d4ryus
scymtym has joined #lisp
Kundry_Wag has quit [Ping timeout: 276 seconds]
wigust has quit [Ping timeout: 252 seconds]
Cymew has joined #lisp
Kundry_Wag_ has quit [Ping timeout: 245 seconds]
hajovonta has joined #lisp
smasta has joined #lisp
damke_ has quit [Read error: Connection reset by peer]
damke_ has joined #lisp
figurehe4d has joined #lisp
xantoz has quit [Ping timeout: 240 seconds]
smurfrobot has joined #lisp
figurehe4d has quit [Remote host closed the connection]
figurehe4d has joined #lisp
xantoz has joined #lisp
<dim>
C is funny that way
hhdave has joined #lisp
<dim>
I think they call it “flexibility”, used to say it's a very good portability feature of the standard, all those non-conforming areas, and now they brag about optimisation opportunities
<dim>
well I'm back to having to write C so I shouldn't dismiss it that way I guess…
<Shinmera>
You can use something and discredit it at the same time
kini has quit [Quit: No Ping reply in 180 seconds.]
smasta has quit [Ping timeout: 248 seconds]
fiddlerwoaroof has quit [Ping timeout: 265 seconds]
<flip214>
dim: only if you use(d) something you can really discuss pro and contra. Else you're just repeating hear-say.
<dim>
then let me just say that C is not my favorite programming language ;-)
<rme>
Let me tell about this language called Pascal...
kini has joined #lisp
mishoo_ has joined #lisp
Chream_ has quit [Read error: Connection reset by peer]
Chream_ has joined #lisp
Chream_2 has joined #lisp
Chream_ has quit [Read error: Connection reset by peer]
<dim>
Turbo Pascal was pretty cool in the 90s, I don't think I realized that at the time
easye has joined #lisp
mishoo has quit [Ping timeout: 240 seconds]
<rme>
I was making a joke by alluding to an old paper Brian Kernighan wrote, titled "Why Pascal is not my favorite programming language".
Kundry_Wag has joined #lisp
<dim>
oh sorry, missed it :/
Chream_ has joined #lisp
Chream_2 has quit [Read error: Connection reset by peer]
Chream_2 has joined #lisp
Chream_ has quit [Read error: Connection reset by peer]
<dim>
and I picked the “not my favorite” phrase because I knew it was charged with some history, only I don't know nearly enough about it
Mutex7 has quit [Remote host closed the connection]
pillton has quit [Remote host closed the connection]
<rme>
obscure nerdy in-jokes are my specialty
_cosmonaut_ has joined #lisp
Chream_ has joined #lisp
Chream_2 has quit [Read error: Connection reset by peer]
Chream_ has quit [Read error: Connection reset by peer]
Chream_ has joined #lisp
<dim>
hehe
heisig has joined #lisp
_cosmonaut_ has quit [Quit: Leaving.]
_cosmonaut_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
saki has quit [Ping timeout: 256 seconds]
<hajovonta>
hi all
fiddlerwoaroof has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
milanj has quit [Quit: This computer has gone to sleep]
saki has joined #lisp
compro has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 240 seconds]
python476 has joined #lisp
Chream_2 has joined #lisp
Chream_ has quit [Read error: Connection reset by peer]
Chream_ has joined #lisp
Chream_2 has quit [Read error: Connection reset by peer]
angavrilov has quit [Remote host closed the connection]
m00natic has joined #lisp
Kundry_Wag has joined #lisp
fikka has joined #lisp
Kundry_Wag_ has joined #lisp
Kundry_W_ has joined #lisp
aindilis has joined #lisp
shifty has joined #lisp
Kundry_W_ has quit [Remote host closed the connection]
Kundry_W_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
Kundry_Wag_ has quit [Ping timeout: 240 seconds]
compro has joined #lisp
Kundry_W_ has quit [Remote host closed the connection]
shrdlu68 has joined #lisp
quazimodo has joined #lisp
Mandus_ has quit [Ping timeout: 240 seconds]
parjanya has quit [Ping timeout: 240 seconds]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
damke has joined #lisp
<borodust>
Xach: sorry for bothering: a couple of libraries are fail to build for a few days straight because the system i mentioned later in a comment is still not added. Are there any problems with this particular system (`cl-muth`)?
<pjb>
energizer: to turn '(+ 2 2) into 4, you would type: C-a C-M-k 4
<pjb>
there's no point in waiting run-time…
aindilis has quit [Read error: Connection reset by peer]
wigust has joined #lisp
<energizer>
pjb: hahaha
<energizer>
:)
<pjb>
jackdaniel: read-line doesn't always read a line: when it reaches end-of-file, it may read a partial-line (a line without a newline), or nothing, returning the eof-value.
<pjb>
or signaling an error.
<pjb>
Very few CL functions are specified to always return something! (In general, they can make non-local exits, in case of errors or otherwise).
<jackdaniel>
reads as in "performs read, which may fail or whatever, but it doesn't try to read a character, or to read multiple number of lines". given context I think that above answer was perfectly fine
<jackdaniel>
like saying: mapcar maps a function over a list (or lists)
pok has quit [Ping timeout: 240 seconds]
<jackdaniel>
without adding, that if you put integer in place of a function it will signal an error. if you put vector in place of a list it will signal an error. etc
Kundry_Wag has joined #lisp
pok has joined #lisp
<pjb>
Yes, but I would like programmers to be more unbiased vs. the various possibilities. We have to take into account all the cases.
<pjb>
less biased if you prefer.
<loke>
pjb: Java did that when they introduced checked exceptions.
<loke>
pbj: But everybody hated that.
Kundry_Wag_ has joined #lisp
<pjb>
Perhaps slime could help there.
<jackdaniel>
pjb: mentioning all the cases (including irrevelant ones) just clouds the message and makes it not understandable, so I strongly disagree
<pjb>
Notice that in CL, there are no exception!
<pjb>
They are conditions.
<pjb>
All cases must be considered!
<loke>
I like checked exceptions, and I feel that cases where they programmer is not in control _should_ be documented. I.e. READ failing is something the developer always have to take into consideration. There is no way you can program in such a way as to not have to deal with it.
<jackdaniel>
you do not consider the very special case of explaning things: the reason why you do explain
<pjb>
jackdaniel: yes, pedagogically. But then avoid words such as "always". Say "usually".
<jackdaniel>
then please avoid "must", say "in my opinion should"
<pjb>
ok :-)
Kundry_Wag has quit [Ping timeout: 245 seconds]
Kundry_W_ has joined #lisp
energizer has quit [Ping timeout: 252 seconds]
Kundry_Wag_ has quit [Ping timeout: 245 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag_ has joined #lisp
Kundry_W_ has quit [Ping timeout: 245 seconds]
jmercouris has joined #lisp
Kundry_W_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 276 seconds]
<dim>
ah, what it takes to be civilized…
Murii has quit [Remote host closed the connection]
Kundry_Wag_ has quit [Ping timeout: 265 seconds]
nowhere_man has joined #lisp
nowhereman_ has quit [Ping timeout: 248 seconds]
Murii has joined #lisp
<pjb>
unix (and then posix) is not civilised. Multics tried to. But unix recognized that there were "The facts of life."
<pjb>
Result: unix is everywhere (even in MS-Windows).
<Xach>
borodust: Just haven't gotten to it yet.
<borodust>
Xach: ah, understood
<borodust>
sorry, i have no idea how inclusion process is organized :/
EvW has quit [Ping timeout: 240 seconds]
Kundry_W_ has quit [Ping timeout: 276 seconds]
fittestbits has left #lisp [#lisp]
shka has joined #lisp
<shka>
hello
<shka>
Value (:POSTMODERN) can not be converted to an SQL literal.
<shka>
anybody encountered something like this?
<shka>
in postmodern, that's it, during query
wigust has quit [Ping timeout: 240 seconds]
compro has quit [Ping timeout: 256 seconds]
compro has joined #lisp
erlosshex has joined #lisp
erlosshex has quit [Quit: WeeChat 2.0.1]
aindilis has joined #lisp
saki has quit [Ping timeout: 240 seconds]
milanj has joined #lisp
makomo has quit [Ping timeout: 248 seconds]
igemnace has quit [Quit: WeeChat 2.0.1]
Kundry_Wag has joined #lisp
erlosshex has joined #lisp
<Xach>
shka: Is there a broader context?
erlosshex has quit [Quit: WeeChat 2.0.1]
saki has joined #lisp
<shka>
Xach: out of the blue, s-sql compiler started spewing out seemingly invalid sql code
<Xach>
shka: what does the original s-sql look like?
<Xach>
dim: Is that the same kind of idea? (i haven't used yesql)
<dim>
Xach: SQL is a programming language
<dim>
a declarative one, that's true, still
<Xach>
I guess I should read about yesql
<dim>
don't mangle it as if it were just strings/data
<shka>
dim: is that related to something i wrote?
jmercouris has joined #lisp
<dim>
shka: you're using s-sql, that's enough to get me started on my rant
<dim>
well it's a rant that fills in a couple chapters in my book ;-)
Kundry_W_ has quit [Ping timeout: 265 seconds]
<jackdaniel>
shka: I think it's the same if someone would cripple cl to accept infix syntax
<jackdaniel>
list(1, 2, 3)
<Xach>
Ok, so it does seem as though yesql is similar to html templating.
<jackdaniel>
and transplited it to (list 1 2 3)
<jackdaniel>
you wouldn't be happy to read such crippled code ;)
<dim>
Xach: yes and no, you shouldn't find any loop constructs and such, it should feel like writing a CL function in SQL, not like preparing a textual data
<Xach>
dim: ok
<dim>
the good parts about s-sql is that it makes the SQL looks like a lisp program
<dim>
and then of course you can write macros to generate your code and things
<dim>
anyway
<fe[nl]ix>
exactly
<shka>
ok, cool i have work to do, and all i need is literally ONE line of SQL
mercourisj has joined #lisp
<fe[nl]ix>
the readme of yesql makes me think the author never had to programmatically build a query from fragments
<dim>
shka: yeah I'm not offering practical-now advice, just… consider that SQL is code and that long term you might like to have .sql files in your source tree, that make things easier
<shka>
dim: not always
<shka>
no solution fits all
<dim>
fe[nl]ix: I'm highly dubious of building a query from fragments being something you need rather than something you've been used to
raynold has quit [Quit: Connection closed for inactivity]
<dim>
shka: I think we agree, or should I use other wording than “consider”, ”you might like to”?
jmercouris has quit [Ping timeout: 240 seconds]
<fe[nl]ix>
dim: I've had to do that quite often, e.g. adding joins and filters based on a user query
<dim>
it's a classic yeah, but I see it as an anti-pattern :/
<fe[nl]ix>
why ?
<dim>
when you have say 3 lisp functions that does almost the same thing but not quite and you want to sometimes inject variations/filtering in the inner-loops, would you have a macro that generates the variants at run-time?
<shka>
dim: besides some people like to write bad code, and should be allowed to do so if it makes them happy ;-)
<dim>
sure, and I'm free to offer sub-par advice I guess then? ;-)
Kundry_Wag has quit [Ping timeout: 240 seconds]
<dim>
fe[nl]ix: on more practical grounds, when things don't run like intended in production and you need to fix one of the queries, but not the others, it's a big problem where it should be a simple patch to the .sql file
<fe[nl]ix>
dim: if the runtime greatly dominates the compile times, yes definitely
<dim>
having been dev & dba a lot in previous jobs, building query from string pieces in the code is something I loathe nowadays, it's only going to cause maintenance problems down the road
<fe[nl]ix>
the were cases at the Lisp conferences where the presenter spoke highly of being able to turn an HTTP query into a lambda to cl:compile then funcall
<fe[nl]ix>
dim: and 3 functions is very little, I've had cases where 5 tables would have lead to a total of 31 join combinations
pierpa has joined #lisp
<fe[nl]ix>
excluding the case of no table selected
<dim>
it smells bad design to me, either the UI, the model or the code
<dim>
most often, the model is wrong, sometimes, the UI is stupid
<dim>
“but it is generic and we allow the user to search for anything anywhere, we can't know what he'll be interested into” --- yeah, you didn't do your job
<fe[nl]ix>
I suppose that is a matter of taste
<dim>
anyway, it's just my opinions for having had to deal with that as not be allowed to tinker with the code, and then see developers trying to fit my SQL fixes/improvements back into their code
Chream_ has joined #lisp
Chream_2 has quit [Read error: Connection reset by peer]
ckonstanski has joined #lisp
<dim>
and refactoring huge portions, or refusing to fix production problems because it would be too much of a change, all for just a SQL query
<fe[nl]ix>
as a user, I'd hate to use an application that is unnecessarily constrained just because the programmers want an easy life
<dim>
I'm saying any of you guys fall into that misthinking, but SQL is code and needs patching to ensure good production behavior, just as the rest of the code
erlosshex has quit [Quit: WeeChat 2.0.1]
<fe[nl]ix>
it depends on the environment :)
<fe[nl]ix>
where I work, once a backend is goes GA, the data model basically never gets changed
<fe[nl]ix>
and if it's successful it gets rewritten from scratch every 5 years or so
<dim>
well that might be because SQL isn't considered a first class citizen by developers
<dim>
chicken an eggs and things
<dim>
I'm failing to find a nice humouristic illustration of the point I was trying to make, blah
terpri has quit [Ping timeout: 240 seconds]
<jdz>
I agree with dim, coming from Rails and Django, where they use fancy SQL-building DSLs, which I've always found lacking. Mostly because of the inability to use nice SQL features.
<jdz>
Like recursive queries.
<jdz>
So now I'm in the "write SQL, provide parameters" camp.
<fe[nl]ix>
try to avoid taking sides
<jdz>
Avoid labelling people.
<dim>
well I'd like to offer opinions rather than build trenches :/
pierpa has quit [Remote host closed the connection]
BitPuffin has joined #lisp
kobain has joined #lisp
<jdz>
I tried to offer another point of experience.
Kundry_Wag has joined #lisp
Kundry_Wag_ has joined #lisp
EvW1 has joined #lisp
<jackdaniel>
I've came only to fight, what's the topic? :-)
<dim>
you can't fight in here! it's the war room!
learning has joined #lisp
thodg has joined #lisp
<Xach>
Working with Lisp has made me appreciate the "living system" model of SQL servers more.
<Xach>
They both provide for the careful management and evolution of data and functions.
<Xach>
Also, I would like a more query-oriented way to get data from the running Lisp system.
Kundry_Wag has quit [Ping timeout: 276 seconds]
<Xach>
system data, that is, like "show me all functions with both &key and and &optional" or "all packages without a docstring" and things like that.
<Xach>
I know there are ways to get that info "manually", but it would be interesting to me to have a more uniform query system/syntax.
<dim>
IIUC that's something that prolog has been quite good about?
<dim>
I mean mixing a database and query system into other programming model(s)
EvW1 has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
damke has quit [Ping timeout: 264 seconds]
Kundry_W_ has joined #lisp
<AeroNotix>
Xach: is it possible to wrap the def* type forms with something that creates a database of what you need?
<AeroNotix>
would be an interesting little package
thinkpad has quit [Quit: lawl]
Kundry_Wag_ has quit [Ping timeout: 245 seconds]
raynold has joined #lisp
<Xach>
AeroNotix: most systems already keep that data around anyway. that's how slime gets its arglist info
Kundry_Wag has quit [Ping timeout: 276 seconds]
Jesin has quit [Quit: Leaving]
Kundry_Wag has joined #lisp
makomo has joined #lisp
<p_l>
Xach: I think it's something that is really missing from *Common* Lisp, all the extra details on introspection or detailed organization of memory that were provided in systems it derived from
<Xach>
p_l: my general feeling about "missing" features is "well, they had to stop somewhere"
Kundry_Wag_ has joined #lisp
vibs29 has left #lisp [#lisp]
<p_l>
on one hand, yes, on another there are some cases where IMO they concentrated too much on "we have enough pages as it is"
thinkpad has joined #lisp
<Shinmera>
I'm not sure I feel the lack of information about memory to be a mistake.
<p_l>
Depends how it is done
<shka>
there are more missy things
vibs29 has joined #lisp
<shka>
Shinmera: hello there
<shka>
any thoughts on documentation queries?
Kundry_W_ has quit [Ping timeout: 240 seconds]
<Shinmera>
My thought is I don't really know what you mean by it. Do you mean retrieving the original documentation forms?
<shka>
yup
<Shinmera>
*expressions
<shka>
exactly
<Shinmera>
Okey. In that case you could just store them however you like in your custom formatter, no?
<shka>
yup
<Shinmera>
Alright, so why does that need to be in documentation-utils itself?
<shka>
should i close this issue or you wanna this feature in documentation-utils?
Kevslinger has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
<Shinmera>
So far I'm leaning towards not wanting it as it seems like storing the original format isn't needed for a lot of cases, and those where it is letting them handle their own storage seems smarter as they can decide exactly how to do it.
<shka>
ok, that's reasonable
<Shinmera>
I can see an angle where primitive formatters might want to just store the original expression, but that seems like a small case that possibly just hinders most cases.
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
mercourisj has quit [Remote host closed the connection]
Kundry_W_ has joined #lisp
jmercouris has joined #lisp
<shka>
sure
<shka>
thanks for answer
<shka>
i will close this issue
<shka>
Shinmera: have a nice day :-)
Kundry_Wag_ has quit [Ping timeout: 252 seconds]
<Shinmera>
Same to you!
Kundry_Wag_ has joined #lisp
aindilis has quit [Ping timeout: 252 seconds]
Kundry___ has joined #lisp
Kundry_Wag has quit [Ping timeout: 276 seconds]
Kundry_W_ has quit [Ping timeout: 245 seconds]
Kundry_Wag_ has quit [Ping timeout: 252 seconds]
smokeink has joined #lisp
Kundry___ has quit [Ping timeout: 252 seconds]
Bike has joined #lisp
ksool has joined #lisp
damke has joined #lisp
Nouv has joined #lisp
saki has quit [Ping timeout: 268 seconds]
damke_ has joined #lisp
makomo_ has joined #lisp
saki has joined #lisp
damke has quit [Ping timeout: 264 seconds]
makomo has quit [Ping timeout: 256 seconds]
zooey has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
damke__ has joined #lisp
quazimodo has quit [Ping timeout: 256 seconds]
damke_ has quit [Ping timeout: 264 seconds]
zooey has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
smokeink has quit [Ping timeout: 252 seconds]
smasta has joined #lisp
<Murii>
what does 'aref' stand for when using with vectors?
<Xach>
Murii: array reference.
<Murii>
but it's a vector :O
<Shinmera>
vectors are arrays.
<Xach>
A foolish consistency is the hobgoblin of little minds.
Kundry_Wag has joined #lisp
<Murii>
Shinmera, in a way you can consider it
<Shinmera>
No, it's literally defined that way.
<Murii>
Anyway, how can I get the length of a vector?
<Shinmera>
by using LENGTH
<Xach>
And also with array-dimensions! But that's more oblique.
damke has joined #lisp
<Murii>
Shinmera, LENGTH also works on lists right?
<Shinmera>
it works on sequences. lists and vectors are sequences.
damke__ has quit [Ping timeout: 264 seconds]
<jackdaniel>
fun fact - strings are vectors (hence sequences) too
damke_ has joined #lisp
<Murii>
jackdaniel, well they are in any language
Kundry_Wag_ has joined #lisp
<jackdaniel>
are they?
<pjb>
Murii: nope.
saki has quit [Ping timeout: 240 seconds]
<pjb>
Murii: eg. in scheme, strings are not vectors.
<pjb>
Murii: also, if your language supports unicode, it may not be the best choice to make strings vectors.
<jackdaniel>
technically string is a set of symbols from a specified alphabet, no vector required
<jackdaniel>
tfu, not set
<jackdaniel>
sequence
<pjb>
Since the properties of unicode strings are so strange, vectors of glyfs, vectors of code-points, or vectors of characters are all inconvenient. Some argue that even having characters is inconvenient, when you use unicode.
damke has quit [Ping timeout: 245 seconds]
<jackdaniel>
("tfu" means in polish "bleh", not some kind of "fu" derivative)
Kundry_W_ has joined #lisp
saki has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
learning has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
dddddd has joined #lisp
warweasle has joined #lisp
Kundry_Wag_ has quit [Ping timeout: 245 seconds]
Kundry_Wag has joined #lisp
Chream_ has quit [Read error: Connection reset by peer]
Chream_2 has joined #lisp
Chream_ has joined #lisp
Chream_2 has quit [Read error: Connection reset by peer]
makomo_ has quit [Quit: WeeChat 1.9.1]
makomo has joined #lisp
ski has joined #lisp
LiamH has joined #lisp
Kundry_W_ has quit [Ping timeout: 276 seconds]
Kundry_Wag_ has joined #lisp
ckonstanski has quit [Remote host closed the connection]
Kundry_W_ has joined #lisp
Kundry___ has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
saki has quit [Ping timeout: 240 seconds]
Kundry_Wag_ has quit [Ping timeout: 245 seconds]
Kundry_Wag has joined #lisp
Kundry_W_ has quit [Ping timeout: 276 seconds]
oleo has joined #lisp
Nouv has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 256 seconds]
asarch has joined #lisp
Kundry___ has quit [Ping timeout: 240 seconds]
__rumbler31 has joined #lisp
Jesin has joined #lisp
kobain has quit [Ping timeout: 256 seconds]
Kundry_Wag has quit [Ping timeout: 252 seconds]
fluxit has joined #lisp
comborico1611 has joined #lisp
sbenitezb has joined #lisp
sbenitezb has quit [Client Quit]
fikka has joined #lisp
jmercouris has quit [Ping timeout: 240 seconds]
kobain has joined #lisp
terpri has joined #lisp
Chream_ has quit [Ping timeout: 276 seconds]
saki has joined #lisp
fluxit has quit [Max SendQ exceeded]
fluxit has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
rumbler31 has quit [Remote host closed the connection]
damke_ has quit [Ping timeout: 264 seconds]
<hajovonta>
pjb: why? a sequence is just a predefined order for the elements
<hajovonta>
and a string is a predefined order for the characters.
<Shinmera>
not... really.
<Shinmera>
things get ~weird~ when you consider unicode.
<hajovonta>
the representation of the characters is a different matter
<hajovonta>
this is my - naive - thought :)
fikka has joined #lisp
<Bike>
with unicode it's nontrivial to decide what the elements of a string are.
<TMA>
hajovonta: if you restrict yourself to English the intuition is fine. but for more complex languages you soon run full speed into a wall with it
jmercouris has joined #lisp
<hajovonta>
why? I can't imagine an example
Cymew has quit [Remote host closed the connection]
<Shinmera>
Often times a unicode string will be taken as a vector of code points. Unicode allows you to compose characters through multiple individual code points, where the order does not necessarily matter. Thus, as a representation of a "character string" different vectors represent the same thing, but are no longer identical.
<TMA>
because the properties of sequences no longer hold -- if you concatenate sequences you would probably assume that the resulting length will be the sum of lengths
<dlowe>
docstrings - word wrapped or not?
<Shinmera>
dlowe: I do summary not word wrapped, rest word wrapped.
<Shinmera>
Or rather, summary single line, rest word wrapped.
<hajovonta>
we have several strange characters in our language (Hungarian) like á, é, í, ú, and ö, ő, ü, ű
<hajovonta>
but, when I write "árvíz" and concatenate "tükör" then "árvíztükör" is a sequence of 10 characters
<hajovonta>
is that not always so?
<Shinmera>
No
<Shinmera>
Unicode has code points for just the ticks, so you could write a+tick, as two code points, which would be a string of length 2 in most implementations.
Cymew has joined #lisp
<Shinmera>
even though it's one character.
<hajovonta>
ok, so it's an implementation thing that causes the problems
<TMA>
hajovonta: say that you concatenate 'hajov' and 'onta' in a CV sylabic script ... the first has 3 characters (ha-jo-v) the second has 3 (o-n-ta) ; but the concatenation has 5 not 6 (ha-jo-vo-n-ta)
chiyosaki has joined #lisp
saki has quit [Ping timeout: 248 seconds]
<Shinmera>
hajovonta: Not really. There's just different ways of looking at the same thing.
<hajovonta>
but it doesn't matter how many code points make up a character. We can just count the characters, can't we?
<hajovonta>
or is it problematic to get to the character count from the code points ?
<Shinmera>
Well for instance looking up a single character in a string becomes O(n)
Kundry_Wag has joined #lisp
Kaisyu has quit [Quit: Updating details, brb]
Kaisyu has joined #lisp
<TMA>
hajovonta: why yes. sometimes. in other times what constitutes a character is hard to tell. ... IIRC, in Spanish ll is a single character though two codepoints. ch is a single character in Czech
Chream_ has joined #lisp
<dlowe>
the notion of a "character" may be antiquated at this point.
Cymew has quit [Ping timeout: 256 seconds]
Kundry_Wag_ has joined #lisp
learning has joined #lisp
<hajovonta>
yes, we also have double-character characters, like gy, ny, ty, dz, ...
<hajovonta>
but we don't have keys for those on Hungarian layout keyboards.
<hajovonta>
we use two keypresses.
Kundry_W_ has joined #lisp
<TMA>
hajovonta: so when you see the string "chill", you do not know how many characters you have
<TMA>
hajovonta: it's 5 code points but some indeterminate number of characters
papachan has joined #lisp
<dlowe>
generally, when you want to know the "length" of the string, you want to know a) how many bytes does it take up or b) how many pixels will it take to render this string, both of which have satisfactory answers.
<dlowe>
A perverse mind might want to know it in order to find the maximum valid index of a character.
<TMA>
counting characters does not help in determining either
<hajovonta>
dlowe: I'm usually not interested in any of the two answers :)
Kundry_Wag has quit [Ping timeout: 240 seconds]
<dlowe>
so why do you need the length of a string then?
fikka has quit [Ping timeout: 245 seconds]
<hajovonta>
15:23:02 - jackdaniel: technically string is a sequence of symbols from a specified alphabet, no vector required
Kundry_Wag_ has quit [Ping timeout: 265 seconds]
Kundry_Wag has joined #lisp
<hajovonta>
I was just asking why can't a string be a sequence of characters
<hajovonta>
based on jackdaniel's definition, a string is a sequence of symbols from a specified alphabet
<jackdaniel>
characters are symbols of "text" alphabet, and that's what usually languages implement
<pjb>
hajovonta: unicode strings are decomposed in glyps, that are defined by a sequence of code-points of variable length.
<hajovonta>
I agree that the number of characters can be different when using different alphabets
<dlowe>
well, in CL a string is exactly that - a requence (vector) of characters
<pjb>
hajovonta: the notion of string as a sequence of character would imply that a character is an object of variable length.
<hajovonta>
pjb: yes, but that's an implementation problem
<pjb>
hajovonta: no implementation implement characters this way, because it makes for very complex objects, compared to the usual single byte for C char, or 32-bit word for unicode code-point.
<jackdaniel>
pjb: code-points of variable length may constitute one alphabet element
<hajovonta>
I think the "sequence of characters" as a theoretical definition is pretty good
<pjb>
code-points are of fixed length.
Kundry_Wag_ has joined #lisp
<pjb>
It's glyphs that are made of a variable number of combining code-points.
<jackdaniel>
(what I meant, that one glyph is element of the alphabet, not its code-points, so it is irrevelant to the definition)
<pjb>
There's also the problem of normalization, such as the various unicode representation of á, or the problem of ligatures.
Kundry___ has joined #lisp
<jackdaniel>
so I think that was very in point, that it is implementation detail
Kundry_W_ has quit [Ping timeout: 252 seconds]
<pjb>
jackdaniel: ok, you're implementor. I dare you to implement ecl characters as variable-length sequences of code points…
_cosmonaut_ has quit [Ping timeout: 256 seconds]
<pjb>
This is probably what I'd do if I was a CL implementor, but I'm not yet.
<jackdaniel>
again - irrevelant to hajovonta's question :(
Kundry_W_ has joined #lisp
<pjb>
But I'd make sure to read the unicode standard through, first.
<jackdaniel>
happily they were implemented that way before I took over
<pjb>
So basically, implementations store strings as vectors of code-points instead.
saki has joined #lisp
<pjb>
But code-points are not characters!
Kundry_Wag has quit [Ping timeout: 240 seconds]
damke_ has joined #lisp
<hajovonta>
a character is a symbol _in a given alphabet_
chiyosaki has quit [Ping timeout: 268 seconds]
<pjb>
hajovonta: by the way, even without going full unicode, just with ascii, you have the distinction between characters or ASCII control codes.
Kundry_Wag has joined #lisp
<jackdaniel>
yes, and when you say (nth *string* 18) it won't take 18-th code-point, but 18-th character
<pjb>
hajovonta: usually implementations make strings vectors of characters, with virtual characters corresponding to ascii control codes, which has no meaning.
<pjb>
hajovonta: who said this given alphabet is finite?
_cosmonaut_ has joined #lisp
Kundry_Wag_ has quit [Ping timeout: 265 seconds]
<jackdaniel>
right, the only important thing is that the sequence is finite, alphabet may have infinite number of possible symbols
<pjb>
hajovonta: so far, even with unicode, it's finite (and way bigger than 2^21), but just let the user combine the code-points without limiting the number of combinaisons, and you get an infinite number of characters!
Kundry_Wag_ has joined #lisp
Kundry___ has quit [Ping timeout: 252 seconds]
ninegrid has quit [Quit: leaving]
<pjb>
hajovonta: in any case, your question is irrelevant: it could indeed (and should IMO) be done that way, but it is not done in practice by implementations!
<TMA>
स्कृ
<dlowe>
I believe there's an O(1) access guarantee for CHAR.
csaurus has joined #lisp
<hajovonta>
pjb: I don't see how it is a problem to have an infinite number of characters...
Kundry_W_ has quit [Ping timeout: 265 seconds]
<hajovonta>
pjb: yes, we agree
<dlowe>
which makes it impossible to both support the notion of a unicode character and the CL spec.
orivej has joined #lisp
<hajovonta>
dlowe: I think it's possible, but it's impractical. (?)
<dlowe>
pjb: sure, but you'll need some way to access them without decomposing them on the fly.
<dlowe>
you could do it with a seperate decomposing index vector, I guess.
<pjb>
No, don't store code-points, store characters!
wigust has joined #lisp
<pjb>
CL says vector of character, not vector of code-points or codes…
<pjb>
The problem is more in the lisp reader, that now has to convert and normalize unicode.
<hajovonta>
but a character can be anything, like "djshfkjdhskh". In a hypothetical alphabet, this can be one character.
<pjb>
well, not the reader properly, the external-format handling…
<pjb>
hajovonta: well, unicode has rules.
<pjb>
basically, IIRC, you can have up to ten combining code-points following a non-combining code-points.
<pjb>
So you could consider using bigints to encode them, after normalization.
<pjb>
This would have the advantage, that you could represent most common characters as fixnums.
Kundry_Wag has joined #lisp
saki has quit [Ping timeout: 245 seconds]
wigust has quit [Ping timeout: 240 seconds]
ninegrid has joined #lisp
saki has joined #lisp
Kundry_Wag_ has quit [Ping timeout: 252 seconds]
Kundry_Wag_ has joined #lisp
nowhere_man has quit [Remote host closed the connection]
Kundry_W_ has joined #lisp
nowhere_man has joined #lisp
Kundry___ has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
Kundry_Wag_ has quit [Ping timeout: 245 seconds]
Kundry_W_ has quit [Ping timeout: 245 seconds]
Kundry___ has quit [Ping timeout: 240 seconds]
ioa_ has left #lisp [#lisp]
ioa_ has joined #lisp
fikka has joined #lisp
saki has quit [Ping timeout: 276 seconds]
damke_ has quit [Ping timeout: 264 seconds]
saki has joined #lisp
damke has joined #lisp
jmercouris has quit [Ping timeout: 240 seconds]
khisanth_ has quit [Ping timeout: 240 seconds]
saki has quit [Ping timeout: 260 seconds]
saki has joined #lisp
parjanya has joined #lisp
wigust has joined #lisp
khisanth_ has joined #lisp
emaczen has quit [Read error: Connection reset by peer]
safe has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
Kundry_Wag_ has joined #lisp
attila_lendvai has joined #lisp
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
slondr has joined #lisp
<slondr>
()
al-damiri has joined #lisp
Kundry_Wag has joined #lisp
smasta has quit [Ping timeout: 256 seconds]
emaczen has joined #lisp
Kundry_Wag_ has quit [Ping timeout: 252 seconds]
slondr has quit [Remote host closed the connection]
Kundry_Wag_ has joined #lisp
Jesin has quit [Quit: Leaving]
Kundry_Wag has quit [Ping timeout: 245 seconds]
<flip214>
pjb: fixnums are awfully large... even the 32bit character on 64bit machines hurts, if you need to store some larger text body
hajovonta has quit [Quit: hajovonta]
heisig has quit [Quit: Leaving]
<foom>
Yea, there's really no point in storing text as a vector of characters.
rumbler31 has joined #lisp
<foom>
That's a bogus representation, only used for historical reasons.
Kundry_Wag has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
Kundry_W_ has joined #lisp
<pjb>
Yes, there's foom's argument.
<pjb>
If you have large anything, you need to consider your own data structures and algorithms.
flamebeard has quit [Quit: Leaving]
<pjb>
And indeed, the sequence of character representation of large body of text is not often the best one.
<Shinmera>
You can either be flexible or efficient.
<pjb>
See for example, lisp source code: it's read and not represented as strings, but instead as sexps!
Kundry_Wag_ has quit [Ping timeout: 256 seconds]
<foom>
The problem is that it's not the best representation for a small body of text either, except where "best" is defined as "works within existing standard".
<pjb>
If you had to read wikipedia, probably you'd start by storing words instead of characters… And they perhaps you'd even try to store relationships infered from the sentences…
rumbler31 has quit [Ping timeout: 245 seconds]
<foom>
What you really want is to store the text as utf8, and provide APIs to iterate over encoded bytes, codepoints, grapheme clusters, words, etc.
Kundry_Wag has quit [Ping timeout: 256 seconds]
Kundry_Wag has joined #lisp
smasta has joined #lisp
Kundry_Wag_ has joined #lisp
Kundry___ has joined #lisp
m00natic has quit [Remote host closed the connection]
Kundry_W_ has quit [Ping timeout: 256 seconds]
Kundry_W_ has joined #lisp
slondr has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
Kundry_Wag_ has quit [Ping timeout: 256 seconds]
Kundry___ has quit [Ping timeout: 252 seconds]
fdund has joined #lisp
Kundry_W_ has quit [Ping timeout: 245 seconds]
aindilis has joined #lisp
rumbler31 has joined #lisp
klltkr has joined #lisp
rumbler31 has quit [Ping timeout: 248 seconds]
himmAllRight has quit [Remote host closed the connection]
<sjl>
I already have it from the ACM archive, but really nice that it's free for everyone now
<stacksmith>
Posted 10 minutes ago. That's what I call being 'in the loop'.
Rawriful has joined #lisp
<pierpa>
I call it being subscribed to the repository :)
<Xach>
Wowww!
shka_ has quit [Ping timeout: 248 seconds]
<Xach>
That is fantastico
<pierpa>
He says: "The .txt version has a lot of errors; I got it from the default Save as other / ...Text menu item in Acrobat. An automated tool could rejoin the lines that end in hyphens, and perhaps find missing spaces, as in programmingpractices and anunfortunate. Other errors would require significant human labor to clean up."
attila_lendvai has joined #lisp
<Xach>
pierpa: it never occurred to me to subscribe to the repo; why would it ever change? but that's awesome.
<stacksmith>
ditto.
<pierpa>
yes, I subscribed just in case
<_death>
pdf doesn't look as nice as the book ;).. but good to have it searchable
<pierpa>
maybe it's a defect that can be fixed? bad fonts?
mareskeg has joined #lisp
<Xach>
Hmm
vlatkoB has quit [Remote host closed the connection]
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
Kundry_Wag has joined #lisp
vap1 has joined #lisp
<sjl>
looks like it's partially OCR'ed from a scan, and the scanned words replaced with text in some font
nonlinear has joined #lisp
dmiles has quit [Ping timeout: 255 seconds]
<pierpa>
what about setting up a group of volunteers for fixing the .txt? split the file in small chunks, distribute the chunks to volunteers, etc...
scymtym has joined #lisp
<Xach>
That would be pretty cool.
jmercouris has joined #lisp
<_death>
good thing it has page feeds.. so you can have one-page-per-day thing
Denommus has joined #lisp
dmiles has joined #lisp
ebzzry_ has quit [Ping timeout: 240 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
eeproks has quit [Quit: leaving]
Kundry_Wag_ has joined #lisp
ckonstanski has quit [Quit: bye]
<pierpa>
"Elsevier has reverted the copyright on the book to the author (me, Peter Norvig), so we are now free to do with it what we want. Robert Smith, @tarballs-are-good, is interested in putting in some work towards this end."
Kundry_Wag has quit [Ping timeout: 245 seconds]
ckonstanski has joined #lisp
sukaeto has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
<phoe>
has anyone compared the PDFs available from libgen?
<mishoo_>
sjl: the left side is evidently better
chiyosaki has quit [Ping timeout: 256 seconds]
<_death>
you can "save as text" and have some probabilistic code to merge ;)
saki has joined #lisp
<sjl>
the ACM's is a scan of the book. It's OCRed and searchable/copyable, but they didn't actually replace the image of the scan with text like the version in the repo
<sjl>
mishoo_: yeah, the left side is the ACM scan
<pierpa>
yes, clearly better
<sjl>
the ACM version also have a table of contents in the PDF
<mishoo_>
oh, as in, bitmap... :-/
<scymtym>
Xach: ok, please let us know if anything shows up
Kundry_Wag has joined #lisp
Achylles has quit [Ping timeout: 252 seconds]
deng_cn has quit [Read error: Connection reset by peer]
deng_cn has joined #lisp
kobain has joined #lisp
pagnol has joined #lisp
heurist`_ has quit [Ping timeout: 268 seconds]
Kundry_Wag_ has joined #lisp
saki has quit [Remote host closed the connection]
comborico1611 has quit [Quit: Konversation terminated!]
Baggers has quit [Remote host closed the connection]
csaurus has quit [Ping timeout: 265 seconds]
Kundry_Wag has quit [Ping timeout: 252 seconds]
pillton has joined #lisp
Kundry_Wag has joined #lisp
serviteur has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
mareskeg has quit [Quit: mareskeg]
<Xach>
I miss boinkmarks.
Kundry_Wag_ has quit [Ping timeout: 240 seconds]
mareskeg has joined #lisp
LiamH has quit [Quit: Leaving.]
Kundry_Wag_ has joined #lisp
<AeroNotix>
has anyone ever made a reader macro to emulate erlang's binary pattern matching?
AntiSpamMeta has quit [Read error: Connection reset by peer]
AntiSpamMeta has joined #lisp
shrdlu68 has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Ping timeout: 240 seconds]
mareskeg has quit [Quit: mareskeg]
Xach has quit [Ping timeout: 248 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
Xach has joined #lisp
attila_lendvai has joined #lisp
Kundry_Wag_ has quit [Ping timeout: 245 seconds]
Bike has quit [Ping timeout: 260 seconds]
learning has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
heurist`_ has joined #lisp
<Xach>
That's palatino, isn't it?
varjag has quit [Ping timeout: 252 seconds]
Karl_Dscc has quit [Remote host closed the connection]
compro has quit [Remote host closed the connection]
compro has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
<jasom>
if # is a non-terminating macro character why does sbcl print :foo#bar as :|FOO#BAR| and slime higlight :foo#bar as different words?
<pjb>
Because it's not terminating, it doesn't terminate the foo#bar token.
openthesky has joined #lisp
<jasom>
pjb: my question is why sbcl puts spurious || around it and slime highlights it incorrectly. I agree it doesn't terminate the token
Kundry_Wag has joined #lisp
<pjb>
If it was terminating, say, like ', then in foo'bar the quote terminates the foo token, and then a further read will read 'bar ( (quote bar) ).
<Shinmera>
Slime highlights a bunch of things incorrectly.
<Shinmera>
So it's just buggy.
<pjb>
jasom: the printing is in part implementation dependent, and in part directed by the *print-…* variables.
<pjb>
check *print-readably* and *print-escape* in particular.
<jasom>
pjb: I'm not saying sbcl is doing something wrong, but the fact that it chooses to escape tokens with # in them make me wonder if I ought to do so in my code
<aeth>
It's probably just being safe because reader macros use #
<aeth>
I guess?
<pjb>
Yes.
<Shinmera>
jasom: 22.1.3.3 seems to imply that it's allowed to do this, even if there's no strict need to.
Achylles has quit [Read error: Connection reset by peer]
<jasom>
Shinmera: I agree
<pjb>
You can (setf *print-escape* nil)
Duns_Scrotus has quit [Excess Flood]
Duns_Scrotus has joined #lisp
<pjb>
well, it doesn't seem to change.
<jasom>
pjb: I know how print-escape works. I was merely expressing a concern that the sbcl devs know something I don't with regard to internal # in symbol names
Kaisyu has joined #lisp
<pjb>
jasom: theorically, they would have to check in the read table whether a character is a terminating macro character or not. Instead if you systematically escape, you can print faster!
<jasom>
pjb: PRINT and friends bind *print-escape*
<pjb>
right. we have to use write-to-string.
Chream_2 has quit [Ping timeout: 240 seconds]
<pjb>
jasom: so I would say it's mostly a speed optimization.
<pjb>
It's worth it, eg. in the case of ccl, since it uses plists for readtables…
<jasom>
pjb: that makes no sense because it has to check all the alphabetic characters which are much more common
<pjb>
well, to be sure, read the source.
josemanuel has quit [Quit: leaving]
<jasom>
perhaps it escapes all macro characters, regardless of position?
shrdlu68 has joined #lisp
<jasom>
that would make sense because # is the only non-terminating macro character in the standard readtable
attila_lendvai has quit [Read error: Connection reset by peer]
smurfrobot has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
Cymew has joined #lisp
smasta has quit [Ping timeout: 248 seconds]
saki has joined #lisp
smurfrobot has quit [Ping timeout: 248 seconds]
Cymew has quit [Ping timeout: 256 seconds]
igemnace has joined #lisp
jmercouris has quit [Ping timeout: 265 seconds]
Kundry_Wag_ has joined #lisp
saki has quit [Ping timeout: 268 seconds]
Kundry_Wag has quit [Ping timeout: 252 seconds]
trocado has joined #lisp
dieggsy has quit [Ping timeout: 245 seconds]
<energizer>
What's the difference between nil and 'nil?
<Shinmera>
One is the form NIL and one is the form (QUOTE NIL)
Kundry_Wag has joined #lisp
<sjl>
The first reads as the symbol nil, the second reads as the list (quote nil). When evaluated they result in the same thing, because nil is special and evaluates to itself.
<stacksmith>
What's interesting here is 'nil evaluates to nil too!
<Shinmera>
But not ''nil.
comborico1611 has quit [Quit: Konversation terminated!]
<stacksmith>
But it looks trickier, because nil is also a symbol - as well as type null.
<energizer>
Shinmera: (eval ''nil) is giving me nil i think
Kundry_Wag_ has quit [Ping timeout: 240 seconds]
<stacksmith>
(subtypep nil 'symbol) => T
<sjl>
energizer: that's because ''nil is evaluated before it gets passed to eval