cro__ has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
cromachina has joined #lisp
drewc has quit [Read error: Connection reset by peer]
sz0 has quit [Quit: Connection closed for inactivity]
rumbler31 has quit [Ping timeout: 245 seconds]
smurfrobot has joined #lisp
FreeBirdLjj has joined #lisp
nowhere_man has quit [Ping timeout: 240 seconds]
smurfrobot has quit [Ping timeout: 268 seconds]
nowhere_man has joined #lisp
FreeBirdLjj has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #lisp
pagnol has joined #lisp
pagnol has quit [Client Quit]
drewc has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 256 seconds]
aindilis has quit [Ping timeout: 240 seconds]
arescorpio has joined #lisp
epony has joined #lisp
smokeink has joined #lisp
FreeBirdLjj has joined #lisp
lnostdal has quit [Ping timeout: 255 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
FreeBirdLjj has quit [Ping timeout: 248 seconds]
epony has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #lisp
emaczen has joined #lisp
ebzzry_ has quit [Ping timeout: 256 seconds]
epony has joined #lisp
learning has quit [Remote host closed the connection]
learning has joined #lisp
pierpa has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
lnostdal has joined #lisp
Chream_ has joined #lisp
FreeBirdLjj has joined #lisp
rumbler31 has joined #lisp
Kaisyu7 has quit [Remote host closed the connection]
Kaisyu7 has joined #lisp
FreeBirdLjj has quit [Ping timeout: 252 seconds]
learning has quit [Remote host closed the connection]
Amplituhedron has quit [Ping timeout: 256 seconds]
rumbler31 has quit [Ping timeout: 240 seconds]
learning has joined #lisp
smurfrobot has joined #lisp
learning has quit [Remote host closed the connection]
smurfrobot has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #lisp
makomo_ has quit [Ping timeout: 245 seconds]
nika has joined #lisp
FreeBirdLjj has quit [Ping timeout: 245 seconds]
nika has quit [Ping timeout: 245 seconds]
shifty has joined #lisp
k-hos has quit [Read error: Connection reset by peer]
k-hos has joined #lisp
sjl has quit [Ping timeout: 260 seconds]
sjl has joined #lisp
asarch has joined #lisp
sjl has quit [Ping timeout: 248 seconds]
safe has joined #lisp
Guest51114 has quit [Ping timeout: 245 seconds]
lnostdal has quit [Ping timeout: 255 seconds]
chat_ has joined #lisp
smurfrobot has joined #lisp
voidlily_ has quit [Ping timeout: 276 seconds]
smurfrobot has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 260 seconds]
d4ryus1 has joined #lisp
learning_ has joined #lisp
lnostdal has joined #lisp
d4ryus has quit [Ping timeout: 256 seconds]
<smokeink>
Wouldn't it be nice to have a ; before the => in the hyperspec, so that one can copy parts of the examples into the repl without having to manually delete the "=> result ..." ?
voidlily_ has joined #lisp
fisxoj has joined #lisp
fikka has joined #lisp
smasta has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 245 seconds]
<fouric>
smokeink: i know it's not the hyperspec, but phoe's ultraspec separates out the output from the code: http://phoe.tymoon.eu/clus/doku.php?id=cl:functions:bit&redirect=1id=cl:functions:sbit
<fouric>
...would anyone happen to know who maintains this excellent bot?
<fouric>
i'm interested in possibly adding a feature to it after the term ends
igemnace has joined #lisp
igemnace has quit [Client Quit]
igemnace has joined #lisp
<smokeink>
the thing is , one would like to paste more than 1 form into the repl , and then play with them. Copy pasting from the ultraspec seems a little better as it doesn't copy any "=>" but it still copies those results, which one doesn't need when fiddling inside the repl
<fouric>
oh, i get you
<smokeink>
and this should work in an offline ultraspec as well (for example in .chm format)
<smokeink>
or .txt format
<fouric>
hm, i wonder how difficult it would be to implement a button that hides the output for easy copy-paste
<smokeink>
So that one doesn't depend on the bloated browsers of these days & javascript and css and who-knows what
dmiles has quit [Read error: Connection reset by peer]
<smokeink>
"Returns the number of bits needed to represent integer in binary two's-complement format." does (integer-length) actually return the number of bits needed to represent the integer's value, ignoring the sign ? (the sign bit is not counted)
fikka has joined #lisp
razzy has quit [Ping timeout: 255 seconds]
<smokeink>
so 0 is represented as a single sign bit 0 and -1 as a single sign bit 1 , right? (integer-length) doesn't count the sign bit, so (integer-length 0) ==> 0 and (integer-length -1) ==> 0 . https://www.cs.cornell.edu/~tomf/notes/cps104/twoscomp.html
stacksmith has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 276 seconds]
dmiles has joined #lisp
<pjb>
emaczen: ok.
marusich has quit [Ping timeout: 256 seconds]
marusich has joined #lisp
schoppenhauer has quit [Ping timeout: 245 seconds]
schoppenhauer has joined #lisp
razzy has joined #lisp
fikka has joined #lisp
razzy has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
dddddd has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 260 seconds]
moei has quit [Quit: Leaving...]
fikka has joined #lisp
sjl has joined #lisp
<beach>
Good morning everyone!
fikka has quit [Ping timeout: 240 seconds]
sjl has quit [Ping timeout: 252 seconds]
<fouric>
Good morning!
smokeink has quit [Ping timeout: 256 seconds]
al-damiri has joined #lisp
damke_ has joined #lisp
smokeink has joined #lisp
damke has quit [Ping timeout: 264 seconds]
rippa has joined #lisp
smurfrobot has joined #lisp
<fouric>
Hm, anyone have any ideas for why `(defun test () (let ((x 1)) (break) x))` shows the TEST frame as having no locals in sly-db?
fikka has joined #lisp
<fouric>
I'm not exactly sure how proclaim and declaim work, but I evaluated both (PROCLAIM '(OPTIMIZE (DEBUG 3))) and (DECLAIM (OPTIMIZE DEBUG 3)) at the repl before compiling, and still nothing.
<beach>
fouric: My guess is that the compiler does "constant propagation".
<beach>
fouric: So it turns it into (defun test () (break) 1)
<smokeink>
on my machine it displays the Local X
<smokeink>
fouric: try to put that declaim in your sourcefile
smurfrobot has quit [Ping timeout: 268 seconds]
<fouric>
i was evaluating it at the repl, but i'll try putting it in a separate file
<fouric>
beach: it's sbcl, and darn, i was hoping that (debug 3) would disable that
<smokeink>
or try this: (defun test () (declare (optimize (debug 3))) (let ((x 1)) (break) x))
* fouric
creates foo.lisp
fikka has quit [Ping timeout: 276 seconds]
<beach>
fouric: I have (SPEED 0) in my .sbclrc in addition to (OPTIMIZE 3).
asarch has quit [Quit: Leaving]
<smokeink>
fouric: are you using slime? Is it saying [No locals] for that frame ?
<fouric>
yup!
<fouric>
or, well, i'm using Sly
<fouric>
...which should be functionally identical in this case, because it's a fork
<fouric>
hm, (declare (optimize (debug 3) (speed 0))) inside the defun didn't work
<smokeink>
yeah... :) I know how it feels when you want to see the damn local var and it refuses to reveal itself in the debugger
<fouric>
):
<fouric>
...aaaaaand it didn't work in a distinct file, either
<fouric>
lemme try bare sbcl
<fouric>
...how does one inspect a stack frame in sbcl's debugger
<smokeink>
then eval (test) , then L to see the locals
rumbler31 has joined #lisp
<fouric>
ty ty
<fouric>
There are no local variables in the function.
<fouric>
;-;
<fouric>
sbcl --version => SBCL 1.3.14.debian
<smokeink>
what sbcl are you using
<fouric>
latest is 1.4.x iirc?
<smokeink>
try 1.4.4
<fouric>
(the site is down so i can't check directly)
<fouric>
kk
<fouric>
oh, github
<fouric>
derp
<fouric>
is placing (declare (optimize (debug 3))) at the top of a file equivalent to placing it in every one of your function definitions?
* fouric
is waiting for sbcl to compile
<smokeink>
when you place it at the top of the file it should be declaim instead, I think
<smokeink>
declare is to be put only inside certain forms, such as defun
rumbler31 has quit [Ping timeout: 240 seconds]
<fouric>
got it, ty
* fouric
adds (speed 0) to declaim form in sbcl init file
<fouric>
ok, i actually got 1.4.5 because i cloned master, which i guess is...development?
* fouric
doesn't see a "stable" branch
<fouric>
ah! i see the local! :D
<fouric>
...so i suppose that i'm using this build of sbcl for the time being
<fouric>
ty smokeink, now i can observe my locals again ^-^
<smokeink>
you're welcome
<smokeink>
in your new sbcl does (step (/ 1 0)) give you this error ? : -314789226 fell through ETYPECASE expression. Wanted one of (SB-KERNEL:FDEFN FUNCTION) backtrace: (SB-DI::HANDLE-SINGLE-STE , ("foreign function: call_into_lisp, ("foreign function: funcall2" , ("foreign function: handle_single_step_trap
<fouric>
whoops, i quit it, lemme find again
<smokeink>
1.4.4 has a bug and gives that strange error
<beach>
fouric: So (SPEED 0) did it, like I mentioned 15 minutes ago?
<fouric>
nope, i get a straight up DIVISION-BY-ZERO condition
<smokeink>
I think it's not (speed 0)
<fouric>
beach: no, because i tried that with my 1.3.x and it didn't work
<smokeink>
cuz my .sbclrc doesn't have (speed 0) , it only has (debug 3)
<fouric>
both using declaim at the top of a test file and also declare in the defun form
<beach>
fouric: Got it.
<fouric>
ty for mentioning it though
<fouric>
i added (speed 0) to my .sbclrc anyway
<pillton>
It should be proclaim if you are putting it in your .sbclrc.
<fouric>
even if it didn't fix *this* problem, i don't have any need for speed at the moment - debuggability trumps all
<fouric>
pillton: oh, thanks!
<pillton>
Note that proclaim is a function so you will have to quote the declarations.
<smokeink>
thanks for pointing that out pillton, I was using declaim in .sbclrc :D
* fouric
quotes
smurfrobot has joined #lisp
<fouric>
smokeink: INTEGER-LENGTH does not include the sign bit
smurfrobot has quit [Read error: Connection reset by peer]
<smokeink>
it's correct : you can represent -16 as 10111 where the 1st one is the sign bit
Mutex7 has quit [Remote host closed the connection]
<smokeink>
16 or 16's complement can fit into 4 bits after the sign bit
damke has joined #lisp
<smokeink>
hm wait
<fouric>
"Returns the number of bits needed to represent integer in binary two's-complement format"
<fouric>
that *should* include the sign bit
<smokeink>
that description doesn't seem accurate to me
<fouric>
I agree.
<beach>
Negative numbers have an infinite number of leading 1s.
<fouric>
...but you can't differentiate between negative and positive numbers without that sign bit, right?
<beach>
Right.
<beach>
fouric: sign BITs.
<fouric>
wat
<beach>
There is always an infinite number of 0s or an infinite number of 1s.
damke_ has quit [Ping timeout: 264 seconds]
<fouric>
OK, "sign bits", then.
<smokeink>
just one isn't enough ? is it really needed to have infinitely many ?
fikka has quit [Ping timeout: 268 seconds]
<fouric>
Don't you still need 5 bits in order to represent -15?
<smokeink>
16 in binary is 10000 , but we can represent it with 4 bits instead: 1111
<beach>
Notice that (integer-length -1) is 0
<smokeink>
because 1 can be represented as 0
<smokeink>
but I 'm not sure, maybe what I said is wrong
<beach>
For positive numbers, leading 0s are not counted. For negative numbers, leading 1s are not counted.
<smokeink>
that must be the general convention, right? It's not just specific to common lisp
<fouric>
For the purposes of *representation*?
<beach>
smokeink: Not many languages have arbitrary precision integers.
<beach>
-16 is ....111110000 so (INTEGER-LENGTH -16) is 4.
<fouric>
beach: How do you disambiguate between positive and negative numbers if you're not counting those leading bits, then?
<beach>
fouric: integer-length is not meant to be used for distinguishing between positive and negative numbers.
<fouric>
What *is* it meant to be used for?
<beach>
fouric: What makes you think this information would be present in integer-length?
<beach>
fouric: Let me ask you this instead: what did you intend to use it for?
sjl has joined #lisp
<fouric>
Using it to calculate the number of bits that I need to store a number in memory.
<beach>
Then you need to add 1 to it.
<fouric>
...so the description is wrong.
deng_cn has quit [Read error: Connection reset by peer]
<fouric>
"Returns the number of bits needed to represent integer in binary two's-complement format." implies that it actually gives you back the number of bits you need to store the number
<fouric>
if you need to add 1, then it's not giving you the number of bits you need to store the number
<fouric>
it's giving you the number of bits that you need to store the number, -1
<fouric>
so it should read "Returns one less than the number of bits needed to represent integer in binary two's-complement format"
deng_cn has joined #lisp
axg has quit [Ping timeout: 256 seconds]
<beach>
fouric: You still need more than that, though. You need to store the number of digits as well.
<beach>
... in some form, like the length of the string or something.
<beach>
fouric: What representation for these bits in memory did you have in mind?
<fouric>
Two's-complement, with the sign bit leading the magnitude bits.
sjl has quit [Ping timeout: 252 seconds]
<beach>
fouric: That is not well defined. You also need to give the number of digits.
<beach>
In Common Lisp, the number of digits is not bounded.
smurfrobot has quit [Remote host closed the connection]
<smokeink>
beach: if we use a single sign BIT instead of infinitely many sign BITS, then isn't the number of digits evident ?
<beach>
fouric: Perhaps you are thinking of all that literature on computer architecture with finite precision. Then that information is implicit.
<smokeink>
"-16 is ....111110000" , why 111110000 instead of just 10000 ? (format t "~b" -16)
cyberlard has quit [Ping timeout: 268 seconds]
smurfrobot has joined #lisp
<beach>
smokeink: No, because in memory, you would have to tell me how many digits I have the right to look at.
<beach>
Where is that information stored?
<beach>
Is it a string of digits?
<beach>
Then the information is present as the length of the string.
<fouric>
beach: the commonly used definition of "two's complement" doesn't say anything about storing the number of bits/size, only the sign bit and the mantissa.
<smokeink>
ok I got your point
<beach>
If it is not a string, you would have to tell me how those digits are stored.
<beach>
fouric: Not true.
<beach>
fouric: Either the size is implicit, as in 64-bit registers, or, in the case of Common Lisp, "unbounded".
vsync has quit [Ping timeout: 240 seconds]
cyberlard has joined #lisp
<fouric>
...that makes quite a bit of sense, actually.
<beach>
fouric: The representation of (say) -2 in two's complement with 4 bits is 1110, but with 8 bits, it is 11111110. They are not the same.
vsync has joined #lisp
<beach>
and in Common Lisp, it is ....111111110
<beach>
with an infinite number of leading 1s.
<fouric>
I guess that I was trying to think about two's-complement from a C perspective, where sizeof() a thing includes the sign bit.
fikka has joined #lisp
<beach>
Yes, that's what i meant by "computer architecture" literature. C just reflects finite precision registers.
pierpa has quit [Quit: Page closed]
<beach>
So the number of digits is implicit.
smurfrobot has quit [Ping timeout: 260 seconds]
<beach>
There is no such thing in Common Lisp.
<fouric>
Aight, that makes sense.
<fouric>
...so then what *is* INTEGER-LENGTH used for?
<smokeink>
yes, that's the my question also :)
<fouric>
I was imagining it used for, say, calculating how many...
<beach>
You can use it for what you want, but you would have to supply more information, like the sign and the length. Look, it is just a definition. There are uses, for example if you want to use the logarithm that don't necessarily need the extra information.
<smokeink>
(- (integer-length x) 100) <- this part
<beach>
There, INTEGER-LENGTH just gives a rough idea of the number of significant digits.
<beach>
You can do plus or minus 10 if you like. It won't matter.
fikka has quit [Ping timeout: 240 seconds]
<beach>
Or, I could say it differently. It gives an idea of the magnitude of the number.
<smokeink>
ok, so it's (- magnitude_or_no_of_digits 100) , why minus ? is this magnitude very huge, compared to 100 ?
<fouric>
beach: why does the standard say "two's-complement"?
<beach>
When I divide by N I have a number with an infinite number of 0s followed by 100 digits.
<beach>
fouric: Because that's what it uses.
<fouric>
...but that's irrelevant if you're not storing the sign bit anyway, right?
<fouric>
Erm, including the sign bit in the result.
rumbler31 has joined #lisp
fikka has joined #lisp
<beach>
fouric: I have no idea what you are talking about. The standard says nothing about how numbers are stored.
<beach>
fouric: Conceptually, in Common Lisp, a positive number is represented as an infinite number of leading 0s.
<beach>
fouric: Negative numbers are just like counting down from 0.
<smokeink>
fouric: it's two complement, but the no of digits is not fixed so we don't bother counting the sign bit/bits
<beach>
So -1 is .....000000000 - 1, which is ....11111111
<beach>
-2 is .......000000000 - 00000010 which is .......111111110
<beach>
etc.
<beach>
smokeink: 100 is the resulting magnitude if you divide the number by 2^N which I do by shifting right.
<beach>
fouric: Perhaps you have learned that you can get the 2s complement by inverting all the digits and then adding 1? That works here too.
* fouric
observes
<beach>
To compute -2, take 2 which is ........00000010, then invert all the digits, which gives ....1111111111101. Finally add 1, which gives .......11111111110
rumbler31 has quit [Ping timeout: 276 seconds]
<fouric>
Two's-complement with infinitely sized integers makes sense, I get that.
<beach>
And it does not make sense with finite ones.
<fouric>
How so?
<fouric>
Erm, s/integers/registers
<beach>
Because you get overflow sometimes.
Jesin has quit [Quit: Leaving]
<fouric>
Fair.
<beach>
fouric: I went through the same steps as you a few decades ago. Now I know that infinite precision is simple and it always works. Finite precision is weird with some special cases, and it only works sometimes. Furthermore, infinite precision works in any base. You can represent -2 as ....9999998 in base 10 for example.
marusich has quit [Ping timeout: 248 seconds]
<fouric>
Ooh, that's *neat*.
marusich has joined #lisp
<fouric>
OK, I think I understand what you mean.
<fouric>
...perhaps not *grok* it, but then again I'm probably younger than you've been Lisping.
<fouric>
Thanks for patiently explaining!
<smokeink>
(= 0 (integer-length 0) (integer-length -1)) ==> T , because 0 is conceptually an infinite string of 0s and -1 an infinite string of 1s , right?
deng_cn has quit [Remote host closed the connection]
smurfrobot has joined #lisp
Denommus` has joined #lisp
Denommus has quit [Ping timeout: 245 seconds]
mishoo has joined #lisp
smurfrobot has quit [Ping timeout: 240 seconds]
smasta has quit [Ping timeout: 260 seconds]
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
smokeink has quit [Client Quit]
<flip214>
ELS registration isn't possible yet, is it?
fikka has joined #lisp
LocaMocha has joined #lisp
LocaMocha has quit [Max SendQ exceeded]
smokeink has joined #lisp
cromachina has quit [Ping timeout: 245 seconds]
cromachina has joined #lisp
saki has quit [Quit: saki]
d4ryus1 is now known as d4ryus
saki has joined #lisp
LocaMocha has joined #lisp
Chream_ has quit [Ping timeout: 240 seconds]
<beach>
fouric: Anytime. And while I remember, the reason the invert-and-add-1 trick is working (both ways) is this: -x is 0 - x which is -1 - x + 1, and -1 is an infinite sequence of 1s so -1 - x means invert all the bits in x. Then finally add 1.
<beach>
smokeink: Correct.
<beach>
smokeink: And since leading 0s and leading 1s do not count, you get 0 in both cases.
oleo has quit [Quit: Leaving]
Karl_Dscc has joined #lisp
<smokeink>
is there a way to express (remove-if (lambda (x) (member x '(a b c))) '(a b c d e f)) in a more compact or performant way ?
<phoe>
(set-difference '(a b c d e f) '(a b c)) ;=> (F E D)
<phoe>
note that this destroys order of elements.
<smokeink>
thanks
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
<beach>
smokeink: So my LOG (really lb) computation works like this: Pick an N (I'll tell you soon how). Now, lb(x) = lb(2^N * x / 2^N) = lb(2^N) + lb(x / 2^N) = N + lb(x / 2^N). Pick N so that x / 2^N is between 0 and around 2^100. That way, when you convert it to a double float, your float will be the closest possible, so no rounding error other than what is intrinsic to the float. Furthermore, it will not overflow, because the magnitude
<beach>
is small-ish. So pick N as (- (integer-length x) 100). Finally, compute x / 2^N by shifting x right N positions.
damke_ has joined #lisp
rumbler31 has quit [Ping timeout: 252 seconds]
vlatkoB has joined #lisp
damke has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 256 seconds]
<beach>
smokeink: If your lists are very large, you can use a hash table instead.
flamebeard has joined #lisp
fikka has joined #lisp
Tobbi has joined #lisp
parjanya has joined #lisp
<Shinmera>
pillton: fouric: The current Colleen is no longer based on the "colleen" project, but rather on http://github.com/Shirakumo/maiden
energizer has quit [Remote host closed the connection]
<beach>
rme: This is the beginning of a write-up of some thoughts I had about register allocation this morning. I will fill in the rest and also give examples of how it behaves, in particular for loops and such. http://metamodular.com/register-allocation.pdf
saki has quit [Ping timeout: 240 seconds]
scymtym_ has joined #lisp
energizer has joined #lisp
energizer has quit [Remote host closed the connection]
Patternmaster has quit [Ping timeout: 248 seconds]
willmichael has joined #lisp
Chream_ has joined #lisp
zaquest has quit [Ping timeout: 240 seconds]
zaquest has joined #lisp
<hajovonta>
myrkraverk: (write 12)
<hajovonta>
or write-to-string
<hajovonta>
recently I found myself using the format version almost exclusively.
<hajovonta>
this is because when later I want to insert something, it's easy to do with a format control string, but not so easy with other ways of printing.
<hajovonta>
for example I write (format t "This is something") and I later realize that I want to replace "something" with some value, I can easily edit this to (format t "This is ~a" val)
moei has joined #lisp
<hajovonta>
I do this often so using format is beneficial, but your mileage may vary
<myrkraverk>
Yeah, I was just wondering if I should replace my (format nil s) but maybe there's no need.
wxie has quit [Remote host closed the connection]
smurfrobot has quit [Remote host closed the connection]
attila_lendvai has joined #lisp
<_death>
yesterday I found myself ad-hoc extending my "out" facility with operators to generate C++.. format would never do there.. for example, (out (:fn "Foo" ("int a" "int b") "void")) would print "void Foo(int a, int b)"
<myrkraverk>
Well, fortunately, my output operations aren't that complicated.
<jackdaniel>
_death: out from ytools?
hhdave has quit [Read error: Connection reset by peer]
<jackdaniel>
btw, someone asked some time ago about tries to make Lisp more bearable, YTools was yet another one, forgot to mention it
<smokeink>
beach: What's wrong with doing just (1- (integer-length x)) for calculating binary log of x ? It seems to give the same result as (lb) and CL's (log) , and it's faster
<jackdaniel>
mhm, I like `out' as proposed in the mentioned library, just didn't have time to switch yet :)
hhdave has joined #lisp
<smokeink>
*the same results even for big numbers
<beach>
smokeink: Then you will have very few significant digits left.
<beach>
smokeink: Like, if you shift x to the right by that many position, you have only a 1 or a 0 left.
smasta has joined #lisp
<_death>
I got rid of my :u for "user-defined operators" because it was too verbose.. thinking I should just let the user define nonkeyword operators the same way "built-in" keyword ones are defined
fikka has quit [Ping timeout: 252 seconds]
<beach>
smokeink: Er, always a 1 I think. So you might as well just use the integer length.
<_death>
also, even though I was amazed that it worked well enough yesterday, I still wonder if a template approach would've worked better, as it did work well some other time I had to generate C++ code
<beach>
smokeink: Perhaps you tested it only for powers of 2?
<_death>
Shinmera: with that in mind, I looked at clip yesterday, but I realized it's for html and not text in general :/
<smokeink>
tested with powers of 3 also
<Shinmera>
_death: Sorry, I guess?
<beach>
smokeink: I don't get the same result for powers of 3.
<_death>
Shinmera: heh, I expected some "oh, but I use <insert-name-here> to generate text" ;)
<Shinmera>
_death: You could still use it but just output the text content of the HTML, though I can't advise that.
smasta has quit [Ping timeout: 268 seconds]
<Shinmera>
I don't often have the need to generate text that isn't some other properly defined format for which specialised libraries exist.
ebzzry_ has joined #lisp
<_death>
I wrote my own template thing some time ago, but it really was a toy.. even something like _.template in js would work well
<beach>
smokeink: Show your complete definition, please?
<smokeink>
beach: sure, 1 sec, I'm arranging it a bit
* smokeink
I'll be back in 2-3 hours , I'm around here but not always looking at the pc
<beach>
That's still 100 minus.
smurfrobot has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 260 seconds]
<beach>
Oh, I see. LIke I said, you lost all the decimals.
attila_lendvai has quit [Read error: Connection reset by peer]
patrixl has joined #lisp
attila_lendvai has joined #lisp
m00natic has joined #lisp
Amplituhedron has joined #lisp
fikka has joined #lisp
patrixl` has joined #lisp
patrixl` has quit [Client Quit]
<smokeink>
yes, the decimals are all lost and the result is rounded. So your function is faster than CL's (log) and it's suited for high precision calculations
<beach>
Oh, I didn't realize mine was faster than the implementation one.
willmichael has quit [Ping timeout: 256 seconds]
<beach>
But yeah, it is not serious to suggest a function that loses that much precision.
patrixl has quit [Ping timeout: 265 seconds]
fikka has quit [Ping timeout: 248 seconds]
patrixl has joined #lisp
raynold has quit [Quit: Connection closed for inactivity]
<flip214>
I'd need help for Postmodern, please. How would I pass the JSON operators in a WHERE clause? ... :where (= "a" (:->> json-column json-field))
<flip214>
doesn't work
<flip214>
I guess I need to define/register the new functions myself?!
<Ekkie>
Though I heard that multithreading is experimental in sbcl, should I be worried about that?
<jackdaniel>
not until you hit some problem with it
<jackdaniel>
minion: tell Ekkie about pcl
<minion>
Ekkie: please look at 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).
nowhereman_ has joined #lisp
<minion>
Ekkie: paip: Paradigms of Artificial Intelligence Programming
<jackdaniel>
minion: tell Ekkie about paip
nowhere_man has quit [Ping timeout: 260 seconds]
deng_cn has quit [Read error: Connection reset by peer]
<jackdaniel>
paip was recently released for download
<Shinmera>
Ekkie: No, SBCL works fine on Windows for almost everything
smurfrobot has joined #lisp
<Ekkie>
Oooh sweet.
willmichael has joined #lisp
cleanslate has joined #lisp
smurfrobot has quit [Ping timeout: 260 seconds]
damke has quit [Ping timeout: 264 seconds]
damke has joined #lisp
kuneco has quit [Ping timeout: 268 seconds]
kuneco has joined #lisp
hjudt_ has quit [Remote host closed the connection]
wxie has joined #lisp
sjl has joined #lisp
sjl has quit [Ping timeout: 252 seconds]
jdz has quit [Ping timeout: 256 seconds]
jdz has joined #lisp
python476 has joined #lisp
nika has quit []
energizer has quit [Remote host closed the connection]
hjudt has joined #lisp
Ekkie has quit [Quit: Leaving]
energizer has joined #lisp
smurfrobot has joined #lisp
energizer has quit [Max SendQ exceeded]
energizer has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
shrdlu68 has joined #lisp
lnostdal has quit [Ping timeout: 255 seconds]
vtomole has quit [Ping timeout: 260 seconds]
energizer has quit [Ping timeout: 240 seconds]
quazimodo has joined #lisp
smurfrobot has quit [Remote host closed the connection]
wxie has quit [Quit: Bye.]
smurfrobot has joined #lisp
EvW has joined #lisp
nowhere_man has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
smurfrobot has quit [Ping timeout: 240 seconds]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
nowhereman_ has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 268 seconds]
_cosmonaut_ has joined #lisp
Chream_ has quit [Ping timeout: 260 seconds]
ebzzry_ has quit [Read error: Connection reset by peer]
milanj has joined #lisp
vap1 has quit [Ping timeout: 240 seconds]
ebzzry_ has joined #lisp
EvW has quit [Remote host closed the connection]
EvW has joined #lisp
fikka has joined #lisp
jmercouris has joined #lisp
jmercouris has quit [Remote host closed the connection]
lnostdal has joined #lisp
mercourisj has joined #lisp
mercourisj has quit [Remote host closed the connection]
jmercouris has joined #lisp
lnostdal has quit [Remote host closed the connection]
willmichael has quit [Ping timeout: 248 seconds]
lnostdal has joined #lisp
makomo_ has joined #lisp
Amplituhedron has quit [Ping timeout: 265 seconds]
willmichael has joined #lisp
bigos has joined #lisp
milanj has quit [Read error: Connection reset by peer]
milanj has joined #lisp
smurfrobot has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
shifty has joined #lisp
<shka>
hello everyone
<schweers>
Hi shka
deng_cn has joined #lisp
pierpa has joined #lisp
bigos has quit [Quit: Leaving]
Digitteknohippie has joined #lisp
Denommus` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
attila_lendvai has quit [Read error: Connection reset by peer]
Digit has quit [Ping timeout: 240 seconds]
pjb has quit [Ping timeout: 252 seconds]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
smurfrobot has quit [Remote host closed the connection]
attila_lendvai has quit [Read error: Connection reset by peer]
saki has joined #lisp
Patternmaster has joined #lisp
attila_lendvai has joined #lisp
pierpa has quit [Remote host closed the connection]
smurfrobot has joined #lisp
milanj has quit [Ping timeout: 260 seconds]
deng_cn has quit [Read error: Connection reset by peer]
Selwyn has joined #lisp
smurfrobot has quit [Ping timeout: 268 seconds]
deng_cn has joined #lisp
<Selwyn>
Hello all
<Selwyn>
I plan to go to the ELS in April
<Selwyn>
Is it necessary to register beforehand?
<Shinmera>
Registration will open in a few days and yes.
milanj has joined #lisp
damke_ has joined #lisp
<Selwyn>
great thanks
lnostdal has quit [Remote host closed the connection]
lnostdal has joined #lisp
smurfrobot has joined #lisp
damke has quit [Ping timeout: 264 seconds]
pjb has joined #lisp
milanj has quit [Client Quit]
ebzzry_ has quit [Ping timeout: 240 seconds]
smokeink has quit [Quit: Leaving]
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]
vap1 has joined #lisp
vaporatorius has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
trittweiler has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
willmichael has quit [Read error: Connection reset by peer]
willmichael has joined #lisp
ebzzry_ has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
smokeink has joined #lisp
angavrilov has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
* Shinmera
hopes the registration will go smoothly or it'll be his neck on the line
thinkpad has joined #lisp
<rme>
No worries; worst case you process it all manually, right?
<Shinmera>
No, worst case money or registrations get lost.
<Shinmera>
I don't think they will, but I'm always scared of having fucked up
milanj has joined #lisp
<flip214>
Shinmera: worst case is "come to ELS and pay cash, we'll have a paper for you to write your name on"
<jdz>
I'm not so sure why people get upset when their money disappears.
attila_lendvai has quit [Read error: Connection reset by peer]
<Shinmera>
jdz: You are welcome to disappear some of your money into my pockets any time
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
lnostdal has quit [Ping timeout: 255 seconds]
trittweiler has quit [Ping timeout: 240 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
python476 has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
<beach>
rme: What I wrote needs more work before it is worth your time.
<rme>
OK, no problem.
sjl has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
<beach>
I'll read up on linear scan first.
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
saki has quit [Ping timeout: 240 seconds]
saki has joined #lisp
sjl has quit [Ping timeout: 260 seconds]
kuwze has joined #lisp
mishoo has quit [Ping timeout: 240 seconds]
patrixl` has joined #lisp
patrixl` has quit [Client Quit]
makomo has joined #lisp
damke has joined #lisp
patrixl has quit [Ping timeout: 245 seconds]
ebzzry_ has quit [Read error: Connection reset by peer]
damke_ has quit [Ping timeout: 264 seconds]
makomo_ has quit [Ping timeout: 276 seconds]
Bike has joined #lisp
asarch has joined #lisp
lnostdal has joined #lisp
jmercouris has quit [Ping timeout: 276 seconds]
mejja has joined #lisp
python476 has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
lnostdal has quit [Ping timeout: 255 seconds]
Amplituhedron has joined #lisp
fikka has joined #lisp
ft has quit [Ping timeout: 260 seconds]
axg has joined #lisp
ft has joined #lisp
parjanya has quit [Ping timeout: 252 seconds]
rumbler31 has joined #lisp
hiroaki has joined #lisp
ebzzry_ has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
Selwyn has quit [Ping timeout: 248 seconds]
oleo has joined #lisp
raynold has joined #lisp
aindilis has quit [Remote host closed the connection]
mishoo has joined #lisp
aindilis has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
orivej has joined #lisp
fikka has joined #lisp
Kundry_Wag has quit [Ping timeout: 260 seconds]
saki has quit [Ping timeout: 245 seconds]
smokeink has quit [Remote host closed the connection]
smokeink has joined #lisp
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
ioa has left #lisp [#lisp]
saki has joined #lisp
Cymew has quit [Remote host closed the connection]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
EvW has quit [Ping timeout: 255 seconds]
makomo has quit [Ping timeout: 268 seconds]
Kundry_Wag has quit [Ping timeout: 240 seconds]
EvW1 has joined #lisp
fikka has joined #lisp
sysfault_ has joined #lisp
sysfault has quit [Disconnected by services]
sysfault_ is now known as sysfault
<flip214>
With postmodern, is there a way to have a basic SQL statement in one place (selection of fields) and append a (S-sql) WHERE clause that gets derived dynamically?
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<billstclair>
sbcl.org is responding to ping requests, but refusing connections on ports 80 (http) and 443 (https). Anybody know what’s up?
<billstclair>
Or know which commit at https://github.com/sbcl/sbcl is the 1.4.5 release. Tags have been missing there for a very long time.
<Shinmera>
When in doubt blame sourceforge
Kundry_Wag has quit [Ping timeout: 240 seconds]
<billstclair>
Duh. It’s on the releases page.
<billstclair>
“Never mind.” — Rosanne Rosanadana
fikka has joined #lisp
m00natic has quit [Remote host closed the connection]
scymtym_ has quit [Ping timeout: 255 seconds]
smokeink has quit [Remote host closed the connection]
pillton has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 260 seconds]
csauce has joined #lisp
blackwolf has joined #lisp
fikka has joined #lisp
ckonstanski has quit [Read error: Connection reset by peer]
rk[ghost] has quit [Ping timeout: 268 seconds]
fikka has quit [Ping timeout: 256 seconds]
ckonstanski has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
heisig has quit [Quit: Leaving]
willmichael has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
deng_cn has quit [Read error: Connection reset by peer]
mrm has quit [Remote host closed the connection]
deng_cn has joined #lisp
Kundry_Wag has quit [Ping timeout: 276 seconds]
willmichael has joined #lisp
fikka has joined #lisp
ebzzry_ has quit [Read error: Connection reset by peer]
smcnamara has joined #lisp
ckonstanski has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 245 seconds]
saki has quit [Ping timeout: 248 seconds]
flamebeard has quit [Quit: Leaving]
saki has joined #lisp
nika has joined #lisp
hhdave has quit [Quit: hhdave]
warweasle has joined #lisp
Kundry_Wag has joined #lisp
willmichael has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
thallia has quit [Ping timeout: 268 seconds]
serviteur has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
serviteur has quit [Remote host closed the connection]
serviteur has joined #lisp
EvW1 has quit [Ping timeout: 245 seconds]
SaganMan has joined #lisp
willmichael has joined #lisp
fikka has joined #lisp
thallia has joined #lisp
al-damiri has joined #lisp
hajovonta has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 240 seconds]
lnostdal has joined #lisp
mejja has quit [Quit: mejja]
fikka has joined #lisp
smurfrobot has quit [Remote host closed the connection]
attila_lendvai has quit [Read error: Connection reset by peer]
trittweiler has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
fikka has quit [Ping timeout: 240 seconds]
deng_cn has quit [Remote host closed the connection]
deng_cn has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
makomo has joined #lisp
blackwolf has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
LiamH has joined #lisp
fikka has joined #lisp
smurfrobot has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
smcnamara is now known as spm__
fikka has quit [Ping timeout: 260 seconds]
smurfrobot has quit [Ping timeout: 256 seconds]
damke has quit [Ping timeout: 264 seconds]
lnostdal has quit [Ping timeout: 255 seconds]
damke has joined #lisp
<SaganMan>
Morning!
<beach>
Hello SaganMan.
pierpa has joined #lisp
j0ni- has joined #lisp
willmichael has quit [Read error: Connection reset by peer]
j0ni- has quit [Remote host closed the connection]
willmichael has joined #lisp
j0ni- has joined #lisp
paul0 has joined #lisp
scymtym has joined #lisp
j0ni- is now known as j0ni
schweers has quit [Ping timeout: 240 seconds]
Cymew has joined #lisp
saki has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
saki has joined #lisp
Cymew has quit [Ping timeout: 245 seconds]
Karl_Dscc has joined #lisp
Amplituhedron has quit [Ping timeout: 245 seconds]
shka_ has joined #lisp
kuwze has quit [Ping timeout: 260 seconds]
terpri has quit [Ping timeout: 265 seconds]
mrm has joined #lisp
lnostdal has joined #lisp
ebzzry_ has joined #lisp
sjl has joined #lisp
fisxoj has joined #lisp
cgay has joined #lisp
quazimodo has quit [Ping timeout: 240 seconds]
<SaganMan>
Hello beach. How are you?
mrm is now known as mr
pierpa has quit [Ping timeout: 260 seconds]
lnostdal has quit [Ping timeout: 255 seconds]
<beach>
SaganMan: Fine, but busy now. Got to fix dinner. Take care.
Tobbi has joined #lisp
nika has quit [Quit: Leaving...]
paul0 has quit [Ping timeout: 252 seconds]
mr is now known as m
m is now known as Guest62754
Guest62754 is now known as mrm
Kundry_Wag has quit [Remote host closed the connection]
stacksmith has joined #lisp
smurfrobot has joined #lisp
sz0 has joined #lisp
smurfrobot has quit [Ping timeout: 256 seconds]
Kundry_Wag has joined #lisp
fikka has joined #lisp
comborico1611 has joined #lisp
aindilis has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 240 seconds]
paule32 has quit [Read error: Connection reset by peer]
fikka has joined #lisp
myrkraverk has quit [Ping timeout: 245 seconds]
SaganMan has quit [Quit: laters]
smasta has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
<borodust>
Xach: bodge-nanovg is missing from quicklisp :(
emaczen has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 260 seconds]
energizer has joined #lisp
emaczen has joined #lisp
fikka has joined #lisp
karswell has quit [Ping timeout: 240 seconds]
smasta has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 252 seconds]
terpri has joined #lisp
smasta has joined #lisp
Sauvin has quit [Read error: Connection reset by peer]
fikka has joined #lisp
<emaczen>
Im building an executable and after I copy my program to another computer and run it, it is fine until it executes some code that uses a defparameter defined in terms of (user-homedir-pathname) -- since this path is different on a different computer
<emaczen>
What are the common practices associated with this problem?
<shrdlu68>
emaczen: Run a couple of "initializing" routines that redefine these parameters.
<emaczen>
shrdlu68: I thought about that, I guess that isn't so bad since I shouldn't have so many path variables...
<emaczen>
emaczen: I was afraid of going through so many defparameter forms in every apckage
<emaczen>
Is there a SLIME command to show me all defparameter forms that are in memory?
fikka has quit [Ping timeout: 240 seconds]
<Bike>
no. i mean it's not just defparameter either.
<emaczen>
Bike: Yeah it is macros too
<shrdlu68>
emaczen: Create a defparameter macro that takes a function to call while initializing.
<Bike>
you need to delay the computation of user-homedir-pathname until the executable is loaded.
<Bike>
If you have (defparameter whatever (user-homedir-pathname)) it will be computed as you load your script to dump an image, unfortunately.
<emaczen>
I'm going to create a macro called with-laziness
<emaczen>
to wrap around those kinds of forms
<phoe>
Bike: ASDF has hooks that it calls when an image is loaded.
<phoe>
You can push a (lambda () (setf whatever (user-homedir-pathname))) in there.
<Bike>
oh, well, there you go then
<phoe>
Or rather, UIOP, not ASDF.
<phoe>
If you use the UIOP functions of producing an image, then you're golden, it will take care of the rest.
fisxoj has quit [Quit: fisxoj]
Mutex7 has joined #lisp
fikka has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
smasta has quit [Read error: Connection reset by peer]
smasta has joined #lisp
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
damke_ has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
damke has quit [Ping timeout: 264 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
smasta has quit [Ping timeout: 276 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
Cymew has joined #lisp
fikka has joined #lisp
Cymew has quit [Ping timeout: 260 seconds]
Digitteknohippie is now known as Digit
Digit has quit [Read error: Connection reset by peer]
sysfault has quit [Remote host closed the connection]
Digit has joined #lisp
<pjb>
emaczen: there are also implementation specific hooks to initialize or reset things upon various occurences, such as image saving, imagine launching etc. cf. you r implementation. But of course, in the case of global variables, they should be initialized from an initialized function called from your main function, instead of when loading the sources!
<pjb>
(or worse, when compiling them).
fikka has quit [Ping timeout: 256 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
milanj has quit [Quit: This computer has gone to sleep]
<phoe>
pjb: or as defined initialization hooks
<phoe>
that run before the main function after the image is unfrozen
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
fikka has joined #lisp
hiroaki has quit [Ping timeout: 260 seconds]
<pjb>
phoe: yes. That said, I find that I don't always call initialize the first thing in main: it may depend on the command line arguments or some other context.
fikka has quit [Ping timeout: 248 seconds]
<phoe>
pjb: yes, hooks are for invariants.
fisxoj has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
thallia has quit [Ping timeout: 248 seconds]
varjag has joined #lisp
shifty has quit [Ping timeout: 248 seconds]
hiroaki has joined #lisp
vlatkoB has quit [Remote host closed the connection]
fisxoj has quit [Quit: fisxoj]
asarch has quit [Read error: Connection reset by peer]
thallia has joined #lisp
serviteur has quit [Remote host closed the connection]
smasta has joined #lisp
Kundry_Wag has joined #lisp
pillton has joined #lisp
fikka has joined #lisp
shka_ has quit [Ping timeout: 256 seconds]
jack_rabbit has quit [Quit: Leaving]
sysfault has joined #lisp
smurfrobot has joined #lisp
milanj has joined #lisp
smurfrobot has quit [Ping timeout: 256 seconds]
razzy has joined #lisp
jmercouris has joined #lisp
<jmercouris>
Is there an OS agnostic way of including files with a compiled lisp other than compiling the contents of the files into the lisp image?
<jmercouris>
I ask because when building on OSX for example, you'll produce an app bundle that contains a resources dir, I know this is different on linux, etc
orivej has joined #lisp
<pjb>
jmercouris: resource directories can be used on any OS.
<pjb>
jmercouris: the only thing that is OS dependent, is to locate this directory!
<pjb>
jmercouris: however, using getpwd and $0 let you find it usually. (Even if it is not "standard" as per POSIX).
<pjb>
err, you may also have to scan $PATH.
fikka has quit [Ping timeout: 240 seconds]
<stacksmith>
depending on what you are doing, asdf:system-relative-pathname may be helpful.
jmercouris has quit [Ping timeout: 276 seconds]
<pjb>
stacksmith: we're talking about installed executables on a user system! There's no source left!
<pjb>
the portable way to do it is to have an installation procedure, and to save that path in the launching script.
<stacksmith>
I wasn't sure what 'a compiled lisp' is...
<pjb>
Using asdf:system-relative-pathname would be useful to load the data into the lisp image, but this is what was excluded by jmercouris.
sjl has quit [Ping timeout: 256 seconds]
jmercouris has joined #lisp
<jmercouris>
sorry about that, my connection died, checking the logs now
sjl has joined #lisp
<jmercouris>
stacksmith: a compiled lisp is a persisted lisp image that can be loaded by the kernel
smasta has quit [Ping timeout: 240 seconds]
<jmercouris>
usually this is done to package for distribution of lisp apps
<aeth>
Linux/Unix (except for macOS) follows the XDG Base Directory Specification, so (by default) ~/.local/share/, ~/.cache/, and ~/.config/ are used (although far too many apps violate it, and it's annoying to have random directories pop up that should be in ~/.local/share/). I think that's it, though.
<Shinmera>
I would ABCL jar/wars under the cover of "compiled lisp" but it can't be loaded directly by the kernel!
<aeth>
A locally installed binary is frequently under ~/bin, which many (but not all) distros respect.
<pjb>
resources are application specific; they're system-wide.
<jmercouris>
aeth: I am using those standard directories in my application, should I bundle the copying of files to those dirs as part of an installation step?
<aeth>
jmercouris: One possible solution would be to put it in ~/.local/share/, I guess.
<aeth>
It's kind of used as a catch-all for misc things.
<jmercouris>
aeth: but when exactly? as what part? part of an installer script or?
<pjb>
usually installed in /usr/share or /usr/lib for applications installed in /usr/bin. But on OpenStep systems, it's installed in the application bundle, in /Application/$APPNAME.app/Contents/Resources/ where the executable is in /Application/$APPNAME.app/Contents/$SYSTEM/$APPNAME
<jmercouris>
pjb: Those are the paths I am familiar with yeah, do you think I should just check those paths?
<pjb>
Definitely not.
fikka has joined #lisp
<jmercouris>
check for the existence of those paths, and then act accordingly?
<Shinmera>
Just use argv0
<pjb>
Applications can be installed anywhere.
<jmercouris>
Shinmera: can you expand on that?
<pjb>
~/Application /System/Library/Applications etc.
<pjb>
There are even applications inside applications!
<Shinmera>
The list of arguments any application gets on launching includes a zeroth argument that is the location of the binary itself.
<jmercouris>
ok fine, so my app bundle, or binary could be located literally anywhere on the system, this is true
<jmercouris>
Shinmera: Ok, but knowing where the binary is, what should I do with that?
<pjb>
So on OpenStep system, you just use the -[NSApplication mainBundle] method.
<Shinmera>
Uh, use it as a path to construct where your resources are?
<jmercouris>
should I distribute the binary inside an app bundle on Linux as well, and then find a relative path to the resource I'm looking for?
<pjb>
jmercouris: On the other systems, as mentionned abouve, you would have an installation script, that would generate the launching script with hardcoded directories.
<jmercouris>
I guess my big issue here is, where do Linux apps keep resources that are non-binary?
<jmercouris>
I know nothing about this
<jmercouris>
ok, so the install script
<Shinmera>
Depends on how you do things.
<pjb>
jmercouris: This launching script would have to be updated when you move the application (but this is not something users tend to do on such systems).
<jmercouris>
How would Shinmera do thins?
<jmercouris>
s/thins/things*
<pjb>
jmercouris: there are no Linux app. This is not a notion.
<jmercouris>
pjb: okay, so a linux executable, where does it store its non-binary resources?
<pjb>
jmercouris: in general on unix, "applications" would be installed in /opt. /opt/$APPLICATION/*/
<Shinmera>
I usually don't bother with making installations, and instead just ship a zip with the exe and a resource directory.
<jmercouris>
~/.local/share/application-name? and the files are copied by install script?
<jmercouris>
Shinmera: on Linux as well?
<pjb>
Nope. This directory is for user specific files.
<Shinmera>
Especially on Linux
<pjb>
Read the XDG standard!
<jmercouris>
I've read and forgotten it :D
<jmercouris>
I believe there is a dir for system files
<Shinmera>
On OS X I might bother with making a .app, but then all that changes is the relative path to the resource directory, so it's nbd
<jmercouris>
xdg-data-home
<aeth>
Well, what I've seen ~/.local/share/foo used for as far as data goes is overriding the data. i.e. any sort of add-ons/modifications/etc. are stored there, which override the data, which is installed globally for / or fake-globally for the user.
<jmercouris>
Ok, so you are relying on your users launching from within your zip folder
<Shinmera>
(including creating the .app structure on OS X)
<jmercouris>
Shinmera: how would a user take your folder and put it in their path to make something launchable?
<pjb>
jmercouris: don't! Have an installation script that will generate the laucnhing script with the hard coded path!
<Shinmera>
jmercouris: They symlink, or augment PATH, or just double-click on the exe.
<aeth>
pjb: then what happens when the user moves the binary?
<pjb>
He doesn't: he doesn't have root access…
<pjb>
:-)
<aeth>
If it's installed under ~, moving the binary is a very likely situation eventually.
<aeth>
And installing things globally is increasingly uncommon
<pjb>
Then he has to run the installation script again to update the path.
<jmercouris>
Okay, I think the folder path seems the best, linux users will just symlink to their path then
<jmercouris>
that is very logical
<aeth>
(at least, globally installing things when it's not bundled with your distro)
<jmercouris>
it also feels close to the idea of an "app" like it does in OSX for me
<pjb>
OR, you can use the system specific procedure to locate the path of the executable.
<pjb>
Since you will support only a very small number of systems, you can do that.
<jmercouris>
I'm not sure how many systems I will support, but whatever is easiest/works I will do
<jmercouris>
I don't think there's a huge penalty to the folder idea, at least none that I can think of
<jmercouris>
Thanks for the input everyone
<pjb>
jmercouris: also, you're talking of linux app, but this doesn't exist, as I said. You may want to consider KDE apps, or gnome apps, or GNUstep apps, etc.
<pjb>
Then you have rules and tools to install the applications and locate resources.
<aeth>
pjb: Apps have never been more uniform imo. Well, besides the odd random one that will shove everything in /opt/
<jmercouris>
pjb: Can Gnome apps not just be standalone binaries? I don't think they require extra installation steps?
<pjb>
I don't know. Follow the rules.
<aeth>
jmercouris: I haven't seen standalone binaries. I have seen standalone directories.
<jmercouris>
aeth: damn, looks like linux distribution will still be a pain then :D
<jmercouris>
I guess I'll worry about that when I start with the GTK side of things
<aeth>
This can work: ~/wherever/foo, where ~/wherever/foo/foo is the executable and then there's a ~/wherever/foo/data
<pjb>
jmercouris: as I said, you may want to distribute KDE, GNUstep, Gnome, GTK, or other kind of application.
<jmercouris>
The thing is I'm not making a GTK app, I'm making a Lisp app which will launch a GTK app
<pjb>
For raw unix, provide an installation script that will generate the launching script with hard coded paths.
<jmercouris>
and the "GTK app" is the client..
<pjb>
You can install by default in /opt/$APPNAME/, or allow the user to specify a path.
<jmercouris>
I'll think about this more later as I get closer
<aeth>
jmercouris: You could try using Flatpak
<jmercouris>
it's too soon right now to consider all these details
<jmercouris>
aeth: Yes, a lot of people told me about flatpak as well
<jmercouris>
aeth: that might be a way to do things to package the "client" side of the app
epony has quit [Remote host closed the connection]
<pjb>
Also, if you want to integrate with the various application frameworks, your code will have to be different.
<aeth>
As far as no install apps go, ime they're almost always $0 games, and I just extract the directory to ~/Games/game-name/ and the binary is ~/Games/game-name/game-name, which handles loading the resources from elsewhere in the game-name directory.
<aeth>
But that's about equally as common as compiling something yourself or running an install shell script
<jmercouris>
yep
<jmercouris>
I've had experience with both ways
<jmercouris>
Just not had the experience bundling in both ways :D
<Shinmera>
Anything on linux that requires an installation script to be run immediately makes me just want to delete it instead.
<aeth>
Games are probably the most likely to go with the shell script or the precompiled compressed file that's extracted to directory approach because then they don't have to give you the source. They also potentially have complicated dependencies.
<aeth>
The older ones are more likely to do the script. The newer ones are more likely to do the latter, because the trust for scripts and the trust for installing things as root has gone way, way, way down
EvW has quit [Remote host closed the connection]
EvW has joined #lisp
<jmercouris>
Shinmera: will argv0 still return the correct path when executing from a symlink?
<jmercouris>
or will it return the path of the symlink?
<jmercouris>
you're compiling arg0, it returns the wrong path? but somehow later the correct one?
<pjb>
jmercouris: you can edit it.
<pjb>
jmercouris: actually you should copy the source and try it yourself on your systems!
<pjb>
jmercouris: but as the last example shows, the problem is that you're fucked if you rely on that.
quazimodo has joined #lisp
<jmercouris>
Shinmera: deploy tool looks really nice, if it handles that, might as well use it
<pjb>
jmercouris: this is why the right thing to do is to write an installation script that generates a launch script with hardwired paths!
<pjb>
jmercouris: hardwired paths passed as argument to the binary, of course.
<pjb>
jmercouris: just see how ccl does it!
Kundry_Wag has quit [Remote host closed the connection]
<pjb>
cat /usr/local/bin/ccl
<jmercouris>
pjb: CCL had me make a shell script that points to the CCL installation directory in /usr/local/src/ccl
<jmercouris>
I think we have a different CCL setup
<aeth>
pjb: An installation script is fragile. (1) How do you move it? (2) How do you remove it? (3) How do you upgrade it? (Yes! This is sometimes nontrivial!) (4) How do you deal with a local install? (5) How do you trust it for a global install?
<pjb>
aeth: your installation script has an option to update the launch script when you move it.
<pjb>
The launch script can be moved as you want.
<aeth>
Oh, and if it's in shell, the script might not even be written properly.
<jmercouris>
pjb: I appreciate the idea, but this sounds too complex for ordinary users
<pjb>
aeth: unix systems are multi users systems with an administrator and root access rights. Random users cannot randomly mess with the system.
<pjb>
jmercouris: then see above, you're fucked.
quazimodo has quit [Ping timeout: 252 seconds]
<pjb>
You can make automatic things but they won't be 100% foolproof.
<jmercouris>
Shinmera: are these meant to be places within the defsystem?
quazimodo has joined #lisp
<Shinmera>
"With the define-hook macro you can add functions that are executed during various points of the process. Specifically, the following types are available:"
_cosmonaut_ has quit [Ping timeout: 240 seconds]
<jmercouris>
Yeah, I read that, can I define hooks in the asd? or must they be in source files?
damke_ has quit [Ping timeout: 264 seconds]
<Shinmera>
Why would you define hooks in the ASD
<jmercouris>
Dude, I don't know
<jmercouris>
I'm just asking if it is possible
<Shinmera>
I mean you can put whatever you want in the ASD but it's not a good idea
<jmercouris>
like "build" steps
<jmercouris>
where do you usually put your "build" functions then?
<jmercouris>
you have a separate file?
<Shinmera>
I typically have a file that describes extra behaviour in standalone mode.
<Shinmera>
So that's a natural place to put these hooks.
<pjb>
jmercouris: there are different environments. The environment where asd if loaded and executed is not the compilation environment! (not necessarily, certainly not if we forked new lisp images to perform the compiling, from asdf).
<jmercouris>
hmm, I do something similar for OSX specific code as part of a separate system that I use for building
Bike has quit [Ping timeout: 260 seconds]
<jmercouris>
Shinmera: don't take this is a criticism, it is just a question, why not have another system called "standalone" that depends on your core system that contains these files?
<pjb>
Yes, I use a separate build script. generate-application.lisp in general.
<jmercouris>
Shinmera: am I making sense, or not really?
<Shinmera>
jmercouris: Because I don't making lots of sysems.
<Shinmera>
Fuck
<jmercouris>
yeah, it's fine
<Shinmera>
*Because I don't like making lots of systems
<jmercouris>
I think we know what you meant
<pjb>
When generating an application, you want to be extra careful about what you load in your lisp image. And you want it to be reproductible!
<jmercouris>
pjb: that's why I have my compilation like ccl `--load --no-init make.lisp`
<pjb>
exactly.
<pjb>
Now, you can have arguments or different scripts to generates applications for the various targets.
<pjb>
You may load different systems also: com.informatimago.my-app.linux com.informatimago.my-app.macosx com.informatimago.my-app.mswindows
Jesin has joined #lisp
<jmercouris>
or within the a function hooked into deploy I could look at what OS I am on and modify the behavior
<jmercouris>
when I say "function hooked into deploy" I mean the tool that Shinmera linked
attila_lendvai has quit [Read error: Connection reset by peer]
<jmercouris>
and when I say "deploy", I mean the hook, not the name of the tool
<jmercouris>
the name is both very appropriate, and very inconvenient when talking about the tool
Jesin has quit [Remote host closed the connection]
<Shinmera>
Sorry!
<jmercouris>
Shinmera: who invokes run-hooks? do I have to do this myself? or is it automatic?
<Shinmera>
Deploy does
<jmercouris>
Shinmera: Ok, cool, can you please link me to a project that uses deploy so I can have a reference?