»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by masak on 12 May 2015.
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
skeptically
skids There are a lot of good videos up from recent conferences.
rangerprice hy skids ! my friend ! :D 00:01
hi*
skids Hi rangerprice.
rangerprice So
00:05 dha joined
skids wow fresh clones of the repos are starting to become a signficant amount of data these days :-) 00:07
00:10 rangerprice left 00:14 yqt left, yqt joined 00:16 tinyblak joined 00:20 cognominal joined 00:21 pecastro joined 00:32 tinyblak left 00:33 tinyblak joined 00:34 tinyblak_ joined 00:35 Possum joined, tinyblak left 00:39 khw joined
skids Oh, come back poor dalek. 00:39
00:46 laouji joined 00:50 BenGoldberg joined 00:51 dha left 00:53 Mhoram left 00:54 Mhoram joined 00:56 AlexDaniel left 00:58 telex left 00:59 kaare_ joined 01:00 telex joined 01:15 raiph joined 01:16 llfourn joined 01:19 rmgk left, rmgk_ joined, rmgk_ is now known as rmgk 01:21 llfourn left 01:27 jack_rabbit joined 01:32 lizmat joined 01:36 lizmat left 01:38 cognominal left 01:39 laouji left 01:43 laouji joined 01:51 davido___ left 01:53 davido___ joined 01:59 cognominal joined 02:01 noganex_ joined 02:04 noganex left 02:08 laouji left, laouji joined 02:09 zacts joined 02:10 laouji left 02:11 laouji joined 02:15 yqt left 02:24 amurf left 02:25 amurf joined 02:26 virtualsue joined 02:29 amurf left 02:48 tinyblak_ left 02:49 tinyblak joined 02:50 virtualsue left 02:59 noganex joined 03:01 noganex_ left 03:07 BenGoldberg left 03:08 atroxaper joined 03:11 aborazmeh joined, aborazmeh left, aborazmeh joined 03:21 tinyblak left 03:23 tinyblak joined 03:25 tinyblak left 03:31 gfldex left 03:34 aborazmeh left 03:35 rangerprice joined 03:43 darutoko joined 04:01 laouji left 04:03 laouji joined 04:07 Woodi joined 04:10 amurf joined 04:18 Peter_R left 04:19 Peter_R joined 04:25 tinyblak joined 04:31 aborazmeh joined, aborazmeh left, aborazmeh joined, tinyblak left 04:36 khw left
dalek ast: 150479a | skids++ | / (2 files):
Tests for some new Exception/Backtrace things
04:38
ast: 1ad644d | skids++ | / (3 files):
tests for some enhancements to die/fail
skids Oh I guess it came back in but I missed it. good. 04:40
04:53 llfourn joined 04:58 rangerprice left 05:07 [Sno] left 05:08 laouji_ joined 05:09 laouji left 05:20 tinyblak joined 05:23 skids left 05:25 aborazmeh left 05:26 lizmat joined, tinyblak left 05:28 llfourn left, tinyblak joined 05:39 Peter_R left 05:43 Peter_R joined 05:46 ssqq joined
ssqq How to get caller routine name? 05:47
ugexe m: sub foo { bar() }; sub bar { say &?CALLER::ROUTINE }; foo() 05:58
camelia rakudo-moar 43e4bf: OUTPUT«sub foo () { #`(Sub|41868432) ... }␤»
ssqq ugexe: thanks 06:01
lizmat m: sub foo { bar() }; sub bar { say CALLER::<&?ROUTINE>.name }; foo()
camelia rakudo-moar 43e4bf: OUTPUT«foo␤»
ssqq lizmat: thanks 06:02
06:03 ssqq left 06:04 polygon joined 06:05 polygon left, jack_rabbit left
dalek ecs: 6dbcea6 | kbenson++ | S27-perl-culture-draft.pod6:
Update S27-perl-culture-draft.pod6

Slightly more natural wording in first sentence (at least to me)
06:07
ecs: e63d55b | kbenson++ | S27-perl-culture-draft.pod6:
Merge pull request #1 from kbenson/kbenson-patch-1

Update S27-perl-culture-draft.pod6
ecs: 52fc10d | FROGGS++ | S27-perl-culture-draft.pod6:
Merge pull request #97 from kbenson/master

Wording change
06:12 FROGGS joined 06:17 domidumont joined 06:21 domidumont left 06:24 [Sno] joined 06:28 RabidGravy joined 06:30 laouji_ left 06:31 laouji joined
masak morning, #perl6 06:34
FROGGS morning, #perl6
RabidGravy morning folks 06:36
06:47 laouji left, laouji joined 06:57 zakharyas joined 07:02 mr-foobar left 07:04 llfourn joined 07:09 brrt joined 07:16 domidumont joined 07:21 konsolebox left 07:26 konsolebox joined
brrt \o 07:26
RabidGravy erp
07:27 rindolf joined
timotimo o/ 07:29
RabidGravy Hmm I'm about to copy some subroutines from one module to another, time for a NativeHelper module je pense 07:30
07:31 Spot__ joined
RabidGravy i.e. copy array to carray and vice versa 07:31
brrt EasyNative
RabidGravy EZNatLite 07:32
timotimo brrt: we'll need a "memcpy detection" in our jit 07:34
brrt timotiom: why
and what do you mean
timotimo well, if we have a loop that copies values one-by-one from an array to a carray ...
it really ought to be implemented by calling to memcpy
07:34 [Tux] joined
timotimo because memcpy is insanely optimized 07:35
brrt i'm not sure... oh 07:36
yes, you can do that
we're not there yet
oha timotimo, i guess if it was that easy to detect such situations, then the compiler would have already been taking care of it?
timotimo oha: gcc and friends already do
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
RabidGravy I'm going with NativeHelpers::Array 07:37
timotimo since we want automatic vectorization at some point anyway ... ;) 07:38
that'll probably come first for explicit hyperops
even though i'm sure that'll require quite a bit of signaling
brrt loop detection is not terrifyingly hard
it's just not very easy, either :-) 07:39
07:42 raiph left 07:44 espadrine joined 07:47 virtualsue joined 07:53 amurf left 07:54 amurf joined, ely-se joined 07:58 amurf left 08:00 zakharyas left 08:10 dakkar joined
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 08:24 espadrine_ joined 08:26 espadrine left, rindolf left 08:27 rindolf joined 08:45 ely-se left, mr-foobar joined, inokenty joined
[Tux] Slang::Tuxic + Inline::Perl5 = Failure: Merging GLOBAL symbols failed: duplicate definition of symbol HLL 08:46
nine Damn...looks like I'm quite late to book a flight to Granada 08:51
08:51 brrt left 08:52 atroxaper left
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:53
08:54 atroxaper joined
[ptc] oops. Looks like I'm also too late to book flights... 08:57
so much for being flexible *sigh*
09:13 Averna joined
jnthn morning, #perl6 09:15
09:15 atroxaper left
cdc 'morning jnthn 09:15
nwc10 ^good ? :-)
[ptc] \o 09:16
cdc nwc10: of course :)
virtualsue i'm likely to book Malaga on purpose to get a wider selection of flights
09:17 espadrine_ left
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
I like trains :)
virtualsue yeah
nine Yep, we'll most probably go via Malaga as well
virtualsue i may drive but only if i really have to
09:20 atroxaper joined
[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
jnthn: however, one gets to use lots of high speed trains in different countries :-)
dalek osystem: b96ff01 | RabidGravy++ | META.list:
Add NativeHelpers::Array
09:23
09:23 zakharyas joined 09:24 sabudana joined
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.
nwc10 and there seem to be no overnight trains west of Germany
jnthn [ptc]: And it turns out there's a sleeper train from Prague to Basel :)
RabidGravy It's not big and it's not clever but it keeps me from copy that code into another module
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 :-)
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
[ptc]: Oh :(
09:26 Averna left
jnthn They already lost the ones to Copenhagen... 09:26
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
DrForr There's a similar discussion going on #yapceu about trains vs. buses, and diegok's advice seems to be the bus. 09:27
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 :-)
DrForr I'll be using the time to write the other talk :)
09:28 brrt joined
nwc10 The transrapid always makes me think of en.wikipedia.org/wiki/Marge_vs._the_Monorail 09:29
jnthn sabudana: doc.perl6.org/language/5to6 is a decent starting point
nwc10 hyperloop seems more interesting. although, clearly, not yet proven
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?
sabudana tx jnthn
moritz nwc10: well, technology for Transrapid was developed in Germany, so it would be a good idea to deploy it here too
nwc10 DrForr: yes., roughly
09:31 andreoss joined, sabudana left
[ptc] was pleased to find out that the trip from Hannover -> Olten is only 6 hours w/ ICE and one change in CH 09:31
09:36 atroxaper left 09:37 atroxaper joined 09:38 phoenix__ joined 09:39 phoenix__ left 09:40 Ven left, tinyblak left 09:42 atroxaper left, amurf joined, tinyblak joined 09:43 atroxaper joined, Averna left
RabidGravy 86 unique module authors in the modules list now 09:43
09:44 tinyblak_ joined
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
09:46 Bruksnys joined, Bruksnys left
jnthn andreoss: That is not the precedence you are looking for... 09:46
09:46 amurf left
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 tinyblak left
andreoss can i put something after .method: .. ? 09:48
jnthn Can't think of anything
The ==> syntax may be the better way to go 09:49
m: my $x = ^10 ==> map { $_ } ==> map { $_ }; say $x;
camelia rakudo-moar 43e4bf: OUTPUT«0..^10␤»
ShimmerFairy jnthn: I recall seeing an old bug that claimed .map: {...}.foo should work like .map({...}).foo , let me find it back...
jnthn m: my $x = (^10 ==> map { $_ } ==> map { $_ }); say $x;
camelia rakudo-moar 43e4bf: OUTPUT«0 1 2 3 4 5 6 7 8 9␤»
jnthn ShimmerFairy: OK. I'm pretty sure it shouldn't... 09:50
09:50 brrt left
ShimmerFairy I don't think it should either, fwiw 09:50
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␤»
jnthn STD has nothing special there: github.com/perl6/std/blob/master/STD.pm6#L3509
ShimmerFairy jnthn: here's the bug: rt.perl.org/Ticket/Display.html?id=67700
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.
DrForr I get to leave at 6:05am.
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:53
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
synbot6 Link: design.perl6.org/S12.html#line_538
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.
jnthn Sure. Well, guess we'll have to delegate to TimToady++ to get the latest thinkin' :)
09:56 TEttinger left
jnthn Well, or defer to... :) 09:57
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
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
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:00
(_but_ the arg in .map: {...} , _is_ considered final, if I understand "immediately" correctly o_O) 10:01
10:04 bjz joined 10:15 atroxaper left 10:24 Ven joined 10:35 virtualsue left 10:39 RabidGravy left 10:43 JimmyZ_ joined 10:44 JimmyZ_ left 10:49 konsolebox left 10:54 atroxaper joined 10:55 atroxape_ joined, atroxaper left
timotimo i need a bit of halp with the ecosystem 11:05
github.com/perl6/modules.perl6.org...hub.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:06
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.
jnthn++ # bloggage, and the causes of bloggage
jnthn nine: I booked at Hotel Granada Center
nwc10: I considered that but yeah, it's more work than I wish to do 11:11
nwc10: And it's not exactly hard to plug a ticket number into RT for those curious enough
nwc10: But most folks aren't.
nine jnthn: oh Granada Center looks very nice indeed. Request sent, waiting for reply... 11:14
timotimo this issue is keeping modules.perl6.org from updating, fwiw 11:15
11:16 Psyche^_ joined, tinyblak_ left
jnthn nine: You mentioned YAPC CONFERENCE to get disconut too? :) 11:17
DISCO NUT!!
nine jnthn: I did :)
jnthn *discount :)
FROGGS disco nut :P
nine I definitely want to try those disco nuts ;)
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:18 laouji left 11:20 Psyche^ left
timotimo since perl -e 'use Data::Dumper' doesn't die, i can probably "dd $commits"? 11:21
nine timotimo: a simple warn $commits; might be a good first step 11:22
timotimo mhm
nine timotimo: btw. running it here right now
timotimo great, thanks 11:23
11:23 abraxxa joined, azawawi joined
azawawi hi 11:23
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
moritz timotimo: muhaha 11:25
I'd rather use Parallel::ForkManager or Parallel::Iterator
nine Oh, this can simply be fixed by adding another commit to Uggedit ;)
Instead of an arrayref containing hashrefs for commits, we get a single hashref, because there's only one commit :) 11:26
moritz eeks
timotimo ... derp
moritz impressively bad API design
timotimo why doesn't the hashref behave like a list of one element? :P 11:27
moritz because this is Perl 5
nine Because this is where the idea of items behaving like a list of one element comes from 11:28
azawawi moritz: or metacpan.org/pod/AnyEvent::Util fork_call()
Ulti something like this for Perl 6 would be nice comealive.io 11:29
timotimo camelialive.io
azawawi timotimo: it seems interesting until it executes a db delete which was supposed to be in a transaction... :) 11:31
11:31 telex left
timotimo "it"? 11:31
azawawi timotimo: live coding + database = bad
jnthn Coding agaisnt live production environment = bad :P 11:32
11:32 telex joined
timotimo ah 11:33
that thing runs your code by using your test suite
Ulti if you mean the comealive thing it does everything via your tests
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 href="https://modules.perl6.org:">modules.perl6.org: dcd11a7 | (Stefan Seifert)++ | web/lib/P6Project/Hosts/Github.pm:
Fix build-project-list.pl dieing on repositories with a single commit

