jackdaniel2 has quit [Read error: Connection reset by peer]
clothespin has joined #lisp
techquila has joined #lisp
techquila has quit [Remote host closed the connection]
techquila has joined #lisp
lucasb has quit [Quit: Connection closed for inactivity]
clothespin_ has joined #lisp
clothespin has quit [Ping timeout: 250 seconds]
Josh_2 has quit [Ping timeout: 240 seconds]
Josh_2 has joined #lisp
notzmv has joined #lisp
orivej has quit [Ping timeout: 265 seconds]
ebzzry has joined #lisp
orivej has joined #lisp
J-Lawson has joined #lisp
ArthurStrong has joined #lisp
mindthelion has joined #lisp
count3rmeasure has quit [Remote host closed the connection]
techquila has quit [Ping timeout: 245 seconds]
X-Scale has joined #lisp
EvW has quit [Ping timeout: 250 seconds]
dale has quit [Quit: My computer has gone to sleep]
rgherdt has quit [Quit: Leaving]
nullniverse has joined #lisp
mindthelion has quit [Ping timeout: 240 seconds]
dale has joined #lisp
slyrus_ has joined #lisp
slyrus has quit [Ping timeout: 240 seconds]
_whitelogger has joined #lisp
Josh_2 has quit [Remote host closed the connection]
Josh_2 has joined #lisp
Achylles has quit [Read error: Connection reset by peer]
J-Lawson has quit [Remote host closed the connection]
akoana has joined #lisp
_whitelogger has joined #lisp
techquila has joined #lisp
techquila has quit [Read error: Connection reset by peer]
techquila has joined #lisp
jackdaniel2 has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
bitmapper has quit [Ping timeout: 240 seconds]
rople has joined #lisp
dddddd has quit [Remote host closed the connection]
techquila has quit [Read error: Connection reset by peer]
<equwal>
Been looking for a CL math library. GSLL looked good, but has compiler errors.
<no-defun-allowed>
What kind of maths?
lxbarbos` has joined #lisp
lxbarbosa has quit [Ping timeout: 276 seconds]
kgop has joined #lisp
karswell has quit [Read error: No route to host]
karswell has joined #lisp
libertyprime has quit [Ping timeout: 276 seconds]
megalography has left #lisp [#lisp]
mrcom has quit [Ping timeout: 245 seconds]
ebrasca has joined #lisp
ebrasca has quit [Remote host closed the connection]
ebrasca has joined #lisp
kobain has quit [Ping timeout: 240 seconds]
<pjb>
equwal: you could use maxima.
<pjb>
equwal: maxima mathematical functions can be used from lisp.
orivej has quit [Ping timeout: 240 seconds]
<equwal>
Think that is sufficient.
libertyprime has joined #lisp
<equwal>
no-defun-allowed: CL lacks lots of basic functions it would be nice to have. Like today I wanted to compute some permutations, and had to write the code manually (when it could have been a library).
jackdaniel2 has quit [Read error: Connection reset by peer]
karlosz has joined #lisp
krid has quit [Ping timeout: 252 seconds]
mathrick has quit [Ping timeout: 245 seconds]
Lycurgus has joined #lisp
akoana has left #lisp ["Leaving"]
gravicappa has joined #lisp
mathrick has joined #lisp
karlosz has quit [Quit: karlosz]
vlatkoB has joined #lisp
<aeth>
permutations would be pretty low on my 'nice to have built into a language' list, below regexp, and I rarely use regexp
<pjb>
The uselessness of permutations comes from their exponential output (and compute time).
<aeth>
yeah, elegant, simple math tends to be at odds with efficient computation.
<aeth>
but when the hard algorithm for $thing is on Wikipedia and it's not that many lines (incomprehensible lines, but still not many lines)...
Bike has quit [Quit: Lost terminal]
smokeink has joined #lisp
libertyprime has quit [Ping timeout: 245 seconds]
libertyprime has joined #lisp
Bourne has joined #lisp
mooch2 has joined #lisp
jeosol has joined #lisp
Josh_2 has quit [Ping timeout: 240 seconds]
mooch3 has quit [Ping timeout: 250 seconds]
Lycurgus has quit [Remote host closed the connection]
libertyprime has quit [Ping timeout: 276 seconds]
libertyprime has joined #lisp
<ebrasca>
aeth: I think some day we can have some algorith optimizer for math functions.
oni-on-ion has quit [Remote host closed the connection]
oni-on-ion has joined #lisp
brown121408 has joined #lisp
libertyprime has quit [Ping timeout: 240 seconds]
brown121407 has quit [Ping timeout: 252 seconds]
oni-on-ion has quit [Ping timeout: 240 seconds]
libertyprime has joined #lisp
meepdeew has joined #lisp
<beach>
Good morning everyone!
Josh_2 has joined #lisp
<loke>
ebrasca: What would such algorithm do?
dale has quit [Quit: My computer has gone to sleep]
<ebrasca>
loke: For example replace (+ (* x x) (* x x) (* x x)) with (* 3 x x) or someting better.
<no-defun-allowed>
I think most compilers will have optimisations for that kind of thing.
<aeth>
except if the type is floating point or could be floating point
<aeth>
well, some might optimize anyway, but that's overoptimizing
<no-defun-allowed>
But apparently SBCL and Clozure do not? It seems fairly straightforward.
<no-defun-allowed>
aeth: Ah yeah, we have to deal with floats.
lxbarbos` has quit [Ping timeout: 276 seconds]
<aeth>
and when they're not floats, you still get generic arithmetic unless you can bound the problem because they could become bignums
<no-defun-allowed>
Eliding two of the three multiplications sounds reasonable though.
jackdaniel2 has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
doublex has joined #lisp
meepdeew has quit [Remote host closed the connection]
<LdBeth>
But why would anyone write such kind of code?
<LdBeth>
Even auto generated code can avoid that easily
<loke>
ebrasca: Maxima implements this
<loke>
You have a simplifier function that takes an expression, and simplifies it, such as: ((MTIMES) x x) → ((MEXPT) x)
<loke>
sorry ((MEXPT) x 2)
aeth has quit [Ping timeout: 265 seconds]
aeth has joined #lisp
karlosz has joined #lisp
doublex has quit [Quit: Leaving]
<ebrasca>
loke: Can maxima replace (loop :for i :from 1 :to 10 :sum i) with someting like (/ (* (+ 1 10) 10) 2) ?
karlosz has quit [Client Quit]
karlosz has joined #lisp
jackdaniel2 has joined #lisp
doublex has joined #lisp
karswell has quit [Ping timeout: 246 seconds]
georgie_ has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
<no-defun-allowed>
Maxima doesn't work on arbitrary CL code, and I don't think it has too many imperative constructs either.
libertyprime has quit [Ping timeout: 252 seconds]
<ebrasca>
I like to have optimizations like this.
<aeth>
you'd want a separate macro for that because, well, once you go declarative you lose a lot of determinism. Changeg one thing and suddenly O(1) to O(n!)
<aeth>
*Change
<aeth>
Summation identities should be simple enough to put in a macro
JohnMS_WORK has joined #lisp
<loke>
ebrasca: Yes
<loke>
It also expands sum(1/x^2, x, 1, inf) to pi^6/6
<loke>
pi^2/6
<no-defun-allowed>
I tried sum(x, x, 1, n) and didn't get the identity or anything like that.
<loke>
Since all Maxima equations are expressed as Lisp structures, you can easily use it programatically
<aeth>
iirc, I started doing something along those lines for my Project Euler solutions, but never cleaned it up enough to be useful
Duuqnd has joined #lisp
<edgar-rft>
Doesn't have Norvig in PAIP such a thing, where he tries to simplify math code?
<aeth>
just summations is a simpler problem, unless that's what he did
sauvin has joined #lisp
ravenousmoose has joined #lisp
jackdaniel2 has joined #lisp
<aeth>
the problem with rules is that you can never have enough rules in your system if you don't limit your scope
<aeth>
before you know it, you're going to be saying "sure, I guess integrals are technically in the scope of a summation macro"
mooch has joined #lisp
pjb has quit [Ping timeout: 252 seconds]
jackdaniel2 has quit [Read error: Connection reset by peer]
mooch2 has quit [Ping timeout: 250 seconds]
<ebrasca>
aeth: Do you think it is bad to optimize everiting automatically?
<edgar-rft>
For infinite scope you'd need an infinite number of rules. There's always at least one case left. Same why one can't handle *all* real-world problems with laws. :-)
* ebrasca
is thinking on some tipe of AI for optimizing code.
<aeth>
ebrasca: two potential downsides: (1) compilation time or (2) too magical so you can't actually tell what's going on
<aeth>
Machine Learning compiler optimizations would be the ultimate form of #2
<aeth>
Other approaches will probably impact #1
<ebrasca>
aeth: Are you sure about it? Why you can have easy to undestand and very good?
<edgar-rft>
Let's use the Emacs spell-checker for optimizing our code. :-)
<aeth>
I suppose the third downside is that you give up some dynamicness to be optimized. You can see this fairly directly what the currently-optimized CL looks like
<aeth>
ebrasca: If we're going to use Emacs to optimize code, I'll only trust M-x doctor
<aeth>
edgar-rft: ^
<aeth>
ebrasca: afaik optimizations are, well, the goal of optimizations is to take something that's easy to understand and make it hard to understand, but faster, so that the source code is as simple as possible
<ebrasca>
aeth: My undestanting is it is good idea to have AI optimized code.
<ebrasca>
AI can optimize for architectures, hardware and other situations.
<aeth>
The downside if you go too far is that it can be fragile. You wind up with a system you don't really understand and you can only hope to say the right magic words to make it run fast. SQL appears to me like a good example of this.
retropikzel has joined #lisp
flamebeard has joined #lisp
JohnMS has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
<ebrasca>
aeth: What about mixture of human and AI?
JohnMS_WORK has quit [Ping timeout: 265 seconds]
orivej has joined #lisp
JohnMS has quit [Read error: Connection reset by peer]
karlosz has quit [Quit: karlosz]
georgie_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
frgo has quit [Remote host closed the connection]
longshi has joined #lisp
JohnMS_WORK has joined #lisp
JohnMS_WORK has quit [Read error: Connection reset by peer]
longshi has quit [Client Quit]
pjb has joined #lisp
JohnMS_WORK has joined #lisp
shifty has quit [Ping timeout: 276 seconds]
shifty has joined #lisp
<p_l>
aeth: SQL is very much not such a system, mostly thanks to EXPLAIN and ANALYZE commands
manualcrank has quit [Quit: WeeChat 1.9.1]
<p_l>
but the distribution of the knowledge on them is pretty bad
mathrick has quit [Ping timeout: 240 seconds]
rgherdt has joined #lisp
karlosz has joined #lisp
<p_l>
(the joke goes that if you know how to use EXPLAIN there's a >$300k/year salary waiting for you)
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
varjag has joined #lisp
mathrick has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
Cymew has joined #lisp
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
kajo has quit [Ping timeout: 252 seconds]
jack_rabbit has quit [Read error: Connection timed out]
jack_rabbit has joined #lisp
jackdaniel2 has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
karlosz has quit [Quit: karlosz]
patrixl has quit [Quit: Leaving.]
mooch has quit [Read error: Connection reset by peer]
asarch has joined #lisp
ralt has joined #lisp
patrixl has joined #lisp
davepdotorg has joined #lisp
hhdave has joined #lisp
gareppa has joined #lisp
Vodyanoy has joined #lisp
<phoe>
morniiiing
<phoe>
let us discuss (subtypep `(cons (satisfies foo) (satisfies foo2)) `(cons (not float) t))
<no-defun-allowed>
Good morning ph -- oh
<phoe>
on a fully conforming implementation without FOO or FOO2 defined, is NIL NIL the only valid result?
gareppa has quit [Quit: Leaving]
<Josh_2>
That's what SBCL does
<Josh_2>
This one isn't as fun as the loop :finally discussion phoe xD
shifty has quit [Ping timeout: 240 seconds]
<phoe>
Josh_2: I don't ask about SBCL, I ask about the standard
<phoe>
also let us not discuss LOOP FINALLY anymore
lxbarbos` has joined #lisp
<phoe>
I am still sore after the last time
<ebrasca>
phoe: Hi
<Josh_2>
xD
asarch has quit [Quit: Leaving]
<phoe>
ebrasca: hey
<ebrasca>
phoe: Do you plan some metup?
<phoe>
ebrasca: nope
<ebrasca>
phoe: How are you going?
jonatack has quit [Ping timeout: 276 seconds]
<phoe>
ebrasca: going where? or doing?
<phoe>
I'm doing fine, enjoying some CCL hacking
gxt has quit [Ping timeout: 260 seconds]
<ebrasca>
phoe: Can I convince you to make some Mezzano hacking?
ljavorsk has joined #lisp
<phoe>
ebrasca: nope. I am already spending my time on fixing up another implementation.
rople has quit [Ping timeout: 276 seconds]
gxt has joined #lisp
<ebrasca>
phoe: My mother always told me I need to invest more stats in charisma
<phoe>
ebrasca: your charisma is fine, it is me who has already found some occupation
<ebrasca>
phoe: Some day I like to meet you in person again.
<phoe>
minion: memo for Bike: we screwed up. CLHS SATISFIES describes the type specifier as: "denotes the set of all objects that satisfy the predicate predicate-name, which must be a symbol whose global function definition is a one-argument predicate."
<minion>
Remembered. I'll tell Bike when he/she/it next speaks.
<phoe>
so (subtypep '(cons (satisfies foo) ...) ...) is meaningless unless #'FOO is defined.
rople has joined #lisp
<phoe>
minion: memo for Bike: but a quick (defun foo (x) (declare (ignore x)) (= 1 (random 2))) and the same for foo2 bar bar2 fix that issue.
<minion>
Remembered. I'll tell Bike when he/she/it next speaks.
<phoe>
This also answers the question I had above - the consequences are undefined so the implementation can return anything or nothing.
<phoe>
ebrasca: European Lisp Symposium next year is where I'll be, I'm also in Cracow all the time
jackdaniel2 has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
<jackdaniel>
good luck, I've heard that a maintainer is a very unresponsive person. first remark: add proper commit message, this does not tell me anything
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phoe>
OK
jonatack has quit [Ping timeout: 240 seconds]
Lycurgus has joined #lisp
jonatack has joined #lisp
jack_rabbit has quit [Read error: Connection timed out]
flamebeard has quit [Remote host closed the connection]
jack_rabbit has joined #lisp
Duuqnd has quit [Ping timeout: 265 seconds]
<jdz>
Isn't that a "flaky" test by definition?
<phoe>
Yes, it is flaky by definition.
<phoe>
CCL is overconfident about it though.
<phoe>
As in, it replies with NIL T and that seems not true to me.
ljavorsk_ has joined #lisp
frgo has quit [Remote host closed the connection]
<phoe>
Because that means that CCL is true that t1 is NOT a subtype of t2.
libertyprime has joined #lisp
ArthurStrong has quit [Quit: leaving]
ljavorsk has quit [Ping timeout: 240 seconds]
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
<phoe>
And as far as I understand, whether t1 is a subtype of t2 depends on a series of coin flips at typechecking time - it might be a subtype, it might not.
rople has quit [Ping timeout: 240 seconds]
<jdz>
Isn't there a constraint that the same type test for the same value should always return the same value?
<phoe>
Hm. I remember something like that now that you mention it... Let me find it.
<phoe>
SATISFIES does not mention it.
<phoe>
The page for TYPEP also states: A type-specifier of the form (satisfies fn) is handled by applying the function fn to object.
makomo has quit [Ping timeout: 240 seconds]
<phoe>
It also doesn't make too much sense to me - if I have an object with a slot, I can define a SATISFIES type that checks whether the value in that slot is true or false. Naturally, this means that every time I mutate the value of that slot, the "cached" results for SATISFIES are no longer valid.
<jdz>
I don't understand: how can you cache a result of SATISFIES test? What's the cache key?
<phoe>
"<jdz> Isn't there a constraint that the same type test for the same value should always return the same value?"
<phoe>
your question implies that caching is possible
<phoe>
if the same value is always returned, then we can always cache it
<jdz>
The same result of SATISFIES test for the same value; what' you're saying about the slots is that you're using a different value.
<phoe>
no, not really
<phoe>
I pass the same object to the predicate
<phoe>
the same as in EQ
<phoe>
it is the slots of that instance that are different
<jdz>
Well, if time is a parameter for a SATISFIES test, then I don't find such a type very useful :/
<phoe>
but - what happens when you define a type (satisfies slot-frobbed-p)
<phoe>
I know, right? SATISFIES types are basically runtime predicate calls
retropikzel has quit [Ping timeout: 252 seconds]
<phoe>
but - if there is such a constraint in the spec, then please do let me know
gabiruh_ has joined #lisp
cosimone has joined #lisp
gabiruh has quit [Ping timeout: 240 seconds]
frgo has joined #lisp
<phoe>
jackdaniel: added, sorry about the lack of commit message.
jackdaniel2 has joined #lisp
Lycurgus has quit [Ping timeout: 245 seconds]
jackdaniel2 has quit [Read error: Connection reset by peer]
ljavorsk__ has joined #lisp
ironbutt has quit [Remote host closed the connection]
ljavorsk_ has quit [Ping timeout: 265 seconds]
frgo has quit [Remote host closed the connection]
frgo has joined #lisp
rgherdt has quit [Remote host closed the connection]
rgherdt has joined #lisp
frgo has quit [Ping timeout: 252 seconds]
frgo has joined #lisp
Necktwi has joined #lisp
enrio has joined #lisp
enrioog has joined #lisp
rgherdt has quit [Ping timeout: 252 seconds]
jonatack has quit [Ping timeout: 250 seconds]
frgo has quit [Ping timeout: 265 seconds]
Vodyanoy has left #lisp ["Leaving"]
cosimone has quit [Quit: Terminated!]
enrio has quit [Read error: Connection reset by peer]
enrioog has quit [Read error: Connection reset by peer]
cosimone has joined #lisp
jackdaniel2 has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
jackdaniel2 has joined #lisp
ebrasca has quit [Remote host closed the connection]
jackdaniel2 has quit [Read error: Connection reset by peer]
jackdaniel2 has joined #lisp
rgherdt has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
rgherdt has quit [Ping timeout: 265 seconds]
clothespin_ has quit [Ping timeout: 265 seconds]
frgo has joined #lisp
frgo has quit [Ping timeout: 240 seconds]
flamebeard has joined #lisp
frgo has joined #lisp
frgo has quit [Remote host closed the connection]
flamebeard has quit [Ping timeout: 265 seconds]
frgo has joined #lisp
jackdaniel2 has joined #lisp
bacterio has quit [Read error: Connection reset by peer]
brown121407 has joined #lisp
brown121408 has quit [Read error: Connection reset by peer]
Kevslinger has joined #lisp
<phoe>
minion: memo for Bike: OK, here is the first rough draft of my range-merging hack. https://plaster.tymoon.eu/view/1557#1557 Works on CCL, should work on SBCL with minor modifications.
<minion>
Remembered. I'll tell Bike when he/she/it next speaks.
enrio has joined #lisp
amerlyq has joined #lisp
retropikzel has joined #lisp
<phoe>
In theory we could skip the whole checking if there any neighboring ctypes and just go straight for trying to find the exclusive points. I'll add that simplified version in the first annotation.
smokeink has quit [Ping timeout: 240 seconds]
ljavorsk__ has quit [Ping timeout: 240 seconds]
igemnace has joined #lisp
kajo has joined #lisp
davepdotorg has quit [Remote host closed the connection]
jackdaniel2 has quit [Read error: Connection reset by peer]
jackdaniel2 has joined #lisp
davepdotorg has joined #lisp
davepdotorg has quit [Read error: Connection reset by peer]
jackdaniel2 has quit [Read error: Connection reset by peer]
rgherdt has joined #lisp
kajo has quit [Ping timeout: 245 seconds]
stepnem_ has joined #lisp
stepnem has quit [Ping timeout: 265 seconds]
kajo has joined #lisp
rgherdt has quit [Ping timeout: 240 seconds]
makomo has joined #lisp
bjorkintosh has quit [Remote host closed the connection]
bjorkintosh has joined #lisp
mooch has joined #lisp
sindan has joined #lisp
<phoe>
jackdaniel: I screwed up. I did not format the comment that I inserted properly and I did not re-test the build after inserting the comment.
* jackdaniel
tries to look unsuspiciously and pretend that he didn't merge a broken commit.
<phoe>
no, I fucked up here - it's silly to blame the maintainer
<jackdaniel>
that's why I look unsuspiciously of course
<phoe>
(:
ljavorsk__ has joined #lisp
<jackdaniel>
truth to be told mere illusion of someone looking into things creates a backpressure to "make things right"; I'm not saying it is an illusion in this case of course
rgherdt has joined #lisp
<pfdietz>
Complaining that mutation can make a SATISFIES type declaration no longer hold is the same as complaining that RPLACA can make a CONS type declaration no longer hold.
<phoe>
pfdietz: thanks for a good analogy
clothespin has joined #lisp
<jackdaniel>
I can imagine satisfies predicate which tells if something has expired
<jackdaniel>
(expiredp timestamp) ; with time it will change its result
<phoe>
the way I understand it, SATISFIES can return arbitrary values on each call of the predicate
<jackdaniel>
yes
Bike has joined #lisp
<phoe>
so (defun foo (x) (= 1 (random 2))) is valid for (satisfies foo)
<jackdaniel>
sure
<phoe>
OK - so the ANSI-TEST SUBTYPEP.CONS.44 that I've written seems correct.
<pfdietz>
I generate (SATISFIES EVAL) in some random tests of type propagation. Have to make sure the thing being checked is not a cons or symbol.
<phoe>
uh wait a second, how is that even conf---
* phoe
looks up the definitions
<phoe>
SATISFY denotes the set of all objects that satisfy the predicate predicate-name, which must be a symbol whose global function definition is a one-argument predicate.
<phoe>
predicate n. a function that returns a generalized boolean as its first value.
krid has joined #lisp
<phoe>
...welcome to lisp, where every function is a predicate
<jdz>
"Generalized boolean."
<phoe>
yes
<jdz>
Right.
<phoe>
and everything is a generalized boolean
<phoe>
except (values) which just gets coerced into NIL
<jackdaniel>
not really, some functions may signal a condition
<jackdaniel>
other accept no arguments
<phoe>
jackdaniel: I mentioned a predicate, not a one-arg predicate up there (;
<jackdaniel>
(error) ; is it a predicate?
<jackdaniel>
((lambda () (error)) ; how about this?
<Bike>
zero argument predicate
<minion>
Bike, memo from phoe: we screwed up. CLHS SATISFIES describes the type specifier as: "denotes the set of all objects that satisfy the predicate predicate-name, which must be a symbol whose global function definition is a one-argument predicate."
<minion>
Bike, memo from phoe: OK, here is the first rough draft of my range-merging hack. https://plaster.tymoon.eu/view/1557#1557 Works on CCL, should work on SBCL with minor modifications.
<minion>
Bike, memo from phoe: but a quick (defun foo (x) (declare (ignore x)) (= 1 (random 2))) and the same for foo2 bar bar2 fix that issue.
<phoe>
there was some sorta predicate in Lisp that was allowed to signal conditions
<phoe>
I remember that discussion
<Bike>
i don't understand the screwup
ljavorsk__ has quit [Remote host closed the connection]
<pfdietz>
ENDP?
<phoe>
Bike: in our original discussion, we didn't define the predicate names for SATISFIES
<Bike>
well, yeah, they're hardly relevant.
<phoe>
pfdietz: right, that one
<jackdaniel>
phoe: we work on a definition you've mentioned now, error never returns generalized boolean
<pfdietz>
ENDP was always a strange duck
<phoe>
jackdaniel: yes, you are correct in that case - a function can't return a genbool if it can't return
<Bike>
if there's an implementation of subtypep that actually looks for function definitions i'd be surprised
<phoe>
Bike: you are correct, but conformance is conformance
<phoe>
I would actually be unsurprised if an implementation on high safety checked if these functions exist at typecheck-time and signaled errors if they didn't
<pfdietz>
A def-type-predicate macro, that defines predicates for use in satisfies, but in way that allows the type system to reason about the definitions, could be useful.
<Bike>
at type check time it needs to look up the function anyway...
<phoe>
Bike: uh wait a second
<phoe>
that's an undefined-function error anyway, right
<phoe>
I meant at type-definition time
<Bike>
that would be kind of nasty. you'd need to have functions defined in the compiler.
<phoe>
oh well
<phoe>
consequences are undefined anyway, so we can do what we're doing now.
<phoe>
anyway, I'm munching on the CCL type system to see where I can inject my range-checking stuff.
<pfdietz>
Another thing I'd like to see in CL is something like "if this function is called with arguments of types T1, T2, ... it returns something of type R."
<Bike>
i read a paper on incorporating types like that once
clothespin_ has joined #lisp
<phoe>
pfdietz: so basically return type promises that depend on the input types
<Bike>
so you'd define the type of car as (generic (function (null) null) (function (cons) t)) or something
<phoe>
you'd need the compiler to support that sorta thing so it can utilize that knowledge in its type inference engine
<pfdietz>
Right. One might even have parameterization: when called on (CONS ?X T), return ?X.
<pfdietz>
I would not be at all surprised if the scheme world did this somewhere.
clothespin has quit [Ping timeout: 250 seconds]
<Bike>
the more stuff like this the more uncomputable type operations get. lips's starts out more uncomputable than most, but still
Davd33 has joined #lisp
<Bike>
for example if you defined foo to have type (forall x (function (x) (cons t x))), then did (loop until (condition) do (setf x (foo x))), inferring the type of x afterward would be kind of a journey, and you'd probably need something to give up and pick cons
bitmapper has joined #lisp
bitmapper has quit [Client Quit]
<jackdaniel>
ah, I knew I saw somewhere defun*
<jackdaniel>
in a library defstar there is such a macro
<Bike>
jackdaniel: i mean in this case the idea would be defining multiple input output relationships, since CL already lets you describe one relationship overall
<jackdaniel>
regarding arg-types -> result-type I'm sure it would be possible to add something for non-standard generic functions, but that would be limited to classes -- imho a good thing
<jackdaniel>
types are a horrible mess
<jackdaniel>
s/types/arbitrary types/
Davd33 has joined #lisp
ljavorsk__ has quit [Remote host closed the connection]
<Bike>
well in this case it wouldn't have any semantic effect, just be information for the compiler to use
<trittweiler>
There's define-api in named-readtables which expands to an ftype declaim for the functions exported from the package. (With a nicer syntax, in my opinion, because it takes the type signature separately instead of convoluting it into the parameter list.) The ftype declaration is nice because it lets sbcl often find type mismatched on compile-time.
<jackdaniel>
but then you'd either need to check the resulting type anyway or trust it foolhardily (like with invalid declarations)
<Bike>
yeah but that's true with any type declaration. this would just let you get more specific declarations, hopefully
bitmapper has joined #lisp
Davd33 has quit [Remote host closed the connection]
amerigo has joined #lisp
ljavorsk__ has joined #lisp
lxbarbos` has left #lisp ["ERC (IRC client for Emacs 27.0.50)"]
shifty has joined #lisp
jackdaniel2 has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
ljavorsk__ has quit [Remote host closed the connection]
<pjb>
ebrasca: optimizing compilers already transform (* 3 x x) into (let ((reg (* x x))) (+ reg reg reg)) !!!
<pjb>
ebrasca: try it in sbcl, I wouldn't be surprised that both (* 3 x x) and (+ (* x x) (* x x) (* x x)) compile to the same thing.
<pjb>
ebrasca: (or with gcc).
<jackdaniel>
I think that gcc would have a problem with compiling (* 3 x x)
<pjb>
not if you use linc to convert it into C code…
<jackdaniel>
or if you hire a person to rewrite the code, in this spirit we could say that any compiler optimizes anything into whatever, because it may be rewritten by some tool or a person ,)
<jackdaniel>
I wouldn't split that hair in four but some people do it a lot, so I thought I'll join the party
<pjb>
Always fun to do it. Would have you known about linc if not?
<jackdaniel>
am I benefacted by such knowledge or just burdened? (afk for a while)
Davd33 has joined #lisp
krid has quit [Read error: Connection reset by peer]
Davd33 has quit [Remote host closed the connection]
<jackdaniel>
I don't think that quicklisp is a sane requirement for testing gcc optimizations (also ditto, "in this spirit we could…")
<pjb>
jackdaniel: use the lisp REPL as a shell! No choice anyways, chsh /usr/local/bin/ccl has been done.
<jackdaniel>
^ completely fails as the argument for the thing discussed (a is b because c, but hey, you may z) - I had my share of entertainment, see you \o
<pjb>
jackdaniel: I demonstrated that gcc has no problem compiling (* 3 x x) if you use linc as pre-processor!
<pjb>
jackdaniel: and as the maintainer of ecl, you should be ashamed of your objection, since ecl compiles (* 3 x x) with gcc!!!
jackdaniel2 has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
ferada has left #lisp [#lisp]
PuercoPope has joined #lisp
whiteline_ has joined #lisp
whiteline has quit [Ping timeout: 250 seconds]
random-nick has joined #lisp
<ebrasca>
pjb: Why gcc?
<ebrasca>
pjb: What is linc ?
<pjb>
ebrasca: see the paste, it shows what linc is. linc is to C what linj is to Java.
Davd33 has joined #lisp
Davd33 has quit [Remote host closed the connection]
Davd33 has joined #lisp
<PuercoPope>
jasom: One of the main problems I've encountered with JSCL is that it needs 'run-time' support for mapping CL objects to the semantics of JS. You mentioned the numeric tower, bit-vectors also come to mind. Given that wasm can also export functions to the host (JS in the case of browsers), what do you think of using wasm to implement things like integer arithmetic and have JSCL rely on them?
EvW has joined #lisp
q9929t has quit [Quit: q9929t]
smazga has joined #lisp
reggie__ has quit [Remote host closed the connection]
kajo has joined #lisp
count3rmeasure has joined #lisp
mulk has quit [Ping timeout: 276 seconds]
mooch has quit [Ping timeout: 245 seconds]
Davd33 has quit [Remote host closed the connection]
Davd33 has joined #lisp
Davd33 has quit [Client Quit]
Davd33 has joined #lisp
random-nick has quit [Ping timeout: 240 seconds]
jackdaniel2 has joined #lisp
Davd33 has quit [Remote host closed the connection]
mooch has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
FreeBirdLjj has quit [Remote host closed the connection]
varjag has quit [Quit: ERC (IRC client for Emacs 25.2.2)]
refpga has joined #lisp
reepca has joined #lisp
<reepca>
Is there a way for initforms in DEFSTRUCT to refer to each other? For example, I've got a queue struct and it needs the tail to initially be the head, and the head to initially be a fresh cons cell
<Shinmera>
you can use the :constructor and make the tail be &optional, referring to the head.
edgar-rft has quit [Quit: Leaving]
<Bike>
or &aux if you never want to initialize the tail separately, i think
<pjb>
reepca: yes, use &aux, it's made for that.
refpga has quit [Remote host closed the connection]
jjkola has quit [Ping timeout: 246 seconds]
dddddd has joined #lisp
brown121408 has joined #lisp
LiamH has joined #lisp
brown121407 has quit [Ping timeout: 276 seconds]
jackdaniel2 has joined #lisp
refpga has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
jackdaniel3 has joined #lisp
flamebeard has joined #lisp
rippa has joined #lisp
jackdaniel3 has quit [Read error: Connection reset by peer]
FreeBirdLjj has joined #lisp
jjkola has joined #lisp
flamebeard has quit [Ping timeout: 252 seconds]
slyrus__ has joined #lisp
slyrus_ has quit [Ping timeout: 240 seconds]
jjkola_ has joined #lisp
wilfredh has joined #lisp
jjkola has quit [Ping timeout: 252 seconds]
jjkola_ is now known as jjkola
brown121408 has quit [Read error: Connection reset by peer]
brown121407 has joined #lisp
brown121407 has quit [Read error: Connection reset by peer]
brown121407 has joined #lisp
refpga has quit [Remote host closed the connection]
<jackdaniel>
pjb: essentially what you say is falsehood, A + B = B; where A is not 0 (licn + gcc = gcc), so it doesn't, well, add up. when you take everything verbatim at least make your claims logical
amerigo has quit [Quit: Connection closed for inactivity]
<pjb>
jackdaniel: you would have to define formally + for things like linc and gcc…
shifty has quit [Ping timeout: 265 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #lisp
brown121408 has joined #lisp
<LdBeth>
GG
brown121407 has quit [Ping timeout: 240 seconds]
FreeBirdLjj has quit [Ping timeout: 252 seconds]
bitmapper has quit [Read error: Connection reset by peer]
bitmappe_ has joined #lisp
oni-on-ion has joined #lisp
amerigo has joined #lisp
hhdave has quit [Quit: hhdave]
hhdave has joined #lisp
hhdave has quit [Ping timeout: 276 seconds]
varjag has joined #lisp
Davd33 has joined #lisp
khisanth_ has quit [Ping timeout: 276 seconds]
Lycurgus has joined #lisp
jackdaniel2 has joined #lisp
Davd33 has quit [Ping timeout: 240 seconds]
jackdaniel2 has quit [Read error: Connection reset by peer]
khisanth_ has joined #lisp
ljavorsk__ has joined #lisp
rgherdt has joined #lisp
mn3m has joined #lisp
asarch has joined #lisp
vlatkoB has quit [Remote host closed the connection]
brown121407 has joined #lisp
brown121408 has quit [Read error: Connection reset by peer]
pauljb has joined #lisp
asarch has quit [Quit: Leaving]
edgar-rft has joined #lisp
bitmappe_ has quit []
bitmapper has joined #lisp
pauljb has quit [Ping timeout: 246 seconds]
rgherdt has quit [Ping timeout: 240 seconds]
warweasle has joined #lisp
ravenousmoose has joined #lisp
retropikzel has quit [Quit: Leaving]
Achylles has quit [Quit: Leaving]
dale_ has joined #lisp
Lycurgus has quit [Remote host closed the connection]
dale_ is now known as dale
karlosz has joined #lisp
jackdaniel2 has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
karlosz has quit [Quit: karlosz]
<jasom>
PuercoPope: that's fairly reasonable, as is having JSCL compile to an IR and have WASM interpret the IR.
<PuercoPope>
jasom: The 'IR' (or would AST be more accurate) is fairly close to JS and depends on having its data-types. Don't think it would be easy to write a wasm interpreter for that
xuxuru has joined #lisp
ljavorsk__ has quit [Ping timeout: 245 seconds]
sauvin has quit [Read error: Connection reset by peer]
bitmapper has quit [Ping timeout: 240 seconds]
slyrus has joined #lisp
<jasom>
PuercoPope: fair enough
slyrus__ has quit [Ping timeout: 276 seconds]
wilfredh has quit [Quit: Connection closed for inactivity]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
bacterio has joined #lisp
rgherdt has joined #lisp
warweasle has quit [Quit: rcirc on GNU Emacs 24.4.1]
lxbarbosa has joined #lisp
vaporatorius has joined #lisp
ralt has quit [Quit: Connection closed for inactivity]
Davd33 has joined #lisp
Davd33 has quit [Remote host closed the connection]
vibs29 has joined #lisp
cmatei has quit [Ping timeout: 264 seconds]
flamebeard has joined #lisp
vibs29 has left #lisp [#lisp]
jackdaniel2 has joined #lisp
jackdaniel2 has quit [Read error: Connection reset by peer]
gravicappa has quit [Ping timeout: 265 seconds]
flamebeard has quit [Remote host closed the connection]