»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:02
wamba left
|
|||
gfldex | lolibloggedforcale2: gfldex.wordpress.com/2017/02/02/ca...-question/ | 00:03 | |
00:05
titsuki left
|
|||
gfldex | WP tried to be clever again :-| | 00:08 | |
timotimo | "Today cale2 refused to asked an easy question instead" what is this grammar %) | 00:11 | |
man, wordpress really is hell | 00:12 | ||
gfldex | i think i got it now | ||
it ate a <pre> again :-/ | |||
timotimo | yeah, and it ate at least one list between <> | 00:13 | |
in the @a.pick(*) example | |||
and in the multi sub whatever case, too | |||
gfldex | i'm cleary updating it faster then you can read it :-> | 00:14 | |
timotimo | could be | ||
i find the last sentence of the post could be interpreted to be rather mean | |||
and personally i'd have put a note about "multiple * in a WhateverCode make multiple arguments" or something | 00:15 | ||
just a tiny hint | |||
00:15
pyrimidine joined
|
|||
samcv | pretty is good | 00:15 | |
timotimo holds a pretty grudge | |||
gfldex | the last sentence is the best I could come up with to shoehorn a link to the docs in | 00:17 | |
00:17
cpage_ left
|
|||
gfldex | whereby WTFM works better then RTFM | 00:18 | |
timotimo | "what the fucking manual"? :) | 00:19 | |
samcv | wtf Manuel! | 00:20 | |
hobbs | timotimo: I've read a few of those | ||
timotimo | oh manuel, what have you done this time | ||
hobbs: pardon me, a few of what? | 00:21 | ||
00:21
cdg_ left
|
|||
hobbs | what the fucking manuals | 00:21 | |
documentation with high WTF content :) | |||
00:21
aindilis` left
|
|||
samcv | where's the fucking manual | 00:21 | |
gfldex | there are write-only manuals | 00:22 | |
00:22
pyrimidine left
|
|||
timotimo | ah, hehehe | 00:22 | |
samcv: where's the fucking manual, lebowski? | |||
samcv | docs.perl6.org | ||
timotimo | hm. you could totally make a gif out of that scene with that wording | ||
gfldex | i actually meant Write The Fucking Manual, what really works better then reading them | ||
00:22
rurban left
|
|||
timotimo | "let me look again, i think the docs are somewhere down there" | 00:22 | |
hobbs | clearly you're not a perl golfer | 00:23 | |
s/clearly/obviously/ | 00:24 | ||
gfldex | m: constant term:<ℵ₀> = Inf; constant term:<ℵ₁> = Inf; multi sub infix:«<»(ℵ₀, ℵ₁){ True }; say ℵ₀ < ℵ₁; | ||
camelia | rakudo-moar 738493: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Invalid typename 'ℵ' in parameter declaration.at <tmp>:1------> 3t term:<ℵ₁> = Inf; multi sub infix:«<»(ℵ7⏏5₀, ℵ₁){ True }; say ℵ₀ < ℵ₁;» | ||
samcv | sub foo($a where * < 10) === sub foo($a where {$_ < 10}) ?? | 00:25 | |
gfldex | m: multi sub infix:«<»(2, 1){ True }; say 2 < 1; | ||
camelia | rakudo-moar 738493: OUTPUT«True» | ||
timotimo | yup | 00:26 | |
00:27
travis-ci joined
|
|||
samcv | sub foo(*@a where {.all ~~ Int}){} | 00:27 | |
travis-ci | Doc build passed. Will "Coke" Coleda 'update bug report notes for #1077' | ||
travis-ci.org/perl6/doc/builds/197411799 github.com/perl6/doc/compare/2219c...c216bf4ab0 | |||
00:27
travis-ci left
|
|||
samcv | seems you can't do (*@a where *.all ~~ Int); doesn't seem to work right | 00:27 | |
TimToady | m: say *.all ~~ WhateverCode | 00:29 | |
camelia | rakudo-moar 738493: OUTPUT«True» | ||
brokenchicken | m: say (*.all ~~ 'meow') ~~ WhateverCode | ||
camelia | rakudo-moar 738493: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that) in block <unit> at <tmp> line 1False» | ||
brokenchicken | it ain't currying over the ~~ | ||
TimToady | nope, it's one of the exeptions | 00:30 | |
brokenchicken | don't need it in that particular case either, 'cause it thunks; (*@a where .all ~~ Int) should work | ||
TimToady | note it doesn't curry on the RHS either, or you'd be surprised | ||
m: say so Int.ACCEPTS((1,2,3).all) | 00:31 | ||
camelia | rakudo-moar 738493: OUTPUT«True» | ||
TimToady | can always write it like that | 00:32 | |
brokenchicken | not with a *.all curry | ||
TimToady | nope, currying has to stop somewhere, and we never curry from inside argument lists to normal functions/methods | 00:33 | |
brokenchicken | m: sub (*@a where Int.ACCEPS: .all with *.item) { say @a }(1, 2, 3) | ||
camelia | rakudo-moar 738493: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Malformed parameterat <tmp>:1------> 3sub (*@a where Int.ACCEPS: .all with 7⏏5*.item) { say @a }(1, 2, 3)» | ||
brokenchicken | aww | ||
Need moar parentheses | |||
m: sub (*@a where (Int.ACCEPS: .all with *.item)) { say @a }(1, 2, 3) | |||
camelia | rakudo-moar 738493: OUTPUT«No such method 'ACCEPS' for invocant of type 'Int' in sub at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
brokenchicken | m: sub (*@a where (Int.ACCEPTS: .all with *.item)) { say @a }(1, 2, 3) | ||
camelia | rakudo-moar 738493: OUTPUT«Constraint type check failed for parameter '@a' in sub at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
brokenchicken | Oh well | ||
m: dd so 42 ~~ (1, 2, 3).item.all | 00:34 | ||
camelia | rakudo-moar 738493: OUTPUT«Bool::False» | ||
brokenchicken | I see | ||
Is there an identity method. That just returns self for any object? | |||
TimToady | m: say 42.self | 00:35 | |
camelia | rakudo-moar 738493: OUTPUT«42» | ||
brokenchicken | doh :) It's .self :) | ||
m: sub (*@a where (Int.ACCEPTS: .all with *.self)) { say @a }(1, 2, 3) | |||
camelia | rakudo-moar 738493: OUTPUT«Constraint type check failed for parameter '@a' in sub at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
brokenchicken | Oh well | ||
gfldex | where is .self defined? | 00:36 | |
TimToady | m: sub (*@a where (Int.ACCEPTS: .all)) { say @a }(1, 2, 3) | ||
camelia | rakudo-moar 738493: OUTPUT«[1 2 3]» | ||
brokenchicken | gfldex: in Mu | ||
TimToady | m: sub (*@a where @a.all ~~ Real) { say @a }(1, 2, 3) | 00:38 | |
camelia | rakudo-moar 738493: OUTPUT«[1 2 3]» | ||
TimToady | m: sub (*@a where @a.all ~~ Int) { say @a }(1, 2, 3) | ||
camelia | rakudo-moar 738493: OUTPUT«[1 2 3]» | ||
brokenchicken | m: sub (*@a where *.all.&{Int.ACCEPTS: $_}) { say @a }(1, 2, 3) | ||
camelia | rakudo-moar 738493: OUTPUT«[1 2 3]» | ||
brokenchicken | m: sub (*@a where *.all ∈ Int.Range) { say @a }(1, 2, 3) | 00:41 | |
TimToady | that probably curries | ||
camelia | rakudo-moar 738493: OUTPUT«(timeout)» | ||
TimToady | however, it probably also flattens Int.Range | 00:42 | |
brokenchicken | m: dd Int.Range | ||
camelia | rakudo-moar 738493: OUTPUT«(-Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf... lazy list)» | ||
TimToady | we don't really do infinite sets... | ||
brokenchicken | m: sub (*@a where .all ~~ Int.Range) { say @a }(1, 2, 3) | ||
camelia | rakudo-moar 738493: OUTPUT«[1 2 3]» | ||
TimToady | that's why it's called "smart" :P | 00:43 | |
brokenchicken | :)_ | ||
Geth | doc: 1f1947b763 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Mu.pod6 doc Mu.self |
00:44 | |
TimToady | m: say i ~~ Int.Range | ||
camelia | rakudo-moar 738493: OUTPUT«True» | ||
TimToady | hrmmm | 00:45 | |
m: say i.Int | |||
camelia | rakudo-moar 738493: OUTPUT«Can not convert 0+1i to Int: imaginary part not zero in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
TimToady | m: say i < Inf | ||
camelia | rakudo-moar 738493: OUTPUT«Can not convert 0+1i to Real: imaginary part not zero in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
00:47
aindilis joined
|
|||
brokenchicken | s: Int.Range, 'ACCEPTS', \(i) | 00:47 | |
SourceBaby | brokenchicken, Sauce is at github.com/rakudo/rakudo/blob/7384...ge.pm#L419 | ||
00:48
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
brokenchicken | m: say i after -Inf | 00:48 | |
camelia | rakudo-moar 738493: OUTPUT«True» | ||
brokenchicken | That's why. | 00:49 | |
m: say i cmp -Inf | 00:50 | ||
camelia | rakudo-moar 738493: OUTPUT«More» | ||
brokenchicken | hmmmm | ||
m: say i cmp -42 | |||
camelia | rakudo-moar 738493: OUTPUT«More» | ||
brokenchicken | m: say i cmp 42 | ||
camelia | rakudo-moar 738493: OUTPUT«Less» | ||
Geth | doc: d4d9df69a9 | (Wenzel P. P. Peppmeyer)++ | doc/Language/syntax.pod6 doc term:<> (could do with better example) |
00:51 | |
TimToady | it shouldn't really be using cmp for that | ||
cmp tries hard to work across types | |||
brokenchicken | s: &infix:<after>, \(i, -Inf) | ||
SourceBaby | brokenchicken, Sauce is at github.com/rakudo/rakudo/blob/7384...ny.pm#L479 | ||
brokenchicken | Yeah, it's just (a cmp b) > 0 | ||
TimToady: so before/after should throw on Complex<->Real comparisons unless img. part is zero? | 00:52 | ||
TimToady | a numeric range should be using <=>, I'd think | ||
brokenchicken | m: say i <=> 42 | ||
camelia | rakudo-moar 738493: OUTPUT«Can not convert Complex to Real: Complex is not numerically orderable in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
brokenchicken | Aha. Cool. | 00:53 | |
TimToady | m: say 'bb' ~~ 'a'..'z' | 00:54 | |
camelia | rakudo-moar 738493: OUTPUT«True» | ||
brokenchicken | :( | 00:55 | |
TimToady | that's correct | ||
brokenchicken | Huh? | ||
m: say eager 'a'..'z' | |||
camelia | rakudo-moar 738493: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w x y z)» | ||
brokenchicken | but it's not one of items? | ||
TimToady | nope, ranges are, er, ranges, not sequences | ||
00:56
skids joined
|
|||
TimToady | gotta use any('a'..'z') for that | 00:56 | |
brokenchicken | Ah ok | ||
TimToady | m: say 'zoo' ~~ 'a'..'z' | 00:57 | |
camelia | rakudo-moar 738493: OUTPUT«False» | ||
TimToady | you want to carp, carp about that one :) | ||
brokenchicken | I don't get how 'zz' fits in 'a'..'z' range tho | ||
I mean 'bb' | |||
and 'zz' doesn't | |||
m: say 'bbbbbbbb' ~~ 'a'..'z' | 00:58 | ||
camelia | rakudo-moar 738493: OUTPUT«True» | ||
brokenchicken | hehe | ||
m: say 'bbbaaaabbbbb' ~~ 'a'..'z' | |||
camelia | rakudo-moar 738493: OUTPUT«True» | ||
brokenchicken | m: say 'bbbaaaabbbbb' ~~ 'z'..'a' | 00:59 | |
camelia | rakudo-moar 738493: OUTPUT«False» | ||
TimToady | m: say 'a!!!!!' ~~ 'a'..'z' | ||
camelia | rakudo-moar 738493: OUTPUT«True» | ||
TimToady | m: say "a\0" ~~ 'a'..'z' | ||
camelia | rakudo-moar 738493: OUTPUT«True» | ||
TimToady | m: say "a\0" ~~ 'a' ^.. 'z' | ||
camelia | rakudo-moar 738493: OUTPUT«True» | ||
01:04
kurahaupo__ left
01:05
kurahaupo__ joined
01:06
john51 joined
01:09
kurahaupo__ left
01:13
pyrimidine joined
01:18
pyrimidine left
01:20
cpage_ joined
|
|||
brokenchicken | Simply using `(nqp::istype(a, Numeric)||nqp::istype(b, Numeric) ?? a <=> b !! a cmp b) < 0` for before/after doesn't work | 01:21 | |
Spectest fails, like with 'a'..* | |||
.oO( add Numeric, Numeric candidate... ) |
01:22 | ||
But then we get weirdness like `'42' after i` gives something, but `42 after i` says can't make a Real outta i | 01:23 | ||
m: say '42' after i | |||
camelia | rakudo-moar 738493: OUTPUT«True» | ||
brokenchicken | m: say '-42' after i | ||
camelia | rakudo-moar 738493: OUTPUT«False» | ||
01:23
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
|
|||
brokenchicken | hm, maybe it's fine, since cmp uses .Stringy in that case | 01:25 | |
01:26
cpage_ left,
agentzh joined
|
|||
brokenchicken | You know what'd be a cool bot feature? You give it two ops and it tells you which one got higher precedence | 01:27 | |
m: &infix:«>».prec.say | |||
camelia | rakudo-moar 738493: OUTPUT«{}» | ||
brokenchicken | hmm | ||
01:36
cpage_ joined
01:39
astj_ left
|
|||
brokenchicken | Can't get precedence of an op programatically? | 01:40 | |
what's .prec? | |||
m: &infix:«+».prec.say | 01:41 | ||
camelia | rakudo-moar 738493: OUTPUT«{assoc => left, prec => t=}» | ||
brokenchicken | oh, you can. Wonder why there's nothing for `>` | ||
01:45
geekosaur left
01:46
pierrot left,
pierrot joined
01:47
geekosaur joined
01:49
astj joined
|
|||
brokenchicken | m: say i <=> Inf | 01:49 | |
camelia | rakudo-moar 738493: OUTPUT«Less» | ||
brokenchicken | And the rabbit hole deepens :P | 01:50 | |
MasterDuke | samcv: did you see my comment about ternaries? i tested on your code, about 5-10% faster | 01:51 | |
samcv | no i didn't MasterDuke | 01:52 | |
which part? | |||
brokenchicken | m: say i <=> 42 | ||
camelia | rakudo-moar 738493: OUTPUT«Can not convert Complex to Real: Complex is not numerically orderable in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
brokenchicken | s: &infix:«<=>», \(i, 42) | ||
SourceBaby | brokenchicken, Sauce is at github.com/rakudo/rakudo/blob/7384...ex.pm#L477 | ||
brokenchicken | I don't get how that managed to throw | ||
m: say i <=> 42.Complex | 01:53 | ||
camelia | rakudo-moar 738493: OUTPUT«Can not convert Complex to Real: Complex is not numerically orderable in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
brokenchicken | m: say 42.Complex | ||
camelia | rakudo-moar 738493: OUTPUT«42+0i» | ||
brokenchicken | m: say i <=> <42+0i> | ||
camelia | rakudo-moar 738493: OUTPUT«Can not convert Complex to Real: Complex is not numerically orderable in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
brokenchicken | :S wtf | ||
s: &infix:«<=>», \(i, <42+0i>) | |||
SourceBaby | brokenchicken, Sauce is at github.com/rakudo/rakudo/blob/7384...ex.pm#L467 | ||
mspo | m: say 0i.perl | ||
camelia | rakudo-moar 738493: OUTPUT«<0+0i>» | ||
brokenchicken | # Fail unless imaginary parts are relatively negligible, compared to real parts. | 01:54 | |
I see | |||
A bit of a confusing error, since I thought it was trying to convert X to Real | |||
m: say Inf.Complex | 01:55 | ||
camelia | rakudo-moar 738493: OUTPUT«Inf+0i» | ||
brokenchicken | Seems there's a bit of a glitch either in that thing or in the =~= op involving Infs | 01:57 | |
.oO( how did I manage to start debugging this instead of playing my video games :/ ) |
|||
MasterDuke | samcv: replacing gist.github.com/samcv/566950400b06...p6-L57-L62 with `%decomp_spec{$cp}<type> = nqp::eqat(nqp::atpos(@dec, 0), '<', 0) ?? nqp::shift(@dec) !! 'Canonical'` was faster | 01:58 | |
samcv | ah | 01:59 | |
02:01
agentzh left
|
|||
brokenchicken | tis the tolerance computation. Ends up being Inf | 02:01 | |
samcv | thanks | 02:03 | |
MasterDuke | np | ||
02:04
noro left,
melezhik left,
travis-ci joined
|
|||
travis-ci | Doc build passed. Will "Coke" Coleda 'learn new label' | 02:04 | |
travis-ci.org/perl6/doc/builds/197420375 github.com/perl6/doc/compare/33c21...1d921bcb40 | |||
02:04
travis-ci left,
dugword joined
02:08
dugword left
|
|||
brokenchicken | m: say <42+42i> after <42+43i> | 02:10 | |
camelia | rakudo-moar 738493: OUTPUT«False» | ||
brokenchicken | m: say <42+42i> after <42+41i> | ||
camelia | rakudo-moar 738493: OUTPUT«True» | ||
02:11
agentzh joined
|
|||
brokenchicken | TimToady: ^ that now throws. Should it work? The <=> allows Complex comparison only if imaginary parts are negligible compared to Real parts. While with `cmp` just `cmp`s real/imaginary parts separately | 02:14 | |
I wish I knew more about Complex numbers :( | |||
SmokeMachine | m: role R[::T] {has T:U $.t} #is that right? | 02:15 | |
camelia | rakudo-moar 738493: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable definition of type T:U requires an initializerat <tmp>:1------> 3role R[::T] {has T:U $.t7⏏5} #is that right? expecting any of: constraint» | ||
brokenchicken | Don't know if `cmp` on Complex is wrong or my patch to before/after for Complex is wrong. | ||
SmokeMachine | m: role R[::T] {has T $.t} | 02:16 | |
camelia | ( no output ) | ||
SmokeMachine | m: role R[::T] {has T:_ $.t} | ||
camelia | ( no output ) | ||
SmokeMachine | m: role R[::T] {has T:U $.t = T} | ||
camelia | ( no output ) | ||
brokenchicken | m: role { has Int:U $.t } | ||
camelia | ( no output ) | ||
brokenchicken | weird | ||
SmokeMachine: I'm no expert, but it looks buggy to me | |||
SmokeMachine | brokenchicken: yes... weird... | 02:17 | |
brokenchicken: to me to... | |||
too | |||
that would make sense with T:D | |||
m: role R[::T] {has T:D $.t} | 02:18 | ||
camelia | rakudo-moar 738493: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable definition of type T:D requires an initializerat <tmp>:1------> 3role R[::T] {has T:D $.t7⏏5} expecting any of: constraint» | ||
02:18
cpage_ left
|
|||
brokenchicken | .ask TimToady should `<42+42i> after <42+41i>` throw? It used to work, but now that I made `after` use `<=>` for Numeric+Numeric it only works if img part is negligible github.com/rakudo/rakudo/commit/ab3162c127 | 02:24 | |
yoleaux | brokenchicken: I'll pass your message to TimToady. | ||
02:28
cale2 joined
02:29
yqt left
|
|||
brokenchicken | I think I misunderstood TimToady :) I now see in the log he said the numeric *range* should use <=> not before/after | 02:35 | |
TimToady | no, it shouldn't throw; I was talking about changing Range's smartmatch, not changing cmp | ||
yoleaux | 02:24Z <brokenchicken> TimToady: should `<42+42i> after <42+41i>` throw? It used to work, but now that I made `after` use `<=>` for Numeric+Numeric it only works if img part is negligible github.com/rakudo/rakudo/commit/ab3162c127 | ||
brokenchicken | :D | 02:36 | |
OK. Thanks for clarifying :) | |||
02:39
agentzh left
|
|||
brokenchicken | added it to my todo list to fix tomorrow evening | 02:39 | |
02:39
pyrimidine joined
|
|||
TimToady | cmp has to stay mellow, so we can always sort a list | 02:41 | |
brokenchicken | Yeah, makes sense :) | 02:44 | |
'night \o | |||
02:44
pyrimidine left
02:45
ilbot3 left
02:47
ilbot3 joined,
ChanServ sets mode: +v ilbot3
02:52
melezhik joined
03:08
Actualeyes left
03:10
cpage_ joined
03:11
Actualeyes joined
03:20
dugword joined
03:24
xtreak joined
03:28
travis-ci joined
|
|||
travis-ci | Doc build passed. Will "Coke" Coleda 'link to "how to report a bug" ; closes #1077' | 03:28 | |
travis-ci.org/perl6/doc/builds/197421011 github.com/perl6/doc/compare/d91d9...cd18d3143d | |||
03:28
travis-ci left
03:31
agentzh joined
03:35
cdg joined
03:36
cale2 left
03:37
Sgeo joined
03:38
noganex_ joined
03:40
noganex left
03:44
zacts left
03:56
pyrimidine joined
04:04
zacts joined
04:09
agentzh left
04:29
agentzh joined
04:40
hartenfels joined
04:49
geekosaur left
04:50
geekosaur joined
04:51
agentzh left
04:53
sakawaka left
04:58
Cabanoss- joined
04:59
itcharlie left
05:00
agentzh joined,
Sgeo left
05:02
Cabanossi left,
Cabanoss- is now known as Cabanossi
05:14
khw left,
kyan left
05:15
agentzh left
05:23
agentzh joined
05:24
CIAvash joined
05:26
cdg left
05:27
aborazmeh left,
Xliff joined
05:28
Xliff left
05:30
cpage_ left
05:37
Dandel_ left
05:41
BenGoldberg left
05:56
Xliff joined
05:57
cpage_ joined,
Xliff left
05:59
cpage_ left,
agentzh left
06:00
rurban joined,
rurban left
06:05
cpage_ joined
06:06
cpage_ left,
cpage_ joined
06:09
cog_ joined,
noganex joined
06:11
cpage_ left
06:12
lep-delete left,
stmuk_ joined,
noganex_ left,
_28_ria left,
cognominal left,
captain-adequate left,
inokenty left
06:13
wamba joined,
avuserow left,
breinbaas left,
sivoais left,
cgfbee left,
Celelibi left,
_28_ria joined,
inokenty joined
06:14
japhb joined,
sunnavy joined,
sivoais joined
06:15
captain-adequate joined
06:16
lep-delete joined,
cpage_ joined
06:18
Celelibi joined
06:21
breinbaas joined
06:22
TEttinger left
06:27
avuserow joined
06:29
TEttinger joined
06:33
cgfbee joined
06:35
hartenfels1 joined,
domidumont joined
06:36
hartenfels left,
hartenfels1 is now known as hartenfels
|
|||
masak | lol, I blog'd! strangelyconsistent.org/blog/deep-git | 06:37 | |
06:41
domidumont left
06:42
domidumont joined
06:51
RabidGravy joined
06:56
xtreak left
07:00
xtreak joined
07:03
dugword left
07:08
domidumont left
|
|||
tadzik | :o | 07:09 | |
07:15
darutoko joined
07:26
bjz joined,
KDr2 joined
07:31
KDr2 left
07:32
wamba left
07:35
astj_ joined,
astj left
07:41
matt_ left
07:42
skids left
07:49
domidumont joined
07:51
matt_ joined,
matt_ is now known as Guest15861
|
|||
moritz | masak++ | 07:57 | |
08:08
zacts left
08:09
Guest15861 is now known as matt_,
tokomer joined
08:21
zakharyas joined
08:30
tokomer left
|
|||
jast | masak: very good post. one minor nitpick: git knows two different meanings for 'merge'. one is commit-level merge, one is file-level three-way merge. the latter is used in rebase, cherry-pick etc., too, so technically those conflicts can still be called merge conflicts. :) | 08:32 | |
08:35
tokomer joined
08:41
bjz_ joined,
rurban joined
08:42
dakkar joined,
bjz left
08:49
xtreak left
|
|||
samcv | nice my UCD-gen.p6 script is now fast enough that it takes only 80 minutes to finish the slowest routine ;) | 08:50 | |
08:51
zacts joined
|
|||
samcv | faster on my laptop i think but that 80 minutes was on the bisectable server | 08:51 | |
running again to see how my latest speedups have fared | |||
08:51
xtreak joined
08:55
matt_ left
08:59
tokomer left
09:00
astj joined,
astj_ left
09:01
matt_ joined,
matt_ is now known as Guest17802
09:02
Guest17802 is now known as matt_
09:06
Vynce joined
|
|||
samcv | i-i think maybe it's slowing down because it has too many keys in the hash? | 09:09 | |
toward the end of the file it seems to be very very slow, and i'm not sure if it's caused by collisions in the hash library? | 09:10 | ||
it starts getting super slow around 1048576 items in it | |||
lizmat | hows memory usage going ? | 09:13 | |
samcv | uh using 6% of my memory, i have 16GB | ||
09:13
xtreak left
|
|||
samcv | not at a million yet on the current run, but at a million it seems like | 09:15 | |
i mean it probably slows down before amillion, but it's most perceptible cause that's like almost at the end of the fgile | |||
and it still takes minutes to get to the end | |||
09:18
xtreak joined
|
|||
lizmat | hmmm.... | 09:21 | |
09:21
Actualeyes left
|
|||
samcv | could be caused by hash collisions maybe? or something else? | 09:21 | |
09:21
andrzejku joined
|
|||
lizmat | I'm not sure how we hash nowadays: I seem to recall it was changed not too long ago by jnthn | 09:22 | |
andrzejku | hey people | ||
I know that some of you are web developers | |||
tell me please how do you prototype your apps | |||
do you use some prototype tools? | |||
or just a pencil | |||
samcv | so the file has 30,000 lines it it. maybe i'll make a timer every 1,000 lines so i can get some data about this | 09:23 | |
09:29
ufobat joined
|
|||
samcv | wow so i get to use `gather/take` for the first time now | 09:29 | |
always wanted to use this | |||
09:39
pyrimidi_ joined,
pyrimidine left
09:40
cpage_ left
09:45
Actualeyes joined
|
|||
Geth | doc: d1788cadb3 | (Samantha McVey)++ | util/trigger-rebuild.txt Trigger rebuild to pull in atom-language-perl6 v1.14.0 |
09:50 | |
samcv | andrzejku, i often find thinking about any computer stuff drawing can help. | ||
i really should employ that more often tbh | |||
09:57
rindolf left,
agentzh joined
|
|||
masak | jast: interesting point. tempted to include that as an aside in the post ;) | 09:58 | |
10:02
agentzh left
10:04
labster left
10:06
riatre joined
10:08
rindolf joined
10:12
riatre left
10:13
riatre joined
10:17
rindolf left
|
|||
samcv | lizmat, here's a CSV of timings taken every 500 lines gist.github.com/samcv/6290f3ac0667...b5347e65c2 | 10:18 | |
that one doesn't look particularly bad | 10:20 | ||
but definitely gets higher as it goes on | |||
arnsholt | Those are timings *between* each batch, not cumulative, right? | ||
samcv | not cummulative | ||
err wait that's not all of them i think | 10:21 | ||
err maybe it is | |||
yeah that's all that showed up at least | |||
running it again though | |||
i think it might not be measuring a very last number | 10:23 | ||
which is where it's the slowest but | 10:24 | ||
Took 1137.77617592 secs to process 30564 and 37.2260 ms/line | 10:25 | ||
that doesn't sound right | 10:26 | ||
it can't have taken that little time | |||
10:26
abraxxa joined
|
|||
samcv | i guess 18 sounds close though | 10:26 | |
it maybe is just taking a long time to process lines which apply to a range of codepoints hmm | 10:27 | ||
so maybe it's somewhat that. it does seem to get slower as it goes on but i think most of the slowdown could be those lines which it has apply for thousands of cp's | 10:28 | ||
i will change it so that it takes timings every 1000 cp's instead of per lines of the file | |||
but it's weird because i timed how long it'd take to apply a pretty big range in a test file and it was pretty fast | 10:29 | ||
but that was with a previously empty hash, not wit one with almost a million things in it | |||
10:30
astj left,
abraxxa left,
astj joined
10:32
astj left,
astj joined
|
|||
samcv | yeah it looks like that's what's slowing down it. i'm unsure how to make this faster argh | 10:33 | |
10:33
bjz joined
10:34
astj left,
bjz_ left
|
|||
samcv | i mean it shouldn't take THAT long to bind 65,000 keys? but all the keys are identical | 10:35 | |
10:35
melezhik_ joined
|
|||
melezhik_ | Hi! | 10:35 | |
samcv | i'm using nqp::bindkey(%points, $cp_s, $hashy); | ||
melezhik_ | need a little help with regexp | ||
samcv | fire away melezhik_ | ||
arnsholt, is it possible it's duplicating the object? | |||
melezhik_ | I want to match none empty symbols between '[' and ']' | 10:36 | |
10:36
astj joined,
cpage_ joined
|
|||
samcv | none empty? | 10:36 | |
10:36
cpage_ left
|
|||
samcv | what does that mean | 10:36 | |
10:36
AlexDaniel joined
|
|||
melezhik_ | in perl5 I would have /\[(\S+)\]/ | 10:36 | |
10:37
eiro left
|
|||
melezhik_ | how to say this in perl6? | 10:37 | |
samcv | / '[' ( \S+ ']' ) / | ||
that should work | |||
melezhik_ | s/none empty/none spaces/ | ||
samcv | you don't need the space | ||
melezhik_ | samcv: thanks, will try | ||
samcv | that i put in my example. but in perl 6 spaces are not significant | ||
melezhik_ | yeah, I know | 10:38 | |
jast | the exact same expression as in perl5 works for me, too | ||
melezhik_ | but I still perl5 in mind as for the regex, so it's hard for me every time I start writting perl6 ones , hehh (: | ||
moritz blatantly advertises the regexes and grammar chapter in leanpub.com/perl6 | 10:39 | ||
10:41
tokomer joined
10:43
MasterDuke left
10:44
eiro joined
|
|||
CIAvash | melezhik_: also /'[' ~ ']' (\S+)/ | 10:44 | |
melezhik_ | CIAvash: - thanks | 10:46 | |
Indeed my initial perl6 regex was fine, but I used $1 instead of $0 (: | |||
I forgot that perl6 starts count numbered captures with $0 | 10:47 | ||
10:49
abraxxa joined
10:54
araujo joined,
araujo left,
cschwenz joined,
araujo joined
10:55
cschwenz left
10:57
espadrine joined
10:58
AlexDaniel left,
tokomer left
11:00
AlexDaniel joined
11:03
xtreak left
11:04
xtreak joined,
xtreak left,
xtreak joined
11:07
cpage_ joined
|
|||
masak | m: multi sub trait_mod:<is>(Routine $r, :$ohhai!) is export(:DEFAULT, :traits) {}; sub foo($x) is ohhai {} | 11:10 | |
camelia | ( no output ) | ||
masak | ...but... | ||
m: multi sub trait_mod:<is>(Routine $r, :$ohhai!) is export(:DEFAULT, :traits) {}; sub foo($x) is ohhai($x) {} | 11:11 | ||
camelia | rakudo-moar 18e6f0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Can't use unknown trait 'is ohhai' in a sub declaration.at <tmp>:1 expecting any of: rw raw hidden-from-backtrace hidden-from-USAGE pure default DEPRECATED inlinable nodal …» | ||
masak | why is the trait suddenly unknown when I pass it a parameter? :) | ||
brokenchicken | melezhik_: that can be avoided with named captures: /'[' ~ ']' $<stuff>=\S+/ | ||
masak | m: multi sub trait_mod:<is>(Routine $r, :$ohhai!) is export(:DEFAULT, :traits) {}; sub foo($x) is ohhai(42) {} | ||
camelia | ( no output ) | ||
brokenchicken | melezhik_: and you use $<stuff> to access it | ||
masak | oh, it's only when I give it an $x from the parameter list | ||
arnsholt | samcv: Hard to say. But you could very well be running into performance issues in large hashes | ||
masak | m: multi sub trait_mod:<is>(Routine $r, :$ohhai!) is export(:DEFAULT, :traits) {}; my $x; sub foo() is ohhai($x) {}; say "alive" | 11:12 | |
camelia | rakudo-moar 18e6f0: OUTPUT«alive» | ||
masak | everything works except passing an `$x` from the parameter list. that's what I thought. | ||
samcv | arnsholt, it seems it made it hugely faster by moving some stuff from the sub it called into the calling sub | ||
and it was not much code in there anyway so idk | |||
arnsholt | samcv: At any rate, there does look to be at least one non-trivial GC-pause in the timings you posted: Most of them are tens of seconds, but one's 10 seconds | ||
samcv | so that seems the bulk of the issue | ||
masak | problem is, `$x` is in *scope* at that point, but (due to timing issues) it doesn't really make *sense* to pass `$x` to the trait | ||
arnsholt | Ah, cool | ||
masak | we should probably have a dedicated error message for this, just in case other people are as unreasonable as I am :P | 11:13 | |
samcv | also doing for %points.keys -> $code; i get Use of uninitialized value <element> of type Any in string context. | ||
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. | |||
in block at ./UCD-gen.p6 line 366 | |||
11:14
ufobat left
|
|||
samcv | and i have no clue what it can't use in a string context and $code is populated with the key inside the body of the for loop | 11:14 | |
it functions perfectly so i used to have a quietly on there. but that makes it slower so | |||
i need to figure out how to solve this :\ | |||
this is the code github.com/samcv/UCD/blob/master/U...#L362-L366 | 11:16 | ||
11:20
confundus joined
|
|||
samcv | even if i do `my @iter = %points.keys.List;` i still get the problem when iterating over @iter | 11:23 | |
oh looks like it's not the iterating but another place. himm. nvm then | 11:24 | ||
arnsholt | masak: Should parameters be in scope for a trait application though? | 11:26 | |
That sounds odd, to me | |||
11:29
AlexDaniel left
|
|||
jnthn | To do otherwise would mean a scope "hole" | 11:30 | |
It's not really a scoping problem, more a timing problem. | |||
masak | what jnthn++ said | 11:31 |