xxl icon indicating copy to clipboard operation
xxl copied to clipboard

optimizations for pickapart and repr_l fix for large lists

Open joebo opened this issue 9 years ago • 3 comments
trafficstars

joebo avatar Apr 07 '16 12:04 joebo

Regarding the repr_l bit:

When I was watching the strangeloop video about mathematica.. which you absolutely must see if you havent.. https://www.youtube.com/watch?v=EjCWdsrVcBM

I notice that their REPL shows you not only the start of an item that has been clipped, but also the ending. This seems to me to be much more useful than the Q approach which is to simply stop outputting. Often the record I want is the last one. Of course, it is more complicated to implement that way..

Anyway, that's where there's a continue there instead of a break. So you can see the last end of the non-omitted value.

But the logic was wrong anyway. Can you try out this version and see if it works OK for you?

https://github.com/tlack/xxl/commit/61f5118caf2d2c7bc5d9ab1ed72c34eb80738294

I'll respond separately for these other items.

tlack avatar Apr 08 '16 00:04 tlack

Here's some good testing code btw: "abcdef" list deal 1000 vec for strings.. note that "show" will actually output them char-by-char and now use repr_c for UI-usage reasons (i.e., no quotes)..

21 count * 100 :: {count show;} for vectors and

21 count * 100 :: {count list show;} for lists

tlack avatar Apr 08 '16 00:04 tlack

OK, I also applied the pickapart fix. I did it as a fresh commit because I had some trouble w/ the merge after I rewrote the other two. Hope that's ok! Keep sending pull requests - this one was just easier to address piece by piece separately.

Let me know if my fixes cause any issues on your end.

t

tlack avatar Apr 08 '16 00:04 tlack