phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.16, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
Lord_of_Life_ has joined #lisp
<LdBeth> so it’s a set of dynamic libraries loaded by loader
keep_learning_M has joined #lisp
Lord_of_Life has quit [Ping timeout: 244 seconds]
Lord_of_Life_ is now known as Lord_of_Life
abhixec has quit [Ping timeout: 250 seconds]
abhixec has joined #lisp
serichsen has quit [Remote host closed the connection]
dale has joined #lisp
reepca has joined #lisp
<reepca> is there a way in a LOOP's SUM clause to control where it starts summing from?
<reepca> eh, I guess it wouldn't be too hard to just use an explicit with-clause and a 'do (incf ...)'
<verisimilitude> Yes.
<verisimilitude> You can use the IF clause, say.
<reepca> I was thinking more along the lines of, suppose that I'm iterating over a sublist (tail of some other list), but I'm given the starting index of said sublist in the list it's part of, and I want to keep track of what the index is in the larget list.
<reepca> larger*
<verisimilitude> How does that involve summation?
<verisimilitude> You could always embed a LOOP inside of another LOOP, if that simplifies things, reepca.
<reepca> well, the way I would usually go about keeping track of an index in a loop would be 'sum 1 into k' or something like that.
robdog has joined #lisp
<reepca> but I don't know how to initialize k to anything other than 0
<verisimilitude> That isn't the way you want to do that.
<verisimilitude> Why not use FOR K FROM 0, say?
<verisimilitude> You can also iterate on the list directly with IN or ON, instead.
<verisimilitude> Give me an example and I'll show you how I'd do it, reepca.
<reepca> I guess I hadn't really thought about using multiple FOR clauses. So it would end up looking something like (loop for k from initial-index for x in (nthcdr initial-index list) ...)
jack_rabbit has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 268 seconds]
<verisimilitude> You could do better.
<verisimilitude> That would recalculate X each time, which is wasteful.
<verisimilitude> Well, disregard that, but I'll still show a better way to do it.
<verisimilitude> What is K for again, reepca?
<reepca> k is the index, one moment, I'll pastebin what I'm working on
<reepca> https://paste.debian.net/1068504/ here's what I've got so far (automating some operating systems homework).
space_otter has quit [Ping timeout: 259 seconds]
<verisimilitude> Your FIRST-FIT doesn't need LOOP; I'll show you a proper body for it.
space_otter has joined #lisp
Nilby has joined #lisp
<verisimilitude> Rather, I'll tell you to look at POSITION, FIND, POSITION-IF, and FIND-IF; these solve half your problem, giving the position or the element, and I've not looked at how you're using FIRST-FIT to see which you actually need; I leave that to you, reepca.
<verisimilitude> Did this help?
space_otter has quit [Ping timeout: 240 seconds]
<reepca> well, the issue there is that while using FIND followed by POSITION would work for FIRST-FIT, it would involve traversing twice.
nitrix has quit [Quit: Leaving]
<reepca> using FOR to track indices helped, though
<verisimilitude> I've taken a look at your BEST-FIT now and it can be much simpler.
Kaisyu7 has joined #lisp
<verisimilitude> You're just using this to see if a list contains a number or the closest number larger than it, right?
FreeBirdLjj has joined #lisp
<reepca> and to get the position of it in the list. The idea is to then write some code to simulate certain sequences of allocations being made with the various selection methods and generate a nice table.
space_otter has joined #lisp
<verisimilitude> You could use something such as this, then:
<verisimilitude> (LOOP WITH P = 0 FOR I FROM 0 FOR E IN LIST
<verisimilitude> IF (< SIZE E) MAXIMIZE E INTO M AND DO (SETQ P I)
<verisimilitude> IF (= SIZE E) DO (RETURN (CONS I E)) END
FreeBirdLjj has quit [Ping timeout: 255 seconds]
<verisimilitude> FINALLY (RETURN (CONS P M)))
<verisimilitude> I've not checked this, beyond a cursory glance, reepca.
jack_rabbit has joined #lisp
<verisimilitude> Oh, that MAXIMIZE doesn't work, actually, because I unconditionally store the index; in any case, you get the gist of how to approach this.
elderK has joined #lisp
Kaisyu7 has quit [Quit: ERC (IRC client for Emacs 26.1)]
Kaisyu7 has joined #lisp
loli has quit [Ping timeout: 257 seconds]
space_otter has quit [Ping timeout: 246 seconds]
robdog has joined #lisp
<reepca> well, if the MAXIMIZE clause is never executed, then M is unspecified (I want it to be NIL if no appropriate value is found)
thijso has quit [Ping timeout: 246 seconds]
Josh_2 has joined #lisp
space_otter has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
loli has joined #lisp
markoong has quit [Remote host closed the connection]
makomo has quit [Ping timeout: 246 seconds]
dale has quit [Quit: dale]
igemnace has joined #lisp
ikki has joined #lisp
robdog has joined #lisp
Arcaelyx has quit [Ping timeout: 246 seconds]
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
ikki has quit [Read error: Connection reset by peer]
robdog_ has joined #lisp
eschatologist has quit [Remote host closed the connection]
Achylles has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 268 seconds]
eschatologist has joined #lisp
robdog has joined #lisp
robdog_ has quit [Ping timeout: 264 seconds]
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
loli has quit [Ping timeout: 255 seconds]
Nilby has quit [Read error: Connection reset by peer]
robdog_ has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
karlosz has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog_ has quit [Read error: Connection reset by peer]
robdog has joined #lisp
loli has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
robdog_ has joined #lisp
dale has joined #lisp
voidlily has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 250 seconds]
robdog_ has quit [Read error: Connection reset by peer]
robdog has joined #lisp
voidlily has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
akoana has joined #lisp
_whitelogger has joined #lisp
robdog has joined #lisp
dddddd has quit [Remote host closed the connection]
robdog has quit [Read error: Connection reset by peer]
robdog has joined #lisp
robdog has quit [Ping timeout: 255 seconds]
voidlily has quit [Remote host closed the connection]
voidlily has joined #lisp
voidlily has quit [Remote host closed the connection]
akoana has left #lisp ["Leaving"]
robdog has joined #lisp
loli has quit [Ping timeout: 255 seconds]
robdog has quit [Ping timeout: 250 seconds]
nanoz has joined #lisp
robdog has joined #lisp
voidlily has joined #lisp
loli has joined #lisp
elderK has quit [Quit: Connection closed for inactivity]
robdog has quit [Ping timeout: 264 seconds]
<reepca> hm, now I'm trying to replace a (dotimes (i n) (format t "+--")) with (format t "~v@{+--~}" n), but then there needs to be a dummy argument, otherwise it doesn't enter the loop at all. Is there a way to change the format string to make this dummy argument unnecessary?
<beach> Good morning everyone!
buffergn0me has quit [Remote host closed the connection]
buffergn0me has joined #lisp
robdog has joined #lisp
teej has quit []
teej has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
iovec has joined #lisp
<verisimilitude> You can mandate a minimum number of iterations, reepca.
<reepca> as far as I know, you can only mandate up to 1 iteration using ~:}
<verisimilitude> Yes, I was just about to mention that.
robdog has joined #lisp
<reepca> at which point it will do one iteration and then stop
<verisimilitude> I'd just use a dummy argument, if I wanted to use FORMAT here.
<verisimilitude> Perhaps the clearest way to do this is as so:
<verisimilitude> (DOTIMES (INTEGER COUNT) (DECLARE (IGNORABLE INTEGER)) (WRITE-STRING "+--"))
slightlycyborg has quit [Ping timeout: 246 seconds]
robdog has quit [Ping timeout: 250 seconds]
<verisimilitude> You could use ~0* in the main loop of the FORMAT statement, but chances are that would result in suboptimal code.
marvin2 has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
jack_rabbit has quit [Ping timeout: 268 seconds]
Josh_2 has quit [Read error: Connection reset by peer]
robdog has quit [Ping timeout: 264 seconds]
voidlily has quit [Remote host closed the connection]
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog_ has quit [Ping timeout: 264 seconds]
amerlyq has joined #lisp
loli has quit [Ping timeout: 255 seconds]
<pjb> verisimilitude: (loop repeat count do (write-string "+--"))
robdog has joined #lisp
robdog has quit [Read error: Connection reset by peer]
robdog has joined #lisp
ltriant has quit [Quit: leaving]
voidlily has joined #lisp
Lycurgus has joined #lisp
nanoz has quit [Read error: Connection reset by peer]
robdog_ has joined #lisp
loli has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
dale has quit [Quit: dale]
Bike has quit [Quit: Lost terminal]
robdog_ has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
Nomenclatura has quit [Quit: q]
robdog has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
vilivulpine has joined #lisp
libertyprime has quit [Ping timeout: 250 seconds]
robdog_ has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
emaczen has joined #lisp
robdog has quit [Ping timeout: 240 seconds]
torbo has left #lisp ["ERC (IRC client for Emacs 26.1)"]
<emaczen> For some reason my keyword arguments to make-instance aren't being passed along to an after method I defined on initialize-instance -- I've never had this happen before.
<minion> emaczen, memo from stassats: don't leave the main thread, execute it there from the beginning
<emaczen> The only difference is that the metaclass is a subclass of standard-class
<emaczen> the metaclass only overrides validate-superclass and adds an after method on ensure-class-using-class
<emaczen> So, I don't see how I would have interfered with default behavoir
<emaczen> Any idea or suggestions of what could be wrong?
<Lycurgus> did you see the response from stassats?
MichaelRaskin has quit [Quit: MichaelRaskin]
<emaczen> Lycurgus: Was this in response to a question on #sbcl?
<Lycurgus> emaczen, no
Arcaelyx has joined #lisp
robdog has joined #lisp
<emaczen> Lycurgus: stassats memo doesn't bring to memory my exact question. When you execute code from the repl, you have already left the main thread?
<Lycurgus> nonetheless it was at least 1 idea or suggestion
robdog has quit [Ping timeout: 250 seconds]
verisimilitude has quit [Remote host closed the connection]
robdog has joined #lisp
Inline has quit [Quit: Leaving]
Nilby has joined #lisp
Nilby has quit [Read error: Connection reset by peer]
Nilby has joined #lisp
robdog has quit [Read error: Connection reset by peer]
loli has quit [Ping timeout: 245 seconds]
rozenglass has joined #lisp
robdog has joined #lisp
neosloth has quit [Quit: issued !quit command]
neosloth has joined #lisp
waron has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
orivej has quit [Ping timeout: 246 seconds]
loli has joined #lisp
robdog_ has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
prite has quit [Read error: Connection reset by peer]
prite has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
<phoe> drmeister: congratulations! Woo!
robdog_ has quit [Ping timeout: 268 seconds]
lnostdal has quit [Quit: https://www.Quanto.ga/ -- Immutable state trading system in Clojure]
wanz has joined #lisp
jprajzne has joined #lisp
lnostdal has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
emaczen has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
Elephant454 has quit [Quit: ERC (IRC client for Emacs 26.1)]
robdog has quit [Ping timeout: 250 seconds]
amerlyq has quit [Quit: amerlyq]
verisimilitude has joined #lisp
robdog has joined #lisp
angavrilov has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
abhixec has quit [Ping timeout: 272 seconds]
space_otter has quit [Remote host closed the connection]
loli has quit [Ping timeout: 255 seconds]
nowhere_man has joined #lisp
robdog has joined #lisp
loli has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
robdog_ has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
robdog has joined #lisp
cranes has quit [Remote host closed the connection]
Spaceman77 has joined #lisp
Lycurgus has quit [Ping timeout: 250 seconds]
<splittist> g'morn
<Spaceman77> morning :)
<beach> Hello splittist.
<beach> Hello Spaceman77.
varjag has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
nowhere_man has quit [Ping timeout: 258 seconds]
<shka__> beach: saying hello to everyone individually? :-)
robdog has quit [Ping timeout: 250 seconds]
<beach> Sometimes.
<no-defun-allowed> Hello shka__.
<shka__> no-defun-allowed: hi!
* no-defun-allowed waves
schjetne has joined #lisp
hjudt has quit [Quit: leaving]
robdog has joined #lisp
<beach> Spaceman77: Are you making progress on learning Common Lisp?
shrdlu68 has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
myrkraverk has joined #lisp
robdog_ has joined #lisp
schweers has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
neosloth has quit [Ping timeout: 246 seconds]
robdog_ has quit [Ping timeout: 250 seconds]
hjudt has joined #lisp
wanz has quit [Quit: wanz]
<Spaceman77> beach: Not yet, currently i'm going through SICP
<Spaceman77> So far i'm at chapter 2
Oddity has quit [Ping timeout: 250 seconds]
<beach> I see.
makomo has joined #lisp
wanz has joined #lisp
Oddity has joined #lisp
robdog has joined #lisp
<Spaceman77> i was pretty blown away with the functions == data concept
loli has quit [Ping timeout: 244 seconds]
heisig has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
<Spaceman77> and realizing objects can be created as closures with dispatch
<makomo> morning
selwyn has joined #lisp
hhdave has joined #lisp
<beach> Spaceman77: Sure. However, CLOS is even more powerful because you can distribute methods physically across modules and you can have auxiliary methods, alternative method combinations, and more.
marvin2 has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
pbgc has joined #lisp
loli has joined #lisp
robdog has joined #lisp
keep_learning_M has quit [Quit: This computer has gone to sleep]
Lycurgus has joined #lisp
<jackdaniel> I think that brilliance of this enlightenment comes from the simplicity of the implementation
<jackdaniel> (and that hardly can be said about clos) - that said if you look for the OOP abstraction clos is definetely better than ad-hoc closures
Ukari has quit [Remote host closed the connection]
<shka__> beach: what does physically mean here?
robdog_ has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
libertyprime has joined #lisp
<beach> shka__: By that, I meant that two different methods on the same generic function can be in two different files.
<beach> That's one of the important points of object orientation.
<shka__> ok
froggey has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
robdog_ has quit [Ping timeout: 250 seconds]
aindilis has joined #lisp
froggey has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
<Spaceman77> jackdaniel: speaking of enlightenment, i've observed multiple people claiming that reading SICP/learning LISP grants you some enlightnment. I am curious about this.
<Spaceman77> Does this enlightenment come in bits, or hits you like a truck all at once?
<Spaceman77> I have to agree that i find lisp-like syntax very ergonomic when writing programs
<Spaceman77> it's like the path of least resistance
<LdBeth> Would a lisp reader works on binary stream in principle?
<shka__> LdBeth: i don't think so
<verisimilitude> That depends on your definition, LdBeth.
<beach> LdBeth: No, because it would call read-char and read-char doesn't work on binary streams.
<LdBeth> Or how would a implementation parse fasl file like things
<shka__> LdBeth: implementation dependend
<beach> LdBeth: It would not use READ.
<verisimilitude> That's implementation-dependent.
pjb has joined #lisp
<beach> LdBeth: It would implement its own FASL reader using READ-BYTE.
<verisimilitude> It could do anything, beach.
<verisimilitude> It could have a LOAD-FASL function defined in machine code using, say, mmap, if it wanted to.
<beach> Spaceman77: That varies from person to person.
<LdBeth> Seems unfortunately there’s no typical interface for this.
<shka__> verisimilitude: it is probabbly very good approximation of actual state of the implementations ;-)
<beach> LdBeth: How could there be. FASL formats are not standardized.
<shka__> LdBeth: standarazing FASL would be a dounting task
robdog has joined #lisp
<Spaceman77> beach: Well, i'm curious if you have experienced this `enlightnment`, and if so, how did it manifest? :)
hhdave_ has joined #lisp
<beach> Spaceman77: For me, it was so long ago that I don't remember.
<verisimilitude> That makes me think about how WWW browsers have a ``webextensions'' API; defining something such as this is pointless, as it completely removes the ability for different approaches.
hhdave has quit [Ping timeout: 246 seconds]
hhdave_ is now known as hhdave
<verisimilitude> That is with regards to a standard FASL format.
<LdBeth> I’d expect use some classes to define a binary format and generate a reader
Ukari has joined #lisp
<beach> LdBeth: You have a reader for FASLs. It is called LOAD.
<LdBeth> I don’t intend to deal with real fasl format, but custom designed binary file
<beach> LdBeth: That's different.
<verisimilitude> Oh, I have some experience with that; go into more detail, LdBeth.
robdog has quit [Ping timeout: 252 seconds]
<beach> LdBeth: There are libraries for defining binary file formats.
<heisig> Spaceman77: For me, the enlightenment was 1. how little you actually need in a powerful language (functions + a few special forms) and 2. how treating data and code interchangeably solves A LOT of real-world problems.
<phoe> LdBeth: (ql:quickload :lisp-binary)
<LdBeth> Okay, I’ll check that out
Zaab1t has joined #lisp
<verisimilitude> That's quite a username.
<schweers> Spaceman77: Also, having the language available at all times can be really great. Or put differently: not having the whole language available at all times seems to be seriously broken to me.
random-nick has joined #lisp
<phoe> (with-lispcafe verisimilitude: there are worse ones - see http://bit.do/eeeeeeeeeeeeeeeee for example)
<verisimilitude> I believe you, phoe.
<shka__> phoe: there is no such operator as with-lispacafe :P
<schweers> shka__: of course not, it’s a macro! ;)
<schweers> Oh, nevermind. You said operator, not special form.
<verisimilitude> This LISP-BINARY library is interesting.
robdog has joined #lisp
<jackdaniel> question: /win 13
<jackdaniel> erm
<jackdaniel> nvm me
<LdBeth> It seems to be something capable for parsing linked object format
marvin2 has quit []
<jackdaniel> Spaceman77: the most enlightening part would be the fact, that computers are just dumb devices manifesting programmer mistakes and lacks of cognitive abilities, but it is not directly related to lisp as a language
<jackdaniel> (for me of course)
robdog has quit [Read error: Connection reset by peer]
robdog has joined #lisp
<LdBeth> Doomed future of AI
<verisimilitude> I'll add my opinions, then. Lisp is a good programming language for when you don't know what you're doing, Spaceman77. If you only have a vague idea of the program you're writing, Lisp is a nice language that lets you delay lasting decisions rather far.
<verisimilitude> If you later have a very good idea of what you're writing, Lisp can still be a good language, but isn't necessarily the best.
<verisimilitude> Garbage collection lets you ignore memory management almost entirely, but it may become the case that you understand the memory model very well and so you gain from simply writing it out specifically, but you never must.
<verisimilitude> Other languages do require you to do this, but this isn't a hindrance if you know what you're doing, of course.
marvin2 has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
loli has quit [Ping timeout: 246 seconds]
scymtym has joined #lisp
robdog_ has quit [Ping timeout: 255 seconds]
robdog has quit [Ping timeout: 250 seconds]
milivoj has quit [Ping timeout: 255 seconds]
robdog has joined #lisp
matijja has joined #lisp
robdog has quit [Ping timeout: 255 seconds]
rozenglass has quit [Ping timeout: 272 seconds]
loli has joined #lisp
selwyn has quit [Remote host closed the connection]
stardiviner has joined #lisp
Lycurgus has quit [Quit: Exeunt]
<shrdlu68> Man, I miss writing CL. It's been a while since I had a non-trivial project.
<shrdlu68> I don't miss any other language.
robdog has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
<Ukari> could :package-inferred-system work in the form of your-package.path.path.path.file instead of your-package/path/path/path/file ?
Bronsa has quit [Remote host closed the connection]
<shrdlu68> Heh, the thing about Lisp letting you prototype if analogous to painting. Watercolors are infamously difficult to paint (all the more reason to admire people who actually master them). They dry too quickly, the water runs off and diffuses in weird ways, etc. Lisp, then, is like oil painting - it lets you play around.
<shrdlu68> s/if/is/
robdog_ has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog_ has quit [Ping timeout: 252 seconds]
<schjetne> When I was a kid they made us paint watercolor on copier paper for art class. It's as if they set us up to fail, I still resent that.
<schjetne> I think they even made us use oil paint brushes.
robdog has joined #lisp
<no-defun-allowed> Oh yeah, I remember watercolours. We got oil paint later in the year, though.
<no-defun-allowed> It was like jumping from Python to CL, I had something I could actually work with. (except I can't paint, and I got a D for art :)
robdog_ has joined #lisp
<schjetne> I'd rather compare it to Forth or APL. Very elegant, but hard to wrap your head around. I wish we had been given proper brushes, paper and actual useful instruction, because I love the medium and wish I knew how to do it. I think what they did to us was downright cruel.
<no-defun-allowed> Gotcha.
Lycurgus has joined #lisp
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
robdog has quit [Ping timeout: 250 seconds]
<Spaceman77> Programming something that you don't understand sounds like an oxymoron
robdog has joined #lisp
robdog_ has quit [Ping timeout: 250 seconds]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
scymtym has quit [Ping timeout: 264 seconds]
<p_l> Spaceman77: it's very common
<Spaceman77> I agree, though
<schweers> Spaceman77: how do you understand a programming problem without attempting to solve it?
<Spaceman77> When i worked half-time at my job, i found that i could write better solutions, because i had the time in-between to actually think about the whole problem
<schweers> Yeah, the 8 hour day is pretty questionable, if you ask me (which no one does :D)
<schweers>
<schweers> anyway, I’m off for lunch
<Spaceman77> schweers: Of course, you do it and bump into all the necessary roadblocks until you understand the problem
<Spaceman77> schweers: bon apetit!
robdog has joined #lisp
robdog_ has quit [Ping timeout: 268 seconds]
loli has quit [Ping timeout: 268 seconds]
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
m00natic has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
Achylles has joined #lisp
loli has joined #lisp
ralt has joined #lisp
ggole has joined #lisp
robdog has joined #lisp
<Ukari> I noticed that (defpackage foo (:use :cl)) will include all symbols exported by package :cl, which will cause name confilcts in some condition. for example, I could't (defstruct count) because there has been a function named count in package :cl. Is there any way to make (:use :cl) works with some stuff like (:exclude :cl :count) to save the name space?
<shka__> Ukari: yes
gxt has quit [Ping timeout: 250 seconds]
<shka__> Ukari: you will need to shadow symbols from :cl in your own package
<Ukari> (:shadowing-import-from :cl :count)?
<shka__> however, it is usually better (in practical terms) to avoid conflicting with #:cl at the very least
<shka__> Ukari: (:shadow #:count)
<Ukari> I thought :cl use too many good names like signum, and other stuffs
<Ukari> signal
<shka__> that is somewhat subjective statement i think
<phoe> "good" names
<splittist> alternatively, don't USE cl, and when you want cl:count or cl:signum, say so. Of course, this means you need cl:defun etc. But it's a style.
<phoe> when I see SIGNAL then I expect that it's CL:SIGNAL - otherwise it causes me confusion
<Ukari> that works, thx, shka__
<shka__> Ukari: you are welcome, but you are warned :-)
scymtym has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
<ggole> You can still use them as variable names, which helps
<shka__> anyway, there are situations where this becomes useful, but as a rule of thumb you either use package (cl, maybe alexandria) or import just required symbols (other utils) or use a prefix (everything else)
<shka__> there is not much place for shadow left!
<shka__> ;-)
schjetne has quit [Ping timeout: 245 seconds]
Kevslinger has quit [Quit: Connection closed for inactivity]
robdog has joined #lisp
amerlyq has joined #lisp
scymtym has quit [Ping timeout: 252 seconds]
robdog has quit [Ping timeout: 255 seconds]
Lord_of_Life_ has joined #lisp
wanz has quit [Quit: wanz]
Lord_of_Life has quit [Ping timeout: 255 seconds]
Lord_of_Life_ is now known as Lord_of_Life
jerme_ has quit [Quit: Connection closed for inactivity]
dddddd has joined #lisp
wanz has joined #lisp
milivoj has joined #lisp
scymtym has joined #lisp
libertyprime has quit [Ping timeout: 240 seconds]
robdog has joined #lisp
selwyn has joined #lisp
vilivulpine has quit [Quit: Using Circe, the loveliest of all IRC clients]
<White_Flame> how annoying. With just 1 of my cond clauses, I need to store the test value for use in the body
<White_Flame> hmm, I guess I could bool it all together in the test clause itself
robdog_ has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
Lycurgus has quit [Quit: Exeunt]
<White_Flame> any cleaner ideas to golf around?
<_death> ((setq foo (the-test)) (use foo))
<White_Flame> I think I'd consider that dirtier ;)
<White_Flame> at least, it breaks scope in an ugly way
<White_Flame> *lexical scope
<_death> what do you mean?
<White_Flame> the definition of FOO would have to be somewhere above, and encompass much more than its use
<_death> yes..
<_death> you could use anaphoric cond or something if your OCD demands it
<jackdaniel> this asks for acond
<shka__> uh, just use let and cond, why need for being extra fancy?
<White_Flame> because I feel like being extra fancy :)
<shka__> well, this is acceptable answer
robdog has joined #lisp
<White_Flame> jackdaniel: good call, been a long time since I used those
robdog_ has quit [Ping timeout: 250 seconds]
Posterdati has quit [Ping timeout: 250 seconds]
dtornabene has joined #lisp
robdog_ has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog_ has quit [Ping timeout: 250 seconds]
xkapastel has joined #lisp
loli has quit [Ping timeout: 244 seconds]
robdog has joined #lisp
jmercouris has joined #lisp
stardiviner has quit [Ping timeout: 250 seconds]
robdog has quit [Ping timeout: 240 seconds]
karlosz has quit [Quit: karlosz]
loli has joined #lisp
robdog has joined #lisp
robdog has quit [Read error: Connection reset by peer]
wanz has quit [Quit: wanz]
robdog has joined #lisp
<makomo> White_Flame: take a look at On Lisp's CONDLET (i asked the same question ~2 weeks ago :-))
<White_Flame> heh
<makomo> oh, actually, never mind, i also concluded that CONDLET doesn't fit what i wanted to do (which i think is the same as you're trying to do)
<White_Flame> I more had alexandria on the mind, but On Lisp really did fit the bill
<White_Flame> (acond in particular)
<makomo> iirc, CONDLET conditionally establishes bindings and then executes a body, which is not what you're trying to do
amerlyq has quit [Quit: amerlyq]
<White_Flame> acond transparently binds IT to the value from the test clause
<White_Flame> for the body of the handler
<makomo> yeah, which fits what you're trying to do
<White_Flame> theoretically, even cleaner would be (some-cond ((var test . body)) ...)
<White_Flame> but you'd have to declare var for every case. IT is simpler, but I guess less clean
<White_Flame> (which of course is wholly subjective)
<White_Flame> really, we need specific macro support for every possible use, which would only lead towards NLP
<makomo> :D
<makomo> that's how LOOP was made :^)
<White_Flame> heh
<ggole> Binding depending on a condition... use a pattern matching macro?
robdog_ has joined #lisp
<_death> that's how IF* was made ;)
wanz has joined #lisp
matijja has quit [Remote host closed the connection]
<White_Flame> ggole: it's running a test, not just matching a pattern
<White_Flame> COND uses the result value, but doesn't pass it back into your handler body
<ggole> Pattern matchers tend to allow arbitrary tests
<makomo> _death: i remember that monstrosity :-). that was from Allegro CL right?
<ggole> While optionally binding the result
<_death> yes
robdog has quit [Ping timeout: 250 seconds]
Achylles has quit [Ping timeout: 252 seconds]
<White_Flame> ggole: there's no input data to pattern match against. it's an arbitrary predicate clause
<White_Flame> unless you mean self-contained within the test clause, but then it doesn't encompass the value passing outside of that, and leaves you at square one
<_death> abstractions have costs.. in my opinion it's better to use the setq idiom and concentrate on those with more bang for buck
<White_Flame> one could consider an ad-hoc unabstracted setq idiom to be technical debt a well
<White_Flame> *as well
<ggole> You can use a trivial value and just ignore it, although that's not really ideal
<White_Flame> when I'm doing just my own hobby code, I like striving for the ideals
<shka__> White_Flame: i have this lazy-let macro for situations like this
<makomo> i just remembered what i wanted to do with my COND. i wanted to reuse 2 values that were calculated as part of the test form, but not really the result of the test form itself
<shka__> so you can obtain value in the test, and it will be automaticly stored
<White_Flame> makomo: yeah, that's poking through scopes in a different way
<makomo> so ACOND wouldn't help me there. i wanted a sort of clause-local LET
<_death> White_Flame: sure.. throughout the years I've experimented with many styles.. and there was a time where I too preferred acond
<White_Flame> I don't generally prefer acond, but this case use it well
<makomo> i ended up going with what _death suggested :-)
<_death> I mean for this use case..
<makomo> althought it's 2 SETFs -- one nested within the other. what can you do :-)
<shka__> White_Flame: the above macro is the very definition of the word overkill :P
<White_Flame> looks like right-kill to me ;)
<shka__> but it is kinda clever so i like it somewhat
<White_Flame> proper-kill
<shka__> let over let over labels over symbol-macrolet kind of kill :P
<White_Flame> if the value derivation is expensive, you absolutely want to defer until the actual test needs it, if it's conditionally reached
<_death> I think Scheme's cond even has it built in
q9929t has joined #lisp
<shka__> yes, it is sometimes usefull
<shka__> not very usefull, but sometimes makes code a little simpler
<shka__> anyway, this is one way to do it i think
<makomo> shka__: neat macro
robdog_ has quit [Ping timeout: 250 seconds]
<shka__> not sure if neat, it is a little bit crazy
<makomo> that's why it's neat :-D
<shka__> but i think it is… interesting?
<makomo> but it as well requires that you wrap the whole COND with it, which is kinda ugh
robdog has joined #lisp
<shka__> well, i don't think this is a bad thing
<makomo> ACOND (and a hypothetical generalization of it that would allow every clause to have its own set of bindings) is nice, because the bindings are localized
robdog_ has joined #lisp
<White_Flame> for maximum insanity, a cond test clause could return a PROGV binding set applied to the handler body
robdog has quit [Ping timeout: 250 seconds]
<makomo> :')
Achylles has joined #lisp
Bike has joined #lisp
<shka__> White_Flame: congrats, this beat the lazy-let :P
schjetne has joined #lisp
Ukari has quit [Ping timeout: 246 seconds]
q9929t has quit [Remote host closed the connection]
robdog_ has quit [Ping timeout: 245 seconds]
robdog has joined #lisp
akater has quit [Quit: WeeChat 2.3]
ralt has quit [Quit: Connection closed for inactivity]
robdog has quit [Read error: Connection reset by peer]
amerlyq has joined #lisp
q9929t has joined #lisp
Ukari has joined #lisp
<dtornabene> curious if anyone has some strong opinions on the currently available xml libraries, I'm wanting to use them for parsing some webpages fwiw
<phoe> cxml ftw
<dtornabene> cool, thanks phoe:
Zaab1t has joined #lisp
Zaab1t has quit [Client Quit]
sauvin has quit [Ping timeout: 268 seconds]
loli has quit [Ping timeout: 250 seconds]
Josh_2 has joined #lisp
dtornabene has quit [Read error: Connection reset by peer]
pbgc has quit [Quit: Computer has gone to sleep.]
dtornabene has joined #lisp
akater has joined #lisp
dtornabene has quit [Read error: Connection reset by peer]
pbgc has joined #lisp
loli has joined #lisp
<shka__> parsing or scraping?
<shka__> because plump is good for scraping
Nilby has quit [Read error: Connection reset by peer]
<Josh_2> I've done quite a bit with plump, I like but it does sometimes throw errors when passing 'normal' sites
<Josh_2> I just chose to ignore them
<splittist> I would plump for plump. But that may be because of ancient not-so-good experience with cxml. And I wasn't parsing web stuff.
<shka__> i enjoyed scraping with dexador + lparallel + plump + lquery
<shka__> it worked very well
FreeBirdLjj has joined #lisp
robdog has joined #lisp
wanz has quit [Quit: wanz]
anewuser has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
robdog_ has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
robdog has quit [Ping timeout: 264 seconds]
robdog_ has quit [Ping timeout: 252 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 255 seconds]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
rippa has joined #lisp
jprajzne has quit [Quit: Leaving.]
Spaceman77 has quit [Remote host closed the connection]
robdog has joined #lisp
FreeBirdLjj has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #lisp
makomo has quit [Ping timeout: 246 seconds]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
loli has quit [Ping timeout: 255 seconds]
robdog has joined #lisp
orivej has quit [Ping timeout: 268 seconds]
robdog_ has quit [Ping timeout: 264 seconds]
robdog has quit [Ping timeout: 264 seconds]
robdog has joined #lisp
robdog_ has joined #lisp
loli has joined #lisp
robdog has quit [Ping timeout: 255 seconds]
ikki has joined #lisp
robdog_ has quit [Ping timeout: 268 seconds]
robdog has joined #lisp
prite has quit [Ping timeout: 240 seconds]
robdog has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Ping timeout: 259 seconds]
heisig has quit [Quit: Leaving]
rozenglass has joined #lisp
makomo has joined #lisp
robdog has joined #lisp
jmercouris has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
pierpal has joined #lisp
Josh_2 has quit [Quit: ERC (IRC client for Emacs 26.1)]
makomo_ has joined #lisp
paul0 has joined #lisp
Zaab1t has joined #lisp
makomo has quit [Ping timeout: 255 seconds]
q9929t has quit [Quit: q9929t]
makomo_ is now known as makomo
schweers has quit [Ping timeout: 250 seconds]
ralt has joined #lisp
aindilis has quit [Ping timeout: 246 seconds]
loli has quit [Ping timeout: 245 seconds]
aindilis has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
phoe has quit [Ping timeout: 257 seconds]
loli has joined #lisp
Ukari has quit [Ping timeout: 250 seconds]
Josh_2 has joined #lisp
Ukari has joined #lisp
wilfredh has joined #lisp
lumm has joined #lisp
bendersteed has joined #lisp
milanj has joined #lisp
gxt has joined #lisp
Lycurgus has joined #lisp
hhdave has quit [Ping timeout: 246 seconds]
nanoz has joined #lisp
loli has quit [Ping timeout: 246 seconds]
<drmeister> Does anyone know what the point of static-vectors:static-vector-address is?
FreeBirdLjj has quit [Remote host closed the connection]
<drmeister> The docs say - Return a foreign pointer to VECTOR(including its header). VECTOR must be a vector created by MAKE-STATIC-VECTOR.
* Lycurgus would presume interfacing with pkgs like linpack
anewuser has quit [Quit: anewuser]
bendersteed has quit [Ping timeout: 244 seconds]
prite has joined #lisp
loli has joined #lisp
m00natic has quit [Remote host closed the connection]
Lycurgus has quit [Quit: Exeunt]
abhixec has joined #lisp
lumm_ has joined #lisp
lumm has quit [Read error: Connection reset by peer]
lumm_ is now known as lumm
phoe has joined #lisp
cage_ has joined #lisp
lumm has quit [Client Quit]
vtomole has joined #lisp
jmercouris has joined #lisp
<jmercouris> is it possible to have both a do and a collect clause within a loop?
<sjl> sure
<jmercouris> I want to go over some objects, manipulate them, and then collect some operations on them
<jmercouris> ok
<verisimilitude> You can use AND to combine clauses, jmercouris.
<jmercouris> any example I can look at?
<verisimilitude> Sure, I just wrote one.
<jmercouris> interesting
<jmercouris> I tried it
<verisimilitude> (LOOP FOR I IN '(1 2 3) IF T DO (INCF I) AND COLLECT I)
<jmercouris> it just worked, didn't need an and clause
lumm_ has joined #lisp
<jmercouris> I literally just wrote (loop for object in object-list do (method-call object) collect (accessor-call object))
<jmercouris> and it just worked
<jmercouris> are you sure the AND is necessary?
<verisimilitude> You can run into issues.
<jmercouris> such as?
robdog has joined #lisp
<verisimilitude> I'll skulk through the standard for a moment to get a good one.
<jmercouris> ok
lumm_ has quit [Client Quit]
lumm has joined #lisp
vtomole has left #lisp [#lisp]
drolax has joined #lisp
<verisimilitude> Well, my example only applies when you're using an IF, say.
<jmercouris> I'm not using an IF
<jmercouris> at any rate, it works in my case
<ggole> (loop for i in (list 1 2 3 4 5) when (evenp i) do (incf i) collect i) vs (loop for i in (list 1 2 3 4 5) when (evenp i) do (incf i) and collect i)
<jmercouris> same thing, has to include a branch
<ggole> Right
<jmercouris> there are no branch conditions in my use case
<jmercouris> point understood though, thank you
<jmercouris> so there is a naming convention for predicates
<jmercouris> but is there a naming convention for flags?
<jmercouris> I know they are much more common in C languages, but there are still use cases for flags in lisp, and I'm not sure how to name them
<verisimilitude> Give an example.
<jmercouris> as I've never seen them in lisp code
<jmercouris> I have a database where I have a flag that indicates an account has been manipulated in some way that requires processing
<verisimilitude> Also, you can avoid the AND if you just use END to delimit conditions, instead, which is what I use whenever something gets difficult to understand at a glance.
<jmercouris> not sure what to name that database column and slot
<jmercouris> so for I have it named new-targets-p
<verisimilitude> Usually, the same naming convention is used.
<jmercouris> but I guess it could be something like targets-changed-flag
<jmercouris> not sure what to do here
<jmercouris> I guess it doesn't really matter
sauvin has joined #lisp
robdog has quit [Ping timeout: 264 seconds]
<ggole> Sometimes a question mark, targets-changed?
<ggole> That's more of a Scheme thing though
<verisimilitude> I suppose an alternative convention would be is- or are-, as in ARE-TARGETS-CHANGED?
<verisimilitude> Then you get to write (IF ARE-TARGETS-CHANGED ...).
liead has quit [Quit: Not all who wander are lost]
<verisimilitude> Then again, you could just use TARGETS-CHANGED for that.
lumm has quit [Quit: lumm]
lumm has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
<sjl> What airport are folks flying into for ELS this year? MXP, and then take public transit to Genova?
<jmercouris> I like the question mark idea
robdog has joined #lisp
scymtym has quit [Ping timeout: 250 seconds]
ralt has quit [Quit: Connection closed for inactivity]
pierpal has quit [Quit: Poof]
<cage_> sjl, genova has an airport: https://www.airport.genova.it/en/
<cage_> FWIW
pbgc has quit [Read error: Connection reset by peer]
robdog has quit [Ping timeout: 268 seconds]
<sjl> Yeah, not sure how efficient it'll be coming from the US though. There are direct flights from jfk <-> mxp at least. I'll poke around on ITA though
<sjl> er, ewr to mxp rather
<cage_> yes i also do not think there are direct flight form US, but it should not be a long journey from Milan to Genova
<sjl> Yeah looks like Milan to Genova is just 3.5 hours or so by public transit.
<cage_> not so far to be uncomfortable, i think :)
<sjl> Right. Just getting to/from EWR/JFK/PHL/BOS here is 5h of driving.
lumm has quit [Ping timeout: 268 seconds]
<cage_> compared to US size italy is a small country
<sjl> Yeah, NY alone is 1/2 the size of Italy.
<cage_> O_O
<sjl> (the state, not the city, hah)
<cage_> i guessed was the state :)
<sjl> The US itself is within a few percent of the size of Europe. So when I'm looking at different cities on the map trying to figure out how to get to ELS I need to remind myself to calibrate my expectations properly.
<surrounder> I just can't imagine one country being as big as the US, or canada or russia
<surrounder> 3.5 hours will get me in places where I won't understand anyone and the culture will probably be different too\
lumm has joined #lisp
adlai has joined #lisp
libertyprime has joined #lisp
emaczen has joined #lisp
loli has quit [Ping timeout: 246 seconds]
<emaczen> I have the strangest initialization behavior: https://pastebin.com/qukMcRhj
<emaczen> the paste gives a backtrace showing where I call make-instance with several keywords and their corresponding arguments, and then two initialize-instance methods that are called, but the keyword arguments became nil...
<emaczen> I write after methods on initialize-instance all the time, and I have never seen this happen before
rippa has quit [Ping timeout: 246 seconds]
ikki has quit [Ping timeout: 268 seconds]
<emaczen> The only difference from my past usage of make-instance is that the object's class is a subclass of standard-class, but I've only overriden validate-superclass, and added an after method on ensure-class-using-class
<emaczen> Any ideas on what is going on? I get the same exact behavior from CCL
Adamclisi has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
loli has joined #lisp
gxt has quit [Ping timeout: 268 seconds]
ggole has quit [Quit: Leaving]
nowhere_man has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
dyelar has quit [Quit: Leaving.]
<sjl> ... how in the hell can it possibly be six (6) USD per day to rent a car from MXP? Is Kayak lying to me? If so, heck, I'll just drive to ELS from MXP.
selwyn has quit [Remote host closed the connection]
robdog has joined #lisp
<cage_> is it too cheap?
<sjl> That seems ridiculously cheap.
robdog has quit [Ping timeout: 252 seconds]
<cage_> honest question because i never rented a car in my life :)
libertyprime has quit [Ping timeout: 272 seconds]
<sjl> 20-30 per day is what I'm used to.
nowhere_man has quit [Ping timeout: 258 seconds]
<jmercouris> 6 USD per day is not a real rate, you won't get that
<sjl> Yeah, I figured
<jmercouris> they will tack on all sorts of arbitrary insurances and the like
random-nick has joined #lisp
<jmercouris> don't worry, they'll get their money one way or another
<jmercouris> I reccommend going with a transparent company like Sixt
<sjl> Yeah, I've used them before.
<jmercouris> it appears more expensive on paper, but that is the true price, and they won't play games with you when it comes to insurance claims, upselling, and the like
<cage_> i think the bus is more expensive so 6$ is unrealistic
<sjl> I might rent a car anyway. I took the entire week off from work, so after ELS I might go to Florence and visit some of the math-related museums.
<cage_> that sound good :)
torbo has joined #lisp
lumonom has joined #lisp
robdog has joined #lisp
izh_ has joined #lisp
<lumonom> Hey i am really new here so pls tell me if i do something wrong. I wanted to ask if there is an easy way to check if a float number only has a 0 after the decimal point
<Krystof> do you mean, does the float represent an integer? (= f (ftruncate f))?
xkapastel has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
ikki has joined #lisp
cage_ has quit [Remote host closed the connection]
<lumonom> yes that is what i meant thank you.
libertyprime has joined #lisp
lumm has quit [Ping timeout: 246 seconds]
robdog has joined #lisp
orivej has joined #lisp
bendersteed has joined #lisp
grumble has quit [Quit: fire's]
robdog has quit [Ping timeout: 264 seconds]
varjag has joined #lisp
pillton has quit [Ping timeout: 264 seconds]
grumble has joined #lisp
lumm has joined #lisp
robdog has joined #lisp
Posterdati has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
jack_rabbit has joined #lisp
loli has quit [Ping timeout: 268 seconds]
gxt has joined #lisp
loli has joined #lisp
<jmercouris> so I'm trying to load my system
<jmercouris> which loads just fine on my own machine, but when I load it on my server
<jmercouris> I get all sorts of fun issues
<jmercouris> I'll post a snippet
<emaczen> jmercouris: Did you clear your caches?
lumm has quit [Ping timeout: 258 seconds]
<jmercouris> I did
<jmercouris> that's the first thing I did actually
lumm has joined #lisp
<jmercouris> I'm using Mito
<emaczen> whats that?
abhixec has quit [Ping timeout: 244 seconds]
<makomo> jmercouris: you're using SBCL right?
<jmercouris> yes
<makomo> check out the section "understanding compiler diagnostics" or something similar in SBCL's manual
<jmercouris> this is mito: https://github.com/fukamachi/mito/
<makomo> it'll tell you how to interpret the compiler's notes/warnings/errors
<jmercouris> but the warning is that it is a function call!
<jmercouris> there's nothing to interpret here
<makomo> yeah, indeed
<jmercouris> there is no function call, somehow the macro isn't getting loaded or some shit
<jmercouris> excuse my language, I'm a bit burnt out
<makomo> all good
<makomo> yeah, in any case, it's not seeing DEFTABLE as a macro but as a normal function, so it goes on to examine the arguments
<makomo> i think
<jmercouris> I'm going to clear my cache and recompile on my own machine and see if I have issues
<jmercouris> if I still have issues I'll update quicklisp
<jmercouris> they are both on sbcl 1.4.xx
jack_rabbit has quit [Ping timeout: 252 seconds]
izh_ has left #lisp [#lisp]
<jmercouris> 1.4.13 (working) vs 1.4.11 (non-working)
<emaczen> jmercouris: Why not 1.4.16 -- is that the bleeding edge?
<jmercouris> it's from a compiled image
<jmercouris> I don't feel like recompiling on freebsd
<jmercouris> its' from a port from about 6 months ago
<jmercouris> it takes many hours to compile
<jmercouris> at least on this little machine
<jmercouris> though it may be faster this time, since all of the dependencies are compiled, I'll do it as a last resort
<jmercouris> first I'll update quicklisp
<emaczen> I'm using 1.4.6 and I tried to upgrade to 1.4.16 and I couldn't load my code
<jmercouris> which I think is something like ql:update-dist or something?
<jmercouris> I can't remember
<jmercouris> cleared cache and rebuilt on my current machine no problem
<jmercouris> time to try updating quicklisp
<emaczen> fiddlerwoaroof: Have you done any CLOS integration with your cocoa bridge?
amerlyq has quit [Quit: amerlyq]
<dxtr> Can I do something like (loop for (a b) on '((1 2 3 4))) where (a b) has a length that depends on a variable?
<makomo> dxtr: assuming arbitrary lengths, would you then access the destructured elements? you wouldn't know how many to destructure
<makomo> how would you*
<makomo> LOOP's destructuring acts (almost, there's some corner case or something) like destructuring-bind's, so you can use stuff like &optional, etc.
<dxtr> Well, if I could catch them as a list then that'd be great because that's essentially what I want to do
amerlyq has joined #lisp
giova has joined #lisp
<makomo> dxtr: give an example of the destructuring you would like to do
<sjl> I don't think it's true that you can portably use destructuring-bind type stuff in LOOP binding clauses
<sjl> clhs 6.1.1.7
<dxtr> (loop for (a b) on '(1 2 3 4 5 6 7 8 9 10) collect (list a b))
<sjl> >
<sjl> Destructuring allows binding of a set of variables to a corresponding set of values anywhere that a value can normally be bound to a single variable. During loop expansion, each variable in the variable list is matched with the values in the values list. If there are more variables in the variable list than there are values in the values list, the remaining variables are given a value of nil. If there are more
<sjl> values than variables listed, the extra values are discarded.
giova has quit [Client Quit]
amerlyq has quit [Client Quit]
giova has joined #lisp
giova has quit [Remote host closed the connection]
<sjl> You can use a dotted list to do the equivalent of &rest, and you can use NIL to ignore values, but it's not full destructuring-bind level of power.
<jmercouris> updating QL fixed the issue
<jmercouris> seems to have been a dependency issue
<dxtr> Well if it's not possible it's not possible. Just figured that it doesn't hurt to ask so I don't re-invent stuff that exists
<sjl> dxtr: it's still not clear what you're trying to do. That example will return '((1 2) (2 3) ... (9 10) (10 nil)). Is that not what you want?
<makomo> dxtr: i'm not completely sure what you want to do. the example you gave above evaluates without errors. i was expecting an example where you provide the destructuring, the input and the values of A and B you want
<dxtr> I want (a b) to be of arbitrary length
<dxtr> I'm not sure how I would show that in code
<dxtr> .. if the feature doesn't exist to begin with
<makomo> don't use code, use english :-)
<makomo> give an example -- the pattern, the input and the bindings you want to end up with
<dxtr> I want to take a list and split it up in a list of lists with X elements
<dxtr> Where X is a variable
<makomo> so what you did above, does that do what you expect for X = 2?
<dxtr> Exactly
<Bike> well, you can't get a bunch of variables (like A and B) from a number, you'd get a subsequence
<sjl> There's no way to do that kind of thing with destructuring, no. You could do something like:
<sjl> (defun take (n list) (loop :for x :in list :repeat n :collect x))
<sjl> (defun ngrams (n list) (loop :for x :on list :repeat (- (length list) n) :collect (take n x)))
<sjl> er, (- (length list) (1- n)) probably
abhixec has joined #lisp
<Bike> you could do (loop for sublist on list by (lambda (l) (nthcdr n l)) for real-sublist = (subseq sublist 0 n) ...work with real-sublist here...)
<Bike> but that's sort of weird
<makomo> dxtr: as mentioned, you can't really do that with destructuring. the problem is that X is a run-time thing, while the destructuring specification has to be known at compile-time, at the moment you write the code (and "tricks" like &rest don't really help here)
<Bike> actually i don't know if you can use a lambda with by. hope so
<dxtr> makomo: got it
<sjl> Bike: I think they way n-grams, not to partition it into nonoverlapping seqs
<sjl> *they want
<dxtr> Yeah I want n-grams
<Bike> never mind me then.
troydm has joined #lisp
<emaczen> dxtr: Maybe you want to write a pattern matcher
<_death> you can of course use PROGV ;)
angavrilov has quit [Remote host closed the connection]
robdog has joined #lisp
nanoz has quit [Ping timeout: 246 seconds]
robdog_ has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
gilberth has joined #lisp
robdog_ has quit [Ping timeout: 268 seconds]
jmercouris has quit [Remote host closed the connection]
abhixec has quit [Quit: leaving]
lumonom has left #lisp ["WeeChat 1.4"]
loli has quit [Ping timeout: 246 seconds]
prite has quit [Ping timeout: 250 seconds]
pillton has joined #lisp
lumm has quit [Remote host closed the connection]
loli has joined #lisp
robdog has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
robdog has quit [Ping timeout: 252 seconds]
Inline has joined #lisp
jb__ has joined #lisp
jb__ is now known as jb-brook
Adamclisi has quit [Remote host closed the connection]
jb-brook has quit [Client Quit]
jb__ has joined #lisp
jb__ is now known as jb-brook
Nomenclatura has joined #lisp
brettgilio has joined #lisp
robdog has joined #lisp
bendersteed has quit [Remote host closed the connection]
jb-brook has quit [Read error: Connection reset by peer]
Bike has quit []
jb__ has joined #lisp
jb__ is now known as jb-brook
robdog has quit [Ping timeout: 250 seconds]
lumm has joined #lisp
lumm has quit [Client Quit]
lumm has joined #lisp
robdog has joined #lisp
giova has joined #lisp
Nomenclatura has quit [Remote host closed the connection]
robdog has quit [Ping timeout: 264 seconds]
Nomenclatura has joined #lisp
Krystof has quit [Ping timeout: 246 seconds]
jack_rabbit has joined #lisp
q3d has joined #lisp
robdog has joined #lisp
robdog has quit [Ping timeout: 268 seconds]
varjag has quit [Ping timeout: 250 seconds]
loli has quit [Ping timeout: 250 seconds]
makomo has quit [Ping timeout: 255 seconds]
robdog has joined #lisp
lumm has quit [Ping timeout: 264 seconds]
random-nick has quit [Read error: Connection reset by peer]
Bike has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
robdog_ has joined #lisp
lumm has joined #lisp
loli has joined #lisp
ltriant has joined #lisp
brettgilio has quit [Ping timeout: 255 seconds]
robdog_ has quit [Ping timeout: 252 seconds]
milivoj has quit [Ping timeout: 250 seconds]
onawebuc has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
q3d has quit [Ping timeout: 256 seconds]
lumm has quit [Quit: lumm]
rumbler31 has quit [Remote host closed the connection]
robdog has joined #lisp
robdog has quit [Ping timeout: 250 seconds]
robdog has joined #lisp
Lycurgus has joined #lisp