kozy_ has quit [Read error: Connection reset by peer]
trocado has quit [Ping timeout: 268 seconds]
<v0|d>
does universal-time fit into a fixnum, or should I use integer?
meep has joined #lisp
<v0|d>
or maybe unsigned-byte of ?
fikka has quit [Ping timeout: 260 seconds]
dtornabene has quit [Read error: Connection reset by peer]
<pjb>
v0|d: (typep (get-universal-time) 'fixnum) #| --> t |#
<pjb>
v0|d: obviously, it depends on the date, and on the implementation/platform!
<v0|d>
indeed.
<pjb>
v0|d: universal time n. time, represented as a non-negative integer number of seconds. Absolute universal time is measured as an offset from the beginning of the year 1900 (ignoring leap seconds). See Section 25.1.4.2 (Universal Time).
<pjb>
therefore you should use integer (or indeed, unsigned-byte).
<v0|d>
is there way to learn how many bits fixnum has on an implementation?
<pjb>
Why do you lose your time asking here, when you have all the answers in your brains and in clhs?
<v0|d>
I get confused all the time, self defeating behaviour is permanent i guess:p
<v0|d>
pjb: would you mind fixing sb-profile in ecl some time in future?
<v0|d>
:)
<pjb>
I'm busy, but for enough bitcoins, I may.
<v0|d>
nice.
kozy has joined #lisp
<v0|d>
(integer-length (get-universal-time)) => 32, so if I want my programs to fail next year, um.. (integer-length (* 365 24 60 60)) => 25, (- 32 25) => 7, 128 yrs to fail if I set the type to 33 unsigned.
<v0|d>
pjb: thnx btw.
Josh_2 has quit [Ping timeout: 240 seconds]
Xach has quit [Ping timeout: 264 seconds]
meep has quit [Ping timeout: 240 seconds]
Xach has joined #lisp
lemo has quit [Changing host]
lemo has joined #lisp
EvW has quit [Ping timeout: 260 seconds]
dale has joined #lisp
fikka has joined #lisp
<pjb>
v0|d: you are crazy. You're giving yourself more work just to have it fail!
Fare has joined #lisp
<pjb>
Forget about types! CL deals with them just as well as with memory!
fikka has quit [Ping timeout: 240 seconds]
sabrac has joined #lisp
lemo has quit [Quit: lemo]
Fare has quit [Ping timeout: 256 seconds]
skidd0 has quit [Quit: WeeChat 2.1]
<LdBeth>
morning
<aeth>
pjb: If I wanted to forget about types I'd program in JavaScript.
<aeth>
Types in CL are great if you want code to fail at a certain spot and not at some random spot way later
<v0|d>
they are no asserts, no?
<aeth>
You can assert, you can check-type, or you could put the type in some place where in some implementations it might be checked, like :type in struct slots (most), :type in standard-object slots (only CCL at default debug levels?), specialized arrays, function type declarations, etc.
TheSilentLink12 has joined #lisp
TheSilentLink12 has quit [Killed (Sigyn (Spam is off topic on freenode.))]
<White_Flame>
implicit assert-style checking of data types is implementation specific, and likely based on safety settings.
<v0|d>
(declare (type (or) nenolod))
<aeth>
Oh, I forgot THE
<White_Flame>
just get your code working first for the broad/naive cases
<aeth>
So many places where types (may) get used
<v0|d>
I still don't know how string are typed in CL. I get confused all the time. simple-array vector, array, base-string etc.
svillemot has quit [Ping timeout: 276 seconds]
krwq has joined #lisp
<aeth>
Strings are arrays of characters. The other types are just alternate names that may or may not be used in place of the array of character names.
<aeth>
I'm guessing base-string is a string of base-chars
<White_Flame>
the supertypes list in CLHS for string & base string helps
krwq has quit [Remote host closed the connection]
<White_Flame>
and yeah to your guess
dale has quit [Remote host closed the connection]
<v0|d>
why vector & array?
<aeth>
I'm guessing in most useful modern implementations character includes #\é and the rest of unicode and base-char is ascii so would include #\e but not #\é
<aeth>
It would be nice to have the concept of character encoding in the language. Yet another thing that no update to the standard causes.
<v0|d>
thats why I wanted to have specializers to discriminate strings and unsigned-byte arrays but failed.
smasta has joined #lisp
<aeth>
v0|d: If you used a list instead of 1D arrays, you would (1) have to have the concept of typed CONSes that can be verified in O(1) time and (2) would basically have C-strings (nil-terminated instead of NUL-terminated, though) with worse performance and memory
<aeth>
The options are 1D array, list, or its own sequence data type
<v0|d>
aeth: when should one use vector, when to use array?
Fare has joined #lisp
<v0|d>
there are not ctors for vector ie make-vector obviously.
<v0|d>
in the type lattice we have vector.
<aeth>
A vector is a 1D array. Confusingly, most implementations seem to present 1D arrays as arrays (not vectors) except when simple-vectors (non-specialized, 1D, not displaced, no fill pointer, not adjustable).
<v0|d>
ah OK isee now.
<aeth>
(simple-array 'single-float (3)) if specialized for single-floats vs. (simple-vector 3) if it can hold T
<aeth>
Would be a bit less confusing if you could say (simple-vector 'single-float 3)
sabrac has quit [Quit: Konversation terminated!]
<aeth>
oops (simple-array single-float (3))
<aeth>
It's a bit confusing when you quote and don't quote types
<v0|d>
(type-of "ABC") => (simple-array character (3))
<v0|d>
not simple-vector
sabrac has joined #lisp
<White_Flame>
simple-vector is always specialized to type T (very unfortunately)
<White_Flame>
strings are specialized to a character type
<v0|d>
ah.
<v0|d>
so there are no other vectors other than simple-vector?
<White_Flame>
vector
pioneer42 has left #lisp [#lisp]
<v0|d>
can we have a type t adjustable vector?
<aeth>
v0|d: Sorry if I was unclear, I meant to say what White_Flame said. That it would have been less confusing if simple-vector wasn't always specialized to type T
<White_Flame>
v0|d: sure
<White_Flame>
arrays are multidimensional, with all sorts of options available
<White_Flame>
vector means 1-d, simple-* means no fancy options
<aeth>
v0|d: you can have whatever you want in arrays (even 0D arrays which are, unfortunately, not optimized in SBCL because no one uses them... although they could have uses as a way to manually control boxing of double-floats/bignums/etc.)
<v0|d>
wonderful, thnx 4 the info.
<aeth>
The only catches are that (1) the syntax is bad (well, not really bad, it just has to support a lot of things), to the point where you probably should be defining your own trivial constructor (ideally inline) for any array you use in your code
<aeth>
and (2) the implementation has to support the element-type you want to use and in the standard they are only required to support bit and character
<aeth>
(I guess base-char, too)
SoraFirestorm has joined #lisp
<SoraFirestorm>
hello friends
<v0|d>
is there a way to distinguish a string from (array (unsigned-byte 8)) in a method specializer?
<aeth>
You can pretty reasonably assume (unsigned-byte 8), and probably can also expect to see signed/unsigned bytes of size 8, 16, 32, and 64 as well as fixnum and a bunch of random integer sizes (which are probably the 32 bit fixnum size for a given implementation as well as just unsigned fixnums, etc.)
<aeth>
You can also assume single-float and double-float. Only CLISP doesn't have those.
<aeth>
(Unless you want to be ultra-portable.)
<sabrac>
SoraFirestorm: Hello
<aeth>
Oh, and if they're not supported they become T arrays, you don't get an error.
<SoraFirestorm>
So someway or another, I managed to bork Quicklisp
<SoraFirestorm>
How can I reinstall but not wipe out the installed package information?
<aeth>
v0|d: Characters aren't integers in Common Lisp. You convert to/from integers with char-code and code-char. Portability libraries are needed for things like decoding ub8-as-utf8 into characters.
<v0|d>
aeth: octets-to-string and friends.
<aeth>
right
<v0|d>
thats why I need that kindof specializer.
guicho has joined #lisp
<aeth>
What do you mean?
<sabrac>
SoraFirestorm: What installed package information are you trying to retain? And how many packages?
<SoraFirestorm>
I just want it to remember all of the packages I have installed
<v0|d>
aeth: err, i mean a clos version of (defun fun (a) (typecase a ((array (ub-8)) ..) ((vector base-char) ..)))
<SoraFirestorm>
and it look like only 4-5 or so
<SoraFirestorm>
Although I can't say for sure how many are truly 'installed'
<meepdeew>
returns => DANCING, shouldn't that make the initial form equal to
<meepdeew>
(equal (list DANCING) (list 'DANCING))
<meepdeew>
which is not true.
<meepdeew>
I hope that makes sense as a question. I'm apparently not entirely clear on the distinction between reader and evaluator and whatnot. Also, apologies for the lack of formatting in the code snippets.
karlosz has quit [Quit: karlosz]
smasta has quit [Ping timeout: 268 seconds]
FareTower has joined #lisp
Fare has quit [Ping timeout: 240 seconds]
smasta has joined #lisp
nullniverse has quit [Remote host closed the connection]
fikka has joined #lisp
nullniverse has joined #lisp
nicht has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<pierpa>
try evaluating (list (first '(dancing bear))) and then (list 'dancing). what do you get in the cases?
nicht has quit [Excess Flood]
<pierpa>
*in the two cases
nicht has joined #lisp
fikka has joined #lisp
FareTower has quit [Ping timeout: 264 seconds]
fikka has quit [Ping timeout: 244 seconds]
<LdBeth>
you get error for eval (list DANCING)
<LdBeth>
error: DANCING is unbound
lemo has quit [Read error: Connection reset by peer]
<beach>
meepdeew: The quote character is a reader macro that turns '<mumle> into (quote <mumble>) and QUOTE is a special operator that when given <mumble> as an argument, returns <mumble> unevaluated.
<beach>
meepdeew: So when you evaluate (equal (list (first '(dancing bear))) (list 'dancing)), the evaluator sees EQUAL and knows it is a function. The rule for evaluating function forms is to first evaluate the arguments and then apply the function.
<beach>
So it evaluates (list (first '(dancing bear))) and (list 'dancing) recursively.
fikka has quit [Ping timeout: 248 seconds]
<beach>
Now LIST is a function as well, so in (list (first '(dancing bear))), the argument (first '(dancing bear)) is evaluated. Again FIRST is a function, so the argument '(dancing bear) or rather (quote (dancing bear)) is evaluated. QUOTE is a special operator so (dancing bear) [a list of two elements] is returned. FIRST takes that list and returns the first element which is the symbol DANCING.
<beach>
Now, LIST has evaluated its arguments, so LIST is called with the symbol DANCING as its argument, so the list (DANCING) is returned.
didi has joined #lisp
<beach>
Next, (list 'dancing) is evaluated. LIST is a function so the form 'dancing or rather (quote dancing) is evaluated. QUOTE is a special operator so it returns the symbol DANCING. Now LIST is applied to a single argument which is the symbol DANCING, so the list (DANCING) is returned.
<didi>
How can I compare two class objects for equality?
<beach>
Finally, EQUAL is called with the two arguments (DANCING) and (DANCING). Equal compares the two and returns true.
<beach>
He explains why what you want to do does not make sense as a general operation, so you have to implement it yourself.
<didi>
Hum. I still want to compare (class-of foo) against (class-of bar).
<beach>
meepdeew: Is that clear?
<beach>
didi: Those two can be compared using EQ.
<didi>
beach: Ah, nice. Thank you.
<beach>
esrarkesh: I just summarized the evaluation rules. There were no macros in the example though.
<esrarkesh>
beach: thank you
orivej has quit [Ping timeout: 240 seconds]
<beach>
meepdeew: When you try to evaluate the form (list dancing) it goes like this: The operator LIST is a function, so the arguments are first evaluated. The argument is the symbol DANCING. The evaluation rule for a symbol is to consider to be a variable. Therefor the evaluator tries to look up the value of the variable DANCING, which fails.
edgar-rft has quit [Quit: Leaving]
SaganMan has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
eminhi has quit [Ping timeout: 268 seconds]
<asarch>
How many parents are there? STANDARD-CLASS, STANDARD-OBJECT, CONDITION, and...?
nowhere_man has quit [Ping timeout: 268 seconds]
didi has left #lisp ["there are always reasons to /part"]
<asarch>
However, in clisp (#<STANDARD-CLASS CONDITION> #<STANDARD-CLASS STANDARD-OBJECT> #<BUILT-IN-CLASS T>)
fikka has quit [Read error: Connection reset by peer]
<asarch>
"Package MOP does not exist."
<beach>
asarch: You need to learn to read what we say.
<asarch>
It worked with (sb-mop:... )
<asarch>
I'm on the way
nicht has quit [Ping timeout: 256 seconds]
<beach>
"It's MOP" means that it is defined by the Meta-Object Protocol. The package used for that differs in each implementation.
<asarch>
I remember while I was reading Sonja E. Keeney's book about CLOS that she mentioned the name of another "super parent class"
<beach>
asarch: That's why we have the CLOSER-MOP system, so that you can be independent of your implementation.
aindilis has quit [Ping timeout: 256 seconds]
<asarch>
I see
<esrarkesh>
j #lispweb
<esrarkesh>
oops
SaganMan has joined #lisp
Jesin has quit [Quit: Leaving]
<beach>
asarch: If you give me the page reference, I'll look it up.
<asarch>
I don't have my "book" at hand
<asarch>
I need to check it with calm
skapata has quit [Remote host closed the connection]
<asarch>
I can't find the name of that class in my notes
<beach>
Did you see the picture. The ones defined by the MOP are all in there.
xrash has quit [Ping timeout: 264 seconds]
<asarch>
I have several notebooks about Lisp, and I am doing a "reference manual" for my own
<beach>
Nice.
<asarch>
Yes, I did. I didn't know there were a lot of them
karswell_ has quit [Remote host closed the connection]
fikka has joined #lisp
karswell_ has joined #lisp
<asarch>
In this new notebook, I am writing the way Lips does things. For example, how it does OOP, Signals conditions, packages, etc
<asarch>
For this weekend I started to read chapters 30 and 31 from PCL
<asarch>
It's a nice exercise to review what I know and what I don't
Pixel_Outlaw has quit [Quit: Leaving]
<asarch>
But any way. Thank you guys
<asarch>
Thank you very much :-)
* LdBeth
bussing learning ALGOL, no time for rest of AMOP
<LdBeth>
you're welcome
fikka has quit [Ping timeout: 256 seconds]
<beach>
meepdeew: Did you see my explanation?
<meepdeew>
@beach Oh, no, I was looking at #clnoobs, thank you! Reading it now
<beach>
Hope it helps.
<phoe>
pjb: how can one use ASDF as a general-purpose library like that?
fikka has joined #lisp
<phoe>
I have been thinking of it as something that does a similar job, but ASDF seems pretty damn specialized for me - it's based around working with Lisp systems.
<beach>
Shocking!
orivej has joined #lisp
test1600 has joined #lisp
<phoe>
No, really. I have no idea how I could (ab)use ASDF for performing so-called business logic.
<aeth>
It doesn't sound like the right answer.
<phoe>
I know, right?
<aeth>
It *is* possibly an answer, though. Weird.
fikka has quit [Ping timeout: 264 seconds]
<phoe>
It contains all the required mechanisms for dealing with dependencies and executing stuff. At the same time, it just sounds wrong to me.
<meepdeew>
beach: Oh jeez, super helpful. Thanks!
<beach>
meepdeew: Anytime.
<meepdeew>
I was double evaluating in my head. Specifically, I was trying to apply the rule you mentioned "The evaluation rule for a symbol is to consider to be a variable" to the result of (first '(dancing bear)).
<beach>
meepdeew: Yes, evaluation only happens once.
<beach>
er, make that "evaluation happens only once", or my (admittedly small) family will correct my grammar.
<phoe>
I want a system for executing chunks of program logic in a structured way.
<phoe>
...........which is one of the least specific things that could be said.
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
<LdBeth>
Sounds like literature programming
fikka has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 244 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
oldtopman has joined #lisp
fikka has joined #lisp
nullniverse has quit [Read error: Connection reset by peer]
kuwze has quit [Ping timeout: 252 seconds]
<asarch>
Yeah, the name of the other "super class" was CONDITION. Peter Seibel talks about it in the chapter #19 of the PCL. Sonja didn't even talk about STANDARD-CLASS
<asarch>
:-)
svillemot has joined #lisp
fikka has quit [Ping timeout: 268 seconds]
charh has quit [Quit: go for a walk in the park]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
fikka has joined #lisp
meepdeew has quit [Remote host closed the connection]
fikka has quit [Ping timeout: 240 seconds]
<phoe>
All right, time for me to code a tool that I'm thinking of.
elfmacs has joined #lisp
fikka has joined #lisp
Bike has quit [Quit: Lost terminal]
<jackdaniel>
isn't it that executing chunks of program logic in a structured way is literraly called the "program logic" and is implemented in language you write this program chunks (because is part of the program)? – like main function in C, or some function called start-loop?
<jackdaniel>
of course you can outsource part of your program to bash or other language and manage it that way, but it doesn't sound like a coherent solution
<phoe>
jackdaniel: kind of. I want to be able to declaratively describe dependencies between these chunks of program logic and the ways of starting new chunks once all of its dependencies are complete.
fikka has quit [Ping timeout: 240 seconds]
<phoe>
I don't want to outsource to bash or anything else, either - I'm looking for a Lisp solution to this.
fikka has joined #lisp
caltelt has quit [Ping timeout: 256 seconds]
<aeth>
phoe: That *does* sound a lot like ASDF
<phoe>
aeth: ASDF is Another *System* Definition Facility.
<phoe>
I don't want to define systems.
<aeth>
yeah, that's the one problem, the easiest way to do this would require each part to be in a different file
<phoe>
And that's an issue. ASDF is tailored towards systems and I don't want to hack a huge chunk out of it just to make it suitable for my purpose..
<phoe>
90% of these are irrelevant to me and I don't want to pretend that a logic chunk is a Lisp system as an excuse to use ASDF.
<aeth>
ooooh, unrelated, but :source-control sounds like an underused part of ASDF. I normally look up the right location by looking up the project in https://github.com/quicklisp/quicklisp-projects
<phoe>
aeth: well, that's right
<aeth>
I guess the URL to the main github/gitlab/sourceforce/bitbucket/etc. repo would go there
<phoe>
So, time to go back to coding. I'll try to write something that's much more generic than ASDF and quite possibly is capable of executing things asynchronously/in multiple threads.
<aeth>
I subconsciously improved the name
fikka has joined #lisp
Kevslinger has quit [Quit: Connection closed for inactivity]
<aeth>
phoe: Definitely. Is there an API in another language that you want to copy?
shka1 has joined #lisp
<phoe>
aeth: not really. Look at the link and description I posted 11 hours ago - these describe what I want kinda well.
<phoe>
21:55 < phoe> Tasks B and C can't start until A is finished. Task D can't start until B and C are finished. Once task D is finished, it returns a list of values - for each such value, an individual task E is started.
bsund has quit [Quit: zzZZz]
fikka has quit [Ping timeout: 248 seconds]
<aeth>
What I'd personally do is look to see if there's an established solution in another language that I could copy.
<aeth>
Obviously very loosely copy. Lispifying things usually changes a lot.
<phoe>
aeth: there actually is a decent solution in another language, except that language is called ASDF. (;
froggey has quit [Ping timeout: 240 seconds]
<aeth>
phoe: Not if you want multithreading, though.
froggey has joined #lisp
<phoe>
aeth: yes, that's a thing that I'll need to discuss.
<phoe>
Luckily, once I *properly* write a solution that doesn't require multithreading, then adding multithreading later shouldn't be a big issue.
<aeth>
Yes, properly.
<phoe>
Properly, as in, imagining how this is going to work when I add async to the mix.
pierpal has quit [Remote host closed the connection]
angavrilov has joined #lisp
<LdBeth>
Ah, so I think you want a init program like Apple’s launchd
<phoe>
LdBeth: kinda, yes. I haven't thought of that analogy before.
bleak has joined #lisp
fikka has joined #lisp
shka1 has quit [Ping timeout: 256 seconds]
<bleak>
CLOS is mainly based on the message passing Flavors and CommonLoops systems AFAICT, but isn't implicitly message-based itself. What prompted these changes? Is there a general history of OOP in Lisp?
marusich has joined #lisp
<beach>
bleak: The AMOP book may have something. Let me check...
fikka has quit [Ping timeout: 256 seconds]
<beach>
bleak: Some early attempts at OO had some SEND primitive, but that does not integrate well with first-class functions in Lisp.
<bleak>
beach: beach: It seems more Lispy to integrate it into the typical "first element is a function call" archetype, but early systems which did this (syntactically prefiguring modern CLOS) like CommonLoops say they're message-passing based underneath.
<bleak>
I've even seen papers from the '60s behind paywalls. So much for emailing the author to ask for a copy!
saki has quit [Read error: Connection reset by peer]
<beach>
bleak: A membership in ACM is very inexpensive.
<beach>
bleak: And it gives you access to all the articles from all the journals and conferences of the ACM.
saki has joined #lisp
<beach>
bleak: Anyway, a key phrase is that they wanted to encourage experimentation.
<beach>
So they defined CLOS in terms of a meta-object protocol, thereby allowing alternative paradigms to be experimented with.
<beach>
I suppose the predecessors were not defined this way.
<bleak>
I had a suspicion that they dropped message passing for the same reason Smalltalk did going from -76 to -80, for easier compilation to standard architectures while still being extensible. It seems to suffer less from this change.
<beach>
Possibly. I don't know how they implemented message passing, so I am unable to tell whether it was harder to compile than what CLOS does.
JuanDaugherty has joined #lisp
<beach>
bleak: What is the reason for this investigation of yours?
<bleak>
In its original form, independently formulated by Hewitt (Planner) and Kay (Smalltalk-71), message passing is extremely similar to fexprs - messages are passed in place of data and selectively evaluated by the reciever. Like the original fexprs, this thwarts conventional compilation and almost all optimizations, but provides a total paradigm of computing on par in generality with functional, procedural, and logic programming.
<beach>
Yes, I see. That would be inefficient indeed.
<bleak>
I think it should be looked into more, especially since advances in fexpr-Lisps such as Kernel make them a lot more practical.
jfb4` has joined #lisp
<beach>
It sounds like you have found yourself a research project.
<bleak>
Turns out there is a Lisp that is far more Lisp than Lisp.
<bleak>
No special forms, fully hygienic runtime macros, no border whatsoever between compilation and runtime.
<beach>
Sure. As usual, progress in compilation techniques allow more flexible languages while still maintaining efficient code.
pjb` has joined #lisp
pjb has quit [Ping timeout: 260 seconds]
<beach>
I should read that sometime.
<bleak>
It's great.
<beach>
Looks that way indeed.
<bleak>
The elephant in the room is that it might truly be impossible to compile these languages because so much is dependent on directly manipulating environments at runtime. Short of a proof, though, I won't stop trying.
<beach>
I totally encourage you to continue.
JuanDaugherty has quit [Quit: Exeunt]
<aeth>
bleak: What about JIT?
<bleak>
aeth: Shutt defines a partial evaluator somewhere in the paper (and those tend to perform better than JITs when fully developed, eg Truffle vs Hotspot), but even then, existing implementations are horrendously slow.
<bleak>
You know how both Ruby, Smalltalk, and CL all do late binding, but Ruby is significantly slower because it relies much more heavily on it? Well, there's late binding, and then there's this.
<bleak>
how Ruby*
guicho has quit [Remote host closed the connection]
<bleak>
Regardless, though, I'm not the right person to ask about JITs. Maybe it would help.
<beach>
bleak: We have made progress in generic dispatch though.
<beach>
Now, it is no more expensive than a call to an ordinary function that has to change the type of its argument before doing real work.
<beach>
bleak: I am guessing Common Lisp programmers stay away from generic functions because the generic dispatch used by popular implementations is based on PCL and it it not great for modern architectures.
<bleak>
Also, the partial evaluator has more to do with making sure that the caller can enforce a modicum of discipline on the callee to allow local reasoning about programs than it does with speeding it up, IIRC. I don't think much thought has been given to performance because it's so cutting-edge and so few people know about this.
test1600 has quit [Ping timeout: 268 seconds]
rippa has joined #lisp
<bleak>
beach: I wasn't aware of that.
<beach>
bleak: I encourage you to continue your research, to write down any progress, and to submit your results to ELS. Then we can discuss your progress there.
<beach>
The place for 2020 has not been decided yet.
<beach>
bleak: There are usually nearly 100 participants, so you have plenty of people to talk to. In particular, if you have an article and a talk, you will generate a lot of interest.
<clhsgang[m]>
the fuck, they want you talk ecmascript there?
<clhsgang[m]>
js is a lisp like lung cancer is a lung
<beach>
clhsgang[m]: This channel is dedicated to Common Lisp.
<clhsgang[m]>
the els homepage says they talk a lot of "lisp or lisp-like dialects"
<clhsgang[m]>
>any of the Lisp and Lisp-inspired dialects
wildbartty has quit [Remote host closed the connection]
wildbartty has joined #lisp
<beach>
Probably not.
<jmercouris>
is there any way to do this at all?
<beach>
It would need support from the underlying Common Lisp implementation.
<jmercouris>
all that comes to mind is launching another slime and connecting to the lisp, and writing some loop to print
<beach>
That won't work either.
<jmercouris>
why not?
<beach>
If it is a lexical variable you don't have access to it at all.
<jmercouris>
true
nowhere_man has joined #lisp
<beach>
And if it is a special variable, the bindings are per thread (other than the global one).
<LdBeth>
I believe efficiency is not the primary factor not adopting message passing in CL, at least not for FLAVOR
<jmercouris>
it could be a limited imlplementation perhaps
<phoe>
jmercouris: the closest thing I can imagine is, use a function call instead of a variable.
<phoe>
Then you don't have (setf foo ...) but (setf (foo) ...)
<phoe>
and #'(SETF FOO) can somehow notify the "watcher" that the value has just changed. Or call #'BREAK.
<jmercouris>
that is an interesting though
<jmercouris>
s/though/thought
<phoe>
You can define a symbol macro for FOO that will turn it into (FOO).
<phoe>
That should be kinda portable.
<bleak>
beach: The generic method optimization in Dylan (pg 3) sounds interesting.
<phoe>
jmercouris: and this means that you can use SYMBOL-MACROLET.
<bleak>
beach: Speaking of Dylan, what happened to Moon's PLOT?
<phoe>
jmercouris: and this means that you can (defmacro with-watching ((&rest variables) &body body) ...) that should work with code like (with-watching (foo) (setf foo 42)).
<bleak>
beach: It didn't really go anywhere, did it?
<beach>
I don't know. I doubt it. Paul Wilson had a similar idea, but he disappeared from academia.
<jmercouris>
phoe: I have to go for now, but I will save this in my notes and look at it later, thanks
jmercouris has quit [Remote host closed the connection]
renzhi has quit [Ping timeout: 256 seconds]
saki has joined #lisp
elfmacs has quit [Quit: WeeChat 2.2]
<bleak>
beach: Would the generic dispatch optimization potentially be sped up if they used cuckoo or robin hood hashing instead of linear probing (which is what it sounds like they're doing)?
<beach>
"they"?
<bleak>
The generic dispatch optimization paper that you posted earlier.
<bleak>
(the author)
<beach>
That's my paper. It is not linear because it uses binary search. Hashing is slower because it requires memory access. That's what PCL does.
<bleak>
Woops, I'm tired. Almost 2 in the morning here. I was re-reading it. :)
<beach>
This technique just compares an integer to small constants in the instruction stream. You can't be faster than that today.
trittweiler has joined #lisp
<beach>
US west coast?
<bleak>
Yeah.
<bleak>
If hash tables aren't more efficient than binary searchs, what's the point of them?
<bleak>
searches*
<beach>
The difference here is that the keys of the table are known at compile time, so you don't have to access memory to get to the keys. That's what makes it faster.
<beach>
The problem is the slowness of memory compared to registers and instruction stream.
random-nick has joined #lisp
<beach>
So even if you have a significant number of applicable methods, the binary search will only be log(n), and that is faster than a single memory access in most cases.
<beach>
And hashing requires several memory accesses, and a loop, etc.
<no-defun-allowed>
would it be any use to anyone if i cleaned up the network decentralisation model i've made for a project?
<no-defun-allowed>
basically the lib would provide socket glue and protocol stuff, and you write verification and storage functions
<beach>
bleak: Today, you can't think only in terms of asymptotic complexity of the RAM model. You need to take typical processors into account as well.
<beach>
... and typical use cases.
eminhi has joined #lisp
renzhi has joined #lisp
vaporatorius has joined #lisp
vaporatorius has quit [Changing host]
vaporatorius has joined #lisp
vap1 has joined #lisp
elfmacs has joined #lisp
zxcvz has joined #lisp
makomo has joined #lisp
jinkies has quit [Ping timeout: 245 seconds]
nickenchuggets has quit [Read error: Connection reset by peer]
nickenchuggets has joined #lisp
nickenchuggets has quit [Changing host]
nickenchuggets has joined #lisp
nickenchuggets has quit [Read error: Connection reset by peer]
bleak has quit [Ping timeout: 252 seconds]
karswell_ has quit [Ping timeout: 256 seconds]
pierpal has joined #lisp
shka1 has joined #lisp
orivej has joined #lisp
lumm has joined #lisp
vaporatorius has quit [Quit: Leaving]
renzhi has quit [Ping timeout: 256 seconds]
random-nick has quit [Read error: Connection reset by peer]
elfmacs has quit [Ping timeout: 268 seconds]
kenster has quit [Ping timeout: 244 seconds]
renzhi has joined #lisp
pjb`` has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
pjb` has quit [Ping timeout: 256 seconds]
terpri has quit [Ping timeout: 268 seconds]
vlad_ has joined #lisp
vlad_ is now known as DonVlad
fikka has joined #lisp
smasta has quit [Ping timeout: 264 seconds]
renzhi has quit [Quit: WeeChat 2.1]
kajo has quit [Ping timeout: 240 seconds]
random-nick has joined #lisp
lumm has quit [Ping timeout: 256 seconds]
zxcvz has quit [Ping timeout: 268 seconds]
koenig has quit [Read error: Connection reset by peer]
koenig has joined #lisp
pjb`` is now known as pjb
lumm has joined #lisp
xrash has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
jfb4`` has joined #lisp
jfb4` has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 268 seconds]
fikka has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
dddddd has joined #lisp
v0|d has joined #lisp
vlad_ has joined #lisp
fikka has joined #lisp
DonVlad has quit [Ping timeout: 240 seconds]
vlad_ is now known as DonVlad
Josh_2 has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
gector has quit [Read error: Connection reset by peer]
<phoe>
I can't assume that all of the users of my library have a CUDA-capable GPU. Additionally, I'll need to pass arbitrary Lisp data as tokens, so GPUs won't really be the best option.
<shka1>
beach: essentially like cuda, but portable on other hardware then nvidia gpu
<shka1>
radeon gpus, intel gpus
<beach>
Oh, nothing to do with Common Lisp then?
<shka1>
it can run on cpu as well
<shka1>
beach: you can generate it from CL, ala cl-cuda
<shka1>
there is a system for that in quicklisp
<beach>
OK.
<phoe>
OpenCL = Open Computing Language
<beach>
Got it.
<phoe>
that has an unfortunate acronym clash with Common Lisp
<beach>
Indeed. I was misled.
<phoe>
yep, so was I initially
elfmacs has joined #lisp
<shka1>
i did not realize this myself, sorry
<phoe>
hah, no problem
fikka has joined #lisp
<shka1>
anyway, cuda is industry standard, but i don't like how it is tied to nvidia gpus
<shka1>
opencl has more abstract execution model which i like
<shka1>
aaaaaanyway
<shka1>
beach: i presume that you are not a huge fan of petri nets?
fikka has quit [Ping timeout: 248 seconds]
<shka1>
it looks like something useful
smurfrobot has joined #lisp
orivej has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
orivej has joined #lisp
<pjb>
shka1: the problem is like with DFA vs. scanning, etc. They are mathematical structures that are studied a lot, but in practice, they're basically useless as is. You have to extend them, add real data and trigger actions, so the mathematical formula cannot be simply translated. You have to write more complex algorithms to make them something useful.
<shka1>
pjb: makes sense
pagnol has quit [Ping timeout: 240 seconds]
nckx has quit [Quit: Updating my GNU GuixSD server — gnu.org/s/guix]
rgrau has quit [Ping timeout: 268 seconds]
abeaumont has quit [Ping timeout: 256 seconds]
eagleflo has quit [Ping timeout: 256 seconds]
routermater has joined #lisp
routermater has quit [Client Quit]
lumm has quit [Quit: lumm]
routermater has joined #lisp
nicht has joined #lisp
X-Scale has joined #lisp
nckx has joined #lisp
rgrau has joined #lisp
<beach>
shka1: No, I have no opinions myself. All the work I have seen has been on proving properties of Pertri nets.
FareTower has joined #lisp
<shka1>
beach: that does not sound all that fascinating :(
<shka1>
i am surprised that nobody attempted to augment this theory and turn it into language for defining asynchronous system control
<shka1>
maybe even distributed systems
lumm has joined #lisp
orivej has quit [Ping timeout: 260 seconds]
nicht has quit [Quit: Leaving]
lumm has quit [Read error: Connection reset by peer]
lumm has joined #lisp
smurfrobot has quit [Remote host closed the connection]
reu has quit [Ping timeout: 256 seconds]
argoneus has quit [Quit: No Ping reply in 180 seconds.]
<p_l>
huh, the first time I heard of petri nets, they were described explicitly in terms of practical use
<p_l>
how the mighty has fallen :(
<p_l>
shka1: petri nets, afaik, were used in Apollo project for distributed computing synchronization
lumm has quit [Quit: lumm]
lumm has joined #lisp
argoneus has joined #lisp
svillemot has quit [Quit: ZNC 1.6.5+deb1+deb9u1 - http://znc.in]
FreeBirdLjj has quit [Remote host closed the connection]
karlosz has joined #lisp
* shka1
was looking for high quality scans of apollo blueprints so he could print those and use as decoration in his flat
* shka1
did not found anything :(
pagnol has joined #lisp
aindilis has joined #lisp
smurfrobot has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
argoneus has quit [Quit: No Ping reply in 180 seconds.]
lemo has quit [Quit: lemo]
gacepa has quit [Quit: Connection closed for inactivity]
lumm has quit [Remote host closed the connection]
lumm has joined #lisp
jfb4``` has joined #lisp
lemo has joined #lisp
jfb4`` has quit [Ping timeout: 240 seconds]
argoneus has joined #lisp
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
lumm_ has joined #lisp
lumm_ has quit [Remote host closed the connection]
smurfrobot has quit [Remote host closed the connection]
lumm has quit [Ping timeout: 256 seconds]
fikka has joined #lisp
asarch has joined #lisp
lumm has joined #lisp
<p_l>
shka1: most of Apollo stuff is dead in archives, with important details being dead along with the people who knew them
lumm has quit [Ping timeout: 260 seconds]
sabrac has quit [Quit: Konversation terminated!]
nanoz has joined #lisp
Bike has joined #lisp
FreeBirdLjj has joined #lisp
FareTower has quit [Ping timeout: 240 seconds]
reu has joined #lisp
Kundry_Wag has joined #lisp
smurfrobot has joined #lisp
caltelt has joined #lisp
eminhi has quit [Quit: leaving]
elfmacs has quit [Ping timeout: 260 seconds]
<pjb>
shka1: but it's used! in lectures about asynchronous systems and distributed systems.
<pjb>
shka1: the problem is mostly that it's useless to implement a web page.
<pjb>
or a payroll system.
routermater has quit [Ping timeout: 260 seconds]
<pjb>
It's a little like AI. A lot of big and important algorithms developped early by mathematicians are actually integrated now in specific tools, and are not famous anymore.
<p_l>
pjb: I can easily see it used in a payroll system, those things are crazy
FreeBirdLjj has quit [Remote host closed the connection]
smasta has joined #lisp
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
nowhere_man has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #lisp
smasta has quit [Ping timeout: 264 seconds]
FareTower has joined #lisp
FreeBirdLjj has quit [Ping timeout: 240 seconds]
saki has quit [Ping timeout: 240 seconds]
saki has joined #lisp
saki has quit [Client Quit]
<shka1>
it looks like it is difficult to represent position
<shka1>
that's essentially the hard part
Kundry_Wag_ has joined #lisp
<phoe>
Position? What do you mean?
<pjb>
shka1: not at all, it's easy: it's the marking vector.
<pjb>
and instead of using matrices of ℤ, use matrices of AN.
<shka1>
pjb: valiant effort sir, but i still don't understand
Arcaelyx_ has joined #lisp
<pjb>
shka1: this is a new kind of numbers, attributed numbers.
<pjb>
2{foo}*3{bar} = 6{foo,bar}
<pjb>
But there was a bug: AN = { (n,a) | n∈ℤ, a∈2^{foo,bar,baz} } ×:AN×AN, (n₁,a₁)x(n₂,a₂) = (n₁*n₂,a₁∪a₂)
<shka1>
uhm
<shka1>
pardon, i want to eat my dinner
Arcaelyx has quit [Ping timeout: 265 seconds]
test1600 has joined #lisp
fikka has joined #lisp
<FareTower>
pjb: what is union on A ?
<FareTower>
oh 2^
<FareTower>
static types to the rescue
fikka has quit [Ping timeout: 264 seconds]
<pjb>
That said, something like AN = { (n,a) | n∈ℤ, a∈{foo,bar,baz} } ×:AN×AN, (n₁,a₁)x(n₂,a₂) = (n₁*n₂,a₁∪a₂) would take a couple of pages in lisp and half an hour to type…
elfmacs has joined #lisp
meepdeew has joined #lisp
EvW has joined #lisp
test1600 has quit [Quit: Leaving]
<FareTower>
beach: bonjour
raynold has joined #lisp
<jgkamat>
hey, I'm quite used to the python "paradigm" of having keyword format arguments, for example
<jgkamat>
"test {name}".format(name=1). Is something like that available in cl format?
<jgkamat>
the reason why is that I can provide format arguments without actually using them in the format string sometimes
<FareTower>
jgkamat, that's not in cl:format, but there are many alternate packages
<jgkamat>
FareTower: do you know any of those? I'm having trouble finding any alternate implementations (at least on quicklisp)
Kundry_Wag_ has quit [Remote host closed the connection]
fourier has joined #lisp
hiroaki has joined #lisp
fikka has joined #lisp
charh has joined #lisp
caltelt has quit [Remote host closed the connection]
nika has joined #lisp
lemo has quit [Remote host closed the connection]
lumm has joined #lisp
lumm has quit [Client Quit]
FareTower has quit [Ping timeout: 256 seconds]
elfmacs has quit [Quit: WeeChat 2.2]
lumm has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
sjl_ has quit [Ping timeout: 264 seconds]
varjag has joined #lisp
smurfrobot has quit [Remote host closed the connection]
asarch has quit [Remote host closed the connection]
varjag has quit [Read error: Connection reset by peer]
Bike has quit [Quit: Lost terminal]
<Josh_2>
Has anyone used Spinneret? It doesn't seem to be closing <p> tags, I'm not sure if that's normal, the examples don't seem to show that
<Josh_2>
(with-html (:p "halp")) => <p>Halp
<Josh_2>
<p>halp*
pagnol has quit [Ping timeout: 268 seconds]
FareTower has joined #lisp
<Josh_2>
I'll just use Flute
Kundry_Wag has joined #lisp
smurfrobot has joined #lisp
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
lumm has quit [Read error: Connection reset by peer]
lumm_ has joined #lisp
lumm_ is now known as lumm
nowhere_man has joined #lisp
lumm has quit [Remote host closed the connection]
hiroaki has quit [Ping timeout: 260 seconds]
hiroaki has joined #lisp
varjag has joined #lisp
smasta has joined #lisp
meepdeew has quit [Remote host closed the connection]
lumm has joined #lisp
smurfrobot has quit [Remote host closed the connection]
smurfrobot has joined #lisp
lumm has quit [Client Quit]
mejja has joined #lisp
varjag has quit [Read error: Connection reset by peer]
smurfrobot has quit [Ping timeout: 260 seconds]
varjag has joined #lisp
lumm has joined #lisp
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
smurfrobot has joined #lisp
smasta has quit [Ping timeout: 240 seconds]
Inline has quit [Quit: Leaving]
<Josh_2>
I'm getting an error while trying to quickload :spinneret https://pastebin.com/tKJPXrq5 it was working just before I updated ql with (ql:update-dist "quicklisp")
<Josh_2>
Not sure who I report that to
newbie has joined #lisp
<Josh_2>
It's a problem with serapeum
varjag has quit [Read error: Connection reset by peer]
jinkies has joined #lisp
MoziM has joined #lisp
skapata has joined #lisp
hiroaki has quit [Ping timeout: 256 seconds]
FareTower has quit [Ping timeout: 245 seconds]
lumm has quit [Ping timeout: 256 seconds]
rozenglass has quit [Remote host closed the connection]
<Josh_2>
When I start up slime I'm getting a prompt saying slime and swank are different versions, is this okay?
<shka1>
Josh_2: update emacs
<Josh_2>
slime is 2.20 and swank is 2.21
AlexeyKamenew has joined #lisp
AlexeyKamenew has left #lisp [#lisp]
<shka1>
after updating quicklisp you went out of sync
<shka1>
just update emacs packages and you should be fine
<Josh_2>
I'm on version 25 and 25 is the version in my package manager
AlexeyKamenew has joined #lisp
smurfrobot has quit [Remote host closed the connection]
<shka1>
Josh_2: i ment elpa packages
<Josh_2>
Yes I just got that :)
smurfrobot has joined #lisp
AlexeyKamenew is now known as ortus
Josh_2 has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
Josh_2 has joined #lisp
smurfrobot has quit [Ping timeout: 268 seconds]
<Josh_2>
shka1 I updated all my packages and I'm still getting the same message
equwal has joined #lisp
<equwal>
How does this work? (let (#'10) (+ function 2)) => 12
<shka1>
(let ((function 10)) (+ function 2)) that's how
<shka1>
equwal: #'10 is read as (function 10) and since it is in the let form it evaluates to result you observed
<beach>
equwal: #' is a reader macro. When the reader sees #'<mumble> it builds and returns the list (function <mumble>)
<shka1>
you are making me anxious
<equwal>
Okay makes sense. Was thrown when I saw that, thanks.
random-nick has quit [Ping timeout: 240 seconds]
<beach>
equwal: You can also try (let ('10) (+ quote 2))
<equwal>
Oh the humanity!
<beach>
shka1: Me? Why?
pagnol has joined #lisp
<shka1>
i am wondering what is wrong with my explanation now
fikka has joined #lisp
<beach>
shka1: There is nothing wrong with it. I just wanted to expand on it a bit, like give an example.
<shka1>
ah, ok
<beach>
shka1: Call it an occupational hazard. I can't help it.
<beach>
Anyway, time to call it a day and to go spend time with my (admittedly small) family.
skapata has quit [Remote host closed the connection]
<v0|d>
(let (some-macro) ..) also works.
<beach>
v0|d: How so?
<v0|d>
some-macro can expand to ((a 1) (b 2)) etc.
skapata has joined #lisp
<beach>
v0|d: What makes you think that will work?
<v0|d>
seen it in SBCL code i guess.
<v0|d>
or ecl cannot recall.
<v0|d>
i was shocked:p
<beach>
Then I believe that implementation is incorrect.
fikka has quit [Ping timeout: 244 seconds]
ortus has left #lisp [#lisp]
<shka1>
beach: isn't that UB?
<equwal>
Would not some-macro need to be a reader macro?
<beach>
Why would it be?
<beach>
v0|d: The bindings of a LET form are not evaluated, and because of that, not macroexpanded either.
<beach>
v0|d: You should file an error report to the maintainers of that implementation.
<shka1>
clhs does not states that variable forms are not evaluated
<shka1>
so i assumed that this is undefined behavior
<beach>
shka1: Sure it does.
<beach>
shka1: Otherwise, most LET forms would signal an error.
<beach>
shka1: (let ((x 10) (y 20)) ...)
<beach>
Try ((x 10) (y 20)) as a form and you will see.
<shka1>
yeah, makes sense
<beach>
v0|d: So you were right to be shocked. I definitely would be.
<v0|d>
Maybe it was a reader macro nevertheless, never thought of writing such let form.
<beach>
That would be a very strange reader macro.
<shka1>
kinda pointless too
<beach>
Normally they are one or two characters long and not alphabetic.
<v0|d>
it basically mimix (apply #'(lambda (..) ..) (some-macr0))
<beach>
v0|d: When you find that occurrence, I would like to see it.
Josh_2 has quit [Quit: ERC (IRC client for Emacs 25.3.1)]
<Josh_2>
it was working before, however the repo on github hasn't changed
Kundry_Wag has quit [Ping timeout: 256 seconds]
EvW has quit [Ping timeout: 245 seconds]
pagnol has quit [Ping timeout: 260 seconds]
random-nick has joined #lisp
<random-nick>
if I want to have a macro that defines something in a separate namespace, what's the best way to implement it? using a global hashtable or using symbol properties?
nika has quit [Quit: Leaving...]
<Josh_2>
shka1: I reinstalled quicklisp, and it still isn't working
smasta has joined #lisp
<shka1>
random-nick: symbol properties are not that great
<shka1>
hashtable is acceptable
<shka1>
what i would like to do is to use generics and methods specialized on (eql symbol)
<shka1>
that's my favorite way to make extendable macros and stuff
ebrasca has quit [Read error: No route to host]
ebrasca has joined #lisp
<random-nick>
shka1: what are the downsides of symbol properties?
<equwal>
O(n) not O(1)
<equwal>
Hash tables are O(1)
<random-nick>
hash-tables are O(n) too
<pjb>
random-nick: you should define "separate namespace". Note that symbols are not defined in namespaces. Symbols are interned in packages. So defining a macro that interns symbols in different packages is something entirely different from defining soemthing in a separate namespace. You have to explain the later!
loli has quit [Read error: Connection reset by peer]
<pjb>
equwal: however, get is faster than gethash (as long as hash-count <= 5).
<random-nick>
pjb: what I meant is associating a provided symbol with a value
<random-nick>
globally and at macro-expansion time
<pjb>
random-nick: ok, so you want to associate the symbol with a value, but not as a dynamic binding or a lexical binding.
<pjb>
In what namespace do you want to associate them?
EvW1 has joined #lisp
<random-nick>
well, my own namespace
<pjb>
And how do you create bindings in this namespace?
<random-nick>
that's what I'm trying to find out
meepdeew has quit [Remote host closed the connection]
<pjb>
It's your own namespace, so you are god, it's you who decide how things are done in your stuff!@
<pjb>
You should have functions such as (make-random-nick-namespace name-of-namespace) (find-random-nick-namespace name-of-namespace) (bind-in-random-nick-namespace symbol value) (value-of-binding-in-random-nick-namespace symbol)
loli has joined #lisp
Kundry_Wag has joined #lisp
<shka1>
and generic functions works for that
NoNumber has joined #lisp
edgar-rft has joined #lisp
EvW1 has quit [Ping timeout: 245 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
svillemot has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
EvW has joined #lisp
nanoz has quit [Quit: Leaving]
fikka has joined #lisp
NoNumber has quit [Remote host closed the connection]
<equwal>
If your "separate namespace" only has five items, than efficiency doesn't really matter. Any programming language I have used stored its namespaces in hash tables. If they used linked lists, compilation and interpretation would take exponential time.
fikka has quit [Ping timeout: 244 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
pierpal has quit [Quit: Poof]
pierpal has joined #lisp
makomo has quit [Ping timeout: 240 seconds]
EvW has quit [Remote host closed the connection]
EvW1 has joined #lisp
makomo has joined #lisp
Inline has joined #lisp
jinkies has quit [Read error: Connection reset by peer]
shka1 has quit [Ping timeout: 260 seconds]
jinkies has joined #lisp
edgar-rft has quit [Quit: Leaving]
<pjb>
equwal: it depends. For example, if you consider LET forms, most often you have less than five variables bound. On the other hand, you have a lot of them. If you allocate a hash-table for each LET form, then you will use a lot of memory.
edgar-rft has joined #lisp
<pjb>
equwal: similarly for eg. objects. Most objects have only a few slots. But you have a lot of objects in programs. Using hash-table for them would uses too much space.
<pjb>
(in the case of objects, implementations normally use vectors, but without vectors, plists would be more time and space efficient than hash-tables).
<equwal>
You could always roll your own hash tables to make them more efficient if you need to, CL's hash tables are very general and inefficient.
<equwal>
If you use plists for that, expect comilation to take years for any large program.
<equwal>
If you plists are working for your narrow purpose, there is no need to go optimizing prematurely though.
v0|d has left #lisp ["ERC (IRC client for Emacs 25.2.1)"]
v0|d has joined #lisp
<beach>
random-nick: It seems you need first-class global environments.
<pjb>
I told you that get was faster than gethash!
pagnol has joined #lisp
<pjb>
If you replace hash-table by p-list, it will obviously run faster!
vultyre has quit [Client Quit]
loli has quit [Ping timeout: 248 seconds]
edgar-rft has quit [Quit: Leaving]
<equwal>
Well since lots of people do it this way, I am wrong.
edgar-rft has joined #lisp
<equwal>
Although not really. That paper doesn't use P-lists, it uses CLOS. Do you know how CLOS lookups are done? (Hint: hash tables).
<pjb>
equwal: nope. clos implement objects using vectors. slot-value is O(1) like aref.
fikka has joined #lisp
<trittweiler>
Heh. That made me think how a perfect hash-table is distinguishable from a vector..
edgar-rft has quit [Quit: Leaving]
edgar-rft has joined #lisp
<trittweiler>
In case of a vector, performance will be correlated to the sequential ordering of the keys (or rather there exists a performance-impacting order); that would only be rarely true for a perfect hash-table
jfb4```` has joined #lisp
edgar-rft has quit [Client Quit]
jfb4``` has quit [Ping timeout: 256 seconds]
edgar-rft has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
edgar-rft has quit [Remote host closed the connection]
vultyre has joined #lisp
edgar-rft has joined #lisp
edgar-rft has quit [Remote host closed the connection]
Kundry_Wag has quit [Remote host closed the connection]
Kundry_Wag has joined #lisp
fikka has joined #lisp
<phoe>
Method dispatch, yes, but we're talking slots.
Kundry_Wag has quit [Ping timeout: 244 seconds]
<equwal>
phoe: Thanks for clearing that up.
Pixel_Outlaw has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
loli has joined #lisp
<pjb>
trittweiler: you're not thinking right. Your brain has been deformed by theorical computer scientists. The notion of time and space complexity don't mean anything in the real universe, since the real univers we're living in is FINITE in time and space.
<pjb>
Who care about asymptotic time complexity, when the universe will be dead in 15 billion years!?!?
<pjb>
Or when your computer has a memory limited to 32 GB (or 512 GB of GPU RAM and 32 TB of NVMe if you're lucky to have a DGX-2)?
fikka has joined #lisp
<pjb>
When you're working with a finite memory, everything is O(1).
<pjb>
So, if O(.) doesn't mean anything, what means something?
<pjb>
The actual number of bytes used, the actual number of cycles used!
<equwal>
(fib 10000) will still take forever on that fancy machine of yours.
<equwal>
j0ni has joined #lisp
<equwal>
But if you memoize it with a hash table it becomes O(n) because hash tables take constant time to lookup.
<equwal>
s/(fib (1- n) (- n 2))/(fib (1- n)) (fib (- n 2))/
<equwal>
Complexity analysis is an improvement over benchmarks any day.
fikka has joined #lisp
<TMA>
if done on the code in the hot path
light2yellow has quit [Quit: upgrading router firmware]
DonVlad has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 256 seconds]
<pjb>
equwal: I'm sorry, but asymptotic analysis says nothing about (fib 10000). It only tells you about (fib n) when n->∞.
<pjb>
And the memory will be filled by n long before n reaches ∞.
<pjb>
equwal: for example, you will make a lot of assumptions about the actual timings of hash-table that are wrong, when you are running in a memory with several level of caches.
jfb4````` has joined #lisp
<pjb>
aref is not O(1) when you have arrays bigger than a cache line.
jfb4```` has quit [Ping timeout: 240 seconds]
meepdeew has joined #lisp
<equwal>
It does. If (fib 40) takes 12 seconds on my machine, then a machine 10,000 times faster will take .0012 seconds. We can find out how long (fib 10000) takes by finding 0.0012(φ^9975) seconds, where φ is the golden ratio ~1.6. That is a really long time.
fikka has joined #lisp
<equwal>
You can calculate estimates of time complexity from a single benchmark on any machine.
<pjb>
You are assuming that your asymptotic O formula applies on n<=10000. Nothing proves it.
<v0|d>
pjb: so how do you approach the complexity problem if you disregard bigOh?
light2yellow has joined #lisp
<v0|d>
are there any theories which include the effect of cache levels?
<pjb>
v0|d: the point is that complexity theory is useless when you have finite space and time.
<v0|d>
Indeed.
<pjb>
And more precisely, big O, even big theta, since they're asymptotic, may be completely wrong for an n < some N.
<pjb>
So if you don't prove that your big O formula also apply for small n, you don't know anything.
<pjb>
Saying that hash-table are more efficient than p-list is merely wrong.
jfb4````` has quit [Ping timeout: 244 seconds]
<pjb>
In clisp, plist are faster than hash-table up to 35 entries, in sbcl or ccl, up to 5 or 6 entries.
<pjb>
So the big O formula is dead wrong.
<equwal>
The thing is that for small n, efficiency doesn't matter anyway.
fikka has quit [Ping timeout: 260 seconds]
<pjb>
Again, this is wrong!
<pjb>
Because you can have a lot of those small n!
<equwal>
Then n is large.
<pjb>
You are not thinking, you are just reproducing what you've been taught in school or in books.
<pjb>
No. If you have a billion of small objects of 4 slots, adding one unit doesn't make 4 big!
<pjb>
And if you use hash-tables to store the 4 slot, you lose time and space. A lot of space, since it's multiplyed by a billion!
fikka has quit [Ping timeout: 240 seconds]
<v0|d>
pjb: i wish i can see you dlload gcc into ecl memory to improve compilation speed.
<equwal>
You lose some space. You save time because you don't have to iterate down the entire set. Average time to find an object in any list: n/2. In a sorted array: log base 2 of n. In a hash table: also log base 2 of n, since a hash table is a sort of cheat to sort unsortable data.
<equwal>
Spurning mathematics is foolhardy at best.
<equwal>
After some big O we get the close-enough values O(n) O(log n) O(log n) respectively.
fikka has joined #lisp
<v0|d>
equwal: there is BQP now named after BPP.
<v0|d>
its all over the place.
vultyre has quit [Remote host closed the connection]
vultyre has joined #lisp
vultyre has quit [Max SendQ exceeded]
vultyre has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
EvW1 has quit [Ping timeout: 256 seconds]
<equwal>
Well Quantum computing throws a wrench in my previous claims. Shor's algorithm could find the object with O(sqrt(n)), which is still worse than O(log n)
<equwal>
O(n) -> O(sqrt(n)). I don't know enough about QC to tell you how fast merge-sort is in a quantum computer, maybe constant?
<phoe>
the mention of quantum computing actually makes me say what I wanted to say an hour ago
* phoe
gently nudges the discussion towards #lispcafe
xrash has quit [Remote host closed the connection]
fikka has joined #lisp
fikka has quit [Ping timeout: 248 seconds]
<pjb>
equwal: you've made a mistake confusing n and m.
<pjb>
n was the size of the objects, m was their number.
<equwal>
Well s/n/m/
<pjb>
equwal: again, the typical error of people who don't understand O(n) and use n for everything.
light2yellow has quit [Quit: light2yellow]
<pjb>
I never said that O for m wasn't interesting (we have m>billions), just that it may be still irrelevant, since m is not >> billions, just > billions.
<pjb>
But I said that O was irrelevant to n which is << even to 1000!
random-nick has quit [Ping timeout: 240 seconds]
fourier has quit [Ping timeout: 240 seconds]
fikka has joined #lisp
Kundry_Wag has quit [Ping timeout: 240 seconds]
fikka has quit [Ping timeout: 260 seconds]
Neil__ has joined #lisp
pagnol has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
nymphet has joined #lisp
<drmeister>
Hello lispers. I'm debugging stuff in Clasp's compiler and all of a sudden I'm getting trace output that looks like this.
<drmeister>
It's arguments that are lists that are doing this.
<drmeister>
*print-circle* --> NIL
<pjb>
#1=#1# is a bug.
kenster has joined #lisp
<pjb>
Notably, having TWO #1= #1= in the same sexp is a bug.
<pjb>
in the printer.
<drmeister>
Alright - a bug in the printer (sigh) - ok - thank you.
<drmeister>
Right now I need a bug in the printer like I need a hole in the head.
<v0|d>
umm
<v0|d>
lets says a is a list which cdr points to itself. then (some-fun a a) would print just like this, no?
<pjb>
#1=(a . #1#)
fikka has joined #lisp
<v0|d>
hm then it might be a boxed type whose descriptor points to itself.
<scymtym>
#1=#1# could be a bad pprint dispatch entry. but two #1=#1# in a row seems like a bug
pierpal has quit [Ping timeout: 260 seconds]
pierpa has joined #lisp
fikka has quit [Ping timeout: 244 seconds]
<drmeister>
The trace facility binds T to *print-circle* - that's why changing it has no effect. When I change the code to bind NIL to *print-circle* then the arguments print - but it's unsafe
Ven`` has joined #lisp
<pjb>
drmeister: also, you may avoid lisp printing operators, and use your own code to print those data.
<pjb>
no-defun-allowed: you prefer name collisions, like clon or cl-json?
<no-defun-allowed>
"creative naming" usually works
<no-defun-allowed>
also why the heck would you use two libraries which do the same thing?
<pjb>
no-defun-allowed: the several occurences of name collisions proves that it doesn't usually work.
Ven`` has joined #lisp
<pjb>
TWO? Three or Six rather!
<pjb>
You find more often 6 CL libraries to do something than 2…
<pjb>
for general stuff, there are cesarum, alexandria, serapum, ccloc, and yet another half a dozen of them!
fikka has joined #lisp
Josh_2` has joined #lisp
mange has joined #lisp
fourier has joined #lisp
Josh_2 has quit [Ping timeout: 248 seconds]
<scymtym>
drmeister: is each argument printed with an independent PRIN{T,C,1} call? in that case #1=#1# itself is a problem but not necessarily the fact that it appears more than once. did you check whether there might be a bad pprint dispatch entry?
<drmeister>
scymtym: I'm not sure how to debug a bad pprint dispatch entry.
<no-defun-allowed>
pick a library and stick with it
Josh_2` has quit [Remote host closed the connection]
<drmeister>
Re prin{t,c,1}...
<pjb>
no-defun-allowed: of course, I choose com.informatimago.common-lisp.cesarum, and I stick to it.
<pjb>
Since it's the oldest (apart perhaps ccloc), and the one I'm the author of.