<hayley>
Sadly .sucks costs money, else I'd get regex-interpretation.sucks for kicks.
<hayley>
(Or, to save money, get interpretation.sucks and split the bill with any other compiler writers.)
<Lycurgus>
outside of alt root or a name you already have leased, they all cost money
<Lycurgus>
all tlds cost a lot of money
<Lycurgus>
unless you run an alt root which is pretty cheap but then you have to get all the users to add it to their resolution
<Lycurgus>
which is even easier but not effortless
zbrown[m] has quit [Quit: Reconnecting]
zbrown[m] has joined #commonlisp
<Lycurgus>
if your intent is to form a private space that becomes a plus/feature
kingofcsu has quit [Ping timeout: 250 seconds]
green_ has joined #commonlisp
green__ has quit [Ping timeout: 265 seconds]
Lycurgus has quit [Quit: Exeunt]
green_ has quit [Ping timeout: 265 seconds]
semz has quit [Ping timeout: 265 seconds]
lisp123 has quit [Remote host closed the connection]
semz has joined #commonlisp
taiju has joined #commonlisp
beach` has joined #commonlisp
Qwnavery has quit [Quit: WeeChat 3.3]
spiaggia has joined #commonlisp
beach` has quit [Remote host closed the connection]
beach has quit [Ping timeout: 250 seconds]
Guest74 has quit [Ping timeout: 265 seconds]
CrashTestDummy2 has joined #commonlisp
CrashTestDummy has quit [Ping timeout: 260 seconds]
fengshaun has left #commonlisp [Leaving]
fengshaun has joined #commonlisp
fengshaun has left #commonlisp [Leaving]
aki has quit [Remote host closed the connection]
kingofcsu has joined #commonlisp
cjb has quit []
aartaka has joined #commonlisp
robin has quit [Ping timeout: 268 seconds]
<pillton>
I did something in CL which I have never done before! I wrote a setf expander which accepts multiple values.
taiju has quit [Ping timeout: 268 seconds]
elderK has quit [Quit: Connection closed for inactivity]
frgo has quit [Ping timeout: 268 seconds]
Cymew has joined #commonlisp
<pillton>
As a result, I think I have finally figured out how to create protocols for objects which are naturally represented as arrays e.g. a 3D rotation matrix or a 3D Euclidean transforms.
aki has joined #commonlisp
<spiaggia>
Congratulations!
robin has joined #commonlisp
robin has quit [Remote host closed the connection]
robin has joined #commonlisp
slyrus has joined #commonlisp
Catie has quit [Remote host closed the connection]
<pillton>
Sorry, assigns multiple places is probably a better description.
Cymew has quit [Ping timeout: 265 seconds]
<spiaggia>
What is wrong with (setf (values <place> ... <place>) ...)?
<pillton>
Writing it out for more than 9 places is a pain.
<spiaggia>
I see.
s-liao has joined #commonlisp
VincentVega has joined #commonlisp
gaqwas has joined #commonlisp
<VincentVega>
Hi all, anyone know any libraries that are geared for code manipulation in some way? I mean replacing, removing, merging stuff within a given form.
<pillton>
VincentVega: Do you mean to use in an editor or more general programmatic code manipulation?
<VincentVega>
pillton: programmatic
<VincentVega>
Something declarative perhaps.
aartaka has quit [Ping timeout: 256 seconds]
sm2n_ has joined #commonlisp
sm2n has quit [Read error: Connection reset by peer]
attila_lendvai has joined #commonlisp
kingofcsu has quit [Ping timeout: 260 seconds]
shka has joined #commonlisp
Cymew has joined #commonlisp
amb007 has quit [Ping timeout: 256 seconds]
amb007 has joined #commonlisp
pve has joined #commonlisp
robin has quit [Ping timeout: 264 seconds]
aartaka has joined #commonlisp
rotateq has joined #commonlisp
<jackdaniel>
phantomics: re acos, the spec only says, that acos may give complex number of a real argument, it doesn't specify which quadrant for the imaginary part it should return
<jackdaniel>
under the hood ecl inlines (i.e for a double float argument where the result will be complex) cacos(#0 + I*0.0)
<jackdaniel>
however when it is build without complex floats it returns a complex with the opposite imaginary part
<jackdaniel>
hmm, suspicious :)
<phantomics>
Ok, Bike was saying the branch cuts are explicit in the spec
<phantomics>
That's odd
<phantomics>
I guess I can specify an alternate acos implementation in the case of ECL, the other CLs and common APL implementations all have a matching acos
<jackdaniel>
I'd like to see the entry in the spec that applies to acos and asin - spec is indeed explicit with branch cuts but that applies only to real numbers
<jackdaniel>
s/only/mostly/
<jackdaniel>
either way I'll add an issue entry because a disrapency due to different compilation options is suspicious at best
<phantomics>
Sounds good, it's probably for the best that CLs have consistent trig functions
<jackdaniel>
well, the "soft" version ported from cmucl used when there are no complex floats available is much slower
<jackdaniel>
when complex floats are available (default), then trigonometric functions are inlined using C functions (like cacos)
gaqwas has quit [Ping timeout: 265 seconds]
<jackdaniel>
when they are not, then a fallback function is used with a formula (with appropriate declarations) ported from cmucl (and probably shared at least in spirit with sbcl)
<jackdaniel>
the latter conses more and calls at least a few functions (that may be effectively inlined with C counterparts)
<jackdaniel>
either way I won't label it as a bug until proven otherwise, still worth keeping in the tracker
<phantomics>
Likely that's the algo used in sbcl, thanks for looking into it
<jackdaniel>
regarding ecl not being able to compile things - I can't reproduce this issue, so I can't help much
<phantomics>
Ok, could it have anything to do with /tmp folder permissions?
<jackdaniel>
the most likely reason is that you have something weird in your environment (some kind of hardening?)
<jackdaniel>
perhaps
<rotateq>
hm i would write sqrt[1+z] ^^
<phantomics>
I'll see if I can find the factor causing the problem, if so I'll let you know
<jackdaniel>
rotateq: using [] in the source code is risky because user may conformingly use these for their own reader macros
<rotateq>
jackdaniel: yes i thought adding "... as long as no read macro is defined"
<phantomics>
The stack problem I was having seemed to come from low memory in the system, but other CLs could manage, after a restart it didn't happen any longer
<rotateq>
or using Dirac's bra and ket for such things :P
<jackdaniel>
there are two cleanup issues (not normative) about branch cuts for atan dealing with similar problem
amb007 has quit [Ping timeout: 250 seconds]
amb007 has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
Jing has quit [Remote host closed the connection]
Jing has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
cage has joined #commonlisp
aki has quit [Ping timeout: 250 seconds]
Devon has quit [Ping timeout: 268 seconds]
amb007 has quit [Read error: Connection reset by peer]
lisp123 has joined #commonlisp
amb007 has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
karlosz has quit [Quit: karlosz]
rain3 has joined #commonlisp
rain3 has quit [Ping timeout: 265 seconds]
aartaka has quit [Ping timeout: 250 seconds]
aartaka has joined #commonlisp
rain3 has joined #commonlisp
<jackdaniel>
how cute, the clhs entry for the system class hash-table has a gopher link :)
<jackdaniel>
(to the external resource)
<shka>
heh, shame that firefox does not read gopher
<jackdaniel>
"I wouldn't block on this, but I do want it." :)
theothornhill has joined #commonlisp
s-liao has joined #commonlisp
d4ryus has quit [Ping timeout: 256 seconds]
<Alfr>
clhs
<Alfr>
Sorry.
taiju has joined #commonlisp
s-liao has quit [Quit: Ping timeout (120 seconds)]
s-liao has joined #commonlisp
d4ryus has joined #commonlisp
edgar-rft has quit [Quit: Leaving]
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
gpiero has quit [Quit: Quitting...]
s-liao84 has joined #commonlisp
VincentV` has joined #commonlisp
s-liao has quit [Ping timeout: 256 seconds]
gpiero has joined #commonlisp
davep has joined #commonlisp
VincentVega has quit [Ping timeout: 265 seconds]
igemnace has quit [Remote host closed the connection]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
amb007 has quit [Ping timeout: 265 seconds]
amb007 has joined #commonlisp
s-liao84 has quit [Quit: Client closed]
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
igemnace has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]
amb007 has joined #commonlisp
frgo has joined #commonlisp
frgo has quit [Ping timeout: 265 seconds]
Lycurgus has joined #commonlisp
aartaka has quit [Ping timeout: 256 seconds]
<rotateq>
jackdaniel: or little golang gophers spawn by clicking on it
jeosol has quit [Ping timeout: 256 seconds]
<rotateq>
no problem for me (indirectly) as I of course have TAoCP volume 3 too ^^
<rotateq>
and in my newer version section 6.4 starts at page 513
Lycurgus has quit [Quit: Exeunt]
<etimmons>
phantomics: it was a long time ago, but I seem to recall having some ECL issues if /tmp was mounted with noexec
<phantomics>
oh yeah? I'll take a look at that
<phantomics>
That might be the problem, thanks
X-Scale has quit [Ping timeout: 250 seconds]
X-Scale` has joined #commonlisp
X-Scale` is now known as X-Scale
tyson2 has joined #commonlisp
s-liao has joined #commonlisp
yewscion has joined #commonlisp
rain3 has joined #commonlisp
theothornhill has quit [Ping timeout: 264 seconds]
lisp123w has left #commonlisp [ERC (IRC client for Emacs 26.3)]
igemnace has quit [Quit: WeeChat 3.3]
ec has quit [Remote host closed the connection]
ec has joined #commonlisp
mariari has quit [Quit: WeeChat 3.3]
theothornhill has joined #commonlisp
mariari has joined #commonlisp
theothornhill has quit [Remote host closed the connection]
dra has joined #commonlisp
Bike has joined #commonlisp
aartaka has joined #commonlisp
Guest74 has joined #commonlisp
igemnace has joined #commonlisp
Bike has quit [Quit: Connection closed]
Bike has joined #commonlisp
servytor has joined #commonlisp
s-liao95 has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
aartaka has quit [Ping timeout: 256 seconds]
s-liao has quit [Ping timeout: 256 seconds]
aartaka has joined #commonlisp
s-liao95 has quit [Quit: Client closed]
rotateq has quit [Remote host closed the connection]
dra has quit [Ping timeout: 265 seconds]
ec has quit [Ping timeout: 276 seconds]
NotThatRPG_ has joined #commonlisp
VincentV` has quit [Remote host closed the connection]
NotThatRPG has quit [Ping timeout: 256 seconds]
kingofcsu has joined #commonlisp
cosimone has joined #commonlisp
_73 has joined #commonlisp
<_73>
I have a function that uses `&rest lsts`. I want to recursively call the function with the `cdr` of all the lists in `lsts`. I finally realized that the bug in my function was that I was making the recursive call with `(mapcar #'cdr lsts)` which returned one list of lists which is not what I want when I am using &rest. It should be more clear in the example what I am trying to do: http://dpaste.com/8L8ES7DUU
<Bike>
you could also do this without consing if you used LENGTH. i don't know if you're doing this as a limited exercise or what though.
<_73>
Bike: If I use `apply` is the function no longer tail recursive?
Devon has joined #commonlisp
<Bike>
it should still be tail recursive. your implementation may or may not optimize it as such, though
<spiaggia>
_73: It still is, but why do you care?
<NotThatRPG_>
Agreed: this is going to be quite inefficient, I think. You could do it in one loop through the list, retaining the current longest. Isn't your function going to be O(n^2) instead of O(n)?
<Bike>
but you're doing quite a lot of heap consing each iteration anyway, so i wouldn't worry too much about tail recursion
<_73>
Ok I understand. Thanks
<spiaggia>
_73: Also, why do you use names like LST and LSTS rather than LIST and LISTS?
NotThatRPG_ is now known as NotThatRPG
<_73>
spiaggia: the author of `on lisp` used `lst`. I furthered the convention to `lsts` cause it made sense to me and adheres to conventions in other languages I have uses.
<spiaggia>
_73: And your docstring is misleading. It could mean that LST should be longer than the sum of the length of the others.
<spiaggia>
_73: The author of "On Lisp" is known not to follow good conventions.
<spiaggia>
And I agree with Bike, you should probably use LENGTH instead.
<NotThatRPG>
(loop :for l :in (rest lists) :as len = (length l) :with maxl = (length (first l)) :with longest = (first l) :when (> len maxl) :do (setf maxl len longest l) :finally (return longest))
<Bike>
to do this without consing while keeping this scheme style of not using any useful operators, you could do something like: (defun longer1p (list1 list2) (cond ((null list1) nil) ((null list2) t) (t (longer1p (cdr list1) (cdr list2))))) (defun longerp (list &rest lists) (if (null lists) t (and (longer1p list (first lists)) (apply #'longerp list
<Bike>
(rest lists)))))
<yitzi>
_73: Using lst is only needed lisp-1 languages.
VincentVega has joined #commonlisp
<Bike>
scheme exercise, i should say. scheme itself is fine
<_death>
I think the point is not to use length, as traversing the whole list may not be needed
<spiaggia>
_73: I would have the docstring read "Return true if and only if the length LIST is greater than the length of each of the lists in LISTS"
<spiaggia>
_death: Ah, good point.
ym has joined #commonlisp
<_death>
another small style suggestion is substitute TEST for (if TEST t nil)
<_73>
_death: I am not sure what you mean by this. Do you mean to make a variable TEST?
<spiaggia>
_73: He means that anything of the form (if <something> t nil) can be replaced by <something>.
<_73>
ahh yes that is nicer
<_death>
also, if you have a predicate, often you can avoid IF and just use OR/AND.. like (or (and (some ...) (and (notnull ...) ...)) (longerp ...))
<_death>
and then, if you have say (and a (and b c)) you just use (and a b c)
<_death>
(but in your case, the SOME test is not needed anyway)
NotThatRPG has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<_death>
though as others pointed out, consing also has its price
<_death>
(and there should be apply there)
<_death>
it may be that some prefer (if (null lst) nil ...) so the if->and/or transformation is not an absolute rule
<spiaggia>
I can't imagine who that would be.
<_73>
_death: Thanks I wrote it out the way you suggested. While I can't say that I find the function more clear this way it is useful to realize that I can replace if statements with `or/and` sequences.
* spiaggia
forgot :)
<_death>
I guess it depends on how long you spent reading logic formulas
<_73>
apparently not enough
VincentVega has quit [Remote host closed the connection]
waleee has joined #commonlisp
<_death>
_73: another useful transformation is IF->COND if you have cascading IFs
kingofcsu has quit [Remote host closed the connection]
VincentVega has joined #commonlisp
Cymew has quit [Ping timeout: 250 seconds]
peterhil has quit [Remote host closed the connection]
peterhil has joined #commonlisp
ec has joined #commonlisp
VincentVega has left #commonlisp [ERC (IRC client for Emacs 27.2)]
VincentVega has joined #commonlisp
qhong has quit [Read error: Connection reset by peer]
frgo has joined #commonlisp
qhong has joined #commonlisp
frgo has quit [Remote host closed the connection]
ec has quit [Ping timeout: 276 seconds]
frgo has joined #commonlisp
frgo has quit [Read error: Connection reset by peer]
frgo_ has joined #commonlisp
ec has joined #commonlisp
<Guest74>
I hear the cascading ifs are beautiful in the springtime.
escanda has joined #commonlisp
<escanda>
hi there
<escanda>
I am trying to develop a parser generator based on macros and the GLR algorithm. I want to pass the whole body of a macro call into the macro definition and iterate the rules using ,@body
ec has quit [Ping timeout: 276 seconds]
ec has joined #commonlisp
<escanda>
It's been ages since last time I did macros, but I can't for the shake of my life parse in the macro the following body type: ((a b)(b a)). I must use quote ` before the first parenthesis
<_death>
show the code?
<escanda>
of course :) which pastebin may I use?
<escanda>
it's been long too since I have been here
<_death>
if you want to process the body during macroexpansion time, the loop should be evaluated then.. `(list ,@(loop for rule in body collect ,(format nil "rule: ~A" rule))) would translate body ((a b) (c d)) to (list "rule: (a b)" "rule (c d)") .. instead of list you'll likely want progn to evaluate the forms you generate
<_death>
er, no need for comma before the format form
random-nick has joined #commonlisp
bcasiello__ has joined #commonlisp
saturn2 has quit [Ping timeout: 260 seconds]
phantomics has joined #commonlisp
pjb has quit [Ping timeout: 268 seconds]
Nselm has joined #commonlisp
amb007 has quit [Read error: Connection reset by peer]