<no-defun-allowed>
"tax forms are to poetry as C++ metaprogramming is to Lisp macros" quoting drmeister from memory
<no-defun-allowed>
so it generates a CL package with C++ functions from a specially setup C++ library?
<catchme>
yes. the same as -not exactly- pybind11
<catchme>
it makes a pointer of every non c type then pass it using cffi
<no-defun-allowed>
cool
<catchme>
:)
t58 has quit [Quit: Night All]
karlosz has quit [Quit: karlosz]
trocado has quit [Ping timeout: 246 seconds]
Lord_of_Life has quit [Ping timeout: 245 seconds]
Lord_of_Life has joined #lisp
impulse has quit [Quit: Lost terminal]
xkapastel has quit [Quit: Connection closed for inactivity]
dddddd has quit [Ping timeout: 250 seconds]
igemnace has joined #lisp
impulse has joined #lisp
zotan has quit [Ping timeout: 264 seconds]
zotan has joined #lisp
kajo has quit [Ping timeout: 264 seconds]
kajo has joined #lisp
dddddd has joined #lisp
kajo has quit [Ping timeout: 258 seconds]
Krystof has quit [Ping timeout: 244 seconds]
moldybits` has quit [Quit: WeeChat 2.4]
atgreen has quit [Remote host closed the connection]
atgreen has joined #lisp
Oladon has quit [Quit: Leaving.]
jason_m has quit [Ping timeout: 245 seconds]
Jesin has quit [Quit: Leaving]
Jesin has joined #lisp
dale has quit [Quit: dale]
keep_learning has joined #lisp
jeosol has joined #lisp
<beach>
Good morning everyone!
<Josh_2>
Mornin'
<loke>
Is it possible to get the cl-cffi-gtk project to run on Windows?
moldybits has joined #lisp
akater has joined #lisp
zmt01 has joined #lisp
zmt00 has quit [Ping timeout: 250 seconds]
dale has joined #lisp
<jeosol>
morning guys
shifty has joined #lisp
dddddd has quit [Remote host closed the connection]
Aruseus has quit [Remote host closed the connection]
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 246 seconds]
<pjb>
Actually, shared structure in code shouldn't be too big of a problem, since that's what macros generate usually. Only circularities in code are bad. (not in literal data).
Bike has quit [Quit: Lost terminal]
catchme has quit [Quit: Connection closed for inactivity]
Josh_2 has quit [Read error: Connection reset by peer]
Josh_2 has joined #lisp
hiroaki has quit [Ping timeout: 250 seconds]
atgreen has quit [Ping timeout: 268 seconds]
<mfiano>
Hello. The spec says that structure-objects may appear in compiled constants if there is an appropriate make-load-form method defined for that type. On SBCL, I get no error with the lack of a make-load-form when defining a constant. On CCL I get the proper error. Can someone explain if this is conforming, or why it is allowed on SBCL?
<pjb>
mfiano: basically, the problem is that semantically, just saving the slots is not enough. There may be circularities, and there may be other semantic constraints that need to be restored when you read back the object ("hook" it up with the other objects in memory, maintain identity, etc).
<pjb>
In SBCL, structure-class is a subclass of standard-class IIRC.
<mfiano>
I understand this. I'm wondering why SBCL goes against the standard.
<mfiano>
SInce the standard only allows implementations to define make-load-form specializations for objects of type builtin-class
<pjb>
It's not against, it's implementation dependent. Conforming programs must provide the make-load-form method.
<mfiano>
As far as I understand anyway
nanoz has joined #lisp
<mfiano>
Ok.
<mfiano>
So the error CCL has is not required
<pjb>
You can define the methode.
<pjb>
Note that it can return two forms: one to create the object, and one to initialize it.
<djeis[m]>
The spec specifically says that make-load-form's default method for structure/standard/condition objects throw errors tho.
<djeis[m]>
So how does compiling a defconstant on SBCL without a make-load-form method work at all?
<djeis[m]>
My guess is that SBCL just isn't externalizing that constant.
<pjb>
Try: (subtypep 'structure-object 'system-class) "It is implementation-dependent whether calling make-load-form on a generalized instance of a system class signals an error or returns creation and initialization forms."
<djeis[m]>
Ah, yea, that last one sounds right to me.
<pjb>
So what does sbcl give here?
<djeis[m]>
I'm not sure there is a system-object class tho- I don't see it in the spec.
<djeis[m]>
Don't see system-class either, for that matter.
<pjb>
I'm just waking up, sorry.
<djeis[m]>
Sbcl gives back nil, nil.
<djeis[m]>
For structure-object and system-object.
<pjb>
system class n. a class that may be of type built-in-class in a conforming implementation and hence cannot be inherited by classes defined by conforming programs.
<pjb>
system class is rather vague…
<pjb>
#+ccl (typep 'structure-class 'built-in-class) #| --> nil |# this could be the test to try…
<mfiano>
NIL on SBCL
<mfiano>
Yet SBCL happily accepts a constant structure-object with no make-load-form.
<djeis[m]>
I think the test would be (typep 'structure-object 'built-in-class), actually. Also nil on SBCL.
<djeis[m]>
Or (subtypep 'structure-class 'built-in-class) which SBCL gives nil, t for.
<pjb>
But the definition of system class is informal, so the AFAICS, the implementation could consider structures to be system classes and to provide a make-load-form.
<pjb>
One has to hate informal specifications…
<djeis[m]>
Yea, but the spec specifically defines methods on make-load-form for structure-object that error.
<djeis[m]>
You have to define more specific methods that don't.
<pjb>
So we would say that sbcl is not conforming there? Bug report?
<djeis[m]>
Actually I think the issue is elsewhere and I've just spotted it.
<djeis[m]>
Nothing prevents implementations from providing a way to externalize an object that bypasses make-load-form entirely.
<djeis[m]>
They just have to use make-load-form if a method exists.
<djeis[m]>
If I'm reading the spec right.
<mfiano>
structure, standard-object: Objects of type structure-object and standard-object may appear in compiled constants if there is an appropriate make-load-form method defined for that type.
<djeis[m]>
A general-purpose concept of similarity does not exist for structures and standard objects. However, a conforming program is permitted to define a make-load-form method for any class K defined by that program that is a subclass of either structure-object or standard-object. The effect of such a method is to define that an object S of type K in source code is similar to an object C of type K in compiled code if C was
<djeis[m]>
constructed from code produced by calling make-load-form on S.
<djeis[m]>
That first sentence is important.
<djeis[m]>
The spec says that being externalizable is equivalent to having a concept of similarity.
<pjb>
it's nil in all implementations, including sbcl, so sbcl is conforming :-)
<djeis[m]>
My guess is that SBCL has a fallback definition of similarity for structure objects that doesn't rely on make-load-form at all.
<pjb>
You're correct.
<djeis[m]>
Is that documented anywhere?
<djeis[m]>
Cus without docs or source I'm just going to keep calling it a reasonable guess 😅
<pjb>
We'd need to make a concept cross reference to find where things are specified in clhs…
torbo has quit [Remote host closed the connection]
<djeis[m]>
I don't think the hyperspec will be of any further use, actually.
<djeis[m]>
Oh, except this last bit: Two objects S (in source code) and C (in compiled code) are defined to be similar if and only if they are both of one of the types listed here (or defined by the implementation) and they both satisfy all additional requirements of similarity indicated for that type.
<djeis[m]>
Implementations are permitted to extend the definition of similarity.
<djeis[m]>
And the hyperspec doesn't say it's an error to externalize a structure object without a method on make-load-form, just that you need a method on make-load-form in order to have reliable behavior.
<djeis[m]>
So now (unless SBCL has documented this somewhere) the reasonable assumption is just that SBCL has some fallback and leave it at that 🤷
<mfiano>
How exactly does the passage I quoted above play into all that?
<djeis[m]>
Your quote just says that it must be allowed if there is a method, it doesn't say that it will only be allowed if there is a method.
<mfiano>
Ah that makes sense.
<pjb>
Indeed, implementations to be conforming, must document implementation specific behavior.
Inline has quit [Quit: Leaving]
SaganMan has joined #lisp
pmai has quit [Ping timeout: 245 seconds]
brainacid0 has joined #lisp
<brainacid0>
Hello. Im new to programming in a way. I have played with Linux for 22 yrs. Im 34. Im studying 2HtDP and enjoying it a lot. I have run into some confusions and I hope I can chat with someone. Thanks ;)
<LdBeth>
Hey brainacid0
<brainacid0>
Hey LdBeth
<brainacid0>
I did begin tho reading Pauls ANSI CLisp
<brainacid0>
but I figured I should go the route of HtDP and then SICP
<brainacid0>
Im more of a Super User if you will, rev engineer, not so much as a creator of programs so Im looking forward in learning more but actually connecting with someone I could actually practice with
<LdBeth>
If you are completely new to programming, I would say The Little Schemer is the best place to start
<brainacid0>
not so much "completely"
<pjb>
htdp is good.
<pjb>
for #scheme, I mean…
<LdBeth>
Well, at least if you are not very proficient to lisp
brainacid0 has quit [Read error: No route to host]
<LdBeth>
SCIP is for people who want to know how some commonly seen features in program languages actually work
<LdBeth>
It might be feasible to just get GNU/Emacs and play around with it somehow
<p_l>
mit-scheme, which is pretty much maintained for the purpose of using it for SICP, has its own Emacs implementation (in mit-scheme)
<p_l>
which is also the canonical environment for TA-led labs
<p_l>
though I believe there are some customizations missing
<refpga>
I just needed to give more than one result for each evaluation. I could give a list out instead of (values) and maybe destrcture that recursively?
<refpga>
*destrcture
<refpga>
Each list will be of length 2.
<refpga>
Like ((val1 val2) (val1 val2) (val1 val2))
<refpga>
is there a way to turn the above list into (val1 val2 val1 val2 val1 val2) ?
<refpga>
Thanks everyone, let me take a look
<pjb>
Not efficient, but ok for small lists; (reduce 'append '((val1 val2) (val1 val2) (val1 val2))) #| --> (val1 val2 val1 val2 val1 val2) |#
<pjb>
works only if the list is less than call-arguments-limit long: (apply (function concatenate) 'list '((val1 val2) (val1 val2) (val1 val2))) #| --> (val1 val2 val1 val2 val1 val2) |#
<refpga>
Right, perhaps that was what I was looking for. The length of list would be less than 100.
<pjb>
call-arguments-limit can be as low as 50.
<pjb>
so max length 49 (one argument is 'list.
<pjb>
)
varjag has joined #lisp
<refpga>
OKay, I'm trying to understand that function. Thanks.
ltriant has quit [Quit: leaving]
dale has quit [Quit: dale]
pjb has quit [Read error: Connection reset by peer]
pjb has joined #lisp
les has quit [Quit: ""]
scymtym has joined #lisp
dddddd has joined #lisp
<splittist>
Good morning
<beach>
Hello splittist.
<hugotty>
Morning!
<beach>
Hello hugotty.
<beach>
hugotty: Are you new here? I don't recognize your nick.
<hugotty>
breach: yep, I just joined yesterday
<beach>
Great! What brings you to #lisp?
<hugotty>
well, I was chatting in #emacs about how I'd fallen in lab
<hugotty>
Love with elisp *
<beach>
Hmm. You may have limited success here then. #lisp is dedicated to Common Lisp.
<hugotty>
And that it was a pitty that it wasn't created as a more general purpose language
themsay has quit [Ping timeout: 268 seconds]
<beach>
Common Lisp is a general-purpose language that can be thought of as a superset of Emacs Lisp.
<beach>
Plus, there are compilers for Common Lisp that generate very good code.
<beach>
... unlike for Emacs Lisp.
<hugotty>
Well, the gentlemen there quickly pointed out that common lisp was the way to go for a general purpose lisp that was similar to elisp, so here I am :)
<beach>
Excellent!
<hugotty>
yes, there's no lack of compilers in the common lisp world, I quickly discovered that :))
<beach>
Heh. The most common one used by people here is probably SBCL, but your needs might dictate a different implementation.
<beach>
And most people probably use it with Emacs and SLIME.
vsync has quit [Ping timeout: 244 seconds]
<hugotty>
Yes, I've been looking at the different implementations and I've settled on SBCL as well. I was also able to setup quicklisp reasonably easily and SLIME seems to work as expected as well.
rumbler31 has quit [Remote host closed the connection]
<hugotty>
All in all, setting up a basic common lisp environment wasn't as daunting as I expected it to be!
Riviera_ has quit [Read error: Connection reset by peer]
<beach>
That's good.
<hugotty>
Speaking of quicklisp, I noticed that there were many http client libraries to choose from according to the quicklisp site, is there one you can recommend?
<beach>
Not me. Others may.
nowhereman has joined #lisp
themsay has joined #lisp
<shka__>
dexador works
<jackdaniel>
hugotty: drakma is a popular http client library (it has a good documentation and stable api)
<heisig>
jmercouris: Another option is to add a mandatory 'client' argument to all your generic functions. Its value is initially provided by the user and then passed along.
<heisig>
So you could have a (defgeneric make-buffer (client foo bar &key ...))
<heisig>
This allows the user to create a very personalized version of your code.
<jmercouris>
I think we'll do the dynamic global var
<jmercouris>
and then make a thin veneer over defclass to emit global vars for speciallly marked slots
<jmercouris>
not sure if that makes sense, but if it doesn't I can provide a code example
techquila has quit [Read error: Connection reset by peer]
sjl_ has joined #lisp
<shka__>
jmercouris: one trick i often see is to have slot with class-name symbol
<shka__>
so you can do (make-instance (class-symbol object) ...)
<shka__>
and you can happily subclass
<jmercouris>
shka__: ok, interesting
<jmercouris>
thanks
<shka__>
uhm, theoritically class name does not have to be symbol, but you know what i mean
Inline has joined #lisp
orivej has quit [Ping timeout: 250 seconds]
heisig has quit [Quit: Leaving]
orivej has joined #lisp
Lycurgus has joined #lisp
wxie has joined #lisp
trocado has joined #lisp
jprajzne has quit [Quit: Leaving.]
xkapastel has joined #lisp
terpri has joined #lisp
terpri_ has quit [Read error: Connection reset by peer]
<fivo_>
Why does (read-from-string "(let ((a '#1=(10 . #1#))) (nth 42 a))") result in infinite recursion and when I evaluate the expression in the REPL it runs fine?
<fivo_>
I thought REPL just does (eval (read exp))?
<fivo_>
Or something along the lines.
orivej has quit [Ping timeout: 258 seconds]
wxie has quit [Ping timeout: 264 seconds]
<jackdaniel>
fivo_: put eval before it and it will work
<beach>
fivo_: The READ-FROM-STRING does not result in an infinite recursion.
<beach>
fivo_: But trying to print it when *PRINT-CIRCLE* is NIL does.
<beach>
fivo_: So set *PRINT-CIRCLE* to T and then do the READ-FROM-STRING again.
<fivo_>
@beach: thanks
<beach>
Anytime.
lumm has joined #lisp
orivej has joined #lisp
bendersteed has joined #lisp
ym555 has quit [Ping timeout: 258 seconds]
andrei-n has quit [Remote host closed the connection]
<beach>
refpga: Please don't do that again. Use a pastebin service.
<sjl_>
also, if you're pasting more than 2-3 lines at once, it's generally better to use a pastebin. freenode rate limits so after the first couple of lines they start to slowly trickle in one-by-one
<refpga>
sorry
<shka_>
good evening
rippa has joined #lisp
<shka_>
refpga: it's ok, just don't do it :)
<beach>
refpga: The forms are evaluated left-to-right, but the variables are bound "in parallel" for LET.
<refpga>
Thanks.
MightyJoe has joined #lisp
<beach>
refpga: So VAR1 is not visible in INIT-FORM-2.
<refpga>
I see.
anewuser has joined #lisp
cyraxjoe has quit [Ping timeout: 268 seconds]
<pfdietz>
LET* does the binding interleaved with the evaluation, so VAR1 would be visible in FORM2, etc.
<pfdietz>
INIT-FORM-2
norserob has quit [Ping timeout: 240 seconds]
<shka_>
refpga: btw, if you are feeling stressed, inadequate or otherwise uncomfortable at #lisp there is also channel #clshool
<shka_>
you are welcome here, obviously, but just so you know :-)
shifty has joined #lisp
ym555 has joined #lisp
Aruseus has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
<fivo_>
When I evaluate (read-from-string "(toto:funcall #'(lambda (x) x) 1)")
<fivo_>
I get TOTO doesn't exist with line and column information
<fivo_>
Is this implementation dependent?
nwoob has joined #lisp
t58 has quit [Quit: Leaving]
<nwoob>
which laptop do you guys use
<fivo_>
I am essentially looking for some read function that would return source-line and column
<Bike>
fivo_: the line and column info is implementation dependent, if that's what you're asking
<Bike>
What would that return? The line FUNCALL is defined on?
<Bike>
in the implementation source
<fivo_>
yes
<fivo_>
but the link you send looks promising
<Bike>
so like (source-line 'funcall)? that's not in the standard (which doesn't mandate implementations be open source, even) but common tools support similar functionality.
trafaret1 has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
<fivo_>
I mean the read function would also need to be different.
<Bike>
why?
<Bike>
funcall is just a name.
dale_ has joined #lisp
dale_ is now known as dale
<fivo_>
Essentially I wanted to know if there is something similar to READ that parses some expression but gives me also other types of information like source-line, column, original package of the symbol.
<beach>
fivo_: Eclector does that.
<fivo_>
Ok perfect then.
<Bike>
i think you might have an erroneous concept of what a symbol is.
<Bike>
if you use the eclector reader, it will give you an object with information about the source positions of _the stuff you read_.
<Bike>
which doesn't include the implementation's definitions of functions like funcall.
<fivo_>
I get it it's not a symbol at that point
<beach>
Er, what?
<Bike>
that's not what i meant.
<Bike>
well, you can try eclector and see. you can get information about the position of the funcall symbol in the code you read, but it won't tell you where the funcall function is defined.
<pjb>
nwoob: why do you assume we're using a laptop?
<pjb>
fivo_: (read-from-string "(toto:funcall #'(lambda (x) x) 1)") #| ERROR: There is no package named "TOTO" . |#
<pjb>
(in ccl).
<beach>
fivo_: I think Bike is on to what you are trying to do. And I think you are confused.
<fivo_>
I essentially messed up when I said yes to "The line FUNCALL is defined on"
<fivo_>
It should rather be the "line funcall is called".
<beach>
fivo_: What do you mean by "original package of the symbol"?
<fivo_>
in case of funcall #:cl
<beach>
OK, that's fine then.
<refpga>
shka_: That channel (#clshool) is empty.
<beach>
#clschool
<beach>
shka_ made a typo.
<Bike>
fivo_: in that case eclector would be helpful. though in this particular case, where you're reading from a string instead of a file, there's not a lot of source info to be had
<refpga>
Thanks.
hhdave_ has quit [Ping timeout: 268 seconds]
Arcaelyx has joined #lisp
<Bike>
it'll tell you the position in the string, at least
<fivo_>
Bike: yes that was just for illustration.
<Bike>
just checking
plugd has quit [Quit: rcirc on GNU Emacs 26.1]
atgreen has quit [Ping timeout: 268 seconds]
ebrasca has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
sjl has quit [Quit: WeeChat 2.2-dev]
anewuser has quit [Ping timeout: 246 seconds]
refpga has quit [Quit: ERC (IRC client for Emacs 25.1.1)]
nwoob has left #lisp [#lisp]
m00natic has quit [Remote host closed the connection]
nanoz has quit [Ping timeout: 246 seconds]
fivo_ has quit [Quit: Page closed]
karlosz has joined #lisp
nanoz has joined #lisp
Zaab1t has quit [Ping timeout: 245 seconds]
atgreen has joined #lisp
adip has joined #lisp
FreeBirdLjj has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
scymtym has quit [Ping timeout: 268 seconds]
themsay has quit [Ping timeout: 246 seconds]
trafaret1 has left #lisp ["ERC (IRC client for Emacs 25.2.2)"]
rumbler31 has joined #lisp
eddof13 has joined #lisp
rumbler31 has quit [Ping timeout: 246 seconds]
karlosz has quit [Quit: karlosz]
zotan has quit [Ping timeout: 252 seconds]
zotan has joined #lisp
Zaab1t has joined #lisp
varjag has joined #lisp
ebrasca has quit [Remote host closed the connection]
klltkr has quit [Remote host closed the connection]
klltkr has joined #lisp
rme has quit [Read error: Connection reset by peer]
wilfredh has quit [Ping timeout: 252 seconds]
CEnnis91 has quit [Ping timeout: 252 seconds]
rme has joined #lisp
drmeister has quit [Ping timeout: 252 seconds]
billstclair has quit [Read error: Connection reset by peer]
fowlduck has quit [Read error: Connection reset by peer]
wilfredh has joined #lisp
billstclair has joined #lisp
fowlduck has joined #lisp
drmeister has joined #lisp
CEnnis91 has joined #lisp
Zaab1t has quit [Quit: bye bye friends]
sauvin has quit [Ping timeout: 250 seconds]
gravicappa has joined #lisp
bendersteed has quit [Ping timeout: 250 seconds]
atgreen has quit [Ping timeout: 255 seconds]
ym555 has quit [Ping timeout: 246 seconds]
Krystof has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
nanoz has quit [Ping timeout: 255 seconds]
gravicappa has quit [Ping timeout: 246 seconds]
nowhere_man has joined #lisp
atgreen has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
jasom has joined #lisp
hiroaki has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
vlatkoB has quit [Remote host closed the connection]
eddof13 has quit [Quit: eddof13]
milanj has joined #lisp
trocado has quit [Ping timeout: 250 seconds]
eddof13 has joined #lisp
<shka_>
refpga: sorry for the typo, beach is correct
<shka_>
oh, he is gone
<shka_>
i can't do anything right today
pierpal has joined #lisp
ym555 has joined #lisp
gxt has joined #lisp
dale has quit [Ping timeout: 246 seconds]
kajo has quit [Ping timeout: 250 seconds]
Aruseus has quit [Remote host closed the connection]
<p_l>
anyone knows if LW 7.1 will get a personal edition?
<_death>
shka: go solve a maze :)
dale has joined #lisp
shka_ has quit [Ping timeout: 246 seconds]
eddof13 has quit [Quit: eddof13]
angavrilov has quit [Remote host closed the connection]
atgreen has quit [Ping timeout: 252 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rumbler31 has joined #lisp
ym555 has quit [Ping timeout: 244 seconds]
ym555 has joined #lisp
patlv has joined #lisp
nowhere_man has quit [Ping timeout: 252 seconds]
makomo has quit [Ping timeout: 240 seconds]
ggole has quit [Quit: Leaving]
makomo has joined #lisp
eddof13 has joined #lisp
ym555 has quit [Ping timeout: 246 seconds]
ym555 has joined #lisp
trocado has joined #lisp
libertyprime has joined #lisp
selwyn has joined #lisp
quipa has joined #lisp
eddof13 has quit [Quit: eddof13]
q3d has joined #lisp
<quipa>
hello, new to common lisp, using sbcl on linux mint, I installed the cl-quicklisp package but it doesn't seem to be accessible in sbcl
<quipa>
Any ideas what I should configure? Or should I just uninstall that package and follow the procedure in the website
<quipa>
Hum in synaptic I notice the package installed /usr/share/cl-quicklisp/quicklisp.lisp
eddof13 has joined #lisp
<quipa>
running that seems to work
<quipa>
wonder why the package install doesn't do that automatically
xkapastel has joined #lisp
<p_l>
quipa: ... let's just say that debian packaging isn't exactly good?
fivo has joined #lisp
<quipa>
what packaging is xD, still haven't come by a good cross-platform language agnostic package manager
<p_l>
well, language agnostic in this case doesn't necessarily works
<quipa>
still usually try to use the default package manager if I can
<p_l>
I normally do manual install of quicklisp, recently been testing roswell
<quipa>
running the script from the install package seems to work
<quipa>
the only thing I am wondering now is if the other packages that get installed by the system package manager will be easy to use