jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <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
makomo has quit [Ping timeout: 250 seconds]
terpri has joined #lisp
robotoad has quit [Quit: robotoad]
stardiviner has quit [Quit: WeeChat 2.3]
stardiviner has joined #lisp
stardiviner has quit [Client Quit]
stardiviner has joined #lisp
Kundry_Wag has joined #lisp
Mr-Potter has quit [Ping timeout: 246 seconds]
Patzy has quit [Ping timeout: 250 seconds]
Patzy has joined #lisp
sjl has quit [Ping timeout: 272 seconds]
robotoad has joined #lisp
Bike has joined #lisp
elfmacs has joined #lisp
sjl has joined #lisp
zmv has joined #lisp
notzmv has quit [Ping timeout: 245 seconds]
trafaret1 has quit [Read error: Connection reset by peer]
jack_rabbit has joined #lisp
zmv is now known as notzmv
arescorpio has joined #lisp
stardiviner has quit [Quit: WeeChat 2.3]
sjl has quit [Ping timeout: 250 seconds]
stardiviner has joined #lisp
jochens has joined #lisp
jochens has quit [Ping timeout: 272 seconds]
AdmiralBumbleBee has quit [Quit: If I just put this here then...]
pjb has quit [Ping timeout: 252 seconds]
arescorpio has quit [Read error: No route to host]
Kundry_Wag has quit [Remote host closed the connection]
yyyyyy has joined #lisp
pjb has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
meepdeew has quit [Remote host closed the connection]
phax has joined #lisp
rumbler31 has joined #lisp
Khisanth has quit [Ping timeout: 245 seconds]
dale has quit [Quit: dale]
stardiviner has quit [Quit: WeeChat 2.3]
stardiviner has joined #lisp
rnmhdn has joined #lisp
sjl has joined #lisp
kdas_ has joined #lisp
kushal has quit [Ping timeout: 256 seconds]
esrse has joined #lisp
Khisanth has joined #lisp
robotoad has quit [Quit: robotoad]
sjl has quit [Ping timeout: 268 seconds]
robotoad has joined #lisp
arescorpio has joined #lisp
cpt_nemo has quit [Ping timeout: 252 seconds]
eminhi has joined #lisp
shrdlu68 has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
brettgilio has joined #lisp
rnmhdn has quit [Ping timeout: 240 seconds]
smokeink has joined #lisp
gxt has quit [Quit: WeeChat 2.3]
dddddd has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
Necktwi has quit [Quit: leaving]
Necktwi has joined #lisp
abbe has quit [Ping timeout: 252 seconds]
CCDell has quit [Read error: Connection reset by peer]
CCDell has joined #lisp
eMBee has quit [Ping timeout: 268 seconds]
abbe has joined #lisp
CCDell has quit [Quit: Leaving]
eMBee has joined #lisp
rnmhdn has joined #lisp
<no-defun-allowed> if i have a quri uri object, how do i turn it back into a string?
<no-defun-allowed> got it, render-uri
elfmacs has quit [Ping timeout: 264 seconds]
emaczen has joined #lisp
brettgilio has quit [Remote host closed the connection]
<desvox> "How to NEVER use lambdas" in python
<desvox> wooowwwwwwwww that is wild
<desvox> also the first comment is "it looks like lisp!" and HAAAAAAAAA anyone who writes lisp anywhere near that needs to have their computers taken away
shrdlu68 has quit [Ping timeout: 246 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
igemnace has joined #lisp
mrcom has quit [Read error: Connection reset by peer]
yyyyyy has quit [Ping timeout: 268 seconds]
ebrasca has quit [Remote host closed the connection]
kdas_ is now known as kushal
<no-defun-allowed> in lisp at least that kinda thing doesn't look like a cat sat on your keyboard though
<no-defun-allowed> it's almost as if...lambdas are half important and aren't munted to hell in cl
<desvox> *gasp*
Bike has quit [Quit: Lost terminal]
<no-defun-allowed> then again if you want to do fp in python you may as well mow your lawn with your teeth
mrcom has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
slyrus1 has joined #lisp
glassofethanol has joined #lisp
glassofethanol has left #lisp [#lisp]
rumbler31 has quit [Remote host closed the connection]
slyrus1 has quit [Ping timeout: 245 seconds]
<White_Flame> desvox: that actually reminds me more of javascript
<White_Flame> especially with the imports being passed as parameters
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
<beach> Good morning everyone!
arescorpio has quit [Read error: Connection reset by peer]
rnmhdn has quit [Ping timeout: 272 seconds]
equwal has joined #lisp
rumbler31 has joined #lisp
neirac has quit [Read error: Connection reset by peer]
sauvin has joined #lisp
zmt01 has quit [Quit: Leaving]
zmt00 has joined #lisp
elfmacs has joined #lisp
eminhi has quit [Remote host closed the connection]
stardiviner has quit [Quit: WeeChat 2.3]
stardiviner has joined #lisp
stardiviner has quit [Client Quit]
stardiviner has joined #lisp
elfmacs has quit [Quit: WeeChat 2.3]
elfmacs has joined #lisp
rumbler31 has quit [Remote host closed the connection]
themsay has quit [Ping timeout: 268 seconds]
rnmhdn has joined #lisp
equwal has quit [Read error: Connection reset by peer]
varjag has joined #lisp
_whitelogger has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
mathrick has quit [Read error: Connection reset by peer]
fouric has joined #lisp
<fouric> Quicklisp is refusing to load any of my local projects, complaining that it can't locate them.
<fouric> I have symlinks from Quicklisp's local-projects/ dir to my projects
<fouric> the ASD files are in place
<fouric> the system definitions are correct, because i just loaded them
<fouric> QL can install projects from the official repo
<fouric> ...and everything was working until i reinstalled QL
<fouric> any suggestions?
<fouric> (i mean, i'm probably doing something silly, but i can't think of what it is)
<fouric> hmmm, and ql:register-local-projects hangs
rumbler31 has joined #lisp
varjag has quit [Ping timeout: 245 seconds]
megalography has quit [Ping timeout: 268 seconds]
rnmhdn has quit [Quit: WeeChat 2.3]
rnmhdn has joined #lisp
mrcom has quit [Read error: Connection reset by peer]
<beach> Wild guess: circular symlinks?
wigust- has joined #lisp
wigust has quit [Ping timeout: 240 seconds]
smokeink has quit [Ping timeout: 246 seconds]
smokeink has joined #lisp
varjag has joined #lisp
schweers has joined #lisp
robotoad has quit [Quit: robotoad]
razzy has quit [Remote host closed the connection]
makomo has joined #lisp
rnmhdn has quit [Ping timeout: 246 seconds]
<no-defun-allowed> also, checked you can cd into the symlinked directory? i'm pretty bad at ln and i get symlinks which go nowhere
themsay has joined #lisp
yvy has joined #lisp
rumbler31 has quit [Remote host closed the connection]
angavrilov has joined #lisp
stardiviner has quit [Ping timeout: 250 seconds]
<no-defun-allowed> how do i give a package a nickname?
<no-defun-allowed> also, is it a nickname? i'm looking for the mapping that makes COMMON-LISP-USER into CL-USER i suppose
<flip214> no-defun-allowed: http://clhs.lisp.se/Body/m_defpkg.htm
<jdz> RENAME-PACKAGE
<no-defun-allowed> oh, i thought it wasn't actually in the standard. thanks
<White_Flame> package local nicknames aren't in the standard. Standard nicknames are still global
mrcom has joined #lisp
<no-defun-allowed> right, thanks, that's much clearer
adam4567 has joined #lisp
adam4567 has left #lisp [#lisp]
<fouric> i have cd'ed into the symlinked directories, but ty for the suggestion
<fouric> how would i check that? they're certainly not immediately recursive
<fouric> i don't *think* that the symlinks are circular
<flip214> fouric: brute-force test is "find . -follow" ;)
<flip214> my find then gives "find: File system loop detected;"
kajo has quit [Ping timeout: 268 seconds]
Cymew has quit []
slyrus1 has joined #lisp
Zaab1t has joined #lisp
Cymew has joined #lisp
slyrus1 has quit [Ping timeout: 250 seconds]
zmt01 has joined #lisp
zmt00 has quit [Ping timeout: 268 seconds]
mrcom has quit [Read error: Connection reset by peer]
heisig has joined #lisp
SaganMan has joined #lisp
mrcom has joined #lisp
yvy has quit [Ping timeout: 250 seconds]
jochens has joined #lisp
hhdave has joined #lisp
Mr-Potter has joined #lisp
hhdave_ has joined #lisp
rumbler31 has joined #lisp
hhdave has quit [Ping timeout: 272 seconds]
hhdave_ is now known as hhdave
Elephant454 has quit [Quit: ERC (IRC client for Emacs 26.1)]
zmt01 has quit [Ping timeout: 250 seconds]
zmt00 has joined #lisp
shifty has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
zmt00 has quit [Ping timeout: 250 seconds]
SaganMan has left #lisp ["WeeChat 1.6"]
zmt00 has joined #lisp
razzy has joined #lisp
rnmhdn has joined #lisp
Bike has joined #lisp
themsay has quit [Ping timeout: 272 seconds]
themsay has joined #lisp
themsay has quit [Ping timeout: 246 seconds]
sindan has joined #lisp
themsay has joined #lisp
rumbler31 has quit [Remote host closed the connection]
themsay has quit [Ping timeout: 246 seconds]
themsay has joined #lisp
<schweers> Given (defvar *foo* ... ), will (multiple-value-bind (*foo*) ... ) do the same as let?
<schweers> The hyperspec says that the variable binding created are exical unless special declarations are specified. I’m not sure if that covers DEFVAR, or if I need extra declarations inside the M-V-B.
igemnace has quit [Quit: WeeChat 2.3]
<jackdaniel> schweers: defvar declares variable special
<schweers> I know, I’m just a little confused by the wording in the hyperspec, as to whether that is sufficient.
<jackdaniel> so (defvar *foo* 3) (defun bar (*foo*) (call-something-else)) (bar 14) ; ←← bar will bind variable *foo* to 14
<schweers> Huh, interesting use of special variables :D Thanks!
<schweers> The thing is, in sbcl is looks good, I wanted to know if I can rely on this.
<jackdaniel> you can, when defvar / defparameter the compiler "must recognize the name has been proclaimed special"
<Odin-> Having both dynamic and lexical bindings is kinda nutty.
<Odin-> Just sayin'.
<jackdaniel> estabilishing dynamic context saves you from a nutty api with gazzilion arguments carries just to pass to next function
<jackdaniel> s/carries/carried/
<Odin-> I'm not saying it's not useful.
<jackdaniel> I know, I'm just noting, that alternative may be worse (nut-wise)
dddddd has joined #lisp
<beach> So many things are nutty. Multiple inheritance, multiple dispatch, first-class packages, first-class symbols, closures. You name it.
<Odin-> beach: I'd also suggest the ability to switch out the readtable counts.
<beach> Definitely.
<Odin-> Nutty isn't bad, it's just distinctive.
<jackdaniel> imo it is the way someone uses tools in the box defines whenever code is nutty or not (not the tools themself)
<Odin-> jackdaniel: Well, sure. But I've also found it causes a bit of friction when you're dealing with other languages and you're used to having all these (crazy) options that suddenly just aren't there. :)
<beach> Don't deal with other languages then!
* splittist finds it hard not to think of Austin Powers when faced with "nutty"
* Odin- has never seen even one of the Austin Powers films.
<jackdaniel> sure, dropping to use assembler after you are used to have functions may be tedious, same goes for dropping to C after you are used to closures and when dropping to CL when you are used to monads/hygienic macros/whatever common lisp doesn't seem to have
<jackdaniel> afair Paul Graham called it a blub paradox
<Odin-> beach: If only that were an option.
angavrilov has quit [Remote host closed the connection]
angavrilov has joined #lisp
ebrasca has joined #lisp
<beach> It may be a tough choice, but it is always an option.
robdog_ has joined #lisp
quipa has joined #lisp
figurelisp has joined #lisp
nopolitica has quit [Ping timeout: 250 seconds]
smokeink has quit [Ping timeout: 246 seconds]
jochens has quit [Ping timeout: 272 seconds]
nopolitica has joined #lisp
smokeink has joined #lisp
kajo has joined #lisp
esrse has quit [Remote host closed the connection]
atgreen has joined #lisp
<atgreen> good morning.. I'm looking for something like mapcar that only accumulates non-null results - like a filter. Is there something in the language already for that?
<otwieracz> remove nil. :)
<beach> atgreen: (loop for element in list when (something element) collect it)
<atgreen> thanks... I think 'remove-if' is probably what I want.
rnmhdn has quit [Ping timeout: 268 seconds]
<atgreen> such a huge language..
<TMA> atgreen: see also MAPCAN
<beach> Well, if you are not going to process your element, then (remove nil ...) works as otwieracz suggested.
frgo has joined #lisp
<atgreen> I'm going to perform a test, and remove those that fail
<beach> I see.
<beach> That's not quite "like mapcar" which would keep the processed elements.
<shka__> just use remove, remove-if, remove-if-not or whatever works
<shka__> or you can loop
<shka__> which also works
frgo has quit [Remote host closed the connection]
<atgreen> beach: I guess I wasn't clear... I should have said "but only" instead of "that only"?
<beach> atgreen: Both those descriptions should like (remove nil (mapcar #'fun list))
<beach> i.e. FUN would be applied to the elements before they are collected.
<beach> But I understand what you mean now.
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
dmiles has quit [Ping timeout: 250 seconds]
DGASAU has quit [Ping timeout: 250 seconds]
edgar-rft has quit [Ping timeout: 272 seconds]
rnmhdn has joined #lisp
<flip214> Can I ask CFFI whether it found a function (during runtime, because of save/load image!), to provide some fallback?
edgar-rft has joined #lisp
<flip214> Or is having a HANDLER-CASE or similar around it the best I can do?
Odin- has quit [Ping timeout: 268 seconds]
dmiles has joined #lisp
Guest14049 has joined #lisp
rumbler31 has joined #lisp
<ogamita> flip214: you can ask.
kajo has quit [Ping timeout: 252 seconds]
Odin- has joined #lisp
<jackdaniel> flip214: cffi doesn't have such functionality
<jackdaniel> you can't also depend on a specific condition across implementation (it simply calls underlying implementation thing)
<jackdaniel> implementations*
<jackdaniel> (as a side note: ecl has defla macro - define lisp alternative - in its ffi)
rumbler31 has quit [Ping timeout: 250 seconds]
<ogamita> Yes, you can look at cffi::%foreign-funcall to see how it finds the function. It's implementation-dependant.
ogamita has left #lisp ["ERC Version 5.3 (IRC client for Emacs)"]
ogamita has joined #lisp
jochens has joined #lisp
smokeink has quit [Ping timeout: 250 seconds]
orivej has quit [Ping timeout: 240 seconds]
<flip214> ogamita: ack, thanks.
<flip214> I now do a version check of the library used.
robdog_ has quit [Remote host closed the connection]
<ogamita> flip214: for portability, you may use dlopen and dlsym directly.
robdog_ has joined #lisp
aindilis has quit [Ping timeout: 246 seconds]
<flip214> Is there a CFFI type for uint64_t?
<flip214> Or would I specify that as (unsigned-byte 64) in DEFCFUN?
<jackdaniel> flip214: there is
pierpal has quit [Ping timeout: 268 seconds]
<jackdaniel> :uint64
<jackdaniel> there are variants for 8, 16, 32 and 64
<Odin-> Aren't there types corresponding to all the standard C inttypes?
<flip214> jackdaniel: ah, thanks. didn't see that in (define-type-mapping)
orivej has joined #lisp
<jackdaniel> Odin-: fixed-width integer types were added in C99
<jackdaniel> ANSI C defines only short int, int, long int and long long afair, and how many bits are assigned to each is platform dependent
<jackdaniel> most notably unix and windows disagree on what is long int on 64 bit platforms
<jackdaniel> s/ANSI C/ANSI C89/
<jackdaniel> flip214: when I was poking cffi api I've found examples tests/ directory very useful
<Odin-> jackdaniel: Correct me if I'm wrong, but I do believe ISO 9899 superseded ANSI X3.159...
<jackdaniel> examples in tests/ directory *
<jackdaniel> I don't know these numbers, so I can't correct you nor confirm
<Odin-> jackdaniel: IOW, yes, but that _is_ the standard. :p
<jackdaniel> you have many platforms and different standard coverage
<jackdaniel> afaik C had even newer standard than c99
<Odin-> (Although they're up to 2018 by now.)
<jackdaniel> which is not fully supported by gcc, clang, msvc etc
<jackdaniel> c99 has partial support in many compilers (i.e tcc aka tiny c compiler doesn't support complex float type)
<Odin-> jackdaniel: That doesn't change the fact that there is a standard set of integer types.
<jackdaniel> so we may declare that all that is obsolete and stop caring, but that would be greatly impractical approach
<ogamita> There's stdint.h with int32_t uint32_t int_least32_t uint_least32_t int_fast32_t uint_fast32_t intmax_t uintmax_t.
<jackdaniel> well, C standard has now for multiprocessing too, yet I still prefer to depend on pthreads
<ogamita> From TS 18661-1:2014
<ogamita> Now I target C11…
<Odin-> jackdaniel: That's a distinct issue.
<jackdaniel> I doubt people when confronted with wording "standard C" will assume C99 or C11 (C89 is much more probable)
neirac has joined #lisp
<ogamita> So people basically, still use programming languages that were standardized before they were born. They should use ANSI CL…
<jackdaniel> at best your wording was sloppy, at worst you are refusing to stand being corrected. not that I care ,p
* jackdaniel gets back to lisp
<Odin-> jackdaniel: Your "correction" makes assumptions I don't share.
<shka__> C has complex numbers now?
<jackdaniel> my drama limit has been reached around 5m ago, so whatever
<jackdaniel> shka__: c99 has
<shka__> oh
<Odin-> shka__: C99 had them, but I believe C11 made them optional again.
<shka__> i didn't knew that
<jackdaniel> (or C since C99 version)
Bike is now known as Bicyclidine
SaganMan has joined #lisp
rnmhdn has quit [Ping timeout: 252 seconds]
<neirac> is there any recommended plotting package ?
<beach> It is very easy to plot with McCLIM, but it depends on the kind of plot you want.
<jackdaniel> neirac: if you pursue simple charts, then https://common-lisp.net/project/adw-charting/ is a very good library to have that
<neirac> I'm using ccl, I just need a stacked area plot
<neirac> jackdaniel thanks, I'll take a look
<jackdaniel> but I think it may not have stacked area plots implemented
<jackdaniel> if you want a toolbox from which you could build whichever chart you desire looking at McCLIM may be a good idea
smokeink has joined #lisp
<neirac> jackdaniel awesome lib!, I'll use it and settle for bar charts. I'll check McCLIM out of curiosity
<jackdaniel> nb: that would be a nice project to write a library explicitly for plotting in McCLIM (and not overly hard)
Necktwi has quit [Ping timeout: 246 seconds]
rumbler31 has joined #lisp
<neirac> beach McCLIM looks pretty good, I saw also climacs is that discontinued? not able to reach cvs
<beach> neirac: It's in Quicklisp I think.
<beach> neirac: But I am not working on (first) Climacs anymore. The plan is for Second Climacs, a significant improvement.
<neirac> beach awesome is there a repo to check out Climacs 2 ?
rumbler31 has quit [Ping timeout: 245 seconds]
<neirac> jackdaniel have you used adw-charting ? I'm trying some examples from there but fails. I'm using quicklisp for loading :adw-charting-google
<jackdaniel> I did a few months back
<jackdaniel> uint: are you around? (uint wrote a tool which uses it)
<neirac> I'm trying 4.2.2 but fails with : Undefined function :PIE called with arguments (300 200) . [Condition of type CCL::UNDEFINED-FUNCTION-CALL]
<jackdaniel> I've used vecto backend
<neirac> I'll go with vecto backend meanwhile
Necktwi has joined #lisp
smokeink has quit [Ping timeout: 250 seconds]
<beach> neirac: Yes, but it is not functional at the moment.
figurelisp has left #lisp [#lisp]
<neirac> jackdaniel I'm doing something wrong then, the vecto backend gives me the same error. (ql:quickload '(:cffi :dexador :plump :lquery :lparallel :str :adw-charting-vecto)) it seems to be loading adw but trying the vecto example fails.
shifty has quit [Ping timeout: 246 seconds]
<neirac> this is what I have https://pastebin.com/i2jXjGU0
<jackdaniel> neirac: now when I think about it there could be some api issues, I think I've fixed them as they were encountered looking at the source code
<jackdaniel> but I don't remember details at all, sorry
<neirac> jackdaniel oh ok, thanks
Bike has joined #lisp
<jackdaniel> (it might be that the problem was that api has changed but readme didn't)
<neirac> jackdaniel :), I switched to vgplot just to advance quicker
robdog_ has quit [Remote host closed the connection]
<beach> neirac: That only took a few minutes.
easye has joined #lisp
jochens has quit [Remote host closed the connection]
scymtym has quit [Ping timeout: 245 seconds]
jochens has joined #lisp
<neirac> beach can I export the plot to png ?. I'll check clim vgplot examples are not working
<beach> I think we have PDF output, but I don't know the details.
<beach> loke and jackdaniel know more.
igemnace has joined #lisp
vaporatorius has joined #lisp
frgo has quit [Remote host closed the connection]
<loke> beach: There is PDF output. Wasn't slyrus working on it?
Mr-Potter has quit [Ping timeout: 245 seconds]
jochens has quit [Remote host closed the connection]
jochens has joined #lisp
<beach> Ah, yes, I think you are right.
frgo has joined #lisp
<jackdaniel> we have PDF, PostScript and PNG output-only backends
<beach> Fantastic!
<jackdaniel> (in fact, by PNG I mean whole set of supported raster image formats covered by opticl)
<beach> Of course! Silly me.
<jackdaniel> some features are not implemented in all backends (i.e raster has transparency, while two others do not)
<shka__> is it possible to have transparency in pdf?
jochens has quit [Ping timeout: 246 seconds]
frgo has quit [Read error: Connection reset by peer]
frgo_ has joined #lisp
<flip214> shka__: a PDF is mostly transparent... apart from the shapes you paint.
frgo_ has quit [Remote host closed the connection]
<shka__> right
frgo has joined #lisp
<flip214> that said, you can eg. cut a rectangle out of another rectangle before painting it, ie. build masks as well
<jackdaniel> shka__: it is easy to verify it
<shka__> convert png to pdf?
<jackdaniel> no, type "transparency pdf" in search engine
<shka__> well, yeah, i guess
<jackdaniel> also what flip214 says, you may first gather output records, compose them on the renderer side and after that create a resulting pdf
rumbler31 has joined #lisp
jochens has joined #lisp
Guest14049 has quit [Ping timeout: 252 seconds]
FreeBirdLjj has joined #lisp
Mr-Potter has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
jochens has quit [Remote host closed the connection]
jochens has joined #lisp
jochens has quit [Remote host closed the connection]
jochens has joined #lisp
dale_ has joined #lisp
dale_ is now known as dale
neirac has quit [Quit: Leaving]
elfmacs has quit [Ping timeout: 250 seconds]
atgreen has quit [Ping timeout: 244 seconds]
LiamH has joined #lisp
rippa has joined #lisp
Inline has joined #lisp
notzmv has quit [Ping timeout: 250 seconds]
warweasle has joined #lisp
rnmhdn has joined #lisp
nckx has quit [Quit: Updating my GNU GuixSD server — gnu.org/s/guix]
nckx has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
esper0s has joined #lisp
<esper0s> hi everyone
<shka__> esper0s: good evening
robotoad has joined #lisp
<esper0s> iam currently going through the book SICP which uses the mit-scheme lisp dialect. I want to find the best way to run mit-scheme through emacs, would that be installing mit-sheme and then as suggested by the manual the XSCHEME library?
FreeBirdLjj has joined #lisp
<shka__> although this may be missleading, this channel is dedicated to the common lisp specificly
<shka__> therefore not scheme
neirac has joined #lisp
<shka__> having said that, i used racket
<shka__> ;-)
<esper0s> thank you shka__ will look it up
hhdave has quit [Ping timeout: 244 seconds]
schweers has quit [Ping timeout: 250 seconds]
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<Bike> esper0s: the #scheme channel might be helpful
hhdave has joined #lisp
rumbler31 has joined #lisp
<beach> esper0s: Some people apparently do the exercises in Common Lisp instead.
nowhere_man has joined #lisp
<esper0s> beach are you trying to convert me already hahaha, just kidding
<esper0s> difference between scheme and common lisp?
<beach> Of course I am. As shka__ pointed out, this is a Common Lisp channel.
<beach> esper0s: Too many to list here. I think pjb has a comparison somewhere.
<shka__> esper0s: to be fair, you can do most of it in CL just fine
hhdave has quit [Ping timeout: 245 seconds]
<beach> But you couldn't do the PCL exercises in Scheme. :)
rumbler31 has quit [Ping timeout: 268 seconds]
josh5tone has quit [Ping timeout: 245 seconds]
vaporatorius has quit [Quit: Leaving]
<beach> I also often hear that the #scheme channel is very quiet, so if you need help, you are better of needing help with Common Lisp than with Scheme.
robotoad_ has joined #lisp
<esper0s> thank you
<esper0s> iam currently at both
<esper0s> they suggested i run mit-scheme using the mit-scrheme editor edwin
robotoad has quit [Ping timeout: 240 seconds]
<beach> esper0s: About the differences, modern Common Lisp uses object-oriented programming CLOS-style a lot, and there is nothing equivalent in Scheme, so the idiomatic programming style is very different in the two languages.
robotoad_ has quit [Quit: robotoad_]
Mr-Potter has quit [Ping timeout: 250 seconds]
atgreen has joined #lisp
<heisig> esper0s: I think Geiser (http://www.nongnu.org/geiser/) is quite nice for Scheme programming on Emacs. But, as beach hinted, you should also give Common Lisp a try :)
<esper0s> thank you all for your help, i try to keep the learning scope narrow because it is big already as it is, i do plan on learning lisp in general but you gotta crawl before you walk :) thank you all again
<ogamita> esper0s: the advantage of CL is that all implementations implement the same CL language. Not so true with scheme.
FreeBirdLjj has joined #lisp
<ogamita> I could not learn scheme beause each time it was with a different implementation, a different language. Once I tried CL, and next time it was the same language, even if the implementation changed. So I could make progress with CL.
<esper0s> right i see
<esper0s> it makes sense what you are saying
edgar-rft has quit [Quit: Leaving]
<neirac> is there a doc on how to plot usin mcclim ?
<jackdaniel> only Examples/ directory
<neirac> I just tested most of the packages for plotting and I cannot make them work
<beach> You just use the drawing functions like I did in my screen shot.
<neirac> this was also a good one http://guicho271828.github.io/eazy-gnuplot/
<ogamita> A lot of them use GNUplot, so you need to install it.
FreeBirdLjj has quit [Ping timeout: 250 seconds]
<jackdaniel> I would go with gnuplot bindings instead of McCLIM. While hacking something with it is fairly easy it requires some initial work. also getting chart things like axis, legend, nice colors etc will take more than a few minutes to implement
<jackdaniel> but if you want to try McCLIM join #clim, I'm sure you'll get any help you need to hack your way through
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
robotoad has joined #lisp
xkapastel has joined #lisp
Kundry_Wag has joined #lisp
slyrus1 has joined #lisp
scymtym has joined #lisp
jmercouris has joined #lisp
mathrick has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
<neirac> ogamita, yes I already have gnuplot installed, vgplot works but only the first plot after that it starts failing.
milanj has joined #lisp
<neirac> it seems my setup was wrong, now eazy-gnuplot seems to do something
atgreen has quit [Ping timeout: 250 seconds]
aindilis has joined #lisp
notzmv has joined #lisp
buffergn0me has quit [Ping timeout: 252 seconds]
buffergn0me has joined #lisp
<beach> jackdaniel: I am looking at the size of some parts of ECL and Clasp. It looks like almost half the source lines of C code in ECL consist of Unicode stuff. :)
marvin2 has quit [Ping timeout: 240 seconds]
<beach> jackdaniel: Does it seem right to you that, excluding Unicode stuff, ECL has around 170kLOC of C?
heisig has quit [Ping timeout: 250 seconds]
<jackdaniel> beach: sorry, I can't estimate that without looking
<jackdaniel> and yes, unicode tables take a lot (but they are arguably not source but data)
<beach> Indeed.
<jackdaniel> beach: 55kLOC
<beach> I must have done something wrong then.
<jackdaniel> (I'm not counting libgc nor libgmp)
<beach> Ah, OK.
<pfdietz> Tiny
<jackdaniel> type in src/c directory "find . -name \*.d | xargs wc -l "
<beach> Got it.
<beach> Is libgc the Boehm/Weiser collector?
<jackdaniel> if that's not a secret, why are you investigating these things?
<beach> Just to get an idea of how much code it takes to implement Common Lisp.
<beach> I guess I am bored.
<jackdaniel> yes. libgc is boehm. ecl had its own gc (written in C) and the module had 1200 LOC
<beach> OK.
<jackdaniel> but it was removed around 2007 I think (I have a very vague plans to resurrect it)
<jackdaniel> s/a very/very/
mathrick has quit [Ping timeout: 250 seconds]
kajo has joined #lisp
sjl has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
goreye has quit [Ping timeout: 246 seconds]
cage_ has joined #lisp
jochens has quit [Remote host closed the connection]
jochens has joined #lisp
francogrex has joined #lisp
<francogrex> hi i would like an 'elegant' concise piece of code that allows me to read the last row in a flat file with over a million rows (using i suppose readline and random access file-position)... any ideas?
shka_ has joined #lisp
<Xach> francogrex: elegant but not fast?
<Xach> because the most elegant is to set a thing to the result of reading a line and when the file is at its end, return that thing.
themsay has quit [Ping timeout: 240 seconds]
jochens has quit [Ping timeout: 246 seconds]
<Xach> francogrex: if i were doing it, and i wanted it to be a little faster, i would read a big binary chunk from the end and scan the chunk for the end-of-line markers i want, then convert the binary data between markers to a string.
<francogrex> Xach no i mean fast too,
themsay has joined #lisp
<francogrex> ok yes thx
rumbler31 has joined #lisp
themsay has quit [Ping timeout: 250 seconds]
mathrick has joined #lisp
francogrex has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
themsay has joined #lisp
rumbler31 has quit [Ping timeout: 244 seconds]
cage_ has quit [Ping timeout: 240 seconds]
cage_ has joined #lisp
<LdBeth> The most efficient is mmap the file
<shka_> hello
<shka_> slime REPL seems behaves oddly for me
<LdBeth> Hi shka_
<shka_> it scrolls whole content so i am left with empty screen
<shka_> i can scroll up, but it used to be different
<shka_> how can i fix it?
<shka_> hm, i did not touch this
<LdBeth> It might be related to your window size
<shka_> i will check that now
themsay has quit [Ping timeout: 246 seconds]
<LdBeth> I’m using a patched Emacs for mac, so I might not experience the same problem
astronavt has joined #lisp
atgreen has joined #lisp
sauvin has quit [Remote host closed the connection]
frgo has quit [Remote host closed the connection]
varjag has joined #lisp
nopolitica has quit [Ping timeout: 246 seconds]
pjb has joined #lisp
nanoz has joined #lisp
hiroaki has joined #lisp
astronavt has quit [Quit: Leaving]
mathrick has quit [Ping timeout: 272 seconds]
frgo has joined #lisp
rnmhdn has quit [Ping timeout: 240 seconds]
frgo has quit [Ping timeout: 268 seconds]
jmercouris has quit [Ping timeout: 246 seconds]
meepdeew has joined #lisp
notzmv has quit [Quit: WeeChat 2.3]
kajo has quit [Ping timeout: 268 seconds]
eminhi has joined #lisp
SaganMan has quit [Quit: WeeChat 1.6]
kajo has joined #lisp
warweasle has quit [Quit: later]
milanj has quit [Quit: This computer has gone to sleep]
rumbler31 has joined #lisp
eminhi has quit [Quit: leaving]
rumbler31 has quit [Ping timeout: 250 seconds]
jochens has joined #lisp
jochens has quit [Ping timeout: 246 seconds]
makomo has quit [Ping timeout: 246 seconds]
yvy has joined #lisp
Essadon has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
nanoz has quit [Ping timeout: 245 seconds]
kajo has quit [Ping timeout: 268 seconds]
mindCrime has quit [Read error: Connection reset by peer]
makomo has joined #lisp
buffergn0me has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
buffergn0me has joined #lisp
kooga has quit [Ping timeout: 268 seconds]
kooga has joined #lisp
<Gnuxie[m]> can anyone tell me why this library decides to raise an error when it can't find a value for a key?
<Gnuxie[m]> seems like a bad idea
yvy has quit [Ping timeout: 250 seconds]
akoana has joined #lisp
neirac has quit [Remote host closed the connection]
kajo has joined #lisp
<Gnuxie[m]> A: because they have a keyp function
akoana has quit [Quit: Leaving]
orivej has quit [Ping timeout: 252 seconds]
ah_ has joined #lisp
orivej has joined #lisp
ah_ is now known as ankoana
ankoana is now known as akoana
shifty has joined #lisp
Mr-Potter has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
warweasle has joined #lisp
shka_ has quit [Ping timeout: 268 seconds]
themsay has joined #lisp
marvin2 has joined #lisp
pjb has joined #lisp
pjb has quit [Remote host closed the connection]
mulk has joined #lisp
pjb has joined #lisp
milanj has joined #lisp
nopolitica has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
pjb has quit [Remote host closed the connection]
gxt has joined #lisp
gxt has quit [Ping timeout: 245 seconds]
gxt has joined #lisp
mulk has quit [Quit: ZNC - http://znc.in]
rumbler31 has joined #lisp
scymtym has joined #lisp
nopolitica has quit [Quit: WeeChat 2.2]
cage_ has quit [Remote host closed the connection]
jfb4 has joined #lisp
angavrilov has quit [Remote host closed the connection]
rumbler31 has quit [Ping timeout: 244 seconds]
sjl has quit [Ping timeout: 246 seconds]
Mr-Potter has quit [Ping timeout: 240 seconds]
mulk has joined #lisp
actuallybatman has quit [Ping timeout: 250 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
sjl has joined #lisp
hiroaki has quit [Ping timeout: 245 seconds]
yvy has joined #lisp
<aeth> Gnuxie[m]: All of the JSON libraries are incredibly bad in different ways last time I took a look at them (who knows? maybe there's another 4 now)
<aeth> so "seems like a bad idea" can be applied to all of them :-p
<Gnuxie[m]> hmmm okie
<aeth> One problem is that JSON is designed to be a trivial mapping to JS and coincidentally has very similar data structures in most other scripting languages.
<aeth> CL is not one of these languages
Bike has quit []
<aeth> It looks like jsown has improved recently. From the readme, "Recently, functions and macros have been added to ease the burden of writing and editing jsown objects." I guess that's the changes "a year ago" (2017-11-08) on Github.
atgreen has quit [Ping timeout: 240 seconds]
<Gnuxie[m]> oh ok, that's nice
frgo has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
<aeth> Gnuxie[m]: Okay, the problem with jsown is that it appears to use alists for JSON data structures with the :obj prefix, not bad. But then for []s it uses regular, unprefixed lists, causing an ambiguity between nil-as-() and nil-as-false. It resolves this ambiguity by allowing :false or :f as the JS false value, but it *should* resolve this ambiguity by prefixing it lists instead.
<aeth> In fact, it should be configurable which sequence results from [] because you might want vectors or (simple-array single-float (3))s or something, not lists, and now you've just added a conversion step. "high performance".
<aeth> It looks like jsown might be the least ridiculous of the JSON libraries I'm aware of at the moment, though. At least it doesn't have nil<->null and nil<-false and nil<-[] like some of them.
frgo has quit [Ping timeout: 250 seconds]
<Gnuxie[m]> hmmm yeah, I started with cl-json and that was much more horrid than this
<aeth> (Similarly, a proper JSON library should let you choose between alists, plists, and hash-tables, with the third (hash-table) option potentially messing things up if you take in arbitrary JSON)
<aeth> At least it prefixes the alists, though. So it gets a 50% for avoiding ambiguity in 1/2 of the data structures. :-p
yvy has quit [Read error: Connection reset by peer]
<aeth> It looks like jsown is *not* for serializing arbitrary standard-objects/structure-objects/etc. into JSON, though, which is a good thing. That's doing work at too high of a level imo.
<aeth> Overall, it looks like I'd give it a 7/10, which is probably several points higher than the other JSON libraries I've seen.
<jasom> Here's how I use cl-json for a bijective mapping: https://github.com/jasom/cl-fccs/blob/master/src/util.lisp#L25
<aeth> jasom: Yes, it's nice that cl-json is generic enought that it can be configured to do things (somewhat) correctly, so that's an advantage over cl-jsown. Of course, defaults matter, and its defaults are terrible.
<aeth> jsown gets you closer to correctness (with the issues above that I noted) but afaik you can't get all of the way there, unlike (potentially) with cl-json
<jasom> the defaults are terrible on all of the options with the possible exception of the one that decodes everything to a standard-object with its own class heirarchy
LiamH has quit [Quit: Leaving.]
<jasom> yason is pretty close as well, and has very simple configuration to make it sane
<aeth> jasom: Well, I just said what would work, at least until you get into 2+ dimensional arrays. :null<->null, nil<->false, prefix []s if lists so no truly empty list is possible because it would be something like '(:json-list), and allow the user to determine which sequence to encode/decode [] as, perhaps with a metadata scheme to allow multiple in one file.
<jasom> It does default to [], null, false all being the same though
<aeth> You *only* need two backends for [] encoding/decoding unless you want to support multi-dimensional arrays: list and array, since the rest would just be an :element-type in make-array
<jasom> json doesn't have multidimensional arrase, right?
<aeth> jasom: Right, the complicating factor in the sequence/array generic approach to [] would be if you wanted to turn [[1, 2, 3], [4, 5, 6]] into #2A((1 2 3) (4 5 6)) and vice versa.
<jasom> that seems a bit too high-level for me, though I could see the domains in which it would be useful.
<aeth> You could, of course, not even attmept to solve it, and then you just have the list and 1D array backend, and it's pretty simple, the typical work-on-all-standard-sequences kind of exercise
<aeth> jasom: It seems high level, but unlike a total object mapping, it's kind of necessary for efficiency for the same reason that you want to be able to specify (simple-array single-float (3))s as well: avoid coercing into the array you want, which could be expensive for long arrays.
<aeth> Most APIs break down when you have to copy a 10,000 element array a few times :-p
<jasom> aeth: but what about [[1,2,3],[4,5,6],...[7,8,9,10]]? You need to read the whole thing already
<jasom> If you enforce a schema on your json content then you are fine, but short of that...
<aeth> jasom: You would probably have to anotate what kind of array you expect in the API
mrcom has quit [Read error: Connection reset by peer]
<aeth> jasom: Because then you would either error on the first row (wrong row size) or when you either have too many or too few rows compared to what you expect.
<aeth> jasom: So this would only work efficiently if (i) there was some form of metadata, either in a separate JSON schema, or in the JSON file itself, or in the program code or (ii) every array was of the same type.
<jasom> st-json is the library I was trying to think about where you will always write out json equivalent to what you read by default, but unfortunatley it's nil <-> [] which I don't like.
<aeth> jasom: So you would probably do this at a higher level library, but you would have to be able to support this sort of thing in the JSON library itself, or else you're just going to be allocating a bunch of sequences and then coercing, which won't work for some JSON formats with large arrays like e.g. 3D models (and, yes, for some reason, people do this in JSON sometimes)
<aeth> jasom: ":null<->null, nil<->false, prefix []s if lists" is the only way to handle it imo. Well, perhaps something other than :null, but it has to be a keyword or symbol.
<aeth> It's fairly cheap to prefix/unprefix lists afaik.
<jasom> I concur, but write-what-you-read should be table-stakes and st-json and com.gigamonkeys.json appear to be the is the only ones that do that out-of-the-box
<aeth> The way to handle the sequence-generic [] would probably be to either (i) make it the same every time (so request lists, vectors, or some other sequence type) or (ii) override it with some sort of internal schema format that can be generated by various schema/etc. methods
Kundry_Wag has joined #lisp
quipa has quit [Ping timeout: 240 seconds]
<aeth> "some other sequence type" would be tricky. The easy/lazy way would be to just have length/element-type/etc. from make-array as part of the API. The hard way would be to use an extension (if possible; is it CLtL2?) to actually parse a result type so it can behave like #'map... but that 2nd approach won't get you everything (e.g. adjustable arrays with fill pointers)
quipa has joined #lisp
akoana has quit [Quit: Leaving]
varjag has quit [Ping timeout: 240 seconds]
sjl has quit [Ping timeout: 250 seconds]
milanj has quit [Quit: This computer has gone to sleep]
mrcom has joined #lisp
akoana has joined #lisp
<esper0s> i have got a general question which is not related to lisp but the process of learning. I have found many times that when reading a book on programming i find nmyself spending a lot of time learning the formal way of expressing concepts as stated in the book. Do you consider such an action vain? Sorry for the irrelevance of the question to the channel
akoana has quit [Quit: Leaving]
kinlo has left #lisp [#lisp]
dorketch has joined #lisp
terpri has quit [Read error: Connection reset by peer]
<jasom> possibly stupid question: are condition types classes? The spec lists a "Class Precendence List" for them, but I can't find anywhere that says that any condition type other than "condition" is a class.
<phadthai> they can be implemented with CLOS but not necessarily need to be (predating it if I remember)
<Xach> jasom: my long-term understanding is that they are not required to be classes or to use clos
<phadthai> esper0s: difficult to judge on learning methods, I think that learning the style is also good, however some books may not be considered good style today, or may be considered closer to scheme-style than cl-style
<jasom> Xach: condition is specifically defined to not have standard-class as the metaobject, but it's not clear on whether or not e.g. define-condition creates a new class (that is not required to be a standard-class)
<phadthai> esper0s: and I'm not sure if I understood well enough your question, likely not if my answer seems irrelevant :)
<Xach> oh
<jasom> Xach: e.g. is (defmethod foo ((bar parse-error)) ...) conforming?
<phadthai> implementation specific I think
pacon has quit [Disconnected by services]
bmansurov has joined #lisp
pacon has joined #lisp
<jasom> what is confusing is that it shows a class precedence list for the standard condition types, whereas other non-class types do not (e.g. short-float).
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
<jasom> also, from 9.1: "A hierarchy of condition classes is defined in Common Lisp."
Essadon has quit [Quit: Qutting]
rumbler31 has joined #lisp