Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-09-22

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:21 pierre_ joined #perl6
00:22 pierre_ joined #perl6
00:26 dataangel joined #perl6
01:07 Actualeyes joined #perl6
01:13 b2gills joined #perl6
01:17 _sfiguser joined #perl6
01:25 doc_ joined #perl6
01:28 tushar can i read input file here on irc channel using "m:"?
01:29 geekosaur not in general. there's usually some kind of (usually unicode-y) text file on $*IN though
01:30 BenGoldberg joined #perl6
01:30 pierre_ joined #perl6
01:30 tushar geekosaur: thanks.
01:31 tushar m: $*IN.nl-in.say;
01:31 camelia rakudo-moar 3789a0: OUTPUT«[␤
01:34 tushar can i set "nl-out" or "nl-in"?
01:39 fulaiche88 joined #perl6
01:39 tushar Is there any special variable or method that can identify the field separator of a file?
01:46 pierre_ joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:48 raiph joined #perl6
01:49 MasterDuke joined #perl6
01:55 b2gills joined #perl6
02:02 lue joined #perl6
02:05 AlexDaniel tushar: what's a field separator of a file?
02:08 tushar AlexDaniel: tab separator or comma separator. It's like field separator in Sed.
02:09 AlexDaniel umm… if $line ~~ /‘;’/ { … } elsif $line ~~ /\t/ { … } ?
02:10 AlexDaniel it's hard for me to see how should it decide if it's one or another :)
02:10 AlexDaniel especially if the line contains both
02:11 AlexDaniel committable6: stdin http://websitetips.com/articles/copy/lorem/ipsum.txt
02:11 committable6 AlexDaniel, Successfully fetched the code from the provided URL.
02:11 committable6 AlexDaniel, https://gist.github.com/15e332d3fd7bb9c084b62cdbd2103fd0
02:11 AlexDaniel well, this response is LTA
02:11 AlexDaniel committable6: say lines[0]
02:11 committable6 AlexDaniel, ¦«say»: Cannot find this revision
02:11 AlexDaniel committable6: HEAD say lines[0]
02:11 committable6 AlexDaniel, https://gist.github.com/c0c06fd17cbcf7e22dbb740aad936484
02:12 AlexDaniel committable6: HEAD say lines[0].split(‘ ’)[0]
02:12 committable6 AlexDaniel, ¦«HEAD»: Lorem
02:12 MasterDuke you should be able to set nl-in
02:12 AlexDaniel so yeah, you can use custom STDIN if you use committable. Still can't read a file though
02:13 MasterDuke e.g., $filename.IO.lines(:nl-in("\r\n")).elems
02:14 noganex joined #perl6
02:14 MasterDuke https://docs.perl6.org/language/5to6-perlvar#Variables_related_to_filehandles
02:19 pierre_ joined #perl6
02:32 committable6 joined #perl6
02:33 committable6 joined #perl6
02:34 bisectable6 joined #perl6
02:34 bisectable6 joined #perl6
02:37 bisectable6 joined #perl6
02:43 skids joined #perl6
02:50 Xliff_ m: use NativeCall; my @a = CArray[int32].new; @a.^methods.say
02:50 camelia rakudo-moar 3789a0: OUTPUT«(iterator from-iterator new STORE reification-target shape pop shift splice name of default dynamic Method+{<anon|44748016>}.new Method+{<anon|44748016>}.new Method+{<anon|44748016>}.new Method+{<anon|44748016>}.new BIND-POS Method+{<anon|44748016>}.new Me…»
02:52 rindolf joined #perl6
02:54 Xliff_ Is there an easy way to list the roles supported by an object?
02:54 wamba joined #perl6
03:00 fulaiche88 left #perl6
03:04 ka joined #perl6
03:09 AndyBotwin joined #perl6
03:09 skids m: "foo".^roles.say
03:09 camelia rakudo-moar 3789a0: OUTPUT«((Stringy))␤»
03:16 skids m: class A { }; class B is A { }; A.^parents.say # ??
03:16 camelia rakudo-moar 3789a0: OUTPUT«()␤»
03:16 skids star: class A { }; class B is A { }; A.^parents.say # ??
03:16 camelia star-m 2016.04: OUTPUT«()␤»
03:17 skids oh.  duh
03:17 skids m: class A { }; class B is A { }; B.^parents.say
03:17 camelia rakudo-moar 3789a0: OUTPUT«((A))␤»
03:17 skids m: class A { }; class B is A { }; B.^parents(:all).say
03:17 camelia rakudo-moar 3789a0: OUTPUT«((A) (Any) (Mu))␤»
03:18 pierre_ joined #perl6
03:37 pierre_ joined #perl6
04:00 rindolf joined #perl6
04:07 dalek whateverable: d3a3e58 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (2 files):
04:07 dalek whateverable: Remove transitional support for older builds
04:07 dalek whateverable:
04:07 dalek whateverable: This code is not needed anymore.
04:07 dalek whateverable: review: https://github.com/perl6/whateverable/commit/d3a3e583e0
04:07 dalek whateverable: 6b4d623 | (Aleks-Daniel Jakimenko-Aleksejev)++ | README.md:
04:07 dalek whateverable: Less README, more wiki!
04:07 dalek whateverable:
04:07 dalek whateverable: Editing documentation with git commits is daunting.
04:07 dalek whateverable: review: https://github.com/perl6/whateverable/commit/6b4d623df5
04:15 cpage_ joined #perl6
04:21 _slade_ joined #perl6
04:41 dayangkun joined #perl6
04:44 cbk_ joined #perl6
04:47 cbk_ joined #perl6
04:48 Actualeyes joined #perl6
04:49 pierrot joined #perl6
04:52 Cabanossi joined #perl6
04:57 ugexe joined #perl6
04:59 pierre_ joined #perl6
05:00 rurban joined #perl6
05:10 araujo joined #perl6
05:10 araujo joined #perl6
05:11 wamba joined #perl6
05:15 cbk_ joined #perl6
05:19 cbk_ joined #perl6
05:23 wamba joined #perl6
05:36 domidumont joined #perl6
05:38 ugexe joined #perl6
05:41 skids joined #perl6
05:42 domidumont joined #perl6
05:44 Nex6 joined #perl6
05:45 Nex6 question this line:
05:45 Nex6 my $results = run 'ping', '-c', '1', ' ' $line :out;
05:45 Nex6 throws this error
05:45 Nex6 ===SORRY!=== Error while compiling /Users/zero/Perl6_Projects/pingsweep/./pingsweep.pl
05:45 Nex6 Two terms in a row
05:46 geekosaur that syntax looks wrong, yes
05:47 Nex6 it worked on Linux, now i am running the script on OS X and it throws error?
05:48 geekosaur not like that it didn't, because      ' ' $line      is invalid
05:48 geekosaur :out($line) perhaps?
05:48 Nex6 i moved the $line from beginning
05:48 ufobat joined #perl6
05:48 geekosaur although that still wouldn't be right because $line would get a filehandle
05:49 geekosaur what was the original command?
05:49 Nex6 for 'hostfile.txt' .IO.lines -> $line {
05:49 Nex6 for 'hostfile.txt' .IO.lines -> $line {
05:50 Nex6 its in a for loop
05:51 geekosaur ok, so if you are using run then it needs to be something like: my $proc = run('ping', '-c', '1', :out); for $proc.out.lines -> $line {
05:52 geekosaur hm, parens are not needed for that run, I was starting to type something else that wouldn't have worked
05:52 geekosaur my $proc = run 'ping', '-c', '1', :out; for $proc.out.lines -> $line {
06:00 pierre_ joined #perl6
06:02 nadim joined #perl6
06:05 bob777 joined #perl6
06:07 araujo joined #perl6
06:09 araujo joined #perl6
06:13 firstdayonthejob joined #perl6
06:21 darutoko joined #perl6
06:31 pierre_ joined #perl6
06:31 wamba joined #perl6
06:42 pierre_ joined #perl6
06:43 domidumont joined #perl6
06:46 zengargoyle is there a .trans like thing that does 'from' => 'to', 'from1' => 'to1' instead of [«from from1»]=>[«to to1»] ??
06:49 rurban joined #perl6
06:50 zengargoyle or some simple magic transformation incantation to make the former into the latter?
06:51 * zengargoyle thinks "transformation incantation" will be a handy p6 term....
06:55 dayangkun joined #perl6
06:58 Actualeyes joined #perl6
07:07 Glitchy left #perl6
07:10 dayangkun joined #perl6
07:11 araujo_ joined #perl6
07:12 pierre_ joined #perl6
07:13 perlawhirl joined #perl6
07:13 perlawhirl zengargoyle: why not subst (or s///)
07:14 perlawhirl m: 'test from test from1 from3'.subst('from', 'to', :g)
07:14 camelia rakudo-moar 3789a0: ( no output )
07:14 perlawhirl m: say 'test from test from1 from3'.subst('from', 'to', :g)
07:14 camelia rakudo-moar 3789a0: OUTPUT«test to test to1 to3␤»
07:19 matt_ joined #perl6
07:19 zengargoyle perlawhirl: because there's always a *long* list of A->B, C->D, E->F, G->H, I->J replacements that i want to do in one go.
07:20 zengargoyle and that's an easier format to maintain than [A,C,E,G]->[B,D,F,H]
07:24 perlawhirl *shrug*... put them in a hash and loop over them... for %from-to.kv -> $from, $to { $string .= subst($from, $to, :g) }
07:24 espadrine joined #perl6
07:24 CIAvash joined #perl6
07:25 holyghost joined #perl6
07:26 zengargoyle then you have to worry about order of substitutions.  IIRC .trans does longest first for you and maybe other optimizations so that it's *one* pass over the string instead of N passes over the strin.
07:28 RabidGravy joined #perl6
07:32 perlawhirl you can define 2 ordered lists if that's nicer to maintain... .trans( @from => @t )
07:33 zakharyas joined #perl6
07:33 perlawhirl m: my @a = <this is that>; my @b = <now it's this>; say 'this is not that'.trans(@a => @b)
07:33 camelia rakudo-moar 3789a0: OUTPUT«now it's not this␤»
07:35 zengargoyle that's exactly the opposite of what i want.  when adding new things you need to add one thing to the first list and one thing to the second list and make sure to keep them in order.
07:36 raydiak m: my @vals = { a => 1, b => 2, c => 3 }.pairs; say @vals».key, @vals».value; # more like this maybe...
07:36 camelia rakudo-moar 3789a0: OUTPUT«[a c b][1 3 2]␤»
07:36 zengargoyle i want to have one list of x=>y and add more x=>y to that list.
07:36 zengargoyle raydiak: yeah, but i was hoping for not having an intermediate variable. :P
07:37 zengargoyle i.e. for one-liner usage scenario.
07:38 raydiak m: say $_».key, $_».value given { a => 1, b => 2, c => 3 }.pairs.list # not exactly pretty but no intermediate variable
07:38 camelia rakudo-moar 3789a0: OUTPUT«(a c b)(1 3 2)␤»
07:39 zengargoyle where it's much easier to add one more A=>B somewhere than it is to add an A in one place and a B in another.  but yeah.  that or a {[$_.keys]=>[$_.values]}(a=>b, c=>d) sort of thing.
07:39 raydiak seriously?  you have "a long list" of these in a one-liner?
07:39 zengargoyle :P
07:40 zengargoyle for lines».split: /\s/ -> ($c, $, $t) { say qq{<Multi_key> $t.comb.map({$_.trans([«( ) + - | < > . ^ = & !»]=>[«parenleft parenright plus minus bar less greater period asciicircum equal ampersand excam »])}).fmt("<%s>") : "$c" U+$c.ord.fmt("%X") # $c.uninames()} }
07:40 masak morknink, #perl6
07:40 raydiak at first glance looks like a mess that ought to be facotred into something readable to me
07:40 raydiak o/ masak
07:42 zengargoyle i've used Perl5 one-liners from hell for many years and intend to do the same with Perl6.  they're one-off things and go into my ~/0liners file and if i need them more they get put in an editor and tidy'd and worked on.
07:43 El_Che joined #perl6
07:43 zengargoyle that takes the list of char,codepoint,texas-symbol cut from the docs and turns it into a .XCompose file.
07:46 zengargoyle the only part of that that was even a tiny PITA was the .trans....
07:48 lizmat zengargoyle: perhaps link to it from the doc ?
07:48 zengargoyle lizmat: link to what?
07:49 lizmat a downloadable copy of the .XCompose file ?
07:49 lizmat :-)
07:50 zengargoyle oh, yeah, it's the start of a plan to get all the texas to char mappings somehow and generate various IME files (ibus tables, xcompose, ...).
07:50 araujo_ joined #perl6
07:51 zengargoyle i wish there was a way to get the mappings from *within* p6 somehow vs keeping a list somewhere.
07:52 lizmat I guess we could add such a module to lib and make it -use-able and in sync with releases that way
07:52 lizmat not sure we want to carry that around all the time
07:55 zengargoyle yeah, or maybe when pod6 is a bit more ... just a comment or something that can be got at somehow.
07:55 raydiak m: < a 1 b 2 c 3 >[ (0, 2 ... *), (1, 3 ... *) ].say # any better?
07:55 camelia rakudo-moar 3789a0: OUTPUT«((a b c) (1 2 3))␤»
08:02 rurban joined #perl6
08:03 zengargoyle m: sub (*@a) { [@a>>.key]=>[@a>>.value] }((a=>'b',c=>'d'))
08:03 camelia rakudo-moar 3789a0: ( no output )
08:03 zengargoyle m: say sub (*@a) { [@a>>.key]=>[@a>>.value] }((a=>'b',c=>'d'))
08:03 camelia rakudo-moar 3789a0: OUTPUT«[a c] => [b d]␤»
08:07 woolfy joined #perl6
08:07 zengargoyle m: {[@^a».key]=>[@^a».value]}((a=>'b',c=>'d'))
08:07 camelia rakudo-moar 3789a0: ( no output )
08:07 Actualeyes joined #perl6
08:07 zengargoyle m: say {[@^a».key]=>[@^a».value]}((a=>'b',c=>'d'))
08:07 camelia rakudo-moar 3789a0: OUTPUT«[a c] => [b d]␤»
08:09 mr-foobar joined #perl6
08:09 pierre_ joined #perl6
08:12 woolfy left #perl6
08:15 dakkar joined #perl6
08:15 woolfy joined #perl6
08:16 zengargoyle m: say {[@^a».key]=>[@^a».value]}(a=>'b',c=>'d')
08:16 camelia rakudo-moar 3789a0: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at <tmp> line 1␤␤»
08:26 ocbtec joined #perl6
08:32 bjz joined #perl6
08:42 Ven` joined #perl6
08:46 wamba joined #perl6
08:56 masak m: say {[@^a».key]=>[@^a».value]}([a=>'b',c=>'d'])
08:56 camelia rakudo-moar e9409c: OUTPUT«[a c] => [b d]␤»
08:57 masak zengargoyle: when you put something like `a => 'b'` *directly* in an argument list, it's interpreted as a named parameter.
08:57 masak (this feature goes under the name of "ShimmerFairy's Objection") :P
09:13 Ven` joined #perl6
09:20 pierre_ joined #perl6
09:24 zengargoyle masak: i sorta knew it wouldn't work without something around the pairs, and why ... just thought *maybe* blocks might be different.
09:26 zengargoyle i guess i really want an additial multi for .trans that takes list of pairs.  or a op that un-pairs.  both are probably doable in real code.
09:33 kerframil joined #perl6
09:34 canopus joined #perl6
09:43 araujo_ joined #perl6
10:00 * zengargoyle slaps self for not guessing ibus-daemon needs restarting after changing XCompose file.
10:04 Woodi joined #perl6
10:04 zengargoyle but can now type Compose-!(elem) and get ∉ in new xterms
10:06 llamatarianism joined #perl6
10:10 pyrimidi_ joined #perl6
10:10 bjz joined #perl6
10:10 DrForr +1
10:13 nowan joined #perl6
10:13 scott joined #perl6
10:16 kaare_ joined #perl6
10:31 jmark joined #perl6
10:32 brrt joined #perl6
10:42 lizmat masak: ShimmerFairy is not alone in doubts about that feature
10:47 zengargoyle joined #perl6
10:48 moritz what would be the alternative? only parse colonpairs as named args?
10:49 gfldex loliblogedagain: https://gfldex.wordpress.com/2016/09/22/keys-are-optional/
10:52 llamatarianism hey
10:53 llamatarianism new to perl; I've got a question about roles
10:53 llamatarianism I know you can do `role Foo[::Bar] { ... }`
10:53 llamatarianism is it possible to do something like `role Foo[::Bar is Baz]` or `role Foo[::Bar does Baz]`?
10:54 llamatarianism so that I can make a `Foo` of anything that is/does `Baz`, but not any old type
10:54 cog_ joined #perl6
10:55 gfldex m: role Foo[::Bar where * ~~ Baz] {}
10:55 camelia rakudo-moar e9409c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot do non-typename cases of type_constraint yet␤at <tmp>:1␤------> 3role Foo[::Bar where * ~~ Baz7⏏5] {}␤»
10:55 gfldex llamatarianism: ^^^ NYI
10:56 llamatarianism gfldex: cool! thanks a lot :)
10:56 pmurias joined #perl6
10:56 gfldex llamatarianism: however, I would goess you could do that with MOP already
10:56 psch m: role R[Positional] { }; R[Array].new
10:56 camelia rakudo-moar e9409c: ( no output )
10:56 psch m: role R[Positional] { }; R[Int].new
10:56 camelia rakudo-moar e9409c: OUTPUT«No appropriate parametric role variant available for 'R'␤  in any specialize at gen/moar/m-Metamodel.nqp line 2649␤  in any specialize at gen/moar/m-Metamodel.nqp line 2240␤  in any compose at gen/moar/m-Metamodel.nqp line 3028␤  in any make_pun at…»
10:57 gfldex m: role R[Positional ::P] { };
10:57 camelia rakudo-moar e9409c: ( no output )
10:57 psch gfldex: i think the error from your example is misleading.  it seems about "can't parse constraints on generic parametrization" which seems reasonable
10:57 gfldex m: role R[Positional ::P] { }; R[Array]
10:57 camelia rakudo-moar e9409c: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant value R[Array] in sink context (line 1)␤»
10:57 gfldex m: role R[Positional ::P] { }; R[Array].new
10:57 camelia rakudo-moar e9409c: ( no output )
10:58 psch ah, no
10:58 psch it's fine, actually, i misread, sorry :)
10:58 psch because where constraints are different than type constraints
10:58 psch i.e. "Positional ::P" vs "::P where Positional"
10:59 gfldex m: role R[Num ::P] { }; R[Num].new
10:59 camelia rakudo-moar e9409c: ( no output )
10:59 gfldex m: role R[Num ::P] { }; R[Int].new
10:59 camelia rakudo-moar e9409c: OUTPUT«No appropriate parametric role variant available for 'R'␤  in any specialize at gen/moar/m-Metamodel.nqp line 2649␤  in any specialize at gen/moar/m-Metamodel.nqp line 2240␤  in any compose at gen/moar/m-Metamodel.nqp line 3028␤  in any make_pun at…»
10:59 psch which means with Subsets we already offer the same functionality, just not one specific syntax
10:59 gfldex so it can be done with a role but inheritance is ignored
11:00 psch m: say Int.isa(Num)
11:00 camelia rakudo-moar e9409c: OUTPUT«False␤»
11:00 gfldex oh
11:00 psch m: role R[Numeric ::N] { }; R[Int].new
11:00 camelia rakudo-moar e9409c: ( no output )
11:00 gfldex llamatarianism: sorry, I was wrong. It can be done.
11:00 psch llamatarianism: you're following along? :)
11:00 llamatarianism psch: a little :P
11:00 psch llamatarianism: basically there's two types of constraints on variables
11:01 psch s/variables/parameters/
11:01 psch llamatarianism: and role parameterization uses, well, parameters
11:01 psch llamatarianism: the two types are type constraints, as in "Int $x" or "Positional ::P"
11:01 psch llamatarianism: the other type is post constraints, as in "$x where * < 10" or "::P where Positional"
11:02 psch llamatarianism: the latter is not supported yet in role declaration, which is the error gfldex++ showed
11:02 gfldex m: class A {}; class B {}; subset A-or-B where * ~~ A|B; role R[A-or-B ::T] {}; R[A.new].new; R[B.new].new;
11:02 camelia rakudo-moar e9409c: ( no output )
11:02 gfldex llamatarianism: ^^^ that may be what you want
11:02 psch llamatarianism: but the former is fully supported, even with subsetting, inheritance, and mixins
11:03 gfldex ENODOC
11:05 llamatarianism gfldex, psch: thanks :)
11:07 jkramer Has anyone ever seen this error? I have no idea where it's coming from o_O "Method 'hash' not found for invocant of class 'Mu'"
11:07 dalek doc: 9493948 | gfldex++ | doc/Language/typesystem.pod6:
11:07 dalek doc: role arguments can have constraints
11:07 dalek doc: review: https://github.com/perl6/doc/commit/94939486bc
11:08 psch m: Mu.hash
11:08 jkramer The code I'm looking at doesn't have 'hash' anywhere in it
11:08 camelia rakudo-moar e9409c: OUTPUT«Method 'hash' not found for invocant of class 'Mu'␤  in block <unit> at <tmp> line 1␤␤»
11:08 gfldex jkramer: are there threads involved?
11:08 jkramer Well yeah, thanks psch :)
11:08 psch scnr :l
11:08 psch jkramer: maybe hash coercer or %() or something like that?
11:09 jkramer gfldex: None that I know of :) However the code is a bit "special" and looking for call frames for a stack trace.
11:09 jkramer I'm trying to make this module work: https://github.com/moznion/p6-Log-Minimal/blob/master/lib/Log/Minimal.pm6
11:10 psch m: callframe(11).say
11:10 camelia rakudo-moar e9409c: OUTPUT«Method 'hash' not found for invocant of class 'Mu'␤  in block <unit> at <tmp> line 1␤␤»
11:10 psch jkramer: you're running out of stack :)
11:11 psch m: callframe(11).perl.say
11:11 camelia rakudo-moar e9409c: OUTPUT«CallFrame.new(level => 13, annotations => Mu, my => {})␤»
11:11 psch or, well, the empty annotations are to blame actually i guess >_>
11:12 gfldex m: callframe(11).WHAT.say
11:12 camelia rakudo-moar e9409c: OUTPUT«(CallFrame)␤»
11:12 psch m: callframe(2).say
11:12 camelia rakudo-moar e9409c: OUTPUT«gen/moar/stage2/NQPHLL.nqp at line 1428␤»
11:12 jkramer m: callframe(1000).WHAT.say
11:12 camelia rakudo-moar e9409c: OUTPUT«ctxcaller needs an MVMContext␤  in block <unit> at <tmp> line 1␤␤»
11:12 psch m: callframe(2).perl.say
11:12 camelia rakudo-moar e9409c: OUTPUT«Method 'WHICH' not found for invocant of class 'Perl6::Compiler'␤  in block <unit> at <tmp> line 1␤␤»
11:13 bioduds hi guys
11:13 bioduds how do I do this: say qqx{@técnicos};
11:13 bioduds it won't interpolate the array
11:14 psch m: my @a = 1,2,3; say qq{@a[]}
11:14 camelia rakudo-moar e9409c: OUTPUT«1 2 3␤»
11:15 psch m: my @a = 1,2,3; say qq{$@a}
11:15 camelia rakudo-moar e9409c: OUTPUT«1 2 3␤»
11:15 bioduds let me try
11:16 * zengargoyle forgets the diff between @x[] and @x[*]
11:18 jkramer psch: Thanks for the pointer, I just added this and it seems to work now :) .grep({ $_.annotations ~~ Hash })
11:20 jkramer Now I can continue to fix the unit tests \o/
11:21 bioduds thanks
11:21 breinbaas joined #perl6
11:21 bioduds psch
11:21 bioduds ~= is concat for string now?
11:22 bioduds instead of .= ?
11:22 lizmat bioduds: yes
11:22 bioduds tx
11:22 lizmat ~ indicates Str
11:22 lizmat + indicates numeric
11:22 lizmat ? indicates Bool
11:22 lizmat m: say ?1
11:22 camelia rakudo-moar e9409c: OUTPUT«True␤»
11:22 lizmat m: dd ?1
11:22 camelia rakudo-moar e9409c: OUTPUT«Bool::True␤»
11:22 lizmat m: dd ~1
11:22 camelia rakudo-moar e9409c: OUTPUT«"1"␤»
11:23 lizmat m: dd +"42"
11:23 camelia rakudo-moar e9409c: OUTPUT«42␤»
11:27 MasterDuke joined #perl6
11:29 llamatarianism is there a difference between `so` and `?`?
11:29 llamatarianism m: say so 1
11:29 camelia rakudo-moar e9409c: OUTPUT«True␤»
11:30 lizmat llamatarianism: precedence
11:30 llamatarianism lizmat: good point, thanks
11:30 nowan joined #perl6
11:32 timotimo m: say so 1 + 5; say ?1 + 5
11:32 camelia rakudo-moar e9409c: OUTPUT«True␤6␤»
11:33 zengargoyle m: say ?2 + 5
11:33 camelia rakudo-moar e9409c: OUTPUT«6␤»
11:35 AlexDaniel joined #perl6
11:37 bioduds for @técnicos -> $tecnico {
11:37 bioduds SORRY Variable '$tecnico' is not declared. Did you mean any of these?
11:37 bioduds ?
11:37 bioduds isn't that for in perl6?
11:37 timotimo do you have some " " around there somewhere?
11:37 bioduds yes
11:38 timotimo maybe you accidentally made your quotes go past there?
11:38 kerframil joined #perl6
11:38 bioduds i shouldn't?
11:38 bioduds im interpolating for a string
11:38 bioduds inside the for loop
11:38 timotimo m: say "for @tecnicos ->  $tecnico { }"
11:38 camelia rakudo-moar e9409c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$tecnico' is not declared␤at <tmp>:1␤------> 3say "for @tecnicos ->  7⏏5$tecnico { }"␤»
11:38 timotimo like that?
11:38 moritz bioduds: it looks like your syntax error comes before the piece of the code you pasted
11:39 bioduds let me check
11:41 bioduds sub ef8a4da32a-get-json is export {   my Str $ret-val = "{ tecnicos  [";   for @técnicos -> $técnico {     $ret-val ~= "{nome: $técnico.nome, genero: $técnico.gênero, idade: $técnico.idade, $técnico.rate },";   }
11:41 bioduds is in pm file
11:41 bioduds no clue here
11:42 timotimo m: for ^10 -> $técnico { say "yo" }
11:42 camelia rakudo-moar e9409c: OUTPUT«yo␤yo␤yo␤yo␤yo␤yo␤yo␤yo␤yo␤yo␤»
11:42 timotimo it should work
11:42 timotimo m: sub ef8a4da32a-get-json is export {   my Str $ret-val = "{ tecnicos  [";   for @técnicos -> $técnico {     $ret-val ~= "{nome: $técnico.nome, genero: $técnico.gênero, idade: $técnico.idade, $técnico.rate },";   }
11:42 camelia rakudo-moar e9409c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$técnico' is not declared␤at <tmp>:1␤------> 3l = "{ tecnicos  [";   for @técnicos -> 7⏏5$técnico {     $ret-val ~= "{nome: $técn␤»
11:42 timotimo oh, that's interesting
11:42 timotimo m: sub ef8a4da32a-get-json is export {   my Str $ret-val = "{ tecnicos  [";   for @técnicos -> $técnico {     $ret-val ~= "{nome: $técnico.nome, genero: $técnico.gênero, idade: $técnico.idade, $técnico.rate },";   }
11:42 camelia rakudo-moar e9409c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$técnico' is not declared␤at <tmp>:1␤------> 3l = "{ tecnicos  [";   for @técnicos -> 7⏏5$técnico {     $ret-val ~= "{nome: $técn␤»
11:43 bioduds exactly
11:43 timotimo oh, hehe
11:43 timotimo easy peasy
11:43 bioduds should work, right?
11:43 timotimo m: sub ef8a4da32a-get-json is export {   my Str $ret-val = "\{ tecnicos  [";   for @técnicos -> $técnico {     $ret-val ~= "{nome: $técnico.nome, genero: $técnico.gênero, idade: $técnico.idade, $técnico.rate },";   }
11:43 camelia rakudo-moar e9409c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@técnicos' is not declared␤at <tmp>:1␤------> 3 Str $ret-val = "\{ tecnicos  [";   for 7⏏5@técnicos -> $técnico {     $ret-val ~= ␤»
11:43 timotimo m: sub ef8a4da32a-get-json is export {   my Str $ret-val = "\{ tecnicos  [";   for @técnicos -> $técnico {     $ret-val ~= "\{nome: $técnico.nome, genero: $técnico.gênero, idade: $técnico.idade, $técnico.rate },";   }
11:43 camelia rakudo-moar e9409c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@técnicos' is not declared␤at <tmp>:1␤------> 3 Str $ret-val = "\{ tecnicos  [";   for 7⏏5@técnicos -> $técnico {     $ret-val ~= ␤»
11:44 timotimo not as easy as i thought, obviously
11:44 timotimo m: sub ef8a4da32a-get-json is export {   my Str $ret-val = '{ tecnicos  [';   for @técnicos -> $técnico {     $ret-val ~= "\{nome: $técnico.nome, genero: $técnico.gênero, idade: $técnico.idade, $técnico.rate },";   }
11:44 camelia rakudo-moar e9409c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '@técnicos' is not declared␤at <tmp>:1␤------> 3y Str $ret-val = '{ tecnicos  [';   for 7⏏5@técnicos -> $técnico {     $ret-val ~= ␤»
11:44 timotimo oh, right
11:44 timotimo the error changed
11:44 Ven` joined #perl6
11:44 timotimo the problem was you were opening a { inside your string
11:44 timotimo that lets you put code in
11:44 timotimo so your "for @tecnicos -> $tecnico" was inside string quotes
11:44 timotimo the string quotes started by the " after the [
11:45 bioduds so i should escape { ?
11:45 timotimo basically you were writing $ret-val = "{ call sub tecnicos with array ["this is string: ; for @tecnicos -> $tecnico { ...
11:45 timotimo either escape the { or use '' (because '' won't interpolate)
11:46 bioduds ok, so rule of thumb in p6 should be start with single ' ?
11:46 timotimo you're free to do it whatever way you like
11:46 zengargoyle isn't there a qq:!e or similar to disable the {} in qq
11:46 timotimo correct
11:46 bioduds okeydokey
11:46 timotimo it's spelled :!c
11:46 timotimo for "no closures"
11:46 zengargoyle :)
11:46 bioduds works now
11:46 bioduds thanks a lot
11:47 timotimo m: say "test { say "hi" }"
11:47 camelia rakudo-moar e9409c: OUTPUT«hi␤test True␤»
11:47 timotimo m: say q:!c"test { say "hi" }"
11:47 camelia rakudo-moar e9409c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3say q:!c"test { say "7⏏5hi" }"␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement m…»
11:47 araujo__ joined #perl6
11:49 zengargoyle guess quotes don't nest...
11:50 psch m: say q:!c/test { say "hi" }/
11:50 camelia rakudo-moar e9409c: OUTPUT«test { say "hi" }␤»
11:50 timotimo can't, if you have the same delimiter character for start and end
11:50 timotimo m: say q:!c“test { say "hi" }”
11:50 camelia rakudo-moar e9409c: OUTPUT«test { say "hi" }␤»
11:50 timotimo m: say q:!c“test { say “hi” }”
11:50 camelia rakudo-moar e9409c: OUTPUT«test { say “hi” }␤»
11:50 timotimo ^- those do nest
11:53 zengargoyle m: say qq:!c“test { say "hi" }”
11:53 camelia rakudo-moar e9409c: OUTPUT«test { say "hi" }␤»
11:53 * zengargoyle muahahaha
11:53 timotimo what is muahaha about that?
11:54 * zengargoyle spent so much time figuring out how to type “ that i didn't see yours.
11:55 timotimo oh
11:55 timotimo for me, i have „“” for shift 8 9 0 and ‚‘’ for capslock 8 9 0
11:55 timotimo ⟨⟩₀ are shift + capslock + 8 9 0
11:57 timotimo m: say ⟨foobar⟩
11:57 camelia rakudo-moar e9409c: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at <tmp>:1␤------> 3say7⏏5 ⟨foobar⟩␤Bogus postfix␤at <tmp>:1␤------> 3say 7⏏5⟨foobar⟩␤    expecting any of:␤        infix␤        infix stopper␤        postf…»
11:57 zengargoyle you don't have *() for shift 890 ??
11:57 timotimo aaw
11:57 timotimo of course not
11:57 chris2 joined #perl6
11:57 timotimo those are capslock g j k
11:57 zengargoyle lol
11:58 timotimo of course when i press g j and k i really get o n and r
11:58 psch /o\
12:00 AlexDaniel hehe, well, “ is altgr + v for me. And AltGr is on the spacebar
12:00 timotimo *on* the spacebar?
12:00 timotimo that's interesting
12:00 AlexDaniel yes
12:00 AlexDaniel and v is of course dvorak v… ;)
12:00 timotimo where did you move the space key?
12:01 AlexDaniel timotimo: I moved it to 無変換
12:01 timotimo what :) :) :)
12:02 AlexDaniel timotimo: the key on the left of the spacebar: http://auctions.c.yimg.jp/images.auctions.yahoo.co.jp/image/ra120/users/9/9/9/2/cobanruby-img599x399-1469267289iaxcbz27972.jpg
12:02 timotimo cool
12:02 timotimo that's a really tiny spacebar
12:02 timotimo but that's normal in chinese-and-nearby areas?
12:02 zengargoyle hehe
12:03 AlexDaniel I have no idea. I live in Estonia
12:03 zengargoyle japanese
12:04 timotimo OK
12:04 AlexDaniel I just figured that the only way to get more thumb keys for a laptop keyboard is to get a japanese one
12:04 zengargoyle old language study partner swore by the thumb keys for conversions.
12:04 chris2 joined #perl6
12:04 timotimo mhm
12:05 * timotimo very good at distinguishing chinese and japanese, clearly
12:05 zengargoyle vs the many who actually use standard US type keyboards and IME
12:05 zengargoyle might be a generational thing.
12:06 AlexDaniel timotimo: by the way, altgr+.oeu (qwerty esdf) is what I use for arrow keys.
12:06 timotimo that's what i have, too
12:07 AlexDaniel nice
12:07 mcmillhj joined #perl6
12:07 timotimo and altgr uiojklm,. and space are 7894561230
12:08 AlexDaniel timotimo: ;{[?("|<“
12:08 AlexDaniel I figured that I use those more frequently than numbers :)
12:09 AlexDaniel (reaching for a number row is way too hard ;) )
12:09 timotimo and of course 90ßpö- are /*-+,;
12:09 timotimo and on n i have a : for those pesky ipv6 addresses
12:09 zengargoyle eek, you people are crazy. :)
12:10 timotimo sadly, though, no abcdef nearby, i have to drop the modifier for that first
12:10 * zengargoyle learned to touch type 30 years ago in HS and couldn't possibly do such remappings w/o going mad.
12:10 AlexDaniel yeah, I should make : more reachable
12:11 timotimo that's not "do remappings", that's just "setxkbmap de neo"
12:11 AlexDaniel (currently requires altgr+shift, which is fine because both are thumb buttons, but anyway)
12:11 * [Coke] yawns.
12:12 timotimo : is either capslock + ö or of course altgr + n
12:12 AlexDaniel zengargoyle: yeah, I don't think I can recommend all this stuff to anyone
12:12 AlexDaniel zengargoyle: it is just too much pain. You have to decide yourself if you really want to go through all of this
12:13 AlexDaniel in fact, neo is available on most systems. My custom layout is not, let alone japanese keyboards…
12:14 timotimo most systems ... unfortunately only on linuces
12:14 zengargoyle yeah, guess i'm US ASCII centric and only know bits about other keyboard layouts and difficulties charset and coding wise.
12:16 zengargoyle pretty much why i prefer compose for special chars vs trying to remember AltGr+Shift+key while standing on one leg to get funny characters.
12:16 rgrinberg joined #perl6
12:16 AlexDaniel zengargoyle: unless you use some character very often, which is why you might actually want to stand on one leg :)
12:17 timotimo i must admit it took me an extra long while to learn all the special char keys on the capslock key
12:17 timotimo and capslock + shift i haven't learned any :P
12:17 timotimo oh, wait, capslock + shift is easy. it's just greek
12:18 timotimo λολ τψατ ισ φννυ
12:18 zengargoyle and if my laptop actually had extra keys i might use them, but it's more like i'm missing keys than have any extra anywhere.
12:18 AlexDaniel zengargoyle: it's kinda other way round here. Once I moved everything to the middle of the keyboard, I no longer need most of the keys
12:18 zengargoyle so it's XCompose or totally different IM for stuff.
12:19 AlexDaniel I never liked them anyway, stretching my pinky to the side is not the most comfortable thing
12:19 zengargoyle get a smaller keyboard. ?P
12:19 geekosaur chord keyboard?
12:20 timotimo did you see https://www.youtube.com/watch?v=1H7JuYqfFAE ? hello world: a suite for visual studio in C# Minor
12:20 AlexDaniel lately I figured that japanese keyboards have another column of keys on the right. So you can move the whole right hand one key to the right and it will basically give you a column of keys in the middle of the keyboard
12:20 AlexDaniel poor man's ergonomic keyboard!
12:22 eliasr joined #perl6
12:22 pierre_ joined #perl6
12:24 AlexDaniel timotimo: yeah. It's cool but I'm not sure if it is useful. This, however, is potentially useful: https://www.youtube.com/watch?v=8SkdfdXWYaI
12:24 AlexDaniel like, for sure. If somebody cuts my hands off that's what I am going to do
12:24 timotimo YES.
12:24 timotimo do you remember the "mother of all demos" where this man demonstrates a lot of things and all the dumb audience noticed was the "mouse"?
12:25 gfldex m: sub f(:+@a){}; f(a => 1);
12:25 camelia rakudo-moar 73ae93: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub f(:7⏏5+@a){}; f(a => 1);␤»
12:25 AlexDaniel timotimo: huh? Not sure what are you referring to
12:25 bioduds weird behavior when I include my pm lib
12:26 bioduds if I put the code on the pl file, it prints to the stdout
12:26 timotimo https://www.youtube.com/watch?v=yJDv-zdhzMY
12:26 timotimo The Mother of All Demos, presented by Douglas Engelbart (1968)
12:26 bioduds if I use lib and use the pm file it does not
12:26 bioduds so I run on my shell it prints fine
12:26 bioduds if i call from an external source it does not
12:27 bioduds exactly the same code
12:27 timotimo precompilation
12:28 timotimo you will want to put all your code into subs and use those subs
12:28 timotimo rather than rely on the mainline of the module to be run
12:30 jkramer m: "\r\n\t".subst(/\r/, '\r', :g).subst(/\n/, '\n', :g).subst(/\t/, '\t', :g)
12:30 camelia rakudo-moar 73ae93: ( no output )
12:30 jkramer m: "\r\n\t".subst(/\r/, '\r', :g).subst(/\n/, '\n', :g).subst(/\t/, '\t', :g).say
12:30 camelia rakudo-moar 73ae93: OUTPUT«\n\t␤»
12:30 jkramer What's going on here?
12:31 bioduds timotimo : that answer was for me?
12:31 timotimo yes
12:31 bioduds oh ok
12:31 jkramer Ah, I guess those are not literal \r's
12:31 bioduds so, instead of putting an our var
12:31 bioduds on the pm
12:31 bioduds i must get the info from a sub that returns it?
12:31 geekosaur m: "\r\n".chars
12:31 camelia rakudo-moar 73ae93: ( no output )
12:31 timotimo oh, you just have a var that you're trying to read out?
12:32 geekosaur oops
12:32 geekosaur m: "\r\n".chars.say
12:32 timotimo my crystal ball did not tell me this
12:32 camelia rakudo-moar 73ae93: OUTPUT«1␤»
12:32 bioduds yes
12:32 geekosaur jkramer, I think \r\n gets turned into a synthetic newline which matches \n?
12:32 bioduds an our var
12:32 bioduds with export
12:32 AlexDaniel timotimo: 1968! Oh wow. No, I haven't seen that.
12:32 geekosaur (which is intended to try to make unix vs. windows newline conventions halfway sane/portable)
12:34 jkramer geekosaur: Hmm, tricky. So I guess I have to .encode the string and replace the bytes myself?
12:34 geekosaur m: "\r\n".NFD.chars.say
12:34 camelia rakudo-moar 73ae93: OUTPUT«Method 'chars' not found for invocant of class 'NFD'␤  in block <unit> at <tmp> line 1␤␤»
12:34 geekosaur bleh
12:35 moritz m: "\r\n".NFD.codes.day
12:35 camelia rakudo-moar 73ae93: OUTPUT«Method 'day' not found for invocant of class 'Int'␤  in block <unit> at <tmp> line 1␤␤»
12:35 timotimo you can sidestep the logical \r or \n by using \xASCIICODE
12:35 moritz m: "\r\n".NFD.codes.say
12:35 camelia rakudo-moar 73ae93: OUTPUT«2␤»
12:35 timotimo mostly needed for inside regexes, actually
12:35 zengargoyle on a decent day i typa about as fast as i can talk.  on a good day i type faster than i can think.
12:35 jkramer timotimo: Already tried that
12:35 timotimo no, wait, we do the translation at program boundaries, don't we?
12:35 bioduds nope
12:35 bioduds didnt work
12:35 jkramer m: "\r\n".subst(/\x0d/, '\r').subst(/\x0a/, '\n').encode.say
12:35 camelia rakudo-moar 73ae93: OUTPUT«utf8:0x<0d 0a>␤»
12:36 timotimo bioduds: it's quite difficult to help you with so little information about what you're doing, trying to do, what exactly is going wrong
12:36 bioduds let me try to explain
12:36 bioduds i have a pl file
12:36 AlexDaniel timotimo: nooo! Nooo! It cuts on 34:40
12:36 timotimo AlexDaniel: wow, you watched that half hour really fast
12:36 bioduds and a pm file
12:37 bioduds I'm including the pm file and it works fine
12:37 bioduds but
12:37 bioduds when I call it from an external program
12:37 bioduds it only shows the stdout if the code is inside the pl file
12:37 bioduds not if I put the code in the pm file
12:38 bioduds if i run perl6 get_data.pl
12:38 bioduds works fine
12:38 AlexDaniel timotimo: don't use use 2x speed on youtube for watching talks? :)
12:38 bioduds both with the code in the pm file and if I put in the pl file
12:38 AlexDaniel timotimo: but yeah, I've skipped some
12:38 bioduds but
12:38 bioduds when it is called from another program
12:38 bioduds that uses
12:38 moritz bioduds: did you put the code into a subroutine in the .pm file?
12:38 AlexDaniel don't you**
12:39 timotimo bioduds: could you instead of describing on IRC put the code and terminal output into a multi-file gist on gist.github.com ?
12:39 bioduds_ joined #perl6
12:39 bioduds_ that uses the /bin/sh -c perl6 get_data.pl
12:39 bioduds_ then it only works
12:39 bioduds_ if the code is inside the pl file
12:40 bioduds_ could you see what I mean?
12:40 bioduds_ I don't know why
12:40 bioduds_ it happens
12:40 moritz then show us the code!
12:40 bioduds_ would you like me to try to explain again?
12:40 bioduds_ sure
12:40 bioduds_ it is simple
12:41 timotimo put it into a multi-file gist please
12:41 bioduds_ in the pl file I have: #!/usr/bin/env perl6 use v6; use lib 'lib'; use ef8a4da32a;   say ef8a4da32a-get-json;
12:41 timotimo not just paste into irc
12:41 rurban joined #perl6
12:41 bioduds_ can you please point me that gist link again?
12:41 bioduds_ the one I used once in the past?
12:41 timotimo gist.github.com
12:42 timotimo let's see ...
12:42 timotimo no, i can not :(
12:44 bioduds_ https://gist.github.com/bioduds/994ab32212addb2da48de872226786ed
12:45 bioduds_ it works fine on command line called by me
12:45 bioduds_ but it only works getting called from another program if i put the code that is in the pm file in the pl file
12:46 bioduds_ I am not being able to figure out the reason
12:46 moritz that won't ever work
12:46 moritz because Technico has no method to-json
12:46 AlexDaniel timotimo: wait so, they are not going to talk about their chorded keyboard? Nooooooooooooooooooo…
12:47 timotimo that should work
12:47 zengargoyle when you call it from another program are you in the same directory as the file.
12:47 timotimo AlexDaniel: people didn't seem to take note of the chorded keyboard at all
12:49 bioduds_ when i call it from another program i am not
12:49 bioduds_ but it works if i get the code in pm file and put directly in the pl
12:49 itaipu joined #perl6
12:49 moritz m: say so Any.^can('to-json')
12:49 camelia rakudo-moar 73ae93: OUTPUT«False␤»
12:49 bioduds_ and remove use 'lib' and  use ef8a4da32a; of course
12:49 moritz bioduds_: where would that to-json method come from?
12:50 jkramer m: "foo\r\n\tbaz".encode>>.&{ { 13 => "\\r", 10 => "\\n", 9 => "\\t" }{$_} || $_.chr }.join.say
12:50 camelia rakudo-moar 73ae93: OUTPUT«foo\r\n\tbaz␤»
12:50 jkramer \o/
12:50 bioduds_ from use JSON::Class;
12:50 moritz oh, that does some weird magic?
12:50 moritz so, what exactly doesn't work?
12:51 moritz do you get an error?
12:51 bioduds_ no error
12:51 bioduds_ just stdout is empty
12:51 bioduds_ if I try using with code inside the pm
12:51 bioduds_ if I get the code in the pm and move to the pl
12:52 bioduds_ and remove use lib it works
12:52 moritz so if you add some debug output to the start of the sub, do you see that?
12:52 timotimo how are you calling your program?
12:52 bioduds_ yes I see
12:52 timotimo are you calling it in a way that'll actually let stdout output through?
12:52 timotimo like, if you start "echo 'hi there'" the same way, will 'hi there' show up?
12:52 bioduds_ it is called from Meteor Server it uses /bin/sh -c to run the command
12:53 bioduds_ var exec = Npm.require('child_process').exec;
12:53 bioduds_ exec('perl6 /home/ubuntu/dev/futs/scripts/get_data.pl', function( error, stdout, stderr ) {
12:53 bioduds_ this works, as I told you guys, if code is only in the pl file
12:53 timotimo ah
12:53 bioduds_ if I use 'lib' and put the code in the pm
12:53 bioduds_ it does not
12:54 bioduds_ altough
12:54 timotimo are you sure it's not crashing or erroring or something?
12:54 bioduds_ although it works if I run manually
12:54 bioduds_ sure not crashing
12:54 bioduds_ cause I run manually and runs fine
12:54 bioduds_ does the pm creates a new process?
12:54 bioduds_ or thread?
12:54 bioduds_ could that be it?
12:54 moritz it might, for precompilation
12:54 zengargoyle not sure what you're doing exactly by 'calling from another program' but works fine for me.
12:55 bioduds_ zengargoyle : works fine yes
12:55 bioduds_ but if I call from Meteor server, not
12:55 bioduds_ stdout is empty
12:55 bioduds_ but
12:55 moritz so either meteor doesn't like new processes, or some environment is different
12:55 bioduds_ if I put the code from the pm file directly in the pl file
12:55 bioduds_ then it works
12:56 moritz you've repeated that like 10 times already
12:56 bioduds_ it calls a child_process
12:56 bioduds_ sorry, just to make it clear
12:56 bioduds_ cause it is a little weird problem, right?
12:57 sufrostico joined #perl6
12:57 AlexDaniel timotimo: wow. Just wow. Thank you for this link
12:57 bioduds_ I guess modularity is of the table then here, right?
12:57 timotimo AlexDaniel: it's both greatly positive and greatly negative to watch, isn't it? :)
12:58 AlexDaniel timotimo: negative in what sense?
12:58 bioduds_ curiously, any libs from standard panda work
12:59 timotimo all those revolutionary concepts that were shown were promptly forgotten and "discovered" again much later
12:59 bioduds_ but the one on the use 'lib' does not
12:59 moritz bioduds_: because it's already precompiled
12:59 bioduds_ oh
12:59 bioduds_ I believe you solved it moritz
12:59 timotimo in some ways, the thing doug is working on is a bit more productive and useful than many things we have today
12:59 moritz bioduds_: does meteor call it as separate system user?
12:59 bioduds_ i believe not moritz
12:59 moritz bioduds_: don't just believe, verify :-)
13:00 bioduds_ but it looks like it will only listen to the child process it creates
13:00 bioduds_ and the pm as you wisely said
13:00 bioduds_ is not precompiled
13:00 bioduds_ it must run in another child process
13:00 AlexDaniel timotimo: nah, I find it motivational
13:00 bioduds_ let me try to investigate it
13:01 bioduds_ just one other thing before I do
13:01 timotimo OK
13:01 timotimo that's good, then :)
13:01 bioduds_ is it simple to have my lib pm precompiled?
13:01 timotimo bioduds_: could you try giving each individual line you send a bit more time & thought, so you're not sending 6 messages for every message other person sends?
13:03 bioduds_ sure, sorry. I'm very prolix
13:03 timotimo i have no idea what prolix means :)
13:03 bioduds_ wordy
13:04 wamba joined #perl6
13:04 timotimo wordy isn't so problematic, as long as you can keep yourself from hitting the enter key after five of 'em :)
13:04 bioduds_ :) ok
13:05 timotimo i may just be an old fart, but it would make me feel better. thanks!
13:07 zengargoyle i do not know what meteor server is...
13:07 yuhipno joined #perl6
13:08 moritz it's a piece of rock that glows while entering earth's athmosphere
13:08 timotimo last time i looked at meteor, it was made for HTTP long polling
13:08 skids joined #perl6
13:08 cdg joined #perl6
13:08 timotimo like, a way to send messages to browsers asynchronously to make stuff happen spontaneously when server state changes
13:09 timotimo since EventSource and websockets exist now, i'd bet that Meteor has pivoted and is now doing something very different
13:11 zengargoyle $ /bin/sh -c 'cd /home/zen/tmp/7fd613a8e70542099a88dd8ca0dc1683 && /opt/rakudobrew/bin/perl6 the.pl'
13:11 moritz back when I was a grumpy young man, pivots mostly came up in pivot tables
13:12 timotimo is that also what english people call those?
13:12 zengargoyle tots works for me...
13:12 bioduds_ timotimo : Meteor is a JS framework that uses js both on client and server
13:13 timotimo OK. i don't think node.js was already a thing when i last looked at meteor
13:13 bioduds_ on server-side it uses node.js
13:14 timotimo yeah. i'm saying node.js didn't exist when i last looked at meteor :)
13:14 bioduds_ oh lol
13:14 timotimo so clearly their project has pivoted in that way
13:14 zengargoyle bioduds_: you might want to make a test script that just dumps /usr/bin/env to a file in /tmp or something and check things out and work up to making the perl6 work.
13:14 timotimo or i am mis-remembering
13:14 jast timotimo: Meteor was first released in 2012. node.js was first released in 2009.
13:15 timotimo oh?
13:15 timotimo maybe i was thinking of a different "Meteor"
13:15 bioduds_ zengargoyle : tx, going to try yes
13:15 stmuk in the olde days we had meta refresh tags :)
13:15 zengargoyle have meteor run the script and run it manually yourself from where your .pl is and compare.
13:16 bioduds_ ok
13:17 bioduds_ premise is to have that "middle agent" from client to server extinguished, I believe
13:20 bioduds_ I can have big pl files for this project too, that shouldn't be a nuisance
13:21 * zengargoyle has totally had weird thing like this happen with cron etc.  make sure all your files like lib/.precomp have appropriate permissions (maybe meteor suid to nobody) and your umask is blocking somehting.
13:21 Actualeyes joined #perl6
13:21 bioduds_ Do you guys know Code Fights?
13:21 gfldex m: say so ().any;
13:21 camelia rakudo-moar fef365: OUTPUT«False␤»
13:21 gfldex is that by definition or do I just not see the logic?
13:21 zengargoyle does perl6 still do weird things requiring ~/.perl6 being available?
13:24 mspo caching bytecode?
13:26 masak bioduds_: rule #1 of Code Fights: you do not talk about Code Fights.
13:26 masak :P
13:27 bioduds_ lolololol
13:27 moritz gfldex: do any of the values in the list evaluate to a True value? No. Hence the answer
13:27 zengargoyle maybe, and if it does that it's going to break any posibility of running a p6 program from a user with no home to write to.
13:28 zengargoyle unless it fail gracefully...
13:29 moritz if not, that's what we have to implement
13:30 bioduds_ moritz : you wrote JSON::Tiny?
13:30 moritz bioduds_: yes
13:30 bioduds_ just panda install JSON:Tiny will do?
13:31 moritz you need a second colon
13:32 moritz otherwise, yes
13:33 bioduds_ :D
13:33 masak ::D
13:34 bioduds_ silly question: do I need to cd to the directory I installed perl6 to do panda install module?
13:34 moritz no
13:34 bioduds_ ok, tx
13:35 * masak .oO( <masak> mst: he meant "ta" )
13:35 timotimo i'm more of a rx person myself
13:35 ilmari timotimo: TMI
13:36 masak I like "pzh"
13:36 * perlpilot wonders who's handling flow control
13:37 zengargoyle Mr. S and Mr. Q
13:38 masak two very dependable gentlemen
13:39 dogbert17 o/ #perl6
13:40 zengargoyle namespace query.  module or two to a) keep track of Texas versions; b) converty Texas to various IME formats (XCompose, etc.)
13:40 dogbert17 do you think that this short gist does Range.reverse any justice? https://gist.github.com/dogbert17/1b7fcc19b265867739039aa0d18b2ef7
13:41 masak m: say "hello, dogbert1" ~ ("perl6" ~~ /\d/) + 1
13:41 camelia rakudo-moar fef365: OUTPUT«hello, dogbert17␤»
13:41 zengargoyle one to provide just a simple mapping of Texas -> Unicode with a few routines to extract.
13:41 * AlexDaniel wonders if someone can be rx or tx, what would it mean to be bidirectional
13:42 zengargoyle some other to use that one and generate Input Method tables for various Input Methods.
13:42 dogbert17 hello masak
13:42 MetaZoffix joined #perl6
13:42 perlpilot dogbert17: you might mention that in order to reverse the range, all elements must be generated.   (i.e.  say (5..Inf).reverse;  might take a while  ;-)
13:42 koo_ joined #perl6
13:43 bjz joined #perl6
13:43 dogbert17 m: say (5..Inf).reverse
13:43 camelia rakudo-moar fef365: OUTPUT«(Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf Inf…»
13:43 koo_ is perl compatible with everything php is?
13:43 masak seems legit.
13:43 perlpilot koo_: What does that even mean?
13:43 AlexDaniel benchable6: say (5..Inf).reverse.list # well, let's bench it
13:43 benchable6 AlexDaniel, starting to benchmark the 1 given commits
13:43 benchable6 AlexDaniel, ¦«say»:Cannot find this revision
13:43 AlexDaniel benchable6: releases say (5..Inf).reverse.list # well, let's bench it
13:43 benchable6 AlexDaniel, starting to benchmark the 11 given commits
13:43 AlexDaniel ;P
13:43 masak koo_: not when PHP does things that are very bad ;)
13:43 benchable6 AlexDaniel, benchmarked the given commits, now zooming in on performance differences
13:44 MetaZoffix heh
13:44 dogbert17 reversing an infinite Range doesn't seem overly useful
13:44 MetaZoffix We scared them off
13:44 perlpilot dogbert17: nope, but it's something that someone might accidentally do
13:45 vcv Maybe they were asking if Perl is compatible with all the issues on http://phpsadness.com/?
13:45 ilmari m: say (-Inf..5).reverse
13:45 camelia rakudo-moar fef365: OUTPUT«(...)␤»
13:45 ilmari m: say (-Inf..5).reverse.list
13:45 camelia rakudo-moar fef365: OUTPUT«(...)␤»
13:46 dalek doc: 1f7b1ee | coke++ | doc/Language/exceptions.pod6:
13:46 dalek doc: fix whitespace
13:46 dalek doc: review: https://github.com/perl6/doc/commit/1f7b1ee8da
13:46 MetaZoffix m: say (-Inf..5).reverse[1,2,3]
13:46 camelia rakudo-moar fef365: OUTPUT«(4 3 2)␤»
13:46 AlexDaniel benchable6: what's up??
13:46 benchable6 AlexDaniel, starting to benchmark the 1 given commits
13:46 benchable6 AlexDaniel, ¦«what's»:Cannot find this revision
13:46 AlexDaniel benchable6: releases say (5..Inf).reverse.list # well, let's bench it
13:46 benchable6 AlexDaniel, starting to benchmark the 11 given commits
13:46 bioduds_ what does the .perl thing mean??
13:47 [Coke] ideally, generate an EVAL'able bit of code that gets you the original object back.
13:47 MetaZoffix bioduds_: it serializes code. You can later EVAL that and get data back... More or less
13:47 MetaZoffix It's not fool-proof.
13:47 dogbert17 [Coke]: do you have a sec to take a look at https://github.com/perl6/doc/issues/791
13:47 benchable6 joined #perl6
13:47 AlexDaniel benchable6: releases say (5..Inf).reverse.list # well, let's bench it
13:47 benchable6 AlexDaniel, starting to benchmark the 11 given commits
13:47 bioduds_ so the opposite of .perl would be .EVAL?
13:47 MetaZoffix bioduds_: yeah
13:47 bioduds_ great
13:47 AlexDaniel bioduds_: … kinda
13:47 benchable6 AlexDaniel, benchmarked the given commits, now zooming in on performance differences
13:47 bioduds_ ok
13:47 MetaZoffix m: my $m = "foo" ~~ /(.)(.)?(.)/; use Test; is-deeply $m.perl.EVAL, $m
13:47 camelia rakudo-moar fef365: OUTPUT«not ok 1 - ␤␤# Failed test at <tmp> line 1␤# expected: Match.new(ast => Any, list => (Match.new(ast => Any, list => (), hash => Map.new(()), orig => "foo", to => 1, from => 0), Match.new(ast => Any, list => (), hash => Map.new(()), orig => "foo", to …»
13:48 MetaZoffix m: my $m = "foo" ~~ /.+/; use Test; is-deeply $m.perl.EVAL, $m
13:48 camelia rakudo-moar fef365: OUTPUT«ok 1 - ␤»
13:49 gfldex m: my &c = { say "called with $^a" }; say so 10 ~~ &c;
13:49 camelia rakudo-moar fef365: OUTPUT«called with 10␤True␤»
13:49 gfldex ~~ is really smart :)
13:51 moritz we don't call it dumbmatch for no reason!
13:54 perlpilot m: say ("f,,b,c,d".split: /","/, :k, :skip-empty).perl;
13:54 camelia rakudo-moar fef365: OUTPUT«("f", 0, 0, "b", 0, "c", 0, "d")␤»
13:56 perlpilot m: say ("f,,b,c,d".split: /","/, :v, :skip-empty);
13:56 camelia rakudo-moar fef365: OUTPUT«(f 「,」 「,」 b 「,」 c 「,」 d)␤»
13:56 perlpilot anyway ... someone might want to be sure that's the correct intent.
13:56 perlpilot Seems like a bug to me.
13:56 AlexDaniel committable6: releases say ("f,,b,c,d".split: /","/, :k, :skip-empty).perl;
13:56 perlpilot er, at least one bug
13:57 committable6 AlexDaniel, ¦«2015.10»: ("f", "", "b", "c", "d").Seq␤¦«2015.11,2015.12,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1,2016.08.1,HEAD»: ("f", 0, 0, "b", 0, "c", 0, "d")
13:57 MetaZoffix What's the bug? That :k/:kv get inserted for skipped items?
13:57 timotimo is skip-empty only about the first and last? that seems like a misnomer, then
13:57 AlexDaniel committable6: releases say ("f,,b,c,d".split: /","/, :v, :skip-empty);
13:57 perlpilot MetaZoffix: aye
13:57 committable6 AlexDaniel, ¦«2015.10»: (f  b c d)␤¦«2015.11,2015.12,2016.02,2016.03,2016.04,2016.05,2016.07.1,2016.08.1,HEAD»: (f 「,」 「,」 b 「,」 c 「,」 d)␤¦«2016.06»: ===SORRY!===␤While looking for 'ModuleLoader.moarvm': no such file or directory «exit code = 1»
13:57 timotimo oh, that was only one version in the middle there
13:57 bjz joined #perl6
13:57 timotimo that didn't have :k yet i'd think
13:57 AlexDaniel committable6: releases say ("f,,b,c,d".split: /","/, :v, :skip-empty);
13:57 committable6 AlexDaniel, ¦«2015.10»: (f  b c d)␤¦«2015.11,2015.12,2016.02,2016.03,2016.04,2016.05,2016.06,2016.07.1,2016.08.1,HEAD»: (f 「,」 「,」 b 「,」 c 「,」 d)
13:58 skids joined #perl6
13:59 dalek doc: b04cf9d | (Jan-Olof Hendig)++ | doc/Type/Range.pod6:
13:59 dalek doc: Added docs for Range.reverse. masak++, perlpilot++
13:59 dalek doc: review: https://github.com/perl6/doc/commit/b04cf9dff0
13:59 perlpilot MetaZoffix: also, from reading the docs, I'm not sure what :k really means.   The docs say "C<:k> interleaves the keys, that is, the indexes:"  ... indexes of what exactly?  If it's the "list that is interleaved with the non-matching parts" from the previous paragraph, then I don't understand the repeated zeroes
14:00 timotimo oh!
14:00 timotimo that only makes sense if you split with multiple strings
14:00 timotimo m: say "a b,c^d:e".split: [" ", ",", "^", "d"], :v
14:00 camelia rakudo-moar fef365: OUTPUT«(a   b , c ^  d :e)␤»
14:00 timotimo m: say "a b,c^d:e".split: [" ", ",", "^", "d"], :kv
14:00 camelia rakudo-moar fef365: OUTPUT«(a 0   b 1 , c 2 ^  3 d :e)␤»
14:00 timotimo so you can reconstruct which of the strings have been used for splitting
14:01 perlpilot aye. I guess that second thing is just a doc bug.
14:01 timotimo likely
14:02 AlexDaniel jnthn: by the way, things got significantly better with your latest moarvm fix. However, something is still wrong (as can be seen in committable responses above). So expect another ticket on a similar topic soon :)
14:04 jnthn AlexDaniel: OK :)
14:06 khw joined #perl6
14:09 ptolemarch joined #perl6
14:11 masak m: say "a b,c d,e".split: [" ", ",", "^", "d"], :kv
14:11 camelia rakudo-moar fef365: OUTPUT«(a 0   b 1 , c 0    3 d  1 , e)␤»
14:12 * masak has his false-positives paranoia satisfied -- for now
14:13 masak m: say "a:b::c".split: [":", "::"], :kv
14:13 camelia rakudo-moar fef365: OUTPUT«(a 0 : b 1 :: c)␤»
14:13 masak impressive. :)
14:13 MetaZoffix m: say "a:b:::c".split: [":", "::"], :kv
14:13 camelia rakudo-moar fef365: OUTPUT«(a 0 : b 1 ::  0 : c)␤»
14:13 MetaZoffix m: say "a:b::::c".split: [":", "::"], :kv
14:13 camelia rakudo-moar fef365: OUTPUT«(a 0 : b 1 ::  1 :: c)␤»
14:13 lizmat yeah, same position takes the longest  :-)
14:14 masak I like that. very consistent with, say, .trans
14:14 lizmat masak: I think .trans nowadays uses the .split internally
14:14 masak chalk it up as a "moment of charm" :) well done, someone
14:14 masak lizmat: ooh, interesting.
14:15 masak then it has changed quite a bit since I implemented it.
14:15 lizmat .trans is just splitting with .kv, replacing the keys and then joining again
14:15 lizmat (I think, from memory :-)
14:15 girafe joined #perl6
14:15 masak design-wise, that sounds good because that keeps the two methods consistent with each other
14:15 timotimo hopefully trans works from memory and not from hard drive :) :)
14:15 masak as seen above :)
14:18 MetaZoffix New blog post: "Perl 6 Core Hacking: Can Has Moar Cover?": http://perl6.party/post/Perl-6-Core-Hacking-Can-Has-Moar-Cover
14:20 masak MetaZoffix++ # a proliferation of bots, in the best of ways
14:22 lizmat MetaZoffix++
14:24 rgrinberg joined #perl6
14:26 bioduds_ how can I print an array separated by comma?
14:27 DrForr m: say <foo bar>.join(',')
14:27 camelia rakudo-moar fef365: OUTPUT«foo,bar␤»
14:28 bioduds_ wow, so simple. I hope these simple things get simple to me as well as I advance. Tx, DrForr!
14:28 MetaZoffix :)
14:29 hoelzro joined #perl6
14:33 mr-foobar joined #perl6
14:37 DrForr No worries.
14:41 stmuk is there a list of zoffix bots? I'm losing track
14:41 stmuk maybe there needs to be a meta overload bot
14:41 stmuk overlord *
14:42 cibs joined #perl6
14:43 pierre_ joined #perl6
14:45 El_Che stmuk: maybe Zoffix is himself a bot.
14:45 a3r0 joined #perl6
14:47 stmuk who herds the bot herder?
14:52 ilmari Zoffix is a bot, MetaZoffix is the herder?
14:52 ilmari but is MetaZoffix also a bot?
14:54 tushar_ joined #perl6
14:58 wamba joined #perl6
15:04 AlexDaniel if it does not have a fixed nickname it is probably a bot
15:10 bpmedley joined #perl6
15:12 grondilu joined #perl6
15:14 matt_ joined #perl6
15:16 inkog joined #perl6
15:25 tushar joined #perl6
15:28 ggoebel joined #perl6
15:28 mohae joined #perl6
15:29 MorayJ joined #perl6
15:31 rurban joined #perl6
15:37 robertle joined #perl6
15:38 gregf_ joined #perl6
15:41 cdg joined #perl6
15:42 inco6 joined #perl6
15:48 Nex6 joined #perl6
15:55 harmil_wk AlexDaniel: also if it replies late and claims not to be a bot, it's probably a bot. But I'm not.
15:55 Kolin_ joined #perl6
15:55 AlexDaniel harmil_wk: yeah. Sure.
15:59 Kolin_ Zoffix is definitely a bot. Just ask him if he follows the laws of robotics
16:00 brrt joined #perl6
16:12 bioduds_ good thing I'm being able to use unicode code in javascript
16:15 wamba joined #perl6
16:15 bioduds_ this works: this.genero_do_tecnico.set( sjson.ef8a4da32a[0].gênero );
16:15 bioduds_ :)
16:16 RabidGravy ah hah!
16:17 RabidGravy bioduds_, your issue on JSON::Marshal - I can't replicate
16:17 bioduds_ really?
16:17 bioduds_ do you have perhaps an idea what might happened?
16:17 RabidGravy well apart from the missing "use JSON::Class;" I haven't the faintest idea
16:18 bioduds_ but don't worry, I have solved with another approach
16:18 bioduds_ lol, don't worry, I thank you for the caring :D
16:26 RabidGravy I would say that there is a chance that it's the 2016-07 that's the problem however I've tested the module with every month's rakudo whether I've changed it or not
16:27 Kolin_ 2016.07 was broken, use 2016.07.1
16:29 RabidGravy I would suggest golfing that code down to see if it fails without using the JSON::Marshal
16:32 Actualeyes1 joined #perl6
16:32 mcmillhj joined #perl6
16:40 domidumont joined #perl6
16:45 mcmillhj joined #perl6
16:47 AlexDaniel star: say (<a b c>, (<a b c>))
16:47 camelia star-m 2016.04: OUTPUT«((a b c) (a b c))␤»
16:47 AlexDaniel m: say (<a b c>, (<a b c>))
16:47 camelia rakudo-moar fef365: OUTPUT«((a b c) (a b c))␤»
16:55 _slade_ joined #perl6
16:56 tushar joined #perl6
17:05 AndyBotwin joined #perl6
17:13 firstdayonthejob joined #perl6
17:20 incog joined #perl6
17:33 mcmillhj joined #perl6
17:47 tushar joined #perl6
17:47 setty1 joined #perl6
17:52 brrt joined #perl6
17:52 mcmillhj joined #perl6
17:53 chris2 joined #perl6
17:53 Praise joined #perl6
17:58 inco6 joined #perl6
18:00 mcmillhj joined #perl6
18:02 Ven` joined #perl6
18:02 bioduds_ is there include or require in perl6? somewhat like php?
18:02 incog joined #perl6
18:05 wamba joined #perl6
18:05 mst bioduds_: https://docs.perl6.org/language/modules
18:06 bioduds_ mst : tx. im actually running from the module since it wont run like I need now
18:07 mst bioduds_: what
18:07 bioduds_ but there may be a way to do it that will work for me
18:09 timotimo there is nothing that includes another file's source so the parser eats it as if the code had been copy-pasted
18:09 timotimo but EVALFILE exists, if i remember correctly
18:11 mst right, but you should never do that anyway
18:11 mst PHP's include() exists as an artifact of it originally being a malignant perl templating system that metastasised
18:12 inco6 joined #perl6
18:12 inco6 joined #perl6
18:15 zacts joined #perl6
18:22 edegard joined #perl6
18:23 rgrinberg joined #perl6
18:23 edegard hey
18:23 edegard wassup
18:24 DrForr Not much, working on Perl6::Tidy, straightening sheets on a proverbial waterbed.
18:29 lostinfog joined #perl6
18:43 zacts hi perl6 nerds
18:45 espadrine joined #perl6
18:46 timotimo hello zacts
18:47 AlexDaniel was it a compliment?
18:49 timotimo could be
18:50 AlexDaniel .oO( maybe I should have got used to that http://irclog.perlgeek.de/perl6/search/?nick=&amp;q=%22perl6+nerds%22 )
18:51 mst why would it be anything else?
18:52 girafe joined #perl6
18:53 cpage_ joined #perl6
19:00 pierre_ joined #perl6
19:06 zacts it was indeed a compliment
19:06 zacts the reason I use nerd instead of geek is because of the etymology of those words
19:06 zacts nerd's etymology is cooler than geek
19:07 zacts nerd was coined by Dr. Seuss in his 1950s book If I Ran the Zoo
19:07 zacts geek has an etymology of something like 'a fool'
19:07 zacts nerd was a character of his book iirc
19:07 zacts so I tend to use nerd as the cooler more positive word
19:08 zacts wikipedia mentions this, but I have actually personally researched this myself and have read If I Ran the Zoo
19:08 zacts Dr. Seuss > Ancient Attic Greek / Plato in this case
19:08 zacts :-)
19:09 dalek doc: 2061fa7 | (Jan-Olof Hendig)++ | doc/Type/Range.pod6:
19:09 dalek doc: Added code examples to a few methods
19:09 dalek doc: review: https://github.com/perl6/doc/commit/2061fa71ae
19:09 zacts (Ancient Greek / Plato's language) <-- I meant to phrase it like this
19:09 zacts bbl
19:12 kerframil joined #perl6
19:15 rurban joined #perl6
19:16 acrussell joined #perl6
19:22 rgrinberg joined #perl6
19:24 sufrostico joined #perl6
19:26 itaipu joined #perl6
20:13 zakharyas joined #perl6
20:27 cdg joined #perl6
20:38 mcmillhj joined #perl6
20:39 Ed joined #perl6
20:40 Guest7645 Trying to run: http://rosettacode.org/wiki/Compiler/lexical_analyzer#Perl_6
20:41 Guest7645 But get: Method 'lines' not found for invocant of class 'Any'   in sub parse_it at l.perl line 76   in block <unit> at l.perl line 88
20:41 Guest7645 Tried with: This is Rakudo version 2016.07.1 built on MoarVM version 2016.07 implementing Perl 6.c.
20:41 Guest7645 And: This is Rakudo version 2016.09 built on MoarVM version 2016.09 implementing Perl 6.c.
20:43 Guest7645 I'm a Perl newbie, and have little idea what the problem is.
20:43 lizmat Guest7645: looks to me the tiny_C.parse failed to produce a Match ?
20:43 lizmat and that gets past on to the tokenizer, which then calls .lines on an Any
20:44 Guest7645 It is as simple as that?  And I think you are correct - thanks!
20:44 Guest7645 I tried with input of just "foobar", and that works correctly.
20:44 lizmat *passed
20:44 lizmat :-)
20:44 Guest7645 I guess I was expecting a different error message.  Thanks for the help!
20:46 lizmat there's a Grammar::Tracer and Grammar::Debugger in the ecosystem, it should allow you to find out where a parse failed
20:47 masak soft failures can sometimes lead to Less-Than-Awesome error messages
20:48 masak I wonder what the extreme point of providing an Awesome error message would be on this one... :)
20:48 masak "Oops! Looks like when you called .parse and got an undefined result back, your code assumed that you'd always get a Match back! Time to review that assumption."
20:52 lizmat well, it would be nice if it returned a Failure that could tell where the parse went wrong, no ?
20:53 masak "where the parse went wrong" is not so easy -- I'd love to be wrong about that, though :)
20:53 masak sometimes backtracking is healthy and expected; sometimes not
20:57 mcmillhj joined #perl6
21:01 nadim_ joined #perl6
21:03 cpage_ joined #perl6
21:08 DarthGandalf joined #perl6
21:19 xiaomiao joined #perl6
21:22 telex joined #perl6
21:36 canopus joined #perl6
21:38 kerframil joined #perl6
21:38 espadrine joined #perl6
21:38 wamba joined #perl6
21:38 ggoebel joined #perl6
21:38 AlexDaniel joined #perl6
21:38 Matthew[m] joined #perl6
21:38 damnlie joined #perl6
21:38 jsimonet joined #perl6
21:38 KotH joined #perl6
21:38 djbkd joined #perl6
21:38 cpage joined #perl6
21:38 PerlJam joined #perl6
21:38 PotatoGim joined #perl6
21:38 mrsolo joined #perl6
21:38 stmuk joined #perl6
21:38 albongo joined #perl6
21:38 avalenn joined #perl6
21:38 Peter_R joined #perl6
21:38 BinGOs joined #perl6
21:38 w4and0er96 joined #perl6
21:38 Celelibi joined #perl6
21:38 Spot__ joined #perl6
21:38 isacloud joined #perl6
21:38 cosimo joined #perl6
21:38 gensym joined #perl6
21:38 arnsholt joined #perl6
21:38 revdiablo joined #perl6
21:38 richi235 joined #perl6
21:38 dj_goku joined #perl6
21:38 edenc joined #perl6
21:38 mspo joined #perl6
21:38 gabiruh joined #perl6
21:38 DrParis joined #perl6
21:38 krunen_ joined #perl6
21:38 atacama_ joined #perl6
21:38 raydiak joined #perl6
21:38 erdic joined #perl6
21:38 [Coke] joined #perl6
21:38 bioduds_ this here is freakingawesome! subset RateTécnico where (0.0..5.0)|"-";
21:39 bioduds_ a mixed type!!!
21:39 bioduds_ perl6 is (not) 2 cool 2 b true
21:40 DarthGandalf joined #perl6
21:40 chris2 joined #perl6
21:40 setty1 joined #perl6
21:40 AndyBotwin joined #perl6
21:40 _slade_ joined #perl6
21:40 bpmedley joined #perl6
21:40 vcv joined #perl6
21:40 [particle] joined #perl6
21:40 camelia joined #perl6
21:40 bartolin joined #perl6
21:40 buggable joined #perl6
21:40 TimToady joined #perl6
21:40 huggable joined #perl6
21:40 dylanwh joined #perl6
21:40 rcy joined #perl6
21:40 NeuralAnomaly joined #perl6
21:40 ft joined #perl6
21:40 ambs joined #perl6
21:40 rjbs joined #perl6
21:40 Timbus joined #perl6
21:40 olinkl joined #perl6
21:40 vytas joined #perl6
21:40 Hotkeys joined #perl6
21:40 remmie joined #perl6
21:40 inokenty joined #perl6
21:40 synopsebot6 joined #perl6
21:40 garu_ joined #perl6
21:40 jnthn joined #perl6
21:40 SourceBaby joined #perl6
21:40 masak joined #perl6
21:40 ssm joined #perl6
21:40 mst joined #perl6
21:40 dsp_ joined #perl6
21:40 mls joined #perl6
21:40 jcallen joined #perl6
21:40 tailgate joined #perl6
21:40 konobi joined #perl6
21:40 zengargoyle joined #perl6
21:40 nemo joined #perl6
21:40 obfusk joined #perl6
21:40 k-man joined #perl6
21:41 cibs joined #perl6
21:41 geraud joined #perl6
21:41 canopus joined #perl6
21:41 sufrostico joined #perl6
21:41 lostinfog joined #perl6
21:41 firstdayonthejob joined #perl6
21:41 rindolf joined #perl6
21:41 aindilis` joined #perl6
21:41 MilkmanDan joined #perl6
21:41 zoosha joined #perl6
21:41 notbenh joined #perl6
21:41 cgfbee joined #perl6
21:41 infina joined #perl6
21:42 brrt joined #perl6
21:42 pierrot joined #perl6
21:42 flexibeast joined #perl6
21:42 decent joined #perl6
21:42 sftp joined #perl6
21:42 Upasaka joined #perl6
21:42 perigrin joined #perl6
21:42 Jonis joined #perl6
21:42 simcop2387 joined #perl6
21:42 krunen joined #perl6
21:42 pochi_ joined #perl6
21:42 chee joined #perl6
21:42 sergot joined #perl6
21:42 zhmylove_ joined #perl6
21:42 m0ltar joined #perl6
21:42 emdashcomma joined #perl6
21:42 tinita joined #perl6
21:42 mattp_ joined #perl6
21:42 ingy joined #perl6
21:42 Grrrr joined #perl6
21:42 tony-o joined #perl6
21:45 john51 joined #perl6
21:46 cgfbee joined #perl6
21:50 timeless joined #perl6
21:52 ggherdov joined #perl6
21:56 peteretep joined #perl6
22:01 olinkl joined #perl6
22:05 eliasr joined #perl6
22:06 PotatoGim joined #perl6
22:08 Spot__ joined #perl6
22:16 mrsolo joined #perl6
22:17 BuildTheRobots joined #perl6
22:19 labster joined #perl6
22:22 nadim_ joined #perl6
22:29 cdg joined #perl6
22:31 cpage_ joined #perl6
22:49 Zoffix joined #perl6
22:49 Zoffix using failures in boolean context disarms them, but is there a similarly easy way to explode them?
22:49 Zoffix m: $ = 0 + sub { fail }(); # This is the best I know of, but I don't want to assume that I can do a mathy operator on the return value
22:49 camelia rakudo-moar 553ced: OUTPUT«Failed␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
22:50 cpage_ joined #perl6
22:53 timotimo try .sink?
22:53 Zoffix m: sub { fail }().sink
22:53 camelia rakudo-moar 553ced: OUTPUT«Failed␤  in sub  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
22:53 Zoffix Thanks, timotimo++
22:53 Zoffix m: sub { 4 }().sink
22:53 camelia rakudo-moar 553ced: ( no output )
22:53 Zoffix Great.
22:58 tushar joined #perl6
23:03 timotimo Zoffix: have you tried sending the data from moarvm --dump through a grep to make parsing the annotations file faster?
23:03 skids joined #perl6
23:07 Zoffix timotimo, no. What would I be grepping for?
23:11 MorayJ joined #perl6
23:12 Sgeo joined #perl6
23:13 tushar Yesterday, I had asked question about field-separator such as comma, tab or space. Unfortunately, I went to bed and missed the responses.
23:14 tushar How can I detect them? Is there any special variable such as "$/ "and "$, " in Perl 6? I am aware that not all the Perl 5 special variable is available in Perl 6.
23:14 tushar Can someone also provide example for "nl-in" and "nl-out"? Thanks.
23:15 grondilu tushar: not sure but I think it's best you provide your own character class.
23:16 grondilu m: my $FS = /<[ ,: ]>/; say "foo, bar: see?".split: $FS;
23:16 camelia rakudo-moar 553ced: OUTPUT«(foo  bar  see?)␤»
23:16 tushar grondilu: can you please provide me an example?
23:16 tushar grondilu: Thanks.
23:17 sufrostico joined #perl6
23:17 timotimo Zoffix: https://github.com/MoarVM/MoarVM/blob/line_based_coverage_4/tools/parse_coverage_report.p6#L13
23:18 grondilu if I'm not mistaken, $, in Perl 5 was designed more or less for AWK-like behavior.  Perl 6 does not need that jargon, IIUC
23:18 timotimo Zoffix: actually, the format is so fixed that this could be done completely without regex, so it'd be at least 100x faster anyway
23:19 timotimo Zoffix: i didn't have the motivation yet to do a performance pass over that script, apart from multithreading it
23:22 cdg_ joined #perl6
23:25 timotimo and unfortunately multithreading a script makes it unprofilable at the moment ...
23:25 Zoffix really?
23:29 timotimo yes, the profiler doesn't handle multiple threads yet
23:30 timotimo it either crashes or it gives you a random thread's routines
23:36 [particle] joined #perl6
23:41 Zoffix left #perl6
23:51 SourceBaby joined #perl6
23:53 Undercover joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo