jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
themsay has quit [Ping timeout: 268 seconds]
sjl has joined #lisp
themsay has joined #lisp
FreeBirdLjj has joined #lisp
<p_l> traits typically is one of multiple mechanisms to get around single inheritance ;)
FreeBirdLjj has quit [Ping timeout: 252 seconds]
mrblack has joined #lisp
groovy2shoes has quit [Excess Flood]
groovy2shoes has joined #lisp
<mrblack> I'm having trouble with slime (it was working before :/). I got the message: "The function COMMON-LISP-USER::*2 is undefined. [Condition of type UNDEFINED-FUNCTION]".
<Bike> did you write (*2 something) instead of (* 2 something)?
<mrblack> let me see
<mrblack> oh yes I did.
<mrblack> sorry
pjb has quit [Ping timeout: 260 seconds]
sjl has quit [Ping timeout: 252 seconds]
mason has left #lisp [#lisp]
roshanavand has quit [Quit: leaving]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 252 seconds]
sjl has joined #lisp
rumbler31 has quit [Remote host closed the connection]
anewuser has joined #lisp
cydork has joined #lisp
ym has quit [Remote host closed the connection]
pjb has joined #lisp
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #lisp
jinkies has joined #lisp
FreeBirdLjj has quit [Ping timeout: 252 seconds]
<jasom> fouric: what do you want to do with traits that you can't do with defgeneric?
<jasom> fouric: traits primarily seem to be a way to make the type system happy, and lisp very nearly has no type system.
<jasom> hmm, traits apparently started in Self, which is untyped, so they are about more than the typesystem
pjb has quit [Ping timeout: 260 seconds]
ealfonso has joined #lisp
<jasom> hmm reading up on how they work in self, they sound like multiple-inheritence, minus slots, minus automatic conflict resolution
smaster has joined #lisp
<jasom> Without MOP, I cant think of a way of doing the last item, but just defining a classs with no slots should be sufficient for the first two.
beach has joined #lisp
<jasom> if you prefixed each trait method with the name of the trait (or if you put each trait's methods in a different package) then AFAICT you have everything that self traits do just with bog-standard CLOS
<p_l> jasom: using MOP you can override inheritance and conflict resolution
<p_l> an example in The Art of Meta-Object Protocol describes implementing different resolution systems
smokeink has joined #lisp
esrse has joined #lisp
sjl has quit [Ping timeout: 252 seconds]
robotoad has joined #lisp
lavaflow has quit [Read error: Connection reset by peer]
lavaflow has joined #lisp
varjag has joined #lisp
dale has joined #lisp
<aeth> jasom: I'm not sure I agree with you about Lisp's type system. Lisp has one of the fanciest type systems.
<aeth> It's just that most things are T or inferred.
varjag has quit [Ping timeout: 252 seconds]
<Bike> is what you just said actually relevant to the particular question of traits in object systems
<no-defun-allowed> traits just sound like a complicated defgeneric, i agree with jasom
<fouric> jasom: I want to be able to add slots to a class with a trait.
Necktwi has joined #lisp
<fouric> I thought that traits did that, but I guess that I was wrong?
<fouric> What I want is the ability to add slots to an object and then define methods that only operate on instances of the class with those slots.
quazimod1 has joined #lisp
quazimodo has quit [Ping timeout: 252 seconds]
Necktwi has quit [Ping timeout: 252 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 252 seconds]
linack has joined #lisp
meepdeew has joined #lisp
meepdeew has quit [Ping timeout: 244 seconds]
dale has quit [Quit: dale]
Necktwi has joined #lisp
Oladon has joined #lisp
Necktwi has quit [Ping timeout: 272 seconds]
Necktwi has joined #lisp
<beach> Good morning everyone!
<Oladon> Morning, beach!
blt has quit [Quit: ZNC 1.7.1 - https://znc.in]
cydork has quit [Ping timeout: 252 seconds]
pjb has joined #lisp
<no-defun-allowed> morning beach
dddddd has quit [Remote host closed the connection]
<Oladon> Anyone know of any forum libraries in Lisp?
<jinkies> morning, beach
<no-defun-allowed> i wrote a forum but it's not very good
<Oladon> Any interest in continuing/extending it?
<Oladon> I'm kinda surprised that I'm not finding any at all
<no-defun-allowed> hmm it's got a niche but i was just wondering how fast i was with slime
<no-defun-allowed> it's got random names which are stored in hunchentoot ids and nested comments
<no-defun-allowed> *hunchentoot cookies
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
jack_rabbit has quit [Ping timeout: 252 seconds]
<Oladon> no-defun-allowed: well, give it a thunk or two... I think our community would be enriched thereby.
<no-defun-allowed> i wrote it in an hour 20 minutes :p
<Oladon> Oh, heh
<no-defun-allowed> writing a forum in netfarm would be more exciting tbh
cydork has joined #lisp
<Oladon> As in, Python?
<no-defun-allowed> after i get the MOP documented and implemented i'll write a forum backend
<no-defun-allowed> oh no, no python here
<Oladon> Whew. What's netfarm?
<no-defun-allowed> a kind of distributed data handling thing
<Oladon> Something you're doing?
<no-defun-allowed> yes, some friends and i are writing and designing it
<Oladon> cool
<no-defun-allowed> thanks
<no-defun-allowed> i have some of it on gitlab.com/netfarm.gq but we're nowhere near done
<Oladon> Looks neat.
<Oladon> I'd better hit the sack -- morning comes early these days.
<Oladon> G'night all!
<no-defun-allowed> nighty night
shifty has quit [Ping timeout: 260 seconds]
smaster has quit [Ping timeout: 272 seconds]
pjb has quit [Ping timeout: 260 seconds]
siraben has quit [Ping timeout: 268 seconds]
<LdBeth> GG
<no-defun-allowed> hi LdBeth
<LdBeth> good eve
smokeink has quit [Remote host closed the connection]
d4ryus1 has joined #lisp
jkordani has joined #lisp
d4ryus has quit [Ping timeout: 252 seconds]
jack_rabbit has joined #lisp
blt has joined #lisp
smokeink has joined #lisp
jkordani_ has quit [Ping timeout: 252 seconds]
igemnace has joined #lisp
shka_ has joined #lisp
pjb has joined #lisp
Bike has quit [Quit: Lost terminal]
Copenhagen_Bram has quit [Read error: Connection reset by peer]
ealfonso has left #lisp ["ERC (IRC client for Emacs 26.1)"]
jack_rabbit has quit [Ping timeout: 240 seconds]
jack_rabbit has joined #lisp
fiddlerwoaroof has joined #lisp
Copenhagen_Bram has joined #lisp
Copenhagen_Bram has quit [Read error: Connection reset by peer]
pjb has quit [Ping timeout: 252 seconds]
Copenhagen_Bram has joined #lisp
cpape has quit [Ping timeout: 250 seconds]
Oladon has quit [Quit: Leaving.]
anewuser has quit [Quit: anewuser]
smaster has joined #lisp
quazimod1 has quit [Ping timeout: 252 seconds]
quazimodo has joined #lisp
<mrblack> how can I get syntax for common lisp on Emacs? lisp-mode doesn't seem to do it
<beach> mrblack: Use SLIME.
<beach> You can install SLIME from Quicklisp. There are instructions on the Quicklisp site.
<mrblack> beach, I have Slime, it's enabled in the buffer.
<beach> Then you should be fine.
<beach> what appears to be the problem?
<mrblack> beach, there's not syntax highliting
<beach> Hold on...
sauvin has joined #lisp
<beach> mrblack: What does your mode line say?
<beach> It should say ... (Lisp ...)
<beach> Does it?
<mrblack> my mode line does not show mode
<beach> Did you start SLIME with M-x slime<RET>?
<beach> Actually, you get syntax highlighting without starting SLIME.
<beach> How did you create your buffer?
<mrblack> I created a file with "file.lisp", than opened it with "emacsclient -n file.lisp"
frgo has quit [Remote host closed the connection]
<beach> What happens if you type M-x lisp-mode in the buffer?
frgo has joined #lisp
makomo has joined #lisp
<mrblack> nothing happnes
<mrblack> happens
<beach> What if you don't do it with emacsclient, just emacs. Then what happens?
<mrblack> beach, still no syntax highlighting
<beach> It works here.
<beach> What version of Emacs do you have?
<mrblack> beach, this is my slime configuration: https://hastebin.com/hilominoga.sql
<mrblack> I have GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.31) of 2018-08-16
<beach> Your SLIME configuration should not matter. You should get syntax highlighting without it.
<mrblack> weird
<beach> Try starting your emacs with emacs -q, then do M-x server-start. Then, do your emacsclient ...
<beach> Just to see whether you have something strange in your .emacs file
frgo has quit [Ping timeout: 252 seconds]
<beach> ... or just emacs -q stuff.lisp
<beach> That's even better.
<beach> You should get syntax highlighting.
<beach> If not, there is something seriously wrong with your Emacs installation.
<beach> mrblack: Are you still here?
<mrblack> I tried with a larger file and there is highlighting, but it didn't show in the short example I was trying out.
<mrblack> Sorry to bother
<beach> Did you try emacs -q file.lisp?
<mrblack> No, it's working without the need of this option
<no-defun-allowed> mrblack: you want common-lisp-mode for slime to activate properly btw
<mrblack> I found weird that "setf" didn't have highlighting
<beach> mrblack: So it work, and it was just that in your file.lisp you had nothing to be highlighted?
<no-defun-allowed> yes, which i do believe is fixed with c-l-m
<mrblack> beach, precisely.
<beach> no-defun-allowed: This is a more fundamental problem if Lisp does not show up in the mode line.
<beach> mrblack: Still strange that you don't have Lisp in the mode line.
<mrblack> beach, I don't have any modes in the mode line, I configured it that way
<beach> Oh.
<beach> No wonder.
<beach> Well, off you go then.
<mrblack> thanks... sorry for wasting your time :P
<beach> It's fine. I needed a break anyway.
<mrblack> hahah
<mrblack> okay!
<mrblack> no-defun-allowed, 404
<no-defun-allowed> is there any percent-sign garbage at the end of the link ?
<no-defun-allowed> something's very broken in riot and i hate it but bleh everyone else uses it .-.
<mrblack> no-defun-allowed, no
<no-defun-allowed> very odd
<no-defun-allowed> an extra + at the end?
<no-defun-allowed> this needs further debugging which i can't do right now
linack has quit [Quit: Leaving]
<mrblack> is it possible to get the syntax highlighting in the Slime repl buffer?
<mrblack> nevermind
<mrblack> it is
<mrblack> :P
drot has quit [Ping timeout: 252 seconds]
pjb has joined #lisp
vlatkoB has joined #lisp
igemnace has quit [Quit: WeeChat 2.2]
igemnace has joined #lisp
pjb has quit [Ping timeout: 264 seconds]
shifty has joined #lisp
<beach> I am having a problem that I don't understand with the MOP on SBCL. I am doing (defclass foo (closer-mop:funcallable-standard-class) ()) then (make-instance 'foo) and I get an error that f-s-c was specified as the superclass of the class I just created, but the metaclasses f-s-c and FOO are incompatible.
<beach> I am sure there is some interesting method I should define on VALIDATE-SUPERCLASS, but I can't figure out which one.
<beach> Oops, that funcallable-standard-OBJECT was specified as...
<jackdaniel> beach: you may need to define method validate-superclass
<beach> I am sure there is some interesting method I should define on VALIDATE-SUPERCLASS, but I can't figure out which one.
<jackdaniel> on funcallable-standard-class and standard-class
<beach> Oh? Hmm.
<fiddlerwoaroof> Are you trying to define a funcallable object, or a metaclass?
<jackdaniel> (defmethod c2mop:validate-superclass ((c standard-funcallable-class) (c2 standard-class)) t)
<jackdaniel> that should do the trick
<beach> fiddlerwoaroof: a metaclass.
<beach> jackdaniel: Can you explain that?
<beach> to me?
<jackdaniel> I may try
<jackdaniel> make-instance is for standard-class
<beach> ?
<beach> I am specifically making an instance of a subclass of f-s-c.
<jackdaniel> so if you try to make instance of metaclass which is not compatible with it, implementation may conclude that it is not necessarily OK
<jackdaniel> hm, but there is make-instance created especially for funcallable-standard-class
<jackdaniel> acording to MOP
<beach> Why do you say that make-instance is for standard-class?
<beach> make-instance makes an instance of whatever I tell it to.
<beach> By the way, I tried your suggestion and it didn't help.
<jackdaniel> http://metamodular.com/CLOS-MOP/make-instance.html according to his page make-instance is specialized only on standard-class and funcallable-standard-class, that's what I meant
<beach> OK, but since FOO is a subclass of funcallable-standard-class, that should work.
<jackdaniel> yes, that prompted "< jackdaniel> hm, but there is make-instance created especially for funcallable-standard-class"
<beach> I can do (make-instance 'closer-mop:funcallable-standard-class) no problem.
<jackdaniel> (defclass bar () () (:metaclass c2mop:funcallable-standard-class))
<jackdaniel> define class this way
<jackdaniel> if you had used another metaclass (i.e created by you not inheriting from standard-class nor funcallable-standard-class) then you'd have to define validate-superclass
<beach> But then instances of BAR are not classes.
Copenhagen_Bram has quit [Read error: Connection reset by peer]
<beach> I guess I should state the problem differently: Tell me how I can make instances of a subclass of closer-mop:funcallable-standard-class!
quazimodo has quit [Ping timeout: 252 seconds]
<beach> Got it.
<beach> The VALIDATE-SUPERCLASS method should be between FOO and F-S-C.
<beach> I could not have figured that out from the error message.
Copenhagen_Bram has joined #lisp
<beach> In hindsight, it makes sense.
nowhere_man has joined #lisp
acolarh has quit [Ping timeout: 250 seconds]
drot has joined #lisp
jgoss has joined #lisp
space_otter has joined #lisp
shka_ has quit [Ping timeout: 252 seconds]
varjag has joined #lisp
Jesin has quit [Ping timeout: 250 seconds]
Jesin has joined #lisp
JohnMS_WORK has joined #lisp
[X-Scale] has joined #lisp
megalography has joined #lisp
X-Scale has quit [Ping timeout: 272 seconds]
[X-Scale] is now known as X-Scale
scymtym has quit [Ping timeout: 268 seconds]
flamebeard has joined #lisp
smokeink has quit [Remote host closed the connection]
trittweiler has quit [Ping timeout: 252 seconds]
trittweiler has joined #lisp
jeosol has quit [Ping timeout: 256 seconds]
varjag has quit [Ping timeout: 268 seconds]
jgoss has quit [Ping timeout: 252 seconds]
trittweiler has quit [Ping timeout: 252 seconds]
trittweiler has joined #lisp
JohnMS has joined #lisp
JohnMS_WORK has quit [Ping timeout: 252 seconds]
smaster has quit [Ping timeout: 252 seconds]
<jasom> fouric: traits (at least as they were used in self) do exactly the opposite of that; they add methods but do not add slots. What you are describing sounds more like a mixin, or just plain old multiple inheritence
Cymew has joined #lisp
Cymew has quit [Remote host closed the connection]
jinkies has quit [Ping timeout: 260 seconds]
domovod has quit [Quit: WeeChat 2.2]
fiddlerwoaroof has quit [Read error: Connection reset by peer]
shka_ has joined #lisp
fiddlerwoaroof has joined #lisp
lnostdal has quit [Ping timeout: 252 seconds]
xificurC has joined #lisp
<shka_> good morning
<xificurC> can anyone explain why (uiop:slurp-stream-string *standard-input*) doesn't work as expected when run in sbcl --eval? I get a CLOSED-STREAM-ERROR
<xificurC> ddd | sbcl --noinform --eval '(progn (load :asdf) (format t "~S" (uiop:slurp-stream-string *standard-input*))'
<xificurC> echo ddd*
<xificurC> and require instead of load ofc
xrash has quit [Ping timeout: 246 seconds]
varjag has joined #lisp
xrash has joined #lisp
ggole has joined #lisp
djh has joined #lisp
robotoad has quit [Quit: robotoad]
drot has quit [Ping timeout: 245 seconds]
elderK has joined #lisp
JohnMS_WORK has joined #lisp
JohnMS has quit [Ping timeout: 252 seconds]
acolarh has joined #lisp
scymtym has joined #lisp
<no-defun-allowed> anyways i have the code uploaded
<no-defun-allowed> minion: tell Oladon i have put the code up on https://gitlab.com/theemacsshibe/mboard
<minion> Oladon: watch out, you'll make krystof angry
<no-defun-allowed> alright smartass
<no-defun-allowed> there isn't even a fucking setup for CL continuous integration and gitlab turns it on anyway
<beach> minion: memo for no-defun-allowed: this is how it is done.
<minion> Remembered. I'll tell no-defun-allowed when he/she/it next speaks.
<no-defun-allowed> i see
<minion> no-defun-allowed, memo from beach: this is how it is done.
<Shinmera> Colleen: notify no-defun-allowed Or like this
<Colleen> Shinmera: Got it. I'll let no-defun-allowed know as soon as possible.
<no-defun-allowed> i'll use both just to be sure :^)
<Colleen> no-defun-allowed: Shinmera said 24 seconds ago: Or like this
<no-defun-allowed> i'd normally use minion but i don't want to make shinmera sad by not using colleen so
<Shinmera> Lol I don't care
ogamita has joined #lisp
<Shinmera> I'm just amused by how often people forget minion's syntax
space_otter has quit [Remote host closed the connection]
<no-defun-allowed> colleen: notify oladon i put the code up on https://gitlab.com/theemacsshibe/mboard
<jackdaniel> I have problems with remembering Colleen memo syntax
<Shinmera> Not using tab completion for names? tsk tsk tsk
<no-defun-allowed> "minion tell foo" makes most sense to me
<Shinmera> And me not using case-insensitive comparison for names? also tsk tsk tsk
<no-defun-allowed> does anyone know how to setup CI on gitlab at least?
<jdz> Colleen should be offended by people misspelling its name.
<Colleen> Unknown command. Possible matches: 8, set, say, mop, get, hello, block, time, tell, roll,
beach has quit [Disconnected by services]
<no-defun-allowed> Colleen: notify Oladon I put up the code on https://gitlab.com/theemacsshibe/mboard, it's very messy and bad so you get all the loose parts under WTFPL
<Colleen> no-defun-allowed: Got it. I'll let Oladon know as soon as possible.
<jdz> Shinmera: also, it should probably require a colon or comma after the nick to treat the line as a command.
beach has joined #lisp
<jdz> Or at least not complain about unknown command if the colon or comma are missing (but work as expected if it is not missing, and the command syntax is known).
<no-defun-allowed> gitlab just turned on continuous integration and it doesn't even do anything
<no-defun-allowed> it just sits there, finds out that i never set it up and dies
<jdz> You probably have checked a check-box somewhere that you want CI, but have not bothered to set one up?
<no-defun-allowed> i don't remember checking any though
froggey has quit [Ping timeout: 252 seconds]
<jdz> It could have been checked by default.
<no-defun-allowed> i made the repo about ten minutes ago i'd remember
<no-defun-allowed> but it does work so i'm happy
<Shinmera> colleen: hello
<Colleen> Hi!
<Shinmera> yay, case-insensitivity
* no-defun-allowed uploaded an image: Screenshot_2018-10-04_18-00-52.png (9KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/cQxHZXLTYAohhjLIOEChdAso >
<no-defun-allowed> rainbows would be cool i guess
<Shinmera> jdz: It used to do that, but thet people tried invoking commands without the colon, so here we are.
<Shinmera> I think I'll reinstate the colon though, since the new behaviour has been bothering me more than not
roshanavand has joined #lisp
angavrilov has joined #lisp
froggey has joined #lisp
drot has joined #lisp
mange has quit [Remote host closed the connection]
<Shinmera> Colleen should no longer respond to this now.
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #lisp
<no-defun-allowed> i'm up to writing about the MOP in my design guide/spec for netfarm
<no-defun-allowed> the definition of the schema called "schema" (equivalent to standard-class i guess) is recursive cause i need a schema to parse schemas
<no-defun-allowed> should i leave that one hard coded in or should i set that up to be an instance of a bootstrap schema?
<beach> no-defun-allowed: I am afraid it is going to be very hard to give you advice. It is not clear to me at all what it is that you are trying to do, and even if you were to explain it, I am convinced it will take a lot of effort to actually understand it. I could be wrong of course, so please go ahead and try if you want.
<beach> no-defun-allowed: It is not even clear that the name "MOP" is pertinent.
<no-defun-allowed> damn
<no-defun-allowed> never mind then, i'll think into it more
<no-defun-allowed> i think it's a MOP since it handles classes which are ordinary objects but it doesn't go into the Art of MOP's inheritance rules and other complex subjects
<beach> OK.
<beach> I could pitch in some time if you want to explain it or show some documentation.
<no-defun-allowed> you've probably got your own much more interesting and complex one to handle with sicl, so i shouldn't bug you with it
<beach> At least I could tell you what I can understand.
<beach> Well, it bothers me that you might be wasting YOUR time if you are going the wrong direction.
heisig has joined #lisp
<shka_> heisig: good morning!
ogamita has quit [Ping timeout: 245 seconds]
<heisig> Good morning!
acolarh has quit [Ping timeout: 252 seconds]
<shka_> heisig: i was wondering how can I build automatic differentation on petalisp
<shka_> from what i understand, the best way to do so, is to walk on mathematical expressions to build transformed variant
<no-defun-allowed> shka_: sicp chapter 2.3.2 has a differentiator in scheme
<no-defun-allowed> hm, making a CAS with ulisp and that would be exciting. not now though.
drot has quit [Ping timeout: 244 seconds]
ogamita has joined #lisp
lemoinem is now known as Guest73351
Guest73351 has quit [Killed (hitchcock.freenode.net (Nickname regained by services))]
lemoinem has joined #lisp
drot has joined #lisp
acolarh has joined #lisp
zfree has joined #lisp
<shka_> no-defun-allowed: automatic != symbolic!
<heisig> shka_: Can you point me to a paper or so that explains what you mean with automatic differentiation?
mingus has joined #lisp
<shka_> heisig: will blog post do?
<heisig> Sure.
<shka_> it is very simple concept
<shka_> basicly, run expression in reverse ;-)
<shka_> there is "tape implementation" there, but please ignore this part
<shka_> it can be done better in lisp
<heisig> shka_: Thank you! I agree, most things can be done better in Lisp :) The question is whether the problem has enough inherent parallelism for Petalisp. I will read the blog post and think about it.
<shka_> heisig: it should have! especially since you are already basicly generating code
scymtym has quit [Ping timeout: 252 seconds]
quipa has joined #lisp
zfree has quit [Quit: zfree]
hhdave has joined #lisp
acolarh has quit [Ping timeout: 244 seconds]
zfree has joined #lisp
acolarh has joined #lisp
themsay has quit [Quit: Quit]
<hhdave> rme: Hi. I realize you might be asleep at the moment, but hopefully you'll see this message... Further to https://ccl.clozure.com/irc-logs/ccl/ccl-2018-05.txt - I have hit on a way of fairly reliably reporoducing our CCL kernel panics. A new thing I'm working on seems to make the system drop into the kernel debugger much more reliably, including on my Mac (dx86cl64). To hit it I seem to have to create an array EITHER with a fill pointer OR which i
<hhdave> AND then I have to use #'replace to populate it. I haven't managed to make a minimal test case for it yet, but I have narrowed it down to that. I also noted previously that Norvig's prolog compiler seemed to be triggering it a lot, and that makes a lot of use of adjustable arrays. If I make a non adjustable array with no fill pointer I don't get the problem. I wonder if it could be a similar error to the allocate_list() problem
<hhdave> (https://github.com/Clozure/ccl/commit/73a04500245f5a539da142a7461c6d98248ed92a). Any ideas? Otherwise I'll keep trying to make a minimal test case...
<hhdave> (I have lots of separate threads running the prolog code and 1 other thread doing the #'replace)
scymtym has joined #lisp
ogamita has quit [Ping timeout: 252 seconds]
Essadon has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
scymtym has quit [Ping timeout: 240 seconds]
metallicus has joined #lisp
<hhdave> I'm suspecting ccl::%uvector-replace. If I arrange for the source and destination arrays to have different ccl::typecode I don't get the crash
<hhdave> - vector-push-extend also uses %uvector-replace, which is what the prolog system does
JohnMS has joined #lisp
JohnMS_WORK has quit [Ping timeout: 264 seconds]
rumbler31 has joined #lisp
Copenhagen_Bram has quit [Read error: Connection reset by peer]
rumbler31 has quit [Ping timeout: 264 seconds]
<hhdave> I have a minimal test case. It looks like it may have been fixed in https://github.com/Clozure/ccl/commit/956d89398e2840ee7f5adda0af242eae721e22f1#diff-c51d0aad3eb21a87a37b579343b117be though...
Copenhagen_Bram has joined #lisp
Copenhagen_Bram has quit [Read error: Connection reset by peer]
orivej has joined #lisp
Copenhagen_Bram has joined #lisp
<Shinmera> hhdave: Shouldn't this be in #ccl?
roshanavand has quit [Ping timeout: 246 seconds]
roshanavand has joined #lisp
<hhdave> Shinmera: Oh bother. I thought that was where I was posting. Ooops...
doesthiswork has quit [Ping timeout: 245 seconds]
frgo has joined #lisp
dddddd has joined #lisp
themsay has joined #lisp
frgo has quit [Ping timeout: 252 seconds]
xrash has quit [Read error: Connection reset by peer]
ogamita has joined #lisp
nckx has quit [Ping timeout: 240 seconds]
frgo has joined #lisp
<no-defun-allowed> shka_: oh, my bad.
themsay has joined #lisp
roshanavand has quit [Ping timeout: 252 seconds]
roshanavand has joined #lisp
beach has quit [Ping timeout: 252 seconds]
m00natic has joined #lisp
beach has joined #lisp
Lycurgus has joined #lisp
angavrilov has quit [Ping timeout: 260 seconds]
roshanavand has quit [Ping timeout: 252 seconds]
esrse has quit [Ping timeout: 260 seconds]
roshanavand has joined #lisp
siraben has joined #lisp
cydork has quit [Ping timeout: 252 seconds]
cydork has joined #lisp
nckx has joined #lisp
<russellw> sbcl --script successfully runs a file, but breaks --eval. How do you run a script file without verbosity, and also specify a main function to run?
<Shinmera> --script is a shorthand that also end toplevel options. Read the manpage.
angavrilov has joined #lisp
yaocl has joined #lisp
Bike has joined #lisp
ogamita has quit [Ping timeout: 252 seconds]
<russellw> ah! you're right, lot of options not listed in the help text. thanks!
metallicus has quit [Remote host closed the connection]
<adlai> so it seems as though (code-char (+ n (char-code #\a))) is potentially wildly unportable
<Shinmera> Naturally.
<adlai> would (write (+ 10 n) :base 36) be sanely idiomatic?
<adlai> with perhaps an appropriate :case
<Shinmera> just create a string with the alphabet you want and index off of that
<ggole> (aref n "abc...")
<ggole> Right
* adlai grumbles about how this would be so much simpler with an (invert #'digit-char-p)
<adlai> but thank you for the suggestion
<ggole> What do you mean, invert?
s-geometry has joined #lisp
<adlai> i looked through the characters dictionary in the spec, found digit-char-p, and said to myself, "this does what i want, but backwards"
<ggole> Oh, I see
<_death> (digit-char 10 36)
solb has joined #lisp
<solb> Howdy lispers, would a someone help me look at the possibility of optimizing the speed of lisp against Julia?
<solb> As well school me on the conventions of #lisp so I'm not too rude accidentally
<Shinmera> Lisp has no speed, it's a language
<Shinmera> You'll need to contrast implementations if anything.
<adlai> _death: uh how did i miss that! thank you.
<solb> I see. Are there implementations I should look to for fast computation?
<Shinmera> SBCL, primarily, I suppose
<shka_> sbcl, obviously
<solb> Could I send code snippets? Maybe there's something I'm missing to make this faster?
* ggole wonders whether digit-char was evicted from cache or was never there to start with
<Shinmera> As long as they're in a paste, not dircectly in the channel
<solb> Are there things I'm totally missing out on, in terms of speed?
<dlowe> solb: if you (declaim (optimize (speed 3) (safety 0) (debug 0))) that will get you a bunch of optimization notes in sbcl
<dlowe> during compilation
<dlowe> oh, you did that. nvm!
<solb> I'm sorry for being such a newbie, but are there big differences between declaim and declare?
<dlowe> just scope
<Shinmera> declaim is global, declare is local
<s-geometry> solb: how does your code perform against julia?
<Shinmera> just... never declaim safety 0.
<Shinmera> in general don't even declare safety 0 until you're abso-fucking-lutely sure your code won't misbehave
warweasle has joined #lisp
<Shinmera> (and you're sure it even helps at all)
<heisig> Shinmera: For HPC, safety 0 is a very valuable feature.
<dlowe> anarchy!
<_death> high performance crashing? ;)
<Shinmera> Hah!
kajo has joined #lisp
<solb> The Julia code takes ~0.090 to run, CL takes ~0.120s
<Shinmera> reminds me of this: Section 5 https://cliki.net/Infrequently%20Asked%20Questions
<Shinmera> solb: you mean SBCL takes that long?
<dlowe> solb: the disassembly shows a lot of calls to generic arithmetic
<dlowe> solb: I would not use loop for this
<_death> step is not declared
<_death> (its type)
<heisig> I use safety 0 only for auto-generated code, and only after I have carefully debugged the generator (using safety 3, debug 3, of course). So usually no high performance crashing :)
<solb> hmmm. I tried declaring the type of step, but it didn't much help.
<solb> I should probably try recursion here.
<dlowe> now you have a problem inside a larger problem
<beach> solb: You should definitely not try recursion.
<_death> you also need to declare the summation variable's type
<shka_> solb: add type declaration for step
<shka_> also, what just _death said
<solb> how do you declare the type of the summing?
<jackdaniel> solb: http://ix.io/1ohU , there is still some casting to return value though
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
<jackdaniel> but note declaration of ftype
<heisig> solb: Yes, try accumulating in a separate variable instead of (loop ... SUM ...): https://pastebin.com/qVLAkH0c
<jackdaniel> with that you don't probably need (type double-float …)
<jackdaniel> you may lift acc up if you want to declare it as well
<jackdaniel> ah, and * step sum I forgot
<dlowe> try this too https://pastebin.com/00QCjXPp
<dlowe> it disassembles with no generic calls
<solb> wowie
<solb> you guys are the best!
<heisig> solb: Oh, and if you are brave enough, you can use https://github.com/guicho271828/cl-simd :)
<beach> solb: So what's the verdict?
<shka_> CL wins. FATALITY
<ggole> Does loop define that the implicit zero is an integer (eg, if there are no iterations)?
* adlai wonders what could possibly be overriding (write ... :case :downcase)
<solb> The last pastebin from dlowe was faster than Julia!! ~0.06s
<adlai> adding `:escape nil` does not fix this
* adlai finds himself using (format () "~(~36R~)" 10)
<Shinmera> adlai: the case option is only for symbols.
<adlai> yuck.
<Shinmera> see *print-case* and write
<Shinmera> It also does not just downcase, se
<Shinmera> *so
<dlowe> I'm sure you could code golf it back to Julia hackers and they'd be like "oh, you didn't frood the loop" and it'd be faster again, and then back to us
<solb> Likely so. Maybe worth an ask to the Julia guys
<Shinmera> Exercices like these are also fairly pointless because they prove nothing substantial.
<shka_> dlowe: i think that you will get back to 0.09 just by setting safety 1
<solb> Well, it's not super pointless, because I'm rewriting an N-Body simulator, so these low end speed increase mean a lot to me
<Shinmera> If it's just for your curiosity, then sure
<beach> Shinmera: That's probably true, but there is a psychological aspect to it, because some people do think that they do prove something substantiatl.
<beach> substantial, even.
<Shinmera> I thought you might want to "prove" something with this exercise
<shka_> there is nothing to prove, assembly produced is self evident
<shka_> but, anyway, you can run numerical computations on sbcl just fine
<dlowe> shka_: I didn't set safety :p
<shka_> it is not slow
<shka_> in fact it is pretty fast
<ggole> Benchmarking small loops like this can be very misleading though
<ggole> It's very easy for compilers to do things to them that result in you measuring things other than what you think you are measuring.
<pfdietz> Just ask the Julia people how fast their compiler is.
<Shinmera> my problem is more that writing performant software that's more than a single function and still wanting to fairly compare it to an implementation in another language is nigh impossible
<ggole> Looking at the assembly and seeing a loop with float operations in it is a pretty good foil for that in this case, but in general it's pretty easy to footgun yourself.
<beach> ggole: We had such a case the other day when someone claimed something like "lists are 1000 times faster than vectors" based on a loop that was optimized away by SBCL.
Lycurgus has quit [Quit: Exeunt]
<ggole> Right
<dlowe> Shinmera: sure, but people aren't gonna stop :)
<Shinmera> I know.
<Shinmera> There's a lot of reasons to be depressed
solb has quit [Ping timeout: 256 seconds]
<jackdaniel> lately I was cracking my head on optimizing speed regression with glyphs
<dlowe> brain the size of a planet...
<Shinmera> heh
<jackdaniel> using flamegraph McCLIM tool written by scymtym I've found, that most time is spend somewhere else
<jackdaniel> and changing one function gave me a great boost, not because of microptimization, but thanks to limiting calls to an expensive function
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
frgo has quit [Ping timeout: 252 seconds]
cydork has quit [Ping timeout: 252 seconds]
frgo has joined #lisp
frgo has quit [Ping timeout: 245 seconds]
v0|d has quit [Remote host closed the connection]
frgo has joined #lisp
lnostdal has joined #lisp
yaocl has quit [Quit: yaocl]
frgo has quit [Ping timeout: 245 seconds]
foom has joined #lisp
solb has joined #lisp
v0|d has joined #lisp
<solb> Thank you all for help earlier! Class ended so I had to abruptly run away
<solb> But thank you!
<solb> One more question: how do I declare acc in this code? https://pastebin.com/SYDZE0ut
<pfdietz> DO* takes declarations between the termination clause and the body.
<jackdaniel> so basically this: http://ix.io/1oi9
<jackdaniel> you don't need to call the double-float in the end clause
<solb> I see! Thank you.
<solb> I wasn't sure if that form would be automatically 'declare'd or I had to call 'declare' myself
<solb> but that makes a lot of sense!
Josh_2 has joined #lisp
nowhere_man has quit [Ping timeout: 246 seconds]
solb has quit [Quit: Page closed]
s-geometry has quit [Ping timeout: 260 seconds]
frgo has joined #lisp
s-geometry has joined #lisp
scymtym has joined #lisp
astronavt has joined #lisp
frgo has quit [Ping timeout: 252 seconds]
dale_ has joined #lisp
dale_ is now known as dale
heisig has left #lisp ["Leaving"]
cydork has joined #lisp
frgo has joined #lisp
frgo has quit [Read error: Connection reset by peer]
frgo has joined #lisp
frgo has quit [Ping timeout: 272 seconds]
jurov has quit [Excess Flood]
roshanavand has quit [Ping timeout: 268 seconds]
jurov has joined #lisp
roshanavand has joined #lisp
<russellw> beach, as the person in question, that loop was not in fact optimized away by SBCL, and I posted proof that it was not. Please don't spread misinformation, even casually. If you want to argue that someone is using the wrong benchmark, you can do it by suggesting a better one
<beach> Sure. Sorry about that.
<russellw> no worries
charh has quit [Quit: zZZzzZ]
shka_ has quit [Quit: WeeChat 1.9.1]
rippa has joined #lisp
kyby64 has joined #lisp
igemnace has quit [Quit: WeeChat 2.2]
shifty has quit [Ping timeout: 252 seconds]
solb has joined #lisp
mn3m has joined #lisp
flamebeard has quit []
asarch has joined #lisp
megalography has quit [Quit: Leaving.]
robotoad has joined #lisp
jusss has joined #lisp
zxcvz has joined #lisp
<jusss> what's the different between contination with promise/future?
<jusss> and why the other language dont support contination
<beach> That doesn't sound like a Common Lisp question.
<russellw> yeah, jusss, are you perhaps looking for Scheme?
<jusss> sorry,
<jusss> sent wrong channel
<jusss> that blablabla concepts are really not easy to understand
mn3m has quit [Quit: mn3m]
solb has quit [Quit: Page closed]
jusss has quit [Remote host closed the connection]
JohnMS has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
xylef has joined #lisp
xylef has quit [Client Quit]
LiamH has joined #lisp
xuxuru has joined #lisp
nowhere_man has joined #lisp
slyrus1 has joined #lisp
zfree has quit [Quit: zfree]
slyrus has quit [Ping timeout: 268 seconds]
slyrus1 is now known as slyrus
<jasom> Shinmera: It's been a while since I read that original Julia post, but the point was mainly that Julia has a specific combination of performance and ergonomics that is rare. I think that SBCL has similar characteristics, though Julia probably wins in terms of automatic vectorization. A lot of languages are very much outside this box either because of poor ergonomics (e.g. C, C++, Fortran), or poor performance
<jasom> outside of builtin functions (e.g. Python, Ruby).
<Shinmera> What are you telling me this for?
frgo has joined #lisp
<jasom> Shinmera: from 3 hours ago "my problem is more that writing performant software ..."
<Shinmera> My statement is ubiquitous. The complexity and different ways in which you can write something explodes so quickly that any /fair/ comparison becomes impossible
<Shinmera> I'm not making any statements about any actual systems out there.
<jasom> Shinmera: I think "fair" is not binary. You can compare two implementations of the same algorithm in two different languages and discuss them in a manner that is reasonable.
<jasom> there will definitely be some subjective calls, but that doesn't make it inherently unfair.
frgo has quit [Ping timeout: 252 seconds]
<Shinmera> That's where the size part of what I said comes into play.
<jasom> I think there does become a point where a fair comparison becomes difficult, but it's much larger than a single function. I think 100kloc is still tractible.
<Shinmera> I really doubt that
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
<Shinmera> Time and time again even one liners get code-golfed around here into different variants that are shorter, more idiomatic, or more performant. And that's within a single language.
shka_ has joined #lisp
<Shinmera> Evaluating this for larger systems.. well, I'd be interested to see anyone actually complete it.
<scymtym> that way lies the benchmark game which is ridiculous. for example, the lisp solutions use libgmp via ffi and define SBCL vops
razzy has joined #lisp
frgo has joined #lisp
<jasom> Start with "how & why did they decompose the problem in this manner?" Different conventions and primitives offered by different languages lend themselves to different natural decompositions of the code.
<jasom> scymtym: yeah something like 20% of the benchmark game benchmarks devolve to measuring the overhead of the GMP bindings for that language.
<jasom> scymtym: but as far as defining VOPs? I think that is useful to discuss. Are VOPs a better abstraction than inline assembly in C? Which languages don't offer anything comparable to those two features?
<Shinmera> I'm not interested in debating this any further until someone goes and actually produces a meaningful comparison, of which I have yet to see one in my life.
<Shinmera> I'm sure Julia is great for some things and that was never anything I contended.
* jasom will try to dig up the right paper
<Shinmera> *debated
<jasom> I agree that it is totally an uninteresting question to ask if algorithm X can be implemented 2% faster in Julia than SBCL.
<fouric> jasom: ah! thank you for correcting my misconception
<fouric> (re: traits)
frgo has quit [Remote host closed the connection]
<fouric> multiple inheritance it is
frgo has joined #lisp
mathrick_ has quit [Ping timeout: 260 seconds]
<jasom> fouric: multiple inheritance is very powerful, but be aware of its pitfalls; diamond inheritence and name clashes are a thing. Name clashes of methods are less of a problem in lisp because methods are not namespaced to the class, but reasoning about diamond inheritence can be confusing.
<jasom> fouric: if you were wondering what diamond inheritance is: https://en.wikipedia.org/wiki/Multiple_inheritance#/media/File:Diamond_inheritance.svg
<Shinmera> diamond inheritance is not a big deal in lisp either due to the fact that the precedence rules are clearly defined
SaganMan has joined #lisp
<jasom> Shinmera: it's rarely a problem in any language not named C++ with a diagram as simple as is typically drawn, it's when you don't immediately realize it's happening that it can get confusing.
<_death> lisp does the right thing, even if it's a bit more expensive.. C++ does not, and so has virtual inheritance
<Shinmera> jasom: Right.
<jasom> and again it's greatly helped that you aren't implicitly inheriting namespaces when you inherit an object. you can have inherit from a class with a foo:bar and a different class with a baz:bar method and the sky does not fall.
<jasom> It took me years to come to this conclusion though because I tend to not heavily use classes; it was always strange to me that CLOS did away with message-passing OO (because multiple dispatch is not incompatible with message-passing). I always knew I was missing something because message-passing systems in lisp predated CLOS, so everyone involved in creating CLOS had used them before and thought CLOS was
<jasom> better.
<jasom> this was another problem traits were meant to solve; in self, conflicts in method names must be explicitly resolved.
mathrick_ has joined #lisp
hhdave has quit [Ping timeout: 252 seconds]
jack_rabbit has quit [Ping timeout: 252 seconds]
SaganMan has quit [Quit: WeeChat 1.6]
pjb has joined #lisp
jack_rabbit has joined #lisp
skidd0 has joined #lisp
<jasom> fouric: ah, I found a possible source of confusion, apparently what scala calls "traits" is different from the rest of the world calls traits, so if you learned them there, then that might be why
cl-arthur has joined #lisp
<jasom> scala traits can have state, but may not have parameterized constructors.
<Shinmera> jasom: Scala and Rust both, I believe.
<jasom> Shinmera: https://doc.rust-lang.org/rust-by-example/trait.html implies they cannot have state, but does not state it.
<Shinmera> they can have fields
<Shinmera> but it gets real messy real quick
<Shinmera> anyway, I don't want to go on a rant about Rust so I'll just snuff it.
<skidd0> Hey so as I'm learning Lisp (through building a program), should I focus on making my code "lispy" and "elegant" or just "get it to work" first?
<jasom> having fields in traits just seems like missing the piont, *shrug*
<jasom> skidd0: get it to work.
<skidd0> okay
<skidd0> i'm just warry of engraining bad, non optimal techniques
<Shinmera> Agreed, you can always rewrite later
<skidd0> okay, thanks guys
<jasom> skidd0: when you are new, you can usually tell if it works, but can't tell if it's elegant, so measure what you can.
<Shinmera> lQuery and Radiance were my first projects. I've rewritten them both about thrice, and coming back to see the dumb shit I did was amusing.
<cl-arthur> skidd0: I get things to working, and then I beg on #clschool for code reviews so I can see how I fucked up :)
<skidd0> i just have a nagging feeling in my head when I use a munch of prgns
<skidd0> ah smart
<skidd0> code reviews
<skidd0> cl-arthur: I'll do the same once I have a working minimal viable product
<jasom> skidd0: 5 years from now I'll be surprised if you don't marvel at how bad your code looks like today. However writing software that works is a huge accomplishment, regardless of how you get there.
<skidd0> i love the endorphin rush when a new method works as intended
<skidd0> thanks everyone
<|3b|> and ideally that should apply to any 5 year period :)
<skidd0> Are there any books or resources like "Writing Idiomatic Python" for CL?
<jackdaniel> minion: tell skidd0 about pcl
<minion> skidd0: please see 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).
<skidd0> so I can start to get a feel for what "good code" looks like?
<_death> you should have a program that replays your code snippets from 5 years ago every day
<jackdaniel> this is the closest resource you can get
<skidd0> I've been using PCL!
<Shinmera> _death: Clockwork orange for programers?
<skidd0> very helpful resource
<jackdaniel> skidd0: since many programmers grew up on it, and the author did a good deal of research about "idiomatic" programming in CL that's what sets a standard of things most lispers would consider idiomatic
<skidd0> I also have ANSI Common Lisp from Paul Graham
<jackdaniel> clean code, using clos etc
<jackdaniel> ANSI CL is a great book, but it's far from "idiomatic" - whatever that means
<jackdaniel> also PAIP, excellent book
<skidd0> thanks _death
<cl-arthur> https://www.cs.northwestern.edu/academics/courses/325/readings/graham/graham-notes.html lists (supposedly) non-idiomatic parts of ANSI CL
<skidd0> idiomatic to me just means leveraging the built in features of a language
m00natic has quit [Remote host closed the connection]
<shka_> well, i just wanted to point out that land of lisp is a fun book
<shka_> good evening btw
charh has joined #lisp
<skidd0> I found a copy but haven't read it yet
<skidd0> it's more project based, right?
<skidd0> That's my style
<skidd0> Thanks for the links, cl-arthur and jackdaniel
<shka_> it is, but it is slightly skewed toward functional programming
<skidd0> jackdaniel: are you a whiskey guy?
<skidd0> okay awesome
<shka_> but it is fun
<skidd0> I want to dive more into FP
<skidd0> I understand CL is less FP then other Lisps though
<skidd0> or so I've seen written
<jackdaniel> skidd0: sure, why?
<jackdaniel> you plan to send me a bottle?
<skidd0> just reading into your nick is all
<skidd0> we can share one once I write my program ;]
<dim> yeah I think CL doesn't care much about FP other than for FP to be a useful way to solve some practical problems when you write code
<dim> just like OOP is, and then we have CLOS
varjag has joined #lisp
<jackdaniel> skidd0: CL is a ball of mud
<dim> I like that attitude of “here's a tool set to solve problems, we hope you'll find what you need”, at least that's my personal reading of it
<skidd0> that's why I'm liking CL so much
<jackdaniel> you may add mud to it and it will still look like CL
<skidd0> it's a tool box
<skidd0> not a forced mindset
<shka_> lisp is mix of everything
<shka_> well, common lisp
<Shinmera> I, too, identify as a dung beetle
<cgay> heh
<shka_> such a majestic creature
cydork has quit [Ping timeout: 252 seconds]
sjl has joined #lisp
kyby64 has quit [Ping timeout: 256 seconds]
quipa has quit [Ping timeout: 246 seconds]
quipa has joined #lisp
warweasle is now known as warweasle_afk
pjb has quit [Ping timeout: 264 seconds]
shenghi has quit [Ping timeout: 252 seconds]
shenghi has joined #lisp
nixfreak has joined #lisp
myrmidon has joined #lisp
lyf[kde] has joined #lisp
jsjolen has joined #lisp
lyf[kde] has quit [Quit: Quit]
roshanavand has quit [Ping timeout: 268 seconds]
roshanavand has joined #lisp
mathrick_ has quit [Ping timeout: 252 seconds]
<jsjolen> Wrapping EVAL-WHEN (:compile-toplevel :load-toplevel :execute) around a defconstant/alexandria:define-constant should lead to errors being signalled as long as the constant is of some relatively complex object, right? In general making sure that something can be DEFCONSTANT:ed seems to be a bit of a pain (because of the time the value needs to be available)
lyf[kde] has joined #lisp
lyf[kde] has quit [Client Quit]
lyf[kde] has joined #lisp
<|3b|> if you need it available at compile time, you need to be able to calculate it whether it is stored as a constant or not
<jsjolen> |3b|: Yup, I guess the second sentence was me meandering on a tangent
lyf[kde] has quit [Client Quit]
lyf[kde] has joined #lisp
<|3b|> if first part is about redefinition, avoiding that is what alexandria:define-constant is for, just use a test that works on that object
roshanavand has quit [Ping timeout: 244 seconds]
roshanavand has joined #lisp
slyrus1 has joined #lisp
<jsjolen> Yeah, I'll add that in as a FIXME, I'm not entirely sure if this EVAL-WHEN is even needed.
zaquest has joined #lisp
lyf[kde] has quit [Ping timeout: 240 seconds]
pjb has joined #lisp
mathrick_ has joined #lisp
jsjolen has quit [Remote host closed the connection]
slyrus1 has quit [Ping timeout: 260 seconds]
ggole has quit [Quit: ggole]
lyf[kde] has joined #lisp
lyf[kde] has quit [Client Quit]
warweasle_afk is now known as warweasle
zxcvz has quit [Quit: Leaving]
pjb has quit [Ping timeout: 252 seconds]
Necktwi has quit [Quit: leaving]
decent-username has joined #lisp
vlatkoB has quit [Remote host closed the connection]
s-geometry has quit [Ping timeout: 252 seconds]
lyf[kde] has joined #lisp
Trystam has joined #lisp
smaster has joined #lisp
Trystam has quit [Quit: Leaving]
azimut has joined #lisp
azimut_ has quit [Ping timeout: 240 seconds]
serichsen has joined #lisp
<serichsen> good evening
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
dented42 has joined #lisp
shka_ has quit [Ping timeout: 252 seconds]
myrmidon has quit [Quit: Leaving]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
npr-work has left #lisp ["ERC (IRC client for Emacs 24.5.1)"]
lyf[kde] has quit [Quit: Quit]
Roy_Fokker has joined #lisp
slyrus1 has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
Bike_ has joined #lisp
asarch has quit [Quit: Leaving]
Bike has quit [Disconnected by services]
Bike_ is now known as Bike
roshanavand has quit [Quit: leaving]
pjb has joined #lisp
pierpal has joined #lisp
phoe has quit [Read error: Connection reset by peer]
angavrilov has quit [Remote host closed the connection]
zotan has joined #lisp
smaster has quit [Ping timeout: 245 seconds]
hhdave has joined #lisp
antonv has joined #lisp
<antonv> can anyone open http://www.sbcl.org/manual/ ?
<antonv> "This site can't be reached" for me
hhdave has quit [Ping timeout: 252 seconds]
phoe has joined #lisp
shifty has joined #lisp
hhdave has joined #lisp
<antoszka> antonv: looks like the domain name hasn't been paid for
<antoszka> it's rather not about reaching the site, but (not) resolving the name
<antoszka> ;; Host sbcl.org not found: 2(SERVFAIL)
<zigpaw> domain was paid for, it expires on 2019-04-16; so just dns server failure.
<phoe> Whoever serves the DNS server for sbcl.org - they need to fix their DNS server.
<antonv> <stassats> use http://sbcl.sourceforge.net/ in the meantime
<zigpaw> there is no SOA record resolving for the domain, so basically someone broke it via registrar panel or registrar f*ed up (enom so yeah, wouldn')
<zigpaw> wouldn't be surprised*
<antoszka> yeah
hhdave has quit [Ping timeout: 252 seconds]
<antoszka> only whois contains delegation info:
shifty has quit [Ping timeout: 260 seconds]
<antoszka> Name Server: DNS1.MEDONLINE.COM
<antoszka> Name Server: DNS2.MEDONLINE.COM
<antoszka> those names don't resolve either
<zigpaw> so we have a culprit.
<antoszka> so it seems
<antoszka> still, if you're a DNS provider you'd at least keep glue records in your upstream
<antoszka> it all seems snafud
<zigpaw> fixing it will take time if those won't go online, chaning the nameservers propagates slowly (from my experience) and if serial number won't be continuation of the last one used it will even take longer (also from my experience).
<antoszka> If there's an entirely new SOA record the serial probably won't matter that much.
<antoszka> Still, it's a pain and somebody (domain owner) would have take care of that at the registrar.
smaster has joined #lisp
scymtym has joined #lisp
<antoszka> *but*
<antoszka> it all seems to belong to enom.com (the registrar)
<antoszka> and on their website they say "we know the service is downgraded"
ober has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
* ober notes sbcl.org is down again
<antoszka> looks like dns problem
<antoszka> if somebody has the IP cached we could test if the site itself is up
<zigpaw> datacenters get flooded, they burn, or maybe someone just tipped over power cables. but that's why normally there are two dns servers, and they should be located separately (which rarely happens when people self-host)
<skidd0> are you talking about best practices?
* zigpaw knows cause he does the same :P
<skidd0> what are those?
<antoszka> zigpaw: and preferably unrelated to a) registrar b) site-hosting
<antoszka> I try to at least adhere to a) and b)
Lycurgus has joined #lisp
<ober> not even cached though.
<antoszka> and keep ns-s separate
Bike has quit [Ping timeout: 256 seconds]
<zigpaw> but today it is really easy to have your domain kept by some giant-hosting-company like godaddy or smaller-one like name.com and use their dns servers which they keep separated (as they have learned the hard way years ago in most cases ;-))
<antoszka> 216.105.38.10
<antoszka> here you go
<ober> they still hosting on source forget?
<antoszka> sf.net
<antoszka> looks like it
<ober> might as well put the forums on AOL.net to show all the millenials we're not old. :P
<antoszka> yeah, and the site works
<antoszka> if you put the address into `/etc/hosts` or trick your resolver your other favourite way :)
<zigpaw> enom is just an old company that I think didn't keep up and probably not the cheapest one also. I think I haven't used them for many many years.
<antoszka> I don't even know them.
<antoszka> > The most recent version is SBCL 1.4.12, released September 28, 2018 (release notes).
<antoszka> That's from the website.
<antoszka> It's FRESH!
<zigpaw> they were one of the few early registrars, you almost had to use them (esp. if you were not from US).
<antoszka> Hm. I've used Polish registrars in the 90s (well, there really was only one + resellers)
decent-username has quit [Remote host closed the connection]
<zigpaw> but not for domains other than .pl as far as my memory serves well.
antonv has quit [Ping timeout: 252 seconds]
<zigpaw> and they wanted you to provide written 'proof' that you 'own' the name you wanted to register.
* zigpaw had used nask too, they were terrible ;)
<antoszka> zigpaw: True. They also cared for the .pl TLD.
<antoszka> They were ;)
xuxuru has quit [Quit: xuxuru]
cpape has joined #lisp
<antoszka> zigpaw: are you Polish, btw? If so, you might want to stick around #lisp-pl, too
mkolenda has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
<zigpaw> I am, thanks :)
mkolenda has joined #lisp
pjb has joined #lisp
charh_ has joined #lisp
charh has quit [Ping timeout: 260 seconds]
nixfreak has quit [Ping timeout: 256 seconds]
Essadon has quit [Quit: Qutting]
solb has joined #lisp
<solb> Hey y'all -- solb back again with the optimization questions
<LdBeth> GG
charh_ is now known as charh
<solb> the second one takes half the time as the first one when the first is called with #'sin
<LdBeth> SBCL?
<solb> yessir
<solb> one thing I've noticed is the difference that the first cons'es a bunch of things, whereas the second does not
<solb> but I don't know why / where...
<LdBeth> solb: I guess you place wrong place for DECLARE in DO*
bigfondue has quit [Ping timeout: 252 seconds]
<solb> hmmm but nothing being declared there appears to be slowing down the code
<LdBeth> Though I’m not sure it’s relevant
<solb> What's the right format at the end?
<LdBeth> (DO* (clauses ...)
<LdBeth> (declare form...)
<LdBeth> ((> time end) ...))
makomo has quit [Ping timeout: 244 seconds]
ober has left #lisp ["ERC (IRC client for Emacs 26.1)"]
skidd0 has quit [Quit: WeeChat 2.2]
<aeth> ({var | (var [init-form [step-form]])}*) (end-test-form result-form*) declaration* {tag | statement}*
<aeth> solb: LdBeth is wrong here, and the link LdBeth provided is counter to what LdBeth is saying in LdBeth's code example
varjag has quit [Ping timeout: 260 seconds]
<aeth> solb: Your indentation is wrong, though. declare should go on its own line
<solb> ok!
<solb> do you have any idea about the cons'ing though?
<aeth> In case I was unclear, the declaration appears as an optional first line to the body. Having the declare not on its own line obscures that declare is the first line of the body
<pjb> funcall may be implemented as (apply f (list time)) <- here consing a list of arguments.
<solb> oh oh I see, any way to get around that?
<pjb> try (apply f time '())
<pjb> Just guessing here…
<aeth> solb:It's not that
<aeth> solb: The problem is that double-float itself conses, and an arbitrary double float added to another double float will also cons. It's arbitrary because it's being returned from a function that it is not inlined. (sin in your other example is inline in SBCL in this case)
<solb> so is there a way to inline my own functions?
<aeth> solb: The two easiest ways I can think of to work around this would be: you could turn this from a function into a macro, or you could have the function return a single-float. Inlining the function *might* also work if the calling function is itself not a higher order function, even though disassembling left-hand directly will still show consing.
<aeth> solb: You can also have the function mutate an array of length 1 that contains a double float instead of returning a value. In SBCL, a struct with a :type double-float slot will also work.
<aeth> (Make sure that you don't also return the value you're setting or that defeats the point becuase it'll still have to cons to return the return value even though the setting isn't consing. e.g. (setf (aref foo 0) some-double-float) as the final position would cons anyway because it will both set and return some-double-float)
<solb> is it too much to ask what an implementation like this would look like?
<aeth> Well those are four (five if you count structs and arrays separately) different implementations. I've used all five.
<solb> where can I read about this? (I've read two books, and am reading 'On Lisp')
<aeth> I'm not sure there's a resource. I've written a bit about avoiding consing in general, in the context of my game engine here: https://gitlab.com/zombie-raptor/zombie-raptor/blob/8fef9b44b47982d6e756e9b8d0eb0d7b7bd5178e/CONTRIBUTING.md#consing-heap-allocations
<aeth> But that's skewed toward how game engines work: i.e. mutable state.
<aeth> If you wanted an approach with less mutable state, the macro or single-float return value or inline approach might be preferable.
<solb> how would turning into a macro help?
<aeth> solb: Because then the double float doesn't leave the scope of the function
<solb> what exactly does that mean in this context
<aeth> If something is an unsigned-byte 64, signed-byte 64, or double-float it can be optimized to not be boxed, but only if it doesn't leave the function except if it's being set as an element of a specialized array (i.e. :element-type 'double-float) or (in SBCL and perhaps some other implementations) a struct slot with :type double-float
<solb> which double-float is leaving the scope of the function?
<aeth> solb: It's leaving the higher order function.
<aeth> It's also the return value.
<aeth> solb: Just skimming it my best guess is that the two allocations are (1) the return value and (2) the result of the addition in (+ suma (the double-float (funcall f time)))
<aeth> There will also be a third allocation, f's return value.
<solb> hmmm
<solb> I'm trying my best to keep up
<aeth> solb: The most straightforward refactoring would either be to (1) inline and hope that in actual use it wouldn't cons (it's only 315 bytes with allocations so it's probably small enough to add a (declaim (inline foo)) above the defun) but I'm not sure about how it would handle the funcall part (it would remove the return value's consing unless the calling function also returns a double-float)
<aeth> solb: Or (2) make your own box with something like (make-array 1 :element-type 'double-float) and modify your API so the higher order function does something like (defun foo (x) (setf (aref x 0) (calculations (aref x 0))) nil) ; of course this pseudocode only works if calculations is inline
smaster has quit [Ping timeout: 268 seconds]
<aeth> (returning x instead of nil would also work, since it's an array)
<aeth> then you'd do something like (+ suma (progn (funcall f array-of-size-one) (aref array-of-size-one 0)))
smaster has joined #lisp
Bike has joined #lisp
<aeth> hopefully that would remove the boxing because it can really truly trust that + isn't going to be used on a double-float, assuming it knows that array-of-size-one is of the type (simple-array double-float (1))
<aeth> s/isn't going to be used/is going to be used/
<aeth> (I'm guessing that the ftype declaration for f isn't really working, but an aref would)
<aeth> If you go with #1 you will get a note every compilation that it conses, even if it doesn't actually cons in any user function.
earl-ducaine has joined #lisp
<solb> hmm
<solb> I have very little time but I will save all this and use this later :)
<solb> thank you so much
<aeth> solb: got it to work
<solb> please share!!
<aeth> (declaim (inline left-hand*))
<aeth> (well I renamed it to left-hand* to test)
<aeth> and replace the function type with (type function f)
<aeth> Then I did this: (defun foo () (coerce (left-hand* 1d0 2d0 3d0 #'sin) 'single-float))
yaocl has joined #lisp
<aeth> half the asm size
<aeth> (I turn it into a single-float so it doesn't allocate the final return value... there are other ways to get the value out of the function. If you need the precision, I'd set a value in a specialized array or struct instead)
<solb> ok I will try this
<aeth> I think it will work as long as the function you're using is itself inline, like the built-in math functions
<aeth> If you need a double-float out of it, use an array or struct, e.g.: (defun foo (answer) (declare (type (simple-array double-float (1)) answer)) (setf (aref answer 0) (left-hand* 1d0 2d0 3d0 #'sin)) answer)
<aeth> Just make sure that no double-float is being returned.
<aeth> That returns the answer array that was modified to provide the answer.
Copenhagen_Bram has quit [Quit: So long, and thanks for all the fish! 2.2 Weechat is best Weechat]
yaocl_ has joined #lisp
r1b has joined #lisp
<aeth> This is a really cool result, btw. I wasn't 100% sure that you could just have an inline higher order function that calls an inline function and get an efficient result from that. It even works for user-defined inline functions like (declaim (inline bar)) (defun bar (x) (+ 2 x))
yaocl has quit [Ping timeout: 268 seconds]
yaocl_ is now known as yaocl
phadthai has quit [Ping timeout: 272 seconds]
<aeth> This means that practically speaking you might be able to remove a lot of your type declarations because the inline function will (probably) handle it when inline. e.g. bar has no type declarations.
<jasom> aeth: the way the inliner works in sbcl is by recursively open-coding the inline functions, so if the HoF gets inlined, then it will have a direct call to the function passed as a parameter which gets inlined &c.
<jasom> also I don't know if it's still the case, but several years ago sbcl would go nuts if you declared a recursive function to be inline.
<jasom> seems to be smarter now.
lemoinem has quit [Ping timeout: 245 seconds]
lemoinem has joined #lisp
robotoad has quit [Quit: robotoad]
LiamH has quit [Quit: Leaving.]
<aeth> Too bad you can't inline the entire program. (And if you can it'd be a bad idea)
makomo has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lemoinem has quit [Ping timeout: 252 seconds]
Kaisyu has joined #lisp
<aeth> I like the idea of having SBCL do all of the hard work.
<Josh_2> I like it when computers make life easier
phadthai has joined #lisp
dented42 has joined #lisp
lemoinem has joined #lisp
quipa has quit [Ping timeout: 252 seconds]
pierpal has quit [Read error: Connection reset by peer]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robotoad has joined #lisp
mange has joined #lisp
megalography has joined #lisp
siraben has quit [Ping timeout: 252 seconds]
dale has quit [Quit: dale]