klltkr has quit [Remote host closed the connection]
klltkr has joined #lisp
azrazalea has joined #lisp
spacepluk has quit [Ping timeout: 257 seconds]
jself has quit [Ping timeout: 257 seconds]
thinkpad has quit [Ping timeout: 257 seconds]
jself has joined #lisp
vibs29 has quit [Ping timeout: 240 seconds]
vibs29 has joined #lisp
Fare has joined #lisp
thinkpad has joined #lisp
rumbler31 has joined #lisp
housel has quit [Remote host closed the connection]
spacepluk has joined #lisp
chipolux_ has quit [Ping timeout: 240 seconds]
housel has joined #lisp
fikka has joined #lisp
Kaisyu has joined #lisp
chipolux_ has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
mathZ has joined #lisp
fikka has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
Oladon has joined #lisp
Fare has quit [Ping timeout: 260 seconds]
<AeroNotix>
With #'push & #'pop. The documentation suggests that it takes a `place' but I am kind of inferring it means a `place' that evaluates to a list. Am I wrong?
<AeroNotix>
Can I make something #'{push,pop}-able ?
<Bike>
it takes a place, and you might want to look at what that means
<Bike>
but they're both very simple macros
<Bike>
(push item list) expands to (setf list (cons item list)), basically
<AeroNotix>
Bike: I think I understand place
<AeroNotix>
which is part of my confusion actually
<Bike>
i called it "list" because that's usual, but it would work just as well with any other value
fikka has joined #lisp
<Bike>
the arguments and values section even says "place---a place, the value of which may be any object."
<AeroNotix>
Yes
<AeroNotix>
Which is my confusion
<no-defun-allowed>
`place` is the name of something you give to setf to set the value of
<Bike>
what is confusing?
<no-defun-allowed>
eg (push 'thing (first my-stacks)) will push 'thing to the first item of my-stacks
<AeroNotix>
I just expect that `place' is anything that is setf-able. Not that `place' means that it is setf-able AND requires to be of a certain type
<AeroNotix>
Though: "push prepends item to the list that is stored in place, stores the resulting list in place, and returns the list."
<Bike>
it does pretty much mean setfable.
<Bike>
pop imposes an additional requirement since it returns the CAR of the value of the place.
<Bike>
push doesn't impose any additional requirement.
<AeroNotix>
Bike: "push prepends item to the list that is stored in place, stores the resulting list in place, and returns the list."
<Bike>
i read you the first time.
<Bike>
as you can see from my expansion, the new value will be a cons.
<AeroNotix>
Guess just it's not documentated in reality to how I've come to understand it
<Bike>
don't take the description text too literally. the macroexpansion is the easiest way to understand it.
fikka has quit [Ping timeout: 240 seconds]
<Bike>
technically that's not how the conformance rules work, but it's true in this case.
<AeroNotix>
How can it say: "place---a place, the value of which may be any object." but then "push prepends item to the list that is stored in place, stores the resulting list in place, and returns the list."
<AeroNotix>
I try to avoid prog1/prog2, seem hacky
<Bike>
it says prog2 returns the value of the first form, which is obviously silly
<Bike>
you gotta apply a lil hermeneutics
<AeroNotix>
First time I've heard of hermeneutics
<Bike>
push has no reason to impose a restriction that the value of the place is a list, so it doesn't
<AeroNotix>
Really the reason I was looking at the docs so deeply when it said "place" is that I wanted to call a set of functions push/pop
<AeroNotix>
and thought I could make my type push/poppable
<Bike>
push is really dumb. it just conses.
<Bike>
it's not a generalizable operation like setf is.
<Bike>
so you're out of luck as far as that goes.
<AeroNotix>
I could imagine it working on a bunch of datastructures though
<Bike>
indeed, but it doesn't.
<AeroNotix>
oh well
<Bike>
Part of the issue with it doing so is that it is a macro
<Bike>
At macroexpansion time, it doesn't know the type of the value of the place (what a mouthful)
<AeroNotix>
good point
<AeroNotix>
though it could work similarly to setf
<AeroNotix>
where you would (defun (push foo))
<AeroNotix>
(which, granted, is a niche use of a niche use)
<Bike>
setf works on information it has at macroexpansion time, stuff like the ltieral form of the place
<Bike>
for a customizable push, you couldn't take advantage except to do setf in the first place, so you'd have (push x y) expand into (setf y (push-function x y))
<Bike>
and then push-function could be generic or whatever, but then you're missing out on some stuff
<AeroNotix>
think it'd work for most uses, though?
<AeroNotix>
academic question though, not really a big deal
Fare has joined #lisp
aindilis has joined #lisp
jeosol has joined #lisp
orivej has quit [Ping timeout: 240 seconds]
<pjb>
AeroNotix: pop on a non-list would signal an error thru car. But push wouldn't: it would just create a dotted-list.
fikka has joined #lisp
Fare has quit [Ping timeout: 272 seconds]
<pjb>
AeroNotix: remember that list = (or cons null), nothing more.
chipolux_ has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 248 seconds]
Kundry_Wag has joined #lisp
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<AeroNotix>
pjb: sure, I see the behaviour, it was the documentation that seemed that there was something more to it
chipolux_ has joined #lisp
Kundry_Wag has quit [Ping timeout: 272 seconds]
chipolux_ has quit [Client Quit]
orivej has joined #lisp
<pjb>
0s
<AeroNotix>
?
<pjb>
EWRWIN
<pjb>
wrong window error
<sthalik>
hey
<sthalik>
pjb, you awake?
buffergn0me has joined #lisp
<pjb>
sthalik: apparently.
<sthalik>
pjb, I remember you briefly from comp.lang.lisp
<sthalik>
apparently the place is now full of spam
<pjb>
Happily, easily filtered out.
fikka has joined #lisp
rumbler31 has quit [Remote host closed the connection]
<sthalik>
pjb, are you saying that the group's not dead?
<sthalik>
that opens quite a lot of possibilities
fikka has quit [Ping timeout: 272 seconds]
<sthalik>
pjb, will bayes (aka thunderbird's "adaptive filtering") suffice?
robotoad has joined #lisp
<White_Flame>
AeroNotix: if you have a history in C, you can think of a 'place' sort of like an lvar
<White_Flame>
it's a syntactic expression that shows where to store something, not specifically evaluated for its value
<White_Flame>
(setf (car foo) 3) doesn't evaluate (car foo) and return its place, the shape of (car <parameter>) indicates where it's to be stored
buffergn0me has quit [Ping timeout: 240 seconds]
<White_Flame>
(hmm, I'm wondering if I remember the term 'lvar' correctly. But basically whatever's to the left of the equals sign in C)
<Bike>
yeah, the main difference between lvalues and places in my mind is that i can understand places
<White_Flame>
ah, lvalue. that's it
<Bike>
C++ adds a bunch of wackiness like rwvalues or some shit
<White_Flame>
which is why I specifically stuck with C ;)
<White_Flame>
I'm getting too long out of that world to be fully confident in specific analogies from it
<Bike>
i think the main problem with the analogy is that an lvalue is still a value, which a place doesn't have to correspond to (e.g. multiple values), but that's not a huge deal
<White_Flame>
AeroNotix: also, have fun reading up on locatives. They're sort of a parallel to pointers, as in it's a reference to a slot you can dereference & store
gigetoo has quit [Ping timeout: 240 seconds]
<sthalik>
what's the best way to treat denormalized floats as zero?
<sthalik>
i.e. canonical way to invoke machinery for given CPU arch
<loke>
sthalik: That depends on your Lisp implementation
gigetoo has joined #lisp
<sthalik>
I see. it's rather trivial to port then
<loke>
sthalik: Well, maybe. Again, dpends on your particular implementation.
<pjb>
sthalik: yes, bayes will probably be helpful on cll.
dddddd has quit [Remote host closed the connection]
<loke>
pjb: is cll actually useful anymore? I check there once in a while and there are like 3 people posting there (if you exclude wj :-) )
<aeth>
Last time I looked there's too much noise
<pjb>
loke: it's asynchronous, and you can include lots of code in a single message. So it would be more efficient than irc for a lot of stuff we do here…
<sthalik>
I just noticed there's no basic math.h stuff in CL
<sthalik>
things like atan2 or copysign
<aeth>
atan supports atan2 through its optional second argument
<pjb>
(setf (car foo) 3) can expand to (let ((val 3)) (rplaca foo val) val) in ccl: (macroexpand-1 '(setf (car foo) 3)) #| --> (ccl::set-car foo 3) ; t |#
<loke>
sthalik: Also note that CL's maths spec is more thorough than C's. For example, it defines complex results for trignometric operations and also support rationals.
<pjb>
sthalik: read chapter 12.
<loke>
pjb: Well sure, I don't disagree with you there. But all the ability to type long messages aren't work much if there is no one read them. :-(
Bike has quit [Quit: Lost terminal]
<aeth>
sthalik: I'm not sure if there's a copysign, but there's a signum, so you don't really need copysign
<aeth>
Something like this? (* (abs copy-this-magnitude) (signum copy-this-sign))
<aeth>
Seems fair for something so rarely used
<sthalik>
aeth, can you paste the disassembly when specialized for float with speed no debug/safety+no prologue please?
<sthalik>
assume single-float on 64-bit plat
<pjb>
loke: come on, I paid one more year for write access to cll, make it worth my money!
<aeth>
It looks like the version of SBCL I'm using doesn't optimize signum for single-float (i.e. it calls the function, even though there's probably a simpler way)
<loke>
pjb: :-)
v0|d has quit [Remote host closed the connection]
impulse has quit [Remote host closed the connection]
impulse has joined #lisp
arbxs has quit [Ping timeout: 276 seconds]
orivej has quit [Ping timeout: 260 seconds]
<drmeister>
Does anyone use the pzmq messaging library? I have some questions I'd like to ask offline.
<drmeister>
I've got some request/reply messages that I am certain are absolutely correct - but zeromq is dropping them with no feedback.
<sthalik>
aeth, that is actually an excellent idea :-)
impulse has quit [Ping timeout: 248 seconds]
impulse has joined #lisp
fikka has joined #lisp
housel has quit [Remote host closed the connection]
housel has joined #lisp
dented42 has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<aeth>
I think (defun copy-sign (magnitude sign) (declare (single-float magnitude sign)) (* (abs magnitude) (signum sign))) is the CL equivalent that is underoptimized but there might be something better.
<aeth>
(It's better with (optimize (speed 3)) too)
captgector has joined #lisp
JuanDaugherty has joined #lisp
sauvin has joined #lisp
<White_Flame>
you can use ffi to bit-cast integer mask operations on top of the floats, to implement the C-like asm solution
<White_Flame>
that's what I did for float<->int conversion
<White_Flame>
erm, float<->bytes conversion
<pjb>
Yes, you can make your lisp program as brittle and erroneous and crash-prone as any C program.
<pjb>
How crazy do you need to be to do that?
<pjb>
Just use C!
DKTH has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
<White_Flame>
it's not brittle. It's a word of lisp-owned foreign memory that always follows proper casting convention
<White_Flame>
certainly it demands some #+processor_model prefixing
igemnace has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
Inline has quit [Quit: Leaving]
vlatkoB has joined #lisp
mathZ has quit [Remote host closed the connection]
tralala has joined #lisp
zfree has quit [Remote host closed the connection]
nowhere_man has quit [Remote host closed the connection]
random-nick has joined #lisp
vlatkoB has joined #lisp
nowhere_man has joined #lisp
<makomo>
Shinmera: neat, good job. :-) the "[SRC]" links seem to be broken though -- "file:///..."?
<Shinmera>
Oh boy-- thanks for noting
<Shinmera>
Looks like I forgot the homepage url in the ASD
<Shinmera>
Should be fixed now (might need to change the ?t= to flush the cache)
nowhere_man has quit [Ping timeout: 256 seconds]
<makomo>
Shinmera: :-). also, nice work on the docs. i'm always pleasantly surprised whenever i find a project of yours, because it usually has a wall of text (in a good sense) accompanying it
<Shinmera>
Thanks, glad that my efforts don't go to waste
<makomo>
and it's not just the classical "here's an example" thing. you actually describe the concepts and introduce the terminology, i.e. give the person a theoretical understanding of the project
<makomo>
that's exactly what i want when reading about the project
<makomo>
s/the/a/
vlatkoB has quit [Remote host closed the connection]
vlatkoB has joined #lisp
vlatkoB has quit [Remote host closed the connection]
vlatkoB has joined #lisp
kajo has joined #lisp
<hjudt>
Shinmera: congrats! from a happy radiance user.
<Shinmera>
:)
orivej has joined #lisp
arkaros has joined #lisp
mgsk has left #lisp ["Using Circe, the loveliest of all IRC clients"]
dented42 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<drmeister>
Hi - has anyone worked with pzmq?
<drmeister>
I have a small test case where a message is being lost - I can't figure it out.
<pjb>
drmeister: using UDP or TCP?
<drmeister>
tcp
<drmeister>
I think its something to do with identities
<pjb>
drmeister: I'd suggest a network dump, to check if the message is transmitted (is it lost before sending or after receiving?)
<drmeister>
pjb: Great! How would I do that?
<pjb>
using tcpdump on the ports used my pzmq.
<drmeister>
I have a tiny example now of a python program that sends a request and waits for a response and a common lisp script that waits for a request and sends a response. The common lisp script sends the response but the python script doesn't receive it.
<drmeister>
The connect string is to tcp://127.0.0.1:9734
<drmeister>
This is macOS
housel has quit [Remote host closed the connection]
<drmeister>
The common lisp script works in cando - I'm currently trying to get it to work in sbcl.
<pjb>
Something ilke: etcpdump -i lo0 port 9734
<pjb>
Something ilke: tcpdump -i lo0 port 9734
sjl has joined #lisp
<drmeister>
Giving that a try...
<drmeister>
Thank you
housel has joined #lisp
<drmeister>
pjb: There is a lot of output (I added -X)
<drmeister>
I suspect the problem is the identities part - because I had to add code to deal with the non-string nature of zmq's default identities.
<drmeister>
#(0 214 243 47 67)
igemnace has quit [Quit: WeeChat 2.2]
Bronsa has quit [Ping timeout: 240 seconds]
Jesin has joined #lisp
meepdeew has joined #lisp
<trittweiler>
drmeister: if you can't see any outgoing packet from 127.0.0.1:9734, then dive into pzmq:send. Does that have any kind of meaningful return value? Maybe the data is waiting in a buffer, and needs to be flushed out
<drmeister>
There doesn't appear to be any way to 'flush'.
<drmeister>
I did just read something interesting though...
<drmeister>
I am using a DEALER - ROUTER pair of sockets.
<drmeister>
The main detail to notice when reading the man page is the requirement for adding in a null (empty) message part between the identity routing information prepended to all messages and the message body containing the application-level data. This null message part is used as a delimiter to separate routing information from application-level data. When communicating to/from REQ/REP sockets, the routing information is silently
<drmeister>
processed by the framework up to the null message part; the framework then hands off the remaining message parts to your application for processing.
<drmeister>
I'm trying to figure out how to get a null (empty) message part
FareTower has joined #lisp
<trittweiler>
presumably, the python side is doing that automatically? If that's the case you can inspect the request to get an idea how null/empty is supposed to look at the wire
pierpal has quit [Quit: Poof]
<drmeister>
The python side isn't doing that - because I don't send an identity - my understanding is that the Python side will create an identity of the form #(0 w x y z) where w x y z are octets that code for a 4-byte random value integer.
pierpal has joined #lisp
<drmeister>
I see that .
<drmeister>
I'm trying different combinations of null in the python and null in the Common Lisp.
<drmeister>
I'm not sure if an empty string "" counts as null.
<drmeister>
No combination of b'' in the python and "" in the common lisp appear to change the behavior.
<drmeister>
This is maddening.
m00natic has quit [Remote host closed the connection]
<jackdaniel>
drmeister: alexandria has a predicate emptyp
<drmeister>
I'm worried about what zmq thinks is an null delimiter
<slyrus1>
anyone know what's going with the nibbles/ironclad fixes for recent SBCLs?
<no-defun-allowed>
Good morning everyone!
cgay has joined #lisp
sjl has quit [Quit: WeeChat 2.2-dev]
sjl has joined #lisp
makomo has joined #lisp
<stylewarning>
hello folks
random-nick has quit [Read error: Connection reset by peer]
FareTower has quit [Ping timeout: 256 seconds]
varjag has quit [Ping timeout: 244 seconds]
<cgay>
My CL is very rusty... Is there a standard way to break very long string constants across multiple lines? Do I need to use concatenate, or (format nil "firstline~\nsecondline") ?
<cgay>
format seems a bit better because it removes leading whitespace on continuation lines.
<pjb>
If you have several such strings, you could write a reader macro.
arbv has joined #lisp
<pjb>
This depends on what you want, of course.
<pjb>
You could put a reader macro on #\" such as """ starts a string that can include newlines and indents that don't belong to the string.
<cgay>
format is fine
<pjb>
For one it's ok, but for more it's ugly.
<Bike>
oh, and to make it a constant do #.(format ...) so that it doesn't format at runtime
<cgay>
it's not performance critical.
charh has joined #lisp
<phoe>
nonetheless
<cgay>
...but it is in a macro that seems to want a read-time string there, so #. it is
<phoe>
the human reader will be able to infer that it's a constant if he sees #.(format nil ...) anywhere in the code
<cgay>
true
<phoe>
even better, (defparameter +my-string+ (format nil ...))
<pjb>
Nope.
<phoe>
and then, if you want this to be usable inside macros, (eval-when always ...)
<pjb>
Never use + with defvar or defparameter. It's bad.
<phoe>
pjb: I want to avoid the quirkiness of defconstant.
<pjb>
(not as bad as not using *, but at least half as bad).
<pjb>
(defparameter *my-string* (format nil ...)) is perfectly good.
<phoe>
oh well, matter of taste
<pjb>
Nope. Matter of time spent debugging obscur bugs.
<cgay>
this string is used in one place (a command-line flag help string). i wouldn't want a separate constant for it. ideally there would be real string syntax for this, but oh well.
<phoe>
pjb: forms such as (setf +foo+ ...) should be flagged as a warning by the compiler
<pjb>
cgay: you can implement your ideal real string syntax. Reader macros are made for that!
<Bike>
you could make one if you want. format's always been fine for me, though.
<pjb>
phoe: nope. Only if defconstant.
<cgay>
lol
<phoe>
pjb: "should", as in, "I'd like it to work that way"
<phoe>
just as SBCL flags lexical variables that have names with earmuffs
<pjb>
phoe: it would not be a good idea.
<pjb>
You may use the + convention for other purposes.
<phoe>
I've seen it used in the Lisp world for denoting constants
<phoe>
it's not as popular as earmuffs for dynavars, but nonetheless
<pjb>
not constant. There are no constants in CL.
<pjb>
Only constant VARIABLES.
<cgay>
It sounds like a lint rule that certain organizations could turn on if they wanted to.
<pjb>
What is constant, is the binding (the variable).
NB0X-Matt-CA has quit [Remote host closed the connection]
rozenglass has quit [Ping timeout: 240 seconds]
NB0X-Matt-CA has joined #lisp
gitfaf_ has joined #lisp
robotoad has quit [Quit: robotoad]
gitfaf has quit [Ping timeout: 240 seconds]
mindCrime has quit [Ping timeout: 240 seconds]
PuercoPop has joined #lisp
quipa has quit [Quit: Leaving]
AeroNotix has quit [Ping timeout: 240 seconds]
AeroNotix has joined #lisp
<aeth>
Would be nice to have immutability in CL. You can kind of fake that without optimizations with :read-only slots in structs assuming implementations respect that (idk if it's required), although it's only really easy to fake conses with structs
jasmith has quit [Quit: Leaving]
<aeth>
idk if extending sequences for types/immutability or extensible sequences (and put this in a library) would be easier to get implementations to support
<Bike>
all :read-only does is leave the writer undefined.
<aeth>
Is directly accessing slots even portable on structs? That's probably good enough for having read-only
<Bike>
"directly" how, slot-value? no. standard-instance-access also no.
<aeth>
hmm, okay, so you at least can get immutable conses that way, assuming you can come up with a cons-as-struct representation that doesn't rely on writers (mine does)
asarch has joined #lisp
makomo has quit [Ping timeout: 272 seconds]
<aeth>
If I had to redesign CL I'd add optional immutability to conses and arrays (and hash-tables?) and :element-types for cars/cdrs (separately because you might want the cdrs to be (or null your-typed-cons) in the case of a linked list) and hash-table keys/values (again, separately)
<aeth>
I'd write a CDR for that but so few people respect CDRs that I think the site has been down for years at this point
arbv has quit [Ping timeout: 256 seconds]
<gendl>
The CDR process needs to be revived.
<gendl>
by the way it seems nobody is awake in #abcl
Fare has joined #lisp
<gendl>
I was just playing with getting the base systems of Gendl compiled in it.
arbv has joined #lisp
<gendl>
And i'm running with Java 9 on my Mac. The ABCL docs say it only works through Java 1.8. Is it not supposed to work with Java 9?
<aeth>
Afaik current typed conses are O(n) since no type information is stored in the cons itself, so verification is done over the whole list. Instead of being able to say :car-type integer :cdr-type (or null cons-of-integers) and just getting a linked list that can only hold integers. Then you'd be able to verify instantly
<Bike>
this implies having multiple, possibly arbitrarily many, tags for conses
<aeth>
Yes, ideally arbitrarily many. I hate how :element-type in arrays has to be something like (unsigned-byte 8) or fixnum and can't just be (integer 0 42) separate of what's internally used to store them.
<PuercoPop>
aeth: yes, not having strings immutable by default is one of the criticisms Henry Baker makes to CL. Having them immutable by default would allow copy by reference in threads for example.
<aeth>
At the moment, type information is lost in data structures except for (maybe) :type in struct slots and (unportable except for bit and character/simple-character) specialized arrays
<Bike>
having arbitrarily many tags for conses is not a trivial change.
<Bike>
with arrays it wouldn't be quite as bad since using an extra word for the type isn't unexpected, but could still cause difficulties.
Fare has quit [Ping timeout: 268 seconds]
<aeth>
PuercoPop: The two flaws I see in CL data structures are the lack of immutability and the loss of most type information
<aeth>
The more type information the data structures themselves remember, the less you have to use THE, DECLARE, etc.
<Bike>
there's no loss, it just doesn't exist to begin with.
<aeth>
Bike: The compiler knows 42 is an integer, a fixnum, an (integer 42 42), etc. until it's stored into a data structure
<aeth>
Or at least, possibly knows
<Bike>
you're talking about a RUNTIME tag. the compiler STILL wouldn't know if there were typed conses. the runtime could know that a slot is supposed to hold whatever type, but that would improve correctness, not efficiency.
<no-defun-allowed>
a friend asks why people should avoid SETF in lisp
<Bike>
they shouldn't. setf is great
<Bike>
unless they like, want a reason? i know a dude who's good at geas magic.
<aeth>
Bike: for numbers and sequences it improves efficiency because of type-generic functions like + and MAP. If it knows it's an (integer 42 42) then it will use efficient arithmetic for most +, -, /, *, etc. because it will (probably) stay a fixnum. If it knows foo is a list, it uses a more efficient LENGTH/MAP, etc.
<aeth>
If hash-tables had :element-type, that *could* be efficient
chipolux has joined #lisp
Fare has joined #lisp
<aeth>
SBCL doesn't check at runtime in (+ 3 (aref foo 42)) if it's arefing an (unsigned-byte 8) array that it knows the type of (it might do a bounds check if it doesn't know the full type, including the length)
<aeth>
It just uses more efficient +
<Bike>
if the hash-table doesn't have a compile time known element type, it's just as efficient either way: right now, the runtime checks whether the gethash result is a fixnum. in your version, the runtime checks the stored element type in the gethash, and dispatches with arithmetic based on that.
<Bike>
with completely arbitrary runtime element types it could be less efficient, since it has to compute subtypep or something.
<Bike>
that's a compile time declaration. that is a separate concern from run time type information.
<aeth>
Bike: You get efficiency sometimes, but reliability is the main case
<aeth>
If a have a linked list that can only store foos, I can trust the user's input to only have foos because the compiler or runtime will error before that list is given to me.
<aeth>
or hash-table or array
<aeth>
(Whether it's the compiler or the runtime depends on various factors)
<Bike>
like i said, it could improve correctness. but it would not be more efficient.
<aeth>
It wouldn't be more efficient in general, but there are cases where it would be more efficient, like iterating over an array whose bounds are carefully set so that the arithmetic is efficient. It checks the array's type once and the compiled arithmetic can be efficient.
<aeth>
This exists in a limited extent already, e.g. an array of 1,000,000 (unsigned-byte 8)s will have efficient (dotimes (i (expt 10 6)) (format t "~S~%" (1+ (aref foo i))))
<aeth>
You check the type once, instead of having a generic 1+ called each iteration
<Bike>
it probably wouldn't be more efficient now, as it would require complicated coordination between aref and 1+.
<Bike>
i guess reduce or something could, hypothetically.
chipolux has quit [Quit: chipolux]
<aeth>
But the main reason you'd want immutable and holds-only-certain-type things would be for correctness, yes.
chipolux has joined #lisp
<aeth>
Well, efficient correctness checks :-)
<aeth>
Obviously you can check everything manually at the moment.
<aeth>
(It wouldn't always be more efficient, you could probably encode stuff in a SATISFIES type in a way that's bad)