jackdaniel 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.5.4, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
fsmunoz has quit [Ping timeout: 268 seconds]
Kundry_Wag has joined #lisp
cosimone has quit [Quit: Quit.]
georgie has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
sellout-1 has joined #lisp
sellout- has quit [Ping timeout: 276 seconds]
sjl has joined #lisp
vms14 has joined #lisp
shangul has quit [Ping timeout: 240 seconds]
<vms14> how can I make a shorthand for hunchentoot?
<vms14> I have this
<vms14> (defmacro route (url (&key (type "text/html") parameters) &body content)
<vms14> (setf (tbnl:content-type*) ,type)
<vms14> `(tbnl:define-easy-handler (,(gensym) :uri ,url) (,@parameters)
<vms14> ,@content))
<vms14>
<vms14> and I call it with (route "/" () (format nil "~a~a" (header) (body (select "posts"))))
<vms14> but it's wrong and I don't know why
<vms14> it's for the parameters define-easy-handler is expecting?
<no-defun-allowed> Have you tried macroexpanding it?
<vms14> nope, I'll look
<vms14> ty
<no-defun-allowed> (Also, I probably wouldn't count on TBNL sticking, it's literally To Be Named Later, and it has been named.)
<vms14> yeah, but is shorter
<vms14> xD
shangul has joined #lisp
<no-defun-allowed> You could use a package-local nickname now, unless you have some weird targets.
<vms14> oh, it works
<no-defun-allowed> Or you could use the package if it really bothers you, since Hunchentoot isn't going to change much soon, but that is still bad form to some people.
<vms14> I've put header instead of head
<vms14> right
<vms14> I need to learn more about common lisp packages
<vms14> I know basic stuff but I need more
<vms14> I went to perl, and now returning to lisp, so it's like starting again
lavaflow has quit [Ping timeout: 258 seconds]
georgie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<vms14> and I should learn more about hunchentoot instead of use the easy handler
<aeth> Speaking of packages, I think cl-documents is what I might call my Markdown->HTML library (and main package) since it'll stay strictly in the realm of text files (i.e. documents) rather than binary files (e.g. opticl with image files)
<aeth> or maybe cl-document (singular) because then that's also a form of the verb "to document", so it would be a wordplay on its primary purpose, documentation
<aeth> I'm half tempted to use trivial- instead of cl- because I suspect that it will grow into something nontrivial over time, so it would be funny to have the trivial- prefix.
<vms14> aeth: fork it before it grows if the trivial one does not have exactly what you want
<vms14> so you'll have something you're happy forever
makomo_ has quit [Ping timeout: 240 seconds]
t58 has quit [Quit: Leaving]
makomo_ has joined #lisp
Nomenclatura has quit [Quit: q]
lucasb has quit [Quit: Connection closed for inactivity]
vms14 has quit [Remote host closed the connection]
lavaflow has joined #lisp
bitmapper has quit [Read error: Connection reset by peer]
bitmapper has joined #lisp
superkumasan has joined #lisp
semz has quit [Ping timeout: 264 seconds]
atomik has joined #lisp
atomik_dog has quit [Ping timeout: 276 seconds]
makomo_ has quit [Ping timeout: 276 seconds]
semz has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
liberiga has joined #lisp
Frobozz has quit [Read error: Connection reset by peer]
jeosol has joined #lisp
Frobozz has joined #lisp
wxie has joined #lisp
georgie_ has joined #lisp
ravenousmoose has joined #lisp
ravenousmoose has quit [Ping timeout: 276 seconds]
_whitelogger has joined #lisp
wxie has quit [Remote host closed the connection]
georgie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fragamus has quit [Ping timeout: 245 seconds]
abhixec has joined #lisp
pjb has joined #lisp
pjb` has joined #lisp
pjb` has quit [Client Quit]
pjb has quit [Client Quit]
pjb has joined #lisp
karlosz has joined #lisp
fragamus has joined #lisp
georgie has joined #lisp
ravenousmoose has joined #lisp
sellout-1 has quit [Quit: Leaving.]
bitmapper has quit [Ping timeout: 245 seconds]
georgie has quit [Quit: Textual IRC Client: www.textualapp.com]
Bike has quit [Quit: Lost terminal]
permagreen has quit [Remote host closed the connection]
permagreen has joined #lisp
aleamb__ has joined #lisp
aleamb__ is now known as aleamb
malpas has quit [Ping timeout: 258 seconds]
pfdietz has quit [Remote host closed the connection]
_whitelogger has joined #lisp
sellout- has joined #lisp
karswell has joined #lisp
stepnem_ has quit [Ping timeout: 245 seconds]
krid has quit [Remote host closed the connection]
karswell has quit [Read error: Connection reset by peer]
ravenousmoose has quit [Ping timeout: 276 seconds]
rippa has joined #lisp
<beach> Good morning everyone!
Ricchi has quit [Remote host closed the connection]
tourjin has joined #lisp
<tourjin> I opened emacs ctrl+x 3 . and compiled ctrl+c ctrl+c then error occured . left windows shows the errors. but how can I go back to original file?
<no-defun-allowed> Press q on the error window.
<tourjin> oh. thank you.
superkumasan has quit [Ping timeout: 268 seconds]
Kundry_Wag has joined #lisp
ahungry has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
gravicappa has joined #lisp
<tourjin> in my file I wrote a defparameter on first line. then I wrote a defun using that parameter . but if I compile it . error says undefined variable: *MYVAR*. is slime different from writing in command line?
shangul has quit [Ping timeout: 240 seconds]
<aeth> tourjin: are you sure both are *MYVAR*?
<tourjin> yes
<tourjin> hm.. I found something
<tourjin> if I move cursor on that line and ctrl +c ctrl + c . then it runs.
<tourjin> is this normal?
jiny has joined #lisp
tourjin has quit [Read error: Connection reset by peer]
aindilis has joined #lisp
jiny is now known as tourjin
<pjb> tourjin: C-c C-c only compiles 1 defun. Having stuff in buffers, or even in files doesn't help at all.
<pjb> tourjin: use C-c C-k to compile the whole file.
<tourjin> hm.. ctrl+c ctrl+c just compiles one line or one block where the cursor is . is this normal?
<tourjin> oh yes pjb i found it now.
<tourjin> ok c-c c-k
<tourjin> thank you. that was what i'm looking for.
<pjb> tourjin: it's not lines or blocks, it's s-expressions.
<tourjin> how do u memorize the whole keywords? C-c C-c , I can figure it out it's a acronym of compile. what does k stand for?
<beach> tourjin: You don't. Your fingers will remember at some point and you no longer have to think about it.
<beach> tourjin: And please don't use abbreviations such as "u" for "you". Turn on your abbrev processor.
<tourjin> thank you pjb you remind me i have a lot of docs to read. I don't get what s-expressions means. i see . i shoud'nt use 'u'. thank you. by the way it's not abbrev processor. I even don't know how to use abbrev processor in irc. it was me who typed 'u'. :-)
<aeth> C-c C-c is for Command: Compile function. C-c C-k is for Command: Kompile file, since C was taken. at least, that's my justification, who knows what the authors thought?
<aeth> s/Compile function/Compile form/
shangul has joined #lisp
Lord_of_Life has quit [Ping timeout: 268 seconds]
<tourjin> I think that's a good tip for justification of compile and kompile. thank you aeth
Lord_of_Life has joined #lisp
<beach> tourjin: If you use a decent program for IRC, such as ERC for Emacs, it will have an abbrev processor, so that you can define abbreviations. For example, you can make "u" expand to "you" automatically every time you type it as a word.
<beach> tourjin: I never type "Good morning everyone!" for instance. I just type "gme".
<beach> tourjin: Not only does it save a lot of typing. It also means fewer typos.
<tourjin> i see. probably most of you must use irc in emacs. but I'm really really new to emacs or lisp.
vlatkoB has joined #lisp
<beach> Then I guess you just have to do it the hard way, i.e. type everything out. Oh, the pain that people inflict on themselves by using mediocre tools.
<tourjin> I would have'nt thought about irc if it was easy to find informations on lisp. now I get there was full of online documents out there and experts who will give me tips for solutions as much as even I can't comsume. thank you.
karlosz has quit [Quit: karlosz]
liberiga has quit [Ping timeout: 260 seconds]
<aeth> I don't use IRC in Emacs because I prefer having it in a separate program. I think I might be in the minority, though. I don't even use IRC locally, I ssh into a server and have a terminal IRC running in tmux.
<beach> aeth: But I am sure it has an abbrev processor, right? I mean, you know to choose your tools.
<pjb> aeth: you can use a different emacs instance for erc, if you prefer it in a separate process.
<pjb> aeth: this is what I used to do, because of network delays: one emacs to program, one emacs for erc, and one emacs for gnus.
<pjb> But nowadays, I just have one emacs for all.
raghavgururajan has joined #lisp
ggole has joined #lisp
<aeth> pjb: I would if I did, even if I ran IRC locally.
<LdBeth> Good evening
<beach> Hello LdBeth.
sauvin has joined #lisp
<aeth> pjb: I often restart emacs several times a programming session mainly because that's the easiest way to close a bunch of buffers
<beach> As far as I am concerned, people are free to inflict pain on themselves by using mediocre tools, but they shouldn't export that pain to others by (say) showing badly indented code or exposing unexpanded abbreviations such as "u".
tourjin has quit [Ping timeout: 268 seconds]
<thijso> I use irssi as my IRC client, mainly for historical reasons... And indeed, I have it running on a separate machine inside a screen
<thijso> Good morning btw
<beach> Hello thijso.
<aeth> thijso: I used screen+irssi for a very long time when I switched to Linux a very long time ago, but I evnetually upgraded to tmux+irssi because of the superiority of tmux
<aeth> *eventually
<pjb> aeth: (defun kill-all-buffers () (interactive) (dolist (buffer (buffer-list)) (kill-buffer buffer)))
verisimilitude has left #lisp ["ERC (IRC client for Emacs 24.5.1)"]
dddddd has quit [Remote host closed the connection]
<thijso> aeth: screen does what I need it to do. I've heard of tmux and have this idea to check it out one of these days. Like for a couple of years, now... ;)
jiny has joined #lisp
jiny is now known as tourjin
<jeosol> Good morning all
<thijso> Is there a (semi-)convention for marking function names internal/external/exported and such? I've seen, for example #make-thread in bordeaux-threads, but that's mainly to distinguish it from other make-threads, I think?
<thijso> sorry, it was %make-thread, not #
<thijso> morning, jeosol, btw
<thijso> much too early morning, in fact...
<Shinmera> Just don't export it
<Shinmera> The % is typically for functions that are closely tied to some other context and are thus "extremely internal"
<thijso> Shinmera: yeah, obviously, but it's more a style thing I had in my mind. But there isn't really, probably
<thijso> Right
<thijso> Well, I basically have something now where I have an internal function that logically should have the same name as an external one
<thijso> I'll probably go with % then
<pjb> thijso: you write the name of exported functions explicitely in the :export list of the package. This is the convention.
nanoz has joined #lisp
<jeosol> If I have an image saved from a previous run, and restart sbcl with the core file. I create a new module (defsystem) and tried to load it in and was getting errors. I am able to load the new system elsewhere through (e.g., fresh sbcl)
froggey has quit [Ping timeout: 245 seconds]
froggey has joined #lisp
drot has quit [Quit: Quit.]
drot has joined #lisp
<pjb> jeosol: so what? This morning, I got some raisin I saved, out of the fridge, and a firefly was eaten by a bird in the street.
<pjb> jeosol: try again with: (handler-case (asdf:oos 'asdf:load-op :your-system) (error (err) (prin1 (class-name (class-of err))) (terpri) (princ err) (terpri)))
<jeosol> haha, there you go again. it's not working. I am getting errors
<jeosol> pjb: thanks, let me try that
<pjb> jeosol: you're not getting random errors, you're gettint a very specific error!
<pjb> If you don't take the very specific information from this very specific error into account you won't be able to solve your problem.
<thijso> I think what pjb is getting at is that it helps if you actually tell us exactly *what* errors you're getting, jeosol
<pjb> also, what expression you use to load it.
<jeosol> I use (ql:quickload ...)
<pjb> So: (handler-case (ql:quickload :your-system) (error (err) (prin1 (class-name (class-of err))) (terpri) (princ err) (terpri)))
<jeosol> I get component: name not found.
<jeosol> Thanks. Just a tired now. btw raisin and firefly comment was funny
nanozz has joined #lisp
nanoz has quit [Read error: Connection reset by peer]
<pjb> jeosol: so what component is not found? Is it your system itself?
Boubert has joined #lisp
dale has quit [Quit: My computer has gone to sleep]
<jeosol> Yeah, the system itself, not sure why. I just rebuilt the whole thing again and resaved the image.
Boubert has quit [Client Quit]
t3hyoshi has quit [Ping timeout: 245 seconds]
<pjb> there should be a file named something.asd stored in one directory where quicklisp will search it. For example, in ~/quicklisp/local-projects/
<pjb> The name of the file doesn't need to be related to the name of the system, but it may help humans to retrieve things. So name it: your-system.asd
ahungry has quit [Remote host closed the connection]
raghavgururajan has quit [Remote host closed the connection]
tourjin has quit [Ping timeout: 265 seconds]
raghavgururajan has joined #lisp
shka_ has joined #lisp
shangul has quit [Ping timeout: 258 seconds]
q9929t1 has joined #lisp
liberiga has joined #lisp
q9929t has quit [Ping timeout: 245 seconds]
q9929t1 is now known as q9929t
Necktwi has quit [Ping timeout: 276 seconds]
Necktwi has joined #lisp
shangul has joined #lisp
q9929t1 has joined #lisp
q9929t has quit [Ping timeout: 268 seconds]
q9929t1 is now known as q9929t
tourjin has joined #lisp
raghavgururajan has quit [Read error: Connection reset by peer]
retropikzel has joined #lisp
shangul has quit [Ping timeout: 276 seconds]
_jrjsmrtn has quit [Ping timeout: 240 seconds]
<tourjin> in emacs slime , how can I reuse previous command? upper arrow does'nt work.
fragamus has quit [Ping timeout: 276 seconds]
__jrjsmrtn__ has joined #lisp
<tourjin> hm.. I found it alt+p. everything works with ctrl or alt keys.
q9929t1 has joined #lisp
q9929t has quit [Ping timeout: 276 seconds]
q9929t1 is now known as q9929t
shangul has joined #lisp
fragamus has joined #lisp
fragamus has quit [Ping timeout: 276 seconds]
ralt has joined #lisp
SaganMan has joined #lisp
karlosz has joined #lisp
tourjin has quit [Ping timeout: 265 seconds]
_whitelogger has joined #lisp
fragamus has joined #lisp
makomo_ has joined #lisp
fragamus has quit [Ping timeout: 245 seconds]
Inline has quit [Quit: Leaving]
jonatack has quit [Ping timeout: 276 seconds]
stepnem has joined #lisp
karlosz has quit [Quit: karlosz]
serge has joined #lisp
gravicappa has quit [Ping timeout: 258 seconds]
fragamus has joined #lisp
fragamus has quit [Ping timeout: 268 seconds]
libertyprime has quit [Quit: leaving]
random-nick has joined #lisp
zmyrgel has joined #lisp
<no-defun-allowed> What libraries are there for playing sound?
<Shinmera> cl-out123, harmony, mixalot
<Shinmera> "just cffi to pulse/alsa"
<no-defun-allowed> Tried to cffi to alsa, I can't keep my timing straight apparently, and it sounds terrible.
Lycurgus has joined #lisp
<Shinmera> if your sample production is too slow no audio player is gonna help you.
<MichaelRaskin> Well, if it is fast but non-uniform, one could try to increase bufferisation
<no-defun-allowed> I mean that it's fast enough, but I can't write out bytes at the right time or something that I'm not sure about since I've never tried "realtime" sound production.
<Shinmera> alsa is pretty lenient. You just give it a buffer and tell it how many samples it has.
<no-defun-allowed> I mean (yet again), I can't figure out how long to wait before putting out the next buffer I think? Harmony looks much better, since I don't have to think about that at all.
<Shinmera> You don't need to wait.
<Shinmera> Harmony will work as long as there's no resampling that needs doing
<Shinmera> Been years and I still haven't gotten around to rewriting libmixed to work on ring buffers.
<Shinmera> Sad times.
<no-defun-allowed> If I don't (in ALSA), won't I generate too much into the future and miss any more events that my synthesiser takes?
<Shinmera> No, it'll block if the internal buffer is full.
<no-defun-allowed> Hm, maybe I'll try again without waiting then.
orivej has quit [Ping timeout: 276 seconds]
<Shinmera> Ideally Harmony should do the more sophisticated thing but it was working fine enough (so far)
Ven`` has joined #lisp
null_ptr has joined #lisp
Inline has joined #lisp
<no-defun-allowed> Yeah, I think I'll make Harmony work then.
<no-defun-allowed> Preferably without my goddamn 61-key MIDI keyboard in the way. Thanks for another good library I didn't know about until now.
raghavgururajan has joined #lisp
hiroaki has joined #lisp
Bike has joined #lisp
flazh has quit [Quit: flazh]
flazh has joined #lisp
<Shinmera> I don't know about "good", but thanks
<beach> This discussion reminds me of my plans to write a good FFT library.
<no-defun-allowed> Please just take the compliment.
<no-defun-allowed> Is something wrong with bordeaux-fft?
<beach> That one should never have been released. It is not optimized at all.
jmercouris has joined #lisp
MaiAtusmi has joined #lisp
lucasb has joined #lisp
<no-defun-allowed> Plenty of Lisp things come from Bordeaux, but that factoid is usually shadowed by the somewhat larger wine output.
<MaiAtusmi> Hi, someone can help me with lisp?
<MaiAtusmi> I wrote a code in prolog and I need to do the same in lisp but I can't understand the logic...
<Shinmera> Is this a homework exercise
<MaiAtusmi> Kind of, but I can't understand
<MaiAtusmi> Can you still help me out?
<Lycurgus> no-defun-allowed, ty, but I meant bordeaux itself
<Lycurgus> the threading pkg
isBEKaml has joined #lisp
<no-defun-allowed> Bordeaux is a town in France -- oh, yeah, that's that, but that's not the same as bordeaux-fft.
fsmunoz has joined #lisp
<no-defun-allowed> "FFT" refers to the Fast Fourier Transform, which maps a sample into an approximation of its frequency components.
<MaiAtusmi> The job is to create a regular expression controller to check if it's a regular expression
<beach> And if the Fast Fourier Transform were written to be parallel, it would be PFFT!
<jmercouris> MaiAtusmi: I can continue to help you on this channel, it'll be much easier than the messages on Reddit
<MaiAtusmi> Someone knows how to create a dfa using a Regular expression?
<jmercouris> I'm sure someone knows how to use finite automata, yes, anyone with a CS degree should, and I believe most of us here do have one
<beach> MaiAtusmi: That's well documented.
<Shinmera> I think you should ask your course assistants to help you.
<MaiAtusmi> I asked but all I get is a PDF with what the function do
<jmercouris> It's September again, and I think we should be friendly
maxxcan has joined #lisp
<pjb> To check if a string is a regular expression, you only need a parser.
<jmercouris> I think the goal is to check if the regular expression is a valid and logical expression
q9929t has quit [Quit: q9929t]
<jmercouris> I basically had said to the user that they should make a function called is-valid-transition or something like that with a list of acceptable state transitions and then iterate through all of the chars in the regex string checking to see if all transitions are valid
<jmercouris> Lycurgus: that's the only documentation I've ever seen, there is also some stuff in the Lisp Cookbook
jiny has joined #lisp
<MaiAtusmi> @pjb I'm trying to create a NFA and use that
<MaiAtusmi> How can I?
<jmercouris> it depends, must your NFA NOT be a DFA, or is it also allowed to be a DFA?
<beach> MaiAtusmi: All that stuff is very well documented. I suggest you go read the relevant documents.
<jmercouris> Also, I'm afraid that this is no longer really a Lisp question, so I can't help you, this is more of a core computer science concepts thing, which I don't think you understand. First you must understand the concepts before the implementation
jonatack has joined #lisp
<MaiAtusmi> Just a NFA
<MaiAtusmi> I'm reading it... But I can't understand how to create an NFA from a RE
<no-defun-allowed> Wikipedia mentions "Thompson's construction" which sounds just like that.
jonatack has quit [Client Quit]
jonatack has joined #lisp
<beach> MaiAtusmi: That is off topic for this channel. You should look elsewhere for help.
<MaiAtusmi> Even if I need to write it in lisp?
<no-defun-allowed> I think it's more of a CS theory problem than a Lisp problem until you start implementing it, but I don't know anything about DFA and regular expressions (bar cl-ppcre) so I can't say.
<jmercouris> the only thing I know about regex is that it is the worst idea ever concieved
<jmercouris> it comes from the kind of people who think ed is a good editor, and mastering awk is a fantastic idea
<no-defun-allowed> The only thing I can think of is "lol no recursion"
<Lycurgus> jmercouris, ty!
Inline__ has joined #lisp
<pjb> MaiAtusmi: @nick doesn't work here. Use the convention used by everybody else! nick:
Inline__ has quit [Read error: Connection reset by peer]
Inline has quit [Ping timeout: 264 seconds]
<pjb> MaiAtusmi: basically, each node in the regexp parse tree corresponds to some subgraph of your final NFA/DFA. It's rather trivial to build it. Then you can use NFA/DFA theory to normalize and simplify it.
Inline has joined #lisp
<MaiAtusmi> Oh okay
<MaiAtusmi> Because I think i need 3 functions
<MaiAtusmi> (is-regexp RE) => true if its a regular expression
<MaiAtusmi> (nfa-regex-comp RE) => return the automa if RE is correct, if not NIL
<MaiAtusmi> (nfa-check FA Input) => return True or False
<MaiAtusmi> FA is just (nfa-regex-comp RE)
MaiAtusmi has quit [Remote host closed the connection]
MaiAtusmi has joined #lisp
MaiAtusmi has quit [Remote host closed the connection]
fragamus has joined #lisp
scymtym has joined #lisp
fragamus has quit [Ping timeout: 276 seconds]
gareppa has joined #lisp
ralt has quit [Quit: Connection closed for inactivity]
v0|d has joined #lisp
vaporatorius has quit [Read error: Connection reset by peer]
emacsomancer has quit [Read error: Connection reset by peer]
nowhereman has quit [Ping timeout: 276 seconds]
vaporatorius has joined #lisp
vaporatorius has quit [Client Quit]
nika has joined #lisp
jmercouris has quit [Remote host closed the connection]
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
jiny has quit [Remote host closed the connection]
jiny has joined #lisp
wigust has quit [Quit: ZNC 1.7.4 - https://znc.in]
jiny has quit [Client Quit]
fragamus has joined #lisp
EvW has joined #lisp
fragamus has quit [Ping timeout: 245 seconds]
raghavgururajan has quit [Remote host closed the connection]
gravicappa has joined #lisp
Lycurgus has quit [Quit: Exeunt]
nika has quit [Ping timeout: 276 seconds]
wigust has joined #lisp
makomo_ has quit [Ping timeout: 268 seconds]
makomo_ has joined #lisp
nowhereman has joined #lisp
trafaret1 has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
dddddd has joined #lisp
aleamb has quit [Quit: Leaving]
cosimone has joined #lisp
nowhereman has quit [Read error: Connection reset by peer]
nostoi has joined #lisp
trafaret1 has left #lisp ["ERC (IRC client for Emacs 26.1)"]
<beach> So what I want to do with the FFT is to generate assembly code by executing a Common Lisp program. The optimal number of operations is obtained when the radix is √n for a problem of size n.
<beach> But that is messy, because in order for good code to be generated, the radix must be a constant. So I was thinking of generating a special version of FFT for each power of 2, up to some limit, of course. Then the radix is known statically for each case.
<beach> I also want to use special floating-point instructions that can do several operations in parallel, hence the assembly.
<beach> If shuffling is required, I already have a publication with the world's fastest shuffle algorithm. :)
wigust has quit [Quit: ZNC 1.7.4 - https://znc.in]
wigust has joined #lisp
nowhereman has joined #lisp
wigust has quit [Client Quit]
wigust has joined #lisp
wigust has quit [Client Quit]
<scymtym> beach: are you aware of https://github.com/pkhuong/Napa-FFT ?
<beach> Nope. I'll have a look. Thanks.
wigust has joined #lisp
<beach> So it looks like I don't have to do this after all. One down. Excellent!
wigust has quit [Quit: ZNC 1.7.4 - https://znc.in]
<beach> I must have discussed this with pkhuong at the time, and then I forgot about it.
wigust has joined #lisp
wigust has quit [Client Quit]
wigust has joined #lisp
wigust has quit [Client Quit]
wigust has joined #lisp
q9929t has joined #lisp
nicdev` has joined #lisp
nicdev has quit [Ping timeout: 265 seconds]
nostoi has quit [Quit: Verlassend]
fragamus has joined #lisp
liberiga has quit [Remote host closed the connection]
mason has left #lisp [#lisp]
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
nowhereman has quit [Ping timeout: 245 seconds]
EvW has quit [Ping timeout: 245 seconds]
raghavgururajan has joined #lisp
retropikzel_ has joined #lisp
retropikzel has quit [Ping timeout: 245 seconds]
isBEKaml has quit [Quit: leaving]
wigust has quit [Quit: ZNC 1.7.4 - https://znc.in]
wigust has joined #lisp
wigust has quit [Client Quit]
EvW has joined #lisp
wigust has joined #lisp
nullman has quit [Ping timeout: 240 seconds]
wigust has quit [Client Quit]
wigust has joined #lisp
nullman has joined #lisp
wigust has quit [Client Quit]
wigust has joined #lisp
refpga has joined #lisp
clothespin_ is now known as clothespin
<flip214> minion: Registration, please?
<minion> The URL https://gitlab.common-lisp.net/users/sign_in?secret=60ec7dbd will be valid until 15:15 UTC.
Ven`` has quit [Quit: Textual IRC Client: www.textualapp.com]
xkapastel has joined #lisp
<flip214> minion: Registration, please?
<minion> The URL https://gitlab.common-lisp.net/users/sign_in?secret=edcbb93f will be valid until 15:30 UTC.
gareppa has quit [Quit: Leaving]
nirved has joined #lisp
cosimone has quit [Quit: Terminated!]
cosimone has joined #lisp
EvW has quit [Ping timeout: 250 seconds]
Oladon has joined #lisp
karswell has joined #lisp
anewuser has joined #lisp
fragamus has quit [Ping timeout: 245 seconds]
orivej has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
fragamus has joined #lisp
nanozz has quit [Ping timeout: 265 seconds]
frgo has quit []
raghavgururajan has quit [Remote host closed the connection]
anewuser has quit [Quit: anewuser]
frgo has joined #lisp
t58 has joined #lisp
q9929t has quit [Quit: q9929t]
nanoz has joined #lisp
EvW1 has joined #lisp
Lord_of_Life_ has joined #lisp
varjag has joined #lisp
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life_ is now known as Lord_of_Life
scymtym has quit [Ping timeout: 245 seconds]
varjagg has joined #lisp
danielvu1 has joined #lisp
EvW1 has quit [Remote host closed the connection]
Shinmera- has joined #lisp
Oladon1 has joined #lisp
isoraqathedh_ has joined #lisp
scal_ has joined #lisp
basketha1 has joined #lisp
Bike_ has joined #lisp
funnel_ has joined #lisp
isoraqathedh has quit [Disconnected by services]
isoraqathedh_ is now known as isoraqathedh
skibo_ has joined #lisp
Demosthe1ex has joined #lisp
housel_ has joined #lisp
drot_ has joined #lisp
SumoSud0- has joined #lisp
Remavas_ has joined #lisp
copec_ has joined #lisp
miga has joined #lisp
maxxcan has quit [Quit: maxxcan]
alca_ has joined #lisp
varjag has quit [*.net *.split]
Oladon has quit [*.net *.split]
gravicappa has quit [*.net *.split]
dddddd has quit [*.net *.split]
fsmunoz has quit [*.net *.split]
Bike has quit [*.net *.split]
drot has quit [*.net *.split]
srji has quit [*.net *.split]
sindan has quit [*.net *.split]
keep_learning has quit [*.net *.split]
Demosthenex has quit [*.net *.split]
skibo has quit [*.net *.split]
danielvu has quit [*.net *.split]
baskethammer has quit [*.net *.split]
funnel has quit [*.net *.split]
alca has quit [*.net *.split]
Colleen has quit [*.net *.split]
scal has quit [*.net *.split]
samebchase has quit [*.net *.split]
housel has quit [*.net *.split]
michalisko has quit [*.net *.split]
Intensity has quit [*.net *.split]
copec has quit [*.net *.split]
Shinmera has quit [*.net *.split]
Remavas has quit [*.net *.split]
Ziemas has quit [*.net *.split]
SumoSud0 has quit [*.net *.split]
copec_ is now known as copec
miga is now known as michalisko
Remavas_ is now known as Remavas
funnel_ is now known as funnel
Ziemas has joined #lisp
femi has quit [Ping timeout: 240 seconds]
gravicappa has joined #lisp
samebchase has joined #lisp
sindan has joined #lisp
dddddd has joined #lisp
karswell has quit [Remote host closed the connection]
notzmv has quit [Ping timeout: 240 seconds]
karswell has joined #lisp
srji has joined #lisp
femi has joined #lisp
Oladon1 has quit [Quit: Leaving.]
Intensity has joined #lisp
dale has joined #lisp
vlatkoB has quit [Remote host closed the connection]
<ym> Could somebody verify that xlib:colormap-plist undefined in current quicklisp CLX package?
akoana has joined #lisp
<ym> Well, rgrep verified.
tourjin has joined #lisp
varjagg is now known as varjag
fsmunoz has joined #lisp
makomo_ is now known as makomo
bitmapper has joined #lisp
ravenousmoose has joined #lisp
lxbarbosa has joined #lisp
matijja has joined #lisp
zmyrgel has quit [Remote host closed the connection]
cosimone has quit [Quit: Terminated!]
hiroaki has quit [Ping timeout: 245 seconds]
ravenousmoose has quit [Quit: Textual IRC Client: www.textualapp.com]
serge has quit [Ping timeout: 260 seconds]
eSVG has joined #lisp
eSVG has quit [Remote host closed the connection]
eSVG has joined #lisp
kajo has joined #lisp
karlosz has joined #lisp
fragamus has quit [Ping timeout: 245 seconds]
fsmunoz has quit [Ping timeout: 240 seconds]
fragamus has joined #lisp
scymtym has joined #lisp
matijja has quit [Ping timeout: 265 seconds]
shangul has quit [Ping timeout: 240 seconds]
fragamus has quit [Read error: Connection reset by peer]
karlosz has quit [Quit: karlosz]
retropikzel_ has quit [Remote host closed the connection]
serge has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
shangul has joined #lisp
<remexre> What in-the-spec functions can actually handle paths with wildcards in them?
Lycurgus has joined #lisp
hhdave has joined #lisp
serge has quit [Remote host closed the connection]
Shinmera- is now known as Shinmera
<remexre> and I guess relatedly, if I want to turn a pathname with a wildcard into a list of pathnames that match it, is there a builtin to do so
<nirved> remexre: directory
<remexre> oh, huh, missed that
<remexre> thanks
tourjin has quit [Ping timeout: 265 seconds]
Colleen has joined #lisp
khisanth_ has quit [Ping timeout: 265 seconds]
jlarocco has joined #lisp
makomo has quit [Quit: WeeChat 2.4]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
orivej has joined #lisp
gravicappa has quit [Ping timeout: 264 seconds]
khisanth_ has joined #lisp
Lycurgus has quit [Quit: Exeunt]
d4ryus has quit [Ping timeout: 240 seconds]
nanoz has quit [Ping timeout: 276 seconds]
asdf_asdf_asdf has joined #lisp
shangul has quit [Ping timeout: 240 seconds]
shka_ has quit [Ping timeout: 245 seconds]
karlosz has joined #lisp
fragamus has joined #lisp
cosimone has joined #lisp
refpga has quit [Remote host closed the connection]
d4ryus has joined #lisp
hhdave has quit [Quit: hhdave]
ggole has quit [Quit: Leaving]
fragamus has quit [Remote host closed the connection]
dreamcompiler has quit [Quit: dreamcompiler]
fragamus has joined #lisp
karlosz has quit [Quit: karlosz]
Frobozz has quit [Read error: Connection reset by peer]
<asdf_asdf_asdf> Hi. How it coerce (coerce "1 20 30" 'list) => (list 1 20 30)?
<asdf_asdf_asdf> It generate (list #\1 #\Space #\2 #\0 #\Space #\3 #\0).
<edgar-rft> it coerces a vector of characters (aka string) into a list of characters
<asdf_asdf_asdf> sbcl
<edgar-rft> you want the string "1 20 30" to become the list (list 1 20 30) ?
<asdf_asdf_asdf> Yes.
<edgar-rft> not really clever code -> (read-from-string (concatenate 'string "(list " "1 20 30" ")"))
fragamus has quit [Ping timeout: 245 seconds]
<asdf_asdf_asdf> edgar-rft; this is good practice?
<aeth> no, that's why he said it wasn't really clever
<aeth> it's a messy hack that gets the job done
<aeth> at least for numbers
<asdf_asdf_asdf> Hm..., OK, so which fashion is better?
<aeth> asdf_asdf_asdf: A string is a vector of characters, so it really *is* just a fancy way of saying something similar to #(#\1 #\Space #\2 #\0 #\Space #\3 #\0) which is why you get something like that in list form when you coerce it to a list
cosimone has quit [Quit: Terminated!]
<aeth> asdf_asdf_asdf: if you want something more robust, and your input is *only* integers, then use parse-integer in a loop
<aeth> asdf_asdf_asdf: e.g. (parse-integer "123 456" :junk-allowed t) => (values 123 3)
<aeth> That will tell you that it could parse the integer up to position 3, and it parsed 123. Then you have to keep iterating.
<aeth> The junk-allowed is necessary because you want the "junk" at the end.
<aeth> If your input is something else, then you'll need something even fancier, and edgar-rft's hack solution looks better the more work you'd have to do
fragamus has joined #lisp
<aeth> As an alternative to calling parse-integer with :junk-allowed, you could manually scan for the space separator and use parse-integer with :start and :end keyword arguments. If you use a more general parser from a library, you'd probably have to do this.
<aeth> asdf_asdf_asdf: an example of this second form, which can easily be turned into a loop: (let ((string "7 20 30") (start 0)) (parse-integer string :start start :end (position #\Space string :start start))) => (values 7 1)
<aeth> For something more general than an integer with parse-integer, you'll need another parser, ideally from a library, with the only requirement that it also needs to support :start and :end (any good one should). Alternatively, you can use something like cl-ppcre or split-sequence to split the string on #\Space instead of tracking the start position.
<aeth> asdf_asdf_asdf: I hope that helps!
<aeth> (And if it's just a throwaway script, there's nothing wrong with using edgar-rft's much simpler, but inelegant, solution)
Tordek has quit [Ping timeout: 244 seconds]
ft has quit [Ping timeout: 244 seconds]
nirved has quit [Quit: Leaving]
ft has joined #lisp
Tordek has joined #lisp
<aeth> Oh, I should also add that read-from-string is itself one such parser that takes a :start and a :end, so you could use the function edgar-rft used, but with my position-iterative or string-splitting approach instead of wrapping it in "(list " and ")", but it is probably too powerful for the given task.
fragamus has quit [Ping timeout: 265 seconds]
<akoana> aeth: ah@faro:~$
<akoana> aeth: sorry, wrong paste
fragamus has joined #lisp
<akoana> aeth: would it be a good idea to (setf *read-eval* nil) before using read-from-string?
<aeth> Yes.
<aeth> That is part of what I mean by too powerful.
<aeth> I didn't mention that because I already had quite a wall of text.
<aeth> You can temporarily rebind *read-eval* in a LET
<akoana> aeth: I see, thank you
greaser|q has quit [Changing host]
greaser|q has joined #lisp
greaser|q is now known as GreaseMonkey
fragamus has quit [Ping timeout: 245 seconds]
<asdf_asdf_asdf> @aeth; very thank You for help. It works. https://cpy.pt/7B1sdTZJ
Bike_ is now known as Bike
<aeth> asdf_asdf_asdf: instead of using nth-value and calling it twice, you can use multiple-value-bind like this: (multiple-value-bind (number position) (parse-integer ...))
<aeth> asdf_asdf_asdf: you can also use collect in your LOOP instead of pushing in a do
<aeth> that saves you a reverse
fragamus has joined #lisp
<aeth> asdf_asdf_asdf: an example of collect: (loop for i from 0 below 10 collect (* i i))
<aeth> so you put the number you want to collect at the end, e.g. (multiple-value-bind (number position) (parse-integer ...) ... number)
<aeth> (there are other changes you can make, but those stand out the most)
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
kajo has joined #lisp
<fengshaun> how do I reset the symbols slime has loaded with slime-eval-buffer? I'm changing code and re-eval-ing, but now slime refuses to redefine my structs
<asdf_asdf_asdf> @aeth; thanks for CR (Code Review). https://cpy.pt/5EpVyS6r
<aeth> asdf_asdf_asdf: I think that you can combine the do and the collect and get rid of the do, although you'll have to be careful that things are evaluated in the correct order
<asdf_asdf_asdf> Is other manner to ignore argument from multiple-value-bind? I must use (declare (ignore arg))? How skip argument without (declare (ignore ...?
<aeth> yes, but I don't think that's necessary
<aeth> I think you can just get rid of the collect, replace the word "do" with "collect" and put j as your last line, and it should collect
<aeth> (I'm not 100% sure without evaluating it because loops can often have ordering issues)
<aeth> collect will collect the return value, so you don't really need both a do and a collect... you can have as complicated of a collect as you want
adip has quit [Ping timeout: 245 seconds]
<akoana> aeth: so this would be a safer variant of edgar-rft's proposal: https://termbin.com/ay89 - I've you care to have a look at :)
adip has joined #lisp
<akoana> s/I've/if/
<aeth> asdf_asdf_asdf: in case I was unclear, s/collect (parse-integer a :junk-allowed t :start junk1)// s/(declare (ignore j))// s/do/collect/ s/(setf junk1 n-v)/(setf junk1 n-v) j/ and it works (of course, you'd want better code formatting than that)
<asdf_asdf_asdf> How delete "do" from loop, I probably don't understand.
<aeth> asdf_asdf_asdf: just replace "do" with "collect", you don't need an additional collect. collect will gladly do side effects like do, and the collect part only cares about the final value, which can be what you called j
<aeth> then you don't need to ignore j, you can put j as the last position in the multiple-value-bind
<akoana> edgar-rft: I really like your solution, it is short and why not just use the lisp reader :)
varjag has quit [Ping timeout: 265 seconds]
<aeth> akoana: yes, that works. alternatively, within the *read-eval* you can use a simple loop: (loop :for end := (position #\Space string) :then (position #\Space string :start (1+ start)) :for start := 0 :then end :while end :collect (read-from-string string t nil :start end))
<aeth> akoana: that doesn't work if it contains no spaces, though, so you'd have to special case that
<aeth> e.g. run the loop at least once
fragamus has quit [Read error: Connection reset by peer]
<asdf_asdf_asdf> Good? https://cpy.pt/MMURgypW
<akoana> aeth: I'm appreciating your analysis, thank you!
<aeth> akoana: oh oops I made a few mistakes
<aeth> you can fix the case of it containing no spaces by doing something like (or (position ...) (length string)) or (or (position ...) (- (length string) 1)) depending on which side of the off-by-one error it's on, but I messed up the actual range as well. I think the gist is clear, though
<aeth> (only for the initial end, in :=)
<aeth> akoana: yes, that works, except you'll want a newline in front of the j so that it's clearer that it's a separate line. I just couldn't do that due to the restriction of IRC
<aeth> oops... asdf_asdf_asdf: ^
<aeth> tabbed one too many times
<akoana> :)
<aeth> asdf_asdf_asdf: and in general you should fix your formatting
NickBusey has quit [Remote host closed the connection]
<asdf_asdf_asdf> @aeth; what I am fix?
<aeth> asdf_asdf_asdf: the immediate issue is just one of style... just put a newline in front of "j" so that it's clear that that's being returned in the multiple-value-bind
<aeth> asdf_asdf_asdf: in general, though, your style is incorrect, read a style guide, or use a tool to format the style for you
fragamus has joined #lisp
fsmunoz has joined #lisp
<akoana> aeth: why is ":for" preferred over "for" as loop keyword? I'm quite new to lisp, so looking at other peoples code there are both variants, maybe concerning namespaces or Emacs syntax highlighting?
<asdf_asdf_asdf> @aeth; I fix it style guide https://cpy.pt/Jr8LQbJK .
<asdf_asdf_asdf> Colon before keyword is optional myabe.
<asdf_asdf_asdf> maybe*
<akoana> hmm, so it does not matter?
<akoana> loop is magic :)
<asdf_asdf_asdf> Watch the https://www.youtube.com/watch?v=3yl8o6r_omw .
<asdf_asdf_asdf> Is form with :for and without for.
<akoana> ah, I will have a look at it, thanks
<aeth> akoana: I use :for so it stands out as a keyword in syntax highlighting (and just visually in general), yes. It also doesn't polute a local package with variables like "for". It is a minority style, though.
<aeth> akoana, asdf_asdf_asdf: The colon before keywords in loops are because loop will accept any symbol, including keyword symbols, so it's valid
<aeth> it's also a nice play on "keyword" since the symbols in loops like that are keywords in the sense of C++ "keywords" while :foo symbols are "keywords" in the sense of CL vocabulary
<aeth> s/C++/C++ or Python etc./
<akoana> aeth: heh, agree, and its definitly easier to see, good point.
<akoana> it's*
<aeth> asdf_asdf_asdf: Your style is much better now. Your loop still isn't quite indented correctly, but it's hard for tools to do that. A loop is a special case. In a loop like that, the collect should be lined up with the for, moving all of the indentation over a bit. It's best just to let Emacs handle this.
<aeth> asdf_asdf_asdf: good job correcting the issues
<aeth> not everyone who asks for help here actually accepts it!
<akoana> asdf_asdf_asdf: even though I'm an old vi addict, I use Emacs for lisp exclusively and the formatting is one of the many good reasons why.
<asdf_asdf_asdf> Formatting code will come with time usually
<asdf_asdf_asdf> .
<akoana> aeth: I very thankful for the advices given here, as a newbee need that like water :)
random-nick has quit [Ping timeout: 245 seconds]
nowhereman has joined #lisp
cosimone has joined #lisp
<aeth> akoana: assuming one space (otherwise you have to scan for the next start point) I almost have the loop ready... I'm just getting a bug.
<aeth> I guess I can make the loop terminate on start intead of end, but it looks a bit ugly
<aeth> (loop :for start := 0 :then (if end (1+ end) nil) :for end := (if start (position #\Space string :start start) nil) :while start :collect (read-from-string string t nil :start start :end (or end (length string))))
<akoana> ok, trying it in emacs...
<aeth> just put that within the *read-eval*
<akoana> ok
<aeth> (sorry with in the let that rebinds the *read-eval*)
<asdf_asdf_asdf> Which is the best instruction to shift object inside list?
<akoana> hmm, now I'm fighting with emacs - lol
<stylewarning> asdf_asdf_asdf: what do you mean
<asdf_asdf_asdf> (1 5 3 2 0) => (0 1 5 3 2)
<aeth> alexandria:rotate
<asdf_asdf_asdf> No, in standard packages by default installed with SBCL.
<akoana> aeth: I hopelessy messed up the code completly, could you please paste the complete example somewhere?
<stylewarning> (IF (NULL X) NIL (CONS (FIRST (LAST X)) (BUTLAST X)))
<stylewarning> gottem
* akoana really should stop switching between vi and emacs too rapidly...
<akoana> aeth: could repair my mess, yes that works, nice!
<akoana> aeth: just wrapped it into (when (stringp string) ...
cosimone has quit [Ping timeout: 252 seconds]
<aeth> I hope that's correct. Quite a few off by one errors, so it took me longer than it should.
<akoana> aeth: very kind of you, thank you!
<aeth> At the last second, I moved my read-eval binding to be closer to the actual read call, but the original might be more efficient depending on the implementation
<aeth> this just makes it easier to not accidentally rebind *read-eval* in one of the functions you call in the loop before the collect
<aeth> asdf_asdf_asdf: that's also an alternative solution to your problem... you can also replace the LET and READ-FROM-STRING in the collect with a parse-integer where you only care about the first value (since end is being set in the iteration itself)...
<aeth> i.e. it should work with the collect part being (parse-integer string :start start :end (or end (length string)))
<aeth> I'll put that in a comment.
<akoana> aeth: ok, I like the version you pasted before (not restricted to integers)
EvW has joined #lisp
<akoana> aeth: thanks, downloaded it :)
<akoana> aeth: so we could also optionally (defun parse-and-split-string (string &optional (separator #\space) debug)
<aeth> akoana: and, yes, using a configurable separator would be the next logical extension
<aeth> oh oops, I forgot the *read-eval* in that comment. the point's pretty clear, though
<akoana> aeth: we soon will have a nice replacement for split-sequence, cl-ppcre:split or uiop:split-string :)
<akoana> aeth: seriously, I like that very much, for understanding and not to be forced to use any "external" library, I use lisp also on the raspberry pi, so it is easier to able to use clisp "standalone"
<aeth> akoana: I mean, that's really it, isn't it? Add a no-op that doesn't parse at all, and add an alternate code path for a vector result instead of a list result, and now you have yet another split-sequence.
<stylewarning> Programming and not being able to use libraries is sad :(
<aeth> akoana: In fact, subseq is exactly that no-op
<akoana> stylewarning: but having batteries included is nice sometimes :=
<aeth> akoana: using the higher order function version: (parse-and-split-string "123 23487 39" (lambda (seq &key start end) (subseq seq start end))) => ("123" "23487" "39")
<aeth> I think I'll add that as the final comment.
<akoana> aeth: this is nice
fragamus has quit [Ping timeout: 245 seconds]
jlarocco has quit [Remote host closed the connection]
<asdf_asdf_asdf> @stylewarning; this not working.
<stylewarning> I typed it on my phone, what’s wrong wit it
<asdf_asdf_asdf> I want e.g. (list 1 0 2 3 4) => (2 1 0 3 4)
<asdf_asdf_asdf> For n = 2.
<stylewarning> I don’t understand the requirements sorry
<asdf_asdf_asdf> Shift element in other place.
dreamcompiler has joined #lisp
<stylewarning> Do you actually mean “rotate the first n elements right by 1”
<asdf_asdf_asdf> Rotate element right by n.
<asdf_asdf_asdf> n = 2 remove and insert to position 0.
eSVG has quit [Ping timeout: 246 seconds]
jao has joined #lisp
<aeth> asdf_asdf_asdf: even if you don't use alexandria, the answer is in alexandria: https://gitlab.common-lisp.net/alexandria/alexandria/blob/3b849bc0116ea70f215ee6b2fbf354e862aaa9dd/sequences.lisp#L62-80
<aeth> this can inform your own solution
<aeth> (if you only want hints instead of the answer, then that might give away too much)
<asdf_asdf_asdf> @aeth; something easier?