phoe changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <http://cliki.net/> <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | SBCL 1.4.14, CMUCL 21b, ECL 16.1.3, CCL 1.11.5, ABCL 1.5.0
refpga has joined #lisp
* cgay reports grammar-o in the second paragraph of the intro.
<cgay> MAKING THE WORLD BETTER THROUGH GRAMMAR
Kaisyu has joined #lisp
scottj has left #lisp [#lisp]
stardiviner has joined #lisp
Mr-Potter has quit [Quit: Leaving]
irdr has quit [Remote host closed the connection]
irdr has joined #lisp
stardiviner has quit [Read error: Connection reset by peer]
refpga has quit [Ping timeout: 268 seconds]
refpga has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
torbo has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 245 seconds]
igemnace has joined #lisp
lavaflow_ has joined #lisp
Bronsa` has joined #lisp
ntbre_ has joined #lisp
verisimilitude has quit [Remote host closed the connection]
logicmoo has joined #lisp
irdr_ has joined #lisp
torbo has quit [*.net *.split]
irdr has quit [*.net *.split]
Lord_of_Life has quit [*.net *.split]
mange has quit [*.net *.split]
ntbre has quit [*.net *.split]
Bronsa has quit [*.net *.split]
emar has quit [*.net *.split]
CommanderViral has quit [*.net *.split]
troydm has quit [*.net *.split]
moei has quit [*.net *.split]
powerbit has quit [*.net *.split]
APic has quit [*.net *.split]
b-m-f has quit [*.net *.split]
lavaflow has quit [*.net *.split]
aindilis has quit [*.net *.split]
theBlackDragon has quit [*.net *.split]
d4ryus has quit [*.net *.split]
dmiles has quit [*.net *.split]
ntbre_ is now known as ntbre
b-m-f has joined #lisp
Lord_of_Life has joined #lisp
CCDell has joined #lisp
Kundry_Wag has joined #lisp
APic has joined #lisp
d4ryus has joined #lisp
troydm has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
aindilis has joined #lisp
undiscov1 has quit [Quit: WeeChat 2.3]
xkapastel has quit [Quit: Connection closed for inactivity]
LdBeth has joined #lisp
runejuhl has quit [Read error: Connection reset by peer]
<LdBeth> sup
runejuhl has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
Oladon has joined #lisp
Essadon has quit [Quit: Qutting]
rumbler31 has joined #lisp
logicmoo is now known as dmiles
dddddd has quit [Remote host closed the connection]
Josh_2 has quit [Remote host closed the connection]
torbo has joined #lisp
Kundry_Wag has joined #lisp
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
esrse has joined #lisp
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
dale has quit [Quit: dale]
rumbler31 has quit [Remote host closed the connection]
orivej has joined #lisp
iovec has quit [Quit: Connection closed for inactivity]
Kundry_Wag has joined #lisp
marusich has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
Khisanth has quit [Ping timeout: 268 seconds]
<beach> Good morning everyone!
ntbre has quit [Quit: ntbre]
<ebrasca> beach: Hi
verisimilitude has joined #lisp
marvin2 has quit [Ping timeout: 246 seconds]
Khisanth has joined #lisp
CCDell has quit [Remote host closed the connection]
Bike has quit [Quit: sleeping]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 250 seconds]
akoana has quit [Ping timeout: 245 seconds]
akoana has joined #lisp
akoana has left #lisp [#lisp]
_whitelogger has joined #lisp
sauvin has joined #lisp
anewuser has joined #lisp
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
themsay has joined #lisp
robdog has quit [Ping timeout: 252 seconds]
themsay has quit [Ping timeout: 245 seconds]
themsay has joined #lisp
permagreen has quit [Remote host closed the connection]
smokeink has joined #lisp
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 252 seconds]
_atomik has quit [Ping timeout: 250 seconds]
Oladon has quit [Quit: Leaving.]
marusich has quit [Remote host closed the connection]
varjag has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
varjag has quit [Ping timeout: 246 seconds]
dale has joined #lisp
quazimodo has joined #lisp
Diip has joined #lisp
mrcom has quit [Read error: Connection reset by peer]
xkapastel has joined #lisp
zotan has quit [Ping timeout: 252 seconds]
Kundry_Wag has joined #lisp
zotan has joined #lisp
zotan has quit [Ping timeout: 244 seconds]
Kundry_Wag has quit [Ping timeout: 250 seconds]
zotan has joined #lisp
mrcom has joined #lisp
cqs has quit [Quit: cqs]
themsay has quit [Ping timeout: 252 seconds]
themsay has joined #lisp
impulse has joined #lisp
torbo has quit [Remote host closed the connection]
themsay has quit [Read error: Connection reset by peer]
themsay has joined #lisp
karlosz has joined #lisp
dale has quit [Quit: dale]
zotan has quit [Ping timeout: 252 seconds]
zotan has joined #lisp
acolarh has quit [Ping timeout: 244 seconds]
slyrus1 has joined #lisp
slyrus has quit [Ping timeout: 245 seconds]
acolarh has joined #lisp
Inline has quit [Quit: Leaving]
pjb has quit [Ping timeout: 268 seconds]
zmv has joined #lisp
notzmv has quit [Ping timeout: 244 seconds]
powerbit has joined #lisp
jprajzne has joined #lisp
Kundry_Wag has joined #lisp
jasom has quit [Quit: WeeChat 2.0.1]
igemnace has quit [Ping timeout: 245 seconds]
Kundry_Wag has quit [Ping timeout: 268 seconds]
ggole has joined #lisp
varjag has joined #lisp
shrdlu68 has joined #lisp
schweers has joined #lisp
asarch has quit [Quit: Leaving]
nowhere_man has quit [Ping timeout: 252 seconds]
ebrasca has quit [Read error: Connection reset by peer]
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
Kundry_Wag has joined #lisp
cqs has joined #lisp
corvidzz has quit [Ping timeout: 268 seconds]
Kundry_Wag has quit [Ping timeout: 246 seconds]
easye has quit [Remote host closed the connection]
easye has joined #lisp
varjag has quit [Ping timeout: 244 seconds]
Lycurgus has joined #lisp
<zigpaw> morning :)
_whitelogger has joined #lisp
marvin2 has joined #lisp
stereosphere has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
kajo has quit [Ping timeout: 252 seconds]
refpga has quit [Ping timeout: 246 seconds]
refpga has joined #lisp
pierpal has quit [Remote host closed the connection]
smokeink has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
rumbler31 has joined #lisp
pierpal has joined #lisp
ebrasca has joined #lisp
scymtym has joined #lisp
anewuser has quit [Quit: anewuser]
varjag has joined #lisp
<shrdlu68> zigpaw: Morning
zerobaud has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
varjag has quit [Ping timeout: 240 seconds]
<zerobaud> Does anybody have a good overview / tutorial showing how metaprograming can be done in lisp? For example in C you want a enum of errors that indexes an array of strings (char arrays) corresponding to the error message so that; res = do_something(); if res != ERR_NONE { strerror(res);
Kundry_Wag has joined #lisp
rumbler31 has quit [Remote host closed the connection]
<zerobaud> But in C only X macros can do it.
<zerobaud> There are better examples, but anyways... any good documentation about metaprogramming?
<shrdlu68> I don't understand how the example is metaprogramming.
Kundry_Wag has quit [Ping timeout: 268 seconds]
<zerobaud> shrdlu68: sorry, I left information out.. I want a single place to add a error message and automatically add a enum. I can keep a enum with error names like ERROR_NONE, ERROR_THIS, then create a char array pointer to a char array with "strings" corresponding to the errors.
<zerobaud> shrdlu68: now if I want to remove a error I need to edit 2 places...
pierpal has quit [Read error: Connection reset by peer]
<zerobaud> X macros allow you to add them in one place only trough metaprogramming (using the preprocessor)
pierpal has joined #lisp
<zerobaud> shrdlu68: or for example, I want to call a error handling function strerror for libc, and also want to handle libelf erros with elf_errmsg, and errors from intel xed dissasembler using xed_error_enum_t2str.
pierpal has quit [Read error: Connection reset by peer]
<zerobaud> Now, with metaprogramming you can call the correct function without having to return multiple values (orignal return, and a value indicating what lib caused the error)
heisig has joined #lisp
pierpal has joined #lisp
<zerobaud> so these are practical examples where C really cant do what you want, my question is there a list or tutorial detailing practical examples like those which lisp solves?
pierpal has quit [Ping timeout: 268 seconds]
<shrdlu68> Sorry, I still don't quite understand the problem, and how whether it has an analogous problem in CL.
<zerobaud> shrdlu68: I can show a snippet of C not sure if you are familiar with it... I know this is a lisp channel, but if you are I think you will understand. I find it difficult to explain with just words.
<schweers> zerobaud: what you seems to me more like memory management and maybe dispatch (i.e. OO) than metaprogramming.
<shrdlu68> zerobaud: As I understand it, you can have a function that checks the value of "errno" and returns the corresponding string. That, or a macro that copy-pastes the code inline. Right?
<zerobaud> schweers: #define LIST_OF_VARIABLES \ X(value1) \ X(value2) \ X(value3) void print_variables() { #define X(name) printf("%s = %d\n", #name, name); LIST_OF_VARIABLES #undef X }
<scymtym> https://en.wikipedia.org/wiki/X_Macro has a complete example
<zerobaud> scymtym: right, but X macros are frowned upon, ugly, and really cant do everything you want...
kajo has joined #lisp
<zerobaud> now I want to learn lisp to see if the afromentioned problems (for which I can provide snippets showing its impossible) can be solved in lisp
akr has left #lisp ["WeeChat 2.2"]
<scymtym> zerobaud: sure, i just thought that page might help people understand where you are coming from with your question and the example
<schweers> I for instance was completely unaware of these X macros
<zerobaud> scymtym: yes thanks, I was about to post it as well since that one line is horrible to read ^_^
<flip214> zerobaud: I guess you should do (DEFPARAMETER ERROR_NONE "no error") (DEFPARAMETER ERROR_THIS "that") etc. and just use the symbol name as identifier, doing (SYMBOL-VALUE error) to get the string.
<schweers> Good lord, this is awful
<zerobaud> schweers: what is?
<flip214> or do you really need some enumeration via numeric IDs for outside communication? In that case I'd recommend a DEFERROR macro that does DEFPARAMETER and registers the error in an array.
<schweers> scymtym: thanks for the link to that trainwreck, now I wont’t be able to sleep for two days ;-P
<scymtym> zerobaud: in lisp, you can run arbitrary lisp code at compile time to generate code to be compiled. there is no separate text-based preprocessor
<zerobaud> flip214: I guess that fixes this yes..
<schweers> zerobaud: the X macros
<zerobaud> schweers: they are indeed :)
<zerobaud> scymtym: so can I get the names of variables also, and construct code to execute based on them?
<schweers> zerobaud: in lisp identifiers are first class values, called symbols. Thus, one can have a list of variable names or function names, or whatnot.
jello_pudding has joined #lisp
<scymtym> zerobaud: not sure what you mean but variables, but yes, macros often generate code based on input that is also code
<zerobaud> schweers: how would I get the variable name given the variable name? like what is the syntax like?
<zerobaud> sorry I am really new to lisp, but its metaprogramming that makes me curious to learn it
<schweers> I highly recommend you read Practical Common Lisp by Peter Seibel (http://gigamonkeys.com/book/), it is a decent into to Common Lisp in general, has a chapter on macros and has practical examples.
<schweers>
<no-defun-allowed> the variable name is the symbol
<schweers> Using symbols as variable (or function, or class, or whatever) names can be a bit confusing at first, as you have to bind them to a variable in the macro in order to reference it. It took me quite some time to wrap my head around that.
<zerobaud> schweers: I am afraid this is something you learn once you actually understand lisp decently
<zerobaud> well the pdf is going to help with that thanks everyone!
<schweers> Indeed. This is also the aha-moment that many people claim lisp brings them.
amerlyq has joined #lisp
zmt01 has joined #lisp
Kundry_Wag has joined #lisp
zmt00 has quit [Ping timeout: 250 seconds]
b-m-f has quit [Quit: The Lounge - https://thelounge.github.io]
<schweers> How do you guys use CALL-NEXT-METHOD? It’s not always obvious whether or not there will be another method to call. Do you always call it like this: (when (next-method-p) (call-next-method))?
Kundry_Wag has quit [Ping timeout: 245 seconds]
Selwyn has joined #lisp
<no-defun-allowed> i call it anyway, since if there is nowhere to go it'll signal an error and that's usually what i want
<no-defun-allowed> i suppose if you actually want the value though, eeeeh, that's probably the best solution if method combinations don't work
<schweers> That’s not always what I want.
<no-defun-allowed> i'd rather have the method combination doing the combining if possible
<schweers> Sometimes I define a method on a class which derives from the default (STANDARD-OBJECT?), but due to MI there might be more methods to call.
<schweers> How so?
orivej has quit [Ping timeout: 246 seconds]
<flip214> schweers: you can use the APPEND method combination to run all methods and get a list of their results; or the + m.c.; etc.
<no-defun-allowed> i don't know what you intend to do with the value, but if you're combining values with something like + or append, you can define a :method-combination in defgeneric and the method machinery will reduce the values using the combination
<schweers> Ah, now I understand
<no-defun-allowed> +, and, or, list, append, nconc, min, max and progn are already defined
<schweers> Never used a nondefault method combination before, so this didn’t enter my mind
nowhere_man has joined #lisp
undiscovered has joined #lisp
<schweers> So in such a case one wouldn’t call CALL-NEXT-METHOD in the first place, right?
<schweers>
<no-defun-allowed> no, the gf handles that
surya123 has joined #lisp
<schweers> Ahh, progn is predefined ... that may be what I want, I’ll take a closer look at it and what I actually need. Thanks for the input!
zmv is now known as notzmv
cqs has left #lisp ["Good Bye"]
<beach> I use CALL-NEXT-METHOD when I want to sometimes avoid calling the primary method(s). So I might have (if ... (call-next-method) (do-something-else))
<schweers> beach: so do I. Sometimes I don’t call it at all (for instance when building a mock/fake/etc)
<beach> Indeed, if you call CALL-NEXT-METHOD unconditionally, it is likely that there is a method combination for you, or that you might want to do it with a custom method combination.
<beach> schweers: I see, yes.
robdog has joined #lisp
quazimodo has quit [Ping timeout: 268 seconds]
igemnace has joined #lisp
iovec has joined #lisp
Selwyn has quit [Ping timeout: 245 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 250 seconds]
<hjudt> is it bad practice to load a foreign library when (quick-)loading the system and fail ungracefully if it doesn't exist? some systems seem to load the lib only on first usage (so it fails later).
Lycurgus has quit [Quit: Exeunt]
pierpal has joined #lisp
pierpal has quit [Client Quit]
pierpal has joined #lisp
jello_pudding has quit [Quit: Leaving, Quit]
Kaisyu has quit [Quit: Connection closed for inactivity]
quazimodo has joined #lisp
<schweers> hjudt: why fail ungracefully? I have seen systems which offer a restart to choose a different file location.
<hjudt> ok. even better. but failing on quickload per se is not a no-go right?
<hjudt> instead of failing later i mean
kajo has quit [Ping timeout: 250 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 268 seconds]
surya123 has quit [Read error: Connection reset by peer]
<hjudt> another question: sbcl provides a synchronized hash-table. is there something similar for other implementations, or some "trivial-" package?
refpga has quit [Read error: Connection reset by peer]
refpga has joined #lisp
beach has quit [Ping timeout: 252 seconds]
JetJej has joined #lisp
beach has joined #lisp
pierpal has quit [Ping timeout: 240 seconds]
Selwyn has joined #lisp
m00natic has joined #lisp
arquebus has joined #lisp
esrse has quit [Quit: 좋은 주말 되세요]
rozenglass has joined #lisp
arquebus has quit [Quit: Leaving]
Lord_of_Life has quit [Ping timeout: 250 seconds]
smokeink has joined #lisp
Lord_of_Life has joined #lisp
phenoble has quit [Ping timeout: 250 seconds]
phenoble has joined #lisp
robdog has quit [Remote host closed the connection]
igemnace has quit [Quit: WeeChat 2.3]
Bronsa` is now known as Bronsa
Kundry_Wag has joined #lisp
shka_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
minion has quit [Read error: No route to host]
specbot has quit [Ping timeout: 246 seconds]
minion has joined #lisp
specbot has joined #lisp
<flip214> hjudt: IIRC lparallel provides cross-platform lock primitives.
<shka_> bt
<shka_> not lparallel
eagleflo_ is now known as eagleflo
rumbler31 has joined #lisp
noobineer has joined #lisp
rumbler31 has quit [Remote host closed the connection]
dddddd has joined #lisp
gxt has joined #lisp
noobineer has quit [Ping timeout: 264 seconds]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
xkapastel has joined #lisp
jmercouris has joined #lisp
Kundry_Wag has joined #lisp
<jmercouris> I'm having a bit of a problem with case in CL
<jmercouris> I'm using SXQL and trying to reference tables which are PascalCase
<jmercouris> I can of course do: (sxql:insert-into "Administrator" (set= "Password" "lol"))
<jmercouris> instead of making them part of the keyword package, but any other ideas? anything better I could be doing?
<jmercouris> Actually scratch that, it doesn't work
<shka_> |Administrator|
<jmercouris> it produces strange things
<shka_> jmercouris: try the above instead of string
<jmercouris> the SQL it produces is.. y
<jmercouris> "INSERT INTO ? (?, ?) VALUES (?, ?)"
<jmercouris> I'll try that yeah to preserve case
<jmercouris> instead of making things part of the keyword package though, I really did enjoy how it looked when everything was prefixed by a ":"
<jmercouris> damn, then it tries to treat |Administrator| as a variable
SaganMan has joined #lisp
<shka_> ah, right
<shka_> '|Administrator|
SaganMan has left #lisp [#lisp]
<jmercouris> Yeah, that did the trick, quoting it
<jmercouris> I wish there was a cleaner way
<jmercouris> I'm assuming sxql is downcasing all symbols from the keyword package or something, I don't know what wizardry it is doing
<shka_> not sxql
<shka_> reader
<shka_> and not downcasing
<shka_> upcasing
<jmercouris> yeah, sorry
<jmercouris> :fish --> :FISH
<jmercouris> however, Sxql produces SQL queries with "fish" instead of "FISH" when you specify :fish
<jmercouris> so either it is blindly upcasing or downcasing, who knows
<shka_> you can just defparameter *administrator* "Administrator"
<shka_> or '|Administrator| if you want to do so
<shka_> and then use the following variable instead
<jmercouris> "Administrator" doesn't work, it doesn't like strings, it espects symbols
<shka_> then '|Administrator|
<jmercouris> though I could do (defparaemter *administrator* '|Administrator)
<jmercouris> damnit missing pipe, but you know what I mean
<jmercouris> Yeah, I know a bit about it, can even be changed in sbclrc
<shka_> if you want to go deeper you can
<jmercouris> I read about it in PCL and Gentle Introduction to Symbolic Computation
<shka_> but i would stick to what i provided
<jmercouris> Yeah, I could make it so that my package is case sensitive by using named-readtables, basically right?
<shka_> jmercouris: even better, instead of defparameter use define-constant
<shka_> you can't
<shka_> and usually it is cumbersome
<jmercouris> fair enough
<jmercouris> isn't it defconstant?
<shka_> just (defconstant administrator '|Administrator|) and use that
<jmercouris> I don't have define-constant in my system
<shka_> probabbly
<jmercouris> ok, just making sure
<jmercouris> maybe I was missing something
<shka_> alexandria:define-constant is what i meant
<jmercouris> Why use the Alexandria version?
<shka_> but defconstant will work here as well
<shka_> here defconstant is equally good
w37 has joined #lisp
<jmercouris> ok
<jmercouris> thanks for your help!
<shka_> jmercouris: define-constant is nice because it allows you to pass your own test, but here you don't need it
<jmercouris> Right
<shka_> so you can stick to defconstant
<jmercouris> I saw that in the docs just now
<jmercouris> thank yoU!
<jmercouris> or shall I say THANK YOU instead :P
<shka_> heh, no problem
rumbler31 has joined #lisp
rumbler31 has quit [Remote host closed the connection]
Zaab1t has joined #lisp
<jmercouris> emacs keeps inserting a '' when I type ' instead of just one '
<jmercouris> how can I change this?
<jmercouris> it's getting really annoying, is it part of paredit or something?
<dlowe> yes
<dlowe> though it shouldn't in lisp mode
<Selwyn> certainly you can turn off things like this
orivej has joined #lisp
<Selwyn> one of the main reasons for using paredit is to take care of things like balancing quotes and parentheses in particular
<schweers> I wonder how people can live without having paredit like tools.
<dlowe> note that split and merge work for quotes in paredit
<jmercouris> it is still doing it
<jmercouris> maybe it is another one of my modes
<_death> schweers: I don't use paredit.. fine with it
<Selwyn> so you can certainly turn it off, but if it is consistently annoying it may be better to 1. use something elsemore suited to the task at hand or 2. get used to the strange behaviour and accept that getting used to it may save time eventually
<jmercouris> I can't seem to see which it could be
<jmercouris> but whatever don't worry about it, I have to focus on something else atm
<schweers> _death: doesn’t that make editing code a total pain?
<_death> schweers: no.. I really dislike editors that insert things for me
q3d has joined #lisp
<Selwyn> jmercouris: do you need to output double quotes one by one? or is the behaviour just annoying
<jmercouris> I want to just output one quote per keypress
<jmercouris> specifically for single quotes
<jmercouris> because I often use them instead of (quote ...)
<jmercouris> double quotes is fine, but single quotes... so annyoing finding myself, it's literally every time ' C-f backspace
<dlowe> jmercouris: Sure, obviously you want single quotes. This is the first time I've heard of that problem with paredit and lisp-mode
anewuser has joined #lisp
<jmercouris> I'm not saying it is paredit
<jmercouris> I asked if it is part of paredit
<schweers> jmercouris: what does C-h k ' say?
<jmercouris> I have no idea which mode is doing it...
<jmercouris> just says self-insert
Essadon has joined #lisp
<jmercouris> which is expected lol
<shka_> jmercouris: it won't do it in lisp mode
<schweers> weird
<schweers> No advice on it?
Essadon has quit [Max SendQ exceeded]
<schweers> you did try this in lisp-mode, right?
<jmercouris> yes
<jmercouris> no advice on it
<jmercouris> could be on post-self-insert hook for all I know
<schweers> you could inspect that then
<jmercouris> I should try on emacs -q and see if I still get it
<Selwyn> jmercouris: this is not typical paredit behaviour, I would guess something is broken somewhere or improperly configured. paredit should not output two single quotes after one key press (mine does not)
<jmercouris> ok, good to know
iovec has quit [Quit: Connection closed for inactivity]
<p_l> jmercouris: check for modes with names like "electric"
<jmercouris> I o nly have electric-indent
<jmercouris> probably is smartparens?
<jmercouris> yes, it is smartparens
<jmercouris> there's no smartparens default config for lisp, hnce this behavior
<_death> since a long time ago, I've been wary of technologies with "x" or "j" in their name.. in recent years "smart" also proved a good needle
<jmercouris> I'll keep that advice in mind :D, thanks
<jmercouris> time to restart emacs
<jmercouris> be back later!
jmercouris has quit [Remote host closed the connection]
flamebeard has joined #lisp
q3d has quit [Ping timeout: 256 seconds]
Bike has joined #lisp
LiamH has joined #lisp
m00natic has quit [Read error: Connection reset by peer]
m00natic has joined #lisp
igemnace has joined #lisp
Essadon has joined #lisp
Inline has joined #lisp
nowhere_man has quit [Ping timeout: 252 seconds]
shifty has quit [Ping timeout: 246 seconds]
rippa has joined #lisp
Josh_2 has joined #lisp
smokeink has quit [Remote host closed the connection]
random-nick has joined #lisp
notzmv has quit [Ping timeout: 250 seconds]
refpga has quit [Ping timeout: 268 seconds]
sjl_ has joined #lisp
igemnace has quit [Ping timeout: 245 seconds]
jaarod2 has joined #lisp
shrdlu68 has quit [Quit: WeeChat 2.3]
dale has joined #lisp
rpg has joined #lisp
kajo has joined #lisp
quazimodo has quit [Ping timeout: 246 seconds]
FreeBirdLjj has joined #lisp
quazimodo has joined #lisp
CrazyEddy has quit [Remote host closed the connection]
amerlyq has quit [Ping timeout: 246 seconds]
themsay has quit [Ping timeout: 246 seconds]
schweers has quit [Ping timeout: 250 seconds]
amerlyq has joined #lisp
cage_ has joined #lisp
refpga has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
quazimodo has quit [Ping timeout: 245 seconds]
ntbre has joined #lisp
flamebeard has quit []
jochens has joined #lisp
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
heisig has quit [Quit: Leaving]
surya123 has joined #lisp
Mr-Potter has joined #lisp
Lycurgus has joined #lisp
varjag has joined #lisp
xkapastel has quit [Quit: Connection closed for inactivity]
xkapastel has joined #lisp
jlarocco has joined #lisp
CrazyEddy has joined #lisp
kajo has quit [Ping timeout: 250 seconds]
jprajzne has quit [Quit: Leaving.]
amerlyq has quit [Quit: amerlyq]
Lycurgus has quit [Quit: Exeunt]
FreeBirdLjj has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
FreeBirdLjj has joined #lisp
wigust has joined #lisp
<jonh> re...reee..start?!
* dlowe glances nervously at his emacs uptime.
rpg has joined #lisp
metallicus has joined #lisp
<rpg> Here is a deeply random question: does anyone know if CLIM/SLIME style presentations exist for other programming languages/programming language modes? I have to do a bunch of python these days and I miss the SLIME inspector *really* badly.
<rpg> ... and "python presentation" is about the worst imaginable Google Query.
<verisimilitude> Does Forth qualify?
jochens has quit [Ping timeout: 245 seconds]
themsay has joined #lisp
<rpg> verisimilitude: hm... probably just as easy to try to smash SLIME onto python directly as to use forth as a conceptual bridge...
<verisimilitude> I wasn't aware that's what you were asking.
<verisimilitude> I thought you were simply asking about languages with similar facilities, not a language to bridge with.
<rpg> verisimilitude: Yes, what I would like to do is have a python mode that, like SLIME, has mouse-able data structures.
phlm has joined #lisp
<verisimilitude> I'm familiar with the name iPython to refer to some fancy Python environment; have you tried that?
<verisimilitude> Also, there's a Python implementation in Common Lisp, so you could simply use that.
<zigpaw> maybe PyCharm have something remotely similar during debuggin? (just guessing)
<rpg> verisimilitude: I'm using python (like many people) because I need access to numpy, pandas, and some machine learning libraries; I'm not sure that would be possible in a CL port of python.
<rpg> zigpaw: Yes, I could try that.
Arcaelyx has quit [Ping timeout: 246 seconds]
<verisimilitude> I don't believe it would, no, rpg.
<verisimilitude> It's amusing to me how people write in Python, but not for Python itself, as Python is a poor language.
<rpg> That's ok, I think the presentation idea is feasible, but ...
<rpg> verisimilitude: I think Python is underrated; they have gone out of their way to pull a lot of the nice features of Lisp, CLOS, etc.
<verisimilitude> The creator has gone out of his way to gimp many features as well, lambdas, TCO, etc.
<rpg> I still miss "homoiconicity", and things like CHANGE-CLASS for a long-lived environment.
<rpg> verisimilitude: TCO?
<verisimilitude> That is Tail-Call Optimization.
<rpg> verisimilitude: Ah! I came up with only Total Cost of Ownership, which isn't quite right!
surya123 has quit [Ping timeout: 245 seconds]
<verisimilitude> Python instead has a default stack limit of 1,000 and doesn't perform TCO purely because Guido doesn't care for it.
<rpg> verisimilitude: One thing I am appreciating is optional type checking (mypy, pyre), which I really wish I had in CL.
<verisimilitude> I don't understand what you mean.
egp_ is now known as brother_complexi
brother_complexi is now known as brother_complex
<dlowe> rpg: I'm working on a whole-image type checker for sbcl, but it's slow going
brother_complex is now known as complex_brother
Arcaelyx has joined #lisp
<rpg> dlowe: I like the checking that SBCL does, but I confess to a long term lack of understanding and queasiness about SBCL's use of CL type declarations for checking instead of (in addition to) optimization
complex_brother is now known as complex__brother
<rpg> Of course, not having macros makes it easier for Python.
complex__brother has quit [Quit: Leaving]
<rpg> I have an old copy of Drew McDermott's Nisp lying around, which does type checking, but it's written in such an idiosyncratic style that I've never managed to successfully comprehend it.
themsay has quit [Ping timeout: 244 seconds]
themsay has joined #lisp
Kundry_Wag has joined #lisp
asarch has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anewuser has quit [Quit: anewuser]
themsay has quit [Read error: Connection reset by peer]
themsay has joined #lisp
<sukaeto> IIRC, if you put type declarations in your code, SBCL tells you when you make a type error
Arcaelyx has quit [Ping timeout: 250 seconds]
<sukaeto> aaaand, he's gone
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
<sukaeto> minion: memo to rpg: you could try out elpy. I've used it a bit with iPython in inferior Python mode. It's not as nice as SLIME, and I eventually stopped using it, but it might give you what you want.
<minion> Remembered. I'll tell rpg when he/she/it next speaks.
anamorphic has joined #lisp
FreeBirdLjj has quit [Ping timeout: 245 seconds]
random-nick has quit [Read error: Connection reset by peer]
<anamorphic> Hi, I have some foreign code that deals with a pointer to two kinds of things: FOO and BAR, but in my CFFI code, I'd like to prevent a FOO pointer being passed to a function where BAR pointer is expected, so I came up with this scheme: https://pastebin.com/YU7fx2XK but it feels like I'm probably re-implementing something. Is there a better way to go?
Mr-Potter has quit [Ping timeout: 245 seconds]
m00natic has quit [Remote host closed the connection]
Arcaelyx has joined #lisp
moei has joined #lisp
rozenglass has quit [Remote host closed the connection]
rpg has joined #lisp
Denommus has joined #lisp
sauvin has quit [Remote host closed the connection]
gxt has quit [Ping timeout: 268 seconds]
Mr-Potter has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
random-nick has joined #lisp
atgreen has joined #lisp
random-nick has quit [Read error: Connection reset by peer]
metallicus has quit [Quit: WeeChat 2.3]
mathrick has quit [Ping timeout: 250 seconds]
pierpal has joined #lisp
<phoe> anamorphic: I don't think so. CFFI pointers are not typed, so having a simple structure wrapper around them is the way to actually keep them typed in the Lisp world.
<phoe> Or the way you did it - I wasn't aware of CFFI foreign types working that way.
random-nick has joined #lisp
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
varjag has joined #lisp
mathrick has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
notzmv has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #lisp
asarch has quit [Quit: Leaving]
<Bike> cffi does maintain types for pointers, it just ignores them, right? would it be difficult/possible/a good idea to have it type check those?
* |3b| didn't think it maintained any types
<Bike> i mean you can specify (:pointer :int) and stuff
<|3b|> at least on sbcl it just returns an (untyped) sbcl pointer value, with no extra cffi type info as far as i know
<|3b|> yeah, you can specify pointer types, but mostly ignored
<anamorphic> Like that (:pointer :int) syntax?
pierpal has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 240 seconds]
ggole has quit [Quit: ggole]
<phoe> This information is ignored I think
<Bike> yes what i'm asking is
<Bike> could cffi be modified to not do that
<phoe> I mean, the returned pointers are not typed in any way and a pointer returned from a function that is supposed to return an int pointer can be dereferenced as a float pointer later on and no type errors will happen.
shifty has joined #lisp
<phoe> I suppose it could, sure - it won't be backwards compatible, obviously, but the type information could be stored somewhere and then checked.
<LiamH> I think the reason for the pointer types is for conversion on dereferencing, especially for structs.
xantoz has quit [Read error: Connection reset by peer]
<phoe> LiamH: you can't dereference a pointer in CFFI without providing the type that you want to dereference as.
xkapastel has quit [Quit: Connection closed for inactivity]
<phoe> CFFI:MEM-REF requires a foreign type as its second argument.
<LiamH> phoe: yes
ntbre has quit [Quit: ntbre]
phlm has quit [Remote host closed the connection]
themsay has quit [Ping timeout: 246 seconds]
themsay has joined #lisp
<sjl_> > Design Philosophy
<sjl_> > Pointers do not carry around type information. Instead, type information is supplied when pointers are dereferenced.
<sjl_> > A type safe pointer interface can be developed on top of an untyped one. It is difficult to do the opposite.
rpg has joined #lisp
<shka_> anamorphic: i like your code
<LiamH> cffi-libffi, which allows for struct by value call/return, required the type of the struct be specified in order to do the conversion. As a convenience, the ability to specify the type of pointer was added to facilitate similar conversion for call-by-reference, though I don't think that is implemented.
pierpal has joined #lisp
<karlosz> is there a quick way in cl to interpret an unsigned 32 as a signed 32?
pjb has joined #lisp
<karlosz> so like f(2^32 - 1) = -1
<sjl_> no, you have to write the conversion function
<karlosz> alright
gxt has joined #lisp
<phoe> I just thought of the most sick way possible
<phoe> karlosz: get yourself a fresh int pointer, write a uint32 to it, read a sint32 from it
<karlosz> no thanks
<phoe> exactly
pierpal has quit [Ping timeout: 250 seconds]
zerobaud has quit [Ping timeout: 256 seconds]
pierpal has joined #lisp
jaarod2 has quit [Quit: CGI:IRC]
pierpal has quit [Read error: Connection reset by peer]
mrcom has quit [Quit: This computer has gone to sleep]
pierpal has joined #lisp
mrcom has joined #lisp
themsay has quit [Ping timeout: 268 seconds]
themsay has joined #lisp
pierpal has quit [Read error: Connection reset by peer]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akoana has joined #lisp
Selwyn has quit [Remote host closed the connection]
pierpal has joined #lisp
rpg has joined #lisp
pjb has quit [Ping timeout: 246 seconds]
rpg has quit [Client Quit]
karlosz has quit [Quit: karlosz]
pierpal has quit [Ping timeout: 272 seconds]
cage_ has quit [Remote host closed the connection]
pierpal has joined #lisp
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
scymtym has quit [Ping timeout: 250 seconds]
orivej has joined #lisp
ntbre has joined #lisp
pierpal has quit [Ping timeout: 272 seconds]
pjb has joined #lisp
pierpal has joined #lisp
<pjb> hello!
Bike has quit []
pjb has quit [Quit: ERC (IRC client for Emacs 26.1)]
pjb has joined #lisp
random-nick has quit [Ping timeout: 244 seconds]
<phoe> heyyy
notzmv has quit [Ping timeout: 245 seconds]
notzmv has joined #lisp
ntbre has quit [Quit: ntbre]
ntbre has joined #lisp
karlosz has joined #lisp
random-nick has joined #lisp
Bike has joined #lisp
X-Scale has quit [Ping timeout: 268 seconds]
karlosz has quit [Quit: karlosz]
permagreen has joined #lisp
karlosz has joined #lisp
anamorphic has quit [Quit: anamorphic]
rpg has joined #lisp
karlosz has quit [Quit: karlosz]
LiamH has quit [Quit: Leaving.]
karlosz has joined #lisp
bendersteed has joined #lisp
karlosz has quit [Client Quit]
buhman has quit [Ping timeout: 272 seconds]
buhman has joined #lisp
karlosz has joined #lisp
karlosz has quit [Client Quit]
scymtym has joined #lisp
Lycurgus has joined #lisp
shka_ has quit [Quit: Konversation terminated!]
ntbre has quit [Quit: ntbre]
sjl_ has quit [Ping timeout: 250 seconds]
sloanr has quit [Remote host closed the connection]
random-nick has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
rumbler31 has quit [Ping timeout: 268 seconds]
Lord_of_Life_ has joined #lisp
wrycode has quit [Remote host closed the connection]
Lord_of_Life has quit [Ping timeout: 246 seconds]
Lord_of_Life_ is now known as Lord_of_Life
iovec has joined #lisp
themsay has quit [Ping timeout: 240 seconds]
themsay has joined #lisp
X-Scale has joined #lisp
mrcom has quit [Read error: Connection reset by peer]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
mrcom has joined #lisp
anewuser has joined #lisp
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
anewuser has quit [Read error: Connection reset by peer]
kajo has joined #lisp
ebrasca has quit [Remote host closed the connection]
CCDell has joined #lisp
anewuser has joined #lisp