<iqubic>
I only need 2D matrixes at this time though.
JuanDaugherty has joined #lisp
damke_ has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
aindilis has quit [Read error: Connection reset by peer]
nika has joined #lisp
damke has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 256 seconds]
ahungry has joined #lisp
python476 has quit [Ping timeout: 264 seconds]
smurfrobot has quit [Remote host closed the connection]
Ukari has quit [Remote host closed the connection]
fikka has joined #lisp
<iqubic>
Which library from that list will give me a good optimal 2D matrix implementation?
zooey has quit [Ping timeout: 255 seconds]
shka has joined #lisp
ikki has quit [Quit: Leaving]
<Bike>
"optimality" is a nontrivial question, you know
<Bike>
what operations are you doing? how sparse are the matrices? do you have guarantees on your form? what's the precision? how big are they? bla bla bla
<Bike>
i imagine they're all at pleast pretty good, though
zooey has joined #lisp
<beach>
Good morning everyone!
deng_cn has quit [Read error: Connection reset by peer]
deng_cn has joined #lisp
smasta has joined #lisp
<pfdietz>
Good... morning.
beach has quit [Ping timeout: 256 seconds]
z3t0 has joined #lisp
zooey has quit [Ping timeout: 255 seconds]
milanj has quit [Quit: This computer has gone to sleep]
zooey has joined #lisp
Ukari has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
vtomole has quit [Ping timeout: 260 seconds]
beach has joined #lisp
<iqubic>
It is morning for you, night for me, but I'm not sure it can be considered good. I have been battling sickness all day.
<stylewarning>
iqubic: there’s CL-GENERIC-ARITHMETIC and LOOM, the former making arithmetic generic, the latter making almost all of CL generic
sfa has quit [Remote host closed the connection]
<iqubic>
What's the difference between ' and #'?
Bike has quit [Quit: Lost terminal]
<stylewarning>
iqubic: this is answered in most books
<stylewarning>
#' looks up the function associated with a name
<stylewarning>
' just quotes data (returns it unevaluated)
sfa has joined #lisp
<iqubic>
When would you use one over the other?
<stylewarning>
the first one is when you want to refer to functions
<stylewarning>
The second one has nothing to do with functions
<iqubic>
Oh. I see.
ozzloy has joined #lisp
ozzloy has joined #lisp
smurfrobot has joined #lisp
<emaczen`>
didi: If you download GCL it comes with the hyperspec in texinfo format
<emaczen`>
at least it does if you download the docs via your linux distro
sjl__ has joined #lisp
<didi>
emaczen`: Thank you.
sjl__ has quit [Ping timeout: 255 seconds]
<Zhivago>
'x is (quote x) #'x is (function x).
drewc has quit [Ping timeout: 248 seconds]
ozzloy has quit [Remote host closed the connection]
sjl has quit [Ping timeout: 256 seconds]
lnostdal has quit [Ping timeout: 255 seconds]
<pjb>
assuming the standard readtable macros.
<pjb>
and assuming by quote you mean COMMON-LISP:QUOTE and by function you mean COMMON-LISP:FUNCTION
fikka has quit [Ping timeout: 260 seconds]
<iqubic>
I do mean that.
z3t0 has quit [Remote host closed the connection]
z3t0 has joined #lisp
<didi>
Zhivago: I liked your connection between CL and posix.
z3t0 has quit [Remote host closed the connection]
z3t0 has joined #lisp
dieggsy has quit [Ping timeout: 255 seconds]
Chream_ has quit [Ping timeout: 260 seconds]
drewc has joined #lisp
<pjb>
iqubic: first it should be noted that APPLY and FUNCALL take function designators, so if the symbol and the function designate the same function, quote and function will be equivalent in the sense that the same function will be called.
<pjb>
iqubic: and in the case of functions from the CL package, they will always designate the same function!
<pjb>
iqubic: however, for other symbols, (not from CL), they may deisgnate different functions!
fikka has joined #lisp
<pjb>
iqubic: a symbol will always designate the global function binding, ie. the function obtained by (symbol-function symbol).
<pjb>
iqubic: however, the function special operator is the (only) closure creator operator, and it may create closures of locally bound functions.
<pjb>
In such cases, you would have to choose between quote and function depending on WHAT YOU MEAN!
nowhereman_ has joined #lisp
<pjb>
iqubic: other characteristic properties of symbols and functions, is that since symbols, as function designators, are resolved only when used, when the function needs to be called, if the function is redefined (at run-time), then the symbol will designate the new version. While function returns the actual closure object, if the fbinding is redefined, the function object will still be the old one.
<pjb>
So again, choose between the symbol and the function, depending on the meaning you mean!
dddddd has quit [Remote host closed the connection]
nowhere_man has quit [Ping timeout: 256 seconds]
wigust has joined #lisp
asarch has quit [Quit: Leaving]
compro has joined #lisp
lnostdal has joined #lisp
oleo has quit [Quit: Leaving]
z3t0 has quit [Remote host closed the connection]
z3t0 has joined #lisp
pierpa has quit [Quit: Page closed]
z3t0 has quit [Ping timeout: 268 seconds]
ak5 has joined #lisp
damke has joined #lisp
<iqubic>
Isn't there a difference between the literal value of a symbol, and the function-value?
damke_ has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 256 seconds]
<beach>
iqubic: Try it out at the REPL. I don't know what you mean by "literal value", so I can't try it out for you, but you must know what you mean yourself, so just type the form (EQ ? ?) and see the result.
<beach>
.. where the first ? is the "literal value" and the second ? is the function value.
<emaczen`>
(sb-ext:run-program "prog-name" (list "name" "--dynamic-space-size" "4096")) -- is this the correct way to pass command line arguments?
fikka has joined #lisp
wxie has joined #lisp
<jackdaniel>
emaczen`: yes
<jackdaniel>
if prog-name is not absolute path you may want to add also :search t
<emaczen`>
I'm printing out the dynamic-space-size from the external program and it is the default 1 GB...
Ukari has quit [Quit: bye bye]
<iqubic>
beach: I was confusing symbol-function with symbol-value.
<emaczen`>
any idea why the dynamic-space-size argument is not getting picked up?
<iqubic>
Which are rather different I assume.
wxie has quit [Ping timeout: 265 seconds]
z3t0 has joined #lisp
<jackdaniel>
emaczen`: sbcl options come *after* custom ones
<jackdaniel>
what is the "name" parameter?
<emaczen`>
Isn't that after?
<emaczen`>
Or do you mean before?
<emaczen`>
the "name" parameter is needed for my external program
<jackdaniel>
emaczen`: compare `sbcl --dynamic-space-size 4096 --eval "(print (sb-ext:dynamic-space-size))"` in the repl with `sbcl foo --dynamic-space-size 4096 --eval "(print (sb-ext:dynamic-space-size))"` (likewise)
<jackdaniel>
`sbcl --dynamic-space-size 4096 --eval "(print (sb-ext:dynamic-space-size))" program-name ` should work though
<iqubic>
What is the difference between set and setf?
<jackdaniel>
iqubic: generally a good resource to look up things is l1sp.org
<jackdaniel>
it searches in many sources (pcl, clhs, clim spec, clx etc)
<emaczen`>
jackdaniel: I see... that is kinda lame, I would have never figured that out myself
<emaczen`>
the looked in the SBCL docs for run-program too
<jackdaniel>
heh
<emaczen`>
isn't set for property-lists of a symbol?
<jackdaniel>
quoting from the spec: (set symbol value) == (setf (symbol-value symbol) value)
<jackdaniel>
so i *foo* has a value *bar*, then (set *foo* 3) will be (setf *bar* 3)
<iqubic>
can you do (setf (symbol-value symbol) value)?
<iqubic>
or does that make no sense?
<loke>
iqubic: Yes. ANd it makes sense.
<jackdaniel>
iqubic: if it is qouted in the linked example, then why not? I highly recommend reading both linked pages and if you still have questions *after that* asking them here :)
<iqubic>
What is the difference between (symbol-value symbol) and ('symbol) ?
<beach>
iqubic: That means that you can use it with SETF.
<beach>
iqubic: Do you still not have a REPL?
<iqubic>
I have a repl. I just don't know how to use it to answer these questions.
<beach>
iqubic: Do you know what the quote character means? If not, you definitely need to take a break and go read a book.
<iqubic>
I know what the quote character means.
<beach>
iqubic: Tell me, please.
<iqubic>
('symbol) is the syntax. ' is a reader macro that expands to the function (quote symbol) which returns the symbol exactly as it is, with out evaluation
<beach>
So what does the reader return when it sees ('symbol)?
<iqubic>
It returns symbol, exactly as it is. No evaluation is done at all. ('symbol) => symbol.
<beach>
THE READER, not the evaluator.
<beach>
What does THE READER return.
dec0n has joined #lisp
<emaczen`>
I'm running (sb-ext:run-program ...) but when the external sbcl program's heap becomes exhausted I am dropped into ldb. I just want to exit from this and for my main program to continue.
smasta has quit [Ping timeout: 260 seconds]
<beach>
iqubic: If the reader return (quote <something>) when it sees '<something>, then what does it return when it sees ('<something>)?
<iqubic>
according to my repl the reader returns ('symbol)
<emaczen`>
I want this to be done programmtically of course
sz0 has joined #lisp
shka has quit [Ping timeout: 248 seconds]
<beach>
iqubic: Answer my question please.
Karl_Dscc has joined #lisp
<iqubic>
Or wait, I was reading the input as if it were the output. When the reader sees ('symbol) it returns ((quote symbol))
<beach>
Right.
fikka has quit [Ping timeout: 256 seconds]
red-dot has joined #lisp
<beach>
So, in your opinion, what case applies if you look at 3.1.2.1?
<beach>
iqubic: 3.1.2.1.1, 3.1.2.1.2, or 3.1.2.1.3?
<jackdaniel>
emaczen`: non-trivial - when sbcl drops into ldb process doesn't exit whatsoever
<iqubic>
I think the answer is 3.1.2.1.1 but I'm not too sure.
<jackdaniel>
maybe wrapping your program in handler-case and catchin heap exhausted (and exitting application) would do what you want
<beach>
iqubic: So you don't know that (<something>) is a CONS?
<beach>
iqubic: Then you have to go read a book on Common Lisp.
<emaczen`>
jackdaniel: I'm not aware of any heap exaustion condition?
<iqubic>
I don't know that. You are right.
<iqubic>
I am still very much a beginner.
<iqubic>
I should go kill myself
<jackdaniel>
minion: tell iqubic about pcl
<minion>
iqubic: direct your attention towards pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
<beach>
That I have figured out. What I haven't figured out is why you prefer asking trivial questions in #lisp (which is not a Common Lisp support channel) rather than reading a book.
<jackdaniel>
emaczen`: I'm not sure if there is such thing in sbcl
<emaczen`>
ccl?
<jackdaniel>
emaczen`: OK, I know: try --disable-ldb
<iqubic>
for some reason I think that a thing is only a cons if it is a list.
<jackdaniel>
then your program will simply crash if heap is exhausted
<iqubic>
I don't think that a function application is a list, is it?
<emaczen`>
jackdaniel: alright, I am trying it out
<jackdaniel>
lmk if it worked
<beach>
emaczen`: Such a condition would be hard to implement. I mean, if the heap is exhausted, how does it allocate space for the condition instance? And what would you do when it is signaled? Examine the stack? That requires form evaluation, taking up even more heap space.
<iqubic>
am I right? or am I just barking up the wrong tree?
<jackdaniel>
beach: ECL has a safety preallocated heap space for such situations
<beach>
jackdaniel: I can imagine.
<emaczen`>
jackdaniel: It worked, it just kept continuing
<jackdaniel>
cool
<beach>
iqubic: Yes, (consp object) implies (listp object), but not the other way around.
<emaczen`>
jackdaniel: Yep! thanks, now I can go to bed and my program should run all night, and I don't have to be here to restart it when it drops into ldb!
smurfrobot has quit [Remote host closed the connection]
<beach>
It says that the precedence list is cons, list, sequence, t.
<beach>
iqubic: That means a cons is a list, a list is a sequence, and a sequence is a t.
<jackdaniel>
emaczen`: good night then :)
guna_ has quit [Ping timeout: 248 seconds]
<emaczen`>
jackdaniel: hah not quite yet, but I am happy
igemnace has joined #lisp
kini has quit [Quit: No Ping reply in 180 seconds.]
sunwukong has joined #lisp
<pjb>
iqubic: again, it depends on what the symbol designates.
<pjb>
iqubic: if the symbol designates a lexical variable, then its value will be different from (symbol-value symbol).
<pjb>
iqubic: on the other hand, if it designates a dynamic variable, then its value will be that of (symbol-value symbol).
<johnnymacs>
How can I compile common lisp to webassembly?
smurfrobot has joined #lisp
<Shinmera>
You cannot.
<Shinmera>
Unless you write a compiler that does it.
<jackdaniel>
building interpreter is an option too
<johnnymacs>
Well anything that can be compiled to llvm should be compileable to webasm
<Shinmera>
It's not that easy.
<jackdaniel>
johnnymacs: if there is gcc which can produce webassembly binaries, you could compile ecl or clisp
<jackdaniel>
or clang whatsoever
Murii has joined #lisp
<Shinmera>
Anyway, good luck shipping like 10-20mb of wasm CL runtime or whatnot to run your few kilobytes of actual CL code.
<jackdaniel>
for instance there were builds of ECL to NaCL and pNaCL (obsolete chrome runtimes)
<didi>
How do I write a `check-type' that accepts both 'eq and #'eq?
lerax has joined #lisp
<Shinmera>
didi: (or symbol function), if you're talking about any function, and not specifically eq.
<jackdaniel>
Shinmera: given wasm binaries are not much bigger than linux ones, ecl should fit in around 1mb, what is comparable to some js scripts I saw in production
<jackdaniel>
then if you have time and resolve try compiling ecl and clisp and see how far you can get ;)
damke has quit [Ping timeout: 264 seconds]
z3t0 has quit [Ping timeout: 265 seconds]
<|3b|>
(check-type x (member eq #.#'eq)) ?
<Shinmera>
Euch
<didi>
|3b|: Uh, that might work.
<Shinmera>
Anyway, checking a value for a certain... well, value, with a type, seems just plain wrong to me
<|3b|>
check-type lets you replace the value, so assert isn't quite the same thing
<didi>
Shinmera: Use case: I have a data structure that uses only eq, eql, equal, or equalp as a test.
<didi>
I want to put some speed bumps at the external API.
<didi>
Something more than a reminder inside the docstring.
<heisig>
lerax: This is a nice little project. Since you decided to represent statements as lists, have you considered using DEFSTRUCT with (:type list)? Then you get accessors and predicates for free.
fikka has joined #lisp
<lerax>
This a old project that I'm re-touching this again now. Probably I'll define later better data-structures for this. On those days, I just was trying getting fun with propositional logic and Lisp. Later that I read some books... well, things changed. Yes, I need review that.
smasta has joined #lisp
<beach>
johnnymacs: Even if you manage to translate Common Lisp to webassembly, you still need a complete Common Lisp system in the target (I assume a browswer), including all the "library" functions, the memory manager, etc.
<lerax>
But I don't have sure if defstruct for this specific problem is a good idea because in general manipulating lists sometimes is basic always I need to parsing logic statements... but well, maybe with defstruct I can reduce the verbosity.
hhdave has joined #lisp
<beach>
lerax: With standard classes, perhaps even more.
<heisig>
lerax: Yes, listen to beach.
<beach>
Heh, thanks!
<heisig>
lerax: Unless you are under severe performance constraints and know what you are doing, represent your data with CLOS.
fikka has quit [Ping timeout: 240 seconds]
smasta has quit [Ping timeout: 256 seconds]
<lerax>
Thanks for all the advices : D
<beach>
Anytime.
z3t0 has joined #lisp
rapidshot64 is now known as kozy
_cosmonaut_ has joined #lisp
z3t0 has quit [Ping timeout: 248 seconds]
d4ryus1 is now known as d4ryus
z3t0 has joined #lisp
_main_ has joined #lisp
pfdietz has quit [Ping timeout: 255 seconds]
__main__ has quit [Ping timeout: 276 seconds]
_main_ is now known as __main__
z3t0 has quit [Ping timeout: 260 seconds]
pfdietz has joined #lisp
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #lisp
smurfrobot has quit [Remote host closed the connection]
daydayup_ has joined #lisp
smurfrobot has joined #lisp
fikka has joined #lisp
smurfrobot has quit [Ping timeout: 256 seconds]
smurfrobot has joined #lisp
z3t0 has joined #lisp
orivej has joined #lisp
z3t0 has quit [Remote host closed the connection]
daydayup__ has joined #lisp
z3t0 has joined #lisp
z3t0 has quit [Remote host closed the connection]
z3t0 has joined #lisp
daydayup_ has quit [Ping timeout: 256 seconds]
smasta has joined #lisp
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
smasta has quit [Ping timeout: 240 seconds]
z3t0 has quit [Remote host closed the connection]
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
daydayup__ has quit [Ping timeout: 260 seconds]
z3t0 has joined #lisp
sukaeto has quit [Ping timeout: 256 seconds]
sjl__ has joined #lisp
z3t0 has quit [Ping timeout: 260 seconds]
sjl__ has quit [Ping timeout: 264 seconds]
makomo has joined #lisp
zooey has quit [Remote host closed the connection]
zooey has joined #lisp
solyd has quit [Quit: solyd]
python476 has joined #lisp
solyd has joined #lisp
smurfrobot has quit [Remote host closed the connection]
didi has left #lisp ["there are always reasons to /part"]
smasta has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
wigust has quit [Ping timeout: 240 seconds]
smurfrobot has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
Xal has quit [Ping timeout: 256 seconds]
smasta has quit [Ping timeout: 256 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
Xal has joined #lisp
attila_lendvai has joined #lisp
makomo has quit [Quit: WeeChat 1.9.1]
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]
markong has joined #lisp
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]
Xal has quit [Ping timeout: 260 seconds]
igemnace has quit [Quit: WeeChat 2.0.1]
Xal has joined #lisp
attila_lendvai has quit [Read error: Connection timed out]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
smurfrobot has quit [Remote host closed the connection]
nirved has joined #lisp
EvW1 has joined #lisp
thinkpad has quit [Quit: lawl]
mjl has quit []
thinkpad has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
wigust has joined #lisp
mjl has joined #lisp
smurfrobot has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
thinkpad has quit [Client Quit]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
jameser has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
smasta has joined #lisp
attila_lendvai has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
m00natic has joined #lisp
splittist has quit []
splittist has joined #lisp
attila_lendvai has joined #lisp
smasta has quit [Ping timeout: 260 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
jameser has quit [Ping timeout: 240 seconds]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
jameser has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
<flip214>
binghe: SBCL is released as 1.4.4 already...
thinkpad has joined #lisp
fikka has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
Devon has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
<Xach>
how time flies
fikka has joined #lisp
<TMA>
time flies like an arrow.
<Shinmera>
TMA: because it hits you in the end?
<flip214>
"banana flies like a fruit", is that the correct second part of the quote?
orivej has quit [Ping timeout: 248 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
<beach>
"fruit flies like a banana", but there are actually many more ways of parsing that sentence. It could mean "please measure the time that flies take, just the way that you would measure the time an arrow takes".
attila_lendvai has joined #lisp
<beach>
Or "please measure the time that flies take, just the way an arrow would measure the time that flies take".
milanj has joined #lisp
Murii has quit [Ping timeout: 240 seconds]
dec0n has quit [Quit: Leaving]
karswell_ has quit [Read error: Connection reset by peer]
iqubic` has joined #lisp
karswell_ has joined #lisp
nowhereman_ has quit [Ping timeout: 248 seconds]
iqubic has quit [Ping timeout: 265 seconds]
moei has joined #lisp
nullman has quit [Ping timeout: 240 seconds]
nullman has joined #lisp
gz_ has quit []
gz_ has joined #lisp
alms_clozure has quit []
alms_clozure has joined #lisp
loli has quit [Ping timeout: 252 seconds]
arbv has quit [Ping timeout: 252 seconds]
red-dot has joined #lisp
arbv has joined #lisp
smasta has joined #lisp
solyd has quit [Quit: solyd]
damke_ has joined #lisp
solyd has joined #lisp
smasta has quit [Ping timeout: 240 seconds]
rumbler31 has quit [Remote host closed the connection]
damke has quit [Ping timeout: 264 seconds]
anaumov has quit [Remote host closed the connection]
deng_cn has quit [Read error: Connection reset by peer]
<shrdlu68>
I have a couple of inline functions and slime's compiler notes are confusing.
shifty has quit [Ping timeout: 268 seconds]
deng_cn has joined #lisp
aindilis has quit [Remote host closed the connection]
<shrdlu68>
What does it mean when a whole function call is underlined? As is _(foo bar bar)_
nowhereman_ has joined #lisp
<flip214>
shrdlu68: what does the note say?
<flip214>
perhaps that call wasn't inlined because the function definition wasn't available yet.
dddddd has joined #lisp
Murii has joined #lisp
<shrdlu68>
"The first argument is a T, not a FIXNUM"
<|3b|>
well, can't be much more specific than that, somewhere in the inlined code it didn't know the type of the first argument of something
<|3b|>
*it can't
<|3b|>
(there could be multiple calls to same inlined function with different notes, do it can't really point you at the original source either)
<|3b|>
if you look at the repl, i think it might try to give you more info
FreeBirdLjj has joined #lisp
makomo has joined #lisp
danlentz has quit []
mbrock has quit []
danlentz has joined #lisp
mbrock has joined #lisp
EvW has joined #lisp
<shrdlu68>
|3b|: I would expect it to issue the compiler note when I compile the inlined function itself in that case.
billstclair has quit []
billstclair has joined #lisp
<Shinmera>
When it inlines it, well, inlines the code, which will lead to different inferences.
orivej has joined #lisp
<|3b|>
yeah, inlining wouldn't be as much use if it didn't change that sort of thing :)
<Shinmera>
For instance (defun foo (a) (typecase a (integer 1) (character 2))) (defun bar () (foo 0)) is going to eliminate the useless branch if foo is inlined.
jeremyheiler has quit []
<Shinmera>
The optimisation constraints of the inliner are also going to affect the inlinee code.
jeremyheiler has joined #lisp
<Shinmera>
So optimisation notes that you didn't see for the inlinee might start showing up.
lambda-p has joined #lisp
Chream has quit [Ping timeout: 260 seconds]
XachX has quit []
XachX has joined #lisp
<shrdlu68>
I see.
attila_lendvai has quit [Quit: Leaving.]
<Shinmera>
In the most basic sense think of inlining as copy-pasting the code before compiling for real.
solyd has quit [Quit: solyd]
_cosmonaut_ has quit [Ping timeout: 255 seconds]
arbv has quit [Ping timeout: 256 seconds]
arbv has joined #lisp
dec0n has joined #lisp
asarch has joined #lisp
dec0n has quit [Remote host closed the connection]
EvW has quit [Ping timeout: 265 seconds]
azahi has quit [Changing host]
azahi has joined #lisp
red-dot has quit [Read error: Connection reset by peer]
red-dot has joined #lisp
jameser_ has joined #lisp
Murii has quit [Ping timeout: 256 seconds]
jameser has quit [Ping timeout: 255 seconds]
smasta has joined #lisp
_cosmonaut_ has joined #lisp
smasta has quit [Ping timeout: 256 seconds]
Bike has joined #lisp
<shrdlu68>
How do I fix "Unable to optimize because Upgraded element type of array is not known at compile time"
<flip214>
beach: I'm afraid that HR will do that for me if I don't intervene soon ;/
flamebeard has quit [Quit: Leaving]
<flip214>
Shinmera: no code left over from last years' registration pages?
<Shinmera>
last year still used the old website
<Shinmera>
and I'm frankly disgusted by what a mess that was
<flip214>
yeah, so it's not coding per se but data entry?
<beach>
flip214: I see, yes.
<Shinmera>
No, I'm developing a new registration process.
<Shinmera>
Previously you had to manually make a payment via bank transfer.
fikka has quit [Ping timeout: 276 seconds]
<beach>
And now?
<Shinmera>
Now you'll be able to either do that, or pay with credit card.
<Shinmera>
via Stripe.
FreeBirdLjj has joined #lisp
<beach>
OK. I prefer the bank transfer, since I already have the IBAN registered.
<Shinmera>
The latter being preferable because it means all your data will be automatically recorded with the transaction.
deng_cn has quit [Read error: Connection reset by peer]
TCZ has quit [Quit: Leaving]
<Shinmera>
And thus requires zero manual labour
<Shinmera>
The bank transfer stuff is annoying because it means someone has to manually confirm that you are you and that you paid your registration.
warweasle has joined #lisp
<flip214>
no CSV export of the transactions that could be matched up?
<flip214>
*automatically matched up
<Shinmera>
I don't know what Didier does with his bank stuff and don't think it's my business either.
<Shinmera>
What I can do is offer CC payment which should be more convenient for both payer and payee.
<flip214>
understood
<Shinmera>
Since it's a single flow integrated into the registration form.
deng_cn has joined #lisp
fikka has joined #lisp
<flip214>
is there some easy way to tag strings as different classes? like firstname, surname, street, etc.
<flip214>
a simple (DEFCLASS name (STRING)) doesn't work, of course (invalid superclasS)
<Shinmera>
There is not.
<flip214>
thanks
<Shinmera>
Plus it sounds redundant.
<Shinmera>
Or rather, backwards
<Shinmera>
Whether a string is a name, street, or whatever depends on who looks at it, so that information should be encoded in the container.
<Shinmera>
eg (registration () (name street email))
<Shinmera>
*defclass
<flip214>
well, currently I'm storing a list of strings (just to print them out in the same order again)
<flip214>
but now I need to filter based on parsed "type"
hiroaki has quit [Ping timeout: 276 seconds]
damke_ has quit [Ping timeout: 264 seconds]
FreeBirdLjj has quit [Ping timeout: 268 seconds]
damke has joined #lisp
solyd has joined #lisp
compro has joined #lisp
<_death>
one way is to use a weak-key hash table for the mapping
scymtym has joined #lisp
FreeBirdLjj has joined #lisp
<Shinmera>
Or don't store a list of strings, but a list of compund objects that carry that associated information
<_death>
yep
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<_death>
since strings aren't usually used for their identity the hash-table solution could be fragile
<flip214>
Shinmera: yeah, that's what I'm doing now... is there a way to embed the string structure in my class slot and not have another indirection, to conserve memory?
<Shinmera>
A string indirection is free as long as the type is known as the header will just be a constant offset to the contents.
<Shinmera>
At least, if it's a simple-string.
<Shinmera>
Either way
<Shinmera>
are you sure you need to optimise right now?
SaganMan has quit [Quit: WeeChat 1.6]
<flip214>
I already ran into memory limits quite a few times for that, so yes
<Shinmera>
Just increase the heap
<flip214>
Shinmera: yeah, thanks, did that already. 16GB (minus OS etc.) is too small.
<Shinmera>
Yeesh. What are you even processing?
binghe has joined #lisp
rumbler3_ has joined #lisp
<flip214>
one of the input files is 19M lines, each being parsed into multiple items... so 2 tagged-strings in a line would be 2*16 byte (?) for the indirection
<flip214>
or 32*20M ~ 640MB just for that indirection
jmercouris has joined #lisp
<Shinmera>
Well, you need to know a string's length, you can't get around that
<Shinmera>
and even if you could, you cannot store raw data in a slow.
<Shinmera>
*slot
<Shinmera>
Besides, if you are sure you need to keep that much data around at all times (rather than, say, stream it), then classes will be too heavy anyway and you probably want structs instead.
<flip214>
thanks, that's a possible optimization
<Shinmera>
My advice would be to investigate other means of processing your data (stream oriented) so that you don't need that much memory to begin with.
FreeBirdLjj has quit [Ping timeout: 256 seconds]
rumbler3_ has quit [Ping timeout: 256 seconds]
deng_cn has quit [Read error: Connection reset by peer]
iqubic` is now known as iqubic
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
deng_cn has joined #lisp
compro has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
<_death>
or store offsets in memory instead of strings
<asarch>
In the DO section: "As with the variable definitions in a LET, if the init-form is left out, the variable is bound to NIL. Also as with LET, you can use a plain variable name as shorthand for a list containing just the name."
<Xach>
That's not a question!
<asarch>
How is this plain variable name?
<Xach>
oh ok
<Xach>
sorry i got impatient :(
<asarch>
Mea culpa
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<beach>
asarch: It means you can write either (let ((x nil)) (let ((x)) ...) or (let (x) ...)
<dlowe>
it means like you can do (let ((foo nil)) ...) and (let ((foo)) ...) you can also do (let (foo) ...)
<Xach>
same with DO
* asarch
takes notes...
<dlowe>
or (do (foo) () ...)
nika has quit [Quit: Leaving...]
m00natic has quit [Remote host closed the connection]
_cosmonaut_ has quit [Remote host closed the connection]
hhdave has quit [Ping timeout: 240 seconds]
<beach>
asarch: Let me take advantage of your question to point out the (moral, not semantic) difference between (let ((x nil)) (let ((x '()) and (let (x).
<beach>
In the first case, you initialize x either to a Boolean false value or to some default value. It is fine to use x before assigning to it and to (conditionally) assign to it before using it, but you would not unconditionally assign to it before using it.
<beach>
In the second case, you initialize x to the empty list. Again, it is fine to use x before assigning to it and to (conditionally) assign to it before using it, but you would not unconditionally assign to it before using it.
<beach>
In the third case, you should unconditionally assign to it before using it.
<beach>
I don't really see any use for (let ((x)), I must admit.
FreeBirdLjj has joined #lisp
<beach>
I guess it could be useful in macro expansion code.
<beach>
`(let ((x ,@(if ....)))
<asarch>
Why I can't: (let (x 1) (...))?
<beach>
Because that would be ambiguous.
<_death>
you can, just write an asarch:let macro
<beach>
asarch: Imagine (let (x y) ... Is that the same as (let ((x y)) or the same as (let ((x nil) (y nil))?
<asarch>
I guess they actually are
<beach>
are what?
<asarch>
Re-define the standard LET macro _death?
<beach>
asarch: You can safely forget that advice from _death. :)
<asarch>
I mean, why ambiguous?
solyd has quit [Quit: solyd]
smasta has joined #lisp
<shrdlu68>
asarch: Imagine the case where you want to initialize x and y to nil.
<beach>
asarch: Because of what I wrote. It could either mean both X and Y to NIL, or binding X to Y.
<asarch>
I see
<shrdlu68>
So, you could do (let ((x nil) (y nil)) or (let (x y)
<shrdlu68>
The second form would not be possible in a let form that took the form (let (x 1) (y 2)
<_death>
beach: it wasn't meant as an advice, just an attitude perhaps meant for someone more experienced ;)
<shrdlu68>
You'd have to always use (let (x nil) explicitly. But as _death points out, it's entirely possible to create such a let macro.
Ven`` has joined #lisp
smasta has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<stacksmith>
Alexandria's when-let compromises: if you only have a single binding, you can (when-let (a whatever) ...), and if you have multiple, it looks like (let).
<stacksmith>
Mainly because when-let is generally used with a single binding...
<stacksmith>
The 'founding fathers' could have gone with a lambda-list-like syntax: a name or a list containing a name and an initializer... (let (a b (c 9)) ...)
<stacksmith>
Oh, they did...
<asarch>
Yeah! Thank you guys
<asarch>
Thank you very much :-)
<_death>
stacksmith: multiple bindings for when-let is a relatively new thing
sz0 has quit [Quit: Connection closed for inactivity]
FreeBirdLjj has joined #lisp
<stacksmith>
_death: I am not sure how useful they are - I always wind up with the second form needing unless, for some reason :)
<stacksmith>
And start thinking about cond-let...
nowhereman_ has joined #lisp
<_death>
don't think I used them.. could be once or twice
Devon has quit [Ping timeout: 240 seconds]
jmercouris has quit [Ping timeout: 276 seconds]
ig88th has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
daydayup has joined #lisp
daydayup has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
daydayup has joined #lisp
smurfrobot has quit [Remote host closed the connection]
daydayup_ has joined #lisp
daydayup has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 260 seconds]
warweasle has quit [Quit: later]
<shrdlu68>
Is it safe to assume that arithmetic on rationals is slower than short floats?
<shrdlu68>
...of the same "value"
<Shinmera>
Depends on your implementation and your FPU
<shrdlu68>
But it's a safe assumption generally, right?
fikka has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
daydayup_ has quit [Quit: Leaving]
<Shinmera>
Rational operations typically require reduction after the actual operation, which is likely expensive
<Shinmera>
So the answer is probably
<Bike>
plus rationals can get bignums
<Bike>
so i'd say yeah it's a reasonable assumption
nowhereman_ has quit [Remote host closed the connection]
nowhereman_ has joined #lisp
<Shinmera>
Either way, usually you pick rationals for precision purposes
<Shinmera>
In which case floats lose by default
raynold has joined #lisp
FreeBirdLjj has joined #lisp
smurfrobot has joined #lisp
<Bike>
if you're using short floats precision can't be much of a priority, heh
smurfrobot has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
smurfrobot has joined #lisp
orivej has quit [Ping timeout: 276 seconds]
dieggsy has joined #lisp
iqubic has quit [Ping timeout: 276 seconds]
<asarch>
In "(do ((n 0 (1+ n)) (cur 0 next) (next 1 (+ cur next))) ((= 10 n) cur))", is next part of the DO statement?
Xal has quit [Ping timeout: 260 seconds]
smurfrobot has quit [Ping timeout: 260 seconds]
Ven` has joined #lisp
<_death>
no, it's a name of a variable, also introduced in this form
mnoonan_ has joined #lisp
<asarch>
So, in "(cur 0 next)", cur = 0 and next = nil?
Ven`` has quit [Ping timeout: 248 seconds]
<_death>
why nil?
<rme>
If you macroexpand the do form, you'll probably clearly see what is going on.
FreeBirdLjj has joined #lisp
<_death>
asarch: cur is zero in the first iteration, and then receives the value of next at the end of the iteration
<_death>
you can also experiment in the repl to get intuition
<asarch>
Yeah, I get 55 from SLIME
rippa has quit [Ping timeout: 248 seconds]
flak has joined #lisp
<asarch>
Ok. Let's go by parts. Accordingly with the book, the general form of DO is: (do (variable-definition*) (end-test-form result-form*) statement*)
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<asarch>
In this expression "(do ((n 0 (1+ n)) (cur 0 next) (next 1 (+ cur next))) ((= 10 n) cur))", the (variable-defition*) part is "((n 0 (1+ n))", right?
Ven` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FreeBirdLjj has joined #lisp
<Bike>
((n 0 (1+ n)) (cur 0 next) (next 1 (+ cur next))) are the variable definitions. (= 10 n) is the end-test-form. (cur) is the result forms.
<oleo>
ya
<asarch>
Thank you!
<oleo>
successfull lisp covers it good
varjag has joined #lisp
aindilis has quit [Remote host closed the connection]
<oleo>
wth
<oleo>
i thought you'd need do* for ath
<oleo>
taht*
aindilis has joined #lisp
<oleo>
ah, i see it's in the update position
rumbler3_ has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
<asarch>
What would be the "statement*" part in the expression?
<asarch>
Is it the same as "cur"?
<oleo>
there's no body in that
<Bike>
I think it's empty.
<oleo>
jep
<oleo>
it's allowed to be empty
fikka has joined #lisp
<oleo>
it's for side effects
FreeBirdLjj has quit [Ping timeout: 256 seconds]
<asarch>
I just added: (format t "Values: n: ~d cur: ~d next: ~d~%" n cur next)
smasta has joined #lisp
<oleo>
well if the one of the variables is not what you return, but you rather accumulate in the body or so....that can be done yes
rumbler3_ has quit [Ping timeout: 264 seconds]
aindilis has quit [Remote host closed the connection]
aindilis has joined #lisp
<stacksmith>
Can anyone think of a reason why SBCL compiles an extra check against structure layout when one would do? Given a structure mytype, an expression (if (mytype-p foo) 1 2) results in a double conditional, with two different things compared to <SB-KERNEL:Layout for MYTYPE>?
<Bike>
what are the things?
<stacksmith>
I cannot decipher the indirections. In one case it's RAX after some loadings, in the second case, an indirect DWORD PTR [RAX+17] in my case.
<Bike>
well, it might be just part of the necessary procedure then.
emaczen` has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
FreeBirdLjj has joined #lisp
<stacksmith>
Somehow that is not very satisfying.
<_death>
such a question should include the form, its disassembly, your expectations and the deviation
smasta has quit [Ping timeout: 252 seconds]
<stacksmith>
_death: true enough; however, in absence of inheritance what would _ever_ be a reason to check type more than once? It is more of a philosophical question - or a puzzle if you will, as in can you think of a scenario where checking exactly twice makes sense?
<_death>
it's not clear to me that it "checks twice".. I see a single call to mytype-p
<stacksmith>
full optimization on...
<stacksmith>
I've run across this a few times, leading me to veer away from dispatching on type and storing redundant type data in structures when optimization is necessary... But I just cannot think of a reason why...
<Bike>
it sounds like you're looking at a disassembly
<Bike>
it may not be checking the type more than once
<stacksmith>
Bike: it compares something against the 'layout' twice, and there is an extra conditional
FreeBirdLjj has quit [Ping timeout: 268 seconds]
<Bike>
i'm just saying, the assembly is nontrivial to interpret
<stacksmith>
But doable to those skilled in the art.
<Bike>
i'm looking at a similar diassembly. it looks like it compares with the layout, then jumps to a return if the comparison succeeds.
<stacksmith>
With (speed 3)(safety 0)(debug 0)? I have 4 conditional jumps and 5 labels in my disassembly of (defun xtest (obj) (declare (optimize (speed 3) (safety 0) (debug 0))) (if (ldesc-p obj) 1 2))
<Bike>
yeah, i have a couple jumps
<stacksmith>
Do you have two separate comparisons against the layout?
<_death>
stacksmith: the first comparison may be for the object being of the exact type mytype (the usual), the second comparison may be needed for proper subtypes..
<shrdlu68>
Does anyone happen to know the hash function used by SBCL when :test = #'equal?
<Bike>
there are two comparisons, yes
fourier has joined #lisp
<Bike>
but it looks like it doesn't have to go through both of them for any comparison
<Bike>
so it's probably something like _death said
<stacksmith>
that's what I thought, but there are no subtypes, and SBCL knows that. I can see CLOS checking just in case something changes, but structs...
<Bike>
you could define a new one later
<Bike>
sbcl doesn't know you won't
<Bike>
in the first place, is this actually a slow part of your code?
alexmlw has joined #lisp
<stacksmith>
Bike: true, but structs are not generally too forward-looking in my experience, unlike CLOS.
<oleo>
why are there no subtypes ?
<Bike>
many kinds of redefinition are forbidden, but that doesn't change the fact that you could define a subtype
<oleo>
wouldn't obj be subtype of t ?
<oleo>
and the opposite of nil ?
<stacksmith>
oleo: there are no subtypes of obj.
fourier has quit [Changing host]
fourier has joined #lisp
<Bike>
don't worry about oleo
shka has joined #lisp
<stacksmith>
Anyway - thanks, I think it makes sense.
<stacksmith>
Maybe.
FreeBirdLjj has joined #lisp
<_death>
(declaim (sb-ext:freeze-type mytype))
<_death>
"The sb-ext:freeze-type declaration declares that a type will never change, which can make type testing (typep, etc.) more efficient for structure types."
warweasle has joined #lisp
<stacksmith>
_death - bingo! Thanks.
nowhereman_ has quit [Ping timeout: 256 seconds]
FreeBirdLjj has quit [Ping timeout: 276 seconds]
random-nick has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 264 seconds]
fourier has quit [Remote host closed the connection]
fikka has joined #lisp
<Josh_2>
Does CLX let me get the position of my mouse in my current x session or only in one created with CLX?
<flip214>
Shinmera: stream oriented isn't possible, some early data might need fixing up when the later items are processed...
<flip214>
the parts that can do streaming already are.
<flip214>
but thanks for taking an interest!
solene has left #lisp ["Leaving"]
<Xach>
Josh_2: current
<Josh_2>
Thanks Xach
random-nick has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
<Xach>
Josh_2: when X was being specified, CL was considered very much a peer of C and other potential client languages
<Josh_2>
Alrighty. I just gotta work out how to get the mouse input now.
vtomole has joined #lisp
Rawriful has joined #lisp
BitPuffin has quit [Remote host closed the connection]