taiju has quit [Ping timeout: 272 seconds]
taiju has joined #commonlisp
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
random-nick has quit [Ping timeout: 245 seconds]
reb`````` has quit [Ping timeout: 244 seconds]
reb`````` has joined #commonlisp
taiju has quit [Read error: Connection reset by peer]
taiju has joined #commonlisp
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
trn has joined #commonlisp
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
derelict has quit [Ping timeout: 272 seconds]
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
zacts has joined #commonlisp
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
reb`````` has quit [Ping timeout: 252 seconds]
reb`````` has joined #commonlisp
actinium has joined #commonlisp
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
waleee has quit [Ping timeout: 252 seconds]
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
theBlackDragon has quit [Ping timeout: 272 seconds]
reb`````` has quit [Ping timeout: 244 seconds]
reb``````` has joined #commonlisp
reb``````` has quit [Ping timeout: 244 seconds]
reb`````` has joined #commonlisp
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
tyson2 has quit [Remote host closed the connection]
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
reb`````` has quit [Ping timeout: 252 seconds]
reb`````` has joined #commonlisp
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
<Josh_2> How do you "just dump an object into compiled code"?
<Josh_2> Say I have my object in my repl, how would I go about saving that in a fasl?
<aeth> well, I'm thinking about MAKE-LOAD-FORM to save an object that exists at macro expansion time that can then be effectively recreated later
reb`````` has quit [Ping timeout: 272 seconds]
<aeth> REPL would make that more complicated
<Josh_2> I've just been reading the CLHS on make-load-form and relevant parts about compilation
reb`````` has joined #commonlisp
<Josh_2> Externalizable objects etc'
<aeth> I've used it in macros to create objects that are also present at runtime
<Josh_2> but I dont see how I can use this to convert my objects created at runtime into something that I can restore after a restart
<Josh_2> The objects can be remade ofc
<Josh_2> do I put the outputted forms into a file and then compile file on it? then load that compiled file?
<Josh_2> output from make-load-form that is
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
dsk has joined #commonlisp
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
reb`````` has quit [Ping timeout: 244 seconds]
reb`````` has joined #commonlisp
Inline has quit [Remote host closed the connection]
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
reb`````` has quit [Ping timeout: 272 seconds]
Inline has joined #commonlisp
mindCrime has quit [Ping timeout: 245 seconds]
reb`````` has joined #commonlisp
reb`````` has quit [Ping timeout: 252 seconds]
reb`````` has joined #commonlisp
reb`````` has quit [Ping timeout: 252 seconds]
reb`````` has joined #commonlisp
reb`````` has quit [Ping timeout: 244 seconds]
reb`````` has joined #commonlisp
reb`````` has quit [Ping timeout: 244 seconds]
reb`````` has joined #commonlisp
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
<beach> Good morning everyone!
<White_Flame> reb``````: fix thy connection
<White_Flame> hmm, probably won't see that, as it's probably in timeout already
reb`````` has quit [Ping timeout: 272 seconds]
reb`````` has joined #commonlisp
<White_Flame> reb``````: fix thy connection
<White_Flame> Josh_2: say your object holds a symbol that's interned in some package which you loaded from a dependency. What does it mean to save that object, and what should happen if you try to deserialize it if that package isn't loaded?
<White_Flame> but yeah, make-load-form is often required to be written by the user for their datastructures which don't have a literal representation; it doesn't automatically make one that will always work for everything. It can't
<White_Flame> .
<beach> Which is why I think we should aim for "universal" persistence.
<White_Flame> as in saving an image so everything is linked up properly?
reb`````` has quit [Ping timeout: 272 seconds]
<beach> As in not having to save anything at all, and everything is still there when you start your system again.
reb`````` has joined #commonlisp
reb`````` has quit [Remote host closed the connection]
<White_Flame> ah. But if the intent is to externalize an object from the current image, that still doesn't help
<White_Flame> eg, to be loaded into a different image, or to be able to load it multiple time, etc
<beach> Oh, yes I see. Right, that won't work.
<beach> And you are right. There is no way such a thing can work automatically.
<White_Flame> hopefully, people desiring such a feature are looking at plain data, but the question is usually framed as a universal serialization solution, which is kind of impossible (and is stated many times as such)
<beach> Your serialized format would have to be a specification of how a graph should be constructed in the target system, and (more importantly) what the "borders" of that graph are.
<White_Flame> and even plain data could have problems with #= linkage
<pillton> I think most people would love to serialise a closure.
<White_Flame> erlang is able to do that, but only because it's pure functional
<White_Flame> and certainly people often use closures to hold state in CL, not just to remember some read-only data
<pillton> That is the problem. What to retain and how portable can it be?
Lord_of_Life has quit [Ping timeout: 264 seconds]
<pillton> I guess most implementations already have it with their image saving functionality. Unfortunately, most are called save-lisp-and-die. It would be good to be able to do it without dying.
Lord_of_Life has joined #commonlisp
<moon-child> serializing state is a problem when you reside within an os that is not set up for it
<moon-child> what if you have open files?
<White_Flame> yep
<moon-child> (of course, this is a problem in general when you abstract over control flow and haven't the infrastructure to support it. call/cc, fork() run into this as well)
<White_Flame> that would he part of "state", too :)
<White_Flame> but yeah, outside of the process
<moon-child> s/control flow/execution/, maybe
akoana has quit [Quit: leaving]
<Josh_2> beach: this is my dream. I have been thinking about this a lot :(
<beach> Josh_2: Universal persistence? I have a plan for it that you may have read. No?
<Josh_2> Just want what I make in my lisp image to be persistent, I do not want to deal with databases
<Josh_2> or files or anything outside of my lisp image
<Josh_2> just me and my lisp image, cozy
<Josh_2> I have read that
<Josh_2> I will look at it again
<Josh_2> Is this the next project after SICL :P
<beach> Maybe an IDE first.
endparen has joined #commonlisp
zacts has quit [Quit: bbl]
endparen has quit [Remote host closed the connection]
Bike has quit [Quit: Lost terminal]
taiju has quit [Ping timeout: 244 seconds]
taiju has joined #commonlisp
Inline has quit [Remote host closed the connection]
Inline has joined #commonlisp
mrcom has joined #commonlisp
samebchase has joined #commonlisp
jemoka has joined #commonlisp
<jemoka> What are some modern-day UI systems for CL that would fit the standards of what people think of "modern" apps? A la the snowflake animations and drop shadows etc.etc.?
<beach> I think you would be limited to FFI solutions for that at the moment.
<moon-child> there's a qt thing using ecl
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
<moon-child> there's also http://www.lispworks.com/products/capi.html, though you'd have to buy lispworks
<jemoka> beach: sorry noob question: what are FFI solutions?
<mrcom> Josh_2: DEFCONSTANT may, depending on compiler implementation, result in literal constant objects in the fasl.
<beach> jemoka: Foreign Function Interface, i.e., using your favorite GUI toolkit but calling it using a C interface from your Common Lisp system.
<beach> jemoka: The best native FLOSS GUI toolkit we have is McCLIM, but it still has a way to go to compete with modern GUI toolkits in other languages.
Wilfred has joined #commonlisp
<mrcom> Josh_2: (defconstant x (make-foo a: 42)) (defun baz () x)
<jemoka> beach: ah ok, that makes sense
<beach> jemoka: What is the reason for your question?
<beach> jemoka: Oh, and there are proprietary solutions, like LispWorks GUI toolkit. I forget the name. And I don't know what it can do.
<mrcom> Josh_2: When the compiler generates the machine code for BAZ, its allowed to use a direct reference to X's value, rather than do some kind of symbol look-up on X.
<mrcom> Josh_2: In that case, COMPILE-FILE needs to know how to generate load-time code that will re-create X's value when the fasl is loaded, so you need to define a MAKE-LOAD-FORM method for FOO class.
<jemoka> beach: I recently learned lisp and really liked both the paradigm and the way it it works; but I can't really give up my work/experience in stuff like GTK or Qt5/6 (mostly in C++) and some stuff in ReactJS. Wondering if there's a way of doing future projects in lisp
<jemoka> (and migrating current ones to lisp)
<beach> jemoka: McCLIM is actively maintained, and the goal is to make it work for modern looks. In the meantime, you can use GTK over FFI, but it makes your debugging experience more complicated.
<beach> I think some Qt version works with FFI as well, but I am not an expert. I much prefer native solutions even though they may not look as cute as the "modern" ones.
<beach> ... and I'll just wait for jackdaniel and the other people working on McCLIM to catch up eventually. :)
actinium has quit [Ping timeout: 252 seconds]
<jemoka> beach: that sounds like a good idea... I don't think doing a FFI for things like Qt is 1) stable, tbh, or 2) ergonomic
<jemoka> (and "lispy")
iNeedKoffee has joined #commonlisp
<beach> jemoka: McCLIM is an implementation of the Common Lisp Interface Manager specification (CLIM) and is way more sophisticated than any other GUI libraries in terms of its abilities and its interfaces.
<jemoka> I will look into it! I think if anything McCLIM sounds like a good bet
<beach> jemoka: Here is an example of a GUI application written in McCLIM: https://techfak.de/~jmoringe/clim.irc.ogv
<jemoka> Also, what other uses of cl are still used commonly in production?
shka has joined #commonlisp
<beach> I think Franz has a list of success stories on their website.
<beach> Google is using it for its airline system.
<beach> I don't really keep up (and I don't care much).
<jemoka> How exactly? As in, the frontend looks pretty react-y, so is lisp purely used in a hunchentoot/backend capacity?
actinium has joined #commonlisp
<beach> jemoka: I don't understand the question.
<beach> Is it related to the demo, to Franz, or to Google?
<jemoka> beach: sorry, I mean specifically wrt google's airline system/similar products made using lisp
<beach> Oh, I have no idea. Ask fe[nl]ix, I guess. He is working on it.
<jemoka> Sorry about the deluge of noob questions: I am pretty new to the language and am looking for general implementation pointers
<beach> I think you should not care much about how widely used Common Lisp is, and rather concentrate on its intrinsic qualities.
<jemoka> Right, but I do also need an excuse to build things in it ;)
<jemoka> and not get instantly smacked
<beach> By management?
<jemoka> yes
<jemoka> for small projects
<beach> Just do it. It is easier to get forgiveness than permission.
<beach> Otherwise, the "excuse" is better application safety, higher programmer productivity, and almost equal performance compared to C++. Better performance if your C++ application must use things like smart pointers or reference counters.
<jemoka> Right, performance is likely not the biggest impetus here (see: JS)
<beach> OK.
<jemoka> its more about the support/ecosystem. but it sounds like lisp has a pretty good set for building services and applets
<jemoka> as long as I am not deing with UI
<beach> I say go ahead and try it, perhaps doing a parallel experiment with Common Lisp and your usual language for a small project.
<beach> jemoka: Oh, and make sure you have all the usual tools. Ask here if you want recommendations.
<jemoka> What are the usual tools? I have no idea...
<jemoka> SLIME?
<beach> Most people here probably use SBCL, Emacs+SLIM, Quicklisp.
<beach>
<jemoka> and asdf, I guess
<jemoka> for packaging and building
<beach> Sure.
<jemoka> is Roswell a thing still/supported/recommended?
<beach> I'll leave that question for others. I don't use it and I don't know what problem it is supposed to solve.
<jemoka> actually, quick question: I am hopping between Emacs/Vim (Emacs time < vim time at the moment). What makes SLIME better than just running a REPL with SBCL/others and (auto)pasting lines in/out?
<jemoka> Sorry if this lights a torch for a flamewar, I am not particular to any editor specifically.
pillton has joined #commonlisp
<beach> SLIME gives you lots of stuff, like completion, indentation, lambda-list help, better "debugger" interface, better inspector, etc.
<flip214> jemoka: a SWANK integration (via SLIME, or VLIME for vim) gives you an interactive debugger - you can show stack frames, variables, inspect classes
<flip214> and what beach just said ;)
<jemoka> aaah... That makes sense. I will try it out, thanks!
<beach> Good luck.
<jemoka> thanks! You too.
Oladon has joined #commonlisp
pve has joined #commonlisp
jemoka has left #commonlisp [#commonlisp]
derelict has joined #commonlisp
selwyn has joined #commonlisp
silasfox has joined #commonlisp
selwyn has quit [Remote host closed the connection]
selwyn has joined #commonlisp
domovod has joined #commonlisp
rgherdt has joined #commonlisp
Cymew has joined #commonlisp
Duuqnd has joined #commonlisp
Oladon has quit [Quit: Leaving.]
lukego has left #commonlisp [#commonlisp]
White_Flame has quit [Ping timeout: 252 seconds]
White_Flame has joined #commonlisp
selwyn has quit [Read error: Connection reset by peer]
amk has quit [Read error: Connection reset by peer]
amk has joined #commonlisp
chrnybo has joined #commonlisp
amk has quit [Read error: Connection reset by peer]
amk has joined #commonlisp
pillton has quit [Quit: ERC (IRC client for Emacs 27.2)]
Cymew has quit [Ping timeout: 252 seconds]
Cymew has joined #commonlisp
karlosz has joined #commonlisp
hendursaga has quit [Ping timeout: 252 seconds]
ivche has joined #commonlisp
hendursaga has joined #commonlisp
taiju has quit [Ping timeout: 252 seconds]
taiju has joined #commonlisp
ivche has quit [Remote host closed the connection]
<dim> hi!
<dim> oh jemoka's not here anymore? anyway, the killer feature that I like in SLIME would be C-c C-c to send the current form to the lisp image so that you can edit your code in its file based organisation and still benefit from the interactive REPL
spec has joined #commonlisp
<Duuqnd> I must be missing something here because that sounds exactly like what C-c C-c does in SLIME right now
<flip214> Duuqnd: "that I like", not "that I would like"
<Duuqnd> oh, I see
<Duuqnd> Isn't that a feature most REPL editor integrations have though? Or is that mostly a Lisp-only thing?
<Duuqnd> Most non-Lisp languages I use don't have REPLs
<moon-child> it depends on what you call a repl. The name is somewhat poor, because it suggests (loop (print (eval (read)))), which is not really interesting
<moon-child> s/(poor),/\1/
<engblom> A couple of years ago I had to do some teamwork and Python was the only language the other in the team knew. At that point I had yet no experience in CL, but Clojure was my favorite language. I remember how disappointed I got at Python and its "repl".
<pjb> For non-lisp languages it's often difficult to identify the form to send to an interpreter.
<beach> Good point.
<pjb> forward-sexp and backward-sexp are not always useful.
<beach> The same reason C-M-f and C-M-b don't work so well.
<beach> Heh.
<pjb> the keys they're bound to :-)
<moon-child> pjb: I don't know if that's true. Most languages comprise a sequence of top-level forms which can be identified fairly easily
<beach> I'll throw in C-M-t then.
ivche has joined #commonlisp
kevingal has joined #commonlisp
<pjb> :-)
madnificent has joined #commonlisp
ivche has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
<madnificent> questions that would guide me to a solution.
<madnificent> I'm trying to use a reader macro for the first time to my knowledge. cl-interpol as I want unicode codepoints in regular expressions. When I try to load the file containing these expressions through slime, it doesn't want to compile this as it assumes the parens are unmatched. Adding the full expression in slime also doesn't seem to think it's valid to send to sbcl. I'm not sure what I should ask to get help
Wilfred has quit [Quit: Connection closed for inactivity]
<beach> madnificent: My guess is that you haven't switched to the readtable containing the reader macro.
d4ryus has quit [Quit: WeeChat 3.1]
<beach> madnificent: But it's hard to tell because of your skimpy description.
<madnificent> Yes, I don't know what to say exactly.
<madnificent> I have (named-readtables:in-readtable :interpol-syntax) at the top of the file containing the expressions (just underneath the in-package statement, and I've ran the same in the repl. I suppose that is not sufficient?
<beach> Oh, I don't know enough about named readtables. Sorry.
karlosz has joined #commonlisp
<jmercouris> pjb: that’s why many of them support the user highlighting the complete form to compile
<madnificent> Hey, you've gotten farther than I have. You had a clue. Have you used cl-interpol in a different way by accident? Or have you inserted unicode characters by character code in cl-ppcre perhaps?
<beach> Me? Neither.
<madnificent> beach: too bad
<beach> jmercouris: Woe, that would be kind of useless for forward/backward/toggle expression.
<beach> Wow, I mean.
<madnificent> I'll go and read "The Lisp Reader" from "Common Lisp Recipes", perhaps it will shed some light.
<jmercouris> Indeed it would be!
domovod has quit [Ping timeout: 245 seconds]
<pjb> madnificent: everytime you typed 'foo "foo" or (foo) you used a reader macro!
<pjb> madnificent: anything that is not integers, floating-points or symbols is read with reader macros in CL.
<pjb> madnificent: in source files, you want to make sure the *readtable* is modified at :compile-toplevel and :execute (when the source is read).
<madnificent> pjb: I knew that I had used reader macros but also thought that expressing any knowledge I have on this topic would be bad as I really don't know how to extend the reader nor have used any extensions to the reader as far as I know. I've toyed and developed in lisp for over ten years now so who knows what I have forgotten though. I did not know integers, floating-points and symbols did not go through reader macr
<madnificent> pjb: I should wrap it in an eval-when?
<pjb> madnificent: so writing (enable-interpol-syntax) at the top of the file should do.
<pjb> this is a macro that already does the eval-when.
<pjb> Like in-package.
<pjb> madnificent: but when such a macro is not provided, yes, you'd (eval-when (:compile-toplevel :load-toplevel :execute) (set-macro-character #\§ 'my-syntax))
<madnificent> It doesn't seem to work. It should also work if I execute that in the repl, right?
<beach> jmercouris: As I often say, people spend a lot of energy and go to a lot of trouble to avoid learning Common Lisp.
<pjb> That said, the named readtable form above is indeed documented for cl-interpol…
d4ryus has joined #commonlisp
<pjb> (macroexpand-1 '(named-readtables:in-readtable :interpol-syntax)) #| --> (eval-when (:compile-toplevel :load-toplevel :execute) (setf *readtable* (editor-hints.named-readtables:ensure-readtable ':interpol-syntax)) (when (find-package :swank) (editor-hints.named-readtables::%frob-swank-readtable-alist *package* *readtable*)) *readtable*) ; t |#
<pjb> looks correct.
random-nick has joined #commonlisp
<madnificent> pjb: Wait, let me try that. I did not run it that way. I only had the (named-readtables:in-readtable :interpol-syntax) followed by (interpol:enable-interpol-syntax)
<pjb> Just one of those forms should be enough.
<pjb> The macroexpand is to debug, to see what is actually done.
<madnificent> Right and the readtable does work! But not when it's in a list
<pjb> Of course it must be in a toplevel form for the eval-when to work.
<madnificent> So, I can do #?/\[_~.-!$&'()*\\+,;=\/?#@%]/ in the repl and that yields the expected string.
<pjb> You can put it in a PROGN, a LOCALLY.
<pjb> Yay.
ivche has joined #commonlisp
d4ryus has quit [Quit: WeeChat 3.1]
<madnificent> I guess something else must be wrong then. Perhaps just my use of the reader macro rather than reader macro's in general. I might come back with more questions.
<madnificent> Thanks pjb and beach
derelict has quit [Ping timeout: 272 seconds]
<madnificent> So, it seems #?/A|B/ is understood and yields an expected string on the REPL, but '(:PLX . #?/A|B/) does not execute (no error, it just doesn't get sent to the repl.
karlosz has quit [Ping timeout: 245 seconds]
<madnificent> I am confused here. The idea would be that the reader reads that content, converts it into some something internal (a string) and evaluates that? The reader would only read up to the delimiter and leave the rest alone, I had assumed.
heisig has joined #commonlisp
<pjb> The forms that preserve or establish toplevelness are: eval-when progn locally macrolet symbol-macrolet compile-file
<pjb> Beware, if a toplevel form has a compiler-macro, then the implementation may choose not to evaluate the expansions as a toplevel form!
ad-absurdum has joined #commonlisp
<pjb> (says 3.2.3.1)
<madnificent> And you can only use macro's top-level?
<phoe> no, why?
<madnificent> well, it works when I use the reader macro top-level in the repl, but not when I put it in a cons with something else.
<madnificent> I'll be back. Need to join on Teams and that is breaking.
<pjb> the thing is that the compiler will behave differently for some forms when they're toplevel vs when they're not.
<madnificent> But thanks for all the input already. Looking forward to rejoin! Apologies.
<madnificent> Ah.... hmmm
madnificent has quit [Remote host closed the connection]
<phoe> madnificent: is this just standard cl-interpol?
<pjb> for example with defun the compiler will note that a function is defined. But with (let ((x 42)) (defun f () x)) the compiler won't note it and a use of (f) may let the compiler warn about a call to an undefined function.
<phoe> this works in a terminal REPL, https://plaster.tymoon.eu/view/2473#2473
<phoe> it's slime that complains that input is not complete and therefore doesn't send it for evaluation
<phoe> it gets confused by the lone #\| in the middle
<phoe> it thinks it's a multiple escape start and therefore doesn't send the form to swank
<pjb> With C-x C-e (or C-c C-c), sometimes you may need to wrap the alien syntax in parentheses (progn #whatever) C-x C-e may work better than #whatever C-x C-e.
<pjb> But indeed C-x C-e evaluates things in a different thread each time, so readtables and some other things may be difficult.
Inline has quit [Read error: Connection reset by peer]
<mfiano> Works fine for me in SLIME
Inline has joined #commonlisp
<phoe> when I type '(:PLX . #?/A|B/) and press <RET> I get a newline with slime saying, input not complete
<mfiano> Not here
tyson2 has joined #commonlisp
<phoe> gasp
<_death> phoe: you can type 'C-u RET' to force it to send
<phoe> _death: yes, at that point it sends and evaluates correctly
theBlackDragon has joined #commonlisp
theBlackDragon has quit [Client Quit]
theBlackDragon has joined #commonlisp
Cymew has quit [Ping timeout: 245 seconds]
Cymew has joined #commonlisp
theBlackDragon has quit [Client Quit]
theBlackDragon has joined #commonlisp
<sabra> Hello everyone
theBlackDragon has quit [Client Quit]
theBlackDragon has joined #commonlisp
<phoe> hey sabra!
<sabra> Have talked to cage and fe[nl]ix and promised to update that test framework article if they make any enhancements or have corrections or suggestions
<sabra> hey phoe!
madnificent has joined #commonlisp
<jackdaniel> sabra: I've read your comparison - very cool! thank you for that :)
<sabra> jackdaniel: Thank you.
selwyn has joined #commonlisp
selwyn has quit [Remote host closed the connection]
selwyn has joined #commonlisp
<phoe> sabra: I can provide a short example for protest if you think it would be worth to have it there
<sabra> Phoe: That would be great!
<phoe> sabra: OK, will do
silasfox has quit [Ping timeout: 244 seconds]
igemnace has quit [Remote host closed the connection]
selwyn has quit [Read error: Connection reset by peer]
ivche has quit [Ping timeout: 272 seconds]
scymtym has joined #commonlisp
dsk has quit [Ping timeout: 272 seconds]
dsk has joined #commonlisp
attila_lendvai has quit [Remote host closed the connection]
silasfox has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
madnificent has quit [Remote host closed the connection]
contrapunctus has joined #commonlisp
selwyn has joined #commonlisp
cage has joined #commonlisp
Bike has joined #commonlisp
waleee has joined #commonlisp
sabra has quit [Quit: Konversation terminated!]
Duuqnd has quit [Ping timeout: 245 seconds]
Cymew has quit [Ping timeout: 272 seconds]
Cymew has joined #commonlisp
waleee has quit [Ping timeout: 272 seconds]
azimut has quit [Remote host closed the connection]
azimut has joined #commonlisp
pjb has quit [Ping timeout: 265 seconds]
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
Cymew has quit [Ping timeout: 264 seconds]
<Josh_2> New dawn, new day, although its 3pm now xD
<Josh_2> Afternoon everyone
<beach> Hello Josh_2.
gwefnn has quit [Ping timeout: 264 seconds]
gwefnn has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
zacts has joined #commonlisp
cage has quit [Remote host closed the connection]
contrapunctus has joined #commonlisp
ceblan has quit [Read error: Connection reset by peer]
ceblan has joined #commonlisp
contrapunctus has left #commonlisp [#commonlisp]
contrapunctus has joined #commonlisp
heisig has quit [Quit: Leaving]
jan-magnus has joined #commonlisp
ad-absurdum has quit [Ping timeout: 244 seconds]
ad-absurdum has joined #commonlisp
trokotech has quit [Remote host closed the connection]
trokotech has joined #commonlisp
ceblan has quit [Remote host closed the connection]
domovod has joined #commonlisp
zacts has quit [Quit: bbl]
ad-absurdum has quit [Quit: Leaving]
trokotech has quit [Remote host closed the connection]
yitzi has joined #commonlisp
sixtyfour has joined #commonlisp
derelict has joined #commonlisp
sixtyfour has quit [Remote host closed the connection]
hhdave has joined #commonlisp
nature has joined #commonlisp
dsk has quit [Ping timeout: 272 seconds]
pjb has joined #commonlisp
selwyn has quit [Remote host closed the connection]
selwyn has joined #commonlisp
kevingal has quit [Remote host closed the connection]
loke[m] has quit [Quit: node-irc says goodbye]
katco has quit [Quit: node-irc says goodbye]
Gnuxie has quit [Quit: node-irc says goodbye]
akanouras has quit [Quit: node-irc says goodbye]
dieggsy1 has quit [Quit: node-irc says goodbye]
loke[m] has joined #commonlisp
Gnuxie has joined #commonlisp
katco has joined #commonlisp
akanouras has joined #commonlisp
dieggsy has joined #commonlisp
neirac has joined #commonlisp
<neirac> which json parsing library should I use for a new project?
<Demosthenex> neirac: txr just added json support
<phoe> Demosthenex: I don't know if txr is a common lisp solution
<phoe> but I've seen that https://github.com/Zulu-Inuoe/jzon tries real hard to be conforming to the test suite, which is a very good thing
<aeth> what's txr?
<aeth> doesn't look like a googleable name
<pjb> neirac: (quick-apropos "JSON") and try them each to see which one works best for you.
<phoe> aeth: another lisp dialect
<aeth> oh
<aeth> I couldn't find it in https://www.quicklisp.org/beta/releases.html and the search just goes to http://quickdocs.org/bye?&q=test
<aeth> probably should update that part
<neirac> pjb Demosthenex thanks
<aeth> At the point of using another dialect, though, you might as well just use a Scheme JSON library inside of Common Lisp via Airship Scheme, once that's working...
<Demosthenex> i'm just thrilled it was added ;]
<phoe> oops
<phoe> neirac: I meant to mention you with jzon
mindCrime has joined #commonlisp
<Demosthenex> neirac: i used cl-json in my last project, scraping the riot games api
<Demosthenex> i was also using postgres via postmodern, and using postgres' native json in tables
<Demosthenex> was alright
<neirac> Demosthenex awesome, were you collecting a game collection or prices ?
srji has joined #commonlisp
<yitzi> phoe: Just FYI, my JSON lib shasht does the same sort of JSON compliance stuff. https://yitzchak.github.io/shasht/parsing.html and github.com/yitzchak/shasht
mindCrime has quit [Ping timeout: 264 seconds]
<phoe> yitzi: gasp, another one!
<phoe> lemme take a look
<yitzi> Ha. I wrote it use in common-lisp-jupyter b.c. the others were deficient, IMHO.
<yitzi> Used JSOWN before.
<yitzi> Still needs some optimization, but it is pretty fast and compliant.
<phoe> nice
<yitzi> thx
frgo has joined #commonlisp
blihp has joined #commonlisp
chrnybo has quit [Remote host closed the connection]
cage has joined #commonlisp
blihp has quit [Ping timeout: 250 seconds]
<Demosthenex> neirac: only to prove they exploit and abuse their player base without remorse.
domovod has quit [Quit: WeeChat 3.1]
srji has quit [Quit: ERC (IRC client for Emacs 27.2)]
srji has joined #commonlisp
srji has quit [Client Quit]
shka has quit [Ping timeout: 245 seconds]
<Demosthenex> neirac: if you're into gaming, forget every playing competitive League
<phoe> let's say that I do (defun foo (&key bar) bar) and I have the function object #'FOO. Is there any way, portable or not, of me getting the keyword :BAR from that function object after I perform (unintern :bar :keyword)?
<phoe> or rather, the thing that used to be the keyword BAR but is now a homeless symbol
dsk has joined #commonlisp
<phoe> trivial-arguments does not work because it returns (&KEY BAR) where BAR is not a keyword
<phoe> swank::arglist fails for the same reason
<Bike> are you allowed to unintern keywords?
<phoe> Bike: which part of the standard says that I am not allowed to
<yitzi> It does in SBCL
<Bike> if i do (defun foo (&key ((:bar bar))) bar) and then (sb-introspect:function-lambda-list #'foo) the result has the keyword in it
<phoe> asking in context of CLR recipe 1-3 where the author does a majestic (UNINTERN :EXECUTE :KEYWORD) at the end
srhm has joined #commonlisp
<phoe> Bike: actually it returns (&KEY BAR) for me
<phoe> one second...
<Bike> ((:bar baz)) then, maybe
<Bike> yes, with just (&key bar) i get the variable name
<phoe> yep, the constraint is that I explicitly don't want double-parens in the keyword argument definition
<Bike> explicitly specifying the keyword seems to make sbcl store it separately
<phoe> oh! function-type has the keyword
<yitzi> If it isn't in a function definition unintern works on keywords verified via find-symbol.
ivche has joined #commonlisp
<neirac> Demosthenex thanks I'll take a look
selwyn has quit [Read error: Connection reset by peer]
ivche has quit [Remote host closed the connection]
jemoka has joined #commonlisp
srji has joined #commonlisp
dsk has quit [Ping timeout: 264 seconds]
tfb has joined #commonlisp
tfb has quit [Client Quit]
tfb has joined #commonlisp
srji has quit [Ping timeout: 244 seconds]
tfb has quit []
tyson2 has quit [Ping timeout: 245 seconds]
trokotech has joined #commonlisp
waleee has joined #commonlisp
ceblan has joined #commonlisp
mindCrime has joined #commonlisp
cage has quit [Remote host closed the connection]
silasfox has quit [Ping timeout: 272 seconds]
<mrcom> phoe: Well, uninterning a symbol neither GCs it nor removes the value of its name from the symbol, so it should be recoverable.
<mrcom> phoe: (defvar x :foobax) (unintern :foobax :keyword) (symbol-name x) ;; => "FOOBAX"
tyson2 has joined #commonlisp
srji has joined #commonlisp
srji has quit [Remote host closed the connection]
actinium has quit [Remote host closed the connection]
Lord_of_Life has quit [Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine]
<mrcom> If the implementation's FUNCTION-LAMBDA-EXPRESSION returns non-nil then the name should be visible.
Lord_of_Life has joined #commonlisp
<mrcom> phoe: sbcl: (defun blek (&key :begone-keyword) t) (unintern :begone-keyword :keyword) (function-lambda-expression (fdefinition 'blek)) ;; => (LAMBDA (&KEY BEGONE-KEYWORD) (BLOCK BLEK T))
<mrcom> CCL returns nil for the lambda, so it doesn't work there.
<mrcom> If it's a method, there's FUNCTION-KEYWORDS.
pve has quit [Ping timeout: 245 seconds]
<mrcom> I can't figure out a portable-ish way to pull the actual now-uninterned symbol, though, to re-intern it with IMPORT. You'd have to save a direct reference to it before uninterning.
mindCrime has quit [Ping timeout: 264 seconds]
karlosz has joined #commonlisp
pve has joined #commonlisp
jemoka has quit [Ping timeout: 264 seconds]
<mrcom> phoe: Oh this is cute--SBCL reinterns keywords returned by FUNCTION-KEYWORDS.
<mrcom> (defmethod blurg ((x fixnum) &key expunged-kw) t)
<mrcom> (function-keywords (find-method #'blurg nil '(fixnum))) ;; => (:EXPUNGED-KW) NIL
<mrcom> (find-symbol "EXPUNGED-KW" :keyword) ;; => :EXPUNGED-KW :EXTERNAL
<mrcom> (unintern :expunged-kw :keyword) ;; => T
<mrcom> (find-symbol "EXPUNGED-KW" :keyword) ;; => NIL NIL
<mrcom> (function-keywords (find-method #'blurg nil '(fixnum))) ;; => (:EXPUNGED-KW) NIL
<mrcom> (find-symbol "EXPUNGED-KW" :keyword) ;; => :EXPUNGED-KW :EXTERNAL
<mrcom> (sorry, block post turned out a little long)
pve has quit [Quit: leaving]
<mrcom> CCL doesn't re-intern them.
neirac has quit [Ping timeout: 268 seconds]
raeda has joined #commonlisp
bilegeek has joined #commonlisp
rgherdt has quit [Ping timeout: 265 seconds]
yewscion has joined #commonlisp
<phoe> :O
<phoe> CL:FUNCTION-KEYWORDS exists! oh goodness
<mrcom> But only for methods.
<phoe> yes
* mrcom wonders about the backstory around why it's not METHOD-KEYWORDS...
Oladon has joined #commonlisp
neirac has joined #commonlisp
frgo has quit [Remote host closed the connection]
frgo has joined #commonlisp
<mrcom> SBCL is re-interning incorrectly. It's doing the equiv of (INTERN (SYMBOL-NAME ...)), not import. So it's creating a new symbol, which doesn't match the one stored in the method.
waleee has quit [Ping timeout: 244 seconds]
nature has quit [Quit: Lost terminal]
rgherdt has joined #commonlisp
Josh_2 has quit [Remote host closed the connection]
<mrcom> On second thought, IMPORTing would be arbitrarily voiding an UNINTERN, which would be worse.
waleee has joined #commonlisp
<phoe> oh well - basically, it's a bad idea
<mrcom> Playing games with UNINTERN?
<phoe> and keywords
<mrcom> Yeah. It does allow you to define %MY-PRIVATE-KEYWORD-CLIENTS-SHOULDNT-USE.
<mrcom> Just unintern it after all your private usages have been compiled.
<phoe> I mean, you can already do that without uninterning stuff
<phoe> as long as you are fine with (foo bar::%my-private-keyword 42)
<phoe> otherwise you can unintern sure thing
<phoe> I mean (foo 'bar::%my-private-keyword 42)
<phoe> time to sleep!
<mrcom> Actually, that doesn't look like it works for methods.
<phoe> it should
<phoe> (defmethod foo (&key ((bar::%my-private-keyword bar::%my-private-keyword))) ...)
<mrcom> DEFMETHOD on SBCL (and CCL) coerces it to KEYWORD space.
<mrcom> s/and CCL/and CCL?/
<phoe> no it doesn't
<phoe> (defmethod foo (&key ((bar bar))) bar) and then (foo 'bar 42)
<mrcom> Let me doublecheck what I did...
<phoe> but anyway! sleep time
<mrcom> Night!
blihp has joined #commonlisp
rgherdt has quit [Ping timeout: 264 seconds]
akoana has joined #commonlisp
trocado has joined #commonlisp
mindCrime has joined #commonlisp