»ö« 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
seatek joined
00:05
trnh left
|
|||
dudz | thanks perlawhirl , thought i'd ask | 00:09 | |
00:11
firstdayonthejob joined,
sufrostico left
00:13
pierre_ joined
00:17
mohae joined
00:18
sufrostico joined,
firstdayonthejob left
00:20
mohae_ left
00:22
baest left
00:23
pierre_ left
00:27
baest joined
00:29
espadrine left
00:32
pierre_ joined
00:33
ocbtec left
00:34
raiph left
00:35
raiph joined
00:36
pierre_ left
00:41
raiph left
00:42
raiph joined
00:55
sufrostico left
01:02
raiph left
01:03
raiph joined,
firstdayonthejob joined
01:05
wamba left
01:15
labster left,
kyclark_ left
01:17
AlexDaniel joined,
pierre_ joined
01:32
pierre_ left
01:35
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:38
unicodable6 left
01:39
firstdayonthejob left
|
|||
seatek | if you do a ["a".."z"].pick -- does it allocate the whole range before picking? is pick 1, "a".."z" any different? | 01:46 | |
01:47
sftp left
|
|||
timotimo | when you write ["a".."z"], it'll iterate the range to put it into a list, as you requested | 01:50 | |
if you do ("a".."z").pick, it should be better | |||
seatek | :) that's pretty much what i was thinking too | ||
i can't seem to find any difference between pick and roll | 01:55 | ||
timotimo | yeah, it's only for when you give it a number | 01:56 | |
m: say ("a".."h").pick(10) | |||
camelia | rakudo-moar f928a2: OUTPUT«(c b d f h e a g)» | ||
timotimo | m: say ("a".."h").roll(10) | ||
camelia | rakudo-moar f928a2: OUTPUT«(a d c f b d e f b h)» | ||
timotimo | m: say ("a".."h").roll(100) | ||
camelia | rakudo-moar f928a2: OUTPUT«(h c d e h e d h a h a f a b e f c d d g d g g b h e g c c e a g c h g h h b b b c c b c a a h e h f f c h g b g a h c a c e a a e c a g f e e b a h g f e a a c g c e d e g g f e a b a f g e a c f d g)» | ||
timotimo | m: say ("a".."h").pick(100) | ||
camelia | rakudo-moar f928a2: OUTPUT«(f c h d b g e a)» | ||
timotimo | pick is "pick one, don't put it back" | ||
roll is "roll it like a dice" | |||
seatek | oh my gosh how subtle and cool :) | 01:57 | |
01:57
bisectable6 left,
benchable6 left,
committable6 left,
evalable6 left
|
|||
seatek | timotimo++ thank you | 01:58 | |
japhb | timotimo: 'dice' is plural. :-) | 02:01 | |
timotimo | oh fuck off and dice, english ;) | 02:02 | |
japhb | 'die' is the singular. | ||
Pretty much. | |||
02:09
aborazmeh left
02:10
raiph left,
raiph joined
02:14
bisectable6 joined,
ChanServ sets mode: +v bisectable6,
committable6 joined,
ChanServ sets mode: +v committable6,
evalable6 joined,
benchable6 joined
02:15
unicodable6 joined
02:20
raiph left,
raiph joined
02:27
kalkin- left,
kalkin-_ joined
02:32
pierre_ joined
02:36
pierre_ left
02:39
Unavowed left
02:40
pierre_ joined,
Unavowed joined,
labster joined
02:43
pierre_ left
02:45
ilbot3 left
02:47
ilbot3 joined
02:48
raiph left
02:49
raiph joined
02:50
Unavowed left
02:51
Unavowed joined
02:54
kyclark_ joined
02:56
pierre_ joined
03:02
raiph left
03:04
raiph joined
03:05
raiph left,
raiph joined
03:13
kyclark_ left
03:24
shin- joined,
canopus left
03:27
aborazmeh joined,
aborazmeh left,
aborazmeh joined
03:30
noganex joined
03:31
canopus joined
03:32
noganex_ left
03:42
xtreak joined
03:47
raiph left
03:48
raiph joined
|
|||
shin- | m: say 10; | 03:53 | |
camelia | rakudo-moar f928a2: OUTPUT«10» | ||
labster | bisect: old=2016.10 my $errors = 3; my @stuff = flat ("abc" xx 255) Z ("12" xx 128+$errors); for @stuff -> $line { unless $line ~~ m/1/ { say "seen: $line" if $line.index("2") }; if $line ~~ m/9/ { } } | 03:57 | |
bisectable6 | labster, On both starting points (old=2016.10 new=f928a20) the exit code is 0 and the output is identical as well | ||
labster, Output on both points: | |||
labster | bisect: my $errors = 3; my @stuff = flat ("abc" xx 255) Z ("12" xx 128+$errors); for @stuff -> $line { unless $line ~~ m/1/ { say "seen: $line" if $line.index("2") }; if $line ~~ m/9/ { } } | 03:58 | |
bisectable6 | labster, Bisecting by output (old=2015.12 new=f928a20) because on both starting points the exit code is 0 | ||
labster, bisect log: gist.github.com/2be3fc5ee5f1d7ca2d...886341ceaf | |||
labster, (2016-08-19) github.com/rakudo/rakudo/commit/25...b0673f26e2 | |||
labster | heh, moar bump. | ||
ZzZombo_ | Inline::Perl5 returns wrongly false for ^can calls on P5 objects. | 04:07 | |
04:07
ZzZombo_ is now known as ZzZombo
04:08
ZzZombo is now known as Guest51424,
khw left,
Guest51424 left,
Guest51424 joined,
Guest51424 is now known as ZzZombo
|
|||
ZzZombo | fucking stupid nickserv | 04:08 | |
04:12
kyclark_ joined
04:14
labster left
04:15
AlexDaniel left
04:20
ZzZombo left
04:21
pierre_ left
04:23
pierre_ joined
04:27
pierre_ left
04:34
kyclark_ left
04:51
skrshn joined
04:58
jameslenz left
04:59
shin- left,
xiaomiao left
|
|||
timotimo | that feel when rakudo.org is dead | 05:02 | |
skrshn | hello I am interested in solving the computation of Euler number using Rat lazily - gist.github.com/anonymous/7bc8161c...1c54f43088 | ||
stuck | |||
05:03
jameslenz joined
05:04
xiaomiao joined
|
|||
timotimo | m: (0...*).map({ 1 / [*]1..$^a }).produce(* + *)[^10].say | 05:05 | |
camelia | rakudo-moar f928a2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Two terms in a rowat <tmp>:1------> 3(0...*).map({ 1 / [*]7⏏051..$^a }).produce(* + *)[^10].say expecting any of: infix infix stopper statement end s…» | ||
timotimo | m: (0...*).map({ 1 / [*] 1..$^a }).produce(* + *)[^10].say | ||
camelia | rakudo-moar f928a2: OUTPUT«(1 2 2.5 2.666667 2.708333 2.716667 2.718056 2.718254 2.718279 2.718282)» | ||
timotimo | skrshn: does that look good to you? | ||
skrshn | let me check :-) | ||
timotimo | m: (0...*).map({ 1 / [*] 1..$^a }).produce(* + *)[^10]>>.nude.say | 05:06 | |
camelia | rakudo-moar f928a2: OUTPUT«((1 1) (2 1) (5 2) (8 3) (65 24) (163 60) (1957 720) (685 252) (109601 40320) (98641 36288))» | ||
skrshn | cool I need to look up produce | ||
At what point does a Rat get converted to Num? | 05:07 | ||
05:09
Cabanossi left
|
|||
gfldex | on any sub or method listed as returning Numeric in docs.perl6.org/type/Cool | 05:10 | |
05:10
skids joined
|
|||
timotimo | i think when the denominator overflows 64bit | 05:10 | |
skrshn | timotimo: thanks a lot | ||
timotimo | m: (0...*).map({ FatRat.new(1,1) / [*] 1..$^a }).produce(* + *)[100]>>.nude.say | 05:11 | |
camelia | rakudo-moar f928a2: OUTPUT«((4299778907798767752801199122242037634663518280784714275131782813346597523870956720660008227544949996496057758175050906671347686438130409774741771022426508339 158180026176176529968981760773333390662230454685392578760327057449521355920728670523629599959587…» | ||
timotimo | m: (0...*).map({ 1 / [*] 1..$^a }).produce(* + *)[100]>>.nude.say | ||
camelia | rakudo-moar f928a2: OUTPUT«No such method 'nude' for invocant of type 'Num' in block <unit> at <tmp> line 1» | ||
timotimo | m: (0...*).map({ 1 / [*] 1..$^a }).produce(* + *).first(Num, :k).say | ||
camelia | rakudo-moar f928a2: OUTPUT«21» | ||
timotimo | wow, already at the 21st entry? | ||
m: (0...*).map({ 1 / [*] 1..$^a }).produce(* + *)[20].nude.say | 05:12 | ||
camelia | rakudo-moar f928a2: OUTPUT«(6613313319248080001 2432902008176640000)» | ||
05:12
Cabanossi joined
|
|||
skrshn | :-) | 05:13 | |
dalek | c: 156555f | gfldex++ | doc/Type/Rat.pod6: link to FatRat |
05:14 | |
synopsebot6 | Link: doc.perl6.org/type/Rat | ||
gfldex | m: (0...*).map({ 1.FatRat / [*] 1..$^a }).produce(* + *)[100]>>.nude.say | ||
camelia | rakudo-moar f928a2: OUTPUT«((4299778907798767752801199122242037634663518280784714275131782813346597523870956720660008227544949996496057758175050906671347686438130409774741771022426508339 158180026176176529968981760773333390662230454685392578760327057449521355920728670523629599959587…» | ||
skrshn | wow!! | 05:18 | |
It is super fast too | 05:20 | ||
timotimo | perl6 is super slow, though | ||
well, not always. sometimes it can be very fast | 05:21 | ||
skrshn | I am scratching the surface one-and-off and am loving it. speed not been an issue for me. maybe for some real problems | ||
side question: is there a vim mode for the REPL ? | 05:22 | ||
timotimo | depends entirely on what Linenoise and Radline provide | ||
Readline* | |||
05:23
Woodi left
05:24
Woodi joined
|
|||
skrshn | My environment is (set -o vi) in zsh | 05:24 | |
timotimo | tbh i have no clue how to configure readline or linenoise | ||
skrshn | But I don't have vim mode in the REPL | ||
timotimo | but you can use rlwrap | ||
gfldex | the REPL comes with it's own problems. You may be better of with teaching vim to run a script with the press of a button. | ||
timotimo | aye, the REPL can cause some really mysterious failures and misbehaviours | 05:25 | |
gfldex | nmap <F1> :w<CR>:!perl6 -I ./lib %<CR> | ||
imap <F1> <esc>:w<CR>:!perl6 -I ./lib %<CR> | |||
skrshn | good suggestion. tx | ||
timotimo | yeah, you never use the F1 key anyway! | ||
geekosaur | readline reads a config file (there's a default and apps can override it) and you can specify vi default in there | 05:26 | |
gfldex | nmap <F5> :!git commit %<CR> | 05:28 | |
nmap <F6> :!git push<CR> | |||
nmap <F7> :!git diff %<CR> | |||
PR welcome btw :) | |||
05:35
breinbaas joined
05:38
raiph left,
raiph joined
05:39
ZzZombo joined,
ZzZombo left,
ZzZombo joined
05:40
BenGoldberg left
|
|||
ZzZombo | So how can I check if a Perl 5 object has a method? | 05:43 | |
05:43
cdg joined,
cdg left
|
|||
gfldex | m: class A {}; class B {}; multi sub infix:<.>(A:D, B:D){ say 'calling B on A' }; A.new.B.new | 05:46 | |
camelia | rakudo-moar f928a2: OUTPUT«No such method 'B' for invocant of type 'A' in block <unit> at <tmp> line 1» | ||
gfldex | m: class A {}; class B {}; multi sub infix:<♥>(A:D, B:D){ say 'calling B on A' }; A.new♥B.new | 05:47 | |
camelia | rakudo-moar f928a2: OUTPUT«calling B on A» | ||
ZzZombo | Perl 5 | 05:48 | |
<ZzZombo_> Inline::Perl5 returns wrongly false for ^can calls on P5 objects. | |||
gfldex | i got that part, still down know the answer | ||
ZzZombo | ^can or can, result is the same. | ||
gfldex | you may want to file a bug report | 05:49 | |
timotimo | how would you figure it out in perl5? | ||
ZzZombo | if($obj->can("method")) | 05:50 | |
gfldex | if there is no sane way I would eval | ||
so for the time being you can EVAL | |||
ZzZombo | or if I was to call it afterwards | ||
if(my $m=$obj->can("method")){ $m($obj,@_) } | |||
Actually, I don't know how an eval would help me. I can't usefully pass the object into the EVAL string, because it will get stringified, and if I escape the sigil, it will be just an unknown identifier for P5 code. | 05:58 | ||
Won't it? | |||
06:00
cognominal left
06:10
pierre_ joined
06:12
aborazmeh left
06:24
pierre_ left
06:25
pierre_ joined
06:27
skids left
06:28
wamba joined
06:37
bjz joined,
darutoko joined
06:38
perlawhirl left
06:47
bjz left
06:49
cyphase left
06:50
RabidGravy joined
|
|||
seatek | EVAL!! | 06:51 | |
seatek twitches | |||
06:57
domidumont joined
07:01
bjz joined
07:02
cyphase joined
07:03
domidumont left,
domidumont joined
07:05
breinbaas left
07:06
labster joined
07:17
zilti joined
07:20
raiph left,
raiph joined
07:22
RabidGravy left
07:26
firstdayonthejob joined
07:27
pierre_ left
07:35
firstdayonthejob left
|
|||
gfldex | ZzZombo: if the object is stringified you need to do a dynamic lookup to turn the name back into an object. If that is possible in Perl 5 I don't know. | 07:36 | |
07:42
wamba left
|
|||
nine | ZzZombo: the Perl5Parent and Perl5Extension roles already have a proper implementation for can. Will just have to copy that to Perl5Package. Until that's done, you can always use the low level interface Inline::Perl5.default_perl5.call_method($obj, 'can'); | 07:45 | |
Actually s/Perl5Package/Perl5Object/ or just put it in both... | 07:52 | ||
ZzZombo | hm, why is Inline::Perl5.default_perl5 available from outside the class? It's declared via 'my'. | 07:58 | |
nine | There's an accessor method | 07:59 | |
ZzZombo | ah, must've missed it. | ||
nine | It's mostly there so EVAL 'foo', :lang<Perl5> and use Foo:from<Perl5> find their Inline::Perl5 object, but can be used for other purposes, too. | 08:00 | |
ZzZombo | nine, so how exactly do I use call_method? Inline::Perl5.default_perl5.call_method($obj, 'can', args)? | 08:02 | |
that is, $result=Inline::Perl5.default_perl5.call_method($obj, 'can', args) | 08:03 | ||
08:03
andrzejku joined
08:05
girafe2 left
|
|||
timotimo | now gcc is just fucking with me | 08:08 | |
gist.github.com/timo/fbd1ccb77a5b0...17b23f931d - you see how it tells me the thing that's in BODY is an MVMArrayBody, but also that i have explicitly put an & before the part where i take the object's body? | 08:09 | ||
what is gcc smoking ;_; | |||
wait ... is the address of something that's a union just not defined? or something? | |||
maybe when i lie down now i can get some sleep? bashing heads against walls tends to do that to people | 08:11 | ||
ZzZombo | yeah, don't bash people's heads, not even if not against walls. | 08:12 | |
zilti | According to the error you did not put an & before BODY? | 08:14 | |
08:16
bjz_ joined
08:18
domidumont left,
bjz left
08:19
domidumont joined
08:23
CIAvash joined
08:28
ufobat joined,
wamba joined
08:34
dakkar joined
|
|||
moritz | www.reddit.com/r/perl6/comments/5d...h=e0c612aa a reddit thread with more than 5 comments, and none is negative! | 08:38 | |
DrForr | *?* | 08:39 | |
08:40
zakharyas joined
|
|||
moritz | crazy stuff, right? | 08:48 | |
08:49
pierre_ joined
08:52
Actualeyes joined
08:53
Actualeyes left
08:54
pierre_ left
09:00
labster left
09:02
pierre__ joined
09:03
rindolf joined
|
|||
ZzZombo | is IO::Spec.catfile() similar to File::Spec->catfile()? | 09:05 | |
m: say ''.IO.WHAT | 09:07 | ||
camelia | rakudo-moar f928a2: OUTPUT«Must specify something as a path: did you mean '.' for the current directory? in block <unit> at <tmp> line 1» | ||
ZzZombo | m: say '.'.IO.WHAT | ||
camelia | rakudo-moar f928a2: OUTPUT«(Path)» | ||
ZzZombo | not IO::Path? | 09:08 | |
m: say './asd'.IO.WHAT | |||
camelia | rakudo-moar f928a2: OUTPUT«(Path)» | ||
ZzZombo | m: say './asd'.IO.abspath | 09:09 | |
camelia | rakudo-moar f928a2: OUTPUT«/home/camelia/asd» | ||
09:16
cygx joined
|
|||
cygx | o/ | 09:16 | |
DrForr | \o | ||
cygx | timotimo: & has lower precedence than ->, so you need to add parens either when you cann the macro or change BODY->in_situ to (BODY)->in_situ in its definition | 09:17 | |
*call | |||
(...and the keys aren't even close to each other...) | |||
dalek | c: fe43e2e | ZzZombo++ | doc/Type/IO/Path.pod6: Update Path.pod6 |
09:19 | |
synopsebot6 | Link: doc.perl6.org/type/IO/Path | ||
arnsholt | I'd vote for the latter solution | 09:20 | |
That's good practice when writing macros in C anyways. Always, always, always put parens around macro arguments in the expansion | |||
ZzZombo | why would I want to write 'if $file.IO ~~ :e' instead of 'if 'path/to/file'.IO.e'? | 09:23 | |
gfldex | m: say '.'.IO.^name | 09:24 | |
camelia | rakudo-moar f928a2: OUTPUT«IO::Path» | ||
gfldex | ZzZombo: .^name will give you the FQN | ||
cygx | ZzZombo: the smartmatch might not be particularly useful when using explicit ~~, but it allows you to use :e in given..when, etc | 09:30 | |
09:31
vendethiel- joined,
vendethiel left
|
|||
gfldex | m: say so '.'.IO ~~ :e|:d | 09:32 | |
camelia | rakudo-moar f928a2: OUTPUT«True» | ||
gfldex | ZzZombo: ^^^^ | ||
09:32
perlawhirl joined
|
|||
ZzZombo | IC | 09:32 | |
but again, probably in the docs, it's better to stick to the procedural, natural form, and use such intricate syntax only where it's relly needed or useful. | 09:34 | ||
m: class A { method m { .n}; method n { say 'n' } };A.new.m; | 09:36 | ||
camelia | rakudo-moar f928a2: OUTPUT«No such method 'n' for invocant of type 'Any' in method m at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
ZzZombo | m: class A { method m {n}; method n { say 'n' } };A.new.m; | 09:37 | |
camelia | rakudo-moar f928a2: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Undeclared routine: n used at line 1» | ||
ZzZombo | m: class A { method m {self.n}; method n { say 'n' } };A.new.m; | ||
camelia | rakudo-moar f928a2: OUTPUT«n» | ||
dalek | c: 671e00e | gfldex++ | doc/Type/IO/Path.pod6: improve examples |
||
synopsebot6 | Link: doc.perl6.org/type/IO/Path | ||
c: c306960 | ZzZombo++ | doc/Type/IO/Path.pod6: Improve this further ;) |
09:40 | ||
synopsebot6 | Link: doc.perl6.org/type/IO/Path | ||
09:45
jonas1 joined
09:46
ocbtec joined
09:51
CIAvash left
|
|||
gfldex | ZzZombo: i do not agree. If it points to a directory it needs to be a symlink to a dir. | 09:52 | |
I can point at you but I will never be you | |||
ZzZombo | what | 09:53 | |
do not mix the path and the physical entry on the disk up. | 09:54 | ||
the argument you give to IO related functions is path. | |||
path points to files and directories. | |||
it can't be any of them. | |||
gfldex | if that is true, why are there no hardlinks to directories (for sane OSes)? | 09:55 | |
ZzZombo | what are you talking about? I honestly have no idea. | 09:57 | |
gfldex | from the standpoint of the OS the location on disk/device-id of a dir is it's identity. From the standpoint of the user a path that does not include fancy stuff linke symlinks, reparse-points or bind mounts, provides the identity of a directory. Quite in contrast of a file that may be hardlinked. | 10:00 | |
DrForr | UNIX ln creates hardlinks by default, it's just that we're so used to typing 'ln -s' that finger memory has helped obliterate knowledge of them... | 10:01 | |
gfldex | i wrote "sane OSes" | 10:02 | |
10:03
skrshn left
|
|||
ZzZombo | Man, again, you feed the function a path, a string that points to a file/folder. Whatever that file or folder points to is entirely different story. | 10:03 | |
10:03
wamba left,
bpmedley left
10:04
bpmedley joined,
Actualeyes joined
10:07
CIAvash joined,
CIAvash left,
wamba joined
|
|||
arnsholt | Saying that the path object for a directory points to a directory rather than being a directory is needless semantic hairsplitting, IMO | 10:14 | |
Especially given the existence of symlinks | 10:15 | ||
I'm confused why the example tests agains ":e & :d", though4 | |||
Since :d implies :e anyways | |||
gfldex | arnsholt: to show that you can use ~~ with a junction of the colon pair form | 10:17 | |
10:17
xtt joined
10:18
xtreak left,
sftp joined
|
|||
arnsholt | Sure. But in that case, why not something useful like ":f & :r"? | 10:18 | |
gfldex | good point | 10:19 | |
10:21
xtreak joined
10:25
mtj_ left
10:30
Actualeyes left
|
|||
ZzZombo | m: die X::IO::DoesNotExist.new(:path("foo/bar")) | 10:32 | |
camelia | rakudo-moar f928a2: OUTPUT«Use of uninitialized value of type Any in string context.Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at <tmp> line 1Failed to find 'foo/bar' while trying to do '.' in block <unit>…» | ||
ZzZombo | m: die X::IO::DoesNotExist.new(:path("foo/bar"),:trying('')) | ||
camelia | rakudo-moar f928a2: OUTPUT«Failed to find 'foo/bar' while trying to do '.' in block <unit> at <tmp> line 1» | ||
ZzZombo | m: die X::IO::DoesNotExist.new(:path("foo/bar"),:trying('trying')) | ||
camelia | rakudo-moar f928a2: OUTPUT«Failed to find 'foo/bar' while trying to do '.trying' in block <unit> at <tmp> line 1» | ||
ZzZombo | eh | 10:33 | |
I don't need that 'trying' thing. | |||
10:34
bjz_ left
10:35
pierre__ left
10:36
bjz joined
|
|||
gfldex | ZzZombo: you could subclass X::IO::DoesNotExist | 10:38 | |
ZzZombo | nah, I'm not that badly against it. | ||
too much effort for that. | 10:39 | ||
10:40
ugjka joined
10:44
pierre__ joined
10:53
ufobat left
11:09
cygx left,
pierre__ left
11:18
pierre_ joined
11:19
mtj_ joined
11:20
pierre_ left,
pierre_ joined,
pierre_ left
11:27
breinbaas joined
11:47
rurban joined
11:52
vendethiel joined
11:53
kurahaupo joined
11:54
vendethiel- left,
kurahaupo_ joined
11:55
xtreak left
11:56
xtreak joined,
xtreak left
11:57
kurahaupo left,
kurahaupo_ is now known as kurahaupo
|
|||
ZzZombo | m: class A { method m {$.n}; method n { say 'n' } };A.new.m; | 11:58 | |
camelia | rakudo-moar f928a2: OUTPUT«n» | ||
11:58
notostraca joined
12:00
TEttinger left
12:01
xinming left
12:04
rindolf left
12:07
notostraca is now known as TEttinger
12:11
rindolf joined
12:12
TEttinger left
12:14
rurban left,
rurban joined,
cognominal joined
12:18
rurban left
12:21
kurahaupo left,
kurahaupo joined
12:22
kurahaupo left
12:23
kurahaupo joined
12:25
ugjka left,
rindolf left
12:32
darutoko left
12:33
rindolf joined
12:38
ugjka joined
12:52
xtt left
12:53
user9 left
13:03
user9 joined
13:07
xinming joined
13:12
xinming left
13:13
xinming joined
13:31
bjz left
13:37
brrt joined
13:55
wamba left
13:57
wamba joined
14:08
AlexDaniel joined
14:14
andrzejku left,
rurban joined
14:15
khw joined,
Matthew[m] left
14:16
tadzik left,
Matias[m] left,
dp[m] left,
M-Illandan left,
ilmari[m] left
14:19
rurban left
|
|||
ZzZombo | so it says I shouldn't use warn() directly, but rather use note(), do I read it correctly? | 14:24 | |
timotimo | warn goes through the exception mechanism | 14:30 | |
so you can "quietly" it if you want | |||
ZzZombo | m: class A { has $.field='value'; multi method field ($value where defined){ $!value=$value;return self } };say A.new.field('nyan').field; | 14:31 | |
camelia | rakudo-moar 6e7782: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unsupported use of bare "defined"; in Perl 6 please use .defined if you meant $_, or use an explicit invocant or argument, or use &defined to refer to the function as a nounat <tmp>:1------> 3multi me…» | ||
ZzZombo | m: class A { has $.field='value'; multi method field ($value where .defined){ $!value=$value;return self } };say A.new.field('nyan').field; | ||
camelia | rakudo-moar 6e7782: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Attribute $!value not declared in class Aat <tmp>:1------> 3defined){ $!value=$value;return self } }7⏏5;say A.new.field('nyan').field; expecting any of: horizontal whitespace …» | ||
ZzZombo | m: class A { has $.field='value'; multi method field ($value where .defined){ $!field=$value;return self } };say A.new.field('nyan').field; | ||
camelia | rakudo-moar 6e7782: OUTPUT«Cannot resolve caller field(A.new(field => "nyan"): ); none of these signatures match: (A $: $value where { ... }, *%_) in block <unit> at <tmp> line 1» | ||
ZzZombo | m: class A { has $.field='value'; multi method field ($value){ $!field=$value;return self } };say A.new.field('nyan').field; | 14:32 | |
camelia | rakudo-moar 6e7782: OUTPUT«Cannot resolve caller field(A: ); none of these signatures match: (A $: $value, *%_) in block <unit> at <tmp> line 1» | ||
jnthn | You'd need to write a multi to get it also | 14:33 | |
multi method field() { $!field } | 14:34 | ||
Or so | |||
ZzZombo | m: class A { has $.field='value'; multi method field (Str:D $value){ $!field=$value;return self } };say A.HOW.methods; | ||
camelia | rakudo-moar 6e7782: OUTPUT«Too few positionals passed; expected 2 arguments but got 1 in any methods at gen/moar/m-Metamodel.nqp line 494 in block <unit> at <tmp> line 1» | ||
ZzZombo | m: class A { has $.field='value'; multi method field (Str:D $value){ $!field=$value;return self } };say A.HOW.methods(1); | 14:35 | |
camelia | rakudo-moar 6e7782: OUTPUT«(field)» | ||
ZzZombo | m: class A { has $.field='value'; multi method field (Str:D $value){ $!field=$value;return self } };say A.HOW.methods(111); | ||
camelia | rakudo-moar 6e7782: OUTPUT«(field)» | ||
ZzZombo | hm | 14:36 | |
jnthn | Better written A.^methods | ||
(which does A.HOW.methods(A)) | |||
ZzZombo | m: class A { has $.field='value'; multi method field (Str:D $value){ $!field=$value;return self } };say A.^methods; | 14:37 | |
camelia | rakudo-moar 6e7782: OUTPUT«(field)» | ||
14:37
ilmari[m] joined
|
|||
ZzZombo | why is there only one method? Does my declaration make the implicit one go away? | 14:37 | |
jnthn | Yes | ||
ZzZombo | wel | 14:38 | |
l | |||
jnthn | An accessor is only installed for you if there's no method of that name already | ||
ZzZombo | I hoped for them to coexist | ||
there is no reason for manually writing those trivial getters for all of them. | |||
14:39
tadzik joined,
Matthew[m] joined,
M-Illandan joined
|
|||
jnthn | There's no reason for writing trivial setters either, just stick "is rw" on things. | 14:39 | |
14:39
Matias[m] joined,
dp[m] joined
|
|||
ZzZombo | but 1) I don't like a.x=y; 2) I need some logic attached to changing values. | 14:40 | |
14:40
lucasb_ joined
|
|||
jnthn | Well, on 1) can't do much for you; if you're going to fight the language you're going to write more code. Same in any language. | 14:40 | |
ZzZombo | I'm not fighting at all. | 14:41 | |
jnthn | On 2 - what logic do you need? If it's validation, just stick there where on the attribute. | ||
ZzZombo | If assigments could do that, I would stick to them pretty much. | ||
lucasb_ | m: say <a b c>[0..*] | 14:42 | |
camelia | rakudo-moar 6e7782: OUTPUT«(a b c)» | ||
lucasb_ | m: say <a b c>[0..*+1] | ||
camelia | rakudo-moar 6e7782: OUTPUT«(a b c Nil Nil)» | ||
ZzZombo | what logic? When filename changes, load that file. | ||
lucasb_ | in a range subscript end, it seems like Whatever means both numbers | 14:43 | |
for a list of 3 values, * means both 2 and 3 ??? :) | |||
m: say <a b c>[0..*-1] | |||
camelia | rakudo-moar 6e7782: OUTPUT«(a b c)» | ||
lucasb_ | m: say <a b c>[0..*-2] | ||
camelia | rakudo-moar 6e7782: OUTPUT«(a b)» | ||
lucasb_ | ^^^ noticed that 0..* and 0..*-1 return the same thing? | 14:44 | |
awwaiid | ZzZombo: filename changes meaning a field for the filename is modified? If that's the case, a more explicit ".load_file($filename)" method might be more usable ath the invocation point | ||
lucasb_ | can someone clarify this to me? | ||
masak | lucasb_: do you agree that '*' is the big exception here? | ||
jnthn | ZzZombo: I'd probably consider writing a method with a meaningful name for what's going on and having the filename attribute as an internal detail. | ||
timotimo | the thing is that 0..* is the same as 0..Inf | ||
whereas when you have 0..*+1 you end up building a WhateverCode that takes the argument passed to it from postcircumfix:<[ ]> | 14:45 | ||
awwaiid | m: say<a b c>[0..(*)] | ||
camelia | rakudo-moar 6e7782: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Use of non-subscript brackets after "say" where postfix is expected; please use whitespace before any argumentsat <tmp>:1------> 3say7⏏5<a b c>[0..(*)] expecting any of: argument …» | ||
awwaiid | m: say<a b c>[0..*+0] | ||
camelia | rakudo-moar 6e7782: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Use of non-subscript brackets after "say" where postfix is expected; please use whitespace before any argumentsat <tmp>:1------> 3say7⏏5<a b c>[0..*+0] expecting any of: argument …» | ||
timotimo | so in one case it finds the end of the list and says "we're done here" (infinite list), in the other you're requesting an actual range | ||
awwaiid | m: say <a b c>[0..*+0] | ||
camelia | rakudo-moar 6e7782: OUTPUT«(a b c Nil)» | ||
timotimo | awwaiid: you need to put ( after say | ||
or a space | |||
yeah | |||
awwaiid | m: say <a b c>[0..(*)] | ||
camelia | rakudo-moar 6e7782: OUTPUT«(a b c)» | ||
awwaiid | yeah, wasn't reading the error | ||
ZzZombo | when I was working with XML, I'd created objects corresponding to the structure of the file elements. When you change a field of such object, it modifies corresponding element in the DOM. | 14:46 | |
awwaiid | m: say <a b c>[0..(*+0)] | ||
camelia | rakudo-moar 6e7782: OUTPUT«(a b c Nil)» | ||
lucasb_ | oh! I didn't pay attention to this detail :) | ||
yes, the 0..(*+0) clarified it perfectly | |||
thanks masak, timotimo, awwaiid | |||
14:48
kyclark_ joined
|
|||
awwaiid | m: &infix:<..>.candidates>>.say # I am dissapointed that this doesn't have an explicit ..Whatever invocation | 14:50 | |
camelia | rakudo-moar 6e7782: OUTPUT«sub infix:<..> ($min, $max) { #`(Sub+{<anon|47920480>}+{Precedence}|57979744) ... }» | ||
ZzZombo | Well, it's a shame the OOP-side of P6 isn't as mature as, say, in Delphi; it puzzles me why it didn't look natural to attach proper accessors to properties to the designers of P6. I expected something like that. | 14:51 | |
timotimo | um, huh? | ||
how do you mean that? | 14:52 | ||
14:52
AlexDaniel left
|
|||
ZzZombo | how I mean? | 14:53 | |
14:53
AlexDaniel joined
|
|||
ZzZombo | excuse me? | 14:53 | |
lucasb_ | how come? | ||
timotimo | why do you think our accessors aren't "proper"? | ||
awwaiid | they might be deeper than you think | 14:54 | |
AlexDaniel listens carefully | |||
ZzZombo | because I don't see how such an easy task (reload a file on changing filename) makes you to write your setter and also getter that in another situation would be provided by the compiler itself. It's natural to attach such logic to the write accessor in Delphi, w/o some dedicated 'load_file' method. | 14:56 | |
14:56
kaare_ left
|
|||
moritz | then make changing the file name a method, instead of an RW accessor | 14:56 | |
timotimo | yeah, just change the filename using private access and make it readonly otherwise | 14:57 | |
moritz | a r/w accessor provides an illusion of transparency that additional logic on writes violates | ||
which is why the language doesn't optimize for that case | |||
use the language's strengths, not its weaknesses | 14:58 | ||
this will make both you and camelia happier | |||
ZzZombo | <timotimo> yeah, just change the filename using private access and make it readonly otherwise | 14:59 | |
I don't understand, even tho sounds like a solution, can you explain? If I change it to private, I still won't get an implicit getter, so I will still have to write one myself, won't I? | |||
timotimo | you don't have to change it to private | 15:00 | |
every public attribute has its $!foobar to go along with its $.foobar | |||
moritz | ZzZombo: have a method change-filename($new-name) { logic here; $!filename = $new-name } | 15:01 | |
awwaiid | How can I get the candidates for a method? I want something like &Range::new.candidates (since looking at the &infix:<..> it redispatches to .new) | 15:03 | |
viki | ZzZombo: just use a Proxy and stick your logic into STORE | ||
awwaiid | ZzZombo: can you show the Delphi equivalent? I'm interested to see what that looks like | 15:05 | |
ZzZombo | yes, give me a minute | ||
viki | "Cannot use := to initialize an attribute" well.. fme | ||
awwaiid | coo | ||
timotimo | yeah, you have to return the proxy from an accessor method | 15:06 | |
15:06
rindolf left
|
|||
viki | timotimo: so there's no way to have a proxy attribute withotu writing accessor manually?> | 15:06 | |
moritz | m: say Range.^find_method('new').^candidates.perl | ||
camelia | rakudo-moar 1b840f: OUTPUT«No such method 'candidates' for invocant of type 'Perl6::Metamodel::ClassHOW' in block <unit> at <tmp> line 1» | ||
viki | I wonder if a trait can do it... | ||
m: say Range.^find_method('new').candidates.perl | |||
moritz | m: say Range.^find_method('new').candidates.perl | ||
camelia | rakudo-moar 1b840f: OUTPUT«(method new (Mu $: *%) { #`(Method|64277432) ... }, method new (Mu $: $, *@, *%_) { #`(Method|64277584) ... }, method new (Range $: Range $min, \max, :$excludes-min, :$excludes-max, *%_) { #`(Method|74604384) ... }, method new (Range $: \min, Range $max, :…» | 15:07 | |
rakudo-moar 1b840f: OUTPUT«(method new (Mu $: *%) { #`(Method|37645192) ... }, method new (Mu $: $, *@, *%_) { #`(Method|37645344) ... }, method new (Range $: Range $min, \max, :$excludes-min, :$excludes-max, *%_) { #`(Method|47972128) ... }, method new (Range $: \min, Range $max, :…» | |||
timotimo | a trait will surely be able to do it | ||
moritz | awwaiid: ^^ | ||
timotimo | if not, there's always slangs | ||
lucasb_ | did anyone took a look at RT #130160 ? | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130160 | ||
lucasb_ | I was trying to golf it | ||
viki | ZzZombo: right, so figure out how to stick a Proxy into an attribute without a lot of manual work and voila \o/ | ||
awwaiid | moritz: thanks! | 15:08 | |
lucasb_ | m: sub f(@a) { say @a; f(@a[1..*, ()].flat) if @a }; f(<a b c d>) | 15:09 | |
camelia | rakudo-moar 1b840f: OUTPUT«(a b c d)(b c d)(c d)(d)()» | ||
lucasb_ | m: sub f(@a) { @a.Bool; @a.elems; say @a; f(@a[1..*, ()].flat) if @a }; f(<a b c d>) | ||
camelia | rakudo-moar 1b840f: OUTPUT«(a b c d)(b)()» | ||
lucasb_ | ^^ that's what I have arrived at | ||
ZzZombo | awwaiid, gist.github.com/ZzZombo/263b43ac18...1295ce232. | 15:10 | |
viki | m: my $filename := { my $s; Proxy.new(FETCH => method {$s}, STORE => method ($v) { say "loading stuff from file $v"; $s = $v })}(); $filename = 42; say $filename | 15:11 | |
camelia | rakudo-moar 1b840f: OUTPUT«loading stuff from file 4242» | ||
AlexDaniel | well, uh… Proxy… that's probably not the answer he is looking for | ||
viki | AlexDaniel: why not? | 15:12 | |
AlexDaniel | /o\ | ||
viki | Since the winge is that they don't wanna write the basic setter multi | ||
AlexDaniel | ok, well… maybe you are right | ||
awwaiid | ZzZombo: ah cool. so the "write SetFilename" says when you write to the attribute you invoke the method | 15:13 | |
ZzZombo | yes | ||
AlexDaniel | but I can't imagine anyone using Proxy for real in this case | ||
that would be just too complicated for such a simple thing | |||
viki | AlexDaniel: you wouldn't be using it directly. You'd have a trait taking a piece of code that does the setter stuff | ||
awwaiid | I feel like Moose does this | ||
ZzZombo | so later ffile.Filename:='my.stuff' will run ffile.SetFilename('my.stuff') | ||
viki | and the trait would stuff the proxy into the attribute, and it'd be doing fancy stuff on setting and still provide the getter, just like that delphi code | 15:14 | |
15:14
seatek left
15:15
rindolf joined
|
|||
viki | Sounds like a perfect module for ZzZombo to write and release into the Ecosystem ;) | 15:15 | |
ZzZombo | I would, actually. | ||
viki | Sweet \o/ | ||
ZzZombo | But I'm still learning | ||
don't expect much, eh | 15:16 | ||
AlexDaniel | m: class MyFile { has Str $.filename; method set-filename($f) { #`{ do something here; } $!filename = $f } }; my $x = MyFile.new; $x.set-filename(‘hello’); say $x.filename | ||
camelia | rakudo-moar 1b840f: OUTPUT«hello» | ||
AlexDaniel | so again, what's wrong with this? | ||
viki | ZzZombo: you can probably steal a lot of code from these two modules: modules.perl6.org/#q=Attr+Lazy | ||
awwaiid | yeah, I think as timotimo said, a new trait (which doesn't have to be in the core) should be able to do this. I think it would look like class Foo { has $.filename :writer<set-file>; method set-file($filename) { ... } } | ||
or something like that | |||
viki | That's not what I was thinking at all... | 15:17 | |
Or maybe it is | |||
ZzZombo | I don't like decoupling between the property and the accessors in the code. | ||
timotimo | well, that syntax isn't going to work :) | ||
awwaiid | I just don't know the syntax quite right | ||
but throw an 'is' or something in there... | |||
ZzZombo | anyway, I'm gonna sleep, so cya all. | 15:18 | |
viki | bye | ||
timotimo | seeya! | ||
awwaiid | what would the syntax be for a parameterized trait? | 15:19 | |
viki | is blahblah(param) | ||
m: my $x is default(42); say $x | 15:20 | ||
camelia | rakudo-moar 1b840f: OUTPUT«42» | ||
viki | m: my $x is default{42;}; say $x() | ||
camelia | rakudo-moar 1b840f: OUTPUT«42» | ||
awwaiid | so maybe class Foo { has $.filename is writer<set-file>; method set-file($filename) { ... } } | ||
viki | I was thinking of just direct code block... has $.filename is writer{ load $filename } or whatever | 15:21 | |
awwaiid | naw, that'll get out of hand | 15:22 | |
oh, just to invoke the method | |||
should be able to do both :) | |||
timotimo | if you have a code block, you probably use "will" instead of "is" | ||
AlexDaniel | this is kinda relevant: stackoverflow.com/a/31684147/2698019 | 15:23 | |
(using Proxy just like Zoffix suggested) | |||
15:27
canopus left
15:32
canopus joined
|
|||
lucasb_ | m: -> @a { say @a }.( <a b c>[0..2, ()].flat ) | 15:33 | |
camelia | rakudo-moar 1b840f: OUTPUT«(a b c)» | ||
lucasb_ | m: -> @a { @a.Bool; @a.elems; say @a }.( <a b c>[0..2, ()].flat ) | 15:34 | |
camelia | rakudo-moar 1b840f: OUTPUT«(a)» | ||
lucasb_ | ^^ a cleaner golf | ||
so, just calling @a.Bool; @a.elems before printing @a changes the result | |||
MasterDuke | lucasb_: does it need @a.Bool and @a.elems? | 15:35 | |
lucasb_ | MasterDuke: I only arrived at this result using both .Bool and .elems in that order | 15:36 | |
but it can be changed to other equivalents like 'if @a {...}' or @a.Num | |||
m: -> @a { @a.Bool; @a.elems; say @a }.( <a b c>[1..2, 1..2].flat ) | 15:37 | ||
camelia | rakudo-moar 1b840f: OUTPUT«(b b c)» | ||
lucasb_ | m: -> @a { my @b = @a; @a.Bool; @a.elems; say @a }.( <a b c>[1..2, 1..2].flat ) | ||
camelia | rakudo-moar 1b840f: OUTPUT«(b c b c)» | ||
15:40
wamba left
15:47
wamba joined
15:59
FROGGS joined,
xinming left
|
|||
FROGGS | o/ | 16:00 | |
viki | \o\ | ||
DrForr | o/ \o/ /X\ _X_ Heeey Macarena | 16:01 | |
16:01
girafe joined
|
|||
viki | Hm... this buggy keyboard driver is a fairy solid evidence of when I' | 16:02 | |
m using work computer to slack off... | |||
DrForr: what's this macarena stuff? | |||
timotimo | it's a dance that goes with a song | ||
viki | A dance to apease Macaroni God? >:) | ||
DrForr | Sigh, one moment. | 16:03 | |
youtu.be/x87B1pjR3H0?t=19 | 16:04 | ||
viki | Oh god... I'm bleeding from my ear canals... | 16:05 | |
DrForr | Eventually I'll figure out how to do it in all precomposed glyphs. | ||
Oh, my musical tastes are *much* more depraved, I can assure you. | |||
viki cues www.youtube.com/watch?v=-9Ls1jWX-TM as a cure | |||
DrForr | It's also at least a whole step up from where I remember it. (Doing ear training at home in spare time...) | 16:07 | |
MasterDuke | viki: changing topics completely, weren't you musing about !== a little while ago? you were expecting it to be auto-generated from '!' and '=='? i thought that was interesting, because i would assume it's !(a === b), same at != is !(a == b) | 16:08 | |
timotimo | viki: huh, that's not The Cure! | ||
DrForr locks the taskbar. | |||
16:10
lucasb_ left
|
|||
viki | ;lkuibn' vWER KU BVRYTESA.Lv. buSAK,RTDEAVS D,.FBTHJMV BLS.ADUT,EN'; BSDRTF/I.LN ASRDF./IKL | 16:11 | |
That's me headdesking due to users... | |||
TWO people tell me description is missing from product on the website and they think that 'causes the problem of viewing the product via a thingie we have. I reply no, that won't fix it and the problem is with the thingie, BUT I added description anyway and here's the LINK TO THE PRODUCT.... Both of them tell me it isn't showing up, and I tell them to clear cache, they say it's still not there, so I tell them | 16:13 | ||
send me screenshots, and turns out... **drum roll** they were using that thingie to access the website instead of my link, because they thought adding the description fixed the thingie even though I told them it won't | 16:14 | ||
16:14
zacts left
|
|||
viki | *rage* | 16:14 | |
DrForr | www.youtube.com/watch?v=3avaYymFHrE | ||
16:15
rurban joined
|
|||
timotimo | DrForr: you think that's depraved? :) | 16:15 | |
16:15
zacts joined
|
|||
timotimo is not sure what to pull out of his arsenal to counter | 16:16 | ||
viki | MasterDuke: oh, I kinda didn't thik we had != for some reason. | ||
s: &infix:<!=> | |||
SourceBaby | viki, Sauce is at github.com/rakudo/rakudo/blob/1b84...ic.pm#L270 | ||
viki | s: &infix:<!==> | ||
SourceBaby | viki, Sauce is at github.com/rakudo/rakudo/blob/1b84...ops.pm#L13 | ||
DrForr | Oh, no, I start at www.youtube.com/watch?v=c4TZfEOWwW4 and go into weird areas from there. | ||
viki | s: &infix:<!===> | ||
SourceBaby | viki, Sauce is at github.com/rakudo/rakudo/blob/1b84...ops.pm#L13 | ||
viki | nqp: nqp::say(2 != 2) | 16:17 | |
camelia | nqp-moarvm: OUTPUT«0» | ||
viki | nqp: nqp::say(2 !== 2) | ||
camelia | nqp-moarvm: OUTPUT«Missing required term after infix at line 2, near " 2)" at gen/moar/stage2/NQPHLL.nqp:625 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:panic) from gen/moar/stage2/NQPHLL.nqp:791 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:EXP…» | ||
viki shrugs | |||
MasterDuke: well, the !== is == with ! as a metaop, while != is a proper op. | |||
s: &infix:<!!==> | |||
SourceBaby | viki, Something's wrong: ERR: ===SORRY!=== Error while compiling -eUndeclared routine: infix:<!!==> used at line 6. Did you mean 'infix:<∖>', 'infix:<lt>', 'infix:<eq>', 'infix:<o>', 'infix:<~|>'? | ||
timotimo | i must admit that video is well made | 16:18 | |
viki | But that said... if SourceBaby can recognize it, wtf cmp-ok can't :/ | ||
m: say &CALLERS::("infix:<!==>") | 16:19 | ||
camelia | rakudo-moar 1b840f: OUTPUT«No such symbol '&infix:<!==>' in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
viki | m: say &CALLERS::("infix:<Z>") | ||
camelia | rakudo-moar 1b840f: OUTPUT«sub infix:<Z> (| is raw) { #`(Sub+{<anon|44843824>}+{Precedence}|57430480) ... }» | ||
viki | m: say &CALLERS::("infix:<ZZZ>") | ||
camelia | rakudo-moar 1b840f: OUTPUT«No such symbol '&infix:<ZZZ>' in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
viki | Oh, OK, it doesn't generate it *there* | ||
s: &infix:<ZZZ> | 16:20 | ||
SourceBaby | viki, Sauce is at github.com/rakudo/rakudo/blob/1b84...ops.pm#L78 | ||
16:20
rurban left
16:21
ufobat joined
|
|||
timotimo | DrForr: the "lock the taskbar" song is growing on me slowly | 16:25 | |
DrForr: www.youtube.com/watch?v=MxA0QVGVEJw - have you come across the axolotl song yet? :) | 16:26 | ||
DrForr | yes. | ||
I blame QI :) | |||
[Coke] waves from the highway, wishing everyone a happy US thanksgiving. | |||
timotimo | oh, was it featured on television? | 16:27 | |
[Coke] | ... and in return, just hit dead stop traffic. *angry hand wave* | ||
timotimo | don't irc and drive :) | 16:28 | |
DrForr | If he's in LA it's a moot point. | ||
16:28
wamba left
|
|||
moritz | you can totally do that from the co-driver's seat :-) | 16:29 | |
timotimo | right | ||
moritz | at least outside the US, we sometimes have more than one person in a car, strange as it sounds :D | ||
viki | But then... you aren't *driving* | 16:30 | |
moritz | viki: [Coke] didn't say he was | ||
PerlJam hopes Coke didn't *actually* hit traffic | 16:31 | ||
Happy Turkey Day everybody! | 16:32 | ||
viki | But it already happened, in October! | ||
PerlJam | m: my @n = ^10; @n <<*=>> 2; dd @n; | 16:33 | |
camelia | rakudo-moar 1b840f: OUTPUT«Array @n = [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]» | ||
PerlJam | m: my @n = ^10; @n <<=>> 5; dd @n; | ||
camelia | rakudo-moar 1b840f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Missing << or >>at <tmp>:1------> 3my @n = ^10; @n <<=>7⏏5> 5; dd @n; expecting any of: infix infix stopper» | ||
PerlJam | It's weird that the first one works but the other does not | ||
moritz | ah | 16:34 | |
it tries to aprse it as << => >> | |||
viki | m: my @n = ^10; @n <<[=]>> 5; dd @n; | ||
camelia | rakudo-moar 1b840f: OUTPUT«Array @n = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]» | ||
moritz | parse | ||
because => is a longer token than = | 16:35 | ||
viki | m: my @n = ^10; @n «=» 5; dd @n; | ||
camelia | rakudo-moar 1b840f: OUTPUT«Array @n = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5]» | ||
16:36
rurban joined
|
|||
PerlJam | and that's why I've taken to using « and » as often as I can. | 16:38 | |
16:38
kyclark_ left
|
|||
PerlJam | (though I only noticed the <<=>> weirdness because I'm on a keyboard where I don't readily know how to generate « and » except in vi and I wasn't in vi when I was typing stuff) | 16:38 | |
16:43
rurban left,
captain-adequate joined
|
|||
japhb scans the backlog idly, sees people trying to compete over most depraved youtube video, and decides to just back away slowly | 16:44 | ||
viki | Mine wasn't depraved. | 16:45 | |
16:51
cognominal left,
cognominal joined
16:52
BenGoldberg joined
17:02
kaare_ joined
17:09
captain-adequate left
17:12
domidumont left
17:13
b2gills left,
b2gills joined
17:16
kyclark_ joined
17:22
wamba joined
17:26
wisti joined
17:33
perlawhirl left
17:34
vendethiel left
17:35
vendethiel joined,
perlawhirl joined
17:36
perlawhirl left
17:37
eisen74 joined,
dakkar left
17:40
perlawhirl joined
17:45
skids joined,
cdg joined
17:46
BenGoldberg left
17:47
kyclark_ left
17:49
cdg left
|
|||
viki is starting to see the light at the end of the tunnel of RT#130160 | 17:51 | ||
Ah, yes... | 17:53 | ||
*snif* *snif* | |||
That distinct scent of a bug... Yummy | 17:54 | ||
AlexDaniel | SourceBaby: source | 17:57 | |
SourceBaby | AlexDaniel, See: github.com/zoffixznet/perl6-sourceable | ||
18:01
wamba left
|
|||
viki | w00t, totaly found it \o/ | 18:05 | |
18:07
domidumont joined
18:11
lucasb_ joined
|
|||
viki | lucasb_: I found the cause of the bug you were wondering about today, the flat one | 18:16 | |
lucasb_ | viki: are fixing it already? :) | 18:17 | |
*are you | |||
18:17
Tonik joined
|
|||
viki | lucasb_: yeah, I already got Fix#1, which deletes 18 lines and adds zero :) | 18:17 | |
I wanna see the performance hit of that and if it's bad, then I got Fix#2 | |||
timotimo | so we had a performance optimization that was doing things wrong? | 18:18 | |
lucasb_ | viki: delete everything :) Perfection is achieved when there is nothing left to take away | ||
18:20
nnunley left
|
|||
viki | timotimo: I looked at git blame briefly and it doesn't look like this was added for performance reasons, I think it may be a leftover from before we made the default impl. in a role | 18:20 | |
it really just saves a single method call | |||
heh. BEFORE: 32.4776000, AFTER: 32.4663461 | 18:21 | ||
viki does a couple more runs | |||
timotimo | wow that's bad | 18:23 | |
viki | What do you mean bad? It got faster! | ||
timotimo | oh, you are right | 18:24 | |
i got it in reverse | |||
viki | m: say "{3.1404537725 / 3.140447684}x faster" | 18:25 | |
camelia | rakudo-moar 1b840f: OUTPUT«1.0000019387x faster» | ||
timotimo | fantastic | 18:26 | |
viki | no diff basically | ||
umm | |||
MasterDuke: "Makefile:101: recipe for target 'spectest_update' failed" | |||
DrForr | And it's still almost pi seconds. | ||
viki | and Makefile:523: recipe for target 'm-stresstest5' failed | 18:27 | |
18:27
domidumont left
|
|||
viki tries blowing everything up and cloning from scratch | 18:28 | ||
heh, rm -fr rakudo took like 12 seconds to run... All those precomp files :) | 18:29 | ||
bah | |||
That had my unpushed test for one of Zeframs tickets! | 18:30 | ||
timotimo | ah! | ||
oh :( | |||
they are lost now? | |||
viki | Yup :) | 18:31 | |
18:33
nnunley joined
18:34
labster joined
|
|||
viki | MasterDuke: nevermind, nuking and recloning the repo fixed that issue | 18:34 | |
AlexDaniel | m: sleep 9999999999999999999; say ‘awww, that was some good sleep!’ | 18:40 | |
camelia | rakudo-moar 1b840f: OUTPUT«awww, that was some good sleep!» | ||
AlexDaniel | commit: all sleep 9999999999999999999; say ‘awww, that was some good sleep!’ | ||
viki | heh | ||
:| | |||
committable6 | AlexDaniel, gist.github.com/c3683e0a915db9918d...26277528c8 | ||
AlexDaniel | I keep forgetting that old versions did not support ‘’ | 18:41 | |
viki | Oh, for a second I thought using an `all` junction made it work all of sudden :D | ||
AlexDaniel | :) | ||
anyway, I'll submit a bug report, I guess | |||
though people are probably still annoyed by my 9999 bug reports | |||
viki | yeah | ||
AlexDaniel | yeah? yeah… | 18:42 | |
viki | I dunno, I recall when I was annoyed with Zefram's bug reports of these weird edge cases, but now I'm actually looking forward to them :) | ||
AlexDaniel | :) | ||
viki | yeah as in "yeah, submit it" :) | ||
18:42
hankache joined
|
|||
AlexDaniel | STILL NO CREATE NEW TICKET BUTTON!!! AAAAAAAAAAAA | 18:43 | |
aww, too bad there was a ticket between #130168 #130170 :) | 18:47 | ||
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130168 | ||
Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130170 | |||
18:53
jdukart joined,
jdukart left
|
|||
AlexDaniel | m: say now + Inf | 18:56 | |
camelia | rakudo-moar 1b840f: OUTPUT«Type check failed in binding to nu; expected Int but got Num (Inf) in block <unit> at <tmp> line 1» | ||
AlexDaniel | yea, nu | ||
viki | I think there's a ticket for that already | 18:58 | |
Or at least for the cause of that error | |||
18:58
wamba joined
|
|||
viki | Something about Inf being a Rational but not fitting into Rat? or Num? something or other, so it slips past type restriction but can't be used as that type | 18:59 | |
AlexDaniel | hmmm? | 19:00 | |
viki | Well, don't see that ticket now, but I know I was the creator and lizmat commented on it that the offending behaviour was added on purpose to make Inf.Num.Something roundtrip | 19:02 | |
geekosaur | I suspect it fits into a Rat (1/0) and something assumes that anything that can be a Rat can be converted to an Int, but you can't represent infinity as an Int | 19:03 | |
viki | m: my Rat $ = Inf.Rat | ||
camelia | rakudo-moar 1b840f: OUTPUT«Type check failed in assignment; expected Rat but got Rational[Num,Int] (?) in block <unit> at <tmp> line 1» | ||
geekosaur | o.O | ||
viki | Ah, here: rt.perl.org/Ticket/Display.html?id...et-history | 19:04 | |
AlexDaniel | no such ticket with Inf in the title | ||
ah… dammit | |||
geekosaur | ok, I guess thats one way to roundtrip it. pretty unfortunate way, but then representing something as a division by 0 is also pretty unfortunate | ||
viki | 'casuse I used ∞ :D | ||
geekosaur | edge cases are so much "fun" | ||
AlexDaniel | YAY! Edge case party! | 19:05 | |
19:06
vendethiel- joined,
vendethiel left
|
|||
arnsholt | Representing infinity as x/0 would be pretty unfortunate, seeing how it's not quite correct and all | 19:07 | |
m: say Inf.Rat.nude # I wonder | 19:08 | ||
camelia | rakudo-moar 1b840f: OUTPUT«(Inf 0)» | ||
viki | m: say NaN.Rat.nude | ||
camelia | rakudo-moar 1b840f: OUTPUT«(NaN 0)» | ||
AlexDaniel | ∞/0 ? Really? :-/ | 19:09 | |
arnsholt | Yeah. That's in some way even more unfortunate | 19:10 | |
19:10
zakharyas left
|
|||
geekosaur | looks to me like it just shoves the original in the numerator (which is why it ends up being Rational[Num,Int]) and use the denominator as a flag for it | 19:10 | |
AlexDaniel | /o\ | ||
geekosaur | er, uses denom==0 | ||
AlexDaniel | cancel the party, I am out | ||
viki | m: Inf.Rat.base(10).say | ||
camelia | rakudo-moar 1b840f: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20' of type Num in block <unit> at <tmp> line 1» | ||
AlexDaniel | /o\ | ||
viki | m: Inf.Rat.perl.say | 19:11 | |
camelia | rakudo-moar 61a18c: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20' of type Num in block <unit> at <tmp> line 1» | ||
viki | (.perl uses .base) | ||
arnsholt | geekosaur: Yeah, that sounds plausible | ||
eisen74 | Is there a simple way to instatiate an array of a determined size using a declaritive statement or is a for loop? | ||
viki | eisen74: is it always gonna be that size? | 19:12 | |
eisen74 | In this case yes, size of array is known in advance. | ||
viki | eisen74: my @a[42]; if yes, my @a = 0 xx 42; if no | ||
well | |||
eisen74: then the first one will do, that's a shaped array | 19:13 | ||
m: my @a; @a[^42]; dd @a | |||
eisen74 | It's actual an array or arrays (matrix) | ||
camelia | rakudo-moar 61a18c: OUTPUT«Array @a = []» | ||
viki | m: my @a; @a[^42] = (); dd @a | ||
camelia | rakudo-moar 61a18c: OUTPUT«Array @a = [Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any]» | ||
AlexDaniel | m: my @a[25] = ($_ for ^25); say @a | ||
camelia | rakudo-moar 61a18c: OUTPUT«[0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24]» | ||
viki | And that would be the way for unshaed arrays | ||
eisen74: @a[42;72]; (first and second dimension sizes) | |||
m: my @a[3;4]; dd @a | |||
camelia | rakudo-moar 61a18c: OUTPUT«Array.new(:shape(3, 4), [Any, Any, Any, Any], [Any, Any, Any, Any], [Any, Any, Any, Any])» | ||
viki | m: my @a[3;4]; a[2;^4] = 42 xx 4; dd @a | 19:14 | |
camelia | rakudo-moar 61a18c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Undeclared routine: a used at line 1» | ||
viki | m: my @a[3;4]; @a[2;^4] = 42 xx 4; dd @a | ||
camelia | rakudo-moar 61a18c: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry.  in block <unit> at <tmp> line 1» | ||
viki | m: my @a[3;4]; @a[2;|^4] = 42 xx 4; dd @a | 19:15 | |
camelia | rakudo-moar 61a18c: OUTPUT«Cannot resolve caller AT-POS(Any: Int, Int, Int); none of these signatures match: (Any:U \SELF: int \pos, *%_) (Any:U \SELF: Int:D \pos, *%_) (Any:U $: Num:D \pos, *%_) (Any:U $: Any:D \pos, *%_) (Any:D $: int \pos, *%_) …» | ||
viki | eisen74: it's worth noting those are a fairly new feature so you may come across rough edges :} | ||
m: my @a[3;4]; @a[2;0..3] = 42 xx 4; dd @a | |||
camelia | rakudo-moar 61a18c: OUTPUT«Partially dimensioned views of arrays not yet implemented. Sorry.  in block <unit> at <tmp> line 1» | ||
eisen74 | Oh wow! That's a neat feature. | ||
19:16
andrzejku joined
|
|||
viki | Well, I don't get what it means by partially dimensioned... I guess slices aren't yet implemented on shaped arrays | 19:16 | |
m: my @a[3;4]; @a[2;0] = 42; dd @a | |||
camelia | rakudo-moar 61a18c: OUTPUT«Array.new(:shape(3, 4), [Any, Any, Any, Any], [Any, Any, Any, Any], [42, Any, Any, Any])» | ||
viki | huzzaa | ||
andrzejku | hello gentelmens | 19:17 | |
viki | Only gentelmens? :) No gals or robots? | 19:18 | |
We have a sizable population of both :) | |||
andrzejku | sure | 19:19 | |
viki | andrzejku: how's your quest on starting Perlmongers group going? | ||
AlexDaniel changes “shit error message” to “bad error message” in the title of the next bug report | |||
moritz | hello gentlebots :-) | ||
andrzejku | viki, I will meet with my friends on december | ||
viki | \o/ | ||
Awesome | 19:20 | ||
andrzejku | however I am not sure if they like perl :D | ||
AlexDaniel | make them | ||
andrzejku | but we will enjoy together | ||
=) | |||
AlexDaniel, that's not easy | |||
to be true I found Ruby as better than perl last time | 19:21 | ||
AlexDaniel | 5 or 6? | ||
viki | heh | ||
andrzejku | Perl5 | ||
Perl 6 should be a powerful future I suppose | |||
but I still need share my time with current job which I do mostly in C++ | 19:22 | ||
not easy x) | 19:24 | ||
19:25
RabidGravy joined
|
|||
eisen74 | thanks viki, camelia. | 19:26 | |
19:28
xinming joined
|
|||
eisen74 | So the multi-dimentional array initialization shorthand is not work looks like. Next best way to init one with a default value? | 19:28 | |
19:29
domidumont joined
|
|||
AlexDaniel | eisen74: what do you mean? | 19:29 | |
m: my @a[2;3] = (25,30,35), (2,3,4); say @a | |||
camelia | rakudo-moar 61a18c: OUTPUT«[[25 30 35] [2 3 4]]» | ||
AlexDaniel | m: my @a[2;3] = 1 xx 3 xx 2; say @a | 19:30 | |
camelia | rakudo-moar 61a18c: OUTPUT«[[1 1 1] [1 1 1]]» | ||
eisen74 | yes, camelia, AlexDaniel, that's what I was looking for. | ||
viki | eisen74: it works fine, it's assignment to a slice that wasn't working above. | ||
eisen74 | !!Thx | ||
ok got it. | |||
19:31
labster left,
nwc10 joined
|
|||
nwc10 | I'd just like to say | 19:31 | |
m: Inf.Rat.perl | |||
camelia | rakudo-moar 61a18c: OUTPUT«P6opaque: get_boxed_ref could not unbox for the representation '20' of type Num in block <unit> at <tmp> line 1» | ||
nwc10 | that is an awesome bug :-) | ||
viki | it's just trying to put a Num into a native int inside .base | 19:32 | |
lizmat | I'm open to suggestions to fix this mess :-) | 19:33 | |
also: please fix the fact that the min/max value of Int isn't an Int :-) | |||
viki | m: Int.max.say | ||
camelia | rakudo-moar 61a18c: OUTPUT«-Inf» | ||
lizmat | m: dd Int.Range | ||
camelia | rakudo-moar 61a18c: OUTPUT«(-Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf, -Inf... (lazy list)» | ||
viki | hah | ||
lizmat | m: say Int.Range | ||
camelia | rakudo-moar 61a18c: OUTPUT«-Inf^..^Inf» | ||
lizmat | m: say Int.Range.min.WHAT | 19:34 | |
camelia | rakudo-moar 61a18c: OUTPUT«(Num)» | ||
AlexDaniel | and also let's have Int accept infinity, hehehe… | ||
one of those great ancient ideas | |||
viki doesn't have any ideas for fixing this mess | |||
AlexDaniel | lizmat: well, the point of #130171 is to just fix the error message somehow | 19:35 | |
synopsebot6 | Link: rt.perl.org/rt3//Public/Bug/Displa...?id=130171 | ||
geekosaur can't think of any that won't make other things worse (every DWIM has a WAT and this area's chock full of both) | |||
viki | yeah | ||
nwc10 | this is also a bug? | ||
m: say Inf.Rat*0 | |||
camelia | rakudo-moar 61a18c: OUTPUT«Type check failed in binding to nu; expected Int but got Num (NaN) in block <unit> at <tmp> line 1» | ||
viki | nwc10: that's the same cause | 19:36 | |
nwc10 | OK. I'll add that to the ticket unless someone else has already | ||
19:37
Tonik left
|
|||
viki | nwc10: there're a couple of related tickets: rt.perl.org/Ticket/Display.html?id...et-history and rt.perl.org/Ticket/Display.html?id...et-history | 19:37 | |
19:38
labster joined
|
|||
viki | And this is the commit that explains what problem we solved by the current situation: github.com/rakudo/rakudo/commit/49...2017d779f3 | 19:38 | |
So any new solutions should solve that problem too. | |||
nwc10 | OK | 19:39 | |
lizmat | sometimes I wonder if we should have an IntNum allomorph | ||
viki | Intersting. | 19:40 | |
geekosaur | possibly, but I can see that causing other problems too. (like that Int.Range issue is likely to develop weird edge cases) | ||
viki | m: class IntNum is Num is Int {}; my IntNum $x .= new: Inf; say $x; say $x ~~ Int | 19:42 | |
camelia | rakudo-moar 61a18c: OUTPUT«InfTrue» | ||
viki | hehe | ||
m: class IntNum is Num is Int {}; my IntNum $x .= new: Inf; say $x; say $x ~~ Int; say now + $x | |||
camelia | rakudo-moar 61a18c: OUTPUT«InfTrueAttempt to divide by zero using div in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
19:44
domidumont left
19:47
domidumont joined
|
|||
AlexDaniel | and then also IntNumStr | 19:48 | |
19:50
jonas1 left
19:57
nwc10 left
|
|||
andrzejku | do you think that one day one guy will write something like RoR for Perl6 | 20:00 | |
and he will make a boom | |||
timotimo | *shrug* | ||
perl6 certainly has bad performance like ruby did back then | 20:01 | ||
:P | |||
andrzejku | ruby had bad performance too | ||
timotimo | that's what i'm saying | ||
vendethiel- | "back then" :P | ||
20:01
vendethiel- is now known as vendethiel
|
|||
timotimo | it must be important for the success of the thing | 20:02 | |
andrzejku | however I think moat vm should be rewritten to c++ without nqp to achieve better performance when the API will be consistence | ||
vendethiel | Oo | ||
.oO( goatvm needs no yakshaving; at least ) |
20:03 | ||
andrzejku | right now C got worse performance than C++ | ||
vendethiel | that's a pretty meaningless statement :) | ||
tbrowder | ref rakudo star: after fooling with it for two days, i give up. going to try straight rakudo with a separate module install script. | ||
timotimo | it sounds like you're confused | ||
viki | andrzejku: doubt there will be any booms from RoR-like product. If there's one thing the world needs less now is a yet another web dev framework that is the same as all the rest. | 20:05 | |
timotimo | viki: it's not about a web framework | 20:06 | |
viki | andrzejku: besides, wasn't RoR dying or dead because they designed themselves into a corner? | ||
timotimo | it's just "any killer app" | ||
andrzejku | mhmm | ||
viki | Perl 6 is the killer app :) | 20:07 | |
20:07
hankache left
|
|||
andrzejku | viki, ruby is not dying, I met with some strange statistics on Tiobe about Ruby but as open source GitHub projects they are a lot and more more | 20:07 | |
20:08
Ven joined
|
|||
viki | andrzejku: that's 'cause TIOBE is crap :) | 20:08 | |
andrzejku | right now Javascript and NodeJS is winning among developers | ||
viki | andrzejku: and I've said RoR, not Ruby | ||
vendethiel | viki: RoR is doing just fine | ||
andrzejku | viki, I am not web specialist | ||
vendethiel | it's been a corner for 10years now | 20:09 | |
viki | andrzejku: but they *aren't*. They're just oft-used because Javascript is the only thing you can reliably run on clientside in browsers. | ||
andrzejku | but I think Javascript must be fucked | ||
viki | vendethiel: well, I'm just quoting what chief architect of another web framework said and I heard another guy point out that no one uses RoR so *shrug* | ||
andrzejku: what does that mean? | |||
andrzejku | by adding to web engine perl/ruby interpreters | 20:10 | |
vendethiel | viki: very surprising that a guy would talk smack about a competitor heh :) | ||
viki | andrzejku: haha. which web engine? :D | ||
vendethiel: the smack talking guy wasn't the competitor. | |||
20:10
Ven is now known as ven
|
|||
andrzejku | WebKit or something | 20:10 | |
viki | andrzejku: and what about others? | ||
andrzejku | I don't care | ||
RabidGravy | I'm confused now | 20:11 | |
andrzejku | if some companies told users to use Explorer | ||
moritz | from looking at job postings, my impression is that quite many commercial applications are still on Java, many other on RoR, PHP and a few newer ones on pure JS stacks | ||
viki | andrzejku: no real website will use Perloscript for their website if it doesn't work in half the browsers | ||
timotimo | JS is already bad enough in browsers :) | ||
viki | andrzejku: on one of our main websites, I still worry that a user with IE8 will show up, because I know $boss will make me fix the issue... And that browser has been deprectated by its developer and receives no security updates! | 20:12 | |
The "I don't care" philosophy with Web only if you're running a personal website about nerdy stuff | |||
andrzejku | viki, that's not true | 20:13 | |
viki | s/only/works only/; | ||
moritz | or you have a very hip audience | ||
but much serious business doesn't | |||
andrzejku | viki, if you say we got best website with best performance you can say the users use firefox and fuck rest | ||
and they will do that, guess why? | |||
viki | andrzejku: if your website is broken in my browser, I have no means to become your customer. | ||
andrzejku: what's "firefox"? | 20:14 | ||
moritz | andrzejku: many users out there don't even know what a browser is | ||
andrzejku | because they don't care what a shitty browser they will use | ||
viki | Man, the "average user" doesn't know wtf a browser is.. | ||
20:14
bstamour joined
|
|||
andrzejku | they just want to got your app working everywhere | 20:14 | |
viki | andrzejku: what app? They don't know who I am, because when the chance for them to find out came, my website was broken in their browser | ||
andrzejku | so you come on your website and there will be message use these browsers to be in power | 20:15 | |
and they do it | |||
moritz | andrzejku: you seem to argue from a very privileged perspective that many of us can't afford | ||
ven | .oO( As always, the best move is not to code ) |
||
moritz | most businesses don't have "the best", and everybody is desparate to use their thing | ||
viki | andrzejku: 99% of users in my office won't be able to install any of those browsers. They would get permission denied from their user accouint settings | 20:16 | |
moritz | on average, most of them are average | ||
RabidGravy | I thought the days of "best enjoyed with ,,,, browser" were passed | ||
viki | andrzejku: and at least half of them will think your site is trying to get them to install a virus | ||
andrzejku | ;-) I also work in office and most of ppl do what someone told them to do | 20:17 | |
they will not think it is a virus | 20:18 | ||
viki | And I can install a brower, but I'd just go to a different website. I like *my* browser. I don't care that you're too inept to make your site work in it. | ||
Because there's a competitor that makes me do less work, so I'll go to them. | |||
andrzejku: so your office has unrestricted accounts? | 20:19 | ||
andrzejku | viki, sure | ||
viki | Sounds like a nightmare for I.T. department | ||
andrzejku | viki, but I use linux | ||
viki, linux is illegal there and it is out of restriction however most of tricky problems I need resolve alone or with linux office budies | 20:20 | ||
viki, moreover you can be true about competitors and favourite browsers, but I believe that the world belongs to the bravest | |||
andrzejku let the perl make great again | 20:21 | ||
20:22
ven left,
Ven joined
|
|||
viki | That's just an empty saying with no reality to it. | 20:22 | |
andrzejku | moritz, let the germany make great again :P | 20:23 | |
viki | I meant the brave thing. | ||
andrzejku | :) | ||
viki | There's nothing brave about forking a browser engine and implementing language XYZ in it. In fact, I'm sure there are hundreds of those. Dead and unloved. | 20:24 | |
In fact, now I recall there was one that can run Perl 5 client side. | 20:25 | ||
andrzejku | viki, gimme the source | ||
viki | I saw it mentioned on r/perl, but that was ages ago | ||
dudz | but from a marketing view buzzwords like brave and best are profit :) | ||
RabidGravy | activeperl will run in IE ActiveX scripting host | ||
dudz | *hello | ||
viki | And it kinda proves my point: I know that browser exists, but I can't even find it! :) | 20:26 | |
RabidGravy | or whatever they call it now | ||
viki | dudz: Courage! | ||
lucasb_ | viki++ thanks for fixing the .flat bug | ||
viki | lucasb_++ thanks for golfing it | ||
andrzejku: this may be it, but the site isn't loading for me: www.brainbell.com/tutors/Perl/Clien...e_Perl.htm | 20:27 | ||
lucasb_ | viki: did benchamark only the range flat snippet? won't the deleted pull-all method make a difference in other use cases? | ||
*did you | |||
*push-all :) | 20:29 | ||
viki | lucasb_: doubt it. The only thing re-implementing push-all would save is a method call, 'cause it'd be the same impl. as pull-on, except you'd be pushing to $target instead of returning the result and looking for iterend instead of the first found value | ||
lucasb_: well, a method call *per item* | |||
lucasb_ | viki: ok | 20:30 | |
viki | m: my @a; @a[$_] = ^3 .List for ^10_000; @a[$_][0] = ^3 .List for ^10000; dd @a | 20:32 | |
camelia | rakudo-moar b6de5e: OUTPUT«Cannot modify an immutable Int in sub postcircumfix:<[ ]> at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1 in block at <tmp> line 1» | ||
viki | :/ | ||
20:33
stux|RC-only left
|
|||
lucasb_ | .oO( "The Immutable Integer" sounds like a cool band name ) |
20:33 | |
andrzejku | I think the future is Perl for Android and iOS but I have no idea how is working | ||
20:33
rurban joined
|
|||
bstamour | What about "The Immutable Rat" instead? ;) | 20:34 | |
20:34
domidumont left
|
|||
timotimo | on devices that only have like 256 megabytes of ram, it's a bad idea to run a rakudo-moar that already takes about 60 megs to just start up and compile the main program :P | 20:35 | |
andrzejku | timotimo, how the ruby mine works? | 20:36 | |
ruby motion, pardon | |||
there are already great apps made with it | |||
timotimo | ruby motion? | 20:37 | |
20:37
stux|RC-only joined
|
|||
andrzejku | timotimo, www.rubymotion.com/ | 20:37 | |
viki | star: for ^50 { <a b c>[^3 for ^1000].flat.eager }; say now - INIT now | 20:38 | |
camelia | star-m 2016.10: OUTPUT«2.6514073» | ||
viki | star: for ^50 { <a b c>[^3 for ^1000].flat.eager }; say now - INIT now | ||
camelia | star-m 2016.10: OUTPUT«2.56446215» | ||
viki | m: for ^50 { <a b c>[^3 for ^1000].flat.eager }; say now - INIT now | ||
camelia | rakudo-moar b6de5e: OUTPUT«3.18496066» | ||
viki | m: for ^50 { <a b c>[^3 for ^1000].flat.eager }; say now - INIT now | ||
camelia | rakudo-moar b6de5e: OUTPUT«3.23080829» | ||
viki | /o\ | ||
20:38
TEttinger joined
|
|||
viki | lucasb_: good spot. seems like it could use a custom push-all after all | 20:38 | |
20:39
stux|RC-only left
|
|||
timotimo | andrzejku: well, we're wasting a lot of ram, we can quite probably do much better somewhat soon | 20:39 | |
viki is off for the day in 11 minutes, so will add it tomorrow or the weekend | |||
20:40
stux|RC-only joined
|
|||
andrzejku | timotimo, do you mean perl6 is wasting? | 20:40 | |
timotimo | yes | ||
andrzejku | well | ||
viki | lucasb_: or not... I'm getting the same diff for the original bench I used, so it's likely star being slower :o | 20:41 | |
andrzejku | timotimo, I think it is design problem | ||
viki | benchable6: help | ||
benchable6 | viki, Like this: benchable6: f583f22,HEAD my $a = "a" x 2**16;for ^1000 {my $b = $a.chop($_)} | ||
andrzejku | timotimo, it will be much more better to throw out nqp | 20:42 | |
and do what lisp languages do | |||
lucasb_ | viki: star being... faster, you mean? | ||
timotimo | throw out nqp and write everything in pure perl6? | ||
andrzejku | write a base in C/C++ and do as much as we can in perl6 | ||
AlexDaniel | viki: you can try it, but right now benchable is a bit… broken :) | ||
viki | benchable6: 1b840f1,HEAD for ^50 { <a b c>[^3 for ^1000].flat.eager }; | ||
benchable6 | viki, starting to benchmark the 2 given commits | ||
viki, benchmarked the given commits, now zooming in on performance differences | 20:43 | ||
andrzejku | then just improve performance by rewrite most critical things to native again | ||
benchable6 | viki, ¦«1b840f1»:2.3638¦«61a18c0»:2.8944¦«HEAD»:2.8443 | ||
AlexDaniel | benchable6: 1b840f1,HEAD for ^50 { <a b c>[^3 for ^1000].flat.eager }; | ||
benchable6 | AlexDaniel, starting to benchmark the 2 given commits | ||
andrzejku | timotimo, I tried to understand nqp but it is not described well | ||
AlexDaniel | let's give it another try just in case… :) | ||
viki | m: say 2.3638/2.8443 | 20:44 | |
camelia | rakudo-moar b6de5e: OUTPUT«0.831066» | ||
viki | benchable6: 1b840f1,HEAD for ^1000 { ^10_000 .flat.eager }; | ||
benchable6 | AlexDaniel, benchmarked the given commits, now zooming in on performance differences | ||
AlexDaniel, ¦«1b840f1»:2.3712¦«61a18c0»:2.8496¦«HEAD»:2.8442 | |||
viki, starting to benchmark the 2 given commits | |||
viki, benchmarked the given commits, now zooming in on performance differences | 20:45 | ||
viki, ¦«1b840f1»:2.7403¦«HEAD»:2.8107 | |||
viki | benchable6: 1b840f1,HEAD sink(for ^1000 { ^10_000 .flat.eager }); | ||
benchable6 | viki, starting to benchmark the 2 given commits | ||
viki, benchmarked the given commits, now zooming in on performance differences | |||
viki, ¦«1b840f1»:«run failed, exit code = 1, exit signal = 0»¦«HEAD»:«run failed, exit code = 1, exit signal = 0» | |||
timotimo | andrzejku: code written in nqp is already many times faster than the equivalent code written in perl6 | 20:46 | |
why would it be faster to rewrite that code in perl6? | |||
lucasb_ | in sink((for ...)) another pair of parentheses? | ||
andrzejku | timotimo, yeah because perl6 is compiled to nqp | ||
lucasb_ | sink is a statement or subroutine? I didn't find its definition in the source... | ||
viki | m: sink | 20:47 | |
camelia | rakudo-moar b6de5e: OUTPUT«5===SORRY!5===Whitespace required after keyword 'sink'at <tmp>:1------> 3sink7⏏5<EOL>Missing block or statementat <tmp>:1------> 3sink7⏏5<EOL> expecting any of: term» | ||
viki | :) | ||
timotimo | what do you mean by "perl6" in that sentence? | ||
andrzejku | perl6 -> nqp -> native calls | ||
timotimo | that seems wrong | ||
andrzejku | perl6 -> native calls | ||
timotimo, look at lisp | 20:48 | ||
lucasb_ | perl 6 -> ... -> the machine -> the electrons -> the mind -> the universe | ||
20:49
benchable6 left
|
|||
andrzejku | as Stallman quote says "List is a language created by god" | 20:49 | |
viki | AlexDaniel: ... oops | ||
andrzejku | it got very tiny vm | ||
AlexDaniel | viki: not your fault | ||
viki | *phew* :D | ||
AlexDaniel | Unhandled exception in code scheduled on thread 13 | ||
Unhandled exception in code scheduled on thread 12 | |||
Cannot send a message on a closed channel | |||
I think this is the same issue as this: github.com/perl6/whateverable/issu...-262159968 | 20:50 | ||
20:50
benchable6 joined
|
|||
viki | Oh, so them it *is* my fault? I ran a command in #zofbot | 20:52 | |
viki relocates | |||
AlexDaniel | viki: but you did nothing wrong, it crashed because there is some issue in rakudo | 20:53 | |
moritz | has anybody translated the "Higher Order Perl" examples to Perl 6 yet? | 20:58 | |
tadzik | ooh, that's a very cool idea | ||
iirc the regular ones are, hm, prety Oldschool Perl :) | 20:59 | ||
moritz | it's from 2005 :-) | ||
21:01
zakharyas joined
|
|||
moritz | hop.perl.plover.com/ has links to JS and Ruby translations | 21:01 | |
masak | tadzik: that's not my memory of it, though it's been a while since I read it. | 21:02 | |
tadzik: I remember the code in that book being highly readable, and admirably clean. | |||
21:03
perlawhirl left
|
|||
masak | it's one of the books that really made me appreciate Perl as an adequate Lisp :P | 21:03 | |
tadzik | hm, I was reading it on a kindle, which is not perfect for code examples, maybe that skews my memory a bit | ||
moritz | s/one of// for me | ||
21:05
firstdayonthejob joined
21:08
Ven left
|
|||
timotimo | andrzejku: as long as you're not showing actual implementation, your suggestions sound like "we should add blast processing to perl6" to me | 21:09 | |
andrzejku | timotimo, I am not an expert | ||
if I got a perl guy support | 21:10 | ||
I will | |||
21:11
Ven joined
21:12
hankache joined
21:15
FROGGS left
|
|||
AlexDaniel | soooo… I'm thinking… | 21:17 | |
the idea of changing the setter a little bit is not that unusual | 21:18 | ||
and the Proxy solution is just too painful | |||
having a module to do such a basic thing is weird | 21:19 | ||
the guy is right | 21:20 | ||
21:23
Ven_ joined,
Ven left
21:31
hankache left
|
|||
wamba | m: my $a=(1,3,2) but role :: { method sort { self.pick(*).list but $?ROLE } }; say ($a, {.sort} ... *)[^10] | 21:33 | |
camelia | rakudo-moar 172898: OUTPUT«((1 3 2) (1 3 2) (2 3 1) (2 1 3) (1 2 3) (1 2 3) (3 2 1) (3 1 2) (2 3 1) (1 3 2))» | ||
21:36
Ven_ left,
espadrine joined,
Ven joined
21:38
kurahaupo left
21:47
kyclark_ joined
21:50
imcsk8 left
21:51
kyclark_ left
21:53
wisti left
21:55
imcsk8 joined
|
|||
viki | AlexDaniel, so.... add all the thing to core? :) | 21:59 | |
AlexDaniel | viki: we have added TWEAK to the core, this is the same thing | 22:00 | |
and we also have .indent | |||
viki | I don't think the guy is right (don't even know if it's a guy) | ||
22:00
kyclark_ joined
|
|||
AlexDaniel | that's a good point | 22:01 | |
viki | His premise is the attribute must have the same name as accessor for some reason, I'm not really buying that as a reason to add another core feature | 22:02 | |
AlexDaniel | because that's what we provide by default?? | ||
viki | TWEAK solves a real problem, because without it, you have to move defaults of all attributes | ||
The solution to his problem is a prive attribute with a public accessor, there won't be any code savings on top of that | 22:03 | ||
So we'd be adding maintenance burden for some purely psychological ideal that all attributes must be named the same as their accessors | 22:04 | ||
Makes no sense to me | |||
AlexDaniel | we can keep bragging how creating a class is just a few lines and everything is autogenerated for you, but if there's no way to have your own setter then it's like one step forward and two steps back | ||
viki | But there *is*! | ||
And if you don't like it, you can make a module | 22:05 | ||
AlexDaniel | yeah, using a Proxy. How easy and readable that is! | ||
viki | That's what modules are for | ||
No, using a trait | |||
22:05
bstamour left
|
|||
AlexDaniel | huh? | 22:05 | |
viki | And this is the first time I see anyone complain about it in a year and all of a sudden you're bent on making it a core feature | 22:06 | |
AlexDaniel | well that's how TWEAK got implemented | ||
timotimo | no | ||
viki | Can we not use "TIMTaoDy" and "but we added that useless feature already" as an excuse to adding more useless feature | ||
timotimo | people have been complaining about TWEAK being missing for years | 22:07 | |
AlexDaniel | ah ok | ||
timotimo | at the very least one year | ||
22:07
zakharyas left,
Ven left
|
|||
viki | AlexDanel, not at all, I went on at least two rants about TWEAK and mst made fun of us for Moose have it and us not having it several times, that's at least what I witnessed, there may have been more | 22:08 | |
22:08
andrzejku left,
Ven joined
|
|||
viki | And .indent is used by heredocs anyway :) | 22:09 | |
RabidGravy | what is TWEAK? | ||
or is there a roast test I can examine to see what it does? | |||
viki | RabidGravy it's an awesome new feature that let's you do BUILD without having to move defaults of all attributes | 22:10 | |
RabitGravy there are docs for it :) | |||
docs.perl6.org/language/objects#in...ntry-TWEAK | 22:11 | ||
RabidGravy | got it | 22:12 | |
22:13
perlawhirl joined
22:21
kyclark_ left
22:23
Ven left
22:26
kyclark_ joined
|
|||
RabidGravy | on the attribute thing, you could make the separately named r/w accessors with a trait | 22:27 | |
without a proxy | 22:29 | ||
but you'd have to wrap the attribute's compose method or something | 22:30 | ||
22:31
labster left
|
|||
RabidGravy | because you don't know what class you're in until that point | 22:31 | |
22:32
perlawhirl left
22:34
kyclark_ left
|
|||
RabidGravy | if one was to put something in the MOP for it, a compose hook on the attribute which could return some methods might be a more flexible alternative | 22:35 | |
lucs | p | 22:43 | |
22:46
wamba left
22:51
ufobat left,
lucasb_ left
22:56
perlawhirl joined
22:57
labster joined
23:03
wamba joined
23:05
mr-foobar left
23:07
rindolf left
23:09
rurban1 joined
23:11
mr-foobar joined
23:13
rurban left,
RabidGravy left
|
|||
kalkin-_ | When you try to do zef install Task::Start it will fail because LWP:Simple is missing IO::Socket::SSL. After installing IO::Socket::SSL by hand it works | 23:19 | |
yoleaux | 23 Nov 2016 13:17Z <viki> kalkin-_: FWIW, nine++ improved upon your PR (also, I recommend you join #perl6-dev): github.com/rakudo/rakudo/commit/b5...9811d72ba8 | ||
timotimo | i think the IO::Socket::SSL dependency is an optional one | ||
kalkin-_ is not seeing any IO::Socket::SSL dependency definition in perl6-lw--simple/META.info | 23:20 | ||
23:20
kalkin-_ is now known as kalkin-
|
|||
kalkin- | There is an issue from coke github.com/perl6/perl6-lwp-simple/issues/2 He wanted to reopen a new issue, but hasn't followed through on it(?) | 23:22 | |
viki | kalkin-: right, it's an *optional* dep. | ||
viki reads a few lines higher | 23:23 | ||
Oh.... | |||
viki tries | |||
Ah | 23:24 | ||
No, I see commits to Pod::ToBigPage that address this github.com/gfldex/perl6-pod-to-bigpage/issues/5 | 23:25 | ||
kalkin-: what's the failure output? | 23:26 | ||
kalkin- | just closed the console, will restart it | ||
viki | `zef install Task::Star` succeeded, but I'm pretty sure IOSSSL was already installed on my box. | 23:28 | |
23:29
AlexDaniel left
|
|||
viki | kalkin-: OK. Well, there are two ways to fix this. #1, move `p6doc` dep in Task::Star to be before LWP::Simple. It'll bring in Pod::To::BigPage with it, which has IO::Socket::SSL dep on it. Or #2, reopen the issue you mentioned for LWP::Simple and make the author toss SSL tests or add it as a dep. | 23:31 | |
Right now I see there's an arbitrary env var that one can set to avoid the test: github.com/perl6/perl6-lwp-simple/...uth.t#L12, but that's not the default condition | 23:32 | ||
There's use Test::When <online>; one can use, or if module dep is not desirable, at least it's var, ONLINE_TESTING can be used when it *is* turned on: github.com/zoffixznet/perl6-Test-When#online | 23:33 | ||
</shameless-plug> | |||
ONLINE_TESTING is not part of Lancaster convention, but other vars in that module *are*, so there's a chance of wider adoption of all of them by module installers | 23:34 | ||
Ah, I see the current choice was suggested here: github.com/rakudo/star/issues/77#i...-258132929 | 23:36 | ||
#WhyYourSoftwareWorksThatWay :) | 23:37 | ||
kalkin- | gist.github.com/anonymous/f237ead6...f2b5fedd38 | 23:39 | |
now I try to install panda without Task::Star, AFAIR it failed a few days ago with the same error | 23:40 | ||
ohh viki meant p6doc not panda | |||
hmm seems to work | 23:41 | ||
23:42
firstdayonthejob left
|
|||
kalkin- | I think reopening the issue would be the best thing, I don't like non obvious fixes like the first one proposed by viki | 23:42 | |
23:42
girafe left,
Bigger joined
23:53
cpage_ left
|