Bourne has quit [Read error: Connection reset by peer]
zaquest has quit [Quit: Leaving]
efm has joined #lisp
Bourne has joined #lisp
madage has quit [Ping timeout: 240 seconds]
SGASAU has quit [Ping timeout: 265 seconds]
madage has joined #lisp
reggie_ has quit [Read error: Connection reset by peer]
reggie_ has joined #lisp
SGASAU has joined #lisp
rand_t has quit [Quit: rand_t]
mikecheck has joined #lisp
<pjb>
minion: memo for akflcar: yes, there are several such notations. One that is quite purely mathematical is the notation used by Jacques Arsac, eg. in La Construction de programmes structurés, Dunod, 1977. But any programming language is a sufficient algorithmic notation. Including lambda-calculus or Haskell.
<minion>
Remembered. I'll tell akflcar when he/she/it next speaks.
zaquest has joined #lisp
reggie__ has joined #lisp
iAmDecim has quit [Quit: WeeChat 2.8]
buffergn0me has joined #lisp
reggie_ has quit [Ping timeout: 252 seconds]
reggie__ has quit [Ping timeout: 256 seconds]
reggie_ has joined #lisp
libertyprime has joined #lisp
karlosz has quit [Quit: karlosz]
entel has quit [Quit: Connection closed for inactivity]
karlosz has joined #lisp
karlosz has quit [Remote host closed the connection]
Josh_2 has quit [Ping timeout: 240 seconds]
buffergn0me has quit [Ping timeout: 246 seconds]
<Aurora_v_kosmose>
Should I bother with Maiden or simply make a raw tcp connection and conditionally answer regex-matches for a bot?
mikecheck has quit [Ping timeout: 265 seconds]
iAmDecim has joined #lisp
Samo_svoj has joined #lisp
gko has joined #lisp
ralt has quit [Quit: Connection closed for inactivity]
<no-defun-allowed>
For IRC? I would rather use Maiden, or at least some IRC library like cl-irc.
<pjb>
Aurora_v_kosmose: type: /msg botihn sources
<Aurora_v_kosmose>
/msg botihn sources
<Aurora_v_kosmose>
Ignore that happened.
<no-defun-allowed>
Ignore what happened?
<Aurora_v_kosmose>
:p
<pjb>
Irc commands must not be prefixed with spaces!
bitmapper has quit [Ping timeout: 240 seconds]
<Aurora_v_kosmose>
Oh that's nice. And the textfile with explanations.
leo_song has quit [Remote host closed the connection]
turona has joined #lisp
leo_song has joined #lisp
patlv has quit [Quit: patlv]
buffergn0me has joined #lisp
soul11201 has joined #lisp
pilne has joined #lisp
vmhost has quit [Ping timeout: 256 seconds]
pilne has quit [Quit: Hello, 911? Yeah, it's caught in the window this time.]
ArthurStrong has joined #lisp
Bike has quit [Quit: Lost terminal]
buffergn0me has quit [Quit: ERC (IRC client for Emacs 26.2)]
shifty has quit [Ping timeout: 265 seconds]
d4ryus1 has joined #lisp
d4ryus2 has joined #lisp
d4ryus has quit [Ping timeout: 265 seconds]
torbo has quit [Remote host closed the connection]
d4ryus1 has quit [Ping timeout: 260 seconds]
dilated_dinosaur has quit [Ping timeout: 256 seconds]
dddddd has quit [Ping timeout: 256 seconds]
soul11201 has quit [Ping timeout: 258 seconds]
asarch has quit [Quit: Leaving]
retropikzel has joined #lisp
pjb` has joined #lisp
pjb has quit [Ping timeout: 272 seconds]
<mr_yogurt>
can i get a substring without copying? the equivalent of something like const char* my_substr = big_str + 10; (only need to remove a prefix)
Jesin has joined #lisp
<no-defun-allowed>
You could make a string that is displaced to the other string.
retropikzel has quit [Quit: Konversation terminated!]
d4ryus2 is now known as d4ryus
<mr_yogurt>
cool, thanks
narimiran has joined #lisp
<aeth>
mr_yogurt: generally, everything in CL provides a start and an end (or start1 start2 end1 end2 if it takes in two)
<aeth>
so there's rarely the need to work with a substring
<mr_yogurt>
uh, ppcre appeared to not match ^ if you didn't start at 0 but i was using it wrong
<aeth>
ah
<aeth>
if a library like that didn't support start/end properly, that would be a big bug since that's the only really efficient way to work with strings
<mr_yogurt>
is doing make-array like that expensive?
<aeth>
Iirc, it's probably cheaper than SUBSEQ, but it's not as cheap as start/end if you can use them
<no-defun-allowed>
No, but some overly subtyped code might not accept displaced arrays, because AREFing a displaced array is a bit slower than a non-displaced array.
<aeth>
"overly subtyped" eh
<aeth>
simple-array stuff is very common
<aeth>
and, yes, that's the other issue
soul11201 has joined #lisp
<aeth>
and imo start/end is like the C idiom, except of course in C you only provide the end because the start is implicitly part of the pointer you pass in.
axion has quit [Ping timeout: 260 seconds]
gravicappa has joined #lisp
axion has joined #lisp
soul11201 has quit [Quit: No Ping reply in 180 seconds.]
soul11201 has joined #lisp
sauvin has joined #lisp
<drmeister>
What do folks do when you have a function defined with defun and you want to switch it to a generic function?
<phoe>
fmakunbound + defgeneric?
<phoe>
the defgeneric can have a :method without any specializers if you want to preserve the old defun body.
asarch has joined #lisp
<drmeister>
fmakunbound - right - I was searching for several permutations of that symbol.
<drmeister>
"the defgeneric can have a :method without any specializers if you want to preserve the old defun body." - interesting - thank you.
<phoe>
the started server should be available on the provided port on all network interfaces
sammich_ has joined #lisp
sammich_ has quit [Client Quit]
fe[nl]ix has quit [Read error: Connection reset by peer]
Blkt has quit [Read error: Connection reset by peer]
fe[nl]ix has joined #lisp
Blkt has joined #lisp
<asarch>
However, it is not. For example: (notebook:start :port 8000) I get "Hunchentoot server is started. Listening on 127.0.0.1:8000." but I get: "Firefox can’t establish a connection to the server at 192.168.1.101:8000"
<no-defun-allowed>
From memory, if it listens on 127.0.0.1 (localhost), then it'll only accept connections directly from localhost.
<phoe>
oooh
<phoe>
so caveman doesn't bind the host properly.
<phoe>
or rather, it *does* bind it properly - it binds it to localhost though.
<no-defun-allowed>
I would recommend adding :host "0.0.0.0" or something like that.
<phoe>
hunchentoot syntax is :address "0.0.0.0"
<no-defun-allowed>
I think I got bit in the backside by that (in NodeJS) when I had a "great wall of china" firewall set up for a school project five years ago. Then I had set up port forwarding and could access my server from home, but then it didn't work at school. Fun times.
<asarch>
Maybe a global set for production/development var?
<asarch>
(Mojolicious from Perl used to have this global set)
jasom has quit [Ping timeout: 256 seconds]
<asarch>
Anyway, I will post this issue :-P
<asarch>
Thank you guys :-)
ljavorsk has joined #lisp
jasom has joined #lisp
shifty has quit [Ping timeout: 256 seconds]
shifty has joined #lisp
asarch has quit [Quit: Leaving]
rixard_ has joined #lisp
rixard has quit [Ping timeout: 264 seconds]
varjag has joined #lisp
KDr22 has quit [Ping timeout: 250 seconds]
EvW1 has quit [Ping timeout: 256 seconds]
cosimone has joined #lisp
manualcrank has quit [Quit: WeeChat 1.9.1]
KDr22 has joined #lisp
CrazyEddy has quit [Ping timeout: 265 seconds]
terpri has quit [Quit: Leaving]
arduo has joined #lisp
terpri has joined #lisp
emys has joined #lisp
terpri_ has joined #lisp
emys has quit [Client Quit]
emys has joined #lisp
libertyprime has quit [Remote host closed the connection]
dddddd has joined #lisp
vlatkoB_ has joined #lisp
terpri_ has quit [Ping timeout: 240 seconds]
terpri has quit [Ping timeout: 240 seconds]
vlatkoB has quit [Ping timeout: 258 seconds]
Lord_of_Life_ has joined #lisp
Fare has quit [Ping timeout: 258 seconds]
Lord_of_Life has quit [Ping timeout: 265 seconds]
Lord_of_Life_ is now known as Lord_of_Life
emys has quit [Ping timeout: 272 seconds]
cosimone has quit [Quit: Terminated!]
Intensity has quit [Read error: Connection reset by peer]
Intensity has joined #lisp
emys has joined #lisp
cosimone has joined #lisp
cosimone has quit [Client Quit]
davsebam1e has joined #lisp
emys has quit [Ping timeout: 272 seconds]
davsebamse has quit [Ping timeout: 258 seconds]
emys has joined #lisp
duuqnd has joined #lisp
cosimone has joined #lisp
emys has quit [Ping timeout: 240 seconds]
_jrjsmrtn has joined #lisp
__jrjsmrtn__ has quit [Ping timeout: 240 seconds]
EvW has joined #lisp
davd has quit [Ping timeout: 256 seconds]
emys has joined #lisp
motersen has joined #lisp
emys has quit [Ping timeout: 265 seconds]
v_m_v has joined #lisp
Bourne has quit [Read error: Connection reset by peer]
emys has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
tutti has joined #lisp
cosimone has quit [Excess Flood]
cosimone has joined #lisp
<phoe>
Let's say I have a macro named DEFINE-FOO that immediately calls some function %FOO, and the actual form-computing happens inside that function.
<phoe>
s/%FOO/%DEFINE-FOO/
<phoe>
How can I name %DEFINE-FOO if I want to avoid the percent sign?
<phoe>
Or rather, how *should* I name it? MAKE-DEFINE-FOO-EXPANSION?
<phoe>
Is there any other convention for that?
<_death>
define-foo-expand sounds ok
<_death>
if you're uncomfortable with "define" as prefix, expand-define-foo
emys has quit [Ping timeout: 256 seconds]
<adlai>
phoe: -builder
<phoe>
_death: thanks, the second sounds okay
<phoe>
I'm kind of pet-peeved by using names starting with define-
<phoe>
build-define-foo also is good
<adlai>
further afield: blueprinter, designer, archictor
<adlai>
* architector
cosimone has quit [Remote host closed the connection]
<phoe>
factory
<adlai>
-factory is also an option, although my interpretation of that suffix is that the function returns a closure rather than a form
motersen has quit [Quit: rcirc on GNU Emacs 26.3]
terpri has joined #lisp
<pjb>
phoe: (defmacro define-foo (name stuff) (generate-foo name stuff))
<pjb>
phoe: (defmacro define-foo (name stuff) (generate-foo-definition name stuff)) ; if you have other foos.
Bike has joined #lisp
heisig has joined #lisp
Lycurgus has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
<phoe>
CLHS DEFINE-CONDITION: "If the type being defined and some other type from which it inherits have a slot by the same name, only one slot is allocated in the condition, but the supplied slot form overrides any slot form that might otherwise have been inherited from a parent-type. If no slot form is supplied, the inherited slot form (if any) is still visible."
<phoe>
ewwww, that is such an ugly difference from DEFCLASS
<phoe>
or is it, one second...
<pjb>
Note that there's little point in overriding the generated accesors for subclasses…
<Bike>
err, does this say that you can use (slot-name initform) as a slot definition
<Bike>
that's news to me
<phoe>
"No implementation is permitted to extend the syntax of define-condition to allow (slot-name form) as an abbreviation for (slot-name :initform form). "
<Bike>
i'm confused. it says the slot-name part of the syntax is "a slot name (a symbol), the list of a slot name, or the list of slot name/slot form pairs"
<Bike>
rather than just a symbol
<phoe>
wait a second...
<phoe>
Bike: haha, right
<_death>
without looking at clhs, does this imply no CLOS-like slot merging? I would guess so, to avoid having to drag CLOS complexity into the condition system
<phoe>
it's not the part I am concerned about though
<phoe>
"the supplied slot form overrides any slot form that might otherwise have been inherited"
<phoe>
does it mean that X is an illegal reader for BAR conditions, even though that would violate Liskov's substitution principle?
<phoe>
but that would also mean that :initform 42 shouldn't be there, so not only we have an illegal reader but an illegal initialization
<phoe>
wtf, x3j13
<phoe>
this also means that DEFINE-CONDITION cannot be easily implemented via DEFCLASS + DEFMETHOD PRINT-OBJECT, because now we have to explicitly disable slot inheritance...
<Bike>
so the rule is that there's no initform the implementation can put whatever there, right?
<_death>
it also uses "slot form" (remember that forms are meant to be evaluated...) rather than "slot specification" ("slot-spec") ;)
<phoe>
Bike: it seems so
<Bike>
so the implementation just puts the inherited thing there
<Bike>
bam
<phoe>
it's not supposed to put the inherited thing there though, it's supposed to "override" the inherited slots
<phoe>
which I understand as "treat that name-colliding slot as if it inherited absolutely nothing"
<Bike>
but in this case it's overriding it with something implementation dependent.
cosimone has joined #lisp
<Bike>
so the implementation does whatever. don't sweat it.
<_death>
oh, it defines "slot form" in an earlier paragraph
<phoe>
clhs glossary 0
<phoe>
clhs glossary o
<phoe>
gah
<phoe>
..."override" is not even defined in the glossary
<Bike>
i really don't get the "slot form" thing. is it different from an initform? what's with the syntax?
<adlai>
_death, indeed, quite an exercise in compiler golf is to implement the condition system with lazy conditions
<phoe>
wait a second then
<phoe>
_death: where is it defined?
<_death>
it says "If a slot name/slot form pair is supplied, the slot form is a form that can be evaluated by make-condition to produce a default value when an explicit value is not provided. If no slot form is supplied, the contents of the slot is initialized in an implementation-dependent way."
<_death>
so now you have to figure out what is a slot name/slot form pair
<_death>
then there's "Slot-name -- a slot name (a symbol), the list of a slot name, or the list of slot name/slot form pairs."
<Bike>
i think this is all crap and it works like defclass.
<phoe>
.....this seems like a remaint from the times when slots were defined like (define-condition foo () ((x 42)))
scymtym_ has joined #lisp
<_death>
which is a weird recursive definition
<phoe>
Bike: I'm so tempted to follow your advice
<phoe>
I just want to avoid a situation where I write something in a book and someone comes to me pointing at the standard and saying that I wrote bullshit stuff
cosimone has quit [Read error: Connection reset by peer]
cosimone_ has joined #lisp
<Bike>
just say the spec says weird things but implementations generally do it like defclass, which as far as i know, they do.
<_death>
cliki errata page says: "Issue DEFINE-CONDITION-SLOT-NAME: The syntax where slot-name is "the list of slot name/slot form pairs" seems redundant, given :initform. Was it left in by accident?"
<phoe>
yes, they do
scymtym has quit [Ping timeout: 260 seconds]
<phoe>
_death: okay, now I am convinced
v_m_v has quit [Remote host closed the connection]
<_death>
of what?
iAmDecim has joined #lisp
<_death>
I would guess by "slot form" they indeed meant the initform
<phoe>
that would work, yes; you don't use superclass initforms if you have your own initform
wxie has joined #lisp
<_death>
then you can have name/form pairs ((slot1 form1) (slot2 form2))
SGASAU has quit [Remote host closed the connection]
<phoe>
which are then explicitly not allowed by the spec
<phoe>
amazing stuff
<phoe>
but anyway, I am now convinced that I can go with Bike define-condition theorem
<phoe>
"i think this is all crap and it works like defclass."
Lycurgus has quit [Remote host closed the connection]
<_death>
well, now the paragraph you initially quoted makes sense
<_death>
"the supplied slot form overrides any slot form that might otherwise have been inherited from a parent-type"
<phoe>
if we interpret slot forms as initforms, yeah
<_death>
so it's simply a restricted slot merging rule
cosimone_ has quit [Ping timeout: 240 seconds]
<adlai>
Bike, that approach is valid as long as recursion of slot access failure terminates with fallback to non-clos
cosimone_ has joined #lisp
<adlai>
otherwise, you're stuck with no middle ground between clos working, and having to use external debuggers (or at best, or worst, various LDBs)
SGASAU has joined #lisp
<Bike>
i mean, look, there's a point where you have to decide the spec is being dumb and to do the obvious thing instead. especially for something minor like this.
<Xach>
also known as the "anti-sbcl stratagem"
<adlai>
phoe, have you considered a chapter/section specifically on implementation details? e.g., as starting points, see whether any of the less-common implementations have ANSI compliance failures, and explain briefly why each one happens
iAmDecim has quit [Ping timeout: 264 seconds]
<adlai>
Xach, isn't it better to default as anti-specific ? then you can ~only~ resort to the spec
cosimone has joined #lisp
<Xach>
i don't know
cosimone_ has quit [Ping timeout: 240 seconds]
<Bike>
i thought xach was joking about how sbcl does things implied by the spec that people think are weird, like nil arrays or whiny defconstant.
<_death>
another issue is that of multiple inheritance.. if we inherit from two condition types that have slot specifiers with the same slot name, what happens?
<_death>
because define-condition sits on the clos-noclos fence, it misses out on complexities dealt by CLOS
<adlai>
_death, since the inheritors know of the ancestor condition's package, they probably intended for the various nostril sparks that ensue
SGASAU has quit [Remote host closed the connection]
<phoe>
adlai: nope, I haven't considered that
SGASAU has joined #lisp
``Erik_ has quit [Ping timeout: 256 seconds]
wxie has quit [Remote host closed the connection]
wxie has joined #lisp
rwcom has quit [Quit: Ping timeout (120 seconds)]
rwcom has joined #lisp
<adlai>
phoe, ideally there'd be no failures in any of the implementations, although the condition system is extensive enough that there can be ANSI compliance failures without rendering an implementation unusable
<phoe>
adlai: I'll write it only if someone will provide its content for me. I don't feel like manually checking all implementations for ANSI compliance details regarding the condition system.
SGASAU has quit [Remote host closed the connection]
<phoe>
I think this stuff belongs to implementations themselves and to their bugtrackers/manuals, not to a book that treats about the standard condition system.
<_death>
adlai: it may be intentional.. for example with a mixin.. but the define-condition description does not specify slot merging behavior there
SGASAU has joined #lisp
<adlai>
phoe, that is a sensible approach; wrt an earlier question of yours, my most hated part of the condition system is the fact that the relation between handler-case and handler-bind is nontrivially distinct from that between restart-case and restart-bind
<adlai>
... and my favorite part of the condition system is, naturally, ignore-errors
<_death>
ignore-errors is a misnomer, since it doesn't really ignore them :)
<phoe>
adlai: is it really distinct? the only big distinct thing is :NO-ERRORS
<phoe>
I mean, :no-error
<phoe>
;; which also should be named :no-condition since handler-case can be used for non-error conditions too
<phoe>
oh right, the other thing is handler clustering - a handler can only see handlers "older" than itself
<phoe>
right, these two already sum up to nontrivial
v_m_v has joined #lisp
<_death>
do you explain restart-bind in your book?
SGASAU has quit [Remote host closed the connection]
<phoe>
yes
<phoe>
want to take a peek?
<Bike>
the difference is that handler-bind is useful and common, unlike restart-bind
<phoe>
:(
<_death>
and with-condition-restarts?
<adlai>
phoe, when I first studied the condition system, my main conclusion was that handler-case has an implicit progn, while -bind doesn't; then, i realized that this neither incorrect, nor the strongest reason to ever use any one of the four macros
* adlai
used to optimise for "never use progn, ever"
<Bike>
that's... kind of a weird thing to optimize for?
<phoe>
adlai: same about restart-bind and restart-case, the latter has an implicit progn
<Bike>
restart-bind has an implicit progn, not -case
<phoe>
wait a second
<Bike>
i mean, it is the same as the handler macros, yeah
<phoe>
uh yes, I flipped them around, just like adlai
SGASAU has joined #lisp
<phoe>
-bind have progns, -case don't
<phoe>
_death: with-condition-restarts is an operator used in edge cases so severe that if you notice that you need to use it, your program likely has bigger problems than needing to use with-condition-restarts
<phoe>
</rant>
v_m_v has quit [Ping timeout: 264 seconds]
<adlai>
progn adds a nesting level, leading to excess newlines when you hit pprint-right-margin
Bourne has joined #lisp
SGASAU has quit [Remote host closed the connection]
SGASAU has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
duuqnd has quit [Remote host closed the connection]
duuqnd has joined #lisp
<phoe>
adlai: anyway, want to see my way of describing restart-bind?
<phoe>
since that got lost in the discussion
<phoe>
asking because you sounded like you might have some valuable comments on the matter
<adlai>
sure, that is bound to be more pleasant than the unstandardized trash heap that awaits parsing, someday
* phoe
gets worried about the unstandardized trash heap
<adlai>
nonono, do not worry about the heap of trash! just use a fibonacci heap, prioritized by char-code, and leave processing of twenty-first century 'standards' to idiots who hope to survive to see the 22nd
* adlai
opens that gist in a separate window, to facilitate ignoring programs that are so haphazard as to require multiple warnings that nobody even knows whether they're standardized or not, although nobody knows where the standard is located, if you had any doubts
<adlai>
phoe: should I jump to a specific heading?
<phoe>
adlai: "a simple system of restarts" has restarts
<phoe>
"a simple system of condition handlers" has handlers
<phoe>
the book is meant to be read linearly, but you should find your way around there
<adlai>
if it's meant to be read in sequence, then it should be read in sequence!
* White_Flame
used his very first TAGBODY/GO
<White_Flame>
to basically make something like a cond-let, as per alexandria's when-let etc
v_m_v has quit [Ping timeout: 260 seconds]
* adlai
hits fork, `git clone ...` in shell, will read further; thank you for these efforts, phoe !
<_death>
phoe: I will also put it on the queue
<phoe>
adlai: thanks! please delete your fork when you're done cloning
<phoe>
I'll want it to get forked when it's complete enough, since I keep on updating this current WIP version with new stuff.
<phoe>
_death: OK
Bourne has quit [Read error: Connection reset by peer]
sendai_ has quit [Quit: Leaving]
<adlai>
phoe, ah. the reason i forked is because i plan to send you edits, and i doubt github gists allow those other than the gist creator to push
<phoe>
adlai: ooh, OK - I'll gladly accept reviews
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
SGASAU has quit [Remote host closed the connection]
<jmercouris>
I have a load-lisp function where I can optionally specify a package
EvW has quit [Ping timeout: 272 seconds]
<jmercouris>
when I do not specify a package, it works just fine
<jmercouris>
when I specify a package, it loses its mind, and gives me a most mysterious error, which is a lie
<phoe>
wait a second...
<phoe>
#P"..." is a pathname
<jmercouris>
Yes it is
<jmercouris>
why should it be OK with it if I do not specify a package but otherwise angry?
<jmercouris>
(load-lisp init-file :interactive t) == OK, (load-lisp init-file :interactive t :package (find-package :next)) == Deep rage
selwyn has joined #lisp
<phoe>
your DECLAIM FTYPE seems broken
<phoe>
you state that :package is of type NIL
<jmercouris>
ah, shit, yes
<pjb>
jmercouris: you should not test (equal "" file) because 1- perhaps the file system would allow it, 2- if the file system doesn't allow it, you will already get an error from OPEN !
<phoe>
which is a very bad declaration to make
wxie has quit [Ping timeout: 256 seconds]
<jmercouris>
pjb: you can pass a string of "" to read from stdin
<pjb>
jmercouris: a good pattern would be to have a (load-lisp-stream stream …), and the (load-lisp designator …) function could call load-lisp-stream either on *standard-input* or on an opened stream.
scymtym__ has quit [Ping timeout: 264 seconds]
<jmercouris>
that's a good idea
<pjb>
jmercouris: no, the doc says "-", not "".
<jmercouris>
right, you are right :-D
<pjb>
jmercouris: *package* must be of type PACKAGE.
<Bike>
that's a pretty unfortunate type error. is that coming froms bcl or from your handler there?
<jmercouris>
Bike: I can't say, I'm removing the declaration now, and we'll see
<phoe>
that should get you out of UB zone
<pjb>
jmercouris: if you allow package designators in the parameter package, then use (let ((*package* (if package (find-package package) *package*))) …)
<phoe>
a function whose argument is declared to be of type NIL is a function that cannot really be called, you know
<jmercouris>
it was but a typo :O
<jmercouris>
is there a package type?
<Bike>
sure.
<pjb>
jmercouris: you cannot name parameter with keywords, because keywords are constant variables!
<jmercouris>
what should I put there package?
<jmercouris>
pjb: I don't understand
<pjb>
Oh, sorry, wrong line.
<Bike>
(:package package) in the type.
<Bike>
that said, you might want to have it take a package designator instead, so you can do :package "NEXT-USER" or whatnot.
<jmercouris>
that will just work? that's crazy
<Bike>
that's crazy?
<pjb>
jmercouris: but your ftype doesn't seem right anyways for the keywords.
<jmercouris>
In a good way
<phoe>
jmercouris: a package designator is tl;dr a thing suitable to pass to FIND-PACKAGE
<Bike>
well, actually, you can't make it just package. that's false, since you can pass nil
<jmercouris>
how should I express that?
<jmercouris>
I'm not so good with ftype yet
<Bike>
(or null package)
<Bike>
or (or null package-designator), if you do that
<pjb>
jmercouris: you can also use (load *standard-input* …)
<jmercouris>
why not (or (find-package package) *package*)?
<jmercouris>
I had an if before but changed it to or
<pjb>
jmercouris: when you need to test for eof yourself: (loop with eof = (list 'eof) for o = (read stream nil eof) until (eq eof o) …)
<pjb>
jmercouris: yes, if you want to allow for a package named NIL. As said, you need to use (defun load-type (… &key (package nil packagep)) (let ((*package* (if packagep (find-package package) *package*))) …))
<jmercouris>
package-supplied-p
<jmercouris>
i'll think about it, I don't think that's really necessary honestly
<pjb>
jmercouris: now, there's also the question whether (let ((*package* (find-package "MY-PACKAGE"))) (load file)) needs a wrapper (load-lisp file :package "MY-PACKAGE")…
sjl_ has joined #lisp
<_death>
jmercouris: if you do (or (find-package package) *package*) then it's ok
* adlai
finds himself surprised there's not yet a "trivial-eof" library that fuzzes this out of walking code-char until most-positive-fixnum
efm has joined #lisp
<phoe>
huh? fuzzes? what do you mean?
<phoe>
EOF is not a character
CrazyEddy has joined #lisp
<_death>
DOS used to have an end-of-file indicator (ascii code 26, SUB, which is what you'd get if you typed C-z)
<_death>
but this is not relevant to READ
samlamamma has joined #lisp
<phoe>
so does Linux shell, C-d
<Bike>
that's not a character, is it?
<phoe>
(code-char 4)
<phoe>
it doesn't cause an EOF though
<phoe>
it's just a standard ASCII/Unicode character, like all others.
<_death>
phoe: in ascii, 4 is code for end-of-transmission
arbv has quit [Ping timeout: 252 seconds]
<_death>
phoe: but it's not really an eof indicator in the same way.. if a file had char 26, then the DOS "TYPE" command would stop there
<_death>
phoe: so some file began with a short human-readable message followed by this code, so that if a user TYPEd it, they see the message and no more jumble
<_death>
it also reminds me how the #\$ is used for end-of-string with AH=9, INT 21H
iAmDecim has joined #lisp
ljavorsk has quit [Ping timeout: 240 seconds]
grant has joined #lisp
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
bitmapper has joined #lisp
iAmDecim has quit [Ping timeout: 240 seconds]
arbv has joined #lisp
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` is now known as X-Scale
grant has quit [Quit: grant]
bacterio has quit [Ping timeout: 256 seconds]
rippa has joined #lisp
lacroixboy__ has joined #lisp
antidote has joined #lisp
SGASAU` has joined #lisp
antidote has quit [Remote host closed the connection]
<phoe>
"A restart function can itself invoke any other restart that was active at the time of establishment of the restart of which the function is part."
<phoe>
so the clustering mechanism also is in full effect for restarts
<Bike>
it doesn't say they can't invoke dynamically closer restarts.
EvW1 has joined #lisp
<Bike>
restart functions in ecl/clasp and sbcl don't unwind that part of the dynamic environment, either.
iAmDecim has quit [Ping timeout: 250 seconds]
<phoe>
it doesn't say it can invoke dynamically closer restarts either
<phoe>
sigh
* phoe
sings a song about yet another omission in the spec™
<Bike>
i don't think reading this as meaning it has to unwind the restart clusters is very reasonable.
<phoe>
I mean, that would be consistent with how handlers work
<Bike>
i mean, like, say you invoke a restart and the restart then transfers control back to wherever. does it then have to RE wind the restart clusters?
<Bike>
how would that even be accomplished?
<phoe>
RE?
<Bike>
rewind.
<Bike>
but like, i'm saying the "re" part extra loud.
<phoe>
oh - you find the restart on the list of handler clusters, and you rebind *handler-clusters* to a particular CDR of the previous value of *handler-clusters*
<phoe>
and then you call the restart function
<phoe>
and then the NLToC happens... but I don't know how that affects that
<phoe>
ccl doesn't unwind the restart clusters either
<phoe>
oh well
<Bike>
this interpretation would also break code i've personally written, so like nah
<Bike>
for example a restart that does something and then invokes muffle warning or whatever
<phoe>
yes, I imagine that's handy
anlsh has joined #lisp
jprajzne has quit [Quit: Leaving.]
Oddity has quit [Ping timeout: 264 seconds]
monokrom has joined #lisp
bhyde has left #lisp [#lisp]
bacterio has joined #lisp
lxbarbosa has joined #lisp
iAmDecim has joined #lisp
msk has joined #lisp
msk has quit [Remote host closed the connection]
efm has quit [Ping timeout: 264 seconds]
efm has joined #lisp
ebrasca has quit [Remote host closed the connection]
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 256 seconds]
msk has joined #lisp
anlsh has quit [Ping timeout: 240 seconds]
ayuce has joined #lisp
iAmDecim has quit [Ping timeout: 240 seconds]
gko has quit [Ping timeout: 240 seconds]
grant has joined #lisp
grant has left #lisp [#lisp]
techquila has quit [Read error: Connection reset by peer]
techquila has joined #lisp
Fare has joined #lisp
X-Scale` has joined #lisp
X-Scale has quit [Ping timeout: 256 seconds]
X-Scale` is now known as X-Scale
SGASAU` has quit [Quit: ERC (IRC client for Emacs 26.3)]
SGASAU has joined #lisp
drmeister has quit [Ping timeout: 265 seconds]
fowlduck has quit [Ping timeout: 272 seconds]
l1x has quit [Ping timeout: 272 seconds]
billstclair has quit [Ping timeout: 272 seconds]
Kemwer_ has quit [Ping timeout: 272 seconds]
rvirding has quit [Ping timeout: 272 seconds]
drmeister has joined #lisp
l1x has joined #lisp
billstclair has joined #lisp
tfb has quit [Ping timeout: 246 seconds]
fowlduck has joined #lisp
lukego has quit [Ping timeout: 272 seconds]
tazjin has quit [Ping timeout: 272 seconds]
twelvemonkeys has quit [Ping timeout: 264 seconds]
Kemwer_ has joined #lisp
ralt has quit [Ping timeout: 272 seconds]
pent has quit [Ping timeout: 272 seconds]
justache has quit [Ping timeout: 272 seconds]
fowlduck has quit [Max SendQ exceeded]
twelvemonkeys has joined #lisp
lukego has joined #lisp
rvirding has joined #lisp
Balooga has quit [Ping timeout: 256 seconds]
jlpeters has quit [Ping timeout: 272 seconds]
pent has joined #lisp
ralt has joined #lisp
tfb has joined #lisp
tazjin has joined #lisp
jlpeters has joined #lisp
justache has joined #lisp
nydel has quit [Ping timeout: 256 seconds]
conjunctive has quit [Ping timeout: 265 seconds]
jlpeters has quit [Max SendQ exceeded]
p_l has quit [Ping timeout: 256 seconds]
Balooga has joined #lisp
jlpeters has joined #lisp
fowlduck has joined #lisp
jlpeters has quit [Max SendQ exceeded]
conjunctive has joined #lisp
p_l has joined #lisp
jlpeters has joined #lisp
lukego has quit [Ping timeout: 240 seconds]
lukego has joined #lisp
cosimone has quit [Remote host closed the connection]
<alandipert>
phoe mostly code generation? or parsing
<phoe>
alandipert: kinda both
<phoe>
1) we need to parse keyword differences between restart-bind and restart-case
<phoe>
2) we need to extract keyword-value pairs from the case body
<phoe>
3) we need to macroexpand and inspect the form to possibly transform it into a WITH-CONDITION-RESTARTS call
<phoe>
the first two are painful because they're stupid, and the third is painful because it's just painful
<alandipert>
phoe perhaps consider the parser combinator lib beach made for SICL LOOP
<phoe>
alandipert: that's like shooting a fly with a cannon
<Bike>
takes forever and it'll probably dodge anyway
<phoe>
the first two could perhaps have been avoided; there's no reason restart-bind couldn't have :test/:interactive/:report instead of :test-function/:interactive-function/:report-function or the other way around; and the keywords didn't need to be spliced into in the case body
<phoe>
but then again, this makes RESTART-CASE more consistent with HANDLER-CASE, kind of
<alandipert>
i like shooting flies with cannons, that's why i use lisp B-)
<alandipert>
and i know the cost of nothing yada yada
<phoe>
(defun cost-of-nothing () (time nil))
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
Oddity has joined #lisp
v_m_v has joined #lisp
<sjl_>
(time (values)) seems more appropriate
drainful- has joined #lisp
drainful has quit [Ping timeout: 265 seconds]
jeosol has joined #lisp
Fare has quit [Ping timeout: 260 seconds]
v_m_v has quit [Remote host closed the connection]
Fare has joined #lisp
AdmiralBumbleBee has quit [Ping timeout: 240 seconds]
slyrus_ has joined #lisp
AdmiralBumbleBee has joined #lisp
slyrus__ has quit [Ping timeout: 258 seconds]
cosimone has quit [Remote host closed the connection]
cosimone has joined #lisp
v_m_v has joined #lisp
iAmDecim has quit [Ping timeout: 260 seconds]
v_m_v has quit [Remote host closed the connection]
cosimone has quit [Remote host closed the connection]
v_m_v has joined #lisp
cosimone has joined #lisp
AdmiralBumbleBee has quit [Quit: If I just put this here then...]
cosimone has quit [Remote host closed the connection]
sauvin has quit [Read error: Connection reset by peer]
<jackdaniel>
wasn't it about memory allocation (the quote)?
iAmDecim has joined #lisp
watkinsr has joined #lisp
watkinsr has quit [Remote host closed the connection]
watkinsr has joined #lisp
* adlai
wonders how many times (intern anystring-from-*standard-input* :nil)), after reading a tiny, tiny, teeeeeny amount of quicklisp-quickload sources
<adlai>
since there's a design decision there justifiable only by the citation of NIL as an implementation acronym.
<Bike>
why would you intern into the nil package?
<adlai>
not the () package, the (find-package ()) package
<adlai>
its existence has been cited as justification for decisions avoiding certain corner cases.
<Bike>
look, i'm not very smart sometimes, if you're trying to make a point you need to tell me what it is
<Bike>
what does this have to do with intern?
retropikzel has joined #lisp
samlamamma has quit [Ping timeout: 240 seconds]
<adlai>
that was a thinko
<adlai>
(get "human-readable-definition" "twenty-first-century-english:thinko") -> "idiot wanted to talk about a different thing, so different from thing actually talked about, as to not be excusable as merely a typo"
<adlai>
yes, yes, there's another missing call to find-symbol.