»ö« 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:11 Guest39821 is now known as nemo 00:14 nadim left 00:21 pierre_ joined 00:22 pierre_ left, pierre_ joined 00:25 dataange` left 00:26 dataangel joined 00:55 b2gills left 01:04 _sfiguser left 01:07 Actualeyes joined 01:13 b2gills joined, eliasr left 01:17 _sfiguser joined 01:18 b2gills left 01:24 pierre_ left 01:25 doc_ joined, doc_ left
tushar can i read input file here on irc channel using "m:"? 01:28
geekosaur not in general. there's usually some kind of (usually unicode-y) text file on $*IN though 01:29
01:30 BenGoldberg joined, pierre_ joined
tushar geekosaur: thanks. 01:30
m: $*IN.nl-in.say; 01:31
camelia rakudo-moar 3789a0: OUTPUT«[␤
tushar can i set "nl-out" or "nl-in"? 01:34
01:35 pierre_ left 01:39 fulaiche88 joined, pullphinger left
tushar Is there any special variable or method that can identify the field separator of a file? 01:39
01:44 pierre_ joined 01:46 ilbot3 left 01:47 ilbot3 joined 01:48 raiph joined 01:49 MasterDuke joined 01:55 b2gills joined 02:01 sufrostico left 02:02 lue joined 02:04 ShimmerFairy left, lue is now known as ShimmerFairy
AlexDaniel tushar: what's a field separator of a file? 02:05
tushar AlexDaniel: tab separator or comma separator. It's like field separator in Sed. 02:08
AlexDaniel umm… if $line ~~ /‘;’/ { … } elsif $line ~~ /\t/ { … } ? 02:09
it's hard for me to see how should it decide if it's one or another :) 02:10
especially if the line contains both
committable6: stdin websitetips.com/articles/copy/lorem/ipsum.txt 02:11
committable6 AlexDaniel, Successfully fetched the code from the provided URL.
AlexDaniel, gist.github.com/15e332d3fd7bb9c084...dbd2103fd0
AlexDaniel well, this response is LTA
02:11 BenGoldberg left
AlexDaniel committable6: say lines[0] 02:11
committable6 AlexDaniel, ¦«say»: Cannot find this revision
AlexDaniel committable6: HEAD say lines[0]
committable6 AlexDaniel, gist.github.com/c0c06fd17cbcf7e22d...0aad936484
AlexDaniel committable6: HEAD say lines[0].split(‘ ’)[0] 02:12
committable6 AlexDaniel, ¦«HEAD»: Lorem
MasterDuke you should be able to set nl-in
AlexDaniel so yeah, you can use custom STDIN if you use committable. Still can't read a file though
MasterDuke e.g., $filename.IO.lines(:nl-in("\r\n")).elems 02:13
02:14 noganex joined
MasterDuke docs.perl6.org/language/5to6-perlv...ilehandles 02:14
02:16 pierre_ left 02:17 noganex_ left 02:19 pierre_ joined 02:25 ka left 02:31 committable6 left 02:32 committable6 joined 02:33 committable6 left, committable6 joined, bisectable6 left 02:34 bisectable6 joined, bisectable6 left, bisectable6 joined 02:36 bisectable6 left 02:37 bisectable6 joined 02:43 skids joined
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
Xliff_ Is there an easy way to list the roles supported by an object? 02:54
02:54 wamba joined 03:00 fulaiche88 left 03:01 tushar left 03:02 cpage_ left 03:04 ka joined 03:09 AndyBotwin joined
skids m: "foo".^roles.say 03:09
camelia rakudo-moar 3789a0: OUTPUT«((Stringy))␤»
03:11 Actualeyes left 03:12 pierre_ left
skids m: class A { }; class B is A { }; A.^parents.say # ?? 03:16
camelia rakudo-moar 3789a0: OUTPUT«()␤»
03:16 cooper_ is now known as cooper
skids star: class A { }; class B is A { }; A.^parents.say # ?? 03:16
camelia star-m 2016.04: OUTPUT«()␤»
skids oh. duh 03:17
m: class A { }; class B is A { }; B.^parents.say
camelia rakudo-moar 3789a0: OUTPUT«((A))␤»
skids m: class A { }; class B is A { }; B.^parents(:all).say
camelia rakudo-moar 3789a0: OUTPUT«((A) (Any) (Mu))␤»
03:18 pierre_ joined 03:24 _sfiguser left 03:36 pierre_ left, ka left 03:37 pierre_ joined 03:52 wamba left 03:54 skids left 03:55 rindolf left 04:00 rindolf joined
dalek ateverable: d3a3e58 | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (2 files):
Remove transitional support for older builds

This code is not needed anymore.
04:07
ateverable: 6b4d623 | (Aleks-Daniel Jakimenko-Aleksejev)++ | README.md:
Less README, more wiki!

Editing documentation with git commits is daunting.
04:15 cpage_ joined 04:21 _slade_ joined 04:31 ugexe left 04:33 khw left, AlexDaniel left 04:34 kerframil left 04:41 dayangkun joined 04:42 MasterDuke left 04:44 pierrot left, cbk_ joined, cbk_ left 04:47 cbk_ joined 04:48 Actualeyes joined, Cabanossi left 04:49 pierrot joined 04:52 Cabanossi joined 04:54 cbk_ left 04:57 ugexe joined 04:58 pierre_ left 04:59 pierre_ joined 05:00 rurban joined, rurban left 05:04 pierre_ left 05:08 dayangkun left 05:10 araujo joined, araujo left, araujo joined 05:11 wamba joined 05:15 cbk_ joined, cbk_ left 05:19 cbk_ joined 05:22 wamba left 05:23 ugexe left, wamba joined 05:36 domidumont joined 05:38 ugexe joined 05:41 skids joined, domidumont left 05:42 domidumont joined 05:44 wamba left, Nex6 joined
Nex6 question this line: 05:45
my $results = run 'ping', '-c', '1', ' ' $line :out;
throws this error
===SORRY!=== Error while compiling /Users/zero/Perl6_Projects/pingsweep/./pingsweep.pl
Two terms in a row
geekosaur that syntax looks wrong, yes 05:46
Nex6 it worked on Linux, now i am running the script on OS X and it throws error? 05:47
geekosaur not like that it didn't, because ' ' $line is invalid 05:48
:out($line) perhaps?
Nex6 i moved the $line from beginning
05:48 ufobat joined
geekosaur although that still wouldn't be right because $line would get a filehandle 05:48
what was the original command? 05:49
Nex6 for 'hostfile.txt' .IO.lines -> $line {
its in a for loop 05:50
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:51
hm, parens are not needed for that run, I was starting to type something else that wouldn't have worked 05:52
my $proc = run 'ping', '-c', '1', :out; for $proc.out.lines -> $line {
05:53 cdc left 05:55 araujo left 06:00 pierre_ joined 06:02 nadim joined, skids left 06:05 pierre_ left, bob777 left, bob777 joined 06:07 araujo joined 06:08 Nex6 left 06:09 araujo left, araujo joined 06:12 domidumont left 06:13 firstdayonthejob joined 06:21 darutoko joined 06:31 pierre_ joined, wamba joined 06:41 pierre_ left 06:42 pierre_ joined 06:43 domidumont joined 06:46 firstdayonthejob left
zengargoyle is there a .trans like thing that does 'from' => 'to', 'from1' => 'to1' instead of [«from from1»]=>[«to to1»] ?? 06:46
06:46 Actualeyes left, wamba left 06:49 rurban joined
zengargoyle or some simple magic transformation incantation to make the former into the latter? 06:50
zengargoyle thinks "transformation incantation" will be a handy p6 term.... 06:51
06:55 dayangkun joined 06:58 Actualeyes joined 07:04 dayangkun left 07:07 Glitchy left 07:10 dayangkun joined, dayangkun left 07:11 araujo_ joined 07:12 pierre_ left, pierre_ joined 07:13 perlawhirl joined
perlawhirl zengargoyle: why not subst (or s///) 07:13
m: 'test from test from1 from3'.subst('from', 'to', :g) 07:14
camelia ( no output )
perlawhirl m: say 'test from test from1 from3'.subst('from', 'to', :g)
camelia rakudo-moar 3789a0: OUTPUT«test to test to1 to3␤»
07:15 araujo left 07:19 matt_ joined
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:19
07:20 matt_ is now known as Guest72890, Guest72890 is now known as matt_, cbk_ left
zengargoyle and that's an easier format to maintain than [A,C,E,G]->[B,D,F,H] 07:20
perlawhirl *shrug*... put them in a hash and loop over them... for %from-to.kv -> $from, $to { $string .= subst($from, $to, :g) } 07:24
07:24 espadrine joined, CIAvash joined 07:25 holyghost joined
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:26
07:28 RabidGravy joined
perlawhirl you can define 2 ordered lists if that's nicer to maintain... .trans( @from => @t ) 07:32
07:33 zakharyas joined
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:34 araujo_ left
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:35
07:36 rurban left
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]␤»
zengargoyle i want to have one list of x=>y and add more x=>y to that list.
raydiak: yeah, but i was hoping for not having an intermediate variable. :P
i.e. for one-liner usage scenario. 07:37
07:38 perlawhirl left
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)␤»
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?
zengargoyle :P
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
raydiak at first glance looks like a mess that ought to be facotred into something readable to me
o/ masak
07:42 El_Che left
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
07:43 El_Che joined
zengargoyle that takes the list of char,codepoint,texas-symbol cut from the docs and turns it into a .XCompose file. 07:43
the only part of that that was even a tiny PITA was the .trans.... 07:46
lizmat zengargoyle: perhaps link to it from the doc ? 07:48
zengargoyle lizmat: link to what?
lizmat a downloadable copy of the .XCompose file ? 07:49
:-)
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
07:51 araujo_ joined
zengargoyle i wish there was a way to get the mappings from *within* p6 somehow vs keeping a list somewhere. 07:51
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
not sure we want to carry that around all the time 07:53
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?
camelia rakudo-moar 3789a0: OUTPUT«((a b c) (1 2 3))␤»
07:57 _slade_ left 08:00 holyghost left 08:01 pierre_ left 08:02 rurban joined 08:03 bpmedley left
zengargoyle m: sub (*@a) { [@a>>.key]=>[@a>>.value] }((a=>'b',c=>'d')) 08:03
camelia ( no output )
zengargoyle m: say sub (*@a) { [@a>>.key]=>[@a>>.value] }((a=>'b',c=>'d'))
camelia rakudo-moar 3789a0: OUTPUT«[a c] => [b d]␤»
08:05 woolfy left 08:07 woolfy joined, Actualeyes left
zengargoyle m: {[@^a».key]=>[@^a».value]}((a=>'b',c=>'d')) 08:07
camelia ( no output )
08:07 Actualeyes joined
zengargoyle m: say {[@^a».key]=>[@^a».value]}((a=>'b',c=>'d')) 08:07
camelia rakudo-moar 3789a0: OUTPUT«[a c] => [b d]␤»
08:08 mr-foobar left 08:09 mr-foobar joined, pierre_ joined 08:12 woolfy left 08:15 dakkar joined, woolfy joined
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 08:32 bjz joined 08:37 espadrine left 08:42 Ven` joined 08:46 wamba joined 08:50 Actualeyes left 08:53 wamba left
masak m: say {[@^a».key]=>[@^a».value]}([a=>'b',c=>'d']) 08:56
camelia rakudo-moar e9409c: OUTPUT«[a c] => [b d]␤»
masak zengargoyle: when you put something like `a => 'b'` *directly* in an argument list, it's interpreted as a named parameter. 08:57
(this feature goes under the name of "ShimmerFairy's Objection") :P
09:02 Ven` left 09:13 Ven` joined 09:16 pierre_ left 09:18 Ven` left 09:20 pierre_ joined
zengargoyle masak: i sorta knew it wouldn't work without something around the pairs, and why ... just thought *maybe* blocks might be different. 09:24
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:26
09:28 canopus left 09:30 araujo_ left 09:33 kerframil joined, kerframil left 09:34 canopus joined 09:43 araujo_ joined
zengargoyle slaps self for not guessing ibus-daemon needs restarting after changing XCompose file. 10:00
10:04 Woodi left, Woodi joined
zengargoyle but can now type Compose-!(elem) and get ∉ in new xterms 10:04
10:06 llamatarianism joined 10:09 bjz left 10:10 pyrimidi_ joined, bjz joined
DrForr +1 10:10
10:12 pyrimidine left 10:13 Hor|zon left, nowan joined, scott joined 10:15 nowan_ left 10:16 kaare_ joined 10:31 jmark joined 10:32 brrt joined
lizmat masak: ShimmerFairy is not alone in doubts about that feature 10:42
10:46 zengargoyle left 10:47 zengargoyle joined
moritz what would be the alternative? only parse colonpairs as named args? 10:48
10:49 labster left
gfldex loliblogedagain: gfldex.wordpress.com/2016/09/22/ke...-optional/ 10:49
llamatarianism hey 10:52
new to perl; I've got a question about roles 10:53
I know you can do `role Foo[::Bar] { ... }`
is it possible to do something like `role Foo[::Bar is Baz]` or `role Foo[::Bar does Baz]`?
so that I can make a `Foo` of anything that is/does `Baz`, but not any old type 10:54
10:54 cog_ joined
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] {}␤»
gfldex llamatarianism: ^^^ NYI
llamatarianism gfldex: cool! thanks a lot :) 10:56
10:56 pmurias joined, cognominal left
gfldex llamatarianism: however, I would goess you could do that with MOP already 10:56
psch m: role R[Positional] { }; R[Array].new
camelia ( no output )
psch m: role R[Positional] { }; R[Int].new
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 pierre_ left
gfldex m: role R[Positional ::P] { }; 10:57
camelia ( no output )
psch gfldex: i think the error from your example is misleading. it seems about "can't parse constraints on generic parametrization" which seems reasonable
gfldex m: role R[Positional ::P] { }; R[Array]
camelia rakudo-moar e9409c: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant value R[Array] in sink context (line 1)␤»
gfldex m: role R[Positional ::P] { }; R[Array].new
camelia ( no output )
psch ah, no 10:58
it's fine, actually, i misread, sorry :)
because where constraints are different than type constraints
i.e. "Positional ::P" vs "::P where Positional"
gfldex m: role R[Num ::P] { }; R[Num].new 10:59
camelia ( no output )
gfldex m: role R[Num ::P] { }; R[Int].new
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…»
psch which means with Subsets we already offer the same functionality, just not one specific syntax
gfldex so it can be done with a role but inheritance is ignored
psch m: say Int.isa(Num) 11:00
camelia rakudo-moar e9409c: OUTPUT«False␤»
gfldex oh
psch m: role R[Numeric ::N] { }; R[Int].new
camelia ( no output )
gfldex llamatarianism: sorry, I was wrong. It can be done.
psch llamatarianism: you're following along? :)
llamatarianism psch: a little :P
psch llamatarianism: basically there's two types of constraints on variables
s/variables/parameters/ 11:01
llamatarianism: and role parameterization uses, well, parameters
llamatarianism: the two types are type constraints, as in "Int $x" or "Positional ::P"
llamatarianism: the other type is post constraints, as in "$x where * < 10" or "::P where Positional" 11:02
llamatarianism: the latter is not supported yet in role declaration, which is the error gfldex++ showed
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;
camelia ( no output )
gfldex llamatarianism: ^^^ that may be what you want
psch llamatarianism: but the former is fully supported, even with subsetting, inheritance, and mixins
gfldex ENODOC 11:03
llamatarianism gfldex, psch: thanks :) 11:05
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 c: 9493948 | gfldex++ | doc/Language/typesystem.pod6:
role arguments can have constraints
psch m: Mu.hash 11:08
jkramer The code I'm looking at doesn't have 'hash' anywhere in it
camelia rakudo-moar e9409c: OUTPUT«Method 'hash' not found for invocant of class 'Mu'␤ in block <unit> at <tmp> line 1␤␤»
gfldex jkramer: are there threads involved?
jkramer Well yeah, thanks psch :)
psch scnr :l
jkramer: maybe hash coercer or %() or something like that?
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
I'm trying to make this module work: github.com/moznion/p6-Log-Minimal/...inimal.pm6 11:10
psch m: callframe(11).say
camelia rakudo-moar e9409c: OUTPUT«Method 'hash' not found for invocant of class 'Mu'␤ in block <unit> at <tmp> line 1␤␤»
psch jkramer: you're running out of stack :)
m: callframe(11).perl.say 11:11
camelia rakudo-moar e9409c: OUTPUT«CallFrame.new(level => 13, annotations => Mu, my => {})␤»
psch or, well, the empty annotations are to blame actually i guess >_>
gfldex m: callframe(11).WHAT.say 11:12
camelia rakudo-moar e9409c: OUTPUT«(CallFrame)␤»
psch m: callframe(2).say
camelia rakudo-moar e9409c: OUTPUT«gen/moar/stage2/NQPHLL.nqp at line 1428␤»
jkramer m: callframe(1000).WHAT.say
camelia rakudo-moar e9409c: OUTPUT«ctxcaller needs an MVMContext␤ in block <unit> at <tmp> line 1␤␤»
psch m: callframe(2).perl.say
camelia rakudo-moar e9409c: OUTPUT«Method 'WHICH' not found for invocant of class 'Perl6::Compiler'␤ in block <unit> at <tmp> line 1␤␤»
bioduds hi guys 11:13
how do I do this: say qqx{@técnicos};
it won't interpolate the array
psch m: my @a = 1,2,3; say qq{@a[]} 11:14
camelia rakudo-moar e9409c: OUTPUT«1 2 3␤»
psch m: my @a = 1,2,3; say qq{$@a} 11:15
camelia rakudo-moar e9409c: OUTPUT«1 2 3␤»
bioduds let me try
zengargoyle forgets the diff between @x[] and @x[*] 11:16
jkramer psch: Thanks for the pointer, I just added this and it seems to work now :) .grep({ $_.annotations ~~ Hash }) 11:18
Now I can continue to fix the unit tests \o/ 11:20
11:21 CIAvash left
bioduds thanks 11:21
11:21 breinbaas joined
bioduds psch 11:21
~= is concat for string now?
instead of .= ? 11:22
lizmat bioduds: yes
bioduds tx
lizmat ~ indicates Str
+ indicates numeric
? indicates Bool
m: say ?1
camelia rakudo-moar e9409c: OUTPUT«True␤»
lizmat m: dd ?1
camelia rakudo-moar e9409c: OUTPUT«Bool::True␤»
lizmat m: dd ~1
camelia rakudo-moar e9409c: OUTPUT«"1"␤»
lizmat m: dd +"42" 11:23
camelia rakudo-moar e9409c: OUTPUT«42␤»
11:23 rurban left 11:27 MasterDuke joined, nowan left
llamatarianism is there a difference between `so` and `?`? 11:29
m: say so 1
camelia rakudo-moar e9409c: OUTPUT«True␤»
lizmat llamatarianism: precedence 11:30
llamatarianism lizmat: good point, thanks
11:30 nowan joined
timotimo m: say so 1 + 5; say ?1 + 5 11:32
camelia rakudo-moar e9409c: OUTPUT«True␤6␤»
zengargoyle m: say ?2 + 5 11:33
camelia rakudo-moar e9409c: OUTPUT«6␤»
11:35 AlexDaniel joined
bioduds for @técnicos -> $tecnico { 11:37
SORRY Variable '$tecnico' is not declared. Did you mean any of these?
?
isn't that for in perl6?
timotimo do you have some " " around there somewhere?
bioduds yes
timotimo maybe you accidentally made your quotes go past there? 11:38
11:38 kerframil joined, kerframil left
bioduds i shouldn't? 11:38
im interpolating for a string
inside the for loop
timotimo m: say "for @tecnicos -> $tecnico { }"
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 { }"␤»
timotimo like that?
moritz bioduds: it looks like your syntax error comes before the piece of the code you pasted
bioduds let me check 11:39
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
11:41 llamatarianism left
bioduds is in pm file 11:41
no clue here
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␤»
timotimo it should work
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 },"; }
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␤»
timotimo oh, that's interesting
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 },"; }
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
timotimo oh, hehe
easy peasy
bioduds should work, right?
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 },"; }
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 ~= ␤»
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 },"; }
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 ~= ␤»
timotimo not as easy as i thought, obviously 11:44
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 },"; }
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 ~= ␤»
timotimo oh, right
the error changed
11:44 Ven` joined
timotimo the problem was you were opening a { inside your string 11:44
that lets you put code in
so your "for @tecnicos -> $tecnico" was inside string quotes
the string quotes started by the " after the [
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 { ...
either escape the { or use '' (because '' won't interpolate)
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
zengargoyle isn't there a qq:!e or similar to disable the {} in qq
timotimo correct
bioduds okeydokey
timotimo it's spelled :!c
for "no closures"
zengargoyle :)
bioduds works now
thanks a lot
timotimo m: say "test { say "hi" }" 11:47
camelia rakudo-moar e9409c: OUTPUT«hi␤test True␤»
timotimo m: say q:!c"test { say "hi" }"
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 11:48 araujo_ left
zengargoyle guess quotes don't nest... 11:49
psch m: say q:!c/test { say "hi" }/ 11:50
camelia rakudo-moar e9409c: OUTPUT«test { say "hi" }␤»
timotimo can't, if you have the same delimiter character for start and end
m: say q:!c“test { say "hi" }”
camelia rakudo-moar e9409c: OUTPUT«test { say "hi" }␤»
timotimo m: say q:!c“test { say “hi” }”
camelia rakudo-moar e9409c: OUTPUT«test { say “hi” }␤»
timotimo ^- those do nest
zengargoyle m: say qq:!c“test { say "hi" }” 11:53
camelia rakudo-moar e9409c: OUTPUT«test { say "hi" }␤»
zengargoyle muahahaha
timotimo what is muahaha about that?
11:54 chris2 left
zengargoyle spent so much time figuring out how to type “ that i didn't see yours. 11:54
timotimo oh 11:55
for me, i have „“” for shift 8 9 0 and ‚‘’ for capslock 8 9 0
⟨⟩₀ are shift + capslock + 8 9 0
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…»
zengargoyle you don't have *() for shift 890 ??
timotimo aaw
of course not
11:57 chris2 joined
timotimo those are capslock g j k 11:57
zengargoyle lol
timotimo of course when i press g j and k i really get o n and r 11:58
psch /o\
AlexDaniel hehe, well, “ is altgr + v for me. And AltGr is on the spacebar 12:00
timotimo *on* the spacebar?
that's interesting
AlexDaniel yes
and v is of course dvorak v… ;)
timotimo where did you move the space key?
AlexDaniel timotimo: I moved it to 無変換 12:01
timotimo what :) :) :)
12:02 chris2 left
AlexDaniel timotimo: the key on the left of the spacebar: auctions.c.yimg.jp/images.auctions....z27972.jpg 12:02
timotimo cool
that's a really tiny spacebar
but that's normal in chinese-and-nearby areas?
zengargoyle hehe
AlexDaniel I have no idea. I live in Estonia 12:03
zengargoyle japanese
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
zengargoyle old language study partner swore by the thumb keys for conversions.
12:04 chris2 joined
timotimo mhm 12:05
timotimo very good at distinguishing chinese and japanese, clearly
zengargoyle vs the many who actually use standard US type keyboards and IME
might be a generational thing.
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
AlexDaniel nice 12:07
12:07 mcmillhj joined
timotimo and altgr uiojklm,. and space are 7894561230 12:07
AlexDaniel timotimo: ;{[?("|<“ 12:08
I figured that I use those more frequently than numbers :)
(reaching for a number row is way too hard ;) ) 12:09
timotimo and of course 90ßpö- are /*-+,;
12:09 pmurias left
timotimo and on n i have a : for those pesky ipv6 addresses 12:09
zengargoyle eek, you people are crazy. :)
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.
AlexDaniel yeah, I should make : more reachable
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)
[Coke] yawns.
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
zengargoyle: it is just too much pain. You have to decide yourself if you really want to go through all of this
in fact, neo is available on most systems. My custom layout is not, let alone japanese keyboards… 12:13
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.
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
12:16 rgrinberg joined
AlexDaniel zengargoyle: unless you use some character very often, which is why you might actually want to stand on one leg :) 12:16
timotimo i must admit it took me an extra long while to learn all the special char keys on the capslock key 12:17
and capslock + shift i haven't learned any :P
oh, wait, capslock + shift is easy. it's just greek
λολ τψατ ισ φννυ 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.
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
zengargoyle so it's XCompose or totally different IM for stuff.
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
geekosaur chord keyboard?
timotimo did you see 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
poor man's ergonomic keyboard!
12:22 eliasr joined, pierre_ joined
AlexDaniel timotimo: yeah. It's cool but I'm not sure if it is useful. This, however, is potentially useful: www.youtube.com/watch?v=8SkdfdXWYaI 12:24
like, for sure. If somebody cuts my hands off that's what I am going to do
timotimo YES.
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"?
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);␤»
AlexDaniel timotimo: huh? Not sure what are you referring to
bioduds weird behavior when I include my pm lib
if I put the code on the pl file, it prints to the stdout 12:26
timotimo www.youtube.com/watch?v=yJDv-zdhzMY
The Mother of All Demos, presented by Douglas Engelbart (1968)
bioduds if I use lib and use the pm file it does not
so I run on my shell it prints fine
if i call from an external source it does not
exactly the same code 12:27
timotimo precompilation
you will want to put all your code into subs and use those subs 12:28
rather than rely on the mainline of the module to be run
jkramer m: "\r\n\t".subst(/\r/, '\r', :g).subst(/\n/, '\n', :g).subst(/\t/, '\t', :g) 12:30
camelia ( no output )
jkramer m: "\r\n\t".subst(/\r/, '\r', :g).subst(/\n/, '\n', :g).subst(/\t/, '\t', :g).say
camelia rakudo-moar 73ae93: OUTPUT«\n\t␤»
jkramer What's going on here?
bioduds timotimo : that answer was for me? 12:31
timotimo yes
bioduds oh ok
jkramer Ah, I guess those are not literal \r's
bioduds so, instead of putting an our var
on the pm
i must get the info from a sub that returns it?
geekosaur m: "\r\n".chars
camelia ( no output )
timotimo oh, you just have a var that you're trying to read out?
geekosaur oops 12:32
m: "\r\n".chars.say
timotimo my crystal ball did not tell me this
camelia rakudo-moar 73ae93: OUTPUT«1␤»
bioduds yes
geekosaur jkramer, I think \r\n gets turned into a synthetic newline which matches \n?
bioduds an our var
with export
AlexDaniel timotimo: 1968! Oh wow. No, I haven't seen that.
geekosaur (which is intended to try to make unix vs. windows newline conventions halfway sane/portable)
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
camelia rakudo-moar 73ae93: OUTPUT«Method 'chars' not found for invocant of class 'NFD'␤ in block <unit> at <tmp> line 1␤␤»
geekosaur bleh
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␤␤»
timotimo you can sidestep the logical \r or \n by using \xASCIICODE
moritz m: "\r\n".NFD.codes.say
camelia rakudo-moar 73ae93: OUTPUT«2␤»
timotimo mostly needed for inside regexes, actually
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.
jkramer timotimo: Already tried that
timotimo no, wait, we do the translation at program boundaries, don't we?
bioduds nope
didnt work
jkramer m: "\r\n".subst(/\x0d/, '\r').subst(/\x0a/, '\n').encode.say
camelia rakudo-moar 73ae93: OUTPUT«utf8:0x<0d 0a>␤»
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
i have a pl file
AlexDaniel timotimo: nooo! Nooo! It cuts on 34:40
timotimo AlexDaniel: wow, you watched that half hour really fast
bioduds and a pm file
I'm including the pm file and it works fine 12:37
but
when I call it from an external program
12:37 rgrinberg left
bioduds it only shows the stdout if the code is inside the pl file 12:37
not if I put the code in the pm file
if i run perl6 get_data.pl 12:38
works fine
AlexDaniel timotimo: don't use use 2x speed on youtube for watching talks? :)
bioduds both with the code in the pm file and if I put in the pl file
AlexDaniel timotimo: but yeah, I've skipped some
bioduds but
when it is called from another program
that uses
moritz bioduds: did you put the code into a subroutine in the .pm file?
AlexDaniel don't you**
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
12:39 bioduds_ joined
bioduds_ that uses the /bin/sh -c perl6 get_data.pl 12:39
then it only works
if the code is inside the pl file
could you see what I mean? 12:40
I don't know why
it happens
moritz then show us the code!
bioduds_ would you like me to try to explain again?
sure
it is simple
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;
timotimo not just paste into irc
12:41 rurban joined
bioduds_ can you please point me that gist link again? 12:41
the one I used once in the past?
timotimo gist.github.com
let's see ... 12:42
no, i can not :(
12:43 bioduds left
bioduds_ gist.github.com/bioduds/994ab32212...72226786ed 12:44
it works fine on command line called by me 12:45
but it only works getting called from another program if i put the code that is in the pm file in the pl file
I am not being able to figure out the reason 12:46
moritz that won't ever work
because Technico has no method to-json
AlexDaniel timotimo: wait so, they are not going to talk about their chorded keyboard? Nooooooooooooooooooo…
timotimo that should work 12:47
zengargoyle when you call it from another program are you in the same directory as the file.
timotimo AlexDaniel: people didn't seem to take note of the chorded keyboard at all
bioduds_ when i call it from another program i am not 12:49
but it works if i get the code in pm file and put directly in the pl
12:49 itaipu joined
moritz m: say so Any.^can('to-json') 12:49
camelia rakudo-moar 73ae93: OUTPUT«False␤»
bioduds_ and remove use 'lib' and use ef8a4da32a; of course
moritz bioduds_: where would that to-json method come from?
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␤»
jkramer \o/
bioduds_ from use JSON::Class;
moritz oh, that does some weird magic?
so, what exactly doesn't work?
do you get an error? 12:51
bioduds_ no error
just stdout is empty
if I try using with code inside the pm
if I get the code in the pm and move to the pl
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?
timotimo how are you calling your program?
bioduds_ yes I see
timotimo are you calling it in a way that'll actually let stdout output through?
like, if you start "echo 'hi there'" the same way, will 'hi there' show up?
bioduds_ it is called from Meteor Server it uses /bin/sh -c to run the command
var exec = Npm.require('child_process').exec; 12:53
exec('perl6 /home/ubuntu/dev/futs/scripts/get_data.pl', function( error, stdout, stderr ) {
this works, as I told you guys, if code is only in the pl file
timotimo ah
bioduds_ if I use 'lib' and put the code in the pm
it does not
altough 12:54
timotimo are you sure it's not crashing or erroring or something?
bioduds_ although it works if I run manually
sure not crashing
cause I run manually and runs fine
does the pm creates a new process?
or thread?
could that be it?
moritz it might, for precompilation
zengargoyle not sure what you're doing exactly by 'calling from another program' but works fine for me.
bioduds_ zengargoyle : works fine yes 12:55
but if I call from Meteor server, not
stdout is empty
but
moritz so either meteor doesn't like new processes, or some environment is different
bioduds_ if I put the code from the pm file directly in the pl file
then it works
moritz you've repeated that like 10 times already 12:56
bioduds_ it calls a child_process
sorry, just to make it clear
cause it is a little weird problem, right?
12:57 sufrostico joined
AlexDaniel timotimo: wow. Just wow. Thank you for this link 12:57
bioduds_ I guess modularity is of the table then here, right?
timotimo AlexDaniel: it's both greatly positive and greatly negative to watch, isn't it? :)
12:58 brrt left
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
bioduds_ but the one on the use 'lib' does not
moritz bioduds_: because it's already precompiled
bioduds_ oh
I believe you solved it moritz
timotimo in some ways, the thing doug is working on is a bit more productive and useful than many things we have today
moritz bioduds_: does meteor call it as separate system user?
bioduds_ i believe not moritz
moritz bioduds_: don't just believe, verify :-)
bioduds_ but it looks like it will only listen to the child process it creates 13:00
and the pm as you wisely said
is not precompiled
it must run in another child process
AlexDaniel timotimo: nah, I find it motivational
bioduds_ let me try to investigate it
just one other thing before I do 13:01
timotimo OK
that's good, then :)
bioduds_ is it simple to have my lib pm precompiled?
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?
bioduds_ sure, sorry. I'm very prolix 13:03
timotimo i have no idea what prolix means :)
bioduds_ wordy
13:04 wamba joined
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
timotimo i may just be an old fart, but it would make me feel better. thanks! 13:05
zengargoyle i do not know what meteor server is... 13:07
13:07 yuhipno joined
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, cdg joined
timotimo like, a way to send messages to browsers asynchronously to make stuff happen spontaneously when server state changes 13:08
since EventSource and websockets exist now, i'd bet that Meteor has pivoted and is now doing something very different 13:09
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
timotimo is that also what english people call those? 13:12
zengargoyle tots works for me...
bioduds_ timotimo : Meteor is a JS framework that uses js both on client and server
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
timotimo yeah. i'm saying node.js didn't exist when i last looked at meteor :) 13:14
bioduds_ oh lol
timotimo so clearly their project has pivoted in that way
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.
timotimo or i am mis-remembering
jast timotimo: Meteor was first released in 2012. node.js was first released in 2009.
timotimo oh? 13:15
maybe i was thinking of a different "Meteor"
bioduds_ zengargoyle : tx, going to try yes
stmuk in the olde days we had meta refresh tags :)
zengargoyle have meteor run the script and run it manually yourself from where your .pl is and compare.
bioduds_ ok 13:16
premise is to have that "middle agent" from client to server extinguished, I believe 13:17
I can have big pl files for this project too, that shouldn't be a nuisance 13:20
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
13:21 Actualeyes joined
bioduds_ Do you guys know Code Fights? 13:21
gfldex m: say so ().any;
camelia rakudo-moar fef365: OUTPUT«False␤»
gfldex is that by definition or do I just not see the logic?
zengargoyle does perl6 still do weird things requiring ~/.perl6 being available?
mspo caching bytecode? 13:24
masak bioduds_: rule #1 of Code Fights: you do not talk about Code Fights. 13:26
:P
bioduds_ lolololol 13:27
moritz gfldex: do any of the values in the list evaluate to a True value? No. Hence the answer
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 MasterDuke left, matt_ left
zengargoyle unless it fail gracefully... 13:28
moritz if not, that's what we have to implement 13:29
bioduds_ moritz : you wrote JSON::Tiny? 13:30
moritz bioduds_: yes
bioduds_ just panda install JSON:Tiny will do?
moritz you need a second colon 13:31
otherwise, yes 13:32
13:33 mohae left
bioduds_ :D 13:33
masak ::D
bioduds_ silly question: do I need to cd to the directory I installed perl6 to do panda install module? 13:34
moritz no
bioduds_ ok, tx
13:35 skids left
masak .oO( <masak> mst: he meant "ta" ) 13:35
timotimo i'm more of a rx person myself
ilmari timotimo: TMI
masak I like "pzh" 13:36
perlpilot wonders who's handling flow control
zengargoyle Mr. S and Mr. Q 13:37
masak two very dependable gentlemen 13:38
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.)
dogbert17 do you think that this short gist does Range.reverse any justice? gist.github.com/dogbert17/1b7fcc19...a0d18b2ef7
masak m: say "hello, dogbert1" ~ ("perl6" ~~ /\d/) + 1 13:41
camelia rakudo-moar fef365: OUTPUT«hello, dogbert17␤»
zengargoyle one to provide just a simple mapping of Texas -> Unicode with a few routines to extract.
AlexDaniel wonders if someone can be rx or tx, what would it mean to be bidirectional
13:41 bjz left
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
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
13:42 koo_ joined 13:43 bjz joined
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…»
koo_ is perl compatible with everything php is?
masak seems legit.
perlpilot koo_: What does that even mean?
AlexDaniel benchable6: say (5..Inf).reverse.list # well, let's bench it
benchable6 AlexDaniel, starting to benchmark the 1 given commits
AlexDaniel, ¦«say»:Cannot find this revision
AlexDaniel benchable6: releases say (5..Inf).reverse.list # well, let's bench it
benchable6 AlexDaniel, starting to benchmark the 11 given commits
AlexDaniel ;P
masak koo_: not when PHP does things that are very bad ;)
benchable6 AlexDaniel, benchmarked the given commits, now zooming in on performance differences
13:44 koo_ left
MetaZoffix heh 13:44
dogbert17 reversing an infinite Range doesn't seem overly useful
MetaZoffix We scared them off
perlpilot dogbert17: nope, but it's something that someone might accidentally do
vcv Maybe they were asking if Perl is compatible with all the issues on phpsadness.com/? 13:45
ilmari m: say (-Inf..5).reverse
camelia rakudo-moar fef365: OUTPUT«(...)␤»
ilmari m: say (-Inf..5).reverse.list
camelia rakudo-moar fef365: OUTPUT«(...)␤»
dalek c: 1f7b1ee | coke++ | doc/Language/exceptions.pod6:
fix whitespace
13:46
MetaZoffix m: say (-Inf..5).reverse[1,2,3]
camelia rakudo-moar fef365: OUTPUT«(4 3 2)␤»
AlexDaniel benchable6: what's up??
benchable6 AlexDaniel, starting to benchmark the 1 given commits
AlexDaniel, ¦«what's»:Cannot find this revision
AlexDaniel benchable6: releases say (5..Inf).reverse.list # well, let's bench it
benchable6 AlexDaniel, starting to benchmark the 11 given commits
13:46 benchable6 left
bioduds_ what does the .perl thing mean?? 13:46
[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
It's not fool-proof.
dogbert17 [Coke]: do you have a sec to take a look at github.com/perl6/doc/issues/791
13:47 benchable6 joined
AlexDaniel benchable6: releases say (5..Inf).reverse.list # well, let's bench it 13:47
benchable6 AlexDaniel, starting to benchmark the 11 given commits
bioduds_ so the opposite of .perl would be .EVAL?
MetaZoffix bioduds_: yeah
bioduds_ great
AlexDaniel bioduds_: … kinda
benchable6 AlexDaniel, benchmarked the given commits, now zooming in on performance differences
bioduds_ ok
MetaZoffix m: my $m = "foo" ~~ /(.)(.)?(.)/; use Test; is-deeply $m.perl.EVAL, $m
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 …»
MetaZoffix m: my $m = "foo" ~~ /.+/; use Test; is-deeply $m.perl.EVAL, $m 13:48
camelia rakudo-moar fef365: OUTPUT«ok 1 - ␤»
gfldex m: my &c = { say "called with $^a" }; say so 10 ~~ &c; 13:49
camelia rakudo-moar fef365: OUTPUT«called with 10␤True␤»
gfldex ~~ is really smart :)
moritz we don't call it dumbmatch for no reason! 13:51
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")␤»
perlpilot m: say ("f,,b,c,d".split: /","/, :v, :skip-empty); 13:56
camelia rakudo-moar fef365: OUTPUT«(f 「,」 「,」 b 「,」 c 「,」 d)␤»
perlpilot anyway ... someone might want to be sure that's the correct intent.
Seems like a bug to me.
AlexDaniel committable6: releases say ("f,,b,c,d".split: /","/, :k, :skip-empty).perl;
perlpilot er, at least one bug
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
13:57 bjz left
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
AlexDaniel committable6: releases say ("f,,b,c,d".split: /","/, :v, :skip-empty);
perlpilot MetaZoffix: aye
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»
timotimo oh, that was only one version in the middle there
13:57 bjz joined
timotimo that didn't have :k yet i'd think 13:57
AlexDaniel committable6: releases say ("f,,b,c,d".split: /","/, :v, :skip-empty);
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
dalek c: b04cf9d | (Jan-Olof Hendig)++ | doc/Type/Range.pod6:
Added docs for Range.reverse. masak++, perlpilot++
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
timotimo oh! 14:00
that only makes sense if you split with multiple strings
m: say "a b,c^d:e".split: [" ", ",", "^", "d"], :v
camelia rakudo-moar fef365: OUTPUT«(a b , c ^ d :e)␤»
timotimo m: say "a b,c^d:e".split: [" ", ",", "^", "d"], :kv
camelia rakudo-moar fef365: OUTPUT«(a 0 b 1 , c 2 ^ 3 d :e)␤»
timotimo so you can reconstruct which of the strings have been used for splitting
perlpilot aye. I guess that second thing is just a doc bug. 14:01
timotimo likely
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:02
jnthn AlexDaniel: OK :) 14:04
14:06 khw joined 14:09 ptolemarch joined
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 mr-foobar left
masak has his false-positives paranoia satisfied -- for now 14:12
m: say "a:b::c".split: [":", "::"], :kv 14:13
camelia rakudo-moar fef365: OUTPUT«(a 0 : b 1 :: c)␤»
masak impressive. :)
MetaZoffix m: say "a:b:::c".split: [":", "::"], :kv
camelia rakudo-moar fef365: OUTPUT«(a 0 : b 1 :: 0 : c)␤»
MetaZoffix m: say "a:b::::c".split: [":", "::"], :kv
camelia rakudo-moar fef365: OUTPUT«(a 0 : b 1 :: 1 :: c)␤»
lizmat yeah, same position takes the longest :-)
masak I like that. very consistent with, say, .trans 14:14
lizmat masak: I think .trans nowadays uses the .split internally
masak chalk it up as a "moment of charm" :) well done, someone
lizmat: ooh, interesting.
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
(I think, from memory :-)
14:15 girafe joined
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 :) :)
masak as seen above :)
MetaZoffix New blog post: "Perl 6 Core Hacking: Can Has Moar Cover?": perl6.party/post/Perl-6-Core-Hackin...Moar-Cover 14:18
masak MetaZoffix++ # a proliferation of bots, in the best of ways 14:20
lizmat MetaZoffix++ 14:22
14:24 rgrinberg joined
bioduds_ how can I print an array separated by comma? 14:26
DrForr m: say <foo bar>.join(',') 14:27
camelia rakudo-moar fef365: OUTPUT«foo,bar␤»
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 cdg left, hoelzro left, hoelzro joined 14:33 mr-foobar joined 14:35 MetaZoffix left
DrForr No worries. 14:37
14:38 pierre_ left 14:41 cibs left, wamba left
stmuk is there a list of zoffix bots? I'm losing track 14:41
maybe there needs to be a meta overload bot
overlord *
14:42 cibs joined 14:43 pierre_ joined 14:45 a3r0 left
El_Che stmuk: maybe Zoffix is himself a bot. 14:45
14:45 a3r0 joined
stmuk who herds the bot herder? 14:47
14:48 pierre_ left
ilmari Zoffix is a bot, MetaZoffix is the herder? 14:52
but is MetaZoffix also a bot?
14:54 tushar_ joined 14:58 wamba joined
AlexDaniel if it does not have a fixed nickname it is probably a bot 15:04
15:09 wamba left 15:10 bpmedley joined 15:12 grondilu joined 15:14 matt_ joined 15:15 matt_ is now known as Guest86137 15:16 inkog joined 15:17 rurban left 15:19 tushar_ left 15:20 yuhipno left 15:25 tushar joined 15:28 ggoebel joined, mohae joined, girafe left 15:29 MorayJ joined 15:31 rurban joined 15:36 mcmillhj left 15:37 robertle joined 15:38 gregf_ joined 15:41 tushar left, cdg joined 15:42 inco6 joined 15:43 domidumont left 15:45 inkog left 15:48 Nex6 joined
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
15:55 Kolin_ joined
AlexDaniel harmil_wk: yeah. Sure. 15:55
15:56 araujo__ left 15:57 b2gills left 15:58 Nex6 left
Kolin_ Zoffix is definitely a bot. Just ask him if he follows the laws of robotics 15:59
16:00 brrt joined 16:05 brrt left
bioduds_ good thing I'm being able to use unicode code in javascript 16:12
16:15 wamba joined
bioduds_ this works: this.genero_do_tecnico.set( sjson.ef8a4da32a[0].gênero ); 16:15
:)
RabidGravy ah hah! 16:16
bioduds_, your issue on JSON::Marshal - I can't replicate 16:17
bioduds_ really?
do you have perhaps an idea what might happened?
RabidGravy well apart from the missing "use JSON::Class;" I haven't the faintest idea
bioduds_ but don't worry, I have solved with another approach 16:18
lol, don't worry, I thank you for the caring :D
16:21 itaipu left
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:26
Kolin_ 2016.07 was broken, use 2016.07.1 16:27
RabidGravy I would suggest golfing that code down to see if it fails without using the JSON::Marshal 16:29
16:32 Actualeyes1 joined, Actualeyes left, mcmillhj joined 16:37 mcmillhj left 16:39 dataangel left 16:40 domidumont joined 16:41 Kolin_ left 16:42 rurban left 16:46 mcmillhj joined
AlexDaniel star: say (<a b c>, (<a b c>)) 16:47
camelia star-m 2016.04: OUTPUT«((a b c) (a b c))␤»
AlexDaniel m: say (<a b c>, (<a b c>))
camelia rakudo-moar fef365: OUTPUT«((a b c) (a b c))␤»
16:53 wamba left 16:55 _slade_ joined 16:56 tushar joined 17:03 zakharyas left 17:04 AndyBotwin left 17:05 AndyBotwin joined 17:13 firstdayonthejob joined 17:20 inco6 is now known as incog, incog left, incog joined 17:24 chris2 left 17:31 mcmillhj left, tushar left 17:33 mcmillhj joined 17:41 ocbtec left 17:42 dakkar left 17:44 mcmillhj left 17:47 tushar joined, setty1 joined 17:49 cpage_ left, zacts left 17:52 brrt joined, Praise left, mcmillhj joined 17:53 chris2 joined, Praise joined 17:56 Ven` left 17:57 mcmillhj left 17:58 incog left, inco6 joined 18:00 mcmillhj joined 18:02 Ven` joined, inco6 is now known as incog
bioduds_ is there include or require in perl6? somewhat like php? 18:02
18:02 incog left, incog joined 18:04 rgrinberg left 18:05 wamba joined
mst bioduds_: docs.perl6.org/language/modules 18:05
bioduds_ mst : tx. im actually running from the module since it wont run like I need now 18:06
mst bioduds_: what 18:07
bioduds_ but there may be a way to do it that will work for me
18:07 Ven` left
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
but EVALFILE exists, if i remember correctly
18:09 Actualeyes1 left
mst right, but you should never do that anyway 18:11
PHP's include() exists as an artifact of it originally being a malignant perl templating system that metastasised
18:12 incog left, inco6 joined, inco6 left, inco6 joined 18:13 inco6 left 18:15 zacts joined 18:19 ptolemarch left 18:22 edegard joined 18:23 rgrinberg joined
edegard hey 18:23
wassup
DrForr Not much, working on Perl6::Tidy, straightening sheets on a proverbial waterbed. 18:24
18:24 cdg left, edegard left 18:29 lostinfog joined
zacts hi perl6 nerds 18:43
18:45 espadrine joined
timotimo hello zacts 18:46
AlexDaniel was it a compliment? 18:47
timotimo could be 18:49
18:49 sufrostico left, MorayJ left
AlexDaniel
.oO( maybe I should have got used to that irclog.perlgeek.de/perl6/search/?ni...6+nerds%22 )
18:50
mst why would it be anything else? 18:51
18:52 girafe joined 18:53 cpage_ joined 19:00 pierre_ joined 19:06 darutoko left, pierre_ left
zacts it was indeed a compliment 19:06
the reason I use nerd instead of geek is because of the etymology of those words
nerd's etymology is cooler than geek 19:07
nerd was coined by Dr. Seuss in his 1950s book If I Ran the Zoo
geek has an etymology of something like 'a fool'
nerd was a character of his book iirc
so I tend to use nerd as the cooler more positive word
wikipedia mentions this, but I have actually personally researched this myself and have read If I Ran the Zoo 19:08
Dr. Seuss > Ancient Attic Greek / Plato in this case
:-)
dalek c: 2061fa7 | (Jan-Olof Hendig)++ | doc/Type/Range.pod6:
Added code examples to a few methods
19:09
zacts (Ancient Greek / Plato's language) <-- I meant to phrase it like this
bbl
19:12 kerframil joined 19:15 domidumont left, rurban joined 19:16 acrussell joined 19:22 rgrinberg left, rgrinberg joined 19:24 sufrostico joined 19:26 itaipu joined 19:31 raiph left 20:10 robertle left 20:13 zakharyas joined 20:16 kaare_ left 20:27 cdg joined 20:32 mcmillhj left 20:38 mcmillhj joined 20:39 Ed joined 20:40 Ed is now known as Guest7645
Guest7645 Trying to run: rosettacode.org/wiki/Compiler/lexic...zer#Perl_6 20:40
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
Tried with: This is Rakudo version 2016.07.1 built on MoarVM version 2016.07 implementing Perl 6.c.
And: This is Rakudo version 2016.09 built on MoarVM version 2016.09 implementing Perl 6.c.
20:43 mcmillhj left
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 ?
and that gets past on to the tokenizer, which then calls .lines on an Any
Guest7645 It is as simple as that? And I think you are correct - thanks! 20:44
I tried with input of just "foobar", and that works correctly.
lizmat *passed
:-)
Guest7645 I guess I was expecting a different error message. Thanks for the help!
lizmat there's a Grammar::Tracer and Grammar::Debugger in the ecosystem, it should allow you to find out where a parse failed 20:46
masak soft failures can sometimes lead to Less-Than-Awesome error messages 20:47
I wonder what the extreme point of providing an Awesome error message would be on this one... :) 20:48
"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."
lizmat well, it would be nice if it returned a Failure that could tell where the parse went wrong, no ? 20:52
masak "where the parse went wrong" is not so easy -- I'd love to be wrong about that, though :) 20:53
sometimes backtracking is healthy and expected; sometimes not
20:54 itaipu left 20:57 mcmillhj joined 20:59 cpage_ left 21:00 tushar left 21:01 nadim_ joined 21:02 mcmillhj left, nadim left 21:03 cpage_ joined 21:04 jmark left, DarthGandalf left 21:05 skids left 21:08 DarthGandalf joined 21:09 rgrinberg left 21:16 xiaomiao left 21:19 xiaomiao joined 21:20 telex left 21:22 telex joined 21:23 rurban left 21:26 zakharyas left 21:28 canopus left 21:36 canopus joined, infina is now known as Enthalpy, zengargoyle left 21:37 nemo left, obfusk left, k-man left, cibs left, geraud left, canopus left, sufrostico left, lostinfog left, firstdayonthejob left, rindolf left, aindilis` left, MilkmanDan left, zoosha left, notbenh left, cgfbee left, Enthalpy left, kerframil left, espadrine left, wamba left, ggoebel left, AlexDaniel left, Matthew[m] left, damnlie left, jsimonet left, KotH left, djbkd left, cpage left, PerlJam left, PotatoGim left, mrsolo left, stmuk left, albongo left, avalenn left, Peter_R left, BinGOs left, w4and0er96 left, Celelibi left, Spot__ left, isacloud left, cosimo left, gensym left, arnsholt left, revdiablo left, richi235 left, dj_goku left, edenc left, mspo left, gabiruh left, DrParis left, krunen_ left, atacama_ left, raydiak left, erdic left, [Coke] left, brrt left, pierrot left, flexibeast left, decent left, sftp left, Upasaka left, perigrin left, Jonis left, simcop2387 left, krunen left, pochi_ left, chee left, sergot left, zhmylove_ left, m0ltar left, emdashcomma left, tinita left, mattp_ left, ingy left, Grrrr left, tony-o left, DarthGandalf left, chris2 left, setty1 left, AndyBotwin left, _slade_ left, bpmedley left, vcv left, [particle] left, camelia left, bartolin left, buggable left, TimToady left, huggable left, dylanwh left, NeuralAnomaly left, ft left, ambs left, ggherdov left, timeless left, rjbs left, Timbus left, olinkl left, vytas left, Hotkeys left, remmie left, inokenty left, synopsebot6 left, garu_ left, jnthn left, SourceBaby left, masak left, ssm left, mst left, rcy left, dsp_ left, mls left, jcallen left, tailgate left, konobi left 21:38 kerframil joined, espadrine joined, wamba joined, ggoebel joined, AlexDaniel joined, Matthew[m] joined, damnlie joined, jsimonet joined, KotH joined, djbkd joined, cpage joined, PerlJam joined, PotatoGim joined, mrsolo joined, stmuk joined, albongo joined, avalenn joined, Peter_R joined, BinGOs joined, w4and0er96 joined, Celelibi joined, Spot__ joined, isacloud joined, cosimo joined, gensym joined, arnsholt joined, revdiablo joined, richi235 joined, dj_goku joined, edenc joined, mspo joined, gabiruh joined, DrParis joined, krunen_ joined, atacama_ joined, raydiak joined, erdic joined, [Coke] joined, Guest7645 left
bioduds_ this here is freakingawesome! subset RateTécnico where (0.0..5.0)|"-"; 21:39
a mixed type!!!
21:39 BuildTheRobots left, peteretep left
bioduds_ perl6 is (not) 2 cool 2 b true 21:39
21:40 DarthGandalf joined, chris2 joined, setty1 joined, AndyBotwin joined, _slade_ joined, bpmedley joined, vcv joined, [particle] joined, camelia joined, bartolin joined, buggable joined, TimToady joined, huggable joined, dylanwh joined, rcy joined, NeuralAnomaly joined, ft joined, ambs joined, rjbs joined, Timbus joined, olinkl joined, vytas joined, Hotkeys joined, remmie joined, inokenty joined, synopsebot6 joined, garu_ joined, jnthn joined, SourceBaby joined, masak joined, ssm joined, mst joined, dsp_ joined, mls joined, jcallen joined, tailgate joined, konobi joined, hitchcock.freenode.net sets mode: +v camelia, PotatoGim left, mrsolo left, zengargoyle joined, nemo joined, obfusk joined, k-man joined 21:41 eliasr left, cibs joined, geraud joined, olinkl left, canopus joined, sufrostico joined, lostinfog joined, firstdayonthejob joined, rindolf joined, aindilis` joined, MilkmanDan joined, zoosha joined, notbenh joined, cgfbee joined, infina joined 21:42 cgfbee left, brrt joined, pierrot joined, flexibeast joined, decent joined, sftp joined, Upasaka joined, perigrin joined, Jonis joined, simcop2387 joined, krunen joined, pochi_ joined, chee joined, sergot joined, zhmylove_ joined, m0ltar joined, emdashcomma joined, tinita joined, mattp_ joined, ingy joined, Grrrr joined, tony-o joined, Spot__ left 21:44 sufrostico left 21:45 john51 left, john51 joined 21:46 cgfbee joined 21:50 timeless joined 21:52 ggherdov joined 21:56 peteretep joined 22:01 olinkl joined 22:03 RabidGravy left 22:04 cpage_ left 22:05 eliasr joined, acrussell left 22:06 PotatoGim joined 22:08 Spot__ joined 22:14 lostinfog left 22:16 mrsolo joined 22:17 BuildTheRobots joined 22:19 labster joined 22:22 nadim_ left, nadim_ joined 22:28 cdg left 22:29 cdg joined 22:30 bjz left 22:31 cpage_ joined 22:32 wamba left 22:42 cpage_ left 22:49 Zoffix joined
Zoffix using failures in boolean context disarms them, but is there a similarly easy way to explode them? 22:49
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
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
timotimo try .sink? 22:53
Zoffix m: sub { fail }().sink
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␤␤»
Zoffix Thanks, timotimo++
m: sub { 4 }().sink
camelia ( no output )
Zoffix Great.
22:58 tushar joined, labster left
timotimo Zoffix: have you tried sending the data from moarvm --dump through a grep to make parsing the annotations file faster? 23:03
23:03 skids joined
Zoffix timotimo, no. What would I be grepping for? 23:07
23:07 girafe left 23:11 MorayJ joined 23:12 Sgeo left, Sgeo joined 23:13 firstdayonthejob left, MorayJ left
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:13
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
Can someone also provide example for "nl-in" and "nl-out"? Thanks.
grondilu tushar: not sure but I think it's best you provide your own character class. 23:15
m: my $FS = /<[ ,: ]>/; say "foo, bar: see?".split: $FS; 23:16
camelia rakudo-moar 553ced: OUTPUT«(foo bar see?)␤»
tushar grondilu: can you please provide me an example?
grondilu: Thanks.
23:17 sufrostico joined
timotimo Zoffix: github.com/MoarVM/MoarVM/blob/line...ort.p6#L13 23:17
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
Zoffix: i didn't have the motivation yet to do a performance pass over that script, apart from multithreading it 23:19
23:22 cdg_ joined
timotimo and unfortunately multithreading a script makes it unprofilable at the moment ... 23:25
Zoffix really?
23:25 cdg left 23:27 cdg_ left
timotimo yes, the profiler doesn't handle multiple threads yet 23:29
it either crashes or it gives you a random thread's routines 23:30
23:34 [particle] left 23:36 [particle] joined 23:41 Zoffix left, grondilu left 23:51 SourceBaby left, espadrine left, SourceBaby joined, Undercover left 23:53 Undercover joined