comborico1611 has quit [Quit: Konversation terminated!]
hel-io has joined #lisp
Cymew has quit [Ping timeout: 256 seconds]
fikka has quit [Ping timeout: 265 seconds]
Cymew has joined #lisp
Karl_Dscc has joined #lisp
pioneer42 has joined #lisp
Cymew has quit [Ping timeout: 264 seconds]
fikka has joined #lisp
Cymew has joined #lisp
verisimilitude has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
pagnol has quit [Ping timeout: 260 seconds]
<aeth>
I think that the issue I was having might be an interaction between ASDF, ECL, and certain libraries that deal with foreign code. When I updated to the latest Quicklisp, the distro-provided ECL stopped working with my program again. I guess ASDF isn't detecting when some things become stale in ECL?
<aeth>
I couldn't get the roswell ECL to work, but I suspect the solution is delete even more cached files than I thought to delete.
fikka has quit [Ping timeout: 264 seconds]
<on_ion>
try ECL from source ?
Cymew has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
wxie has quit [Remote host closed the connection]
wxie has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
rotty has quit [Ping timeout: 265 seconds]
drunkencoder has quit [Ping timeout: 268 seconds]
hel-io has quit [Remote host closed the connection]
hel-io has joined #lisp
hel-io has quit [Remote host closed the connection]
fikka has joined #lisp
hel-io has joined #lisp
hel-io has quit [Read error: Connection reset by peer]
hel-io has joined #lisp
drunkencoder has joined #lisp
rotty has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
siraben` has quit [Ping timeout: 255 seconds]
hel-io has quit [Ping timeout: 260 seconds]
warweasle has quit [Quit: Leaving]
rotty has quit [Ping timeout: 276 seconds]
johnnymacs is now known as dorothyw
hel-io has joined #lisp
rotty has joined #lisp
hel-io has quit []
fikka has joined #lisp
Folkol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dorothyw>
How can I get the performance of hash tables with pseudo-purely functional programming
fikka has quit [Ping timeout: 265 seconds]
Karl_Dscc has quit [Remote host closed the connection]
<dorothyw>
As far as I know when programming in a pure way you can't get the same o notation as an array
EvW has quit [Ping timeout: 265 seconds]
damke has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
sjl has joined #lisp
<jcowan>
You cannot, although there are algorithms that can give you *local* O(1) performance by clever caching
d4ryus1 has joined #lisp
<jcowan>
dorothyw: ^^
iqubic has joined #lisp
fikka has joined #lisp
d4ryus has quit [Ping timeout: 245 seconds]
fikka has quit [Ping timeout: 240 seconds]
<dorothyw>
how good is 0(1) compared to the worst performance of a hash table and how good is it compared to the best performance in layman's terms
<|3b|>
depends on the hash table, some have pretty bad 'worst case' performance
semz has quit [Ping timeout: 265 seconds]
<|3b|>
(usually something like O(N) insert time on collisions)
<ldb>
dorothyw: the regular perfomance on all operations to hash table is O(1)
<|3b|>
i think 'pure functional' dictionaries usually just do fairly flat trees, so you have a small log term which is close enough to constant in practice
<dorothyw>
ah so make an immutable tree out of long arrays rather than linked lists
<ldb>
and hashtable operations in the worst case are O(n)
<|3b|>
along with various strategies to keep the tree balanced efficiently
damke_ has joined #lisp
fikka has joined #lisp
<ldb>
depends on what kinds of operations you prefer
<ldb>
for concatenation and split
<|3b|>
also have to balance out how much memory you waste, if you care about that (in both cases, since hash tables need free space to avoid collisions, and trees spend space on pointers)
<ldb>
rope is quite good
siraben has joined #lisp
<dorothyw>
I've read that binary search trees are o log n. DOes that mean that it gets progressively easier over time?
damke has quit [Ping timeout: 264 seconds]
damke__ has joined #lisp
asarch has joined #lisp
<ldb>
yes, except you need to blance the tree
<|3b|>
it means that if you have N entries, searching takes log(n) time. so 256 entries for a balanced binary tree is log2(256)=8
mpah has quit [Quit: sleep]
<dorothyw>
is a score of 9 better than a score of 8
<|3b|>
8 as in you have to check 8 nodes
fikka has quit [Ping timeout: 256 seconds]
<ldb>
dorothyw: larger number means slower
<|3b|>
while a 256 entry list you would have to search on average half of the list = checking 128 nodes (best case 0, worst 256)
<dorothyw>
what is the limit of log 2 x as x approaches infinity
<|3b|>
or a hash table you would (on average) search 1 node
<|3b|>
infinite
damke_ has quit [Ping timeout: 264 seconds]
<|3b|>
but log2(most memory you could address in a pc)=48
Oladon has joined #lisp
<|3b|>
and in practice you probably addressing things larger than 1 byte and have much less than 2^48 bytes of ram (something like 256TB), so more realistically log2(X) is unlikely to get much past low 30s
semz has joined #lisp
semz has joined #lisp
semz has quit [Changing host]
<dorothyw>
Is there a sort of monadic approach to handling hash tables
<|3b|>
and if you make the tree flatter, you would reduce that number even further
fikka has joined #lisp
<dorothyw>
For example I could hook up lisp to sqlite in a pseudo pure way using monads
<dorothyw>
but pretend a hash table is sqlite
fikka has quit [Ping timeout: 260 seconds]
<ldb>
then just need monads
<iqubic>
I thought CL didn't have monads.
varjag has joined #lisp
fikka has joined #lisp
<pierpa_>
what CL does not have it can be added
<LdBeth>
iqubic: monads are just lambdas
<iqubic>
LdBeth: That's not true?
jealousmonk has quit [Read error: Connection reset by peer]
slyrus1 has joined #lisp
varjag has quit [Ping timeout: 260 seconds]
al-damiri has quit [Quit: Connection closed for inactivity]
fikka has quit [Ping timeout: 268 seconds]
ldb has quit [Remote host closed the connection]
wxie has quit [Ping timeout: 240 seconds]
wxie has joined #lisp
damke__ has quit [Ping timeout: 264 seconds]
damke__ has joined #lisp
Cymew has joined #lisp
wxie has quit [Ping timeout: 264 seconds]
voidlily has quit [Remote host closed the connection]
voidlily has joined #lisp
<White_Flame>
Is EOF the only situation in which read-sequence returns less than the requested length? Does TCP packetization ever cause this to return partially filled sequences?
Cymew has quit [Ping timeout: 245 seconds]
safe has joined #lisp
fikka has joined #lisp
damke has joined #lisp
wxie has joined #lisp
damke__ has quit [Ping timeout: 264 seconds]
lemoinem has quit [Read error: Connection reset by peer]
elderK has quit [Quit: WeeChat 1.9]
lemoinem has joined #lisp
fikka has quit [Ping timeout: 260 seconds]
milanj has quit [Quit: This computer has gone to sleep]
<White_Flame>
that's calling read-line, not read-sequence
fikka has quit [Ping timeout: 264 seconds]
<jcowan>
White_Flame: TCP does not preserve packet boundaries
<White_Flame>
I know. I've done a ton of network programming. I'm asking a very specific question:
<White_Flame>
WHen I call read-sequence, and I get a shorter read because some TCP info is currently available, but not enough to fill the buffer?
<White_Flame>
s/and/can/
<jcowan>
Your call to read-sequence will hang until the relevant part of the sequence has been filled.
<White_Flame>
the clhs doesn't make it 100% clear that EOF is the only thing that will truncate
<White_Flame>
ok
ccl-logbot has quit [Quit: Client terminated by server]
ccl-logbot has joined #lisp
mathrick has quit [Ping timeout: 264 seconds]
TMA has quit [Ping timeout: 250 seconds]
yeticry has quit [Ping timeout: 240 seconds]
siraben has quit [Ping timeout: 265 seconds]
TMA has joined #lisp
damke_ has joined #lisp
yeticry has joined #lisp
damke has quit [Ping timeout: 264 seconds]
jcowan has quit [Ping timeout: 260 seconds]
Arcaelyx_ has quit [Remote host closed the connection]
jcowan has joined #lisp
Arcaelyx has joined #lisp
<jcowan>
White_Flame: I read the phrase "which might be less than end because the end of file was reached" as meaning that there is no other reason why the returned value would be less than 'end'.
fikka has joined #lisp
mathrick has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
schoppenhauer has quit [Ping timeout: 240 seconds]
schoppenhauer has joined #lisp
<LdBeth>
iqubic: the original monad paper uses lambda to explain the idea
fikka has joined #lisp
<LdBeth>
Monad itself is proved in lambda calculus
fikka has quit [Ping timeout: 260 seconds]
wxie has quit [Remote host closed the connection]
pierpa_ has quit [Quit: Page closed]
Louge has joined #lisp
verisimilitude has joined #lisp
wxie has joined #lisp
dddddd has quit [Remote host closed the connection]
damke has joined #lisp
fikka has joined #lisp
pioneer42 has quit [Quit: Leaving.]
damke_ has quit [Ping timeout: 264 seconds]
wxie has quit [Read error: Connection reset by peer]
igemnace has joined #lisp
varjag has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
siraben has joined #lisp
wxie has joined #lisp
paul0 has quit [Quit: Leaving]
varjag has quit [Ping timeout: 240 seconds]
igemnace has quit [Client Quit]
Arcaelyx has quit [Read error: Connection reset by peer]
asarch has quit [Quit: Leaving]
Lord_Nightmare2 has joined #lisp
Fare has joined #lisp
Louge has quit [Quit: Louge]
Kevslinger has quit [Quit: Connection closed for inactivity]
Lord_Nightmare has quit [Ping timeout: 260 seconds]
Lord_Nightmare2 is now known as Lord_Nightmare
Arcaelyx has joined #lisp
ldb has joined #lisp
jcowan has quit [Quit: Leaving]
Fare has quit [Ping timeout: 265 seconds]
pierpa has joined #lisp
fikka has joined #lisp
rumbler31 has joined #lisp
drot has quit [Ping timeout: 240 seconds]
Arcaelyx has quit [Read error: Connection reset by peer]
damke_ has joined #lisp
drot has joined #lisp
rumbler31 has quit [Ping timeout: 276 seconds]
damke__ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
presiden has quit [Ping timeout: 255 seconds]
damke_ has quit [Ping timeout: 264 seconds]
orivej has joined #lisp
emaczen has quit [Read error: Connection reset by peer]
presiden has joined #lisp
<on_ion>
caveman2 -- nice !
damke has joined #lisp
wxie has quit [Ping timeout: 265 seconds]
damke__ has quit [Ping timeout: 264 seconds]
ldb has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 264 seconds]
Arcaelyx has joined #lisp
emaczen has joined #lisp
jibanes has quit [Ping timeout: 264 seconds]
wxie has joined #lisp
jibanes has joined #lisp
quazimodo has quit [Ping timeout: 260 seconds]
quazimodo has joined #lisp
Arcaelyx has quit [Read error: Connection reset by peer]
ldb has joined #lisp
Fare has joined #lisp
<ldb>
sup.
<verisimilitude>
Hello, ldb.
quazimodo has quit [Ping timeout: 260 seconds]
<ldb>
verisimilitude: hello
quazimodo has joined #lisp
marusich has joined #lisp
<ldb>
I see, Introduction to Common Lisp has a chapter about how to control terminal.
<elderK>
ldb: Reading the macro, I think I get what he's going for. The input 'dlist' might be bound to nil. If it were a normal function, he wouldn't be able to change that. So, he's using the macro so that he can update the binding.
jealousmonk has quit [Quit: Leaving]
<epony>
verisimilitude saw your posts in ##asm
<LdBeth>
elderK: I don’t see it takes a clever approach, the IF statement can be omitted during expension
Arcaelyx has quit [Read error: Connection reset by peer]
<LdBeth>
according to MACROEXPAND result
shka has joined #lisp
<elderK>
LdBeth: You mean the code could expand differently depending on whether whatever was passed in, was falsey or not? I agree.
<epony>
There might be slightly higher chance of finding assembler aware people programming skillfully lisp, than lisp skilled people programming assembler.
wxie has quit [Remote host closed the connection]
<LdBeth>
Then what he get is a FORTH expert wwww
<elderK>
LdBeth: His code semi-answer a question of mine. I was wondering how you emulate pointers, rather than pure references.
<elderK>
Like, function(&some_list_to_populate).
<LdBeth>
elderK: yup
<elderK>
So, you'd use macros in this case?
sauvin has joined #lisp
SaganMan has joined #lisp
<elderK>
When I was playing in Scheme, I had to "box" things to achieve a similar result.
<LdBeth>
Macro is definitely easier to understand compared to using closure
<LdBeth>
But macro can’t be funcalled
<elderK>
LdBeth: I'm not sure how to best achieve the following: I have a function, it takes two parameters. First, is some input value. Second, is a list to populate. I imagine you could say (func 1 var) where var is bound to something like the result of (list) ?
<phoe>
felideon: list to populate? what do you mean?
<LdBeth>
phoe: something like PUSH
<phoe>
you could go with (defun func (input-value &optional (list '())) ...)
<elderK>
phoe: I figure that was directed to me :) I mean, based on the input, the function will add one or more things to the list.
<phoe>
woops, worry, correct
<phoe>
elderK: good, then the above definition stands correct
<elderK>
I.e. The list you pass into the function, is denoting where we will write output.
<elderK>
Why would I do that? The list is not optional :)
<phoe>
inside FUNC, you can functionally modify the list, and return the new one
<phoe>
elderK: for a sane default value
<phoe>
if the list is empty
<elderK>
In other words, the list is an output parameter.
<phoe>
oh, so you want to *destructively* modify the output
<phoe>
it won't work if you want to append conses to its front.
<elderK>
Yes.
<elderK>
In C,
verisimilitude has quit [Remote host closed the connection]
JenElizabeth has joined #lisp
<elderK>
list l; f(input, &l)
fisxoj has quit [Quit: fisxoj]
<phoe>
yes. you can't take addresses in Lisp.
verisimilitude has joined #lisp
<elderK>
Yup. I am asking how I would achieve such a thing in Lisp. And, of various ways, which is the preferred.
<phoe>
you need to take one more step of indirection so you can modify the reference of your output list.
<elderK>
So, boxing?
<phoe>
boxing, yep - the simplest box is a cons cell
Arcaelyx has joined #lisp
<verisimilitude>
Would you rephrase that, epony?
<phoe>
so your input can be in form of (nil . input) where the CAR of this cons cell can be anything and the CDR is arbitrarily modifiable
<epony>
no.
<phoe>
and you can destructively modify that.
<elderK>
phoe: That sounds kinda painful?
<verisimilitude>
Alright, then.
<elderK>
I was thinking of creating a doubly-linked list type of my own, with push-back/front pop-back/front. So that, yknow, insertion and stuff would be O(1). The list would then be an instance - and it could be modified inside functions.
<phoe>
yep, utilizing a box in form of an instance is doable, too
<phoe>
since you can then modify its slot
<elderK>
Yeah. Makes sense :) Thank you.
<elderK>
About loop collect, btw. CLHS says that each element collected is added to the end of the list, rather than consed onto the front. That sounds pretty painful, if you're collecting a lot of stuff.
ldb has quit [Remote host closed the connection]
<verisimilitude>
You can maintain the end of the list, elderK.
<LdBeth>
elderK: you can just do a nrevers, which is really quick
<LdBeth>
NREVERSE
<LdBeth>
never need a dlist
fourier has joined #lisp
<elderK>
verisimilitude: Track the tail and add only to it?
<phoe>
elderK: no, just collect to the front and then nreverse the list which is O(n)
<verisimilitude>
Yes, elderK.
<elderK>
verisimilitude: I was hoping collect would do something like that :)
<verisimilitude>
A good LOOP implementation probably will, yes.
<rme>
You see both ways, and both are fine. Build the list backwards, than nreverse at the end, or else keep track of the tail of the list and build it up via rplacd/(setf cdr), as the collect clause of the loop macro typically does.
<elderK>
As for populating some list, then reversing it, that requires an extra cycle through the list.
<phoe>
(loop for i from 0 to 10 collect i) pushes 0 to NIL, then 1 to (0), then 2 to (1 0), then 3 to (2 1 0), ..., then nreverses (10 9 8 7 6 5 4 3 2 1 0)
<verisimilitude>
A cursory glance shows that SBCL and ECL do.
<phoe>
elderK: in practice it's fast enough compared to the others
<elderK>
Aye. I'm just splitting hairs :)
<verisimilitude>
That's still O(1) compared to O(n).
<phoe>
since if we're dealing with lists that have thousands of elements then something goes seriously wrong elsewhere in your code
<elderK>
verisimilitude: The tracking the tail? Yeah, it would be O(1).
<phoe>
verisimilitude: except your O(1) has a higher constant cost than my O(n)
<LdBeth>
Because usually we don’t use a lot of lists in CL
<verisimilitude>
No good LOOP implementation would actually use NREVERSE when it could instead do this.
<verisimilitude>
It's just a single pointer, phoe.
<verisimilitude>
So, both have O(1) space considerations, not counting the actual list.
Oladon has quit [Quit: Leaving.]
Pixel_Outlaw has quit [Remote host closed the connection]
<elderK>
LdBeth: Aye. Use the right ADT for the job :) It's just sometimes, a list is exactly what is required. Preferably one that isn't slow to push to the end of :D
<elderK>
Thank you for answering my questions :)
<beach>
Good morning everyone!
<elderK>
Good Morning beach!
<verisimilitude>
Hello, beach.
<LdBeth>
Morning
rotty has quit [Ping timeout: 245 seconds]
Arcaelyx has quit [Read error: Connection reset by peer]
fikka has quit [Ping timeout: 264 seconds]
verisimilitude has quit [Remote host closed the connection]
verisimilitude has joined #lisp
Arcaelyx has joined #lisp
BlueRavenGT has quit [Ping timeout: 260 seconds]
fikka has joined #lisp
omps has joined #lisp
Arcaelyx has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
marusich has quit [Quit: Leaving]
vlatkoB has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
Arcaelyx has joined #lisp
<elderK>
:) Any advice on which unit testing framework to use? The wiki seems to recommend either FiveAM or Prove.
<verisimilitude>
My advice is to write one yourself.
<beach>
Shinmera: Does it support the kind of random testing that I like?
rotty has joined #lisp
<Shinmera>
beach: I'm not sure what a framework would need to have in order to support or not support it.
<beach>
Neither am I.
<phoe>
beach: do you have some examples of your random tests?
<beach>
Which is why I have not been using any testing frameworl.
<beach>
phoe: Sure. Look in the Cluffer repository for example.
<Shinmera>
I would be interested in making it have explicit support for it, but right now I'm neck deep in thesis work, so maybe after this month's over I'll think about it.
<beach>
phoe: Basically, to test some abstract data type, I implement a trivial (but slow) version of it. Then I emit random operations on both of them and check that the result is the same.
<beach>
Shinmera: Oh, sure. No rush.
<beach>
phoe: It is tricky, because the randomness must have some memory so that there is a certain probability of long sequences of the same operation. So I use a Markov process to emit operations.
<rme>
I hate to ask, but what's wrong with cl:defpackage that makes you want to use this other thing?
<phoe>
rme: :REEXPORT option in UIOP:DEFINE-PACKAGE
<phoe>
therefore, convenience
fikka has quit [Ping timeout: 240 seconds]
<phoe>
also DEFINE-PACKAGE does not complain if symbol FOO is exported from package but then I write defpackage's :export without including FOO
<mfiano>
As a side note, me and a friend recently patched defpackage+ to support package-local-nicknames with a graceful fallback if not supported on an implementation. Definitely not perfect, but it's useful.
<phoe>
on SBCL, it produces a warning in defpackage; define-package just silently unexports that symbol.
fikka has joined #lisp
malice has joined #lisp
fikka has quit [Ping timeout: 264 seconds]
FreeBirdLjj has joined #lisp
shka has quit [Quit: Konversation terminated!]
<phoe>
What is the way to remove a defined condition from a Lisp image?
<elderK>
Guys, when should you create a generic method with a name like, add, instead of something prefixed like bs-tree-add?
<malice>
I guess that pretty much always
<malice>
if it's bs-tree-add then it's not too generic now is it
<elderK>
Well, no.
<elderK>
:) But when you have an avl tree, too, you'd have avl-tree-add
<malice>
I mean, I'd suspect tree-ad gf with method specialized on bs-tree or avl-tree
<elderK>
You could hide those differences by specializing on the type.
<malice>
yes
<malice>
Though there is an upside to the data-type-operation in that you can type data-type- and autocompletion will show you available functions
<elderK>
I figure it's not a big deal anyway - at the end of the day, you could always add a GF and have the specizliation call the lower-level functions, right?
<malice>
yep
<elderK>
That's a good point, malice.
random-nick has joined #lisp
<malice>
also it's generic function and not generic method
Karl_Dscc has joined #lisp
<malice>
and frankly, lisp's OOP is a bit different and because it's not mainstream, it's not as "standardized" as the OOP where dot notation exists
makomo has joined #lisp
<malice>
but the general rule of thumb (as I see it) is that generic function should be as generic as possible(but not anymore than that)
<malice>
if you need avl-tree-add, create it as a function with defun
<LdBeth>
elderK: use Generics or not depends on whether and how you want you and others to extend the program
<malice>
nothing wrong with working on class instance using functions
<malice>
this comes from other languages; in the OOP world, you manipulate objects exclusively through methods, functions are just some helper stuff that doesn't touch any instance
<malice>
or its insides
<malice>
in CL, you already have these two separated
<malice>
so functions are all right
<TMA>
on the other hand the function shall do "the same" for all its specialized methods. too unspecific a name (say add instead of tree-add) might be confusing then
<malice>
That's true.
<malice>
There is also a funny thing, that you can add documentation to a generic function
<malice>
but you can also add documentation to any of methods that implement it, and they are all different
<LdBeth>
If you want, you can even use BOLCK and GOTO
<malice>
though imho it's not useful due to the fact that if you want to get documentation for a specific method, you have to get that method object, which isn't something you do often, so it's not straightforward for typical user
<elderK>
malice: Next question :)
<elderK>
When I have a class, say, and I want to access its slots, should I use slot-value or the accessor?
<elderK>
I believe there is a macro, with-slots, or something like that.
<Shinmera>
The accessor.
<elderK>
I was wondering if it makes use of the accessors or just does slot-value
<Shinmera>
with-slots uses slot-value
<Shinmera>
with-accessors uses accessors
<elderK>
I read somewhere that accessors are preferred because they can be combined.
<elderK>
Ah, awesome.
<phoe>
elderK: yep, but slots are usually implementation details, and accessors are usually the exported interface of a module.
<elderK>
Thank you, Shin :)
<Shinmera>
accessors are preferred because they are shorter to write, more idiomatic, and can perform checks/computations
<beach>
elderK: Use accessors. Slots are implementation details.
<phoe>
and do not have to refer to slots at all in the end.
wxie has quit [Quit: Bye.]
<Shinmera>
slot-value should be used only for internals / bypassing accessors in select cases.
<LdBeth>
elderK: but there are some cases you want slot-value explicitly
<elderK>
LdBeth: Such as?
<beach>
LdBeth: Name two!
<LdBeth>
elderK: you want to bypass accessor
pyericz has quit [Quit: This computer has gone to sleep]
<LdBeth>
beach: ?
milanj has joined #lisp
<phoe>
yep, when you twiddle with the implementation details
<beach>
LdBeth: "but there are some cases you want slot-value explicitly". I am asking you to give me two such cases.
damke_ has joined #lisp
damke has quit [Ping timeout: 264 seconds]
<malice>
elderK: you can also export accessors but not slots
<Shinmera>
you can't export either
<Shinmera>
you only export symbols
<Shinmera>
which name slots and functions
<malice>
Isn't it obvious what I meant?
<Shinmera>
Your statement is wrong in every way I can interpret it
<malice>
I meant that you can export symbols naming accessors(e.g. acc-a), but not export symbols naming slots(e.g. slot-a), so that when user tries to access slot, a condition is signalled, which encourages use of accessors
<malice>
Does that make sense?
<Shinmera>
Yes.
<phoe>
yep
<elderK>
Can you export something with a different name?
random-nick has quit [Remote host closed the connection]
<Shinmera>
No, symbols can't have aliases.
<elderK>
Ah, okay.
<elderK>
Like, in the package, it's say, X. But when I export X, I give it a new public name?
<malice>
You can. Just bind it to new symbol and export that symbol
<Shinmera>
That's not an alias.
<malice>
(though it's "you can")
<malice>
yes
<Shinmera>
And while you can do things like tie the same function definition to a symbol, you can't do so for slots.
<malice>
If you really need to, you can try using macros for that
random-nick has joined #lisp
fikka has joined #lisp
<malice>
(with-alias (origin newname) (print newname)) ;;same as (print origin)
<LdBeth>
beach: okay, if there is a standard instance, the slot value is fixnum, and another specialized instance with the same slot as another object, and the accessor returns
<phoe>
LdBeth: I did not understand that
arbv has joined #lisp
<LdBeth>
beach: fixnums for both, but there is a need to access the object in the specialized instance
<phoe>
LdBeth: which object in the specialized instance?
<phoe>
if yes, then the generic function #'THING always returns something of type FOO-THING
<phoe>
additionally if (TYPEP X 'FRED) then you know that (THING X) will return a BAR-THING
<LdBeth>
phoe: The accessor THING for FRED should return a standard FOO-THING
<LdBeth>
because in practical like Shinmera says, fixnum is not a class
<phoe>
LdBeth: what?
kozy has joined #lisp
<phoe>
each BAR-THING is a FOO-THING because BAR-THING is a subclass of FOO-THING
<phoe>
so the accessor THING for FRED returns a FOO-THING
<LdBeth>
Please allow me write down the code
<phoe>
okiedokie
kozy has quit [Remote host closed the connection]
<malice>
Isn't there a rule that in subclasses, the type of the slot needs to be the subtype of the same slot in its superclasses?
<Shinmera>
slot types are mostly disregarded
glv has quit [Quit: Leaving]
<malice>
That's the other thing
<Shinmera>
"The contents of a slot will always be of type (and T1 ... Tn) where T1 ...Tn are the values of the :type slot options contained in all of the slot specifiers. If no slot specifier contains the :type slot option, the contents of the slot will always be of type t. The consequences of attempting to store in a slot a value that does not satisfy the type of the slot are undefined."
<elderK>
To be crazy, is there any specific order people like to have things sorted when defining slots?
<elderK>
Like, :documentation before :initargs before :initform ?
<elderK>
Or is it largely irrelevent?
<elderK>
:)
<elderK>
Pretty much in all the source I read, :documentation is last.
<Shinmera>
I use (slot [initform] [initarg] [accessor/reader/writer])
<elderK>
Sweet. Thank you.
fourier has joined #lisp
<elderK>
What's the deal with line breaking wrt documentation strings?
<Shinmera>
I don't document slots because nobody looks at that. I write references to the accessors for slots into the class' docstring, and obviously add docstrings for accessors.
<Shinmera>
What do you mean, "what's the deal"?
<elderK>
How do you add docstrings to the accessors? I mean, doesn't defclass generate thsoe?
<elderK>
This is why I don't just try things in my impl. and accept it as gospel :)
<Shinmera>
"The specific behavior depends on object's metaclass. An error is never signaled if object has metaclass standard-class. An error is always signaled if object has metaclass built-in-class. The consequences are unspecified if object has any other metaclass--an error might or might not be signaled in this situation. Note in particular that the behavior for conditions and structures is not specified."
<elderK>
Aha. Not specified.
<elderK>
Beat me to it!
<elderK>
:)
<elderK>
Is using (values ...) considered expensive?
<Shinmera>
Typically only the single-value return case is optimised.
<Shinmera>
So using multiple values is probably going to be more expensive, but you'll have to profile on your implementation.
<malice>
elderK: is it?
makomo has quit [Ping timeout: 260 seconds]
<elderK>
I'm trying to think of how I'll return stuff when I do my tree insertion. If I do iterative, no biggy. If I do it recursive, then things will be different as each call to %tree-add or whatever will return the reference to a node.
<malice>
is using (print ...) expensive?
<elderK>
malice: :P
<malice>
if (values ...) is your bottleneck, then I've got a bad news for you
<Shinmera>
malice: Compared to simply returning things yes.
<malice>
Or not. Both run so fast I wouldn't notice.
<malice>
The speed always depends on the context
pyericz has quit [Quit: This computer has gone to sleep]
<LdBeth>
malice: because print some data structure means recursively expand them
<malice>
LdBeth: ?
<LdBeth>
malice: for example passing a long list is just pass a reference, and print it mean you need to go through CAR and CDR recursively
fikka has joined #lisp
<malice>
Yes, but I don't understand what you're trying t tell me
<malice>
I asked about the (print) as a rhetorical figure to demonstrate my point, that cost is relative to the task
<malice>
So the question like "Is Common Lisp fast?" is actually an invalid question, imho
<elderK>
God damn it's going to take me ages to get used to not having pointers. At least, not with the freedom I'm used to.
<elderK>
:D
<Shinmera>
I find having pointers a nuisance
<elderK>
Perhaps I will feel that way too, in time.
<LdBeth>
Umm. So VALUES costs some but it is better than return a cons cell
<elderK>
But for now: I'm very used to being able to use and abuse them for all kinds of handy purposes.
<elderK>
:P I feel equally restricted in Java.
* elderK
shudders
<elderK>
(University /loves/ Java.)
<malice>
In what ways?
<LdBeth>
If it is implemented correctly
<elderK>
:) I'm headed off.
<elderK>
Thanks for your help! :)
<malice>
LdBeth: I don't think that matters.
<malice>
I think what's more important is the interface you're providing than the speed of this particular operation
elderK has quit [Quit: waves]
<malice>
In the long run, the user is going to deal with values or cons all the time
<malice>
and the speed of this is just a tiny factor which he would probably simply ignore
<malice>
For example, when creating a floor function, I simply can't imagine it returning a cons cell
<malice>
even if it was faster
<malice>
it's just bad design
<malice>
and I feel that's far more important than microoptimizations
<Shinmera>
Depends on your goal of course, but you're right that typically the user should come first.
<malice>
I can't really imagine any goal that would make it worthwhile
<malice>
look at Python, it's *relatively slow*, so are its libraries
<malice>
yet it is widely popular
<LdBeth>
Hard to say
<malice>
because if you need speed, you get that where you need it(c libs and stuff)
<Shinmera>
fortran's APIs are pretty annoying to use, but they are that way for good reason.
<Shinmera>
people still use it for numerics today
<malice>
Yes. I don't know fortran though. Plus saying that people still use it is a bit of a stretch
<Shinmera>
nah
<LdBeth>
And in the old day people use FORTRAN to write EMACS!
<Shinmera>
People still use fortran and its numerical libraries.
<malice>
Yes, they do. But I don't think that it's popular, and I think that many of them use it for different reasons
<malice>
(not knowing any better)
<LdBeth>
But no one would use is as a general purpose language
<malice>
but this may be my subjective opinion derived from my observations
<LdBeth>
Luckily Lisp is not restricted to AI
<malice>
Yeah, you can see how languages like Python are used all over the place for the machine learning, where you need things to be *fast* because you compute so much
<malice>
but it doesn't mather if it's in Python, Lisp or Brainfuck if at the end the number-crunching is done via some Fortran library
<malice>
And CL's probably never gonna get that fast to be used for this purpose
<Shinmera>
Well, heisig is doing high performance computing with Lisp for instance
<LdBeth>
I have point out that CL can also call foreign libraries for specialized tasks
* heisig
hears his name.
<heisig>
malics: I see no technical reason why CL should be slower than e.g. Fortran.
<malice>
probably GC
<malice>
but it also depends on the context
<Shinmera>
GC shouldn't trigger if you don't cons
<heisig>
malice: When you provide type annotations, the CL compiler has the same knowledge as a C++ or Fortran compiler.
<heisig>
And yes, you just avoid consing in HPC code.
<beach>
malice: What Shinmera said. Plus, if you need GC in Lisp you would need the equivalent of malloc/free in some other language, and those are slower than GC in general.
fikka has quit [Ping timeout: 264 seconds]
<malice>
I'm playing a bit of devil's advocate in here. I am aware type annotations help a lot and that malloc/free can be really bad in terms of performance
<LdBeth>
I’m also interested in One Reference Only approach
<heisig>
Admittedly, Lisp compilers are not (yet) as good as GCC, Clang or ICC when it comes to number crunching.
<LdBeth>
malice: what you said are situations
<beach>
LdBeth: What is "One Reference Only" approach?
Karl_Dscc has quit [Remote host closed the connection]
fikka has joined #lisp
<LdBeth>
beach: copy by values and discard memories right after no reference. Since each object is referenced once, there are no needs for GC or reference count
<beach>
LdBeth: But that would be WAY slower than GC.
<beach>
LdBeth: Plus, it is much harder to get the semantics right then.
k-stz has joined #lisp
<beach>
LdBeth: A simple assignment usually takes a single register-to-register instruction. If you copy objects, you need to allocate memory, and access all the slots, so many more memory accesses.
<LdBeth>
beach: about slow, the approach is allocate a larger chuck memory and recycles memories from the chunck
<beach>
LdBeth: Just accessing memory is very expensive these days.
<beach>
This is exactly the reason why I often say "It is impossible to write a C++ program that is both modular and fast".
fikka has quit [Ping timeout: 240 seconds]
<beach>
LdBeth: Like I said, every assignment turns into multiple memory references. The same thing holds for every argument passing.
<beach>
LdBeth: Then, because you have duplicate objects, the cache will fill up more easily.
<LdBeth>
beach: practically it can be down with only pointer assignments
<beach>
Then you have multiple references.
<LdBeth>
beach: but unreferenced objects are `freed` immediately
<LdBeth>
GC approach also could have GC hell
Kevslinger has joined #lisp
milanj has quit [Quit: This computer has gone to sleep]
fikka has joined #lisp
<LdBeth>
And more destructive operations can be used
damke has joined #lisp
FreeBirdLjj has quit [Remote host closed the connection]
xaotuk has joined #lisp
fikka has quit [Ping timeout: 256 seconds]
<LdBeth>
Yes, it is hard to get semantics right
<LdBeth>
ORO mean there would be no circular structures
margeas has joined #lisp
damke_ has quit [Ping timeout: 264 seconds]
DVSSA has quit [Read error: Connection reset by peer]
fikka has joined #lisp
<Shinmera>
So how would you do sparse graphs
<Shinmera>
Or, well, anything that actually does require multiple references.
raynold has quit [Quit: Connection closed for inactivity]
pierpa has joined #lisp
<phoe>
Is there a utility function like REMOVE-DEPENDENCIES but one that retains them instead of removing?
<phoe>
(retain-dependencies '(a b c a a b d)) ;=> (A A B) ;order does not matter
<Bike>
you mean duplicates?
<phoe>
uh
<phoe>
duplicates
<phoe>
sorry, thinking of two things at once
<Bike>
anyway, i don't think so
SaganMan has joined #lisp
<beach>
It is not hard to write though.
<phoe>
(let ((multiset '(a b c a a b d))) (reduce (lambda (x y) (remove y x :count 1)) (list* multiset (remove-duplicates multiset))))
<phoe>
ugly and O(n²)
<phoe>
could go down to amortized O(n) with a hashtable
TCZ has quit [Quit: Leaving]
Folkol has joined #lisp
FreeBirdLjj has joined #lisp
fourier has joined #lisp
<Shinmera>
Well, if you want duplicates to be retained, (remove 1 list :key (lambda (a) (count a list)))
<phoe>
Shinmera: not that; I basically want to remove one of each kind from a list.
<Shinmera>
Okey.
<phoe>
so that (append (remove-duplicates x) (retain-duplicates x)) is equal to x, sans order of elements
fikka has quit [Ping timeout: 265 seconds]
fikka has joined #lisp
<beach>
Do you care whether the return value is (A A B) or (A B A) or something else?
Kevslinger has quit [Quit: Connection closed for inactivity]
<_death>
could use MAPCON to add obscurity to ugliness ;)
<Shinmera>
Here's a loop oneliner I guess (loop with r = () for i in (list 1 2 3 1 3 3 4) if (find i r) collect i else do (push i r))
tomlukeywood has joined #lisp
<phoe>
beach: I don't
<phoe>
the order is not relevant
<beach>
(loop for rest on list when (member (first rest) (rest rest)) collect (first rest))
<beach>
Still quadratic.
<Shinmera>
Mine's only O(nk) for k being the unique keys in the list.
<Shinmera>
And it would be trivially changeable to a hash-table variant.
<phoe>
okay, I don't think my lists will be longer than 20 elements anyway
<beach>
Then don't worry about it. Hash tables have a fairly large overhead anyway.
lnostdal has quit [Ping timeout: 260 seconds]
Kevslinger has joined #lisp
<phoe>
ugh
<phoe>
a non-evaluated '() is a valid list of length 1
<phoe>
#justlispthings
<Xof>
(let ((k (gensym))) (loop with r = () for i in multiset when (> (get i k 0) 0) collect i incf (get i k 0))) ; untested, O(n) in theory
<Xof>
(for symbol keys)
tomlukeywood has quit [Quit: tomlukeywood]
<pfdietz>
(scrolls back and reads hours-ago stuff)
<phoe>
Xof: #'GET is not O(1) though
<Xof>
... collect i do (incf (get i k 0)))))
<pfdietz>
Prove is nice, but package name collision.
<phoe>
it reads a property *list* of a symbol, and traversing a list is linear
<phoe>
unless some implementation implements symbol properties as some sorta hash table at which point we could use a hash table anyway
<pfdietz>
I really want package local nicknames to become de facto standard.
<Shinmera>
I don't think anyone would be opposed to that
<pfdietz>
So, all public package names could be big hairy things, and if you want to use one, you nickname it locally to something short.
<Xof>
phoe: true, but in terms of n and k that is a constant
<Xof>
of course my version scales with c, the number of times you call the function :-)
<Xof>
so to fix that you could access symbol-plist directly. (I'm not seriously advocating this anyway)
<pfdietz>
I've wanted CL collecton libraries to enable a WITH-MAPPING feature, that allows one to use a field in the objects in the collection as a temporary mapping. It would default to using a hash table if someone else had already grabbed that resource.
<shangul>
I'm going to use vim for typing Lisp codes. Is there anything which I have to know? Because many suggest Emacs instead
<beach>
shangul: Sorry to hear that.
<phoe>
shangul: vlime or slimv are what people use
<shangul>
phoe, those are editors?
<beach>
shangul: Replacements for SLIME.
<phoe>
shangul: plugins for vim that allow interaction with Lisp images.
<shangul>
beach, the common lisp implementation?
<phoe>
Lisp is an image-based programming language. SLIME is a toolkit made for interacting with that image.
<phoe>
For interactive code compilation and recompilation, debugging, tracing, inspecting.
<phoe>
Coding Lisp without such a toolkit is a major pain in the behind and strips the language of about 50% of its strengths and fun sides.
<phoe>
Lisp workflow isn't the workflow from languages like C or C++ or Java which goes like, write some code/run compiler on everything/run the resulting binary/stare at results
janivaltteri has quit [Quit: leaving]
<phoe>
Lisp is interactive compared to them, you add stuff incrementally to the running Lisp image and build your program bit by bit while the previous bits are already there and working.
<phoe>
as for an implementation, what OS are you on?
<phoe>
if you're on MacOS, go for CCL; if you're on Windows or other unixlikes, grab SBCL.
<shangul>
I now have both "clisp" and "sbcl" on my machine. Also it's Ubuntu
<shangul>
phoe, where could I read more about what you called it "lisp workflow"
<phoe>
hmmmm
<pfdietz>
Common Lisp Recipes chapter 16, perhaps. But that's more nuts and bolts of things you do in a workflow.
gigetoo has quit [Ping timeout: 260 seconds]
asarch has joined #lisp
<phoe>
I'm looking for a proper video that demonstrates that concept
gigetoo has joined #lisp
<phoe>
I have some of them recorded but they are in Polish
<beach>
shangul: In summary, you typically have one or more editor buffers with source code in them, and also an editor window that runs a REPL. You can then send code from a source window to the REPL by a simple keystroke. This way, you will write a small amount of code, send it to your Common Lisp system, then switch to the REPL and immediately test what you have done.
<beach>
shangul: So there is not edit-compile-link-execute cycle.
<beach>
shangul: The program is created and tested incrementally.
Oladon has joined #lisp
pagnol has quit [Ping timeout: 260 seconds]
xrash has joined #lisp
jealousmonk has joined #lisp
damke has quit [Read error: Connection reset by peer]
<shangul>
beach, So the only benefit of an specified editor is that I can run my program with a single keystroke?
<phoe>
shangul: no
<phoe>
you can program it incrementally, you can use the debugger, the inspector, the stepper and various other small tools
<beach>
shangul: No. The benefit is that you can develop your program incrementally.
pioneer42 has left #lisp [#lisp]
<phoe>
you can compile/link/run any program with a single keystroke if you make a trivial keybinding to something like "sh make && ./a.out"
<phoe>
except this does not give you all of the interactivity of Lisp
<shangul>
phoe, there is something which I don't understand, yet. Should I ask you or just follow the book(PCL)?
<shangul>
"you" means the channel
<beach>
shangul: The beauty of Common Lisp is that there is no distinction between compile time and run time. A program is just a series of modifications to the state of the initial image. We take advantage of this fact by making very small modifications and testing each modification before going to the next one.
<beach>
shangul: You can ask here. If the question is not suitable, you will be told.
<phoe>
shangul: you should follow PCL, yep. just make sure to get yourself a proper editor&environment first.
<phoe>
https://portacle.github.io/ is the suggested environment for beginners. It's an emacs+sbcl+slime+quicklisp+git distribution.
<beach>
shangul: Also, let me point out an important thing. If you decide to use an editor other than Emacs, and by doing so you end up with code that is badly indented, you will be told to indent it correctly if you try to submit it for people here to read.
<shangul>
well I see that I can write my code with an editor, then compile and get a binary(and go like C/C++) or execute it with interrupter(like Python/Perl/etc) and this seems fine.
<shangul>
I mean this already seems okay. Why should I get something else and bother?
<beach>
shangul: You will understand why, once you try it and get used to it.
<shangul>
aha
<Shinmera>
phoe: Note that documentation-utils already has support for custom documentation syntax -- the only requirement being that it just converts to a string somewhere. So you can already define an extension to it that would be "backwards compatible".
jealousmonk has quit [Read error: Connection reset by peer]
<beach>
shangul: Nobody forces you to do anything you don't want. We are just giving you advice, and telling you about the consequences if you don't follow this advice.
<beach>
shangul: Incremental program development and testing will make you more productive than the traditional edit-compile-link-run cycle. If you don't want to be productive, there is nothing we can do about it.
<shangul>
beach, the problem's not that I don't want. the problem's that I don't want to do what I don't have any reason to. and that's probably because I've worked with other languages before
<Shinmera>
Making things more convenient sounds like a very compelling reason to me, and SLIME is exactly that.
<Xach>
I like mikel evins's analogy: interactive languages are like teaching an eager assistant, versus building from plan
<beach>
shangul: Well, stuff like that is hard appreciate without actually trying it out. So there is really no way to convince you a priori other than to ask you to trust the advice.
<shangul>
beach, okay. seems now I should just follow what you and the books says.
<shangul>
s/books/book/
<beach>
That is what we are all hoping by giving you this advice.
<TMA>
shangul: in a sense learning to use an editor is waste of time when you are proficient enough with the card puncher
<shangul>
TMA, I don't understand.
segmond has left #lisp [#lisp]
SenasOzys_ has joined #lisp
rumbler31 has joined #lisp
<TMA>
shangul: in the history computer input was performed by feeding paper cards with holes; if you were proficient with the machine for making the holes you would see no advantage in using an interactive editor for editing the programs. same way if you are proficient with the edit-compile-link-run workflow, the REPL workflow does seem worse (because it is a yet another new thing to learn)
rumbler31 has quit [Read error: Connection reset by peer]
rumbler31 has joined #lisp
<pierpa_>
Every time you compile and run a C/C++ program you are restarting from 0. In lisp you have a live image that you modify. You don't get all your data structures wiped away every time you have to modify a detail.
<shangul>
TMA, So you are saying because I've worked with an interactive editor I know its advantages over past methods
pierpa_ is now known as pierpa
BlueRavenGT has joined #lisp
<TMA>
shangul: yes. but because you have not worked with the REPL, you do not yet know its advantages
<shangul>
pierpa, How about interrupted languages? In these we don't need to restart from 0
<shangul>
TMA, I've got your point.
<beach>
shangul: Do you mean "interpreted"?
<pierpa>
never heard this term
<beach>
shangul: There is no such thing as "interpreted language".
<shangul>
beach, pierpa, I think I misspelled it.
<pierpa>
Ok
<beach>
shangul: Any language can be implemented with either a compiler or an interpreter or both. What you are thinking of as an "interpreter" may very well be a compiler that compiles the code on the fly.
jonh has joined #lisp
rumbler31 has quit [Ping timeout: 265 seconds]
<shangul>
beach, yes
<beach>
shangul: The distinction is important because "interpreter" often implies "slow". So people who think that Common Lisp is interpreted also think it is slow.
<beach>
shangul: This is not the case. Modern Common Lisp implementations compile the expressions as you type them.
<shangul>
I know
<beach>
Good.
<shangul>
(well just this part)
<pierpa>
Then of course CL would be a better language even if the only implementations available were batch compilers
<beach>
shangul: Conversely, people think that "compiler" think that it must process an entire file and create object code as output. Again, this is not true.
<TMA>
shangul: I personally use the edit-compile-run cycle most of the time even with common lisp. On the other hand, I do use the REPL a lot while debugging and during exploratory work. the workflows tend to complement each other well
<shangul>
beach, the entire file or a part of it
<beach>
shangul: What do you mean?
<shangul>
beach, compiler may skip parts of the code. for example with #if of #ifndef preprocessors in C
<beach>
Sure. But the point here is that an interactive (not interpreted) system is able to compile one expression at a time, and no object file is generated.
<phoe>
Shinmera: I see. That could be useful.
<Shinmera>
I think shka_ already published an extension like that for his own preferred syntax.
<Shinmera>
Also note that both documentation-utils and staple have support for letting you add additional "symbol types" that you can then document like anything else.
Pixel_Outlaw has joined #lisp
<Shinmera>
::look up radiance hook radiance-core:startup
<slyrus_>
Shinmera, is there a summary of why one might want to use radiance over, say, caveman/clack/lack anywhere?
<Shinmera>
I don't know why one would want to use caveman/clack/lack, so I can't tell you.
<Shinmera>
As in, I have no experience with them.
pierpa has quit [Ping timeout: 260 seconds]
<Shinmera>
What I can tell you is that their goals are different. Radiance is not a traditional web framework in that its goal is to provide you with tools to let multiple applications run on the same site, rather than just giving you tools to build a website.
rotty has quit [Ping timeout: 265 seconds]
<Shinmera>
It is also different from a number of frameworks in that it makes no direct requirements about templating, database, etc.
pierpa has joined #lisp
<Shinmera>
There are strong suggestions on which to pick due to my own preferences, but it is built with the intention of allowing you to choose whatever you want.
<Shinmera>
Or rather, it is built without any knowledge about what you're going to pick, but certain systems already have integration libraries in place because I wrote them, so they're more convenient. If you prefer others you could easily write your own integration though.
<slyrus_>
ok, I'll take a look. I've been reasonably happy with caveman/etc... but it's always nice to have options.
<Shinmera>
I'm always happy to hear people's thoughts.
pierpa has quit [Ping timeout: 260 seconds]
pierpa has joined #lisp
sauvin has quit [Ping timeout: 260 seconds]
EvW has joined #lisp
Oladon has quit [Quit: Leaving.]
pierpa has quit [Ping timeout: 260 seconds]
sauvin has joined #lisp
joh11 has quit [Ping timeout: 240 seconds]
nsrahmad has quit [Quit: Leaving]
<Xach>
hunchentoot is complicated and you can make something useful without going through all its machinations
<Xach>
that is a random thought, sorry.
karswell has quit [Remote host closed the connection]
rotty has joined #lisp
mflem has joined #lisp
joh11 has joined #lisp
jealousmonk has joined #lisp
orivej has joined #lisp
energizer has joined #lisp
vypr has joined #lisp
lnostdal has quit [Read error: Connection reset by peer]
lnostdal has joined #lisp
fikka has quit [Ping timeout: 240 seconds]
<flip214>
Xach: but it's easy-handlers _are_ easy to use...
jmarciano has quit [Read error: Connection reset by peer]
Fare has quit [Ping timeout: 276 seconds]
<Shinmera>
cl-out123 does some finalization of C data that tries to deal with threads "nicely". I don't know how applicable that is to your case though
<Bike>
so... mop finalization rather than finalizers.
<Shinmera>
Meaning inheritance finalisation?
<Bike>
yeah.
<Shinmera>
oh
<Bike>
on the bright side, much more standardized.
<Shinmera>
Well, redefining classes while threaded is usually bad juju
<Bike>
i think it's more there's a custom metaclass which is doing some weird thing
ebrasca has joined #lisp
<sabrac>
Bike has it right.
hiroaki has quit [Ping timeout: 268 seconds]
<Bike>
you can make the (unless (class-finalized-p class) (finalize-inheritance class)) a critical session and i think that would about do it
<Bike>
but i don't fully understand this problem.
dddddd has joined #lisp
equwal has joined #lisp
heisig has quit [Quit: Leaving]
equwal has quit [Remote host closed the connection]
vlatkoB has quit [Remote host closed the connection]
raynold has joined #lisp
_whitelogger has joined #lisp
ryanbw has joined #lisp
fikka has joined #lisp
joh11 has joined #lisp
TCZ has joined #lisp
Oladon has joined #lisp
pagnol has quit [Quit: Ex-Chat]
SenasOzys has quit [Remote host closed the connection]
SenasOzys has joined #lisp
Jen has quit [Read error: Connection reset by peer]
SuperJen has joined #lisp
lnostdal has quit [Ping timeout: 264 seconds]
fisxoj has joined #lisp
fortitude_ has joined #lisp
Jen has joined #lisp
SuperJen has quit [Read error: Connection reset by peer]
sabrac has quit [Quit: Konversation terminated!]
wigust has quit [Ping timeout: 255 seconds]
damke_ has quit [Ping timeout: 264 seconds]
<sjl>
Shinmera: hey, the example of translation/scaling/rotation on https://shinmera.github.io/3d-matrices/ fails with a type error, because the last step is multipling a mat4 with a vec3
* Shinmera
is embarrassed
<Shinmera>
I'm busy right now, but I'll take a look in about an hour.
<sjl>
also in `(let ((mat (mat4 1))) ...` should that be (meye 4) instead of (mat4 1) or am I missing something?
<sjl>
shouldn't you start with the identity matrix to build up the transforms
<sjl>
?
<Shinmera>
You are right, yes.
EvW has quit [Ping timeout: 255 seconds]
joh11 has quit [Ping timeout: 260 seconds]
<sjl>
Shinmera: Also, would you be interested in a patch that added `1` to swizzling? So you could e.g. `(vxy1 some-vec-2)` to convert a bare 2d vector to a 2d homogenous-coords-style. Or is there a cleaner way to do that?
<sjl>
(vec3 (vx somevec) (vy somevec) 1) is a lot of typing
<Shinmera>
Adding even more swizzling is making me a bit uncomfortable. It's pretty extreme already as is.
<Shinmera>
Let me think
<sjl>
no rush, I've gotta head out for the day pretty soon anyway
EvW has joined #lisp
<Shinmera>
I guess I could change n/vorder to accept numbers as arguments as well so you could do (vorder vec :x :y 1)
tomlukeywood has quit [Quit: tomlukeywood]
<Shinmera>
No, actually, that doens't work
<Shinmera>
and would be pretty bad in terms of violating expectations
Nouv has joined #lisp
jealousmonk has joined #lisp
TCZ has quit [Quit: Leaving]
orivej has joined #lisp
dddddd has quit [Remote host closed the connection]