Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-05-17

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:12 fhelmberger joined #perl6
00:18 rurban joined #perl6
00:33 xenoterracide__ joined #perl6
00:45 chenryn joined #perl6
01:03 Sqirrel joined #perl6
01:12 klapperl joined #perl6
01:14 chenryn joined #perl6
01:16 rurban joined #perl6
01:37 vendethiel seems like perl can't ever find my module
01:38 vendethiel oh, it's okay
01:55 Su-Shee_ joined #perl6
02:19 rurban joined #perl6
02:23 Khisanth joined #perl6
02:24 thou joined #perl6
02:35 plobsing joined #perl6
02:38 hoverboard joined #perl6
03:21 rurban joined #perl6
03:24 colomon_ joined #perl6
03:36 Alula joined #perl6
03:37 rurban joined #perl6
03:43 xragnar_ joined #perl6
04:12 Alula joined #perl6
04:13 SamuraiJack__ joined #perl6
04:46 xenoterracide__ joined #perl6
05:01 rindolf joined #perl6
05:03 oetiker joined #perl6
05:15 oetiker joined #perl6
05:15 jules_ joined #perl6
05:16 thou joined #perl6
05:36 rurban joined #perl6
05:38 skids joined #perl6
05:39 rurban1 joined #perl6
05:40 xinming joined #perl6
05:44 SevenWolf joined #perl6
05:55 igorsutton joined #perl6
06:13 hoverboard joined #perl6
06:13 fhelmberger joined #perl6
06:25 zacts so I wonder if ideas have been pondered about using llvm in some way for perl6
06:27 tadzik pondered, yeah, I think someone even tried to build something at some point
06:27 zacts tadzik: oh cool
06:27 tadzik https://github.com/ekiru/Bennu there
06:27 tadzik it looks dead though
06:28 tadzik thing is, llvm is nice and all, but is also, as the name suggests, low-level
06:28 tadzik so it's not exactly fitting perl 6
06:28 zacts ok
06:50 rurban joined #perl6
06:54 Woodi morning hackatownicy and * :)
07:00 Woodi I was reading Observer pattern aka Publish-Subscribe in Go4 and it is described in terms of notifications... Implementations may vary but maybe sometimes Supplies could just work as notifications of change/availability ?
07:02 Woodi btw. there are many methods/filters in Supplies/Rx... maybe sometimes a general mechanism like FSM for generating events could be usefull ?
07:21 timotimo morning *
07:23 darutoko joined #perl6
07:29 FROGGS morning
07:29 lizmat commuting&
07:30 timotimo jnthn: i'm confused. i have num and Num candidates for the bindpos_n methods; the one where bindpos_n was used with no type in the signature weren't meant to be bindpos_n and i fixed that now
07:35 woolfy left #perl6
07:52 rurban joined #perl6
07:56 kurahaupo joined #perl6
07:58 kurahaupo left #perl6
08:02 Timbus joined #perl6
08:06 lizmat joined #perl6
08:09 tadzik itz starting \o/
08:18 molaf joined #perl6
08:20 woolfy joined #perl6
08:28 jnthn Woodi: Supplies *are* an implementation of the observer pattern.
08:40 sergot_ \o/
08:50 FROGGS joined #perl6
08:53 rurban joined #perl6
08:55 vendethiel mh, I can't pass what I want to remove to `trim-trailing` :( ?
09:02 vendethiel m: my %p = {v => {p => ('a',)}};say %p<v><p>.perl;
09:02 camelia rakudo-moar 641398: OUTPUT«$("a",)␤»
09:03 vendethiel why is that $() ?
09:03 vendethiel m: say (1,).perl;
09:03 camelia rakudo-moar 641398: OUTPUT«(1,)␤»
09:09 lizmat lotrortk
09:11 vendethiel what
09:12 FROGGS joined #perl6
09:13 lizmat lknjasljhjh=
09:13 lizmat what can I day, not quite awake yet ?
09:14 lizmat *say
09:14 lizmat sigh
09:14 lizmat :-)
09:14 spider-mario joined #perl6
09:16 telex joined #perl6
09:17 vendethiel there's no glob ? mmh :(
09:17 vendethiel m: say dir('**/*').perl
09:17 camelia rakudo-moar 641398: OUTPUT«Failed to get the directory contents of '**/*': Failed to open dir: 2␤  in block  at src/gen/m-CORE.setting:14104␤  in any  at /home/p6eval/rakudo-inst-1/languages/perl6/runtime/CORE.setting.moarvm:1␤  in method contents at src/gen/m-CORE.setting:141…»
09:18 vendethiel http://doc.perl6.org/routine/dir => the link to IO::Path 404s
09:22 vendethiel and it seems it actually only returns IO::Path, even for files.
09:27 vendethiel https://github.com/Nami-Doc/Sprockets.pl/blob/master/lib/Sprockets/Locator.pm6 'did what i could
09:29 * lizmat wonders what a Sprockets::Locator is
09:30 vendethiel lizmat: Sprockets is a ruby library for asset management (filters, caching, dep, etc)
09:38 dmol joined #perl6
09:39 FROGGS joined #perl6
09:55 denis_boyun joined #perl6
09:56 rurban joined #perl6
09:57 vendethiel joined #perl6
09:57 Rotwang joined #perl6
10:09 vendethiel m: 1 and (say 1) && (say 2)
10:09 camelia rakudo-moar 641398: OUTPUT«1␤2␤»
10:14 fhelmberger joined #perl6
10:15 FROGGS n: 1 and (say 1) && (say 2)
10:15 camelia niecza v24-109-g48a8de3: OUTPUT«1␤2␤»
10:15 FROGGS is that right?
10:17 vendethiel a bit surprising to me
10:18 SamuraiJack__ joined #perl6
10:22 dalek rakudo/eleven: 6413980 | (Geoffrey Broadwell)++ | src/core/Temporal.pm:
10:22 dalek rakudo/eleven: Fix incorrect order of operations in sleep-timer()
10:22 dalek rakudo/eleven: review: https://github.com/rakudo/rakudo/commit/64139808a7
10:22 dalek rakudo/eleven: 840d16d | (Tobias Leich)++ | / (103 files):
10:22 dalek rakudo/eleven: Merge branch 'nom' of github.com:rakudo/rakudo into eleven
10:22 dalek rakudo/eleven: review: https://github.com/rakudo/rakudo/commit/840d16d13e
10:22 dalek rakudo/eleven: 44ad975 | (Tobias Leich)++ | src/ (4 files):
10:22 dalek rakudo/eleven: Merge branch 'eleven' of github.com:rakudo/rakudo into eleven
10:22 dalek rakudo/eleven: review: https://github.com/rakudo/rakudo/commit/44ad97578c
10:31 dalek panda/depends: 3be5bd5 | (Andrew Egeler)++ | lib/Panda/Builder.pm:
10:31 dalek panda/depends: Remove old Build class when using Build.pm
10:31 dalek panda/depends:
10:31 dalek panda/depends: If two packages with Build.pm files were installed during the same panda
10:31 dalek panda/depends: run (example: "panda install MIME::Base64 Auth::PAM::Simple"), the
10:32 dalek joined #perl6
10:45 dalek rakudo/nom: a672ad9 | (Elizabeth Mattijsen)++ | src/core/Any.pm:
10:45 dalek rakudo/nom: Add MMD candidates for simple Callables
10:45 dalek rakudo/nom:
10:45 dalek rakudo/nom: for grep, grep-index, first, first-index, last-index
10:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a672ad9e6d
10:47 hummeleB1 joined #perl6
10:51 dalek rakudo/eleven: 3f8e0e1 | (Tobias Leich)++ | src/core/CompUnitRepo/Local/Installation.pm:
10:51 dalek rakudo/eleven: unbreak CompUnitRepo.install
10:51 dalek rakudo/eleven:
10:51 dalek rakudo/eleven: We cannot use Hash.v (because it does not exists) and also not Hash:v, because it will
10:51 dalek rakudo/eleven: complain about storing something into Pairs.
10:51 dalek rakudo/eleven: review: https://github.com/rakudo/rakudo/commit/3f8e0e1729
10:57 lizmat oops, FROGGS++
10:57 FROGGS :o)
10:58 rurban joined #perl6
10:59 dalek panda/depends: d2e4608 | (Tobias Leich)++ | lib/Panda/Bundler.pm:
10:59 dalek panda/depends: s/$*EXECUTABLE_NAME/$*EXECUTABLE/
10:59 dalek panda/depends: review: https://github.com/tadzik/panda/commit/d2e460898e
11:00 masak I wonder if Supply.migrate isn't really the "join" (or μ) transformation of a monad.
11:00 masak the signature for it is right: T(T(A)) -> T(A)
11:00 * masak is listening to jnthn++'s Reactive Programming talk for the first time
11:07 timotimo oooh the video is up now?
11:11 itz joined #perl6
11:13 virtualsue joined #perl6
11:13 FROGGS timotimo: no, we're seeing him live...
11:14 timotimo jnthn: please explain again what you meant with the num candidate? i have num and Num candidates
11:14 timotimo oooh!
11:14 timotimo i'm jealous
11:14 vendethiel same.
11:14 colomon_ o/
11:14 vendethiel masak: sounds like join to me :)
11:14 * colomon_ knows not why he has an underscore this morning.
11:40 pippo joined #perl6
11:41 pippo o/ #perl6
11:42 pippo Little typo to be corrected at doc.perl6.org/type/EnumMap
11:42 pippo say %e.values;  # prints "1 2\n" if the previous line # printed "a b\n", "b a\n" otherwise
11:42 pippo should be say %e.values;  # prints "1 2\n" if the previous line # printed "a b\n", "b a\n" otherwise
11:42 pippo should be say %e.values;  # prints "1 2\n" if the previous line # printed "a b\n", "2 1\n" otherwise
11:43 colomon_ pippo++
11:43 pippo :-)
11:43 pippo o/
11:43 pippo left #perl6
11:44 prevost joined #perl6
11:55 nnunley joined #perl6
12:00 rurban joined #perl6
12:00 Rotwang joined #perl6
12:01 rindolf joined #perl6
12:02 bowtie joined #perl6
12:10 masak vendethiel: but is Supply a monad and a comonad? I think the latter. (but I'm not really good at distinguishing them yet)
12:13 dalek rakudo/nom: 74b5674 | (Elizabeth Mattijsen)++ | src/core/Any.pm:
12:13 dalek rakudo/nom: Properly MMD grep/first and friends
12:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/74b5674385
12:16 zakharyas joined #perl6
12:19 vendethiel masak: a monad is something with a safe wrapping operation (and an unsafe unwrapping one). A comonad is something with a safe unwrapping (but an unsafe wrapping)
12:19 masak ooh
12:19 masak that's gonna make it a lot easier to think about.
12:19 vendethiel masak: in most cases, these kind of constructs don't respond to the monad laws, because of exception semantics
12:20 vendethiel (ie they don't respect the right identity law)
12:20 masak ok, I see how List (for example) has a safe wrapping operation. you just take e to [e], right.
12:20 masak and there's no natural way to go the other way, because lists can have several elements -- which by the way leads to some hilarity in Perl 5.
12:20 vendethiel (so I've heard)
12:21 masak $ perl -E 'my $a = (5, 6, 7); say $a'
12:21 masak 7
12:21 jlaire you can do that in C, too :P
12:21 masak $ perl -wE 'my @a = (5, 6, 7); my $b = @a; say $b'
12:21 masak 3
12:21 vendethiel it'd be the first, though :)à
12:21 jlaire int x = (5, 6, 7);
12:22 masak ^ hilarity
12:22 vendethiel jlaire: but the comma isn't a list operator in C :). It's merely a semicolon operator at the statement level
12:22 masak heck, that should be the prototypical example of "there's no safe unwrapping" :)
12:22 vendethiel hahaha
12:22 jlaire vendethiel: my point exactlyl, the comma is also a sequencing operator in scalar context in Perl 5
12:22 jnthn o/
12:23 jnthn I gived my talk :)
12:23 masak moving on, what does it mean for Supply to have safe unwrapping but no safe wrapping?
12:23 masak jnthn++
12:23 jnthn timotimo: Link to latest gist?
12:26 vendethiel masak: a monad has `return` (Monad a => a -> m a), whereas a comonad has a `extract` (Comonad w => w a -> a)
12:26 FROGGS m: class Foo { my $.thing = 42 }; say Foo.thing
12:26 camelia rakudo-moar a672ad: OUTPUT«(Any)␤»
12:26 jnthn r: class A { my $.x = 42 }; A.x = 69; say A.x
12:27 vendethiel masak: Supply is something that can be used to wrap values and you have to use its flatMap (.tap I think ?) to get a value
12:27 camelia rakudo-jvm a672ad: OUTPUT«(timeout)»
12:27 camelia ..rakudo-{parrot,moar} a672ad: OUTPUT«69␤»
12:27 Rotwang joined #perl6
12:29 masak vendethiel: so, aha. a List[e] is an "e consumer" and a Supply[e] is an "e producer"
12:30 vendethiel masak: colist is the comonad of list
12:30 masak vendethiel: but... what does it mean for Supply to have no safe wrapping.
12:30 masak ?
12:31 vendethiel masak: doesn't supply have a wrapping operation ?
12:31 vendethiel or is it something else ? I don't really know supply
12:32 masak m: given Supply.for(1..10,1..10) { .tap(&say) }
12:32 camelia rakudo-moar a672ad: ( no output )
12:32 masak hm.
12:32 masak seems I don't really know it either :)
12:32 jnthn .for currently runs asynchronously
12:32 masak m: my $s = Supply.new; $s.tap(&say); $s.more("OH HAI")
12:32 camelia rakudo-moar a672ad: OUTPUT«OH HAI␤»
12:32 masak \o/
12:32 masak vendethiel: is any of that wrapping? I don't see it.
12:32 jnthn That's probably not great.
12:33 vendethiel masak: wrapping would be .more, wouldn't it ?
12:33 masak oh yes.
12:33 masak you're right.
12:33 vendethiel but Supply is not really a monad, so you have to look in a weird way to see it :)
12:33 masak what makes it "not safe"?
12:33 masak in the way List[e] -> e is not safe.
12:34 jnthn vendethiel: It lazy lists are a monad, then supplies are a monad too...
12:34 masak well, comonad.
12:34 vendethiel masak: I think it's a monad
12:35 vendethiel there's no safe unwrapping for Supply
12:35 vendethiel [14:26] <vendethiel> masak: Supply is something that can be used to wrap values and you have to use its flatMap (.tap I think ?) to get a value
12:35 masak ok...
12:36 masak I would expect it to be a comonad, since we've used duality to get observables from lists.
12:36 kivutar joined #perl6
12:36 masak or from iterables/enumerables, more exactly.
12:37 vendethiel masak: what would be `extract` for supply then ?
12:37 Woodi jnthn: I'm probably more then bad in explaining things... Supplies/Rx push _elems_ to receivers what is one possible implementation of Observer pattern. Other is: subscribing objects could be just _notified_ about available elems, and then receivers can get value
12:38 masak vendethiel: well, .tap is a kind of `extract`, I think.
12:38 vendethiel masak: no, it's a fmap
12:38 denis_boyun_ joined #perl6
12:38 masak oh, ok.
12:38 vendethiel masak: an extract would mean you could do `my $a = $s.tap;`
12:39 masak Woodi: I fail to see the significant difference.
12:39 masak vendethiel: yes, you're right.
12:39 masak .tap is an fmap.
12:40 masak I think Erik Meijer said that Supply (well, Observable) is a comonad.
12:41 * masak falls back to Appeal to Authority
12:41 * vendethiel doesn't really like erik meijer
12:42 vendethiel but then again, maybe somebody who knows what they're talking about would be better
12:43 masak :)
12:43 masak maybe I should instead ask: what's a colist, and what is a use case for one?
12:45 rurban joined #perl6
12:45 Woodi masak: for example receivers can skip intermediate updates. when updates are pushed sometimes it can fire additional unneeded updates somewhere else in the chain of supplies. I think observer patter is not the same as triggers
12:46 timotimo https://github.com/jnthn/zavolaj/pull/40/files ← jnthn
12:46 Woodi but it's implementation dependend, just saying...
12:48 jnthn timotimo: yeah, that looks fine to me.
12:48 masak Woodi: seems to me there's a trivial isomorphism between (a) receiving a value and conditionally ignoring it, and (b) receiving a notification about an update and conditionally getting the value.
12:49 timotimo jnthn: cool, feel free to merge that, then
12:49 masak Woodi: that's why I don't see any significant difference.
12:49 dalek zavolaj: ac41467 | (Timo Paulssen)++ | lib/NativeCall.pm6:
12:49 dalek zavolaj: assign_pos for CArray
12:49 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/ac41467a3d
12:49 dalek zavolaj: 92c8f2d | (Timo Paulssen)++ | lib/NativeCall.pm6:
12:49 dalek zavolaj: these weren't meant to be num methods.
12:49 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/92c8f2d012
12:49 dalek zavolaj: 2cd79b0 | jonathan++ | lib/NativeCall.pm6:
12:49 dalek zavolaj: Merge pull request #40 from timo/assign_pos_carray
12:49 dalek zavolaj:
12:49 dalek zavolaj: assign_pos for CArray
12:49 dalek zavolaj: review: https://github.com/jnthn/zavolaj/commit/2cd79b0e87
12:49 timotimo i hope it also works. somebody ought to test it :P
12:50 timotimo All tests successful.
12:50 timotimo that doesn't sound too bad. though i don't know if it actually gets tested :)
12:50 jnthn *sigh* You didn't run the tests before sending the PR? :P
12:51 masak lizmat: subtests show up in prove without the -v option -- probably shouldn't.
12:51 masak I just ran the spectests. failures in S17-supply/on.t and S17-supply/watch_path.t
12:51 timotimo jnthn: i did now! :)
12:52 timotimo if the observer is moving at the right speed between where i wrote the code and where i sent the PR from, it could conceivably be that i tested it before i sent the pull request
12:52 timotimo because relativity!
12:54 jnthn I thought I was feeling heavy 'cus of all the pizza but no, it's because relativity :P
12:57 timotimo did your talk get recorded again?
12:57 jnthn I saw a video camera :)
12:58 masak m: use v5; my $a = (5, 6, 7); say $a
12:58 camelia rakudo-moar a672ad: OUTPUT«5 6 7␤»
12:58 masak FROGGS: ^ bug
12:58 timotimo i wonder if the recording from this talk will be up before the one from plpw will be
12:58 masak FROGGS: where do I submit 'use v5' bugs?
12:58 timotimo that was plpw, wasn't it?
12:58 jnthn masak: uh...is that actually really using v5?
12:58 FROGGS no
12:58 masak oh. :)
12:59 masak how do I try 'use v5' things using camelia?
12:59 timotimo i don't think we can do that yet
12:59 masak I see.
12:59 jnthn And when we can it'll likely be star: ...
12:59 FROGGS 'use v5' is noop right now here
12:59 FROGGS someday it will be in star, yeah
13:00 FROGGS hopefully in <3months or so
13:00 jnthn lovemonths?
13:00 FROGGS maybe a bit more, dunno
13:00 FROGGS *g*
13:00 masak in lovemonths, gotcha.
13:00 FROGGS there are only lovemonths :o)
13:01 jnthn FROGGS: What's the blocker? "Just" getting the patch on Rakudo eliminated?
13:01 FROGGS jnthn: yes
13:01 FROGGS well, and then it is "only" about getting closer and closer to Perl 5
13:04 jnthn FROGGS: If we were to get that patched into Rakudo in the next days, we could have it in the monthly, and get v5 into the next star in theory, no?
13:05 FROGGS jnthn: yes, this should be no problem at all
13:05 FROGGS that's the patch btw: https://github.com/rakudo-p5/v5/blob/master/rakudo.patch
13:07 timotimo and it could be in the weekly, too :)
13:10 flussence .oO( I have a feeling this christmas is going to be "the" one :)
13:11 timotimo every christmas is the christmas
13:11 vendethiel masak: good question :)
13:12 vendethiel masak: https://github.com/ekmett/comonad/blob/master/src/Control/Comonad.hs
13:12 * masak looks
13:12 vendethiel (that's for comonad, not colist - can't find good stuff for colist)
13:14 vendethiel I found an article but it's wrong
13:14 masak really interesting question during lizmat++'s talk: what's the percentage of pure perl modules on CPAN?
13:15 masak things that complicate the answer: (a) dependencies might not be pure Perl, and (b) the DarkPAN is largely not using XS.
13:16 timotimo is DarkPAN just a word for "modules that are not uploaded to the CPAN"?
13:16 masak yes.
13:16 timotimo want to put it into S99?
13:16 timotimo :)
13:16 masak it's a thing that Perl 5 Porters take quite seriously.
13:16 masak timotimo: oki.
13:16 timotimo right. "how will this change affect the DarkPAN"?
13:17 masak right.
13:17 timotimo right.
13:17 masak (b) means we'll never know the "real" answer.
13:18 masak I would still like to actually traverse CPAN and find out the answer, with and without (a).
13:18 timotimo mhm
13:20 SamuraiJack__ joined #perl6
13:21 dalek specs: 6feffb1 | masak++ | S99-glossary.pod:
13:21 dalek specs: [S99] "DarkPAN" entry
13:21 dalek specs:
13:21 dalek specs: Nobody expects the Spanish Darkquisition!
13:21 dalek specs: review: https://github.com/perl6/specs/commit/6feffb160a
13:21 timotimo the Panish Darkquisition?
13:21 masak hehe
13:22 jnthn .oO( СPANish inquisition )
13:22 lizmat masak: do the subtest show up without indentation ?
13:24 masak lizmat: yep.
13:24 lizmat ah?
13:24 * masak chuckles at the word "Cokleisli" in the .hs source file above
13:24 masak lizmat: would you like a gist?
13:25 masak oh wait
13:25 masak hold on -- I'm stupid, that's what.
13:25 masak lizmat: never mind :/
13:26 masak yeah, everything works.
13:26 nebuchadnezzar joined #perl6
13:26 masak PEBKAC
13:28 masak anyway, here's the failed tests stats:
13:28 masak t/spec/S17-supply/on.t -- Failed tests:  4-5
13:28 masak t/spec/S17-supply/watch_path.t -- Failed tests:  7, 9, 11, 13, 15, 17, 19, 22-23
13:36 masak in t/spec:
13:36 masak $ git grep -c sleep | perl6 -ne 's/^ <-[:]>+ \://; our $sum; $sum += $_; END say $sum'
13:36 masak 92
13:36 masak :/
13:36 masak 58 of those are in S17-*/
13:36 masak I bet a lot of those can be eliminated by using Scheduler cleverly.
13:37 * masak just gave a TDD course where he said "you should inject time, not sleep literally -- unfortunately, it's not done so often in practice..."
13:38 jnthn masak: Yeah, I mentioned we could use a TestScheduler-alike, as Rx does. If you're curious enough to implement it... ;-)
13:38 masak I am.
13:38 jnthn In theory it's not much code
13:38 masak I see that as a potential win for the S17 tests.
13:38 jnthn See the Scheduler interface.
13:38 jnthn Me too :)
13:38 masak *nod*
13:39 jnthn uh, s/interface/role/ :)
13:39 masak first in my queue, though: :expires for .squish
13:39 jnthn ooh :)
13:40 jnthn ++masak # squishing NYIs
13:40 FROGGS timotimo: you might enjoy: http://www.infoq.com/presentations/invokedynamic - by jnthn++
13:41 xenoterracide__ joined #perl6
13:42 jnthn I just identified the minimum revert needed to unbust Panda builds against HEAD MoarVM that various folks have seen (the SEGV happened around compiling Builder.pm)
13:42 dalek rakudo/nom: d154cc8 | (Elizabeth Mattijsen)++ | src/core/SupplyOperations.pm:
13:42 dalek rakudo/nom: Fix Supply.grep for Regexes
13:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d154cc815b
13:43 dalek roast: 6f14b03 | (Elizabeth Mattijsen)++ | S17-supply/grep.t:
13:43 dalek roast: Add tests for Supply.grep(Regex)
13:43 dalek roast: review: https://github.com/perl6/roast/commit/6f14b03411
13:44 lizmat jnthn ^^^
13:44 lizmat should fix oddness you've seen
13:47 cognominal jnthn++ for  http://www.infoq.com/presentations/invokedynamic
13:48 * masak half-expected cognominal to make a French pun about invokedynamic
13:49 cognominal I can't think of any
13:49 masak ;)
13:52 cognominal jnthn has the right mix of informality and precision in his presentations that makes them so enjoyable
13:54 jnthn .oO( Not sure precisely informal, or informally precise... )
14:00 cognominal s :g /interesting/really hard/    from jnthn's sublanguage to mine
14:04 * masak .oO( www.preciselyinformal.org )
14:16 vendethiel m: say 5 ?? $_ : 0;
14:16 camelia rakudo-moar 74b567: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/UxrhFTb1hzâ�¤Please use !! rather than :â�¤at /tmp/UxrhFTb1hz:1â�¤------> [32msay 5 ?? $_ [33mâ��[31m: 0;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        infix or …»
14:16 vendethiel m: say 5 ?? $_ !! 0;
14:16 camelia rakudo-moar 74b567: OUTPUT«Nil␤»
14:16 vendethiel mmh.
14:17 lizmat m: .say
14:17 camelia rakudo-moar 74b567: OUTPUT«Nil␤»
14:18 lizmat vendethiel: apparently $_ is by default Nil in the repl ?
14:19 vendethiel lizmat: I was just looking to see if I could get the ternary's "topic"
14:19 jnthn ?? doesn't topicalize
14:20 jnthn You can do that with if foo() -> $x { ... } or so
14:22 lizmat which makes much more sense then the Perl 5 idiom:   if my $x = foo() { say $x }
14:24 jnthn gets the scoping righter
14:25 masak it's nice -- I use it occasionally for "interesting values of True".
14:25 jnthn aye
14:25 masak it's kinda cool that it just falls out of the principle that "blocks (even those in syntactic forms) can also have signatures"
14:26 lizmat p5: if ( my $x = 0 ) { } else { print "$x\n" }
14:26 lizmat perl5: if ( my $x = 0 ) { } else { print "$x\n" }
14:26 masak ENOP5
14:26 lizmat $ perl -e ' if ( my $x = 0 ) { } else { print "$x\n" }'
14:26 lizmat 0
14:27 lizmat even weirder: $ perl -e ' if ( my $x = 0 ) { } else { } print "$x\n"'
14:27 lizmat
14:28 lizmat so, it *is* in the scope of the if/else but not outside
14:28 lizmat $ perl -we ' if ( my $x = 0 ) { } else { } print "$x\n"'
14:28 lizmat Found = in conditional, should be == at -e line 1.
14:28 lizmat Name "main::x" used only once: possible typo at -e line 1.
14:28 lizmat Use of uninitialized value $x in concatenation (.) or string at -e line 1.
14:30 * lizmat <3 Perl 6
14:32 cognominal What jnthn describes in plan b looks like a simplified version of http://bibliography.selflanguage.org/_static/pics.pdf    There are other papers and it is used in v8.
14:37 vendethiel oh, I've spent 30 min trying to understand what happened then I remember perl6 does list flattening :(
14:43 vendethiel ooh ... I'm using $ and not @ ...
14:50 vendethiel that'll take some time to sink ...
14:50 vendethiel But I hope what I'm doing will be useful to web frameworks in the future :)
14:50 xinming joined #perl6
14:55 masak workshop over for the day
14:55 masak &
15:05 PZt joined #perl6
15:16 molaf_ joined #perl6
15:21 skids left #perl6
15:22 darutoko joined #perl6
15:27 rurban1 joined #perl6
15:30 lizmat joined #perl6
15:32 woolfy joined #perl6
15:39 FROGGS joined #perl6
15:43 vendethiel masak: I use it a lot
15:47 vendethiel m: class A { has $.a; method m(:$.a) {say $.a} }; my $a = A.new; say $a.perl; $a.m(a => 6); say $a.perl;
15:47 camelia rakudo-moar d154cc: OUTPUT«A.new(a => Any)␤Cannot find method 'STORE'␤  in method m at /tmp/VGrBqogIkR:1␤  in block  at /tmp/VGrBqogIkR:1␤␤»
15:47 vendethiel it's a bit surprising that $.a has to be rw in this case
15:47 vendethiel (because it makes it public)
15:48 TimToady try it with :$!a instead
15:48 TimToady $.a is the virtual interface
15:48 vendethiel m: class A { has $.a; method m(:$!a) {say $.a} }; my $a = A.new; say $a.perl; $a.m(a => 6); say $a.perl;
15:48 camelia rakudo-moar d154cc: OUTPUT«A.new(a => Any)␤6␤A.new(a => 6)␤»
15:49 vendethiel Ah, alright. thanks TimToady
15:49 vendethiel .oO( my autocomplete is gettign tired of all these tim )
15:50 TimToady make case sensitive :)
15:50 vendethiel even with `use v6;` p6 complains that "this looks like p5 code"
15:50 vendethiel just because I don't know properly how to do a module that exports functions, meh !
15:51 * TimToady starts looking around for his MJD quotations...
15:52 * vendethiel tries to look for the difference between module and package
15:52 TimToady packages don't export
15:53 TimToady packages don't export in P5 either, but the way you turn a package into a module in P5 is not by using the keyword "module", is all
15:54 TimToady you make a module by installing something that can export to 'use', and in P6 you do that by saying 'module'
15:54 TimToady (or 'class')
15:55 TimToady (or 'grammar')
15:55 TimToady but in both P5 and P6, a package is just a place to poke symbols
15:55 dmol joined #perl6
15:56 TimToady P6 just makes it look more declarative to go beyond that
16:03 anaeem1 joined #perl6
16:10 guru joined #perl6
16:17 zby_home joined #perl6
16:46 vendethiel to "poke symbols"?
16:47 * vendethiel even expected our to have an `is export`-ish behavior, but fixed his code
16:48 chenryn joined #perl6
16:50 TimToady 'our' is the sense of 'globally nameable', like Yellowstone Park, not in the sense of "cultural imperialism", like the whole world must acquire the values of Hollywood
16:51 TimToady we don't export Yellowstone, but you know where to find it
16:52 hoverboard joined #perl6
16:52 TimToady cultural imperialism would be bad in a programming language, because it would violate the rule of the programmer knowing what language they're using
16:53 vendethiel ah, alright.
16:53 vendethiel There's no construct to only import some names from a module, is there ?
16:53 jules_ left #perl6
16:54 TimToady sure, use Foo <just these names>;
16:54 TimToady or there are tags
16:54 vendethiel I really dig that.
16:55 vendethiel mmh, and I just learned about `need`.
16:56 TimToady equivalent to P5's use Foo ();
16:56 vendethiel yeah, I'm reading through S11 (trying to find alias if they exist)
16:57 vendethiel on the other hand, you can force a program to have any symbol with :mandatory,right ? even if they don't `use $ <it>`
16:57 * TimToady doesn't remember the specifics :)
16:59 TimToady or whether rakudo implements any such thing...
16:59 vendethiel ah, there's apparently no aliasing
17:00 pschwenn joined #perl6
17:05 pschwenn joined #perl6
17:06 pschwenn_ joined #perl6
17:07 denis_boyun joined #perl6
17:09 TimToady you can always alias anything that is visible
17:09 chenryn joined #perl6
17:09 TimToady for the rare occasions you need to, that's probably sufficient
17:13 sqirrel joined #perl6
17:23 [Sno] joined #perl6
17:35 xilixy joined #perl6
17:35 xilixy left #perl6
17:38 vendethiel joined #perl6
17:47 anaeem1_ joined #perl6
17:52 BenGoldberg joined #perl6
17:55 Vlavv joined #perl6
18:04 araujo joined #perl6
18:05 zakharyas joined #perl6
18:06 flussence I've done good today... more crashes caused than chars of code added :)
18:07 vendethiel "batman does good - you did well" :P
18:12 ingy that's all week and good but...
18:12 ingy grr
18:12 * ingy returns to being lame
18:15 fhelmberger joined #perl6
18:15 hoverboard joined #perl6
18:20 cognominal joined #perl6
18:21 anaeem1__ joined #perl6
18:32 rurban joined #perl6
18:33 SamuraiJack__ joined #perl6
18:38 chenryn joined #perl6
18:38 vendethiel #` comments are so hard to type on an azerty :[
18:39 vendethiel .u 「
18:39 yoleaux U+300C LEFT CORNER BRACKET [Ps] (「)
18:46 dmol joined #perl6
18:47 mj41 joined #perl6
19:03 vendethiel .
19:03 vendethiel m: say 'ping'
19:03 camelia rakudo-moar d154cc: OUTPUT«ping␤»
19:12 vendethiel joined #perl6
19:37 rurban joined #perl6
19:44 kst` joined #perl6
19:46 hoverboard joined #perl6
19:59 rurban1 joined #perl6
20:02 anaeem1 joined #perl6
20:09 kurahaupo joined #perl6
20:15 kurahaupo left #perl6
20:18 zakharyas1 joined #perl6
20:19 igorsutton joined #perl6
20:20 igorsutton_ joined #perl6
20:25 vendethiel m: my $s; sub a { UNDO $s = 1; fail "foo" }; try a; say $s;
20:25 camelia rakudo-moar d154cc: OUTPUT«1␤»
20:27 vendethiel m: sub do-stuff-with-db($param) {   state $db = get-db-cnt(); ENTER $db.start-transaction; KEEP $db.commit; UNDO $db.rollback; }
20:27 camelia rakudo-moar d154cc: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ItfhErpIysâ�¤Undeclared routine:â�¤    get-db-cnt used at line 1â�¤â�¤Â»
20:27 vendethiel m: sub do-stuff-with-db($param) {   state $db = get-db-cnt(); ENTER $db.start-transaction; KEEP $db.commit; UNDO $db.rollback; }; sub get-db-cnt { True }
20:27 camelia rakudo-moar d154cc: ( no output )
20:27 rurban joined #perl6
20:28 * vendethiel is showing off p6 to yet another one
20:32 timotimo o/
20:32 vendethiel o/ timotimo
20:37 xragnar joined #perl6
20:40 Sqirrel joined #perl6
20:42 rurban1 joined #perl6
20:44 flussence m: await( (^10).map: { start { say $_ } } )
20:44 camelia rakudo-moar d154cc: OUTPUT«0␤1␤2␤435␤␤6␤7␤8␤9␤␤»
21:01 rurban joined #perl6
21:07 pippo_ joined #perl6
21:17 rurban joined #perl6
21:25 btyler joined #perl6
21:26 dmol joined #perl6
21:29 timotimo i can't watch the presentation on invokedynamic and i would have to sign up to download the mp3 file :\
21:30 vendethiel ah, looks like I missed the link somehow
21:30 * vendethiel thanks perlgeek.de
21:30 denis_boyun___ joined #perl6
21:33 timotimo signing up requires *lots* of info
21:43 vendethiel this talk starts with a good reminder about a great thing wrt perl 6 : it's good with dealing with known unknown
21:48 SevenWolf joined #perl6
21:51 timotimo the ipv6 in this place seems very flaky
21:51 timotimo and i don't see a simple "turn ipv6 off" thingie in network manager
21:52 geekosaur gnome network manager? afaik you can go into the interface properties, ipv6 tab, set to link-local
21:52 geekosaur you can't shut it off entirely but link local might as well be off since it's non-routable
22:02 colomon joined #perl6
22:20 rurban joined #perl6
22:35 FROGGS joined #perl6
23:05 vendethiel joined #perl6
23:13 bjz joined #perl6
23:22 rurban joined #perl6
23:38 hoverboard joined #perl6

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

Perl 6 | Reference Documentation | Rakudo