Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-11-06

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:11 Sir_Ragnarok joined #perl6
00:28 hobbs Perlmonks is the pinnacle of 1997 web technology
00:35 raiph joined #perl6
00:43 Mouq joined #perl6
00:49 Mouq lucas_: The community direction has been *toward* Pod6, rather than away from it. I believe that, historically, the issue, besides the slow conversion of pod6 to html, was that there was a feature to autogenerate links to roast that needed to be redone for Pod6
00:50 Mouq (As I recall. lue++ was the one doing the most work on this, and he's probably the best person to consult)
00:51 timotimo hey Mouq
00:52 Mouq hey timo! :) I've still been watching stuff, but I haven't had time to be on as often recently
00:54 timotimo that's fine :)
00:54 timotimo anything in particular you're up to next?
01:05 Mouq Uh, just now I was looking to see if I could make routine redeclaration errors occur sooner, just because it was bugging me while I was trying to do something else
01:07 Mouq m: sub foo { 42 }; sub foo { "Some really long subroutine definition" }
01:07 camelia rakudo-moar 315ec6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/bBTHJsw2gPâ�¤Redeclaration of routine fooâ�¤at /tmp/bBTHJsw2gP:1â�¤------> [32mome really long subroutine definition" }[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤        sta…»
01:07 Mouq That kind of simple redeclaration should happen before parsing the body
01:14 dalek joined #perl6
01:17 araujo joined #perl6
01:18 Mouq And... yeah.. that would require way more refactoring than is worth it to me at the moment
01:19 * Mouq is kind of switching between Perl 6 and assignments and random people talking to him
01:24 timotimo mhm
01:24 timotimo i was just driving home from a friend's place
01:25 timotimo they have cats
01:25 timotimo i've discovered that i quite like cats
01:27 Tekk_ timotimo: cats are nice when they're nice
01:27 timotimo yes
01:27 timotimo these two are not perfect, of course
01:27 timotimo the male one thinks he's got a right to everything. like food on the table :)
01:28 timotimo he'll do an exhaustive search through the possible ways of approaching the table to find one that doesn't lead to us gently shoving him away
01:30 bowtie joined #perl6
01:40 PerlJam joined #perl6
01:40 dalek joined #perl6
01:45 [Coke] joined #perl6
01:45 Ben_Goldberg joined #perl6
02:02 timotimo .tell japhb there's two problems with the string escape benchmark that i may solve myself soon-ish: 1) you have to give it a string to escape via @*ARGS[0], 2) it's trying to get that string from @*ARGV[0], which doesn't exist %)
02:02 yoleaux timotimo: I'll pass your message to japhb.
02:07 bowtie_ joined #perl6
02:37 gfldex joined #perl6
02:40 adu joined #perl6
02:42 krunen joined #perl6
02:52 japhb .botsnack
02:52 yoleaux :D
02:52 yoleaux 02:02Z <timotimo> japhb: there's two problems with the string escape benchmark that i may solve myself soon-ish: 1) you have to give it a string to escape via @*ARGS[0], 2) it's trying to get that string from @*ARGV[0], which doesn't exist %)
02:53 japhb timotimo: Are you talking about perl[56]/string-escape?  If so, I see @*ARGS[0] and $ARGV[0], and in both cases it's looking for a *length* as its first arg, not a string
02:54 japhb Or where you talking about something else?
02:54 chenryn joined #perl6
03:12 Mso150_o joined #perl6
03:26 ClarusCogitatio joined #perl6
03:41 ClarusCogitatio joined #perl6
03:54 ClarusCogitatio joined #perl6
04:00 ClarusCogitatio joined #perl6
04:01 rmgk_ joined #perl6
04:06 Alula joined #perl6
04:09 DelmoreTheDonkey joined #perl6
04:09 DelmoreTheDonkey Having issues understanding junctions.
04:09 DelmoreTheDonkey http://perl6advent.wordpress.com/2009/12/13/day-13-junctions/
04:09 DelmoreTheDonkey all(@a) == any(@b)
04:10 DelmoreTheDonkey i suppose is the same as any(@b) == all(@a)
04:10 ClarusCogitatio joined #perl6
04:10 DelmoreTheDonkey however in english they are different.
04:10 DelmoreTheDonkey all(@a) == any(@b) # All elements of @a present in @b?
04:11 DelmoreTheDonkey any(@b) == all(@a) # Any elements of @b present in all elements of @a?
04:12 DelmoreTheDonkey but for some reason in rakudo it all evaluates to the same.
04:13 DelmoreTheDonkey r: my @a=(1,2); my @b=(1,2,3,4,5); all(@a) == any(@b
04:13 camelia rakudo-{parrot,moar} 315ec6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Unable to parse expression in argument list; couldn't find final ')' â�¤at /tmp/tmpfile:1â�¤------> [32m2); my @b=(1,2,3,4,5); all(@a) == any(@b[33mâ��[31m<EOL>[0mâ�¤    expec…»
04:13 DelmoreTheDonkey r: my @a=(1,2); my @b=(1,2,3,4,5); all(@a) == any(@b)
04:13 camelia rakudo-{parrot,moar} 315ec6: ( no output )
04:13 DelmoreTheDonkey r: my @a=(1,2); my @b=(1,2,3,4,5); if all(@a) == any(@b) { say "Yes" }
04:13 camelia rakudo-{parrot,moar} 315ec6: OUTPUT«Yes␤»
04:14 DelmoreTheDonkey r: my @a=(1,2); my @b=(1,2,3,4,5); if any(@b) == all(@a) { say "Yes" }
04:14 camelia rakudo-{parrot,moar} 315ec6: OUTPUT«Yes␤»
04:16 DelmoreTheDonkey can someone explain why "all(@a) == any(@b)" is equivalent to "any(@b) == all(@a)" even though they are read differently
04:16 hobbs because changing the left and right hand side of == doesn't do anything
04:18 DelmoreTheDonkey In english though : "All elements of @a present in @b" is very different to "Any elements of @b present in all elements of @a"
04:19 DelmoreTheDonkey hmm in the comments I see someone else asking the same question
04:20 hobbs you're not programming in english
04:20 hobbs and "Any elements of @b present in all elements of @a" is garbage in english anyway :)
04:20 hobbs at least I have no idea what it's meant to mean
04:24 DelmoreTheDonkey when @a has only 1 element, then the two are the same.
04:25 hobbs all(@a) == any(@b) comes out to "for all elements of @a, it is true that the element is equal to any element of @b"
04:25 DelmoreTheDonkey when @a has 2 unique elements, then "Any elements of @b present in all elements of @a" will always be false
04:25 hobbs I think it's an intentional choice that all always wraps any, because the other way around is almost always useless
04:26 DelmoreTheDonkey when @a has 2 non unique elements (say the result a function known only at runtime)  then "Any elements of @b present in all elements of @a" has meaning
04:27 hobbs I still don't know what that meaning is, to you
04:32 DelmoreTheDonkey "does anything in here matches everything over there" to me is different to "does everything in here matches anything over there"
04:32 hobbs yes, you've said that
04:32 hobbs and they're different to me too
04:33 hobbs the difference is that the second one means something and the first one is impossible to interpret :)
04:34 hobbs in any case, it really has no bearing on what Perl does
04:35 hobbs and what it does I think is pretty clear. Junction.AUTOTHREAD explicitly makes sure that all() and none() get wrapped outside of any() and one(), for DWIM reasons
04:36 hobbs all(any(...), any(...), any(...)) is generally more useful, and aligns with the higher precedence of 'and' vs. 'or'
04:36 hobbs actually, I take back the second part. It is more useful though :)
04:40 chenryn joined #perl6
04:49 kaare_ joined #perl6
04:59 mephinet joined #perl6
05:01 raiph joined #perl6
05:17 ClarusCogitatio joined #perl6
05:29 ClarusCogitatio joined #perl6
05:48 ClarusCogitatio joined #perl6
05:57 xenoterracide joined #perl6
06:05 kaare_ joined #perl6
06:16 kaleem joined #perl6
06:27 araujo joined #perl6
06:35 raydiak m: say q(foo)
06:35 camelia rakudo-moar 315ec6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/8S4q1gHk9tâ�¤Undeclared routines:â�¤    foo used at line 1â�¤    q used at line 1â�¤â�¤Â»
06:35 raydiak ^ should parens work as user-selected brackets?
06:38 robinsmidsrod joined #perl6
06:40 bjz joined #perl6
06:43 sqirrel__ joined #perl6
06:46 ClarusCogitatio joined #perl6
07:14 darutoko joined #perl6
07:33 FROGGS joined #perl6
07:37 FROGGS raydiak: no, an opening parenthesis after an identifier is *always* a routine call
07:37 FROGGS m: if(42) { say 'something' }
07:37 camelia rakudo-moar 315ec6: OUTPUT«[31m===[0mSORRY![31m===[0m�Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens�at /tmp/SJSxbXf1S3:1�------> [32mif[33m�[31m(42) { say 'something' }[0m�Unexpected block in infix position (two terms in a r…»
07:38 FROGGS that is just a neat way to say "undeclared routine 'if'"
07:38 raydiak ah, got it...thanks FROGGS++
07:39 raydiak m: class Foo {}; my $foo = Foo.new; my $bar = $foo but "bar"; say $bar ~~ $foo;
07:39 camelia rakudo-moar 315ec6: OUTPUT«False␤»
07:39 FROGGS m: class Foo {}; my $foo = Foo.new; my $bar = $foo but "bar"; say $bar ~~ ($foo but "bar");
07:39 camelia rakudo-moar 315ec6: OUTPUT«False␤»
07:40 raydiak ^ how could I compare those and get true, if you understand what I'm trying to accomplish...???...
07:40 FROGGS m: class Foo {}; my $foo = Foo.new; my $bar = $foo but "bar"; say $bar.isa($foo.WHAT);
07:40 camelia rakudo-moar 315ec6: OUTPUT«True␤»
07:40 FROGGS m: class Foo {}; my $foo = Foo.new; my $bar = $foo but "bar"; say $bar ~~ $foo.WHAT;
07:40 camelia rakudo-moar 315ec6: OUTPUT«True␤»
07:40 FROGGS is that okayish?
07:41 raydiak but I need to compare by the specific object I started with, not just the type
07:42 raydiak though sometimes this feels like a design smell...like I'm trying to use 'but' to squeeze extra information where it doesn't go
07:42 FROGGS yeah, that's probably true
07:58 telex joined #perl6
08:00 ClarusCogitatio joined #perl6
08:13 zakharyas joined #perl6
08:19 masak morning, #perl6
08:19 moritz \o morning
08:26 spider-mario joined #perl6
08:29 raydiak morning masak and moritz
08:31 lizmat commute to London&
08:32 * moritz can report that the response to http://perlgeek.de/blog-en/perl-6/2014-community-server-funding.html has been very positive and generous so far
08:33 ClarusCogitatio joined #perl6
08:38 pdcawley joined #perl6
08:39 ClarusCogitatio joined #perl6
08:40 Mso150_o joined #perl6
08:41 rurban joined #perl6
08:45 molaf_ joined #perl6
08:46 woolfy left #perl6
08:48 pdcawley joined #perl6
08:51 bowtie joined #perl6
08:56 virtualsue joined #perl6
09:02 rurban joined #perl6
09:09 dakkar joined #perl6
09:10 djanatyn joined #perl6
09:13 arnsholt o/
09:13 Mso150_o joined #perl6
09:14 Tene joined #perl6
09:14 Tene joined #perl6
09:14 masak \o
09:18 ClarusCogitatio joined #perl6
09:19 kjs_ joined #perl6
09:34 Woodi joined #perl6
09:38 rindolf joined #perl6
09:40 pdcawley joined #perl6
09:44 masak I really like the approach taken to specification in http://spec.commonmark.org/0.7/
09:44 masak there's something about it that feels very close to the core idea of unit testing.
09:44 masak I think if I end up writing a language spec, I will end up using something like that.
09:47 denis_boyun_ joined #perl6
09:51 kjs_ joined #perl6
09:59 pecastro joined #perl6
10:00 lucas_ joined #perl6
10:03 lucas_ good morning, #perl6
10:03 yoleaux 5 Nov 2014 22:59Z <tony-o> lucas_: pod is for writing documentation, yaml isn't.  that isn't really a good comparison
10:04 kurahaupo joined #perl6
10:04 lucas_ tony-o: You're right. The YAML comparison was more like a joke, sorry.
10:09 lucas_ .tell Mouq Thank you for the note.
10:09 yoleaux lucas_: I'll pass your message to Mouq.
10:20 timotimo o/
10:25 timotimo .tell japhb https://github.com/japhb/perl6-bench/blob/master/perl6/string-escape - the code says otherwise
10:25 yoleaux timotimo: I'll pass your message to japhb.
10:28 virtualsue joined #perl6
10:35 kjs_ left #perl6
10:36 kjs_ joined #perl6
10:39 lucas_ So, the plan is to eventually merge the pod6ify specs branch into master in the future? So I guess my proposal to convert S15 and S26 to POD5 is rejected, right? It's ok. I didn't mean to go away from Pod6. I just think if those two documents were in POD5, they could be more reviewed, and so helping Pod6 specification progress. S15 is currently HTTP 404 on perlcabal. And S26 doesn't seen to have been generated recently.
10:41 moritz I've made pretty clear requirements for merging the pod6ify branch; nobody told me so far they they were met
10:41 moritz nor do I know if anybody works on it
10:42 moritz (the requirements are that the .html files can be generated fully automatically, including installing missing deps, like rakudo itself + modules)
10:50 ugator joined #perl6
10:53 timotimo so i'm wondering why GC seems so slow in my profiles
10:53 timotimo turns out i had a moarvm with --optimize=1 --debug=3 --asan
10:59 timotimo now "spinner" isn't hilariously slow any more. just "not very funny" slow.
11:14 azawawi joined #perl6
11:14 azawawi hi #perl6
11:15 azawawi m: my $x = ( "a" => 1, "b" => 2 ); $x.perl; %$x<c> = 10; $x;
11:15 camelia rakudo-moar 315ec6: ( no output )
11:15 azawawi m: my $x = ( "a" => 1, "b" => 2 ); $x.perl; %$x<c> = 10; say $x;
11:15 camelia rakudo-moar 315ec6: OUTPUT«"a" => 1 "b" => 2␤»
11:15 timotimo hey azawawi
11:15 azawawi m: my $x = { "a" => 1, "b" => 2 }; $x.perl; %$x<c> = 10; say $x;
11:15 camelia rakudo-moar 315ec6: OUTPUT«"a" => 1, "b" => 2, "c" => 10␤»
11:15 azawawi hmmm
11:15 timotimo azawawi: https://www.jetbrains.com/pycharm-educational/img/helloWorld@2x.png ← check this out :)
11:15 azawawi what am i doing wrong in this?
11:15 timotimo i'd love to see something like that in farabi6
11:16 timotimo you're doing $x.perl, but no .say?
11:16 azawawi interesting
11:16 azawawi m: my $x = ( "a" => 1, "b" => 2 ); $x.perl; %$x<c> = 10; say $x.perl;
11:16 camelia rakudo-moar 315ec6: OUTPUT«$("a" => 1, "b" => 2)␤»
11:16 timotimo usually, you'll use the hash assignment with a list of pairs to get what you want
11:17 timotimo if you assign to a scalar, it won't turn it into a hash for you, so you'd want .hash at the end or %(...) instead of just (...)
11:17 azawawi m: my $x = %( "a" => 1, "b" => 2 ); $x.perl; %$x<c> = 10; say $x.perl;
11:17 camelia rakudo-moar 315ec6: OUTPUT«{"a" => 1, "c" => 10, "b" => 2}␤»
11:17 azawawi a bit confusing lol
11:17 azawawi but i will live
11:18 * azawawi fixed his AMD machine and got a new SSD drive on it :)
11:18 timotimo nice
11:18 azawawi timotimo: jetbrains makes the best IDEs...
11:18 azawawi timotimo: and they're fast
11:19 timotimo yes
11:19 azawawi timotimo: and they have an excellent inspect code (static analysis) for java code...
11:19 timotimo yes
11:19 azawawi timotimo: detects deadlocks...
11:19 timotimo i was refering only to the idea of "tasks"
11:20 azawawi timotimo: please see https://github.com/azawawi/farabi6/issues/6
11:20 timotimo oh, hmm
11:20 timotimo that's not really a structured introductory course kind of thing
11:23 denis_boyun_ joined #perl6
11:24 azawawi I know but it is community driven
11:24 azawawi and it can serve as a data source for examples/recipes
11:24 timotimo sure
11:25 * azawawi takes a look at the perl 6 book section on hashes
11:25 timotimo i'd also like to see inside-the-source annotation thingies
11:25 timotimo codemirror surely has flags you can add in the gutter
11:25 azawawi timotimo: yup
11:26 timotimo how about marking sections of the code?
11:26 azawawi http://codemirror.net/demo/lint.html
11:26 azawawi we're already using marktext for ascii sequences
11:27 azawawi ascii color sequences
11:27 TuxCM joined #perl6
11:28 timotimo oh
11:28 timotimo neato
11:28 timotimo now all we need is a little mock-up :)
11:28 timotimo does it move marked text around for us when the user edits?
11:29 azawawi the perl6 book just mentions %( inside the subroutine chapter #4
11:30 azawawi i dont think so
11:30 azawawi but then again it didnt test it
11:30 azawawi it = i
11:30 timotimo it does
11:30 timotimo you can test it in the linter demo where it marks up the "var i = 0"
11:31 timotimo removing text before it will properly move the markup with it
11:31 azawawi that's a js linter
11:31 timotimo what i mean is:
11:31 azawawi it recalculates...
11:31 timotimo that's not what i mean, though :)
11:31 timotimo when you remove text before it, it will move the sign even before the recalculation happens
11:32 timotimo as in: the mark doesn't slip into the space after the = or onto the 0
11:32 azawawi how about formalizing your idea in a nice github issue? :)
11:33 azawawi im working right now on the perl6 debug integration
11:33 azawawi nearly there
11:33 timotimo i probably should :)
11:35 timotimo it's kinda weird; last time i looked at farabi, i didn't really take it serious at all
11:35 sqirrel__ joined #perl6
11:35 timotimo but now i'm pretty hype about it
11:35 timotimo maybe it's the redesign? all the UI work you've done?
11:35 timotimo that must be it
11:36 azawawi timotimo: dont worry... when im focused on something interesting, it will be finished :)
11:37 timotimo that's a good property to have
11:37 timotimo i've had trouble with that pretty much my whole life
11:37 azawawi timotimo: we can start another proto.html...
11:38 azawawi what's better my @results = gather { ... } and then storing it inside a hash value
11:38 azawawi or
11:38 azawawi my $results = gather { ... }
11:38 pdcawley joined #perl6
11:38 * azawawi is still new to Perl 6 types
11:39 timotimo it's almost the same thing
11:39 timotimo the list assignment will definitely cause the gather to be evaluated eagerly
11:40 timotimo i don't think the item assignment with my $results = gather { ... } will do that
11:40 azawawi which means @ it is more predictable in async code :)
11:40 timotimo fair enough
11:41 timotimo i was thinking about something:
11:41 timotimo how would you build an interface that'd let code that's run from a farabi interact with the farabi instance and the user's session?
11:42 timotimo the simplest thing would be to just use stdin/stdout, but that can very easily be "trampled" by user code
11:42 timotimo maybe the most robust way would be a TCP socket on the loopback network interface
11:42 azawawi im doing it right now with debug :)
11:43 timotimo have the port in an environment variable
11:43 azawawi but it is not 100% correct... i should use cookies
11:43 timotimo opening one port per running rakudo "subprocess"
11:43 timotimo you mean because it'd only ever understand a single running session?
11:45 azawawi right now, it is handing out incremental session ids.... not really robust
11:45 timotimo ah
11:45 azawawi but the work im doing on the perl6 debug integration will be useful in async output...
11:45 timotimo well, i suppose there could just be a single socket and it'd start off every connection with "hi; you gave me this here token on the environment variables, please let me in"
11:46 timotimo how important is it to make any async i/o stuff optional in farabi?
11:47 azawawi the fun thing begins when different editors can interact with the results of each other... :)
11:48 azawawi you're building code by simple blocks and testing each one at a time and then running them in different order
11:48 azawawi that's what scientific programming needs like PDL, ...etc
11:48 azawawi or that's at least what i understood from the PDL book :)
11:49 cognominal joined #perl6
11:50 ClarusCogitatio joined #perl6
11:50 mls joined #perl6
11:58 mirjam joined #perl6
12:03 felher I just checked out rakudo star 2014-09 on MoarVM. And _this_ _is_ _AWESOME_. Startup now is really fast enough for most of my tasks and maybe even for using Perl6 to update information in my Shell prompt. Big thanks to everyone contributing to that. :)
12:04 azawawi felher: latest rakudo is also way faster lol
12:05 moritz felher: \o/
12:05 felher azawawi: that's great news indeed. I can now start translating my perl5 scripts for prompt and interactive use to perl6 <3
12:06 felher And a few of my shellscripts too, probably
12:13 DarthGandalf joined #perl6
12:14 pdcawley joined #perl6
12:44 masak felher: http://memegenerator.net/instance/55998418
12:45 felher masak: :D
12:49 JimmyZ joined #perl6
12:51 lucas_ Alternative proposal: While the pod6ify thing doesn't settle, keep two separate copies of S15 and S26 in the same master branch, in Pod6 and POD5 formats. The new POD5 versions can be named *.pod5 or the existent Pod6 versions can be renamed to *.pod6. The specification writers can continue to patch the original Pod6 version, while I'll try to keep the POD5 version in sync. Once Pod6 takes over, the POD5 versions can simply be dropped.
12:51 lucas_ This is just in the interest of seeing them both rendered online and up-to-date. Do I have a "+1" from someone?
12:52 masak I'd try to avoid having "two masters".
12:52 masak dunno how close your proposal veers to that, though.
12:57 jokg joined #perl6
12:58 ribasushi (on a tangent) - is pod6 in a .pod file even valid...?
12:58 lucas_ masak: I don't know if I understood you correctly. But I think the original Pod6 versions should be official and the POD5 versions should be marked as a copy or stub or temporary...
12:58 jokg left #perl6
12:59 fhelmberger joined #perl6
13:00 masak is one generated from the other?
13:00 lucas_ masak: human-generated, yes :)
13:01 kaleem joined #perl6
13:01 lucas_ ribasushi: I think the spec doesn't require any specific filename extension.
13:02 ribasushi lucas_: I mean in terms of "be nice to the world" - a lot of stuff (one notable example is github) expects .pod to contain p5 pod
13:03 guru joined #perl6
13:04 lucas_ ribasushi: yes, I would prefer things to be named accordingly. That's why github doesn't know how to render those Pod6 files in *.pod extensions. It reports an error.
13:09 ghostlines joined #perl6
13:11 pdcawley joined #perl6
13:12 ugator joined #perl6
13:18 leont joined #perl6
13:47 ajr joined #perl6
13:47 jfredett joined #perl6
13:49 ajr_ joined #perl6
13:50 anaeem1_ joined #perl6
13:50 ajr_ joined #perl6
13:51 elekid left #perl6
13:55 ajr_ joined #perl6
14:19 xenoterracide joined #perl6
14:23 Tekk_ oh
14:30 pdcawley joined #perl6
14:32 raiph joined #perl6
14:50 sqirrel__ joined #perl6
14:54 timotimo m: slurp
14:54 camelia rakudo-moar 315ec6: ( no output )
14:54 timotimo m: say slurp
14:54 camelia rakudo-moar 315ec6: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
14:54 timotimo m: say slurp.comb[0]
14:54 camelia rakudo-moar 315ec6: OUTPUT«C␤»
14:54 timotimo m: say slurp.perl
14:54 camelia rakudo-moar 315ec6: OUTPUT«"Céad slán ag sléibhte maorga Chontae Dhún na nGall\nAgus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;\nNuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí\nI mo dhiaidh bhí gleanntáin ghlas’ Gha…»
14:54 timotimo locally i get a deprecation warning for IO::Handle.slurp
14:54 timotimo argfiles.slurp should continue to be available, IMO
14:58 timotimo how is s/foo/$0/ currently done correctly?
14:59 timotimo apparently .subst(/foo bar/, -> $/ { ... $0 ... })
14:59 thou joined #perl6
15:00 treehug88 joined #perl6
15:02 moritz didn't we have that working at some point?
15:02 moritz m: $_ = '42'; s/(.)2/500$0/; .say
15:02 camelia rakudo-moar 315ec6: OUTPUT«5004␤»
15:02 moritz works, no?
15:03 guru joined #perl6
15:08 FROGGS moritz: you're mixing s/// and .subst
15:08 FROGGS or timotimo
15:08 FROGGS (or both)
15:08 FROGGS :P
15:08 timotimo er
15:09 timotimo i tried s/ blah / $0 / and s[ blah ] = $0 and both gave "" for $0
15:09 timotimo i'm confused now.
15:11 moritz timotimo: well, bla doesn't capture
15:11 moritz timotimo: so $0 is empty
15:11 FROGGS m: my $a = "timotimo"; say $a ~~ s[timo] = "blah"
15:11 camelia rakudo-moar 315ec6: OUTPUT«True␤»
15:11 FROGGS m: my $a = "timotimo"; say $a ~~ s[timo] = "blah"; say $a
15:11 camelia rakudo-moar 315ec6: OUTPUT«True␤blahtimo␤»
15:11 timotimo well, my original code did have ( ) in them
15:11 FROGGS m: my $a = "timotimo"; say $a ~~ s[(timo)] = "$0blah"; say $a
15:11 camelia rakudo-moar 315ec6: OUTPUT«True␤timoblahtimo␤»
15:11 FROGGS hui
15:11 FROGGS works
15:12 moritz as did my example code above
15:12 moritz m: $_ = '42'; s/(.)2/500$0/; .say
15:12 camelia rakudo-moar 315ec6: OUTPUT«5004␤»
15:12 timotimo m: my $_ = "r3(10)"; s/ r(<digit>+) '(' (<digit>+) ')'/ wee $0 yay $1 /; .say
15:12 camelia rakudo-moar 315ec6: OUTPUT«Potential difficulties:â�¤    Redeclaration of symbol $_â�¤    at /tmp/biAtYmHnOs:1â�¤    ------> [32mmy $_ [33mâ��[31m= "r3(10)"; s/ r(<digit>+) '(' (<digit>+[0mâ�¤ wee 3 yay 10 â�¤Â»
15:12 timotimo er ...
15:12 timotimo i'm confused now.
15:12 FROGGS m: $_ = "r3(10)"; s/ r(<digit>+) '(' (<digit>+) ')'/ wee $0 yay $1 /; .say
15:12 camelia rakudo-moar 315ec6: OUTPUT« wee 3 yay 10 ␤»
15:13 haroldwu joined #perl6
15:14 timotimo s:g/ r(<.digit>+) '(' (<.digit>+) ')' / r$0\($1){ colorblock($0, $1) } /;
15:14 timotimo that's what i wrote
15:14 timotimo colorblock gets Nil two times
15:14 timotimo and my result contains r() a bunch of times
15:14 moritz oh, then it might be a problem with code blocks in s///
15:15 timotimo m: sub colorblock($a, $b) { "" }; my $_ = "r5(1); r6(6)"; s:g/ r(<.digit>+) '(' (<.digit>+) ')' / r$0\($1){ colorblock($0, $1) } /; .say
15:15 camelia rakudo-moar 315ec6: OUTPUT«Potential difficulties:â�¤    Redeclaration of symbol $_â�¤    at /tmp/vhFl7gkUQ2:1â�¤    ------> [32msub colorblock($a, $b) { "" }; my $_ [33mâ��[31m= "r5(1); r6(6)"; s:g/ r(<.digit>+) '(' [0mâ�¤ r5(1) ;  r6(6) â�¤Â»
15:15 timotimo m: sub colorblock($a, $b) { "" }; my $_ = "r5(1); r6(6)"; s:g/ r(<.digit>+) '(' (<.digit>+) ')' / roar$0\($1){ colorblock($0, $1) } /; .say
15:15 camelia rakudo-moar 315ec6: OUTPUT«Potential difficulties:â�¤    Redeclaration of symbol $_â�¤    at /tmp/NJxn3fcAhR:1â�¤    ------> [32msub colorblock($a, $b) { "" }; my $_ [33mâ��[31m= "r5(1); r6(6)"; s:g/ r(<.digit>+) '(' [0mâ�¤ roar5(1) ;  roar6(6) â�¤Â»
15:16 timotimo m: sub colorblock($a, $b) { "" }; for "r5(1)", "r6(2)" -> $_ is copy { s:g/ r(<.digit>+) '(' (<.digit>+) ')' / roar$0\($1){ colorblock($0, $1) } /; .say }
15:16 camelia rakudo-moar 315ec6: OUTPUT« roar() ␤ roar() ␤»
15:16 timotimo there we go.
15:16 timotimo it happens in a loop and that breaks it?
15:19 FROGGS yes, there is an open RT ticket about that
15:20 timotimo OK
15:20 timotimo kinda weird, but i'll accept it for now
15:20 timotimo https://imgur.com/N1sbOYa ← i can now color the registers for the spesh log like that
15:25 timotimo https://imgur.com/hFNJ0VV - a bit better, i think
15:31 Ven joined #perl6
15:32 Ven o/, #perl6
15:33 vendethiel joined #perl6
15:33 timotimo ohai ven
15:34 Ven m: sub f(::T @list, :(T --> Any) &fn) { @list.map(&fn) }; f((1, 2, 3), *+1)
15:34 camelia rakudo-moar 315ec6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/nM6Ww7EMVTâ�¤Missing blockâ�¤at /tmp/nM6Ww7EMVT:1â�¤------> [32msub f(::T @list, :(T --> Any) [33mâ��[31m&fn) { @list.map(&fn) }; f((1, 2, 3), *+[0mâ�¤    expecting any of:â�¤        statement l…»
15:34 Ven mmh :/ I guess subsignatures NYI?
15:35 timotimo you want to put the subsignature after the &fn
15:35 timotimo this is perl6, not c :)
15:36 hoelzro Ven: is that spec'd?
15:36 Ven m: sub f(::T @list, &fn :(T --> Any)) { @list.map(&fn) }; f((1, 2, 3), *+1)
15:36 camelia rakudo-moar 315ec6: OUTPUT«===SORRY!===␤Cannot invoke this object (REPR: P6opaque, cs = 0)␤»
15:36 timotimo std: sub f(::T @list, :(T --> Any) &fn) { @list.map(&fn) }; f((1, 2, 3), *+1)
15:36 Ven whoops.
15:36 camelia std 14ad63b: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse signature at /tmp/YtBhSmznrU line 1:�------> [32msub f[33m�[31m(::T @list, :(T --> Any) &fn) { @list.ma[0m�Couldn't find final ')'; gave up at /tmp/YtBhSmznrU line 1:�------> [32msub f(::T @list, :(T -…»
15:36 Ven hoelzro: yes
15:36 timotimo oh
15:36 Ven I belive timotimo on which way it's supoposed to be, tho
15:36 hoelzro Ven: could you send me a link to the relevant synopses? I've never seen that!
15:37 Ven hoelzro: S06, sub (int $n, &g_fact:(Str, int, int --> Grammar) --> Str) { ... } and stuff
15:37 hoelzro neat, thanks!
15:38 timotimo but there the subsignature is after the argument name
15:38 FROGGS m: sub f(::T @list, &fn(T --> Any)) { @list.map(&fn) }; f((1, 2, 3), *+1)
15:38 camelia rakudo-moar 315ec6: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in sub-signature of parameter &fn␤  in sub f at /tmp/1WMRyBqzBJ:1␤  in block <unit> at /tmp/1WMRyBqzBJ:1␤␤»
15:39 FROGGS ahh, that's the ticket masak opened just a few days ago
15:39 timotimo the one with a loop and s///?
15:41 FROGGS no, what I just did
15:42 timotimo ah
15:42 FROGGS the ticket about matches and $/ and $_ in loops is older
15:53 raiph joined #perl6
16:04 telex joined #perl6
16:11 slavik1 joined #perl6
16:17 timotimo so ... ^^ is supposed to be "beginning of string", right?
16:17 hoelzro moritz: ping
16:17 timotimo both ^ and ^^ at the beginning of the regex seem to scan through the whole string ...
16:17 timotimo that's not very efficient
16:19 timotimo ^ is bos, ^^ is bol
16:22 timotimo hum. the optimizer removes that
16:22 timotimo oh, maybe the optimizer can't handle the hooks the debugger throws in
16:24 timotimo yup.
16:33 timotimo sweet! now it optimizes even when the debugger is attached
16:33 kaleem joined #perl6
16:34 dalek nqp: 8c3b818 | (Timo Paulssen)++ | src/QRegex/P6Regex/Optimizer.nqp:
16:34 dalek nqp: ignore debugger-emitted code blocks in regex optimizer
16:34 dalek nqp: review: https://github.com/perl6/nqp/commit/8c3b818304
16:42 tony-o is there an equiv in p6 to p5's `times`?
16:42 raydiak \o mornin #perl6
16:44 TimToady tony-o: not that I am aware of
16:45 TimToady presumably this is something a POSIX module would supply
16:45 TimToady if we had one
16:45 TimToady so maybe it's a nativecall thing for now
16:46 tony-o TimToady: thanks - i think i'm back to trying to figure out how to do a union struct :-)
16:47 treehug88 joined #perl6
16:56 timotimo tony-o: do you know about nativecast?
16:56 tony-o i don't
16:57 timotimo https://github.com/timo/SDL2_raw-p6/blob/master/lib/SDL2/Raw.pm#L327 - this is how i turn a "generic" SDL_Event struct into a SDL_WindowEvent or SDL_KeyboardEvent depending on its flag value
16:57 dalek perl6-roast-data: 4f8d75a | coke++ | / (5 files):
16:57 dalek perl6-roast-data: today (automated commit)
16:57 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/4f8d75a587
16:59 [Coke] moar/moar-jit still the failingest backends.
16:59 [Coke] parrot still clean with 0 failures.
17:00 tony-o timotimo: interesting - i'm presuming the ordering of the attributes in those classes matters
17:00 timotimo of course
17:00 timotimo CStruct will lay them out like your C compiler would
17:00 timotimo if you have different layouts, the values you'll read will be garbled
17:02 timotimo how do i import MAST::Ops? do i need an extra -I path that points at install/lib/MAST?
17:02 tony-o timotimo: i see, the problem i'm having right now is getting a Win32 HANDLE to pass back and forth.  it seems to segfault but i can't really tell, i just have early termination with no message
17:02 virtualsue joined #perl6
17:03 timotimo $*VM.config<prefix> seems helpful
17:04 timotimo did you make sure to translate "int" from C to "int32" in perl6?
17:05 tony-o yea .. I've tried int and an empty OpaquePointer class, as well as a cstruct with an int32 $.unused (it exists that way in some of the .h i found)
17:07 tony-o i've tried various other types too
17:07 timotimo it seems like we're not installing MAST::Ops as a .moarvm file
17:07 timotimo just as the .nqp file :\
17:07 tony-o i'm trying to call GetCurrentProcess and then GetProcessTimes
17:08 tony-o for win32
17:08 timotimo oooh, *there* it is
17:12 timotimo hurm.
17:12 timotimo m: use MASTOps:from<NQP>; say MAST;
17:12 camelia rakudo-moar 315ec6: OUTPUT«===SORRY!===␤Object of type MAST in QAST::WVal, but not in SC␤»
17:12 timotimo m: use MASTOps:from<NQP>; say MAST::.keys;
17:12 camelia rakudo-moar 315ec6: OUTPUT«===SORRY!===␤Object of type MAST in QAST::WVal, but not in SC␤»
17:13 tony-o timotimo: https://github.com/tony-o/perl6-win32-time/blob/master/t/process.t
17:13 tony-o once i call 'GetProcessTimes', the script exits
17:14 tony-o 'GetProcessTimes' is in https://github.com/tony-o/perl6-win32-time/blob/master/lib/Win32/Performance.pm6
17:15 timotimo you should .= new
17:15 timotimo er, wait
17:15 timotimo scratch that
17:16 timotimo what are _In_ and _Out_ defined as?
17:16 timotimo when you pass a CStruct to a parameter in a C function, it's like passing a pointer
17:16 japhb .botsnack
17:16 yoleaux :D
17:16 yoleaux 10:25Z <timotimo> japhb: https://github.com/japhb/perl6-bench/blob/master/perl6/string-escape - the code says otherwise
17:16 raydiak tony-o: where does Win32::Performance::LPFILETIME come from?
17:17 tony-o i think it's just letting the reader know that the function sets _OUT_
17:17 timotimo https://github.com/tony-o/perl6-win32-time/blob/master/lib/Win32/Performance.pm6#L5
17:17 tony-o raydiak: i pushed a non working repo, that signature should be FILETIME
17:17 japhb timotimo: Ah!  I see the problem.  I fixed it (and another such benchmark bug) in my stress branch, and hadn't cherry-picked them back to master
17:17 tony-o LPFILETIME is a ptr to FILETIME
17:17 timotimo ah :)
17:17 raydiak ah, okay
17:17 timotimo tony-o: oh, right "long pointer"
17:17 japhb (Frankly, I was hoping to have the last critical piece of stress done by now)
17:17 timotimo (lol)
17:18 timotimo tony-o: yeah, the Win32::Performance::FILETIME should all read just FILETIME?
17:18 tony-o yea
17:19 tony-o and it works great when i call GetSystemTimeAsFileTime
17:19 TuxCM joined #perl6
17:19 timotimo the HANDLE has the right type, too?
17:19 tony-o i believe so
17:19 timotimo i don't think so, tbh
17:20 timotimo it should probably be class HANDLE is repr('CPointer') { }
17:20 timotimo and the class PVoid ... i don't think that can work
17:20 timotimo CPointer should not have attributes
17:20 tony-o i had it that way yesterday and i have the same behavior with it
17:21 tony-o i pushed that up to the repo if you want to look
17:21 timotimo i'd like a definite version that's exactly the way it works
17:21 tony-o refresh
17:21 timotimo ah thanks
17:22 kaare_ joined #perl6
17:22 timotimo hm
17:22 timotimo it might be a 32bit vs 64bit problem?
17:22 * TimToady wonders if we need an explicit notation to express the difference between a P6 int and a C int, since they are not specced to be identical
17:23 timotimo aye, that bit me when i built SDL2::Raw
17:25 timotimo star: use NativeCall; class Test is repr('CPointer') { has int $.test }
17:25 camelia star-{m,p} 2014.09: ( no output )
17:25 timotimo i kind of think that should explode
17:25 timotimo star: use NativeCall; class Test is repr('CPointer') { has int $.test }; Test.new.test = 1
17:25 camelia star-p 2014.09: OUTPUT«CPointer representation does not support attribute storage␤  in method test at gen/parrot/CORE.setting:3204␤  in block <unit> at /tmp/tmpfile:1␤␤»
17:25 camelia ..star-m 2014.09: OUTPUT«This representation (CPointer) does not support attribute storage␤  in method test at src/gen/m-CORE.setting:3195␤  in block <unit> at /tmp/tmpfile:1␤␤»
17:25 TimToady it's specced to explode
17:26 timotimo tony-o: what's your C-level debugging tools you have available?
17:27 tony-o gcc on cygwin
17:27 tony-o do you want me to write t in c and get it to work?
17:27 timotimo can you gdb where exactly that explodes? use a moarvm that uses asan?
17:27 timotimo may be a good idea, just so we can rule out different weirdnesses
17:28 tony-o okay, ill test it out in c and if that doesnt dump then ill try to debug through moar
17:29 tony-o im limited to debugging moar through whatever the msi from rakudo star is though, i cant get perl6 to build from source
17:29 timotimo d'oh :(
17:29 TimToady S12:93 specs that things like int may only add behaviors, not change representations
17:29 synopsebot Link: http://perlcabal.org/syn/S12.html#line_93
17:29 timotimo i have pretty much zero experience with windows c development
17:30 TimToady and a CPointer is about as native as you can get...
17:33 tony-o TimToady: that was my initial thought  . i could just use it as the pointer and just never worry about since i dont actually need its contents
17:33 timotimo roar
17:34 timotimo how do i get at the stuff that's defined in MASTOps.moarvm? :\
17:38 [Sno] joined #perl6
17:55 Gothmog_ joined #perl6
18:07 * timotimo hacked update_ops.pl to create a perl6 MAST/Ops.pm inside tools/ ... and feels bad
18:07 timotimo but afk now
18:14 FROGGS joined #perl6
18:17 denis_boyun_ joined #perl6
18:17 grettis joined #perl6
18:21 alexghacker joined #perl6
18:24 Mso150_o joined #perl6
18:33 ugator joined #perl6
18:40 gfldex joined #perl6
18:48 SevenWolf joined #perl6
18:52 rindolf joined #perl6
18:53 raydiak m: say "√4=" ~ &infix:<**>.assuming(*, .5)(4)
18:53 camelia rakudo-moar 315ec6: OUTPUT«Too many positionals passed; expected 0 to 2 arguments but got 3␤  in sub infix:<**> at src/gen/m-CORE.setting:4511␤  in sub CURRIED at src/gen/m-CORE.setting:3479␤  in block <unit> at /tmp/pm4laQNcoW:1␤␤»
18:53 raydiak is skipping a positional when currying NYI, or just broken?
18:56 moritz raydiak: NYI, I think
18:57 raydiak thanks
19:05 ghostlines joined #perl6
19:06 ghostlines joined #perl6
19:13 rindolf joined #perl6
19:19 timotimo yes :(
19:22 timotimo back at the keyboard
19:24 virtualsue joined #perl6
19:33 ugator Hello :) How to generate random whole numbers?  say 10.rand.int is what the cookbook suggests, but that doesnt work... thx
19:35 [Coke] m: say 10.rand; say 10.rand.Int;
19:35 camelia rakudo-moar 315ec6: OUTPUT«6.74151883360017␤1␤»
19:35 [Coke] m: say 10.rand.int
19:35 camelia rakudo-moar 315ec6: OUTPUT«No such method 'int' for invocant of type 'Num'␤  in block <unit> at /tmp/nRvGfJyQOc:1␤␤»
19:35 ivanshmakov joined #perl6
19:36 ugator thx coke, that explains it^^ typo in cookbook then
19:36 PerlJam ugator: what is this cookbook of which you speak?
19:36 PerlJam ugator: do you mean the Using Perl 6 book ?
19:37 ugator no... http://search.cpan.org/~szabgab/Perl6-Cookbook-0.05/lib/Perl6/Cookbook/02_Numbers.pod
19:37 ugator found with google...
19:37 raydiak 09, eh?
19:38 ugator so is this deprecated?
19:38 leont That's from 2009
19:40 PerlJam ugator: you could bug Gabor about it. Let him know that you're using his tutorial and could he update it.
19:42 alexghacker speaking of deprecated, I see that slurp($handle,...) is deprecated in favor of slurp($path,...), but that isn't a complete replacement for slurp($handle,...)
19:43 alexghacker in particular, if you've already read some data from a handle, slurp will pull the remainder preserving newlines
19:45 alexghacker I've tried a few other ways to get the same effect, but haven't hit on one yet
19:45 PerlJam alexghacker++ good point.
19:45 ghostlines joined #perl6
19:46 alexghacker Actually, I can do $fh.lines.join("\n")
19:46 alexghacker but that seems wrong
19:49 Sqirrel joined #perl6
19:49 [Coke] f
19:50 [Coke] ww
19:51 PerlJam I wonder why IO::Handle.slurp was deprecated ... anyone got a quick link to the disucssion about it?
19:53 spider-mario joined #perl6
20:02 spider-mario joined #perl6
20:03 dalek cpandatesters.perl6.org: ad94453 | (Tobias Leich)++ | / (3 files):
20:03 dalek cpandatesters.perl6.org: show dist quality in /dists
20:03 dalek cpandatesters.perl6.org: review: https://github.com/perl6/cpandatesters.perl6.org/commit/ad94453dca
20:08 Mso150 joined #perl6
20:13 Mso150_e joined #perl6
20:14 raydiak I see a deprecation on the same day for IO::Handle.spurt, with a commit message "In favour of IO::Path.spurt.  Spurting on an opened handle is not really anything else but print/write on the handle."
20:14 raydiak guess the same train of thought was applied to slurp and lines/read?
20:14 denis_boyun_ joined #perl6
20:15 alexghacker the closest I saw to discussion in the IRC logs was long after the commit: http://irclog.perlgeek.de/perl6/2014-10-30#i_9588620
20:17 alexghacker I personally find the need for spurt to be dubious on any context, but think slurp could apply just as well to pipes and partially read files as it does to whole files
20:18 FROGGS well, I am in favour of Str.slurp and Str.spurt
20:19 lucas_ joined #perl6
20:19 raydiak is it either/or?
20:20 alexghacker shouldn't be
20:21 lucas_ Is Perl6::Perl5::Differences considered spec material or just aside material? Any chances of it moving from mu to specs and being maintained as a full "Perl 5 vs Perl 6 differences" spec file? Say S34 or S98?
20:21 moritz lucas_: just aside material
20:22 moritz lucas_: and IMHO it doesn't belong into the synopsis
20:22 lucas_ moritz: ok, thank you.
20:22 [Coke] moritz++
20:23 spider-mario joined #perl6
20:23 alexghacker moritz++ I do see that you suggested maybe a .readall method for handles as an alternative to slurp
20:24 alexghacker would that be functionally equivalent but named differently for aesthetic and expectation reasons?
20:25 moritz alexghacker: IMHO it would be fairly obvious that readall works on an opened file handle, reads everything from the current position onwards, and doesn't close the handle
20:25 moritz alexghacker: whereas as a user I wouldn't have any idea what state my file handle would be in after a .slurp
20:25 alexghacker I'll buy that explanation
20:26 moritz would it be where I left it (and what if the handle wasn't seekable)? or at the end of the file, but still open? or closed?
20:26 moritz or rewound to the start, if seekable?
20:28 spider-mario joined #perl6
20:31 ghostlines joined #perl6
20:35 bjz joined #perl6
20:48 beastd joined #perl6
20:49 labster joined #perl6
20:51 bjz joined #perl6
20:51 Mso150 joined #perl6
21:06 raiph joined #perl6
21:06 Mso150 joined #perl6
21:28 cognominal joined #perl6
21:48 timotimo we could have .slurp-rest
21:49 timotimo hm, that doesn't address the "does it close the file?" question, though
21:49 timotimo how do i get the path to the currently-being-executed source file?
21:49 FROGGS $?FILE ?
21:50 timotimo that does it
21:50 timotimo i haven't had to deal with paths a lot recently
21:58 timotimo ... do i really have to .path.method-for-path.path.method-for-path.path.method-for-path?
21:59 timotimo ah .parent gives me what dirname would do but as a path rather than a string
22:08 denis_boyun_ joined #perl6
22:14 telex joined #perl6
22:23 raiph joined #perl6
22:30 timotimo damn, even when / ... / { ... } will not set $/ correctly if it's in a loop?
22:31 timotimo um ...
22:34 raydiak RT #123005
22:34 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123005
22:35 raydiak related, I guess
22:37 timotimo i might have been wrong, gimme a sec.
22:39 timotimo ah, i derped
22:39 timotimo good.
22:39 timotimo phew!
22:40 raydiak "the breakage was only in my brain, what a relief" :)
22:44 timotimo :)
22:44 timotimo that means i'm the only one who has that problem ;)
22:44 timotimo the problem was that i had ( ) around the submatch i was interested in, but i wasn't aware i put it there
22:45 guru joined #perl6
22:47 raydiak you out-witted yourself :)
22:47 * raydiak afk
22:51 BenGoldberg joined #perl6
22:54 pmurias joined #perl6
22:55 pmurias we have a rady for production date of February 2015?
22:57 bbkr joined #perl6
22:58 lizmat joined #perl6
22:58 bbkr r: ["a", "b"] ~~ [ *, "b" ]
22:58 yoleaux 24 Oct 2014 02:27Z <tony-o> bbkr: couldn't duplicate moar build segfault on yosemite.  was able to reproduce your bug @ https://rt.perl.org/Public/Bug/Display.html?id=122803
22:58 camelia rakudo-moar 315ec6: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)␤  in method Numeric at src/gen/m-CORE.setting:13670␤  in sub infix:<==> at src/gen/m-CORE.setting:4522␤  in sub infix:<==> at src/gen/m-C…»
22:58 camelia ..rakudo-parrot 315ec6: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)␤  in method Numeric at gen/parrot/CORE.setting:13609␤  in sub infix:<==> at gen/parrot/CORE.setting:4526␤  in sub infix:<==> at gen/par…»
22:59 bbkr is this behavior a bug?
23:00 bbkr r: [1, 2, 3] ~~ [ *, 2, 3 ]
23:00 camelia rakudo-{parrot,moar} 315ec6: ( no output )
23:01 woolfy joined #perl6
23:01 bbkr why rakudo wants to convert first array to numerics when it is matched against second array containing whatever?
23:03 timotimo m: say (1, 2, 3) ~~ (*, 2, 3)
23:03 camelia rakudo-moar 315ec6: OUTPUT«True␤»
23:03 timotimo i think you want this one instead
23:03 timotimo m: say <a b c> ~~ (*, "b", "c")
23:03 camelia rakudo-moar 315ec6: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏a' (indicated by ⏏)␤  in method Numeric at src/gen/m-CORE.setting:13670␤  in sub infix:<==> at src/gen/m-CORE.setting:4522␤  in sub infix:<==> at src/gen/m-C…»
23:03 timotimo oh, huh.
23:03 timotimo that doesn't seem right to me
23:03 timotimo bbkr++
23:03 bbkr reporting :)
23:04 woolfy joined #perl6
23:06 bbkr r: say so ["a", "b", "c"] ~~ [ "a", "b", * ]
23:06 camelia rakudo-{parrot,moar} 315ec6: OUTPUT«True␤»
23:06 bbkr r: say so ["a", "b", "c"] ~~ [ "a", *, "b" ]
23:06 camelia rakudo-parrot 315ec6: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏b' (indicated by ⏏)␤  in method Numeric at gen/parrot/CORE.setting:13609␤  in sub infix:<==> at gen/parrot/CORE.setting:4526␤  in sub infix:<==> at gen/par…»
23:06 camelia ..rakudo-moar 315ec6: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏b' (indicated by ⏏)␤  in method Numeric at src/gen/m-CORE.setting:13670␤  in sub infix:<==> at src/gen/m-CORE.setting:4522␤  in sub infix:<==> at src/gen/m-C…»
23:09 woolfy joined #perl6
23:11 woolfy1 joined #perl6
23:13 * raydiak !afk
23:26 erkan joined #perl6
23:27 denis_boyun joined #perl6
23:30 grettis joined #perl6
23:31 raydiak so I need a name for the command-line interface for math::symbolic that gets installed in bin
23:32 raydiak how is 'ms'? it doesn't seem to be anything on my server or my laptop, or a very brief search
23:32 adu joined #perl6
23:34 pmurias s/rady/ready/
23:35 lucas_ raydiak: hi. isn't "ms" too short? don't you like mathsym or symmath?
23:36 raydiak lucas_: sure, that might be more appropriate...thanks
23:37 pmurias https://fosdem.org/2015/schedule/event/get_ready_to_party/ # that's what prompted my "ready date" question
23:39 raydiak pmurias: it doesn't directly imply that the talk will be taking place after the release
23:40 lizmat raydiak: wrt http://irclog.perlgeek.de/perl6/2014-11-06#i_9621580 , I hadn't considered your use of slurp
23:40 lizmat so I'll probably undeprecate that
23:41 lizmat wrt IO::Handle.spurt
23:41 lizmat I still think that should be deprecated
23:41 raydiak lizmat: what about moritz's 'readall' alternative suggestion to slurp?
23:41 jack_rabbit joined #perl6
23:42 raydiak http://irclog.perlgeek.de/perl6/2014-11-06#i_9621652
23:42 panchiniak joined #perl6
23:43 pmurias raydiak: do we have a release date?
23:43 raydiak pmurias: not that I've seen myself, but I've seen this question a lot lately...but I'm no authority on...much of anything :)
23:45 lizmat raydiak  moritz:  I'm not sure we need another name
23:45 lizmat IO::Path.slurp clearly closes the file afterwards, as there is no handle exposed at all
23:46 lizmat IO::Handle.slurp *doesn't* close the handle at the end, because it was handed a handle, and you need to close those explicitely
23:46 lizmat (as it is implemented now)
23:46 raydiak where does it leave the file reading cursor thing that I don't know the proper name of?
23:47 raydiak beginning? end? where it was before the .slurp?
23:47 lizmat file pointer
23:47 lizmat no, where it was at the end of the slurp
23:47 lizmat if you opened the handle in read/write, you *could* actually start writing again there
23:48 raydiak cool, makes sense
23:49 lizmat so the only thing that needs to be done, is undeprecate it
23:49 TimToady and possibly rename it to slurprest or so
23:50 lizmat TimToady: really?
23:50 pmurias TimToady: do we have an official "production ready" date?
23:50 lizmat pmurias: don't think so
23:50 TimToady no, merely that 2015 will likely contain that data :)
23:51 TimToady *date
23:51 xiaomiao joined #perl6
23:52 * pmurias got confused by a troll claiming that we do have one in February and pointing to this talk ;)
23:52 TimToady trolls cannot read
23:56 lizmat and it's actually in January (31st, but still :-)
23:56 tony-o is any of the author/module thing implemented yet? i have Benchmark module ported from p5 but there is already one in the landscape..
23:57 lizmat tony-o: alas, still NYI  :-(
23:57 tony-o or is that nyi?
23:57 tony-o maybe ill call it superbenchmark
23:57 BenGoldberg Perhaps instead of naming the method slurp or slurprest, "read-to-end" ?
23:58 BenGoldberg Methods-with-hyphens are perl-sixy :)
23:58 tony-o slurp-rest
23:58 lizmat oddly enough, I think slurp() is one of the first Perl 6 things that got backported to p5
23:59 tony-o slurp is really nice

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

Perl 6 | Reference Documentation | Rakudo