<VincentVega>
beach: like (prefix sym 'pre) -> 'pre-sym
<phoe>
keywords have much more use in CL than just "properties", whatever that means
<VincentVega>
phoe: sorry, I meant keywords
<beach>
VincentVega: First of all, that would not return something that is quoted.
<phoe>
<3
<VincentVega>
phoe: thanks for the links
<beach>
VincentVega: Second, why would you want to prefix/suffix symbols?
<beach>
There is not much use for that.
<phoe>
in particular, (let ((*package* (find-package :keyword))) (alexandria:symbolicate "PRE-" 'bar))
<phoe>
;=> :PRE-BAR
<phoe>
that's useful for macro writing, I guess.
<VincentVega>
phoe: nice, thanks man
<phoe>
which is a niche, but still
<VincentVega>
beach: I needed it for some macros
<beach>
VincentVega: Can you be more specific?
<beach>
VincentVega: It is usually a bad idea for macros to create symbols other than symbols created by GENSYM.
<VincentVega>
beach: My macro generates a class and a structure. The structure has the same name as the class, but postfixed -data.
<beach>
Sounds fishy to me, but yes, I see.
<phoe>
why though
<phoe>
you have slots for that
<phoe>
why do you need another layer of indirection?
<VincentVega>
phoe: beach: So, what I do is my class contains a description of values to be checked (such as ranges of values, various properties) from which description I later initialize multiple instances of the structure.
<beach>
Sounds like a use case for a metaclass.
<VincentVega>
beach: It is? I should read up on those then.
<VincentVega>
thanks for the pointer
<beach>
Well, it looks like your structures are sort of like instances of an instance of your class.
<beach>
I am assuming you didn't mean that the class itself contains the description of values, but that an instance of that class does.
<beach>
So if you turn your class into a metaclass, your class instance into a class, and your structures into instances of that class, it should do the same trick.
<VincentVega>
Sounds like good deal to me.
<VincentVega>
Yeah, definitely sounds neat, will try to figure this out, thanks again.
<beach>
Sure. Good luck.
ralt has joined #lisp
camlriot42 has quit [Quit: Idle for 30+ days]
orivej has joined #lisp
ukari has joined #lisp
ukari has quit [Remote host closed the connection]
shifty has joined #lisp
EvW has joined #lisp
nullman has quit [Ping timeout: 240 seconds]
ljavorsk has joined #lisp
hipete has quit [Ping timeout: 256 seconds]
_whitelogger has joined #lisp
jesse1010 has joined #lisp
nullman has joined #lisp
scymtym has joined #lisp
jonatack has joined #lisp
Posterdati has joined #lisp
nicktick has quit [Ping timeout: 240 seconds]
Necktwi has quit [Ping timeout: 272 seconds]
VincentVega has quit [Remote host closed the connection]
dra_ has joined #lisp
dra_ is now known as dra
<dra>
Hello!
<phoe>
heyyy
<dra>
I recently came across a Lisp dialect that doesn't use S-expr notation for its code. Any idea what the dialect is called?
<phoe>
you mean Dylan?
<beach>
dra: There is no consensus as to what constitutes a "Lisp dialect".
<phoe>
that's the closest match my memory has to "Lisp without sexprs"
<beach>
dra: However, initially, Lisp was supposed to use M-notation.
v3ga has quit [Read error: Connection reset by peer]
<jdz>
The programmatically-generated monospace font I use (Iosevka) is written one such dialect, but I don't remember what it's called.
v3ga has joined #lisp
<dra>
beach: Yes, sure. It looked rather like M-exprs.
<beach>
dra: It could be many things. We have regular visitors here who, for some reason, would like for their recently created language to be a "Lisp dialect". I don't know why, since Lisp is not particularly popular.
<beach>
dra: But phoe is right. Dylan was meant to be a version of Scheme, and it was initially written with S-expressions. But then they changed it, presumably in the hopes of improving its acceptance.
<dra>
beach: I can imagine. The reason I ask: The syntax reminded me of Anatomy of Lisp, which is similar to M-exprs. So I'd like to take a closer look but I forgot what language that was...
<beach>
In fact, RScheme (by Paul Wilson and his group) is essentially Dylan using S-expressions.
vgmind has quit [Remote host closed the connection]
gabiruh has joined #lisp
gal is now known as galex-713
rogersm has joined #lisp
hipete has joined #lisp
stepnem has quit [Ping timeout: 240 seconds]
Bourne has quit [Ping timeout: 256 seconds]
stepnem has joined #lisp
dra has quit [Quit: Leaving]
<jasom>
historic question: any reason that LOOP doesn't treat any compound form as implicitly having a "DO" before it?
Bourne has joined #lisp
<jmercouris>
can you give an example ?
<jmercouris>
also what is a “compound form”?
<Bike>
a form that's a cons
<jmercouris>
I see
<Bike>
forms that are symbols would be hard to distinguish from loop syntax
<jmercouris>
yes, that makes sense
<jmercouris>
why would they want an implicit DO before them though?
<jmercouris>
for example when you write UNTIL (xyz x)
<jmercouris>
why would you want a DO before (xyz x)?
<Bike>
i assume jasom meant compound forms that aren't part of some other loop syntax.
<Bike>
so you could write (loop for i below 5 do (print i)) as (loop for i below 5 (print i))
<jmercouris>
I see
<jmercouris>
hm, probably for ease of parsing I would guess
<jmercouris>
that can’t be it though
<jmercouris>
are there any cases where it would be ambiguous?
<Bike>
i don't think it would really complicate the parsing. if you enter this form now your implementation will probably say something like "compound form found where a loop keywords was expected"
<Bike>
i think it would be confusing to me, though
<jmercouris>
maybe the authors of loop had a preference for being explicit
ggole has quit [Quit: Leaving]
tutti has quit [Ping timeout: 272 seconds]
yitzi has quit [Quit: yitzi]
<_death>
it has something close where you can add more than one compound form after DO...
shangul has joined #lisp
Th3D00D has joined #lisp
hipete has quit [Ping timeout: 264 seconds]
Cymew has quit [Ping timeout: 265 seconds]
ggoes has joined #lisp
rumbler31 has joined #lisp
nckx is now known as facebook
facebook is now known as nckx
rumbler31 has quit [Ping timeout: 246 seconds]
orivej has joined #lisp
bocaneri has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 256 seconds]
cosimone has quit [Remote host closed the connection]
galex-713 has quit [Ping timeout: 272 seconds]
gal has joined #lisp
shangul has quit [Ping timeout: 240 seconds]
pfr has quit [Ping timeout: 256 seconds]
jgodbout has joined #lisp
mseddon has joined #lisp
mseddon has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
EvW1 has joined #lisp
rogersm has quit [Quit: Leaving...]
hipete has joined #lisp
yitzi has joined #lisp
gaqwas has joined #lisp
gaqwas has quit [Changing host]
gaqwas has joined #lisp
scymtym has quit [Ping timeout: 244 seconds]
ralt has quit [Quit: Connection closed for inactivity]
shka_ has quit [Ping timeout: 260 seconds]
ralt has joined #lisp
wsinatra has quit [Quit: WeeChat 2.9]
vutral has quit [Quit: Connection closed for inactivity]
theBlackDragon has quit [Ping timeout: 264 seconds]
rumbler31 has quit [Remote host closed the connection]
EvW1 has quit [Ping timeout: 260 seconds]
theBlackDragon has joined #lisp
arduo has quit [Remote host closed the connection]
pfr has joined #lisp
rumbler31 has joined #lisp
Lycurgus has joined #lisp
Th3D00D has quit [Remote host closed the connection]
kaftejiman has joined #lisp
housel has joined #lisp
rogersm has joined #lisp
Lycurgus has quit [Remote host closed the connection]
shifty has joined #lisp
igemnace has joined #lisp
yonkunas has quit [Quit: Connection closed for inactivity]
terpri has quit [Ping timeout: 260 seconds]
Bourne has quit [Ping timeout: 265 seconds]
rogersm has quit [Quit: Leaving...]
gal has quit [Ping timeout: 272 seconds]
EvW has joined #lisp
gal has joined #lisp
<ralt>
apparently I can't use (THE class ...)?
<_death>
why not?
<ralt>
I get a warning saying it's not valid
<_death>
well, classes are types.. can you show the code/warning?
gal_ has joined #lisp
<aeth>
I think it's because the class doesn't exist yet because it's defined in the same file
<aeth>
Try moving it into another file or wrapping it in EVAL-WHEN
gal has quit [Ping timeout: 272 seconds]
<aeth>
Alternatively, use CHECK-TYPE and move the check to strictly exist at runtime.
<aeth>
THE/DECLARE might attempt some static checking even though there's no standardized behavior for what they do
<aeth>
(Worst case scenario is that they *assume* the type!)
kaftejiman has quit [Remote host closed the connection]
gargaml has quit [Quit: WeeChat 2.9]
FennecCode has quit [Ping timeout: 244 seconds]
adam4567 has joined #lisp
jw4 has quit [Quit: tot siens]
jw4 has joined #lisp
cosimone has joined #lisp
morisama has joined #lisp
FennecCode has joined #lisp
rixard has quit [Read error: Connection reset by peer]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rixard has joined #lisp
dyelar has quit [Ping timeout: 244 seconds]
adam4567 has quit [Remote host closed the connection]
rumbler31 has quit [Ping timeout: 256 seconds]
torbo has joined #lisp
rumbler31 has joined #lisp
gaqwas has quit [Ping timeout: 265 seconds]
rumbler31 has quit [Ping timeout: 246 seconds]
dyelar has joined #lisp
rumbler31 has joined #lisp
<sveit>
is it considered an SBCL bug (or is there a workaround?) that if i have a function F taking two arguments that may have unknown types, declaring it (ftype (function (t t)) F) compiles to (significantly) slower code with (using (optimize (speed 3) (safety 0))) than (ftype function F)?
<sveit>
it seems that SBCL "stops" type inference if i put the "t"'s in place of arguments
<sveit>
the reason this is frustrating is that my actual usecase is that sometimes i know the type of the first argument but not the second, so i would like to say (ftype (function (double-float t)) F), but this compiles to slower code than (ftype function F) (sorry for the long-winded examples)
terpri has joined #lisp
<aeth>
sveit: I wonder if it permits * instead of t in the ftype, just like * in multi-dimensional arrays when you know some of the dimensions but not all, e.g. (2 *)
<Bike>
f is like, an argument or a local variable or something, rather than a toplevel function?
cosimone has quit [Quit: Quit.]
<sveit>
Bike: often f is an argument, yes
<Bike>
hm... i'm not seeing any consistent slowdown... might be something there though
<sveit>
aeth: i tried * instead of t, same problem
<Bike>
in (defun foo (f x y) (declare (type (function (t t)) f) (optimize ...)) (funcall f x y))
<sveit>
Bike: unfortunately i don't have a simple example, as far as I can tell it happens when functions (and definitions of the lambdas returned by them) are being inlined
igemnace has quit [Ping timeout: 272 seconds]
rumbler31 has quit [Remote host closed the connection]
<Bike>
if it's a complex optimization issue, which is what it sounds like, maybe you should talk to #sbcl