<Shinmera> Plus doing the same as mapcar in loop is about the most bog standard thing ever, so your complaint really doesn't hold water.
fikka has joined #lisp
<phoe> TMA: actually IN/ON/ACROSS is pretty sane in LOOP
<phoe> in (1 2 3) gives you 1, 2, 3; on (1 2 3) gives you (1 2 3), (2 3), (3); across #(1 2 3) gives you 1, 2, 3
<TMA> I find forgetting most of the LOOP syntax all the time. It is too much like English, yet it is different becasuse formalized. It just makes me afraid that I make some mistake.
<|3b|> anything but IN wouldn't have worked with MAPCAR anyway :p
<Shinmera> Then you just aren't using loop enough. Using it less won't help that.
<|3b|> do i want mapcon, mapl, mapc, etc?
<krwq> TMA: you can always use being the elements of
spoken-tales has joined #lisp
<phoe> krwq: wait, seriously?
<phoe> ...
<phoe> holy flipping spheres
<krwq> phoe: not sure if that was sarcasm or for real :P
<phoe> I just learned a new things
<phoe> a new thing*
* |3b| doesn't see it in the spec
<krwq> TMA: loop has really flexible syntax - instead of thinking "I want to loop over elements" you should think what you want to do
<krwq> |3b|: for-as-hash
<krwq> it might be a bug though :P
<krwq> no actually that's wrong
<krwq> might not be documented
<|3b|> yeah, no elements-of in the grammar for that :)
<|3b|> probably implementation extension
<krwq> I think I might have read it in PCL or somewhere but I've used "being the elements of" for a while after I found that it is actually less error prone when you got separate sytntax for list/vector
<Shinmera> It's not in PCL
Ven`` has joined #lisp
<krwq> not clue where I read it then but this works on sbcl: (loop for x being the elements of #(1 2 3 4) do (format t "~a~%" x))
<krwq> TMA in general this is a good case for loops:
<krwq> (loop for i from 0 for x in '(a b c d) do ...)
<|3b|> if it works on sbcl, it might work on most others since it uses a popular LOOP implementation... good chance clisp wouldn't like it though
<krwq> once you learn how to use multiple iterators at once that is super convenient
<aeth> |3b|: The easy solution is to support every implementation except clisp
smurfrobot has quit [Remote host closed the connection]
<aeth> I make a lot of clisp unfriendly assumptions like a fixnum of at least 60 bits and the existence of specialized single-float and double-float arrays.
<aeth> clisp really needs an update to catch up
<|3b|> also risks breaking on future implementations
Oladon has joined #lisp
<Shinmera> Or current platforms
<krwq> either way I didn't realize this was undocumented feature
<aeth> Futuer implementors have a difficult job because there are a lot of de facto standards.
<aeth> I think most people just test major implementations (perhaps with something like roswell) for breakage, rather than testing against the standard.
* |3b| wonders how hard it would be to add a loop-style interface to ITERATE, would be nice to have the improvements like more clauses and portable extensibility without having to put up with the annoying non-lispy syntax :)
<|3b|> (ideally sharing existing extensions with minimal extra work)
<oleo> loop is more like plain english
<oleo> lol
<aeth> loop is more like COBOL?
<aeth> :-p
<aeth> Well, COBOL, SQL, Shakespeare, and other programming languages that try to be like English.
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
<pagnol> being new to lisp I just began looking into asdf and in particular the format of asd files, and I noticed that apparently asdf doesn't complain if functions from modules that don't officially depend on each other call each other
<Bike> that's not a level asdf knows about.
<pagnol> what about the compiler?
<Bike> but, it's fine to compile calls to functions that aren't yet defined.
<pagnol> ah
<aeth> It's worse than that. Sometimes, it will work now (as you're adding those function calls) until you try to load the ASDF system again with a fresh image
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Bike> functions don't strictly need to be defined until they're called, most of the time, which supports the ability to redefine, and such.
wxie has quit [Remote host closed the connection]
attila_lendvai has quit [Read error: Connection reset by peer]
Ven`` has joined #lisp
<pagnol> is there some way to enforce the modularity?
attila_lendvai has joined #lisp
orivej has joined #lisp
<pagnol> somehow the lisp way still evades me
<Bike> like have a compilation fail if it hits a call to an unknown function?
<pagnol> hmm
<pagnol> yes?
<Bike> asdf might have some hook, but it's not something i'm familiar with
red-dot has quit [Quit: Going offline, see ya! (www.adiirc.com)]
red-dot has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
<pagnol> I can't give modules their own namespace can I? (unless I prefix everything inside)
attila_lendvai has joined #lisp
<Bike> we call namespaces packages. you can have however many you want for a module
serviteur has joined #lisp
<earl-ducaine> pagnol: A major aspect of CL is that the language itself doesn't have a concept about systems or modules. Much like Javascript, conventions and tools have grown up address that.
<earl-ducaine> Don't get confused by CL packages. Some languange environments use the term package and module interchangably. In Lisp packages are very different from what many other languange would call a 'package'
<pagnol> you're right, I was briefly confused by the terminology
Kevslinger has joined #lisp
<aeth> pagnol: There are three concepts. Packages, systems, and projects. Packages are the thing built into the language and they're about namespaces for symbols. Systems are associated with ASDF. They're probably what you think of when you think "package". Quicklisp has the concept of projects, which afaik is just a collection of systems in a directory.
<pagnol> aeth, thanks
<|3b|> cl does have a concept of "module", it just isn't very useful so we ignore it :/
<aeth> e.g. foo and foo/examples and foo/tests are one project, three systems, and any number of packages depending on the architecture.
<|3b|> clhs require
smurfrobot has joined #lisp
<pagnol> aeth, why three systems? wouldn't you put everything into one system?
<aeth> There are two ways to do packages. One is to do one package per file, at the top of the file, and it looks a lot like Python or Java in the end. This is the minority style. The majority style is to have one package.lisp for the entire system, or possibly one package.lisp per directory if it's a very large project.
<aeth> There are three ways to do systems. One is to have one large system for everything except possibly tests and examples if they exist. This is the majority style, especially since most projects are small. Another breaks systems into directories. Another associates systems with files and packages, using this: http://davazp.net/2014/11/26/modern-library-with-asdf-and-package-inferred-system.html
<pagnol> I'm about to begin working on a client-server app and I was going to set it up roughly like this if this makes sense: https://gist.github.com/anonymous/986b798f2292b1537e69ef4742e87aad
<pagnol> then foo would correspond to the server part, say, and bar to the client part, and they share some utils which would be in 'mylibrary'
<pagnol> but maybe that doesn't make much sense?
<|3b|> pagnol: examples and tests frequently have dependencies the main library doesn't, and in addition to wasting space they might also conflict with something that is just trying to use the library
<pagnol> ah good point
<earl-ducaine> |3b|: it would have been more correct for me to say that CL *has* the concept of a module, but the standard does not define what it is.
smurfrobot has quit [Ping timeout: 256 seconds]
asarch has quit [Quit: Leaving]
<aeth> pagnol: If you're doing client and server and utils, you probably want (at least) three systems. Someone who's deploying a server probably isn't interested in what foo/client (or foo.client or com.example.client or however you want to name it) provides.
<pagnol> so then you would have three separate calls to asdf:defsystem for tests, examples and the actual library/app?
<|3b|> you might also have things that link your library to another but that are optional, so that would also be reasonable to put in a separate system for use by people who want to use both, while people who only use your library don't need to load the other
<pagnol> would you put the three calls to defsystem into one .asd?
<aeth> Yes.
<Bike> yeah, it's not uncommon to define separate thing, thing/tests, thing/example systems
<Bike> asdf whines at you if you name them something but foo/whatever
<|3b|> earl-ducaine: yeah, lack of specification is what makes it less useful
<pagnol> and inside my project directory have a subdirectory for each system defined with defsystem?
<aeth> pagnol: If you are breaking things up into subdirectories, unless those subdirectories are just foo/examples/ and foo/tests/ then it makes sense to use separate directories, like foo/client/, foo/server/, and foo/utils/
<aeth> s/separate directories/separate directories for everything/
<aeth> For anything really small, it doesn't matter, but if it's large, directories are useful to organize things.
<pagnol> alright
<pagnol> thanks
<pagnol> that was very helpful
<aeth> If you want to go with a fairly standard style, you should probably have one system definition per directory and one package.lisp in each directory for the package definition.
varjag has quit [Ping timeout: 252 seconds]
<aeth> (the system definitions do not go in the subdirectories, and can go in one file)
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<earl-ducaine> pagnol: if you're using quicklisp, you can inspect the ~/quicklisp/dists/quicklisp/software directory which will have all the sources quicklisp has downloaded. That will provide you with a wealth of examples of how people have structured their asdf projects.
aristippus has quit [Ping timeout: 265 seconds]
varjag has joined #lisp
<aeth> You can use something like Quickproject. https://www.xach.com/lisp/quickproject/
Ven`` has joined #lisp
DrPete has joined #lisp
<aeth> Or you can set things up once and basically just copy your old project foo.asd file to use for new bar.asd file when you want to make bar instead of foo
<aeth> If you set things up on your own, you probably want to create a link in ~/quicklisp/local-projects/ (or wherever your local-projects directory is) to wherever your project is so Quicklisp can find it as if it was in Quicklisp, e.g. like this: cd ~/quicklisp/local-projects/; ln -s ~/git/foo
<aeth> If you use Quickproject, it automatically registers the system so ASDF and Quicklisp can find it iirc.
varjag has quit [Ping timeout: 248 seconds]
aristippus has joined #lisp
markong has quit [Ping timeout: 272 seconds]
randomstrangerb has quit [Ping timeout: 268 seconds]
randomstrangerb has joined #lisp
random-nick has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 263 seconds]
mlau has quit [Ping timeout: 252 seconds]
smurfrobot has joined #lisp
fikka has joined #lisp
TCZ has joined #lisp
TCZ has quit [Client Quit]
loli has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
smurfrobot has quit [Remote host closed the connection]
bgardner has quit [Ping timeout: 252 seconds]
dddddd has quit [Remote host closed the connection]
fikka has joined #lisp
razzy` has joined #lisp
kajo has joined #lisp
d4ryus1 has joined #lisp
serviteur has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 252 seconds]
attila_lendvai has quit [Read error: Connection reset by peer]
d4ryus has quit [Ping timeout: 248 seconds]
attila_lendvai has joined #lisp
smurfrobot has joined #lisp
fikka has joined #lisp
orivej has quit [Ping timeout: 252 seconds]
JonSmith has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
attila_lendvai has joined #lisp
fikka has quit [Ping timeout: 263 seconds]
pagnol has quit [Ping timeout: 248 seconds]
JonSmith has quit [Ping timeout: 248 seconds]
wxie has joined #lisp
smurfrobot has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
t0adst00l has quit [Ping timeout: 272 seconds]
spoken-tales has quit [Remote host closed the connection]
spoken-tales has joined #lisp
jack_rabbit has quit [Read error: Connection reset by peer]
norfumpit has quit [Read error: Connection reset by peer]
norfumpit has joined #lisp
fikka has joined #lisp
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
norfumpit has quit [Read error: Connection reset by peer]
spoken-tales has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
spoken-tales has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
damke_ has joined #lisp
nirved has quit [Quit: Leaving]
Murii has quit [Quit: WeeChat 1.4]
damke has quit [Read error: Connection reset by peer]
DeadTrickster has quit [Read error: Connection reset by peer]
DeadTrickster has joined #lisp
fikka has joined #lisp
jack_rabbit has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
pierpa has quit [Quit: Page closed]
smurfrobot has joined #lisp
Oladon has quit [Read error: Connection reset by peer]
Oladon has joined #lisp
fikka has joined #lisp
pagnol has joined #lisp
Kyo91 has quit [Quit: ZNC 1.6.5 - http://znc.in]
Kyo91` is now known as Kyo91
smurfrobot has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 264 seconds]
randomstrangerb has quit [Ping timeout: 264 seconds]
randomstrangerb has joined #lisp
z3t0 has joined #lisp
smurfrobot has joined #lisp
z3t0 has quit [Remote host closed the connection]
smurfrobot has quit [Ping timeout: 248 seconds]
smurfrobot has joined #lisp
fikka has joined #lisp
Ven`` has joined #lisp
smurfrobot has quit [Ping timeout: 248 seconds]
spoken-tales has left #lisp ["ERC (IRC client for Emacs 25.3.1)"]
fikka has quit [Ping timeout: 264 seconds]
razzy` has quit [Ping timeout: 264 seconds]
Ven`` has quit [Ping timeout: 260 seconds]
Karl_Dscc has joined #lisp
JonSmith has joined #lisp
JonSmith has quit [Remote host closed the connection]
JonSmith has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
peterpp_ has joined #lisp
LiamH has quit [Quit: Leaving.]
fikka has joined #lisp
pagnol has quit [Ping timeout: 264 seconds]
JonSmith has quit [Remote host closed the connection]
JonSmith has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Oladon has quit [Quit: Leaving.]
peterpp_ is now known as pagnol
fikka has joined #lisp
Nikotiin1 has quit [Ping timeout: 252 seconds]
JonSmith has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 264 seconds]
uuplusu has quit [Remote host closed the connection]
aindilis has quit [Read error: Connection reset by peer]
Karl_Dscc has quit [Remote host closed the connection]
aindilis has joined #lisp
pagnol has quit [Ping timeout: 248 seconds]
_whitelogger has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
kajo has quit [Ping timeout: 240 seconds]
schoppenhauer has quit [Ping timeout: 260 seconds]
schoppenhauer has joined #lisp
<beach> Good morning everyone!
<beach> And a happy new year 2018.
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
<wxie> hi
<wxie> question:
<wxie> (macroexpand-1 (with-gensyms (result)
<wxie> `(let ((,result t))
<wxie> (format t "~a ~%" ,result))))
<wxie> why do I get an error: LET: variable RESULT has no value?
<beach> Maybe because you didn't quote the form that you submitted to macroexpand-1?
<wxie> Thanks.
<beach> Sure.
<wxie> It becomes: (LET NIL ...)?
<Bike> (let () ...)? that's ok
<wxie> This causes that result is not bound.
<Bike> no, something in the ... does
<beach> Well, I don't know where you got your with-gensyms from.
<wxie> (LET NIL `(LET ((,RESULT T)) (FORMAT T "~a ~%" ,RESULT)))
<Bike> that's from what, (macroexpand-1 (with-gensyms ...))? or (macroexpand-1 '(with-gensyms ...))?
<wxie> The second (with quote).
OS-26949 has quit [Quit: Leaving]
<Bike> your with-gensyms is messed up, i guess
<Bike> with alexandria's, i get (let ((result (gensym "RESULT"))) ...)
<krwq> wxie: use quote before expression in macroexpand
<krwq> oh wait
<krwq> nvm
fikka has joined #lisp
t0adst00l has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<wxie> gensym is:
<wxie> (defmacro with-gensyms ((&rest names) &body body)
<wxie> `(let ,(loop for n in names collect `(,n (gensym)))
<wxie> ,@body))
<wxie> (gensym 0)
<wxie> #:G0
lemoinem has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
<Bike> if i use that with-gensyms i don't get any let nil.
<Bike> are you sure that that is the definition in force?
damke has joined #lisp
<krwq> i find using literals inside the loop problematic - try using `(list ,n (gensym))
<Bike> you mean (list n '(gensym))
damke_ has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 256 seconds]
raphaelss has quit [Quit: Leaving]
<wxie> I do not need rewrite the with-gensyms anyway. The problem remains.
<Bike> i can't reproduce. your definition works fine here.
damke has quit [Ping timeout: 264 seconds]
<wxie> Thanks.
<krwq> what does (symbol-package 'loop) and *package* return?
<wxie> #<PACKAGE COMMON-LISP>
<krwq> what about (with-gensyms (foo) foo)?
fikka has joined #lisp
damke has joined #lisp
<wxie> - LET: variable FOO has no value
<wxie> tHAT'S THE problem.
<krwq> ok, did you use alexandria?
<krwq> (ql:quickload :alexandria) (use-package :alexandria)
<Bike> they pasted the definition right there
<krwq> take-new when it asks to override with-genyms
Nikotiin1 has quit [Quit: WeeChat 1.4]
fikka has quit [Ping timeout: 248 seconds]
<Bike> or just run your defmacro again. the point is whatever macro you have bound to with-gensyms ain't that one
<krwq> i think he removed it
<krwq> but i guess only in source code
<krwq> not uninterned
<wxie> Ok, it works with alwxandria. Thanks. Is that standard Common Lisp?
<pjb> Nope.
<pjb> (ql:quickload :alexandria)
<krwq> wxie: it is one of the most popular libs though
<Bike> i mean, the library is written in standard cl
<wxie> It overrides several CL functions.
<Bike> alexandria? no it does not.
<wxie> I was asked to take a few.
<Bike> your image is in a strange state.
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
<wxie> It's clisp-2.49, and very stable so far.
<Bike> no, i mean you did some definingn or undefining or package imports or something.
<Bike> if you start a fresh clisp and load alexandria there should be no conflicts.
<wxie> ok
turkja has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
khisanth_ has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
randomstrangerb has quit [Ping timeout: 264 seconds]
randomstrangerb has joined #lisp
<krwq> wxie - when you use symbol in your image which doesn't exist it will be interned - after you use alexandria and add the symbol which didn't exist before it will see conflict because you already have it
<krwq> so the symbol is interned but it is not bound to any function to variable
<krwq> or variable*
<wxie> Thanks for helping. Glad that it is solved.
wxie has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 248 seconds]
wxie has joined #lisp
bruv523 has joined #lisp
bruv523 has quit [K-Lined]
lemoinem has joined #lisp
damke_ has joined #lisp
terpri has quit [Quit: Leaving]
fikka has joined #lisp
khisanth_ has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
safe has joined #lisp
fikka has joined #lisp
krwq has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 264 seconds]
t0adst00l has quit [Ping timeout: 272 seconds]
Bike has quit [Quit: Lost terminal]
fikka has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
shrdlu68 has joined #lisp
<shrdlu68> Good morning, fellow earthlings!
<notzmv> morning
<notzmv> happy new year
<shrdlu68> Happy new orbit
fikka has joined #lisp
aindilis has quit [Ping timeout: 256 seconds]
lemoinem has quit [Ping timeout: 248 seconds]
lemoinem has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
yeticry has quit [Ping timeout: 260 seconds]
yeticry has joined #lisp
<shrdlu68> What's the way to wait till a thread exits in bordeaux-threads? The docs advise against #'join-thread
fikka has joined #lisp
smurfrobot has joined #lisp
<shrdlu68> Hmm, I could use condition variables...
t0adst00l has joined #lisp
megalography has quit [Quit: Leaving.]
fikka has quit [Ping timeout: 248 seconds]
smurfrobot has quit [Ping timeout: 264 seconds]
wxie has quit [Read error: Connection reset by peer]
wxie has joined #lisp
shka has joined #lisp
lemoinem has quit [Ping timeout: 260 seconds]
Vicfred has joined #lisp
lemoinem has joined #lisp
smurfrobot has joined #lisp
shrdlu68 has quit [Remote host closed the connection]
smurfrobot has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
terpri has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
rippa has joined #lisp
notzmv is now known as `420
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
shrdlu68 has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
Amplituhedron has joined #lisp
fikka has quit [Ping timeout: 272 seconds]
fikka has joined #lisp
moei has quit [Quit: Leaving...]
_paul0 has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
wxie has quit [Remote host closed the connection]
paul0 has quit [Ping timeout: 252 seconds]
DeadTrickster has quit [Read error: Connection reset by peer]
DeadTrickster has joined #lisp
<shrdlu68> This function counts from 0 past 7 and errors. However, changing "*standard-output*" to "t" in line 8 changes that. How is this happening? https://paste.pound-python.org/show/kNpHapRGwKjykU7YFXSX/
<shrdlu68> i.e if I change *standard-output* to t it runs perfectly and counts only from 0 to 7 as it should.
damke has joined #lisp
<whoman> hm, try to flush stdio ?
fikka has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
<shrdlu68> Further investigation shows that it happens either way, just not predictably.
<shrdlu68> Even without printing, why would it count past 7?
lemoinem has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 248 seconds]
<beach> It is not specified whether the final value of a loop counter is the last value you specified or one greater.
<beach> I believe in SBCL it is one greater.
<beach> Or, maybe it's specified to be wrong. I forget
<beach> SICL LOOP doesn't have this problem, of course. :)
<shrdlu68> But (loop for i from 0 to 7 collecting i) always results in '(0 1 2 3 4 5 6 7) in SBCL under normal circumstances.
<Shinmera> shrdlu68: The problem is that the thread might start after the loop has finished.
lemoinem has joined #lisp
Amplituhedron has quit [Ping timeout: 264 seconds]
<Shinmera> If you want to avoid this you need to create a new binding for the index around each thread creation.
Tristam has quit [Ping timeout: 264 seconds]
<shrdlu68> I see. I'm currently creating a new binding _inside_ each thread.
fikka has joined #lisp
`420 has left #lisp [#lisp]
fikka has quit [Ping timeout: 240 seconds]
JonSmith has joined #lisp
JonSmith has quit [Remote host closed the connection]
fikka has joined #lisp
lemoinem has quit [Ping timeout: 240 seconds]
lemoinem has joined #lisp
DeadTrickster has quit [Read error: Connection reset by peer]
DeadTrickster has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
randomstrangerb has quit [Ping timeout: 252 seconds]
randomstrangerb has joined #lisp
nsrahmad has joined #lisp
moei has joined #lisp
sebastien_ has quit [Quit: leaving]
smurfrobot has joined #lisp
lemoinem has quit [Ping timeout: 252 seconds]
lemoinem has joined #lisp
sebastien_ has joined #lisp
JuanDaugherty has joined #lisp
fikka has joined #lisp
jamtho_ has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #lisp
smurfrobot has quit [Remote host closed the connection]
Murii has joined #lisp
fikka has joined #lisp
shrdlu68 has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 256 seconds]
python476 has joined #lisp
safe has quit [Read error: Connection reset by peer]
nsrahmad has quit [Quit: Leaving]
fikka has joined #lisp
smurfrobot has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
josemanuel has joined #lisp
Tristam has joined #lisp
attila_lendvai has quit [Read error: Connection reset by peer]
Tristam has quit [Ping timeout: 260 seconds]
attila_lendvai has joined #lisp
DeadTrickster_ has joined #lisp
smurfrobot has quit [Remote host closed the connection]
__paul0 has joined #lisp
fikka has joined #lisp
_paul0 has quit [Ping timeout: 248 seconds]
Tristam has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
Tristam has quit [Ping timeout: 248 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
Tristam has joined #lisp
markong has joined #lisp
narendraj9 has joined #lisp
dddddd has joined #lisp
Tristam has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
Tristam has joined #lisp
smurfrobot has joined #lisp
random-nick has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
Tristam has quit [Ping timeout: 264 seconds]
__paul0 has quit [Remote host closed the connection]
fikka has joined #lisp
paul0 has joined #lisp
smurfrobot has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 248 seconds]
Tristam has joined #lisp
Tristam has quit [Ping timeout: 248 seconds]
fourier has joined #lisp
DeadTrickster_ has quit [Ping timeout: 256 seconds]
randomstrangerb has quit [Ping timeout: 256 seconds]
randomstrangerb has joined #lisp
fikka has joined #lisp
smurfrobot has joined #lisp
Tristam has joined #lisp
lemoinem has quit [Ping timeout: 264 seconds]
lemoinem has joined #lisp
wxie has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
smurfrobot has quit [Ping timeout: 268 seconds]
Tristam has quit [Ping timeout: 240 seconds]
Tristam has joined #lisp
Tristam has quit [Ping timeout: 256 seconds]
mlau has joined #lisp
Tristam has joined #lisp
fikka has joined #lisp
mlau has quit [Ping timeout: 256 seconds]
jarwin has joined #lisp
jarwin is now known as Jarwin
Tristam has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 248 seconds]
fourier has quit [Ping timeout: 248 seconds]
mlau has joined #lisp
Tristam has joined #lisp
makomo_ has joined #lisp
<phoe> How can I tell DRAKMA to error if it encounters a response code like 4xx or 5xx?
Tristam has quit [Ping timeout: 260 seconds]
pagnol has joined #lisp
fikka has joined #lisp
Tristam has joined #lisp
<JuanDaugherty> it will have already done, you just need to hook, it's your job
<JuanDaugherty> because programmer
Jarwin has quit [Remote host closed the connection]
Tristam has quit [Ping timeout: 240 seconds]
<Xach> phoe: I generally wrap raw drakma to do things like that when working with apis.
<Xach> I'll glom all the separate bits into a single response object, then specialize that object, then have a gf that finds an error condition for that object based on all its parts (response code, headers, body)
<Xach> For some APIs 4xx isn't an error, for example.
Tristam has joined #lisp
orivej has joined #lisp
terpri has quit [Ping timeout: 240 seconds]
<phoe> Xach: got it, thanks.
Tristam has quit [Ping timeout: 272 seconds]
makomo has joined #lisp
wxie has quit [Remote host closed the connection]
makomo_ has quit [Ping timeout: 260 seconds]
smurfrobot has joined #lisp
narendraj9 has quit [Remote host closed the connection]
bgardner has joined #lisp
flip214 has quit [Read error: Connection reset by peer]
flip214_ has joined #lisp
<Shinmera> if I remember correctly dexador errors on non-200 codes.
fikka has quit [Ping timeout: 265 seconds]
smurfrobot has quit [Remote host closed the connection]
<phoe> Shinmera: dexador "is still BETA quality. The APIs will be likely to change."
<phoe> but I'm nitpicking now. (:
<Shinmera> Sure, I can't recommend it myself either as I've had it fail on some sites.
<Shinmera> It is much faster than drakma when it works
<Shinmera> Which can be important
fittestbits has left #lisp [#lisp]
fikka has joined #lisp
<Xach> What's the difference between Shinmera and Shirakumo?
<Shinmera> There's other people in shirakumo. http://shirakumo.org/
<Shinmera> But it's still 99.9% me, so
<Shinmera> Not that much
<Xach> Shinmera: If I made a feed for build failures, should I lump them together?
<Xach> I am doing some pattern-matching heuristics
<Shinmera> I don't know if grouping things into a single feed per author is a good idea. Some people might individually care about failures of a particular project.
<Shinmera> Unless you're going to offer both.
<Shinmera> And no, I'm fine with subscribing to multiple feeds, so just doing per-github-account or something is fine by me.
<Shinmera> No need to put them together.
<Shinmera> And who knows, maybe some day I'll get lucky and someone else will finally contribute significantly to Shirakumo projects.
eSVG has quit [Ping timeout: 265 seconds]
pjb has quit [Ping timeout: 252 seconds]
JuanDaugherty has quit [Quit: Ex Chat]
_paul0 has joined #lisp
kupad has quit [K-Lined]
kupad has joined #lisp
eSVG has joined #lisp
paul0 has quit [Ping timeout: 256 seconds]
nirved has joined #lisp
Karl_Dscc has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
JuanDaugherty has joined #lisp
igemnace has joined #lisp
pjb has joined #lisp
vaporatorius__ has quit [Ping timeout: 260 seconds]
mathrick has joined #lisp
smurfrobot has joined #lisp
bgardner has quit [Quit: Simple IRC: The quit option.]
bgardner has joined #lisp
<phoe> I have a list (A B C D E F ... P Q R ... X Y Z). Is there a function that will get me a subsequence of this list, starting from the beginning, and ending at Q?
<phoe> Where Q can be any object.
smurfrobot has quit [Ping timeout: 248 seconds]
<phoe> Or should I just use SUBSEQ with POSITION?
<beach> (subseq list 0 1+ (position 'Q list)))
<beach> er, you see what I mean.
<Shinmera> (loop for c in list until (eq c thing) collect c)
<beach> You'll miss the Q then.
<Shinmera> move the until after the collect if you want the q
<phoe> Got it. Thanks!
uuplusu has joined #lisp
<Xach> phoe: i have a weird variation
<Xach> (ldiff list (cdr (member 'q list)))
sabrac has joined #lisp
<Xach> i don't see ldiff used a lot.
<_death> I was just about to say.. but why CDR?
<beach> So that Q is in the result?
<Xach> if you want Q as the final object.
<_death> right, guess I expected a closed interval
<sabrac> hello everyone
<Xach> hi sabrac. thanks for making your library comparison pages. they are great.
<beach> Hello sabrac.
<sabrac> Thank you. I wish I had more time to work on them because I learn so much doing them.
<sabrac> Is there anything in particular I should prioritize?
<pagnol> I sometimes see keywords prefixed with a #, like #:abc, what are those?
<Shinmera> sabrac: I remember you mailing me about one some months back, but I don't recall it ever getting released
<Shinmera> I forgot what it was about though :(
<_death> pagnol: these aren't keywords, but uninterned symbols
kajo has joined #lisp
<_death> pagnol: you should tokenize them in your mind as #: abc rather than # :abc..
<pagnol> ah, thanks
<_death> clhs #:
<phoe> Xach: ldiff! that was the function I was thinking of.
<sabrac> Shinmera: I have one half completed on test frameworks. Work got in the way.
pjb has quit [Ping timeout: 255 seconds]
<Shinmera> Ah, that was it
<pagnol> apparently people use dots in package names to achieve something like nested namespaces, I'm wondering if I should adopt that
<phoe> clhs ldiff
jibanes has quit [Ping timeout: 248 seconds]
nika has joined #lisp
<Xach> pagnol: It's syntactic only
<Xach> pagnol: I don't prarticularly like it.
<Xach> Slashes are even uglier to me.
jibanes has joined #lisp
zulu_inuoe has joined #lisp
<_death> with package-inferred-systems slashes have semantics
<_death> also slime will display only the part after the last dot in the repl
terpri has joined #lisp
JonSmith has joined #lisp
<pagnol> Xach, is there anything else you use to imitate nested namespaces?
<beach> pagnol: Hierarchies are not necessarily good.
<beach> Perhaps it is time to use package-local nicknames.
JonSmith has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 268 seconds]
<beach> pagnol: That way, you can use long names for your packages and short ones to refer to them.
pfdietz has joined #lisp
orivej has joined #lisp
<Xach> pagnol: for related packages, i use a short or abbreviated prefix and a hyphen.
<Xach> Some systems use one big package and lump everything into it. I don't like that style a lot - I want the comfort of knowing I won't affect unrelated things in a particular section of a larger project.
<Shinmera> I use both the FQDN style and the basic hyphen style.
<pagnol> fqdn?
<Shinmera> Fully Qualified Domain Name
<sabrac> _death: Thank you for the reminder on package-inferred systems. I had forgotten about that. Heads off to re-read the asdf documentation.
Tobbi has joined #lisp
<Shinmera> sabrac: By the way, thanks again for the feedback and bug reports that spawned from the previous articles you wrote :)
marcux has joined #lisp
fikka has joined #lisp
igemnace has quit [Ping timeout: 240 seconds]
igemnace has joined #lisp
KZiemian has joined #lisp
<KZiemian> AreoNoxi: hello
<sabrac> Shinmera: Thank you for actually documenting things.
<KZiemian> AreoNoxi: have you still some question about CLUS
<KZiemian> AreoNoxi: maybe today I can give you some clues
<Shinmera> KZiemian: You're typing the name wrong
<KZiemian> Shinmera: oh, yes you are right
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<KZiemian> AeroNotix: hello
<KZiemian> AeroNotix: maybe today I can give more things about CLUS
damke_ has quit [Ping timeout: 264 seconds]
brendyn has quit [Ping timeout: 246 seconds]
<KZiemian> will we celabreat in some way 60 years of Lisp?
<KZiemian> my celebration: write 10 real program in CL
damke_ has joined #lisp
<KZiemian> maybe give a look o Scheme
aindilis has joined #lisp
<KZiemian> *on Scheme
Jarwin has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
orivej has quit [Ping timeout: 240 seconds]
Jarwin is now known as Jarwin
_paul0 has quit [Quit: Leaving]
<KZiemian> phoe: are you here?
markong has quit [Read error: Connection reset by peer]
markong has joined #lisp
uuplusu has quit [Quit: Leaving...]
markong has quit [Read error: No route to host]
margeas has joined #lisp
EvW1 has joined #lisp
nika has quit [Ping timeout: 256 seconds]
igemnace has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
jack_rabbit has quit [Ping timeout: 252 seconds]
igemnace has joined #lisp
Bike has joined #lisp
fikka has quit [Ping timeout: 252 seconds]
Oladon has joined #lisp
<pagnol> I got the impression there's quite a high reliance on global variables in lisp libraries
<shka> pagnol: special variables with global scope
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
fikka has joined #lisp
<beach> pagnol: It is a convenient way of having several parameters without passing them explicitly to each function.
z3t0 has joined #lisp
FreeBirdLjj has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 264 seconds]
z3t0 has quit [Ping timeout: 240 seconds]
EvW1 has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
beaky has quit [K-Lined]
antoszka has quit [K-Lined]
damke_ has quit [Ping timeout: 264 seconds]
margeas is now known as markong
antoszka has joined #lisp
<beach> pagnol: And in most Common Lisp implementations, a binding of a special variable is thread local (the global value is shared). That makes special variables even more convenient.
beaky has joined #lisp
damke has joined #lisp
Tobbi has joined #lisp
Jarwin has quit [Ping timeout: 248 seconds]
<shka> and you can shadow dynamic binding with let
<shka> it is perhaps one of more useful features of lispy languages
<shka> metabang-bind is cool, btw
Colleen has quit [Ping timeout: 240 seconds]
randomstrangerb has quit [Ping timeout: 248 seconds]
<beach> Yes, one of the more useful features, together with CLOS, macros, uniform syntax, reader macros, arbitrary precision integers, exact rationals, programmable reader, compiler available at runtime, packages, symbols, the LOOP macro, FORMAT, compiler macros, etc. etc. :)
marcux has quit [Ping timeout: 240 seconds]
randomstrangerb has joined #lisp
<random-nick> beach: also reader/writer available at runtime
<beach> That's in the "etc." part. :)
Colleen has joined #lisp
orivej has joined #lisp
damke has quit [Ping timeout: 264 seconds]
sz0 has joined #lisp
damke has joined #lisp
Jarwin has joined #lisp
orivej has quit [Ping timeout: 255 seconds]
kajo has quit [Ping timeout: 252 seconds]
<shka> beach: very nice list :D
Jarwin has quit [Ping timeout: 268 seconds]
Ven`` has joined #lisp
Jarwin has joined #lisp
Oladon has quit [Quit: Leaving.]
Amplituhedron has joined #lisp
weltung has joined #lisp
rumbler31 has quit [Remote host closed the connection]
damke has quit [Ping timeout: 264 seconds]
damke has joined #lisp
Amplituhedron has quit [Read error: Connection reset by peer]
turkja has quit [Ping timeout: 248 seconds]
rumbler31 has joined #lisp
damke has quit [Ping timeout: 264 seconds]
Oladon has joined #lisp
Amplituhedron has joined #lisp
damke has joined #lisp
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Murii has quit [Quit: WeeChat 1.4]
Ven`` has joined #lisp
Murii has joined #lisp
nika has joined #lisp
_8hzp has quit [Ping timeout: 252 seconds]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Amplituhedron has quit [Ping timeout: 264 seconds]
emaczen has joined #lisp
<tfb> shka: I repeatedly find myself having to *implement* dynamic binding in other languages.
<shka> tfb: ikr
<shka> dynamic bindings are just very, very useful
<shka> in some cases, are perhaps just the right thing
<pagnol> is there something like (defun always (x) (lambda (_) x)) anywhere?
<pagnol> in lisp
<shka> pagnol: curry identity
fourier has joined #lisp
<shka> for instance, i can't imagine anything better for *output* stream
<shka> pagnol: if you are not using alexandria, quickload it, then (alexandria:curry #'identity x) will do the trick
<pagnol> ah alexandria has a CURRY function
<pagnol> thanks
<pagnol> nice
<sonologico> pagnol: doesn't constantly do this?
<pagnol> I didn't know constantly
<shka> oh, forgot about constantly
DeadTrickster has quit [Read error: Connection reset by peer]
<pagnol> sonologico, that seems to be what I want, thank you
DeadTrickster has joined #lisp
<sonologico> pagnol: the resulting function accepts more combinations of arguments than what you wrote, but it does the trick
<pagnol> does anyone have a recommendation for a simple logging library?
<Shinmera> Verbose
<Shinmera> A very biased recommendation I must say.
JonSmith has joined #lisp
<Shinmera> And it's simple to use, but not necessarily simple in what it does.
<Shinmera> The simplest logging library in terms of what it does is FORMAT
damke has quit [Ping timeout: 264 seconds]
jack_rabbit has joined #lisp
<Xach> uh
<Xach> phew
KZiemian has quit [Ping timeout: 260 seconds]
Ven`` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Shinmera> Xach: Something wrong?
damke has joined #lisp
bgardner has quit [Ping timeout: 260 seconds]
DeadTrickster has quit [Read error: Connection reset by peer]
<dmiles> Does anyone know how to get clisp to remember history between sessions with rlwrap?
<dmiles> (note, rlwrap disables tself since clisp already uses readline)
DeadTrickster has joined #lisp
<dmiles> (so checking to see if anyone made clisp disable its readline and forced rlwrap to takeover or suppliment)
<shka> dmiles: why not just use good old slime?
<dmiles> sorry.. i think i found a few docs on doing this
<Xach> Shinmera: reading backscroll, urgently waiting to read CONSTANTLY
<Shinmera> Xach: heh
<dmiles> Shinmera: it is because i need to run sbcl,ecl,clisp,abcl in aunified history
<Shinmera> Slime keeps a repl history too
<dmiles> right on
randomstrangerb has quit [Ping timeout: 255 seconds]
asarch has joined #lisp
randomstrangerb has joined #lisp
<asarch> Best wishes to all of you. Happy new year! o/
<loli> I have a question how best to represent an ADT for CLOS
<loli> the issue I run into is that I make a few structs to model the type, and I terminate the structure on a symbol
<loli> but the issue is that symbols don't really play nice when trying to defmethod as other data structures end on a symbol and there would thus be a conflict
<loli> here is an example of what I'm talking about
<loli> Is there a better way to form such a type?
JonSmith has quit [Remote host closed the connection]
<Xach> loli: what do you mean when you write that "symbols don't really play nice"?
<loli> well if I tried to do (defmethod foldr (f x (empty symbol))
JonSmith has joined #lisp
<loli> this method will now pop up on every symbol instance
<Xach> loli: instead you would do (defmethod foldr (f x ((empty (eql :empty)))) ...)
<shka> loli: (eql :empty)
<Xach> sorry, i have added too many layers
<loli> you can do that}
<Xach> (empty (eql :empty))
<Xach> yes
<loli> awesome
<loli> that helps me out a lot
<Xach> i live to serve
<loli> as a lot of my data structures end up this way
<shka> it is surprisingly useful as well
<shka> for expandable macros and stuff
<Xach> so useful
DeadTrickster has quit [Read error: Connection reset by peer]
DeadTrickster has joined #lisp
<loli> expandable macros?
<shka> macros that allow to add new functionalities to it
<loli> ahh
<shka> metabang-bind for instance
<loli> g! was rather nice
<loli> I took inspiration from that and made s! for automatic semaphore injection
<loli> was rather nice to design
JonSmith has quit [Ping timeout: 248 seconds]
fluke` has joined #lisp
Tobbi has joined #lisp
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
vap1 has joined #lisp
JuanDaugherty has quit [Quit: Ex Chat]
vaporatorius has quit [Client Quit]
bgardner has joined #lisp
smurfrobot has joined #lisp
formerly has joined #lisp
ebrasca has left #lisp ["ERC (IRC client for Emacs 25.2.1)"]
Oladon has quit [Quit: Leaving.]
smurfrobot has quit [Ping timeout: 250 seconds]
danii20 has joined #lisp
nowhere_man has joined #lisp
danii20 has quit []
Tko has joined #lisp
nowhere_man has quit [Ping timeout: 248 seconds]
formerly has quit [Ping timeout: 256 seconds]
slyrus has joined #lisp
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
attila_lendvai1 has joined #lisp
attila_lendvai has quit [Disconnected by services]
attila_lendvai1 has joined #lisp
attila_lendvai1 has quit [Changing host]
slyrus has quit [Remote host closed the connection]
nika has quit [Quit: Leaving...]
<emaczen> SBCL from the debugger with SLIME won't find my sources with M-. or v -- what should I try?
Jarwin has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
nowhere_man has joined #lisp
emaczen has quit [Remote host closed the connection]
epony has quit [Quit: QUIT]
<beach> Do you have a high DEBUG setting?
zulu_inuoe_ has joined #lisp
aindilis has quit [Read error: Connection reset by peer]
fourier has quit [Ping timeout: 272 seconds]
zulu_inuoe has quit [Ping timeout: 248 seconds]
pjb has joined #lisp
emaczen has joined #lisp
<beach> emaczen: Do you have a high DEBUG setting?
<emaczen> I think it is set to 0
<beach> That might explain it then.
<emaczen> beach: I will try it out and see
<beach> I have this in my .sbclrc: (declaim (optimize (speed 0) (debug 3) (safety 3)))
<beach> It is unfortunate that SBCL is not delivered with these values as the default.
<beach> Lots of people just use the default values, and waste a lot of time trying to debug their code with insufficient information generated by the compiler.
<emaczen> beach: I have been using CCL to debug since it seems to by default always give me a lot of information in the debugger haha
<beach> Yes, I see.
<beach> So you are one more victim of SBCL's default values.
<rumbler31> beach: how would you go about triggering a recompilation once you want to change those values?
<beach> rumbler31: I guess use :FORCE T with ASDF.
slyrus has joined #lisp
<emaczen> beach
<emaczen> beach: It still won't show me local variables
<emaczen> It is showing me local variables for SBCL code but not my own
cross_ has joined #lisp
cross_ is now known as cross
fourier has joined #lisp
dieggsy has joined #lisp
emaczen has quit [Remote host closed the connection]
epony has joined #lisp
epony has quit [Max SendQ exceeded]
krwq has joined #lisp
fourier has quit [Ping timeout: 272 seconds]
epony has joined #lisp
<parjanya> beach: what does optimize do? my google powers fail me
smurfrobot has joined #lisp
<Bike> clhs optimize
krwq has quit [Remote host closed the connection]
<parjanya> ah, I thought it was sbcl specific. tx!
smurfrobot has quit [Ping timeout: 256 seconds]
SqREL has joined #lisp
krwq has joined #lisp
krwq has quit [Remote host closed the connection]
krwq has joined #lisp
krwq has quit [Remote host closed the connection]
krwq has joined #lisp
fourier has joined #lisp
krwq has quit [Remote host closed the connection]
<pagnol> I've begun littering my code with check-type and assert... presumably this is a very unidiomatic style in cl?
krwq has joined #lisp
<Bike> eh, it's ok.
krwq has quit [Remote host closed the connection]
krwq has joined #lisp
<pjb> pagnol: not at all.
<pjb> pagnol: check-type is what you should use (instead of declare type), in ALL your public functions!
<pjb> and assert can be used as much as you want.
random-nick has quit [Remote host closed the connection]
jack_rabbit has quit [Ping timeout: 248 seconds]
random-nick has joined #lisp
<_death> for some definition of "public"
varjag has joined #lisp
jack_rabbit has joined #lisp
random-nick has quit [Remote host closed the connection]
<pagnol> pjb, thanks, that's very comforting ;-)
<pagnol> presumably sbcl takes advantage of check-type occurrences?
<pjb> Of course. The post condition of check-type is that the place is bound to an object of the given type.
<_death> I think with the python compiler one of the big things was also the converse, that type declarations can perform as type checks (forget safety 0)
<Xach> pagnol: adding lots of checks makes it harder to change things in the future. sometimes that's not very important.
damke_ has joined #lisp
<pjb> Also, (defmacro disable-assert (&body body) `(macrolet ((assert (&rest args) 'nil)) ,@body)) (#+want-assert progn #-want-assert disable-assert …)
damke has quit [Ping timeout: 246 seconds]
<pjb> err, nope. Forbidden by 11.1.2.1.2 (and not allowed by 11.1.2.1.2.1)
<pjb> You would have to use your own macro, not cl:assert. This allows you to globally enable or disable checks if you want that too.
<_death> (:use "COMMON-LISP-WITHOUT-SAFETY-NET")
<pjb> Yes.
<makomo> pjb: lol, i thought for a second that string of numbers was a version number. phew...
<pjb> It's a famous section.
terpri has quit [Remote host closed the connection]
EvW has joined #lisp
epony has quit [Quit: QUIT]
randomstrangerb has quit [Ping timeout: 240 seconds]
drcode has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 248 seconds]
randomstrangerb has joined #lisp
EvW has quit [Ping timeout: 250 seconds]
terpri has joined #lisp
d4ryus1 is now known as d4ryus
DeadTrickster has quit [Read error: Connection reset by peer]
sabrac has quit [Remote host closed the connection]
DeadTrickster has joined #lisp
fourier has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
markong has quit [Quit: Konversation terminated!]
markong has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
attila_lendvai1 has quit [Ping timeout: 272 seconds]
Karl_Dscc has quit [Ping timeout: 240 seconds]
smurfrobot has joined #lisp
random-nick has joined #lisp
Karl_Dscc has joined #lisp
QualityAddict has joined #lisp
python476 has quit [Read error: Connection reset by peer]
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
orivej has joined #lisp
t0adst00l has quit [Remote host closed the connection]
t0adst00l has joined #lisp
parjanya has quit [Remote host closed the connection]
jack_rabbit has quit [Ping timeout: 248 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
parjanya has joined #lisp
fourier has joined #lisp
<pagnol> is there anything wrong with having a macro that creates a new class?
Kevslinger has quit [Quit: Connection closed for inactivity]
<fourier> no
<_death> no, but sometimes this suggests that a mop-based approach may be appropriate
<fourier> it is what happens for example in Rainer Joswig's dsl-in-lisp video
<pagnol> _death, what's a mop-based approach?
<pagnol> fourier, thanks for the reference
Kevslinger has joined #lisp
<_death> pagnol: mop = metaobject protocol, which gives a way of introspecting and extending CLOS
sz0 has quit [Quit: Connection closed for inactivity]
<pagnol> _death, ah, thanks, that's an aspect of lisp I haven't investigated at all yet
<pagnol> so this is what the book 'The Art of the Metaobject Protocol' is about
<_death> yes
<pagnol> I've seen it on amazon so many times without knowing what it's about
jack_rabbit has joined #lisp
<pagnol> is the book still a good introduction to the topic?
<_death> to me it showed how simple CLOS is at the core
<pagnol> almost three decades after its publication
<shka> the art of metaobject protocol is the best book about MOP present
<_death> it is _the_ book about the topic :)
<fourier> pagnol: dont forget nothing changes in the common lisp standard world
<shka> it is good read for anyone interested in MOPs of any kind
<fourier> so the old book is not necessarily bad
<shka> not just CLOS mop
weltung has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shka> smalltalk, ruby, even python
<_death> I also really like its cover ;)
<shka> though python mop is weird
<shka> yes
<shka> even if you don't like the book, it looks pretty
<shka> that's great :P
<_death> with the three authors reflecting to create the light of the lambda
<pagnol> ok I just went to the bookstore and am going to begin reading
weltung has joined #lisp
EvW1 has joined #lisp
<shka> pagnol: good
<pagnol> I only have lynx so can't watch the video
Tobbi has joined #lisp
<shka> use mplayer, pagnol
<aeth> pagnol: Macros can easily cause problems and unreadable code, but imo there are three common patterns that are very safe to stick with: define-foo, do-foo, and with-foo. (There are some uncommon ones that are safe, too, like foof, similar to incf or decf, that can be defined trivially via define-modify-macro.)
<aeth> Pretty much everyone should be able to read these, especially if you stay close to similar APIs.
<aeth> If you're talking about a define-foo, that appears all of the time. Sometimes it appears as "deffoo" if foo is one word, but please don't do that. Tools like emacs only recognize define-* and built in def* like defun, so your form won't stand out as a define.
Oladon has joined #lisp
<aeth> define-foos are global, though, so that might not be what you're talking about.
<aeth> For local bindings or creation without bindings, it gets a bit more complicated.
<aeth> (Can classes be defined locally in CL?)
<Bike> not lexically.
<Bike> you could do a dynamic binding deal with setf and unwind-protect, though it would be dumb as hell and inconvenient besides.
<pagnol> I was going to set up a macro that creates a global class
<pagnol> or just a class
<pagnol> to be used globally..
earl-ducaine has quit [Remote host closed the connection]
earl-ducaine has joined #lisp
TCZ has joined #lisp
<Bike> expanding into defclass is fine and normal
fittestbits has joined #lisp
<pagnol> Bike, it's comforting to know I was not on the wrong track altogether
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
angavrilov has quit [Remote host closed the connection]
<shka> well
<shka> try to not write macros
<shka> or at the very least don't write macros were function will do, or you will use it just a couple of times
<_death> you can use the mop's ensure-class to create classes, incl. anonymous classes
<pjb> pagnol: well configured, lynx should be able to show videos in ascii art.
<aeth> What does lynx offer over elinks?
Tristam has joined #lisp
<fourier> is where a nice tutorial on CFFI-Grovel ?
<aeth> ah, lynx is still getting updates.
<fourier> or how to create a C file accompanying my lisp code (if I want to implement just one function in C)
kajo has joined #lisp
<_death> the cffi manual?
<fourier> its kinda really brief on it.
random-nick has quit [Quit: quit]
random-nick has joined #lisp
<fe[nl]ix> fourier: take a look at iolib
<aeth> Yeah, look at a library that uses it.
<aeth> And be prepared to M-. a lot.
<fourier> fe[nl]ix: thanks, looking into i
<fourier> t
fikka has joined #lisp
fourier has quit [Ping timeout: 252 seconds]
smurfrobot has quit [Remote host closed the connection]
makomo has quit [Ping timeout: 264 seconds]
shka has quit [Ping timeout: 252 seconds]
fikka has quit [Ping timeout: 268 seconds]
Firedancer_ has joined #lisp
alexmlw has quit [Read error: Connection reset by peer]
Firedancer has quit [Ping timeout: 264 seconds]
misv has quit [Ping timeout: 264 seconds]
misv has joined #lisp
groovy2shoes has quit [Ping timeout: 265 seconds]
groovy2shoes has joined #lisp
smurfrobot has joined #lisp
quazimodo has joined #lisp
smurfrobot has quit [Ping timeout: 248 seconds]
makomo has joined #lisp
kupad has quit [Ping timeout: 268 seconds]
jstypo has joined #lisp
fikka has joined #lisp
Murii has quit [Quit: WeeChat 1.4]
kupad has joined #lisp
markong has quit [Read error: Connection reset by peer]
weltung has quit [Ping timeout: 240 seconds]
<fiddlerwoaroof> I generally like def* more than define-*, editors are programmable for a reason: you should bend the editor to your workflow, not your workflow to the editor.
<Shinmera> I generally like define-* more than def* and feel it's easier to read and a better convention, so I'm perfectly fine with the editor pushing people in that direction.
<_death> CL itself is inconsistent with this naming.. I just picked one (define-)
notzmv has joined #lisp
wxie has joined #lisp
<fe[nl]ix> it's def* if it qualifies a single word, define-* if it's two words
<fe[nl]ix> the only exception if define-condition, so that's pretty ocnsistent
<fiddlerwoaroof> fe[nl]ix: yeah, that's more or less how I think.
<Shinmera> That's still a 1/6
SqREL has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<fiddlerwoaroof> I generally don't find def* less easy to read, since prefixes are pretty normal in ordinary languages
safe has joined #lisp
<fiddlerwoaroof> And, define- is a bit too verbose for the amount of work it does, to my taste
<Shinmera> Pshaw
<Shinmera> People try to skimp on name length too much
<aeth> Common Lisp the standard has plenty of archaic styles because it does not break backwards compatibility. That doesn't mean that the older APIs should be emulated. e.g. if you're doing a sequence accessor, copy elt or aref, not nth (and the reason is because there might be more than one index, like in aref, which requires the sequence to come first)
<phoe> defdef
<phoe> and you're good to go
josemanuel has quit [Quit: leaving]
<aeth> (Sorry, I should clarify that aref is only a sequence accessor when it's a 1D array, but that was not really the point with my example.)
lnostdal has quit [Ping timeout: 256 seconds]
lnostdal has joined #lisp
damke has joined #lisp
sword has quit [Remote host closed the connection]
<_death> fe[nl]ix: interesting observation.. but not sure I've seen evidence for the existence of such a convention.. if it did exist, I suppose CLOS authors found a loophole.. just shorten the term to one word and we can use defgeneric :)
sword has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
dieggsy has quit [Remote host closed the connection]
<pjb> In-extenso names are all nice and well, but it often occurs that you have to write formula and that you need concision there, to ease readability, just because it's very much harder to read a formula with a lot of references to the same names when they're long and furthermore, when they have common prefixes! This is why there is LET, FLET and MACROLET.
<pjb> Said otherwise, when you define APIs, use long and explicit names. When you use APIs, wrap them around in your own short names.
<aeth> cliki currently just treats define-foo and deffoo as two conventions.
<pjb> not deffoo, defoo.
<pjb> defbar defoo.
<pjb> defun, not deffun.
<aeth> that's even worse :-p
<aeth> Apparently some people want to turn Lisp into English
<aeth> I want to escape natural languages and their irregularities when I program
<pjb> aeth: it's not worse, again, it's historic: there are not 2 prefixes, but 3! DE DEF and DEFINE-
<pjb> In a lot of lisps, you used just DE to define stuff.
random-nick has quit [Remote host closed the connection]
TCZ has quit [Quit: Leaving]
<_death> I think GOO used (df ...) (dm ...) etc.
<aeth> Well, that's wasteful of them, just use d
orivej has quit [Ping timeout: 272 seconds]
<pfdietz> d-notational
<Shinmera> Just leave the define prefix out entirely, if it's a top-level form it's a definition anyway :^)
smurfrobot has joined #lisp
<Xach> heh
<fiddlerwoaroof> Lispy DSLs seem to like going that route...
<phoe> Shinmera: actually I don't obey this
<Shinmera> phoe: Please don't take my jokes seriously, tia
<phoe> Shinmera: (:
pierpa has joined #lisp
jstypo has quit [Ping timeout: 268 seconds]
<fe[nl]ix> _death: it's an old-time Lisp convention, it doesn't surprise me that they didn't think necessary to document it
<fe[nl]ix> compare DEFSETF <-> DEFINE-SETF-EXPANDER
wxie has quit [Quit: Bye.]
smurfrobot has quit [Remote host closed the connection]
<_death> fe[nl]ix: could very well be, since it's similar to the P convention
<_death> fe[nl]ix: but then I also deviate from the latter convention and stick with -P :)
Kaisyu has joined #lisp
DeadTrickster has quit [Read error: Connection reset by peer]
DeadTrickster has joined #lisp
Amplituhedron has joined #lisp
<aeth> The p convention is documented in many places.
<_death> yep
<aeth> It has the same issue, though. You can't teach tools that "foop" is supposed to be handled the same as "foo-p" or "foo?" instead of like a word "foop".
jstypo has joined #lisp
<aeth> Although I'm not aware of any tools that care.
<_death> when dealing with conventions nothing is perfect ;)
Oladon has quit [Quit: Leaving.]
quazimodo has quit [Ping timeout: 240 seconds]
EvW1 has quit [Ping timeout: 240 seconds]
<phoe> ah ha ha ha ha
<phoe> LZMA-DECODE is the C function
<phoe> LZMA-DECOMPRESS is the Lisp wrapper
<phoe> I was decompressing 310 tiny LZMA archives as a benchmark
<phoe> looks like I need to optimize this a little bit
<phoe> since decompressing 600kB worth of archives probably shouldn't cons half a gigabyte of memory