jackdaniel changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language<http://cliki.net/> logs:<https://irclog.whitequark.org/lisp,http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.5, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
Denommus has quit [Ping timeout: 260 seconds]
<aeth> hmm
<mfiano> Basically you would compose those 2 functions instead of doing what I did here: https://gist.github.com/mfiano/4565f6b99cbfaf7a6abc694c10e2c834
pjb``` has joined #lisp
buffergn0me has joined #lisp
<mfiano> and you can extend this to other shapes as long as you know the math for selecting pixels, and for any arity.
pjb`` has quit [Ping timeout: 245 seconds]
<aeth> mfiano: So these lists, are they being built at compile time via a macro?
<mfiano> That's an implementation detail.
pjb```` has joined #lisp
fikka has joined #lisp
pjb``` has quit [Ping timeout: 256 seconds]
Domaldel has quit [Quit: Leaving]
<_death> if a generic function takes more than one required argument, one could likely figure out some case where multiple specializers make sense
pjb````` has joined #lisp
<_death> that you use generic functions means you're not screwed when that actually happens
<mfiano> aeth: Anyway, my point is not that they're lists...they could be functions which return arrays, and your multimethod could in theory return multiple values for selecting the interesting cells.
fikka has quit [Ping timeout: 255 seconds]
pjb```` has quit [Ping timeout: 256 seconds]
<mfiano> The point was that you can compose selections of cells from previously defined functions, by specializing on multiple required arguments.
pjb`````` has joined #lisp
<aeth> mfiano: Maybe I'm not quite understanding you or maybe your examples are oversimplified or something else, but it seems like you're close to something but not quite there.
<mfiano> Ha fair enough.
<aeth> You should try to develop something.
<aeth> I think you might be on the right track to see something cool at the end.
pjb````` has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
<mfiano> To be perfectly honest, I didn't realize that my CL implementation of this was incomplete part way through this example, though I did do it with Clojure.
<mfiano> Particularly the multiple dispatch part :)
pjb`````` has quit [Ping timeout: 256 seconds]
beginner_supreme has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<mfiano> aeth: If I ever complete it with the 37 other active projects I'm working on, real life excluded, I'll keep you informed :)
MolluskEmpire has quit [Ping timeout: 256 seconds]
<aeth> mfiano: just borrow some of Shinmera's productivity.
<aeth> Shinmera laughs at 37
<mfiano> Ha yeah, he's like fukamachi, except with code that doesn't leave a bad taste, complete with documentation and all
eli_oat has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
markoong has quit [Read error: Connection reset by peer]
markoong has joined #lisp
kjeldahl has joined #lisp
zooey has quit [Remote host closed the connection]
zooey has joined #lisp
scymtym has quit [Remote host closed the connection]
markoong has quit [Ping timeout: 260 seconds]
xh4 has joined #lisp
scymtym has joined #lisp
johnnymacs has quit [Read error: Connection reset by peer]
clog has joined #lisp
blt has quit [Ping timeout: 245 seconds]
beginner_supreme has quit []
blt has joined #lisp
blt has joined #lisp
blt has quit [Changing host]
sjl has quit [Ping timeout: 264 seconds]
eli_oat has quit [Quit: Leaving.]
Jesin has joined #lisp
skapata has quit [Remote host closed the connection]
xh4 has quit [Remote host closed the connection]
eli_oat has joined #lisp
caltelt_ has joined #lisp
<slyrus> hmm... one day I should consider using radiance instead of caveman/clack/lack/etc...
<theemacsshibe[m]> hi there
<PuercoPop> What's wrong with hunchentoot?
eli_oat has quit [Quit: Leaving.]
eli_oat has joined #lisp
<akkad> heh
<akkad> does it support ssl yet?
<Ober> ssl is not available from lw/franz/sbcl, and two of those take money from you
zachk has quit [Quit: Leaving]
eli_oat has quit [Quit: Leaving.]
shifty has joined #lisp
brendyn has joined #lisp
<PuercoPop> akkad: I don't remember ever being a time where there wasn't an ssl-acceptor. And even if that weren't the case, one could always nginx in front to take care of it
<akkad> nice.
<Ober> is nginx in quicklisp?
rumbler31 has joined #lisp
<akkad> adding another webserver seems to sort of defeat the point.
k-hos has quit [Read error: Connection reset by peer]
fikka has joined #lisp
<PuercoPop> Not really, you don't want to serve static files from your application server most of the time.
fyodost has quit [Quit: Leaving]
<akkad> that's what cdns are for
mathZ has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
* akkad wonders why they thought ssl was not supported in it
eli_oat has joined #lisp
Lord_Nightmare has quit [Ping timeout: 248 seconds]
montxero has left #lisp [#lisp]
rumbler31 has quit [Remote host closed the connection]
robotoad has quit [Quit: robotoad]
k-hos has joined #lisp
Jesin has quit [Quit: Leaving]
Jesin has joined #lisp
EvW1 has quit [Ping timeout: 255 seconds]
milanj has quit [Quit: This computer has gone to sleep]
subroot has quit [Read error: Connection reset by peer]
karswell_ has quit [Read error: No route to host]
karswell_ has joined #lisp
beginner_supreme has joined #lisp
JuanDaugherty has quit [Quit: Exeunt]
smasta has joined #lisp
<akkad> ahh, was not a lack of support, was the lack of reported quality
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
aindilis has quit [Remote host closed the connection]
robotoad has joined #lisp
aindilis has joined #lisp
<akkad> PuercoPop: thanks for the info. will have to check tha tout
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
deng_cn has joined #lisp
mooshmoosh has joined #lisp
asarch has joined #lisp
<beginner_supreme> Does anyone feel as though there is a built-in function for every little thing? Every time I write some code I wonder if I should be using some sort of built-in instead...
<beginner_supreme> But the standard does not fit in my mind's cache
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
<pierpa> requires some time
megalography has quit [Ping timeout: 268 seconds]
shka_ has joined #lisp
kajo has quit [Remote host closed the connection]
pierpa has quit [Quit: Page closed]
kajo has joined #lisp
nydel has quit [Read error: Connection reset by peer]
smurfrobot has joined #lisp
AetherWind has joined #lisp
AetherWind has quit [Max SendQ exceeded]
AetherWind has joined #lisp
eli_oat has quit [Quit: Leaving.]
megalography has joined #lisp
smurfrobot has quit [Ping timeout: 264 seconds]
lavaflow has quit [Ping timeout: 264 seconds]
deng_cn has quit [Remote host closed the connection]
deng_cn has joined #lisp
Bike has quit [Quit: Lost terminal]
<Beep-Lord> beginner_supreme: You could always run a quick apropos in your repl.
lavaflow has joined #lisp
<asarch> What is a lambda-list?
<asarch> The arguments of a lambda function?
Lord_Nightmare has joined #lisp
shangul has joined #lisp
<Beep-Lord> clhs 3.4.1
serichse` has joined #lisp
serichsen has quit [Ping timeout: 245 seconds]
<asarch> (remove-if-not #'(lambda (x) (= 0 (mod x 2))) '(1 2 3 4 5 6 7 8 9 10))
<asarch> ?
zooey has quit [Remote host closed the connection]
RTZ0x859 has joined #lisp
RTZ0x859 has quit [Max SendQ exceeded]
zooey has joined #lisp
zooey has quit [Remote host closed the connection]
RTZ0x859 has joined #lisp
Arcaelyx has quit [Quit: Textual IRC Client: www.textualapp.com]
igemnace has joined #lisp
rumbler31 has joined #lisp
buffergn0me has quit [Ping timeout: 264 seconds]
rumbler31 has quit [Ping timeout: 248 seconds]
Lord_Nightmare has quit [Ping timeout: 268 seconds]
smurfrobot has joined #lisp
Lord_Nightmare has joined #lisp
fikka has joined #lisp
smurfrobot has quit [Ping timeout: 265 seconds]
charh has quit [Ping timeout: 256 seconds]
charh has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
doesthiswork has quit [Quit: Leaving.]
zooey has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 276 seconds]
montxero has joined #lisp
<beach> Good morning everyone!
<montxero> :beach hey
<beach> asarch: It would be called "parameter list" in other languages.
<montxero> Does anyone know of lisp meetups and events in Australia?
<beach> Check with pillton.
<montxero> kinda hard finding any
<beach> You two can get together.
<beach> Though you may not be close of course.
<beach> asarch: And, there is no such thing as a "lambda function" in Common Lisp. There are functions, and that's it.
<montxero> :beach thanks
<beach> montxero: Where are you located?
charh has quit [Ping timeout: 256 seconds]
<montxero> Melbourne
smasta has quit [Ping timeout: 240 seconds]
<beach> The situation is not ideal in Austalasia. When I lived in Auckland for a year, I found that there was only a handful of Lispers within a 3 hour flight. Here in Europe there are hundreds within such a radius.
asarch has quit [Ping timeout: 256 seconds]
<montxero> :beach that sucks
<beach> Yeah.
<montxero> Starting out with the SCIP videos but doing the exercises in common lisp. Fun so far...
<beach> SICP?
<montxero> yeah SICP
<montxero> every now and then, I have to do some mental gymnastics to get over the single/dual namespace difference
<beach> I can see that.
<beach> So you are just now starting to learn Common Lisp?
<montxero> Yeah
<montxero> 2 weeks now
<beach> Congratulations.
<montxero> Thanks
<beach> What implementation did you install?
<montxero> sbcl + emacs + slime + asdf + quicklisp
<beach> Sounds good.
<montxero> went through a couple of tutorials to get that working
<beach> Yeah, it can be tricky. Nowadays there is Portacle that packages those things conveniently.
<beach> Make sure you use the slime-indentation contribution for SLIME. At least I *think* that is still only a contribution and not the default.
<beach> Otherwise it gets the indentation of some forms wrong.
<montxero> Okay... will look into that.
<montxero> Does this look right? https://pastebin.com/djPzHAqX
<beach> Nope.
<beach> You don't nest DEFUNs in Common Lisp.
<montxero> A function I wrote to emulate a list comprehension from python
<beach> That's a Scheme thing.
<montxero> Oh...
<montxero> lol
<montxero> SICP then
<montxero> hahahahahaha
<beach> Also, your indentation is wrong.
<beginner_supreme> In CL you would use flet or labels to make a local function.
<beginner_supreme> *named function I mean
<montxero> Thanks for the heads up... searching for the slime-indentation package now
<beach> montxero: Also, the function that you thought would be local seems to be using tail recursion with an accumulator. That is also a Scheme-ism because in Scheme, iteration is really tail recursion under the hood. In Common Lisp, you would use iteration instead, especially since Common Lisp does not guarantee tail-call merging.
<beach> montxero: That indentation should have been fixed without that contribution.
<beach> montxero: You must not have hit TAB on those lines.
fikka has joined #lisp
RTZ0x859 has quit [Quit: Leaving]
<montxero> I just noticed... not sure why that happened. https://pastebin.com/EG2FGJby just repasted the original
<beach> It may have to do with TAB characters in your source. Pastebin may not handle them right. I suggest you make Emacs use spaces all the time. Other tools don't do TAB characters very well either.
caltelt_ has quit [Ping timeout: 260 seconds]
<beach> Yes, now the indentation is right it seems.
<beach> Step one would be to replace the nested DEFUN with LABELS.
<beach> clhs labels.
<specbot> Couldn't find anything for labels..
<beach> clhs labels
<montxero> So, labels / flets rather than nestd defuns.. Is there a particular reason for that? like the functions leaking out to global scope?
fikka has quit [Ping timeout: 245 seconds]
<Beep-Lord> Yeah, defun defines in the global environment.
<beach> Sort of, yes. DEFUN always creates a globally defined function.
<montxero> OOOOOOoooooooohhhh
<beginner_supreme> Example reference: (defun add (a b) (+ a b)) --> (add 1 2) => 3 is the usual way. (labels ((add (a b) (+ a b))) (add 1 2)) => 3 is the labels way.
<beginner_supreme> It's like a let* but for functions
<beginner_supreme> Since the namespaces are separate
<montxero> Okay cool... I'm reading clhs for flet and labels. This portion: "labels is equivalent to flet except that the scope of the defined function names for labels encompasses the function definitions themselves as well as the body." seems a bit opaque to me; almost like it is hiding a very subtle warining
<beach> Not at all.
<beach> It means that functions defined with LABELS can call each other recursively.
<beach> Not so with FLET.
smurfrobot has joined #lisp
<montxero> Oh!!!!!, so if I want to define a recursive function inside the scope of another function, I would be better off using labels (rather than defun). If I were to define said recursive inner function with FLET, on calling the function, I will get a symbol (unbounded / undefined) error or someting to that effect. Is that it or am I missing something else?
<beach> Sounds right.
<montxero> You, Sensie Beach are a legend.
<beach> ?
<montxero> **extravagant thanks**
<beach> Oh, sure. Anytime.
Inline has quit [Quit: Leaving]
<beach> Right now I am having my coffee in order to wake up, so any more taxing intellectual activity shall have to wait anyway.
<montxero> No worries
<beginner_supreme> I've written up an explanation on pastebin. https://pastebin.com/mwHHPHtv
slyrus1 has joined #lisp
smurfrobot has quit [Ping timeout: 245 seconds]
<montxero> beginner_supreme: Thanks for that. The namespace demo captures a lot of the problems I've encountered
<beginner_supreme> No problem
<beach> beginner_supreme: It is not common to use #'(lambda...) anymore. You can just use (lambda ...) instead.
<beginner_supreme> I was just demonstrating the namespace quirk
<beginner_supreme> Oh right, yeah that macro
<beginner_supreme> I forgot about that
<beach> beginner_supreme: Otherwise, good explanation.
<beginner_supreme> Thanks :]
sauvin has joined #lisp
<beginner_supreme> That took a while to write up because I still haven't learned enough emacs.
<beach> Good exercise then.
<beginner_supreme> So I'm using my brain's paredit and a steady hand
<beach> Oh, wow.
<beginner_supreme> Damn it one day I will know emacs
<beginner_supreme> And this can end
<beach> Yeah. I recommend it.
<beginner_supreme> I'm off for tonight, good night all!
<beach> Good night beginner_supreme.
beginner_supreme has quit []
<montxero> Good noght beginer_supreme
<beach> montxero: If you know how to program in other languages already, PCL may be a better alternative to SICP.
<beach> minion: Please tell montxero about PCL.
<minion> montxero: 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).
<beach> montxero: It is way more idiomatic for Common Lisp than SICP is.
fikka has joined #lisp
<montxero> Okay... thanks... and thanks minion
<beach> minion: Thanks!
<minion> np
<beach> minion: Are you a bot?
<minion> Are you a bot: An error was encountered in lookup: Parse error:URI "https://www.cliki.net/Are you a bot?source" contains illegal character #\ at position 25..
<beach> Heh.
fikka has quit [Ping timeout: 240 seconds]
Beep-Lord has quit [Quit: WeeChat 1.6]
makomo has quit [Ping timeout: 240 seconds]
makomo has joined #lisp
smurfrobot has joined #lisp
<oni-on-ion> =)
karlosz has quit [Quit: karlosz]
fikka has joined #lisp
robotoad has quit [Quit: robotoad]
vitali has quit [Quit: Leaving]
makomo has quit [Ping timeout: 265 seconds]
fikka has quit [Ping timeout: 240 seconds]
paule32 has joined #lisp
gector has quit [Read error: Connection reset by peer]
<paule32> hello
gector has joined #lisp
<paule32> how can i code a event - message?
MoziM has joined #lisp
robotoad has joined #lisp
acolarh has joined #lisp
mooshmoosh has quit [Ping timeout: 260 seconds]
Jesin has quit [Ping timeout: 256 seconds]
shka_ has quit [Ping timeout: 260 seconds]
shrdlu68 has joined #lisp
fikka has joined #lisp
flamebeard has joined #lisp
scymtym has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 276 seconds]
smurfrobot has quit [Remote host closed the connection]
fikka has joined #lisp
smurfrobot has joined #lisp
<pillton> Use a class since an event is the state of something at a specific time instant.
fikka has quit [Ping timeout: 260 seconds]
mathZ has quit [Remote host closed the connection]
smasta has joined #lisp
shangul has quit [Remote host closed the connection]
vlatkoB has joined #lisp
shangul has joined #lisp
spectrumgomas[m] has quit [Ping timeout: 260 seconds]
thorondor[m] has quit [Ping timeout: 260 seconds]
lyosha[m] has quit [Ping timeout: 260 seconds]
LdBeth has quit [Ping timeout: 260 seconds]
hdurer[m] has quit [Ping timeout: 260 seconds]
remix2000[m] has quit [Ping timeout: 260 seconds]
GNUPONUT[m] has quit [Ping timeout: 260 seconds]
lyosha[m] has joined #lisp
thorondor[m] has joined #lisp
spectrumgomas[m] has joined #lisp
kajo has quit [Ping timeout: 256 seconds]
GNUPONUT[m] has joined #lisp
merodix has joined #lisp
remix2000[m] has joined #lisp
LdBeth has joined #lisp
nickenchuggets has quit [Quit: Leaving]
hdurer[m] has joined #lisp
smasta has quit [Ping timeout: 265 seconds]
nydel has joined #lisp
littlelisper has joined #lisp
robotoad has quit [Quit: robotoad]
<littlelisper> i have just started with macros, it says illegal function calls
shrdlu68 has quit [Ping timeout: 256 seconds]
shrdlu68 has joined #lisp
<jdz> littlelisper: That looks like a function, not a macro.
<pillton> The arguments to coerce are the wrong way around.
<littlelisper> do i make a function. is it wrong?
<pillton> You should make a function.
<jdz> It depends on what you want to achieve. But (defun coerce-all (type &rest args) (loop while args collect (coerce (pop args) type))) should work.
<littlelisper> ok pillton. thanks jdz and pillton
<jdz> Also (loop for arg in args collect (coerce arg type)) would be more idiomatic.
<pillton> You are probably drawn to common lisp because of the power of macro functions. The irony is that macro functions should be the last thing you use.
<littlelisper> ok, jdz . i ll use that. yeah pillton, i want to get started with macros
scymtym has joined #lisp
trittweiler has joined #lisp
cpt_nemo has joined #lisp
cpt_nemo_ has quit [Read error: Connection reset by peer]
<beach> littlelisper: Make sure you practice cases that actually need macros. Otherwise, you will get into all kinds of strange coding practices.
<littlelisper> i am reading and watching sicp, so yeah things will be better
<littlelisper> i havent got to macros yet. i was just trying
<beach> Interestingly, since SICP is Scheme and Scheme does not have macros, that might be the wrong source for practicing macros.
<oni-on-ion> =)
<littlelisper> oh, i dint know that. but then too i ll read sicp
<littlelisper> i ll get on to macros later
<beach> littlelisper: Macros are used only when the evaluation rule for functions will not work.
<littlelisper> ah, i ll keep that in mind beach
JuanDaugherty has joined #lisp
<pillton> littlelisper: I find the best explanation of the difference between functions and macro functions is in section 3.1.2 of the hyperspec. It also helps highlight the difference between form syntax and character syntax.
<beach> clhs 3.1.2
<littlelisper> beach: pillton : i ll check it out
smurfrobot has quit [Remote host closed the connection]
<oni-on-ion> ew nice ToC =) 3.1.2.1
buffergn0me has joined #lisp
stacksmith has quit [Ping timeout: 256 seconds]
shrdlu68 has quit [Ping timeout: 240 seconds]
nowhere_man has quit [Ping timeout: 256 seconds]
shrdlu68 has joined #lisp
Folkol_ has joined #lisp
nsrahmad has joined #lisp
shka has quit [Quit: Konversation terminated!]
<JuanDaugherty> "ew" is an expression of disgust
flamebeard has quit []
<JuanDaugherty> combined with nice could be taken as snide sarcasm
<JuanDaugherty> which I don't think you meant
flamebeard has joined #lisp
fikka has joined #lisp
surya has joined #lisp
<JuanDaugherty> much of irc is flamewars waiting to happen so doing my bit to lessen that
fikka has quit [Ping timeout: 256 seconds]
shrdlu68 has quit [Remote host closed the connection]
shrdlu68 has joined #lisp
littlelisper has quit [Ping timeout: 265 seconds]
surya has quit [Ping timeout: 240 seconds]
moei has quit [Read error: Connection reset by peer]
moei has joined #lisp
nowhere_man has joined #lisp
megalography has quit [Ping timeout: 240 seconds]
dddddd has joined #lisp
mflem has quit [Read error: Connection reset by peer]
surya has joined #lisp
milanj has joined #lisp
buffergn0me has quit [Ping timeout: 260 seconds]
random-nick has joined #lisp
megalography has joined #lisp
littlelisper has joined #lisp
smurfrobot has joined #lisp
fikka has joined #lisp
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #lisp
CEnnis91 has quit [Read error: Connection reset by peer]
CEnnis91 has joined #lisp
Kaisyu7 has quit [Ping timeout: 240 seconds]
littlelisper has quit [Quit: leaving]
smurfrobot has quit [Ping timeout: 260 seconds]
Folkol_ has quit [Quit: Textual IRC Client: www.textualapp.com]
kjeldahl_ has joined #lisp
kjeldahl has quit [Ping timeout: 260 seconds]
shka has joined #lisp
MoziM has quit [Quit: WeeChat 2.1]
orivej has joined #lisp
Folkol_ has joined #lisp
<shrdlu68> In Hunchentoot, within the body of an easy handler, when I log to *standard-output*, *terminal-io*, or *error-output*, the output appears in the *inferior-lisp* window rather than, as I expect, the slime repl.
<shrdlu68> I guess hunchentoot is binding these vars locally to something else. How can I get the usual output to the slime repl despite that?
<_death> it runs in a different thread where these variables aren't bound to slime output streams.. you can use a proper logging library, like log4cl
<shrdlu68> ...but the hunchentoot access logs _do_ appear in the repl.
shangul has quit [Quit: sudo rm -rf /usr/*]
<_death> there's hunchentoot:log-message* .. if you think hunchentoot support for logging is sufficient
<shrdlu68> Ah, just figured that out, thanks.
sbwhitecap has quit [Ping timeout: 245 seconds]
MoziM has joined #lisp
stnutt has quit [Ping timeout: 260 seconds]
DataLinkDroid has left #lisp ["Ciao 4 niao"]
fikka has quit [Ping timeout: 256 seconds]
m00natic has joined #lisp
stnutt has joined #lisp
fikka has joined #lisp
JuanDaugherty has quit [Quit: Exeunt]
al-damiri has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
AetherWind has quit [Quit: Leaving]
fikka has quit [Ping timeout: 256 seconds]
nsrahmad has quit [Remote host closed the connection]
surya has quit [Ping timeout: 268 seconds]
rumbler31 has joined #lisp
fikka has joined #lisp
Kaisyu has quit [Quit: Connection closed for inactivity]
jmercouris has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
nowhere_man has quit [Ping timeout: 264 seconds]
vlatkoB_ has joined #lisp
<jmercouris> I'm working on an interactive command prompt. I can complete/tab complete command names. I'm now working on completing command
<jmercouris> arguments.
<jmercouris> I would like each argument to be able to provide its own set of completions to guide the user.
<jmercouris> I've been thinking about how to represent that as an unexpanded macro
<jmercouris> and I can't think of a good design
<jmercouris> the only thing I've thought of so far is defining separate functions for each argument completino
<jmercouris> s/completino/completion
vlatkoB has quit [Ping timeout: 245 seconds]
<jmercouris> so something like (define-command command-x (arglist)) followed by (command-x-arg1 () ...completion logic..) (command-x-arg2 () ... completion logic...)
<dim> jmercouris: did you manage to write the README first? (RDD method, I like it), that is, how are you going to use it, what do you expect to see as completion choices in several situations?
<jmercouris> dim: I've written down a high level description, yes
<dim> does it cover completion of the arguments?
<jmercouris> yes
<jmercouris> It is basically a flow chart
<dim> is there a chance that you didn't think it through yet?
<jmercouris> there is always a chance, yes
<dim> usually that's what prevent having an opinion on some design
<dim> it's that you're not clear on the use-cases for it
<jmercouris> I've been thinking about this for about 48 hours now
<jmercouris> that's the problem, the product is too ambiguous
<dim> how many breaks and walks did you take?
<jmercouris> I have one concrete application in mind, but I don't know how the application will evolve
<jackdaniel> 48h is not a big amount of time
<dim> if that's spent in front of the computer, it's not worth much
<jmercouris> I guess I will spend some more time thinking about how the product will actually be used
<jmercouris> and that will guide how the arguments and commands will be defined
<dim> my usual technique for that kind of question is a 1h walk at good pace (walk fast enough that you could not sustain a chat at the same time, that's how the brain is best oxygened)
<jmercouris> Ok, I'll go for a walk, that is a good idea
<jmercouris> thank you
<dim> hope it helps, it usually helps me a lot
<jmercouris> fingers crossed :D
<xificurC> A: can anyone help me solve X? B: go for a walk
<jackdaniel> you may study how McCLIMdd
<beach> jackdaniel: I was just going to mention that.
<dim> going for a walk only gives good results when you understand the problem clearly enough, which looks like it's the case here
<xificurC> A: how can I do Y? B: what is the real problem X? A: it is ... B: Ah ok, I suggest you go for a walk then
<jackdaniel> soryr, my connection broke
<dim> also doesn't work well with juniors
<jackdaniel> since "dd"
<jackdaniel> I was about to finish the sentence :-)
<beach> jackdaniel: Go right ahead!
<jackdaniel> jmercouris: McCLIM has commands which have types and interactor provides completions of various type (list, string, number etc)
rumbler31 has quit [Remote host closed the connection]
<jackdaniel> putting aside presentations and how buggy the whole mechanism is in McCLIM, design may be at least worth studying (CLIM II specification is fine if not too engineered)
paule32 has quit [Ping timeout: 255 seconds]
<_death> sounds like a tree to me
<_death> so make sure you walk in the woods ;)
paule32 has joined #lisp
<shka> jackdaniel: is there a hope for McCLIM anyway?
milanj has joined #lisp
<loke> shka: Well, it can be convinced to do things :-)
fikka has joined #lisp
<shka> or tricked? :D
<loke> shka: I'm trying to build a real application with it :-)
<shka> how it is going?
<shka> let's assume i care only about X11 at this point
<jackdaniel> I don't understand the question (regarding hope)
<jackdaniel> could you rephrase?
<loke> shka: Well, some things that should be simple is very hard. Other things are almost magically automatic. :-)
stnutt has quit [Ping timeout: 260 seconds]
<jackdaniel> it is a working software with bugs (as we know, none of Lisp software has bugs, so it must be an accident) and plans for the future
<jackdaniel> as well as steady stream of contributions, corrections, issue reports etc
nowhere_man has joined #lisp
<jackdaniel> if the question is: is there a hope you'll use it, then you must answer itself. if the question is: is there a hope it will work? then it works, like right now
<jackdaniel> otherwise I don't understand it (the question in question ;_)
<loke> shka: Things like subexpression selection in the equations are automatic in CLIM, which is cool.
<shka> jackdaniel: well, ideally, i think that McCLIM should work on major platforms (that would be osx, windows, x11 and wayland), require modest ammount of time to build usefull applications and don't be very buggy, given the scope, this task list appears to daunting
<shka> i am wondering if this scary impression i have is justified
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
<shka> loke: oh, i will take a look at it!
orivej has quit [Ping timeout: 276 seconds]
stnutt has joined #lisp
<loke> shka: My goal is to build something that is better than Wxmaxima.
<shka> vector demo looks neat
<shka> loke: i like how it looks
<jackdaniel> shka: you basically present a wishlist, not something to justify queationing for any hope for the software, so I still don't understand
<loke> shka: Thanks. I'm trying to make the rendering of the equations as nice as possible.
<shka> jackdaniel: that's ok
<shka> loke: so, what things are
<shka> "hard" here?
<loke> shka: I think that's my biggest advantage to Wxmaxima, which, while doing proper maths rendering, looks quite bad.
<jackdaniel> it is like if I had asked: is there any hope for lisp? I think it should be faster, work on more platforms and have first-class global environments implemented
<loke> shka: Well, believe it or not, it's sthings like the completions popup, where I had to build everything from scratch.
<loke> Also, being able to manpilate the graph (using the buttons) also took quite a bit of convincing CLIM ;_)
nydel has quit [Read error: Connection reset by peer]
<shka> so, generally lack of built in features?
<shka> ok, second points sounds different
<loke> shka: It's more that CLIM was designed for a single-threaded Lisp-oriented workflow.
Folkol_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<loke> shka: Just getting the commandline (“interactor”) to accept plain text was tricky to say the least.
<shka> almost all GUI frameworks are like that
smurfrobot has joined #lisp
<loke> shka: The entire thing is deeply tied to the idea that your application is driven by a commandline which is a Lisp REPL.
<shka> hmmm
smurfrobot has quit [Remote host closed the connection]
<loke> shka: In Maxima, input is onbviously the Maxima language, which meant that I had to reimplement the entire input loop.
smurfrobot has joined #lisp
Folkol_ has joined #lisp
<loke> shka: For reference, here is the code to simply read the Maxima expressions on the commandline: https://github.com/lokedhs/maxima-client/blob/master/src/cmdline.lisp#L174
<loke> shka: Of course, it's more clever than your regular text-input-box, but still.
<shka> looks painful
<loke> shka: Another issue is that since it's inherently single-threaded, and the inptu loop is imperative, managing more than one input loop is incredibly hard
<shka> and what if want to make application that is basicly button driven?
kajo has joined #lisp
paule32 has quit [Ping timeout: 268 seconds]
<loke> shka: You can open a second window by running a separate thread, but there is zero support for interacting between them, so you have to build everything yourself. I don't even want to think about what it would take to implement drag-and-drop between windows.
<loke> shka: That depends on what you want to do.
<loke> shka: Generally you should attempt to build you application absed on CLIM concepts, not try to convince it to behave like a “normal” GUI application.
<shka> does not sound all that hot
housel has quit [Remote host closed the connection]
<loke> shka: Well, I'm giving you all the negatives.
<shka> loke: my impression is that McCLIM is more a canvas for displaying result
<loke> shka: THere are aspects of it that are really cool too, but I never mentioned any of those.
<loke> shka: Oh not at all
<shka> while interactions are driven mostly with REPL
<shka> well, go one then, i am listening
<loke> shka: well, that was how the Lisp machine worked, and CLIM is basically a lisp machine interface :-)
<loke> Specifically, Genera.
<loke> shka: You should probably watch the video(s) jackdaniel made.
<shka> yeah, ok, i get that, still i don't think it is the right way of doing GUI
<loke> shka: He demonstrates the concepts better than I can explain them on IRC
<shka> right, i think i will
<random-nick> it's not really a REPL, it accepts program-defined commands too that are not lisp code
<shka> actually i wanted to do it long ago, but i simply forgot
<loke> random-nick: Right
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
markoong has joined #lisp
<shka> anyway: more type-type then click-click
<loke> and commands can be invoked not jst by typing them, but also by clicking buttons, or clicking on objects on the screen, where each object is an actual Lisp object
<shka> right?
<LdBeth> When will CLIM3 Spec come out?
<shka> ok, that sounds better
<loke> shka: You don't have to type at all. You can expose all your commands as buttons or clickable “things”
troydm has joined #lisp
<loke> So in the maths renderer I built, each equation is a “thing” that renders as an expression. They consist of other “things” which are the subexpressions. There is also a translator that converts these things into text (which happens to be the maxima language form of the same equation.
<shka> ok, got the video
* LdBeth I know it’s probably like asking “when will the next version of Common Lisp spec come out” (^O^)
<shka> loke: do you happen to know how this whole thing compares to smalltalk style of gui?
<loke> That's why you can click on a subexpression while typing a maxima command, and the nexessary code is autoamtically pasted. It's because there is a command translator that is applied when clicking which in that context.
<loke> shka: There are similartities.
<loke> Anyway, I have to levae now.
<loke> Watch the video, and if you have more questions I'll be happy to answer later.
<shka> loke: take care and thanks for answers!
<loke> Or JD might also answer.
<loke> Join #clim if you want details.
<shka> loke: i probabbly should get my hands dirty and actually build something with it
Smokitch has joined #lisp
<shka> but i am busy with other crap
<shka> sadly
<loke> shka: Probably, yes.
surya has joined #lisp
makomo has joined #lisp
nowhere_man has quit [Ping timeout: 264 seconds]
Krisostoomus has joined #lisp
Krisostoomus has quit [Remote host closed the connection]
nowhere_man has joined #lisp
karlosz has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
attila_lendvai has quit [Ping timeout: 240 seconds]
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
Krisostoomus has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has joined #lisp
attila_lendvai has quit [Changing host]
lumm has joined #lisp
zooey has quit [Remote host closed the connection]
zooey has joined #lisp
lumm has quit [Quit: lumm]
lumm has joined #lisp
rumbler31 has joined #lisp
mindCrime has joined #lisp
igemnace has quit [Ping timeout: 240 seconds]
Murii_ has joined #lisp
rumbler31 has quit [Ping timeout: 260 seconds]
Krisostoomus has quit [Read error: Connection reset by peer]
EvW has joined #lisp
eli_oat has joined #lisp
Bike has joined #lisp
kajo has quit [Ping timeout: 260 seconds]
shangul has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
kajo has joined #lisp
msb has quit [Ping timeout: 268 seconds]
msb has joined #lisp
housel has joined #lisp
attila_lendvai has quit [Ping timeout: 240 seconds]
eli_oat has quit [Quit: Leaving.]
doesthiswork has joined #lisp
<Xach> serichse`: sure
milanj has joined #lisp
Krisostoomus has joined #lisp
schjetne has joined #lisp
eli_oat has joined #lisp
alter-schjetne has quit [Ping timeout: 240 seconds]
attila_lendvai has joined #lisp
pierpal has quit [Remote host closed the connection]
robotoad has joined #lisp
Arcaelyx has joined #lisp
scymtym_ has joined #lisp
scymtym has quit [Ping timeout: 260 seconds]
EvW has quit [Ping timeout: 255 seconds]
surya has quit [Ping timeout: 260 seconds]
Folkol_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
surya has joined #lisp
Krisostoomus has quit [Quit: Leaving]
holycow has joined #lisp
EvW has joined #lisp
hhdave has joined #lisp
FreeBirdLjj has joined #lisp
<p_l> PAIP for free online :3
<p_l> as epub
<beach> Old news.
<p_l> I unfortunately only heard it recently
<beach> I am joking. Not that old.
<p_l> Though if I get the chance, I'd love to get my own copy signed ;D
FreeBirdLjj has quit [Ping timeout: 248 seconds]
lnostdal has quit [Quit: https://quanto.ga/]
<flip214> p
<flip214> p_l: digitally signed? via PGP or GPG? that's easy, just create your own key for "Peter Norvig" ;)
surya has quit [Remote host closed the connection]
<p_l> flip214: I have a physical copy ;)
<shka> p_l: oddly enough i bought paperback just a year ago
Folkol_ has joined #lisp
lnostdal has joined #lisp
attila_lendvai has quit [Ping timeout: 260 seconds]
kuwze has joined #lisp
<flip214> p_l: me too.... would you sign it at next years' ELS?
<p_l> only if Norvig shows up, I mean, I can try sending my copy there
<p_l> s/there/to him/
orivej has joined #lisp
robotoad has quit [Quit: robotoad]
<beach> We could invite Norvig as a keynote speaker.
<beach> Though, I guess he might talk about Python then instead.
<shka> i don't have impression that norvig is intersted in python as a language
<beach> I hope you are right.
<shka> from what i read Norvig just considers python to be efficient teaching medium
<jackdaniel> certainly he is convinced, that python is a better choice for teaching as a language
<shka> i disagree with Norvig in that matter, but well, he may be right
Ukari has quit [Remote host closed the connection]
Ukari has joined #lisp
<p_l> I think he mentioned a bit of external reasons to deal with Python, and tbqh, Common Lisp did have a bit of problem with easily available implementations and their *distribution* among people
<p_l> (at least from perspective of someone who didn't know anything about lisp at the time)(
attila_lendvai has joined #lisp
<shka> p_l: i think that this is not longer relevant
<p_l> yes, but Norvig's writing about it was when it was relevant
<shka> ok
<p_l> also, we might have by now different view than people completely new to it :)
<dim> I've read that scheme is pretty good at teaching (syntax as in CL, also not so many batteries included, meaning students can try coding merge and other advanced stuff themselves rather than just calling the already provided feature)
Inline has joined #lisp
<shka> dim: scheme is excelent for learning fundamental programming concepts
<shka> not so for specific stuff like machine learning
<LdBeth> Programming with lambda and lists
<LdBeth> Which prevents people from thinking outside the world
<jackdaniel> I do not understand what could be a reason, why scheme wouldn't be a good pick for (say) machine learning, but this is offtopic anyway
<jackdaniel> (so please do not prove me wrong here)
* shrdlu68 screeches to a halt.
<p_l> there's no such reason, at best it's a matter of library availability
FreeBirdLjj has joined #lisp
<shka> anyway, it would be cool to hear Norving talk on ELS
sjl_ has joined #lisp
Folkol_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
EvW has quit [Ping timeout: 240 seconds]
eli_oat has quit [Quit: Leaving.]
mangul has joined #lisp
Beep-Lord has joined #lisp
Satou has joined #lisp
shifty has quit [Ping timeout: 276 seconds]
<Satou> Hello! I have a question regarding user-defined packages. I've defined a package that I want to use in another file. http://termbin.com/tdeb
<Xach> Satou: ok!
<Satou> I compiled it and loaded it in another file using (load "ipfs"), but doing anything like (print (cl-ipfs:version)) doesn't really work. It tells me the package doesn't exist.
<shka> Satou: you are doing it wrong
<Satou> shka, could you please explain?
<Xach> Satou: there are a lot of problems going on in your example
<shka> essentially, CL applications are not a bunch of files loading other files
<shka> what you want to do is to define system
<Xach> One immediate problem is the package name is "cl-ipfs" but for normal interoperation you would want it named "CL-IPFS".
<shka> and package is basicly just a namespace
<Xach> Another problem is that you need (in-package "CL-IPFS") right afterwards if you want the subsequent symbols to be read in that package
<Xach> Another issue is that you can't refer to "cl-ipfs:foo" unless foo is external in cl-ipfs, usually via an :export clause in defpackage.
<Xach> you can refer to cl-ipfs::foo without exporting though.
robotoad has joined #lisp
<Xach> but also, what shka says is right - it would be even more virtuous to make a system definition and go from there
<beach> Yet another issue is that the indentation of the forms following DEFPACKAGE suggests that they are somehow in the scope of that package definition.
<Satou> oh no shka, I just want to create the package and test it from the other file, my intention is not to glue toghether a lot of files
<beach> Satou: But you do want to create an ASDF system anyway.
<shka> Satou: good!
<shka> everything that Xach wrote is true
<beach> Satou: The indentation of :method :post, etc looks like they are in the body of the LET.
<shka> there is a decent tutorial on lisp packages that explains different issues people run into
<Satou> sorry beach, that's how emacs indented it
<shka> i can link it if you want to
<Satou> please do shka
<Xach> Satou: i find it helpful to change my mindset and think that my project is the CL development system, and I am extending it by adding new definitions, with some organization of those new definition names by packages. the definitions are for functions, bits of data, classes, etc. and then i interact with it by calling functions while the whole environment is running, without stopping and starting much.
<beach> Satou: I don't believe that.
<Satou> would a system be better ?
<Xach> i have been in the land of "write a script in a file, run it, repeat" a little lately and it is a different mindset.
<shka> Satou: http://www.flownet.com/gat/packages.pdf don't be offended by the title
<shka> it is must read for every fresh lisper
<Xach> or "write a dockerfile, build it for 15 minutes, run, repeat" which i find painful
<Satou> thanks shka.
<Xach> that is not only a stupid title, it includes stupid and sarcastic advice mixed in with the useful info. alas.
<beach> Satou: For what it's worth, I totally agree with Xach, that the best way to think of your code is to imagine it extending an existing, executing Common Lisp system. Not that you start that Common Lisp system every time you want to run your code.
<shka> interactivity is good
<shka> interactivity is fun
<shka> interactivity saves time!
<beach> Satou: Such an organization will help with lots of things like debugging, interactive incremental modifications, etc.
<shka> :-)
davsebamse has quit [Ping timeout: 255 seconds]
<Satou> I see. However someone pointed out that I shouldn't use quicklisp and just define a package that relies on drakma and yason.
<beach> Satou: Those are orthogonal issues.
FreeBirdLjj has quit [Remote host closed the connection]
<shka> Satou: you (ql:quickload :drakma) in the lisp file didn't you?
FreeBirdLjj has joined #lisp
<Satou> I would like to encapsulate it somehow, and access the functions I've defined through an entity.
<Satou> yes I did shka.
<Beep-Lord> He probably meant as a quicklisp local project.
<beach> Satou: If I were you, I would write an ASDF system definition called, say cl-ipfs.asdf. I would have one file called packages.lisp and one file called cl-ipfs.lisp.
<shka> Satou: let me show example
<beach> Satou: The packages.lisp file would contain (defpackage #:cl-opfs ....).
<beach> Satou: The cl-opfs.lisp file would start with (in-package #:cl-ipfs)
<shka> here
<beach> s/opfs/ipfs/
<shka> notice :depends-on
<shka> if you have quicklisp configured according to the manual, loading documentation-utils-extensions will automaticly load :documentation-utils
<shka> even though, i don't load it explicitly
<shka> that's what person who said to you "don't use quicklisp" meant
<shka> simply don't do it explicitly and use system definition tools
<Satou> oh I see now.
<Satou> thanks for telling me how I should do the layout of the files beach. You mentioned something about my code being indented badly, the forms after defpackage, does the packages.lisp just contain the defpackage and the other file starting with (in-package #:cl-ipfs) contain the functions?
<shka> that's a good way to do it, yes
<Beep-Lord> shka: How do you get quicklisp to load the library without loading it first?
<shka> without loading quicklisp?
<Beep-Lord> I mean with a ql:quick-load of all my dependencies
<shka> oh, well i simply do (ql:quickload :documentation-utils-extensions) and quicklisp will also load everything that i depend-on (that would be documentation-utils itself)
<shka> it is automatic
<shka> but you must provide depend-on in defsystem
<Beep-Lord> Oh, I thought you meant that it would load it straight from the asd definition without having to call ql:quickload.
<shka> well, i think it is possible somehow to do so by setting right paths and using require instead
<shka> but i never bothered
<shka> quicklisp works just fine for me
erjag has joined #lisp
<shka> i think it is great
erjag has quit [Remote host closed the connection]
flamebeard has quit []
mangul has quit [Quit: sudo rm -rf /usr/*]
orivej has quit [Ping timeout: 256 seconds]
attila_lendvai has quit [Ping timeout: 248 seconds]
skeuomorf has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
orivej has joined #lisp
<oni-on-ion> https://github.com/slyrus/opticl -- whoa, surprised at the timing of the benchmark there. for somie reason i had this subconscious idea that inner loops are bulky or slow for CL. but this seems just like C
<Satou> It is still hard for me to understand how to do that. I've created an the files as pointed by beach, but I have a hard time of using them tho
<loke> oni-on-ion: why would they be slow?
<oni-on-ion> Satou: copy from a similar project's package setup ?
<oni-on-ion> loke: why would there be a monster in the dark ? the subconscious is ignorant exactly because of the lack of logical reasoning and quantized details =)
<oni-on-ion> ie "never really thought about it" or consciously realised that i felt that way
merodix has quit [Remote host closed the connection]
shrdlu68 has quit [Ping timeout: 256 seconds]
<schweers> Satou: it might be a little advanced for you, but might also be exactly what you need: there is a project called "quickproject", which sets up a skeleton. I use it every time I create a new system, as I can’t be bothered to create all those files manually.
<oni-on-ion> i had this ancient wierd unfounded idea that lisp is generally "on top" of C. im just breaking old [thinking] habits =)
<loke> oni-on-ion: There are several reasons one might have that impression. The two main ones would be 1) Belief that Lisp is interpreted and 2) That dynamic typing makes it slow
<loke> 2) is actually valid, but Common Lisp allows for statically declared types, which is how you get it to get close to C speed (or even faster)
<Satou> I'm going to take a look schweers, what I haven't figured out is how to actually "run" the project
<Xach> I like the "vague unease and unfamiliarity" explanation too
<beach> Satou: You enter Emacs and SLIME and then you say (asdf:load-system #:name-of-my-system).
<Satou> like "what file do I load or how"
<schweers> Satou: it took me the longest time too when I was beginning
<Satou> ok beach, I'm going to try that in a bit. Thanks!
<beach> Satou: You have to make sure ASDF can find your system definition. I am not going to say what I do because most people use the local-projects directory of Quicklisp I think.
<oni-on-ion> i also understand that Opticl was a second run at an image library, the first being ch-image, which used full on CLOS and the CLEM matrix processing lib. Opticl is optimized for arrays specialised on types (yay)
<schweers> Satou: the gist is: create a system by invoking quickproject from a running lisp, edit the files and load it with either ql:quickload or asdf:load-system. In either case, watch where you put your code. You can configure asdf (and thus quicklisp), but the easiest route is to just put your code under ~/common-lisp
<oni-on-ion> loke: it was built up from several years of urban myths while i grew up on C, theres no real architecture left but ruins of the ancient city that fall away as i learn reality more actually [of lisp and of compiler optimization]
<loke> oni-on-ion: I found that liberally using DISASSEMBLE in SBCL is very informative
<oni-on-ion> loke: and yea about types =) does CLOS have to be avoided to get the max optimizations here, though i wonder?
<loke> It's very interesting to compile with different optimisation levels and type declarations to see how the generated assembly changes
Folkol_ has joined #lisp
<loke> oni-on-ion: In theory or in practice? :-)
<schweers> oni-on-ion: I think o, but only do it if you can prove that you really need this kind of performance.
<oni-on-ion> interesting =) loke , in practice, with sbcl =)
<oni-on-ion> schweers: i see. wondering why the Opticl author decided against using CLOS for that time around, and "non-generic" functions
<schweers> oni-on-ion: or as a learning excercise. But beware that the performance differences vary from implementation to implementation (for obvious reasons)
<loke> oni-on-ion: I mean, sure, in theory you can build a generic function call that is as fast as native, but I doubt it's actually been done. In practice, however, the difference is minimal, since you don't usually have generic calls in the deepest highly-optimised loops.
<oni-on-ion> will reference sbcl until its not the main one
<schweers> oni-on-ion: “until its not the main one”?
<oni-on-ion> loke: hmm i see. but in theory, one could ?
<oni-on-ion> schweers: until sbcl is not the main choice for all the reasons why it currently is
<oni-on-ion> ie. disassemble and all its notes
<loke> oni-on-ion: In my red-black-tree implementation, the nodes are actually CLOS instances, and generic accessor functions are used to read/write to its members. It's pretty damn fast, but as a test I changed it all to structs (which are direct-call) and the speed difference was barely noticeable (a couple of %)
<loke> oni-on-ion: And that's highly optimised code
<beach> oni-on-ion: That's a bit unfortunate, since avoiding CLOS often makes your code less modular. And SBCL's CLOS implementation is based on code that was written before the processors looked the way they do now.
<oni-on-ion> loke: ah, okay thats cool then, thats enough for me not to worry about the difference =)
<oni-on-ion> ah whoa
<oni-on-ion> is SICL doing CLOS ?
<beach> Yes, but SICL doesn't really exist yet.
<beach> But I designed a better generic dispatch algorithm that SICL is using and also Clasp now.
<oni-on-ion> still, awesome =+)
<schweers> I make heavy use of structs instead of “regular” CLOS classes (beach: can you help me out on proper terminology?) in my main project, because I need a lot of speed (it runs for at least 48h on modern hardware). I’m seriously considering changing to CLOS, as I don’t think the performance difference is worth the hassle.
robotoad has quit [Quit: robotoad]
attila_lendvai has joined #lisp
<beach> struct classes vs standard classes I would think.
<schweers> k, thanks
<beach> The sad thing would be if modern code were written with old implementation techniques in mind, and that when current implementations improve, that modern code would be sub-optimal, and just obsolete instead.
<schweers> beach: you’re referring to my case? ;)
<beach> No, not particularly.
<oni-on-ion> i heard with CLOS we can defmethod on structs
<schweers> oni-on-ion: you can, I do it
<beach> Yes, any class can be dispatched on.
<oni-on-ion> cool, so one could switch up to defclass when needed ?
<beach> schweers: Er, so what performance gain do you think you will get from structs if you are using generic functions?
<oni-on-ion> and/or that builtin CL types are also classes or have classes
<schweers> beach: I only use generic function on structs for a few cases. But I see your point. This is one of the reasons I’m thinking about using standard classes instead
<beach> got it.
<beach> I guess accessors may still be somewhat faster with structs in SBCL.
<loke> beach: Yes. But in practice the difference is so small I've never seen the need for it.
<beach> I believe you.
<oni-on-ion> i believe in miracles
<beach> schweers: As you might have seen before in my musings, the argument (similar to yours) "we need all the speed we can get", really translates to "we are willing to spend any amount of additional effort to produce and maintain this thing, even if the speed improvement is infinitesimal". Still I hear it over and over again in industry.
<beach> But I won't get started with that discussion again.
<oni-on-ion> (hmm, nothing for CL called miraCL eh? heres my opportunity.)
lumm_ has joined #lisp
robotoad has joined #lisp
<schweers> well, I don’t need /all/ the speed I can get. But yes, I see the fallacy of this reasoning in other people, but seem to have fallen victim of it myself.
<beach> I understand the difference.
<schweers> beach: do you see a lot of disagreement of that sentiment in here?
<beach> Nope. :)
<beach> Just worth repeating to those who haven't seen it yet. :)
<beach> We can't know whether you have fallen victim until you attempt that change. :)
<schweers> I guess so!
<oni-on-ion> its the caffeine junkies, honestly i think; the more caff i got in veins, the faster i want things to go
Murii_ has quit [Ping timeout: 256 seconds]
<beach> schweers: Oh, and by the way, if you do attempt it, I am very interested in the outcome.
<schweers> I guess it really would be best to attempt to carefully measure the runtime before and after the change
lumm has quit [Ping timeout: 260 seconds]
lumm_ is now known as lumm
<beach> Definitely.
schjetne has quit [Remote host closed the connection]
<schweers> Ah, I remember what one of my reasons was: as far as I know sbcl does not use the types given in the slots of a standard-class, but does so in structs.
<beach> It does when you use DEBUG 3.
pierpal has joined #lisp
<schweers> I mean the type inferencer, in order to do performance optimizations
<beach> Oh, that I don't know.
<beach> Entirely possible.
groovy2shoes has quit [Read error: Connection reset by peer]
<schweers> what exactly do you mean? what does sbcl do with the slot types when debug is 3? check on every access (write?), whether the type still holds?
<beach> Yes.
<oni-on-ion> sounds like an important thing to know
<schweers> ah, I would have thought this was part of the safety optimizations
<beach> I almost never need all the speed that I could get, so I run everything with (DEBUG 3) (SPEED 0) (SAFETY 3).
<dim> you can't change your mind on struct slots types, I guess that comes with benefits
<beach> I prefer working on my algorithms and data structures.
<dlowe> I hear that = programs
<beach> Indeed.
shangul has quit [Ping timeout: 248 seconds]
<dim> data structures come first, but well you need to have an idea of the algorithm you want to implement I guess
<oni-on-ion> beach: just wondering, do you set that in slime or .sbclrc ?
<beach> The latter.
<Xach> I like restrict-compiler-policy for that
<beach> Occasionally, for benchmarking code related to performance claims in a paper, I use local declarations that override this default.
<beach> Today I have been working on specifying precise stack traversal for the SICL GC. I think I need three tables for each possible frame: One table indicating what stack locations contain local variables with Common Lisp objects. One table indicating what callee-saves registers contain variables with Common Lisp objects. And one table mapping callee-saves register so stack locations in which caller data was saved.
<oni-on-ion> hmm "Bear in mind, though, you may get some nasty surprises by meddling with global defaults. Just for example, with those development settings, libraries that make use of tail recursion may not work properly."
shangul has joined #lisp
<beach> oni-on-ion: You mean libraries that count on implementation-specific handling of tail recursion?
<beach> So, for the GC, I need to traverse the stack with a table holding frame-related values of callee-saves registers, swapping them with real stack locations as I go down the stack and swapping back when I back up the stack.
<oni-on-ion> beach: sry not sure, its from here: https://www.reddit.com/r/lisp/comments/39i6lx/is_there_a_way_to_have_a_global_declaim/ -- i might just put :optimize in defsystem for my own stuff
<beach> oni-on-ion: Common Lisp does not require implementations to optimize tail recursion, so a library that relies on that is not portable.
<oni-on-ion> beach: ah makes sense, i was wondering, the guy is just extra-defensive. i won't worry.
fikka has quit [Ping timeout: 248 seconds]
Folkol_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<beach> I have no opinion. Like I said, the things I do run fine with my default settings, except for the occasional local declaration. I have no desire to make my "production" code more optimized and less safe.
fikka has joined #lisp
Ukari has quit [Remote host closed the connection]
<oni-on-ion> i understand
Ukari has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
buffergn0me has joined #lisp
attila_lendvai has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
JuanDaugherty has joined #lisp
housel has quit [Read error: Connection reset by peer]
hhdave has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 240 seconds]
<beach> I guess I should create an example and draw a figure of my stack traversal.
nowhere_man has quit [Ping timeout: 260 seconds]
random-nick has quit [Read error: Connection reset by peer]
random-nick has joined #lisp
pjb has joined #lisp
fikka has joined #lisp
Naergon has quit [Ping timeout: 276 seconds]
didi has joined #lisp
EvW1 has joined #lisp
Satou has quit [Quit: exit();]
<didi> Tell me if this is reasonable: I have a macro like `dolist', that iterates over a data structure, offering an element at each loop pass. To avoid allocating a new element for every loop pass, I'm thinking of allocating only one element and filling it with data at the beginning of the loop. This means that any program using this macro can't just take the element and run with it. Is this OK?
sjl_ is now known as sjl
fikka has quit [Ping timeout: 264 seconds]
buffergn0me has quit [Ping timeout: 256 seconds]
<beach> didi: I don't understand. Are you elements just Common Lisp objects or are they structured in some way?
jmercouris has quit [Remote host closed the connection]
<didi> beach: They are structured in a particular way. I interact with this data structure using an `element', but there is not `element' inside of it. When I add and `element' to it, it is broken down inside it. When I retrieve and `element' from it, it is constructed.
<didi> s/and/an
fikka has joined #lisp
<beach> I guess it's OK, if you tell your client what is going on.
<didi> Cool, thank you.
<beach> I am not sure why you would do it that way though. It is a bit strange.
<didi> Because I'm bashing my head against memory usage.
slyrus1 has quit [Ping timeout: 265 seconds]
<beach> It means that client code can not add its own data to these elements, for instance.
<didi> I'm desperately trying to reduce my memory footprint.
<beach> OK.
<beach> Do you care to explain your use case in more detail?
<didi> beach: Sure. I have a big graph. This graph has something called a CONTACT. Whenever I want to iterate over all the contacts of this graph, I don't want to alloc each and every contact. Sometimes I just want to know if the contact I have in hand is inside this big graph.
slyrus_ has quit [Ping timeout: 264 seconds]
vertigo has quit [Ping timeout: 256 seconds]
<beach> didi: So are there contacts associated with the nodes of the graph scattered around the graph already, and you want to search for a particular one?
fikka has quit [Ping timeout: 240 seconds]
<didi> beach: Yeap.
<beach> didi: I don't understand why searching for a contact would involve allocation.
<didi> beach: Because there isn't an object contact inside it. When I ask for the contacts, it's produced using the relationships of the graph.
<beach> Oh, so what I said was false. There are not already contacts associated with nodes in the graph. They are somehow generated during traversal?
lumm has quit [Read error: Connection reset by peer]
<didi> beach: Oh, yes. But they are local, so there's no need for a search. They are almost like labels. So a contact is a triple (vertex1, vertex2, label).
eli_oat has joined #lisp
<didi> But there is not triple (vertex1, vertex2, label) inside the graph. I have to produce it.
<didi> s/not/no
<beach> I see.
<flip214> didi: DOLIST is already taken by CL.
<beach> flip214: I misread it too.
<didi> flip214: I know, silly. Mine is called DOCONTACTS.
<beach> flip214: "like".
<flip214> ah, okay.
<flip214> regarding memory usage:
<beach> And vertex1 and vertex2 are adjacent?
<didi> beach: Yeap. You get it.
<beach> And where is the label stored?
<flip214> as long as it's documented that this MUST not be used outside (or in different threads!), you should be okay.
<flip214> do you really need the object?
<didi> beach: The graph is a hash table. Each hash key is a vertex, and each hash value is an associate list, where the assoc key is another vertex and the assoc value the label.
<flip214> how about a local function that checks whether the current "element" is equal to some other one instead?
<didi> flip214: It might work.
<beach> didi: I see.
<flip214> didi: so you have the vertexes stored twice, as V1 => V2 => label and V2 => V1 => label?
<flip214> how many vertices are there?
<didi> flip214: Yes. The assoc list is the adjacent list of each vertex.
<didi> flip214: Millions.
<flip214> ah, an alist, not anothe hash table. got it.
<didi> flip214: I tried using another hash table, but the memory exploded.
<flip214> sorry, have to get out of the train. will try to think of something.
<didi> flip214: Thank you.
<beach> didi: Presumably, since you are writing a macro, you might want to do other things with these contacts. Not only search for an occurrence. Right?
EvW1 has quit [Ping timeout: 265 seconds]
<didi> beach: Right. I used to return a list with all the contacts, when asked, but the memory exploded with these, so I came up with the macro idea.
<beach> I understand.
<beach> Can you just keep the components?
fikka has joined #lisp
<beach> Like (do-all-contacts (vertex1 vertex2 label) ...)
<didi> beach: Ah! You really get it. That's how I' doing right now. BUT, some functions ask for the CONTACT, so I sometimes have to alloc the contact anyway. What I'm in the middle of, is deciding if I go full CONTACT or not.
slyrus_ has joined #lisp
<beach> I am beginning to understand. :)
* beach vanishes in order to have dinner, and lets flip214 come up with further ideas.
<didi> Thank you all. :-)
FreeBirdLjj has quit [Remote host closed the connection]
<flip214> didi: can you replace the ALISTs with two arrays, with the same index pointing to the vertex and the label?
<flip214> should save you 2 words per vertex.
fikka has quit [Ping timeout: 256 seconds]
<flip214> *per edge
<flip214> also, how sparse is the list of edges? 1:100, 1:1M?
<didi> flip214: Hum. Not a bad idea. I'm always trying to reduce the memory usage of this beast. Thank you.
<didi> flip214: I dunno, but pretty sparce.
<didi> sparse*
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
vertigo has joined #lisp
kajo has joined #lisp
<flip214> well, then have the vertices and labels in a global array, use the indizes to address them, and then you end up with two (say) 32bit numbers that you can pack into one 64bit value
FreeBirdLjj has joined #lisp
<didi> Hum... nice.
* didi &
mangul has joined #lisp
FreeBirdLjj has quit [Ping timeout: 260 seconds]
shangul has quit [Ping timeout: 260 seconds]
m00natic has quit [Remote host closed the connection]
surya has joined #lisp
kajo has quit [Ping timeout: 255 seconds]
kajo has joined #lisp
schweers has quit [Ping timeout: 276 seconds]
JuanDaugherty has quit [Quit: Exeunt]
EvW has joined #lisp
mflem has joined #lisp
mangul is now known as shangul
fikka has joined #lisp
brendyn has quit [Ping timeout: 264 seconds]
<flip214> didi: so you'd have an array indexed by vertex# with arrays of 64bit fixnum values as elements...
eli_oat has quit [Quit: Leaving.]
smasta has joined #lisp
shangul has quit [Quit: sudo rm -rf /usr/*]
fikka has quit [Ping timeout: 264 seconds]
SlowJimmy has joined #lisp
karlosz has quit [Quit: karlosz]
SlowJimmy has left #lisp [#lisp]
caltelt_ has joined #lisp
didi has left #lisp ["there are always reasons to /part"]
sigjuice has quit [Quit: ZNC - http://znc.in]
<aeth> loke, oni-on-ion: Pretty much every advantage of interpreted languages that people list can be done by Common Lisp AOT implementations, better. That's probably why people think Lisp will be slow. (I'll concede the lack of sandboxing, but on the other hand only JS and Lua do sandboxing.)
<aeth> oni-on-ion: I think you'll find that most of the very fast CL libraries work on specialized arrays. It's something that (SB)CL is good at (technically, some implementations like CLISP don't do this well).
fraya has joined #lisp
<slyrus_> oni-on-ion, are you using opticl?
* akkad ponders how CLISP still comes up as an option given the alternatives
Lauven has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
<akkad> so on long running images, via slime/swank is there any sort of job control?
shka_ has joined #lisp
<sjl> Is there a way to reduce over a numeric range in lparallel without instantiating a sequence of the numbers, or will I need to roll it myself?
<sjl> e.g. (lparallel:preduce (lambda (n x) (+ n (if (evenp x) x 0))) (alexandria:iota 101) :initial-value 0) but without allocating a sequence of consecutive integers
fikka has joined #lisp
surya has quit [Ping timeout: 240 seconds]
Lauven has quit [Quit: leaving]
karlosz has joined #lisp
karlosz has quit [Remote host closed the connection]
karlosz has joined #lisp
<Xach> akkad: what kind of job control did you have in mind?
<akkad> well such as in posix shell. where you have background tasks you spawn, but can bring them to the foreground.
<akkad> e.g. jobs/fg %1
fikka has quit [Ping timeout: 256 seconds]
<akkad> keeping track of background tasks you might have running in a loop, and say, updating the code, then stopping/restarting that given task
<akkad> or is this just a bad pattern to apply to lisp?
fraya has left #lisp ["Leaving"]
<trittweiler> akkad: Assuming you're talking of threads (and not of child processes), do you know about `M-x slime-list-threads'?
eli_oat has joined #lisp
<akkad> nope, I did not. ty
<trittweiler> that will give you a list of all the threads and you can invoke the debugger on any of them, then possibly redefine a function and invoke the CONTINUE restart
fikka has joined #lisp
<akkad> perfect.
skeuomorf has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 260 seconds]
kuwze has quit [Quit: Page closed]
butterthebuddha has left #lisp [#lisp]
EvW has quit [Ping timeout: 260 seconds]
lumm has joined #lisp
fikka has joined #lisp
NotSpooky has joined #lisp
<flip214> dim: also, are your labels BASE-STRINGS instead of STRINGS already?
<flip214> dim: sorry, meant didi ... but autocomplete failed.
<flip214> minion: memo for didi: are your labels BASE-STRINGS instead of STRINGS already?
<minion> Remembered. I'll tell didi when he/she/it next speaks.
<flip214> _death: "apt-get moo"
<_death> yeah
milanj has quit [Quit: This computer has gone to sleep]
milanj has joined #lisp
milanj has quit [Client Quit]
fikka has quit [Ping timeout: 256 seconds]
Naergon has joined #lisp
nowhere_man has joined #lisp
Cthulhux has quit [Changing host]
Cthulhux has joined #lisp
sauvin has quit [Remote host closed the connection]
dyelar has quit [Remote host closed the connection]
fikka has joined #lisp
eli_oat has quit [Quit: Leaving.]
fikka has quit [Ping timeout: 260 seconds]
Murii_ has joined #lisp
shrdlu68 has joined #lisp
davsebamse has joined #lisp
earl-ducaine has joined #lisp
smasta has quit [Read error: Connection reset by peer]
smasta has joined #lisp
fikka has joined #lisp
libre-man has quit [Ping timeout: 240 seconds]
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
fikka has quit [Ping timeout: 248 seconds]
MichaelRaskin has joined #lisp
igemnace has joined #lisp
libre-man has joined #lisp
karlosz has quit [Quit: karlosz]
eli_oat has joined #lisp
milanj has joined #lisp
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
fikka has joined #lisp
zachk has joined #lisp
zachk has quit [Changing host]
zachk has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
ebrasca has quit [Remote host closed the connection]
shrdlu68 has quit [Read error: Connection reset by peer]
igemnace has quit [Quit: WeeChat 2.1]
MolluskEmpire has joined #lisp
terpri has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
shrdlu68 has joined #lisp
NotSpooky has quit [Remote host closed the connection]
NotSpooky_ has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
fikka has joined #lisp
Smokitch has quit []
MolluskEmpire has quit [Ping timeout: 260 seconds]
shrdlu68 has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 276 seconds]
eli_oat has quit [Quit: Leaving.]
NotSpooky_ has quit [Ping timeout: 265 seconds]
eli_oat has joined #lisp
megalography has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
orivej has joined #lisp
MoziM has quit [Quit: WeeChat 2.1]
fikka has quit [Ping timeout: 260 seconds]
NotSpooky_ has joined #lisp
pierpal has quit [Quit: Poof]
Naergon has quit [Ping timeout: 265 seconds]
pierpal has joined #lisp
megalography has joined #lisp
eli_oat has quit [Quit: Leaving.]
dyelar has joined #lisp
smasta has quit [Ping timeout: 248 seconds]
fikka has joined #lisp
pierpa has joined #lisp
eli_oat has joined #lisp
eli_oat has quit [Client Quit]
Quetzal2 has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Murii_ has quit [Quit: Leaving]
fikka has joined #lisp
shka_ has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 240 seconds]
vlatkoB_ has quit [Remote host closed the connection]
fikka has joined #lisp
karlosz has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Quetzal2 has quit [Quit: ?? Bye!]
fikka has joined #lisp
lumm has quit [Read error: Connection reset by peer]
lumm has joined #lisp
scymtym_ has quit [Ping timeout: 260 seconds]
fikka has quit [Ping timeout: 248 seconds]
MoziM has joined #lisp
fikka has joined #lisp
lumm has quit [Read error: Connection reset by peer]
lumm has joined #lisp
scymtym has joined #lisp
fikka has quit [Ping timeout: 265 seconds]
trittweiler has quit [Ping timeout: 264 seconds]
holycow has quit [Quit: Lost terminal]
varjag has joined #lisp
mflem has quit [Read error: Connection reset by peer]
serichse` is now known as serichsen
fikka has joined #lisp
mflem has joined #lisp
terpri has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
smasta has joined #lisp
<serichsen> Xach: I'm thinking about hard forking `cl-arrows' (https://github.com/nightfly19/cl-arrows). nightfly19 does not respond to any contact attempt. Its current state comes (entirely) from a fork/pull request by me, and another pull request where I rounded it out later is ignored. My problem is that no one ever talked nor thought about a license. Do you think that it would be right ethically if I renamed or copied my fork
<serichsen> (https://github.com/Harleqin/cl-arrows) to `arrows', put my name in it and made it public domain?
<theemacsshibe[m]> Is there a way to create a Hunchentoot handler for any URL? I need to create a proxy server for a specific application.
<fiddlerwoaroof> serichsen: I don't think you have the right to the code, unless it's licensed under an OSS license
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
kajo has joined #lisp
<Beep-Lord> Code without a license is considered proprietary.
<aeth> serichsen: If there's no license then legally no one has rights to it
<aeth> I suppose there's an implicit right to use it and to submit improvements to it if it's on Github, but not much beyond that.
<aeth> s/no one has rights to it/no one but the author has rights to it/
<aeth> (github probably has terms of service letting you do the whole pull request thing no matter the license)
<Bike> "If there's no license then legally no one has rights to it" is incorrect. you don't need explicit copyright notices nowadays, it's the base assumption.
<serichsen> Ah. I read a bit about copyright in the USA, and as far as I was able to tell, if something is done in a collaboration, all authors have the right to the entirety (unless they have a contract or license saying otherwise). But that doesn't answer how it is internationally anyway, and I asked about ethics.
<Bike> ethically i see no problem with doing whatever with abandonware.
<aeth> Bike: No one except the author, I corrected myself
<Bike> oh, missed that, sorry.
<Beep-Lord> serichsen: I'd rewrite the software. There could be legal issues for anyone that would use your software otherwise. It doesn't look like it would be too hard to do.
<Beep-Lord> When in doubt, you could e-mail Stallman. He'd have a pretty concise answer.
<aeth> Even with no license the user has the right to view and fork it if it's on Github. The right only applies to use on Github.
<Bike> lol "perform", what
<pjb> aeth: there's definitely no implicit right on github or other!
<aeth> You cannot use it. You can fork it, submit pull requests, etc., but not use it.
<aeth> If it's posted to GH without a license, you're in violation even using it.
<aeth> The ToS only covers use directly through GH.
<Beep-Lord> ToS generally don't hold up in court very well anyways.
<aeth> Arguably, you can download it since that's through a github service.
<pjb> aeth: well, you can always use it, patch it, but you're cannot distribute it. Ie. forking of repos without a license should be forbidden in the first place!
<Xach> serichsen: i think that is cool
<aeth> pjb: The ToS requires any public repos to be usable through GitHub services. So you can fork it (on Github) and you can do all the other Github stuff. But I don't think you'd have the right to run it
<pjb> aeth: I would argue that forking constitute redistribution. Which is not allowed by copyright when no specific license is provided.
<aeth> So it's not a true "no license"
<Beep-Lord> I highly doubt their ToS would supersede the author's copyright in court.
<pjb> ok.
<pjb> we'll have to check gitlab, etc.
<aeth> Beep-Lord: Either way, its presence on Quicklisp is apparently violating the license.
Bike has quit [Ping timeout: 260 seconds]
<aeth> s/license/copyright/
<pjb> one problem anyways with the default github licensing, is that once you take a copy out of github, arguably the github terms don't apply anymore.
kajo has quit [Quit: From my rotting body, flowers shall grow and I am in them and that is eternity. -- E. M.]
<aeth> I read through the Gitlab ToS and I can't find anything similar.
<serichsen> OK, so `arrows' it is. I guess it clears up authorship, too.
<Beep-Lord> serichsen: Make sure you base your work off of your own ideas or another project that has an open license, such as swiss-arrows.
<serichsen> Beep-Lord: I have demonstrably written it entirely.
<serichsen> swiss-arrows is a Clojure library
lumm has quit [Ping timeout: 260 seconds]
NotSpooky_ has quit [Quit: Leaving]
<serichsen> Thanks Xach
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
karlosz has quit [Client Quit]
skapata has joined #lisp
mindCrime has quit [Ping timeout: 264 seconds]
rumbler31 has joined #lisp
k-hos has quit [Read error: Connection reset by peer]
rumbler31 has quit [Ping timeout: 260 seconds]
makomo has quit [Ping timeout: 264 seconds]
random-nick has quit [Read error: Connection reset by peer]
hph^ has joined #lisp
Arcaelyx_ has joined #lisp
Arcaelyx has quit [Read error: Connection reset by peer]
earl-ducaine has quit [Ping timeout: 268 seconds]
earl-ducaine_ has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.1)]
robotoad has quit [Quit: robotoad]
Ukari has quit [Ping timeout: 256 seconds]
k-hos has joined #lisp
kenster has joined #lisp
<kenster> Does anyone have some time to help me fix a macro I wrote?
<kenster> I'm trying to get (defcmethod upload-session "new" new :pointer) to define a method on the class with the name new that calls a C function called "FileUploadingSession_new" that returns a pointer.
<kenster> so I could simply do (new upload-session)
<kenster> and even have a &body in defcmethod that acts as a callback inside of the method
<kenster> the issue is the arguments list that I'm passing up, I want ((test :int) (blah :int)) to turn into (test :int) (blah :int) when it gets passed into defcfun
<kenster> but I also want to properly handle the empty arguments list case, which is to not pass anything into defcfun — besides of course ,cfun-name and ,creturn-type
<serichsen> kenster: what happens if you use ,@arguments?
robotoad has joined #lisp
EvW1 has joined #lisp
Ukari has joined #lisp
<kenster> same kind of error really serichsen
<kenster> not sure what you're referring to
Trystam has joined #lisp
<kenster> actually I get
<kenster> The value
<kenster> #:ARGUMENTS314
<kenster> is not of type
<kenster> LIST
<kenster> well, that's the same thing
karlosz has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
<serichsen> sorry, had not scrolled down to the error
Tristam has quit [Ping timeout: 255 seconds]
Trystam is now known as Tristam
<serichsen> kenster: the value #:arguments314 is an uninterned symbol.
Bike has joined #lisp
<serichsen> kenster: you should not put the macro arguments into a once-only
<kenster> you mean just arguments? or all of the arguments I passinto cffi-defun?
<kenster> oh nevermind
<kenster> for some reason though, cfun-name isn't being outputted the way I expect
<kenster> (FILEBUCKET::CFFI-DEFUN # #:RETURN-TYPE309 #:C-STRUCT-NAME310 NIL)
<kenster> is there a name collision problem with nesting once-only like this serichsen
<kenster> I think that's what you're talking about, right?
<pillton> Sometimes when writing complicated macros it is better to use a function to generate the code.
light2yellow has quit [Quit: light2yellow]
<pillton> You can use the REPL to help debug the generator.
<kenster> the problem is I cannot use apply on defcfun because defcfun is a macro :p
<pillton> Lets assume %defcmethod is a function. What code do you want it to generate from its arguments?
<kenster> a defcfun with the bound method signature and a defined method that applies a list of arguments to that method
<kenster> i.e.
<kenster> (defcfun "FileBucketUploadSession_new" :pointer
<kenster> (pointer :pointer))
<kenster> and also a defmethod that wraps that, with an optional callback
<kenster> I want to safely use C functions in a lispy manner, I can't use SWIG because I am using C++17
Kaisyu has joined #lisp
<pjb> kenster: don't use let, use progn. let doesn't preserve toplevelness!
<pillton> kenster: You don't apply-list-as-rest. It should just be (apply #',ffi-method-name method-args).
<pillton> You don't need apply-list-as-rest.
Cthulhux has quit [Quit: ne praeteriverit priusquam obesa cantaverit]
<kenster> okay
<pjb> kenster: when you test if arguments is a list, this is something that is known at macroexpansion time. Therefore there is no reason to test it at run-time! You can select the defcfun form at macroexpansion time.
<kenster> the empyt let there is because I moved some arguments around pjb
<pjb> cffi-defun I mean.
<pjb> same thing for if ,ptr.
<pjb> You do it all wrong.
<pjb> kenster: have you ever tried macroexpand on your macros?
<kenster> yes
lumm has joined #lisp
<kenster> can you tell me how that translates into the lisp code
<kenster> sorry kind of new to writing macros
<kenster> okay I think I did it, but I'm still erroring
fikka has quit [Ping timeout: 260 seconds]
<kenster> though I don't check the if ptr at runtime
Kaisyu7 has joined #lisp
<kenster> so that's good.
<kenster> but I still have (FILEBUCKET::CFFI-DEFUN # #:RETURN-TYPE301 #:C-STRUCT-NAME302 NIL)
<kenster> # there should be that cfun-name value
fikka has joined #lisp
Cthulhux has joined #lisp
<serichsen> That might be a problem of the class you use there. By the way, you should not use slot-value to interact with your objects (unless it is inside of something like initialize-instance) but define readers or accessors. Usually # is a placeholder of the printer for things it doesn't show completely.
Cthulhux has quit [Changing host]
Cthulhux has joined #lisp
smasta has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 240 seconds]