Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-03-26

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:07 jack_rabbit joined #perl6
00:10 J-L joined #perl6
00:18 tinyblak joined #perl6
00:25 pippo_ joined #perl6
00:25 japhb Man, I wish `perl6-m -e ''` was as fast as `perl6-m -v` ...
00:25 pippo_ o/ #perl6
00:28 pippo_ Any body could tel me if it is normal that "ababbabbbabbbabbbbbabb" ~~ m/<[ab]>+/ is faster than "ababbabbbabbbabbbbbabb" ~~ m/[a|b]+/ ?
00:28 pippo_ m: my $t = now; for ^10_000 {"ababbabbbabbbabbbbbabb" ~~ m/<[ab]>+/}; say now - $
00:28 camelia rakudo-moar 9746e8: OUTPUT«use of uninitialized value of type Any in numeric context␤Instant:1427329759.810493␤»
00:28 colomon_ joined #perl6
00:28 pippo_ m: my $t = now; for ^10_000 {"ababbabbbabbbabbbbbabb" ~~ m/<[ab]>+/}; say now - $t;
00:28 camelia rakudo-moar 9746e8: OUTPUT«1.404720␤»
00:29 pippo_ m: my $t = now; for ^10_000 {"ababbabbbabbbabbbbbabb" ~~ m/[a|b]+/}; say now - $t;
00:29 camelia rakudo-moar 9746e8: OUTPUT«2.09785693␤»
00:30 pippo_ good night!
00:30 pippo_ left #perl6
00:31 raydiak retupmoca++ awesome!  it seems to get past that part now, so I can only assume it's working like it should be, until I get the rest finished; thanks again, excited I can move forward again
00:31 yoleaux 25 Mar 2015 22:35Z <retupmoca> raydiak: install the newest Compress::Zlib, and then try: https://gist.github.com/retupmoca/5ea886e6d75f62d450b8
00:38 flussence I was gonna write a late guesswork answer to that regex question, but I found a neater answer
00:39 tinyblak joined #perl6
00:39 flussence .tell pippo_ «perl6 --target=ast -e '/<[ab]>+/; /[a|b]+/' | grep QAST::Regex» explains that difference well; the [a|b] case creates slightly more code to run.
00:39 yoleaux flussence: I'll pass your message to pippo_.
00:42 timotimo flussence: we can't really skip that, because there'll be parse errors from browsers
00:42 timotimo browsers aren't meant to handle object literals in the mluti-digit megabytes
00:42 timotimo it seems
00:42 flussence aw, oh well.
00:43 timotimo if you have something better, it'd be nice to have something that is faster
00:43 timotimo can you do a bit of javascript work?
00:43 timotimo when replacing the angular version used in our template with the newest one in the 1 series, things break
00:43 timotimo apparently the ng-visible="..." stuff doesn't work any more
00:43 timotimo or was it "ng-show"
00:43 flussence I know JS, I might play around with it tomorrow but no promises :)
00:44 timotimo cool
00:44 timotimo it looks like angular just completely ignores ng-show in the new version or something?
00:44 timotimo it just shows all of the "alternatives" we've built
00:45 flussence I know almost zero about angular... but problems like that sound all too familiar, argh
00:46 flussence (just in using js frameworks in general)
00:46 timotimo :)
00:48 flussence (the last big JS thing I worked on like that was at a job where they decided it'd be a good idea to redo the entire UI around a shinier framework mid-project...)
00:51 timotimo d'oh
00:51 timotimo well, three on the roof is worth more than one in the hand, eh?
00:57 laouji joined #perl6
01:09 kurahaupo1 flussence: usually a bad idea, but sometimes it's worth giving up on an impossibly bad framework
01:11 flussence I acknowledge that, but I'd learned to cope with the bad bits by then :)
01:21 colomon joined #perl6
01:25 raydiak m: say pack "H*", "a"
01:25 camelia rakudo-moar 9746e8: OUTPUT«Cannot call Real(Failure: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in method Real at src/gen/m-CORE.setting:4813␤  in sub infix:<%> at src/gen/m-CORE.setting:5295␤  in block  at src/gen/m-CORE.setting:6792␤  in sub pack at src/gen/…»
01:26 raydiak ^ https://github.com/rakudo/rakudo/pull/395
01:33 Akagi201 joined #perl6
01:36 [particle] joined #perl6
01:49 Akagi201 joined #perl6
02:01 colomon joined #perl6
02:07 colomon joined #perl6
02:07 tinyblak joined #perl6
02:17 adu_ joined #perl6
02:35 skids joined #perl6
02:46 ilbot3 joined #perl6
02:46 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31
02:51 pochi joined #perl6
02:52 Hor|zon_ joined #perl6
02:55 tinyblak joined #perl6
02:56 prime joined #perl6
02:57 Hor|zon joined #perl6
03:06 noganex_ joined #perl6
03:10 * skids cannot figure out how to pass :%chosen into the nqp ModuleLoader.load_module.
03:11 skids Nothing I ave tried works.
03:18 Psyche^ joined #perl6
03:49 kaleem joined #perl6
03:51 yoleaux joined #perl6
03:52 kurahaupo1 joined #perl6
03:55 yoleaux joined #perl6
04:03 tinyblak joined #perl6
04:21 anaeem1_ joined #perl6
04:22 anaeem1_ joined #perl6
04:52 Sqirrel joined #perl6
04:58 davido_ joined #perl6
05:10 davido_ joined #perl6
05:21 davido_ joined #perl6
05:43 dalek doc: 9d93967 | paultcochrane++ | lib/Type/Str.pod:
05:43 dalek doc: Correct output of split() examples
05:43 dalek doc:
05:43 dalek doc: Thanks to @songzan for pointing this out! This commit closes issue #64.
05:43 dalek doc: review: https://github.com/perl6/doc/commit/9d93967e9b
05:52 dalek doc: fd6d1f8 | (Edwin Steiner)++ | lib/Language/setbagmix.pod:
05:52 dalek doc: Rephrase subtitle and introduction of "Sets, Bags, and Mixes" to
05:52 dalek doc: emphasize the unorderedness of these containers. Avoid calling them "lists".
05:52 dalek doc: Add some words about immutable/mutable variants.
05:52 dalek doc: review: https://github.com/perl6/doc/commit/fd6d1f8316
05:52 dalek doc: 23135c0 | paultcochrane++ | lib/Language/setbagmix.pod:
05:52 dalek doc: Merge pull request #63 from edwinst/master
05:52 dalek doc:
05:52 dalek doc: Emphasize unorderedness of "Sets, Bags, and Mixes".
05:52 dalek doc: review: https://github.com/perl6/doc/commit/23135c0673
05:55 chenryn joined #perl6
06:20 dalek rakudo/nom: fe9bade | raydiak++ | src/core/Buf.pm:
06:20 dalek rakudo/nom: Fix a pack 'H' bug
06:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/fe9bade56a
06:20 dalek rakudo/nom: c5ba5b8 | FROGGS++ | src/core/Buf.pm:
06:20 dalek rakudo/nom: Merge pull request #395 from raydiak/packfix
06:20 dalek rakudo/nom:
06:20 dalek rakudo/nom: Fix a pack 'H' bug
06:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c5ba5b88ed
06:24 raydiak thanks for the merge FROGGS[mobile]2++ :)
06:31 Akagi201 joined #perl6
06:35 eiro joined #perl6
06:45 bjz joined #perl6
07:01 SamuraiJack joined #perl6
07:02 xprime joined #perl6
07:05 ecocode joined #perl6
07:09 diana_olhovik_ joined #perl6
07:09 moritz wow, we have a FROOGS and *two* mobile froggs
07:09 moritz world domination must be around the corner
07:11 abraxxa joined #perl6
07:20 moritz erm, "world domination" is such an ugly phrase. I prefer to call it "world optimization".
07:22 bartolin joined #perl6
07:27 dalek rakudo/nom: 9210cc6 | TimToady++ | src/core/metaops.pm:
07:27 dalek rakudo/nom: allow [Z] and such on indirect lols
07:27 dalek rakudo/nom:
07:27 dalek rakudo/nom: We can now reduce with list infixes over an arbitrary number of lists.
07:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9210cc684c
07:27 dalek roast: eed14ff | TimToady++ | S03-metaops/zip.t:
07:27 dalek roast: add tests for [Z] and [Z<] on indirect lols
07:27 dalek roast: review: https://github.com/perl6/roast/commit/eed14ff5ea
07:27 rindolf joined #perl6
07:29 sno joined #perl6
07:30 darutoko joined #perl6
07:38 bjz joined #perl6
07:41 bjz joined #perl6
07:45 FROGGS joined #perl6
07:46 FROGGS moritz: everything back to normal :D
07:47 Ven joined #perl6
07:48 TimToady .tell grondilu now that [Zop] |lol is fixed, I've used that in the newest http://rosettacode.org/wiki/Longest_common_prefix#Perl_6
07:48 yoleaux TimToady: I'll pass your message to grondilu.
07:49 larion joined #perl6
08:06 TimToady things are normally abnormal here...
08:06 FROGGS which I consider normal in here
08:07 TimToady the normal is normal to the normal here...
08:08 nwc10 which normal (and how many dimensions we have) is left as an exercise to the (confused) reader
08:08 virtualsue joined #perl6
08:08 FROGGS and when we invert the normal we stand behind ourselfs?
08:09 Alina-malina joined #perl6
08:18 Sqirrel joined #perl6
08:31 Alina-malina joined #perl6
08:36 bjz joined #perl6
08:42 Rounin joined #perl6
08:45 pdcawley joined #perl6
08:48 tgt joined #perl6
08:56 smls joined #perl6
08:57 smls Morning
08:58 FROGGS morning smls
09:01 smls TimToady, |Tux| (re backlog): How would you reliably check if the VAR of something has been passed in the "out => VAR($foo)" usecase?
09:01 smls Since not all variables/lvalues are Scalar's
09:02 smls Worse yet, whether something is a Scalar or, say, a Proxy, might be decided at a distance
09:06 smls Think of a case like «my $a = A.new; ... out => VAR(A.foo) ...;» -- someone might do that because it works, but then the author of class A releases a new version where .foo is upgraded from an auto-generated Scalar accessor to a Proxy-returning method.
09:06 smls s/A.foo/$a.foo/
09:07 moritz smls: maybe Proxy should be a subclass of Scalar
09:07 smls maybe
09:07 moritz smls: or there should be a common role that both Proxy and Scalar do
09:09 jnthn The low-level answer is nqp::iscont
09:09 jnthn Which covers Scalar and Proxy
09:10 smls moritz: things like native int variables would still be an issue, but at least those are not something you usually have without knowing it
09:10 jnthn And the various native reference containers.
09:10 jnthn smls: Actually the design is so you *can* not know you have them
09:11 jnthn In general, though, it's probably a very bad idea to write code that goes introspecting these things.
09:11 Ven joined #perl6
09:11 smls m: class A { has int $.foo = 42 }; say A.new.foo.VAR.WHAT
09:11 camelia rakudo-moar 9210cc: OUTPUT«(Int)␤»
09:12 smls jnthn: I mean that you would usually only have one of them if you declared a lexical variable as "my int ..."
09:12 smls If ^^camelia is correct, you won't even get one from a class accessor
09:12 jnthn smls: Or you read a value out of a native array and we didn't know you were going to use it in l-value context, or...
09:13 jnthn That class accessor is ro
09:13 smls d'oh
09:13 jnthn "is rw" gives one
09:13 smls m: class A { has int $.foo is rw = 42 }; say A.new.foo.VAR.WHAT
09:13 camelia rakudo-moar 9210cc: OUTPUT«(IntAttrRef)␤»
09:13 smls hm, in that case yeah, the solution would need to cover native types as well
09:14 jnthn What is the problem at hand, ooc?
09:15 smls |Tux| wanted to port a CSV module API from Perl 5 where passing a reference as "output file name" writes the output to that variable instead of a file
09:16 smls TimToady suggested making the distinction by  out => $foo  vs  out => VAR($foo)  in Perl 6
09:16 jnthn uh...what... :)
09:17 jnthn I can't see how that'd work out
09:17 jnthn Oh, maybe I can
09:17 jnthn But it's...really weird.
09:17 jnthn The first thing I'd do if I was dealing with such code is refactor it to not use VAR :P
09:18 smls better than passing a Capture for the write-to-variable case ;)
09:18 jnthn That's a bunch more robust.
09:18 kjs_ joined #perl6
09:19 Alina-malina joined #perl6
09:19 jnthn Not to mention you can distinguish it with multi dispatch.
09:19 jnthn But I'd still just not do it that way.
09:20 smls jnthn: TimToady did suggest  out => "filename".IO  vs  out => $variable  as his first choice
09:21 smls The VAR() thing was apparently more of a suggestion to keep it close to the Perl 5 API
09:21 Tux__ the VAR thing never struck me as a serious suggestion
09:21 jnthn Well, given I don't think the Perl 5 API in question was even a good idea, I'm not too sad if it's tricky to replicate it very closely in Perl 6.
09:22 jnthn I fail to see a way in which methods to write to file and return as string wouldn't have been clearer.
09:23 * |Tux| fails to parse that
09:23 larion joined #perl6
09:24 jnthn |Tux|: Why not have separate methods: one that returns a string, one that takes a file name and writes to that file? That'd avoid the whole problem *and* almost certainly be clearer to anybody reading the code.
09:24 telex joined #perl6
09:24 |Tux| maybe :)
09:25 jnthn Maybe there's some design motivation I'm missing, it just feels a little magical. :)
09:25 noganex joined #perl6
09:26 * |Tux| feels *all* of perl{5,6} is magical, and I ♥ it!
09:26 smls Returning a string would also allow people to pass it straight to another routine without having to create a temporary variable.
09:26 |Tux| IIRC the routine in question does not return a string in any situation
09:26 fhelmberger joined #perl6
09:27 |Tux| one can pass a reference to a string in the out attribute, in which case you explicitely ask to write the data to the string
09:27 jnthn |Tux|: Yes, though in Perl 6 we tend to cast slightly mess mutable spells :)
09:27 |Tux| the function/method itself will never return a string
09:27 jnthn *slightly less
09:27 psch *slightly less messy
09:27 psch \o
09:28 jnthn |Tux|: Yes, I was suggesting that you might want to have a method that returns a string, with a different name, rather than overloading that onto a "write" method that usually wants a file handle.
09:29 jnthn uh, or file name.
09:29 |Tux| ah, now I understand your remark
09:29 |Tux| I'll ponder on that too
09:29 |Tux| mutli methods are a blessing
09:30 jnthn As smls++ pointed out, then folks can write do-something-with($thingy.get-it-as-a-string) rather than needing to introduce a temporary variable to pass a reference to...
09:31 |Tux| indeed, though this function never was created with that in mind
09:31 |Tux| it was created as a standalone top-level single-call api to do what people want to do *once*
09:32 |Tux| read the entire CSV file into a LoL without having to write loops or care about errors
09:32 |Tux| methods that can be used in process chains are all already done
09:33 jnthn Ah, I see
09:33 * Ven thinks [Zeqv] looks really cool... :P
09:33 |Tux| as I myself use the function being discussed almost every day, I think it fully serves the goal it was written for
09:34 |Tux| and I hada lot of feedback from end-users (SawyerX is very evil in suggesting what he thinks impossible but proved very useful)
09:35 |Tux| I added «csv (in => sub { $dbh->fetch }, out => "file.csv");» -> dump a complete database table to CSV from perl in a single line streaming (no memory restraints)
09:35 dakkar joined #perl6
09:35 |Tux| $sth->fetch of course
09:36 jnthn *nod*
09:36 jnthn OK, if it's a high level thing like that, it makes more sense.
09:37 jnthn I'd still avoiding building it relying on VAR though.
09:37 * jnthn bbi10
09:37 |Tux| I already did (I think)
09:37 grondilu joined #perl6
09:45 smls grondilu, Mouq: Metaops are specced to *not* preserve short-circuiting behaviors of the operators they're used on.
09:45 smls imo the best way to think about short-circuiting ops like && or xx as they exist in Perl 6 right naw, is to imagine that they exist both as a sub and as a macro with the same name.
09:46 smls The macro version provides short-circuiting magic and globbers the sub so it is used when the operator is invoked directly
09:46 larion joined #perl6
09:47 smls but places like  [op]  or &infix:<op>  that explicitly refer to the function object of the operator, get the sub version that cannot short-circuit.
09:49 smls s/short-circuiting/thunking/ more generally
09:49 Sqirrel joined #perl6
09:53 smls hoelzro: Throwing a warning if a lexical variable is redeclared in the same scope, is imo a good thing. Perl 5 does the same with "use warnings".
09:54 * grondilu wonders about reduce then
09:54 yoleaux 07:48Z <TimToady> grondilu: now that [Zop] |lol is fixed, I've used that in the newest http://rosettacode.org/wiki/Longest_common_prefix#Perl_6
09:54 grondilu m: say so reduce * && *, map * > .1, rand xx *
09:54 camelia rakudo-moar 9210cc: OUTPUT«Type check failed in binding &with; expected 'Callable' but got 'Whatever'␤  in sub reduce at src/gen/m-CORE.setting:10526␤  in block <unit> at /tmp/67RnQ4K6CZ:1␤␤»
09:54 smls hoelzro: After all, the whole point of having explicit declarators (rather than first-assigment semantics like Python) is to make it extra clear and visible which lexical variable is which.
09:55 grondilu m: say so reduce { $^a && $^b }, map * > .1, rand xx *
09:55 grondilu nah that can't work.
09:55 camelia rakudo-moar 9210cc: OUTPUT«(timeout)»
09:56 grondilu I guess I just have to use !first as suggested by TimToady
09:56 grondilu TimToady: [Zop] |lol is quite tough to grasp
09:57 masak good always morning, #perl6
09:57 psch o/ masak
09:57 grondilu (but I guess one can get used to it)
09:58 tadzik always morning is the better "eternal september"? :)
09:58 smls .oO(Just mention the word 'macro', and masak will appear...)
09:58 smls ;)
10:01 jnthn Especially if you call the macro marco :D
10:02 jnthn o/ masak
10:04 arnsholt I still think the canonical names should be sub marine and macro polo
10:04 psch regex ~, we meet again *shakes fist*
10:04 arnsholt Not sure about the rest =)
10:04 psch FAILGOAL is interfering with my moreinput efforts
10:04 virtualsue joined #perl6
10:04 psch apparently the way i'm appending doesn't fit with how regex ~ is compiled
10:05 smls I suppose the only way [&&] could sensibly be respecced to short-cuircuit, is if thunking arguments becomes an official feature for Perl 6 routine signatures (rather than something that needs a "macro")
10:06 jnthn psch: a ~b c just becomes a c [b || <.FAILGOAL(...diag args...)>]
10:07 jnthn The compilation isn't more special than that, as far as I remember it.
10:07 jnthn And there's plently of || <.panic: ...> style things elsewhere in the grammar with the same kind of behavior.
10:07 FROGGS and if b is too greedy to also gobble c...
10:08 psch jnthn: right.  i think the issue is that the ast for ~ doesn't get the Cursor where i append
10:08 jnthn FROGGS: I think you mixed up c and b? :)
10:08 FROGGS perhaps :P
10:08 psch but that's a guess right now, i'll have to look closer at it
10:08 psch eh, the ast doesn't get the Cursor anyway
10:08 psch but yeah, i think somewhere there is where i have a problem :l
10:09 jnthn psch: In every single token/rule/regex, about the first thing it does is read the (immutable) target str into a local.
10:10 timotimo o/
10:11 FROGGS hi timotimo
10:11 espadrine joined #perl6
10:11 jnthn o/ timotimo
10:12 timotimo jnthn: did i understand correctly that your tuit-time has come right now? :)
10:13 psch o/ timotimo
10:15 timotimo perhaps that means local <-> localref is going to work in code-gen
10:15 timotimo and then i can build the optimizer support that turns lexicalref/lexical into localref/local
10:15 timotimo and then we may recover a big chunk of the performance hit we recently took
10:16 jnthn timotimo: Just about, yes
10:16 timotimo neato :)
10:17 jnthn timotimo: I need to make a run to the office this afternoon for admin stuff, small meeting, and to see the huge new shiny metal logo that's been added to the office wall since I was last there. :)
10:17 jnthn timotimo: After that I'll be able to focus on stuff more :)
10:17 jnthn Certainly tomorrow is undistracted Perl 6 time :)
10:18 * jnthn still feels like he's catching up on sleep after 3 weeks largely "on the road"...
10:18 psch jnthn: what's "it" there?  NQPCursor?
10:18 psch *Role
10:18 jnthn psch: No
10:18 nwc10 Swedish trains are *so* slow that it takes 3 weeks to get anywhere?
10:18 jnthn psch: The code the rule/token/regex compiles into
10:19 jnthn nwc10: No, and two of the trips were far enough away they were flights.
10:20 jnthn Well, actually, that's because Swedish/Norwegian politicians seem too silly to realize a high speed Copenhagen - Oslo line would actually be really darn useful.
10:20 nwc10 how many hills would it have to tunnel through?
10:20 jnthn Not terribly many on that particular route
10:21 nwc10 not that the Norwegians seem to be allergic to tunneling, given some of the pictures I've seen of their road tunnels
10:21 jnthn I don't remember it being especially tunnelly
10:21 jnthn It just takes 7+ hours and you gotta chance train somewhere.
10:21 arnsholt Oslo-Copenhagen is virtually tunnel-free
10:21 arnsholt The mountains are mostly to the west and north of Oslo
10:21 jnthn I did it a couple of times for the fun of it but...7 hours is not a fun commute.
10:22 Rounin joined #perl6
10:22 nwc10 oh my, Google thinks that you can drive it in 6h17
10:22 arnsholt Skåne (where jnthn and masak are) in particular is almost as flat as Denmark
10:22 jnthn nwc10: Yeah, it's only 600km
10:22 nwc10 if trains are slower than cars, that's a wrongness
10:22 jnthn It trundles along at 70km/h for a chunk of the way, iirc.
10:23 jnthn It *does* mean you get to enjoy the scenery, which in places is quite pretty.
10:23 timotimo last night i had a weird idea where i thought we could have a Cursor or Grammar parameterized with the actions class/instance
10:23 nwc10 IIRC the train from Vienna to Nuremburg feels darn slow in the middle
10:23 nwc10 (probably because it is)
10:23 nwc10 then again, Austria's railJet is, um, misnamed.
10:24 jnthn psch: https://github.com/perl6/nqp/blob/master/src/vm/moar/QAST/QASTRegexCompilerMAST.nqp#L152 is the thing I'm referring to in the Moar code-gen, fwiw
10:24 nwc10 and the new high speed lines are insufficiently French.
10:24 jnthn As in, not 300km/h?
10:24 nwc10 yes, exactly
10:24 jnthn Aww
10:25 timotimo railJit?
10:25 nwc10 only seems to beat an HST on the last bit into Vienna
10:25 arnsholt Train a Moyenne Vitesse? =)
10:25 nwc10 HST is *not new* technology, and not running on purpose built lines.
10:25 jnthn HSTs are soon to be a sight of the past, too...
10:25 timotimo the Holy Shit Train?
10:25 jnthn Basically. :)
10:26 jnthn As I understand it, they were built on a rather tight budget, came out darn awesome, and have been the bread and butter of intercity rail travel in the UK for some decades. :)
10:26 nwc10 I only recently discovered that "BFR" is one term being used for the post Falcon Heavy rocket from SpaceX
10:26 eli-se joined #perl6
10:27 * jnthn sorts out OSDC.no submissions...
10:31 jnthn m: say 230 / 60
10:31 camelia rakudo-moar 9210cc: OUTPUT«3.833333␤»
10:32 timotimo almost four hours
10:32 jnthn That's how long I'll have to give a Perl 6 hands-on tutorial, apparently :)
10:33 timotimo wow
10:35 psch jnthn: i'm a bit confused, then.  «say 1 +\n1;» works with my changes, but «if 1 {\nsay "hi";\n}» doesn't
10:35 psch jnthn: although the error for the second one indicates that you're probably right, 'cause it only has "if 1 {" in "Couldn't find '}'" or however exactly the error was
10:37 timotimo psch: fwiw, i'm very glad you're working on this
10:39 psch timotimo: well, not having a neat REPL is annoying me :)
10:39 jnthn psch: Yes, I don't really have any great answers on this right away...I'll ponder it a bit.
10:40 jnthn psch: Re-fetching the string and length after very subrule call feels...sub-optimal...
10:40 psch jnthn: thanks :)
10:40 jnthn Though could probably be hacked in easily enough
10:40 psch jnthn: fwiw, i'm about to push to branches, maybe i've missed something
10:41 smls Another sneak peek at my current (early-stages) perl6.org redesign work: http://i.imgur.com/QFtj4TQ.png (Close-up of the "Features" section on the main page. Only one Feature box can be expanded at the same time. Clicking outside the box closes it again.)
10:41 jnthn smls: neat! :)
10:41 timotimo smls: i like that
10:42 timotimo smls: also, i've been dreaming about building an in-browser thingie that'd let you execute code
10:42 timotimo every time i think too much about it, security concerns put me off, though
10:42 masak smls: can a person browse the site without JavaScript on?
10:42 psch timotimo: in-browser could be client-side without security concerns, couldn't it?
10:42 psch timotimo: i.e. nqp-js
10:43 jnthn timotimo: I wonder if we could do it by spinning up docker instances...
10:43 timotimo that's a bit off, though
10:43 jnthn timotimo: Which should be sufficiently isolated?
10:43 smls masak: In that case the feature names would be links to  perl6.org/about/features which would have all of the boxes expanded as normal page sections (+ further info which is where the "more" link goes)
10:43 timotimo jnthn: hopefully :)
10:43 timotimo jnthn: and they'd also run inside the high-risk VM
10:43 jnthn And I seem to recall that's possible in O(seconds)
10:44 timotimo docker "instances" come up very fast, aye
10:44 jnthn Could be fun to build a Perl 6 thing to manage them too
10:44 masak smls: nice!
10:44 masak smls++
10:44 timotimo moritz: do you think it'd be a good idea to get a SElinux "enabled" distro for the high-risk vm?
10:44 dalek nqp/moreinput: 8aeba2a | peschwa++ | src/QRegex/Cursor.nqp:
10:44 dalek nqp/moreinput: Turn NQPCursorRole.{target,orig} into accessors.
10:44 dalek nqp/moreinput: review: https://github.com/perl6/nqp/commit/8aeba2a18d
10:44 jnthn Hm, it'd be a nice use case for Perl 6 async stuff to manage the docker things running too...
10:45 smls timotimo: I'd like a try.perl6.org too... ;)
10:45 dalek rakudo/moreinput: 91b292d | peschwa++ | src/Perl6/Grammar.nqp:
10:45 dalek rakudo/moreinput: Partially implement moreinput in our grammar.
10:45 dalek rakudo/moreinput: review: https://github.com/rakudo/rakudo/commit/91b292d65d
10:45 dalek rakudo/moreinput: d7b0597 | peschwa++ | src/Perl6/Compiler.nqp:
10:45 dalek rakudo/moreinput: Provide $*moreinput for the REPL.
10:45 dalek rakudo/moreinput: review: https://github.com/rakudo/rakudo/commit/d7b0597ba8
10:45 tadzik :o
10:45 tadzik good times
10:45 psch jnthn: ^^^ in case there's an obvious stupid that i missed
10:46 smls timotimo: python.org has a "launch interactive shell" thingy which tries to open an ssh connection to an eval server, but it doesn't seem to work for me
10:46 smls oh, actually it does
10:46 smls it's fast, too (once it's connected)
10:47 timotimo i'd really like to have something that can do ANSI escape code commands properly, fwiw
10:47 timotimo can we get the console they have? :)
10:48 timotimo it even does a little "pling!" on \a
10:49 jnthn That's alarming...
10:49 tadzik *g*
11:03 jnthn psch: DEBUG_PLS is cute, but maybe best to prefix it with RAKUDO_ :)
11:03 jnthn If you intend to keep it :)
11:04 skids joined #perl6
11:05 jnthn psch: I'm a bit surprised by nil/Nil as NQP doesn't have them :)
11:05 jnthn Use NQPMu
11:05 smls Any chance deprecation messages could also become opt-in via envvar after 6.0 ?
11:06 jnthn That sounds like a great way for them to be missed...
11:06 smls If we make sure the envvar is set when unit tests are run, the original developer and distro packagers will see them
11:07 smls I really dislike the prospect of end-users of command-line apps being spammed with such messages.
11:07 nwc10 it's an awesome way for them to be missed
11:07 nwc10 at some point in the deprecation cycle they have to be defaulting to on
11:07 smls STDOUT/ERR is basically the user interface of those apps; as developer I should have full control over them to fine-tune what users see.
11:07 nwc10 note, *defaulting*
11:08 jnthn I can see we want something there, but I suspect env var to enable them is the wrong way.
11:09 psch jnthn: DEBUG_PLS is probably a bad habit.  i didn't intend for it to become public... :)
11:09 jnthn psch: OK, then no worries
11:09 Akagi201 joined #perl6
11:10 jnthn What is the $*NESTED_BLOCKS == 0 about, ooc?
11:10 nwc10 it's probably useful to have some sequence. defaulting to off (but can be enabled) and then nearer the time that they will go, defaulting to on (but can be disabled)
11:10 jnthn I'd have expected it to be != 0...
11:10 nwc10 and also, I suspect, I'd view how Perl 5 does no warnings; as a design error
11:10 psch jnthn: the mark is set when we don't want moreinput
11:10 nwc10 C<use warnings; no warnings;> is not a no-op
11:11 nwc10 after it, enabled-by-default warnings get turned off
11:11 psch jnthn: but in moreinput itself it should be !=, yeah
11:11 psch ...i think.  i got distracted by having to help fixing a bike's gear change
11:11 jnthn psch: Hm, maybe we want to name it differently :)
11:11 jnthn Yes, I'm sure *something* is wrong
11:12 timotimo ah, neat! the console used in python.org's "try it out" shell thingie is from chromium OS
11:12 chenryn joined #perl6
11:12 jnthn I can understand why you care about nested blocks, but I'm sure something is off...
11:12 moritz timotimo: re selinux, only if you want me to not maintain it :-)
11:14 jnthn psch: As to 8aeba2a18d, I don't really like those becoming accessors
11:14 darutoko- joined #perl6
11:15 jnthn $cursor.orig($more); $cursor.target($more); is just bad OO design
11:15 gcole_ joined #perl6
11:15 psch jnthn: tbh, that was just the quickest way i could see to get started
11:15 jnthn Probably should be some (scary looking) method !REPLACE_ORIG($orig) { ... } that updates both.
11:16 jnthn I really don't want this to look like any kind of "normal" API for the time being.
11:16 psch *nod*
11:16 larion joined #perl6
11:16 jnthn (Those accessors become Perl 6 visible, which is why I get concerned.)
11:17 yeltzooo9 joined #perl6
11:17 psch yeah, that's where i tested with a small grammar at first
11:17 jnthn ah, OK
11:17 Gruber joined #perl6
11:17 timotimo moritz: then it's settled :D
11:17 jnthn But yeah, I suspect you are running into the whole "target/eos not updated" thing
11:17 psch -        $result = Nil unless $result.to == $target.chars;
11:17 psch +        $result = Nil unless $result.to == $target.chars || $result.to == $result.CURSOR.target.chars;
11:17 psch is what i still have local
11:17 btyler_ joined #perl6
11:17 psch but don't plan to commit :)
11:18 tinita_ joined #perl6
11:19 japhb_ joined #perl6
11:19 haroldwu_ joined #perl6
11:19 bartolin_ joined #perl6
11:19 Ven_ joined #perl6
11:20 perlpilot joined #perl6
11:20 smls_ joined #perl6
11:21 * jnthn should probably have lunch :)
11:21 jnthn bbl
11:22 arnsholt_ joined #perl6
11:24 estrabd_ joined #perl6
11:25 risou_awy joined #perl6
11:29 cursork joined #perl6
11:29 mst joined #perl6
11:29 leedo joined #perl6
11:29 bartolin_ joined #perl6
11:30 nwc10_ joined #perl6
11:30 telex joined #perl6
11:31 timotimo sigh ... one of these days i'll apparently have to actually implement websockets
11:31 timotimo or someone else
11:31 smls_ m: say (*.net *.split)
11:31 camelia rakudo-moar 9210cc: OUTPUT«WhateverCode.new␤»
11:31 smls_ ^^ no TTIAR?
11:32 masak smls_: multiplication
11:32 smls_ ah
11:32 timotimo tee hee
11:33 hugme joined #perl6
11:33 Peter__R joined #perl6
11:33 [ptc] joined #perl6
11:33 kaare__ joined #perl6
11:33 eiro joined #perl6
11:33 yoleaux joined #perl6
11:33 Psyche^ joined #perl6
11:33 pochi joined #perl6
11:33 larks joined #perl6
11:33 petercommand joined #perl6
11:33 vendethiel joined #perl6
11:33 dj_goku joined #perl6
11:33 ugexe joined #perl6
11:33 erdic joined #perl6
11:33 rjbs joined #perl6
11:33 ruoso joined #perl6
11:33 DrForr joined #perl6
11:33 simcop2387 joined #perl6
11:33 d^_^b joined #perl6
11:33 mathw joined #perl6
11:33 cosimo joined #perl6
11:33 BooK joined #perl6
11:35 smls_ masak: But why does it not attempt to evaluate the .split immediately?
11:36 smls_ When constructing the WhateverCode
11:36 moritz m: say (.split).perl
11:36 camelia rakudo-moar 9210cc: OUTPUT«Cannot call split(Nil: ); none of these signatures match:␤    (Cool: Regex $pat, Any $limit = { ... }, Any :all($all), *%_)␤    (Cool: Cool $pat, Any $limit = { ... }, Any :all($all), *%_)␤  in block <unit> at /tmp/xNhaoTSWyk:1␤␤»
11:36 smls_ m: say (* + .split)
11:36 timotimo smls_: because it gets multiplied with a whatevercode
11:36 camelia rakudo-moar 9210cc: OUTPUT«WhateverCode.new␤»
11:36 timotimo so it gets assimilated
11:36 smls_ m: say (* + .split)(4)
11:36 camelia rakudo-moar 9210cc: OUTPUT«Cannot call split(Nil: ); none of these signatures match:␤    (Cool: Regex $pat, Any $limit = { ... }, Any :all($all), *%_)␤    (Cool: Cool $pat, Any $limit = { ... }, Any :all($all), *%_)␤  in block <unit> at /tmp/D5uqsqFvUk:1␤␤»
11:36 timotimo into the whatevercode
11:36 smls_ so WhateverCurrying operates on thunks?
11:36 moritz m: say (*.net).^name
11:36 camelia rakudo-moar 9210cc: OUTPUT«WhateverCode.new␤»
11:37 xfix joined #perl6
11:37 hoelzro smls_: I'm not objecting the warning; I'm curious if the behavior is specified
11:37 timotimo WhateverCurrying is a syntactic operation
11:37 chenryn joined #perl6
11:38 BenGoldberg joined #perl6
11:39 timotimo so there's really no reason to evaluate that .split there
11:39 timotimo it happens way earlier than evaluation does
11:40 smls_ m: my $a = 1; my &foo = $a + *; $a++; say foo 10
11:40 camelia rakudo-moar 9210cc: OUTPUT«12␤»
11:40 smls_ right, makes sense.
11:43 * smls_ Wonders if the whitespace rules for infixes should be restricted to only allow leaving out surrounding whitespace if you're leaving it out on *both* sides of it.
11:43 dalek nqp/moreinput: 315106c | peschwa++ | src/QRegex/Cursor.nqp:
11:43 dalek nqp/moreinput: Make fiddling with Cursor internals scarier, jnthn++.
11:43 dalek nqp/moreinput: review: https://github.com/perl6/nqp/commit/315106c01d
11:45 FROGGS psch++ # moreinput
11:45 timotimo hm. actually, i think we'll sort of want not only a REPL that you can try perl6 in, but also a "big editor and a run button" kind of deal
11:45 timotimo sort of like camelia + gist
11:47 jnthn It'd also be quite nice if many of the snippets we put around the site as examples, come with a link to directly put them into such a session too so people can run and play with them right away :)
11:47 coffee` joined #perl6
11:49 smls_ timotimo: The python.org shell even allows file I/O, which is nice
11:54 timotimo smls_: cool, can you find out how they do it? do they upload local files or do they build a "service" on the user's browser that lets the python instance on the other end use a local file remotely?
11:57 psch oh huh
11:57 coffee` joined #perl6
11:57 psch i think that scary uc method probably doesn't work private
11:59 timotimo we have a perl6/perl6-docker and a perl6/docker now; should i delete one of those?
12:00 moritz yes please
12:01 smls_ timotimo: I have no idea how it works; I just tested the sequence of commands:  «f = open('foo.txt', 'w')»  «f.write('Hello World')»  «f.close()»  «g = open('foo.txt')»  «print(g.read())»  ...and the last one correctly prints Hello World
12:01 moritz 'docker' is newer, so delete perl6-docker?
12:01 timotimo oh
12:01 timotimo i thought you meant you could access files on the user's local machine
12:01 timotimo which is something i really want ours to be able to do
12:02 smls_ oh
12:02 timotimo also, i really want ours to be able to display pretty stuff in-line, like images that were generated from code :)
12:02 timotimo or play audio that the user's code generated :D
12:03 jnthn meeting &
12:04 psch r-m is too slow for real time audio generation :/
12:04 timotimo yeah, but it doesn't have to be real time yet
12:04 coffee` joined #perl6
12:04 timotimo that's tricky to pull off very good anyway ... WebRTC perhaps? i didn't really look into that yet
12:05 psch i have no idea about the web part, and the r-m RTA stuff i did i just half-finished portaudio bindings and a port of an example of that
12:05 psch i suppose those could still go into the ecosystem eventually, although i'll have to have another look at it
12:06 timotimo http://devnull-as-a-service.com/ <3
12:06 smls timotimo: Are those kinds of features really interesting for people who just want to toy around with a new (for them) language though?
12:07 timotimo smls: when they're paired with example code, i am convinced that it'd be awesome
12:07 smls (which seems to be the main audience for such "try in your browser" thingies)
12:07 psch while we're at it, let's stuff saving sessions in there as well \o/
12:08 psch so people can hold intro talks on the try-website and share the link afterwards
12:08 timotimo psch: github gist interop, sure.
12:08 smls right, the "open this example snippet in the interactive shell" feature that jnthn suggested would be cool.
12:09 eli-se joined #perl6
12:09 timotimo yes. yes. YES.
12:09 timotimo also, every line of camelia's should be visible on the corresponding page, directly openable and editable
12:12 tinyblak joined #perl6
12:17 psch timotimo: you mean something like "what #perl6 is trying right now"?
12:18 timotimo yeah
12:18 timotimo but also as a convenient place to work with camelia scripts that's not your irc client's line editor
12:18 psch ah
12:21 pierrot joined #perl6
12:23 smls timotimo: To let people usefully play around with demo snippets in the interactive shell, we should first teach our REPL (which I presume the shell would be based on) to play nice with multi-line statements
12:24 timotimo my first iteration will have to be limited to full programs
12:24 smls So it would treat e.g. a whole function definition as one statement, and only break after the closing brace
12:25 smls timotimo: Ah, more of a "editor + run button + output box" thing
12:25 smls that might actually be even more appropriate than a REPL for some of those use cases
12:25 timotimo yup
12:25 timotimo much like Farabi6
12:28 timotimo damn
12:28 timotimo docker doesn't support selinux + btrfs apparently
12:29 timotimo which is what both my laptop and desktop run
12:30 smls timotimo: Looks like the python.org interactive shell is powered by a commercial "Python IDE in your browser" service
12:30 smls Which suggests there may be a non-negligible maintenance effort involved to justify the prices
12:30 timotimo i know
12:30 timotimo local file io "on the server" is doable just by virtue of using docker and its throw-away filesystem
12:31 smls Can we maintain it on a volunteer basis?
12:31 smls I doubt moritz would be thrilled to do it ;)
12:31 Foxcool joined #perl6
12:31 timotimo i'll shoulder a significant amount of work. i must.
12:31 smls ++timotimo
12:31 timotimo (because i'll be writing the shitty code that'll get us into trouble)
12:35 moritz what do you want to use Docker for anyway?
12:35 moritz it doesn't offer any extra security
12:35 moritz and you can simply mkdir and chroot into a temp dir
12:37 espadrine isn't docker the new chroot? What isn't secure about it?
12:37 espadrine (which is about chroot)
12:38 moritz espadrine: last I looked, the docker folks themselves said that it's not secure
12:38 timotimo moritz: i was thinking docker would allow easy-ish updating of the used compiler and battle-tested throw-away mechanics
12:39 chenryn joined #perl6
12:39 moritz espadrine: so you shouldn't ever give somebody in a docker container root, because that can compromise the host
12:39 moritz timotimo: doesn't seem easier than rakudobrew to me
12:40 tadzik well, rakudobrew requires you to compile everything
12:41 espadrine moritz: giving them root access, sure, but giving them user access should be fine, I believe
12:41 moritz tadzik: that you most certainly have to do when updating the compiler :-)
12:41 tadzik not if you can update the compiler binary, no?
12:41 tadzik modules, yes
12:43 moritz well, we don't ship compiler binaries for linux
12:43 timotimo moritz: OK, i'll see how to go forward without docker. i haven't learned to use docker yet anyway :)
12:44 moritz timotimo: if docker offers us a real, tangible benefit, I'm all for using but. But so far I only heard the equivalent to "it's the cool new stuff" and "the concept sounds awesome"
12:44 SamuraiJack joined #perl6
12:44 timotimo hehe
12:44 moritz or stating the docker does things for us that it doesn't really
12:44 moritz s/the/that/
12:44 * espadrine can't find anything to back this up, so chroot may indeed be superior from a security standpoint
12:45 timotimo i'd put some cgroups in there for good measure
12:45 moritz espadrine: well, docker does things like a new LXC container / cgroups, but then so does any systemd service if you add one or two lines of config
12:45 moritz https://docs.docker.com/articles/security/
12:46 * [Coke] just added https://github.com/nyperlmongers/nyperlhackathon2015/wiki/Perl-6-Roast-Cleanup as a low hanging fruit project for a perl 6 track of projects at the NYC hackathon. Suggestions welcome, but they should be something I can help out potential hackers with (or have folks on channel available for answering questions during the time of)
12:47 moritz https://zeltser.com/security-risks-and-benefits-of-docker-application/ "Along these lines, a process running as root (UID 0) in a container has root-level privileges on the underlying host when interacting with the kernel"
12:50 moritz one of the reasons I'm hesitant to use Docker is that every security update of the base OS means that you have to wait for an updated base image, and then rebase your image onto the new base image (iiuc), and then re-deploy your app image
12:50 [Coke] (updated that wiki page)
12:50 SamuraiJack joined #perl6
12:51 moritz and that's probably worth the effort if you can automate much of it, and have lots of container instances running on separate hosts
12:51 moritz but for just one host, it sounds like oh-so-much more work than 'apt-get update && apt-get dist-upgrade'
12:51 [Coke] moritz: in some places, that's faster than waiting for the server team to update the box-actual.
12:52 moritz (which I've automated further with an ansible script that does the update && upgrade for me)
12:52 [Coke] we're considering here for deploying web apps, but we've got ... hundreds.
12:52 moritz [Coke]: yes, but $here (hack / high-risk p6 server) we don't have separate ops teams for OS and Apps
12:53 [Coke] right, different equation.
12:54 moritz aye
12:55 moritz in our equation, the main thing to consider is reduing the number of moving parts
12:55 [Coke] regarding rakudo PR #395 - spectest has been clean; does this mean this behavior was not tested?
12:57 dalek rakudo/tab-completion: d83d759 | hoelzro++ | README.md:
12:57 dalek rakudo/tab-completion: Add note about Linenoise in the README
12:57 dalek rakudo/tab-completion: review: https://github.com/rakudo/rakudo/commit/d83d759181
12:57 FROGGS [Coke]: there is a test:
12:57 FROGGS rakudo/t/spec/S32-str/pack.t:9:    my $buf = pack('H*', "414243");
12:57 FROGGS though, that happened to work since the string is numberish
12:58 FROGGS m: say "414243" % 2
12:58 camelia rakudo-moar 9210cc: OUTPUT«1␤»
12:58 FROGGS m: say "414243".chars % 2 # but that was meant
12:58 camelia rakudo-moar 9210cc: OUTPUT«0␤»
13:02 zakharyas joined #perl6
13:02 [Coke] If we're fixing a bug, something in roast needs to change.
13:02 [Coke] more tests, unfudged tests..
13:03 FROGGS +1 to more tests :o)
13:03 * [Coke] falls victim to the last-minute-cancel. already on the call when the email comes in.
13:04 * [Coke] guesses more コーヒー, instead.
13:04 FROGGS .tell raydiak can you add a test to roast for https://github.com/rakudo/rakudo/pull/395 ?
13:04 yoleaux FROGGS: I'll pass your message to raydiak.
13:04 [Coke] ++raydiak
13:04 [Coke] and raydiak++
13:05 timotimo would it be ok to drop support for IE?
13:08 moritz timotimo: drop IE support from what?
13:08 timotimo the "try perl6" thing
13:08 timotimo actually
13:08 timotimo i think there's a polyfill for this api that i'm interested in
13:09 moritz timotimo: you can't drop support from something that doesn't exist :-)
13:09 [Coke] certainly we don't need to support anything before IE-latest.
13:09 espadrine project spartan and up
13:10 moritz by which I mean to say that it's better to have something that doesn't support IE than having nothing
13:10 timotimo espadrine: is that even available?
13:10 espadrine timotimo: in the next windows beta, I believe!
13:11 timotimo for "try perl6 in your browser" we should require windows 6 or upwards.
13:12 timotimo also, the "try perl6" applett for windows users should be an ActiveX thingie written in visual basic 6
13:13 psch that would make local file access easier.  just use the applet to install R*
13:13 timotimo :D
13:14 timotimo if there's anybody out there hard core enough to allow activex applets from the internets
13:14 smls timotimo: Isn't google in the habit of creating overengineered JavaScript-based solutions for magically making non-IE web features work on IE? ;)
13:14 * [Coke] wakes up at $dayjob, and realizes he has to fix this bug in his app in IE11. *sigh*
13:17 timotimo smls: in this particular case it's a yandex employee it seems
13:18 timotimo hmm
13:18 timotimo instead of offering a shitty web-based editor for code, why not just host vim, emacs, nano, ... instances and offer them via ssh? :D
13:19 timotimo at least with vim we'll have proper syntax highlighting %)
13:19 vendethiel joined #perl6
13:20 tadzik no, let's run it all on users' computers using this linux.js thingy
13:31 gtodd joined #perl6
13:37 skids joined #perl6
13:39 moritz emscripten!
13:40 espadrine qemu.js
13:43 Ulti timotimo just boot a Linux image with Rakudo * installed using asm.js http://s-macke.github.io/jor1k/demos/main.html?user=MwFsjLaZ15
13:44 Ulti oh I was too late to the party
13:44 Ulti running monkey island in the browser virtually is kind of crazy
13:46 espadrine funnily enough, the emscripten treatment has been performed to a number of languages: http://repl.it/
13:48 timotimo yeah right :D
13:49 anaeem1_ joined #perl6
13:52 Ulti espadrine that's quite cool
13:59 airdisa joined #perl6
14:00 masak indeed -- nice.
14:01 masak wasn't aware of that one.
14:02 timotimo huh? it doesn't even have perl5
14:02 kjs_ joined #perl6
14:02 masak unfortunately the modern web world seems to prefer to pretend that Perl does not exist...
14:02 masak it's their loss, but... still unfortunate.
14:02 PerlJam .oO( the fools! )
14:02 masak :)
14:07 smls m: for (1, 2, 3).rotor -> [$a, $b] { say "$a, $b" }
14:07 camelia rakudo-moar 9210cc: OUTPUT«1, 2␤2, 3␤»
14:07 smls m: for (a=>1, b=>2, c=>3).rotor -> [$a, $b] { say "$a, $b" }
14:07 camelia rakudo-moar 9210cc: OUTPUT«Too few positionals passed; expected 2 arguments but got 0 in sub-signature␤  in block <unit> at /tmp/aGFoYuWHCm:1␤␤»
14:07 smls why does .rotor croak on a list or Pair's?
14:08 masak m: for ((a=>1), (b=>2), (c=>3)).rotor -> [$a, $b] { say "$a, $b" }
14:08 camelia rakudo-moar 9210cc: OUTPUT«Too few positionals passed; expected 2 arguments but got 0 in sub-signature␤  in block <unit> at /tmp/iNryPtEKHw:1␤␤»
14:08 masak no idea.
14:10 telex joined #perl6
14:10 psch m: say (:1a, :2b, :3c).rotor.perl
14:10 camelia rakudo-moar 9210cc: OUTPUT«($("a" => 1, "b" => 2), $("b" => 2, "c" => 3)).list␤»
14:10 timotimo we have no gzip binding at all yet?
14:14 PerlJam timotimo: does Compress::Zlib count?
14:15 timotimo oh
14:15 timotimo that does gzip, too?
14:16 timotimo cool
14:16 timotimo can i tell it to flush its buffer at any given point?
14:16 timotimo i'm interested in streaming data gzipped across the wire
14:18 smls m: given $("a" => 1, "b" => 2) -> [$a, $b] { say "$a, $b" }
14:18 camelia rakudo-moar 9210cc: OUTPUT«Too few positionals passed; expected 2 arguments but got 0 in sub-signature␤  in block <unit> at /tmp/xLYl8CXm0j:1␤␤»
14:19 smls ^^ more golfed version
14:19 smls does [] unpacking in signatures does something special with Pairs?
14:19 timotimo ah, i see stuff about flush in the readme
14:19 timotimo smls: it might interpret the pairs as named arguments in the capture it tries to unpack
14:19 timotimo m: $("a" => 1, "b" => 2).Capture.perl.say
14:19 camelia rakudo-moar 9210cc: OUTPUT«Capture.new(hash => {"b" => 2, "a" => 1})␤»
14:20 timotimo there we go
14:20 Ven joined #perl6
14:20 timotimo m: $(("a" => 1, "b" => 2)).Capture.perl.say
14:20 camelia rakudo-moar 9210cc: OUTPUT«Capture.new(hash => {"b" => 2, "a" => 1})␤»
14:20 timotimo m: $(["a" => 1, "b" => 2]).Capture.perl.say
14:20 camelia rakudo-moar 9210cc: OUTPUT«Capture.new(list => ("a" => 1, "b" => 2,))␤»
14:20 timotimo m: $(["a" => 1, "b" => 2], named => True).Capture.perl.say
14:20 camelia rakudo-moar 9210cc: OUTPUT«Capture.new(list => (["a" => 1, "b" => 2],), hash => {"named" => Bool::True})␤»
14:20 timotimo that must be why
14:21 smls :/
14:21 timotimo m: $("a" => 1, "b" => 2).list.Capture.perl.say
14:21 camelia rakudo-moar 9210cc: OUTPUT«Capture.new(list => ("a" => 1, "b" => 2,))␤»
14:21 timotimo we may want rotor to do this
14:22 timotimo OTOH, it could be quite interesting to have rotor or combinations or what have you of named arguments and pass them to a sub; not sure how exactly that would be spelled if we make that change
14:22 smls I'd prefer to have such shenanicans go through |(  )  interpolation
14:23 smls rather than happen unexpectedly
14:23 chenryn joined #perl6
14:27 * smls finds the current state of lists-of-lists handling in Perl 6 quite confusing
14:27 sirhouseboat joined #perl6
14:28 * moritz agrees
14:28 smls some things return Lists of Lists, others return Lists of itemized Lists, other Lists of itemized Arrays, others LoL
14:29 smls s/List/List or Parcel/g  to make it even more messy
14:29 grondilu Parcels will disappear after GLR anyway, won't they?
14:29 timotimo yes
14:30 timotimo subsumed entirely by List
14:31 smls for example:
14:31 smls m: say (2, 4, 6).combinations.perl
14:31 camelia rakudo-moar 9210cc: OUTPUT«([], [2], [4], [6], [2, 4], [2, 6], [4, 6], [2, 4, 6]).list␤»
14:31 smls m: say (2, 4, 6).rotor.perl
14:31 camelia rakudo-moar 9210cc: OUTPUT«($(2, 4), $(4, 6)).list␤»
14:31 masak did we ever discuss making the positional in .min/.max into a named :by? to conform with the sub form?
14:31 masak m: say min(22, 4, :by(*.Str))
14:31 camelia rakudo-moar 9210cc: OUTPUT«22␤»
14:31 masak m: say (22, 4).min(:by(*.Str))
14:31 camelia rakudo-moar 9210cc: OUTPUT«4␤»
14:31 moritz masak: I think you did
14:31 masak m: say (22, 4).min(*.Str)
14:31 camelia rakudo-moar 9210cc: OUTPUT«22␤»
14:32 masak using :by in one case and not the other feels... a bit odd.
14:32 masak also, the op form doesn't have a :by, and it totally could
14:32 masak m: say 22 min 4 :by(*.Str)
14:32 camelia rakudo-moar 9210cc: OUTPUT«Unexpected named parameter 'by' passed␤  in sub infix:<min> at src/gen/m-CORE.setting:2301␤  in block <unit> at /tmp/ULW9bsTU_F:1␤␤»
14:32 timotimo mhm
14:32 smls consistency with  sort  would also be nice though
14:33 masak maybe accepting both an optional positional and a named :by would be a nice compromise.
14:33 masak and not a crappy "compromise just for the sake of making everyone happy", but something that actually benefits all parties.
14:36 smls Well the sub forms have it as a named arg because they need it to differentiate from positionals. The method form doesn;t need that, because the invocant vs argument separation is sufficient.
14:37 masak I just think it reads better with :by
14:37 moritz then it would make sense for &sort to have it named too
14:37 smls m: say sort 4, 22; say sort *.Str, 4, 22
14:37 camelia rakudo-moar 9210cc: OUTPUT«4 22␤22 4␤»
14:37 smls interesting.
14:37 masak too many corner cases :/
14:38 smls who still uses the sub forms anyway? :P
14:40 masak OOP-deniers?
14:42 gtodd Lisp users
14:42 PerlJam not every problem maps to OOP solutions in people's brains.  Part of the appeal of P6 (and P5) is that is doesn't force you into a particular thought-context.
14:42 PerlJam (or ... *I* use the sub forms when I'm thinking of solving a problem and that way occurs to me first ;)
14:43 ecocode joined #perl6
14:43 masak +1
14:43 smls well, I wouldn't think of  say @numbers.max  as "OOP programming" just because the method syntax was used.
14:43 masak some people definitely do.
14:43 timotimo yeah, because @numbers.&max isn't "OOP programming" either :P
14:44 * Ven looks at UCFS and smiles snarkily
14:44 PerlJam It's all just syntax  :)
14:44 masak I've heard Perl 6 proudly advertized as having "object orientation", with the example being something like `@array.push`...
14:44 Ven (ufcs*)
14:45 timotimo ah
14:46 timotimo it's the same as .&, but at compile-time and automatically choosing between "is this a method call" or "is this a sub call" based on existence of the method
14:47 smls Well, then I suppose the least confusing solution would be to consistently require any comparators to be passed as named args to the sub and operator forms of min/max/sort, and allow both positional and named passing with the methods forms
14:47 smls (basically what masak said, + changing sub sort)
14:48 smls it would break the symmetry between sub map and sub sort, but thats the smaller evil imo.
14:48 gtodd p6 has some Zen like imagery (e.g. "Mu") ....  so maybe the question of whether it is "object oriented" is ultimately "Mu" ... first there is an object, then there is no object, then there is ...
14:50 airdisa joined #perl6
14:50 moritz it's NoOO, in the "Not only OO" sense :-)
14:51 gtodd moritz: nice
14:51 gtodd ++! :-)
14:51 smls Adverbs are a good fit for comparators anyway, as they specify *how* the sorting/searching operation should be done.
14:51 ssutch joined #perl6
14:51 airdisa_ joined #perl6
14:51 gtodd Zen Koan:  "Does a dog have Buddha nature?"  Master: "Mu" ...
14:51 gtodd p6 koan:  Student:  "Master is an 'Object' a 'Type'?  Master: "Mu";
14:51 gtodd no wait ...
15:08 hoelzro ok, I think that the tab completion branch is getting close to ready
15:09 hoelzro the only thing I would like to clean up is how Compiler.nqp loads Linenoise, if possible
15:12 hoelzro if anyone would like to look at the code, I have a PR for it: https://github.com/rakudo/rakudo/pull/391
15:13 hoelzro I feel like the completion mechanics can be improved post-merge
15:15 airdisa joined #perl6
15:18 airdisa_ joined #perl6
15:20 eli-se joined #perl6
15:28 smls m: say (11905..64206).pick(50)».chr
15:28 camelia rakudo-moar 9210cc: OUTPUT«Error encoding UTF-8 string near grapheme position 9 with codepoint 32␤  in method print at src/gen/m-CORE.setting:17885␤  in sub say at src/gen/m-CORE.setting:18645␤  in block <unit> at /tmp/MJYiCsIcOt:1␤␤»
15:28 tinyblak joined #perl6
15:29 smls ^^ should this always work?
15:29 smls it sometimes works, sometimes fails with "OUTPUT«Error encoding UTF-8 string", and sometimes fails with "Iteration past end of grapheme iterator".
15:30 masak could you remove the randomness from that example? so we can talk about it with a concrete codepoint as an example.
15:31 moritz well, it could die with "Illegal codepoint"
15:32 moritz or something like that
15:32 moritz but everything else is either a bug, or an LTA error (which is also a bug, IMHO)
15:32 timotimo it sort of seems like in order to make anything work, i'll have to build an implementation of websockets
15:33 smls m: say 57116.chr  # for example
15:33 camelia rakudo-moar 9210cc: OUTPUT«Iteration past end of grapheme iterator␤  in method print at src/gen/m-CORE.setting:17885␤  in sub say at src/gen/m-CORE.setting:18644␤  in block <unit> at /tmp/VQkIPKGVM3:1␤␤»
15:33 moritz timotimo: or use good old ajax
15:34 timotimo EventSource in one direction would be good, but if i want to offer repl-like stuff with a proper terminal emulator, i'd want something with very little overhead fro the "connection" in the other direction
15:36 moritz first make it work, then make it fast
15:36 timotimo hmm
15:37 timotimo fair enough
15:37 timotimo but then i'll have to actually start working on that stuff :P
15:37 moritz when you do, you might actually get contributors :-)
15:38 timotimo :D
15:44 timotimo moritz: so, how do i best spawn a perl6 compiler + executor so that it gets cgroup'd and systemd'd and stuff?
15:44 smls m: say 1, 55296.chr
15:44 camelia rakudo-moar 9210cc: OUTPUT«(signal SEGV)1»
15:45 smls yikes
15:45 smls m: say 1 ~ 55296.chr
15:45 camelia rakudo-moar 9210cc: OUTPUT«Error encoding UTF-8 string near grapheme position 0 with codepoint 49␤  in method print at src/gen/m-CORE.setting:17885␤  in sub say at src/gen/m-CORE.setting:18644␤  in block <unit> at /tmp/EJGXFP5i14:1␤␤»
15:45 timotimo oh wow
15:45 moritz timotimo: you write some kind of eval server, write a service file for it, start it
15:45 smls m: say 55296.chr
15:45 camelia rakudo-moar 9210cc: OUTPUT«Iteration past end of grapheme iterator␤  in method print at src/gen/m-CORE.setting:17885␤  in sub say at src/gen/m-CORE.setting:18644␤  in block <unit> at /tmp/OFRND0GRvc:1␤␤»
15:46 smls ^^ three different failure modes with the same code point ;)
15:46 timotimo moritz: any good ideas for how to connect a tty from the evalserver to a "privileged" service that'd communicate stuff outwards?
15:47 moritz timotimo: no, but I don't know what you need a tty for either
15:47 moritz they are kinda black magic to me
15:47 timotimo maybe the program the user's running wants to be a bit interactive
15:48 moritz you don't need a tty for interactive
15:48 timotimo hm
15:48 timotimo since we can't "isatty" anyway :P
15:48 moritz you just need it for stuff like ncurses
15:48 TimToady m: say uniname(55296)
15:48 camelia rakudo-moar 9210cc: OUTPUT«<Non Private Use High Surrogate>␤»
15:49 moritz promt() and get() and lines() just read from fd 1, and it doesn't matter if it's a terminal or not
15:49 timotimo right, fair enough
15:53 maui joined #perl6
15:55 RabidGravy joined #perl6
15:55 maui hi where can i get a full package of Perl c the enviorment like say a QB or microsoft C ?
15:56 dalek modules.perl6.org: 011470e | timotimo++ | web/index.tmpl:
15:56 dalek modules.perl6.org: i hereby decree the search bar be focused upon page load.
15:56 dalek modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/011470eef3
15:56 FROGGS maui: I dont understand your question
15:56 timotimo quickbasic?
15:56 FROGGS maui: you want a full package of what?
15:57 hoelzro is anyone opposed to me merging the tab completion/linenoise work soon, perhaps this weekend?
15:57 timotimo does maui perhaps mean an IDE?
15:57 FROGGS maui: are you looking for a package that gives you a compiler and modules?
15:57 smls TimToady: Does that mean it should print "Invalid code point?" for that
15:58 maui yes like quick basic... it was a enviorment that you gust started up and could write code in it +dalek :)
15:58 FROGGS hoelzro: I can't tell, I've not reviewed it yet :S
15:58 hoelzro FROGGS: I should probably wait on some review before I merge =)
15:58 maui yes a full package froggs
15:58 FROGGS maui: the best we have is this: http://rakudo.org/2015/03/21/announce-rakudo-star-release-2015-03/
15:59 maui yes that is it forggs
15:59 TimToady maui: by "Perl c" did you mean "Perl 6"?  or "Perl 5"?
16:00 TimToady smls: maybe more "No true codepoint would ever be a surrogate!"
16:00 maui i ment perl 6
16:00 smls TIL: "In the Python programming language, individual surrogate codes are used to embed undecodable bytes in Unicode strings" -- wikipedia
16:00 TimToady then star, as FROGGS mentioned
16:00 maui ty froggs :)
16:01 FROGGS maui: welcome to #perl6 :o)
16:01 timotimo is anybody anywhere close to making a syntax highlighter for codemirror?
16:01 TimToady You are!
16:01 flussence smls: eww...
16:01 timotimo because farabi6 has some precedent of using codemirror and adding stuff like annotations and things
16:02 maui i just have to find one for OS mac system froggs :)
16:03 FROGGS maui: you can build the tar.gz on mac
16:03 timotimo smls: would you be willing to help me with the HTML portion of the "try perl6 in your browser" thing?
16:04 FROGGS maui: you probably need xcode + clang + perl... (I am a linux user, so I can just guess)
16:04 flussence (oh, right, that reminded me... was planning to fiddle around with the profiler html...)
16:04 smls timotimo: Willing maybe, but not too capable... I'm really out of touch with client-side web development these days.
16:04 spider-mario joined #perl6
16:05 smls I mean, I can do tweak HTML and CSS till it does what it should, but know little about modern JavaScript libraries etc.
16:05 smls :)
16:05 timotimo i meant only HTML and CSS :)
16:05 maui ty froggs
16:05 smls ok then
16:05 timotimo i'll see to it that i can cope with the JS on my own
16:06 timotimo i'll just stack frameworks upon frameworks until the functionality i want is doable in ~60 characters of javascript
16:06 maui yes your right on xcode
16:07 * FROGGS .oO( pay for your right to xcode! )
16:08 Akagi201 joined #perl6
16:11 moritz but y code?
16:12 chenryn joined #perl6
16:13 masak because I z so.
16:14 espadrine I have done codemirror syntax highlighters in the past
16:14 espadrine well, the go one, and another, I can't recall
16:15 espadrine but is there any other syntax highlighthing in existence, say in ace, or orion, anything web-based?
16:15 timotimo we've got the beginnings of a textmate bundle highlighter
16:15 espadrine oh, that would help a lot
16:16 espadrine ace has a tool to convert those to their format
16:16 timotimo there exists a tool that can go from tmbundle to ace highlighter, but it's supposedly very bare bones and requires manual postconverting
16:16 timotimo postfiddling?
16:16 espadrine I have a tool to convert ace to codemirror
16:16 espadrine equally manual
16:16 espadrine although usually it works
16:17 timotimo https://github.com/textmate/perl.tmbundle - has perl6 support in it
16:17 timotimo you can try it on that first and see what it's like
16:17 timotimo moritz: is searching in the clogs b0rked?
16:18 Akagi201_ joined #perl6
16:18 moritz timotimo: dunno
16:19 maui timotimo just so your ide question yes that was the general idea i was tring to get at
16:19 moritz a quick check shows that it's not completly broken
16:21 timotimo oh, nick is "perfect match"?
16:22 moritz yes
16:22 moritz though iirc it includes nick_ if you search for nick
16:23 moritz afk
16:23 timotimo hm, right
16:24 RabidGravy hi, am I write in thinking that adding a module to the modules list involves adding it to the META.list in the ecosystem in github and making a pull request?
16:24 timotimo maui: we have "Farabi6", which is a web-based "ide" that gives you a few niceties, but i haven't used it "productively", psecially not its local file reading/writing
16:24 timotimo i'd suggest using vim instead, because that has very good syntax highlighting
16:24 timotimo RabidGravy: correct
16:24 * timotimo AFK
16:24 ecocode left #perl6
16:27 RabidGravy cool, I've started porting my CPAN modules and was going to hold off until I had a few more under the belt but then concluded I might need to encourage some early feedback ;-)
16:27 fhelmberger_ joined #perl6
16:28 maui ty timotimo :)
16:29 RabidGravy does https://raw.githubusercontent.com/jonathanstowe/p6-Linux-Fuser/master/META.info look right?  If so I'll do it
16:30 maui this is my problem i like windows based systems but have swithed to Apple since I BOOTcamp   but now i need apple to run Visual Basic and all the other programs in OS
16:31 maui its matter of just turning on the windows system over the OS but who wants to work and not listen itunes
16:32 RabidGravy I think some OS virtualisation may be required there maui , visual basic is unlikely to work on Mac OS
16:32 maui it does not have to boot window to do it
16:32 PerlJam RabidGravy: what modules are you porting?
16:33 maui everything  with IDE
16:33 maui from the old days cobal etc
16:34 RabidGravy PerlJam, as many of https://metacpan.org/author/JSTOWE as make sense and I can do before the bank manager makes me get a proper job ;-)
16:34 maui if it wasnt for the new i3/ to i7 i would have to get a new 64 bit engine
16:34 maui like the new QB64 for basic
16:35 maui thats the way they should build every langage
16:35 PerlJam RabidGravy: It's just my opinion right now, but the Term* modules might readily get more feedback.
16:36 RabidGravy er, okay I've been VB free for ten years now but that's a bold statement maui
16:36 Perl6_newbee joined #perl6
16:37 maui well just saying RabidGravy its all in the .OBJ :)
16:37 flussence someone was requesting a ReadKey feature just a few days ago...
16:38 RabidGravy PerlJam, I'm actually working on Term::Cap right now (which is on the wanted list anyway), doing it dumb is quite easy, doing it nicely not quite so easy
16:38 [Coke] If you want an IDE for Perl 6, someone had an eclipse plugin in progress that would use the java backend of Rakudo.
16:38 smls [Coke]: Hm, that sounds slow.
16:39 flussence (if you just want an IDE with the functionality qbasic.exe provides, vanilla vim does that too)
16:40 RabidGravy flussence, I'm holding off on the Term::ReadKey largely because I'm not quite sure how to either deal with the cross platform issues in NativeCall or alternatively how to build, install and use a shim library with the current tools
16:40 maui RabidGravy does that mean you dont program in LISP or Scheme either?
16:41 [Coke] smls: I use eclipse daily. How much slower could it be? ;)
16:41 smls [Coke]: I remember reading that the QtCreator devs rejected their experiment of using clang to do all parsing of C++ code (to power code highlighting/navigating/refactoring features) because it was too slow
16:41 flussence RabidGravy: ah, ok. You might want to look at LibraryMake for the latter thing.
16:41 smls I shudder to think how rakudo-jvm would handle those real-time parsing tasks... :P
16:43 smls .oO( change one letter in the code, wait 20 seconds for highlighting to re-appear )
16:45 maui_ joined #perl6
16:45 [Coke] won't know until you try. won't be faster if you don't report on how slow it is.
16:46 [Coke] The nice thing about eclipse is that it counts as "long running".
16:46 [Coke] so you're not necessarily penalized for the startup time.
16:48 oso_ joined #perl6
16:48 p3432m joined #perl6
16:49 smls good point about start-up times
16:53 abraxxa joined #perl6
16:53 bubsssss joined #perl6
16:58 timotimo RabidGravy: https://github.com/krunen/term-termios/ - does this intersect with termcap at all?
17:01 RabidGravy timotimo, it sort of intersects in Term::Screen - the termios thing is lower level: how the OS interacts with the terminal at all rather than how to make the terminal do a particular thing
17:01 timotimo RabidGravy: for a shim library you'd probably want to look at either Inline::C or LibraryMake
17:03 timotimo m: my int $foo = 15; $foo +|= 0b100000; say $foo
17:03 camelia rakudo-moar 9210cc: OUTPUT«47␤»
17:03 timotimo m: my int $foo = 15; $foo +&= 0b100000; say $foo
17:03 camelia rakudo-moar 9210cc: OUTPUT«0␤»
17:03 timotimo good news, krunen! this works by now! :)
17:04 FROGGS joined #perl6
17:04 RabidGravy timotimo, yeah looking at it probably the latter as Term::ReadKey has a horrible set of #ifdef to cope with multiple different platforms
17:04 timotimo :S
17:05 timotimo krunen: so you can revert the newest commit in term-termios :D
17:06 smls Rakudo > Python > Perl  start-up times each differ by 1 order of magnitude now on my machine (for warm start). Not great, but it means Rakudo is approaching "acceptable" speed.
17:06 smls m: for (perl=>0.002, python=>0.027, Rakudo=>0.298).rotor { say "{.[0].key} starts {[R/] $_».value} times faster than {.[1].key}" }
17:06 camelia rakudo-moar 9210cc: OUTPUT«perl starts 13.5 times faster than python␤python starts 11.037037 times faster than Rakudo␤»
17:13 TimToady we could probably start up really fast if we were willing to force everyone to program in Standard Perl 6 :)
17:14 * PerlJam just realized that rotor == sliding window
17:14 PerlJam I don't know why that didn't click before
17:14 smls PerlJam: except if you set its second argument to 0, then it's non-sliding ;)
17:16 PerlJam well ... that's not as useful as it could be  :)
17:17 RabidGravy just sent a pull request to ecosystem to add Linux::Fuser to the modules list, it's a bit dumb and probably not very idiomatic but it was easy and better tested than the p5 version '-)
17:17 TimToady I'd say it's non-sliding if the second arg is the same as the first, but arguably it's just sliding back and forth to the same place
17:18 smls PerlJam: It's useful if you want to iterate "2 at a time" and the list might have an odd number of elements, so you can't do  for @list -> $a, $b { ... }  because the last (single) element would cause a signature mismatch
17:18 TimToady usually better to use $b? in that case
17:18 smls oh
17:18 smls right :)
17:18 TimToady or a default
17:19 dalek ecosystem: 090a1b7 | (Jonathan Stowe)++ | META.list:
17:19 dalek ecosystem: Add Linux::Fuser to the modules list
17:19 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/090a1b74a5
17:19 dalek ecosystem: 4126647 | PerlJam++ | META.list:
17:19 dalek ecosystem: Merge pull request #40 from jonathanstowe/master
17:19 dalek ecosystem:
17:19 dalek ecosystem: Add Linux::Fuser to the modules list
17:19 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/4126647149
17:19 spider-mario smls: what’s R/?
17:19 smls reverse the order of arguments
17:19 PerlJam spider-mario: just like / but with the args reversed
17:19 spider-mario oh, ok
17:19 spider-mario thanks
17:19 spider-mario that’s ~ in J
17:19 spider-mario :p
17:20 molaf joined #perl6
17:20 smls TimToady: Should a lone  ».value  be allowed as shortcut for  $_».value  ?
17:21 TimToady well, .».value is supposed to work
17:21 smls ok
17:22 TimToady and not allowing random closers where openers are expected tends to cache a certain class of syntax errors
17:22 masak m: my @a; say @a»value # I find myself accidentally doing this sometimes
17:22 camelia rakudo-moar 9210cc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/0ziC8AZNN5␤Two terms in a row␤at /tmp/0ziC8AZNN5:1␤------> 3my @a; say @a»7⏏5value # I find myself accidentally doing␤    expecting any of:␤        infix stopper␤        infix or meta-infix␤»
17:22 RabidGravy » is the only non-ASCII character I have worked out how to type without knowing the codepoint ;-)
17:22 masak maybe we should have a dedicated error message for ^^ ?
17:23 TimToady std: my @a; say @a»value
17:23 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Two terms in a row at /tmp/cGRV7Ekpuz line 1:␤------> 3my @a; say @a»7⏏5value␤    expecting any of:␤ infix or meta-infix␤    postcircumfix␤  postfix␤        postfix_prefix_meta_operator␤   postop␤Parse failed␤FAILED 00:01 138m␤»
17:23 * TimToady wonders how that's parsing...
17:25 TimToady generally it should say Confused if it's not sure there are two terms there...
17:26 gfldex joined #perl6
17:29 anaeem1 joined #perl6
17:40 anaeem1 joined #perl6
17:41 ssutch joined #perl6
17:43 rurban_ joined #perl6
17:45 eli-se joined #perl6
17:46 masak std: value
17:46 camelia std 28329a7: OUTPUT«ok 00:00 134m␤»
17:46 masak std: »value
17:46 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Bogus statement at /tmp/h3xcAybJ1z line 1:␤------> 3<BOL>7⏏5»value␤Parse failed␤FAILED 00:00 136m␤»
17:47 eli-se hi
17:50 timotimo smls: can i get something barebones but pretty-ish looking to plop a codemirror into and try out some ajaxy stuff?
17:55 TimToady joined #perl6
17:55 diana_olhovik_ joined #perl6
17:59 diana_olhovik_ joined #perl6
18:01 chenryn joined #perl6
18:04 RabidGravy anyone got a few minutes to look at https://gist.github.com/31c8e72d86d889489f0f.git ?  It's a test of the guts of Term::Cap - the original sequence of regex substitutions is in the pod at the top, a working translation to the p6 substitutions at the bottom
18:05 RabidGravy the not working bit is the grammar which I would rather use, the problem seems to be something to do with the <!special> bit which causes the whole thing to eat up a whole CPU "forever"
18:08 TimToady without looking, is <!special> supposed to eat a character like a negated character class?  if so, should be <-special>
18:08 RabidGravy any other possible locution I can think of doesn't do the right thing (i.e. <literal> eats the rest of the characters
18:08 RabidGravy ah,
18:09 TimToady I don't see anything in that gist offhand
18:09 TimToady just an empty page
18:10 RabidGravy TimToady, erk
18:11 TimToady something added a .git for you helpfully, which doesn't
18:12 TimToady yes, <!special>+ will match the null string eternally
18:12 RabidGravy yeah that's weird I didn't have the .git
18:12 RabidGravy roight, yes - that was the last of the explanations I thought of
18:13 TimToady p6 regex doesn't attempt to detect multiple matches of '' currently
18:14 RabidGravy never been good with regular expressions of any flavour :-\
18:14 mohij joined #perl6
18:15 TimToady it also appears that you're using hard 4-column tabs, which is a bit antisocial
18:16 RabidGravy so I need to express <literal> as "anything other than literal but at least one character"
18:16 TimToady actually, 2-column
18:17 TimToady or something that is really screwing up the formatting...
18:17 TimToady most of us just use spaces and avoid tabs these days
18:17 RabidGravy TimToady, yeah it's shit, I don't actually use that - I started the file as 'pp' just to test a few lines and the editor couldn't guess my wishes
18:18 dalek perl6-roast-data: 5454868 | coke++ | / (9 files):
18:18 dalek perl6-roast-data: today (automated commit)
18:18 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/54548689d3
18:18 RabidGravy let me fix that before anyone gets distracted
18:19 Rounin joined #perl6
18:20 bartolin_ TimToady: a while ago you mentioned that some tests in roast (e.g. tests for error messages) are overly specific to a specific implementation (Rakudo) -- http://irclog.perlgeek.de/perl6/2015-03-06#i_10236778
18:20 bartolin_ I remember a short discussion with FROGGS++ and nine++ about that topic from last year: http://irclog.perlgeek.de/perl6/2014-10-02#i_9444022
18:20 bartolin_ I wrote one or two tests for an exact error message. and looking at all those tickets about 'LTA error message' it somehow seems appropriate to me to have tests for those good error messages we settled for. OTOH the wording of the error messages are implementation details -- in contrary to the exception types used, right?
18:20 bartolin_ so maybe it would make sense to move those overly specific tests from roast to S02-rakudo? that would imply to du
18:20 bartolin_ plicate some test code, but it would be a clean separation, IMHO
18:21 TimToady heh, if I make it complain about missing postfix on 42»foo, then it catches all the poeple who write @a»+«@b without spaces
18:22 TimToady well, some of the tests are just intermixed, like requiring particular words in an error message
18:22 TimToady but we still want some of the test to be cross-platform
18:24 bartolin_ so you would say those tests (requiring particular words) would be okay in roast?
18:25 TimToady I'm saying some of them are not okay, because a different implementation might choose different words
18:25 itz RabidGravy: you supping the p6 kool-aid? :)
18:25 TimToady but we do need to test the errors in a generic way
18:26 RabidGravy itz! hey! you alright? Still at the fun party place in EC2?
18:27 itz I have an errr friend who works in a boring bank but one day soon will leave and do perl6 :)
18:27 RabidGravy ;-)
18:28 anaeem1 joined #perl6
18:29 dalek roast: eca749d | TimToady++ | S (2 files):
18:29 dalek roast: hyper infix ambig with hyper postfix
18:29 dalek roast: review: https://github.com/perl6/roast/commit/eca749dca9
18:29 atweiden joined #perl6
18:29 * masak does his duty in reducing the incidence of the "drinking the X kool-aid" meme by pointing out that the metaphor is based on a suicide cult from 1978
18:29 lichtkind joined #perl6
18:29 mr-foobar joined #perl6
18:29 dalek rakudo/nom: 663a22b | TimToady++ | src/Perl6/Grammar.nqp:
18:29 dalek rakudo/nom: require postfix after postfix prefix
18:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/663a22b91d
18:30 RabidGravy okay https://gist.github.com/jonathanstowe/31c8e72d86d889489f0f maybe properly formatted now
18:30 masak or maybe "snowclone" more than "meme", now that we have a term for that.
18:30 masak RabidGravy: wow, that looks like an excellent grammar to write tests for :)
18:31 RabidGravy so how do I express "anything that is not matched by <special>" in a sane way>
18:31 RabidGravy ?
18:32 colomon joined #perl6
18:33 TimToady usually you just want to have it in an alternation: <special> | <otherstuff> and let LTM handle it
18:33 masak m: grammar G { regex TOP { [<!before <special>> .]+ }; regex special { BOO } }; say so G.parse($_) for "abcde", "abBOOde"
18:33 camelia rakudo-moar 9210cc: OUTPUT«True␤False␤»
18:34 RabidGravy masak, this is just a small part of it - trying to do Term::Cap by parsing the whole termcap with a grammar and I have the level above this working
18:34 masak RabidGravy: cool.
18:34 TimToady negative lookaheads are kind of a smell though
18:34 masak RabidGravy: my statement about grammars and tests (and in particular your grammar and tests) still stands. :)
18:36 RabidGravy masak, my plan involves using the p5 Term::Cap to generate the test data as that has been "right" for many years
18:36 masak sounds like a plan.
18:36 masak maybe even add the conversion script to the repository...
18:41 smls timotimo: Sure, but I gotta go now. Be back in 2 hours or so.
18:42 smls timotimo: In the meantime, maybe get someone with more up-to-date webdev-fu to select an appropriate bare-bones template (like "HTML5 Boilerplate" or whatever is cool these days) for handling browser compatibility and whatnot.
18:42 smls left #perl6
18:54 Alina-malina joined #perl6
19:08 bartolin_ TimToady: if I may ask again with an example: https://github.com/perl6/roast/commit/496aa2ffa9 I wonder what to do with that:
19:09 bartolin_ a) just remove the parts about "message => ..."
19:09 bartolin_ b) same as a) but also copy the current tests to t/02-rakudo/errors.t (duplicating test code)
19:10 FROGGS c) leave it that way
19:12 bartolin_ or that ...
19:13 FROGGS I opt for c)
19:13 FROGGS because for most tests we *have to* check for the exception types and their properties
19:14 FROGGS like in:
19:14 FROGGS throws_like 'use MONKEY-TYPING; augment class No::Such::Class { }', X::Augment::NoSuchType,
19:14 FROGGS package => 'No::Such::Class';
19:18 ssutch joined #perl6
19:20 Guest68239 joined #perl6
19:21 TimToady well, but what if we decide a better message is "Nothing before quantifier for it to modify", did the language Perl 6 actually change?
19:24 TimToady obviously the message should probably mention "quantifier" somehow, but the whole reason for having exception types is to be able to test for them without relying on searching for any particular phrase
19:25 TimToady and mandating any particular level of awesome tends to get in the way of further levels of awesome
19:26 * TimToady has had to fix a number of tests due to this, and would not like to have to issue a 6.1 roast merely because we decided an error message was LTA
19:28 TimToady speakin' o' which, I noticed we had a dispatch error last night that failed to match an invocant of (Failure: )
19:28 kjs_ joined #perl6
19:28 RabidGravy yes, if you are testing structured exceptions then testing the text of an attribute is somewhat redundant at best
19:28 TimToady surely it would be nice to actually say what the original failure was...
19:29 RabidGravy however if one was testing for internationalized versions of that text then it would be perfectly valid
19:29 TimToady so I think testing the message should be restricted to ensuring that appropriate bits of data find their way into the message
19:30 vendethiel TimToady: we should obviously have i18n'd error messages, as well: P
19:30 RabidGravy yep, you test the exception's "message builder"
19:31 TimToady vendethiel: yes, it's obvious, but much less obvious now than twenty years ago, when the technical hegemony of English was less established
19:31 TimToady cultural imperialism has to be good for something... :P
19:31 vendethiel TimToady: I was joking. I hate translated error messages. They're making you unable to google anything, they usually make no sense
19:32 RabidGravy ORA19245
19:32 vendethiel because it's hard to translate technical terms to one's language (and I know that by experience), they render HORRIBLY BAD due to accents (I'm french)... I really don't want translated error messages
19:32 TimToady you must be Parisian :)
19:33 RabidGravy but you don't want to close the door on doing that in someone's application specific exceptions
19:33 vendethiel TimToady: that because I'm always complaining? :P
19:33 TimToady no, but Parisians are much less likely to accept broken French than in the rest of France :)
19:33 vendethiel fwiw, I definitely understand *why* people want/need them. *I*, as a mostly-english-speaking-and-technical person, really hate them.
19:34 TimToady nodnod
19:34 RabidGravy I understand French in Paris and Nice and not so much elsewhere
19:34 skids You could have an ancillary spec that is not part of "The Perl 6.x Specification", and that could get pickier while playing it looser with version numbers.
19:34 _edwin joined #perl6
19:34 vendethiel well, it's not the problem of "broken" french. Some technical words are just untranslatable -- and I've tried. No idea how to translate something like "scope". It really doesn't work (the french word is "portée", but... nope)
19:35 TimToady something more like a literary passage?
19:35 RabidGravy most technical language is a metaphor of sorts, you need to get the poets in on it
19:35 TimToady something more like a context?
19:35 TimToady well, it's not my job to translate into French :)
19:35 vendethiel "literary passage"?
19:36 TimToady something smaller than a book chapter
19:36 TimToady like a piece of text between two whitespaces?
19:36 vendethiel ah, hm
19:36 TimToady something longer than a paragraph
19:36 RabidGravy verse
19:36 vendethiel I meant "lexical scope", if you're refining my use of "scope"
19:37 TimToady lexical means having to do with text, so yes
19:37 bartolin_ I find TimToady's reasoning wrt error messages convincing. it's only that I don't dare to decide which are the appropriate bits of data (which belong into the message) for most cases. so I back off from reviewing our tests in roast wrt to overly specific error messages ...
19:37 * masak .oO( lexical means never having to say you're sorry )
19:37 TimToady we could just as easily and more clearly called them textual scopes in English
19:38 TimToady *have
19:38 bartolin_ but thanks for explaining!
19:39 skids stanza.  Oh I thought TimToady was trying to complete a crossword. :-)
19:41 lucas_ joined #perl6
19:42 vendethiel TimToady: it's just that we always use english technical words :) we don't really have a "technical word culture"
19:42 _edwin hi all! is someone around who could give me some hints for building Rakudo on Windows 7?
19:42 _edwin I'd like to take a look at the input/output problems in the REPL
19:42 RabidGravy fwiw, where something is going to throw a structured exception just test the type of the exception. where the exception itself has some behaviour with respect to the message text then make separate tests for the exception itself
19:43 skids .oO(cheese word culture. Mmmm.)
19:45 bartolin_ RabidGravy: my motivation to (additionally) test for the message test was mainly that a lot of efford goes into the wording, so it seemd appropriate to ensure it doesn't change accidentially.
19:45 RabidGravy if an exception could mean something different depending on the content of the exception message then it probably means it wants to be a diffetent type
19:46 skids RabidGravy++ that I think most everyone would agree with.
19:46 lucas_ Hello.
19:46 telex joined #perl6
19:46 lucas_ Why calling methods without parentheses is not allowed? Is it a technical limitations or is it by design?
19:46 RabidGravy bartolin_, okay, that's a test of the exception itself not the code that might throw it
19:46 RabidGravy lucas_,  method:
19:47 RabidGravy (I don't actually like that visually but it's there)
19:47 bartolin_ RabidGravy: yes, it's a diffent thing. Therefore my idea to move the test for the wording out of roast
19:48 RabidGravy yep, I'm with you
19:48 TimToady lucas_: we never allow two terms in a row, and without parens or colon, a method call is just an attribute access usually
19:49 TimToady and colon naturally means "here's more" in English
19:50 bartolin_ RabidGravy++ # pointing out the difference between "test of the exception itself" and "test of the code that might throw it"
19:51 lucas_ RabidGravy, TimToady: thanks
19:51 skids m: (1,2).map: *.say # example for lucas_
19:51 camelia rakudo-moar 663a22: OUTPUT«1␤2␤»
19:51 lucas_ I'm glad that colon exists. It works more or less the same thing as dollar ($) in Haskell, right?
19:51 TimToady it's one of our precedence droppers, yes
19:51 masak yes, that's a good comparison
19:52 masak similarly, listops have an implicit Haskell colon on them
19:52 TimToady it's kind of a left paren without its corresponding right
19:53 TimToady the practical difference being that a listop has no arguments yet, so is likely to take more, while a method already has an invocant as one argment, so is less likely to want more arguments
19:53 RabidGravy Got that grammar working now https://gist.github.com/jonathanstowe/31c8e72d86d889489f0f - inasmuch as the grammar and the old school loadsasubsitutions gets the same
19:53 RabidGravy cheers for the pointers TimToady
19:53 TimToady RabidGravy++
19:54 [Coke] _edwin: what compiler do you have?
19:54 [Coke] You'll need an install of perl5 and a C compiler.
19:56 TimToady m: my @a; say @a»value
19:56 camelia rakudo-moar 663a22: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QbaBZ6caV4␤Missing postfix␤at /tmp/QbaBZ6caV4:1␤------> 3my @a; say @a»7⏏5value␤    expecting any of:␤        postfix␤»
19:56 _edwin my first try was with strawberry perl and the included gcc
19:56 TimToady masak: ^^^
19:57 _edwin [Coke], actually I'd like best to reproduce the Rakudo Star build for Windows, because it's with Rakudo Star that I see the IO problems
19:57 masak TimToady: huh.
19:57 masak "Missing postfix"...
19:57 TimToady would you prefer Malformed?
19:57 masak not sure.
19:58 masak I guess this is fine.
19:58 _edwin [Coke], with strawberry gcc I got stuck in the MoarVM build: "auto-detecting x86 toolchain ... FAIL"
19:58 TimToady in your case malformed is perhaps more accurate
19:58 TimToady m: @a>>
19:58 camelia rakudo-moar 663a22: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qVaJSQQrsn␤Missing postfix␤at /tmp/qVaJSQQrsn:1␤------> 3@a>>7⏏5<EOL>␤    expecting any of:␤        postfix␤»
19:58 TimToady in that case, it's just missing though
19:58 FROGGS "Malformed or missing postfix"
19:58 TimToady they're two difference exception types >.<
19:58 FROGGS ohh
19:58 _edwin my perl 5 is: Strawberry Perl (64-bit) 5.16.3.1-64bit README
19:58 FROGGS :/
19:59 masak I was thinking something like "...(Did you mean '».value'?)"
20:00 _edwin I'll try to tell it to use gcc
20:01 [Coke] _edwin: I think FROGGS just recently posted directions on how the msi is built.
20:02 _edwin [Coke], ok, those instructions would be greatly helpful for me. are they in the irc backlog or a blog?
20:04 [Coke] https://github.com/rakudo/star/blob/master/tools/star/windows-msi.pod
20:05 FROGGS _edwin: though it seems we have to patch moarvm and tweak nqp+rakudo's build system to compile using mingw
20:06 _edwin [Coke]++, thanks!
20:06 _edwin FROGGS, I will try to follow the steps in the windows-msi.pod 1:1 to maximize my chance to reproduce the problem
20:07 FROGGS k
20:08 beastd joined #perl6
20:10 pippo joined #perl6
20:10 yqt joined #perl6
20:11 pippo .tell flussence Thank you very much. That is interesting. Cheers.
20:11 yoleaux pippo: I'll pass your message to flussence.
20:11 pippo left #perl6
20:11 dalek rakudo/nom: 0730963 | TimToady++ | src/Perl6/Grammar.nqp:
20:11 dalek rakudo/nom: be more specific on malformed/missing postfix
20:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/07309632b1
20:12 DrForr m: class Foo { }; use Foo;
20:12 camelia rakudo-moar 663a22: OUTPUT«===SORRY!===␤Could not find Foo in any of: /home/camelia/rakudo-inst-1/share/perl6/lib, /home/camelia/rakudo-inst-1/share/perl6␤»
20:12 TimToady m: class Test { }; use Test;
20:12 camelia rakudo-moar 663a22: OUTPUT«===SORRY!===␤Merging GLOBAL symbols failed: duplicate definition of symbol Test␤»
20:13 lucas_ For example, "obj1.foo + obj2.bar" could either mean "obj1.foo() + obj2.bar()" or "obj1.foo(+obj2.bar)". I think Ruby gets it right which one I want. By the time I call the methods, the Perl 6 compiler already knows it's signature (if expects arguments or not), right? I guess my original concern was why can't it use that knowledge to act one way or another? Would it be to ambiguous/difficult?
20:14 FROGGS lucas_: method calls always require either parens or a colon
20:14 FROGGS so you example always means this: obj1.foo() + obj2.bar()
20:15 FROGGS only subroutines can appear as listops without further indication
20:15 DrForr class Foo is still created and can be instantiated, but I'm not sure if 'use Foo;' should throw the error it does.
20:15 FROGGS obj1.foo: + obj2.bar  would be  obj1.foo(+obj2.bar)  though
20:16 [Coke] DrForr: you're trying to use a file that doesn't exist; how can we change the error message to be more helpful?
20:16 [Coke] m: use Foo;
20:16 camelia rakudo-moar 663a22: OUTPUT«===SORRY!===␤Could not find Foo in any of: /home/camelia/rakudo-inst-1/share/perl6/lib, /home/camelia/rakudo-inst-1/share/perl6␤»
20:19 DrForr Well, I've already declared class Foo{} just before that. My n\"aive expectation was that the class declaration would make the 'use' statement redundant. If 'use' is meant to go out to the filesystem that's fine.
20:20 skids Just because you use "Foo" does not mean that it contains a package or module names "Foo".  For sanity purposes we hope is does but, that could actually be legal.
20:21 DrForr Understood. The 'new' crashing bug I'd found is still present in the current build, I was writing test cases to narrow down the cause to see if the problem had changed.
20:22 lucas_ FROGGS: Thanks, I understand.
20:22 e joined #perl6
20:23 FROGGS \o/
20:24 FROGGS first time I tested Foo:
20:24 FROGGS ==> Successfully installed Foo
20:24 FROGGS ==> Submitted test report as: http://testers.perl6.org/reports/38222.html
20:24 FROGGS seond time I tested foo:
20:24 FROGGS ==> Successfully installed Foo
20:24 FROGGS ==> Test report is duplicate of: http://testers.perl6.org/reports/38222.html
20:24 FROGGS second*
20:24 skids nice.
20:26 tadzik nice!
20:26 tadzik FROGGS++
20:27 skids Sorry for this next paste.  You actually have to read m-ModuleLoader.nqp to understand why I am beating my head on a wall.
20:27 skids m: nqp::callmethod(nqp::gethllsym("perl6", "ModuleLoader"), nqp::unbox_s("load_module"), nqp::unbox_s("Foo"), nqp::hash("from", "foo"), :chosen(nqp::hash("load","foo")))
20:27 camelia rakudo-moar 663a22: OUTPUT«Do not know how to load code from foo␤  in any load_module at src/gen/m-ModuleLoader.nqp:186␤  in method load_module at src/gen/m-CORE.setting:26323␤  in block <unit> at /tmp/UmSmemrRWl:1␤␤»
20:28 dalek ecosystem: 10c3699 | raydiak++ | META.list:
20:28 dalek ecosystem: Add Git::PurePerl gitless Git interface
20:28 dalek ecosystem:
20:28 dalek ecosystem: Nascent Perl 6 port of http://search.cpan.org/dist/Git-PurePerl/
20:28 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/10c36995ca
20:29 FROGGS skids: what's the problem?
20:29 skids I put the :from<foo> in to show that it does not get anything in %chosen, because if it did "Do not know how to load" would not be reachable.
20:29 skids I just want it to see what I put in chosen and it disappears into the ether.
20:29 skids And I have zero clue as to why.
20:29 FROGGS ahh
20:30 skids (The problem that led to this one, BTW, is that CompUnit.load is broken)
20:31 sno joined #perl6
20:33 FROGGS tadzik: I pushed that to panda right now... (it does not seem to get dalek'd)
20:33 * masak .oO( it was exTERminated!!! )
20:36 FROGGS skids: seems nqp::callmethod is unable to pass nameds along
20:38 FROGGS ummm, wait
20:39 ugexe could someone with rakudobrew permissions pull in this PR for the s/languages/share/ change so it works for smoke testing again? https://github.com/tadzik/rakudobrew/pull/34
20:40 FROGGS tadzik: ^^
20:40 skids m: my class A { method foo($module_name, %opts, *@GLOBALish, :$line, :$file, :%chosen) { %chosen.perl.say } }; nqp::callmethod(A, nqp::unbox_s("foo"), nqp::unbox_s("Foo"), nqp::hash("from", "foo"), :chosen(nqp::hash("load","foo"))) # this works fine.
20:40 camelia rakudo-moar 663a22: OUTPUT«("load" => "foo").hash␤»
20:40 FROGGS skids: I know why the :%chosen get lost
20:40 genio joined #perl6
20:41 tadzik ugexe: thanks :)
20:42 atweiden i'm parsing text and trying to build classes with the results. is it possible to do from grammar action methods?
20:42 FROGGS atweiden: yes
20:43 skids atweiden: yes, but you won't be happy if you backtrack and the class doesn't go away :-)
20:43 atweiden FROGGS: do i need to use make/made for this?
20:44 FROGGS atweiden: in the action methods you'd use make to attach something to $/, aye
20:44 FROGGS atweiden: and then you can access it via .made in the 'outer' method
20:44 atweiden i tried using make/made
20:44 atweiden with this grammar https://github.com/atweiden/nightscape/blob/develop/lib/Nightscape/Parser/Grammar.pm
20:45 atweiden i got stuck because i have make overwriting previously captured results
20:46 dalek rakudo/nom: 59f7cb9 | FROGGS++ | src/core/CompUnitRepo.pm:
20:46 dalek rakudo/nom: pass around %chosen in load_module
20:46 dalek rakudo/nom:
20:46 dalek rakudo/nom: Since the module loader in CUR intercept the Perl6::ModuleLoader,
20:46 dalek rakudo/nom: we are supposed to pass along what we got in. skids++ for finding it.
20:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/59f7cb90f5
20:46 atweiden moved to initializing a class from Actions.pm, and tried adding to it but doesn't seem to be working either
20:47 skids FROGGS++ now I know I am not crazy :-)
20:47 ugexe what is %chosen anyway? th emodule its tryign to load?
20:47 FROGGS skids: no :o)
20:47 skids ugexe: when you already know the exact files you want to load.
20:47 FROGGS ugexe: it is a way to tell load_module that we already know what has to be loaded
20:48 FROGGS it it does not need to look for a file on disk
20:48 japhb_ It appears that non-main threads are eating compiler errors, such as binding failures.  For example:
20:48 japhb_ m: start { my Bool $foo = now; }
20:48 camelia rakudo-moar 663a22: ( no output )
20:48 FROGGS atweiden: I don't see that you are calling make/made anywhere
20:48 japhb_ m: await start { my Bool $foo = now; }
20:48 camelia rakudo-moar 663a22: OUTPUT«===SORRY!===␤Type check failed in assignment to '$foo'; expected 'Bool' but got 'Instant'␤»
20:48 japhb_ Grr, I thought that was a golf, but I need to obviously get sneakier
20:49 atweiden FROGGS: that code is obscenely ugly and local :)
20:49 FROGGS :o)
20:49 atweiden but in general, do i need to structure my grammar differently so that make works?
20:50 FROGGS atweiden: example: you add a 'method TOP($/) { make $<journal>.made }' to your action class
20:50 FROGGS atweiden: no, you basically just structure your action identically to your grammar
20:51 atweiden FROGGS: i was trying this http://ix.io/h89
20:51 atweiden but it overwrites previous captures since there are multiple accounts
20:53 FROGGS I think that this is wrong:
20:53 FROGGS make %( $<header>».made,
20:53 FROGGS $<posting>».made );
20:53 FROGGS I think it is supposed to read: make $<header>».made Z[=>] $<posting>».made
20:53 FROGGS or so
20:53 FROGGS hmmm, is Z correct here?
20:53 FROGGS I'm too tired to know
20:54 masak looks right
20:54 masak since you're in a %(), you could prolly get away with just Z too
20:55 FROGGS atweiden: is it possible that you loose information because you hit duplicate keys?
20:55 FROGGS this could explain your 'overwritten captures'
20:56 atweiden yes, but it only occurs with make/made
20:56 atweiden a posting looks like
20:56 atweiden Expenses:Personal:Fuel $10.00 USD
20:56 atweiden Assets:Personal:Bankwest:Cheque -$10.00 USD
20:56 atweiden so it has to capture <account> many times
20:59 RabidGravy so it's maintain an internediate hash at account and add the items on to it
20:59 RabidGravy you may need to adust your grammar to have an additional level
21:00 ugexe or store it in a state hash using a code block... thought i remember seeing an example of something like that
21:00 ugexe as in right in the token/rule
21:01 virtualsue joined #perl6
21:04 Possum joined #perl6
21:04 smls joined #perl6
21:04 * smls back
21:07 e joined #perl6
21:08 FROGGS smls: I cannot tell, but I like this version better (how the camelia sticks out): http://i.imgur.com/0kDEeeu.png
21:09 FROGGS smls: though, that the bordeaux background is window-wide is unfortunate me thinks
21:09 smls interesting (re Camelia)
21:09 smls re background: why?
21:10 FROGGS smls: and the list of features is actually hard to read... I love the blurry image though
21:10 FROGGS and alse the Get Started/Get Involved text, and how the text underneath looks like
21:11 FROGGS smls: hard to put in words... I just *feels* wrong :o)
21:12 FROGGS I think it wants to stop where the content stops..
21:13 FROGGS the color is too dark to be window-wide
21:13 FROGGS the camelia in here would look good on its own, but it looks "boring" on the page: http://i.imgur.com/jBXkUgW.png
21:14 FROGGS (sorry, don't want to be mean)
21:14 smls no worries :)
21:14 FROGGS :o)
21:14 RabidGravy as a matter of interest is there an emergent etiquette regarding the porting of modules other people have done in p5?
21:15 FROGGS RabidGravy: I dont know of any...
21:15 FROGGS I've talked to maintainers of P5 modules and said that I am going to port them and the result is often: Cool, have fun! :o)
21:16 RabidGravy that is to say I have some modules that have hard dependencies like Device::LibUSB, Device::SMBus etc
21:16 FROGGS RabidGravy: so, talk to them (if possible), and perhaps mention that it is based on their work in the readme
21:16 RabidGravy okay that's where I was going really
21:16 smls FROGGS: I'll ponder on your feedback. Other people's opinions would be helpful too.
21:17 FROGGS RabidGravy: these are interesting deps :o)
21:18 RabidGravy oh and Net::LibLo ;-)
21:18 smls Regarding module porting: I'd recommend to think twice before porting Perl 5 modules too literally.
21:19 RabidGravy I like my hardware these days what can I say ;-)
21:19 smls Often the best way to do an API in Perl 6, is different from Perl 5
21:19 jnthn evening, #perl6 o/
21:19 smls Not to mention some Perl 5 CPAN module carry API baggage from Perl 4 times
21:19 FROGGS hi jnthn
21:19 smls It would be unfortunate if the best / most generic module names in Perl 6 CPAN would be squatted by modules with Perl 4 APIs :P
21:20 FROGGS *g*
21:20 kjs_ joined #perl6
21:20 RabidGravy oh I know, but if you've got to use a library to talk to hardware there's not much getting out of it
21:20 ugexe squatting shouldnt be a problem with authority
21:21 smls Well, theres a social incentive to not make a module  with the same name as someone else's.
21:21 smls It just creates more confusion for everyone.
21:22 smls (I'm talking about CPAN here. CPAN vs random github account vs companies non-public stuff, would not use the same namespace.)
21:22 RabidGravy which is why I'm cracking on with making the ones that I already have on CPAN
21:23 ugexe that depends how you look at it. as i see it, the authority is simply part of the module name and thus you arent copying anything
21:23 smls So are we really expected to writre out the full authority all the time?
21:24 FROGGS smls: I think so
21:24 ugexe you could also do some META.json magic
21:24 RabidGravy "authority"?
21:24 smls That just increases the verbosity of the "boilerplate" part at the start of scripts.
21:24 ugexe that option that says 'this modules takes the place of that other'
21:26 smls Anyway, tl;dr: If you port a module from Perl 5 to Perl 6, consider redesigning the API to make it more awesome in the context of Perl 6.
21:27 espadrine joined #perl6
21:28 ashleydev is src/Perl6/Grammer.nqp the same as the STD grammer... is there a difference between the STD grammer and what rakudo is using?
21:28 ugexe emulates, supercedes, etc handle the boilerplate from a module author standpoint
21:30 japhb Ah, I see the problem.  I was starting things in other threads, and expecting that if I didn't do anything else, exceptions would bubble up and be visible.  But no, they just go into a Broken Promise, and if I don't check it on occasion, I'd never know it went boom.
21:30 japhb m: start { my Bool $foo = now; }; sleep 2;
21:30 camelia rakudo-moar 59f7cb: ( no output )
21:30 japhb m: my $p = start { my Bool $foo = now; }; say $p.status; sleep 2; say $p.status;
21:30 camelia rakudo-moar 59f7cb: OUTPUT«Planned␤Broken␤»
21:30 japhb m: my $p = start { my Bool $foo = now; }; say $p.status; sleep 2; say $p.cause;
21:30 camelia rakudo-moar 59f7cb: OUTPUT«Planned␤Type check failed in assignment to '$foo'; expected 'Bool' but got 'Instant'␤  in block  at /tmp/c3bdVACM0F:1␤  in block  at src/gen/m-CORE.setting:23195␤  in block  at src/gen/m-CORE.setting:22980␤␤»
21:30 Ulti FROGGS++ can I suggest a couple of edits to your announcement? 'come now' -> 'now come'  and 'had build Rakudo' -> 'had to build Rakudo'
21:31 japhb I feel myself wanting some way to say "I know this is in another thread, but I want it to go BOOM as soon as there's an exception, since I'm writing unexceptional code ....
21:31 FROGGS ashleydev: src/Perl6/Grammer.nqp follows STD in some way, but is not identical
21:32 jnthn japhb: You should really always await or get the result of a Promise
21:33 FROGGS Ulti: thanks, fixed :o)
21:33 jnthn japhb: Since it runs on a background thread, if you don't wait for it somewhere you don't even know it'll complete before program exit.
21:34 FROGGS jnthn: and an implicit await at exit is an antipattern and a nogo?
21:34 Ulti FROGGS I'll try the new one out on windows 8.1 64 now :3
21:34 japhb jnthn: Fair enough, but I've gone from "Running a bunch of tasks all started at once from the same point" to "spinning a web of tasks that makes my own head spin".  So I do keep an array of promises started, drop completed ones every so often, and wait for that array to empty before exiting.
21:34 FROGGS Ulti: ohh, that'll be interesting :o)
21:35 FROGGS but, as I know Windows, it'll just work
21:35 jnthn Well, we could say that if a Promise is sunk then it goes on some global queue to be dealt with at exit.
21:35 japhb The problem is, I don't know in a *timely* way that a thread has crashed, so at the rate I'm producing log entries, a whole heck of a lot can happen in other threads before the main reaper notices the Broken promise.
21:35 jnthn But that feels risky and unpredictable in different ways.
21:35 japhb I want some way to raise that exception to the surface RIGHT NOW.
21:36 Ulti FROGGS: well it runs
21:36 jnthn japhb: What do you mean by "a thread has crashed"?
21:36 jnthn japhb: start { ... } should always catch the exception and stash it away in the Promise.
21:37 japhb Exception thrown.  Sorry, was mixing wording because I can, in fact, crash r-m pretty easily on thread join.  Dunno why, but it's why I do the heavy stuff in r-j.  But in this case I was talking about an exception, which ends that thread (and as you pointed out, stashes the exception in the Promise)
21:37 jnthn start != thread, it's scheduling a bit of work on one.
21:38 jnthn The thread itself is then free to go on and work on another Promise.
21:38 RabidGravy ah
21:38 chenryn joined #perl6
21:38 jnthn You can always write some sub immedi-whine($prom) { $prom.then({ if $prom.status == Broken { ...flag it up... } }) } or so I guess
21:39 japhb Hmmm, looking at my thread IDs, I don't actually see that happening, but that could be because I'm building a web of tasks, and having a task throw an exception means the portion of the task graph rooted at that point gets pruned (or rather, never created)
21:39 japhb jnthn: Hmmmm, there may be value in a wrapper for that in my code.
21:40 japhb I'm not saying I necessarily have the best idea for dealing with this, just ... hmmm, is it possible to hook the moment that an exception is caught and stuffed in the Promise?  Did you already provide for that?
21:41 jnthn japhb: Not as such (more)
21:41 jnthn Promise.start (which start { ... } uses) is just one Promise factory, however.
21:42 jnthn You can put any semantics you like behind one really.
21:42 * japhb thinks about this a bit
21:42 timotimo evening, jnthn :)
21:43 FROGGS gnight #perl6
21:43 jnthn japhb: https://github.com/rakudo/rakudo/blob/nom/src/core/Promise.pm#L158 is the implementation of start, fwiw.
21:43 jnthn o/ timotimo, o\ FROGGS
21:43 japhb Yeah, I was looking at that.
21:45 japhb Almost feels like Promise.start could use a :&catch that gets called *along with* the vow breaking.  So L163 becomes: :catch(-> $ex { $vow.break($ex); &catch() }) );
21:45 jnthn japhb: BTW, from tomorrow my tuit supply for Perl 6 improves notably. I feel I dropped the ball on various things you were wanting looking at; feel free to give me an updated "top few things". :)
21:45 japhb jnthn: I really appreciate that.  Let me think upon it, but sincerely, thanks for the offer to consider them.
21:46 jnthn (The tuit supply will also be improving in a sustainable way, as in I should have multiple days a week for Perl 6 from April onwards. :))
21:46 japhb \o/
21:46 TimToady there's that word, "should", again...
21:46 japhb TimToady: Take it up with the Chief Artist.  ;-)
21:48 jnthn Well, it's highly likely, but if I get hit by a bus or something... :P
21:49 jnthn Seriously though, I'm taking a step back from a bunch of $dayjob responsibilities for the coming months, to focus on Perl 6 stuff.
21:49 anaeem1 joined #perl6
21:49 japhb I don't know whether it's appropriate, but jnthn.employer++ to the extent they're making this easier for you.
21:50 _edwin is anyone familiar with this error when building nqp?: NMAKE : fatal error U1077: 'C:\rakudo\bin\moar.EXE' : return code '0xc0000005'
21:51 jnthn _edwin: Well, the error code is the Windows version of SIGSEGV...
21:51 dnk joined #perl6
21:51 _edwin uh, the command that fails is: C:\rakudo\bin\moar --libpath=src\vm\moar\stage0 src\vm\moar\stage0\nqp.moarvm --bootstrap --setting=NULL --no-regex-lib --target=mbc  --output=gen\moar\stage1\nqpmo.moarvm gen\moar\stage1\nqpmo.nqp
21:52 _edwin there is no error message, before that
21:53 jnthn japhb: Yes, they've been understanding about it :)
21:53 jnthn _edwin: Well, if it explodes that dramatically, something is really rather wrong.
21:53 ssutch joined #perl6
21:54 jnthn _edwin: That's the first build step, so it means the MoarVM build has somehow gotten you something busted.
21:54 pmurias joined #perl6
21:54 RabidGravy I
21:55 jnthn _edwin: Does "C:\rakudo\bin\moar --version" help?
21:55 RabidGravy er
21:55 jnthn er
21:55 jnthn s/help/work/ :)
21:55 pmurias react-native is now open source :) , I need to figure out how to get more nqp-js tuits :/
21:55 _edwin jnthn, This is MoarVM version 2015.03 built with JIT support
21:55 jnthn Hmmm
21:56 jnthn _edwin: What platform (CPU, OS, compiler)?
21:57 pmurias react native is only for ios, I need to wait when it works on a phone made by a not completly evil company :(
21:57 _edwin jnthn, Windows 7, 64-bit, Intel Core i7-3667U, Visual Studio 2010
21:58 dalek nqp: 73573da | jnthn++ | tools/build/MOAR_REVISION:
21:58 dalek nqp: Bump MOAR_REVISION for startup improvements.
21:58 dalek nqp: review: https://github.com/perl6/nqp/commit/73573daad3
21:58 jnthn _edwin: huh, that - aside from VS versin - is about identical to what I have here.
21:58 _edwin I followed the steps in windows-msi.pod with the only exception that I use strawberry perl instead of ActiveState
21:59 _edwin I'm building from the rakudo-star-2015.03 tarball
22:00 jnthn Ah, I do it with ActiveState
22:00 jnthn But even so, I don't think we pull enough from Perl 5's Configure for that to be an issue...
22:01 dalek rakudo/nom: dd13105 | jnthn++ | tools/build/NQP_REVISION:
22:01 dalek rakudo/nom: Bump NQP_REVISION to get latest MoarVM.
22:01 dalek rakudo/nom:
22:01 dalek rakudo/nom: This brings both lazy deserialization and tuning of the spesh/JIT
22:01 dalek rakudo/nom: thresholds, both improving startup time.
22:01 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/dd13105026
22:01 demayl hi all, can i get a little help about nativecast
22:01 jnthn _edwin: Does SET MVM_JIT_DISABLE=1 help at all?
22:02 jnthn demayl: You can try, at least :)
22:02 demayl :) ok then
22:03 demayl im playing with libcurl callbacks, but i get a error for mallformed utf-8
22:03 eli-se joined #perl6
22:03 demayl Malformed UTF-8 at line 5 col 36   in method CALL-ME at lib/NativeCall.pm:233   in method download at test_curl.p6:52   in block <unit> at test_curl.p6:73
22:04 demayl when the data is only latin it works
22:04 jnthn Do you know you're actually getting UTF-8?
22:04 demayl it can be in any encoding
22:04 demayl thats the point
22:05 _edwin jnthn++, that seems to get me further
22:05 jnthn _edwin: Hm, OK, then we could do with figuring out what configuration works out differently...
22:06 demayl here is the callback function
22:06 japhb m: sub foo(&a, :&b) { say "Optional block sent" if &b; }; foo { say "Bar" }, :b({ say "Baz" });
22:06 camelia rakudo-moar 59f7cb: OUTPUT«Optional block sent␤»
22:06 japhb m: sub foo(&a, :&b) { say "Optional block sent" if &b; }; foo { say "Bar" } :b({ say "Baz" });
22:06 demayl sub callback( Str $ptr , int $size, int $nmemb, OpaquePointer $wtf --> int ) { }
22:06 camelia rakudo-moar 59f7cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9TjdLUIoKI␤You can't adverb that␤at /tmp/9TjdLUIoKI:1␤------> 3; }; foo { say "Bar" } :b({ say "Baz" })7⏏5;␤»
22:06 japhb m: sub foo(&a, :&b) { say "Optional block sent" if &b; }; foo({ say "Bar" }) :b({ say "Baz" });
22:06 camelia rakudo-moar 59f7cb: OUTPUT«Optional block sent␤»
22:06 smls .tell timotimo How about this as a rudimentary start? https://gist.github.com/smls/623a9831832a3f20f9e8
22:06 yoleaux smls: I'll pass your message to timotimo.
22:07 jnthn demayl: Str really wants to know an encoding
22:07 japhb m: sub foo(&a, :&b) { say "Optional block sent" if &b; }; foo({ say "Bar" });
22:07 camelia rakudo-moar 59f7cb: ( no output )
22:08 demayl ok, then how can i store it raw
22:08 jnthn demayl: Go with a CArray[int8] or so
22:08 demayl ok, will try, thanks
22:09 _edwin woohoo, rakudo has built and installed to c:\rakudo! (with the JIT disabled)
22:09 jnthn _edwin: OK, then it's at least something fairly specific :)
22:09 _edwin and it has the AltGr input problem, which is what I want to take a look at
22:10 TimToady m: my @a; @a»value
22:10 camelia rakudo-moar 59f7cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/j32j7PnXHU␤Missing dot on method call␤at /tmp/j32j7PnXHU:1␤------> 3my @a; @a»7⏏5value␤    expecting any of:␤        postfix␤»
22:10 jnthn Cute :)
22:10 jnthn TimToady++
22:10 masak TimToady++!
22:10 TimToady m: my @a; @a» value
22:10 camelia rakudo-moar 59f7cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ncXO6SItmb␤Missing postfix␤at /tmp/ncXO6SItmb:1␤------> 3my @a; @a»7⏏5 value␤    expecting any of:␤        postfix␤»
22:11 TimToady m: my @a; @a»/
22:11 camelia rakudo-moar 59f7cb: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FdFWCKp6lH␤Malformed postfix␤at /tmp/FdFWCKp6lH:1␤------> 3my @a; @a»7⏏5/␤    expecting any of:␤        postfix␤»
22:11 masak yeah, the "Missing dot" is the error message I wish I had gotten.
22:11 masak worthy of a Perl 6 error message.
22:11 japhb .oO( Chief Parse Error Awesomizer )
22:12 larion joined #perl6
22:13 masak I want to be an awesomizer when I grow up.
22:13 kjs_ joined #perl6
22:21 anaeem1 joined #perl6
22:21 japhb I think that's what parents are, really.</themoreyouknow>
22:22 * jnthn gets another early night :)
22:22 jnthn o/
22:22 masak 'night, jnthn
22:24 sunnavy joined #perl6
22:30 _edwin jnthn++, thanks for your help, good night
22:32 masak 'night, #perl6
22:35 vendethiel o/, masak
22:35 anaeem1_ joined #perl6
22:35 anaeem1 joined #perl6
22:37 BenGoldberg joined #perl6
22:38 kjs_ joined #perl6
22:39 dalek rakudo/nom: f5d0bc2 | (Geoffrey Broadwell)++ | src/core/Promise.pm:
22:39 dalek rakudo/nom: Support a :&catch argument for start() and Promise.start()
22:39 dalek rakudo/nom:
22:39 dalek rakudo/nom: This allows timely detection of exceptions thrown by tasks
22:39 dalek rakudo/nom: that may not be await'ed for some time (e.g. because they
22:39 dalek rakudo/nom: are background tasks not expected to complete for a long time),
22:39 dalek rakudo/nom: and mirrors the same parameter on ThreadPoolScheduler.cue().
22:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f5d0bc2d49
22:40 RabidGravy nice
22:42 RabidGravy in lieu of an oct() and in the presence of a string representation of what I know to be an octal number I have been prepending "0o" and calling Int on on it
22:42 RabidGravy but that seems shit, is there a better way?
22:42 kaare_ joined #perl6
22:43 TimToady m: say :8('077')
22:43 camelia rakudo-moar dd1310: OUTPUT«63␤»
22:43 RabidGravy :-*
22:43 skids joined #perl6
22:45 RabidGravy perfect, I'm just crap at reading the documentation
22:46 TimToady m: say :8('0x077')
22:46 camelia rakudo-moar dd1310: OUTPUT«119␤»
22:46 TimToady note it just changes the default
22:46 TimToady (from decimal)
22:47 RabidGravy TimToady++ # top toad
22:48 dalek rakudo-star-daily: 43762c3 | coke++ | log/ (9 files):
22:48 dalek rakudo-star-daily: today (automated commit)
22:48 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/43762c3422
22:50 RabidGravy the cases where I've encountered this are in the aforementioned termcap entries with \\(\d\d\d) things and in the /proc/<pid>/fdinfo/<fd> flags field where it is the string representation of the octal flags
22:58 kurahaupo1 joined #perl6
23:03 raiph joined #perl6
23:05 jdv79 what is the p6ism for p5's Storable::dclone?
23:11 japhb m: my $p = start { my Bool $foo = now; }, :catch({ say "Gotcha! $_" }); say $p.status; sleep 2; say $p.status;
23:11 camelia rakudo-moar dd1310: OUTPUT«Unexpected named parameter 'catch' passed␤  in sub start at src/gen/m-CORE.setting:23236␤  in block <unit> at /tmp/uwxr5ExY8W:1␤␤»
23:12 japhb Gah, rebuild not done yet
23:12 ssutch joined #perl6
23:12 anaeem1 joined #perl6
23:24 [Coke] m: say 3
23:24 camelia rakudo-moar f5d0bc: OUTPUT«3␤»
23:27 chenryn joined #perl6
23:30 RabidGravy in the p5 version of Term::Cap there is a test for EBCDIC that does "ord('A') == 193 " - I'm right in saying that is useless in p6? (not having an EBCDIC system to test on)
23:31 RabidGravy I'm inclined to ignore the issue entirely until someone complains and sends a patch
23:32 [Coke] p6 doesn't support ebcdic.
23:33 RabidGravy I guess even the last holdouts of it (z/OS ettc) do utf-8 these days
23:35 RabidGravy the last time I touched one was almost twenty years ago
23:41 Woodi joined #perl6
23:42 molaf_ joined #perl6
23:52 ssutch joined #perl6
23:59 jdv79 how does this error make sense?:  "Unsupported use of $# variable; in Perl 6 please use .fmt"

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

Perl 6 | Reference Documentation | Rakudo