Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-07-23

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:00 rangerprice Should i use forks module or forks::Super module ?
00:00 FatalNIX I'm mostly into Perl 5 really. 6 is more of something I've been walking around the outside of
00:00 FatalNIX skeptically
00:00 skids There are a lot of good videos up from recent conferences.
00:01 rangerprice hy skids ! my friend ! :D
00:01 rangerprice hi*
00:01 skids Hi rangerprice.
00:01 rangerprice So
00:05 dha joined #perl6
00:07 skids wow fresh clones of the repos are starting to become a signficant amount of data these days :-)
00:14 yqt joined #perl6
00:16 tinyblak joined #perl6
00:20 cognominal joined #perl6
00:21 pecastro joined #perl6
00:33 tinyblak joined #perl6
00:34 tinyblak_ joined #perl6
00:35 Possum joined #perl6
00:39 khw joined #perl6
00:39 skids Oh, come back poor dalek.
00:46 laouji joined #perl6
00:50 BenGoldberg joined #perl6
00:54 Mhoram joined #perl6
00:59 kaare_ joined #perl6
01:00 telex joined #perl6
01:15 raiph joined #perl6
01:16 llfourn joined #perl6
01:19 rmgk_ joined #perl6
01:27 jack_rabbit joined #perl6
01:32 lizmat joined #perl6
01:43 laouji joined #perl6
01:53 davido___ joined #perl6
01:59 cognominal joined #perl6
02:01 noganex_ joined #perl6
02:08 laouji joined #perl6
02:09 zacts joined #perl6
02:11 laouji joined #perl6
02:25 amurf joined #perl6
02:26 virtualsue joined #perl6
02:49 tinyblak joined #perl6
02:59 noganex joined #perl6
03:08 atroxaper joined #perl6
03:11 aborazmeh joined #perl6
03:11 aborazmeh joined #perl6
03:23 tinyblak joined #perl6
03:35 rangerprice joined #perl6
03:43 darutoko joined #perl6
04:03 laouji joined #perl6
04:07 Woodi joined #perl6
04:10 amurf joined #perl6
04:19 Peter_R joined #perl6
04:25 tinyblak joined #perl6
04:31 aborazmeh joined #perl6
04:31 aborazmeh joined #perl6
04:38 dalek roast: 150479a | skids++ | / (2 files):
04:38 dalek roast: Tests for some new Exception/Backtrace things
04:38 dalek roast: review: https://github.com/perl6/roast/commit/150479af30
04:38 dalek roast: 1ad644d | skids++ | / (3 files):
04:38 dalek roast: tests for some enhancements to die/fail
04:38 dalek roast: review: https://github.com/perl6/roast/commit/1ad644d704
04:40 skids Oh I guess it came back in but I missed it.  good.
04:53 llfourn joined #perl6
05:08 laouji_ joined #perl6
05:20 tinyblak joined #perl6
05:26 lizmat joined #perl6
05:28 tinyblak joined #perl6
05:43 Peter_R joined #perl6
05:46 ssqq joined #perl6
05:47 ssqq How to get caller routine name?
05:58 ugexe m: sub foo { bar() }; sub bar { say &?CALLER::ROUTINE }; foo()
05:58 camelia rakudo-moar 43e4bf: OUTPUT«sub foo () { #`(Sub|41868432) ... }␤»
06:01 ssqq ugexe: thanks
06:01 lizmat m: sub foo { bar() }; sub bar { say CALLER::<&?ROUTINE>.name }; foo()
06:01 camelia rakudo-moar 43e4bf: OUTPUT«foo␤»
06:02 ssqq lizmat: thanks
06:04 polygon joined #perl6
06:07 dalek specs: 6dbcea6 | kbenson++ | S27-perl-culture-draft.pod6:
06:07 dalek specs: Update S27-perl-culture-draft.pod6
06:07 dalek specs:
06:07 dalek specs: Slightly more natural wording in first sentence (at least to me)
06:07 dalek specs: review: https://github.com/perl6/specs/commit/6dbcea62a0
06:07 dalek specs: e63d55b | kbenson++ | S27-perl-culture-draft.pod6:
06:07 dalek specs: Merge pull request #1 from kbenson/kbenson-patch-1
06:07 dalek specs:
06:07 dalek specs: Update S27-perl-culture-draft.pod6
06:07 dalek specs: review: https://github.com/perl6/specs/commit/e63d55b528
06:07 dalek specs: 52fc10d | FROGGS++ | S27-perl-culture-draft.pod6:
06:07 dalek specs: Merge pull request #97 from kbenson/master
06:07 dalek specs:
06:07 dalek specs: Wording change
06:07 dalek specs: review: https://github.com/perl6/specs/commit/52fc10de53
06:12 FROGGS joined #perl6
06:17 domidumont joined #perl6
06:24 [Sno] joined #perl6
06:28 RabidGravy joined #perl6
06:31 laouji joined #perl6
06:34 masak morning, #perl6
06:34 FROGGS morning, #perl6
06:36 RabidGravy morning folks
06:47 laouji joined #perl6
06:57 zakharyas joined #perl6
07:04 llfourn joined #perl6
07:09 brrt joined #perl6
07:16 domidumont joined #perl6
07:26 konsolebox joined #perl6
07:26 brrt \o
07:26 RabidGravy erp
07:27 rindolf joined #perl6
07:29 timotimo o/
07:30 RabidGravy Hmm I'm about to copy some subroutines from one module to another, time for a NativeHelper module je pense
07:31 Spot__ joined #perl6
07:31 RabidGravy i.e. copy array to carray and vice versa
07:31 brrt EasyNative
07:32 RabidGravy EZNatLite
07:33 timotimo brrt: we'll need a "memcpy detection" in our jit
07:34 brrt timotiom: why
07:34 brrt and what do you mean
07:34 timotimo well, if we have a loop that copies values one-by-one from an array to a carray ...
07:34 timotimo it really ought to be implemented by calling to memcpy
07:34 [Tux] joined #perl6
07:34 timotimo because memcpy is insanely optimized
07:36 brrt i'm not sure... oh
07:36 brrt yes, you can do that
07:36 brrt we're not there yet
07:36 oha timotimo, i guess if it was that easy to detect such situations, then the compiler would have already been taking care of it?
07:36 timotimo oha: gcc and friends already do
07:36 timotimo spesh and jit very much don't ... we have very few optimizations that work at a sufficiently big picture to grasp what a loop is
07:37 RabidGravy I'm going with NativeHelpers::Array
07:38 timotimo since we want automatic vectorization at some point anyway ... ;)
07:38 timotimo that'll probably come first for explicit hyperops
07:38 timotimo even though i'm sure that'll require quite a bit of signaling
07:38 brrt loop detection is not terrifyingly hard
07:39 brrt it's just not very easy, either :-)
07:44 espadrine joined #perl6
07:47 virtualsue joined #perl6
07:54 amurf joined #perl6
07:54 ely-se joined #perl6
08:10 dakkar joined #perl6
08:18 DrForr Heh, I'd love to see p6 code running native on a Transputer :)
08:18 oha timotimo, i see what you mean now :)
08:23 Ven joined #perl6
08:24 espadrine_ joined #perl6
08:27 rindolf joined #perl6
08:45 mr-foobar joined #perl6
08:45 inokenty joined #perl6
08:46 [Tux] Slang::Tuxic + Inline::Perl5 = Failure: Merging GLOBAL symbols failed: duplicate definition of symbol HLL
08:51 nine Damn...looks like I'm quite late to book a flight to Granada
08:53 DrForr Yep. We're flying in to Malaga and taking the bus or something from there. Basically they waited too long to book flights.
08:54 atroxaper joined #perl6
08:57 [ptc] oops.  Looks like I'm also too late to book flights...
08:57 [ptc] so much for being flexible *sigh*
09:13 Averna joined #perl6
09:15 jnthn morning, #perl6
09:15 cdc 'morning jnthn
09:15 nwc10 ^good  ? :-)
09:16 [ptc] \o
09:16 cdc nwc10: of course :)
09:16 virtualsue i'm likely to book Malaga on purpose to get a wider selection of flights
09:18 * jnthn didn't figure out how he's getting to Granada yet, but notes Spain has a nice network of high speed trains :)
09:18 jnthn I like trains :)
09:18 virtualsue yeah
09:18 nine Yep, we'll most probably go via Malaga as well
09:18 virtualsue i may drive but only if i really have to
09:20 atroxaper joined #perl6
09:22 [ptc] jnthn: I tried to work out the train route from Germany to Spain, and had a trip of ~32 hours (including an 8 hour stop in Paris), from .cz would also be a big trip!
09:22 [ptc] jnthn: however, one gets to use lots of high speed trains in different countries :-)
09:23 dalek ecosystem: b96ff01 | RabidGravy++ | META.list:
09:23 dalek ecosystem: Add NativeHelpers::Array
09:23 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/b96ff01cd1
09:23 zakharyas joined #perl6
09:24 sabudana joined #perl6
09:24 nwc10 I'd come to roughly the same conclusion about trains.
09:24 jnthn [ptc]: I'd be coming from Switzerland rather than .cz, given I'll be at SPW beforehand.
09:24 nwc10 and there seem to be no overnight trains west of Germany
09:24 jnthn [ptc]: And it turns out there's a sleeper train from Prague to Basel :)
09:24 RabidGravy It's not big and it's not clever but it keeps me from copy that code into another module
09:25 jnthn [ptc]: But yeah, the rest is...interesting :)
09:25 [ptc] jnthn: I'd also looked into trains from Olten to Granada.  Spent roughly an hour with a nice lady from Deutsche Bahn trying to get connections working nicely.  It's an interesting problem :-)
09:26 [ptc] jnthn: unfortunately the Deutsche Bahn is phasing out sleeper trains :-(
09:26 jnthn [ptc]: Yeah, you'd have to break it somewhere to make it even vaguely nice
09:26 jnthn [ptc]: Oh :(
09:26 jnthn They already lost the ones to Copenhagen...
09:27 * moritz is really sorry that Germany didn't build a Transrapid
09:27 [ptc] iirc, I would arrive in Madrid at almost midnight, and had to leave again at 7am.  It would work, but finding a hotel where that would work could also be "interesting"
09:27 Averna joined #perl6
09:27 DrForr There's a similar discussion going on #yapceu about trains vs. buses, and diegok's advice seems to be the bus.
09:28 sabudana n00b question: Any list where I can find the backward compatilibility between perl5 and perl6 ?
09:28 * [ptc] only really needs a power outlet in the train and he's happy :-)
09:28 DrForr I'll be using the time to write the other talk :)
09:28 brrt joined #perl6
09:29 nwc10 The transrapid always makes me think of https://en.wikipedia.org/w​iki/Marge_vs._the_Monorail
09:29 jnthn sabudana: http://doc.perl6.org/language/5to6 is a decent starting point
09:29 nwc10 hyperloop seems more interesting. although, clearly, not yet proven
09:30 nwc10 personally, I'd prefer Munich to figure out how to connect their airport to the ICE network
09:30 DrForr That's Elon's notion of basically sucking you through a straw, no?
09:30 sabudana tx jnthn
09:30 moritz nwc10: well, technology for Transrapid was developed in Germany, so it would be a good idea to deploy it here too
09:30 nwc10 DrForr: yes., roughly
09:31 andreoss joined #perl6
09:31 * [ptc] was pleased to find out that the trip from Hannover -> Olten is only 6 hours w/ ICE and one change in CH
09:37 atroxaper joined #perl6
09:38 phoenix__ joined #perl6
09:42 amurf joined #perl6
09:42 tinyblak joined #perl6
09:43 atroxaper joined #perl6
09:43 RabidGravy 86 unique module authors in the modules list now
09:44 tinyblak_ joined #perl6
09:45 andreoss m: my $x = (^10).map: { $_ }.map: { $_ }; say $x;
09:45 camelia rakudo-moar 43e4bf: OUTPUT«Method 'count' not found for invocant of class 'List'␤  in block <unit> at /tmp/kxLbnNt4Vw:1␤␤»
09:46 Bruksnys joined #perl6
09:46 Bruksnys left #perl6
09:46 jnthn andreoss: That is not the precedence you are looking for...
09:47 jnthn m: my $x = (^10).map({ $_ }).map({ $_ }); say $x;
09:47 camelia rakudo-moar 43e4bf: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
09:48 andreoss can i put something after .method: .. ?
09:48 jnthn Can't think of anything
09:49 jnthn The ==> syntax may be the better way to go
09:49 jnthn m: my $x = ^10 ==> map { $_ } ==> map { $_ }; say $x;
09:49 camelia rakudo-moar 43e4bf: OUTPUT«0..^10␤»
09:49 ShimmerFairy jnthn: I recall seeing an old bug that claimed  .map: {...}.foo  should work like  .map({...}).foo  , let me find it back...
09:49 jnthn m: my $x = (^10 ==> map { $_ } ==> map { $_ }); say $x;
09:49 camelia rakudo-moar 43e4bf: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
09:50 jnthn ShimmerFairy: OK. I'm pretty sure it shouldn't...
09:50 ShimmerFairy I don't think it should either, fwiw
09:51 andreoss m: ^10 ==> map { $_ } ==> min ==> say
09:51 camelia rakudo-moar 43e4bf: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qSQ77e0_Cl␤Preceding context expects a term, but found infix ==> instead␤at /tmp/qSQ77e0_Cl:1␤------> 3^10 ==> map { $_ } ==> min ==>7⏏5 say␤»
09:51 jnthn STD has nothing special there: https://github.com/perl6/st​d/blob/master/STD.pm6#L3509
09:51 ShimmerFairy jnthn: here's the bug: https://rt.perl.org/Ticket/Display.html?id=67700
09:52 andreoss ==> seems nothing like chained method calls really
09:52 nine Ok, booked the flight to Granada despite having to leave at 8:55 on Saturday. Just couldn't find out when exactly busses go from Granada to Malaga airport.
09:52 DrForr I get to leave at 6:05am.
09:53 ShimmerFairy jnthn: And it's still in S12, surprisingly. But honestly I think  map: { ... }.foo.bar.etc  being equivalent to  map({ ... }).foo.bar.etc  would cause more trouble than it's worth, so I wouldn't be sad to see it leave S12 :)
09:54 jnthn ShimmerFairy: Yeah, agree S12 hints it should work but I can't find anything in STD that seems to be working towards that goal
09:54 ShimmerFairy S12:538  , for more explicit reference
09:54 synbot6 Link: http://design.perl6.org/S12.html#line_538
09:55 jnthn And I can't think of a good way to make it work out either, off hand.
09:55 ShimmerFairy jnthn: my understanding was always that .meth: ended your ability to call more methods, which makes way more sense than a special exception for block arguments.
09:55 jnthn Sure. Well, guess we'll have to delegate to TimToady++ to get the latest thinkin' :)
09:57 jnthn Well, or defer to... :)
09:58 ShimmerFairy jnthn: also note "unless the closure's right curly is followed immediately by comma or colon.", so there's an exception to the exception O_o
09:58 jnthn o.O
09:58 jnthn Yes, I think I want this bit of the design to go away in favor of what Rakudo and STD implement also :)
09:59 espadrine_ joined #perl6
10:00 ShimmerFairy so the arg in  .map: 42  isn't considered the final argument, but the arg in  .map: {...}  is considered final, but the arg in  .map: {...},  (or {...}:) isn't considered final. This somehow reminds me of leap years :P
10:01 ShimmerFairy (_but_ the arg in  .map: {...} ,  _is_ considered final, if I understand "immediately" correctly o_O)
10:04 bjz joined #perl6
10:24 Ven joined #perl6
10:43 JimmyZ_ joined #perl6
10:54 atroxaper joined #perl6
10:55 atroxape_ joined #perl6
11:05 timotimo i need a bit of halp with the ecosystem
11:06 timotimo https://github.com/perl6/modules.perl6.org/blo​b/master/web/lib/P6Project/Hosts/Github.pm#L97 - for Uggedit, this line doesn't work right. it apparently ought to trigger the "return 0", instead it explodes on the following line saying Not an ARRAY reference at lib/P6Project/Hosts/Github.pm line 98.
11:10 nine Hotel Abba Granada seems to be booked out already
11:10 nwc10 jnthn: in bloggage, you could link the RT tickets to RT. But that's work.
11:10 nwc10 jnthn++ # bloggage, and the causes of bloggage
11:10 jnthn nine: I booked at Hotel Granada Center
11:11 jnthn nwc10: I considered that but yeah, it's more work than I wish to do
11:11 jnthn nwc10: And it's not exactly hard to plug a ticket number into RT for those curious enough
11:11 jnthn nwc10: But most folks aren't.
11:14 nine jnthn: oh Granada Center looks very nice indeed. Request sent, waiting for reply...
11:15 timotimo this issue is keeping modules.perl6.org from updating, fwiw
11:16 Psyche^_ joined #perl6
11:17 jnthn nine: You mentioned YAPC CONFERENCE to get disconut too? :)
11:17 jnthn DISCO NUT!!
11:17 nine jnthn: I did :)
11:17 jnthn *discount :)
11:17 FROGGS disco nut :P
11:17 nine I definitely want to try those disco nuts ;)
11:18 nine timotimo: would be interesting to see what's in $commits
11:18 timotimo nine: i agree. i'm not perl5 enough to build this thing locally ...
11:21 timotimo since perl -e 'use Data::Dumper' doesn't die, i can probably "dd $commits"?
11:22 nine timotimo: a simple warn $commits; might be a good first step
11:22 timotimo mhm
11:22 nine timotimo: btw. running it here right now
11:23 timotimo great, thanks
11:23 abraxxa joined #perl6
11:23 azawawi joined #perl6
11:23 azawawi hi
11:24 nine We have too many modules, this is taking quite a while :)
11:24 timotimo this is perl5, i heard it has a great, stable parallelization feature called ithreads
11:25 moritz timotimo: muhaha
11:25 moritz I'd rather use Parallel::ForkManager or Parallel::Iterator
11:25 nine Oh, this can simply be fixed by adding another commit to Uggedit ;)
11:26 nine Instead of an arrayref containing hashrefs for commits, we get a single hashref, because there's only one commit :)
11:26 moritz eeks
11:26 timotimo ... derp
11:26 moritz impressively bad API design
11:27 timotimo why doesn't the hashref behave like a list of one element? :P
11:27 moritz because this is Perl 5
11:28 nine Because this is where the idea of items behaving like a list of one element comes from
11:28 azawawi moritz: or https://metacpan.org/pod/AnyEvent::Util fork_call()
11:29 Ulti something like this for Perl 6 would be nice https://comealive.io
11:29 timotimo camelialive.io
11:31 azawawi timotimo: it seems interesting until it executes a db delete which was supposed to be in a transaction... :)
11:31 timotimo "it"?
11:31 azawawi timotimo: live coding + database = bad
11:32 jnthn Coding agaisnt live production environment = bad :P
11:32 telex joined #perl6
11:33 timotimo ah
11:33 timotimo that thing runs your code by using your test suite
11:33 Ulti if you mean the comealive thing it does everything via your tests
11:34 nine Back in the olden days we only coded directly on the server during work hours with no backups. When you first have to send a thousand users an email that you accidentally overwrote their password, you learn fast to be more careful...
11:34 dalek modules.perl6.org: dcd11a7 | (Stefan Seifert)++ | web/lib/P6Project/Hosts/Github.pm:
11:34 dalek modules.perl6.org: Fix build-project-list.pl dieing on repositories with a single commit
11:34 dalek modules.perl6.org:
11:34 dalek modules.perl6.org: Instead of an arrayref containing hashrefs for commits, we get a single
11:34 dalek modules.perl6.org: hashref, because there's only one commit :)
11:34 dalek modules.perl6.org: review: https://github.com/perl6/modul​es.perl6.org/commit/dcd11a70d0
11:34 timotimo %)
11:37 darutoko- joined #perl6
11:39 tinyblak joined #perl6
11:41 timotimo thank you, nine
11:41 tinyblak_ joined #perl6
11:41 nine My pleasure
11:46 dalek perl6-examples: a9697fc | (Quinn Perfetto)++ | / (2 files):
11:46 dalek perl6-examples: solved problem 34 for euelr
11:46 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/a9697fc990
11:46 dalek perl6-examples: 14f4dd9 | azawawi++ | / (2 files):
11:46 dalek perl6-examples: Merge pull request #26 from Quinny/master
11:46 dalek perl6-examples:
11:46 dalek perl6-examples: solved problem 34 for euler
11:46 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/14f4dd9bac
11:50 kaare_ joined #perl6
11:53 coffee`_ joined #perl6
11:56 espadrine joined #perl6
11:58 Averna joined #perl6
12:07 timotimo 1) rule ws { ... }
12:07 timotimo 2) profit!
12:10 moritz token ws { } please :-)
12:21 gfldex joined #perl6
12:32 konsolebox joined #perl6
12:41 lucasb joined #perl6
12:48 dalek rakudo-star-daily: 6e874a8 | coke++ | log/ (9 files):
12:48 dalek rakudo-star-daily: today (automated commit)
12:48 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/6e874a8fe2
12:48 dalek perl6-roast-data: 917748d | coke++ | / (9 files):
12:48 dalek perl6-roast-data: today (automated commit)
12:48 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/917748d5b2
12:49 FROGGS jnthn++
12:49 FROGGS (blog and the work behind it)
12:49 masak for posterity: https://6guts.wordpress.com/2015/07​/23/this-week-concurrency-stuff-mul​ti-dimensional-stuff-stuff-stuff/
12:50 masak jnthn++
12:50 * [Coke] yawns
12:51 tinyblak joined #perl6
12:51 espadrine_ joined #perl6
12:52 lucasb so... will there be a release today?
12:52 timotimo oh, it's release day?
12:52 [Coke] no one is scheduled for today, and we didn't notice!
12:57 * masak checks the release guide
12:57 * FROGGS hides
12:59 masak ok, I volunteer as a fallback, but I would prefer it if someone else did it ;)
13:03 scoobydoo joined #perl6
13:05 masak was gonna comment on https://rt.perl.org/Ticket/Display.html?id=125658 being based on a misunderstanding -- but happy to note FROGGS++ and moritz++ already did :)
13:05 masak ShimmerFairy++ # making .grep care about arity
13:06 ShimmerFairy masak: I should probably go for the other related Callable-using features at some point, but at least the most common method is taken care of :)
13:08 masak m: .say for (1, 2, 4, 3, 5, 6).grep({ $^a < $^b })
13:08 camelia rakudo-moar 43e4bf: OUTPUT«1␤2␤5␤6␤»
13:08 moritz the changelog says
13:08 moritz Deprecations:
13:08 moritz pipe() in favour of shell() or run() with :in, :out or :err
13:09 moritz ah, misread
13:09 masak :)
13:09 masak moritz: fwiw, me too on first reading. but it's correct.
13:09 masak though dunno why it's "favour" in a project where we generally don't do Commonwealth spellings.
13:10 atroxaper joined #perl6
13:10 * masak .oO( it's "Rakudo", not "Rakudou" ) :P
13:10 arnsholtAtHome joined #perl6
13:10 nwc10 nor is it Rakudeau :-)
13:10 arnsholtAtHome arnsholt: *prodprodprod*
13:10 timotimo Coummounwealth
13:10 telex joined #perl6
13:11 nwc10 or, I guess, because we have multiple backends, Rakudaux
13:12 masak nwc10: "Rakudeaux"
13:13 FROGGS would be nice to have a localized version of Perl 6 called Rakudeaux :o)
13:13 FROGGS (and of course then one called RACKUDO!!!)
13:14 masak what language is that, Shoutese?
13:15 moritz bless you.
13:21 bjz joined #perl6
13:28 brrt joined #perl6
13:29 * cdc veut un racadeau pour Noël
13:30 nwc10 cdc++
13:30 masak I'm slightly shocked that my brain knows what to do with French.
13:30 jnthn .oO( Noel Gallagher or Noel Edmonds? )
13:30 arnsholt joined #perl6
13:30 [Coke] THIS. IS. RACKUDO!
13:31 masak jnthn: you missed the pun "cadeau" is "present". :D
13:31 * moritz also knows what do with French: flush it out of the pipeline before it takes up too many parsing tuits
13:32 masak jnthn: (and "Noël" is "Christmas", just like in English)
13:32 RabidGravy joined #perl6
13:32 jnthn masak: oh wow... :P
13:32 jnthn masak: Yes, I got that bit :)
13:32 RabidGravy hello darlings
13:32 timotimo hello my tarling
13:32 nwc10 gosh. That implies that I'm not as slack as I though I was. The only word I didn't get for sure was "veut", and I'm pretty sure it's some part of an irregular verb.
13:32 masak translated into junctions, "I want an any(rakudo, present) for Christmas" :D
13:33 masak nwc10: vouloir, "to want"
13:33 nwc10 aha yes. as in https://www.youtube.com/watch?v=za05HBtGsgU
13:33 arnsholt nwc10: It's vouloir (to want), which goes je veux, tu veux, il veut, nous voulons, vous voulez, ils veulent (obviously =)
13:33 nwc10 (not a rickroll)
13:33 masak "veut" would be 3rd person singular present indicative :)
13:34 masak ah, arnsholt++ beat me to it, with the whole set ;)
13:34 masak realizing that French is a hipster version of Latin actually explains a lot
13:34 nwc10 *this* is a rickroll: https://www.youtube.com/watch?v=dQw4w9WgXcQ
13:35 masak now why did I click that
13:35 arnsholt And it is actually a rickroll?
13:35 masak yes :/
13:35 arnsholt I was still mulling over whether to click or not ^_^
13:35 jnthn masak: You look let down...
13:35 nwc10 arnsholt: I'm not sure. It's certainly a link to the official Youtube video
13:35 masak nwc10: in revenge: this is a Swiss roll: https://www.youtube.com/watch?v=TZ2WGiabU5Q
13:35 nwc10 but as it wasn't disguised as something else, maybe it's not.
13:36 masak s/revenge/retaliation/
13:37 dalek roast: 26eabc4 | skids++ | S06-currying/named.t:
13:37 dalek roast: Unfudge now-passing test on JVM
13:37 dalek roast: review: https://github.com/perl6/roast/commit/26eabc4cb4
13:43 skids joined #perl6
13:46 masak I would like to highlight this blog post http://blog.getify.com/not-all-semicolons/ -- even though it's about JS.
13:47 masak especially the list, about halfway through the post, giving examples of "clever, no clear".
13:48 masak I find I agree with most of them, but some of them I think I've been influenced a lot by "Perl esthetic" and think are OK.
13:48 masak though when I think about it, I suspect people are all over the board in what they think is fine.
13:48 PerlJam masak: which ones are ok with you?
13:49 masak the `str = num + ""` one and the `foo & foo()` one.
13:50 PerlJam interesting.   I'm only ok with the foo && foo() one
13:51 masak yeah, I might re-evaluate my use of `str = num + ""`, actually. `num.toString()` *is* a lot clearer.
13:51 PerlJam The string thing is something that bothered me about P5, and I'm thankful has a better way in P6
13:53 masak I find variable interpolation soaks up a lot of those cases for me.
13:53 masak I don't really use infix:<~> a lot.
13:54 PerlJam I suppose it only really comes up when you're marshalling data.
13:55 PerlJam "Why is the JSON thingy converting my string "005" to the number 5?   Oh, Perl thinks it's a number"
13:56 brrt hah, doing ~str.indexOf(searchStr) to check for -1
13:57 brrt i salute that
14:01 khw joined #perl6
14:07 Possum joined #perl6
14:08 masak brrt: I looked at that one in disbelief. how is that better than `> -1` ?
14:08 masak brrt: it's still checking for -1, just with a more obscure symbol.
14:08 brrt it... works
14:08 brrt yeah
14:09 brrt i dunno
14:09 brrt the author prefers it
14:09 masak I agree that it's clever. doesn't make me eager to use it :>
14:09 masak maybe that was part of his point.
14:10 masak I do like the switch/object refactor following that. especially since the object can be further refactored into a variable or something.
14:12 ShimmerFairy His assertion is that things like >= 0 or == -1 are "leaking underlying implementation behavior". 1) That's laughable, and 2) A numeric prefix operator suuuure hides the implementation detail.
14:12 ShimmerFairy (source: https://github.com/getify/You-Dont-Kn​ow-JS/blob/master/types%20&amp;%20gra​mmar/ch4.md#the-curious-case-of-the- )
14:15 masak ShimmerFairy: I think I fully agree. to me, the `~` adds another layer of painful explanation, rather than remove it.
14:16 masak I find myself agreeing with getify on most things. or at least seeing where he's coming from. not so in this case.
14:16 ShimmerFairy masak: it reads to me like someone taking the idea of abstraction to hilariously extreme ends
14:17 masak I don't think it's right to call it a "leaky abstraction" when (a) it's part of the published API of .indexOf, and (b) string positions tend to be non-negative, so there's no confusion between -1 and an actual string position.
14:17 masak I agree that it's not *pretty*, and that I can think of prettier ways to do it.
14:18 masak but if I was after clarity, no way I'd use `~`
14:18 * FROGGS nods
14:18 araujo joined #perl6
14:18 araujo joined #perl6
14:19 tinyblak joined #perl6
14:23 brrt also, indexOf works this way in many, many languages
14:24 brrt also, why just write str.hasSubstring(searchStr)
14:24 brrt which returns boolean
14:24 brrt if you're so keen on abstraction
14:25 masak there's no such method in ES5, I think.
14:25 masak are you talking about duck-punching it in?
14:27 brrt why not
14:27 jnthn duck...punching? o.O
14:27 atroxaper joined #perl6
14:27 jnthn That's a perfectly understandable but totally horrible synonym for monkey patching :P
14:27 DrForr o/' Duck butter, duck butter, yum yum yum o/'
14:29 masak jnthn: I didn't make it up :) I think it's from the Ruby world
14:31 raiph joined #perl6
14:31 masak brrt: why not? for all the usual reasons why not.
14:32 brrt ok, i'm going to play devils advocate here
14:32 muraiki wow, even indexOf in scala returns -1 if it doesn't match
14:32 masak brrt: 19 times out of 20, I would go with the much safer and more conservative `hasSubstring(str, searchStr)`, which has the same effect but is less "sexy" because no dot.
14:32 muraiki I figured it'd return Option[Int]
14:32 brrt our fellow developer has already decided it's perfectly acceptable to write ~str.indexOf(foo) claiming (hilariously) that this 'doesn't leak implementation details'
14:33 brrt as if the choice of indexOf to *find* the thing wasn't an implementation detail
14:33 brrt why is monkeypatching / duckpunching worse than that?
14:33 brrt but yeah, that's what i'd do too
14:34 brrt we're boring programmers, we
14:34 brrt *us*
14:34 brrt conservative old hats :-P
14:34 masak brrt: basically because String.prototype is a global, and changing globals has an unpredictable global effect on present and future dependencies.
14:34 brrt oh, but that argument is 'because some other idiot may do it, i may not', a tragedy of the commons
14:35 ShimmerFairy The only true way to hide all implementation details is clearly  sub figure-it-out-compiler(*@a, *%h) { ... }
14:35 masak brrt: the short explanation (for those who already know the argument) is that it's "anti-social" to extend the built-in types.
14:35 brrt interestingly, we handle it in the same way, by shaming and morality
14:36 masak brrt: it's more a matter of scale. I want to build software with a high rate of success. anti-social patterns like overriding globals are inherently a threat to that high rate of success.
14:36 masak or, put differently, I really like the idea of composition working in all possible situations. that precludes things like monkey-patching.
14:37 brrt ok, i can agree with that; that'd be a bottom-up organisation argument
14:37 brrt or 'no global view'
14:37 masak yes.
14:38 brrt interesting
14:38 masak like, you're building a bridge, and there's this guy or gal who insists on using nonstandard screws.
14:38 masak but instead of *telling* you that, you just find out the hard way, when the bridge is ready to be used.
14:39 brrt yeah, i can see how that becomes annoying
14:39 masak also, it may not be one of your own people, because there are many subcontractors along the way.
14:39 brrt what if the other person insists that using nonstandard screws is part of his creative expression
14:39 ShimmerFairy masak: this talk of monkey_patching reminds me; how would you feel about an unkebab branch on rakudo? :P
14:40 brrt unkebab?
14:40 masak ShimmerFairy: I can't be bothered, to be honest. :/
14:40 arnsholt remove_kebab? =)
14:40 ShimmerFairy masak: well, I'm not asking you to do it, it's just something I've thought about doing myself :)
14:40 masak ShimmerFairy: I think it'd be a hollow moral victory and a hornet's nest of opinions/discussion.
14:40 jnthn And a huge waste of time when we've better things to do.
14:41 masak ShimmerFairy: from what I gauge, the community seems about 50/50 split on whether kebab-case is right for upper-case things.
14:41 brrt what is kebab-case
14:41 brrt i'll google it
14:41 masak m: say $*PROGRAM-NAME # brrt: that
14:41 camelia rakudo-moar 43e4bf: OUTPUT«/tmp/NCUi3sNpbH␤»
14:41 masak m: say $*PROGRAM_NAME
14:41 camelia rakudo-moar 43e4bf: OUTPUT«/tmp/qiou8Xurnb␤Saw 1 occurrence of deprecated code.␤============================​==================================​==================␤$*PROGRAM_NAME seen at:␤  /tmp/qiou8Xurnb, line 1␤Deprecated since v2015.6, will be removed with release v2015.9…»
14:41 brrt ahaaaah
14:42 ShimmerFairy masak: I guess I'm just annoyed/frustrated that I wasn't around when this was being discussed, because I would've vehemently opposed it (and ~maybe~ been able to stop it, who knows)
14:42 masak ShimmerFairy: I dunno. I opposed it; didn't help.
14:43 masak ShimmerFairy: I don't really want to discuss it more -- sorry.
14:43 masak it is what it is.
14:43 masak I imagine I'll even get used to it. there was a time when `Object` changed name to `Mu`, and I was very much against that.
14:44 ShimmerFairy I ran into $*PROGRAM_NAME in my synopsis generator the other day, and it got me bothered again. Such a useless change for the fact that it causes deprecations.
14:44 masak but now I don't think about it.
14:44 masak ShimmerFairy: yes, agree. but there are two different ways to be consistent here. that's all.
14:44 ShimmerFairy masak: I'll be reminded of it every time I have to awkwardly let go of the shift key for PROGRAM-NAME for no reason at all, I don't think I'll get used to it much :)
14:45 domidumont joined #perl6
14:45 masak "hyphens everywhere" vs "_ for upper-case, - for lower-case"
14:45 PerlJam ShimmerFairy: you should have used the cap-lock key  ;)
14:45 danaj joined #perl6
14:46 ShimmerFairy masak: I'm almost tempted to say "let $*PROGRAM-NAME and $*PROGRAM_NAME both work", but I imagine that's something not a lot of people will like :)
14:46 masak no, please not that.
14:46 ShimmerFairy PerlJam: What's a Caps Lock? :P
14:46 konsolebox joined #perl6
14:47 masak ShimmerFairy: it's an ancient key used by people who haven't changed the bindings on their keyboard.
14:47 jnthn ShimmerFairy: Something the 99% of us who didn't screw with our keyboard mapping have available to us.
14:47 masak ShimmerFairy: I think it made sense for typewriters, when ALL CAPS was basically the only way to do emphasis.
14:47 ShimmerFairy I've not remapped, but I have never in my life needed it, so it just sits there uselessly :)
14:48 jnthn ShimmerFairy: Guess what? Now you have a use for it! ;)
14:48 masak ShimmerFairy: nowadays its chief function seems to be to confuse people when they enter their password.
14:48 brrt the key that breaks password input blocks
14:48 brrt :-P
14:49 ShimmerFairy I'd just love to write a module that undoes this change, because it's so pointless that it infuriates me. There are only disadvantages to having made this kind of (deprecating!) change.
14:49 masak ShimmerFairy: I'm all for a slang that reverses it. I'd be a user, I think.
14:50 ShimmerFairy Too bad I have no clue how slangs work :/ (the spec is still pretty much silent on them, right?)
14:50 masak ShimmerFairy: there are some nice examples out there. Slang::Tuxic and Slang::Piersing
14:50 ShimmerFairy Would be nice it wasn't just "check existing code", though :)
14:51 konsolebox joined #perl6
14:54 ShimmerFairy I know it's ultimately just bikeshedding, but I'm seriously still confounded that uppercase kebab-casing ever happened. I still don't believe it, in a sense.
14:55 b2gills m: sub postfix:<!> (UInt() $n) { [*] 2..$n }; sub postfix:<!@> (UInt() $n) { gather for $n.comb { take $_! }}; sub postfix:<!+> (UInt() $n) { [+] EVAL "$n!@" };  say 145!+
14:55 camelia rakudo-moar 43e4bf: OUTPUT«145␤»
14:55 b2gills m: sub postfix:<!> (UInt() $n) { [*] 2..$n }; sub postfix:<!@> (UInt() $n) { gather for $n.comb { take $_! }}; sub postfix:<!+> (UInt() $n) { [+] $n!@ };  say 145!+
14:55 camelia rakudo-moar 43e4bf: OUTPUT«5===SORRY!5=== Error while compiling /tmp/cFA6NkMHNo␤Cannot use this form of method call with a private method␤at /tmp/cFA6NkMHNo:1␤------> 3 sub postfix:<!+> (UInt() $n) { [+] $n!@7⏏5 };  say 145!+␤    expecting any of:␤        method …»
14:56 hoelzro o/ #perl6
14:57 b2gills It seems you can't create a postfix operator named !@ that can be used on a variable
15:00 jnthn std: sub postfix:<!> (UInt() $n) { [*] 2..$n }; sub postfix:<!@> (UInt() $n) { gather for $n.comb { take $_! }}; sub postfix:<!+> (UInt() $n) { [+] $n!@ };  say 145!+ # curious
15:00 camelia std 28329a7: OUTPUT«ok 00:01 163m␤»
15:01 jnthn b2gills: Might want to take a look if our private method call parsing differs from STD in some way
15:01 jnthn $a!@foo is valid syntax, but not valid semantics...
15:02 jnthn And somehow that rule seems to be winning even with an empty variable name
15:03 hoelzro I'm late to the party, but DISCO NUT
15:03 araujo joined #perl6
15:09 b2gills .oO( Mr. Peanut instead of John Travolta in Saturday Night Fever )
15:12 b2gills I wounder if it would make sense for there to be a `ifdef $str.index('foo') -> $index { ... }`
15:13 smls joined #perl6
15:13 smls m: say "abc" ~~ /<myalias=.ident>/
15:13 camelia rakudo-moar 43e4bf: OUTPUT«「abc」␤ myalias => 「abc」␤»
15:13 smls m: say "abc" ~~ /<myalias = .ident>/
15:13 camelia rakudo-moar 43e4bf: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter = (must be quoted to match literally)␤at /tmp/YIZEdpf5Tg:1␤------> 3say "abc" ~~ /<myalias7⏏5 = .ident>/␤Unrecognized regex metacharacter   (must be quoted to match literally)␤at /tmp/YIZE…»
15:13 smls ^^ any chan ce whitespace could be allowed there>?
15:14 smls so if you have multiple   <foo = .bar>  lines in a grammar token, you can line them up nicely.
15:14 jnthn It'd be conflict-y with the <foo bar> form.
15:14 smls but = doesn't mean anythin in "grammar term" position, does it?
15:15 Ven joined #perl6
15:16 b2gills m: say "abc" ~~ /$<myalias> = <.ident>/
15:16 camelia rakudo-moar 43e4bf: OUTPUT«「abc」␤ myalias => 「abc」␤»
15:17 smls I guess that works.
15:18 jnthn smls: No, which is why I said conflict-y :)
15:18 smls :P
15:18 jnthn smls: I think we might be able to disambiguate...whether we should otoh...I don't have a good feel for it.
15:20 raiph joined #perl6
15:22 atroxaper joined #perl6
15:24 FROGGS joined #perl6
15:25 ugexe what is a concise way to iterate multiple, flat, lists to find the first index they differ? anything better than a loop that takes 1 item from each list every iteration?
15:31 jnthn m: my @lists = [1,2,3], [1,2,4]; my $i = 0; $i++ while [==] @lists[*;$i]; say $i
15:31 camelia rakudo-moar 43e4bf: OUTPUT«2␤»
15:31 jnthn m: my @lists = [1,2,3], [1,2,4], [1,3,4]; my $i = 0; $i++ while [==] @lists[*;$i]; say $i
15:31 camelia rakudo-moar 43e4bf: OUTPUT«1␤»
15:31 njmurphy joined #perl6
15:31 Skarsnik joined #perl6
15:32 ugexe perfect. thanks, thats a neat one
15:32 llfourn that's cool!
15:33 cognominal joined #perl6
15:34 Skarsnik Hi there. I had an issue trying to install rakudo (using rakudobrew as instructed on the website) some tests does not work and made the install of Task::Star fail http://pastebin.com/XiQ79si0 I tried installing psql but that does not seem to change anything x)
15:34 telex joined #perl6
15:34 smls m: my @lists = [1,2,3], [1,2,3]; my $i = 0; $i++ while [==] @lists[*;$i]; say $i
15:35 smls needs a break condition though ^^ jnth, ugexe
15:35 camelia rakudo-moar 43e4bf: OUTPUT«(timeout)Use of uninitialized value of type Any in numeric context  in block <unit> at /tmp/UsdpxQO1SJ:1␤Use of uninitialized value of type Any in numeric context  in block <unit> at /tmp/UsdpxQO1SJ:1␤Use of uninitialized value of type Any in numeric c…»
15:35 PerlJam Skarsnik: Were you really hoping to use pg with Perl 6?
15:35 virtualsue joined #perl6
15:35 jnthn smls: haha, yes :)
15:36 * jnthn is doing too many other things at the same time
15:36 smls m: my @lists = [1,2,3], [1,2,4], [1,3,4]; say first { not [==] @lists[*; $_] }, @lists[0].keys
15:36 camelia rakudo-moar 43e4bf: OUTPUT«1␤»
15:36 Skarsnik PerlJam: maybe, I am not sure, I need to put thing in a db x)
15:36 smls ^^ more functional version
15:36 jnthn m: my @lists = [1,2,3], [1,2,4], [1,3,4]; say (^@lists[0]).first-index({ [==] @lists[*;++state $] })
15:36 camelia rakudo-moar 43e4bf: OUTPUT«5===SORRY!5=== Error while compiling /tmp/DF5um1rDzJ␤Unsupported use of $] variable; in Perl 6 please use $*PERL.version or $*PERL.compiler.version␤at /tmp/DF5um1rDzJ:1␤------> 3).first-index({ [==] @lists[*;++state $]7⏏5 })␤»
15:36 jnthn m: my @lists = [1,2,3], [1,2,4], [1,3,4]; say (^@lists[0]).first-index({ [==] @lists[*;++state $ ] })
15:36 camelia rakudo-moar 43e4bf: OUTPUT«Use of uninitialized value of type Any in numeric context  in block  at /tmp/kosRi3Wb5b:1␤Use of uninitialized value of type Any in numeric context  in block  at /tmp/kosRi3Wb5b:1␤Use of uninitialized value of type Any in numeric context  in block  at …»
15:37 jnthn m: my @lists = [1,2,3], [1,2,4], [1,3,4]; say (^@lists[0]).first-index({ [==] @lists[*;++state $ = 0] })
15:37 camelia rakudo-moar 43e4bf: OUTPUT«Use of uninitialized value of type Any in numeric context  in block  at /tmp/yjNEIkp9kE:1␤Use of uninitialized value of type Any in numeric context  in block  at /tmp/yjNEIkp9kE:1␤Use of uninitialized value of type Any in numeric context  in block  at …»
15:37 jnthn Hm, something like...or what smls++ said :)
15:38 ugexe nice catch smls++
15:45 llfourn the
15:46 llfourn Skarsnik: I just panda install Task::Star no problems :S (excuse the 'the')
15:47 llfourn Skarsnik: Many of the same errors related to db connection and sqlite lib but it worked in the end
15:47 aljohri joined #perl6
15:48 smls m: my @lists = [1,2,3], [1,2,4]; dd @lists».elems; dd +«@lists
15:48 camelia rakudo-moar 43e4bf: OUTPUT«(3, 3)␤([1, 2, 3], [1, 2, 4])␤»
15:48 smls ^^ why are these not the same?
15:48 Skarsnik Yes I get these test could fail and it's ok. where I can find the files to check what the test look like? x)
15:49 PerlJam Skarsnik: I get the same failed test as you.
15:49 jnthn smls: .elems is nodal, .Numeric is not, iirc
15:49 PerlJam Skarsnik: you can do "panda look DBIish" and it'll download DBIish, unpack it, and drop you in the directory where it was unpack.
15:50 smls jnthn: nodal?
15:50 Skarsnik PerlJam: that's neat x)
15:50 RabidGravy Skarsnik, alternatively https://github.com/perl6/DBIish
15:51 [Tux] joined #perl6
15:52 Skarsnik hum the test is is pg-replace-placeholder(q['a\.b''cd?', "\"?", ?]),                           q['a\.b''cd?', "\"?", $1],                         'backslash escapes and doubled single quote';
15:52 Skarsnik probably an issue in the pg module
15:53 llfourn it's quite odd that it worked for me?
15:54 llfourn actually no it didn't... It's just that my panda didn't seem to care and installed it anyway..
15:55 Skarsnik The system is a debian jessie if that help in any ways...
15:56 llfourn Skarsnik: You could always --notests install
15:57 smls m: my @lists = [1,2,3], [1,2,3,4]; say first { not all(@lists[*; $_]:exists) && [==] @lists[*; $_] }, 0..*
15:57 camelia rakudo-moar 43e4bf: OUTPUT«3␤»
15:57 smls ugexe: ^^ more generic version
16:06 Skarsnik llfourn: ok thx, I force dbish install with notests, I did not get errors for the rest :)
16:07 llfourn Skarsnik: Np :)
16:08 PerlJam Skarsnik: looks like something weird with grammars actually.   It's not parsing the string properly.
16:09 PerlJam If I add { say "hi" } in the single_quote rule, it parses just fine.
16:09 AlexDaniel joined #perl6
16:09 arnsholt Code interpolations terminate LTM; maybe that has something to do with it?
16:09 PerlJam yep, that would be my guess as well
16:10 flussence https://github.com/jnthn/g​rammar-debugger/issues/13 it sounds like this bug
16:11 Skarsnik I can't really help you of this. I just wanted to try perl6 and I still had to learn more about the language. good luck bug hunting :)
16:12 PerlJam flussence: maybe.
16:12 brrt joined #perl6
16:15 PerlJam well, no.  It has nothing to do with Grammar::Tracer AFAICT
16:17 ugexe hmm works for numbers only
16:18 ugexe [eq] works, but hopefully im not overlooking something
16:18 hoelzro has anyone else been seeing intermittent panda t/tester.t errors lately?
16:19 smls ugexe: [eqv] ?
16:23 yqt joined #perl6
16:25 * [Coke] returns from a most excellent PT session.
16:26 PerlJam PT == physical training?
16:26 spider-mario joined #perl6
16:36 spider-mario joined #perl6
16:38 mr-foobar joined #perl6
16:40 isBEKaml joined #perl6
16:41 TimToady therapy, usually
16:42 MilkmanDan If you're military it absolutely does not mean therapy. :)
16:42 MilkmanDan In therapy there's usually not someone yelling insults at you. :)
16:42 TimToady especially if you put 109 after it :)
16:45 [Coke] I have done the other PT sessions, but not in a loooong time, and those were not excellent. :)
16:46 isBEKaml [Coke]: Looks like you were searching for one perfect PT session like searching for a soulmate :-)
16:59 SmokeMachine joined #perl6
17:10 rangerprice joined #perl6
17:17 DrForr m: say "\x1L"
17:18 DrForr Looks like that behavior's changed recently.
17:19 * DrForr rebuilds as he's got a fairly stale copy on the laptop. A whole 2 weeks out of date :)
17:21 DrForr m: say "\x"
17:21 camelia rakudo-moar 43e4bf: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ZAbOYWEdxn␤Unrecognized backslash sequence: '\x'␤at /tmp/ZAbOYWEdxn:1␤------> 3say "\7⏏5x"␤    expecting any of:␤        argument list␤        double quotes␤        term␤»
17:26 raiph joined #perl6
17:31 TimToady std: say "\x"
17:31 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Unrecognized backslash sequence: '\x' at /tmp/S9Z2Q0sXkI line 1:␤------> 3say "\x7⏏5"␤Check failed␤FAILED 00:00 135m␤»
17:32 TimToady std successfully invalidates the highexpect list, while rakudo doesn't
17:32 TimToady so a buglet
17:33 DrForr Nod. I'm picking nits at this point.
17:34 TimToady someone's gotta pick 'em :)
17:37 lizmat joined #perl6
17:42 TimToady btw, if we tighten the precedence of ~~ to structural, we can no longer say $a ~~ 1..9 because .. is structural
17:42 smls How can I say "ignore everything after here" in a grammar?
17:42 TimToady well, .*: or so will slurp everything that's left
17:43 smls add  )> .*  at the end of token TOP I suppose?
17:43 smls TimToady: Is there a more efficient way though?
17:43 smls e.g. for parsing the (small) header of a (potentially large) file
17:44 TimToady add the colon to tell it not to worry about backtracking should make it theoretically faster
17:44 TimToady as in, optimizable to setting the current position to the length of the string
17:44 smls what colon is that?
17:44 TimToady the one I put there after the .*
17:45 smls ah
17:45 TimToady or you can call .subparse and it won't care if you got to $
17:46 smls will I have to add a  ^  at the start?
17:46 smls or is only the end open for subparse?
17:47 TimToady neither parse nor subparse actually care about ^ afaik
17:47 TimToady they just start there by default
17:48 TimToady at least, subparse does, I could be wrong about Parse
17:49 smls btw why is it   MyGrammar.parse("foo")   and not   "foo".parse(MyGrammar)
17:49 smls the former feels somehow wrong :P
17:49 smls the latter would be consistent with .match
17:50 TimToady a parser parses
17:51 smls yeah, but usuall in  $invocant.verb  the $invocant is read as the object, not the subject.
17:51 TimToady in ergative languages like Basque, sure :)
17:52 smls e.g   $string.split = "<something> splits a string", not "a string splits <something>"
17:52 TimToady it's a message to the string to split itself
17:53 smls then "foo".parse would be a message to the string to parse itself :P
17:53 b2gills .oO( `"foo".parse-with(MyGrammar)` ? )
17:53 TimToady strings don't know how to parse themselves
17:53 smls why not
17:53 smls they know how to .match themselves too
17:53 smls Maybe at least call it  MyGrammar.parse-string("foo")  to make it clear what the object is? And to have symmetry with .parse-file?
17:54 TimToady the grammar is the active agent there, so I really just don't see your point at all
17:55 TimToady in English, the parser parses the text
17:55 smls what is the active agent in .match($regex) and .split($regex) then?
17:56 smls imo parse/match/split/comb are all similar in what they do and what they do it on, so it feels strange to me that *one* of them has its API reversed compared to the others.
18:05 smls especially since switching from .match to .parse is not an unusual upgrade path.
18:32 lizmat joined #perl6
18:32 lizmat good *, #perl6 from OSCON again
18:33 masak m: grammar G { regex TOP { foo } }; say "foo" ~~ G
18:33 camelia rakudo-moar 43e4bf: OUTPUT«False␤»
18:33 nwc10 good *, lizmat
18:33 nwc10 having the appropriate amount of fun?
18:33 masak TimToady: maybe this ^ should work?
18:33 RabidGravy rarr!
18:33 lizmat just been to TheDamian's talk: http://www.oscon.com/open-source-​2015/public/schedule/detail/40632
18:33 masak lizmat: how was it?
18:34 lizmat "Don't change languages. Change your language."
18:34 lizmat it was interesting
18:34 masak :D
18:34 lizmat he is well underway implementing Perl 6 in Perl5   :-)
18:34 masak heh. isn't he always? ;)
18:34 lizmat yeah, but there's now modules
18:35 lizmat https://metacpan.org/pod/Dios
18:35 lizmat https://metacpan.org/release/Keyword-Declare
18:35 masak wow.
18:37 nwc10 lizmat: have you got to play with obra's keyboard yet?
18:37 lizmat nwc10: yes
18:37 lizmat it's woody and shiny  :-)
18:37 lizmat but not my thing  :-(
18:38 lizmat TheDamian was showing how you could have Perl 6 class declaration syntax in P5
18:38 lizmat oddly enough, he used ! to indicate a required attribute
18:38 lizmat m: class A { has $.a! }
18:38 camelia rakudo-moar 43e4bf: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9wXf7s8b8y␤Negation metaoperator not followed by valid infix␤at /tmp/9wXf7s8b8y:1␤------> 3class A { has $.a!7⏏5 }␤    expecting any of:␤        constraint␤        infix␤        infix stoppe…»
18:39 lizmat std: class A { has $.a! }
18:39 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Negation metaoperator not followed by valid infix at /tmp/0rqygF5QdG line 1:␤------> 3class A { has $.a!7⏏5 }␤    expecting infix or meta-infix␤Parse failed␤FAILED 00:00 139m␤»
18:39 masak wow, Dios looks amazing.
18:39 lizmat m: class A { has $.a is required }  # P6 equivalent
18:39 camelia rakudo-moar 43e4bf: ( no output )
18:40 lizmat so, is there a reason not to have ! indicate a required attribute ?
18:40 lizmat (especially now that we can defer it easily to a "is required" trait)
18:43 lizmat std: class A { has $.a! = 42 }
18:43 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Negation metaoperator not followed by valid infix at /tmp/DjjocgbS26 line 1:␤------> 3class A { has $.a!7⏏5 = 42 }␤    expecting infix or meta-infix␤Parse failed␤FAILED 00:00 139m␤»
18:43 RabidGravy is there an example in ecosystem of something that wraps a C++ library to a C interface?
18:44 * lizmat goes back to the booth, will backlog later
18:45 moritz has anybody volunteered for the release yet?
18:45 * timotimo has no clue what "inside out" refers to
18:46 timotimo in Dios
18:46 DrForr Old way to isolate objects so you can't see inside.
18:47 timotimo how do we do that in perl6? we can't! damn it :(
18:48 moritz sure you can do inside-out objects in p6
18:48 smls timotimo: http://perldoc.perl.org/perl​obj.html#Inside-Out-objects
18:48 DrForr It was done with hashes originally, so sure you can.
18:48 DrForr They're just not "objects" in the sense you're thinking of.
18:48 DrForr "It's life, Jim, but not as we know it."
18:48 bin_005 joined #perl6
18:49 brrt joined #perl6
18:49 RabidGravy I'm a surgeon not a bricklayer
18:50 timotimo oh, huh
18:51 smls Inside-out objects is probably not something you want when working with real threads though :P
18:52 RabidGravy never bothered with them, got well into blessing closures over the actual data around the turn of the century
18:57 [Coke] .tell lizmat +1 from me on ! to indicate "is required"
18:57 yoleaux [Coke]: I'll pass your message to lizmat.
18:58 smls What's the current syntax for that?
19:00 [Coke] smls: to me?
19:00 smls yeah
19:00 [Coke] m: class A { has $.x is required } ; A.new(); say "alive";
19:00 camelia rakudo-moar 43e4bf: OUTPUT«The attribute '$!x' is required, but you did not provide a value for it.␤  in block <unit> at /tmp/qkXguW5ROJ:1␤␤»
19:00 smls ah
19:00 [Coke] which is a step up from:
19:00 [Coke] m: class A { has $.x = die "is required" } ; A.new(); say "alive";
19:00 camelia rakudo-moar 43e4bf: OUTPUT«is required␤  in method  at /tmp/C3RWgiSmxW:1␤  in block <unit> at /tmp/C3RWgiSmxW:1␤␤»
19:01 smls oh, right, I remember that one :)
19:03 mr-foobar joined #perl6
19:05 mr-foobar joined #perl6
19:07 mr-foobar joined #perl6
19:08 mr-foobar joined #perl6
19:09 mr-foobar joined #perl6
19:10 mr-foobar joined #perl6
19:11 PerlJam Is or will Damian's OSCON talk be available on youtube?
19:12 tinyblak joined #perl6
19:14 zakharyas joined #perl6
19:15 Hor|zon joined #perl6
19:15 vendethiel joined #perl6
19:21 mr-foobar joined #perl6
19:22 El_Che PerlJam: last year O'reiily sold the talks for about 1 or 2 000 dollar (can't remember how much exactly)
19:22 yoleaux 22 Jul 2015 19:57Z <japhb> El_Che: I like the 'We are' variant at https://gist.github.com/nxadm/13c4817dd1b4b792a99f and I prefer "Community Guidelines" to both "Social Code" and "Code of Conduct" (the worst of those three IMO).
19:22 El_Che so not likely
19:22 mr-foobar joined #perl6
19:23 masak if you haven't read http://idlewords.com/talks/we​b_design_first_100_years.htm I compel you to have a look. it's less about web design than about how IT impacts all of us. highly recommended.
19:23 mr-fooba_ joined #perl6
19:24 masak (I once made an airplanes <-> web dev analogy long ago in one of my talks. it wasn't half as good as this one.)
19:37 japhb .tell lizmat +1 from me as well on ! for 'is required'.  I like the unification with parameter specifications.
19:37 yoleaux japhb: I'll pass your message to lizmat.
19:38 jnthn No particular objects, but please work out how it will pan out with the list decl syntax
19:38 jnthn *objections
19:39 jnthn has ($.a, $.b, ...)
19:39 nowan joined #perl6
19:40 japhb jnthn: Wouldn't that just be: has ($.a!, $.b!, ...)
19:40 jnthn japhb: Probably
19:40 jnthn japhb: Almost certainly, in fact. Just needs to be accounted for by whoever does the implementation of said syntax.
19:45 dalek roast: 6fc5093 | moritz++ | S32-exceptions/misc.t:
19:45 dalek roast: Fix test plan in S32-exceptions/misc.t
19:45 dalek roast: review: https://github.com/perl6/roast/commit/6fc5093c9b
19:46 ugexe will _JAVA_OPTIONS="-Xmx1512" take precedence over the -Xmx in command: "java -Xss1m -Xms500m -Xmx2000m -Xbootclasspath/a: ..." ?
19:48 masak ugexe: try it and see?
19:56 smls_ joined #perl6
20:00 ugexe at 10-14 hours per run persistence has not proved very useful
20:03 ggoebel joined #perl6
20:04 virtualsue joined #perl6
20:06 dalek roast: 10e7faf | moritz++ | integration/advent2014-day05.t:
20:06 dalek roast: Re-instate a fudge that causes hangs for me
20:06 dalek roast: review: https://github.com/perl6/roast/commit/10e7fafb22
20:10 mr-foobar joined #perl6
20:16 Hor|zon joined #perl6
20:17 jjido joined #perl6
20:29 espadrine_ joined #perl6
20:34 llfourn joined #perl6
20:35 amurf joined #perl6
20:38 piotr_ joined #perl6
20:46 dha joined #perl6
20:55 inokenty joined #perl6
20:56 [Sno] joined #perl6
20:57 TEttinger joined #perl6
21:10 nine masak: that talk is certainly thought provoking. Thanks for the URI
21:14 timotimo if i didn't headache, i'd've written the weekly today :|
21:15 Ulti why not  need $.x  instead of has $.x!  I like the shared $.x in Dios too
21:16 [Coke] it would be "needs" to match grammatically.
21:16 Ulti sure
21:16 [Coke] I prefer the !, though.
21:16 Ulti but I prefer shorter keywords than weird super overloaded operators
21:16 Ulti $!x!
21:16 Ulti its just ugly
21:17 [Coke] doesn't make sense to make a private attribute required, I don't think.
21:17 Ulti is required is ok but long is needed is shorter
21:17 japhb Ulti: Far more likely to be 'has $.x!' than 'has $!x!'
21:17 [Coke] ... though I realize I didn't take any care in that regard when implementing is required.
21:17 smls_ Can I enable a regex modifier globally for all tokens of a grammar?
21:17 Hor|zon joined #perl6
21:17 PerlJam Ulti: req $.x;  # required :)
21:18 [Coke] m: class M { has $!x is required} ; M.new(); say "alive";
21:18 camelia rakudo-moar 43e4bf: OUTPUT«The attribute '$!x' is required, but you did not provide a value for it.␤  in block <unit> at /tmp/veBWRoCnfN:1␤␤»
21:18 Ulti sure but my point is ! already means a tonne of things
21:18 timotimo in fact, i think $!x! is not sensible
21:18 japhb [Coke]: Don't intentionally make that impossible.  There are good reasons for forcing something to be defined during construction, and invisible afterwards.
21:18 [Coke] m: class M { has $!x is required} ; M.new(:x(3)); say "alive";
21:18 camelia rakudo-moar 43e4bf: OUTPUT«The attribute '$!x' is required, but you did not provide a value for it.␤  in block <unit> at /tmp/NHHzj4tX_I:1␤␤»
21:18 [Coke] japhb: someone should probably write a test that tests a private one.
21:19 smls_ japhb: But you'd need a custom submethod BUILD anyway, to make that work
21:19 japhb timotimo: BUILD can set a private attribute, and one could sensibly make that required.
21:19 smls_ (initialising private attributes)
21:19 smls_ so you could just as well add the ! there
21:19 japhb smls_: Self-documentation and sanity checking.
21:19 Ulti with ! on the end meaning required why not just have trigils $.!x
21:20 Ulti which I think is even worse
21:20 Ulti but its just as nuts
21:20 japhb Ulti: Do you object to trailing ! on parameters?
21:20 Ulti yes because it looks like negation to anyone learning the language
21:20 PerlJam huh.
21:21 japhb That's ... I think a matter of actually learning the language instead of cargo culting it.
21:21 PerlJam ! at the *end* doesn't look like negation.  It's only when it's at the front that it looks that way.
21:21 Ulti denied
21:21 japhb Huh?
21:21 smls_ well, Perl 6 learners will have to learn to differentiate between prefix/infix/postfix in general :)
21:21 japhb What smls_++ said.
21:21 Ulti already attributes have the issue of $.x and $!x having context
21:22 japhb I'm not sure what you mean, Ulti.
21:23 Ulti http://docs.perl6.org/language​/traps#Assigning_to_attributes
21:24 smls_ Of course one could also make  is required  the default for public attributes, and use   has $.x?   for non-required ones ;)
21:24 japhb I still don't see the problem, Ulti.
21:24 japhb Yes, I understand it's a minor gotcha, but that will *always* happen when you Huffmanize.
21:27 dalek specs: 9fc6bb7 | (Geoffrey Broadwell)++ | S27-perl-culture-draft.pod6:
21:27 dalek specs: Verb agreement fix
21:27 dalek specs: review: https://github.com/perl6/specs/commit/9fc6bb74cf
21:31 RabidGravy boom
21:37 Ulti japhb not sure what that has to do with it... if you just default public attributes to be rw then suddenly it acts how a lot of people expect
21:37 Ulti and by a lot of people I mean me :P
21:39 smls_ I think the confusuion comes from the fact that even if they're *not* rw, you can set them in the default constructor
21:39 nightfrog joined #perl6
21:39 smls_ And it can be easy to forget that that's a special mechanism
21:39 smls_ different from assignment
21:40 PerlJam How many times do people need to learn that lesson though?
21:40 smls_ and then wonder why assignment doesn't work
21:40 jnthn While true, the choice to make that easy also gently nudges folks towards more immutable designs.
21:40 smls_ yeah
21:40 Ulti PerlJam endlessly if it annoys them
21:41 PerlJam It seems to me we're optimized towards long-term maintainability over short-term annoynace
21:41 PerlJam "learn once, use many" so to speak.
21:42 Ulti aka long-term annoyance for someone who isn't using Perl 6 every hour of the day
21:43 PerlJam Ulti: what other languages default the other way that you would expect Perl 6 to as well?  :)
21:43 dolmen joined #perl6
21:43 Ulti like now I know my is used for class level variables it makes sense since its lexically scoping to the class kinda, but a keyword like shared is more memorable even if it is redundant
21:44 jnthn I wish people didn't still thing these bits of the language design were up for grabs.
21:44 smls_ I think in Perl 5 Moose you always explicitly specify either 'ro' or 'rw', right?
21:44 jnthn *think
21:45 PerlJam Ulti: besides, we'll have slangs such that you can make your own dialect of Perl 6 do what you want.
21:45 RabidGravy just requires a tad more documenting
21:46 jnthn You can also "is rw" on a class to set the default for all its attributes to have public accessors.
21:46 PerlJam Does that work today or NYI?
21:46 * PerlJam has never wanted such things.
21:46 jnthn Worked for years, afaik.
21:46 PerlJam nice
21:47 smls_ jnthn: Isn't this a relatively superficial syntax question that could in theory be still changed without too much trouble?
21:47 smls_ Just speaking hypothetically. I actually like the current design in this area.
21:48 masak t/spec/integration/advent2014-day05.t hangs here.
21:49 Peter_R joined #perl6
21:49 jnthn smls_: Which needs updating docs, affects modules, etc. The total costs are always higher than the surface ones.
21:49 Ulti PerlJam most of them would force you to do self.x
21:49 Ulti to avoid the issue a little
21:49 masak oh, wait. just takes a bit long. :) false alarm.
21:50 jnthn Peter_R: On "is rw" on classes - me either, but my OO designs tend to center around immutable objects that expose data, or mutable ones that expose as little as they possibly can.
21:50 jnthn oops, PerlJam ^^
21:50 masak aha, because it's cueing something 100_000 times...
21:50 masak that sounds like a not-the-best-way to test something like that...
21:51 jnthn masak: Is it marked as a stress test?
21:51 masak no.
21:51 jnthn Ok, it probably wants to be :)
21:51 masak this was under `make spectest`
21:53 Ulti jnthn I wasnt thinking its still up for grabs just that there is already a point of confusion over $!x and $.x so adding in another ! with an overloaded meaning feels like a bad plan as something new to add to the language
21:53 japhb PerlJam, jnthn: I have used 'is rw' on classes, but only for a very particular use case:  When I basically wanted a true "record" structure, a principled version of a hash, essentially.
21:53 dalek rakudo/nom: 5d1ec3c | (Carl Masak)++ | t/spectest.data:
21:53 dalek rakudo/nom: mark advent2014-day05.t as a stresstest
21:53 dalek rakudo/nom:
21:53 dalek rakudo/nom: Because it does a thing 100_000 times, which takes a long time.
21:53 dalek rakudo/nom: (And seems to hang on my machine when running with TEST_JOBS=4)
21:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5d1ec3c624
21:54 japhb FWIW, I've wanted 'has $.x!' for ages.  I just didn't feel like the "if you want that, do it yourself" answer; I had bigger fish to fry at the time.
21:54 Begi joined #perl6
21:55 jnthn Ulti: Yes, I can see the concern with another meaning for ! there. OTOH, there's precedent from requied parameters, so if we choose something else folks will ask why that's inconsistent.
21:55 jnthn Ulti: Which is why lang design is hard I guess
21:55 japhb I happen to *like* that consistency.
21:55 Ulti I've only not wanted it for five mintues >:3 but if its not retiring anything TIMTOWTDI
21:55 Ulti yeah if you were going to use some character I agree it should be !
21:56 Begi camelia class Journey { has $.origin; }; my $vacation = Journey.new(origin => 'Paris'); say "From $vacation.origin";
21:56 jnthn The thing I was being bothered about was ideas of has $.x being "is rw" by default.
21:56 jnthn Begi: Has to be $vacation.origin() to interpolate.
21:56 jnthn Begi: So we don't go messing up open "file-$id.txt"
21:56 Ulti jnthn but everyone just presses the get/set button in the IDE anyway :)
21:57 masak if you're curious what it would feel like for attributes to be required by default, then I suggest as a fun exercise to design and implement a small toy language where they are.
21:57 jnthn Well, you can fork and patch Rakudo to find out how Perl 6 feels that way :)
21:58 masak or that. :)
21:58 jnthn It's probably only a 2 line patch
21:58 * smls prefers "From {$vacation.origin}" over "From $vacation.origin()"
21:58 Ulti it would make you think hard about adding attributes and you would probably have a lot of composite types
21:58 masak smls: for me it varies. kind of a sliding scale.
21:58 japhb .oO( "Perl 6, how do you *feel* about this change?  Does it remind you of your childhood?  Your mother?" )
21:58 Ulti Perl6 A/B testing branch
21:58 Ulti you never know what you're going to get
21:59 tony-o japhb: lol
22:00 Ulti its surprising a language hasn't been designed yet with rigorous acceptance testing built in
22:00 japhb How do you build in acceptance testing?  That's by definition a human activity ....
22:01 Ulti I mean the design process having acceptance testing so say the GLR you give different sets of people different combos of flattening non flattening for a given keyword and find out how/what they used
22:01 RabidGravy which is what release candidates are for
22:02 Ulti it would probably 1000x the length of time to create Perl 6
22:02 japhb Ulti: You mean built-in A/B testing?
22:02 Ulti they might not have Christmas in 10,000 years time :'(
22:02 Begi Should I use say " Origin : " ~$vacation.origin or "Origin : $vacation.origin() "
22:03 RabidGravy or "Origin :  {$vacation.origin } "
22:03 jnthn Begi: It's up to you; they compile into the same code
22:03 RabidGravy a matter of taste
22:03 jnthn Begi: So it's just what style you prefer
22:03 Ulti japhb: yeah so if I pulled from github I get some message asking me to try something out and that its in flux
22:03 Ulti which everyone does
22:03 Ulti but they try the same thing
22:04 telex joined #perl6
22:04 kaare_ joined #perl6
22:05 japhb Ulti: Interesting idea.  I mean, I know some DSLs that include A/B testing, but I'm not aware of a generic language (or development platform) that does it.
22:05 Begi "There is more than one way do to that" hmm.. :)
22:05 Ulti yeah I guess Perl always went for universal acceptance by having all the ways to do something at the same time
22:05 AlexDaniel joined #perl6
22:05 AlexDaniel m: use;
22:05 camelia rakudo-moar 43e4bf: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TTwhFYwdGv␤Undeclared routine:␤    use used at line 1␤␤»
22:05 tony-o and by being awesome
22:06 AlexDaniel "use used"
22:06 AlexDaniel :)
22:06 Ulti universally awesome
22:06 masak Begi: I tend not to use the ~ one. the other two are fine. :)
22:07 Ulti japhb its kind of a general feature you might want even for more mundane tasks, like benchmarking is a form of acceptance testing if you have more than one algorithm
22:08 Ulti benchamrking over many use cases and many architectures would be kind of neat
22:08 Ulti transparently so no one knows they just pull your code and agree to send feedback
22:10 Ulti all of it is basically just knowing when and how long a function was called, even acceptance testing... did the user use the new feature once it was available in the language or not was the uptake more rapid with a different implementation or API
22:11 Ulti which also comes into tombstone testing to identify dead code too
22:11 masak Ulti: all of what you're describing sounds like a perfect thing to put in a userland module, not in the language.
22:11 Begi masak : Ok thanks. I'll use $vacation.origin();   :)
22:11 Ulti knowing when no one ever uses a feature in your compiler must be a win
22:12 Ulti masak: sure
22:12 masak Begi: the only risk I've seen with that one is if you have a html tag after it.
22:12 masak m: my $vacation = 42; say "<div>$vacation.abs()</div>"
22:12 camelia rakudo-moar 43e4bf: OUTPUT«postcircumfix:<{ }> not defined for type Int␤  in block <unit> at /tmp/tZRcY1AOPr:1␤␤Actually thrown at:␤  in block <unit> at /tmp/tZRcY1AOPr:1␤␤»
22:13 RabidGravy Begi, we omitted      "sprintf 'Origin: %s', $vacation.origin;"
22:14 japhb Yeah, when doing HTML/XML/SGML templates, I find it much easier to do "...{ $foo.bar }..." than deal with all the accidental postcircumfix errors.
22:14 Begi 'uch. Thanks for the warning. Fortunetaly, this is not my case actually
22:15 masak m: my $vacation = 42; say "<div>$vacation.abs()\</div>" # this works, though
22:15 camelia rakudo-moar 43e4bf: OUTPUT«<div>42</div>␤»
22:15 tony-o m: $a = 42; "<div>{$a.abs}</div>".say;
22:15 camelia rakudo-moar 43e4bf: OUTPUT«5===SORRY!5=== Error while compiling /tmp/i1pD3NjpME␤Variable '$a' is not declared␤at /tmp/i1pD3NjpME:1␤------> 3<BOL>7⏏5$a = 42; "<div>{$a.abs}</div>".say;␤»
22:15 tony-o m: my $a = 42; "<div>{$a.abs}</div>".say;
22:15 camelia rakudo-moar 43e4bf: OUTPUT«<div>42</div>␤»
22:15 tony-o when did camelia become so strict
22:16 Ulti m: my $vacation = 42; say "<div> $vacation.abs() </div>"
22:16 camelia rakudo-moar 43e4bf: OUTPUT«<div> 42 </div>␤»
22:16 masak tony-o: always?
22:16 RabidGravy biatch
22:16 tony-o there was a time where no 'my' was necessary
22:16 masak japhb: probably shouldn't inject strings directly into HTML anyway... :)
22:16 masak tony-o: I don't believe there was.
22:16 tony-o i seent it
22:16 masak I think you are mistaken.
22:16 Ulti m: say "<div> @*ARGS </div>"
22:16 camelia rakudo-moar 43e4bf: OUTPUT«<div> @*ARGS </div>␤»
22:16 japhb masak: If I generated the data, I'm not so worried.  But yes, [insert security discussion here]
22:16 masak Ulti: []
22:17 tony-o it was loose, like the -e parameter of running perl6 from cli
22:17 Ulti erk
22:17 masak japhb: *nod*
22:17 tony-o i remember seeing it and thinking it looked weird
22:17 Ulti m: say "<div> @*ARGS[] </div>"
22:17 camelia rakudo-moar 43e4bf: OUTPUT«<div>  </div>␤»
22:17 tony-o {tony@boondocks:~/projects}% perl6 -e '$a = 42; $a.say;'
22:17 tony-o 42
22:17 masak well, you're right about -e
22:17 tony-o no error there
22:17 masak right.
22:18 tony-o yea cam didn't used to bitch about it either, though.  last time i did that was a long time ago
22:18 Ulti m: say $*PROGRAM.IO.slurp
22:18 camelia rakudo-moar 43e4bf: OUTPUT«say $*PROGRAM.IO.slurp␤»
22:18 RabidGravy but the REPL was like that until recently too
22:18 tony-o ah
22:18 Ulti -___-
22:18 Hor|zon joined #perl6
22:19 Ulti that wasnt the quine I was looking for
22:19 Ulti so does $*PROGRAM understand EVAL?
22:19 japhb Actually, masak, you may have already thought about this.  I had a program a couple months ago that had three output modes: plain text, ANSI-fied text, and HTML text.  Because I *wasn't* generating the data, I wanted to escape the contents.  Because of architectural details and some internal parallelism, it was possible to be unsure if a chunk of text was escaped, unescaped, or *partially* escaped.
22:19 Ulti as in within an EVAL its a different program
22:20 Ulti guess that makes sense given the $* ness
22:20 masak japhb: ugh.
22:20 japhb I found myself wanting a type that looked like a Str, but was really more Cat-like, with each piece aware of its escape state (not just a boolean, but which escaping types had been applied, for example URL, attribute, CDATA, etc.)
22:21 japhb Anyway, since you've done some web frameworks, I wondered if you'd already addressed that issue.
22:21 masak japhb: and in which order, since that matters.
22:21 japhb Yes, quite.
22:21 masak japhb: no, I haven't. but I've been reading a bit about it.
22:22 japhb Any good links?
22:22 masak not really. sorry.
22:22 japhb Sigh, ah well.
22:23 masak sounds like the kind of thing where you write plenty of tests and then somehow get an implementation doing everything you want. :)
22:24 * japhb watches as someone decides to rewrite a pile of Python code in C++ because they want to use some new C++ libraries, and the SWIG barrier is just too high ... can't wait for us to have *that* one solved.  :-)
22:25 masak "SWIG barrier"?
22:25 AlexDaniel m: say WHAT WHAT WHAT WHAT 'test'
22:25 camelia rakudo-moar 5d1ec3: OUTPUT«(Str)␤»
22:25 AlexDaniel when one WHAT is not enough
22:25 RabidGravy I could do with supporting c++ libraries
22:25 * masak .oO( WHAT WHAT, in the (Str) )
22:26 jnthn masak: Gah :P
22:26 masak :P
22:26 smls japhb: I guess the traditional solution is to completely unescape all texts as they come in, munge them as needed, and then when escape them again during interpolation into your HTML/etc. template
22:27 masak japhb: I think "it's important to always know which language you're in" applies fully in your scenario.
22:34 japhb smls, masak: Yeah, there's also the question of what escaping each piece actually *wants* to have.
22:35 japhb Mason had a good way of dealing with this, back in the day
22:35 Begi1 joined #perl6
22:35 masak japhb: which was?
22:35 * masak is not familiar with Mason
22:36 japhb Interpolations for a chunk of output could get have a defined default set of escapes, but then a particular interpolation could have a set of overrides, which were very huffmanly specified
22:36 japhb (In this case, by ending the interpolation with a vertical bar and a set of one-letter escape designations)
22:37 * japhb looks to see if he can find an example
22:37 masak sounds nice.
22:37 masak 'night, #perl6
22:38 Begi1 I'll also slepp. Good night !
22:38 japhb Hmmm, it's not a terribly good set of examples (and a tad more complex than it once was), but here's a couple bits:
22:39 japhb https://metacpan.org/pod/M​ason::Plugin::HTMLFilters
22:39 japhb g'night, masak, Begi1!
22:40 yqt joined #perl6
22:52 RabidGravy nighty night all
23:00 dalek rakudo-star-daily: 4c1e10e | coke++ | log/ (9 files):
23:00 dalek rakudo-star-daily: today (automated commit)
23:00 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/4c1e10ed11
23:00 dalek perl6-roast-data: 89c06f7 | coke++ | / (9 files):
23:00 dalek perl6-roast-data: today (automated commit)
23:00 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/89c06f7cf4
23:06 virtualsue joined #perl6
23:10 jnthn sleep &
23:16 amurf joined #perl6
23:18 Calibellus joined #perl6
23:19 Hor|zon joined #perl6
23:19 brisby joined #perl6
23:20 smls m: (grammar { token TOP { <a(42, :x)> }; method a (*@_, *%_) { dd @_, %_; exit } }).parse("");
23:20 camelia rakudo-moar 5d1ec3: OUTPUT«[42, Bool::True]<>␤{}<>␤»
23:20 smls ^^ shouldn't named args be passed to grammar methods like to normal ones?
23:33 jnthn joined #perl6
23:33 [Coke] joined #perl6
23:33 sergot joined #perl6
23:33 moritz joined #perl6
23:36 dg joined #perl6
23:37 laouji joined #perl6

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

Perl 6 | Reference Documentation | Rakudo