Instead of an arrayref containing hashrefs for commits, we get a single
  hashref, because there's only one commit :)
timotimo %)
11:37 darutoko- joined 11:39 tinyblak joined
timotimo thank you, nine 11:41
11:41 tinyblak_ joined
nine My pleasure 11:41
11:41 azawawi left 11:42 darutoko left 11:44 tinyblak left
dalek pan style="color: #395be5">perl6-examples: a9697fc | (Quinn Perfetto)++ | / (2 files):
solved problem 34 for euelr
11:46
pan style="color: #395be5">perl6-examples: 14f4dd9 | azawawi++ | / (2 files):
Merge pull request #26 from Quinny/master

solved problem 34 for euler
11:47 kaare_ left 11:50 kaare_ joined 11:53 coffee`_ joined 11:56 espadrine joined, espadrine_ left 11:58 Averna joined 11:59 bjz left 12:02 cognominal left
timotimo 1) rule ws { ... } 12:07
2) profit!
12:09 atroxape_ left
moritz token ws { } please :-) 12:10
12:21 gfldex joined 12:28 tinyblak_ left 12:32 konsolebox joined 12:41 lucasb joined 12:44 Averna left
dalek kudo-star-daily: 6e874a8 | coke++ | log/ (9 files):
today (automated commit)
12:48
rl6-roast-data: 917748d | coke++ | / (9 files):
today (automated commit)
FROGGS jnthn++ 12:49
(blog and the work behind it)
masak for posterity: 6guts.wordpress.com/2015/07/23/thi...uff-stuff/
jnthn++ 12:50
[Coke] yawns
12:51 tinyblak joined, espadrine_ joined
lucasb so... will there be a release today? 12:52
timotimo oh, it's release day?
[Coke] no one is scheduled for today, and we didn't notice!
12:55 espadrine left
masak checks the release guide 12:57
FROGGS hides
masak ok, I volunteer as a fallback, but I would prefer it if someone else did it ;) 12:59
13:03 scoobydoo joined
masak was gonna comment on rt.perl.org/Ticket/Display.html?id=125658 being based on a misunderstanding -- but happy to note FROGGS++ and moritz++ already did :) 13:07
ShimmerFairy++ # making .grep care about arity
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 :)
masak m: .say for (1, 2, 4, 3, 5, 6).grep({ $^a < $^b }) 13:08
camelia rakudo-moar 43e4bf: OUTPUT«1␤2␤5␤6␤»
moritz the changelog says
Deprecations:
pipe() in favour of shell() or run() with :in, :out or :err
13:08 telex left
moritz ah, misread 13:09
masak :)
moritz: fwiw, me too on first reading. but it's correct.
though dunno why it's "favour" in a project where we generally don't do Commonwealth spellings.
13:10 atroxaper joined
masak .oO( it's "Rakudo", not "Rakudou" ) :P 13:10
13:10 arnsholtAtHome joined
nwc10 nor is it Rakudeau :-) 13:10
arnsholtAtHome arnsholt: *prodprodprod*
timotimo Coummounwealth
13:10 scoobydoo left, telex joined
nwc10 or, I guess, because we have multiple backends, Rakudaux 13:11
masak nwc10: "Rakudeaux" 13:12
FROGGS would be nice to have a localized version of Perl 6 called Rakudeaux :o) 13:13
(and of course then one called RACKUDO!!!)
13:14 atroxaper left
masak what language is that, Shoutese? 13:14
13:15 pecastro left
moritz bless you. 13:15
13:20 coffee`_ left 13:21 bjz joined 13:26 arnsholtAtHome left 13:28 brrt joined
cdc veut un racadeau pour Noël 13:29
nwc10 cdc++ 13:30
masak I'm slightly shocked that my brain knows what to do with French.
jnthn
.oO( Noel Gallagher or Noel Edmonds? )
13:30 arnsholt joined
[Coke] THIS. IS. RACKUDO! 13:30
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
masak jnthn: (and "Noël" is "Christmas", just like in English) 13:32
13:32 RabidGravy joined
jnthn masak: oh wow... :P 13:32
masak: Yes, I got that bit :)
RabidGravy hello darlings
timotimo hello my tarling
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.
masak translated into junctions, "I want an any(rakudo, present) for Christmas" :D
nwc10: vouloir, "to want" 13:33
nwc10 aha yes. as in www.youtube.com/watch?v=za05HBtGsgU
arnsholt nwc10: It's vouloir (to want), which goes je veux, tu veux, il veut, nous voulons, vous voulez, ils veulent (obviously =)
nwc10 (not a rickroll)
masak "veut" would be 3rd person singular present indicative :)
ah, arnsholt++ beat me to it, with the whole set ;) 13:34
realizing that French is a hipster version of Latin actually explains a lot
nwc10 *this* is a rickroll: www.youtube.com/watch?v=dQw4w9WgXcQ
masak now why did I click that 13:35
arnsholt And it is actually a rickroll?
masak yes :/
arnsholt I was still mulling over whether to click or not ^_^
jnthn masak: You look let down...
nwc10 arnsholt: I'm not sure. It's certainly a link to the official Youtube video
masak nwc10: in revenge: this is a Swiss roll: www.youtube.com/watch?v=TZ2WGiabU5Q
nwc10 but as it wasn't disguised as something else, maybe it's not.
masak s/revenge/retaliation/ 13:36
dalek ast: 26eabc4 | skids++ | S06-currying/named.t:
Unfudge now-passing test on JVM
13:37
13:43 skids joined
masak I would like to highlight this blog post blog.getify.com/not-all-semicolons/ -- even though it's about JS. 13:46
especially the list, about halfway through the post, giving examples of "clever, no clear". 13:47
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
though when I think about it, I suspect people are all over the board in what they think is fine.
PerlJam masak: which ones are ok with you?
masak the `str = num + ""` one and the `foo & foo()` one. 13:49
PerlJam interesting. I'm only ok with the foo && foo() one 13:50
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:52 rindolf left
masak I find variable interpolation soaks up a lot of those cases for me. 13:53
I don't really use infix:<~> a lot.
PerlJam I suppose it only really comes up when you're marshalling data. 13:54
13:55 tinyblak left, Possum left
PerlJam "Why is the JSON thingy converting my string "005" to the number 5? Oh, Perl thinks it's a number" 13:55
brrt hah, doing ~str.indexOf(searchStr) to check for -1 13:56
i salute that 13:57
14:01 khw joined 14:05 konsolebox left 14:07 Possum joined
masak brrt: I looked at that one in disbelief. how is that better than `> -1` ? 14:08
brrt: it's still checking for -1, just with a more obscure symbol.
brrt it... works
yeah
i dunno 14:09
the author prefers it
masak I agree that it's clever. doesn't make me eager to use it :>
maybe that was part of his point.
I do like the switch/object refactor following that. especially since the object can be further refactored into a variable or something. 14:10
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
(source: github.com/getify/You-Dont-Know-JS...se-of-the- )
14:13 domidumont left 14:14 araujo left
masak ShimmerFairy: I think I fully agree. to me, the `~` adds another layer of painful explanation, rather than remove it. 14:15
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
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
I agree that it's not *pretty*, and that I can think of prettier ways to do it.
but if I was after clarity, no way I'd use `~` 14:18
FROGGS nods
14:18 araujo joined, araujo left, araujo joined 14:19 tinyblak joined
brrt also, indexOf works this way in many, many languages 14:23
also, why just write str.hasSubstring(searchStr) 14:24
which returns boolean
14:24 FROGGS left
brrt if you're so keen on abstraction 14:24
masak there's no such method in ES5, I think. 14:25
are you talking about duck-punching it in?
14:26 mr-foobar left
brrt why not 14:27
jnthn duck...punching? o.O
14:27 atroxaper joined
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/'
masak jnthn: I didn't make it up :) I think it's from the Ruby world 14:29
14:31 raiph joined
masak brrt: why not? for all the usual reasons why not. 14:31
14:32 atroxaper left
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
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.
muraiki I figured it'd return Option[Int]
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
as if the choice of indexOf to *find* the thing wasn't an implementation detail
why is monkeypatching / duckpunching worse than that?
but yeah, that's what i'd do too
we're boring programmers, we 14:34
*us*
conservative old hats :-P
masak brrt: basically because String.prototype is a global, and changing globals has an unpredictable global effect on present and future dependencies.
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) { ... }
masak brrt: the short explanation (for those who already know the argument) is that it's "anti-social" to extend the built-in types.
brrt interestingly, we handle it in the same way, by shaming and morality
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
or, put differently, I really like the idea of composition working in all possible situations. that precludes things like monkey-patching.
brrt ok, i can agree with that; that'd be a bottom-up organisation argument 14:37
or 'no global view'
masak yes.
brrt interesting 14:38
masak like, you're building a bridge, and there's this guy or gal who insists on using nonstandard screws.
but instead of *telling* you that, you just find out the hard way, when the bridge is ready to be used.
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.
brrt what if the other person insists that using nonstandard screws is part of his creative expression
ShimmerFairy masak: this talk of monkey_patching reminds me; how would you feel about an unkebab branch on rakudo? :P
brrt unkebab? 14:40
masak ShimmerFairy: I can't be bothered, to be honest. :/
arnsholt remove_kebab? =)
ShimmerFairy masak: well, I'm not asking you to do it, it's just something I've thought about doing myself :)
masak ShimmerFairy: I think it'd be a hollow moral victory and a hornet's nest of opinions/discussion.
jnthn And a huge waste of time when we've better things to do.
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
i'll google it
masak m: say $*PROGRAM-NAME # brrt: that
camelia rakudo-moar 43e4bf: OUTPUT«/tmp/NCUi3sNpbH␤»
masak m: say $*PROGRAM_NAME
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…»
brrt ahaaaah
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.
ShimmerFairy: I don't really want to discuss it more -- sorry. 14:43
it is what it is.
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.
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.
ShimmerFairy: yes, agree. but there are two different ways to be consistent here. that's all.
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
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
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.
ShimmerFairy PerlJam: What's a Caps Lock? :P
14:46 konsolebox joined
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.
masak ShimmerFairy: I think it made sense for typewriters, when ALL CAPS was basically the only way to do emphasis.
ShimmerFairy I've not remapped, but I have never in my life needed it, so it just sits there uselessly :)
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.
brrt the key that breaks password input blocks
:-P
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.
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 konsolebox left
ShimmerFairy Would be nice it wasn't just "check existing code", though :) 14:51
14:51 konsolebox joined
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:54
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␤»
b2gills m: sub postfix:<!> (UInt() $n) { [*] 2..$n }; sub postfix:<!@> (UInt() $n) { gather for $n.comb { take $_! }}; sub postfix:<!+> (UInt() $n) { [+] $n!@ }; say 145!+
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 …»
hoelzro o/ #perl6 14:56
b2gills It seems you can't create a postfix operator named !@ that can be used on a variable 14:57
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
$a!@foo is valid syntax, but not valid semantics...
And somehow that rule seems to be winning even with an empty variable name 15:02
15:03 araujo left
hoelzro I'm late to the party, but DISCO NUT 15:03
15:03 araujo joined
b2gills
.oO( Mr. Peanut instead of John Travolta in Saturday Night Fever )
15:09
I wounder if it would make sense for there to be a `ifdef $str.index('foo') -> $index { ... }` 15:12
15:12 domidumont left 15:13 smls joined
smls m: say "abc" ~~ /<myalias=.ident>/ 15:13
camelia rakudo-moar 43e4bf: OUTPUT«「abc」␤ myalias => 「abc」␤»
smls m: say "abc" ~~ /<myalias = .ident>/
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…»
smls ^^ any chan ce whitespace could be allowed there>?
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 Ven left
smls but = doesn't mean anythin in "grammar term" position, does it? 15:14
15:15 Ven joined
b2gills m: say "abc" ~~ /$<myalias> = <.ident>/ 15:16
camelia rakudo-moar 43e4bf: OUTPUT«「abc」␤ myalias => 「abc」␤»
smls I guess that works. 15:17
15:18 Ven left
jnthn smls: No, which is why I said conflict-y :) 15:18
smls :P
jnthn smls: I think we might be able to disambiguate...whether we should otoh...I don't have a good feel for it.
15:19 brrt left, raiph left 15:20 raiph joined 15:22 atroxaper joined 15:24 FROGGS joined
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:25
15:26 atroxaper left
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␤»
jnthn m: my @lists = [1,2,3], [1,2,4], [1,3,4]; my $i = 0; $i++ while [==] @lists[*;$i]; say $i
camelia rakudo-moar 43e4bf: OUTPUT«1␤»
15:31 njmurphy joined, Skarsnik joined
ugexe perfect. thanks, thats a neat one 15:32
llfourn that's cool!
15:33 cognominal joined, telex left
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 pastebin.com/XiQ79si0 I tried installing psql but that does not seem to change anything x) 15:34
15:34 telex joined
smls m: my @lists = [1,2,3], [1,2,3]; my $i = 0; $i++ while [==] @lists[*;$i]; say $i 15:34
needs a break condition though ^^ jnth, ugexe 15:35
15:35 zakharyas left
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
jnthn smls: haha, yes :) 15:35
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
camelia rakudo-moar 43e4bf: OUTPUT«1␤»
Skarsnik PerlJam: maybe, I am not sure, I need to put thing in a db x)
smls ^^ more functional version
jnthn m: my @lists = [1,2,3], [1,2,4], [1,3,4]; say (^@lists[0]).first-index({ [==] @lists[*;++state $] })
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 })␤»
jnthn m: my @lists = [1,2,3], [1,2,4], [1,3,4]; say (^@lists[0]).first-index({ [==] @lists[*;++state $ ] })
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 …»
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 …»
jnthn Hm, something like...or what smls++ said :)
ugexe nice catch smls++ 15:38
15:38 [Tux] left 15:45 konsolebox left
llfourn the 15:46
Skarsnik: I just panda install Task::Star no problems :S (excuse the 'the')
Skarsnik: Many of the same errors related to db connection and sqlite lib but it worked in the end 15:47
15:47 aljohri joined
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])␤»
smls ^^ why are these not the same?
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.
jnthn smls: .elems is nodal, .Numeric is not, iirc
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.
smls jnthn: nodal? 15:50
Skarsnik PerlJam: that's neat x)
RabidGravy Skarsnik, alternatively github.com/perl6/DBIish
15:51 [Tux] joined, aljohri left
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
probably an issue in the pg module
llfourn it's quite odd that it worked for me? 15:53
actually no it didn't... It's just that my panda didn't seem to care and installed it anyway.. 15:54
Skarsnik The system is a debian jessie if that help in any ways... 15:55
llfourn Skarsnik: You could always --notests install 15:56
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␤»
smls ugexe: ^^ more generic version
Skarsnik llfourn: ok thx, I force dbish install with notests, I did not get errors for the rest :) 16:06
llfourn Skarsnik: Np :) 16:07
PerlJam Skarsnik: looks like something weird with grammars actually. It's not parsing the string properly. 16:08
If I add { say "hi" } in the single_quote rule, it parses just fine. 16:09
16:09 AlexDaniel joined
arnsholt Code interpolations terminate LTM; maybe that has something to do with it? 16:09
PerlJam yep, that would be my guess as well
flussence github.com/jnthn/grammar-debugger/issues/13 it sounds like this bug 16:10
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:11
PerlJam flussence: maybe. 16:12
16:12 brrt joined 16:15 abraxxa left
PerlJam well, no. It has nothing to do with Grammar::Tracer AFAICT 16:15
ugexe hmm works for numbers only 16:17
[eq] works, but hopefully im not overlooking something 16:18
hoelzro has anyone else been seeing intermittent panda t/tester.t errors lately?
smls ugexe: [eqv] ? 16:19
16:23 yqt joined 16:24 lizmat left, brrt left
[Coke] returns from a most excellent PT session. 16:25
PerlJam PT == physical training? 16:26
16:26 spider-mario joined 16:34 spider-mario left 16:36 spider-mario joined 16:38 mr-foobar joined 16:40 isBEKaml joined
TimToady therapy, usually 16:41
MilkmanDan If you're military it absolutely does not mean therapy. :) 16:42
In therapy there's usually not someone yelling insults at you. :)
TimToady especially if you put 109 after it :)
[Coke] I have done the other PT sessions, but not in a loooong time, and those were not excellent. :) 16:45
isBEKaml [Coke]: Looks like you were searching for one perfect PT session like searching for a soulmate :-) 16:46
16:53 virtualsue left 16:55 isBEKaml left 16:59 SmokeMachine left, SmokeMachine joined 17:05 espadrine_ left 17:07 mr-foobar left, dakkar left 17:10 rangerprice joined
DrForr m: say "\x1L" 17:17
camelia rakudo-moar 43e4bf: OUTPUT«L␤»
DrForr Looks like that behavior's changed recently. 17:18
DrForr rebuilds as he's got a fairly stale copy on the laptop. A whole 2 weeks out of date :) 17:19
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:24 raiph left 17:26 raiph joined
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␤»
TimToady std successfully invalidates the highexpect list, while rakudo doesn't 17:32
so a buglet
DrForr Nod. I'm picking nits at this point. 17:33
TimToady someone's gotta pick 'em :) 17:34
17:37 lizmat joined 17:38 yqt left, lizmat left 17:40 AlexDaniel left
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?
TimToady well, .*: or so will slurp everything that's left
smls add )> .* at the end of token TOP I suppose? 17:43
TimToady: Is there a more efficient way though?
e.g. for parsing the (small) header of a (potentially large) file
TimToady add the colon to tell it not to worry about backtracking should make it theoretically faster 17:44
as in, optimizable to setting the current position to the length of the string
smls what colon is that?
TimToady the one I put there after the .*
smls ah 17:45
TimToady or you can call .subparse and it won't care if you got to $
smls will I have to add a ^ at the start? 17:46
or is only the end open for subparse?
TimToady neither parse nor subparse actually care about ^ afaik 17:47
they just start there by default
at least, subparse does, I could be wrong about Parse 17:48
smls btw why is it MyGrammar.parse("foo") and not "foo".parse(MyGrammar) 17:49
the former feels somehow wrong :P
the latter would be consistent with .match 17:50
TimToady a parser parses
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 :)
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
smls then "foo".parse would be a message to the string to parse itself :P 17:53
b2gills
.oO( `"foo".parse-with(MyGrammar)` ? )
TimToady strings don't know how to parse themselves
smls why not
they know how to .match themselves too
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
in English, the parser parses the text 17:55
smls what is the active agent in .match($regex) and .split($regex) then?
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. 17:56
especially since switching from .match to .parse is not an unusual upgrade path. 18:05
18:11 tinyblak left 18:19 Hor|zon left 18:21 lucasb left 18:32 lizmat joined
lizmat good *, #perl6 from OSCON again 18:32
masak m: grammar G { regex TOP { foo } }; say "foo" ~~ G 18:33
camelia rakudo-moar 43e4bf: OUTPUT«False␤»
nwc10 good *, lizmat
having the appropriate amount of fun?
masak TimToady: maybe this ^ should work?
RabidGravy rarr!
lizmat just been to TheDamian's talk: www.oscon.com/open-source-2015/publ...tail/40632
masak lizmat: how was it? 18:34
lizmat "Don't change languages. Change your language."
it was interesting
masak :D
lizmat he is well underway implementing Perl 6 in Perl5 :-)
masak heh. isn't he always? ;)
18:34 andreoss left
lizmat yeah, but there's now modules 18:34
metacpan.org/pod/Dios 18:35
metacpan.org/release/Keyword-Declare
masak wow.
nwc10 lizmat: have you got to play with obra's keyboard yet? 18:37
lizmat nwc10: yes
it's woody and shiny :-) 18:38
but not my thing :-(
TheDamian was showing how you could have Perl 6 class declaration syntax in P5
18:38 llfourn left
lizmat oddly enough, he used ! to indicate a required attribute 18:38
m: class A { has $.a! }
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…»
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␤»
masak wow, Dios looks amazing.
lizmat m: class A { has $.a is required } # P6 equivalent
camelia ( no output )
lizmat so, is there a reason not to have ! indicate a required attribute ? 18:40
(especially now that we can defer it easily to a "is required" trait)
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␤»
RabidGravy is there an example in ecosystem of something that wraps a C++ library to a C interface?
lizmat goes back to the booth, will backlog later 18:44
18:44 lizmat left
moritz has anybody volunteered for the release yet? 18:45
timotimo has no clue what "inside out" refers to
in Dios 18:46
DrForr Old way to isolate objects so you can't see inside.
timotimo how do we do that in perl6? we can't! damn it :( 18:47
moritz sure you can do inside-out objects in p6 18:48
smls timotimo: perldoc.perl.org/perlobj.html#Inside-Out-objects
DrForr It was done with hashes originally, so sure you can.
They're just not "objects" in the sense you're thinking of.
"It's life, Jim, but not as we know it."
18:48 bin_005 joined 18:49 brrt joined
RabidGravy I'm a surgeon not a bricklayer 18:49
timotimo oh, huh 18:50
smls Inside-out objects is probably not something you want when working with real threads though :P 18:51
RabidGravy never bothered with them, got well into blessing closures over the actual data around the turn of the century 18:52
18:57 inokenty left
[Coke] .tell lizmat +1 from me on ! to indicate "is required" 18:57
yoleaux [Coke]: I'll pass your message to lizmat.
smls What's the current syntax for that? 18:58
[Coke] smls: to me? 19:00
smls yeah
[Coke] m: class A { has $.x is required } ; A.new(); say "alive";
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␤␤»
smls ah
[Coke] which is a step up from:
m: class A { has $.x = die "is required" } ; A.new(); say "alive";
camelia rakudo-moar 43e4bf: OUTPUT«is required␤ in method at /tmp/C3RWgiSmxW:1␤ in block <unit> at /tmp/C3RWgiSmxW:1␤␤»
smls oh, right, I remember that one :) 19:01
19:03 mr-foobar joined 19:04 mr-foobar left 19:05 mr-foobar joined, mr-foobar left 19:07 mr-foobar joined, mr-foobar left 19:08 mr-foobar joined, mr-foobar left 19:09 mr-foobar joined 19:10 mr-foobar left, mr-foobar joined 19:11 mr-foobar left
PerlJam Is or will Damian's OSCON talk be available on youtube? 19:12
19:12 tinyblak joined 19:14 zakharyas joined 19:15 Hor|zon joined, vendethiel joined 19:17 tinyblak left 19:20 Hor|zon left 19:21 mr-foobar joined, mr-foobar left
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 gist.github.com/nxadm/13c4817dd1b4b792a99f and I prefer "Community Guidelines" to both "Social Code" and "Code of Conduct" (the worst of those three IMO).
El_Che so not likely
19:22 mr-foobar joined
masak if you haven't read idlewords.com/talks/web_design_firs..._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
19:23 mr-fooba_ joined
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:24
19:27 mr-foobar left
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.
jnthn No particular objects, but please work out how it will pan out with the list decl syntax 19:38
*objections
has ($.a, $.b, ...) 19:39
19:39 nowan joined
japhb jnthn: Wouldn't that just be: has ($.a!, $.b!, ...) 19:40
jnthn japhb: Probably
japhb: Almost certainly, in fact. Just needs to be accounted for by whoever does the implementation of said syntax.
19:41 [Sno] left, mr-fooba_ left
dalek ast: 6fc5093 | moritz++ | S32-exceptions/misc.t:
Fix test plan in S32-exceptions/misc.t
19:45
ugexe will _JAVA_OPTIONS="-Xmx1512" take precedence over the -Xmx in command: "java -Xss1m -Xms500m -Xmx2000m -Xbootclasspath/a: ..." ? 19:46
masak ugexe: try it and see? 19:48
19:49 raiph left 19:53 brrt left 19:56 smls left, smls_ joined
ugexe at 10-14 hours per run persistence has not proved very useful 20:00
20:03 ggoebel joined, darutoko- left 20:04 virtualsue joined
dalek ast: 10e7faf | moritz++ | integration/advent2014-day05.t:
Re-instate a fudge that causes hangs for me
20:06
20:10 mr-foobar joined 20:16 Hor|zon joined 20:17 jjido joined 20:21 Hor|zon left 20:30 espadrine_ joined 20:34 llfourn joined 20:35 amurf joined 20:38 piotr_ joined 20:39 llfourn left 20:40 amurf left 20:46 dha joined 20:55 inokenty joined 20:56 [Sno] joined 20:57 TEttinger joined 20:59 zakharyas left 21:01 jjido left 21:04 Skarsnik left 21:07 skids left
nine masak: that talk is certainly thought provoking. Thanks for the URI 21:10
21:11 muraiki left 21:13 dha left
timotimo if i didn't headache, i'd've written the weekly today :| 21:14
Ulti why not need $.x instead of has $.x! I like the shared $.x in Dios too 21:15
[Coke] it would be "needs" to match grammatically. 21:16
Ulti sure
[Coke] I prefer the !, though.
Ulti but I prefer shorter keywords than weird super overloaded operators
$!x!
its just ugly
[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
japhb Ulti: Far more likely to be 'has $.x!' than 'has $!x!'
[Coke] ... though I realize I didn't take any care in that regard when implementing is required.
smls_ Can I enable a regex modifier globally for all tokens of a grammar?
21:17 Hor|zon joined
PerlJam Ulti: req $.x; # required :) 21:17
[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␤␤»
Ulti sure but my point is ! already means a tonne of things
timotimo in fact, i think $!x! is not sensible
japhb [Coke]: Don't intentionally make that impossible. There are good reasons for forcing something to be defined during construction, and invisible afterwards.
[Coke] m: class M { has $!x is required} ; M.new(:x(3)); say "alive";
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␤␤»
[Coke] japhb: someone should probably write a test that tests a private one.
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.
smls_ (initialising private attributes)
so you could just as well add the ! there
japhb smls_: Self-documentation and sanity checking.
Ulti with ! on the end meaning required why not just have trigils $.!x
which I think is even worse 21:20
but its just as nuts
japhb Ulti: Do you object to trailing ! on parameters?
Ulti yes because it looks like negation to anyone learning the language
PerlJam huh.
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.
Ulti denied
japhb Huh?
smls_ well, Perl 6 learners will have to learn to differentiate between prefix/infix/postfix in general :)
japhb What smls_++ said.
Ulti already attributes have the issue of $.x and $!x having context
japhb I'm not sure what you mean, Ulti. 21:22
21:22 Hor|zon left
Ulti docs.perl6.org/language/traps#Assig...attributes 21:23
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.
Yes, I understand it's a minor gotcha, but that will *always* happen when you Huffmanize.
dalek ecs: 9fc6bb7 | (Geoffrey Broadwell)++ | S27-perl-culture-draft.pod6:
Verb agreement fix
21:27
21:28 estrabd is now known as estrabd_afk
RabidGravy boom 21:31
21:36 nightfrog left
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
and by a lot of people I mean me :P
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
21:39 nightfrog joined
smls_ And it can be easy to forget that that's a special mechanism 21:39
different from assignment
PerlJam How many times do people need to learn that lesson though? 21:40
smls_ and then wonder why assignment doesn't work
jnthn While true, the choice to make that easy also gently nudges folks towards more immutable designs.
smls_ yeah
Ulti PerlJam endlessly if it annoys them
PerlJam It seems to me we're optimized towards long-term maintainability over short-term annoynace 21:41
"learn once, use many" so to speak.
Ulti aka long-term annoyance for someone who isn't using Perl 6 every hour of the day 21:42
PerlJam Ulti: what other languages default the other way that you would expect Perl 6 to as well? :) 21:43
21:43 dolmen joined
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:43
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?
jnthn *think
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
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?
PerlJam has never wanted such things.
jnthn Worked for years, afaik.
PerlJam nice
21:47 Peter_R left
smls_ jnthn: Isn't this a relatively superficial syntax question that could in theory be still changed without too much trouble? 21:47
Just speaking hypothetically. I actually like the current design in this area.
masak t/spec/integration/advent2014-day05.t hangs here. 21:48
21:49 Peter_R joined
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
to avoid the issue a little
masak oh, wait. just takes a bit long. :) false alarm.
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
oops, PerlJam ^^
21:50 smls_ is now known as smls
masak aha, because it's cueing something 100_000 times... 21:50
that sounds like a not-the-best-way to test something like that...
jnthn masak: Is it marked as a stress test? 21:51
masak no.
jnthn Ok, it probably wants to be :)
masak this was under `make spectest`
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 vendethiel left
dalek kudo/nom: 5d1ec3c | (Carl Masak)++ | t/spectest.data:
mark advent2014-day05.t as a stresstest

