<|3b|>
(and if someone has abcl installed, could you try it there and see which it gives? )
<no-defun-allowed>
I think it is a bug.
<no-defun-allowed>
ABCL also does that, but only after compiling FOO
<|3b|>
ok, thanks, guess i get to file some bugs
Oladon has joined #lisp
<Oladon>
Hrm. How can I export an object's accessor functions along with the object? When I try exporting the names of the accessors and using one, it of course says that the function is undefined...
<no-defun-allowed>
By exporting the symbols that name the accessors.
<no-defun-allowed>
Packages, and thus exporting, work on symbols, not on bindings (for better or worse).
<Oladon>
Is there no way to do it without specifying every accessor? I suppose I could just get in the habit of using slot-value everywhere, but... :/
efm has quit [Remote host closed the connection]
<|3b|>
slot-names are symbols just like function names, and handled exactly the same in packages
<|3b|>
so however you are using slot names should work for accessor names too, if slot-value works
<|3b|>
in slime (and presumably sly) C-c x exports the symbol under cursor
<|3b|>
which makes explicitly exporting a bunch of slot-names or accessors relatively easy
<Oladon>
Ooh, useful shortcut, thanks.
<|3b|>
actually, i guess there is slime-export-class too
<Oladon>
Whoa, it even adds it to my defpackage. So fancy...
<|3b|>
both in slime-package-fu contrib if you don't have that loaded already
<Oladon>
Hrm. What's going to happen with exporting if I have the same slot name on two different classes?
<Oladon>
Presumably they're methods?
<|3b|>
names are symbols, symbols are what gets exported
<|3b|>
packages don't care about any bindings named by a particular symbol, whether it is variable, function, slot names, types, whatever
<no-defun-allowed>
You would have to export slot names to get SLOT-VALUE to work, and people would not like you if you published code that used a lot of SLOT-VALUE.
efm has joined #lisp
<|3b|>
and methods are a property of a generic function, so no matter how you call a generic function (by name imported from another package, by package-qualified name, directly by function object) all methods of that GF are always there
<Oladon>
Hmm... okay, so here's a question. I've exported #:created-at, but attempting to call that accessor says function is undefined. Others, like #:name, work fine.
bitmapper has quit [Ping timeout: 256 seconds]
<|3b|>
is the code visible anywhere?
<no-defun-allowed>
Is the definition of that class preceded by an appropriate IN-PACKAGE form?
* Oladon
coughs
<Oladon>
Nevermind, user error...
<Oladon>
Kindly ignore the questions my cat types on my keyboard while I'm not looking. :)
<Oladon>
Er, dog. I don't have a cat.
<Oladon>
Cool -- thank you both for your help :)
notzmv has joined #lisp
dddddd has quit [Ping timeout: 265 seconds]
EvW1 has quit [Ping timeout: 240 seconds]
efm_ has joined #lisp
efm_ has quit [Client Quit]
efm_ has joined #lisp
efm_ has quit [Client Quit]
efm has quit [Ping timeout: 264 seconds]
efm has joined #lisp
rwcom has quit [Quit: Ping timeout (120 seconds)]
rwcom has joined #lisp
buffergn0me has quit [Ping timeout: 256 seconds]
pilne has quit [Read error: Connection reset by peer]
Aurora_v_kosmose has quit [Quit: later]
rwcom has quit [Quit: Ping timeout (120 seconds)]
rwcom has joined #lisp
rwcom has quit [Ping timeout: 265 seconds]
orivej has quit [Ping timeout: 265 seconds]
patlv has quit [Quit: patlv]
mono has joined #lisp
Josh_2 has quit [Ping timeout: 258 seconds]
SGASAU has quit [Remote host closed the connection]
monokrom has quit [Ping timeout: 256 seconds]
SGASAU has joined #lisp
<aeth>
Does CL do everything that the POSIX shell does? With the right library, could I replace my terminal's shell with, say, /usr/bin/sbcl instead?
<aeth>
I know there's uiop:launch-program as well as several alternatives that some people prefer
<aeth>
There are some things that might be trickier, though, like >, >>, <, |, etc.
<aeth>
I'm also not sure if you're allowed to just turn a REPL into a shell.
<Oladon>
I feel like I saw a Lisp shell on HN recently
<aeth>
well, a few have happened, most notably Scheme shell, which is its own Scheme implementation
<aeth>
Emacs also has an eshell, but it's not very feature-complete compared to running, say, zsh or bash inside Emacs (and there's at least two ways to do *that*, giving Emacs at least 3 shells built-in)
<Oladon>
yeah
<aeth>
iirc eshell can't run in-terminal apps like htop, mc, quite a few IRC clients, etc., but one of the two Emacs terminals runs those fine
<aeth>
but I'm not sure if that's a shell limitation or an Emacs limitation
Fare has joined #lisp
<Bike>
the emacs "terminal" is unable to handle curses stuff, i guess.
<no-defun-allowed>
M-x term does proper terminal emulation, no?
<no-defun-allowed>
irssi and htop look like they work in that.
<Bike>
ooh, yeah. nice.
<Bike>
but now emacs keys don't work so well... whoops
<no-defun-allowed>
Yeah, the terminal eats most of the keys. I usually click the "char" in (Term: char run) to switch it to line input in a graphical Emacs session, do Emacs things, then switch it back.
buffergn0me has joined #lisp
turona has quit [Ping timeout: 272 seconds]
Aurora_v_kosmose has joined #lisp
<beach>
Good morning everyone!
<Oladon>
Morning beach!
dyelar has quit [Quit: Leaving.]
turona has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
hdasch has quit [Ping timeout: 256 seconds]
hdasch has joined #lisp
niceplaces has quit [Read error: Connection reset by peer]
niceplace has joined #lisp
karlosz has quit [Quit: karlosz]
karlosz has joined #lisp
cylb has quit [Ping timeout: 250 seconds]
theosvoitha has joined #lisp
karlosz has quit [Quit: karlosz]
torbo has joined #lisp
vlatkoB has joined #lisp
karlosz has joined #lisp
<pjb>
aeth: you are confusing terminals with shells.
<pjb>
aeth: specifically, Common Lisp does NOT have all the features a POSIX shell has. For example, Common Lisp doesn't have ways to fork processes, or pipes. But implementations usually have enough extensions so that their REPL allow to do the equivalent of POSIX shells.
Bike has quit [Quit: Lost terminal]
<pjb>
verisimilitude: good architecture. I've done the same for my implementation of the telnet protocol.
<pjb>
aeth: and early video terminals emulated those teletypes, so even if you have a video terminals, there's no guarantee that you can move around the screen and use htop!
<buffergn0me>
video terminal applications are antithetical to the only good idea in Unix shells, because the applications do not take input on stdin and do not produce output on stdout
<pjb>
exactly. This is why M-x shell works so well.
<pjb>
and you can always do: xterm -display :0.0 -e htop & in emacs shell…
<buffergn0me>
eshell does the equivalent of that, with Emacs term-mode
<buffergn0me>
Are there any terminal emulators written in Common Lisp? Lisp Machines had VT emulators, but I have not seen anything for CL
<beach>
buffergn0me: It sounds like you found yourself a project.
<pjb>
buffergn0me: perhaps in Mezzano?
Oladon has joined #lisp
<buffergn0me>
beach: It is a good project! I am already doing a terrible job as maintainer of 5 CL Free Software projects, no more projects for me :(
<beach>
I see.
<beach>
Oh well.
sauvin has joined #lisp
narimiran has joined #lisp
<Fare>
buffergn0me, only 5? ha!
torbo has quit [Remote host closed the connection]
<no-defun-allowed>
Depends on the size of the projects?
buffergn0me has quit [Ping timeout: 272 seconds]
Cymew has joined #lisp
JohnMS_WORK has joined #lisp
_whitelogger has joined #lisp
amerigo has joined #lisp
jeosol has quit [Remote host closed the connection]
Oladon has quit [Quit: Leaving.]
__jrjsmrtn__ has quit [Ping timeout: 256 seconds]
__jrjsmrtn__ has joined #lisp
_paul0 has joined #lisp
paul0 has quit [Ping timeout: 272 seconds]
Fare has quit [Ping timeout: 256 seconds]
asarch has quit [Quit: Leaving]
ggole has joined #lisp
pve has joined #lisp
<phoe>
hellooo
<beach>
Hello phoe.
<phoe>
no-defun-allowed: and on their actual usage
<phoe>
good morning beach
<no-defun-allowed>
phoe: Indeed, and good morning.
devrtz has quit [Remote host closed the connection]
devrtz has joined #lisp
shangul has quit [Ping timeout: 258 seconds]
v_m_v has joined #lisp
Zakkor has joined #lisp
<boeg>
Anyone here have experience with caveman2 and mito? What would I need to change to setup caveman2 to use mito instead of the database support that's built in?
<phoe>
boeg: maybe #lispweb can help
rogersm has quit [Quit: rogersm]
heisig has joined #lisp
wxie has quit [Ping timeout: 264 seconds]
<ebrasca>
Hi , how to ignore some errors and continue execution?
<ebrasca>
Somo file not found , Simple-File-Error.
<beach>
That's one very good use of IGNORE-ERRORS.
<jackdaniel>
funnily enough ccl, abcl and ecl all have a release in a very short period of time
<jackdaniel>
(I'm not mentioning sbcl because it has regular ~monthly releases)
<phoe>
it's spring time, lisp flowers are blooming
<boeg>
phoe: yeah, maybe, ill give it a try, it seems rather vacant though
epony has quit [Read error: Connection reset by peer]
<phoe>
in that case, I'd file issues at the original github pages; fukamachiware is very hard to find documentation for and sometimes even harder to understand due to how it's structured internally.
<jmercouris>
find-if on a hash table? without having to do like alexandria:hash-table-values or whatever it is
<jmercouris>
or find
<jmercouris>
I spent a whole day trying to understand clack
<jmercouris>
so much indirection :-D
<beach>
jmercouris: A hash table is not a sequence.
<phoe>
for standard hash tables, iteration order is unspecified.
<jmercouris>
that is what I mean
<jmercouris>
such a useful data structure
<White_Flame>
jmercouris: FIND-IF is an iteration of sequence values. MAPHASH is an iteration of values (and keys) of a hashtable.
<White_Flame>
just need 1 more step to actually do the same thing
<jmercouris>
1
<jmercouris>
yes
sunwukong has joined #lisp
<aeth>
the biggest thing Java or C++ has over CL is a bunch of built-in collections
<aeth>
and people call CL a big language.
<jmercouris>
the collections are really good though :-)
<phoe>
jmercouris: I remember that shka was working on something in that matter
<beach>
jmercouris: It's a one-liner: (loop for val being each hash-value of table thereis (eq val <what-you-are-looking-for>))
<phoe>
you might want to ping him sometime in the future
epony has joined #lisp
<jmercouris>
beach: I know, I've already iimplemented it
<jmercouris>
I"m just looking for something nicer
<beach>
Or some other equality predicate.
<jmercouris>
maybe I am wasting my time
<jmercouris>
optimizing such a trivial thing
<jackdaniel>
optimizing?
<phoe>
how big is your hash table going to be?
<White_Flame>
well, none of these are going to be optimized, except the dual hash table
<White_Flame>
and "nicer" is often opposite of "optmizied"
<jmercouris>
:-D, true
<White_Flame>
and even with the val->key reverse table, that still doesn't help a FIND-IF equivalent hit the correct value to test either
<jackdaniel>
if you look for a function find-hashval-if, then write it, then you'll have your "nice version"
<White_Flame>
I also don't see how a sorted treemap would help, unless you're not using a general FIND-IF style predicate, but rather only a particular predicate that would tend to find results earlier in the sort list
<jmercouris>
if you process the data beforehand and have a guranateed order of the linked list, you can avoid many tests and traversals
<White_Flame>
not with a generalized predicate
<White_Flame>
a la FIND-IF
<jmercouris>
I am using find
idurand has joined #lisp
<White_Flame>
ah, FIND-IF is what you mentioned first, I believe
<jmercouris>
yes
<White_Flame>
so yeah, a reverse val->key hashtable, or just val->T one
v_m_v has quit [Remote host closed the connection]
v_m_v has joined #lisp
v_m_v has quit [Read error: No route to host]
v_m_v has joined #lisp
shangul has joined #lisp
emys has joined #lisp
ljavorsk has quit [Ping timeout: 250 seconds]
scymtym has joined #lisp
davsebam1e has joined #lisp
v_m_v has quit [Remote host closed the connection]
SGASAU has quit [Remote host closed the connection]
scymtym_ has quit [Ping timeout: 265 seconds]
corpix has quit [Quit: corpix]
SGASAU has joined #lisp
davsebamse has quit [Ping timeout: 256 seconds]
adam4567 has left #lisp ["ERC (IRC client for Emacs 26.3)"]
idurand has left #lisp [#lisp]
v_m_v has joined #lisp
scymtym has quit [Ping timeout: 256 seconds]
scymtym__ has joined #lisp
v_m_v has quit [Remote host closed the connection]
<jackdaniel>
thank you, I hope I didn't push a wrong branch or something :)
<kpoeck>
congratulations jackdaniel
<heisig>
You really deserve your cider. And, hopefully, some rest and recreation.
ljavorsk has joined #lisp
<phoe>
jackdaniel: even if, that's correctable; making a stable ECL release after such a long time of maintenance and so many bugfixes is nonetheless a great achievement
<phoe>
so, yes, enjoy your cider, you deserve it
<jackdaniel>
sure, that's why I'm grabbing my cider
<phoe>
:D
heisig has quit [Quit: Leaving]
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
shangul has quit [Ping timeout: 256 seconds]
amerigo has quit [Quit: Connection closed for inactivity]
sunwukong has quit [Quit: Leaving]
v_m_v has joined #lisp
mixfix41 has quit [Quit: leaving]
kpoeck has quit [Remote host closed the connection]
ljavorsk has quit [Ping timeout: 256 seconds]
wxie has joined #lisp
<Xach>
uh oh
<Xach>
my texinfo is not digging ecl docs or something
<_death>
new ecl, cool.. but there are some breaking changes apparently
nowhere_man has joined #lisp
<Xach>
world record for most simultaneous ecl builds in 24 hours
wxie has quit [Read error: Connection reset by peer]
wxie has joined #lisp
<beach>
phoe: For SICL conditions, I am thinking of defining a class CONDITION-CLASS parallel to STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS, and to make CONDITION a subclass of STANDARD-OBJECT.
<beach>
Then (DEFINE-CONDITION <name> (<supers>) ...) would expand to (DEFCLASS <name> (<supers>) ... (:METACLASS CONDITION-CLASS)).
<beach>
And instances if CONDITION-CLASS, i.e., the condition types would automatically include CONDITION as a superclass if there are no <supers>, much the way instances of STANDARD-CLASS automatically include STANDARD-OBJECT.
Bike has joined #lisp
<phoe>
beach: I see'
<beach>
Does that sound reasonable to you?
<phoe>
It does sound okay, sure
<phoe>
it should also allow you to specify :REPORT directly for DEFCLASS
<beach>
Right. I suppose that would expand to a DEFMETHOD form.
<phoe>
I currently do DEFMETHOD PRINT-OBJECT specialized on that condition class
<beach>
That sounds right.
<phoe>
or, if no report is specified, FIND-METHOD and REMOVE-METHOD
<phoe>
if I read this correctly, this allows one to specify new methods that return class names differently; I utilize this functionality in my list-named-class system
<Bike>
right. i see. so if the implementation gives normal functions names and stuff through some not-clos-accessible mechanism that space ought to be usable for the generic function properties as well
<jackdaniel>
_death: narg_fixed should denote number of fixed arguments (i.e if you have two required arguments, it should be 2)
<phoe>
Bike: yes, I think this is correct
<_death>
jackdaniel: ouch.. so now I need to count required args for each function (that's a lot of functions...).. commit message indicates this change was due to arm64 calling convention, but passing 0 seems to work on x64
<phoe>
Bike: in particular, note that there is generic-function-name but also #'(setf generic-function-name)
<phoe>
so wherever the implementation does store the g-f-name, it also needs to be prepared to set new names in the same spot
<jackdaniel>
_death: correct, it will work everywhere but on iOS
<Bike>
phoe: yeah.
<_death>
I will add a todo and be done with it ;)
Josh_2 has joined #lisp
emys has joined #lisp
mathrick_ has quit [Ping timeout: 256 seconds]
v_m_v has quit [Remote host closed the connection]
emys has quit [Ping timeout: 272 seconds]
<phoe>
beach: are your STANDARD-CLASS and CONDITION-CLASS going to be compatible? no real use case, just curious
v_m_v has joined #lisp
<beach>
No, not compatible. But since conditions are standard objects, that compatibility should be enough in most cases.
<beach>
phoe: Also, I have a common superclass of STANDARD-CLASS and FUNCALLABLE-STANDARD-CLASS which will also be a superclass of CONDITION-CLASS, so methods can be defined on that common superclass.
<jackdaniel>
pcl does that too (for standard-class and funcallable-standard-class that is)
mixfix41 has joined #lisp
<beach>
Ah, good to know. It must be reasonable then. :)
mixfix411 has joined #lisp
jonatack_ has joined #lisp
jonatack has quit [Ping timeout: 265 seconds]
bitmapper has joined #lisp
Cymew has quit [Ping timeout: 250 seconds]
SGASAU` has joined #lisp
<Bike>
it has std-class as a super of standard- and funcallable-standard-, and then slot-class as a super of std-class, condition-class, and structure-class
<Bike>
there's also pcl-class. it seems complicated.
SGASAU has quit [Ping timeout: 260 seconds]
<ralt>
Nilby: what are you using to support those pipes?
SGASAU` has quit [Quit: ERC (IRC client for Emacs 26.3)]
SGASAU has joined #lisp
zulu-inuoe has joined #lisp
keep_learning has quit [Quit: This computer has gone to sleep]
narimiran has quit [Ping timeout: 256 seconds]
shangul has joined #lisp
dddddd has quit [Ping timeout: 256 seconds]
gravicappa has quit [Ping timeout: 240 seconds]
<eta>
can you rebind functions lexically?
<phoe>
eta: yes, just not all ones
<eta>
phoe, which ones can't be rebound?
<eta>
basically I want to call a function after replacing READ-SEQUENCE with a non-broken implementation
<eta>
(but only for that function)
<jmercouris>
eta: use a LET
<eta>
oh, that works?
<eta>
nifty
<jackdaniel>
jmercouris: what do you mean by that?
<phoe>
jmercouris: LET doesn't bind in the function namespace
<phoe>
to rebind #'foo you must use FLET or LABELS
<jmercouris>
oh I didn't read READ-SEQUENCE
<eta>
yeah, LET doesn't work
<jackdaniel>
jmercouris: not giving advice is strictly better than giving a misleading advice
<jmercouris>
jackdaniel: everyone makes mistakes
<jackdaniel>
eta: functions in CL package are locked, so you can't shadow them conformingly
<eta>
jackdaniel, can you unlock them?
<jmercouris>
jackdaniel: you gave misleading advice about shared libraries and g-object introspection, I didn't call you out on it
<jackdaniel>
non-portably -- yes. most implementations have a way to unlock package
<jmercouris>
but since you are acting like you don't give incorrect advice on occassion, here I am pointing it out
<Bike>
don't get into a fight thanks
<eta>
hmm, LABELS didn't seem to work
<Bike>
also, if you're binding read-sequence and then calling a function, the body of that function won't see a lexical definition anyway
<phoe>
eta: give us an example
<Bike>
on the other hand, read-sequence is customizable with gray streams
<phoe>
if you're trying to rebind #'cl:read-sequence then that's not going to be portable
<eta>
phoe, okay
<Bike>
i'm not sure what you mean by read-sequence being broken, though
<eta>
(defun test ()
<eta>
(defun uses-test () (test))
<eta>
(format t "test~%"))
<eta>
(labels ((test () t)) (uses-test))
<Bike>
yeah no
<jackdaniel>
jmercouris: I did give you a lead, not incorrect advice, quite a difference
<Bike>
labels is lexical binding
wxie1 has joined #lisp
<eta>
mm, that's what I suspected
<eta>
the other way to make this work would be if WEBSOCKET-DRIVER would fix their code >_<
SGASAU has quit [Remote host closed the connection]
<eta>
phoe, oh man, the fukamachiware(tm) is real
<eta>
SEND specifies a (&key callback) parameter
<eta>
...which is just FUNCALLed immediately after sending
<eta>
it's like, why would you write (send ...) (do-other-thing) when you can write (send ... :callback #'do-other-thing)
<eta>
(the send isn't asynchronous at all)
SGASAU has joined #lisp
<_death>
as event-emitter suggests, it's apeing javascript in interface, if not in implementation
Lycurgus has joined #lisp
shifty has quit [Ping timeout: 256 seconds]
jonatack_ has quit [Quit: jonatack_]
jonatack has joined #lisp
hiroaki has joined #lisp
<Bike>
does anybody use change-class on funcallable instances? is that something that can be done? MOP says you can't change-class on generic functions...
wxie has quit [Read error: Connection reset by peer]
<Shinmera>
I have yet to use funcallable instances at all :)
<Bike>
actually, yeah, just examples of using them at all might be good. i do have a few examples myself, but.
Lycurgus has quit [Read error: Connection reset by peer]
<phoe>
Bike: not all funcallable instances are generic functions
<Bike>
i am aware.
<phoe>
but, huh, still a good question
<phoe>
mop change-class
<specbot>
Couldn't find anything for change-class.
<phoe>
#' returns a function object, ' returns a symbol
<jmercouris>
like does having the function object really make it THAT much faster?
<jmercouris>
I know, I know
<phoe>
jmercouris: measure it yourself
<jmercouris>
OK
<beach>
jmercouris: You need to fetch the function object, given the symbol. That's the difference.
<phoe>
it's hard to answer questions as general and as implementation- and code-dependent as that one
<jmercouris>
yeah
<Bike>
well, it's generally true that it'll be slower with the symbol, though.
<beach>
jmercouris: They also mean different things when the name is lexically defined.
<ralt>
interestingly, sbcl's disassemble shows the same, i.e. the symbol is already dereferenced to the function object
<jmercouris>
I'm purely concerend with the performance difference
<beach>
ralt: It can do that only for functions that can't be redefined.
<jmercouris>
I was about to say what happens when you redefine
<jmercouris>
how would SBCL know
<beach>
You are not allowed to redefine system functions.
<jmercouris>
1
<beach>
I mean "standard functions".
<_death>
there is a difference in performance, so code that repeatedly calls functions and takes a function designator should usually use something like alexandria:ensure-function
<beach>
ralt: Also, definitions within a compilation unit can be assumed not to change.
<ralt>
what is the exact definition of a compilation unit? typically a package?
<beach>
No, a file, typically.
<beach>
But if the implementation takes advantage of that, there can be some mysterious effects when the user wants to redefine a single function with (say) C-c C-c in slime.
<ralt>
ok, I tried this with the function of another system (so definitely not same compilation unit), and it did the same
<jmercouris>
so you could have a performance benefit by concatenating all of your code into a large file?
<ralt>
I can't actually figure out a way to not have this behavior
<phoe>
but that one is only viable if you're willing to sacrifice all of your code structure and redefinability for the sake of pushing 101% possible and available performance out of your code
<jmercouris>
you might as well drop down to assembler yourself then
<phoe>
not necessarily, but still, it's a pain
<beach>
And people who do that are typically the same as the ones who have no clue about algorithms and data structures.
shangul has quit [Ping timeout: 264 seconds]
<beach>
So they gain a few percent this way, and lose an order of magnitude the other way.
<phoe>
profile first, optimize fourth. think and discuss what and how needs to be optimized second.
<phoe>
and possibly have a good night's sleep third, whatever floats your boat
<beach>
Profiling won't find bad data structures.
<phoe>
correct
<jmercouris>
how can I take over the debugger and have my own interface for restarts?
<_death>
ralt: sorry, not declaim inline.. consider for example (defun bar (fn) (loop repeat 1000000000 do (funcall fn))) (bar #'list) takes around 4.14 seconds here.. with ensure-function in the beginning, it takes around 3.55 seconds.. the number of iterations is large, but for other implementations or platforms could be smaller
<phoe>
jmercouris: depends
<phoe>
do you want to have a complete takeover, or do you want the user to allow to use e.g. BREAK to land in the standard debugger
<phoe>
in the second case, bind *debugger-hook*
<phoe>
in the first case, use trivial-custom-debugger
<jmercouris>
phoe: I want to show a buffer with the error, and the available restarts
<phoe>
if it's just from calling #'error or #'invoke-debuger, then *debugger-hook* will be okay for that
<jmercouris>
phoe: and allow the user to select a restart and view the trace etc
<phoe>
*debugger-hook* + dissect
<jmercouris>
what is dissect?
<phoe>
you basically seem to want to implement your own custom debugger
Oladon has joined #lisp
<phoe>
dissect is a portability library for accessing stack information
<jmercouris>
I see
<phoe>
including the stacktrace, locals, blah blah
<jmercouris>
I want to implement my own custom debugger, yes
<phoe>
start with *debugger-hook* then
<jmercouris>
OK
<phoe>
and only go for trivial-custom-debugger if you need more than that
<jmercouris>
Thank you
<phoe>
there's a chapter of my WIP book that deals exactly with this issue
<jmercouris>
Will do
<jmercouris>
ah
jackdaniel has quit [Remote host closed the connection]
jackdaniel has joined #lisp
buffergn0me has joined #lisp
buffergn0me has quit [Ping timeout: 240 seconds]
<Bike>
i've dug into this and i'm a bit confused by the class hierarchy now. clos defines no methods specialized on generic-function except for one on ensure-generic-function. so, for example, if you have a generic-function that's not standard, generic-function-name has no defined behavior.
<Bike>
er, "mop defines"
<phoe>
Bike: wait a second
<phoe>
yes, I think that is correct
<phoe>
if you define a non-standard concrete class that subclasses generic-function, you are supposed to implement the required MOP behaviour yourself
<Bike>
i guess if you want to define your own non-standard generic-function you basically need to implement its entire behavior yourself.
<Bike>
yeah.
<phoe>
yes
<phoe>
same thing with non-standard-objects and non-standard-classes
<phoe>
the burden is all on you in such case
<Bike>
not sure i've ever seen that
<phoe>
I remember talking about it with beach a few years ago
<Bike>
i mean, mop isn't super widely used anyway
<phoe>
Bike: neither have I - it's possible, but not feasible
<phoe>
in other news: at 166 A4 pages, 3 published libraries and 6 ASDF systems in total, my upcoming book, Common Lisp Condition System, has reached its first beta version.
<beach>
The spirit of the MOP is definitely that the base class should be free for the user to subclass and create behavior for.
<phoe>
so I guess it's good for reviews now.
<beach>
Great!
vyorkin has joined #lisp
frgo has joined #lisp
vyorkin has quit [Remote host closed the connection]
bor0 has joined #lisp
vyorkin has joined #lisp
<bor0>
I am working on deriving the Quine for Lisp: ((lambda (x) (list x (list 'quote x))) '(lambda (x) (list x (list 'quote x)))). my question is rather big so I was curious if I should even ask it here. I guess I can start with: has anyone been playing around with Quines in Lisp?
<bor0>
so I am reading through Smullyan's "The Gödelian Puzzle Book". he defines _diagonalization_ for an expression P in which x occurs (D(P(x)), to be the substitution of the variable x with the quoted expression P(x)
<bor0>
I am certain from this diagonalization definition we can follow and build that same Quine, but I am having some issues with that
<bor0>
(actually I am not that certain anymore!)
<bor0>
does it make sense so far? should I continue?
<Bike>
sure, i guess
<Bike>
if you look at that rosetta code page, your quine is basically the third one without the backquote syntax
<bor0>
here is what I have. I am using Racket but I don't think it matters much in this case
<bor0>
`(p 'a-book)` will return `'((Boro is reading) a-book)` and `(d p 'a-book)` will return `'((Boro is reading) '((Boro is reading) a-book))`, as expected
<bor0>
I thought it would be possible to get from that definition of `d` to that actual Quine
<bor0>
that is, I don't see a way to go from `(lambda (p x) (p (list 'quote (p x))))` to the definition of that Quine. so it is either my definition of `d` that is wrong, or this is not possible
<bor0>
by the definition of that Quine I roughly mean `(lambda (x) (list x (list 'quote x)))`
<bor0>
(which is the first, un-quoted part of the lambda)
<Bike>
i guess you probably need to diagonize an expression that uses the diagonalization operator?
mathrick has joined #lisp
<bor0>
yeah, that's true. that is how he builds self-reference in the book (applying diagonalization to diagonalization). I was thinking if I pattern match the `d` lambda `(lambda (p x) (p (list 'quote (p x))))` with the lambda of that Quine `(lambda (x) (list x (list 'quote x)))` I would find the connection but it is not possible to match them. e.g. I can't replace `p` with `identity` or anything
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #lisp
<bor0>
I guess the question is, does that (or any Lisp) Quine follow directly from that diagonalization definition? or the only common thing those have is just self-reference
<Bike>
i couldn't guess how the quines were derived.
Lycurgus has quit [Quit: Exeunt]
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` is now known as X-Scale
Oladon has quit [Quit: Leaving.]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
buffergn0me has joined #lisp
beach` has joined #lisp
beach has quit [Disconnected by services]
beach` is now known as beach
gko has quit [Ping timeout: 250 seconds]
luckless has quit [Ping timeout: 246 seconds]
Jeanne-Kamikaze has joined #lisp
iAmDecim has joined #lisp
Jeanne-Kamikaze has quit [Quit: Leaving]
<pjb>
bor0: the smallest quine in the lisp REPL is: 0
<pjb>
bor0: another one is: ""
<bor0>
I avoid those because they are trivial. also, using IO is trivial and not fun :)
<Nilby>
I feel like the Lisp quine makes the minimal substitution machinery explicit, and so demonstrates elegantly the fundamental minimal essence of computation.
<pjb>
So your definition is: (defun quinep (x) (equal x (eval x))) (quinep '((lambda (x) (list x (list 'quote x))) '(lambda (x) (list x (list 'quote x))))) #| --> t |#
JetJej has joined #lisp
<Nilby>
Unfortunately, even though we know a Lisp-2 is more practical, Lisp-1 quines are more elegant.
<pjb>
(quinep '(#1=(lambda (x) (list x (list 'quote x))) '#1#)) #| --> t |#
<Nilby>
You have to funcall this:((lambda (lambda) `(,lambda ',lambda)) '(lambda (lambda) `(,lambda ',lambda)))
<bor0>
I was looking for a relation between that Lisp Quine and that diagonalization definition. I think the missing link in those two is Lisp's evaluation strategy. the Quine is simply `(list x (d x))` (which is really just `(list x (list 'quote x))`) where `d x` is the diagonalization of `x`. why do we need a list of both `x` and its diagonalization? because evaluating with its quoted version will return the same list
<pjb>
bor0: you may also use read-from-string and format.
<Nilby>
Are there any non-trivial quines that don't use quote?
iAmDecim has quit [Ping timeout: 240 seconds]
<bor0>
I think it all depends on the evaluation strategy. for example PHP will output any text outside <?php ?> as plain-text, so that allows for some neat Quines in it
<bor0>
Quines by themselves are probably useless, but thinking about them uncovers a lot of things: self-reference (infinite loops, etc), evaluation strategies. (just a random thought)
<Nilby>
Quines are quite effective at for driving me crazy.
<antoszka>
nice quine
<bor0>
Nilby, I know there is "print the contents of (read current file)" or "1" or "0" etc, but those are considered "cheating". I don't know if there is a universal definition of what cheating in a Quine means
<bor0>
but I would imagine it a hard problem without the usage of `quote`. probably with some crazy macros?
<phoe>
using side effects other than returning values (for languages which can do that) or printing to stdout (for languages which don't naturally return values, like C)
<bor0>
I agree. even Wikipedia starts with "A quine is a computer program which takes no input and produces a copy of its own source code as its only output." so that definition is perfectly valid for the program "0"
<Nilby>
has some structural similarity to
<Nilby>
((lambda (x) (list x (list 'quote x))) '(lambda (x) (list x (list 'quote x))))
<phoe>
pjb: so is the empty program
<pjb>
Nilby: note this is dead code. You need to work outside of C to run it!
<phoe>
note that "echo "" | sbcl --script" has no input and produces no output
<Nilby>
C is dead to me for sure. :)
<phoe>
ahh the ancient scrolls of the dead C
terpri has quit [Quit: Leaving]
<Nilby>
Maybe it's not so dead in Zeta-C or Valceitus?
vyorkin has quit [Remote host closed the connection]
<phoe>
wait a second, is this rendered on the host and then sent back to mezzano for displaying?
<phoe>
how exactly does the passthrough work?
<froggey>
more or less. the guest & the host can exchange data (buffers, textures, etc), and the guest can send commands for the host to execute
<phoe>
awesome
karlosz has joined #lisp
<froggey>
there I've sent some textures and a vertex buffer to the host, plus commands to render into another texture, then that texture is retrieved from the host and displayed as a normal window
<Nilby>
That's very impressive! That could be the fastest CL OS rendering in history.
<froggey>
well, genera did it on real hardware, so I've still got a bit of a way to go
<p_l>
Nilby: minimal obfuscated C quine had been for over 10 years a 0 lentgth file
<Nilby>
But I can't imagine Genera could match the speed of todays graphics hardware.
<p_l>
International Obfuscated C code contest had to impose a minimal length rule for quines
rpg has joined #lisp
ravndal has joined #lisp
even4void has joined #lisp
<anlsh>
ir
iAmDecim has joined #lisp
boro_ has joined #lisp
even4void has quit [Quit: WeeChat 2.8]
narimiran has joined #lisp
Oladon has joined #lisp
bor0 has quit [Ping timeout: 256 seconds]
iAmDecim has quit [Ping timeout: 240 seconds]
EvW has quit [Read error: Connection reset by peer]
EvW has joined #lisp
<markasoftware>
Nilby: is that the shortest known c quine?
theosvoitha has quit [Quit: Connection closed for inactivity]
buffergn0me has quit [Ping timeout: 240 seconds]
gareppa has joined #lisp
<Nilby>
I'm not sure. It was just sitting around in my quine file.
notzmv has quit [Ping timeout: 265 seconds]
boro_ has joined #lisp
boro_ has quit [Changing host]
<Nilby>
It's a least a pretty short one. It get's warnings, but at least it still compiles.
patlv has joined #lisp
<patlv>
hello all, can't get around an error with clsql when running: (clsql:query "select * from mytable"), getting the error: "[Microsoft][ODBC Driver 17 for SQL Server]Invalid Descriptor Index", while if I list the columns, all good
<Nilby>
It's interesting in that 34 is basicly quote in lisp.
gareppa has quit [Remote host closed the connection]
<markasoftware>
well it's ascii quote
<markasoftware>
oh i see what you mean
<Nilby>
right, llike saying 34 is quoting quote "
<phoe>
Xach: what is kmr-git? I cannot see it defined in quicklisp-projects
<Nilby>
it's in quicklisp-controller/upstream-misc.lisp : http://git.kpe.io. I had to look it up the other day too.
<Nilby>
phoe: ^^
<phoe>
Nilby: thanks.
<phoe>
patlv: I have no idea if clsql is maintained; the last commit on that repo is from four years ago.