jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
RTZ0x859 has quit [Quit: Leaving]
RTZ0x859 has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
hh47 has quit [Remote host closed the connection]
charh has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
varjag has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
varjag has quit [Ping timeout: 245 seconds]
dddddd has quit [Remote host closed the connection]
robotoad has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
lavaflow_ is now known as lavaflow
Kundry_Wag has joined #lisp
charh has joined #lisp
fikka has joined #lisp
doanyway has quit [Remote host closed the connection]
<mfiano> The benefit of Sly is builtin mrepl, stickers, everything being a button to inspect, amoung many improvements and bug fixes.
Kundry_Wag has quit [Ping timeout: 240 seconds]
<on_ion> >stickers
<mfiano> as of a few days ago, even builtin company completion with zero configuration that is much snappier than the old sly-company, or slime-company
<mfiano> I switched from SLIME to Sly about 3 years ago and I'm still happy with that choice whenever I am reminded by using SLIME
fikka has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
fikka has joined #lisp
markoong has quit [Read error: Connection reset by peer]
markoong has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
Kundry_Wag has quit [Ping timeout: 265 seconds]
markoong has quit [Ping timeout: 265 seconds]
eschatologist has joined #lisp
doanyway has joined #lisp
moei has quit [Quit: Leaving...]
fikka has joined #lisp
Kundry_Wag has joined #lisp
Kundry_W_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 240 seconds]
Kundry_W_ has quit [Remote host closed the connection]
Ukari has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
Trystam has joined #lisp
Tristam has quit [Ping timeout: 240 seconds]
Trystam is now known as Tristam
doanyway has quit []
Myk267 has joined #lisp
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
fikka has joined #lisp
lexicall has joined #lisp
johnvonneumann has joined #lisp
johnvonneumann is now known as Guest2655
fikka has quit [Ping timeout: 256 seconds]
Kundry_W_ has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
eli_oat has joined #lisp
nowhereman_ has quit [Ping timeout: 256 seconds]
<kuwze> I heard that it quit working in Emacs 24+ and I am trying to find a solution
eli_oat has quit [Client Quit]
robotoad has quit [Max SendQ exceeded]
zachk has quit [Quit: Leaving]
nowhereman_ has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
igemnace has joined #lisp
lexicall has quit [Quit: Ah, my macbook is gonna sleep!]
<kuwze> Xach: I got it to work, sorry to bug you
fikka has joined #lisp
pjb has quit [Ping timeout: 256 seconds]
pjb` has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
nosaj88 has joined #lisp
edgar-rft has joined #lisp
fikka has joined #lisp
cgay_ has joined #lisp
cgay_ has quit [Client Quit]
fisxoj has quit [Quit: fisxoj]
fikka has quit [Ping timeout: 245 seconds]
drl has quit [Quit: Ex-Chat]
robotoad has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
nowhereman_ has quit [Ping timeout: 256 seconds]
pjb`` has joined #lisp
pjb` has quit [Ping timeout: 256 seconds]
nowhereman_ has joined #lisp
pjb``` has joined #lisp
pjb`` has quit [Ping timeout: 256 seconds]
pjb```` has joined #lisp
fikka has joined #lisp
pjb``` has quit [Ping timeout: 256 seconds]
pjb````` has joined #lisp
kuwze has quit [Ping timeout: 260 seconds]
pjb```` has quit [Ping timeout: 245 seconds]
fikka has quit [Ping timeout: 264 seconds]
pjb`````` has joined #lisp
orivej has joined #lisp
pjb````` has quit [Ping timeout: 245 seconds]
milanj has quit [Quit: This computer has gone to sleep]
fikka has joined #lisp
asarch has joined #lisp
nosaj88 has quit [Quit: Leaving]
pjb`````` has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 256 seconds]
shifty has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 245 seconds]
shka_ has joined #lisp
jkordani_ has quit [Read error: Connection reset by peer]
mangul has joined #lisp
fikka has joined #lisp
shangul has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 264 seconds]
schoppenhauer has quit [Ping timeout: 256 seconds]
slyrus_ has quit [Ping timeout: 260 seconds]
schoppenhauer has joined #lisp
fikka has joined #lisp
skapata has quit [Remote host closed the connection]
iAmDecim has joined #lisp
mansalss has quit [Quit: Leaving]
fikka has quit [Ping timeout: 240 seconds]
nika has joined #lisp
slyrus_ has joined #lisp
fikka has joined #lisp
Oladon has quit [Read error: Connection reset by peer]
eli_oat has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
iAmDecim has quit [Read error: Connection reset by peer]
iAmDecim has joined #lisp
eli_oat has quit [Client Quit]
pierpal has quit [Remote host closed the connection]
fikka has joined #lisp
Kundry_W_ has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_W_ has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
Kundry_W_ has quit [Remote host closed the connection]
Kundry_W_ has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
pierpal has joined #lisp
Kundry_Wag has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
Kundry_W_ has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 264 seconds]
pierpal has joined #lisp
milanj has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
karlosz has quit [Ping timeout: 248 seconds]
eminhi has joined #lisp
Guest2655 has quit [Read error: Connection reset by peer]
johnvonneumann has joined #lisp
johnvonneumann is now known as Guest57261
Kundry_Wag has joined #lisp
skeuomorf has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
moei has joined #lisp
charh has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 240 seconds]
mingus has quit [Ping timeout: 248 seconds]
sauvin has joined #lisp
shifty has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
Naergon_ has quit [Ping timeout: 248 seconds]
dented42 has joined #lisp
fraya has joined #lisp
eminhi has quit [Remote host closed the connection]
fraya has quit [Client Quit]
fikka has joined #lisp
varjag has joined #lisp
charh has joined #lisp
<asarch> I did: (ql:quickload "clim-examples") in "This is SBCL 1.3.14.debian, an implementation of ANSI Common Lisp." and everything is fine, however when I do: (clim-demo:demodemo) I get: https://pastebin.com/0adz1s7D
<asarch> Why?
<asarch> In sbcl-1.4.3 for Slackware64 I can evaluate that expression with no problem
fikka has quit [Ping timeout: 264 seconds]
Naergon has joined #lisp
varjag has quit [Ping timeout: 260 seconds]
zooey has quit [Remote host closed the connection]
fikka has joined #lisp
zooey has joined #lisp
vlatkoB has joined #lisp
dddddd has joined #lisp
iAmDecim has quit [Ping timeout: 265 seconds]
mingus has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
iAmDecim has joined #lisp
kajo has quit [Ping timeout: 265 seconds]
<jackdaniel> try (clim-demo::demodemo)
wildbartty has quit [Ping timeout: 260 seconds]
<jackdaniel> maybe you have outdated quicklisp repositories?
<jackdaniel> so maybe it is not sbcl version problem but mcclim is not the same?
kajo has joined #lisp
iAmDecim` has joined #lisp
Naergon has quit [Ping timeout: 240 seconds]
iAmDecim has quit [Ping timeout: 276 seconds]
<asarch> no non-whitespace characters in string "".
Naergon has joined #lisp
wxie has joined #lisp
iAmDecim` has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
<beach> Good morning everyone!
fikka has quit [Ping timeout: 264 seconds]
<asarch> Guten Morgen beach :-)
rippa has joined #lisp
igemnace has quit [Remote host closed the connection]
skeuomorf has quit [Ping timeout: 276 seconds]
wigust has joined #lisp
fikka has joined #lisp
<asarch> From Debian (the full log): http://paste.scsys.co.uk/577683
<asarch> From Slackware64: http://paste.scsys.co.uk/577682
<jackdaniel> as suspected, you load two different versions of McCLIM
<jackdaniel> one is more recent than the other
<jackdaniel> since quicklisp distribution seems to be the same, you probably have another mcclim copy somewhere in local-projects or common-lisp directory
<jackdaniel> notice difference in instructions: ";; try (CLIM-DEMO:DEMODEMO)" vs ";; try (CLIM-DEMO::DEMODEMO)"
<jackdaniel> needless to say, that's what I've suggested before you pasted logs
<asarch> Thank you jackdaniel
orivej has joined #lisp
<jackdaniel> sure
<asarch> Thank you very much :-)
fikka has quit [Ping timeout: 260 seconds]
<asarch> I didn't see this: ./.cache/common-lisp/sbcl-1.3.14.debian-linux-x64/usr/share/common-lisp/source/mcclim
andrei-n has joined #lisp
Kundry_Wag has joined #lisp
Kundry_W_ has joined #lisp
fikka has joined #lisp
wxie has quit [Quit: Bye.]
Kundry_Wag has quit [Ping timeout: 240 seconds]
asarch has quit [Quit: Leaving]
fikka has quit [Ping timeout: 240 seconds]
Pixel_Outlaw has quit [Quit: Leaving]
fikka has joined #lisp
rgc has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
shka_ has quit [Ping timeout: 245 seconds]
Kundry_W_ has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 264 seconds]
nika has quit [Remote host closed the connection]
nika has joined #lisp
fikka has joined #lisp
Kundry_Wag has joined #lisp
orivej has quit [Ping timeout: 245 seconds]
fikka has quit [Ping timeout: 256 seconds]
Kundry_Wag has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
robotoad has quit [Quit: robotoad]
fikka has quit [Ping timeout: 256 seconds]
<jackdaniel> so you have mcclim installed in /usr/share/common-lisp/source/ for some reason
nickenchuggets has quit [Quit: Leaving]
robotoad has joined #lisp
random-nick has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
fikka has joined #lisp
MoziM has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
skeuomorf has joined #lisp
fikka has joined #lisp
skeuomorf has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 260 seconds]
nowhereman_ has quit [Read error: Connection reset by peer]
<makomo> does cl-who only recognize the "htm", "str", etc. symbols if they're interned in its own package?
<makomo> hmm i guess that makes sense, since how would you otherwise call your own functions with those names
<makomo> and i just remembered it uses a macrolet to do its code-walking
milanj has quit [Quit: This computer has gone to sleep]
nowhereman_ has joined #lisp
_paul0 has quit [Quit: Leaving]
fikka has joined #lisp
fm4d_ has joined #lisp
smurfrobot has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
mangul is now known as shangul
fikka has quit [Ping timeout: 264 seconds]
smurfrobot has joined #lisp
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
grumblr has joined #lisp
fikka has joined #lisp
grumble has quit [Killed (barjavel.freenode.net (Nickname regained by services))]
grumblr is now known as grumble
daniel-s has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fikka has quit [Ping timeout: 240 seconds]
skeuomorf has joined #lisp
dddddd has quit [Remote host closed the connection]
ebzzry has joined #lisp
defaultxr has quit [Ping timeout: 240 seconds]
shka_ has joined #lisp
fikka has joined #lisp
skeuomorf has quit [Remote host closed the connection]
charh has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 264 seconds]
pjb has joined #lisp
pjb is now known as Guest9683
lumm has joined #lisp
kuribas has joined #lisp
makomo has quit [Ping timeout: 240 seconds]
<kuribas> what's character syntax in lisp? I tried #\c in sbcl but it doesn't work ...
<phoe> kuribas: #\c
Arcaelyx has joined #lisp
<phoe> (coerce (list #\a #\b #\c) 'string) ;=> "abc"
ebzzry has quit [Quit: WeeChat 2.1]
fikka has joined #lisp
<kuribas> when I type #\c it just hangs...
<phoe> kuribas: can you give me a screenshot?
nowhereman_ has quit [Remote host closed the connection]
nowhereman_ has joined #lisp
<shangul> I've ran into a problem. I decided to spend 1-2 year on Lisp and do my stuff in this language. but now I see I may not have my projects done in Lisp because I'll program them in my previous language's way. on the other hand I can't wait 1-2 year or even months to have enough experience.
<kuribas> erm, now it works... strange
<phoe> shangul: I know the pain
<shangul> So what should I do?
<phoe> the thing I've employed is write snippets or pages of code and then post it here and on #clnoobs to get reviews
<phoe> that way I got a lot of information about how to write the same thing in more idiomatic Lisp.
<phoe> there's a lot of lispers around here who are willing to freely share that information and do small reviews. you can leverage that fact.
<shangul> "small reviews"
fikka has quit [Ping timeout: 240 seconds]
<phoe> yep - single functions, single files, perhaps small projects
<phoe> make sure that you get these right, then use that information to construct larger stuff.
<shangul> I know I'll be able to learn and program my project in Lisp even through I'm a beginner. but I'll do them not in Lisp's way
<phoe> shangul: of course
<phoe> that is to be expected
<phoe> no one is born a lisper
<phoe> just write your code and then post it here
<shangul> So I shouldn't program my projects till I get enough experience. but I can't wait till then.
<phoe> shangul: of course not
<shangul> "small reviews"
<phoe> start writing now
<phoe> then post what you have written
<phoe> then be ready to accept remarks
<shangul> okay then...
<phoe> then accept them
<phoe> then apply them
<phoe> then go back to step 1
<shangul> resolve the same problem?
<phoe> no - start writing more code
<phoe> then post what you have written, etc..
<shangul> then you review and then I should change or rewrite it
<Guest9683> shangul: there's no lisp way: the lisp way is to adapt to YOUR way.
<shangul> (plural you)
<phoe> shangul: more or less that
<phoe> Guest9683: actually not
<phoe> there's coding conventions even in the Lisp land
<phoe> you are free to customize the language to your own liking, but don't expect other people to abide to that liking
Guest9683 is now known as pjb`
pjb` is now known as pjb
<phoe> shangul: also this applies to many programming languages, not just Lisp
<pjb> Coding conventions aren't universal. If your problem calls for other conventions, then your project can apply entirely different coding conventions.
fikka has joined #lisp
<shangul> phoe, yes
<phoe> pjb: in the general case you need to learn the rules before breaking them
<pjb> As long as you a good domain related reason.
<pjb> Sure.
<phoe> it's hard to learn how to properly use macros to customize Lisp if you don't learn the basics of them first. which is where the basic conventions come in.
<shangul> for example someone who comes to Python from C, writes something like "for i in range(len(L))"
nika has quit [Remote host closed the connection]
<phoe> shangul: yep, and the python folk will teach that person their way
nika has joined #lisp
<phoe> where in Lisp that would be (loop for i below (length list) ...) if I understand that snippet correctly
<shangul> Now I'm switching from Python to Lisp and I'm afraid the same thing will happen
<phoe> shangul: no need to be afraid
<phoe> it will happen almost surely
<phoe> (:
<phoe> that's the joys of learning new languages
<pjb> shangul: this example is low-level in the global program architecture. It doesn't matter. The higher levels matter more.
<phoe> or new stuffs
fikka has quit [Ping timeout: 260 seconds]
<shangul> Problem: Write a program which asks user's name, greets him. Then asks 2 numbers(3 digits max), connects those 2 together(23,54 => 2354), multiplies this number at reversed version of itself(e.g. 543 and 345). Solution: https://apaste.info/7HeB
<shangul> 3 digits max, each
<Bike> and not 23054, huh
<phoe> I assume this is more like string concatenation
<pjb> shangul: see, you wrote low level expressions. They may be correct and nice and all. But your program architecture is bull shit. Literally. A huge pile of nothing.
<phoe> "23" + "54" = "2354"
<phoe> shangul: okay, let's work through this.
<shangul> pjb, that's my problem
<pjb> You should have written: (defun program () (great-user (ask-user-name)) (let ((n (connect (ask-number) (ask-number)))) (* n (reverse-number n))))
<pjb> Then you could see and prove that this program does exactly what the problem statement says.
fikka has joined #lisp
<phoe> shangul: pjb just put some structure in your code.
<phoe> properly indented, this would be https://plaster.tymoon.eu/view/816#816
<pjb> Then, you can learn about nice lisp types and operators, to benefit from what CL provides. But this is less important than having a good program structure.
<pjb> s/great/greet/ above, sorry.
<phoe> if you try to compile this, Lisp will complain about undefined functions GREET-USER, ASK-USER-NAME, ASK-NUMBER, REVERSE-NUMBER.
<phoe> ...which is pretty sane, because we did not define these functions yet.
<pjb> Then you recursively apply the same process to those undefined functions.
<pjb> Notice program = routine = procedure = function. It's all the same concept.
<phoe> Oh, and CONNECT.
<phoe> The thing is, these smaller functions have much smaller responsibilities. One of them is for greeting the user, the other is for asking a number, the other is for connecting them, and so on, and so on.
<phoe> Smaller, well-defined functions make it much easier to find erroneous program behavior.
fm4d_ has left #lisp ["Textual IRC Client: www.textualapp.com"]
<pjb> You can test more easily small functions. Or prove them.
<shangul> why defining a function for these small stuff?
<pjb> We just explained.
<pjb> Also, even small functions can be reused.
fikka has quit [Ping timeout: 260 seconds]
<shangul> yes but in this program, these functions are not going to be used, I'm not greeting the user anymore
<pjb> shangul: using functions, small or big (actually they should not be big), is raising the abstraction level of your code. This is good, because it makes it easier to understand.
<phoe> shangul: providing information for the programmer
<phoe> you no longer have a stream of FORMATs
<phoe> you have functions with defined names
<pjb> It makes it closer to the domain of your problem. So you can see more directly the link between your problem statement and your solution program.
<phoe> and you separate the control flow of your program from what the program is actually doing
<phoe> you separate what the program is meant to do from how it achieves it.
<phoe> I need to run and do a thing now - I will refactor your code to more idiomatic Lisp in about an hour if no one does it before me.
<shangul> no don't
<shangul> I want to do it myself
<phoe> shangul: no problem
<pjb> Do it. we'll compare our solutiosn.
<phoe> shangul: use the skeleton that pjb provided and implement the rest of the functions.
<phoe> then we can compare, no problem.
<shangul> I don't have a good feeling toward this, you shouldn't do my job...
sadsagfjg has joined #lisp
<phoe> shangul: oh we are not doing your job
<phoe> we're giving you a basic idea of what Lisp looks like
bmansurov has quit [Ping timeout: 256 seconds]
<phoe> you'll likely need some examples to mimic in the beginning so you can bootstrap your Lisp knowledge.
mathrick has quit [Ping timeout: 240 seconds]
<phoe> doing a single assignment ourselves to give you an example isn't going to do all of your Lisp job. (:
bmansurov has joined #lisp
<sadsagfjg> :/
<kuribas> phoe: doesn't a lisp programmer use dotimes?
mathrick has joined #lisp
<phoe> kuribas: that's also good
<kuribas> loop looks very complicated
<LdBeth> phoe: I think it’s more sane to complain about it after loaded the entire project or file
<phoe> (dotimes (i 10) ...) === (loop for i below 10 do ...)
<phoe> LdBeth: complain about what?
<phoe> kuribas: LOOP is liked by some and disliked by some people
<phoe> you are correct, DOTIMES is usable in that case, too.
<kuribas> I come from haskell, where functions do usually just one thing
<LdBeth> kuribas: in that particular case, a do block is enough
<kuribas> I suppose I should write idiomatic lisp, if that exists
<LdBeth> phoe: undefined function
<beach> kuribas: Of course it exists.
<LdBeth> kuribas: Traditionally Lisp functions only accept fixed number arguments, and people used something like pattern match to do complicated work.
fikka has joined #lisp
<LdBeth> So Lisp functions can only do one thing if you want
<White_Flame> Lisp can adopt pretty much whatever style you want
<kuribas> I'll be writing haskell like combinators in lisp then :)
<kuribas> monad macros
<White_Flame> and I'm sure you can grab libraries for those, too
<White_Flame> although monads & macros do cover a lot of similar space
<White_Flame> depending on what you want out of them
<kuribas> yeah, I doubt it'll work as well...
<White_Flame> you'd be surprised
fikka has quit [Ping timeout: 240 seconds]
<White_Flame> but then again, purpose built vs general purpose always has its tradeoffs
robotoad has quit [Quit: robotoad]
<White_Flame> Lisp tends to be a verbose language, with its literal AST formatting, compared to languages whose syntax is specialized to do very specific things
<White_Flame> but that also means Lisp can pretty easily express the AST transform of basically any language
<MichaelRaskin> Monads is a more restricted/structured notion
<kuribas> I know in scheme people like to spell everything out.
<kuribas> why haskell poeple abbreviate it.
<MichaelRaskin> So yes, it makes sense to implement them via macros, which is done a few times
<White_Flame> and that's not even getting into reader macros, were you _can_ define your own syntactic punctuation if you desire
<kuribas> However monads without type inference are less handy
<White_Flame> CLOS can dispatch functions based on parameter class (not as strong as type)
<White_Flame> so that covers many cases with just the built-in functionality
<kuribas> ah, so you can make a monad class
<White_Flame> beyond that, macros
<kuribas> is a vector just a one dimensional array?
<White_Flame> yes
<White_Flame> it's a subclass of array
sadsagfjg has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<pjb> shangul: have a look at my solution: https://apaste.info/ynMI
<phoe> hah, that's already with tests
<shangul> that's ~100 lines...
<pjb> programming at the repl naturally produces tests.
<pjb> shangul: that's a correct program.
<phoe> shangul: 60% of that are tests
<pjb> And readable, and you can easily check if it matches the specifications.
<pjb> Normally, you would put tests in a separate file, but here I left them in the order it was programmed: as soon as you write a function you should test it. you do it normally at the repl, but if you copy your test cases from the repl to a test function you keep it for posterity.
<phoe> also it bugfixes one thing in your code - your code will not work correctly if you give it numbers 1234 and 4321
<shangul> phoe, that's a lot, yet
<phoe> much more readable than https://apaste.info/7HeB though
<shangul> phoe, they are 4 digits, 1234 and 4321
<pjb> Well, users tend to come later and ask for bigger limits. So you shouldn't put artificial limits in your code, if you want to avoid irritation.
<shangul> pjb, the problem said they should be 3 digits max
<pjb> shangul: this is ensure by ask-number.
milanj has joined #lisp
<pjb> ensured
<pjb> Sorry, there's a typo in reverse-number, it should be: https://apaste.info/Ecli was missing the argument to decimal-representation-length
<shangul> my solution is much shorter...
ebrasca has joined #lisp
shangul has quit [Remote host closed the connection]
<White_Flame> and less readable, less architected, and thus less maintainable/refactorable
<pjb> and perhaps buggy.
<pjb> so less reliable.
<White_Flame> that sort of style is fine for banging out quick & dirty utilities for one-off use or prototypes
<pjb> (you didn't write tests, or proofs).
shangul has joined #lisp
<White_Flame> but as far as code that you're going to keep goes, that's going to be an opaque blob if you come back a month or two later and need to rework something
<pjb> Now, the funny thing with that exercise, is that it cannot be so easily implemented in C on a 32-bit machine :-)
<pjb> (integer-length (expt 999999 2)) #| --> 40 |# ;-)
<shangul> what was my last message?
<pjb> <shangul> my solution is much shorter...
<pjb> shangul: have a look at: http://ccl.clozure.com/irc-logs/lisp/
<White_Flame> and less readable, less architected, and thus less maintainable/refactorable
<White_Flame> that sort of style is fine for banging out quick & dirty utilities for one-off use or prototypes
<White_Flame> but as far as code that you're going to keep goes, that's going to be an opaque blob if you come back a month or two later and need to rework something
<White_Flame> </my responses>
ebrasca` has joined #lisp
nika has quit [Quit: Leaving...]
thodg has joined #lisp
ebrasca has quit [Ping timeout: 264 seconds]
ebrasca` is now known as ebrasca
<shangul> perhaps you are right. But I've red a part of PCL and wrote that code and another one a little longer than that. I'll get frustrated if I go like this.
<shangul> pjb, ^
<pjb> shangul: it's not slower to implement.
<White_Flame> it's the difference between learning lisp, and learning idiomatic lisp
<White_Flame> and the difference between writing software and playing code golf
<White_Flame> code golf is fine when you're learning and fiddling with how to call certain standard functions
<shangul> well I can't play code golf before I write software
<pjb> shangul: for example, you use read-line to read the numbers. Fine. But users are know to add spaces before or after their inputs! So at least you should use string-trim to remove those spaces.
milanj has quit [Quit: This computer has gone to sleep]
<kuribas> does CL have let-rec?
<White_Flame> but as I was talking above in comparison to haskell, Lisp tends to be a bit verbose in the micro-issues, but becomes much more compact for larger projects
<pjb> kuribas: it's called labels
<kuribas> pjb: ah, cool
<White_Flame> it doesn't hyper-optimize on the line-by-line syntactic issues, but rather allows you to build abstractions well, which makes difficult problems much easier to tackle
nowhereman_ has quit [Ping timeout: 256 seconds]
<shangul> perhaps I'm in the wrong position and I should first study all the PCL?
<White_Flame> just keep learning
<kuribas> White_Flame: eh, I find haskell pretty compact for large projects.
<White_Flame> if something doesn't make sense to you yet (like why people whould make all thse named defuns for everything), then just keep going with other things first
<shangul> in pjb's way? I'll get frustrated. I should work in smaller pieces I think
<kuribas> White_Flame: it's not so great for golfing because you need all the imports.
<kuribas> And type signatures
<shangul> pjb, I'm not saying you are wrong, I'm just saying 100 lines for a one week beginner is too much
<White_Flame> well, you did ask about idiomatic style, after all ;)
<White_Flame> the thing is, the complexity is not high there. You just have to get more comfortable with the language (like any language) to be able to skim & read it well, instead of seeing it as a big impenetrable wall
<shangul> what should I do now?
<shangul> pjb, phoe, I was afraid of this. that you write 100 lines for me and I waste your time by not using it
<White_Flame> just keep learning, keep going through PCL or whateve you're using
<White_Flame> at some point in the near future you'll look back to this problem and say "oh, duh"
fikka has joined #lisp
<shangul> okay...
<shangul> pjb, I'm again sorry for wasting your time
<pjb> shangul: granted, there are two different phases. When you're just learning the language, you write small expressions just to exercise the operators you're learning. In that case, you're essentially writting tests for the language operators :-)
<pjb> shangul: but if you present a small problem statement, like a school exercise, I would grade differently the two kinds of solution.
<kuribas> there is nothing in Python that CL hasn't done many years before, right?
<kuribas> I don't get the appeal of Python.
<beach> kuribas: There is still a lot of stuff missing in free Common Lisp software.
<pjb> In the first phase, you are analysing and studying the details of each operators. In the second phase, you are synthesizing small programs, demonstrating your understanding on how the individual language elements can be combined to implement a solution. This is more like real programming.
<pjb> kuribas: indeed.
<kuribas> beach: yeah sure. Python has great libraries.
<beach> kuribas: Here are some ideas for you: http://metamodular.com/Common-Lisp/suggested-projects.html
<pjb> kuribas: this is wrong; those great libraries are usually implemented in C or C++ and they are just used from python. you can use them as well fromCL.
fikka has quit [Ping timeout: 240 seconds]
<kuribas> pjb: true
<kuribas> pjb: but it's convenient not to have to deal with the FFI
<pjb> we also have a lot of libraries in CL using FFI to interface with external libraries.
<shangul> pjb, I think I'm in the first phase, yet.
<pjb> shangul: ok.
markoong has joined #lisp
fikka has joined #lisp
Domaldel has quit [Quit: Leaving]
fikka has quit [Ping timeout: 260 seconds]
_death has quit [Quit: death]
<kuribas> beach: funny I was already starting a project for improving printed music scores.
<kuribas> beach: in haskell and C
varjag has joined #lisp
<White_Flame> kuribas: the appeal of Python is that it makes the easy easy. There's a lot of simple tools at hand, and low barrier to entry for the syntax
<kuribas> White_Flame: I suppose also that it has easy answers to most problems. Unfortunately those aren't always the best.
<kuribas> sometimes even the worst.
<White_Flame> sure, but it keeps a lot of newbies, which then take the language beyond where it really is comfortable going
<beach> kuribas: Interesting.
<kuribas> And then they get into problems because of the backwards way of doing things in Python.
<beach> kuribas: Why the mixture between Haskell and C?
<kuribas> beach: I used C libraries for triangulation.
Khisanth has quit [Ping timeout: 264 seconds]
<kuribas> beach: my idea was to use triangulation to find an optimal segmentation.
<beach> OK.
<kuribas> beach: it is a lot of work to find good heuristics.
<beach> I can imagine.
<kuribas> I didn't want to use a training set.
kuribas has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
Khisanth has joined #lisp
zotan has quit [Ping timeout: 256 seconds]
zotan has joined #lisp
igemnace has joined #lisp
zotan has quit [Ping timeout: 265 seconds]
RTZ0x859 has quit [Quit: Leaving]
fikka has joined #lisp
zotan has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
Kundry_Wag has joined #lisp
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
_death has joined #lisp
makomo has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Ukari has joined #lisp
DemolitionMan has joined #lisp
zaquest has quit [Remote host closed the connection]
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
EvW has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
eminhi has joined #lisp
fikka has joined #lisp
igemnace has quit [Quit: WeeChat 2.1]
pierpal has quit [Read error: Connection reset by peer]
daniel-s has quit [Quit: Konversation terminated!]
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
subroot has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
makomo has quit [Ping timeout: 248 seconds]
drastik_ has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
drastik has quit [Read error: Connection reset by peer]
smurfrobot has quit [Remote host closed the connection]
makomo has joined #lisp
pierpal has joined #lisp
EvW has quit [Ping timeout: 276 seconds]
babathreesixty has quit [Quit: babathreesixty]
smurfrobot has joined #lisp
smurfrobot has quit [Ping timeout: 245 seconds]
fikka has quit [Ping timeout: 264 seconds]
nowhere_man has joined #lisp
dddddd has joined #lisp
milanj has joined #lisp
jmercouris has joined #lisp
smurfrobot has joined #lisp
<jmercouris> So I was reading a bunch of the response to my article on reddit about eco-programming
<jmercouris> and one of the users claimed that lists in lisp HAVE to be inefficient
<jmercouris> let me copy and paste what they wrote
<jmercouris> "An interesting example of an inefficient part of a language would be LISP's 'list' structure - compared to say C++'s vector. Vector is specified to be a single contiguous block of memory - allowing for efficient pointer arithmetic lookup."
<jmercouris> "Although theoretically you can store your cons-list thing in a contiguous memory block; you can't do the same pointer arithmetic to give you the nth cell (unless you make a non conforming LISP with the guarantee attached)."
<jmercouris> Now, I am thinking I am pretty sure it is possible to make the pointer arithmetic hold true AND have a conforming lisp by layering some abstraction on top
<jmercouris> as an implementation specific extension of sorts
<beach> jmercouris: Common Lisp has vectors as well.
<jmercouris> beach: to put things into context, the discussion was, can one design a language such that the implementation HAS to be inefficient
<jmercouris> my answer was, I don't believe so, the implementation can always make something implementation as long as it fulfills the grammar syntax, and built-inrequirements of the language
<beach> jmercouris: That is so not the right way to think about it.
<beach> jmercouris: Vectors are faster for random access, but list are more flexible in that they can grow and shrink easily. They can also share elements between several lists.
<jmercouris> I would use a vector if I had this idea
<jmercouris> but the question is rather, can one design a language such that the implementation *MUST* be slow
<jmercouris> slow/inefficient in terms of O(n) time
<beach> What is n here, and what part of the language does it?
<beach> Is it specifically for lookups in sequences?
<jmercouris> n here being all of the operations for a given program
<jmercouris> e.g. if we have a program that counts 10 numbers
<beach> That makes absolutely no sense.
<Bike> that's kind of nonsensical
<Bike> but if you want a language that can't be fast maybe try malbolge
<jmercouris> is it possible to design a language specification such that the counting of the numbers would take longer in language A then language B
<Bike> off topic though
<jmercouris> given that the implementation is free to implement the language however they so choose
<jmercouris> I don't have the vocabulary to express what I'm trying to ask
terpri has quit [Ping timeout: 260 seconds]
<beach> I suppose you can specify in your language definition that numbers have to use Church encoding.
<beach> But yeah, nonsensical and off topic.
<jmercouris> who is nonsenical? I or they? or both?
<Bike> you
<Bike> "n here being all of the operations for a given program", specifically
<beach> I totally agree with Bike.
fisxoj has joined #lisp
<jmercouris> I was trying to say something else, but anyways
fikka has joined #lisp
<beach> jmercouris: What *is* true is that Common Lisp lists pretty much have to have O(n) lookup complexity. But comparing them to vectors is really dumb too, because vectors are bad with other things.
<Bike> old lisp implementations did cdr coding so there were O(1) lists, but it's kind of silly
<beach> jmercouris: Try adding a new element to the front of a vector. That's an O(n) operation, where n is the length of the vector.
<Bike> and on the flipside, just being able to get pointers into a vector doesn't actually mean they're contiguous, or that access is O(1)
<beach> jmercouris: So vectors and lists are two different data structures that are good for different use cases.
shangul has quit [Remote host closed the connection]
<Bike> c.f. whatever latest article about how turing is wrong because cpu caches exist, or whatever
pierpal has quit [Ping timeout: 240 seconds]
shangul has joined #lisp
<jmercouris> beach: yes, but couldn't one had a vector with the addresses to each element in the list?
<jmercouris> as a sort of "look up table"
<jmercouris> I believe java has arraylist which is something like that
<jmercouris> s/had/have
<Bike> i am... pretty sure that's not how an arraylist works.
<beach> jmercouris: So how do you implement CONS with that representation?
<Bike> that just sounds very complicated.
zotan has quit [Ping timeout: 265 seconds]
<jmercouris> Here's what you'd have to do, you'd have to shuffle all sorts of elements around whenever you cons something
<jmercouris> depending on whether you need to allocate a new array to grow it, or insert something in the middle etc
<beach> jmercouris: You would have to re-allocate a new vector which is O(n).
<jmercouris> you'd lose a lot of those characteristics, BUT, you would have the very fast look up time
<Bike> well, that's what beach said earlier- you're losing the "can grow and shrink easily" property
fikka has quit [Ping timeout: 248 seconds]
<jmercouris> and, you would have this on a list
<Bike> so there's not much point
<beach> jmercouris: If you want fast lookup time, use a vector.
<jmercouris> there is a point to this data structure
<jmercouris> as long as you are adding and removing from the end of the list, it should be fine
<beach> Oh yeah? How so?
<jmercouris> and as long as you have enough padding before and after in your array
<jmercouris> what is the point to the data structure, or what exactly?
<beach> jmercouris: At some point, you run out of space, and you must reallocate.
mangul has joined #lisp
zotan has joined #lisp
<beach> ... which is O(n) like I said.
<jmercouris> yes, of course, but if you pad enough, it could result in very fast look up times, and some other interesting properties
<Bike> it's just a resizable vector, which is a nice structure, but has different characteristics from a list
<beach> This discussion is really silly. I'll stop now.
kuwze has joined #lisp
mangul has quit [Remote host closed the connection]
smurfrobot has quit [Remote host closed the connection]
fisxoj has quit [Quit: fisxoj]
mangul has joined #lisp
shangul has quit [Ping timeout: 240 seconds]
mangul has quit [Remote host closed the connection]
<Bike> i mean, lisp has this already, you make an adjustable vector and vector-push-extend it
<Bike> but it's not a replacement for linked lists
shangul has joined #lisp
pierpal has joined #lisp
fikka has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
shangul has quit [Remote host closed the connection]
shangul has joined #lisp
quazimodo has joined #lisp
<pjb> jmercouris: Of course there are comparisons of lists vs. vectors, eg. by Stroustrup in C++, but: 1- the author is obviously biazed, 2- it depends on the hardware (notably caching), 3- it's rather unrelated to global performance, which depends more on other language design factors. For example, C const is used so inconsistently, that you often have to copy a const char* string to pass it to a char* parameter, even if most of the t
<pjb> it won't be mutated. It's even worse in C++, where a lot of copying is done or has to be done when in lisp you would just pass a reference.
<pjb> jmercouris: notice notably how passing a reference to a mutable or an immutable object in lisp doesn't depend on compilation time declarations, but on run-time check. Therefore if the actual processing doesn't try to mutate the object, when an immutable one is passed, it will work perfectly good. It's all win, programmer time, compiler time, run-time. At the minimal cost of a small dispatch or check at run-time. On the other ha
<pjb> equivalent would require a big cost in programmer time, compiler time (compiling lots of generics variants or templates), AND still at run-time in copying things everywhere.
<pjb> So you can always set up micro-benchmark.
<jmercouris> I guess there are indeed many assumptions, and lots of external factors not considered within this argumentation
<jmercouris> a complete analysis would probably be too much work and effort for the sake of replying to a comment on reddit
<pjb> For example, there's the famous argv thing. In programs, usually it's treated as an immutable vector of immutable strings. However, some programs want to overwrite some of the argument strings (eg. passwords). The actual effect is implementation dependent (eg. whether this has consequences on how ps(1) reports the command). Nonetheless, in programming languages as C or C++, there's no easy way to denote that you won't mutate an
<pjb> in general, but sometimes you will stil mutate it. In lisp, if the string are mutable then they're mutable, and if not, then they're not, and it's a run-time check.
<pjb> Basically, what I mean is that C and C++ programmers and language designers don't have the means of what they aim at.
<pjb> (and that's the reason why people like Linus use C, and hate C++).
<pjb> If you understand lists in lisp, then all your accesses to list elements will always be O(1).
fikka has quit [Ping timeout: 255 seconds]
crsc has quit [Quit: leaving]
FreeBirdLjj has joined #lisp
nowhere_man has quit [Ping timeout: 260 seconds]
crsc has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
shifty has quit [Ping timeout: 264 seconds]
EvW1 has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
FreeBird_ has joined #lisp
jmercouris has quit [Remote host closed the connection]
fikka has joined #lisp
FreeBirdLjj has quit [Ping timeout: 268 seconds]
FreeBirdLjj has joined #lisp
FreeBird_ has quit [Ping timeout: 240 seconds]
Kundry_Wag has joined #lisp
Kundry_W_ has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 260 seconds]
EvW1 has quit [Ping timeout: 265 seconds]
fikka has joined #lisp
<loke> Hello #Lisp
fikka has quit [Ping timeout: 260 seconds]
<loke> For anyone who hasn't followed by work on #clim, here's a demo:
shangul has quit [Remote host closed the connection]
jack_rabbit has quit [Ping timeout: 264 seconds]
Naergon has quit [Ping timeout: 260 seconds]
igemnace has joined #lisp
Kundry_W_ has quit [Remote host closed the connection]
TCZ has joined #lisp
Kundry_Wag has joined #lisp
fikka has joined #lisp
<beach> loke: Beautiful!
<loke> I've just added rendering of subscripts as well :-)
shangul has joined #lisp
<loke> beach: I really need solve the problem of scrolling with double buffering
<beach> Did you try the macro?
<loke> Scrolling in the climaxima windows looks horrible, and in the videos you get a taste of that
<beach> I see, yes.
Kundry_Wag has quit [Ping timeout: 255 seconds]
fikka has quit [Ping timeout: 255 seconds]
rumbler31 has quit []
skapata has joined #lisp
fikka has joined #lisp
TCZ has quit [Quit: Leaving]
<loke> beach: I was looking at the WITH-DOUBLE-BUFFERING macro, and tried to use it in the simplest possible way when scrolling.
<loke> Something did happen (I got lots of garbage on the screen, and _some_ of the content moved)
<beach> Hmm, not good.
<loke> beach: Do you know how that thing works? It clearly wors in some cases (like the cube game in demodemo)
<beach> Not by heart, no.
fikka has quit [Ping timeout: 256 seconds]
rumbler31 has joined #lisp
fikka has joined #lisp
terpri has joined #lisp
<loke> beach: My other conundrum is related to keyboard control
<phoe> loke: to Reddit with this!
<loke> beach: I really want to add keybaord control to MENU-CHOOSE
<loke> phoe: You're welcome to share.
<loke> phoe: I was going to make a more thorough video about it when it's more ready
<loke> But I have no idea when I have time to do that
fikka has quit [Ping timeout: 265 seconds]
FreeBirdLjj has joined #lisp
<phoe> loke: done
fikka has joined #lisp
Oladon has joined #lisp
<loke> There. I created a playlist
<loke> I'll add future videos to the same playlist.
fikka has quit [Ping timeout: 268 seconds]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
smurfrobot has joined #lisp
mflem has joined #lisp
sakalli has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
himmAllRIght17 has joined #lisp
fikka has joined #lisp
skeuomorf has joined #lisp
asarch has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
karlosz has joined #lisp
milanj has joined #lisp
fikka has joined #lisp
igemnace has quit [Quit: WeeChat 2.1]
eminhi has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 264 seconds]
attila_lendvai has quit [Quit: Leaving.]
rumbler31 has quit []
Kundry_Wag has joined #lisp
rumbler31 has joined #lisp
makomo has quit [Quit: WeeChat 2.0.1]
milanj has quit [Read error: Connection reset by peer]
Kundry_Wag has quit [Ping timeout: 256 seconds]
milanj has joined #lisp
brendyn has quit [Ping timeout: 268 seconds]
<White_Flame> hmm, there's no way to setf array-displacement to slide a window over another array?
<White_Flame> specifically, to get a sliding substring
<White_Flame> just figuring out a nice fast clean way of doing hex string -> unsigned-byte 8 vector conversion
<Bike> you'd have to adjust-array
fikka has joined #lisp
<White_Flame> ah, there it is. I rarely use these
<White_Flame> might be a good non-consing-in-the-loop way of doing this
thodg has quit [Ping timeout: 276 seconds]
Kundry_Wag has joined #lisp
<asarch> I already have this: http://paste.scsys.co.uk/577685
FreeBirdLjj has quit [Ping timeout: 268 seconds]
Kundry_W_ has joined #lisp
robotoad has joined #lisp
<aeth> White_Flame: Depending on how long the range is, you might also just want to return multiple values and write a simple macro on top of that to (values (aref ,a ,i) (aref ,a ,(1+ i)) (aref ,a ,(+ 2 i)) ...)
fikka has quit [Ping timeout: 256 seconds]
<aeth> For a low number (3-5 maybe?) you'd probably produce faster code, at the cost of not having sequence functions available for your range.
<White_Flame> no, these are large dumps
<aeth> ah, okay
Kundry_Wag has quit [Ping timeout: 245 seconds]
<beach> asarch: Why are you installing McCLIM using apt?
<beach> asarch: You should be using Quicklisp.
<aeth> Lisp libraries in your distribution's package manager are for full applications using Lisp that your distribution happens to ship, such as Maxima.
fikka has joined #lisp
<White_Flame> ...and a 2-character displaced string window sliding across a long input string works. Nifty
<aeth> White_Flame: Oh, 2 characters? I meant something like this (and only the setter needs to be a macro, actually): (declaim (inline two-aref)) (defun two-aref (a i) (values (aref a i) (aref a (1+ i))))
<aeth> (two-aref "Hello, world!" 7) => (values #\w #\o)
fikka has quit [Ping timeout: 264 seconds]
<aeth> Depending on how you're parsing it, that may be better or worse
<White_Flame> well, I'm a complete idiot. PARSE-INTEGER takes a start & end :-P
<aeth> oh
<aeth> Yeah, :start and :end should be on every sequence operation, built-in and library-added, exactly so you don't need this sort of thing.
charh has joined #lisp
milanj has quit [Read error: Connection reset by peer]
<asarch> If I do: (clim-demo:demodemo) I get: no non-whitespace characters in string "".
<asarch> What is that? Full log: http://paste.scsys.co.uk/577686
<phoe> asarch: where do you have your clim from?
<asarch> From quicklisp
<phoe> hm
<asarch> I used to have Debian native packages installed but I remove them
<asarch> beach, my mistake :-(
<asarch> This was the installed package: http://paste.scsys.co.uk/577685
nowhere_man has joined #lisp
milanj has joined #lisp
<White_Flame> hmm, my ffi union between a double-float and a long doesn't match the byte-endianness of doing the same in Javascript's byte buffers. fun
fikka has joined #lisp
Kundry_W_ has quit []
Kundry_Wag has joined #lisp
nowhere_man has quit [Ping timeout: 256 seconds]
nowhere_man has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
surya has joined #lisp
fikka has joined #lisp
nowhere_man has quit [Ping timeout: 240 seconds]
<asarch> Where could I find this function? "The function ASDF/INTERFACE::OPERATION-FORCED is undefined."
<asarch> I mean, what is the name of the package for it?
fikka has quit [Ping timeout: 260 seconds]
<Bike> asdf/interface
<Bike> which is part of asdf, of c ourse
milanj has quit [Read error: Connection reset by peer]
fikka has joined #lisp
milanj has joined #lisp
<asarch> Thank you :-)
Inline has quit [Quit: Leaving]
fikka has quit [Ping timeout: 276 seconds]
<asarch> Ok, doing a (ql:system-apropos "asdf") there is no asdf/interface package
Naergon has joined #lisp
<asarch> There are only those
<Bike> maybe you have a version problem
<asarch> Since Debian's native SBCL cannot use McCLIM from QuickLisp, I downloaded this sbcl-1.4.8-x86-64-linux to use
<Bike> that's quite recent
fikka has joined #lisp
<Bike> er... yeah it's in master too. dunno why it went with some random commit
<asarch> It seem that I have to uninstall everything: http://paste.scsys.co.uk/577688
<Bike> oh, yeah. debian's asdf is old
<Bike> or something
Domaldel has joined #lisp
fikka has quit [Ping timeout: 255 seconds]
ryanbw has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
fikka has joined #lisp
<pjb> White_Flame: have a look at com.informatimago.common-lisp.cesarum.array:nudge-displaced-vector
orivej has joined #lisp
EvW has joined #lisp
kuwze has quit [Quit: Page closed]
<shka_> how can i wait for all tasks submitted with submit-task to finish?
fikka has quit [Ping timeout: 255 seconds]
vap1 has quit [Ping timeout: 260 seconds]
vaporatorius__ has joined #lisp
<pjb> (apropos "submit-task") -> ; No value
quazimodo has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
<shka_> lparallel
<shka_> anyway, does not matter
<shka_> this simply cannot be done by design
<pjb> How do you get the results?
fikka has quit [Ping timeout: 264 seconds]
orivej has quit [Ping timeout: 255 seconds]
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
FreeBirdLjj has joined #lisp
fikka has joined #lisp
Naergon has quit [Ping timeout: 256 seconds]
surya has quit [Ping timeout: 240 seconds]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
fisxoj has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
nicht has joined #lisp
nicht has quit [Max SendQ exceeded]
nicht_ has joined #lisp
nicht_ has quit [Max SendQ exceeded]
<White_Flame> shka_: smells like its notion of channels would have something to do with it
<shka_> White_Flame: exactly
<White_Flame> the notion tends to be called a barrier, when you're waiting on N things to complete
<asarch> One stupid question: what's the problem with CLisp (the implementation)? What's wrong with it? Why SBCL over it?
<pjb> nothing wrong with clisp.
<pjb> This is the implement I use for my scripts.
michael` has joined #lisp
<aeth> asarch: CLISP is an interpreted Lisp that isn't dead (it's still under development) but is a zombie (it hasn't had a new release in 5-7 years, not sure when)
<aeth> asarch: SBCL is the fastest ahead-of-time compiled Lisp, with very frequent releases, and the most helpful warnings/errors (most of the time).
<pjb> It's not a zombie: it's a stable implementation, that doesn't break your programs every month!
<White_Flame> because it's a byte-coded interpreter, clisp is very compatible to run on new platforms
<pjb> But if you want changes, you can always get the HEAD of the git repo, and have fun, eg. with clearvir being integrated into clisp.
* asarch takes notes...
michael` has left #lisp [#lisp]
<aeth> Does CLISP have a larger fixnum and specialized arrays for :element-type single-float and double-float, yet?
<asarch> Oh, I thought it was a sin to use CLisp here
<aeth> CLISP is the odd implementation out in a lot of waves.
<aeth> *ways
msmith has joined #lisp
EvW has quit [Ping timeout: 255 seconds]
makomo has joined #lisp
<edgar-rft> clisp is newbie-friendly because it has a good command-line REPL. Newbies don't need to learn Emacs first. In the long run of course it pays off to learn Emacs, too.
<aeth> If you even have to think about performance at all, you can support SBCL and CCL, and basically cannot support CLISP. If performance is not an issue, use whatever.
<aeth> If you want to use SBCL from the command line, use rlwrap
<pjb> Well again about performance, it depends on what and how. For scripts, clisp is faster.
<pjb> it loads faster (begin much smaller), and it starts to run the script earlier, so for short-running scripts, it will also end earlier.
<White_Flame> where does ECL fit in the performance spectrum?
<aeth> ECL is hard
<pjb> Not really.
<pjb> ecl is the most integrated into unix, since it compiles by generating C code compiled with an external compiler (gcc).
<pjb> Notably, ecl is not "image based", but elf files based.
<aeth> I mean it's hard to figure out the performance of ECL
<pjb> Load time doesn't occur at the same time in ecl. for this reason.
<aeth> You'd probably have to use C profiling tools on ECL
<edgar-rft> compiler-based CL implementations tend to choke with every little typo. Using CLisp turned out to be much friendlier with my idiotic mistakes.
<pjb> Also, ecl is delivered as libecl.so, so you can use it in your other (C) programs.
smurfrobot has quit [Read error: Connection reset by peer]
makomo has quit [Ping timeout: 256 seconds]
<Xof> pjb: I don't believe that clisp's startup is faster than sbcl's. It wasn't the last time I measured
<Xof> (at least not once sbcl's image is in the disk cache)
<pjb> Perhaps it has changed. New benchmarks would be in order… mine were a long time ago too.
<White_Flame> with "startup" including loading the target source code/script?
<pjb> just: time sbcl --eval '(quit)'
<pjb> just: time sbcl --no-userinit --eval '(quit)'
<aeth> If you really want to cheat, just have your script use the SBCL image that's already running to power your stumpwm. Via swank or something.
<edgar-rft> how long will be the startup time from a datasette?
<random-nick> is there a way to tell slime to abort evaluation?
<pjb> On mac, clisp uses half the time than sbcl.
<edgar-rft> random-nick: I usually try C-c C-c
fikka has joined #lisp
<edgar-rft> or C-c C-c C-c C-c .... if two aren't enough
<Xof> pjb: on my laptop, sbcl executes hello world in 0.015s ± 0.003s
<random-nick> edgar-rft: this wasn't in a repl buffer, it was a C-x C-e
<Xof> clisp in 0.023 ± 0.007s
<Xof> ymmv
<asarch> Thank you guys
<asarch> Thank you very much :-)
<asarch> See you later :-)
asarch has quit [Quit: Leaving]
<aeth> pjb: What's the CLISP equivalent of your command? Because I get sbcl --no-userinit --eval '(quit)' 0.00s user 0.00s system 87% cpu 0.008 total
nickenchuggets has joined #lisp
<aeth> Xof: You're using the standard deviation of the mean there, right?
<aeth> pjb: SBCL might run fast for me because it's always running, assuming a different SBCL in memory would have an impact on a new one spawning
defaultxr has joined #lisp
<aeth> In fact, more often than not, there are two SBCLs running, one for stumpwm and one in emacs+slime.
<aeth> I basically only close Emacs when I'm gaming.
fikka has quit [Ping timeout: 240 seconds]
<shka_> White_Flame: yes, i really wanted a barrier here
<White_Flame> Xof: it would be interesting to do that with a script of some dozens of lines of defuns, with a (quit) at the end
<shka_> but nothing like that in lparallel
<shka_> ended up by making queue and spamming futures into it
<White_Flame> well, there are the plain parallel funcalls and such, which I presume would block until all finish. But if you're launching things at arbitrary times, not all at once, then yeah it's more management
pierpal has quit [Read error: Connection reset by peer]
<shka_> it is kinda annoying, because i write this kind of stuff quite a lot
<shka_> essentially tree expansion in parallel
<shka_> i should write macro akin do defpun for that
<Xof> aeth: yes, though I didn't really run it enough times and I did the stats in my head
<aeth> Xof: We can't conclude anything then
<aeth> Do the error propagation of the ratio of CLISP/SBCL
<Xof> we can conclude all sorts of things, depending on our priors
<pjb> The point is that all implementations have their strong points and their weakness. Use all of them!
<pjb> Write strictly conforming code!
<shka_> maybe not… all
<aeth> Xof: I'm getting $1.5 \pm 0.6$ for the ratio of CLISP over SBCL
<shka_> :P
<aeth> The error seems pretty high
<aeth> More samples, I guess?
fikka has joined #lisp
<Xof> told you
<Xof> but in any case, that evidence is consistent with my prior that clisp startup is twice as slow as sbcl
<Xof> vindication!
<Xof> max likelihood is now around 1.75
random-nick has quit [Read error: Connection reset by peer]
<aeth> 1.75x as slow? Sounds about right.
<aeth> s/as slow/as fast/
fikka has quit [Ping timeout: 256 seconds]
<aeth> pjb: Are you using the git version or the release version of CLISP?
pierpal has joined #lisp
smurfrobot has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
fikka has joined #lisp
orivej has joined #lisp
<pjb> git; I compile it myself.
pierpal has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 264 seconds]
<Ukari> multiple value and defstruct, which is better for return result in the form of {a, [...b]}?
<Bike> multiple values are good when you're doing nothing with the results but getting them
<Bike> not storing them or anything
<phoe> Ukari: oh gods
<phoe> for a moment I read "multiple-value-defstruct"
<phoe> and I was like "what in the holy hell"
<White_Flame> you have 2 return values, one always given and the 2nd one being a list?
<White_Flame> I don't quite know what the braces & brackets are supposed to imply
<Ukari> White_Flame, yes
<Ukari> treat is as a json
<Ukari> treat it
<White_Flame> json braces denote an object with "key":val
<Ukari> a json object in javascript es6
<White_Flame> well, in taht case, the 2 values are unordered in that representation ;)
<White_Flame> the tradeoff with just 2 values is a small allocation + having to use slot accessors in the caller; vs the verbosity of multiple-value-bind
<White_Flame> using m-v-b makes a lot of sense
<Ukari> the 2nd list is actually play the same role as a multiple return values
<White_Flame> not in this form it doesn't
<White_Flame> it's a composite
<White_Flame> unless you actually meant returning [....]
<White_Flame> because what's the difference with 'a' being b[0] or its own value?
<White_Flame> btw, fiddling around with SBCL disassemblies, it looks like it fits up to 3 return values in registers before spilling to the stack
<White_Flame> (x86-64)
Kundry_W_ has joined #lisp
fikka has joined #lisp
random-nick has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
wigust- has joined #lisp
wigust has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
vlatkoB has quit [Remote host closed the connection]
makomo has joined #lisp
FreeBirdLjj has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
pierpal has joined #lisp
DemolitionMan has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
fikka has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
<drmeister> Does anyone know what this means?
megalography has quit [Ping timeout: 245 seconds]
<drmeister> The ASDF version that ships with Clasp is 3.3.1.2 - is quicklisp getting some other version of ASDF?
skeuomorf has quit [Ping timeout: 265 seconds]
<drmeister> I feel like I've seen this before and fixed it and now it's back again - but it's been at least a year.
fikka has quit [Ping timeout: 240 seconds]
smurfrobot has quit [Remote host closed the connection]
<nirved> maybe the older version is loaded from the initfile
<drmeister> It happens when I build cando within a docker image - maybe I'm cloning another ASDF in the Dockerfile.
fikka has joined #lisp
varjag has quit [Ping timeout: 264 seconds]
k-stz has joined #lisp
<k-stz> I just updated to emacs26.1+slime2.0 and it freezes for a short time everytime I type in an argument to a function at the repl. It does so for every character
pierpa has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
daniel-s has joined #lisp
smurfrobot has joined #lisp
lumm_ has joined #lisp
lumm has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
<attila_lendvai> k-stz: IIRC you may need to run with slime HEAD
smurfrobot has quit [Ping timeout: 276 seconds]
<k-stz> just found a thread on reddit with exactly the same problem: https://www.reddit.com/r/emacs/comments/8nyl9w/errors_in_sbcl_slime_repl/
lumm_ has quit [Ping timeout: 256 seconds]
<k-stz> attila_lendvai: ok, thanks
attila_lendvai has quit [Quit: Leaving.]
rgc has quit [Quit: Lost terminal]
fikka has quit [Ping timeout: 276 seconds]
kajo has quit [Ping timeout: 255 seconds]
smurfrobot has joined #lisp
kajo has joined #lisp
Bike has quit [Remote host closed the connection]
SaganMan has quit [Ping timeout: 260 seconds]
Bike has joined #lisp
smurfrobot has quit [Ping timeout: 265 seconds]
shka_ has quit [Ping timeout: 260 seconds]
jeosol has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
andrei-n has quit [Ping timeout: 268 seconds]
smurfrobot has joined #lisp
johnvonneumann has joined #lisp
johnvonneumann is now known as Guest70662
Guest57261 has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 276 seconds]
smurfrobot has quit [Ping timeout: 264 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<msmith> so I'm trying to read utf-8 bytes from a file for testing purposes. For some reason, when I read-byte I'm not getting what I expect. here is the paste https://pastebin.com/9rySSXTK
<msmith> anyone have an idea why?
smurfrobot has joined #lisp
<Bike> maybe that's what's in the file. i mean, how would we know
smurfrobot has quit [Ping timeout: 256 seconds]
<msmith> Bike: well the file is large so I posted the first six bytes in the paste
<msmith> but its just the bytes
<pjb> msmith: od -t x1 test/inputs.txt
<pjb> msmith: now, bytes are bytes. There's no such thing as utf-8 bytes.
<pjb> Using an :external-format on a binary file is basically meaningless.
karlosz has quit [Quit: karlosz]
<Bike> oh. yeah there's that.
<pjb> Theorically, an implementation could have different binary file formats, but in practice, not on posix systems.
karlosz has joined #lisp
<Bike> the external format tells lisp how to convert bytes into characters. you're not having it do that, so, pointless.
<pjb> msmith: a file containing text encoded in utf-8 won't contain any null byte. Your file, starting with 129 0 0 0 126, assuming those are the values of the 6 first bytes, is not an utf-8 encoded file.
<pjb> msmith: on the other hand, if your file starts with the string "129 0 0 0 126", then the bytes are actually: (map 'list 'char-code "129 0 0 0 126") #| --> (49 50 57 32 48 32 48 32 48 32 49 50 54) |# and this INDEED starts with the byte 49 which is the ASCII or utf-8 code for #\1 !!!
<Bike> wow, i... hope that's not the problem.
<pjb> So if your file is a TEXT file containing integers representing the values of octets, you must read it as a text file, and use READ to parse those integers.
fisxoj has quit [Quit: fisxoj]
<pjb> Bike: it looks obvious that is the problem :-)
<msmith> yeah, that is the problem thanks
<Bike> aghj
k-stz has quit [Remote host closed the connection]
smurfrobot has joined #lisp
<msmith> not shame here. that's what this community is for. I would think
<msmith> no shame
<pjb> (with-open-file (s p :direction :input :element-type 'character :external-format #+sbcl '(:utf-8 :replacement #\?) #-sbcl :default) (loop for byte = (read s nil nil) while byte collect byte))
<msmith> anyway thanks that helps
karlosz has quit [Client Quit]
<pjb> msmith: you may want to have a look at: https://www.cliki.net/CloserLookAtCharacters and I might write someday a similar page about binary files…
karlosz has joined #lisp
<pjb> msmith: of course, you may want to convert your file to an actual utf-8 encoded file.
<msmith> yeah, I was under the impression that the external format option would cause the with-open-file to read the integers as bytes
<pjb> And yes, don't laugh, but we find this kind of representation/encoding problem a lot of times, in places it shouldn't appear. People (well, "C programmers") don't understand the difference between binary and text, and that hexadecimal is a textual representation for binary, etc.
fisxoj has joined #lisp
<msmith> that's where the confusion came in
<Bike> i wasn't laughing, i was just like, agh
<pjb> And worse, those idiots write data as hexadecimal textual representation and are not able to parse it back in a case insensitive manner, so you find broken middle ware in places you wouldn't believe…
<pjb> middleware and firmware, so it's not even easy to update.
<Bike> if you deliberately wrote in the integers that's a more normal mistake than i was imagining, anyway
smurfrobot has quit [Ping timeout: 265 seconds]
<pjb> In lisp you have to be careful indeed, because you can write a textual representation of a sequence of bytes easily with PRINT in a text file. But it is as easy to write it in binary form with WRITE-SEQUENCE in a binary file.
smurfrobot has joined #lisp
Kundry_W_ has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Pixel_Outlaw has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
smurfrobot has quit [Ping timeout: 264 seconds]
Kundry_W_ has joined #lisp
<karlosz> is there any way to check if a symbol is external in a package without do-external-symbols?
<pjb> (eql :external (nth-value 1 (find-symbol (symbol-name s) (symbol-package s))))
<karlosz> oh, thanks
<pjb> well, use the package you're interested in instead of (symbol-package s) !
<pjb> But then you have to check that find-symbol returns the same symbol.
<pjb> (multiple-value-bind (ps sk) (find-symbol (symbol-name s) p) (and (eq ps s) (eq :external sk)))
Kundry_W_ has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
EvW1 has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
random-nick has quit [Read error: Connection reset by peer]
smurfrobot has joined #lisp
FreeBirdLjj has joined #lisp
karlosz has quit [Ping timeout: 240 seconds]
smurfrobot has quit [Ping timeout: 240 seconds]
wigust- has quit [Ping timeout: 240 seconds]
smurfrobot has joined #lisp
MoziM has quit [Quit: WeeChat 2.1]
smurfrobot has quit [Ping timeout: 264 seconds]
Arcaelyx_ has joined #lisp
Arcaelyx has quit [Ping timeout: 255 seconds]
smurfrobot has joined #lisp
nowhere_man has joined #lisp
smurfrobot has quit [Ping timeout: 260 seconds]
Inline has joined #lisp
smurfrobot has joined #lisp
varjag has joined #lisp
fisxoj has quit [Ping timeout: 240 seconds]
zotan has quit [Quit: ZNC 1.6.5+deb1 - http://znc.in]
varjag has quit [Ping timeout: 245 seconds]
smurfrobot has quit [Ping timeout: 264 seconds]
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
zachk has joined #lisp
zachk has quit [Changing host]
zachk has joined #lisp
msmith has quit [Quit: Leaving.]
quazimodo has joined #lisp
eMBee has quit [Ping timeout: 240 seconds]
daniel-s has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 256 seconds]
Oladon has quit [Quit: Leaving.]
vaporatorius__ has quit [Ping timeout: 240 seconds]
smurfrobot has joined #lisp
fikka has joined #lisp
smurfrobot has quit [Ping timeout: 240 seconds]
X-Scale has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
smurfrobot has joined #lisp
fikka has joined #lisp
Fare has joined #lisp
nickenchuggets has quit [Read error: Connection reset by peer]
nickenchuggets has joined #lisp
smurfrobot has quit [Ping timeout: 240 seconds]
blu3r4d0n is now known as pmn
pmn is now known as blu3r4d0n
fikka has quit [Ping timeout: 260 seconds]
blu3r4d0n is now known as philipmark
philipmark is now known as blu3r4d0n
sauvin_ has joined #lisp
sauvin has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
_whitelogger has joined #lisp
skapata has quit [Ping timeout: 240 seconds]
skapata has joined #lisp
mflem has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]