<makomo>
kenster: yeah, i get it. a mapping between class names in lisp and C/C++
<makomo>
the problem here was that the macros themselves were using a different *c-class-struct* symbol though
<makomo>
it was interned in another package, but used the same name
NotSpooky has quit [Ping timeout: 256 seconds]
<makomo>
kenster: expand it once, bit by bit. it should fail at the defcun macro
<makomo>
kenster: also, C-c C-m
<makomo>
now expand the cffi-defun macro
<makomo>
C-_ to undo the macroexpansion :-)
<makomo>
hmm, maybe your keybindings are different, oh well
<makomo>
i don't remember what the CFFI assertion said. something about the name of the symbol
<makomo>
expand the decfun macro now
<makomo>
you should get the error
<makomo>
you're welcome :-)
caltelt has joined #lisp
<makomo>
kenster: at this point it looks like you're using defcfun in the wrong way, but i don't know much about cffi to help you with that
rumbler31 has joined #lisp
gabiruh has quit [Ping timeout: 268 seconds]
asarch has quit [Quit: Leaving]
Jesin has quit [Quit: Leaving]
<no-defun-allowed>
what format string should i use to pad a number out to always look like 12.34? that is, two places before and after the decimal point
<no-defun-allowed>
never mind, got it
pierpal has quit [Ping timeout: 248 seconds]
<Xach>
no-defun-allowed: i use ~$ for that
<Xach>
i guess that's not quite the same
<makomo>
kenster: see the comment above DEFCFUN. i don't think 2 strings are allowed. the things in the list must be a string and a symbol
<makomo>
kenster: check the expansion manually again -- get used to doing that :D
<makomo>
kenster: c-method-name within defcmethod is (string (gensym))
<no-defun-allowed>
Xach: PCL had ~2,2$ so i used that
<makomo>
kenster: cffi-method-name*
<makomo>
i'm not sure if that's by design or what, just saying
Kaisyu has joined #lisp
<makomo>
kenster: what is even the point of cffi-defun? why make it into a separate macro anyway?
<makomo>
kenster: you might want cAdr, since you're working with a list, not a cons cell
<makomo>
cdr is giving you back a list
dddddd has quit [Remote host closed the connection]
Kundry_W_ has joined #lisp
<makomo>
kenster: SECOND :-)
patlv has joined #lisp
<makomo>
kenster: i see, but is a separate macro really needed for that? you could do the job in defcmethod as well
Pixel_Outlaw has joined #lisp
<makomo>
kenster: in the end it depends on how you'll want to organize things in the future i guess, just a suggestion
Zamenhof has joined #lisp
Kundry_W_ has quit [Ping timeout: 240 seconds]
patlv has quit [Ping timeout: 256 seconds]
patlv has joined #lisp
pioneer42 has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
vhost- has joined #lisp
vhost- has quit [Changing host]
vhost- has joined #lisp
Kundry_Wag has joined #lisp
vhost- has quit [Read error: Connection reset by peer]
vh0st- has joined #lisp
NotSpooky has joined #lisp
acolarh has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
sjl has quit [Quit: WeeChat 2.2-dev]
patlv has quit [Ping timeout: 268 seconds]
trocado has joined #lisp
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
caltelt has quit [Ping timeout: 248 seconds]
gabiruh has joined #lisp
caltelt has joined #lisp
gabiruh has quit [Ping timeout: 256 seconds]
karswell has quit [Read error: Connection reset by peer]
karlosz has joined #lisp
trocado has quit [Ping timeout: 240 seconds]
gabiruh has joined #lisp
pioneer42 has left #lisp [#lisp]
patlv has joined #lisp
pestyOverlord has quit [Quit: Leaving...]
serviteur has joined #lisp
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
nickenchuggets has joined #lisp
Kundry_W_ has joined #lisp
quazimodo has quit [Ping timeout: 244 seconds]
Kundry_W_ has quit [Ping timeout: 256 seconds]
quazimodo has joined #lisp
patlv has quit [Remote host closed the connection]
patlv has joined #lisp
smurfrobot has joined #lisp
fikka has joined #lisp
quaker has joined #lisp
robotoad has joined #lisp
quaker has quit [Client Quit]
fikka has quit [Ping timeout: 248 seconds]
klltkr_ has joined #lisp
acolarh has joined #lisp
klltkr has quit [Ping timeout: 256 seconds]
makomo_ has joined #lisp
makomo has quit [Ping timeout: 256 seconds]
zlib_is_awesome has joined #lisp
smurfrobot has quit [Remote host closed the connection]
MoziM has joined #lisp
patlv has quit [Ping timeout: 240 seconds]
Zamenhof has left #lisp [#lisp]
EvW1 has quit [Ping timeout: 255 seconds]
easye` has joined #lisp
serviteur has quit [Remote host closed the connection]
lyosha[m] has quit [Ping timeout: 256 seconds]
Cal[m] has quit [Ping timeout: 256 seconds]
xristos has quit [Ping timeout: 256 seconds]
easye has quit [Ping timeout: 256 seconds]
angular_mike_2 has quit [Ping timeout: 256 seconds]
<kenster>
makomo_: you wouldn't happen to know what to do if gensym won't generate a unique symbol?
<kenster>
it keeps saying duplicate definitions for symbol "G0", yet I macroexpanded my defcmethod calls and each one has a different symbol
exit70 has quit [Ping timeout: 256 seconds]
angular_mike_2 has joined #lisp
<kenster>
" Duplicate definition for G0 found in one file."
<Bike>
that would indicate a deeply broken implementation of gensym. it is more likely that the problem is elsewhere.
xristos has joined #lisp
xristos is now known as Guest98336
pierpal has joined #lisp
AetherWind has joined #lisp
lyosha[m] has joined #lisp
exit70 has joined #lisp
<kenster>
hmmmmmmmmmm
Cal[m] has joined #lisp
Guest16049 has joined #lisp
subroot has quit [Ping timeout: 256 seconds]
Kundry_W_ has joined #lisp
Kundry_W_ has quit [Ping timeout: 256 seconds]
karlosz has quit [Quit: karlosz]
makomo_ has quit [Ping timeout: 256 seconds]
pierpa has quit [Quit: Page closed]
Pixel_Outlaw has quit [Quit: Leaving]
pagnol has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
smurfrobot has joined #lisp
Kundry_Wag has joined #lisp
<White_Flame>
even if you reset the gensym counter such that two calls to GENSYM both returned #:G123, those two #:G123's would be different instances, as they're uninterned, and wouldn't complain about duplication
<White_Flame>
so you're taking the return value from a single GENSYM call and using it in two places
<kenster>
that's weird
pierpal has quit [Quit: Poof]
<kenster>
they are completely different calls to the macro
pierpal has joined #lisp
smurfrobot has quit [Remote host closed the connection]
Jesin has joined #lisp
<kenster>
it isn't my only error though, so I'll see after fixing the others
<beach>
Good morning everyone!
Kundry_Wag has quit [Ping timeout: 244 seconds]
Cthulhux has quit [Ping timeout: 240 seconds]
X-Scale has quit [Ping timeout: 260 seconds]
<kenster>
hiya
[X-Scale] has joined #lisp
[X-Scale] is now known as X-Scale
<caltelt>
good evening :D
Cthulhux has joined #lisp
smurfrobot has joined #lisp
WhoTookMyName has joined #lisp
NotSpooky has quit [Quit: Leaving]
smurfrobot has quit [Ping timeout: 256 seconds]
WhoTookMyName has quit [Ping timeout: 256 seconds]
Kundry_Wag has joined #lisp
orivej has joined #lisp
fikka has joined #lisp
eminhi has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
Kundry_Wag has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
pagnol_ has joined #lisp
pagnol has quit [Ping timeout: 240 seconds]
<no-defun-allowed>
hi beach
brendyn has joined #lisp
renzhi has quit [Quit: WeeChat 2.1]
milanj has quit [Quit: This computer has gone to sleep]
smurfrobot has joined #lisp
smurfrobot has quit [Ping timeout: 256 seconds]
patlv has joined #lisp
pagnol_ has quit [Ping timeout: 264 seconds]
patlv has quit [Ping timeout: 256 seconds]
JuanDaugherty has joined #lisp
smurfrobot has joined #lisp
Bike has quit [Quit: Lost terminal]
smurfrobot has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 264 seconds]
pagnol_ has joined #lisp
Kundry_Wag has joined #lisp
daniel-s has joined #lisp
iAmDecim has joined #lisp
smurfrobot has joined #lisp
smurfrobot has quit [Remote host closed the connection]
Kundry_Wag has quit [Ping timeout: 240 seconds]
kajo has joined #lisp
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
edgar-rft has quit [Quit: Leaving]
renzhi has joined #lisp
iAmDecim has quit [Remote host closed the connection]
JuanDaugherty has quit [Quit: Exeunt]
eminhi has quit [Quit: leaving]
<equwal>
How can I set something like
<equwal>
(defun x (y) (declare ((integer 0 +max-const+) y)))
<equwal>
I'
<equwal>
without everything breaking because the type-spec doesn't get evaluated?
<equwal>
I'd like some kind of a reader modification I think.
smurfrobot has joined #lisp
<beach>
(integer 0 #.+max-const+)
<equwal>
Wow I feel stupid for asking, thanks for the help.
<beach>
And you need a TYPE in there I think.
smurfrobot has quit [Ping timeout: 240 seconds]
<equwal>
Yes.
<beach>
Of course, I would not put in the type declaration in the first place. But that's perhaps just me. What do you expect from it?
<equwal>
I am using (defconstant +max64+ 18446744073709551615) where that big number is 2^64-1
<equwal>
The idea is get more efficiency, but still being sure that it is definitely not a 32 bit machine or whatever.
<beach>
And you know for a fact that this function is a bottleneck when it comes to the performance of your code?
<beach>
My experience is that bottlenecks come and go during development.
<equwal>
No, I am porting some stuff from C by hand and I know that the code won't overflow for that reason.
saki has quit [Quit: saki]
<beach>
That was not my point though. My point was about performance.
<beach>
When you write it like that, most people here will think about some dialect from the 1960s.
<equwal>
Yeah I had to think for a second before deciding not to go and rub it out in favor of 'Common Lisp.'
<equwal>
Anyway it doesn't make a lot of sense not to use those types if I am merely transcribing to CL without any real modifications.
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
Inline has quit [Remote host closed the connection]
vlatkoB has joined #lisp
Kundry_Wag has joined #lisp
ofi has joined #lisp
eli_oat has quit [Remote host closed the connection]
fikka has joined #lisp
eli_oat has joined #lisp
Kundry_Wag has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 256 seconds]
sauvin has joined #lisp
equwal has quit [Remote host closed the connection]
equwal has joined #lisp
vtomole_ has joined #lisp
Kundry_Wag has joined #lisp
daniel-s has quit [Remote host closed the connection]
vtomole__ has joined #lisp
vtomole__ has quit [Client Quit]
Kundry_Wag has quit [Ping timeout: 264 seconds]
<vtomole_>
Any way to get the number of arguments a procedure takes? "(defun square (x) (* x x)) (num-proc #'square) -> 1"
<vsync>
if there are 2 variants of a thing (message), one generic but with all the info, and another specialized for a recipient with IDs mapped to recipient system, what would you call them?
<vsync>
I feel like I know some term used in CLOS/MOP object creation/instantiation but can't remember and don't know if apropos
<Zhivago>
vsync: Rather than what they are, consider how they are used.
flamebeard has joined #lisp
<vsync>
well the first is used to produce the second... the point of the first is a generic notification of something that is then dispatched and particularized... the second is one that can be transmitted to the target system
Kundry_Wag has joined #lisp
krwq has joined #lisp
<Zhivago>
vsync: Ok, so the first is not a message -- it is a notice. The second is a message that can be sent.
<vsync>
not quite
dcluna has quit [Ping timeout: 276 seconds]
Kundry_Wag has quit [Ping timeout: 268 seconds]
<vsync>
the first is a message precursor or a proto-message... everything to be filled in is mechanical it's just not bundled yet, so you say "send this to them" and it makes the latter out of the former and hands it off to given recipient
<vsync>
hmm, like a form letter
<vsync>
but template conveys there is no data in there, where in this case there is, just only the common data and per-recipient remains to be merged
<beach>
vtomole_: Try FUNCTION-LAMBDA-EXPRESSION. It is not guaranteed to work, though.
<beach>
vsync: Your description is way to general for me to have any idea what you are talking about. That could just be me of course.
dcluna has joined #lisp
<beach>
vsync: Are these "things" ("messages") just data?
<beach>
And what does it mean for a "thing" to be "specialized"? Is that a subclass?
<beach>
And, if so, how can a datum be used to produce another datum? Usually, it takes some code to produce anything at all.
<vtomole_>
beach: Wow! That will do. I say this a lot- the standard library is so huge :)
<mfiano>
I'm having trouble. How would I write a macro with once-only which expands to a (declare (ignorable ...)) directly below the gensym'd let expansion from once-only?
<beach>
vtomole_: It is not guaranteed to return something useful, for the simple reason that, if it were, you could get the code for the proprietary compiler in one of the commercial implementations.
fikka has joined #lisp
<beach>
mfiano: You want the entire expansion to be the declaration?
<beach>
jackdaniel: McCLIM excels for stuff like that.
<trittweiler>
mfiano: Don't use once-only but write the let yourself. :)
<jackdaniel>
looks messy, but given amount of data it would be hard to show it clearly. nice!
<jackdaniel>
line antialiassing would improve the look
<mfiano>
trittweiler: Yeah I did just that, or well with-gensyms
<beach>
jackdaniel: Oh, yes, it's messy. But a lot less so than with GraphViz.
<jackdaniel>
but I figure it is more convenient than going through graphviz
<beach>
jackdaniel: Yes, loke would agree.
<jackdaniel>
I have something ~similar for ECL (but it is buried somewhere, don't remember where) - for examining environments
<shka1>
beach: so you wrote it already?
<shka1>
that was fast
<beach>
shka1: Sort of. It's McCLIM so it is easy to do things like this.
<shka1>
… ok
<shka1>
it does not look easy
<beach>
jackdaniel: It is still work in progress, but yes, I can define some gestures to improve the experience, which I can not do with a dumb image file.
<jackdaniel>
sure
<shka1>
beach: can i look at the source code?
<jackdaniel>
could that be implemented as a clouseau's method specialization? I think that it is extensible that way
<trittweiler>
mfiano: Personally, I don't like macros silently introducing bindings. Wouldn't an inline function (mat-ref <thing> 0 1) which does the right aref be nicer?
<beach>
... so you can see why it does not take much time to write.
<jackdaniel>
if someone is in need for a fine Lispy folk music, I can recommend Karolina Cicha's albums – lispy in a sense that she digs into traditional forgotten melodies ;-)
<trittweiler>
vsync, I am working on something similar. In my case, I have a class `packet` which is addressable and which contains a `payload`, and `message` is a subclass of `payload`
<mfiano>
trittweiler: That's not really anything to do with the question, and this macro is exclusively for being able to write linear algebra similar to how it is presented in a math text, so introducing bindings is purposeful.
<trittweiler>
Sure, just brain-storming.
Kundry_Wag has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
jasom has quit [Ping timeout: 260 seconds]
jasom has joined #lisp
al-damiri has quit [Quit: Connection closed for inactivity]
vtomole_ has quit [Ping timeout: 252 seconds]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
shka1 has quit [Ping timeout: 240 seconds]
equwal has quit [Ping timeout: 260 seconds]
<vsync>
trittweiler: already using payload for the generic argument name :-)
<vsync>
okay, figured out a little more what I'm going for.... there is an event or so, that we create some communication from a given perspective, not for a given recipient but for a class of recipients; then we create a message from that thing (suitable for sending to a recipient); then a specific document with everything inlined
<vsync>
what is that thing, that initial proto-communication
<vsync>
designated for a class of recipients sharing a perspective
zfree has joined #lisp
newbie68 has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 256 seconds]
saki has joined #lisp
milanj has joined #lisp
SaganMan has quit [Ping timeout: 264 seconds]
<trittweiler>
vsync: announcement?
saki has quit [Ping timeout: 240 seconds]
saki has joined #lisp
smurfrobot has joined #lisp
moei has quit [Quit: Leaving...]
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
<vsync>
yeah maybe, occurred to me
SaganMan has joined #lisp
angavrilov has joined #lisp
malm has quit [Ping timeout: 245 seconds]
malm has joined #lisp
Smokitch has joined #lisp
smurfrobot has quit [Remote host closed the connection]
varjag has joined #lisp
pagnol_ has joined #lisp
hhdave has joined #lisp
Fare has quit [Ping timeout: 256 seconds]
nickenchuggets has quit [Read error: Connection reset by peer]
krwq has left #lisp ["Killed buffer"]
edgar-rft has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
dddddd has joined #lisp
cgay_ has quit [Read error: Connection reset by peer]
cgay_ has joined #lisp
heisig has joined #lisp
_cosmonaut_ has joined #lisp
zlib_is_awesome has quit [Quit: Leaving]
Kundry_Wag has joined #lisp
moei has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
edgar-rft has quit [Remote host closed the connection]
marusich has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
Kundry_Wag has quit [Ping timeout: 244 seconds]
ofi has quit [Ping timeout: 264 seconds]
smurfrobot has joined #lisp
chiyosaki has joined #lisp
saki has quit [Ping timeout: 276 seconds]
smurfrobot has quit [Ping timeout: 256 seconds]
pagnol_ has quit [Ping timeout: 264 seconds]
varjag has quit [Ping timeout: 264 seconds]
Kundry_Wag has joined #lisp
lumm has joined #lisp
ofi has joined #lisp
m00natic has joined #lisp
heisig has quit [Remote host closed the connection]
lemo has joined #lisp
lemo has quit [Changing host]
lemo has joined #lisp
<pjb>
vtomole: Usually, (length (third (function-lambda-expression #'square))) doesn't work after compiling.
<pjb>
or file-compiling.
dddddd has quit [Ping timeout: 256 seconds]
<pjb>
vtomole: the reliable and conforming way to have this (if you need it in your program, and not just for debugging), is to define your own define function macro that will do the book-marking. See an example in ibcl.
balrog| has quit [Killed (Sigyn (Spam is off topic on freenode.))]
juristi1 is now known as juristi
Guest23519 has joined #lisp
Guest23519 has quit [K-Lined]
physpi| has joined #lisp
pagnol has joined #lisp
physpi| has quit [Quit: ##freenodegate]
smurfrobot has joined #lisp
smurfrobot has quit [Ping timeout: 256 seconds]
saki has joined #lisp
orivej has joined #lisp
yaewa has joined #lisp
moei has quit [Ping timeout: 256 seconds]
Kundry_Wag has joined #lisp
smurfrobot has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
pierpal has quit [Ping timeout: 240 seconds]
Kundry_Wag has quit [Read error: Connection reset by peer]
Kundry_Wag has joined #lisp
dddddd has quit [Quit: Hasta otra..]
smurfrobot has quit [Ping timeout: 260 seconds]
dddddd has joined #lisp
gravicappa has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
Kundry_Wag has quit [Remote host closed the connection]
edgar-rft has joined #lisp
fm4d has joined #lisp
<beach>
shka: They can be large, but they are not very "wide", so I think it will be fine.
<shka>
ok
makomo has quit [Ping timeout: 240 seconds]
<beach>
Plus, this is for displaying the graph, so I can wait a few milliseconds for the layout engine to finish.
<shka>
you can wait longer then a few miliseconds actually
<shka>
so it is not bad
JuanDaugherty has quit [Quit: Exeunt]
<beach>
Yeah, that was a bit of a joke.
<shka>
oh, ok :-)
makomo has joined #lisp
<jackdaniel>
just prove that P=NP and move along ;-)
Josh_2 has joined #lisp
<beach>
Oh, good plan! :)
<beach>
I'll just tell drmeister and Bike that they have to wait for the HIR visualizer for a while. :)
<jackdaniel>
beach: I've asked previously if you considered doing it as a clouseau specialization, you might have missed that question (regarding visualizer)
<shka>
"I am going for a side quest!"
<beach>
jackdaniel: Oh, I totally missed it.
<beach>
That's an interesting idea.
<jackdaniel>
when I finish the infinite amount of tasks I have on my stack I plan to work on clouseau too (mostly tutorials if everything is fine in it)
<beach>
OK.
<shka>
I like this idea
<shka>
I may try doing
<shka>
because such tool could be seriously useful
<beach>
Collectively, we have plenty of ideas for very nice tools, but I think we need more people involved if we are ever going to make significant progress.
MoziM has quit [Quit: WeeChat 2.2]
<shka>
I may start by refactoring graph display thingy into separate project
<shka>
then i think it shouldn't be THAT hard to plug it into mr inspector
<jackdaniel>
shka: format-graph-from-roots is already in CLIM
<shka>
ooooh, ok
<jackdaniel>
you may provide your own specialized presentation method for that
<shka>
i see
<shka>
ok then
<jackdaniel>
as of clouseau in McCLIM documentation it is described how to specialize on some object types
<shka>
yeah
<shka>
ok
<shka>
actually i would like to display graph of objects in inspector
<shka>
just in general case
<jackdaniel>
I think that there is no "clever" algorithm to place graph nodes in format-graph-from-roots, so you may take that into account
<jackdaniel>
I think graphviz has its algorithms described, so you could implement that in CL
<shka>
it is even published
<shka>
so yes
<LdBeth>
How’s the progress on cario backend for McCLIM
<shka>
beach: are you ok with such feature in clouseau?
<jackdaniel>
you mean cairo? there is no progress, we have no plans for having gtk backend atm
<jackdaniel>
shka: clouseau is extensible, that means you don't have to modify the inspector in order to add functionality to it
<shka>
jackdaniel: even better!
<beach>
shka: Oh, that's hard to say from such a short description. But you can customize it as you please, then we can see if the code is general enough and good enough to be included in the distribution.
<shka>
ok, I will try to hack something on the weekend
<jackdaniel>
that and jmercouris's portable gadgetset and we'll conquer the world ;) or at least find a few more contributors
<beach>
shka: This stuff is written with heavy use of generic functions, so it is designed to be adapted.
<jackdaniel>
lunch time; bbl
<jmercouris>
of course :D
pagnol has quit [Ping timeout: 256 seconds]
<shka>
what is portable gadgetset?
<jmercouris>
basically, from my very limited understanding, it is a set of platform independent McCLIM gadgets that you can use
<beach>
Indeed.
<jmercouris>
so McCLIM allows you to use gadgets from the native widget toolkit where possible, but you could also use these lisp only gadgets
EvW has joined #lisp
<beach>
jmercouris: In practice that feature (using native gadgets) is very hard to accomplish, and we are not even sure it can be done with McCLIM right now.
<beach>
jmercouris: I would much rather see one or more sets of gadgets, where each set has a consistent look and feel.
Kundry_Wag has joined #lisp
<jmercouris>
I see
<beach>
My preference is for obvious reasons. I would much prefer a solution with as much Common Lisp code as possible.
<shka>
that sounds useful
<shka>
having comprehensive set of built widgets helps to get application out ready quickly
<beach>
jmercouris: The CLIM II specification contains a description of all the gadgets that CLIM implementations must have, but we have nothing against extensions. For example, there have been several attempts at a gadget for displaying hierarchies like a directory of files.
<jmercouris>
Several attempts? What makes such a task so difficult? Isn't it just a tree widget?
pagnol has joined #lisp
Kundry_W_ has joined #lisp
<beach>
jmercouris: It doesn't sound difficult and I don't know why they were never finished. Perhaps there is one now. I haven't looked lately.
<jmercouris>
beach: links?
<beach>
jmercouris: No, I can't remember. It is all from memory.
<jmercouris>
I see
<beach>
jmercouris: I have been working on McCLIM since the year 2000.
<jmercouris>
Wow
<jmercouris>
That is quite dedication to a project
<beach>
Off and on of course.
<jmercouris>
Ah okay, well, that makes it a little different, but still
<jmercouris>
I think the longest I've worked on a project has been about 3 years
<beach>
shka: We have that, of course. But the people who wrote the code are not graphics designers, so people who are complain that they are ugly, not modern enough, inconsistent, etc.
<beach>
jmercouris: Bah, it took me decades to get the editor-buffer implementation right. :)
<jmercouris>
Hard for me to imagine things on that time scale
Kundry_W_ has quit [Ping timeout: 264 seconds]
<pjb>
jmercouris: did you try: SHELL=/usr/bin/clisp in your Makefile?
<jmercouris>
pjb: I can't say I did, why would I do that?
jsjolen has joined #lisp
<pjb>
jmercouris: otherwise, just write a generate.lisp and load it from the Makefile generate:; sbcl --load generate.lisp
<jmercouris>
Oh I see
<pjb>
jmercouris: to be able to write common lisp expressions instead of bash commands in the Makefile rules.
<jmercouris>
yeah, maybe I'll change it down the road
<shka>
beach: i don't care if it is ugly, i just want tool to view my data structures
fikka has joined #lisp
<beach>
shka: Then you should be fine.
<shka>
i think so :-)
<shka>
also, i really liked flamegraphs
<beach>
Yeah, they seem useful.
<shka>
it didn't work perfectly but it was major improvement over raw sbcl output
<beach>
For the profiler?
<beach>
Sure.
EvW has quit [Ping timeout: 265 seconds]
fikka has quit [Ping timeout: 268 seconds]
ahmed has joined #lisp
ahmed is now known as Guest88787
<Guest88787>
I'm newbie to lisp
<shka>
Guest88787: hello
<Guest88787>
I want to do web development in common lisp.
<shka>
that's good
<Guest88787>
hi shka
<Guest88787>
Where should I start.?
<shka>
pick something with good tutorial
<Guest88787>
I have read ANSI CL by Paul Graham.
<shka>
radiance is pretty ok
<shka>
and try to use it
<Guest88787>
Now I'm reading onlisp. It's very hard book.
<shka>
eeeh let's say i am not a huge fan of grahams writing
brettgilio has joined #lisp
<Guest88787>
Bht Why shka?
<shka>
i find his style to be heavy
<shka>
it is difficult to follow and undestand, at least for me
<shka>
guy steele for instance is much better writer imho
<Guest88787>
CLtL2?
<shka>
yup
<Guest88787>
Isn't that reference book?
<shka>
i would dare to say so :-)
<jackdaniel>
I really liked ANSI CL book, especially the excercises
<jackdaniel>
shka: cltl2 is a reference manual, ANSI CL book is something what aims at teaching you something
<jackdaniel>
about programming etc
<shka>
well, yes
<Guest88787>
yeah it's good book.
<jackdaniel>
Guest88787: if you want more CLOS-centric approach at learning Common Lisp you may read PCL
<jackdaniel>
minion: tell Guest88787 about pcl
<minion>
Guest88787: please look at pcl: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
<jackdaniel>
and if you want to have something fun to read, read PAIP (recently published online)
<jsjolen>
I dreamt about a hack to add monomorphically typed tuples to CL
<jsjolen>
Now I just have to code it
Kundry_Wag has quit [Ping timeout: 256 seconds]
<jackdaniel>
Guest88787: as of web development, I don't know any book which concentrates on that. common advice is to write backend in CL and frontend in react (or something similar)
<jsjolen>
jackdaniel: There's a book called WebTales or something. It's self-published and so on
Guest88787 has quit [Ping timeout: 252 seconds]
orivej has quit [Ping timeout: 264 seconds]
EvW1 has joined #lisp
housel has quit [Read error: Connection reset by peer]
papachan has joined #lisp
housel has joined #lisp
Bike has joined #lisp
pierpal has joined #lisp
zfree has quit [Quit: zfree]
Kundry_Wag has joined #lisp
Josh_2 has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
quazimodo has quit [Ping timeout: 260 seconds]
<beach>
Oh, this will be gorgeous. I implemented a simple algorithm for finding the longest path. It is definitely fast enough for our HIR graphs and the layout of the instructions will be fantastic with it.
Kundry_Wag has quit [Ping timeout: 248 seconds]
quazimodo has joined #lisp
lumm_ has joined #lisp
patlv has joined #lisp
LiamH has joined #lisp
EvW1 has quit [Remote host closed the connection]
brettgilio has quit [Remote host closed the connection]
smurfrobot has joined #lisp
lumm has quit [Ping timeout: 256 seconds]
lumm_ is now known as lumm
Kundry_Wag has joined #lisp
Fare has joined #lisp
_cosmonaut_ has quit [Ping timeout: 260 seconds]
gravicappa has quit [Ping timeout: 256 seconds]
subroot has joined #lisp
graphene has quit [Read error: Connection reset by peer]
justyns has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<OwenBarfield>
Hey, I thought you guys might be interested in this blog by freenode staff member Bryan 'kloeri' Ostergaard https://bryanostergaard.com/
<OwenBarfield>
or maybe this blog by freenode staff member Matthew 'mst' Trout https://MattSTrout.com/
<dlowe>
the attack is on the networks, not on individuals in channels
armyriad| has joined #lisp
armyriad| has quit [Killed (Sigyn (Spam is off topic on freenode.))]
warweasle has joined #lisp
graphene has quit [Remote host closed the connection]
Guest16844 has joined #lisp
Guest16844 has quit [Remote host closed the connection]
graphene has joined #lisp
graphene has quit [Remote host closed the connection]
saki has quit [Ping timeout: 264 seconds]
chiyosaki has joined #lisp
graphene has joined #lisp
captgector has joined #lisp
gector has quit [Read error: Connection reset by peer]
lemo has quit [Remote host closed the connection]
lemo has joined #lisp
subroot has quit [Read error: Connection reset by peer]
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
flamebeard has quit []
graphene has quit [Remote host closed the connection]
brit_away has joined #lisp
brit_away is now known as kingcons
graphene has joined #lisp
vaporatorius has quit [Quit: Leaving]
jmercouris has quit [Ping timeout: 244 seconds]
xrash_ has joined #lisp
xrash has quit [Ping timeout: 256 seconds]
Inline has joined #lisp
sjl_ has quit [Ping timeout: 264 seconds]
xrash has joined #lisp
xrash_ has quit [Ping timeout: 276 seconds]
<asarch>
"There is more to Lisp than this, but the ability to bend Lisp to one’s will is a large part of what distinguishes a Lisp expert from a novice."
<asarch>
And "Experienced Lisp programmers build the language up toward their programs."
<asarch>
Wow! So powerful!
<asarch>
Paul Graham, On Lisp
daedreth has joined #lisp
<daedreth>
jo?
<daedreth>
O . o
<dlowe>
despite his unofficial designation as "spokesman for lisp", pg's opinions on lisp are not that common.
subroot has joined #lisp
<heisig>
One could also say "The wisdom not to bend Lisp to one's will on every occasion is a large part of what distinguishes a Lisp expert from a novice." :)
<dlowe>
and he has an idiosyncratic style
<daedreth>
I have a question. I'm working right now through Paul Grahams book.
<daedreth>
Why does (apply #'list 1 nil) evaluate to (1) and (funcall #'list 1 nil) to (1 nil)
<daedreth>
?
ahmed111 has joined #lisp
<heisig>
daedreth: The last argument to apply supplies a list of arguments (in this case, none) to the function, while the last argument to funcall is just another argument.
Arcaelyx_ has quit [Read error: Connection reset by peer]
<heisig>
So for apply, LIST receives just one argument, 1. For FUNCALL, LIST receives two arguments, 1 and NIL.
Arcaelyx has joined #lisp
<daedreth>
I think I got it, thanks. Recursion is still wrecking my brain a bit though. :D
<Bike>
s easy, you do a thing, and that thing does the thing which is the same thing as the thing you did
<daedreth>
> . < you are mean!
patlv has quit [Ping timeout: 268 seconds]
heisig has quit [Quit: Leaving]
<daedreth>
Q ~ Q My brain stack is not big enough.
<dlowe>
specifically, you break down a problem into smaller problems of exactly the same type until it can't be broken down any more.
<Bike>
i am mean
patlv has joined #lisp
mindCrime has joined #lisp
<dlowe>
think about how you would hit all the files in a directory tree. You scan through a directory, hitting all the files, but when you get to another directory, you want to do exactly the same thing to that one.
sjl_ has joined #lisp
<daedreth>
I got that one. I guess it's just getting some experience. Fibonacci and in order tree traversel are alright.
<Bike>
well that's basically it.
ahmed111 has quit [Quit: Bye]
<Bike>
is there some specific example you're not understanding?
<xificurC>
recursion is when you open a box and find 5 boxes
ahmed111 has joined #lisp
<daedreth>
excercise 5b) of the second chapter in the PGs Ansi Common lisp book.
<daedreth>
page 29
<vtomole>
fwiw, I didn't understand recursion until I read The Little Schemer.
<Bike>
i don't have the book, so not much i can do for you there
beach has quit [Ping timeout: 255 seconds]
<daedreth>
then let my type it out. (if I can figure out how to get line breaks in IRC. :D
ahmed111 has quit [Client Quit]
jsjolen has quit [Remote host closed the connection]
<vtomole>
Use Github gist or Paste.org
<random-nick>
IRC doesn't allow line breaks in messages
<daedreth>
Yeah, what does the code. I'm really sure.
graphene has quit [Remote host closed the connection]
<daedreth>
y is supposed to be a list that gets parsed or something.
<beach>
daedreth: It seems to return the position in the list of the value of X, or NIL if no such value exists.
<beach>
... the position of the FIRST OCCURRENCE.
pppingme_ has joined #lisp
graphene has joined #lisp
<daedreth>
Now that I think about it. I could've just typed it into the repl and tested it.
<daedreth>
lel
<Bike>
yeah, but there's still stuff to see form the code even if you don't get the whole thing
<Bike>
for example, y has NULL, CAR,and CDR called on it, so it's probably supposed to be a list
Kevslinger has joined #lisp
pppingme_ has quit [Remote host closed the connection]
wheelsucker has joined #lisp
ahmed111 has quit [Read error: Connection reset by peer]
Smokitch has quit []
<LdBeth>
It isn’t tail recursive, does it?
<daedreth>
The think that's melting my brain is the else clause of the second if expression.
<beach>
Nope.
ahmed111 has joined #lisp
<beach>
daedreth: Do you know anything about proof by induction from math?
<beach>
daedreth: It's the same stuff.
<daedreth>
yes
<daedreth>
should I proof it for u, sensei?
<beach>
daedreth: Let's say you want to find the position of the first occurrence of X in the list Y...
<beach>
daedreth: Base case, the list Y is empty.
<pjb>
So it was ((bat (((((((mario))))))))).
<beach>
daedreth: Then there is no occurrence of X, so you return NIL (meaning no occurrence).
<daedreth>
I got the base case, but the else clause...
<daedreth>
and the "and" inside the "let"
<beach>
daedreth: Then, if the first element of the list is X, then you found the first occurrence and its position is 0, so you return that.
<beach>
daedreth: If not, you find the first occurrence of X is the rest of the list (cdr y).
<pjb>
daedreth: sprunge.us was nicer, but it seems it doesn't work anymore.
chiyosaki has quit [Ping timeout: 260 seconds]
<daedreth>
beach: got that
<beach>
daedreth: If the result of that recursive call is nil, then there is no occurrence, so you return NIL again (that's what (and NIL ...) does.
<daedreth>
so the "and" is to make sure, that everything up the stack evaluates to nil.
<beach>
daedreth: Finally, if the result of the recursive call is not NIL then by induction it is the position of the first occurrence of X in the rest of the list (cdr y).
<beach>
So you return 1 + that position, because the list is one element longer.
<beach>
daedreth: He should not have written it that way. It is not good style.
<beach>
daedreth: He should have written (if (null z) nil (1+ z))
<daedreth>
(+ 1 z) :p
<daedreth>
ok, I let me think about this a minute.
<beach>
(+ <mumble> 1) is better written (1+ <mumble>)
saki has joined #lisp
<pjb>
(1+ x) is not (+ 1 x) but (+ x 1)!
<pjb>
(1- x) is not (- 1 x) but (- x 1)!
<pjb>
think successor, and predecessor.
<pjb>
succ(x) and pred(x) in Pascal.
<LdBeth>
Emm, he could definitely write a loop
<pjb>
but writing loops would involve more variables, therefore more naming.
<beach>
daedreth: So you see, a recursive program has the same structure as a proof by induction.
<beach>
... or rather, it should, in order to be understandable.
<shka>
:D
mindCrime has quit [Quit: Leaving]
knusbaum has quit [Ping timeout: 264 seconds]
<daedreth>
ok, I got it. If you find x at position 3 for example, it will return (+ 3 1) at the end of the 3rd recursive call, because that's the last thing, that get's evaluated int the "and".
<daedreth>
right?
<pjb>
right.
<pjb>
(macroexpand-1 '(and x (+ 1 l))) #| --> (if x (and (+ 1 l))) ; t |#
<Corvus`_>
This message was brought to you by Private Internet Access
<daedreth>
(ಥ╭͜ʖ╮ಥ)
<beach>
pjb: Are you showing various unacceptable solutions?
Kundry_Wag has quit [Remote host closed the connection]
<pjb>
I find it acceptable.
Corvus`_ has quit [Killed (Sigyn (Spam is off topic on freenode.))]
dddddd has quit [Remote host closed the connection]
<shka>
damn spammers
<daedreth>
"– American Patriot and known Pedo Positive Timothy James McVeigh"
xrash has quit [Read error: Connection reset by peer]
<pjb>
But the thing is that often the data flow is more complex, so you cannot use this kind of concise form.
smurfrobot has quit [Remote host closed the connection]
<daedreth>
I thought I could just casually read through "ANSI Common LISP", but those excercises won't let me pass if I'm unworthy. It's fun though. ^^
<shka>
this spammer seems to be rather... unstable
<beach>
daedreth: You will get it eventually.
graphene has quit [Remote host closed the connection]
<daedreth>
The ultimate goal is to be able to use all my knowledge to create the ultimate goal of every programmer. The perfect Emacs configuration.
<beach>
daedreth: Also, just like a proof by induction, you will always see the base case first. If not, you will leave the poor person reading your code in suspense.
<daedreth>
^agreed
graphene has joined #lisp
FreeBirdLjj has joined #lisp
* LdBeth
would finally find out Emacs sucks and the ultimate goal switched to making a new wheel
subroot has quit [Quit: Leaving]
<daedreth>
Hah! Jokes on you. I'm not a native english speaker, so I didn't got the joke.
<daedreth>
xD
<daedreth>
didn't get*
<daedreth>
ahem
jfrancis_ has quit [Remote host closed the connection]
<Asorailahd16>
or maybe this blog by freenode staff member Matthew 'mst' Trout https://MattSTrout.com/
<Asorailahd16>
Hey, I thought you guys might be interested in this blog by freenode staff member Bryan 'kloeri' Ostergaard https://bryanostergaard.com/
<daedreth>
I would have to polish my almost non existent italian.
<beach>
I am betting they speak English.
Cory26 has joined #lisp
Cory26 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
fikka has quit [Ping timeout: 256 seconds]
<daedreth>
I haven't been on any meetup yet. But it would probably be a nice experience though.
<beach>
There are usually nearly 100 people attending.
<beach>
daedreth: Some of us also sometimes meet on other occasions.
jfrancis_ has joined #lisp
graphene has quit [Remote host closed the connection]
<daedreth>
I'm a poor student though. ^ - ^
EvW has quit [Ping timeout: 265 seconds]
graphene has joined #lisp
<LdBeth>
╮( ̄▽ ̄"")╭me too
<daedreth>
living each day as if it were my last and scraping up leftovers from trash cans in order to able to save up some money for the electricity which is needed for my beloved computer in order to learn LISP.
ahmed111 has quit [Quit: Bye]
ahmed111 has joined #lisp
<Zhivago>
You don't need electricity for that -- you can always scratch s-exps in the dirt and resolve them manually.
<aindilis>
hi daedreth
<daedreth>
jo
<aindilis>
I used to scrape out of trashcans
<aindilis>
and I have been working on the perfect emacs configuration
<daedreth>
aindlilis: Wanna be best friends for ever?
<aindilis>
sure!
<daedreth>
nice!
<aindilis>
so tell me more
<daedreth>
uhhh...hm...
<beach>
Let's stick to the topic please.
<daedreth>
^
ahmed111 has quit [Client Quit]
<daedreth>
(agreementp (agree (+ 0 1)) --> T
ahmed111 has joined #lisp
<beach>
There is #lispcafe for discussions that don't belong here.
jmercouris has joined #lisp
<jmercouris>
I have a design in my program that already works, you have commands, and command-completions
fikka has joined #lisp
<jmercouris>
a command is function that you can invoke
<jmercouris>
a command completion is a function that you can invoke with a string representing a function call, and it helps you complete it
<jmercouris>
as you can see, there is a (define-command) and (define-command-completion) macro
<jmercouris>
I don't like the way that these are coupled together, as defined-command-completion depends upon define-command
<jmercouris>
sometimes, in my image, it seems that a command completion will not be correctly associated with a command
Kundry_Wag has joined #lisp
<jmercouris>
any suggestions ideas are appreciated
brand024 has joined #lisp
<jmercouris>
s/suggestions ideas/suggestions or ideas
brand024 has quit [Remote host closed the connection]
lemo has quit [Read error: Connection reset by peer]
<LdBeth>
Do you want completions to be inherited?
<jmercouris>
LdBeth: what do you mean by inherited?
<jmercouris>
I want a completion function to somehow be associated with a command
<beach>
jmercouris: Perhaps at this point you are ready to see how it works in CLIM. There is the concept of commands, but also of presentations types.
erratic has quit [Ping timeout: 256 seconds]
schweers has quit [Ping timeout: 245 seconds]
kenster has joined #lisp
<jmercouris>
beach: presentation types?
<beach>
Yes, the very essence of CLIM.
<beach>
Brilliant stuff. Makes the applications way more modular.
<jmercouris>
Okay, let me go ahead and clone the repository
megalography has quit [Ping timeout: 240 seconds]
<beach>
Essentially, when you draw some figure in a window, you can assign a presentation type to it.
<beach>
Then if you have a command that accepts arguments of a certain presentation type, instead of typing those arguments, all figures of that presentation type become clickable.
<beach>
Or, you can use completion.
<jmercouris>
interesting
<jmercouris>
I assume commands are objects and presentation types are classes?
<beach>
Sort of.
<beach>
Presentation types have a few more features than classes do.
bsund has joined #lisp
ahmed111 has quit [Ping timeout: 264 seconds]
<jmercouris>
Is there some example in the codebase I can look at?
<jmercouris>
in the examples dir?
rippa has joined #lisp
<beach>
Sure, there is always the typical address-book demo.
<beach>
It shows the essence.
<jmercouris>
A classic demo
<beach>
Yes.
<jmercouris>
why do they wrap (make-instance 'address) in a function (make-address)? is this a thing I should be doing?
<beach>
Opinions differ.
<beach>
Sonja Keene favors such explicit "constructors".
guntbert13 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
msb has quit [Ping timeout: 256 seconds]
<trittweiler>
Can we set +r as the channel mode? This will prevent unregistered users from joining. I assume those spammers are not actually identified.
<trittweiler>
that would be /mode #lisp +r
<trittweiler>
I'm not seeing them in #emacs which does have +r
fikka has joined #lisp
<Bike>
i suppose it will be hard to use the channel today otherwise
<Bike>
any objection?
msb has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
patlv has quit [Ping timeout: 260 seconds]
Kundry_Wag_ has quit [Ping timeout: 268 seconds]
random-nick has quit [Read error: Connection reset by peer]
rozenglass has joined #lisp
msb has quit [Ping timeout: 240 seconds]
<jackdaniel>
I suppose none
fikka has joined #lisp
<Inline>
nope
msb has joined #lisp
<Inline>
no problem
<jackdaniel>
I'll lift it tomorrow (given I won't forget)
megalography has quit [Ping timeout: 264 seconds]
optikalmouse has quit [Ping timeout: 248 seconds]
jfrancis_ has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 240 seconds]
patlv has joined #lisp
fikka has joined #lisp
daedreth has left #lisp ["ERC (IRC client for Emacs 26.1)"]
megalography has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Wojciech_K has joined #lisp
ahmed111 has quit [Quit: Bye]
hiroaki has quit [Ping timeout: 255 seconds]
fikka has joined #lisp
rozenglass has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 268 seconds]
patlv has quit [Ping timeout: 264 seconds]
Khisanth has quit [Ping timeout: 256 seconds]
random-nick has joined #lisp
Cthulhux has quit [Changing host]
Cthulhux has joined #lisp
al-damiri has joined #lisp
nika_ has quit [Quit: Leaving...]
test1600 has joined #lisp
fikka has joined #lisp
sauvin has quit [Read error: Connection reset by peer]
rozenglass has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Khisanth has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
<vtomole>
stylewarning: Hi
fikka has joined #lisp
Guest16049 is now known as karstensrage
karstensrage has quit [Changing host]
karstensrage has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
fikka has quit [Quit: leaving]
fikka has joined #lisp
josemanuel has joined #lisp
graphene has quit [Remote host closed the connection]
graphene has joined #lisp
emacsomancer has quit [Ping timeout: 248 seconds]
fikka has quit [Ping timeout: 256 seconds]
brettgilio has joined #lisp
graphene has quit [Remote host closed the connection]
<kenster>
Hey so if I use defmethod inside of a macro, and the macro is in a separate package, how do I export that method?
<dlowe>
put an EXPORT form in your macro expansion
graphene has joined #lisp
megalography has quit [Ping timeout: 268 seconds]
<brettgilio>
I've been working with Scheme for about two months. I know this group may have a bias, but should I stick to learning Scheme, or should I learn Common Lisp instead? I'd also like to know why you think so.
fikka has joined #lisp
<Bike>
if you learn one it'll take you like an hour to get going with the other.
<brettgilio>
ty Bike
<kenster>
dlowe: I tried that and it still says the function is an alien function
dddddd has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
<housel>
brettgilio: of course, depends on what sort of programs you want to write, and which language's community is developing libraries in areas that you're interested in, etc.
<kenster>
the thing is the method name used in defmethod is provided by the caller of the function
<kenster>
so it does defmethod FILEBUCKET::NEW in this case
<kenster>
but exporting it to the package of cffi-utils does nothing
<kenster>
so do I have to have a parameter with the caller's package name? seems kind of weird
<dlowe>
kenster: packages don't have anything to do with alien-ness of functions
<kenster>
The alien function "new" is undefined.
<kenster>
ah ok
<kenster>
nevermind
<kenster>
I know the issue
<kenster>
so if i have a (eval-when (:compile-toplevel :load-toplevel :execute) (...)) form that defines a parameter for usage in a macro
graphene has quit [Remote host closed the connection]
<kenster>
do I have to export it after I do defparameter, no in the (:export ) form of defpackage?
graphene has joined #lisp
kingcons has quit [Remote host closed the connection]
megalography has joined #lisp
<Bike>
it's very preferable to export in defpackage
eli_oat has quit [Read error: Connection reset by peer]
fikka has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
zooey has quit [Remote host closed the connection]
zooey has joined #lisp
<kenster>
oddly when I do (gethash class *c-class-structs*) it clearly isn't getting a result, with *c-class-structs* not being nil, and class being 'upload-session which I setf in c-structs.lisp
<kenster>
err with (gethash 'upload-session *c-class-structs*) being a string
Jesin has quit [Quit: Leaving]
<kenster>
the defparameter is defined with the setf forms inside (eval-when (:compile-toplevel :load-toplevel :execute) (...))
vlatkoB has quit [Remote host closed the connection]
<pjb>
kenster: don't export automatically: let the user pass the name of the generic function as an explicit parameter to the macro, and let the user export or not export that symbol as he wishes.
<kenster>
that's what I do, yeah
<kenster>
the alien function is a different error with CFFI
<kenster>
and the reason why is because it's not looking up the C struct name in *c-class-structs*
<kenster>
so my macro expands to the non-struct prefix version
<pjb>
If you call gethash in the macro, at macro-expansion time, ie. in the compilation environment, you must ensure that the hash-table is filled in the compilation environment.
<kenster>
it should be FileUploadingSession_new
<kenster>
yes, so I put the defparameter with the setf forms inside (eval-when (:compile-toplevel :load-toplevel :execute) (...))
<pjb>
And vice-versa, if you call gethash in the expansion of the macro, so it's executed at run-time, you must ensure that the hash-table is filled at run-time, in the execution environment.
<kenster>
but that eval-when is in a separate package
<kenster>
I think the hash-table is defined, because otherwise gethash would have given me an error
<pjb>
(eval-when (:compile-toplevel :load-toplevel :execute) …) can help but mostly, it works only if it's toplevel. Sometimes you have to fill those hash-table twice, explicitely at macro-expansion time and explicitely in the expansion, at run-time.
<pjb>
The question is how you fill it.
<kenster>
that's weird that the defparameter would execute then and not the setf forms following it
<kenster>
because the hash table is defined, but the hash table isn't populated I guess
<pjb>
One point to note is that not all lisp objects are writable to the fasl file. For some lisp custom lisp objects, you can provide a make-load-form method, but some other objects have to be re-created at load-time to be available at run-time.
<pjb>
So in a way, CL is outside of the Eden.
<kenster>
hmmm
<shka1>
pjb: poetic
<kenster>
so how would the parameter be defined but not the hash values within the value?
<kenster>
it worked before when the eval-when was in the same file
<pjb>
If you make it work at compilation time with a surrounding eval-when, it will still re-initialize the binding with a new hash-table at run-time.
lonjil has quit [Ping timeout: 245 seconds]
fikka has joined #lisp
<pjb>
You have to be careful, because usually when developping, the compilation environment is the same as the execution environment. But once you compile the fasl and load them at run-time in a new image, you only have the execution environment. Or when you boot a fresh image, and asdf load the compiled file and save an executable image.
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
<kenster>
oops I forgot the package definitions for them
<kenster>
well, each of the lisp files have package definitions, just assume that, lol
<pjb>
kenster: I get The value "G45281" is not of the expected type list. when compiling that.
lonjil has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
<kenster>
I didn't include the other packages with the dependencies
<kenster>
so that may be why
<shka1>
does not sound like it
<kenster>
it works here so I don't know :/
<kenster>
just not the part with gethash
<kenster>
I have :cffi :alexandria in my :use
<kenster>
it could be that he is getting to the correct expanded form, and it is just incorrectly evaluated
<kenster>
which would make sense because he probably has the eval-when in the same file
<kenster>
so I have to fix that, but that doesn't solve the issue of the separate file not being able to export a compile time hash
sjl has joined #lisp
test1600 has quit [Ping timeout: 260 seconds]
lonjil has quit [Ping timeout: 256 seconds]
moei has joined #lisp
lonjil has joined #lisp
Einwq has quit [Quit: Leaving]
shenghi has quit [Ping timeout: 256 seconds]
cpape has quit [Read error: Connection reset by peer]
shenghi has joined #lisp
brettgilio has quit [Remote host closed the connection]
xrash has joined #lisp
patlv has joined #lisp
pierpal has quit [Quit: Poof]
<aeth>
This will work for most standard-classes/structure-classes: (defmacro define-simple-slot-saving-for-class (class) `(defmethod make-load-form ((object ,class) &optional environment) (make-load-form-saving-slots object :environment environment)))
pierpal has joined #lisp
<aeth>
It works on so many I sort of wonder why this wasn't the default behavior of defclass and defstruct, where you would only overwrite that when you have an issue with that.
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
<klltkr_>
Yo
lumm has quit [Ping timeout: 256 seconds]
<stylewarning>
vtomole: hi
Cymew has quit [Remote host closed the connection]
graphene has quit [Remote host closed the connection]
equwal has joined #lisp
graphene has joined #lisp
<vtomole>
stylewarning: Sent a pull request your way:https://github.com/tarballs-are-good/cl-forest/pull/3. I think i'm the only one who uses this as it's been like this for a while :). Would love a review.
<Bike>
aeth: because if it doesn't work it will do so subtly