Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-05-15

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:09 benabik joined #perl6
00:17 xinming_ joined #perl6
00:19 s1n joined #perl6
00:53 mikemol joined #perl6
00:54 havenn joined #perl6
01:04 scott_ joined #perl6
01:10 BlueT_ joined #perl6
01:36 thou joined #perl6
01:37 cognominal what is the perl6 equivalent of perl5 'system' function?
01:51 TimToady run
01:51 TimToady or more likely, shell
01:59 colomon n: '   quack'.indent(-4)
01:59 p6eval niecza v17-4-ge5b869e: OUTPUT«Asked to remove 4 spaces, but the shortest indent is 3 spaces␤  at /home/p6eval/niecza/lib/CORE.setting line 1226 (warn @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 913 (ANON @ 10) ␤  at /home/p6eval/niecza/lib/CORE.setting line 926 (Str.indent @ 10…
02:03 dalek roast: a4fdd4f | (Solomon Foster)++ | S32-str/indent.t:
02:03 dalek roast: Niecza unfudge.
02:03 dalek roast: review: https://github.com/perl6/roast/commit/a4fdd4f415
02:14 cognominal indeed, system is 'shell' in rakudo. probably forbidden by the bot
02:14 cognominal r: shell 'echo "lalie"'
02:14 p6eval rakudo eb0580: OUTPUT«shell is disallowed in safe mode␤  in sub restricted at src/SAFE.setting:2␤  in sub shell at src/SAFE.setting:7␤  in block <anon> at /tmp/38HkuGHgVA:1␤␤»
02:15 s1n joined #perl6
02:15 cognominal and that's 'echo "lalia"' in English.
02:18 TimToady we just happen to be watching a Charlie Rose Brain Series episode about autism, and they just memtioned echolalia :)
02:19 TimToady .oO(you can say that again)
02:21 leprevost joined #perl6
02:22 cognominal r: echo 'praxy'
02:22 p6eval rakudo eb0580: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&echo' called (line 1)␤»
02:26 cognominal btw, that's an autopun, for masak
02:29 orafu joined #perl6
02:31 cognominal google really wants to complete autopun in autopunition. BooK, the oulipian,  would say that because an autopun is based on a constraint. Oulipians are true masochists, they love constraints.
02:31 TimToady .oO(that goes without saying)
02:32 adu joined #perl6
02:34 cognominal Perl6 is an "ouvroir de digilittérature porentielle". The pun-ition is the chosen slang
02:34 cognominal *potentielle
02:35 adu cognominal: what does that mean in English
02:35 cognominal sdu : http://en.wikipedia.org/wiki/Oulipo to get the context
02:37 adu oh
02:37 adu that sounds nice
02:37 adu is that related to lingua franca?
02:38 cognominal BooK is a mongueur (francophone monger) who is a member of the oulipo and likes rose, maybe because Rrose Sélavy  http://en.wikipedia.org/wiki/Rrose_S%C3%A9lavy
02:40 cognominal the discipline (sic) has been invented by the French, but you can get a correction in any language included artificial ones. Golfing is very much in the Oulipo spirit.
02:41 cognominal *including
02:42 adu I just wonder how long before people will start publishing official normative language specifications in Perl6 grammars instead of EBNF
02:45 tokuhirom joined #perl6
02:49 cognominal adu:  I don't know about specs but I know one thing for sure : with Perl 5, you could import perl 5 regexen in a language. With Perl 6, if a language wants to support Perl 6 regexen, the language has no choice but to be assimilated as a Perl 6 slang.
02:50 cognominal I don't know if languages have free will, but apparently Perl 6 gives them a manifest destiny.
02:51 cognominal A microsoftish one, assimilation.
02:52 adu I don't think so
02:53 cognominal About manifest destiny, some day Perl 6 will invade Mexico.  :)
02:54 adu http://paulgraham.com/vanlfsp.html
02:56 adu I believe there will always be room for languages that can't do that much
03:16 araujo joined #perl6
03:16 araujo joined #perl6
03:42 xinming joined #perl6
04:01 baest joined #perl6
04:20 Entonian joined #perl6
04:47 Radvendii joined #perl6
04:47 Radvendii hey guys
04:47 Radvendii I had an idea
04:47 Radvendii but I'm not sure if it's already in perl6
04:48 moritz \o
04:48 Radvendii The idea is this: just like the &postfix:<++> operator incriments after the current line is done, what if that were a general thing?
04:49 Radvendii so I could say "say $a <after>= Nil"
04:49 Radvendii and that would say $a, and then assign it NIl
04:49 Radvendii that's kind of a trivial example...
04:49 Radvendii but it would be useful inside a .map()
04:50 moritz certainly doable as a module
04:51 Radvendii how would the module know when to execute the command?
04:53 Radvendii anyways. It was a thought to consider. I should actually be going to bed though. I'll see y'all later!
04:53 Radvendii o/
04:58 NamelessTee joined #perl6
04:59 scott_ joined #perl6
05:02 adu so many ideas
05:02 birdwindupbird joined #perl6
05:15 d4l3k_ joined #perl6
05:17 ddima joined #perl6
05:17 preflex_ joined #perl6
05:18 orafu joined #perl6
05:29 sorear phenny: tell Radvendii postfix:<++> does not, strictly speaking, wait until the 'current line is done'.  Try say $i++, $i;
05:29 phenny sorear: I'll pass that on when Radvendii is around.
05:41 adu hi sorear
05:41 sorear hello, adu
05:44 japhb joined #perl6
05:47 kaleem joined #perl6
05:53 Tedd1 joined #perl6
05:56 mucker joined #perl6
06:06 lestrrat joined #perl6
06:09 japhb joined #perl6
06:15 adu how would I define "between"?
06:16 mucker joined #perl6
06:17 wtw joined #perl6
06:17 sorear n: say 1 < 3 < 10; say 1 < 11 < 10; say 1 < -5 < 10
06:17 p6eval niecza v17-4-ge5b869e: OUTPUT«True␤False␤False␤»
06:18 sorear n: say 3 ~~ 1..10; say 11 ~~ 1..10; say -5 ~~ 1..10
06:18 p6eval niecza v17-4-ge5b869e: OUTPUT«True␤False␤False␤»
06:18 sorear adu, do either of those work for you?
06:20 adu sorear: I was thinking more like: token dq ($rule) { '"' ~ '"' $rule }
06:21 quicoju joined #perl6
06:22 sorear n: my token dq ($rule) { '"' ~ '~' $rule } ; say 'foo "bar" baz' ~~ / <dq \w+> /
06:22 p6eval niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: Unable to parse dq␤Couldn't find final '~'; gave up␤  at /home/p6eval/niecza/lib/CORE.setting line 1366 (die @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2657 (Cursor.FAILGOAL @ 5) ␤  at /tmp/_QEtLO7dxj line 1 (dq @ 8) ␤  at /tm…
06:22 sorear n: my token dq ($rule) { '"' ~ '"' $rule } ; say 'foo "bar" baz' ~~ / <dq \w+> /
06:22 p6eval niecza v17-4-ge5b869e: OUTPUT«#<match from(4) to(9) text("bar") pos([].list) named({"dq" => #<match from(4) to(9) text("bar") pos([].list) named({}.hash)>}.hash)>␤»
06:22 sorear you mean like that?
06:22 adu yes :)
06:22 nebuchadnezzar hi
06:24 Tedd1 joined #perl6
06:24 japhb joined #perl6
06:39 sorear nebuchadnezzar: hi!
06:49 fhelmberger joined #perl6
07:05 brrt joined #perl6
07:09 lestrrat joined #perl6
07:24 goraki joined #perl6
07:27 kresike joined #perl6
07:30 icwiener joined #perl6
07:30 fglock joined #perl6
07:35 sisar joined #perl6
07:51 masak mornin', #perl6
07:52 sisar o/
07:53 moritz \o
07:57 goraki morning.
08:03 japhb joined #perl6
08:07 sorear o/
08:16 daxim joined #perl6
08:18 moritz wow, I wrote some C code in rakudo, and it doesn't segfault! (yet? :-)
08:22 mucker joined #perl6
08:24 * masak takes that as a challenge ;)
08:24 sporous joined #perl6
08:24 preflex joined #perl6
08:25 sporous joined #perl6
08:26 moritz masak: with a bit of luck, there'll be a commit (in a branch) soon :-)
08:26 masak yay
08:27 sporous joined #perl6
08:29 jnthn Good mornin'
08:30 masak jnthn! \o/
08:30 jnthn moritz: To probabalistically segfault, do "int *x = (int *)rand(); int y = *x;" ;-)
08:30 moritz $ make && ./perl6 -e 'try my Int $x := "foo"; say $!.WHAT'
08:30 moritz X::TypeCheck::Binding()
08:30 jnthn ooh :)
08:30 masak ooh!
08:32 moritz r: my Int $x := 'Foo';
08:32 p6eval rakudo eb0580: OUTPUT«Type check failed in binding␤  in block <anon> at /tmp/3ZUHRrs7JT:1␤␤»
08:33 dalek rakudo/typed-ex-from-c: 1a61704 | moritz++ | src/ (2 files):
08:33 dalek rakudo/typed-ex-from-c: first shot at throwing typed exceptions from C
08:33 dalek rakudo/typed-ex-from-c:
08:33 dalek rakudo/typed-ex-from-c: for binding type checks.
08:33 dalek rakudo/typed-ex-from-c: Very whacky right now.
08:33 dalek rakudo/typed-ex-from-c: review: https://github.com/rakudo/rakudo/commit/1a61704376
08:34 alim joined #perl6
08:35 moritz ok, this will break horribly when it ever goes wrong while compiling the setting
08:36 masak oh, right. German conflates 'when' and 'if'.
08:36 masak that's gotta be confusing sometimes.
08:36 jnthn masak: No. It *will* go wrong. :P
08:36 masak heh.
08:36 moritz :-)
08:36 jnthn moritz: if (PMC_IS_NULL(thrower)) { ...do the throw... } else { ...the usual thing... }
08:37 moritz jnthn: well, I guess I have to add way more PMC_IS_NULL checks
08:37 jnthn Er. Explained that badly but hopefully it's clear enough :)
08:37 masak shouldn't even need the 'else' there, no?
08:37 moritz jnthn: for the namespace thing for example
08:37 moritz jnthn: the question is how to factor it best
08:38 moritz maybe an inline PMC* get_throw(const char *)
08:38 jnthn masak: Don't need it, no; it just comes down to style. :)
08:38 jnthn moritz: Yeah...just stash it in the section at the top of ops, where we have other functions (like the phasers stuff).
08:42 masak jnthn: it does. Perl has taught me (through 'last unless ...' et al.) that it's quite nice (visually) to 'fail fast' and de-indent as soon as possible.
08:44 dakkar joined #perl6
08:45 jnthn masak: Yeah, though in this case you're choosing how to fail. ;-) Agree though, I normally do exactly what you're saying.
08:45 moritz well
08:46 moritz in this case, the "do the throw" *might* not actually throw
08:46 moritz if the author of the thrower screwed up
08:48 masak er. what?
08:48 jnthn :D
08:48 jnthn It made sense to me :P
08:48 masak sounds like saying "with a 10% probability, the 'die' will actually continue execution."
08:49 jnthn masak: Only if the dier doesn't die, which would be a dire bug. :)
08:49 masak :P
08:50 moritz dire but deterministic
08:51 * masak .oO( I like my universes like I like my source code... )
08:53 * moritz likes dire straits (the band, that is)
08:53 * masak auch
08:55 moritz two years ago I was at an awesome concert by Mark Knopfler
08:55 moritz open air, very nice atmosphere, very high sound quality
08:59 moritz jnthn: is there a simple rule when to use Parrot_str_new vs. Parrot_str_new_constant ?
09:07 jnthn moritz: Is it a C literal? YES: use Parrot_str_new_constant. NO: don't.
09:08 moritz jnthn: all existing use cases of Parrot_str_new in perl6.ops work on C literals :-)
09:09 jnthn Well. That's probably not very efficient :)
09:09 jnthn Apart from the person typing it. :)
09:09 moritz I can change that later
09:10 dalek rakudo/typed-ex-from-c: c310a27 | moritz++ | src/ops/perl6.ops:
09:10 dalek rakudo/typed-ex-from-c: add a function for getting the thrower for typed exceptions
09:10 dalek rakudo/typed-ex-from-c: review: https://github.com/rakudo/rakudo/commit/c310a278e2
09:18 dalek Perlito: 1d5cf89 | (Flavio S. Glock)++ | / (5 files):
09:18 dalek Perlito: Perlito5 - parser: new module Perlito5::Grammar::Sigil
09:18 dalek Perlito: review: https://github.com/fglock/Perlito/commit/1d5cf89b85
09:18 dalek Perlito: ee50878 | (Flavio S. Glock)++ | / (5 files):
09:18 dalek Perlito: Perlito5 - parser: use new module Perlito5::Grammar::Sigil
09:18 dalek Perlito: review: https://github.com/fglock/Perlito/commit/ee508780eb
09:18 dalek Perlito: b743846 | (Flavio S. Glock)++ | html/perlito5.js:
09:18 dalek Perlito: Perlito5 - recompile html/perlito5.js
09:18 dalek Perlito: review: https://github.com/fglock/Perlito/commit/b7438460cb
09:18 dalek Perlito: c29e335 | (Flavio S. Glock)++ | / (3 files):
09:18 dalek Perlito: Merge branch 'master' of git@github.com:fglock/Perlito
09:18 dalek Perlito: review: https://github.com/fglock/Perlito/commit/c29e3356f8
09:19 araujo joined #perl6
09:23 nsheth joined #perl6
09:26 moritz jnthn: ok. I've added a   BEGIN my Str $x := 3;  at the end of Str.pm, and it correctly threw the "Type check failed in binding" message during setting compilation
09:26 moritz jnthn: so I'm happy with the branch. Any objections to merging?
09:28 jnthn moritz: No, go ahead. :)
09:31 drbean joined #perl6
09:40 cogno joined #perl6
09:41 drbean joined #perl6
09:42 dalek rakudo/nom: 1a61704 | moritz++ | src/ (2 files):
09:42 dalek rakudo/nom: first shot at throwing typed exceptions from C
09:42 dalek rakudo/nom:
09:42 dalek rakudo/nom: for binding type checks.
09:42 dalek rakudo/nom: Very whacky right now.
09:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1a61704376
09:42 dalek rakudo/nom: c310a27 | moritz++ | src/ops/perl6.ops:
09:42 dalek rakudo/nom: add a function for getting the thrower for typed exceptions
09:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c310a278e2
09:42 dalek rakudo/nom: 82b9879 | moritz++ | src/ops/perl6.ops:
09:42 dalek rakudo/nom: use Parrot_str_new_constant where possible
09:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/82b98791f9
09:44 cogno In the wp article about Rudolf Carnap : "In the U.S, the concept of logical syntax helped the development of natural language processing and compiler design (the Parrot virtual machine and LLVM). ". Wtf do they mean?    http://en.wikipedia.org/wiki/Rudolf_Carnap
09:45 icwiener joined #perl6
09:46 moritz that lookos pretty far fetch to me
09:46 moritz *looks
09:47 moritz cogno: add a 'citation needed' tag to it :-)
09:48 bacek joined #perl6
09:49 cogno Lookos, as loco in spanish, maybe
09:50 drbean joined #perl6
09:53 dalek rakudo/nom: 4687e02 | moritz++ | src/ (2 files):
09:53 dalek rakudo/nom: typed exception for return type check failure
09:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4687e0217f
09:53 dalek roast: cb7e988 | moritz++ | S32-exceptions/misc.t:
09:53 dalek roast: test X::TypeCheck::Binding and X::TypeCheck::Return
09:53 dalek roast: review: https://github.com/perl6/roast/commit/cb7e988363
09:54 moritz now we're at 300 tests for typed exceptions
09:55 drbean_ joined #perl6
09:57 jnthn moritz++
09:58 masak moritz++
09:58 moritz jnthn: is the "%Ss is not in the dynamic scope of a dispatcher" error user-facing in any way?
09:59 moritz and if yes, how do I trigger it? :-)
09:59 jnthn r: nextsame
09:59 p6eval rakudo eb0580: OUTPUT«nextsame is not in the dynamic scope of a dispatcher␤  in block <anon> at src/gen/CORE.setting:429␤  in block <anon> at /tmp/LOUUuhntI_:1␤␤»
09:59 moritz ah
10:00 masak r: proceed
10:00 p6eval rakudo eb0580: OUTPUT«proceed without when clause␤  in block <anon> at src/gen/CORE.setting:321␤  in block <anon> at src/gen/CORE.setting:402␤  in block <anon> at /tmp/oKwTBheHjj:1␤␤»
10:00 localhost joined #perl6
10:00 masak r: succeed
10:00 moritz that and "Attempt to return from outside any Routine" are the only user-facing errors left in perl6.ops that aren't typed exceptions
10:00 p6eval rakudo eb0580: OUTPUT«succeed without when clause␤  in block <anon> at src/gen/CORE.setting:321␤  in block <anon> at src/gen/CORE.setting:398␤  in block <anon> at /tmp/XsaRVz4eS4:1␤␤»
10:01 masak r: when True { foo }; sub foo { proceed }; say "alive"
10:01 p6eval rakudo eb0580: OUTPUT«alive␤»
10:01 masak r: when True { foo }; sub foo { succeed }; say "alive"
10:01 p6eval rakudo eb0580:  ( no output )
10:01 masak \o/
10:01 masak r: when True { foo }; sub foo { succeed }; LEAVE { say "leaving!" }
10:01 p6eval rakudo eb0580: OUTPUT«leaving!␤»
10:01 masak \o/
10:03 cognominal joined #perl6
10:03 pernatiy joined #perl6
10:04 moritz r: my Str $x := 4
10:04 p6eval rakudo eb0580: OUTPUT«Type check failed in binding␤  in block <anon> at /tmp/0uICJJ4_91:1␤␤»
10:05 moritz still the old one
10:07 jnthn moritz: When you get a chance, please do verify that my role pre-comp fix works for you also.
10:08 moritz jnthn: ok
10:08 moritz jnthn: fwiw it didn't fix the code that uncovered the problem, but there's a separate ticket for that too
10:09 moritz (something about not finding a type name when stuff is precompiled)
10:11 moritz jnthn: but yes, confirmed that it fixed the example I reported
10:16 jnthn OK. Too bad it didn't fix the other one though.
10:24 drbean joined #perl6
10:29 moritz r: say 1
10:29 p6eval rakudo 4687e0: OUTPUT«1␤»
10:29 moritz r: my Str $x := 3;
10:29 p6eval rakudo 4687e0: OUTPUT«Type check failed in binding; expected 'Str' but got 'Int'␤  in sub <anon> at src/gen/CORE.setting:8920␤  in block <anon> at /tmp/ce_rasqwxx:1␤␤»
10:30 moritz r: try my Str $x := 3; say $!.WHAT; say $!.got
10:30 p6eval rakudo 4687e0: OUTPUT«X::TypeCheck::Binding()␤3␤»
10:30 moritz so if you really care, you can discover not just the type of the value that didn't bind, but the actual value
10:31 jnthn nice :)
10:31 flussence r: try my Str $x := 3; say $!.expected
10:31 p6eval rakudo 4687e0: OUTPUT«Str()␤»
10:32 flussence yay, guessable method names
10:32 flussence moritz++
10:32 moritz r: r: try my Str $x := 3; say $!.perl
10:32 p6eval rakudo 4687e0: OUTPUT«===SORRY!===␤Confused␤at /tmp/9nFzxo1KZu:1␤»
10:33 moritz r: r: try my Str $x := 3; say $!.perl;
10:33 p6eval rakudo 4687e0: OUTPUT«===SORRY!===␤Confused␤at /tmp/GO1X5I8nQs:1␤»
10:33 moritz r: try my Str $x := 3; say $!.perl;
10:33 p6eval rakudo 4687e0: OUTPUT«X::TypeCheck::Binding.new(operation => "binding", got => 3, expected => Str)␤»
10:34 moritz r: say ::TypeCheck::Binding.^parents
10:34 p6eval rakudo 4687e0: OUTPUT«===SORRY!===␤Could not locate compile-time value for symbol TypeCheck::Binding␤»
10:34 moritz r: say TypeCheck::Binding.^parents
10:34 p6eval rakudo 4687e0: OUTPUT«Could not find symbol 'TypeCheck::&Binding'␤  in block <anon> at /tmp/Ujxn1txYjB:1␤␤»
10:34 moritz r: say X>>TypeCheck::Binding.^parents
10:34 p6eval rakudo 4687e0: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix > instead at line 1, near "TypeCheck:"␤»
10:34 * moritz not concentrated
10:34 moritz r: say X::TypeCheck::Binding.^parents
10:34 p6eval rakudo 4687e0: OUTPUT«X::TypeCheck() Exception()␤»
10:36 NamelessTee joined #perl6
10:45 cognominal_ joined #perl6
10:52 alim joined #perl6
11:00 bruges joined #perl6
11:29 cognominal joined #perl6
11:30 cogno joined #perl6
11:32 Woodi joined #perl6
11:32 JimmyZ_ joined #perl6
11:40 * colomon is on a roll with ABC modifications...
11:47 am0c joined #perl6
11:48 benabik joined #perl6
11:52 masak why do channels bother instituting policies like "don't use abbreviated ways of saying 'thank you'"? http://javachannel.net/wiki/pmwiki.php
11:53 masak I can see how repeatedly getting JavaScript questions gets old... but why insist that the questioner use certain words when expressing what they want?
11:53 huf because everybody feels like the language of their youth is being dismantled around them
11:54 huf and comes up with bs reasons to "protect" it?
11:54 huf also because "thx" is pretty damn annoying to read :)
11:54 masak it is?
11:55 huf yeah, just like missing commas or 3 exclamation marks or garbled sentences
11:55 daxim aolbonics
11:55 daxim that's a nice word
11:56 huf masak: i guess the "thank you" thing is mostly pedantry since you're usually done helping by that time
11:56 huf but people who ask questions often have lots of vague weird ideas about the problem they're trying to solve
11:56 huf and figuring that out AND figuring out what the hell the words they use mean is a double burden
11:56 masak I can agree that it's *difficult* to read a run-on sentence, or a sentence over-emphasized with too many exclamation marks. at least it it happens all the time. garbled sentences are difficult to grok almost by definition.
11:57 masak but "thx"...? what's annoying to read about that?
11:57 masak come on.
11:57 huf it's less bad than "u" and "ur"
11:57 masak yes, I get the part of feeling entitled to make demands so you can do your job well helping people.
11:58 moritz I generally dislike txt-style communication, but I don't find 'thx' any more offensive than the other examples
11:58 masak I'm just curious about the process that turns helpers into curmudgeons who can't see past a "thx" or a "u".
11:58 huf synergy of a number of different things, i think
11:58 masak it feels a bit backwards.
11:58 huf one is the "if you want free help, i'm entitled to a sensible question, and this is how i define that"
11:58 huf the other is "damn youngins speak all wrong!"
11:59 moritz for me it conveys a deliberatly sloppy style of communication, which I associate with a lack of care
11:59 huf that too
11:59 moritz but then I'm old-fashioned :-)
11:59 masak I stopped being a prescriptivist years ago, so now I think everyone else should stop being that too :P
11:59 huf masak: ;D
11:59 moritz but I wouldn't make a policy specifically for "thx"
11:59 huf moritz: and that's why #perl6 is so much nicer than #perl :)
12:00 huf well, part of the reason
12:00 jnthn thx to u prescriptivists therez now much h8 plz stop kthxbai
12:00 masak anyway. good explanations. thx!
12:00 masak dang, beaten by jnthn++ :P
12:01 jnthn .oO( it was harder to write like that than to write properly... )
12:01 * daxim rolls his eyes so hard, they fall out of the socketpair(2)s
12:01 huf jnthn: oh dear lord, that reminded me of "n8" for night
12:01 huf now *that* pisses me off, because it doesnt even work
12:01 jnthn huf: At least h8 and 8 rhyme...
12:01 moritz huf: it works perfeclty in German
12:01 daxim that's transported from german, where it does work
12:01 huf yeah, you'd need some really outrageous accent on the "eight" to make it work
12:01 jnthn oh!
12:01 huf :)
12:01 moritz phenny: en de "eight"
12:01 moritz phenny: en de "eight"?
12:01 phenny moritz: "acht" (en to de, translate.google.com)
12:02 * jnthn hadn't considered the German link :)
12:02 huf i've seen it used by hungarians in english fragments
12:02 jnthn That's cute :)
12:02 huf "good n8"
12:02 jnthn But I'm not going to start using it :)
12:02 * jnthn -> store
12:05 colomon doesn't thx go back at least as far as the Hacker's Dictionary?
12:06 colomon oh, nope, that's tnx I'm thinking of
12:06 huf too many tla-s and etla-s and *tla-s
12:06 huf what's the level above etla? ietla?
12:09 moritz r: nextsame
12:09 p6eval rakudo 4687e0: OUTPUT«nextsame is not in the dynamic scope of a dispatcher␤  in block <anon> at src/gen/CORE.setting:429␤  in block <anon> at /tmp/iLJzAzOkwW:1␤␤»
12:14 Woodi m8s, is icu 4.8.1.1 good enought or I should to try newer one ?
12:15 awwaiid joined #perl6
12:16 moritz Woodi: I use 4.4.1
12:17 dalek Perlito: 7b23bb8 | (Flavio S. Glock)++ | / (5 files):
12:17 dalek Perlito: Perlito5 - javascript: fix complement operation
12:17 dalek Perlito: review: https://github.com/fglock/Perlito/commit/7b23bb820b
12:17 Woodi k, thank you :)
12:18 moritz jnthn: how do I box a parrot string into a Perl 6 Str from C land?
12:18 moritz jnthn: I'd need that for the error message in perl6_find_dispatcher
12:32 jnthn moritz: See what the perl6_box_s op does
12:32 moritz jnthn: ok, will do
12:34 jnthn hah, I just got a beer from $store called "Ctrl Alt Delete"
12:35 * jnthn wonders if it'll taste any good...
12:35 jnthn Will probably find out in the coming days :)
12:35 masak Swedish one, no?
12:35 masak I think I've seen it.
12:36 jnthn masak: Same brewer that do Hop Yard.
12:36 jnthn Nils Oscar iirc
12:36 masak aye.
12:38 dalek Perlito: 135fb4c | (Flavio S. Glock)++ | t5/base/lex.t:
12:38 dalek Perlito: Perlito5 - more tests
12:38 dalek Perlito: review: https://github.com/fglock/Perlito/commit/135fb4ccb3
12:44 wooden joined #perl6
12:44 wooden joined #perl6
12:56 tyatpi joined #perl6
13:03 PacoAir joined #perl6
13:05 dalek rakudo/nom: 38ea7c2 | moritz++ | src/ (2 files):
13:05 dalek rakudo/nom: typed exception for returning outside of a routine
13:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/38ea7c2acb
13:06 ponbiki joined #perl6
13:06 Psyche^ joined #perl6
13:07 benabik joined #perl6
13:09 tadzik good afternoon
13:09 jnthn afty, tadzik
13:18 skids joined #perl6
13:19 masak sharky, tadzy.
13:22 jnthn For going to l'event, shall we meet at le station around 17:15?
13:24 jnthn There's a train that gets me in to Malmoe at 17:11
13:24 * masak .oO( oh wait, this isn't privmsg! )
13:24 masak jnthn: wfm ;)
13:27 dalek Perlito: 84d2cee | (Flavio S. Glock)++ | / (4 files):
13:27 dalek Perlito: Perlito5 - javascript: add dereference syntax { $$ x [2]=3; say $x->[2] }
13:27 dalek Perlito: review: https://github.com/fglock/Perlito/commit/84d2ceecf7
13:39 jnthn masak: oh, crap...
13:39 jnthn masak: Yes, that was meant to be in privmsg :)
13:42 Woodi joined #perl6
13:45 moritz jnthn: do you have some more inspiration what to hack on?
13:46 jnthn moritz: I can make some suggestions.... :)
13:47 jnthn Versioned modules would be one. You just got more familiar with some of that area of the code base. But maybe you want to explore something else now, or maybe that's not so fun. :)
13:47 jnthn Doing the various RatStr, NumStr, IntStr etc is another option. And val().
13:48 moritz right. Those sound doable but not quite -Ofun :-)
13:48 moritz I might do them anyway
13:48 moritz or maybe more typed exception hacking
13:48 jnthn I pondered heredocs, but I'm gonna say "not yet", because I'd rather they come after we diddle the grammar for QRegex.
13:48 moritz versioned modules also sounds nice
13:48 jnthn Also because they may be headache-inducing. :)
13:48 erkan joined #perl6
13:49 moritz I wouldn't want to attack them :-)
13:49 jnthn Dang. :P
13:49 jnthn Oh, another option could be doing a P5Regex grammar/actions.
13:49 jnthn And linking it up to the :P5 adverb.
13:50 jnthn Probably quite good fun.
13:50 PerlJam good $localtime #perl6
13:50 jnthn And only really needs you to consider the nice side of the regex engine (the QAST::Regex nodes), not the terrifying side (what QAST::Compiler does with them) to get quite a long way :)
13:52 jnthn If you want to do that but don't know where to start, I can probably write it up enough to make it match literals or something.
13:53 moritz I'll consider my options for a while :-)
13:54 PerlJam jnthn: If you do enough to match literals, it makes it easier for others who have trouble finding tuits to jump in  (whether moritz or not)
13:54 jnthn Good point.
13:55 moritz much of the grammar can probably be stolen from STD_P5
13:55 jnthn aye
13:55 moritz except that p5 uses reparsing for regex
13:55 moritz ouch, that hurts, once you're use to one-pass parsing
13:56 jnthn Doing StrPos and StrLen are also options. :)
13:56 jnthn So, no shortage of possibles. :)
13:56 moritz I don't see the point in them as long as we don't have grapheme level strings
13:56 moritz or strings that can act on more than one level, for that matter
13:56 jnthn l-value substr would seem to be one point.
13:56 masak oooh!
13:56 grondilu joined #perl6
13:57 jnthn I think there's a bunch of tests for that too.
13:57 masak yes please yes l-value substr
13:57 moritz jnthn: I don't quite see how they relate to lvalue substr
13:57 jnthn moritz: Maybe I'm confused...I thought substr returned one of those?
13:58 * grondilu made a github repo for his digest module:  http://github.com/grondilu/libdigest-perl6
13:58 brrt joined #perl6
13:58 moritz jnthn: no, index and rindex etc. return them
13:58 tadzik pure Perl6 (no rakudo code)?
13:58 grondilu yes
13:58 tadzik I don't understand the second part
13:59 jnthn Oh, I'm confused.
13:59 moritz jnthn: they are supposed to abstract away the different Unicode levels (bytes/codes/graphs) into a single object
13:59 tadzik also, could you make it a proper Perl 6 module? We'd include it in the ecosystem then
13:59 tadzik see http://wiki.perl6.org/Create%20and%20Distribute%20Modules
13:59 jnthn moritz: You're right, there's a bunch of tests for "Substr with StrLen".
13:59 grondilu ok I'll read that
14:00 kaare_ joined #perl6
14:00 grondilu it's very very slow though, so I'm not sure it is worth being added to the ecosystem
14:00 PerlJam grondilu: slow can be fixed.
14:00 tadzik everything is
14:00 PerlJam grondilu: working code trumps everything else (at first) as far as I'm concerned
14:00 jnthn moritz: But it's not related to lvalue...
14:00 colomon grondilu: does it work with Niecza?
14:01 tadzik I see that we have Digest::SHA256, but it's 1) broken 2) not pure-perl6
14:01 PerlJam grondilu: plus if your code is slow, we can profile it to figure out where Rakudo/Niecza need optimization  ;-)
14:02 colomon +1
14:02 grondilu I'm sorry I'm not sure I'll have time to tune it to match your requirements for integration in the ecosystem.  I don't have enough connection time.  But feel free to fork it it you want.
14:03 sergot joined #perl6
14:03 sergot hi o/ !
14:03 tadzik someone probably will :)
14:03 tadzik hi sergot
14:03 grondilu colomon: I don't know.   I don't have Niecza.
14:05 colomon grondilu: I'll give it a try when I'm finished getting ABC to run on my big music file.
14:05 masak sergocie! \o/
14:06 sergot How are you masaku ? :)
14:07 sergot masak: jak się masz? :)
14:07 masak sergot: Czuję się dobrze. Dzięki za pytanie. :)
14:07 tadzik hah. Thi is as good as masak's internet on a bus :) http://i.imgur.com/7zVgp.jpg
14:07 masak sergot: A ty?
14:08 sergot masak: także dobrze. Dziękuję. :)
14:08 masak :)
14:08 masak tadzik: is that math in the background? :)
14:08 masak what kind?
14:08 masak analysis?
14:08 tadzik masak: automatics actually
14:09 tadzik so not really maths, but it's using maths, as everything :)
14:10 tadzik I'm not sure what that really is, it's some stuff for my exam passed in january
14:10 dalek rakudo/nom: 1c1208b | moritz++ | src/ (2 files):
14:10 dalek rakudo/nom: Throw typed exception for "nextsame not in dynamic scope of a dispatcher"
14:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1c1208b137
14:11 masak ok :)
14:11 tadzik anyway, Wolfenstein! On a phone!
14:12 PerlJam looks like it doesn't quite work in niecza
14:13 * colomon used to love Wolfenstein 2D...
14:14 tadzik for that one I'm too young I'm afraid. Wolf 3D was preinstalled on my first pc
14:16 daxim joined #perl6
14:20 tokuhirom joined #perl6
14:24 NamelessTee joined #perl6
14:26 colomon tadzik: it was a nice little Berzerk clone -- with a more interesting theme and the bonus that the Nazis could speak!  seems trivial today, but it was probably the first C64 game I ever played with synthesized speech.
14:27 colomon oh, turns out the arcade version of Berzerk included speech, too -- I may have only ever played the Atari 2600 version.
14:33 colomon phenny: tell sorear Is there a way to make regex tuplet { '('(<digit>+) [<t_elem>* <stem>] ** { +$0 } } work in Niecza?
14:33 phenny colomon: I'll pass that on when sorear is around.
14:39 thou joined #perl6
14:41 NamelessTee joined #perl6
14:42 TimToady moritz: "this will break whenever it goes wrong" is how I'd say it
14:43 moritz TimToady: context?
14:44 TimToady sorry, masak
14:44 TimToady sorry, you :)
14:44 TimToady http://irclog.perlgeek.de/perl6/2012-05-15#i_5592539
14:45 * masak looks up, confused
14:45 cognominal joined #perl6
14:45 TimToady sorry, my eyes are not yet opposite their sockets
14:46 masak oh, the if/when/whenever thing.
14:46 masak yeah, 'whenever' has a bit more of 'if' in it than does 'when'. :)
14:46 TimToady it's kinda in the middle
14:47 birdwindupbird joined #perl6
14:47 TimToady funny you can say "if you ever" in English but you can't really say "when you ever"
14:47 TimToady probably because 'whenever' exists
14:48 masak no semantic loss, though. they'd mean the same.
14:48 TimToady I guess it's really a small garden path
14:48 masak I mean, when you ever wanted to say one, you could just as well say the other.
14:48 TimToady because 'when' is certain, and then 'ever' undoes it a bit
14:49 TimToady though only in the indicative
14:49 TimToady "When are you ever coming over?" is certainly okay
14:49 TimToady and in fact *Whenever are you coming over? is not
14:50 TimToady strainge languij
14:51 masak :)
14:52 masak &
15:01 colomon TimToady: can I say <?after <my-regex> > in a grammar?
15:01 dalek Perlito: b9403a7 | (Flavio S. Glock)++ | / (5 files):
15:01 dalek Perlito: Perlito5 - javascript: add a version in $]
15:01 dalek Perlito: review: https://github.com/fglock/Perlito/commit/b9403a7aaa
15:02 TimToady if <my-regex> is reversible, and it's implemented right :)
15:02 colomon errr.... reversible?
15:02 TimToady after works by matching in reverse
15:03 colomon oooo, wait, I think I can make it <?after '|'>
15:03 colomon that should work and easily be reversible, right?
15:03 TimToady in theory
15:03 colomon in practice, any idea if Niecza supports it?
15:04 colomon ooo, looks like it does!
15:04 TimToady this early in the morning, it's faster to try it than to ask me
15:04 toebu joined #perl6
15:05 TimToady reversing an existing method call would seem to require providing a reversed entry point to reversible methods
15:06 TimToady not sure we want the overhead of that without some pragmatic hint
15:06 colomon Turns out <?after '|'> <nth_repeat_num>   is perfectly fine for my purposes, and seems to work in Niecza.
15:07 TimToady yes, well, even p5 can do constant lookbehinds...
15:08 * TimToady wonders how much of grammar overhead is late-bound method dispatch...
15:09 TimToady and to what extent aggressive finalization can speed that up
15:09 * colomon wonders what it says that twice this morning he has changed the description of a copy-n-pasted test without actually making the needed changed to the test itself
15:10 geekosaur more $stimulant needed?
15:10 TimToady well, cargo-culted airplanes don't usually fly too well either :P
15:11 tokuhirom joined #perl6
15:12 colomon copying your own tests and changing elements of them is not cargo-culting!  :p
15:12 TimToady you were a different person before :)
15:12 colomon oooooooo!  you and your stupid correct-sounding arguments!
15:13 TimToady I'm really good at cargo-culting correct-sounding arguments! :D
15:13 TimToady don't always fly though...
15:13 tyatpi joined #perl6
15:14 PerlJam A river is never stepped in by the same man twice ?
15:14 TimToady you can say that again
15:15 TimToady once for the river, and once for the man
15:15 colomon It's funny, a number of my ABC changes this morning have involved supporting things that were not in the BNF ABC grammar that the ABC module's grammar was based on.  The current spec has drifted away from that grammar, it turns out -- or more likely, that grammar was simplified so it would be easier to spec as a grammar.
15:16 TimToady yeah, well, we put a "grammar" of Perl 5 into the first edition of the Camel
15:16 TimToady that part of the book was definitely fictional
15:16 * colomon should probably start doing $work at some point this morning....
15:16 TimToady er Perl 4
15:16 TimToady tormenting the denizens of #perl6 is my work :)
15:17 PerlJam TimToady: I was wondering if you had invented time travel there for a second
15:17 Woodi joined #perl6
15:18 TimToady closer to a minute, I think
15:18 Woodi just compile Rakudo-2012.04.01 on OpenBSD ! :)
15:18 * colomon just parsed a 2309 line long ABC file with 159 tunes in it!
15:19 Woodi tests passed if you ask...
15:19 moritz \o/
15:19 TimToady did the tests pass?  # just to make it official
15:20 PerlJam colomon: now, can you get perl to do that? ;)
15:20 Woodi make test passwd
15:20 Woodi *passed :)
15:20 moritz what about 'make spectest'?
15:20 colomon PerlJam: perl 5?  Is there a module with grammar support?
15:21 Woodi nqp had problems with 2 tests for bigint
15:21 Woodi will try spectest today
15:26 cognominal joined #perl6
15:27 fglock there is a perl5 module with grammar support (not sure if this is what you mean) - http://search.cpan.org/dist/Pugs-Compiler-Rule-0.37/lib/Pugs/Compiler/Rule.pm
15:28 cognominal joined #perl6
15:31 moritz n: my $s = 'some string'; substr($s, 0, 4) = 'foo'; say $s
15:31 p6eval niecza v17-4-ge5b869e: OUTPUT«foo string␤»
15:32 moritz n: my $s = 'some string'; $substr = substr($s, 0, 4); $substr = 'foo'; say $s
15:32 p6eval niecza v17-4-ge5b869e: OUTPUT«[31m===[0mSORRY![31m===[0m��Variable $substr is not predeclared at /tmp/dQ7VDZlUbo line 1:�------> [32mmy $s = 'some string'; [33m�[31m$substr = substr($s, 0, 4); $substr = 'f[0m��Variable $substr is not predeclared at /tmp/dQ7VDZlUbo line 1:�------…
15:32 moritz n: my $s = 'some string'; my $substr = substr($s, 0, 4); $substr = 'foo'; say $s
15:32 p6eval niecza v17-4-ge5b869e: OUTPUT«some string␤»
15:32 moritz n: my $s = 'some string'; my $substr := substr($s, 0, 4); $substr = 'foo'; say $s
15:32 p6eval niecza v17-4-ge5b869e: OUTPUT«foo string␤»
15:32 moritz n: my $s = 'some string'; my $substr := substr($s, 0, 4); $substr = 'foo'; say $s; say $substr.WHAT
15:32 p6eval niecza v17-4-ge5b869e: OUTPUT«foo string␤Str()␤»
15:33 moritz n: my $s = 'some string'; my $substr := substr($s, 0, 4); $substr = 'foo'; say $s; say $substr.WHAT === "foo".WHAT
15:33 p6eval niecza v17-4-ge5b869e: OUTPUT«foo string␤True␤»
15:33 TimToady n: my $s = 'some string'; my $substr := substr($s, 0, 4); $substr = 'foo'; $substr = 'phooey'; say $s;
15:33 p6eval niecza v17-4-ge5b869e: OUTPUT«phooeystring␤»
15:33 TimToady say what?
15:34 moritz is that how it's supposed to work? or is lvalue substr supposed to be syntactic?
15:34 TimToady n: my $s = 'some string'; my $substr := substr($s, 0, 4); $substr = 'phooey'; say $s;
15:34 p6eval niecza v17-4-ge5b869e: OUTPUT«phooey string␤»
15:35 TimToady well, it should at least unlvalue itself it's going to be a one-shot
15:35 TimToady it's just not clear to be what it actually did
15:36 mucker joined #perl6
15:36 moritz to me it looks like strings are mutable, and $substr simply references a part of $s
15:36 TimToady so it took the 0,4 as "foo ", I see
15:37 TimToady if we're gonna map strings like that, we'll need to borrow lset and rset from BASIC/PLUS :)
15:37 moritz n: my $s = 'abcd'; substr($s, 0, 1) = 'much longer'; say $s
15:37 p6eval niecza v17-4-ge5b869e: OUTPUT«much longerbcd␤»
15:38 moritz n: my $s = 'abcd'; my $ss := substr($s, 0, 1); $ss  = 'much longer'; say $s
15:38 p6eval niecza v17-4-ge5b869e: OUTPUT«much longerbcd␤»
15:38 TimToady the only other sane approach is to make the marks into the string track the logical location like marks do in an emacs buffer
15:38 thelazydeveloper joined #perl6
15:38 TimToady which would be...difficult...
15:39 moritz IMHO the only sane way is to make lvalue substr syntactic
15:39 TimToady well, that's what it is in p5
15:39 moritz otherwise all substr results have to suffer from it, performance wise
15:39 moritz (fsvo "sane")
15:40 TimToady s/value/very small value/
15:40 PerlJam TimToady: but least surprisey imho
15:40 PerlJam (marks tracking location)
15:41 TimToady if you have a ropes implementation, you just turn that bit into one segment, and return a ref to it
15:42 pmurias joined #perl6
15:42 TimToady but that can also be confused if subsequent ops fragment that segment
15:42 * TimToady was realizing the other day that the idea of Cat strings is essentially ropes
15:42 PerlJam aye
15:43 moritz it's pretty easy to detect lvalueness for things like   substr(...) = "foo"
15:43 moritz but substr(...) ~~ s/..//  is more challenging, I think
15:43 TimToady could force people to use lsubstr or some such atrocity
15:44 moritz +1
15:44 TimToady we've split up other operations
15:44 moritz then we just return a Proxy from that
15:44 PerlJam maybe call it "mark" or something too
15:44 TimToady the other approach is to only allow mods via 4-arg substr
15:45 TimToady thing is, if you're gonna want to map a string with one mark, you'll also want a series of 'em
15:45 PerlJam aye
15:45 TimToady kinda like an unpack
15:45 PerlJam and  then you'll want to mark non-string things too
15:46 geekosaur I was just wondering about that... let substr be substr, if someone wants the other then they can use a more expensive and expansive mechanism
15:46 geekosaur not just lsubstr, but indeed general marking/(partitioning?)
15:46 dalek roast: de07434 | (Kyle Hasselbacher)++ | S14-traits/routines.t:
15:46 dalek roast: [S14-traits/routines.t] Test for RT 112664
15:46 dalek roast: review: https://github.com/perl6/roast/commit/de07434286
15:46 TimToady @substrings = mark($string, 0, 4, 4, 4, 2, 4, 8, *)
15:46 geekosaur that said, when I think about that I land in grammars
15:47 PerlJam TimToady: things that are taken in pairs like that make me yearn for a bit of a data structure :)
15:47 TimToady or maybe mark returns a set of lvalues that know about each other, and so if you modify element 1's length, subsequent ones know
15:48 TimToady I wasn't writing pairs, actually
15:48 moritz r: my $s = 'foo'; substr($s, 0, 1, 'barf'); say $s
15:48 p6eval rakudo 1c1208: OUTPUT«Too many positional parameters passed; got 4 but expected between 2 and 3␤  in sub substr at src/gen/CORE.setting:1977␤  in block <anon> at /tmp/FFGgE9zJ2z:1␤␤»
15:48 TimToady I was just thinking of one starting where the prev left off
15:48 PerlJam oh
15:48 TimToady but pairs makes more sense, I guess
15:48 PerlJam maybe
15:48 PerlJam you can get pairs of (start,end) or (start,lenght)
15:48 PerlJam er, length
15:49 TimToady feels kind of enum-y
15:49 PerlJam "chained marks" as you did sort of brings the idea of ropes to the fore-front.  Makes it a user-visible phenomenon.
15:50 TimToady well, kind, except for that to work out now, you'd have to produce a new object that is a rope rather than marking into an existing string
15:50 TimToady that's more FPish anyway
15:50 TimToady at least until you start modifying segments :)
15:51 alim joined #perl6
15:53 PerlJam In any case ... I think separating substr from lvalue-substr is definitely the way to go.
15:53 moritz r: https://gist.github.com/2702826
15:53 p6eval rakudo 1c1208: OUTPUT«baroo␤»
15:56 moritz anyway, separate lvalue substr in 11 lines
15:56 PerlJam moritz++
16:05 colomon moritz++
16:07 moritz $ ./perl6 -e 'my $x = "abcde"; lsubstr($x, 0, 2) ~~ s:g/./X/; say $x'
16:07 moritz XXcde
16:07 paul_tyler1 joined #perl6
16:07 dalek rakudo/nom: c89725c | moritz++ | src/core/Str.pm:
16:07 dalek rakudo/nom: lsubstr, an lvalue substr. Slower but more versatile
16:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c89725c1f9
16:08 pmurias joined #perl6
16:12 s1n joined #perl6
16:12 alim joined #perl6
16:12 quicoju joined #perl6
16:12 Tene joined #perl6
16:12 avar joined #perl6
16:19 cognominal joined #perl6
16:20 sorear good * #perl6
16:20 phenny sorear: 14:33Z <colomon> tell sorear Is there a way to make regex tuplet { '('(<digit>+) [<t_elem>* <stem>] ** { +$0 } } work in Niecza?
16:20 colomon sorear!  \o/
16:21 sorear colomon: I'd expect that to work
16:22 colomon I got a weird internals error message when I tried it.  But I didn't look into it closely.
16:22 sorear n: my regex tuplet { '('(<digit>+) [<t_elem>* <stem>] ** { +$0 } }
16:22 p6eval niecza v17-4-ge5b869e: OUTPUT«Potential difficulties:â�¤  &tuplet is declared but not used at /tmp/7zrBwZhbyo line 1:â�¤------> [32mmy regex tuplet [33mâ��[31m{ '('(<digit>+) [<t_elem>* <stem>] ** { [0mâ�¤â�¤Â»
16:23 colomon n: say "(5abcde" ~~ /'(' (<digit>+) <alpha> ** { +$0 }/;
16:23 p6eval niecza v17-4-ge5b869e: OUTPUT«Use of uninitialized value in numeric context␤  at /home/p6eval/niecza/lib/CORE.setting line 1226 (warn @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 262 (Any.Numeric @ 6) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/nfug0V_UmL line 1 (ANON @ …
16:23 colomon n: say "(5abcde" ~~ /'(' (<digit>+) <alpha> ** { $0 }/;
16:23 p6eval niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: Unable to resolve method niecza_quantifier_min in class Any␤  at /tmp/JyxH5wRF6B line 1 (ANON @ 7) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2805 (Regex.ACCEPTS @ 4) ␤  at /tmp/JyxH5wRF6B line 1 (mainline @ 2) ␤  at /home/p6eval/n…
16:23 colomon and those are the two errors messages I got with the two approaches I tried.  :)
16:24 sorear hmmm
16:24 colomon wrong $0?
16:25 fglock joined #perl6
16:25 sorear yeah, it looks like ** isn't getgting the proper magic to allow it to access $/
16:25 sorear n: say "(5abcde" ~~ /'(' (<digit>+) {} <alpha> ** { $0 }/;
16:25 p6eval niecza v17-4-ge5b869e: OUTPUT«Unhandled exception: Unable to resolve method niecza_quantifier_min in class Match␤  at /tmp/GSsaYzyjTV line 1 (ANON @ 9) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2805 (Regex.ACCEPTS @ 4) ␤  at /tmp/GSsaYzyjTV line 1 (mainline @ 2) ␤  at /home/p6eval…
16:25 sorear n: say "(5abcde" ~~ /'(' (<digit>+) {} <alpha> ** { +$0 }/;
16:25 p6eval niecza v17-4-ge5b869e: OUTPUT«#<match from(0) to(7) text((5abcde) pos([#<match from(1) to(2) text(5) pos([].list) named({"digit" => (#<match from(1) to(2) text(5) pos([].list) named({}.hash)>, ).list.item}.hash)>].list) named({"alpha" => (#<match from(2) to(3) text(a) pos([].list) named…
16:25 sorear there's a workaround
16:26 sorear please remind me later, optionally via ticket
16:26 colomon inserting the {}  and adding the +  ?
16:26 colomon sorear: I should probably make it a ticket, else I'm apt to forget myself!
16:29 colomon Done
16:30 colomon and your workaround passes all my ABC tests!  \o/
16:30 sorear colomon: yes, those two changes.
16:31 * colomon really loves replacing three lines with one that is only slightly more complicated and much more general
16:37 jferrero joined #perl6
16:40 cognominal_ joined #perl6
16:46 alim_ joined #perl6
16:47 s1n joined #perl6
16:57 PacoAir joined #perl6
17:01 tyatpi joined #perl6
17:07 icwiener joined #perl6
17:08 araujo joined #perl6
17:09 quicoju joined #perl6
17:09 cognominal___ joined #perl6
17:16 moritz sorear: don't know how far you've backlogged. What do you think about separating substr and substr-that-returns-an-lvalue?
17:21 TimToady should maybe be called substr-rw rather than relying on the 'l' meme
17:22 TimToady and to go with return-rw and such
17:22 alim joined #perl6
17:22 moritz good idea
17:23 TimToady we don't want five different naming schemes for the same idea like PHP does
17:23 dalek rakudo/nom: f4e6701 | moritz++ | src/core/Str.pm:
17:23 dalek rakudo/nom: rename lsubstr to substr-rw
17:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f4e6701e93
17:23 PerlJam If we're going to do a suffix, I'd much prefer some symbol like "substr!"
17:23 PerlJam (but that's just me)
17:24 geekosaur smalltalk much?
17:24 TimToady and pi! will give you a read/write pi, rather than pi factorial?
17:24 PerlJam (symbology negotiable ;)
17:25 * colomon wants pi-rw ....
17:26 PerlJam .oO( pi-write?  That's a fool's wish.  )
17:26 TimToady you're thinking of py-write there
17:28 geekosaur or you pronounce it like pirate
17:28 PerlJam I figured homophony was good enough.
17:30 * colomon looks at http://geohub.github.com/ , realizes yet again that he always thinks of Germany as being where Poland actually is.
17:31 mikemol joined #perl6
17:31 PerlJam colomon: it's all just europe anyway.  Heck, Texas is bigger than most of those countries ;)
17:31 goraki colomon: I thought Poland was next to Germany, <-- starts infinite loop.
17:36 TimToady well, Godwin's Law points out that some people think Poland is in Germany...
17:37 s1n joined #perl6
17:37 PerlJam that's very much like an autopun
17:37 PerlJam though ... different
17:38 TimToady it's just a Big Lie
17:39 TimToady .oO(Poland Lies Largely in Germany...)
17:40 Tedd1^ joined #perl6
17:40 tadzik does it?
17:40 PerlJam that doesn't even rhyme
17:40 tadzik oh, I backlogged enough now :)
17:40 TimToady sorry
17:40 Woodi to be precise sometimes it was there but partially :)
17:41 TimToady but you could pretty much say that about most of the lowland countries of the world, fsdo "it" and "there"
17:42 TimToady Switzerland does not qualify.
17:43 fibo joined #perl6
17:43 colomon I'd aruge my internal map of Europe actually came from some old WW2 wargame map.  But the real thing that shows it's just me being messed up is that even though I know there are French/German boundary regions which have been disputed for centuries, in my internal map of Europe there's something about the size of Switzerland separating the two.
17:43 * PerlJam notices an odd bias towards perl-people on geohub.github.com   ;)
17:44 TimToady colomon: is it labeled "Switzerland"?
17:44 moritz colomon: I don't know of any region that's disputed between France and Germany :-)
17:44 Woodi anyway, Texas is mainly a desert so we do not care :)
17:44 colomon TimToady: nope, it's north of Switzerland
17:44 moritz there were parts that decided by vote if they wanted to be part of .de or .fr
17:45 dalek roast: 7fa5f12 | moritz++ | S32-str/substr (2 files):
17:45 dalek roast: move lvalue substr tests to substr-rw.t;
17:45 dalek roast:
17:45 dalek roast: also clean up some p5 reference thinking
17:45 dalek roast: review: https://github.com/perl6/roast/commit/7fa5f12e05
17:45 Chillance joined #perl6
17:46 colomon TimToady: and Germany is due east of Switzerland (extending north to the water)
17:46 TimToady that's kinda like the parts that are deciding whether they want to be part of .gr or .eu?
17:46 Tedd1 joined #perl6
17:48 Woodi .eu is more a container thing...
17:48 PerlJam mutable or immutable
17:48 PerlJam ?
17:48 moritz motable, obviously
17:48 moritz erm, mutable
17:48 * moritz can't type today
17:49 Woodi so far it is .new one
17:49 Mike1989 joined #perl6
17:50 Mike1989 Hello
17:50 Mike1989 i need some help
17:50 PerlJam Mike1989: what's up?
17:50 moritz hi Mike1989
17:50 Mike1989 i would like to start with rakudo
17:50 Mike1989 on my Win7
17:51 Mike1989 and It woluld be great if there is a nice editor
17:51 PerlJam Mike1989: Padre ?
17:51 moritz vim, emacs
17:51 Mike1989 i am used to eclipse kindo of things...
17:51 Mike1989 ok Padre
17:51 Mike1989 but it supports perl 5
17:51 Mike1989 isnt it??
17:52 PerlJam and perl6 and a whole bunch of other stuff
17:52 birdwindupbird joined #perl6
17:52 dalek roast: fb9e1c1 | moritz++ | S32-str/substr-rw.t:
17:52 dalek roast: rakudo-fudge substr-rw.t
17:52 dalek roast: review: https://github.com/perl6/roast/commit/fb9e1c191c
17:52 * TimToady just uses vim
17:52 Mike1989 ok, this one: http://padre.perlide.org/download.html ??
17:53 * PerlJam too
17:53 moritz Mike1989: yes
17:54 dalek rakudo/nom: 3ec9365 | moritz++ | t/spectest.data:
17:54 dalek rakudo/nom: run substr-rw.t
17:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3ec9365ee0
17:54 Tedd1^ joined #perl6
17:55 [Coke] has padre been updated for p6 syntax highlighting?
17:55 Mike1989 moritz: and after installing this Padre is there anything else I need to know
17:56 Mike1989 what I realy need is run a window application written in Perl 6 Rakudo on Parrot VM
17:56 Mike1989 will it do?
17:57 PerlJam [Coke]: Are you asking if it does p6 highlighting or if the p6 highlighter has been recently updated?
17:57 PerlJam [Coke]: Padre has done p6 highlighting for a while.  I don't use Padre enough on Perl 6 to know how good it is though.
17:58 s1n joined #perl6
17:59 Mike1989 could someone please consider my question...:)
17:59 Woodi Mike1989: you can download Rakudo for Win from https://github.com/rakudo/star/downloads/
17:59 Woodi binary or source for compilation
17:59 Mike1989 that much I allready know
18:00 Woodi so what you need next ?
18:00 Mike1989 what I realy need is run a window application written in Perl 6 Rakudo on Parrot VM
18:01 benabik "a window application"?  Something with a GUI?
18:01 Mike1989 mortiz told me that Padre should do the work with editing code
18:01 Mike1989 yes...
18:02 benabik I don't think there's a GUI library for Rakudo, but it shouldn't be too difficult to interface with one via NativeCall.
18:02 Mike1989 well I am not so worried about that
18:03 Mike1989 The basic information that I require is how to write in editor on Windows with Rakudo using Parrot :)
18:04 PerlJam Mike1989: you keep mentioning Parrot, but it's not really a user-visible part of executing Perl 6 code.
18:04 PerlJam (except accidentally ;)
18:04 Mike1989 yes I know that...
18:04 Woodi you want to know modules for GUI for Rakudo ?
18:04 Mike1989 it is needed for my thesis
18:04 benabik Mike1989: "how to write an editor" is a fairly broad topic.
18:04 Mike1989 to be honest
18:04 geekosaur then why do you mention it?...waitwhat?
18:05 PerlJam Mike1989: so, you install Rakudo, install Padre, write Perl 6 code with Padre and you can run it via F5 from within Padre
18:05 tadzik you can write Gtk applications with niecza
18:05 tadzik rakudo isn't really capable of that at the moment
18:05 Mike1989 capable  of what exactly??
18:05 benabik It should be possible to hook up to GTK or even the basic windows libraries via NativeCall.
18:05 spider-mario joined #perl6
18:06 PerlJam benabik: yeah, all it needs is someone to make the linkage
18:06 benabik (C libraries rather than C#, obv.)
18:06 tadzik benabik: barely. Callbacks are still a problem
18:06 tadzik you can't really write anything serious with Gtk withouth callbacks
18:06 Woodi do "application" must mean "mouse for using" ?
18:06 benabik tadzik: Ah.
18:07 Mike1989 yeah....
18:07 PerlJam tadzik: I thought callbacks were less of a problem now ... maybe I imagined it.
18:07 tadzik PerlJam: I think there's still no way to handle them
18:08 * moritz thinks so too
18:08 Woodi Mike1989: one on #perl5 ppls advice me to use HTML GUI :)
18:08 spider-mario :D
18:08 Mike1989 great...
18:08 spider-mario well, it’d work
18:09 spider-mario HTML is portable, is it not?
18:09 spider-mario that’s one of its design principles
18:09 spider-mario (being universal)
18:09 spider-mario (universally accessible, more specifically)
18:09 Mike1989 so if I understand you correctly I shoud write an app using perl6 but in http gui ??
18:10 Woodi Mike1989: but to be very seriously I dream about good GUI for any Perl seence 10 years probably...
18:10 spider-mario Woodi : is Qt not good?
18:10 colomon n: https://gist.github.com/2702826
18:10 p6eval niecza v17-4-ge5b869e: OUTPUT«baroo␤»
18:10 Mike1989 Qt??
18:10 spider-mario Qt4 has a Perl5 binding
18:10 gfldex Qt is the thing KDE is made with
18:11 spider-mario among others
18:11 spider-mario there are other important users
18:11 spider-mario Adobe and Google, for example
18:11 gfldex many others actually
18:11 Woodi spider-mario: Perl have bindings for everything :) but for long and serious use usually there are problems...
18:11 derrazo joined #perl6
18:11 derrazo left #perl6
18:12 spider-mario Qt’s binding seems quite mature
18:12 spider-mario it even has an equivalent for uic
18:12 spider-mario it is more or less rare for Qt’s bindings
18:12 spider-mario (perl’s is puic)
18:13 Woodi I tried few Qt bindings few months ago and something do not worked for me
18:13 Mike1989 ok, so any clue what can I do with it?
18:13 Woodi Mike1989: what is your thesis ? :)
18:14 Mike1989 "Parrot in practice"
18:14 Woodi and why you must use Rakudo ?
18:14 Mike1989 but
18:14 Mike1989 my "master" demands that I should Use Perl 6
18:15 Woodi wow :)
18:15 Mike1989 and Rakudo comes with parrot
18:15 Mike1989 right?
18:15 Woodi clone him :)
18:15 Mike1989 hahaha
18:16 spider-mario Rakudo is built on Parrot
18:16 spider-mario but neither comes with the other, except in Rakudo Star
18:16 Woodi Mike1989: you have more things to choose then just user UI
18:16 spider-mario a distribution of Rakudo
18:17 Mike1989 meaning?
18:17 Woodi all that what they learn on universities about IT things
18:18 Woodi data procesing, OO, databases, ...
18:18 Woodi concurency probably is here too
18:18 Mike1989 well.... most of my work will be done about the theory
18:19 Mike1989 how parrot and perl work together
18:19 Mike1989 so conserning the app
18:19 Mike1989 it just needs to work:)
18:19 Mike1989 and be presented nicely :)
18:20 Woodi Mike1989: you can also collect all data about Parrot state, say it is not so complete and then show directions and requirements
18:20 Woodi well, you can have problem :)
18:20 Mike1989 Woodi: in fact I do have a problem... for a while now
18:21 Mike1989 i was trying to hook up parrot with apache....
18:21 Mike1989 and it didn't work.. so "master" choose GUI app
18:22 Woodi Mike1989: but Parrot is VM... do whatever you want but GUI is from other story...
18:22 Mike1989 that I know,
18:22 Mike1989 but
18:22 Mike1989 there is a need to write GUI app in perl 6
18:23 Mike1989 just for the sake of doing it
18:23 Woodi agree! I want it too :)
18:23 tadzik there is tetris
18:23 Mike1989 and as you can see i am also happy about it
18:23 Mike1989 ;)
18:23 tadzik and a text editor too, iirc
18:23 Mike1989 haha
18:24 tadzik and a web browser even
18:24 Mike1989 i wish there was an eclipse for perl....
18:24 tadzik https://github.com/sorear/niecza/blob/master/examples/gtk-tetris.pl
18:24 moritz Mike1989: there is
18:24 moritz Mike1989: google for epic
18:25 Woodi DBI for UI would be nice :)
18:25 adu joined #perl6
18:25 moritz it's called Wx
18:26 Mike1989 tetris huh??
18:26 Mike1989 ;p
18:26 Woodi russian legacy :)
18:26 Mike1989 indeed
18:27 colomon errr... if I have / [ <a-regex> | <b-regex> ]+ /, how do I get an array of elements which are intermixed a-regex and b-regex ?
18:27 adu I have a question
18:27 moritz colomon: $/.caps
18:28 ponbiki joined #perl6
18:28 adu why does perl6 complain when I add <[\xE000..\xFFFD]> that it contains invalid UTF-8 characters?
18:28 moritz r: /<[\xE000..\xFFFD]>/
18:28 p6eval rakudo 3ec936: OUTPUT«===SORRY!===␤Invalid character for UTF-8 encoding␤␤»
18:29 spider-mario r: say ("\xE000" .. "\xFFFD").perl
18:29 p6eval rakudo 3ec936: OUTPUT«"\x[e000]".."�"␤»
18:29 spider-mario r: say "\xE000" .. "\xFFFD"
18:29 p6eval rakudo 3ec936: OUTPUT«"\x[e000]".."�"␤»
18:29 adu should I add something like :chars or :codes?
18:29 moritz adu: looks like a bug to me
18:29 moritz adu: no, those aren't implemented yet
18:29 adu oh ok
18:30 spider-mario r: /<[\xFFFD]>/
18:30 p6eval rakudo 3ec936:  ( no output )
18:30 spider-mario .u FFFD
18:30 spider-mario .u 0xFFFD
18:30 phenny U+FFFD REPLACEMENT CHARACTER (�)
18:30 phenny spider-mario: Sorry, no results for '0xFFFD'.
18:30 alim joined #perl6
18:31 moritz .u E000
18:31 phenny U+E000 (No name found)
18:31 adu .u 1F4A9
18:31 phenny adu: Sorry, no results for '1F4A9'.
18:31 moritz r: chr(0xE000)
18:31 p6eval rakudo 3ec936:  ( no output )
18:32 moritz adu: phenny doesn't know about characters > 0xFFFF
18:32 adu oh ok
18:32 moritz (maybe because it's python based :-)
18:32 spider-mario :D
18:32 spider-mario (is it?)
18:32 spider-mario (it surprises me a bit)
18:32 adu I guess it was a USC-2 build?
18:32 TimToady feel free to rewrite it in Perl 6 :D
18:33 adu I'd like to rewrite everything in Perl6 :)
18:33 geekosaur .oO { I
18:33 moritz adu: that's a good sign :-)
18:33 geekosaur .oO { I'd like to teach the world to work / In Pelr 6 harmony }
18:33 Mike1989 you are so making me like perl right now....
18:33 geekosaur ...typoes.  feeeh
18:34 Mike1989 geekosaur: are you??
18:34 geekosaur what?  I was misquoting
18:35 Mike1989 :)
18:36 Mike1989 ?
18:36 spider-mario what’s this .oO notation, btw?
18:37 geekosaur thought bubble
18:37 geekosaur think comics
18:37 tadzik like a comicbook bubble when the character's thinking
18:37 spider-mario oh
18:37 spider-mario thanks
18:37 spider-mario that clarifies a lot of things :D
18:38 adu so if I have a character class
18:38 TimToady .oO(a comicbook character clas...)
18:38 adu like char, and I want all but one char do I have to use <+char -[']>?
18:40 adu I'm wondering why <char-[']> works, should that be parsed as a 'char-' identifier?
18:40 benabik I don't think [ or ] are valid identifiers.
18:40 adu wait <char-[']> doesn't work, but <+char-[']> does
18:46 thou joined #perl6
18:47 [Coke] . o O (Of course, timtoady's bubbles are too close together.)
18:47 moritz adu: <somthing  tries to parse it as a subrule call
18:47 moritz adu: <+something as a character class
18:48 colomon .oO(wishes comic book characters still thought this way...)
18:48 adu moritz: ok, that makes sense
18:49 colomon moritz++
18:50 moritz not sure if that's spec, but I'm pretty sure that's how rakudo does it
18:51 moritz std: /<foo-[bla]>/
18:51 p6eval std 8632387: OUTPUT«[31m===[0mSORRY![31m===[0m�Unrecognized regex metacharacter - (must be quoted to match literally) at /tmp/dzoo1vvtDA line 1:�------> [32m/<foo-[33m�[31m[bla]>/[0m�Can't call method "from" on unblessed reference at STD.pm line 55001.�FAILED 00:00 41m�»…
18:51 moritz ok, seems spec
18:51 * [Coke] reminds all comic book aficionados to go see avengers.
18:51 * benabik reminds everyone else to go see avengers.
18:51 adu what's with all the .oO()?
18:52 PerlJam [Coke]: trying to make the second weekend tally as large as opening weekend?  :-)
18:52 PerlJam adu: thought bubbles.
18:52 moritz < tadzik> like a comicbook bubble when the character's thinking
18:52 adu oooh
18:52 [Coke] PerlJam: I brought the family of 5 to the second weekend, did my part. ;)
18:52 [Coke] . o O (Didn't we just explain this?)
18:52 benabik It's like deja vu all over again.
18:53 PerlJam Whenever they mention the dollar figure brought in, I wonder if those dollars are absolute or normalized.
18:53 adu [Coke]: I was having trouble figuring out which bubbles you were talking about
18:53 moritz all of them!
18:53 PerlJam Because then Titanic came out (the first time), tickets were like half the price they are today
18:53 [Coke] .u large circle
18:53 phenny U+25EF LARGE CIRCLE (◯)
18:53 [Coke] .u dotted circle
18:53 phenny U+25CC DOTTED CIRCLE (◌)
18:54 [Coke] . o ◌ (slightly better.)
18:56 * PerlJam idly wonders if there are dotted parens
18:56 alim joined #perl6
18:58 spider-mario .u dotted
18:58 phenny U+205C DOTTED CROSS (⁜)
18:58 spider-mario .u dotted bracket
18:58 phenny U+2E04 LEFT DOTTED SUBSTITUTION BRACKET (⸄)
18:58 birdwindupbird joined #perl6
18:58 spider-mario .u dotted parenthesis
18:58 phenny spider-mario: Sorry, no results for 'dotted parenthesis'.
18:58 NamelessTee joined #perl6
18:58 geekosaur don't see one
19:01 * colomon will go eventually.  after all, he saw three movies in theaters last year!
19:02 * colomon was referring to the earlier avengers mentions.
19:03 geekosaur .u cloud
19:03 phenny U+2601 CLOUD (☁)
19:05 * TimToady likes 雲 better
19:08 spider-mario .u 雲
19:08 phenny U+96F2 CJK UNIFIED IDEOGRAPH-96F2 (雲)
19:08 geekosaur this font doesn't like cjk
19:08 spider-mario phenny: "雲"?
19:08 phenny spider-mario: "Cloud" (ja to en, translate.google.com)
19:08 spider-mario :)
19:08 geekosaur the font that did didn't like the eject icon in std and niecza error messages...
19:09 * geekosaur needs better fonts....
19:10 araujo joined #perl6
19:10 s1n joined #perl6
19:11 moritz nqp: try { nqp::die("foo") }; say($!)
19:11 p6eval nqp: OUTPUT«Symbol '$!' not predeclared in <anonymous>␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 149 (compilers/pct/src/PCT/HLLCompiler.pir:106)␤»
19:12 moritz nqp: try { nqp::die("foo"); CATCH say($_) }
19:12 p6eval nqp: OUTPUT«Missing block at line 1, near "say($_) }"␤current instr.: 'nqp;HLL;Grammar;panic' pc 22008 (src/stage2/gen/NQPHLL.pir:7047) (src/stage2/gen/NQPHLL.pm:329)␤»
19:14 ggoebel joined #perl6
19:19 japhb Is there a method that selects exactly the opposite of what .grep does?  In other words, is a simpler replacement method for this:   @foos.grep(* !~~ / 'foo' /)  ?
19:21 gfldex you could move the condition into the RE
19:23 japhb gfldex, is there a way to do that that is less ugly than what is already there?
19:23 gfldex don't think so
19:24 japhb (This came up while I was trying to make a point about clarity of Perl 6 code with my boss, and wrote that out, and went "Hum, that looks uglier than it needs to be ...")
19:26 colomon japhb: on the bright side, writing your own grep equivalent is pretty easy...
19:27 moritz .grep({ !/foo/ })
19:28 * colomon is pondering a :v modifier for grep...
19:28 TimToady .grep(none /foo/)
19:28 * japhb had the same evil thought as colomon, but couldn't bring himself to mention it.  ;-)
19:28 TimToady .grep(none ?/foo/) maybe
19:29 TimToady .grepn't
19:29 moritz TimToady: those all evaluate too early
19:29 colomon TimToady: that's just stupid enough to love
19:30 japhb Interestingly, Rakudo and Niecza both DWIM with TimToady's first suggestion, but only Niecza does moritz's.
19:30 [Coke] colomon: that's kind of a crappy motto to give to TimToady.
19:31 moritz oh right, I see why none /foo/ works
19:31 moritz p6: say <f o o>.grep({! /o/ })
19:31 p6eval rakudo 3ec936: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in method Bool at src/gen/CORE.setting:9271␤  in sub prefix:<!> at src/gen/CORE.setting:2145␤  in block <anon> at /tmp/GqR5ywNmIK:1␤␤»
19:31 p6eval ..niecza v17-4-ge5b869e: OUTPUT«f␤»
19:31 p6eval ..pugs: OUTPUT«␤»
19:31 s1n joined #perl6
19:31 moritz why is $_ Any in rakudo?
19:38 japhb .oO( We could call a reverse grep 'perg' )
19:41 alim joined #perl6
19:44 TimToady moritz: because Mu produces too many weird results from a user's point of view to warrant it as a default value for what is likely to be thought of as an ordinary object, and because there is no requirement that the default of a container be the same as its type constraint
19:45 TimToady in fact, for KeyHashes we specifically want the default to be just one of the allowed values
19:48 snearch joined #perl6
19:48 snearch joined #perl6
19:49 KyleHa joined #perl6
19:49 KyleHa r: say 'hello #perl6'
19:49 p6eval rakudo 3ec936: OUTPUT«hello #perl6␤»
19:49 dalek Perlito: b03b4c0 | (Flavio S. Glock)++ | / (3 files):
19:49 dalek Perlito: Perlito5 - parser: simplify
19:49 dalek Perlito: review: https://github.com/fglock/Perlito/commit/b03b4c0695
19:50 KyleHa r: use Test; say "I'm still alive"
19:50 p6eval rakudo 3ec936: OUTPUT«I'm still alive␤»
19:50 KyleHa r: use Test;$_ = 'RT 112540';ok /./, 'I believe I can match';
19:50 p6eval rakudo 3ec936: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in method Bool at src/gen/CORE.setting:9271␤  in sub prefix:<?> at src/gen/CORE.setting:2137␤  in sub ok at lib/Test.pm:66␤  in block <anon> at /tmp/OLNWBgP1vI:1␤␤»
19:51 KyleHa What's going on there?
19:51 KyleHa r: use Test;$_ = 'RT 112540';if /./ { say 'No really' }
19:51 p6eval rakudo 3ec936: OUTPUT«No really␤»
19:52 [Coke] r: use Test;$_ = 'RT 112540';ok ?/./, 'Does this match?'
19:52 p6eval rakudo 3ec936: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in method Bool at src/gen/CORE.setting:9271␤  in sub prefix:<?> at src/gen/CORE.setting:2137␤  in block <anon> at /tmp/yhGJgQa_Ku:1␤␤»
19:54 [Coke] Test is probably a red herring.
19:54 [Coke] $_ = "hi"; /./;
19:54 [Coke] r: $_ = "hi"; /./;
19:54 p6eval rakudo 3ec936:  ( no output )
19:55 [Coke] r: $_ = "hi"; ?/./;
19:55 p6eval rakudo 3ec936: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in method Bool at src/gen/CORE.setting:9271␤  in sub prefix:<?> at src/gen/CORE.setting:2137␤  in block <anon> at /tmp/ZndBUzXeg7:1␤␤»
19:55 KyleHa So it is.
19:56 KyleHa r: $_ = 'x'; if ?/./ { say "Hm" }
19:56 p6eval rakudo 3ec936: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in method Bool at src/gen/CORE.setting:9271␤  in sub prefix:<?> at src/gen/CORE.setting:2137␤  in block <anon> at /tmp/bwXUvgLxng:1␤␤»
19:56 kboga joined #perl6
19:56 KyleHa r: $#!(%2$da*!@
19:56 p6eval rakudo 3ec936: OUTPUT«===SORRY!===␤Unsupported use of $# variable;  in Perl 6 please use .fmt␤at /tmp/NPfuFszvAn:1␤»
19:57 [Coke] r: 'x' ~~ /./ && say "hm"
19:57 p6eval rakudo 3ec936: OUTPUT«hm␤»
19:58 moritz TimToady: I meant, why doesn't .grep sets the $_ in the block?
19:59 moritz r: say <a b c>.grep({ .say })
19:59 p6eval rakudo 3ec936: OUTPUT«a␤b␤c␤a b c␤»
19:59 moritz r: say <a b c>.grep({!/b/ })
19:59 p6eval rakudo 3ec936: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in method Bool at src/gen/CORE.setting:9271␤  in sub prefix:<!> at src/gen/CORE.setting:2145␤  in block <anon> at /tmp/tFsPQxxTUu:1␤␤»
19:59 moritz r: say <a b c>.grep({not $_ ~~/b/ })
19:59 p6eval rakudo 3ec936: OUTPUT«a c␤»
19:59 moritz r: say <a b c>.grep({/b/ })
19:59 p6eval rakudo 3ec936: OUTPUT«b␤»
20:00 moritz the prefix:<!> causes the regex to see a different $_?
20:01 jferrero joined #perl6
20:02 diakopter r: say <a b c>.grep({!($_~~/b/)})
20:02 p6eval rakudo 3ec936: OUTPUT«a c␤»
20:03 benabik_ joined #perl6
20:05 moritz masak: do you know if this one is submitted?
20:06 KyleHa It's sort of here:  https://rt.perl.org/rt3/Ticket/Display.html?id=112540
20:06 colomon joined #perl6
20:06 colomon Does it make any sense for the same action to fire on the same line of parsed string over and over again?
20:06 moritz KyleHa++
20:06 pmurias Woodi: what's wrong with using html for gui?
20:06 moritz pmurias: the fact that UIs are stateful but HTTP is not
20:08 spider-mario Wt (for C++ and Java :/) handles that quite nicely
20:08 havenn joined #perl6
20:08 spider-mario and produces applications that don’t depend on JavaScript
20:08 spider-mario even if they use it if it is available
20:10 spider-mario its API looks a little like Qt’s
20:10 moritz well, it requires a whole pile of workarounds and hairy tricks; there are frameworks that help you with it, but it's still a pile of workarounds and tricks
20:11 dalek Perlito: e51aa92 | (Flavio S. Glock)++ | / (7 files):
20:11 dalek Perlito: Perlito5 - parser: simplify internal data structure for expressions
20:11 dalek Perlito: review: https://github.com/fglock/Perlito/commit/e51aa92723
20:12 dalek rakudo/nom: f69e58c | moritz++ | src/core/Exception.pm:
20:12 dalek rakudo/nom: typo noticed by kboga++
20:12 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f69e58c53b
20:14 adu I bet it would be really easy to write things like 'cut' and 'wc' in perl6
20:14 moritz it is
20:14 diakopter those would be cool examples
20:14 adu I wrote a tool (called 'only') in Haskell, and it would probably be somewhat easy in perl6 too
20:15 moritz and contrary to the UNIX tools, it will be harder (and not easier) to limit cut to a single character delimiter :-)
20:15 adu http://hackage.haskell.org/package/only
20:15 spider-mario say +$*IN.get.lines
20:15 spider-mario oops
20:15 spider-mario -.get
20:15 spider-mario say +$*IN.lines
20:15 spider-mario (even simpler)
20:15 moritz but that's just wc -l
20:15 spider-mario true
20:16 adu I used a custom regex syntax N/patt/M where N is the N-th match to display, and M is a range of lines (simulating grep -A -B)
20:16 spider-mario for words, it would be: say [+] $*IN.lines».words, I guess
20:16 adu but I realized recently that perl6 has :3rd for that
20:16 moritz my @l := lines(); my $lines = +@l; my $words = [+] @l>>.words; my $chars = [+] @l>>.chars;
20:17 spider-mario that last line gives me 0
20:17 spider-mario (mine)
20:17 moritz r: my @l := lines; say +@l; say [+] @l>>.words; say [+] @l.chars;
20:17 p6eval rakudo 3ec936: OUTPUT«23␤0␤615␤»
20:17 spider-mario oh, no [+], probably
20:18 spider-mario for words, it would be: say +$*IN.lines».words, I guess
20:18 moritz r: my @l := lines; say +@l; say [+] @l>>.words>>.elems; say [+] @l.chars;
20:18 p6eval rakudo 3ec936: OUTPUT«23␤81␤615␤»
20:18 spider-mario I forgot to strip the rest of my message.
20:18 spider-mario sorry. :D
20:18 spider-mario say +$*IN.lines».words
20:18 adu and as I found, rot13 was also a short script
20:19 moritz rot13 is a single .trans call in Perl 6
20:19 adu yeah :) so really the hard part is in making it look nice, perhaps with a %hash or something
20:21 moritz perl6: say get().trans('a..zA..Z' => 'N..ZA..M')
20:21 p6eval pugs: OUTPUT«*** No such subroutine: "&get"␤    at /tmp/Zz33DcoV9n line 1, column 5 - line 2, column 1␤»
20:21 p6eval ..rakudo 3ec936, niecza v17-4-ge5b869e: OUTPUT«YNAQ QRE ORETR, YNAQ NZ FGEBZR,␤»
20:21 moritz perl6: say get().trans('a..zA..Z' => 'n..za..mN..ZA..M')
20:21 p6eval pugs: OUTPUT«*** No such subroutine: "&get"␤    at /tmp/nk48Rq_jLh line 1, column 5 - line 2, column 1␤»
20:21 p6eval ..rakudo 3ec936, niecza v17-4-ge5b869e: OUTPUT«Ynaq qre Oretr, Ynaq nz Fgebzr,␤»
20:22 adu perl6: say "hello world".trans('a..zA..Z' => 'n..za..mN..ZA..M')
20:22 p6eval pugs, rakudo 3ec936, niecza v17-4-ge5b869e: OUTPUT«uryyb jbeyq␤»
20:22 adu perl6: say "uryyb jbeyq".trans('a..zA..Z' => 'n..za..mN..ZA..M')
20:22 p6eval pugs, rakudo 3ec936, niecza v17-4-ge5b869e: OUTPUT«hello world␤»
20:23 moritz \o/
20:24 pmurias moritz: what i'm currently rewriting my p5 win32 api app is HTML+CEF (embedding chrome)
20:26 KyleHa Rakudo isn't building for me right now.
20:30 araujo joined #perl6
20:30 araujo joined #perl6
20:34 moritz KyleHa: what's the problem?
20:34 KyleHa Maybe it was —gen-parrot with the —jobs=5 thing. Dunno.
20:35 KyleHa Now it looks as if it will work.
20:37 moritz nqp has some problems building dyncall in parallel, I think
20:42 kboga hi #perl6
20:44 masak kboga! \o/
20:44 kboga masak! \o/
20:46 masak \o/
20:46 gv joined #perl6
20:47 masak kboga: was it you who made the Real->role pull request? awesome!
20:47 masak kboga++
20:49 kboga yes, I thought it was LHF, you guys on the other hand are doing the hard stuff.
20:50 masak <3
20:50 masak um, I mean, ♥
20:51 thou joined #perl6
20:51 kboga and trying learn some git in the meanwhile :)
20:51 masak that's always worthwhile.
20:52 masak the git model is here to stay, and teaches you invaluable lessons about immutability.
20:52 KyleHa Immutable cat is immutable.
20:53 colomon kboga++ # Rational!
20:55 kboga Its mostly moritz++ 's work, this time I tried to build on his Rational branch.
20:58 kboga It cheats on using Int instead of the UInt64 subset restriction for Rat's denominator though.
20:58 kboga I think there's a subset related bug. (not sure)
20:59 masak is there some way you can verify that there's a subset-related bug?
21:00 kboga hmm, you mean like a golfed down version or actually changing the denom to UInt64 in the setting itself?
21:00 cosimo hi #perl6
21:00 kboga hi cosimo
21:01 jnthn evening, #perl6
21:01 masak kboga: I mean the shortest possible program that shows there's a bug.
21:01 adu hi #perl6
21:02 kboga masak: I can try, but I'm not sure if I can catch it. :)
21:03 cosimo if I had to try rakudo now, after a while where I didn't do much, what version should I pick? nom, master, star, ...?
21:03 KyleHa Can Rakudo catch warnings as it does for exceptions in a try block?
21:03 masak kboga: think of it as a challenge -- to minimize the program while retaining the bug! :)
21:04 felher Assume i have a 'class A { has Str $!content-from-file; submethod BUILD() { $!content-from-file = ... load file from disk } }'. Is this BUILD submethod a valid one? Or do i have to do something like 'submethod BUILD($!content-from-file) { ... }'? I'm asking after reading http://perlgeek.de/blog-en/perl-6/object-construction-and-initialization.html (which may be outdated by now)
21:04 jnthn KyleHa: CONTROL block for those, I think.
21:05 jnthn felher: That's valid, and the post should sa :$!content-from-file these days.
21:05 spider-mario joined #perl6
21:05 jnthn felher: It only makes sense to use the attributive parameters if you want to assign the value the user passed in.
21:06 felher jnthn: great, thanks :)
21:06 jnthn Sheesh, loads of backlog formed while I was out...
21:06 KyleHa jnthn: Indeed, S32-basics/warn.t is instructive.
21:08 * [Coke] wants a nice utility that will take a String and tell him what encoding it probably is.
21:08 felher jnthn: actually, the post does say ":$!something", but the spec at S12-objects.pod:867 doesn't :)
21:09 [Coke] sorry, a string.
21:10 KyleHa How would the assembled sixers feel about a Test.pm function "warns_ok" similar to "dies_ok"?
21:10 _jaldhar joined #perl6
21:10 KyleHa Also, I might have enjoyed having "dies_like" at times.
21:10 Woodi pmurias: HTML requires a lot of environment: browser, server, network, css... that's many things that can goes wrong. if you want just app in one binary you can take with you or distribute "traditional" way is simpler. and HTML apps are better for multiuser apps
21:12 [Coke] woodi; do you care about being able to run your app on various clients?
21:15 masak r: enum Weekday <Mon Tue Wed Thu Fri Sat Sun>; augment class Weekday { multi method succ($ where Sun:) { Mon } }; say "alive"
21:15 p6eval rakudo f69e58: OUTPUT«===SORRY!===␤augment not allowed without 'use MONKEY_TYPING'␤at /tmp/4SJVEYxsGw:1␤»
21:15 masak r: use MONKEY_TYPING; enum Weekday <Mon Tue Wed Thu Fri Sat Sun>; augment class Weekday { multi method succ($ where Sun:) { Mon } }; say "alive"
21:15 p6eval rakudo f69e58: OUTPUT«===SORRY!===␤Cannot auto-generate a proto method in the setting␤»
21:15 masak huh!
21:16 masak why am I getting this error message?
21:16 pmurias Woodi: i'm planning on just distributing an client with an embedded chrome ;)
21:17 jnthn masak: Uh.
21:17 jnthn masak: Because it failed to detect the meta-object mismatch at the point you started augmenting.
21:19 jnthn masak: And then EnumHOW ain't set up to support multi-methods being added.
21:19 masak where does the setting enter into the picture?
21:20 jnthn masak: The code path that issues that is the one that you hit if you don't explicitly write a proto when declaring a multi in the setting.
21:21 masak so it tries to figure out what went wrong, and arrives at a common cause which isn't applicable in this case?
21:21 jnthn Right.
21:21 * masak submits LTA rakudobug
21:21 jnthn Well, what's really LTA is it let you get that far.
21:21 masak aye.
21:21 jnthn Which I do want to fix. So yes, please file.
21:24 masak r: use MONKEY_TYPING; enum Weekday <Mon Tue Wed Thu Fri Sat Sun>; Sun does role { method succ { Mon } }; say "alive"
21:24 p6eval rakudo f69e58: OUTPUT«Method 'mixin' not found for invocant of class 'Perl6::Metamodel::EnumHOW'␤  in sub infix:<does> at src/gen/CORE.setting:10736␤  in block <anon> at /tmp/ts2h7FxTUT:1␤␤»
21:24 masak oh, come *on* :P
21:24 jnthn That one is at least descriptive. :)
21:24 jnthn Should we actually support that?
21:25 masak probably not.
21:25 masak I'm just trying to get the week to wrap somehow.
21:25 masak then I can do Sat ... Wed :)
21:25 jnthn :P
21:28 kboga If anyone is interested, this is what happens when Rat's denominator's restriction is set to the UInt64 subset (on that pull request): http://nopaste.info/b9401c71d5.html
21:28 havenn joined #perl6
21:33 masak kboga: you get a delegation loop between prefix:<~>, .Str, and .Stringy for some reason.
21:34 jnthn Means "you need to circualrity saw here"
21:34 kboga yea, i figured something circular is going on, but I have yet to find the source.
21:34 jnthn uh, are you actually using a subset for UInt64?
21:35 kboga well, that I got from moritz++ 's Rational branch
21:35 jnthn I'm dubious that's going to work out well for Rat, since we have to create those at compile time.
21:35 jnthn Also, that will totally hose performance.
21:35 jnthn We'll have to implement it some other way.
21:36 jnthn Isn't it meant to be uint64 (a native type) also?
21:38 alim joined #perl6
21:39 sjohnson joined #perl6
21:40 kboga http://perlcabal.org/syn/S02.html#line_747
21:40 adu I'm having the darndest time trying to match a CDATA section
21:40 adu r: my token char { <[\ ..~]> }; my token cd_sect { '<![CDATA[' <char>* ']]>' }; say "<![CDATA[ hello ]]>" ~~ /^ <cd_sect> $/
21:40 p6eval rakudo f69e58: OUTPUT«#<failed match>␤»
21:40 kboga "(which may or may not be implemented as a native uint64, since small representations may be desirable for small denominators)"
21:42 jnthn That's weird.
21:42 pochi joined #perl6
21:42 jnthn It's also the only mention of it in uppercase that I can see in the spec. Elsewhere in S02 and also in S09 it always appears as uint64
21:43 * jnthn defers to TimToady++ for a clarification :)
21:46 jnthn moritz++ # substr-rw
21:47 sh0ne joined #perl6
21:50 masak clearly I need to backlog!
21:50 jnthn :)
21:50 * jnthn backlug and was happy to see that :)
21:53 adu r: my token char { <[\ ..~]> }; my token cd_start { '<![CDATA[' }; my token cd_data { [<.char> & <-[\]]>]* }; my token cd_end { ']]>' }; my token cd_sect { <.cd_start> <cd_data> <.cd_end> }; say "<![CDATA[ hello ]]>" ~~ /^ <cd_sect> $/
21:53 p6eval rakudo f69e58: OUTPUT«=> <<![CDATA[ hello ]]>>␤ cd_sect => <<![CDATA[ hello ]]>>␤  cd_data => < hello >␤␤»
21:53 adu I think that works, but it's wrong
21:53 sh0ne Guys, where can I check why am I banned in #perl channel? I didn't even know that I was banned, because I haven't been that much active for a couple of months and when I am I'am usually with specific question about something. Also, I don't know how long I was banned already. Thank you.
21:54 adu how do I match all sequences except ']]>'?
21:54 kboga Currently there aren't any unsigned integer natives in rakudo right?
21:54 jnthn kboga: right.
21:55 jnthn adu: <!before ']]>'> . ** 3
21:55 jnthn Is one way
21:56 adu thanks jnthn++
22:02 adu jnthn: so that would match any string which is a multiple of 3
22:04 jnthn adu: Er, . means match anything, ** 3 means "3 of them"
22:04 masak sh0ne: not sure about the answer to that one. perhaps easiest to get in contact with some op or other and ask them to check for you.
22:04 ispeak_ joined #perl6
22:05 jnthn adu: Maybe that's what you meant too :)
22:05 sh0ne masak: thank you, sir.
22:05 masak sh0ne: generally, the best strategy is "don't be a troll", though :) though I'm sure you're a very nice person.
22:05 adu jnthn: I suppose I was talking about <what you said>*
22:06 adu the spec says you can do token foo { .* !~~ ']]>' } but it doesn't seem to work
22:08 kboga Seems like something assumes the second parameter to Rat's new to be always of type Int: http://nopaste.info/ed7ccf05ed.html # Just curious, I know Num here is insane, even tried it with signed int32 (same result)
22:09 jnthn adu: ah, yeah...that one isn't implemented in Rakudo yet.
22:11 adu niecza: my token yes { .* !~~ 'no' }; say "logic" ~~ /<yes>/
22:11 p6eval niecza v17-4-ge5b869e: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method quantifier:sym<~~> not yet implemented at /tmp/D0Zh5Z_IV4 line 1:�------> [32mmy token yes { .* !~~ 'no'[33m�[31m }; say "logic" ~~ /<yes>/[0m��Quantifier quantifies nothing at /tmp/D0Zh5Z_IV4 line 1:�------…
22:11 adu is it in pugs?
22:12 masak don't think so.
22:15 * jnthn puts it on his todo list
22:15 adu can I help?
22:18 sergot 'night o/
22:18 Woodi about rakudo spectest on OpenBSD 5.1: failed tests: S03-operators/arith.rakudo 1, S03-operators/overflow.rakudo 28, S19-command-line/dash-e.t 2, S32-num/power.rakudo 1
22:18 masak 'night, #perl6
22:18 adu masak: night
22:18 Woodi night
22:18 jnthn adu: I'm not quite sure how to do it without looking a little deeper.
22:21 adu where would I start looking? blib?
22:22 adu src/Perl6/Actions?
22:22 jnthn adu: Well, to get an idea of how we implement regexes, see the NQP repo, in src/QRegex/P6Regex. The Grammar is how we parse them, Actions turns them into AST.
22:22 jnthn We could probably add this into src/Perl6/Actions and src/Perl6/Grammar though.
22:22 adu ok
22:23 jnthn We subclass P6Regex and add Perl 6 extras.
22:23 jnthn But it's hard to get the big picture just by reading the bits in src/Perl6/[Grammar|Actions].pm
22:25 adu jnthn: nqp or nqp-rx?
22:26 jnthn nqp
22:26 jnthn nqp-rx isn't used by Rakudo any more.
22:34 adu why does everything begin with Q?
22:35 jnthn adu: I think it started with a desire to produce the next iteration of various things that began with "P", and P++ is Q. :)
22:36 adu ah
22:36 adu that makes sense
22:36 adu what would make more sense is "quoted expressions"
22:38 jnthn Curiously, just before you asked this, I started on a patch to implement the (mostly unrelated) <~~> :)
22:39 adu is there a difference between { $X ~~ $Y } and { $X & <~~$Y> }?
22:39 adu I mean spec-wise
22:40 jnthn Not sure what the later means
22:40 jnthn But I think you're asking "can I implement this with &"
22:40 jnthn I'd pondered that but...
22:40 jnthn The spec says that it's not quite the same.
22:40 adu ok
22:40 jnthn Because X ~~ Y means "does Y match *somewhere* in X"
22:41 adu oh right
22:41 jnthn Whereas & implies equal length.
22:42 adu so { $X !~~ $Y } and { $X & <!~~$Y> } would thus be different as well
22:43 jnthn Note that what you can use in <~~...> is contrained to a positional or named capture
22:43 jnthn *constrained
22:43 adu so you'd have to make a named rule
22:43 jnthn Though so far here I only did <~~>
22:43 jnthn Not <~~0> and <~~foo>
22:43 jnthn Yeah
22:43 jnthn I'll get to those, but it's almost 1am here, so maybe not today :)
22:43 adu ok
22:44 adu if you need any help, or an extra pair of eyes, let me know
22:46 jnthn Thanks :)
22:49 whiteknight joined #perl6
22:51 dalek rakudo/nom: 1e35759 | jnthn++ | docs/ChangeLog:
22:51 dalek rakudo/nom: Note about l-value substr in ChangeLog.
22:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1e35759769
22:51 dalek rakudo/nom: 22c12b0 | jnthn++ | / (4 files):
22:51 dalek rakudo/nom: First crack at <~~> in regexes. Note that <~~0> and <~~beer> are NYI, and are probably compiled a bit differently.
22:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/22c12b0cff
22:53 dalek roast: cb86fc4 | jnthn++ | S05-metasyntax/angle-brackets.t:
22:53 dalek roast: Correct and unfudge a test. This tweak is needed since the call is recursive (the spec uses that word), which presumably means it can recurse multiple times, and the test didn't provide a way for that recursion to terminate in its original form.
22:53 dalek roast: review: https://github.com/perl6/roast/commit/cb86fc4ebe
22:54 jnthn And with that, I'm decidedly ready for some sleep. 'night o/
23:06 lichtkind joined #perl6
23:12 havenn joined #perl6
23:12 skids joined #perl6
23:50 lestrrat joined #perl6

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

Perl 6 | Reference Documentation | Rakudo