Search
Thursday, 19th of October 2017, 2:57:00 UTC
4:27:43
drmeister
We are making faster progress optimizing clasp. We've figured out how to use profiling and flame graphs to identify what is taking time.
4:27:44
drmeister
https://i.imgur.com/5cXnXrP.png
4:28:00
drmeister
This is what you get from allocating CLOS objects in a loop.
4:28:58
drmeister
For instance - from this it's easy to see that initialization is taking more time than allocation.
4:30:04
drmeister
Common Lisp code and C++ code are all compiled to the same llvm bitcode and on to native code - that lets us profile them together.
4:44:51
Zhivago
I congratulate your failure to die so far.
4:45:57
iqubic
I am still alive, yes.
4:46:06
iqubic
I have thought about death though.
4:46:10
iqubic
But I am still alive.
5:20:09
emaczen
where are the ABCL logs located?
5:31:34
borei
how to add to empty list
5:31:57
borei
(nconc *a* (list 1 2 3))
5:32:34
emaczen
(setf *a* (nconc *a* (list 1 2 3)))
5:32:49
emaczen
push will only add one element to the front of the list
5:33:11
borei
wait a sec, nconc modifies list
5:33:16
emaczen
for conc nonc reverse nreverse etc... you have to do setf
5:33:34
Zhivago
nconc _may_ modify the list.
5:33:40
borei
http://www.gigamonkeys.com/book/they-called-it-lisp-for-a-reason-list-processing.html
5:33:47
borei
(defparameter *x* (list 1 2 3))
5:33:47
borei
(nconc *x* (list 4 5 6)) ==> (1 2 3 4 5 6)
5:33:47
borei
*x* ==> (1 2 3 4 5 6)
5:34:23
Zhivago
But you may note that '() is nil, and nil can't be modified.
5:34:54
Zhivago
So you need to write (setf *a* (nonc ...))
5:35:07
borei
Zhivago: yes '() is nil
5:35:44
Zhivago
And as nil cannot be modified, (nconc *a* ...) cannot modify the value of *a*, since that value is nil.
5:36:01
Zhivago
Thus *a* has the value nil after that call.
5:37:32
borei
one more general question then
5:37:38
Zhivago
PUSH, on the other hand, modifies the variable, not its value.
5:38:24
borei
what would be best option for collection to accumulate pretty big number of items ?
5:38:37
borei
items are single-float and int
5:38:38
Zhivago
It depends on what you want to do with it afterward.
5:40:01
borei
after that just linear access to dump to another memory
5:40:27
borei
to another collection
5:40:29
Zhivago
Do you know how many of these you expect to collect in advance?
5:40:45
borei
technically yes, i can calcualte
5:40:50
Zhivago
And that sounds pretty pointless -- why don't you just put it in the other collection to start with?
5:42:13
borei
another collection is gl:array, and the first place where im generating first collection has no idea about gl: at all
5:43:04
Zhivago
Why not bridge the gap with some kind of emitter that understand both ends?
5:43:37
Zhivago
Instead of building a collection, pass a function which can be called with each value.
5:43:59
Zhivago
Then have the receiver construct a suitable function to put the value where it needs to go.
5:44:21
Zhivago
Now the producer and consumer are decoupled by the function.
5:45:26
blackadder
** NICK SaganMan
5:45:34
Zhivago
(iterate-wombles (lambda (womble) (put-in-cement-mixer womble))
5:45:54
Zhivago
Well, it's probably time to think about it since it would make your current problem evaporate.
5:46:36
borei
im just trying to construct data pipeline at first approach
5:48:15
borei
but the problem with "empty list" initialization is much more fundamental
5:49:20
Zhivago
Then I suggest using pipes rather than collections.
5:59:30
borei
Zhivago: i'll try to catch you tomorrow, wanted to chat a bit about pipes, about to run now
6:29:20
beach
Good morning everyone!
7:19:44
beach
phoe_: I completely forgot. I'll try to do it today.
9:48:07
hlavaty
hi, ist there a way to make file-length work on custom gray stream?
9:48:42
hlavaty
could be limited to sbcl and ccl
9:57:47
lieven
setf stream-file-position to :end and see if file-position returns a number instead of :end
9:59:27
hlavaty
lieven: yeah, but then i need to implement seeking
10:00:14
hlavaty
i am adding streaming version to zip inflate and it would be very handy, if file-length worked out of the box
10:02:34
lieven
file-length isn't part of the gray stream protocol IIRC
10:03:25
hlavaty
i know, normally i avoid the whole common lisp idea of streams
10:03:48
lieven
anyhow, with text files you get into the octets versus characters encoding problems anyway
10:04:19
lieven
let alone the non posix filesystems that were around when the spec was finalized
10:05:05
lieven
on some systems even determining octet size was a O(n) operation
10:05:16
hlavaty
i don't care about that
10:05:42
lieven
add a mystream-file-length to your API and call it quits :)
10:37:43
beach
phoe_: Got an answer from moore33. He will release it under a different license.
14:01:29
turkja
you when you have done too much lisp programming.. when working on a python gui program, you realize that your source changes are not working... after restarting the program :D
14:03:24
_death
in that case, you have done too much python programming
14:07:32
turkja
eheh.. but lately i've working on stumpwm, and got so spoiled on just throwing changes to living window manager i didn't even think things can be any other way.. was staring stupidly why my code doesn't work??
Thursday, 19th of October 2017, 14:57:00 UTC