knicklux has joined #lisp
knicklux has quit [Ping timeout: 255 seconds]
emers2n has joined #lisp
knicklux has joined #lisp
Oladon1 has joined #lisp
asarch has joined #lisp
<asarch> From the point of view of Lisp, what's wrong with C++?
Oladon has quit [Ping timeout: 240 seconds]
<asarch> I've read a lot of bad jokes about this programming language
<asarch> But I still cannot realize the reason of it
<aeth> asarch: C++ pretends that it's on the low-level side of the high-level languages, but it has high-level syntax, which makes metaprogramming painful. It also inherits all of the security/safety flaws of C by being compatible with C.
bmgxc9 has joined #lisp
<asarch> I see
<aeth> Lisp doesn't force a high-level infix string representation of source code on top of the abstract syntax tree that's underneath, which makes things like macros actually doable.
Rawriful has quit [Quit: WeeChat 1.4]
<aeth> Templates, C-style macros (i.e. string macros), and other generic/template/macro systems tend to be complicated, hard, painful, and easy to make mistakes in. Lisp-style macros (i.e. structural macros) avoid most of those issues.
<aeth> e.g. If you need to interface with something that expects some string format, you can just write a CL macro to generate a string. Doing so is very similar to writing a function, but it will produce a string at macro-expansion-time, which can mean that string will be compiled into the native compiled form (usually a FASL file).
<aeth> This is an easy exercise in Common Lisp.
thebardian has joined #lisp
klltkr has joined #lisp
Josh_2` has quit [Remote host closed the connection]
joast has joined #lisp
Zhivago has joined #lisp
bmgxc9 has quit [Quit: Leaving]
* asarch takes notes...
bmgxc9 has joined #lisp
astronavt has joined #lisp
orivej has quit [Ping timeout: 248 seconds]
thebardian has quit [Remote host closed the connection]
astronavt has quit [Ping timeout: 255 seconds]
astronavt has joined #lisp
astronavt has quit [Client Quit]
astronavt has joined #lisp
thebardian has joined #lisp
emers2n has quit [Ping timeout: 260 seconds]
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tobbi has joined #lisp
ryanwatkins has quit [Ping timeout: 248 seconds]
damke_ has joined #lisp
ryanwatkins has joined #lisp
xfwduke has joined #lisp
<pillton> Xach: How does the "latest tag/release" work?
<XachX> pillton: by checking github.
<pillton> Xach: Is that something that is automatically done or do you have to manually do it?
zooey has quit [Ping timeout: 248 seconds]
<XachX> Automatic
damke has quit [Ping timeout: 240 seconds]
EvW has quit [Ping timeout: 252 seconds]
<pillton> How do you discriminate between a release tag and a development tag?
attila_lendvai has quit [Ping timeout: 252 seconds]
<pjb> develop-4_1-thingy vs. release_5_0
<pillton> pjb: I am referring to what quicklisp does.
<pjb> I thought it was manual.
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
zooey has joined #lisp
PressAI has joined #lisp
resttime has joined #lisp
pmetzger has quit []
greyavenger has quit [Ping timeout: 240 seconds]
PressAI has quit [Remote host closed the connection]
klltkr has joined #lisp
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
igemnace has joined #lisp
<jibanes> how to set the default heap size on lispworks?
thebardian has quit [Remote host closed the connection]
vzerda has quit [Ping timeout: 255 seconds]
SuperJen has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
JenElizabeth has quit [Ping timeout: 240 seconds]
smokeink has joined #lisp
bmgxc9 has quit [Quit: Leaving]
bmgxc9 has joined #lisp
caseyowo has joined #lisp
Tobbi has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quazimod1 has quit [Ping timeout: 268 seconds]
knicklux has quit [Ping timeout: 248 seconds]
milanj has quit [Quit: This computer has gone to sleep]
test1600 has joined #lisp
dpg has joined #lisp
papachan has quit [Quit: WeeChat 0.4.2]
milanj has joined #lisp
knicklux has joined #lisp
jameser has joined #lisp
thebardian has joined #lisp
aeth has quit [Ping timeout: 260 seconds]
ahungry has joined #lisp
attila_lendvai has quit [Quit: Leaving.]
aeth has joined #lisp
python476 has quit [Ping timeout: 240 seconds]
trocado has quit [Ping timeout: 248 seconds]
Reinhilde is now known as Ellenor
dpg has quit [Ping timeout: 240 seconds]
d4ryus1 has joined #lisp
d4ryus has quit [Ping timeout: 260 seconds]
mdeden has joined #lisp
bobbytab_ has joined #lisp
Kyo91` has joined #lisp
bobbytab_ has left #lisp [#lisp]
ryanwatkins has quit [Ping timeout: 268 seconds]
EvW has joined #lisp
_krator44 has quit [Changing host]
_krator44 has joined #lisp
_krator44 has joined #lisp
_krator44 is now known as krator44
ryanwatkins has joined #lisp
EvW has quit [Ping timeout: 248 seconds]
White_Flame has quit [Ping timeout: 260 seconds]
bluesmonk has quit [Quit: WeeChat 1.4]
Kyo91` has quit [Ping timeout: 240 seconds]
pierpa has quit [Quit: Page closed]
lrvy has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Ukari has joined #lisp
ryanwatkins has quit [Ping timeout: 240 seconds]
bmgxc9 has quit [Remote host closed the connection]
jack_rabbit has quit [Remote host closed the connection]
ryanwatkins has joined #lisp
jack_rabbit has joined #lisp
caseyowo has quit [Ping timeout: 248 seconds]
jack_rabbit has quit [Quit: Leaving]
jack_rabbit has joined #lisp
Ukari has quit [Remote host closed the connection]
damke has joined #lisp
mdeden has quit [Remote host closed the connection]
damke_ has quit [Ping timeout: 240 seconds]
astronavt has quit [Disconnected by services]
astronavt has joined #lisp
astronavt has quit [Disconnected by services]
astronav_ has joined #lisp
mson has joined #lisp
astronav_ has quit [Remote host closed the connection]
dieggsy has joined #lisp
<dwts> hey guys, doing something like this: curl http://api.urbandictionary.com/v0/define?term={nuts} I'm getting a json output. I'm trying to perform the same results with drakma. But drakma complains about illegal characters(curly brackets)
<dwts> is this feasible using drakma?
<Bike> with drakma you give ti the GET parameters separately and not as part of the url, maybe
<Bike> either that or just urlencode
<beach> Good morning everyone!
EvW1 has joined #lisp
fikka has joined #lisp
astronav_ has joined #lisp
<dwts> Bike: hmmm...the drakma documentation says to use this kind of syntax: (drakma:http-request "http://lisp.org/") . Can't find it documented either the separate GET parameters
<Bike> :parameters
<hooman> going to see how GNU Common Lisp is doing
fikka has quit [Ping timeout: 248 seconds]
<pjb> dwts: the answer is somewhere in http://w3.org
<dwts> pjb: lol, thanks! I was expecting a shorter answer on that :P
<pjb> try url encoding.
lisp_guest has quit [Ping timeout: 248 seconds]
dieggsy has quit [Remote host closed the connection]
quazimodo has joined #lisp
<loke`> dwts: The full parameter documentation for drakma is in the docstring for HTTP-REQUEST
<dwts> loke`: thanks! is there an easy way to access to that docstring directly through emacs?
<loke`> dwts: Put your cursor on the function name and press C-c C-d
<loke`> Sorry... C-c C-d C-d
Bike has quit [Quit: Lost terminal]
rumbler31 has quit [Remote host closed the connection]
<dwts> yep, that worked. I'm getting a nil in my request though, which is not expected
<loke`> dwts: What request?
<loke`> Your http-reqeust to lisp.org works fine for me.
<loke`> OK, I see your problem. You have two solutions:
quazimodo has quit [Ping timeout: 240 seconds]
shka has joined #lisp
<loke`> One is to remove the braces. They are not needed:
<dwts> loke`: I'm trying something different. (defparameter *k* (drakma:url-encode "http://api.urbandictionary.com/v0/define?term={nuts}" :utf-8)) Then this: (drakma:http-request *k* :method :get)
<loke`> Listen...
<loke`> First of all: You don't want the curly brcaes there in the first place.
<dwts> loke`: hm, you say that the brackets aren't needed, please continue
<loke`> I'm guessing you have read the API documentation, where the curlies are there to indicate that this is where you put your own text.
<loke`> secondly, in order to have all the URL encoding working correctly, you should use the :PARAMETERS argument:
<loke`> (drakma:http-request "http://api.urbandictionary.com/v0/define" :parameters '(("term" . "nuts")))
<resttime> If you don't mind some newer libs check out dexador: https://github.com/fukamachi/dexador
<resttime> Outputs -> "{\"tags\":[],\"result_type\":\"no_results\",\"list\":[],\"sounds\":[]}"
<loke`> resttime: His problem si that he's passing the curlies. Even if he encodes them correctly he'll get an error message tfrom the remote server
<resttime> {nuts} is in the URL I request as well
<loke`> resttime: And if you do that properly, using :PARAMETERS, then you get "no results"
<resttime> oh wait whoops
<loke`> resttime: Get. Rid. Of. The. Curlies.
<resttime> This works alright
<resttime> Yeah
<resttime> Misunderstood what was being asked lol
<resttime> dwts: You're trying to use what I suppose is curl syntax with other things, this wouldn't even work if you used like Python or something
<dwts> guys I see your point regarding brackets
<resttime> Unless a Python lib specifically tried to parse those {}
<dwts> thanks a lot
quazimodo has joined #lisp
<dwts> while what loke` suggested get's executed successfully(drakma http-request), I still don't see the json output
<dwts> haven't yet tried with dex
xfwduke has quit [Ping timeout: 255 seconds]
EvW1 has quit [Ping timeout: 255 seconds]
<loke`> dwts: It's returned as binary data. You can eiter convert it using something libe (babel:octests-to-string ... :encoding :urf-8)
<loke`> or, you can try to convonce drakma to convert it yourself:
<dwts> ooh
<dwts> I see
<dwts> thanks a lot, this certainly needs more reading. Haven't done this before
<dwts> thanks a lot
<dwts> I'll check babel
dddddd has quit [Remote host closed the connection]
<resttime> I'm hoping you have quicklisp installed
<loke`> (ql:quickload "babel")
<dwts> yep it's already installed in my system
<loke`> The drakma documentation says: ”If the message body doesn't have a text content type or if FORCE-BINARY is true, the body is always returned as an array of octets.”
<loke`> The request you make returns application/json, which is why it's returned as a binary vector and not a string.
fikka has joined #lisp
<dwts> loke`: I see your point. But how can one see the value of FORCE-BINARY ?
<dwts> I mean I don't see it in the output
<loke`> dwts: You probably want to pass the decoded output to something like ‘st-json’ or one of the other JSON libraries.
<loke`> dwts: :FORCE-BINARY is the oppostie of what you want.
<dwts> ah wait, it says, "application/json"
<resttime> Ah here we go, I recall something that's nice. If you want drakma to convert to text automatically: (push (cons "application" "json") drakma:*text-content-types*)
<loke`> You should do something like (babel:octets-to-string (drakma:http-request ...) :encoding :utf-8)
<loke`> resttime: Ah yes... Thanks you.
<dwts> loke`: I'm trying to figure out the way you are debugging this.
<dwts> resttime: unbelievable, that worked! :O
<loke`> dwts: I'm not debugging anything. I know drakma pretty well (even though I missed the part about *TEXT-CONTENT-TYPES*)
<resttime> dwts, loke`. Just remembered running into it some time before couldn't recall top of head but a good old google helps all the time :)
<dwts> loke`: yeah, takes some time to get used to the output. there's enough info there I guess, now I noticed the full message: (:CONTENT-TYPE . "application/json; charset=utf-8")
<loke`> resttime: In 99% of cases, I use :WANT-STREAM, and just wrap it in a flexi-stream to do the parsing anyway.
<loke`> I guess that the *TEXT-CONTENT-TYPES* has the benefit of parsing the ;charset= parameter for you... In case you meet a server that is insane enough to give you JSON with a non-utf-8 encoding. :-)
<dwts> thanks a lot guys. That is enough to start the experimentation I guess.
aoeu256 has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 248 seconds]
<dwts> also, that is the first time I meet the aleph server
quazimodo has quit [Ping timeout: 248 seconds]
antoszka has joined #lisp
<loke`> resttime: dex is not on QL, it seems.
<resttime> Oh it's dexador -> dex is the nickname for the package
<loke`> resttime: Ah, thanks.
<resttime> Fukamachiware is pretty neat, I've used his other things before and like them
knobo has joined #lisp
ryanwatkins has quit [Ping timeout: 248 seconds]
<loke`> resttime: I notice dex properly checks certificate validity.
<loke`> that's a constant issue with drakma.
<loke`> On the other hand, I don't see a way to override that.
quazimodo has joined #lisp
<loke`> Hmm... :INSECURE T is supposed to do that, but it doesn't work.
lrvy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lrvy has joined #lisp
White_Flame has joined #lisp
ryanwatkins has joined #lisp
oleo has quit [Quit: Leaving]
pjb has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
Arcaelyx has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has quit [Remote host closed the connection]
jameser has joined #lisp
astronav_ has quit [Remote host closed the connection]
Oladon1 is now known as Oladon
Oladon is now known as Guest5307
Guest5307 is now known as Oladon
<resttime> loke`: Try with the request :stream T
<loke`> resttime: Which one? (the :STREAM argument is supposed to be a stream)
<resttime> (dex:get "https://google.com" :stream t :insecure t) Something like that should be making a new stream with the right flags I think
zmt00 has quit [Quit: Leaving]
quazimodo has quit [Ping timeout: 248 seconds]
dpg has joined #lisp
shrdlu68 has quit [Ping timeout: 240 seconds]
<loke`> resttime: That gives me an error message saying that T is not a stream.
<resttime> Huh I wonder if there's some version miss match or something or OS issue
<resttime> Quicklisp dexador-20171019
<resttime> Linux x64
<resttime> SBCL
<loke`> #<SYSTEM dexador / dexador-20170830-git / quicklisp 2017-09-20>
<resttime> Perhaps it's version issue then since I've got dexador-20171019-git
<loke`> This is qeird:
<loke`> You already have the latest version of "quicklisp": 2017-09-20.
<loke`> What do you get when typing (ql:update-all-dists)
<resttime> For me its "You already have the latest version of "quicklisp": 2017-10-23."
<resttime> !!
<loke`> aaaaargh
<loke`> It's the goddamn coprporate web proxy
<resttime> lol
<loke`> Why, oh why, doesn't QL use HTTPS
<resttime> Actually wait nvm tat commit has nothing to do with it lol
<loke`> Hmm... I'm now connecting via a different proxy that cirumvents the corporate proxy
<loke`> And I still can't get the newer version.
thebardian has quit [Remote host closed the connection]
alpert has joined #lisp
vlatkoB has joined #lisp
caseyowo has joined #lisp
knicklux has quit [Ping timeout: 240 seconds]
<loke`> I've deleted the quicklisp directory and loading again to see if it fixes it
xfwduke has joined #lisp
quazimodo has joined #lisp
<loke`> Now it works.
<resttime> Including the dexador?
<loke`> OK, even with :stream t and :insecure t, I still get an SSL error
<loke`> I'm trying to connect to a server with a self-signed cert.
<loke`> No wait. It's not self-signed. It's signed with a cert. It's just not a public cert.
<loke`> The onyl way I can get around this, it seems, is by getting the cert used for signing and add that manually.
<loke`> That sucks.
<resttime> Fixable? Or I assume it's the same for drakma
Ukari has joined #lisp
knicklux has joined #lisp
angavrilov has joined #lisp
safe has quit [Read error: Connection reset by peer]
AX31_A13X has quit [Quit: AX31_A13X]
quazimodo has quit [Ping timeout: 248 seconds]
<resttime> Hmmm, drakma seems cool with it, this might be a valid issue
Karl_Dscc has joined #lisp
knicklux has quit [Ping timeout: 258 seconds]
<resttime> I think I found the issue with dexador
<resttime> Just gotta double check a bit
knicklux has joined #lisp
ahungry has quit [Remote host closed the connection]
rumbler31 has joined #lisp
mishoo_ has joined #lisp
<resttime> OMG lol
<resttime> I was right right before
<resttime> This commit did fix it hahahaha
<resttime> It added a :verify keyword and tahdah
<resttime> loke`: Should be alright once the newest dist hits quicklisp
BigSafari has joined #lisp
<resttime> Tested it with a another self-certified site thing as well
d4ryus1 is now known as d4ryus
flamebeard has joined #lisp
rumbler31 has quit [Ping timeout: 268 seconds]
<resttime> And the relevant issue: https://github.com/fukamachi/dexador/issues/42
<resttime> I should pay more attention :/
damke_ has joined #lisp
fikka has joined #lisp
dec0n has joined #lisp
damke has quit [Ping timeout: 240 seconds]
neoncontrails has quit [Remote host closed the connection]
neoncontrails has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
neoncontrails has quit [Ping timeout: 250 seconds]
lrvy has quit [Quit: Textual IRC Client: www.textualapp.com]
lisp_guest has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
Oladon has quit [Read error: Connection reset by peer]
asarch has quit [Remote host closed the connection]
Oladon has joined #lisp
ryanwatkins has quit [Ping timeout: 248 seconds]
Ukari has quit [Ping timeout: 240 seconds]
xantoz has quit [Ping timeout: 255 seconds]
scymtym has quit [Ping timeout: 248 seconds]
shka has quit [Ping timeout: 240 seconds]
smokeink has quit [Ping timeout: 260 seconds]
ryanwatkins has joined #lisp
dpg has quit [Ping timeout: 240 seconds]
xantoz has joined #lisp
quazimodo has joined #lisp
alexmlw has joined #lisp
zaquest_ has joined #lisp
mson has quit [Quit: Connection closed for inactivity]
Ven has joined #lisp
Ven is now known as Guest85501
dpg has joined #lisp
zaquest has quit [Ping timeout: 248 seconds]
smokeink has joined #lisp
fikka has joined #lisp
dpg has quit [Ping timeout: 240 seconds]
jameser has quit [Max SendQ exceeded]
fikka has quit [Ping timeout: 264 seconds]
jameser has joined #lisp
Guest85501 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cymew has joined #lisp
Ven has joined #lisp
jameser_ has joined #lisp
mishoo__ has joined #lisp
Ven is now known as Guest409
mishoo_ has quit [Ping timeout: 248 seconds]
jameser has quit [Ping timeout: 240 seconds]
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
<Shinmera> Dexador is nicely fast (drakma is dog slow), but I've had some issues with it just erroring over simple stuff
Guest409 has quit [Client Quit]
<Shinmera> Don't remember the context of the breakage, but it wasn't even anything about cl+ssl.
Ven has joined #lisp
Ven is now known as Guest63647
Guest97254 has quit [Changing host]
Guest97254 has joined #lisp
Guest97254 is now known as mrspec
pfdietz has quit [Ping timeout: 260 seconds]
pfdietz has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
scymtym has joined #lisp
pfdietz has quit [Ping timeout: 250 seconds]
arbv has quit [Ping timeout: 250 seconds]
TMA has joined #lisp
orivej has joined #lisp
arbv has joined #lisp
pfdietz has joined #lisp
knicklux has quit [Remote host closed the connection]
sz0 has joined #lisp
fikka has joined #lisp
quazimodo has quit [Ping timeout: 248 seconds]
hhdave has joined #lisp
milanj has joined #lisp
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
Cymew has quit [Remote host closed the connection]
norserob has quit [Quit: leaving]
BigSafari has quit [Ping timeout: 240 seconds]
Amplituhedron has quit [Ping timeout: 248 seconds]
hhdave has quit [Ping timeout: 248 seconds]
norserob has joined #lisp
mishoo_ has joined #lisp
varjag has joined #lisp
mishoo__ has quit [Ping timeout: 248 seconds]
Cymew has joined #lisp
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
_cosmonaut_ has joined #lisp
hhdave has joined #lisp
Ukari has joined #lisp
manualcrank has quit [Quit: WeeChat 1.9.1]
caseyowo has quit [Ping timeout: 255 seconds]
Xal has quit [Ping timeout: 260 seconds]
Guest63647 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #lisp
Ven is now known as Guest85201
Xal has joined #lisp
yeticry has quit [Ping timeout: 248 seconds]
nsrahmad has joined #lisp
yeticry has joined #lisp
Tobbi has joined #lisp
Guest85201 has quit [Read error: Connection reset by peer]
Ven has joined #lisp
Ven is now known as Guest16662
Ven has joined #lisp
Guest16662 has quit [Read error: Connection reset by peer]
Ven is now known as Guest4030
yeticry_ has joined #lisp
yeticry has quit [Read error: Connection reset by peer]
Ellenor is now known as Reinhilde
nirved has joined #lisp
Ukari has quit [Remote host closed the connection]
eSVG has quit [Quit: Leaving]
nsrahmad has quit [Ping timeout: 252 seconds]
milanj has quit [Quit: This computer has gone to sleep]
milanj has joined #lisp
Cymew has quit [Remote host closed the connection]
xfwduke has quit [Ping timeout: 248 seconds]
quazimodo has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
fikka has quit [Ping timeout: 248 seconds]
quazimodo has quit [Ping timeout: 240 seconds]
igemnace has quit [Quit: WeeChat 1.9.1]
m00natic has joined #lisp
BigSafari has joined #lisp
Guest4030 has quit [Read error: Connection reset by peer]
test1600 has quit [Quit: Leaving]
Ven has joined #lisp
fikka has joined #lisp
Ven is now known as Guest21780
Guest21780 has quit [Read error: Connection reset by peer]
Ven_ has joined #lisp
damke has joined #lisp
damke_ has quit [Ping timeout: 240 seconds]
rgrau has joined #lisp
strelox has joined #lisp
aoeu256 has joined #lisp
xantoz has quit [Ping timeout: 240 seconds]
jameser_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xantoz has joined #lisp
yeticry has joined #lisp
yeticry_ has quit [Read error: Connection reset by peer]
resttime has quit [Remote host closed the connection]
Cymew has joined #lisp
Cymew has quit [Ping timeout: 240 seconds]
milanj has quit [Quit: This computer has gone to sleep]
Ukari has joined #lisp
xantoz has quit [Ping timeout: 255 seconds]
Ven_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Ven has joined #lisp
Ven is now known as Guest96202
<angelo_> hi
angelo_ is now known as Trasformatore
<Trasformatore> hi again
<phoe> hey hi
easye has quit [Ping timeout: 240 seconds]
minion has quit [Read error: Connection reset by peer]
specbot has quit [Read error: Connection reset by peer]
specbot has joined #lisp
minion has joined #lisp
raynold has quit [Quit: Connection closed for inactivity]
araujo has joined #lisp
dpg has joined #lisp
Guest96202 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xantoz has joined #lisp
Cymew has joined #lisp
quazimodo has joined #lisp
dlf42 has joined #lisp
easye has joined #lisp
quazimodo has quit [Ping timeout: 248 seconds]
Ukari has quit [Ping timeout: 268 seconds]
Bicyclidine has joined #lisp
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
resttime has joined #lisp
dpg has quit [Ping timeout: 255 seconds]
damke_ has joined #lisp
damke has quit [Ping timeout: 240 seconds]
BigSafari has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Cymew has quit [Remote host closed the connection]
danieli has quit [Ping timeout: 240 seconds]
EvW has joined #lisp
dddddd has joined #lisp
klltkr has joined #lisp
alpert has quit [Remote host closed the connection]
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
alpert has joined #lisp
alpert has quit [Remote host closed the connection]
alpert has joined #lisp
dpg has joined #lisp
alpert has quit [Remote host closed the connection]
attila_lendvai has quit [Client Quit]
dpg has quit [Client Quit]
hvxgr has joined #lisp
EvW has quit [Ping timeout: 255 seconds]
Jesin has quit [Quit: Leaving]
papachan has joined #lisp
Cymew has joined #lisp
Bicyclidine has quit [Ping timeout: 255 seconds]
EvW1 has joined #lisp
smokeink has quit [Remote host closed the connection]
dlf42 has quit [Remote host closed the connection]
aoeu256 has quit [Ping timeout: 268 seconds]
Devon has joined #lisp
sz0 has joined #lisp
aoeu256 has joined #lisp
jstoddard has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
jameser has joined #lisp
jameser has quit [Client Quit]
Josh_2 has joined #lisp
mson has joined #lisp
araujo has quit [Quit: Leaving]
Bike has joined #lisp
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
asarch has joined #lisp
BigSafari has joined #lisp
<drmeister> Hi everyone
<drmeister> I saw a discussion about DWARF yesterday.
<drmeister> Is anyone interested in writing a Common Lisp library to parse DWARF? It would be generally useful to get Common Lisp to understand C++ code.
<Xach> I feel like I've seen a dwarf parser in the past
<jurov> drmeister: smoke does that (but used only for qt afaik)
<drmeister> I'm interested because we've got a Common Lisp compiler (Clasp) that generates DWARF and I'd like to use a DWARF interpreter for the debugger.
<drmeister> Xach: I know of a dwarf parser for guile but not Common Lisp.
<Xach> https://github.com/angavrilov/cl-linux-debug/blob/master/code-info/dwarf.lisp is the first thing on google, but i don't think that's what i was remembering.
fikka has quit [Ping timeout: 252 seconds]
<drmeister> Well, well, well - ask and ye shall receive.
milanj has joined #lisp
<drmeister> What did you google? I swear I've used the google dozens of times looking for things like this.
<drmeister> If anyone knows anything about Common Lisp libraries to interpret DWARF - I'd love to hear about it.
danieli has joined #lisp
danieli has quit [Changing host]
danieli has joined #lisp
<drmeister> We generate DWARF and are going to do it better in the near future with the wonderful new cst-to-ast source tracking features that beach has added to Cleavir.
<drmeister> But like the cursed cook who can prepare sumptuous meals - but never taste them - we generate DWARF but cannot interpret it.
fikka has joined #lisp
alexmlw has quit [Remote host closed the connection]
<jurov> Seems I've found a quicklisp/asdf bug. When a system has a.lisp and b.lisp and macro in b.lisp calls a function A from a.lisp at loading time...
<drmeister> In other news - Clasp now has multithreading with compacting semi-conservative garbage collection.
<jurov> ...later I updated A, but the compiled macro was not recompiled by quicklisp, I had to remove cached fasl files.
<Shinmera> drmeister: but is it fast
danieli has quit [Read error: Connection reset by peer]
danieli has joined #lisp
danieli has joined #lisp
danieli has quit [Changing host]
oleo has joined #lisp
<drmeister> Some things are and some things aren't. Integer numerical code is approaching C/Fortran speed - maybe off by a factor of 2. The compiler is slow.
<Xach> jurov: you changed a.lisp and saved the file but b.lisp was not updated when you used (asdf:load-system "your-system")?
<Shinmera> drmeister: I mean MPS
BigSafari has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Xach> jurov: recompiled, that is
<Shinmera> drmeister: Last time we had MPS running it was a significant factor slower than Boehm
<jurov> Xach: yes, i used (ql:quickload 'the-local-project)
<Xach> jurov: i would be interested in seeing a distilled example
<Shinmera> jurov: Is a.lisp a dependency of b.lisp?
<Xach> like, the two files and the system definition
<drmeister> Shinmera: Ah - yes - I haven't profiled it much yet but it's about as fast as Boehm. The bottlenecks we experience are not due to the GC.
<drmeister> The problems we had before were probably due to a multi-megabyte character property array that was being allocated during startup.
<jurov> Xach: no dependencies are defined in the .asd file
<drmeister> Stassats found that and we removed it. It was also being created in ECL - but not to the same extent.
<Xach> jurov: the relationship between files is important - those are dependencies
<Xach> with :serial t, each file depends on all the previously listed files
fikka has quit [Ping timeout: 252 seconds]
<drmeister> I don't look to our previous experiences with MPS as illuminating anything about performance - there were too many problems with my implementation.
<drmeister> It's a brand new day.
<jurov> Xach ah yes, the a.lisp and b.lisp are just listed as components without any :depends-on info
<Xach> jurov: and no :serial t?
Jesin has joined #lisp
<drmeister> The thing about MPS is that allocations are just pointer bumps. Once we get allocations inlined into the Common Lisp code that uses them - they will be as fast as they can be.
<jurov> Xach: Neither.
<Xach> jurov: ok. then that will work only by coincidence.
<Xach> jurov: if you add relationships, i suspect things will work as desired
<jurov> ahh i'm blind, there's :serial T (big T)
wigust has joined #lisp
<jurov> is big T okay?
<Shinmera> Unless you screw with the readtable, case does not matter
<Shinmera> Also, if it were not CL:T, ASDF would error upon loading the system definition.
<Xach> big T is ok
<Xach> jurov: can you share the system file? and the other files? or maybe provide simplified versions? i'm still quite curious
<jurov> OK. It's actually this one: https://github.com/adolenc/cl-neovim/blob/master/cl-neovim.asd . the macro is in api.lisp and the function called by macro is in vim-utils.lisp
<Xach> jurov: and you observe that changing vim-utils.lisp and saving it, then using (asdf:load-system "cl-neovim") does not result in recompiling api.lisp?
<scymtym> shouldn't the :serial t be in the module instead of the system?
<Xach> I have never used :module - is that required?
* Xach does not know
<jurov> Yes. I commented out #'clean-up-name in vim-utils completely and system loaded despite that
<jurov> And it generated the code using older version of #'clean-up-name .
<scymtym> Xach: in my mental model, :serial only affects immediately contained :components, not transitively contained ones
smokeink has joined #lisp
<smokeink> Is it possible in CL to replace 't with 'true ? (define-symbol-macro true 't) can make 'true be read as 't , but how to make the repl display true instead of t (when something evals to t) ?
<Xach> Seems plausible
<oleo> define a method
<oleo> a printer method ?
dyelar has joined #lisp
rumbler31 has joined #lisp
cromachina has quit [Read error: Connection reset by peer]
resttime has quit [Quit: Leaving]
joast has quit [Quit: Leaving.]
<smokeink> tried this but it doesn't work: (defmethod print-object ((obj t) out) (format out "~A" 'true))
rippa has joined #lisp
<beach> smokeink: Here T means "any class".
eudoxia has joined #lisp
<smokeink> yes, I thought so , but how to make it work for any class, including the class of 't itself ? Actually I need it to work just for 't
LiamH has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
<beach> smokeink: You might want to try ((obj (eql t)) out) but I am pretty sure that this would be undefined behavior.
<smokeink> ok, it seems to be working (in sbcl). Thanks
<Shinmera> This seems like an extremely bad thing to do, and want to do.
<beach> I totally agree.
pjb has joined #lisp
Amplituhedron has joined #lisp
<smokeink> yeah it's just for fun
<smokeink> I had thought there must be some safe way of achieving this effect
<beach> smokeink: Mostly, you are not allowed to modify the behavior of a Common Lisp system with respect to the standard objects of that system. The rule is not as general as I am stating it here, but that's the essence of it.
<oleo> you can use the pretty printer maybe ?
fikka has joined #lisp
Cymew has quit [Remote host closed the connection]
Cymew has joined #lisp
scymtym has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 248 seconds]
Cymew has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
hexfive has joined #lisp
EvW1 has quit [Remote host closed the connection]
EvW has joined #lisp
<smokeink> http://pastecode.ru/62d181/ ; not expecting this to be portable or safe
shrdlu68 has joined #lisp
<pjb> smokeink: (defgeneric my-print-object (o s) (:method (o s) (print-object o s)) (:method ((o (eql t)) s) (princ "true" s) o))
Arcaelyx has joined #lisp
flamebeard has quit [Quit: Leaving]
<jackdaniel> another angle to do that would be defining around method on print-object and "stealing" the flow if t is passed (also unportable)
Jesin has quit [Quit: Leaving]
alpert has joined #lisp
sz0 has quit [Quit: Connection closed for inactivity]
alpert has quit [Remote host closed the connection]
alpert has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
dec0n has quit [Read error: Connection reset by peer]
<_death> (set-pprint-dispatch '(eql t) 'print-true) ; another way
Jesin has joined #lisp
markong has joined #lisp
rumbler3_ has joined #lisp
alpert has quit [Ping timeout: 240 seconds]
murii has quit [Remote host closed the connection]
hexfive has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
rumbler3_ has quit [Ping timeout: 248 seconds]
joast has joined #lisp
stee_3_ has joined #lisp
alpert has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
stee_3 has quit [Ping timeout: 248 seconds]
alpert has quit [Ping timeout: 255 seconds]
<smokeink> is the set-pprint-dispatch way more portable ?
<Shinmera> Being portable isn't a gradient
<jackdaniel> well, truth to be told some things are more risky than others
<jackdaniel> but in principle each undefined behavior trigger is an invitation for nasal daemons
<Shinmera> clhs glossary/portable
<jackdaniel> yes, but from the cognitive perspective of language, by asking: how portable is this and this means – how likely will it fail
<jackdaniel> otherwise "bordeaux threads is a portability layer" wouldn't make much sense, would it?
<Shinmera> Well, it does make sense, because it extends the specification of the CLHS by its own interface, thus extending what it means to be portable.
<_death> smokeink: it is precisely for doing this kind of thing, customized pretty-printing of lisp forms
<Shinmera> If an implementation is not supported by it, then that implementation is not conforming, making it irrelevant for the question of whether code is portable on it or not
hexfive has joined #lisp
<jackdaniel> code which uses threads (even through bt) isn't portable if we take definition you have linked a few lines above
FreeBirdLjj has quit [Remote host closed the connection]
<Shinmera> How so?
<pjb> Shinmera: CLHS doesn't define threads.
<Shinmera> I'm aware.
<pjb> This is purely an extension to CL.
FreeBirdLjj has joined #lisp
fikka has joined #lisp
<pjb> BT can only aim at covering the implementations that implement a threading extension, but not all implementation do. So writing code using threads cannot be portable by definition.
<pjb> even when using a portability library.
<pjb> Your application is only portable to the intersection of all the supported set of all its dependencies.
<_death> the clhs definition is a stipulative one.. not very good for trying to understand the common use of the term
<Shinmera> It can if you consider BT's spec an extension of CL's spec.
<pjb> Often this restricts the practical portability to very few implementations, platforms and systems.
<pjb> Shinmera: it would be nice, but very few implementation take the pain of implementing a portability layer API. cffi, bt, closer-mop, etc.
neoncontrails has joined #lisp
k-stz has joined #lisp
k-stz has quit [Remote host closed the connection]
caseyowo has joined #lisp
<pjb> Sometimes they may move slowly toward better support (eg. asdf), but there's no will to boldly implement those interfaces directly.
<jackdaniel> Shinmera: in that case what smokeink wants may be considered his informal spec. then it works where it works. word portability loses its meaning, or indeed we agree, that this definition can't be taken verbatim in conversation proceeded in natural language
k-stz has joined #lisp
<jackdaniel> my point exactly ,) I'll read the backlog later
<Shinmera> jackdaniel: I'm not dumb, so I know perfectly well what he meant to convey.
shrdlu68 has quit [Ping timeout: 248 seconds]
<Shinmera> As we have already determined, there are better ways in which his actual question could have been formulated, though.
<jackdaniel> so if you know, then saying that "it's not a gradient" was referring not to the *meaning* he used, but something what it has common term with
<jackdaniel> so it could only bring confusion, not clarify things
fikka has quit [Ping timeout: 258 seconds]
<Shinmera> Just because I can leniently interpret sentences does not mean I agree with the way they were expressed.
thinkpad has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
zooey has quit [Remote host closed the connection]
mson has quit [Quit: Connection closed for inactivity]
zooey has joined #lisp
dyelar has quit [Ping timeout: 268 seconds]
ryanwatkins has quit [Ping timeout: 258 seconds]
fikka has quit [Ping timeout: 268 seconds]
rgrau has quit [Ping timeout: 260 seconds]
dyelar has joined #lisp
orivej has quit [Ping timeout: 258 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
MrBusiness has quit [Ping timeout: 258 seconds]
PressAI has joined #lisp
mson has joined #lisp
fikka has joined #lisp
zmt00 has joined #lisp
shrdlu68 has joined #lisp
fortitude has joined #lisp
damke has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
damke_ has quit [Ping timeout: 240 seconds]
Josh_2 has quit [Remote host closed the connection]
scymtym has joined #lisp
raynold has joined #lisp
orivej has joined #lisp
Josh_2 has joined #lisp
PressAI has quit [Remote host closed the connection]
neoncontrails has quit [Remote host closed the connection]
Karl_Dscc has joined #lisp
warweasle has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
varjagg has joined #lisp
Karl_Dscc has quit [Remote host closed the connection]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
BigSafari has joined #lisp
EvW has quit [Ping timeout: 255 seconds]
Tristam has quit [Read error: Connection timed out]
smokeink has quit [Remote host closed the connection]
eminhi has joined #lisp
smokeink has joined #lisp
hhdave has quit [Ping timeout: 268 seconds]
smokeink has quit [Ping timeout: 240 seconds]
FreeBird_ has joined #lisp
<raynold> ahh it's a wonderful day
<Xach> jurov: how did things work out?
<jurov> Xach: I just wipe the cache every time. Would a minimal example help you?
FreeBirdLjj has quit [Ping timeout: 248 seconds]
m00natic has quit [Remote host closed the connection]
pjb has quit [Ping timeout: 255 seconds]
<XachX> I mean with adding serial t to the module.
<jurov> Ah, I'll try.
mathrick has quit [Ping timeout: 248 seconds]
rumbler3_ has joined #lisp
knicklux has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
attila_lendvai has joined #lisp
mathrick has joined #lisp
rumbler3_ has quit [Ping timeout: 268 seconds]
_cosmonaut_ has quit [Ping timeout: 240 seconds]
pjb has joined #lisp
jmercouris has joined #lisp
rme has joined #lisp
<jurov> XachX: yes, that helped, thanks. Will make pull request.
<jmercouris> is there something akin to json for lisp?
<jmercouris> some sort of transport language to represent objects?
<pjb> sexp
<jmercouris> pjb: Can you please expand on that?
<pjb> (read-from-string (let ((*print-readably* t)) (prin1-to-string object)))
<pjb> For your custom-defined CLOS objects, you need to implement PRINT-OBJECT and depending on the syntax used when printing it readably, reader macros.
<jmercouris> And how do you reinstate the object from its serialized form?
<pjb> read-from-string
<pjb> You're not quick…
<jmercouris> Ah okay, it's all in that one statement
<jmercouris> Yes, sorry
<jmercouris> I never said I was :P
<pjb> ;-)
<pjb> jmercouris: ie. your first reflex should have been /msg specbot clhs read-from-string RET /msg specbot clhs *print-readably* RET /msg specbot clhs prin1-to-string RET
<jmercouris> Yeah, I'll try to remember to do that henceforth
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
caseyowo has quit [Ping timeout: 240 seconds]
FreeBird_ has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
<hooman> actually, here we say hencelisp
Jonsky has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<rumbler31> jmercouris: You already type things like, (make-array dims :initial-contents '(a b c ...)) So if you take an array and splat its contents into a string, you can re-make this form
<rumbler31> serialize becomes taking the contents of an array and generating the string "(make-array size :initial-contents '(real contents here))" and then calling read on the string, right?
<_death> I'd rather communicate via json.. read-from-string is definitely not a good way to communicate with the outside world
<rumbler31> _death: I agree, although OP seemed to be interested in lisp -> lisp
<pjb> json is definitely not a good way to communicate with the outside world.
<pjb> incompatible float formats, bignums not supported (eg. in C), confusion between lists and vectors, a-list and hash-tables, etc.
<_death> still you need to trust the other side, and then there's the matter of interning (which you can simplify by using keywords everywhere...) and more..
<pjb> Not all lisp objects have a printable readably form, but at least, it's specified. (cf. chapter 2).
<pjb> also, there's the Rivest SEXP RFC.
<pjb> (draft)
<_death> pjb: not claiming json is perfect or even "good", but it's ubiquitous
<pjb> sexps too: available in all the compilers I use!
fikka has quit [Ping timeout: 248 seconds]
<_death> so where is a rivest-sexp parser
<_death> in lisp
pseudonymous has joined #lisp
shka has joined #lisp
<pjb> not implemented yet
damke_ has joined #lisp
<pjb> For a project, I just used a subset of CL sexps.
<pjb> a SPECIFIED subset.
damke has quit [Ping timeout: 240 seconds]
<pjb> _death: but there are implements of rivest sexp in other languages.
<_death> should be named hollerith-sexp :)
<shka> hi
<shka> i would like to obtain hash of cons cell based on the address of that cell
EvW has joined #lisp
<shka> how can i do that?
<_death> sxhash?
<_death> there's no portable way
<shka> i was under impression that sxhash will hash whole content of the list
<pjb> sxhash.
<pjb> The question is ill-posed, since it refers to something that is not a concept in CL>
<jackdaniel> sxhash isn't necessarily used in hash tables. also it is not necessarily based on address (consider moving gc)
<pjb> (There's no notion of address in CL).
<jackdaniel> right
eminhi has quit [Quit: leaving]
<shka> fair enough
<jackdaniel> in ecl you have (si:pointer object) ; (or something with similar name)
<pjb> For example, you could have a CL implementation that would use wool threads and a robot to tie knots in them to build cons structures.
<shka> jackdaniel: sbcl this time, also, i am using my own hashing function
<shka> but i need to use cons cell
<jackdaniel> but that's because a) gc is non-moving; b) all objects have addresses
<pjb> shka: then just use the cons cell!
<pjb> jackdaniel: no, addresses don't exist.
fikka has joined #lisp
<shka> pjb: is that good idea? It may force me to recalculate hash of list multiple time
<jackdaniel> pjb: I'm referring to internal ECL implementation, it is in context of mentioning si:pointer
<jackdaniel> (+/- immediate objects)
<_death> jackdaniel: speaking of ecl, do you have any input on the two "wtfs" I mention in https://github.com/death/TIC-80 .. I didn't get to looking further into them
<pjb> jackdaniel: well, if you're based on C, it is disputable that addresses exist. In C you have pointers (opaque) and integers, and a way to convert from one to the other, but nothing implies that integers are related to eg. a MC68000 address.
<pjb> shka: what are you trying to do?
<pjb> shka: hint: hash values are only useful for one thing, in general you are not needing them.
damke has joined #lisp
<shka> do you want full explanation of my data representation?
<shka> or is that boring
neoncontrails has joined #lisp
varjagg has quit [Remote host closed the connection]
<shka> well, anyway
varjagg has joined #lisp
<jackdaniel> _death: as of second wtf – I can help with that, but you won't have ability to load native fasls (something I plan to work on though)
<jackdaniel> as of first wtf, I think that calling cl_shutdown and after that cl_boot should be enough
<jackdaniel> but if it doesn't work I may try to validate that (not today though)
<pjb> shka: indeed, sxhash is defined in terms of similarity which for cons cells defer to the similarity of car and cdr.
<shka> pjb: it goes like this: i have a hashtable containing a number of lists
damke_ has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 260 seconds]
<_death> jackdaniel: I think that's what is happening, but it's not enough.. I think something akin to lua_State would be great, but that's likely too much of a big change
IRCNickname has joined #lisp
<pjb> shka: There is no conforming way to get the identity of a cons cell otherwise than the cons cell itself. And also, similarity is defined cross images!
<shka> there is a couple of singular lists, the rest is constructed by consing into other list already existing in the table
<pjb> shka: nope. hashtable don't contain things. They map keys to values.
<shka> pjb: please, let me finish
<jackdaniel> _death: I would have to look into it, but right now I have work in progress on delimited continuations + green threads in ECL, so that would have to wait
<_death> jackdaniel: oh no problem.. it's just another night hack no time pressure :)
<shka> each list is a key in the hashtable, and value is not relevant right now
<jackdaniel> if you could report issue on gitlab with description what lua_state is and what you are expecting, that would be great
Jonsky has quit [Read error: Connection reset by peer]
<jackdaniel> because I will very likely forget to look into it without some remainder
Jonsky has joined #lisp
<shka> but this allows me to (when i have reference to the right list) to obtain value from hashtable, as well as do the same for every rest
<_death> jackdaniel: sure, will have a todo for it.. maybe a small test case first
<shka> i don't search hashtable by constructing fresh list
<jackdaniel> cool, thanks!
<shka> therefore, i consider calculating full hash of list to be wasteful
<shka> pjb: does that sound clear enough?
<pjb> Why do you want to compute the hash of the list based on the whole list?
fikka has joined #lisp
<shka> pjb: i don't want to
<pjb> Then don't!
<shka> do i misunderstood things?
<shka> i am under impression that "[20:02] <pjb> shka: indeed, sxhash is defined in terms of similarity which for cons cells defer to the similarity of car and cdr.", which translates into recursive definition of hash
<pjb> shka: read again make-hash-table, and notice how the default for test is eql.
<shka> i do know about this
<pjb> Notice how hash-tables cannot use sxhash.
<pjb> Why do you want to use sxhash?
<pjb> Then what's your problem? Everything works as you want.
<shka> but i am using my own custom test
<pjb> Well, then you will have to use a CL hash-table to map cons cells to unique identifiers that you can use in your own hash function.
<shka> i see
pmetzger has joined #lisp
<pjb> Perhaps some implementations let you find the address of a cons cell (but as noted, if they have a moving GC, the address will change).
<shka> pjb: thank you, you helped me greatly
<pjb> clisp can be compiled to provide a third slot to each cons in which you could store a unique identifier.
<shka> i will try to figure out simpler way to do this
<shka> perhaps i can just use simple box struct
<pjb> Notice also, that for hash-table with equal or equalp most implementations won't compute the hash on all the elements of the list, but use a projection such as list length, hash of the first and last element.
<pjb> The most efficient will be to stick to CL hash-table EQL.
<shka> indeed
<pjb> and indeed, if you need more info, you can wrap your data in structures.
<shka> i will have to double check if i can just get away without using custom :test
<pjb> Or imagine an implementation storing cons cells by drawing them on paper, and following the links with a camera: https://www.youtube.com/watch?v=Mp8Y2yjV4fU
<shka> that would be simplest way to solve this
<pjb> sometimes, you can use a (defstruct kons car cdr key something-else) and build your lists (copy CL lists) using that.
<shka> pjb: in my case, it will be enough to just have `(box (real-element . box-with-rest))
<shka> well, actually i think thats what you just said
<shka> pardon me, i am a bit tired
<shka> have a good evening!
<pjb> Yes, you can also just keep a reference to the original cons cell.
wigust has quit [Read error: Connection reset by peer]
<pjb> so you build a spinal cord: (defstruct box cons key) (let ((k 0)) (maplist (lambda (c) (make-box :cons c :key (incf k))) '(1 2 3))) #| --> (#S(box :cons (1 . #1=(2 . #2=(3))) :key 1) #S(box :cons #1# :key 2) #S(box :cons #2# :key 3)) |#
<shka> pjb: actually exactly what i am trying to do
<shka> ok, i know how to move forward
<shka> thank you for your patience
<pjb> you're welcome.
minion has quit [Remote host closed the connection]
specbot has quit [Remote host closed the connection]
easye has quit [Ping timeout: 240 seconds]
LocaMocha has quit [Ping timeout: 268 seconds]
<hooman> o_o
minion has joined #lisp
specbot has joined #lisp
grublet has joined #lisp
strelox has quit [Remote host closed the connection]
SuperJen has quit [Ping timeout: 255 seconds]
fikka has quit [Ping timeout: 248 seconds]
zacts has quit [Quit: WeeChat 1.4]
zacts has joined #lisp
grublet has quit [Quit: Leaving]
DingoSaar_ has joined #lisp
orivej has quit [Ping timeout: 248 seconds]
nirved has quit [Quit: Leaving]
caseyowo has joined #lisp
fikka has joined #lisp
Jonsky has quit [Ping timeout: 240 seconds]
Jonsky has joined #lisp
aoeu1024 has joined #lisp
pmetzger has quit []
aoeu256 has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
aoeu256 has joined #lisp
aoeu1024 has quit [Ping timeout: 250 seconds]
fikka has quit [Ping timeout: 248 seconds]
DingoSAL has joined #lisp
alpert has joined #lisp
Amplituhedron has quit [Read error: Connection reset by peer]
DingoSaar_ has quit [Ping timeout: 240 seconds]
alpert has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
Josh_2` has joined #lisp
Josh_2 has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
eudoxia has quit [Quit: Leaving]
rme has quit [Ping timeout: 246 seconds]
remi`bd has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rme has joined #lisp
jfb4 has left #lisp [#lisp]
jfb4 has joined #lisp
fikka has joined #lisp
aoeu1024 has joined #lisp
Devon has quit [Ping timeout: 240 seconds]
aoeu256 has quit [Ping timeout: 258 seconds]
Baggers has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
<rumbler31> pjb: in your example output, does the #1= and #2= mean that subsequent uses of #1# and #2# refer to eql cons's, not just identical in contents?
attila_lendvai has quit [Quit: Leaving.]
<rumbler31> and I still don't know how you managed to parse his question to begin with
attila_lendvai has joined #lisp
caseyowo has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
BigSafari has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dwts> Hey guys, does anyone know why the first part of the code works while the second one doesn't?: https://codepaste.net/gisfzt
<dwts> my guess is that word is not treated like a string?
fikka has quit [Ping timeout: 248 seconds]
warweasle has quit [Quit: later]
vlatkoB has quit [Remote host closed the connection]
shrdlu68 has quit [Ping timeout: 240 seconds]
rme has quit [Ping timeout: 260 seconds]
angavrilov has quit [Remote host closed the connection]
mejja has joined #lisp
<pjb> rumbler31: yes, it does. This is the printer/reader notation for that.
fikka has joined #lisp
Devon has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
Josh_2` has quit [Remote host closed the connection]
Josh_2 has joined #lisp
<Ober> pjb i see you use lispworks too
zachk has joined #lisp
<hooman> i think many CLHS links are on lispworks.com site
<hooman> on->to
fikka has quit [Ping timeout: 240 seconds]
<Bike> dwts: yeah looks like the general use is for the values to be strings. `word` there is of course a symbol, not a string.
<Bike> dwts: i see word also names a variable. perhaps you didn't mean to quote it.
<dwts> Bike: is there a predicate that returns the type of a variable?
<Josh_2> type-of
<Bike> there's a function, but in this case i imagine the problem is that you're not actually using a variable.
<Bike> it's quoted. '(("term" . word)). the variable is never used
<dwts> oh
<Bike> which your compiler should warn you about, incidentally
<dwts> Bike: I'm using sbcl, let me recheck the full output
knicklux has quit [Quit: Leaving]
fikka has joined #lisp
<dwts> I don't think I see anything related to the var issue. Or I'm misreading :)
<Bike> yeah, that doesn't give you any compiler notes.
<dwts> Bike: I'm using C-x C-e to eval the code
<Bike> are you actually compiling the file? like C-c C-k in slime.
<dwts> oh
<dwts> Josh_2: type-of indeed works, thanks
<Bike> it's not that important. instead of the compiler, you have me telling you you made a mistake. artificial artificial intelligence, it's called
<dwts> lol
<Bike> you understand, right? you quoted `word`, so it's not evaluated, so the argument isn't used, drakma only sees the actual symbol WORD
<dwts> yes, I understand the root of the problem now
<dwts> thanks a lot, once again!
<Bike> you could write something like (list (cons "term" word)) instead
<dwts> I was close enough, I was using (list "term" word) :P
papachan has quit [Quit: Saliendo]
fikka has quit [Ping timeout: 260 seconds]
<pjb> Ober: very rarely.
<pjb> I don't think I've got any remaining working lispwork installed.
<dwts> Bike: yep, that did the trick! Also type-of looks helpful if you are unsure what you are passing to your functions I guess
<dwts> still lots of things to learn
shka has quit [Ping timeout: 258 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
fikka has quit [Read error: Connection reset by peer]
alpert has joined #lisp
python476 has joined #lisp
alpert has quit [Ping timeout: 255 seconds]
DingoSAL has quit [Quit: Leaving]
fikka has joined #lisp
Baggers has left #lisp ["rcirc on GNU Emacs 25.1.1"]
AxelAlex has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Josh_2 has quit [Ping timeout: 240 seconds]
terpri has quit [Read error: Connection reset by peer]
DeadTrickster has quit [Read error: Connection reset by peer]
DeadTrickster has joined #lisp
quazimodo has joined #lisp
attila_lendvai has quit [Ping timeout: 252 seconds]
attila_lendvai has joined #lisp
tokik has quit [Ping timeout: 252 seconds]
jsnell has quit [Ping timeout: 252 seconds]
tokik has joined #lisp
jsnell has joined #lisp
spudinski has quit [Quit: Ping timeout (120 seconds)]
spudinski has joined #lisp
remi`bd has quit [Quit: leaving]
neoncontrails has quit [Ping timeout: 250 seconds]
fikka has joined #lisp
Ukari has joined #lisp
Jonsky has quit [Ping timeout: 260 seconds]
neoncontrails has joined #lisp
pierpa has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
Karl_Dscc has joined #lisp
dfgdfgdf has joined #lisp
LiamH has quit [Quit: Leaving.]
Ukari has quit [Ping timeout: 248 seconds]
Ukari has joined #lisp
<mfiano> dwts: Note than TYPE-OF may return different results on different implementations.
Bike has quit [Ping timeout: 260 seconds]
<mrottenkolber> spreadable argument list designator n.: a designator for a list of objects; that is, an object that denotes a list and that is a non-null list L1 of length n, whose last element is a list L2 of length m (denoting a list L3 of length m+n-1 whose elements are L1i for i < n-1 followed by L2j for j < m). “The list (1 2 (3 4 5)) is a spreadable argument list designator for the list (1 2 3 4 5).”
Ukari has quit [Ping timeout: 248 seconds]
<mrottenkolber> so if a spreadable argument list designator is a “non-null list L1”, that means nil is not a valid s a l d, right?
ketralnis has joined #lisp
Ukari has joined #lisp
varjagg has quit [Ping timeout: 268 seconds]
Ukari has quit [Changing host]
Ukari has joined #lisp
<mrottenkolber> Is this non-standard then? (apply 'get-internal-real-time nil)
damke_ has joined #lisp
<mrottenkolber> also doesn’t really allow (apply 'list 1 2 '(3 4)) to work
<Xach> mrottenkolber: I think the + is significant in args+ there
damke has quit [Ping timeout: 240 seconds]
<Xach> well, i don't get the glossary enough to comment more.
<mrottenkolber> same here
<mrottenkolber> pretty jibberish to me
<mrottenkolber> or rather, it seems off
thinkpad has joined #lisp
<mrottenkolber> I seems to indicate that (apply 'list '(1 2 3 (4 5))) ≡ (apply 'list '(1 2 3 4 5)) which is luckily not true on i.e. CCL
<mrottenkolber> It*
jmercouris has quit [Ping timeout: 252 seconds]
<pjb> Because they're not equivalent.
<pjb> You are confusing the first form with (apply 'list 1 2 3 '(4 5)) #| --> (1 2 3 4 5) |#
<Xach> mrottenkolber: it's more that (apply 'list 1 2 3 '(4 5)) DWIM
<mrottenkolber> pjb: oooh right, thanks
<mrottenkolber> then I don’t get the + in — Function: apply function &rest args+ → {result}*
<pjb> it is the kleene notation + for 1 or more, * for 0 or more.
<mrottenkolber> the + led me to believe apply would accept one or more spreadable argument list designators
<pjb> clhs apply
mishoo_ has quit [Ping timeout: 248 seconds]
<pjb> The definition of spreadable argument list designator is clear.
<mrottenkolber> yes, but I’d say the + is a mistake.
thinkpad has quit [Quit: lawl]
<pjb> mrottenkolber: but you have to remember that &rest gets a list of arguments, so when the spreadable argument list designator takes for example (1 2 (3 4 5)) it means that the function was called with the rest arguments 1 2 (3 4 5) like this: (apply 'list 1 2 '(3 4 5)) for example
<mrottenkolber> yes I got that
<mrottenkolber> But the + contradicts this
<mrottenkolber> makes no sense to have BNF in a lambda list either
quazimodo has quit [Ping timeout: 240 seconds]
<pjb> Well, it's not in 1.4.1 apparently, so it should not be taken formally.
<mrottenkolber> not in this context at least
quazimodo has joined #lisp
mishoo has joined #lisp
rumbler31 has quit [Ping timeout: 264 seconds]
dieggsy has joined #lisp
ngqrl_ has joined #lisp
ngqrl_ has quit [Client Quit]
ngqrl_ has joined #lisp
Jesin has quit [Quit: Leaving]
ngqrl_ has quit [Client Quit]
pseudonymous has quit [Ping timeout: 248 seconds]
Karl_Dscc has quit [Remote host closed the connection]
ngqrl has joined #lisp
wxie has joined #lisp
schoppenhauer has quit [Ping timeout: 268 seconds]
Bike has joined #lisp
schoppenhauer has joined #lisp
<k-stz> is there a protable way to translate a c array to a lisp array, or can I just leave it in its cffi SAP form? Efficiency actually matters in this case
<Bike> what do you want to do with it?
<k-stz> scan over it, its rather large so
damke_ has quit [Ping timeout: 240 seconds]
Kaisyu has joined #lisp
<Bike> if you're not keeping it around i don't see why you can't just keep it as a c array.
JenElizabeth has joined #lisp
<pjb> k-stz: obviously what you should do with data depends on your pattern of access!
<k-stz> I'm not sure what counts as keeping it around. As its set up to be I have to use it multiple times. I'd have to test it
<k-stz> pjb: how do you mean?
<pjb> But remember that you have to free C data yourself (unless you use a underlying C garbage collector such as the BoehmGC.
damke has joined #lisp
<pjb> k-stz: if you only need to access the elements of the C array once, there's no point in copying it.
<pjb> Why do I have to always state the obvious?