Because it does a thing 100_000 times, which takes a long time.
  (And seems to hang on my machine when running with TEST_JOBS=4)
21:53
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
21:55 Begi joined
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
Ulti: Which is why lang design is hard I guess
japhb I happen to *like* that consistency.
Ulti I've only not wanted it for five mintues >:3 but if its not retiring anything TIMTOWTDI
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";
jnthn The thing I was being bothered about was ideas of has $.x being "is rw" by default.
Begi: Has to be $vacation.origin() to interpolate.
Begi: So we don't go messing up open "file-$id.txt"
Ulti jnthn but everyone just presses the get/set button in the IDE anyway :)
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 :)
masak or that. :) 21:58
jnthn It's probably only a 2 line patch
smls prefers "From {$vacation.origin}" over "From $vacation.origin()"
Ulti it would make you think hard about adding attributes and you would probably have a lot of composite types
masak smls: for me it varies. kind of a sliding scale.
japhb
.oO( "Perl 6, how do you *feel* about this change? Does it remind you of your childhood? Your mother?" )
Ulti Perl6 A/B testing branch
you never know what you're going to get
21:59 TEttinger left
tony-o japhb: lol 21:59
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 ....
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
Ulti it would probably 1000x the length of time to create Perl 6 22:02
japhb Ulti: You mean built-in A/B testing?
Ulti they might not have Christmas in 10,000 years time :'(
Begi Should I use say " Origin : " ~$vacation.origin or "Origin : $vacation.origin() "
RabidGravy or "Origin : {$vacation.origin } " 22:03
jnthn Begi: It's up to you; they compile into the same code
RabidGravy a matter of taste
22:03 telex left
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
which everyone does
but they try the same thing
22:04 telex joined, kaare_ left, kaare_ joined
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.. :)
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
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␤␤»
tony-o and by being awesome
AlexDaniel "use used" 22:06
:)
Ulti universally awesome
masak Begi: I tend not to use the ~ one. the other two are fine. :)
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:07
benchamrking over many use cases and many architectures would be kind of neat 22:08
transparently so no one knows they just pull your code and agree to send feedback 22:09
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
which also comes into tombstone testing to identify dead code too
masak Ulti: all of what you're describing sounds like a perfect thing to put in a userland module, not in the language.
Begi masak : Ok thanks. I'll use $vacation.origin(); :)
Ulti knowing when no one ever uses a feature in your compiler must be a win 22:12
masak: sure
masak Begi: the only risk I've seen with that one is if you have a html tag after it.
m: my $vacation = 42; say "<div>$vacation.abs()</div>"
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␤␤»
RabidGravy Begi, we omitted "sprintf 'Origin: %s', $vacation.origin;" 22:13
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
masak m: my $vacation = 42; say "<div>$vacation.abs()\</div>" # this works, though 22:15
camelia rakudo-moar 43e4bf: OUTPUT«<div>42</div>␤»
tony-o m: $a = 42; "<div>{$a.abs}</div>".say;
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;␤»
tony-o m: my $a = 42; "<div>{$a.abs}</div>".say;
camelia rakudo-moar 43e4bf: OUTPUT«<div>42</div>␤»
tony-o when did camelia become so strict
Ulti m: my $vacation = 42; say "<div> $vacation.abs() </div>" 22:16
camelia rakudo-moar 43e4bf: OUTPUT«<div> 42 </div>␤»
masak tony-o: always?
RabidGravy biatch
tony-o there was a time where no 'my' was necessary
masak japhb: probably shouldn't inject strings directly into HTML anyway... :)
tony-o: I don't believe there was.
tony-o i seent it
masak I think you are mistaken.
Ulti m: say "<div> @*ARGS </div>"
camelia rakudo-moar 43e4bf: OUTPUT«<div> @*ARGS </div>␤»
japhb masak: If I generated the data, I'm not so worried. But yes, [insert security discussion here]
masak Ulti: [] 22:17
tony-o it was loose, like the -e parameter of running perl6 from cli
Ulti erk
masak japhb: *nod*
tony-o i remember seeing it and thinking it looked weird
Ulti m: say "<div> @*ARGS[] </div>"
camelia rakudo-moar 43e4bf: OUTPUT«<div> </div>␤»
tony-o {tony@boondocks:~/projects}% perl6 -e '$a = 42; $a.say;'
42
masak well, you're right about -e
tony-o no error there
22:17 espadrine_ left
masak right. 22:17
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
camelia rakudo-moar 43e4bf: OUTPUT«say $*PROGRAM.IO.slurp␤»
RabidGravy but the REPL was like that until recently too
tony-o ah
Ulti -___-
22:18 Hor|zon joined
Ulti that wasnt the quine I was looking for 22:19
22:19 bin_005 left
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.
Ulti as in within an EVAL its a different program
guess that makes sense given the $* ness 22:20
masak japhb: ugh.
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.)
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.
japhb Yes, quite.
masak japhb: no, I haven't. but I've been reading a bit about it.
japhb Any good links? 22:22
masak not really. sorry.
japhb Sigh, ah well.
22:23 Hor|zon left
masak sounds like the kind of thing where you write plenty of tests and then somehow get an implementation doing everything you want. :) 22:23
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:24
masak "SWIG barrier"? 22:25
AlexDaniel m: say WHAT WHAT WHAT WHAT 'test'
camelia rakudo-moar 5d1ec3: OUTPUT«(Str)␤»
AlexDaniel when one WHAT is not enough
RabidGravy I could do with supporting c++ libraries
masak .oO( WHAT WHAT, in the (Str) )
jnthn masak: Gah :P 22:26
masak :P
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
masak japhb: I think "it's important to always know which language you're in" applies fully in your scenario. 22:27
22:30 virtualsue left
japhb smls, masak: Yeah, there's also the question of what escaping each piece actually *wants* to have. 22:34
Mason had a good way of dealing with this, back in the day 22:35
22:35 Begi1 joined
masak japhb: which was? 22:35
22:35 Begi left
masak is not familiar with Mason 22:35
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
(In this case, by ending the interpolation with a vertical bar and a set of one-letter escape designations)
japhb looks to see if he can find an example 22:37
masak sounds nice.
'night, #perl6
22:38 spider-mario left
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:
metacpan.org/pod/Mason::Plugin::HTMLFilters 22:39
g'night, masak, Begi1!
22:39 nightfrog left 22:40 yqt joined 22:42 piotr_ left 22:43 Begi1 left 22:50 bjz left
RabidGravy nighty night all 22:52
22:57 RabidGravy left
dalek kudo-star-daily: 4c1e10e | coke++ | log/ (9 files):
today (automated commit)
23:00
rl6-roast-data: 89c06f7 | coke++ | / (9 files):
today (automated commit)
23:06 virtualsue joined
jnthn sleep & 23:10
23:13 virtualsue left 23:16 amurf joined 23:18 Calibellus joined 23:19 Hor|zon joined, brisby joined
smls m: (grammar { token TOP { <a(42, :x)> }; method a (*@_, *%_) { dd @_, %_; exit } }).parse(""); 23:20
camelia rakudo-moar 5d1ec3: OUTPUT«[42, Bool::True]<>␤{}<>␤»
smls ^^ shouldn't named args be passed to grammar methods like to normal ones?
23:22 dolmen left 23:24 Hor|zon left 23:28 inokenty left 23:33 [Coke] left, jnthn left, sergot left, jnthn joined, [Coke] joined, sergot joined, dg left, moritz left, moritz joined 23:36 dg joined 23:37 laouji joined 23:42 [Tux] left