|
🦋 Welcome to the IRC channel of the core developers of the Raku Programming Language (raku.org #rakulang). This channel is logged for the purpose of history keeping about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Logs available at irclogs.raku.org/raku-dev/live.html | For MoarVM see #moarvm Set by lizmat on 8 June 2022. |
|||||||||||||||||||||||||||||||||||||||
|
10:59
sena_kun joined
|
|||||||||||||||||||||||||||||||||||||||
| ab5tract | m: { .keys Z .values }(<a b c d e f>) ==> say() | 11:45 | |||||||||||||||||||||||||||||||||||||
| camelia | ((0 a) (1 b) (2 c) (3 d) (4 e) (5 f)) | ||||||||||||||||||||||||||||||||||||||
| ab5tract | lizmat: ^^ | 11:47 | |||||||||||||||||||||||||||||||||||||
| lizmat | ah, duh, yeah, the default for Z is , not => duh :-) | 11:48 | |||||||||||||||||||||||||||||||||||||
| which is what it is effectively now | |||||||||||||||||||||||||||||||||||||||
| ab5tract | Not really | 11:49 | |||||||||||||||||||||||||||||||||||||
| Imo flattening kv was unnecessary and needlessly breaks the semantics of map and grep from being a simple “processes a list on element at a time” | 11:50 | ||||||||||||||||||||||||||||||||||||||
| *one | |||||||||||||||||||||||||||||||||||||||
| The zip of keys and values is the actual implementation of kv if you git log it | 11:51 | ||||||||||||||||||||||||||||||||||||||
| *actual implementation originally | 11:52 | ||||||||||||||||||||||||||||||||||||||
| Anyway, imo that’s the actual source of conflict from that thread. .kv doesn’t have the same shape as .kv.map or .kv.grep (when those operations return both k and v) | 11:54 | ||||||||||||||||||||||||||||||||||||||
| But: if there are significant performance benefits from the way it works now… | 12:05 | ||||||||||||||||||||||||||||||||||||||
|
12:14
sena_kun left
|
|||||||||||||||||||||||||||||||||||||||
| lizmat | m: my $i = <a b c>.kv.iterator; say $i.pull-one for ^6 | 12:17 | |||||||||||||||||||||||||||||||||||||
| camelia | 0 a 1 b 2 c |
||||||||||||||||||||||||||||||||||||||
| lizmat | this is how .kv is implemented: no additional objects are created | ||||||||||||||||||||||||||||||||||||||
|
12:20
sena_kun joined,
sena_kun left
12:23
sena_kun joined
|
|||||||||||||||||||||||||||||||||||||||
| ab5tract | I’m a bit confused. That example just shows that .kv produces a flat list, I don’t see how it reflects the actual implementation (since your example calls .kv ) | 12:33 | |||||||||||||||||||||||||||||||||||||
| I’m not disputing that it does this. I’m mentioning that it did not always do that. | 12:34 | ||||||||||||||||||||||||||||||||||||||
| But it’s early here and I’m recovering from a cold, so apologies in advance for grok failures | 12:35 | ||||||||||||||||||||||||||||||||||||||
| lizmat | I was jus showing that creating Lists would be extra work | 12:56 | |||||||||||||||||||||||||||||||||||||
| [Tux] |
|
14:29 | |||||||||||||||||||||||||||||||||||||
| tux.nl/Talks/CSV6/speed4-20.html / tux.nl/Talks/CSV6/speed4.html tux.nl/Talks/CSV6/speed.log | |||||||||||||||||||||||||||||||||||||||
| slight slowdown. PC is not busy | |||||||||||||||||||||||||||||||||||||||
| ab5tract | It looks like the make list / destructure list required in my idealized .kv is 3x as slow :( | 16:45 | |||||||||||||||||||||||||||||||||||||
| So yeah, I'll let that dream go away | 16:55 | ||||||||||||||||||||||||||||||||||||||
|
20:47
bartolin left,
bartolin joined,
lizmat_ joined
20:50
lizmat left
23:17
sena_kun left
|
|||||||||||||||||||||||||||||||||||||||