p_l changed the topic of #lisp to: Common Lisp, the #1=(programmable . #1#) programming language | <https://irclog.tymoon.eu/freenode/%23lisp> <https://irclog.whitequark.org/lisp> <http://ccl.clozure.com/irc-logs/lisp/> | ASDF 3.3.4
<luis> Fare: the eval-when doesn't seem to affect this issue, right?
<Fare> indirectly: right now, all forms are in a same eval-when from with-upgradability
<Fare> But we could conceivably put them each in their own eval-when
<luis> but that's not a problem for find-definition. defclass and defmethod, it's when the macro discards the defun cons and replaces it with a new defun* cons that we get into trouble
<luis> so if defun* actually accepted the defun form as input and included it in the expansion that'd work
<Fare> well, it will still do it, but this the toplevel read form will have only one thing in it, no problem.
<Fare> there are historical reasons why the forms are grouped in a common eval-when, but I don't think there is any current constraint why they must remain so.
<luis> again, then eval-when is irrelevant!
<Fare> no it isn't
<Fare> if the forms are separate, then no matter how confused SBCL is about the macroexpansion, it will remember the position of the toplevel form, which will happen to be the location you need.
<Fare> it's the grouping that's an issue, not the eval-when as such. You could have individual eval-whens.
<luis> ok, I see what you mean now. Still, find-definition would still point at with-upgradability instead of defun. It'd be a little bit less wrong, but still wrong.
<luis> Well, a lot less wrong for large with-upgradability forms.
<luis> Anyway, I have a fix that doesn't involve mutation!
<luis> Or going through ASDF's source code and change all with-upgradability forms.
<Fare> well, we'd have a defun* which would include its own eval-when.
<Fare> luis: yay
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
<solrize> does anyone know if there's a way to increase the max allowed recursion depth in clisp ?
zaquest has quit [Quit: Leaving]
<dlowe> solrize: look for something referencing clisp's call stack
<solrize> yeah i spent a while looking, will keep looking but haven't found anything yet
<luis> Fare: annoyingly, now find-definition also finds the declaim notinline
<solrize> dlowe, hmm that's the process stack, i'll try that but i didn't think that was the issue
<solrize> thanks
pjb has quit [Ping timeout: 265 seconds]
zaquest has joined #lisp
samlamamma has quit [Ping timeout: 256 seconds]
<Fare> luis: two thumbs up!
<Fare> These days I'd don't push code to master or merge things anymore (though I occasionally still push documentation tweaks), so you'll have to wait for rpg to press the button.
<Fare> But, excellent work.
<Fare> "do more by doing less"
quazimodo has quit [Ping timeout: 256 seconds]
rpg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quazimodo has joined #lisp
pjb has joined #lisp
bitmapper has quit [Ping timeout: 246 seconds]
jonatack has quit [Ping timeout: 264 seconds]
jonatack has joined #lisp
abhixec has quit [Quit: leaving]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
SGASAU has joined #lisp
Kundry_Wag has joined #lisp
jason_m has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
v88m has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
abhixec has joined #lisp
mwgkgk has joined #lisp
monok has joined #lisp
mono has quit [Ping timeout: 260 seconds]
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
ralt has quit [Quit: Connection closed for inactivity]
lemoinem has quit [Ping timeout: 256 seconds]
turona has quit [Ping timeout: 272 seconds]
lemoinem has joined #lisp
wsinatra has quit [Quit: WeeChat 2.8]
Kundry_Wag has joined #lisp
Kundry_Wag has quit [Ping timeout: 246 seconds]
<beach> Good morning everyone!
<holycow> o/
yankM has quit [Remote host closed the connection]
gko has joined #lisp
shangul has joined #lisp
jason_m has quit [Ping timeout: 272 seconds]
madmonkey has quit [Ping timeout: 265 seconds]
_jrjsmrtn has joined #lisp
wxie has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 260 seconds]
zooey has quit [Remote host closed the connection]
zooey has joined #lisp
Fare has quit [Ping timeout: 260 seconds]
Fare has joined #lisp
Inoperable has joined #lisp
Bike has quit [Quit: leaving]
karlosz has quit [Quit: karlosz]
mwgkgk has quit [Quit: Connection closed for inactivity]
luckless has quit [Remote host closed the connection]
karlosz has joined #lisp
luckless has joined #lisp
wxie has quit [Ping timeout: 260 seconds]
doesthiswork has quit [Ping timeout: 256 seconds]
fluxwave has joined #lisp
narimiran has joined #lisp
shangul has quit [Ping timeout: 272 seconds]
dddddd has quit [Ping timeout: 264 seconds]
oldtopman has quit [Quit: *pouf*]
oldtopman has joined #lisp
nullniverse has joined #lisp
nullniverse has quit [Changing host]
nullniverse has joined #lisp
mwgkgk has joined #lisp
orivej has joined #lisp
sdumi has quit [Ping timeout: 240 seconds]
akoana has quit [Quit: leaving]
zulu-inuoe has quit [Read error: Connection reset by peer]
sauvin has joined #lisp
heisig has joined #lisp
Necktwi_ has quit [Ping timeout: 246 seconds]
bilegeek has joined #lisp
bilegeek has quit [Client Quit]
sdumi has joined #lisp
Necktwi has joined #lisp
sdumi has quit [Ping timeout: 265 seconds]
sdumi has joined #lisp
PuercoPope has joined #lisp
sdumi has quit [Ping timeout: 260 seconds]
Necktwi has quit [Ping timeout: 265 seconds]
sdumi has joined #lisp
sdumi has quit [Ping timeout: 258 seconds]
luckless has quit [Remote host closed the connection]
sdumi has joined #lisp
quazimodo has quit [Ping timeout: 265 seconds]
quazimodo has joined #lisp
sdumi has quit [Ping timeout: 240 seconds]
kpoeck has joined #lisp
<phoe> morniiiing
<beach> Hello phoe.
<no-defun-allowed> Morning phoe.
sdumi has joined #lisp
froggey has quit [Ping timeout: 246 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
pve has joined #lisp
orivej has joined #lisp
ralt has joined #lisp
froggey has joined #lisp
<phoe> I go to sleep and nice discussions happen
* phoe read-evals the backlog
sdumi has quit [Ping timeout: 265 seconds]
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
sdumi has joined #lisp
shka_ has joined #lisp
refpga has quit [Ping timeout: 258 seconds]
sugarwren has joined #lisp
refpga has joined #lisp
sdumi has quit [Ping timeout: 256 seconds]
sdumi has joined #lisp
toorevitimirp has joined #lisp
rgherdt has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
sdumi has quit [Read error: Connection reset by peer]
sdumi has joined #lisp
pjb has quit [Ping timeout: 272 seconds]
terpri has quit [Remote host closed the connection]
Willi-Smith has joined #lisp
terpri has joined #lisp
<Willi-Smith> Hi, can somebody explain me error "The function SB-EXT:DISABLE-PACKAGE-LOCKS is undefined." when I'm trying "(ql:quickload :ltk)". Run by cl-launch. Thanks.
<beach> The function is simply not defined. Perhaps it was at some point.
<phoe> Willi-Smith: which SBCL version are you using and which Quicklisp dist do you have?
<phoe> sb-ext:disable-package-locks is a SBCL-specific declaration, not a function, so using it as a function is invalid anyway
<Willi-Smith> I'm very beginner in lisp and this is my first project with GUI. I need some lightweight environment so I chose cl-launch with sbcl (on arch linux). For run project I use 'cl -Q --source-registry /home/william/.local/share/common-lisp/source: "%f"'. In source folder is unpacked ltk. I guess I'm wrong with my approach.
<Willi-Smith> I also tried to '(asdf:load-system 'ltk)' but error is the same
<phoe> Willi-Smith: what is your SBCL version and where did you get LTK from?
toorevitimirp has quit [Remote host closed the connection]
<ralt> phoe: tldr: with-upgradeability now works with slime-edit-definition
narimiran has quit [Ping timeout: 256 seconds]
<phoe> ralt: I saw, amazing stuff
<no-defun-allowed> Huh, the symbol sb-ext:disable-package-locks is present here but not fbound.
<phoe> no-defun-allowed: do DESCRIBE on it, it's a declaration
toorevitimirp has joined #lisp
<no-defun-allowed> I suppose it is; I thought it was once a function, and I think the ltk author must have too.
<no-defun-allowed> Though ltk loads fine here.
remix2000 has joined #lisp
<ralt> His error looks like something intentionally disabled the function
<Willi-Smith> LTK is downloaded from: http://www.peter-herth.de/ltk/, I expect cl-launch uses system sbcl which is sbcl-2.0.3-1
dale has quit [Quit: My computer has gone to sleep]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
orivej_ has joined #lisp
<pve> Willi-Smith: I seem to recall that it used to be a function in older versions of SBCL
<phoe> it might be incompatible with newer LTK versions then
<phoe> https://github.com/herth/ltk is where Quicklisp pulls its versions from, so it should work on SBCL 2.0.3
<Willi-Smith> Well, what must be done to run ltk with cl-launch?
<phoe> update LTK
<phoe> the version I linked is the fresh one
pjb has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
SGASAU has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
SGASAU has joined #lisp
<LdBeth> It’s interesting to know that CL doesn’t have PRIN2
emys has joined #lisp
ym has joined #lisp
<Willi-Smith> Now I can quickload it without error. Last thing is how can I start using ltk package? After I test (ltk::ltk-eyes) this error shows 'READ error during COMPILE-FILE: Package LTK does not exist.'
<ym> Hi. I have a simple expression: (mod (apply #'+ angles) (* 2 pi)) ; it returns value > 2pi in some cases. Is it rounding problem?
Kundry_Wag has quit [Ping timeout: 265 seconds]
<phoe> ym: could you give an example?
<phoe> Willi-Smith: wait a second
<Willi-Smith> Do I need to create .asd system file for my project or can I only quickload ltk in my .lisp file?
<phoe> after quickloading it, you should be able to have a LTK package
terpri has quit [Remote host closed the connection]
<phoe> what programming environment do you use for lisp?
<White_Flame> regardless of how it's loaded (and completely regardless of how your other stuff loads), once LTK is in the package should exist
<White_Flame> since packages are a flat global namespace
<phoe> fe[nl]ix: <3
<fe[nl]ix> phoe: I statically linked it to libfixposix (git), libcrypto and libssl 1.1.1g, upgraded ASDF to 3.3.4
<fe[nl]ix> and it's linked against glibc 2.26 so it runs on Travis
<phoe> does it mean that CFFI is automatically instructed not to look for these libraries externally?
Josh_2 has quit [Ping timeout: 256 seconds]
<fe[nl]ix> I need to think about how to add that feature
<phoe> I never really thought of that since I'm not used to statically link Lisp binaries
<phoe> s/link/linking/
<Willi-Smith> This simple .lisp example gives me error "(ql:quickload :ltk) (ltk::ltk-eyes)" > Package LTK does not exist.
<fe[nl]ix> phoe: that said, you can simply comment out the loading in the respective sources (cl+ssl or iolib) if you want to play with it
<phoe> Willi-Smith: what programming environment do you use for lisp?
<phoe> fe[nl]ix: OK, I'll do that
<phoe> Willi-Smith: how do you launch your example?
<Willi-Smith> cl-launch > https://www.cliki.net/cl-launch
<beach> ym: Also, what implementation are you using?
<phoe> beach: SBCL 2.0.3
<phoe> oh wait! wrong person
<phoe> that's what Willi-Smith uses
<Willi-Smith> That is right
Bourne has joined #lisp
<phoe> Willi-Smith: I have no idea what cl-launch does nor I have ever used it in my life; I'm a SLIME user
<phoe> it seems to be 2700 lines of bash code
<phoe> nothing I'd like to use if I was beginning to learn, especially if I wanted to use the interactive facilities that Lisp provides
<pve> Willi-Smith: are you loading or compiling your example?
<Willi-Smith> I chose it because I can simply run lisp from bash. It works well but Im confused about package importing. It has bad documentation.
kpoeck has quit [Ping timeout: 245 seconds]
<Willi-Smith> I plan to use lisp for only small projects. i don't need interactivity
<no-defun-allowed> I would advise against running Lisp like a "batch" compiler, as using it interactively will make you much more productive and make programming easier.
<phoe> running Lisp from bash is not the typical workflow one uses when doing Lisp stuff
<phoe> so you might find little support for it - there's few people who do it that way and therefore few people who can advise you with that programming style
<no-defun-allowed> Willi-Smith: Trust me that you would benefit from interactivity, unless you are able to reason about your entire program without needing to consult a computer.
<no-defun-allowed> And even then, you would work faster with interactive tooling; there isn't a reason not to want interactivity.
<Willi-Smith> I tried atom with slime but it wasn't so straightforward as this simple bash launcher. I've never worked with emac. Do you recommend me to give it a try?
<phoe> Yes
<phoe> Very yes
<White_Flame> emacs+slime is the best supported environment for working with Lisp, both the repl .lisp and files, and their interaction
<White_Flame> *repl and .lisp files
<phoe> The idea behind Lisp is that you never really kill or close the Lisp program while you're programming. You instead send commands to the Lisp program that define functions, variables, modify things, or just cause some stuff to happen like (print "hello world")
<White_Flame> there's a quicklisp-slime-helper to get evertyhing set up for you, too
<phoe> that's the concept of image-based programming
<phoe> White_Flame: or even https://portacle.github.io/
<White_Flame> yep
<phoe> a ready-to-go emacs+sbcl+quicklisp+git distribution
<ralt> I really want to combine image based programming with something like popcornlinux
<ralt> For production deployment
<phoe> ralt: there was an ELS presentation this year that did that in Scheme
<White_Flame> the "image" is named as such because it was an OS anyway
<White_Flame> eg, an image of the entire machine, like a VM snapshot
<phoe> nothing for CL though
<ym> phoe, beach, I'm sorry, never mind, my fault.
jeosol has joined #lisp
<ralt> phoe: popcornlinux with scheme running in it?
<phoe> ym: rubber-duck programming strikes again!
<Willi-Smith> Shall I go with this emac how to https://lispcookbook.github.io/cl-cookbook/emacs-ide.html ?
<phoe> ralt: nope - the possibility to transfer running code from one Scheme image to another fully at run-time, stack and continuation and everything.
<phoe> Willi-Smith: yes, the Cookbook is a good source for that
<Willi-Smith> Thanks for advices, lets dive in it
<phoe> however, you might want to try out Portacle first
<phoe> it saves you a step from manually setting many emacs things first
<ralt> Ah, I meant more the concept of having a process that never dies, ala what used to run on mainframes, so that you can take full advantage of instance upgrades and stuff, but abstracted away by the kernel to trust it to run forever
<phoe> such as configuring slime et cetera
<phoe> ralt: oh! yes, I see, that's basically a lisp os
<ralt> popcornlinux.org is basically that, it's a distributed Linux kernel
<ralt> So your single process ends up spanning over several physical machines
rogersm has joined #lisp
rogersm has quit [Remote host closed the connection]
<Willi-Smith> Portacle sounds very nice for my purpose
holycow has quit [Quit: leaving]
<White_Flame> yep, if you've not used emacs before, it's probaly the easiest way to get it up and running with everything
refpga has quit [Ping timeout: 272 seconds]
<ralt> One thing I really like with this concept is that you no longer need a database, you can store everything in defvar or whatever, and that's effectively persistent
sdumi has quit [Ping timeout: 246 seconds]
<White_Flame> unless you want transactions
sdumi has joined #lisp
<ralt> Use temporary variables or locks or whatever, it's manageable
<phoe> that's the problem solved by distributed databases
<ralt> I would argue most people don't understand how transactions work anyway, so you're making it easier to understand
<no-defun-allowed> Can I pitch cl-worlds here for in-memory "transactional" instances?
<ralt> phoe: you would indeed need some sort of engine
<phoe> no-defun-allowed: yes please
<no-defun-allowed> cl-worlds is an implementation of the "worlds" concept proposed by Warth, Ohshima, Kaehler and Kay for "controlling the scope of side effects".
<no-defun-allowed> The basic idea is that one can "sprout" a world from the current world, perform some changes in the world, and then commit those in an atomic manner, after checking that no slots that the computation has read have been changed. Oh, and it lives at https://gitlab.com/Theemacsshibe/cl-worlds or https://github.com/nodefunallowed/cl-worlds
<solrize> do most ppl here use slime? do you have it set up so that it launches an inferior lisp as soon as you visit any .lisp file?
<no-defun-allowed> In some ways, I think that acts like transactions do in databases.
<no-defun-allowed> solrize: Yes and no, respectively.
<heisig> solrize: Yes and yes.
<ralt> no-defun-allowed: does it have to copy the whole object?
<solrize> thanks, i got the autolaunch code from someone here and it freaked me out at first, but i see some point to it. other thing i notice is i have to restart slime a lot when the inferior lisp resets... is that an issue for you? i had never used slime before quite recently
<phoe> solrize: yes and no, I launch slime manually at the start of my emacs session if I am going to work with lisp stuff
<phoe> fe[nl]ix: !
<fe[nl]ix> phoe: with that you can load cl+ssl with no modifications
<no-defun-allowed> I use a custom metaclass that stores (changed) object slots in a hash table in the current world, so no.
<phoe> fe[nl]ix: nice! I'll test it in a moment
<solrize> thanks all
jprajzne has joined #lisp
<no-defun-allowed> That might make accessing slots somewhat slower, especially if one is accessing a slot bound many parent worlds away for the first time. (After that, however, it'll be cached in the current world.)
<no-defun-allowed> ralt: I would suggest skimming http://www.vpri.org/pdf/tr2011001_final_worlds.pdf for the space and time properties of worlds; my implementation is a rough translation of the algorithms in section 5.
<ralt> no-defun-allowed: thanks, I actually did something similar for work, except I did a copy of the top-level container and used immutable objects inside
<ralt> It effectively means a cheapish clone operation at first and then basically zero overhead
<ralt> Nevermind, I'd need to track changes to implement parallel transactions
jonatack has quit [Ping timeout: 256 seconds]
jonatack has joined #lisp
Lord_of_Life_ has joined #lisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
<phoe> hmmmm
<phoe> now I know what is the purpose of these 272 files that I removed from the repository
* phoe takes a step back
refpga has joined #lisp
jprajzne has quit [Quit: jprajzne]
Willi-Smith has quit [Quit: Leaving]
jprajzne has joined #lisp
pjb has quit [Ping timeout: 240 seconds]
<phoe> 24k lines of Lisp code... hmmmm
<phoe> that's a very nontrivial system
<phoe> so nontrivial that it has a 240-pages-long book written about it
<jackdaniel> so context-lacking...
<no-defun-allowed> phoe: (compute-what-youre-doing)
orivej has joined #lisp
orivej_ has quit [Ping timeout: 256 seconds]
<shka_> hello all
<phoe> Lucid Common Lisp/SPARC 4.0.2...
<phoe> shka_: hello
<shka_> another stylistic question
pve has quit [Ping timeout: 264 seconds]
<shka_> check-type establishes restart allowing user to change type
<phoe> change *type*?
<phoe> clhs check-type
<shka_> well, read new object
<shka_> with a new type, hopefully
<phoe> nope, it establishes a restart allowing user to set the place with a new value and retry the assertion
<phoe> the type designator that is passed as the second argument to CHECK-TYPE stays constant
<shka_> god
<jackdaniel> so what's the question?
<shka_> well, my issue here is that when check-type is used in the top level function, it is obviously very useful and restart helps
<shka_> however, when used in a inner function, restart becomes misleading, because value was passed from the above, and therefore error was made before calling the inner function
<jackdaniel> if you just want error (w/o restart) use unless typep error or use assert typep
<shka_> well, that's obvious solution, but my question is do i want error without restart
<phoe> yes, if you do (defun foo (x) (check-type x ...) ...) then the restart stores the value in the variable X
<phoe> I have encountered this before
<shka_> or i simply shouldn't bother
<jackdaniel> if sysrem is interactive it is desireable
<jackdaniel> if it is not, you wrap top call with handler case and dont use debugger at all
<phoe> the STORE-VALUE restart in such context effectively becomes a USE-VALUE one since it only allows the function to be called once; the stored value may then discarded when the function exits and the local variable X goes out of scope
<jackdaniel> so i would not bother
<shka_> jackdaniel: ok, this is exactly what i wanted to know
<shka_> thanks
<jackdaniel> sure
sdumi has quit [Ping timeout: 256 seconds]
<phoe> using CHECK-TYPE in such contexts becomes more meaningful if you have places that are more persistent, such as (defun foo (x) (check-type (slot-value x 'my-slot) ...) ...) since then the value is *actually* stored and remembered even when the function quits
nowhere_man has quit [Ping timeout: 272 seconds]
<phoe> and, honestly, I don't really know how to work around that limitation in the general case
sdumi has joined #lisp
<shka_> i tend to use :before methods for validating arguments (it happens that i like OO style for interfaces) but i started to consider using :around instead
<shka_> problem is that :before is really better suited toward this
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
<shka_> anyway, "don't bother" works
<phoe> shka_: I really like :before with check-type for argument validation myself
<shka_> well, as one should!
<shka_> but check-type alters binding in the :before method after restart
<phoe> shka_: check-type + slot-value, or check-type + accessor functions
<shka_> and the main method will get original value
<shka_> well, yes
<phoe> oh wait a second...
<shka_> for objects
<phoe> yes, I see the issue now
<shka_> but if you are just checking if the second argument is integer?
<phoe> in initialize-instance :before the slots are not yet bound because shared-initialize was not yet run
<shka_> :after for intialize-instance
<shka_> initialize-instance is not a problem actually
pjb has joined #lisp
<shka_> some other functions are though
<phoe> I found that validation in :after for initialize-instance does not compose well when you have multiple :after methods
<phoe> where the more specific ones depend on the values of slots validated in the less specific ones
<phoe> that makes the restarts established by CHECK-TYPE meaningless
<phoe> hmm
<shka_> oh, ok
<shka_> i can see that
<shka_> well, you can still :around
<phoe> yes, :around looks like the only choice for actually getting that to work
<shka_> not only-only
<shka_> i mean, you are often ending up with (defgeneric make-a-very-specific-type-of-object ...)
pve has joined #lisp
<shka_> and if so, you can insert validation of initargs into the :before method
<shka_> BUT again, check-type restart is miss-leading in :before methods
<shka_> anyway, thanks for the input
<phoe> yes, that's the issue - the restart is meaningless and does not actually store the value in the object
<phoe> I can imagine that it could be fixed if the variables bound by DEFMETHOD were actually checked at the end of the method and their values were passed to the next called methods; meaning, if a :BEFORE method could alter the values that are passed to next methods
<phoe> that would be as useful as it would be incompatible though
<phoe> portable code may depend on these bindings being fresh and therefore mutate them freely
karlosz has quit [Quit: karlosz]
* phoe adds this issue to the bucket of issues for the Hypothetical Revision of the Standard
karlosz has joined #lisp
karlosz has quit [Client Quit]
pve has quit [Ping timeout: 272 seconds]
pve has joined #lisp
cosimone has joined #lisp
Kundry_Wag has joined #lisp
<shka_> phoe: that's not everything
<shka_> for instance i am writing a small random forest lib
<shka_> uhm, whatever i explained this already
jprajzne has quit [Quit: jprajzne]
Kundry_Wag has quit [Ping timeout: 272 seconds]
cosimone has quit [Quit: Quit.]
<phoe> clhs word
<specbot> Couldn't find anything for word.
jprajzne has joined #lisp
pjb has quit [Ping timeout: 265 seconds]
<ym> Is there some kind of macro extension library implementing typed declarations like for example (let ((foo :type fixnum)) ...)?
<Shinmera> What do you hope that would achieve?
<ralt> ym: a bunch, yes, essentially based on FTYPE
nullniverse has quit [Remote host closed the connection]
nullniverse has joined #lisp
nullniverse has quit [Changing host]
nullniverse has joined #lisp
<ym> I hope it would generate declarations automatically.
<ym> With some sort of CLP magic for derived types.
<Shinmera> Do you really need to declare types that often?
<Shinmera> It's a very uncommon thing to do.
random-nick has joined #lisp
<ym> I know that compilers like SBCL do all the magic inside, but I like to control the process, you know.
<Shinmera> I actually do not know.
<phoe> ahh, weak static typing time
<ym> Lucky you.
<ym> Will try to explain it to my duck.
jprajzne has quit [Quit: jprajzne]
remix2000 has quit [Remote host closed the connection]
jprajzne has joined #lisp
dddddd has joined #lisp
HiRE has joined #lisp
<Xach> ym: I think there are some binding libraries that include type info in the binding. can't think of a specific one offhand though.
ayuce has joined #lisp
kpoeck has joined #lisp
Willi-Smith has joined #lisp
<jackdaniel> Xach: thank you
pjb has joined #lisp
emys has quit [Ping timeout: 260 seconds]
emys has joined #lisp
luni has joined #lisp
shangul has joined #lisp
scymtym_ has joined #lisp
nowhere_man has joined #lisp
scymtym_ has quit [Read error: Connection reset by peer]
scymtym_ has joined #lisp
scymtym has quit [Ping timeout: 240 seconds]
emys has quit [Ping timeout: 260 seconds]
<ralt> I wonder if I should make an asdf extension that generates a Debian package
<ralt> With the C shared libraries dependencies automatically added to the package
scymtym_ has quit [Remote host closed the connection]
<phoe> ralt: Shinmera's DEPLOY is dangerously close to what you are describing
<ralt> Like if you're using cl-sqlite, it'll automatically figure out that it should add the `libsqlite-3-0` package to the "Depends" field of the package
<jackdaniel> is it going to bite ralt? or is it dangerous in some other way?
Bike has joined #lisp
jprajzne has quit [Quit: jprajzne]
<ralt> phoe: no, it's embracing the packages philosophy of declaring C dependencies rather than trying to bundle them all in a single deployed archive and some environment variables setup at startup to make it work
emys has joined #lisp
<ralt> jackdaniel: probably
<jackdaniel> ralt: dim have some experience with producing debian packages from lisp systems
<ralt> I made https://gitlab.com/ralt/deb-packager years ago :)
<ralt> But I'm thinking of something a bit more "magic"
<jackdaniel> afair he produced that from quicklisp dist
<phoe> ralt: I see, so you'll want to actually make some kind of mapping between foreign libraries and debian packages that provide them
<jackdaniel> but I don't know details, it was done so pgloader could be put in debian repositories
<ralt> ... I made this thing years ago too: https://gitlab.com/ralt/qldeb :)
<ralt> phoe: yup
orivej has quit [Ping timeout: 256 seconds]
<ralt> cffi-toolchain is doing half of the job, by providing a binary where grovel libraries are embedded, and the Debian package can provide additional metadata about the system shared libraries that your application is using
orivej_ has joined #lisp
pjb has quit [Ping timeout: 240 seconds]
d4ryus has quit [Quit: WeeChat 2.7.1]
scymtym has joined #lisp
jprajzne has joined #lisp
d4ryus has joined #lisp
<ralt> I mostly need to figure out how to run some code after static-program-op is done
remix2000 has joined #lisp
remix2000 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
srazzaque has joined #lisp
<phoe> doesn't it quit Lisp?
refpga has quit [Ping timeout: 256 seconds]
refpga has joined #lisp
Kundry_Wag has joined #lisp
emys has quit [Ping timeout: 244 seconds]
pjb has joined #lisp
Kundry_Wag has quit [Ping timeout: 265 seconds]
emys has joined #lisp
<ralt> That would make sense. Maybe I can add a subclass to fork/save-lisp-and-die and do the rest afterwards?
<phoe> a subclass, what do you mean?
<ralt> A subclass of cffi-toolchain: static-program-op
<phoe> after save-lisp-and-die finishes, the currently running Lisp image is destroyed - at least in case of SBCL
<phoe> therefore you can count on that function never returning
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<ralt> Yes, that's why I'm saying I can fork, do the slad in the child, and do the rest in the parent
nowhereman has joined #lisp
<phoe> sure, that'll work
nowhere_man has quit [Read error: Connection reset by peer]
emys has quit [Ping timeout: 272 seconds]
<ralt> So my subclass would implement asdf:perform, fork, do (call-next-method) in the child which will slad, and in the parent I wait for the child to die then do the Debian packaging
refpga has quit [Remote host closed the connection]
refpga has joined #lisp
emys has joined #lisp
mibr has joined #lisp
younder has joined #lisp
Kundry_Wag has joined #lisp
shangul has quit [Ping timeout: 265 seconds]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
ym555 has joined #lisp
emys has quit [Ping timeout: 264 seconds]
ym555 has quit [Client Quit]
<phoe> oh, I see why! There is a stray } in the code
jprajzne has quit [Client Quit]
jonatack has quit [Ping timeout: 240 seconds]
emys has joined #lisp
jonatack has joined #lisp
pjb has quit [Ping timeout: 240 seconds]
<phoe> welp, I can't get that code to compile
ayuce has quit [Remote host closed the connection]
igemnace has quit [Quit: WeeChat 2.8]
papachan has quit [Quit: WeeChat 2.7.1]
wsinatra has joined #lisp
nowhereman has quit [Ping timeout: 256 seconds]
emys has quit [Ping timeout: 260 seconds]
nowhereman has joined #lisp
emys has joined #lisp
jprajzne has joined #lisp
Josh_2 has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
X-Scale` has joined #lisp
keepzen has quit [Quit: Connection closed for inactivity]
orivej_ has quit [Ping timeout: 265 seconds]
X-Scale has quit [Ping timeout: 265 seconds]
X-Scale` is now known as X-Scale
orivej has joined #lisp
<phoe> huh
<phoe> this package has everything written in Lisp... save for the lexer, which is written in flex-generated C
<Shinmera> phoe: I wrote a really primitive tex parser at one point
<phoe> Shinmera: please show me
* phoe clicks
emys has quit [Ping timeout: 246 seconds]
<phoe> yep, that both works and is primitive; I'd need to e.g. implement TeX comments in it
<Shinmera> I'm amazed it still works
Kundry_Wag has quit [Ping timeout: 256 seconds]
doesthiswork has joined #lisp
pjb has joined #lisp
wsinatra has quit [Quit: WeeChat 2.8]
Kundry_Wag has joined #lisp
<MichaelRaskin> Hm, interesting, my single-target TeX parser also doesn't have comments
orivej has quit [Ping timeout: 265 seconds]
orivej_ has joined #lisp
luni has quit [Quit: Leaving]
<MichaelRaskin> OK, I do have Comment support now, apparently
<phoe> it seems that pjb's not-compiling code is based on this lex file.
jeosol has quit [Remote host closed the connection]
orivej_ has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
Kundry_Wag has quit [Ping timeout: 264 seconds]
jw4 has quit [Read error: Connection reset by peer]
narimiran has joined #lisp
jw4 has joined #lisp
emys has joined #lisp
nowhereman has quit [Ping timeout: 244 seconds]
pjb has quit [Ping timeout: 240 seconds]
Adamclisi has quit [Quit: leaving]
nowhereman has joined #lisp
shangul has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
remix2000 has joined #lisp
montxero has joined #lisp
orivej has quit [Quit: No Ping reply in 180 seconds.]
emys has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
papachan has joined #lisp
nowhereman has quit [Ping timeout: 240 seconds]
emys has joined #lisp
jeosol has joined #lisp
jprajzne has quit [Quit: jprajzne]
<phoe> Which regex library provides the symbol named SCAN-MATCH-REGEXP? The only occurrences of this symbol on Google and Github are in informatimago code.
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
remix2000_ has joined #lisp
jprajzne has joined #lisp
emys has quit [Ping timeout: 260 seconds]
sdumi has quit [Ping timeout: 260 seconds]
fanta1 has joined #lisp
pjb has joined #lisp
<montxero> How does on structure an appplication similarly to how Emacs is structured? That is tgere is a core, and several applications can be written to extend/complement this core in the same way Emacs packages extend the funtionality of Emacs?
<phantomics> You can separate them into different software packages
<phantomics> Have a "core" package, then write others that depend on its components
<phantomics> Then you can write other packages that depend on the direct dependents of the core, creating a hierarchy
<montxero> phantomics: Is there a simple application written this way I can study? or are there sources for learning about this style of architecture?
camlriot42 has joined #lisp
<phantomics> Then publish a guide to the API for writing addons for various purposes
<phantomics> It's not that simple, but my April language may help you understand: https://github.com/phantomics/april
<phoe> montxero: a Common Lisp implementation is such an application
<phantomics> Inside the repo you'll see a folder called vex, that is the "core"
<phantomics> Vex is a framework for building vector languages
<phoe> where ANSI CL is the core, and other programs build atop that
<phoe> you can also consider various implementation-dependent language extensions to the core, such as sockets, threads, Gray streams, MOP et cetera
<phantomics> The symbols exported in vex/package.lisp are used in the april package
<montxero> phantomics: thanks, checking april now
<montxero> phoe: I get this in principle, I just don't know how to start.
<phantomics> April is actually designed in such a way that you can extend the language, if you look at spec.lisp you'll see it contains a specification for the entire language, and then at the bottom of spec.lisp there's a small commented section where the spec is extended by creating another function in the language
emys has joined #lisp
<phantomics> These extensions could be done in software packages that depend on the april package, that's an example of a plugin-supporting system
jprajzne has quit [Quit: jprajzne]
<beach> montxero: I tend to split an application into "modules", where each "module" is located in a particular Unix directory, has its own ASDF system definition file, and has one or more package definitions (in the packages.lisp file) that are specific to that module.
emys has quit [Ping timeout: 260 seconds]
sdumi has joined #lisp
<beach> montxero: Then, you can have one "core" module and use the :DEPENDS-ON clause in ASDF:DEFSYSTEM so that your other modules depend on the core module or any other module for that matter.
<montxero> beach: I think I get the general idea...
<beach> montxero: Do you use ASDF in general?
<montxero> Yes, but I am still a novice
<montxero> in Lisp
<beach> I see.
<phantomics> Understanding ASDF is the first thing, looking as .asd files will help you understand
<phantomics> *looking at
<beach> montxero: Then you won't have the "application structure" problem for some time.
toorevitimirp has joined #lisp
<phantomics> Unfortunately, the ASDF manual is rather dry: https://www.common-lisp.net/project/asdf/asdf.html
remix2000 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phantomics> I learned by messing around with ASDF, studying the existing .asd files and referring to the manual to clarify things
<montxero> I want write an application to manage references and citations (like Jabref) but also research sources as well
bitmapper has joined #lisp
<beach> montxero: If you expose your code here (or in #clschool if the stuff is really trivial), then you will likely get remarks on it.
emys has joined #lisp
<montxero> The idea is to have a core application, then build the reference manager, document reader, document retriver, etc separately
orivej_ has joined #lisp
<beach> So what would the core contain?
<montxero> Such that the overall program can be grown in a modular fashion.
jprajzne has joined #lisp
<phantomics> What would you say is the core data model in this program?
<montxero> beach: still figuring that out
<beach> Ah.
<phantomics> Is everything build around the concept of a "paper", and you then build a graph connecting papers and sources, etc.?
<pjb> phoe: it's not even stray, since it's prefixed by #\ !
orivej has quit [Ping timeout: 256 seconds]
<phoe> pjb: what do you mean, stray - I lost context
<pjb> phoe: ah, no. It's in the middle of parentheses…
<phoe> oh! yes, it's like )))}))
<montxero> phantomics: Not exactly, I want to manage my research resources better.. rather than have several directories holding different papers, I want to have all of them in a single location
<montxero> I also want a bibliography manager that handles different kinds of sorces correctly.
toorevitimirp has quit [Ping timeout: 246 seconds]
<montxero> I want it to ensure conference papers have all the requisite fields including location (especially the conference location).
<montxero> I want it to perform sanity checks on every bib entry to make sure they are all in order.
<phantomics> I see, that's the goal but it's important to figure out the data model that will support that goal. It sounds like "paper" and "source" will be some of the major object types.
<phantomics> This is a pretty big project to get started with, you may want to try for a smaller proof of concept and then evolve it
<phoe> pjb: plus the main body doesn't compile due to some nested backquote issues; I've tried to work around that and fix it up a bit but I hard-crashed at the regex function.
emys has quit [Ping timeout: 240 seconds]
<phantomics> When you're starting out it's best to do something small, because it takes a good deal of trial and error to learn the right ways to architect things, that way you won't be overwhelmed
<montxero> One of the main things I want is the concept of a document. Since sources may be books as well.
<montxero> One of the main components is a library manager.
<phantomics> Right, "document" would be the root class, then "paper" and "book" and so on would descend from it. A "library" containing multiple documents could be another object
jprajzne has quit [Quit: jprajzne]
<montxero> The libray is a database of documents. Documents will have tags associated with them.
<pjb> phoe: correction pushed.
<phantomics> Sounds pretty straightforward, have you worked with CLOS much yet?
<montxero> phantomics: the library is more pressing to me than the citation stuff
<montxero> phantomics: No, not yet.
<montxero> I'm working my way through on lisp now.
<phantomics> That's what you'll want to use for this, you could practice creating classes for "library" and "document," then making subclasses of document, then writing some methods to ask questions about documents
<montxero> phantomics: can you suggest good resources for getting started with CLOS?
<phantomics> It's a good book, Paul Graham doesn't like doing anything object-oriented, you could adopt his approach but I like using objects when I feel it makes sense
<beach> minion: Please tell montxero about PCL.
<minion> montxero: please look at PCL: pcl-book: "Practical Common Lisp", an introduction to Common Lisp by Peter Seibel, available at http://www.gigamonkeys.com/book/ and in dead-tree form from Apress (as of 11 April 2005).
<phantomics> Some devs I think go overboard making everything object-oriented
dddddd has quit [Remote host closed the connection]
<phantomics> Seconded, the Gigamonkeys book is the best place to start
emys has joined #lisp
<montxero> Thanks guys
<montxero> On to PCL
<beach> Good luck!
<phantomics> This is the chapter that starts covering CLOS: http://www.gigamonkeys.com/book/object-reorientation-generic-functions.html
<phantomics> The next chapter covers classes
<pjb> phoe: in any case, it's not in working order yet.
<pjb> phoe: some functions are not implemented yet.
<phoe> pjb: correct; my biggest question is which regex library you've used, since I have searched a few I know and none provided the regex function that you---
<phoe> oh! it's not done yet, I see.
<pjb> phoe: we could hook in cl-ppcre.
<pjb> Yeah, it would be nice, before I die, that I make a big code review, and finish all open projects… Some play chess with Death, some leave open projects…
emys has quit [Ping timeout: 256 seconds]
jprajzne has joined #lisp
rogersm has joined #lisp
FreeBirdLjj has joined #lisp
emys has joined #lisp
<phoe> pjb: I'll fix up a few more things in that code
<srazzaque> phantomics: re "PG doesn't like doing anything OO" - mind elaborating? CLOS sounds like a natural fit for the doc/paper/book, would PG just prefer lists? structs?
<phoe> pjb: I
<phoe> I'm down to five style warnings in https://plaster.tymoon.eu/view/1835#1835
orivej_ has quit [Ping timeout: 240 seconds]
<srazzaque> (I haven't read On Lisp, have only read PCL)
<beach> srazzaque: It is just a fact that Paul Graham doesn't like object-oriented programming, at least not using CLOS.
theseb has joined #lisp
orivej has joined #lisp
<beach> srazzaque: On Lisp is about the use of the Common Lisp macro system for very advanced purposes, including so called embedded languages.
<phoe> pjb: annnnnd four, please refresh that page.
<pjb> srazzaque: my interpretation is that some people don't get OO so they deam OO bad and avoid it.
<beach> srazzaque: It is not about general application programming.
<theseb> Do other languages like Python have anything like the "let" form? In Python you just set variables to whatever values you want....Why don't they have a need to set them for a special block like with let?
<pjb> phoe: you want me to patch from this? Didn't you do a clone and PR?
<phoe> pjb: I'll do a clone and PR in a second.
<pjb> ok
<beach> theseb: Even C has the equivalent of LET: { int x; ...}
<beach> theseb: I don't know Python enough, but there must be a nested block construct. No?
<phantomics> I appreciate Graham's perspective more than the Java-style trend of making everything OO
<theseb> beach: well in Python like C you don't generally create naked blocks...rather
<theseb> beach: blocks just turn up for example when creating while and for loops
<theseb> beach: or if statements, etc.
<beach> theseb: I use blocks all the time in C (when I use C) just to limit scope.
<theseb> beach: on the other hand, lisp's let form just seems to make a block "just for fun"
<beach> theseb: Everyone should, or they are just bad programmers.
<phantomics> But I see OO as being useful for things that fit the model, like the library/document/tag concept
<beach> theseb: It has nothing to do with fun. It has to do with limiting scope and naming things.
<theseb> beach: you may be able to do { int x; ..... } without anything in front of the left { in C but I've rarely seen it
emys has quit [Ping timeout: 256 seconds]
<beach> theseb: Then you are looking at bad code.
<beach> Not that I am surprised that there is a lot of bad C code out there.
<phantomics> Are { } blocks in C lexically scoped?
<beach> Yes.
<pjb> Only, since {} in C is a statement, you cannot use it in expressions: (+ (let ((a 42)) (* a a)) (let ((b 33)) (* b b))) #| --> 2853 |#
<beach> pjb: Very true.
<beach> theseb: A block should be created whenever you need a temporary computation that is needed only for the next few statements.
<pjb> on the other hand, in C you can use (e1,e2,…,en) ; but you cannot put statements in the expressions. And you need to remember switching the syntax { ; } -> ( , ).
shangul has quit [Ping timeout: 264 seconds]
<Bike> could you introduce blocks like that in early C? I know until C99 things like if and while didn't actually introduce a new scope
<beach> theseb: {int x = a + b; f(x); g(x);} for instance.
<pjb> Bike: yes, it's early syntax.
<theseb> beach: if I need to encapsulate some code in C or Python or ....i usually squirrel it away in a separate *function*
<pjb> Bike: note that the syntax for if is: if ( expression ) statement [ else statement ]
<Bike> but then you can't access variables from the outer scope.
<pjb> Bike: no bracket here.
<pjb> Bike: that's the point.
<phoe> pjb: PR'd.
<pjb> phoe: good.
<pjb> phoe: github or githlab?
emys has joined #lisp
<beach> theseb: There is really not a big difference between the use of LET in Common Lisp and {} in C, other than what pjb is pointing out.
orivej has quit [Ping timeout: 246 seconds]
<phoe> pjb: github
<theseb> ah ok
orivej has joined #lisp
<beach> theseb: Both introduced a lexically nested "block", and as Bike says, you can access variables from outside the "block".
<beach> theseb: So if you would introduce a separate function in C, you would probably do the same in Common Lisp. That's worthwhile when there is a natural name to the chunk of code.
<beach> theseb: Though, I used to have several students who avoided nested blocks in C, because they thought that "the variables had to be created every time the block is entered, so it is slow", which just shows their total lack of knowledge of compiler design.
<srazzaque> beach: makes sense - I perhaps should have said ANSI Common Lisp, not On Lisp.
<theseb> beach: actually that brings up another point....if let didn't exist...you could get similar encapsulation by using a lambda function...the only difference would be that you could not access the vars outside the snippet as you said!
<pjb> phoe: merged.
<beach> srazzaque: Yes, that one is notorious for avoiding classes and generic functions.
<Bike> you could, because closures exist
<theseb> beach: you're a teacher? nice
<beach> theseb: LET is basically syntactic sugar for LAMBDA, and you can definitely access variables in outer scopes.
<Bike> this should be covered in whatever text you're using to learn lisp and its implementation
<pjb> phoe: thanks for the PR!
<theseb> beach: i teach physics at a university for what its worth ;)
<beach> theseb: (let ((x <x>) (y <y>)) <body>) is basically ((lambda (x y) <body>) <x> <y>)
<beach> theseb: Great!
<beach> theseb: And <body> can refer to variables outside the scope of the LET or LAMBDA.
<theseb> beach: i could blow you away with my physics knowledge...with my PLT not so much ;)
<phoe> pjb: no problem. I'll send in another one when I figure more things out.
<beach> theseb: Such variables are called "free" with respect to a particular block.
<theseb> yes
<pjb> ok
<phoe> pjb: my main question is your use of SCAN-MATCH-REGEXP with a stream variable; doesn't the stream get used up when one reads from it?
<beach> theseb: Perhaps the C programs you have seen were written by colleagues?
<phoe> Like, we have multiple RULE forms in there. Won't each of them execute SCAN-MATCH-REGEXP that might possibly remove characters from the stream?
<beach> theseb: Scientists often overestimate their ability to write good code. To the extent that some of them don't even think of software development or computer science as valid disciplines.
<theseb> beach: yes scientists often have poor software engineering skills..i can vouch for that
<theseb> beach: i've spent decades trying to rectify that in myself at lest
<theseb> least
<beach> Excellent!
<Josh_2> There was a very good example of what you are saying beach in practice here in the UK government following advice based off of very poorly written models
<Josh_2> academics wrote the code, not software engineers ¯\_(ツ)_/¯
<theseb> beach: since you're a teacher...maybe you can appreciate these fuzzy ideas I've had in my head ....I want to bring software to physics education...I'm thought of a "computational introductory physics course" with python or lisp...problem is not every student learns programming in high school
<beach> Josh_2: Stuff like that is very common, unfortunately.
<Josh_2> theseb: you should use Lisp ;)
<beach> theseb: I would have to think about that. I have mostly given thought to how to teach it to computer-science and software-engineering students.
emys has quit [Ping timeout: 256 seconds]
<selwyn> john carmack reviewed the imperial epidemic simulation code and he concluded that "the software engineering seems fine"
<theseb> beach: and I'm sure you know teaching programming is slow at first.....little things we take for granted like editors and syntax cause pain for newbies
<phantomics> Non-CS students are less likely to know programming to start with, and thus less likely to have bad Algol habits to unlearn
EvW has joined #lisp
<beach> theseb: Indeed.
<pjb> phoe: the question is whether the language needs backtracing for scanning. They usually don't.
<beach> phantomics: That depends a lot on the country.
<pjb> phoe: assumedly SCAN-MATCH-REGEXP will take care of the needed buffering.
<phoe> pjb: does TeX need it?... I don't think so
<pjb> Note that we have 1-char backtracking available with character streams. (unread-char).
<theseb> beach: the teacher often wants to turbo ahead and it is excruciating because they make what seems to us like such trivial mistakes...so nothing seems to get done for a long time....THAT is the problem with the notion of "let's just a quick 1-2 week programming intro at the beginning of the semester!" idea...students would get pissed
<phoe> pjb: correct
<MichaelRaskin> TeX written by the most inventive TeX wizards or TeX from dpANS3?
<phoe> MichaelRaskin: the latter
<MichaelRaskin> My pretty trivial PEG grammar seems to survive the latter fine
<phantomics> Although for teaching math-related material, I think APL is the best language for beginners. If you set someone up with an interpreter and you can teach them to enter the special characters, there is almost no boilerplate or other extraneous stuff to figure out
<phoe> MichaelRaskin: please show me
Kundry_Wag has joined #lisp
<phantomics> Understanding environments, editors, compilation etc. are often the biggest hurdles for beginners, it's important to get fast results with a small feedback loop
<beach> theseb: I think we will get kicked if we continue this discussion here. We would have to find a different forum for it.
<theseb> phantomics: as much as i respect CL...have you sen Racket and their DrRacket IDE? it is quite impressive and also removes a lot of barries as you brought up
<theseb> may even be the best i've found for newbies
<theseb> bar none
<phantomics> Yes, I've used Racket, that's probably the best starter Lisp environment
<phantomics> I've been working on creating an easier Lisp environment within the browser, but that's still a long way out
<MichaelRaskin> phoe: the rest is http://dpaste.com/17930HR and it is pretty specific to what happens to this HTML on the next step
<theseb> phantomics: yes...a browser lisp intro would be phenomenal
<theseb> beach: i'm done ;)
<phoe> MichaelRaskin: what is that first file?
<phantomics> theseb: My browser app actually manifests an entirely different display of s-expressions, displaying them as a graphical tree grid rather than text
<theseb> phantomics: nice
<phoe> beach: #lispcafe welcomes you, and it's quiet at the moment
orivej has quit [Quit: No Ping reply in 180 seconds.]
<MichaelRaskin> The first file is PEG, in the syntax maximally similar to The Original PEG Paper, which is handled by esrap-peg
scymtym_ has joined #lisp
<phoe> Okay
<beach> phoe: I wish I had the time and the energy.
<phantomics> I also have the ability to insert arbitrary interface elements into the grid and show different output types, like images, d3.js graphics, spreadsheet grids, etc.
<phantomics> But making it all robust and fast is the challenge
<phoe> beach: gotcha
scymtym has quit [Ping timeout: 260 seconds]
ayuce has joined #lisp
orivej has joined #lisp
emys has joined #lisp
<theseb> phantomics: sounds like you've thought of this for a long time
<beach> phoe: Speaking of which, I think you are already overwhelmed with the help on the book, so I think I'll stay away.
<phantomics> I've been working on it off and on since 2013
<phoe> beach: I kind of am right now, agreed - thank you
<beach> phoe: Good luck@
<beach> !
<theseb> beach: one last question....do you agree with me and phantomics that DrRacket IDE + Racket is probably the best programming intro environment there is?
<phoe> If anything, I'll poke you later, when the book is already more or less typeset and the previous reviewers have their stuff merged
<beach> Sure.
<phoe> We'll see if you have the time and strength then
<phoe> Does that sound okay?
Kundry_Wag has quit [Ping timeout: 258 seconds]
scymtym_ has quit [Remote host closed the connection]
<beach> Oh, proofreading a book is not hard for me. It is just too messy with too many people pushing their own stuff right now.
<phoe> Yes, correct
<phoe> It *is* messy
<beach> phoe: I can see how you would react, and I would not want to work that way myself.
<phantomics> My April APL compiler was created to augment it, because spreadsheets are a major interface modality and vector languages are a natural fit for spreadsheets
<phoe> MichaelRaskin: is there any README or tutorial on esrap-peg?
refpga has quit [Ping timeout: 272 seconds]
<MichaelRaskin> Hmm. I guess no. But that's all that is needed to get string -> parse tree: http://dpaste.com/092PP1D
<phoe> oh! can I just skip the peg file and evaluate the stuff from http://dpaste.com/17930HR ?
* phoe tests some things
emys has quit [Ping timeout: 264 seconds]
scymtym has joined #lisp
rpg has joined #lisp
<rpg> luis, Fare I will set up my Jenkins server to run some upgrade tests on that branch.
orivej has quit [Ping timeout: 264 seconds]
orivej_ has joined #lisp
<MichaelRaskin> phoe: no, first is the grammar, third is the way to use it
rgherdt has quit [Ping timeout: 260 seconds]
<MichaelRaskin> Second is parse tree to something, where something happens to be some crazy HTML
<phoe> MichaelRaskin: I see
FreeBirdLjj has quit [Remote host closed the connection]
emys has joined #lisp
orivej_ has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
<pjb> theseb: AFAICS, it would be possible to write a CL compiler for DrRacket, so you could !lang cl and be happy for ever?
<theseb> pjb: perhaps
<theseb> pjb: someone implemented python in CL..you may have heard of CLPython... https://common-lisp.net/project/clpython/
<theseb> pjb: i want to do a subset of that for more educational purposes
<theseb> i.e. Show how a Python subset can be implemented in lisp
shangul has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #lisp
<Fare> rpg, I ran upgrade tests on what I have and found plenty of failures. I'll analyze the failures and do better.
gko has quit [Ping timeout: 264 seconds]
<rpg> Sounds good. I will wait for a new push or two and then rerun.
rpg has quit [Quit: Textual IRC Client: www.textualapp.com]
<phoe> MichaelRaskin: your parser seems to work, however it's pretty verbose - the string " does not appear in this chapter;" is represented in code by https://plaster.tymoon.eu/view/1836#1836
jprajzne has quit [Quit: jprajzne]
srazzaque has quit [Quit: ERC (IRC client for Emacs 26.3)]
<phoe> s/code/resulting data/
jprajzne has joined #lisp
<MichaelRaskin> Yes, that's what the second stage tries to improve
<phoe> could you link me the second stage again?
<phoe> there are warnings that don't look all that nice
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
<phoe> related to global dynavars, should I define these myself?
<MichaelRaskin> Ah right, sorry, I didn't paste that part of the file. Yes, these can be just defined.
<phoe> I've defined these two dynavars, but I have no idea how to use that second part of the file just yet
<MichaelRaskin> esrap-peg:ast-eval
<MichaelRaskin> (esrap-peg:ast-eval (parse-tex s))
<phoe> I get a big string that seems very much glued together without any newlines or anything else - is that the intended result?
<MichaelRaskin> Yes, For Reasons™
<MichaelRaskin> I can write a different convertor, of course
<phoe> Oh wait, I see now
<phoe> I can modify the structure of peg matchers to get different output
abhixec has quit [Quit: leaving]
FreeBirdLjj has joined #lisp
heisig has quit [Quit: Leaving]
<MichaelRaskin> AST-eval is _fully_ agnostic, so the fact that the output is a string is just an accident
<phoe> yes, I see that
rogersm has quit [Quit: Leaving...]
jprajzne has quit [Quit: jprajzne]
Kundry_Wag has joined #lisp
jason_m has joined #lisp
FreeBirdLjj has quit [Ping timeout: 265 seconds]
jprajzne has joined #lisp
emys has quit [Ping timeout: 265 seconds]
ebrasca has joined #lisp
emys has joined #lisp
emys has quit [Ping timeout: 240 seconds]
emys has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
Willi-Smith has quit [Quit: Leaving]
<bitmapper> i'm getting there
<bitmapper> slowly
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
liberliver has joined #lisp
<beach> bitmapper: You were the one who tried the SICL REPL the other day, right? Well, it works again, but it can't do many useful things. You can do things like (car '(a b)) but you can't create generic functions yet.
<bitmapper> yeah
<beach> bitmapper: But I think progress is going to be fast from now on, so check back in a few weeks.
<beach> Anyway, I am off for the day. I'll be back tomorrow morning (UTC+2).
<Fare> beach, congratulations
<beach> Fare: Thanks. It is till executing in the host Common Lisp system, but it is executing (mostly) SICL code.
fourier has joined #lisp
orivej_ has quit [Ping timeout: 256 seconds]
sdumi has quit [Ping timeout: 240 seconds]
orivej has joined #lisp
Inoperable has quit [Excess Flood]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
TwoNotes has joined #lisp
Inoperable has joined #lisp
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
TwoNotes has quit [Client Quit]
sdumi has joined #lisp
orivej has quit [Ping timeout: 272 seconds]
orivej_ has joined #lisp
frodef has joined #lisp
orivej_ has quit [Quit: No Ping reply in 180 seconds.]
orivej has joined #lisp
<pjb> beach: can we write normal functions and macros in sicl areadly?
<pjb> s/readl/lread/
shangul has quit [Ping timeout: 256 seconds]
orivej has quit [Ping timeout: 258 seconds]
orivej has joined #lisp
<LdBeth> good merning
<theseb> The following returns "(+ 1 2)"......(print ( (lambda (a) a) '(+ 1 2) ) )....Must an eval be added inside the lambda expression "(eval a)" to evaluate a and return 3?
<theseb> i.e. is there a way to eval w/o using eval?
<LdBeth> theseb: yes
karlosz has joined #lisp
<phoe> theseb: FUNCALL with COMPILE NIL, which is sort of a cheat
<LdBeth> but you can write `(print ((lambda (x) x) (+ 1 2)))`
<theseb> right
<phoe> (funcall (compile nil '(lambda () (print "look ma, no eval!"))))
<phoe> (funcall (coerce '(lambda () (print "look ma, no eval!")) 'function))
<theseb> LdBeth: actually what you nested lambdas!?
<theseb> (lambda (a) a) becomes (lambda (a) (lambda (b) b))
* theseb tests it
<theseb> sorry i mean (lambda (a) ((lambda (b) b) a))
<theseb> nope..didn't work...emits (+ 1 2)
<LdBeth> well, phoe could probably means to use '(lambda () (+ 1 2)) in place of '(+ 1 2)
Inoperable has quit [Excess Flood]
<LdBeth> but I cannot get what exactly theseb want
<Fare> many of the upgrade failures are actually regular brokenness, as in CMUCL's subtypep being broken my some class redefinitions.
Inoperable has joined #lisp
Inoperable has quit [Excess Flood]
<theseb> LdBeth: i'm implementing a lisp and didn't want to implement eval ;)
<theseb> LdBeth: so just looking for a hacky way around it....no worries
<Bike> have you considered making a good thing instead of a bad thing
<Bike> if you want eval you should write eval
* LdBeth have you considered that you can name anything that evals `eval`;
cosimone has joined #lisp
<theseb> Bike: yea
<LdBeth> even it does only, for example, abstract eval, or eval by macro expansion
Inoperable has joined #lisp
<Bike> "implementing a lisp" is usually equivalent to implementing eval, even
<Bike> at least to begin with
<LdBeth> but have fun :D
orivej has quit [Ping timeout: 272 seconds]
orivej_ has joined #lisp
<LdBeth> and probably you might end up with CPS in less than 30 lines of code
mwgkgk has quit [Quit: Connection closed for inactivity]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
FreeBirdLjj has joined #lisp
emysion has joined #lisp
EvW1 has joined #lisp
emys has quit [Ping timeout: 260 seconds]
Kundry_Wag has quit [Remote host closed the connection]
jruiz has joined #lisp
fourier has quit [Ping timeout: 260 seconds]
Patzy has quit [Quit: WeeChat 2.7]
jprajzne has quit [Quit: jprajzne]
FreeBirdLjj has quit [Ping timeout: 260 seconds]
jprajzne has joined #lisp
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #lisp
Patzy has joined #lisp
Patzy has quit [Client Quit]
Patzy has joined #lisp
orivej has quit [Ping timeout: 264 seconds]
Kundry_Wag has joined #lisp
orivej has joined #lisp
dale has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
<bitmapper> hmm
<bitmapper> how do i rebuild the cocoa bindings in ccl
Inoperable has quit [Excess Flood]
<pjb> bitmapper: last time I looked at it, it need ffi4gen, which needs an old apple-gcc-4.2 compiler to be compiled.
<bitmapper> ughhhhhhh
<pjb> bitmapper: ffi4gen would need to be ported on gcc9…
<bitmapper> wait no
<bitmapper> i'm seeing something about ffigen5
<pjb> That would be good.
<kpoeck> do you just wan't to recompile or regenerate them?
<pjb> ffigen is need to build cocoa bindings for new frameworks…
<kpoeck> recompiling is (rebuild-ccl :clean t)
<bitmapper> i need to use the new messages in the cocoa library
<bitmapper> for dark mode support
v88m has quit [Ping timeout: 260 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
liberliver has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
Inoperable has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
orivej has joined #lisp
dddddd has joined #lisp
younder has quit [Quit: Leaving]
sdumi has quit [Read error: Connection reset by peer]
sdumi has joined #lisp
jprajzne has quit [Quit: jprajzne]
fanta1 has quit [Quit: fanta1]
anticrisis has joined #lisp
Kundry_Wag has joined #lisp
rogersm has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
orivej has quit [Quit: No Ping reply in 180 seconds.]
hsaziz has joined #lisp
orivej has joined #lisp
hsaziz has quit [Client Quit]
narimiran has quit [Ping timeout: 265 seconds]
jprajzne has joined #lisp
akoana has joined #lisp
FreeBirdLjj has joined #lisp
jruiz has quit [Remote host closed the connection]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
<pve> hi
remix2000 has joined #lisp
<pve> I'm experimenting further with some MOP stuff, and SBCL tells me (I think) that it cannot change the class of an instance of standard-generic-function into my subclass. Is it really forbidden or am I missing something?
shifty has joined #lisp
<phoe> pve: (fmakunbound 'another-function)
<pve> yes, but I would like to keep its methods
<pve> I think I could manually *move* them one by one, from the old to the new, but that seems fishy
<Bike> "Portable programs must not call change-class to change the class of any generic function metaobject or to turn a non-generic-function object into a generic function metaobject. "
<Bike> In chapter 6 of AMOP under "Initialization of generic function metaobjects"
<pve> ok, thanks that settles it
<Bike> moving the methods should work, though
<pve> great! maybe I'll try that
<Bike> i think you'll have to get the list of methods, call remove-method on each to make them unaffiliated, fmakunbound the name, define the new generic function, and add-method them all
<Bike> kind of a pain
<pve> yeah
Krystof has joined #lisp
cosimone_ has joined #lisp
fitzsim has quit [Ping timeout: 256 seconds]
cosimone has quit [Ping timeout: 260 seconds]
frodef has quit [Remote host closed the connection]
karlosz has quit [Quit: karlosz]
emysion has quit [Ping timeout: 246 seconds]
karlosz has joined #lisp
frodef has joined #lisp
emysion has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
orivej_ has joined #lisp
<pve> Bike: this does indeed seem to work (first annotation): https://plaster.tymoon.eu/view/1842#1843
<pve> thanks
emysion has quit [Ping timeout: 265 seconds]
rogersm has quit []
<Bike> change...class is kind of a problematic name for this, since it doesn't change-class (i.e. preserve the identity of the object)
<pve> true, I'll modify it
<phoe> replace-generic-function-using-class?
<pve> that could work
FreeBirdLjj has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
orivej_ has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
mwgkgk has joined #lisp
FreeBirdLjj has quit [Ping timeout: 264 seconds]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
emys has joined #lisp
sugarwren has quit [Quit: Leaving]
<fe[nl]ix> phoe: did you try it out ?
karayan has quit [Remote host closed the connection]
karayan has joined #lisp
holycow has joined #lisp
<PuercoPope> Is there a way to splice (,@) outside of quasiquote? I'm trying splice code that is already being spliced (and evaluated at macro-expansion time)
<phoe> fe[nl]ix: sorry, not yet; didn't have the time
<PuercoPope> I'm trying to get rid of the surrounding parentes around write-byte at the end https://gist.github.com/PuercoPop/4e6a1bdb348d032a99261a0f81a84ba8
<phoe> PuercoPope: you are most likely doing something wrong if you are working with , or ,@ outside quasiquoted forms
<phoe> especially since concrete implementations of , and ,@ are implementation-dependent
<Bike> PuercoPope: i think you want :append rather than :collect on line 18?
<phoe> EXPAND-REQUEST-READER is undefined
<phoe> also, you have DEFUN READ-CREATE-ALARM twice in a row
<phoe> so likely a bug on line 2
terpri has joined #lisp
<PuercoPope> Bike: Thanks! I had tried using append in the inner loop instead (ლ‸-)
<PuercoPope> phoe: yeah, because I haven't commited the code I couldn't link the repo directly. You can find expand-request-reader here https://git.sr.ht/~puercopop/cl-xcb/tree/schemas/src/xcb/schema.lisp#L39
<PuercoPope> I still have to fix the non-sense of using expanding into a lambda + funcall. But I'm still early in the PoC phase
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
v88m has joined #lisp
pve has quit [Quit: leaving]
<Grue`> I always use nconcing for appending inner loops, it should be very efficient
Fare has quit [Ping timeout: 244 seconds]
<Bike> yeah, nconcing a loop collected list should be okay too
<phoe> yes, the list is fresh
<phoe> so NCONC is okay
terpri has quit [Remote host closed the connection]
terpri has joined #lisp
choegusung has joined #lisp
Fare has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
jprajzne has quit [Quit: jprajzne]
Lord_of_Life_ has joined #lisp
jprajzne has joined #lisp
ntr has joined #lisp
Kundry_Wag has joined #lisp
Lord_of_Life has quit [Ping timeout: 260 seconds]
mibr has quit [Ping timeout: 260 seconds]
Lord_of_Life_ is now known as Lord_of_Life
FishByte has joined #lisp
shifty has quit [Ping timeout: 246 seconds]
jprajzne has quit [Client Quit]
shifty has joined #lisp
jprajzne has joined #lisp
Kundry_Wag has quit [Ping timeout: 256 seconds]
pjb has quit [Ping timeout: 272 seconds]
Kundry_Wag has joined #lisp
cosimone_ has quit [Remote host closed the connection]
cosimone_ has joined #lisp
<ralt> I want a handler-bind*
<phoe> ralt: gimme one second
<phoe> wait
<phoe> what do you mean, handler-bind*
<ralt> (handler-bind ((error1 #'uiop:quit) (error2 (lambda (c) (error 'error1))))
<ralt> I want error2 to end up calling uiop:quit
<ralt> it doesn't, it ends up being an unhandled error
orivej has joined #lisp
<phoe> that's not how handler clustering works
<phoe> handlers can only see handlers older than their cluster
<ralt> I declared it before, it looks a bit like LET/LET* to me
<phoe> if anything, you'd want a pair of nested handler-binds
<ralt> yeah, handler-bind* :)
<phoe> well
<phoe> all right
<ralt> :P
<phoe> but why
<phoe> (handler-bind (((or error1 error2) #'uiop:quit)) ...)
<ralt> no, I want to do additional stuff in error2
<phoe> oh! that wasn't accounted for in your original example
<ralt> yes, sorry, didn't want to expand too much, tried keeping minimal code
<phoe> (handler-bind ((error1 #'uiop:quit) (error2 (lambda (c) (foo) (uiop:quit c)) ...) :D
<ralt> I mean... :)
<ralt> error1 handler is doing a bunch more things too, so yeah, that's why I came to the conclusion "I want handler-bind*" :P
<ralt> anyway, done
<ralt> almost
shka_ has quit [Ping timeout: 256 seconds]
holycow has quit [Quit: leaving]
<phoe> just :compile-toplevel? AFAIK it is going to make it impossible to use handler-bind* outside of that file
emys has quit [Quit: Leaving]
<phoe> or wait a second
<ralt> fixed version: https://pastebin.com/4mW63zDK
<phoe> it might work in that file, but might not work after the FASL is reloaded
<ralt> ah
<ralt> good to know, thanks
<phoe> use all three for best results, (:compile-toplevel :load-toplevel :execute)
SGASAU has quit [Remote host closed the connection]
<ralt> recursive macros are always fun to write
<aeth> recursive macros are recursive macros
<phoe> they're just recursive functions
SGASAU has joined #lisp
<phoe> once you get that, the whole magic drops away, but the macros become easier to write in general
<ralt> yeah, but the "code is data" mantra really shines there
<phoe> random midnight question
<phoe> should (eval-when () (if)) signal warnings about a malformed IF?
<Bike> maybe it should signal a warning about eval-when ()
<phoe> why, it's legal code; maybe just a style-warning
<phoe> so far only ABCL chokes on (compile nil (lambda () (eval-when () (if))))
<Bike> that's what i meant yeah
<phoe> out of the six implementations I tested
<phoe> out of the eight implementations I tested
<phoe> and that seems like an ABCL bug, because
<phoe> clhs eval-when
<phoe> "The body of an eval-when form is processed as an implicit progn, but only in the situations listed. "
<LdBeth> Depends on whether (if t 1 (if)) would work
<phoe> LdBeth: it should work, yes
<Bike> i don't think the behavior of (if) in general is defined
<phoe> trying to evaluate it is a program-error
jprajzne has quit [Quit: jprajzne]
<Bike> is it? are there rules for that?
<Bike> if it was a function, maybe
rgherdt has joined #lisp
jprajzne has joined #lisp
<ralt> shouldn't (eval-when ()) be a no-op? given the empty list
<ralt> so AIUI, phoe's point is that given the empty list, it is never processed, and hence shouldn't fail
<ralt> right?
<Bike> there's nothing saying a compiler has to not error if it's given bad code, i think
<Bike> i mean, i don't think whether it's executed matters to the compiler
<phoe> Bike: hmmm
<phoe> clhs 3.5.1.2
<phoe> this only mentions functions, not macros or specops
pjb has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
orivej_ has joined #lisp
<Bike> but more broadly, i don't think the compiler is restricted to not fail just because the uncompilable code is never executed
<Bike> in these cases it's obvious that it's never run, but in general it's the halting problem
<phoe> I understand "The body of an eval-when form is processed (...) only in the situations listed" as "no situations, no processing"
<Bike> it is nicer to not fail, of course
<phoe> so it should not even look at (if) inside there
<Bike> "processed" in that context returns to top level form processing.
<Bike> it would be very weird if this is the only place the standard says something cannot be looked at by the compiler at all.
<phoe> hmmm, I see
<phoe> clhs 3.2.3.1
<specbot> Processing of Top Level Forms: http://www.lispworks.com/reference/HyperSpec/Body/03_bca.htm
<phoe> there's "ignore the form" which is kind of ambiguous if we want to nitpick
<Bike> i really don't think so.
<Bike> in the first case, in the example you gave with COMPILE none of that is relevant since it's not top level.
<Bike> fundamentally i don't see what value there would be in restricting the compiler like this
<phoe> well, neither do I
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
fitzsim has joined #lisp
FreeBirdLjj has joined #lisp
ebrasca has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 246 seconds]
jprajzne has quit [Quit: jprajzne]
remix2000 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kpoeck has quit [Remote host closed the connection]
Lycurgus has joined #lisp
theseb has quit [Quit: Leaving]
jprajzne has joined #lisp
rgherdt has quit [Ping timeout: 272 seconds]
pjb has quit [Ping timeout: 272 seconds]
PuercoPope has quit [Ping timeout: 256 seconds]
choegusung has quit [Quit: leaving]
orivej_ has quit [Ping timeout: 256 seconds]
efm has joined #lisp
Lycurgus has quit [Quit: Exeunt]
cosimone_ has quit [Ping timeout: 244 seconds]
remix2000_ has quit [Quit: remix2000_]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
efm has quit [Ping timeout: 260 seconds]
toorevitimirp has joined #lisp
jprajzne has quit [Client Quit]
efm has joined #lisp
jprajzne has joined #lisp
toorevitimirp has quit [Remote host closed the connection]
toorevitimirp has joined #lisp
pjb has joined #lisp
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp
ayuce has quit [Remote host closed the connection]
jprajzne has quit [Client Quit]
jprajzne has joined #lisp
<bitmapper> it works!
sz0 has quit [Quit: Connection closed for inactivity]
Josh_2 has quit [Ping timeout: 260 seconds]
jprajzne has quit [Quit: jprajzne]
jprajzne has joined #lisp