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
fikka has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Remote host closed the connection]
Essadon has quit [Quit: Qutting]
warweasle has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
aydio has quit [Quit: WeeChat 2.2]
ryan_vw has quit [Ping timeout: 240 seconds]
benjamin-l has joined #lisp
Jesin has joined #lisp
anamorphic has joined #lisp
dale has quit [Quit: dale]
<anamorphic> How do symbol property lists typically get used?
<no-defun-allowed> they don't
<no-defun-allowed> it's just an old leftover from old lisps
sjl_ has quit [Quit: WeeChat 2.2-dev]
ebrasca has joined #lisp
<White_Flame> discussed this pretty recently, but in old code that I've seen, consider a normal hashtable scenario holding a symbol->value mapping. If you have no hash tables but only symbol plists, then the usage is symbol-plist ->(table-name value)
<White_Flame> so there is no central object holding the table. The symbol keys are just annotated with the table named entries in the plist. It's a pretty good way of avoiding plist key clashes
<anamorphic> So I was playing with this: (defun magic-keyword (keyword) (setf (fdefinition keyword) #'(lambda (hash-table) (gethash keyword hash-table)))), which lets you use (:foo hash-table) like in Clojure... Is that kind of thing likely to cause a mess in subtle ways?
<White_Flame> I can't see anything at simple glance of the spec that would clash with that use
<White_Flame> (defun :foo () ...) also seems to work
<White_Flame> at least on my SBCL
<White_Flame> it does go against common style in terms of what keywords are for, but I don't think there'd be a technical problem with it
shifty has joined #lisp
nowhere_man has joined #lisp
lnostdal has joined #lisp
Roy_Fokker has quit [Read error: Connection reset by peer]
anamorphic has quit [Ping timeout: 240 seconds]
Lycurgus has joined #lisp
warweasle has quit [Quit: tired. I want to go to bed.]
lumm has quit [Quit: lumm]
warweasle has joined #lisp
ym has quit [Quit: Leaving]
marusich has joined #lisp
<drduck> Are there any good networking books that are lisp themed?
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
<drduck> Or is Python the de-facto networking language now?
<no-defun-allowed> what kind of networking?
<nisstyre> what, why would Python be de-facto for networking?
<nisstyre> the best networking book is TCP/IP Illustrated
<nisstyre> volume 2 covers C code
<no-defun-allowed> afaik usocket is pretty close to C while remaining useful
<no-defun-allowed> you can use SOCKET-STREAM and it's just another lisp stream
ryan_vw has joined #lisp
<drduck> I thought tcp/ip illustrated was outdated.
xkapastel has joined #lisp
<nisstyre> drduck: no, there's an updated version
<nisstyre> also the protocols haven't changed much anyway
<nisstyre> that's kinda the point, it's a layered system
marusich has quit [Quit: Leaving]
astronavt has joined #lisp
astronavt has quit [Remote host closed the connection]
holycow has joined #lisp
pierpal has joined #lisp
anewuser has joined #lisp
pierpal has quit [Ping timeout: 252 seconds]
pierpal has joined #lisp
Ekho- is now known as Ekho
pierpal has quit [Ping timeout: 246 seconds]
nowhere_man has quit [Ping timeout: 252 seconds]
nowhere_man has joined #lisp
luis has joined #lisp
ryan_vw has quit [Ping timeout: 245 seconds]
Josh_2 has quit [Remote host closed the connection]
cylb has joined #lisp
cylb has quit [Ping timeout: 272 seconds]
Jachy has joined #lisp
dddddd has quit [Remote host closed the connection]
pierpal has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 246 seconds]
ggole has joined #lisp
<leo_song> Speaking about network, is there portable way of avoiding the read hanging on the unfinished line other than READ-CHAR-NO-HANG?
<leo_song> (with better performance)
beizhia has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
<stylewarning> leo_song: no
<stylewarning> leo_song: dip into your OS! :D
<leo_song> stylewarning: Em... That's what I'm doing.
nanozz has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
ryan_vw has joined #lisp
<aeth> leo_song: I'm actually exploring an alternative
<aeth> leo_song: you have to write it yourself on top of read-char-no-hang, obviously
nanozz has quit [Ping timeout: 246 seconds]
<leo_song> Better to write a new one over the system calls when dealing with GBs of data other than the READ-CHAR-NO-HANG
igemnace has quit [Quit: WeeChat 2.3]
<beizhia> Anyone got some good resources for introducing other coders to Lisp? Going to be giving a little talk to a bunch of php and JS coders. I
<beizhia> I'm working up some examples myself, but any other input is welcome
<leo_song> Make a real cl-php?
<beizhia> 0_0
<beizhia> I'm not that good yet!
<leo_song> <?lisp (format t "<p>Hello World</p>") ?>
<aeth> beizhia: you could try doing something fun and visual with a library like https://github.com/vydd/sketch or https://borodust.org/projects/trivial-gamekit/ or https://github.com/cbaggers/cepl
<beizhia> I was thinking of giving a good showing of REPL/Slime development, macros, asdf/quicklisp, etc
<beizhia> maybe a bit of interactive web-dev with hunchentoot, since thats what I've been doing lately myself
jeosol has quit [Ping timeout: 256 seconds]
<beizhia> reading those now aeth
<aeth> beizhia: I think CEPL would be a good choice to show off what SLIME can do. e.g. https://www.youtube.com/playlist?list=PL2VAYZE_4wRKKr5pJzfYD1w4tKCXARs5y
<aeth> In addition to something web, of course. If you have the time for several demos.
<aeth> Only do graphics if you have control over the hardware, of course. Who knows what drivers a random machine has.
<beizhia> Oh ya, those would be pretty rad. I'd be showing it from my machine, so that's all cool
<leo_song> beizhia: I think build a "cl-php" over hunchentoot should cost less than 1000 lines of code, and much faster than real PHP
<beizhia> I do want to keep it around 30 mins of demo time, so its probably more of a core concepts of the language sort of thing
<beizhia> definitely gonna watch through all these CEPL vids myself though, so thanks aeth
<aeth> leo_song: if you mean implementing PHP in CL, it's probably not 1000 lines. cloc says I have 763 lines of .lisp and .scm code in my Scheme implementation in CL and it's only about 40% complete. And Scheme's one of the closest languages to CL (and one of the smallest specified languages)
<leo_song> aeth: nop, I mean PHP as method
<leo_song> as I said: <?lisp (format t "<p>Hello World</p>") ?>
<aeth> leo_song: Oh, you mean PHP-style evaluation of CL within HTML?
<beizhia> I was planning on working in CL-WHO
<beizhia> Once I go over the whole code-is-data idea.
<leo_song> aeth: yes, one of my freind did a similar thing in Node.js during the internship, he said it's very handy
vlatkoB has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
<leo_song> beizhia: I think a very important point is telling people Common Lisp is actually simpler than their languages
arescorpio has joined #lisp
<beizhia> leo_song: Agreed. I do also have to make them comfortable with the syntax (or lack thereof)
<beizhia> Apparently Lisp is ugly compared to php >_>
meepdeew has joined #lisp
<leo_song> >_<
<beizhia> this is what I'm working with here hah
mrblack has quit [Remote host closed the connection]
Bike has quit [Quit: Lost terminal]
<no-defun-allowed> sbcl is notably faster than node.js, even without fancy cee bindingd
<no-defun-allowed> *bindings
<aeth> no-defun-allowed: depends
<aeth> no-defun-allowed: SBCL is faster if you know how to write fast code
<aeth> A total beginner will probably write something that's faster on node.js
<aeth> I mean, left-pad was accidentally quadratic but not really. https://accidentallyquadratic.tumblr.com/post/142387131042/nodejs-left-pad
<aeth> that's how JS engines work
<no-defun-allowed> what?
<no-defun-allowed> my http server was hardly optimised and it was about 3x faster than node
<no-defun-allowed> the largest optimisation i did was i didn't use split-sequence :P
fikka has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
<makomo> morning
<no-defun-allowed> morning
ryan_vw has quit [Ping timeout: 246 seconds]
itruslove has quit [Ping timeout: 260 seconds]
yangby has joined #lisp
itruslove has joined #lisp
yangby has quit [Client Quit]
ym has joined #lisp
yangby has joined #lisp
yangby has quit [Client Quit]
<beach> Good morning everyone!
rippa has joined #lisp
<LdBeth> Morning
arescorpio has quit [Quit: Leaving.]
shka_ has joined #lisp
frodef has joined #lisp
_whitelogger has joined #lisp
aeth has quit [Read error: Connection reset by peer]
aeth has joined #lisp
kushal has quit [Ping timeout: 256 seconds]
kushal- has joined #lisp
mange has joined #lisp
bendersteed has joined #lisp
lavaflow_ is now known as lavaflow
phenoble has quit [Quit: ZNC 1.7.0 - https://znc.in]
phenoble has joined #lisp
papachan has joined #lisp
phenoble has quit [Client Quit]
heisig has joined #lisp
fikka has joined #lisp
makomo has quit [Ping timeout: 250 seconds]
nirved has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
random-nick has joined #lisp
anewuser has quit [Ping timeout: 252 seconds]
fikka has joined #lisp
robotoad has joined #lisp
fikka has quit [Ping timeout: 246 seconds]
bendersteed has quit [Remote host closed the connection]
beizhia has quit [Ping timeout: 264 seconds]
pierpal has joined #lisp
k-hos has joined #lisp
potatonomicon has quit [Ping timeout: 246 seconds]
anewuser has joined #lisp
jmercouris has joined #lisp
phenoble has joined #lisp
<jmercouris> what is the difference between a stream and "gray" stream?
<beach> A Gray stream is a stream. It is named after David Gray, so it has nothing to do with the color.
<beach> A Gray stream is a CLOS-based protocol for the lowest level of a stream.
<jmercouris> beach: can you unpack that explanation a little bit for me
<beach> Reading a character or a byte, writing a character or a byte, checking EOF.
<jmercouris> so it is a protocol based on the implementation of some defmethods required to be considered "gray"
<beach> So the programmer can define a class that works like an arbitrary stream.
<jmercouris> and those are some of those methods that you listed
<jmercouris> okay I see
<beach> Then the programmer defines methods on that class like trivial-gray-stream:read-char etc.
<jmercouris> so it is one programmers specification of what functionality a stream object should support
<jmercouris> and why might I want to conform to this protocol? are there supporting libraries that expect gray stream conforming objects?
<beach> Yes, for example, you can write a stream that returns random characters and never reaches EOF.
<beach> SBCL and probably most other Common Lisp implementations accept Gray streams as arguments for stream functions, like READ.
<jmercouris> I see
<jmercouris> and what are the advantages over a regular stream object?
<jmercouris> is the API to implement a regular stream object much more complex?
<beach> Try to return random characters from a regular stream!
<beach> The protocol for implementing regular streams is not exposed.
<jmercouris> ah okay
<jmercouris> that was going to be my next question
<beach> So you are in implementation-specific territory.
<jmercouris> I was going to ask if there is a stream class that I might inherit from
<beach> That won't be necessary.
<jmercouris> so to fill in this gap, David Gray came up with this protocol
<beach> If you implement all the required methods, then any class will do.
<jmercouris> and more or less everyone just agrees that it is okay
nirved is now known as Guest27509
Guest27509 has quit [Killed (leguin.freenode.net (Nickname regained by services))]
<beach> Yes, except that it did not become part of the standard.
<jmercouris> the same way fare came up with ASDF
nirved has joined #lisp
<jmercouris> right, ASDF is also not part of the standard, right?
<beach> Similar, yes.
<beach> Correct.
<beach> The difference is that Gray Streams actually existed when the standard was written.
<beach> ASDF did not.
<jmercouris> Ah, I see
<jmercouris> and I assume again it was probably a time/money issue that prevented its integration into the specification?
<beach> Possibly performance as well.
<beach> A generic function is called for each character/byte read.
<jmercouris> I can see why that would be expensive
<jmercouris> so what happens if you only implement part of the protocol, let's say you only implement the byte reading methods
<jmercouris> can you still say that you have a gray stream type object?
<jmercouris> or must you implement the whole protocol?
<beach> You only have to implement the methods that are actually called.
<jmercouris> for example, in places where SBCL allows gray streams, will it cause issues, or would it just try to work, and if a method doesn't exist- then raise a signal
<jmercouris> ok, that makes sense
<beach> In Common Lisp you don't "raise a signal". You "signal a condition".
<jmercouris> yes, I'm still not understanding off signals and conditions
Zaab1t has joined #lisp
<jmercouris> I've read the PCL chapter three times now, and I still don't get it
<jmercouris> I'm hoping that when I get to it in a Gentle introduction that I'll finally understand
<jmercouris> s/off/of - my keyboard is a bit wonky
<beach> There are no signals in Common Lisp. The only "signal" in the Common Lisp HyperSpec is a verb.
<jmercouris> so in the same sense that a functional call is not a noun, but an action?
zxcvz has joined #lisp
<beach> You can use "call" as a noun. "This call to this function produced a list."
<jmercouris> by that same logic couldn't you say "this signal in this function produced a condition"?
<jmercouris> I'm not trying to be pedantic, just trying to understand what you mean
<beach> Here is an example of use of Gray streams: In Second Climacs, I nead to READ the contents of an editor buffer. But the buffer is not a stream. It has a complex structure. So I create a Gray stream that is acceptable as a stream to the Common Lisp implementation, and that knows about the structure of the buffer, so that it keeps the current line and column in its instance.
<beach> jmercouris: It is not that important.
<jmercouris> ok
<jmercouris> so when you say "the buffer is not a stream", you basically mean the buffer is not a contiguous block of data that can be easily read from?
pierpal has quit [Read error: Connection reset by peer]
<jmercouris> and so you hide that complexity behind a stream object that knows from where to fetch the various parts that compose the buffer to make it appear as if it is one contiguous block, or a file or something, something that a normal stream could read
<beach> Furthermore, in Second Climacs, I keep a cache of expressions already read, indexed by position. If a call to READ is made with such a position, I return the cached object, and advance the position beyond the characters of the object.
<beach> jmercouris: I mean, it is not a stream in that it is not (typep <buffer> 'stream) so it can't be used to READ from.
<jmercouris> okay, I see, it is some other, unsupported type, so you had to implement a gray stream to treat it as a stream
<beach> Exactly.
<jmercouris> and why exactly might you want to do this? where did you need to read the buffer contents as a stream?
phenoble has quit [Quit: ZNC 1.7.0 - https://znc.in]
<jmercouris> for persisting to disk for example?
<beach> jmercouris: The buffer contains Common Lisp code, and I need to read it in order to analyze it as such.
phenoble has joined #lisp
<jmercouris> ah so you need that READ be able to read the buffer, I get it
<beach> If I hadn't done it this way, I would have to re-implement a specific READ function for this purpose.
<beach> As it is, I can use Eclector to read it.
<jmercouris> right, and that function would read from the buffer, generate some strings or something, or a file, and pass them to READ
<nirved> jmercouris: for conditions (and a lot of other topics) you might want to look in "Common Lisp Recipes"
<jmercouris> nirved: the sourceforge or github version?
pierpal has joined #lisp
<jmercouris> beach: I think I understand a lot more now, thank you for the explanations
frodef has quit [Ping timeout: 252 seconds]
<nirved> jmercouris: the book
<jmercouris> a stream reminds me of these abstract database interfaces people use sometimes
<jmercouris> so you don't need to understand what the database is or how it works, just that it supports some sort of protocol
<jmercouris> kind of like a cross-database ORM or something, but for any type of data
<beach> jmercouris: Anytime!
phenoble has quit [Quit: ZNC 1.7.0 - https://znc.in]
makomo has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
rumbler31 has quit [Remote host closed the connection]
<jmercouris> anyone know of any listserv type software written in CL?
pierpal has quit [Read error: Connection reset by peer]
drduck has quit [Ping timeout: 240 seconds]
<jmercouris> I guess a pre-requisite would be good IMAP or POP3 support, which I understand, does not really exist?
pierpal has joined #lisp
<beach> You might look in `mel'.
<pjb> jmercouris: you may have a lookt at examples of use of gray streams: com.informatimago.clext.pipe or flexi-stream.
<jmercouris> beach: looks interesting
<pjb> jmercouris: no, to write a listserv, you need very little. You can hook it to an email address with an entry in the aliases file, and it can send back email using sendmail with run-program.
<jmercouris> pjb: I am just wondering why mailman is such a massive program, there must be more to it somehow
<pjb> jmercouris: alternatively, you can use smtp directly, but you don't need imap o pop3.
<jmercouris> one sec, brb
<pjb> jmercouris: no, you can wonder. C programs (or most other programming languages actually) are about 30 times more verbose than lisp.
<pjb> jmercouris: they don't have memory management, error handling, generic functions, a dumb type system, etc, so there is a lot of code duplication.
pierpal has quit [Read error: Connection reset by peer]
<beach> pjb: On what information did you base than number 30?
orivej has joined #lisp
elderK has joined #lisp
<pjb> beach: when I started programming 100% in CL, I translated my library (which was originally written in Modula-2, and later translated into C), into CL. And between the modules that were useless in CL, and the more concise code for the rest, I got that number.
pierpal has joined #lisp
<beach> I am not saying it's wrong. I just wanted to know whether it is published somewhere.
<pjb> It's just a data point.
<beach> Got it.
<pjb> But when you see real C code, this is about the ratio… It's horrible.
asymptotically has joined #lisp
<pjb> Look for example openssl. For ASN.1 data structures, they have actually a single "generic" set of functions, but they have macros to generate wrappers for them, with the specific C types. So their man page have 30 functions for 1 feature! https://manpages.debian.org/testing/libssl-doc/d2i_ASN1_TYPE.3ssl.en.html
<pjb> All those functions are actually only the 6 in the synopsis…
<no-defun-allowed> nasty
<pjb> And then, they wonder why they are missing bugs… https://news.ycombinator.com/item?id=18236345
<pjb> While the brain cells of the C programmers are busy handling errors, managing memory, and avoiding buffer overflow, they forget about sound software engineering rules and proper design. While the code of libssh looks cleaner than eg. FreeBSD, there are still quite a number of functions that are bigger than a screen height.
<pjb> Twelve malicious python libraries found and removed from pypi <https://www.zdnet.com/article/twelve-malicious-python-libraries-found-and-removed-from-pypi/>
<jmercouris> ok, so back to the question at hand
<jmercouris> if you were to implement a listserv in CL with administration portal, what would it look like?
<pjb> jmercouris: you mean, a web site?
<jmercouris> Yes
<pjb> I would make a postgres database. Then there would be a program to receive the email and process commands or diffuse messages. And a hunchentoot program to manage the administration.
<jmercouris> so you wouldn't receive the mail in CL, you'd use something like offlineimap?
<holycow> jmercouris: thanks for your work on next browser dude
<pjb> Since the "process commands" is actually just another interface to to the adminstration module, perhaps this could be a separate server (used by both the email processing and the hunchentoot), or you could merge all three in a single lisp image/unix process.
<jmercouris> holycow: no problem :) it is my pleasure to work on it, I just hope to be able to do more
<pjb> jmercouris: No, You would put entries in aliases.
<jmercouris> pjb: what does it mean to "put entries in aliases"?
<jmercouris> is there some nix convention I am unaware off?
<jmercouris> I'm sure there are many I am unaware off, but I mean, in this context
<pjb> And mailman adds such a set for each maillist.
<pjb> The | means redirect the email to a program.
<jmercouris> oh I see
<jmercouris> so if the system gets an email at mailman-admin it'll invoke /var/lib/mailman/mail/mailman with the args admin mailman?
<pjb> jmercouris: an alternative would be to define a transport in postfix, so you could directly use a running server. With the alias, you would write a little program that would connect to the running server, if you don't want to launch a new program for each message.
<pjb> Yes, and with the message on stdin.
<pjb> jmercouris: there are alternatives of course.
DGASAU has joined #lisp
<jmercouris> Yeah, I'm just not sure what to do
<jmercouris> because I know that mailman sucks, out of personal experience, and I just want something that just works with minimal configuration, hence why I was thinking of writing my own in CL
lumm has joined #lisp
<pjb> For example, you could implement a SMTP server (without the sophisticated options, it's quite simple). Then you can either hook it behind postfix, or directly on the internet if the machine is used only for your listserv. This would let you do fine filtering when receiving the enveloppe, even before receiving the message.
<jmercouris> but the size of mailman was making me reconsider
<pjb> jmercouris: I agree. The old listserv was much better. And it could send you files!
random-nick has quit [Remote host closed the connection]
doubledup has joined #lisp
lumm has quit [Remote host closed the connection]
random-nick has joined #lisp
lumm has joined #lisp
aydio has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
<pjb> Actually, this is just a command system interface. You have different ways to give commands: by sending emails, thru the web, at the unix shell, perhaps thru irc, etc. So you just need a lisp REPL to receive the commands (using a lisp REPL allows you to script those commands too!), and to hook the various user interface to to the same REPL system.
robotoad has quit [Ping timeout: 252 seconds]
<pjb> There are a few algorithms you need to recover or reproduce from listserv or mailman, about the managing of addresses to avoid loops, process bounces (just a different command), etc.
robotoad has joined #lisp
anewuser has quit [Quit: anewuser]
varjag has joined #lisp
robotoad has quit [Ping timeout: 272 seconds]
nirved has quit [Read error: Connection reset by peer]
nirved has joined #lisp
nirved has quit [Client Quit]
fsmunoz has quit [Read error: Connection reset by peer]
nirved has joined #lisp
jcowan has quit [Quit: Connection closed for inactivity]
heisig has quit [Quit: Leaving]
papachan has quit [Ping timeout: 246 seconds]
scymtym has quit [Ping timeout: 240 seconds]
lavaflow has quit [Ping timeout: 252 seconds]
frodef has joined #lisp
Lycurgus has quit [Quit: Exeunt]
lumm has quit [Ping timeout: 245 seconds]
lumm has joined #lisp
Zaab1t has quit [Ping timeout: 264 seconds]
robotoad has joined #lisp
Zaab1t has joined #lisp
aydio has quit [Quit: WeeChat 2.2]
pyx has joined #lisp
pyx has quit [Client Quit]
rumbler31 has joined #lisp
<flip214> beach: thank you!
<flip214> phoe: got it, how quick do you need a result? would monday or tuesday suffice?
rumbler31 has quit [Ping timeout: 240 seconds]
<flip214> phoe: this is a tufte-style, right?
lumm_ has joined #lisp
robotoad has quit [Quit: robotoad]
lumm has quit [Ping timeout: 264 seconds]
lumm_ is now known as lumm
dueyfinster has joined #lisp
lavaflow has joined #lisp
<holycow> interlisp s-expression editing video: https://www.youtube.com/watch?v=2qsmF8HHskg
<holycow> neat
lavaflow has quit [Ping timeout: 252 seconds]
mange has quit [Ping timeout: 245 seconds]
Essadon has joined #lisp
Essadon has quit [Max SendQ exceeded]
Essadon has joined #lisp
dueyfinster has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
xkapastel has joined #lisp
frgo has quit [Read error: Connection reset by peer]
frgo_ has joined #lisp
<pjb> holycow: if interested, you can implement it in CL. Have a look at https://www.informatimago.com/develop/lisp/com/informatimago/small-cl-pgms/sedit/index.html
pierpal has quit [Ping timeout: 252 seconds]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 240 seconds]
fsmunoz has joined #lisp
nanoz has joined #lisp
aeth has quit [Ping timeout: 240 seconds]
<phoe> flip214: yes, that's tufte-style
<phoe> flip214: take your time with it
<phoe> I don't have a deadline
<phoe> so set one yourself
lumm has quit [Ping timeout: 272 seconds]
scymtym has joined #lisp
razzy has quit [Ping timeout: 245 seconds]
<phoe> flip214: one second though, let me upload the most updated version for you
kozy_ has quit [Quit: No Ping reply in 180 seconds.]
kozy has joined #lisp
phenoble has joined #lisp
phenoble has quit [Remote host closed the connection]
jmercouris has quit [Remote host closed the connection]
comborico1611 has quit [Ping timeout: 252 seconds]
nanoz has quit [Ping timeout: 252 seconds]
papachan has joined #lisp
frodef has quit [Ping timeout: 240 seconds]
Bike has joined #lisp
atgreen_ has quit [Ping timeout: 245 seconds]
phenoble has joined #lisp
<flip214> phoe: got it
warweasle has joined #lisp
shifty has quit [Ping timeout: 252 seconds]
nanoz has joined #lisp
nly has joined #lisp
pierpal has joined #lisp
Roy_Fokker has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
Kundry_Wag has joined #lisp
pierpal has quit [Ping timeout: 252 seconds]
noark9 has joined #lisp
kajo has quit [Ping timeout: 250 seconds]
igemnace has joined #lisp
_whitelogger has joined #lisp
Lycurgus has joined #lisp
<flip214> phoe: where should I send the result? email address (per private message), please?
lumm has quit [Read error: Connection reset by peer]
bpanthi1 has joined #lisp
bpanthi1 has quit [Quit: bpanthi1]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
papachan has quit [Quit: WeeChat 2.2]
bpanthi has joined #lisp
bpanthi has quit [Client Quit]
phenoble has quit [Quit: ZNC 1.7.0 - https://znc.in]
lumm has joined #lisp
razzy has joined #lisp
Inline has quit [Quit: Leaving]
phenoble has joined #lisp
elfmacs has joined #lisp
lumm has quit [Ping timeout: 252 seconds]
Kundry_Wag has quit [Remote host closed the connection]
jcowan has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
makomo has quit [Read error: Connection reset by peer]
fikka has joined #lisp
fikka has quit [Ping timeout: 246 seconds]
Roy_Fokker has quit [Read error: Connection reset by peer]
aeth has joined #lisp
_whitelogger has joined #lisp
razzy has quit [Ping timeout: 246 seconds]
elfmacs has quit [Ping timeout: 252 seconds]
lnostdal has quit [Ping timeout: 252 seconds]
lnostdal has joined #lisp
anamorphic has joined #lisp
lumm has joined #lisp
beach has quit [Disconnected by services]
<shka_> ✓ 257048 tests completed (62ms)
beach has joined #lisp
<shka_> oh the joys of randomized tests xD
Inline has joined #lisp
noark9 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
noark9 has joined #lisp
<flip214> phoe: you got mail.
<flip214> any alexandria maintainers around to take a look at https://gitlab.common-lisp.net/alexandria/alexandria/merge_requests/7, please?
noark9 has quit [Quit: Textual IRC Client: www.textualapp.com]
noark9 has joined #lisp
mgsk has joined #lisp
atgreen has joined #lisp
Kundry_Wag has joined #lisp
elderK has quit [Quit: Connection closed for inactivity]
<anamorphic> Do I need to wrap a defparameter in some kind of eval-when in order for it's binding to be seen from within a macro?
<pjb> anamorphic: clhs defparameter says: If a defvar or defparameter form appears as a top level form, the compiler must recognize that the name has been proclaimed special. However, it must neither evaluate the initial-value form nor assign the dynamic variable named name at compile time.
<pjb> So yes.
<|3b|> (or LOAD it before the macro is expanded)
<anamorphic> Ah OK. So (eval-when (:load-toplevel :compile-toplevel? I'm not sure if I need :execute
<pjb> :execute is needed if you load the source.
<|3b|> you generally want all 3 if any
<pjb> But if you define it at compilation-time, compute the value at compilation time, perhaps it cannot work if you load only the source? Or perhaps you can also compute the value when just loading the source. Depends on your program.
lumm has quit [Ping timeout: 272 seconds]
<pjb> For example, when you define functions to be used by macro, you usually don't need them at run-time (unless you plan to use the macro at the REPL, say). In that case, you can skip the :load-toplevel situation.
<pjb> So the compilation-time function don't take space at run-time (unless you load the source of course).
<pfdietz> If you use the macro in another file those functions better have been loaded, though.
<pfdietz> I think.
<phoe> flip214: phoe@disroot.org
<pjb> It's true, that an implementation could fork a different compilation environment for each compile-file that is not within the same with-compilation-unit. Ie it could throw away compilation-time definitions :-)
nly has quit [Read error: Connection reset by peer]
<pjb> In that case, loading the compiled files between compile-file would be essential, and you'd have to include :load-toplevel for those functions.
<pjb> So, as |3b| saidk.
younder has joined #lisp
<anamorphic> That makes sense. Thanks for the explanation
noark9 has quit [Quit: noark9]
nly has joined #lisp
eddof13 has joined #lisp
<|3b|> if you skip loading the files you use in macros, you will probably eventually be annoyed when you try to fix something interactively that uses it :)
eddof13 has quit [Client Quit]
HighMemoryDaemon has joined #lisp
<|3b|> *loading the functions i mean
orivej has quit [Ping timeout: 246 seconds]
<HighMemoryDaemon> Does a pathname (ex. #p"~/Documents") offer any benefits over a regular string? In Quickproject's make-project function, I noticed that regular strings work too.
<|3b|> many places that expect a pathname will accept a namestring as well
<|3b|> main place i can think of it would matter is things that try to guess intent from types, for example something that would interpret a string as input, and a pathname as name of file containing input
Kundry_Wag has quit [Remote host closed the connection]
atgreen_ has joined #lisp
orivej has joined #lisp
atgreen has quit [Ping timeout: 246 seconds]
noark9 has joined #lisp
fikka has joined #lisp
Kundry_Wag has joined #lisp
<HighMemoryDaemon> Interesting. Also, what is the name for things like #p, :, #', etc?
<flip214> phoe: already sent to the github mail address, resending now
asarch has joined #lisp
<|3b|> : is just part of the symbol syntax in the reader, with no real name. #p and #' are reader macros
pierpal has joined #lisp
<emaczen> What happens with the memory management of pointers (with CFFI) and multiple threads (with bordeaux-threads)?
<|3b|> (specifically # is a dispatching reader macro, with p and ' being specific instances of that particular dispatching reader macro)
<phoe> flip214: didn't get it yet
<phoe> emaczen: nothing
<emaczen> For example, If I create a pointer on a thread, then use it in the main thread, where does it need to be freed?
<phoe> unless you free it, it's not freed
<phoe> anywhere I think
<|3b|> a lot of CL syntax is actually reader macros, including things like (
<|3b|> so you can change how they are read if you want to
<emaczen> phoe: How does the main thread even know about the pointer?
<|3b|> symbols (including the : or :: ) and numbers are built into the reader syntax though, so you can't really change how those are read without just parsing everything yourself
<scymtym> |3b|: #\: is called "package marker" in this context
atgreen_ has quit [Ping timeout: 246 seconds]
<anamorphic> emaczen, don't all threads share the same heap within a process?
<emaczen> anamorphic: I don't know
<emaczen> anamorphic: If that is true, it would answer my question here.
<emaczen> anamorphic: but it doesn't explain why I seem to leak more memory with multiple threads then not
<|3b|> scymtym: thanks, thought there probably was actually a name after i wrote that, but forgot to go look it up
<emaczen> In lisp what generally is allocated on the stack vs heap?
<anamorphic> sounds implementation specific
asymptotically has quit [Quit: Leaving]
<|3b|> (and to clarify for original asker, #\ is another dispatching reader macro on # that reads a character, so #\: reads as the character : and in general that's how we'd talk about characters when talking about CL. i skipped them previously to try to simplify the answers)
Lycurgus has quit [Quit: Exeunt]
sjl has joined #lisp
<anamorphic> ...man I always end up regretting writing functions with "dwim" in the name
<emaczen> Well, what can I reasonably expect?
<emaczen> I would guess make-instance allocates on the heap
<emaczen> but that is about my only guess
<pjb> That said, we could as well talk about the character "a": (character "a") #| --> #\a |# ;-)
<anamorphic> emaczen, so what are you trying to do?
<pjb> or the character a: (character '\a) #| --> #\a |# (character 'a) #| --> #\A |#
wooden` has joined #lisp
actuallybatman has quit [Read error: Connection reset by peer]
actuallybatman has joined #lisp
scymtym has quit [Ping timeout: 252 seconds]
Roy_Fokker has joined #lisp
wooden` is now known as wooden
hiroaki has joined #lisp
Oladon has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
ryan_vw has joined #lisp
noark9 has quit [Quit: noark9]
HighMemoryDaemon has quit [Ping timeout: 246 seconds]
pierpal has quit [Ping timeout: 246 seconds]
atgreen_ has joined #lisp
lumm has joined #lisp
makomo has joined #lisp
lumm has quit [Read error: Connection reset by peer]
<phoe> emaczen: pass it as a variable
scymtym has joined #lisp
frodef has joined #lisp
<phoe> flip214: got it, thanks
fikka has quit [Ping timeout: 246 seconds]
HighMemoryDaemon has joined #lisp
random-nick has quit [Remote host closed the connection]
eddof13 has joined #lisp
warweasle has joined #lisp
random-nick has joined #lisp
<HighMemoryDaemon> In my projectname.asd file, is there a good way to use a system that is in a folder of my project? Ex. 'pathnames-lib/pathnames.asd'. I could symlink it to my ~/common-lisp folder but I'd prefer not to.
<flip214> HighMemoryDaemon: https://xach.livejournal.com/294639.html
eddof13 has quit [Ping timeout: 252 seconds]
lumm has joined #lisp
robotoad has joined #lisp
lumm has quit [Client Quit]
lumm has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
<HighMemoryDaemon> flip214: Thank you!
Kundry_Wag has joined #lisp
lumm has quit [Read error: Connection reset by peer]
<HighMemoryDaemon> This is what I ended up going with. https://hastebin.com/mukebifepo.lisphttps://hastebin.com/mukebifepo.lisp . Of course I would have to follow the second half of that article if I end up needing to do something similar in a .lisp source file.
<HighMemoryDaemon> Double paste, urg. https://hastebin.com/mukebifepo.lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
zxcvz has quit [Quit: Leaving]
makomo has quit [Ping timeout: 246 seconds]
atgreen_ has quit [Ping timeout: 252 seconds]
ryan_vw has quit [Ping timeout: 264 seconds]
<shka_> good evening
<HighMemoryDaemon> Howdy
<shka_> what is the best way to add extra attribute that can be passed to the slot of class?
<shka_> eh, i will check in AMOP
<Bike> you mean something like :initarg, :accessor, etc?
<flip214> shka_: I guess you'll need a new slot metaclass.... or you re-use eg. the documentation slot (urgh)
<shka_> Bike: yes
<shka_> flip214: that's my impression
<Bike> yeah, you'll need new metaclasses for direct/effective-slot-definition.
<Bike> there's a couple methods you'll have to define for things to work.
<shka_> eh, ok
<shka_> some example perhaps?
<Bike> if i can remember where i put it
<Bike> https://github.com/clasp-developers/cl-jupyter-widgets-old/blob/master/src/iwidgets/widgets/traitlets.lisp here's one i wrote that adds observers and stuff. needs... direct/effective-slot-definition-class, compute-effective-slot-definition
<shka_> awesome, thank you!
<Bike> i can explain anytyhing that needs explaining
<shka_> no need, i remember now how this works
<Bike> there you go then
<shka_> yup
<shka_> thanks again
<shka_> oh, one more question
<shka_> not mop this time
<shka_> i want to call find-class during macroexpand
<shka_> this means that i will have to eval always defclass (if i understand correctly)
<shka_> is this a good idea?
<shka_> i don't think anything will explode directly into my face
oni-on-ion has quit [Quit: WeeChat 1.9.1]
<Bike> defclass has to make the class available for find-class
<flip214> shka_: the AMOP book has an example, IIRC
<Bike> without eval-when i mean
<Bike> it might be missing information, though
<Bike> including about slots, if that's what you're going for
<shka_> yes, that's what i am trying to do
HighMemoryDaemon has quit [Remote host closed the connection]
<Bike> then yeah you'll have to eval-when i guess. it should be fin.e
<shka_> ok, i am glad that this is possible
<shka_> because otherwise i would have to mess with more macros then i would want to
oni-on-ion has joined #lisp
Guest13389 has quit [Ping timeout: 240 seconds]
<flip214> doesn't AMOP have a function that more or less does what DEFCLASS is doing?
<flip214> well, (eval `(defclass ,name ,superclasses ,@rest)) won't hurt either.
ryan_vw has joined #lisp
<shka_> yeah, i think that i know everything
<shka_> good night all!
<Bike> ensure-class
Nizumzen has left #lisp [#lisp]
DGASAU has quit [Ping timeout: 250 seconds]
Guest13389 has joined #lisp
nanoz has quit [Ping timeout: 252 seconds]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
shka_ has quit [Ping timeout: 272 seconds]
marusich has joined #lisp
ggole has quit [Quit: ggole]
dented42 has joined #lisp
dented42 has quit [Client Quit]
knicklux has joined #lisp
dented42 has joined #lisp
lumm has joined #lisp
Roy_Fokker has quit [Read error: Connection reset by peer]
lavaflow has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vlatkoB has quit [Remote host closed the connection]
dented42 has joined #lisp
rumbler31 has joined #lisp
kushal- has quit [Ping timeout: 256 seconds]
jmercouris has joined #lisp
asarch_ has joined #lisp
asarch has quit [Ping timeout: 246 seconds]
mercourisj has joined #lisp
kushal has joined #lisp
jmercouris has quit [Disconnected by services]
mercourisj is now known as jmercouris
sjl has quit [Quit: WeeChat 2.2-dev]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hiroaki has quit [Ping timeout: 276 seconds]
asymptotically has joined #lisp
bars0 has joined #lisp
dented42 has joined #lisp
dented42 has quit [Client Quit]
jmercouris has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Lycurgus has joined #lisp
fsmunoz has quit [Remote host closed the connection]
frgo_ has quit [Remote host closed the connection]
frgo has joined #lisp
razzy has joined #lisp
angavrilov has quit [Remote host closed the connection]
rumbler31 has quit [Remote host closed the connection]
aindilis has quit [Remote host closed the connection]
aindilis has joined #lisp
frgo has quit []
frgo has joined #lisp
charh has joined #lisp
Oladon has quit [Quit: Leaving.]
shifty has joined #lisp
griddle has quit [Quit: The Lounge - https://thelounge.github.io]
Oladon has joined #lisp
<phoe> flip214: thanks for the review! The typesetting isn't final at all, I'll still be moving things around
<phoe> I mostly wanted a review of the content; I didn't specify that clearly, so sorry about that
slyrus has quit [Ping timeout: 252 seconds]
slyrus1 is now known as slyrus
ryan_vw has quit [Ping timeout: 276 seconds]
slyrus1 has joined #lisp
makomo has joined #lisp
frodef has quit [Ping timeout: 246 seconds]
shifty has quit [Ping timeout: 246 seconds]
pierpal has joined #lisp
dented42 has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
holycow has quit [Quit: Lost terminal]
bars0 has quit [Ping timeout: 272 seconds]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
void_pointer has joined #lisp
wooden has quit [Ping timeout: 252 seconds]
asymptotically has quit [Quit: Leaving]
random-nick has quit [Ping timeout: 246 seconds]
anamorphic has quit [Ping timeout: 246 seconds]
beach has quit [Ping timeout: 250 seconds]
ryan_vw has joined #lisp
robotoad has quit [Quit: robotoad]
varjag has quit [Ping timeout: 264 seconds]
pierpal has quit [Ping timeout: 244 seconds]
nirved has quit [Quit: Leaving]
jonatan has joined #lisp
marusich has quit [Quit: Leaving]
vsync has quit [Ping timeout: 244 seconds]
atgreen_ has joined #lisp
ebzzry has quit [Ping timeout: 246 seconds]
Lycurgus has quit [Quit: Exeunt]