Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-05-19

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 Juerd m: sub forty-two { 42 }; say 123 ~~ &forty-two;
00:00 camelia rakudo-moar e39ce3: OUTPUT«42␤»
00:00 Sgeo Ooh. Except that doesn't necessarily play nice with `when`
00:00 Sgeo Unless the result of `when` is visible?
00:01 Juerd Please note that not many people can read minds. Can you explain what you mean with 'play nice with when'?
00:01 Sgeo m: $_ = 5; when {$^x + 1} { say $_ }
00:01 camelia rakudo-moar e39ce3: OUTPUT«5␤»
00:01 Sgeo How can I get 6 from there?
00:02 Sgeo AFK
00:02 Juerd I don't think you can
00:04 Juerd It would be a bit weird to use 'when' as a topicalizer, because it itself operates on the topic, which means that there will already be one.
00:04 Juerd On the other hand, when &closure -> $x { ... } would perhaps be nice.
00:04 Juerd Currently it throws an error that I don't understand (Too few positionals passed; expected 1 but got 0)
00:05 Juerd (Okay, I do understand it, but I think it's unclear.)
00:07 sortiz m: say 5 ~~ (-> $a {$a + 1})
00:07 camelia rakudo-moar e39ce3: OUTPUT«6␤»
00:08 Juerd sortiz: If I understand Sgeo correctly, they want to somehow capture that return value with 'when'.
00:08 Juerd It works with if:
00:09 Juerd m: given 5 { if $_ ~~ { $^x + 1 } -> $six { say $six } }
00:09 camelia rakudo-moar e39ce3: OUTPUT«6␤»
00:10 sortiz I don't really understand what Sgeo want :-)
00:11 Juerd Well, if I do:
00:11 sortiz But a capture can smartmatch a signature also:
00:11 Juerd m: given 5 { when { $^x + 1 } -> $six { say $six } }
00:11 camelia rakudo-moar e39ce3: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block  at /tmp/OQDT0HnejC line 1␤  in block <unit> at /tmp/OQDT0HnejC line 1␤␤»
00:11 sortiz m: say \('foo') ~~ :(Int $a); say \(5) ~~ :(Int $a)
00:11 camelia rakudo-moar e39ce3: OUTPUT«False␤True␤»
00:17 ssotka joined #perl6
00:18 MasterDuke joined #perl6
00:26 vendethiel joined #perl6
00:28 colomon joined #perl6
00:34 cpage_ joined #perl6
00:36 BenGoldberg joined #perl6
00:45 pierre joined #perl6
00:46 BenGoldberg joined #perl6
00:52 aries_liuxueyang joined #perl6
00:57 BenGoldberg joined #perl6
00:58 vendethiel joined #perl6
00:59 astj joined #perl6
01:02 Sgeo "To really bind to a signature, use the * pattern to delegate binding to the when statement's block instead."
01:02 Sgeo m: given 5 { when * -> $a { say $a } }
01:02 camelia rakudo-moar e39ce3: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block  at /tmp/99ACLCT1ga line 1␤  in block <unit> at /tmp/99ACLCT1ga line 1␤␤»
01:02 Sgeo http://design.perl6.org/S03.html#Smart_matching
01:02 Sgeo Blah
01:03 BenGoldberg joined #perl6
01:08 Sgeo m: 5 ~~ (5|6)
01:08 camelia rakudo-moar e39ce3: ( no output )
01:08 Sgeo m: say (5 ~~ (5|6))
01:08 camelia rakudo-moar e39ce3: OUTPUT«True␤»
01:10 AlexDaniel Sgeo: what are you trying to do?
01:10 AlexDaniel MadcapJake: http://www.mattermost.org/
01:10 AlexDaniel MadcapJake: and https://www.mattermost.org/why-we-made-mattermost-an-open-source-slack-alternative/
01:14 AlexDaniel m: { say * }(42)
01:14 camelia rakudo-moar e39ce3: OUTPUT«*␤»
01:14 AlexDaniel hehe
01:14 timotimo sub calls are borders through which auto-currying wth Whatever will not go
01:17 Sgeo auto-currying?
01:18 cpage_ joined #perl6
01:20 * Sgeo vaguely considers writing the ff operator in Haskell
01:21 Sgeo Wait, no
01:26 kurahaupo joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:52 vendethiel joined #perl6
01:57 zakharyas joined #perl6
02:03 tokuhirom joined #perl6
02:04 Sgeo m: say 5.VAR
02:04 camelia rakudo-moar e39ce3: OUTPUT«5␤»
02:05 Sgeo ??
02:05 Sgeo m: my $a = 5; say $a.VAR
02:05 camelia rakudo-moar e39ce3: OUTPUT«5␤»
02:05 MasterDuke joined #perl6
02:09 MasterDuke i've profiled the rakudo build, but the resulting profile is kind of large (700mb). p6profiler-qt wouldn't open it because of a file size limitation for qjsondocuments. i recompiled qt with a larger limit, but now the oom killer kills the process before i can view the profile
02:09 MasterDuke and suggestions that don't involve me buying more ram?
02:10 gfldex add more swap and go to bed while it muches the data
02:11 MasterDuke yeah, that's probably my next attempt
02:12 MasterDuke i tried cutting some things out of gen/moar/m-CORE.setting (to hopefully make a resulting profile of its build smaller), but make complained about a missing magic number
02:13 AlexDaniel MasterDuke: how much memory do you have?
02:14 MasterDuke 8gb
02:23 cpage_ joined #perl6
02:27 Sgeo I still struggle to understand any mutability model that isn't Rust's
02:28 Sgeo (Well, no, I understand them, I just... ugh)
02:38 mohae_ joined #perl6
02:39 MadcapJake AlexDaniel: yeah mattermost looks awesome but it's not provided as a service so would require a machine.
02:40 MadcapJake m: my $a = 'a'; $a.VAR.say; $a.VAR.WHAT.say; $a.WHAT.say # <-- Sgeo
02:40 camelia rakudo-moar e39ce3: OUTPUT«a␤(Scalar)␤(Str)␤»
02:40 AlexDaniel MadcapJake: that can be solved. Unlike proprietary jail
02:42 MadcapJake very true, but it's not like we don't rely on another proprietary jail: GitHub
02:42 MadcapJake (maybe not as "jailish" as Slack)
02:42 jack_rabbit joined #perl6
02:43 AlexDaniel yes, it's a problem
02:43 AlexDaniel but it does not mean that we should tolerate other jails :)
02:46 MadcapJake AlexDaniel: I concur! I'm honestly not opposed to kiboshing the whole thing, it really didn't gain any traction and we especially didn't get any outsiders involved (which was my intention)
02:46 MadcapJake like so many fads, people joined and never said a word :P
02:49 MadcapJake For me, IRCCloud is a nice alternative; it has a lightly Slack-inspired interface, supports inline pastebin services, inline videos/music, and has a great mobile app and notifications.
02:50 MadcapJake and if I ever buck up and get a membership: unlimited backlogs and more than 2 IRC servers (right now I really only use freenode and OFTC but I would like to connect to Gnome's)
02:51 AlexDaniel wait what, IRC client that is not gratis?
02:52 MadcapJake well they do have a large github presence but I'm not sure if it's all there: https://github.com/irccloud
02:53 geekosaur the reason hexchat exists is that the xchat windows port went nonfree
02:57 MadcapJake I just can't stand any of the IRC clients out there. It's mostly an aesthetics thing but the only nice looking one, Polari, is really buggy and slow still.
02:58 * geekosaur is on linux. butt ugly is a given. >.<
02:58 noganex_ joined #perl6
02:58 MadcapJake Also the backlogs are really awesome, I leave the website open as an Epiphany webapp and I can click "X unread messages" and it moves be back to where I left off when I last was using it.
02:59 pierre joined #perl6
02:59 MadcapJake I am too! Gnome Shell though so it's mostly really nice looking :)
03:00 BenGoldberg joined #perl6
03:04 pierre joined #perl6
03:04 adu joined #perl6
03:07 willthechill joined #perl6
03:09 vendethiel joined #perl6
03:16 ssotka joined #perl6
03:28 cpage_ joined #perl6
03:39 Sgeo For objects just meant to represent some data, do I make its fields rw or not?
03:39 Sgeo Such an easy question to answer in Rust and Haskell, for more... mutable languages, I don't know
03:40 Sgeo Rust the fields inherit the mutability of whatever they're in, which goes up to the variable the object is stored in (there's an escape hatch to add mutability). In Haskell, it's just immutable.
03:43 adu Sgeo: to rw or not to rw, that is the question...
03:43 adu whether 'tis nobler in the mind to suffer the slings and arrows of mutability...
03:49 cpage_ joined #perl6
03:50 aries_liuxueyang joined #perl6
03:53 aries_liuxueyang joined #perl6
03:59 ugexe does it need to be mutable? then make it mutable. does it not need to be mutable? then dont make it mutable. the longer answer depends on which one allows you to write cleaner code. thats all
04:00 aries_liuxueyang joined #perl6
04:06 drforr1 joined #perl6
04:08 BenGoldberg Sgeo, Just make sure that methods which mutate an object are easily distinguished from those which don't.  For example, go read the story of why Moonpig::DateTime was created.
04:11 Sgeo Thanks for reminding me that I really should go retreat into Rust again
04:11 Sgeo Even "mutable" methods don't enable action-at-a-distance unless you do extra stuff
04:15 ugexe thats certainly one way to extremely verbose code
04:15 ugexe to write
04:19 Sgeo Moonpig::DateTime
04:19 Sgeo oops
04:19 Sgeo sub as-many($head, *@rest)
04:19 Sgeo Should that example use **@rest as a better practice for newbies to emulate?
04:19 Sgeo https://learnxinyminutes.com/docs/perl6/
04:19 tokuhirom joined #perl6
04:19 Sgeo (I don't actually know which is typical, but docs gave the impression **@rest is preferred, I think)
04:20 ugexe those arent the same
04:20 ugexe m: sub foo($head, *@rest) { say @rest.perl }; foo(1, [1,2])
04:20 camelia rakudo-moar e39ce3: OUTPUT«[1, 2]␤»
04:20 ugexe m: sub foo($head, **@rest) { say @rest.perl }; foo(1, [1,2])
04:20 camelia rakudo-moar e39ce3: OUTPUT«[[1, 2],]␤»
04:21 Sgeo If someone's writing that sort of function and isn't sure which sort of API to provide, then it's still a decision where one or the other might be better
04:24 ugexe better depends entirely on what they are doing with it
04:24 ugexe its not a matter of best practice
04:24 ssotka joined #perl6
04:25 aries_liuxueyang joined #perl6
04:26 ugexe m: sub foo1($head, **@rest) { say @rest.perl }; sub foo2($head, *@rest) { say @rest.perl }; foo1(1, [2,3], 4); foo2(1, [2,3], 4)
04:26 camelia rakudo-moar e39ce3: OUTPUT«[[2, 3], 4]␤[2, 3, 4]␤»
04:29 adu joined #perl6
04:32 Sgeo Are multi-subs scoped?
04:32 ugexe m: sub foo1($head, **@rest is raw) { say @rest.perl }; sub foo2($head, *@rest is raw) { say @rest.perl }; foo1(1, [2,3], 4); foo2(1, [2,3], 4); # or maybe this is what you're after
04:32 camelia rakudo-moar e39ce3: OUTPUT«([2, 3], 4)␤(2, 3, 4)␤»
04:33 Sgeo m: multi f(Str $foo) { say "Str"; }; do { multi f(Int $foo) { say "Int"; }; f(5); }; f(6);
04:33 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AqGoOfkLRp␤Calling f(Int) will never work with any of these multi signatures:␤    (Str $foo)␤at /tmp/AqGoOfkLRp:1␤------> 3ti f(Int $foo) { say "Int"; }; f(5); }; 7⏏5f(6);␤»
04:33 Sgeo m: multi f(Str $foo) { say "Str"; }; do { multi f(Int $foo) { say "Int"; }; f(5); };
04:33 camelia rakudo-moar e39ce3: OUTPUT«Int␤»
04:34 Sgeo Hmm, interesting
04:34 Sgeo Helps alleviate some of my concern about conflicting trait names... I think
04:35 aries_liuxueyang joined #perl6
04:38 vendethiel joined #perl6
04:47 Cabanossi joined #perl6
04:56 aries_liuxueyang joined #perl6
05:07 vendethiel joined #perl6
05:25 CIAvash joined #perl6
05:28 pierre_ joined #perl6
05:33 pierre_ joined #perl6
05:42 vendethiel joined #perl6
05:51 domidumont joined #perl6
05:55 domidumont joined #perl6
06:00 tardisx joined #perl6
06:15 timotimo Unrecognized character name BOX DRAWINGS $weight HORIZONTAL
06:15 timotimo grmbl
06:16 timotimo i'm *not* going to use EVAL for this :)
06:16 buharin hiho
06:17 Amnez777 joined #perl6
06:17 grondilu joined #perl6
06:19 timotimo we don't seem to have nqp::codepointfromname anywhere in the CORE setting
06:19 domidumont joined #perl6
06:20 domidumont joined #perl6
06:24 Sgeo m: role Foo {}; say ((0 but Foo) ~~ Foo)
06:24 camelia rakudo-moar e39ce3: OUTPUT«True␤»
06:24 Sgeo Neat
06:24 vendethiel joined #perl6
06:29 tokuhirom joined #perl6
06:30 firstdayonthejob joined #perl6
06:34 masak morning, #perl6
06:37 sjn good morning, masak & #perl6 :)
06:37 * masak .oO( I was greeted in a junction )
06:38 _mg_ joined #perl6
06:41 jjido joined #perl6
06:44 sjn hm. what happens when one uses different junctions on two overlapping durations?
06:45 timotimo it'll be like a cross operator
06:45 * sjn would imagine an & would work on a timeline like a "merge", and a "| like a "branch"
06:45 Amnez777 joined #perl6
06:45 sjn :)
06:50 telex joined #perl6
06:51 RabidGravy joined #perl6
06:54 jjido joined #perl6
06:54 moritz actually & is a branch followed by a merge, and | is just a branch
06:56 masak that... doesn't sounds dual enough
06:57 masak sound*
06:59 vendethiel joined #perl6
06:59 moritz is there a Standard of Duality that dictates that all important concepts must come with sufficient Duality? :-)
06:59 jjido joined #perl6
06:59 CIAvash joined #perl6
07:00 masak ...
07:00 masak yes! :)
07:01 * masak realizes that people who haven't been smashed in the head by Category Theory might not be aware of this
07:03 El_Che x
07:04 masak m: say "x <--- you are here"
07:04 camelia rakudo-moar e39ce3: OUTPUT«x <--- you are here␤»
07:06 abraxxa joined #perl6
07:07 wamba joined #perl6
07:14 rindolf joined #perl6
07:17 BinGOs joined #perl6
07:20 avenj joined #perl6
07:30 * RabidGravy concludes that something similar to AttributeFacade but using an attribute rather than the invocant would make GTK::Simple happier
07:34 dakkar joined #perl6
07:36 darutoko joined #perl6
07:38 trkldoi joined #perl6
07:38 avenj joined #perl6
07:45 baest joined #perl6
07:50 vendethiel joined #perl6
07:51 RabidGravy and me happier, I've typed "method foo() { Proxy.new: FETCH => { gtk_somewidget_get_foo($!gtk_widget) }, STORE => $, $val { gtk_somewidget_set_foo($!gtk_widget, $val) } }" too many times already
08:07 domidumont joined #perl6
08:07 sno joined #perl6
08:14 pierre_ joined #perl6
08:32 huggable joined #perl6
08:35 araujo joined #perl6
08:38 aries_liuxueyang joined #perl6
08:39 pierre_ joined #perl6
08:39 pierre_ joined #perl6
08:55 domidumont joined #perl6
08:58 gregf_ hello morning
08:58 gregf_ can roles be instantiated too?
08:59 gregf_ m: role Foo { method test(){ say "what"; } }; 0 but Foo.test(); # like this
08:59 camelia rakudo-moar e39ce3: OUTPUT«what␤»
09:00 jnthn Not directly. Attempting to will create a "pun" of the role, which is formed by doing the equivalent of `class :: does TheRole { }`. Your method call is then forwarded to that
09:00 gregf_ similar to a Java interface
09:00 jnthn (And it is cached, so we don't do that expensive computation every time)
09:02 gregf_ oh, expensive computation as in applying the role?
09:02 jnthn Yes
09:03 gregf_ ok - thanks jnthn!
09:08 domidumont joined #perl6
09:08 gregf_ jnthn: and can roles be applied programmatically? *i know its silly to apply a role to an instance*
09:09 wamba joined #perl6
09:09 gregf_ like so, something like this in Moose: package Foo { use Moose::Role; sub bar { print "Barred!"; } 1; } package Bar { use Moose; 1; } my $bar = Bar->new; Foo->meta->apply($bar); $bar->bar();my $bar1 = Bar->new; $bar1->bar();
09:13 gregf_ anyways, i'll stick to the basics. *digressing*
09:14 eiro joined #perl6
09:14 eiro hello everyone
09:15 dalek gtk-simple: 0d097d0 | RabidGravy++ | / (2 files):
09:15 dalek gtk-simple: Add editable, cursor-visible properties to TextView
09:15 dalek gtk-simple:
09:15 dalek gtk-simple: Closes #8
09:15 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/0d097d0514
09:16 labster1 joined #perl6
09:16 RabidGravy gregf, yes you can
09:17 RabidGravy run-time application is with "does" on an instance
09:17 RabidGravy so, e.g. "my $a = SomeClass.new;   $a does SomeRole;"
09:17 jnthn Ah, programatically as in "to an instance"...what RabidGravy said. You can use the MOP to programatically create classes too
09:18 gregf_ RabidGravy: ah - so simple :)
09:19 RabidGravy or if you want to do it do a type object of some class then you  use "but"
09:19 RabidGravy e.g.   "constant RoleClass = ( SomeClass but SomeRole)"
09:19 gregf_ yeah
09:20 RabidGravy you don't need to use a constant
09:20 gregf_ i just tried this: role Foo { method bar(){ say "Bar"; }}; class Bar {}; my $b = Bar.new; $b does Foo; $b.bar(); # its like plain english :)
09:20 gregf_ RabidGravy: jnthn cheers!
09:21 RabidGravy yeah,  it's a lovely thing
09:30 raoulvdberge joined #perl6
09:30 vendethiel joined #perl6
09:49 araujo joined #perl6
10:03 jjido joined #perl6
10:18 vendethiel joined #perl6
10:45 kid51 joined #perl6
10:52 RabidGravy who was it that was saying that they'd like to see a Glade/GtkBuilder thingy in GTK::Simple?
10:52 RabidGravy anyhow whoever they are they could help by fixing https://github.com/perl6/gtk-simple/pull/16 so it is mergeable
10:53 kaare_ joined #perl6
10:53 Xliff joined #perl6
10:54 awwaiid What's the latest on rakudo-js? For the last several weeks I've been playing with Opal (ruby→js compiler) and it has been great fun; I'm looking forward to porting some of my learnings to p6 :)
10:56 RabidGravy there seem to have been lots of commits
10:56 RabidGravy haven't the faintest whether it actually works or not
10:56 moritz http://blogs.perl.org/users/pawel_murias/ has the progress reports
10:58 awwaiid ok cool
10:58 awwaiid thanks! :)
10:59 AlexDaniel joined #perl6
11:00 RabidGravy so actually it's in pretty good shape
11:02 kaare_ What's the actual goal for this. If succesfull, will it be able to compete with Angular and React, or does it have another focus?
11:03 timotimo just running perl6 code in a browser, and on node.js
11:05 JimmyZ we have another way, compile moarvm with Emscripten
11:05 awwaiid kaare_: I've played with react as a lib that you then wrap in language-specific apis, so clojurescript/reagent, opal(ruby)/react.rb, and it has been very fun.
11:05 JimmyZ :)
11:07 awwaiid kaare_: clojurescript+reagent+figwheel is magical. The server-side is a dancer like setup with nice clean restful api, then the client-side is organized into individual components. Figwheel opens up a websocket for dev-mode -- any time you save a file it is pushed up to the client and eval'd, and the way react separates out state makes it so you are still in the same place of your application but with new code. Does the same pushing up css. Then goes be
11:08 awwaiid kaare_: I want to bring all those things to rakudo-js :)
11:11 awwaiid kaare_: https://www.youtube.com/watch?v=BEFi14LlOHA is a 2 minute demo of a version of this for opal(ruby) of similar technology (though the video is already outdated -- updates are basically instant now)
11:14 RabidGravy if anyone uses or has an opinion on GTK::Simple please feel free to comment on https://github.com/perl6/gtk-simple/issues/29
11:16 zero-one joined #perl6
11:21 brrt joined #perl6
11:27 vendethiel joined #perl6
11:33 rindolf joined #perl6
11:36 Amnez777 joined #perl6
11:39 rindolf joined #perl6
11:51 |2701 joined #perl6
12:06 nicqbot joined #perl6
12:06 vendethiel joined #perl6
12:08 masak m: role R[R ::T] {}
12:08 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xVnU0SCArC␤Invalid typename 'R' in parameter declaration.␤at /tmp/xVnU0SCArC:1␤------> 3role R[R7⏏5 ::T] {}␤»
12:08 masak should this be allowed?
12:08 masak (restricting the parameter of a role to the role itself)
12:09 timotimo how do you actually instantiate this, then? :)
12:09 timotimo the parameter needs to be of R, but its parameter needs to be of R, too, which means its parameter itself has to be of R
12:09 moritz role T does R[R] { }
12:09 moritz role S does R[T] { }
12:10 timotimo but can you put R[R]? doesn't it have to be R[R[R[R[R[R[...]]]]]]
12:11 moritz ah right
12:11 moritz but you could
12:11 moritz m: role R[R ::T = R] { }
12:11 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RPdqd7fgqV␤Invalid typename 'R' in parameter declaration.␤at /tmp/RPdqd7fgqV:1␤------> 3role R[R7⏏5 ::T = R] { }␤»
12:11 timotimo oh, really?
12:11 moritz well, you could, if it worked
12:11 moritz but [..] is just a signature
12:11 timotimo what is R, though? roles don't have "type objects"
12:12 timotimo oh, actually they do
12:12 moritz so you can add optional parameters
12:12 timotimo right
12:12 timotimo would have to be very careful with this so that using the T parameter doesn't cause some punning somewhere, which would immediately fail due to no parameterization?
12:13 moritz yes, would have to be very careful :-)
12:13 moritz not saying it should work, just that one can imagine a language variant where that works
12:13 timotimo mhm
12:20 pierre_ joined #perl6
12:24 tokuhirom joined #perl6
12:32 daxim joined #perl6
12:38 pmurias joined #perl6
12:38 pmurias awwaiid: I'll write another progress report today as I have been neglecting those recently
12:39 pmurias kaare_: the goal is not to compete with angular and react but to use those *from* Perl6
12:39 timotimo awesome!
12:40 pierre_ joined #perl6
12:45 brrt joined #perl6
12:49 RabidGravy I keep meaning to make something that does similar to what AngularJS and a couple of other things do wrt updating the view when the model changes in some way
13:01 domidumont joined #perl6
13:04 pmurias http://blogs.perl.org/users/pawel_murias/2016/05/working-on-getting-the-perl-6-setting-to-compile.html
13:07 vendethiel joined #perl6
13:16 dalek doc: 7102514 | (Christopher Bottoms)++ | doc/Type/Int.pod:
13:16 dalek doc: code formatted Int
13:16 dalek doc: review: https://github.com/perl6/doc/commit/710251448e
13:16 dalek doc: e2dcd75 | RabidGravy++ | doc/Type/Int.pod:
13:16 dalek doc: Merge pull request #525 from molecules/patch-1
13:16 dalek doc:
13:16 dalek doc: code formatted Int in the documentation for the polymod routine for Int
13:16 dalek doc: review: https://github.com/perl6/doc/commit/e2dcd753bd
13:23 ocbtec joined #perl6
13:25 tokuhirom joined #perl6
13:31 pierre_ joined #perl6
13:33 masak pmurias++ # blag
13:33 masak pmurias: s/leather/lather/
13:33 aborazmeh joined #perl6
13:33 aborazmeh joined #perl6
13:33 tadzik I thought leather is some meme there :)
13:34 tadzik pmurias++
13:34 nicqbot joined #perl6
13:34 araujo joined #perl6
13:34 araujo joined #perl6
13:37 Actualeyes joined #perl6
13:38 vendethiel joined #perl6
13:41 araujo_ joined #perl6
13:42 lizmat joined #perl6
13:43 araujo__ joined #perl6
13:45 araujo__ joined #perl6
13:51 mst joined #perl6
13:53 jast joined #perl6
14:05 tony-o MadcapJake: can i pm?
14:09 vendethiel joined #perl6
14:12 itaipu joined #perl6
14:13 yqt joined #perl6
14:21 * masak .oO( compile-time error: attempt to verb Patrick Michaud )
14:22 eiro masak: is it a good idea to start from xml-writer to have an indented version ?
14:22 tadzik it's kind of funny in polish
14:22 tadzik "werbować" means "to recruit"
14:22 MadcapJake tony-o: sure!
14:22 eiro i wonder if a fresh start (with objects and methods like .id, .class) would be better
14:23 tony-o eiro: as a rewrite ?
14:25 brrt masak: did you ever get further with the trinity thing...
14:25 eiro not a rewrite: an OO based abstraction over html node
14:26 eiro (eventually using XML::Writer beneath its .str method
14:26 brrt i really appreciated that article :-)
14:26 tony-o it'd be nice to be able to use libxml - i think froggs was working on it a while back so i didn't pick it up
14:27 wamba joined #perl6
14:28 masak eiro: too long since I looked at XML::Writer, sorry
14:28 rindolf joined #perl6
14:28 masak eiro: suspect starting over might be better, at least in the short term
14:28 RabidGravy yeah, XML (which is what I'm using in XML::Class( is awfully, awfully slow right now
14:28 masak brrt: not significantly, no. still plan to.
14:29 eiro masak: thanks
14:29 RabidGravy didn't someone sketch an expat binding in an advent post? I'm surprised it didn't hit the ecosystem
14:29 brrt i'm... kind of wrapping my head arround whether the three-tier thing is a pain point or a good thing
14:30 brrt although, we do have to some extent a trinity-like-language, and it is javascript
14:30 tony-o RabidGravy: i looked at expat bindings over a year ago and didn't pursue, i'm assuming by now that froggs has abandoned libxml or my searching isn't fruitful
14:30 brrt in the sense that it runs in all contexts (although it still maintains barriers between them)
14:30 pmurias joined #perl6
14:32 RabidGravy tony-o, looks like he hasn't touched it since September https://github.com/FROGGS/p6-XML-LibXML
14:32 eiro ok ... why not just use perl6 to generate the output?
14:32 eiro will it be that faster to write a NativeCall extrension? worth to deal with external dependencies
14:33 timotimo yeah, it'll likely be a few hundred times faster, unless you have to make a lot of calls
14:33 tony-o eiro: writing an NC to parse the XML will be less portable but significantly faster
14:34 eiro i'm only speaking about the serializer. the parser is an Emmet one
14:34 eiro i wrote it as example for the talk i want to give at FPW
14:34 RabidGravy Ah, here's the article https://perl6advent.wordpress.com/2015/12/21/day-21-nativecall-backs-and-beyond-c/
14:35 tony-o eiro: like timotimo said, NC [sh|w]ould be much faster
14:35 eiro YA meeting ... got to go. i'll be back soon
14:41 cdg joined #perl6
14:41 AlexDaniel I don't want to get into this unicode vs texas debate any further…
14:42 pierre__ joined #perl6
14:42 nemo ♥ unicode
14:42 nemo unicode 4eva!
14:45 tony-o you guys in austin, tx ?
14:45 * lizmat is
14:45 lizmat going to expo floor&
14:47 molaf joined #perl6
14:49 pmurias joined #perl6
14:50 dalek doc: 96ae37f | (Tom Browder)++ | doc/Language/functions.pod:
14:50 dalek doc: fix typo
14:50 dalek doc: review: https://github.com/perl6/doc/commit/96ae37f9d2
14:50 dalek doc: 6a7c020 | (Tom Browder)++ | doc/Language/functions.pod:
14:50 dalek doc: really back to phasers, and add a comma
14:50 dalek doc: review: https://github.com/perl6/doc/commit/6a7c02012b
14:50 dalek doc: 8c3819e | RabidGravy++ | doc/Language/functions.pod:
14:50 dalek doc: Merge pull request #523 from tbrowder/func-pod-fix
14:50 dalek doc:
14:50 dalek doc: fix typo
14:50 dalek doc: review: https://github.com/perl6/doc/commit/8c3819ea0b
14:50 vendethiel joined #perl6
14:59 pmurias joined #perl6
15:01 lizmat joined #perl6
15:02 * lizmat waves from OSCON expo floor
15:12 yoleaux joined #perl6
15:15 domidumont joined #perl6
15:15 domidumont left #perl6
15:20 kaare_ joined #perl6
15:21 maybekoo2 joined #perl6
15:21 dogbert17 o/ # perl6
15:22 * dogbert17 wonders if masak is around
15:22 huf ...tuit?
15:26 kaare_ pmurias: I have a hard time imagening the toolchain. Any examples around? I mean, you write react in ES6 or 7 or whatever, and compile with npm
15:26 kaare_ Where does p6 fit in?
15:27 timotimo you write react in p6 instead of es6
15:27 timotimo like you would write react in typescript or coffeescript or what have you
15:27 kaare_ ok, that's nice (I guess)
15:30 * mst is probably going to write an @has decorator for ES6
15:30 MadcapJake I guess?
15:35 ssotka joined #perl6
15:36 MadcapJake kaare_: it could look something like `use React; my $hello-message = React.new(render => { create-element 'div', Nil, 'Hello ', %!props<name> }); render($hello-message, :name<John>)`
15:37 kaare__ joined #perl6
15:37 MadcapJake oops forgot the mountNode arg to render, but that's the idea at least
15:38 kaare_ MadcapJake: Yes; I guess it's nice.
15:38 mohae joined #perl6
15:39 MadcapJake xD I'm confused by your use of "I guess".  It seems to imply that you're not really sure how nice it is :P
15:40 kaare_ Well, I'm not, Are you?
15:40 mst I think the expansion may be more "I suppose I can see how people might find it nice, but I'm not sure personally I see the point"
15:40 mst certainly that's how I feel about this
15:40 kaare_ I have to try it out myself to evaluate the niceness
15:40 MadcapJake kaare_: at least 1 developer thinks its nice for every language listed here: https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js
15:42 MadcapJake mst: the "point" of a compile-to-js language (or to have js be a compilation target) is that it removes the need to manage multiple languages when writing your web site/app stack.  Node.js is incredibly popular for the reverse reasoning: "I already know front-end JS, why not use it in my server!"
15:43 dalek gtk-simple: d5a943d | RabidGravy++ | lib/GTK/Simple.pm6:
15:43 dalek gtk-simple: All "properties" are now handle by a trait
15:43 dalek gtk-simple:
15:43 dalek gtk-simple: This is a slightly modified version of AccessorFacade that uses
15:43 dalek gtk-simple: WIDGET to get the object to pass as the first argument.
15:43 kaare_ MadcapJake: And this is the other way around, and that's good.
15:43 dalek gtk-simple:
15:43 dalek gtk-simple: There is one that has been left because it takes two arguments
15:43 dalek gtk-simple:
15:43 dalek gtk-simple: Closes #28
15:43 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/d5a943d427
15:43 mst MadcapJake: which part of "I suppose I can see how people might find it nice" suggested to you that I didn't know that?
15:44 MadcapJake mst: the part where "people" doesn't include you :)
15:44 mst because I'm perfectly happy being a polyglot
15:44 kaare_ mst is not in the "people" set. I guess ;-)
15:45 MadcapJake mst: ok, that's certainly a perspective on this that I can understand.  I think part of the appeal of a JS target is the result of "shiny syndrome" wherein we get to use our favorite pet language in a new interesting way
15:46 mst a JS target to allow me to write a piece of domain logic once and use it on both client and server would be relevant to my interests
15:46 mst writing my reactjs code in not-JS, less so
15:47 mspo dart?
15:47 mspo elm?
15:48 mst currently I'm quite enjoying ES6 as 'close enough to what runs in the browser to be comfortable to debug but with enough extra features that I don't get annoyed as often'
15:48 araujo joined #perl6
15:50 araujo joined #perl6
15:50 MadcapJake mst: yeah I think ES6 is a huge leap forward in JS usability
15:50 M-matthew joined #perl6
15:50 mst use strict + let + arrow function notation
15:50 mst is ... enough
15:51 erdic joined #perl6
15:51 mst though I could do with 'has', hence considering writing it
15:52 MadcapJake mst: are decorators available through Babel?
15:53 mohae_ joined #perl6
15:55 mst MadcapJake: yes
15:55 mst I'm using babel+react+mobx atm
15:56 MadcapJake mobx looks nifty!
15:58 awwaiid As an example of this in Opal(ruby)/React.rb, here is the app I've been playing with -- https://github.com/awwaiid/reactrb-elephant/blob/master/app/example.rb . You could translate this ruby code very directly into p6.
15:59 pmurias kaare_: react is a library, you can use it from javascript (or Perl 6 compiled to javascript)
16:03 vendethiel joined #perl6
16:04 pmurias kaare_: there is JSX which allows you to use some syntax sugar which we will replace with a dsl
16:05 kaare_ pmurias: Thanks, got it now :-)
16:06 pmurias awwaiid: we will be able to have a P6X sugar layer, remember we have slangs
16:06 ssotka joined #perl6
16:12 JustinHitla joined #perl6
16:12 JustinHitla I have thise line: "my %id_port=( 0=>0, 1=>0, );" at the begining of the programm and then later I need to set that "id_port" variable all zeroes in a loop, many times, so what would be better way ? is it using same code again: "%id_port=( 0=>0, 1=>0, );"  or should I use something like "$id_port[0]=0; $id_port[1]=0;" ? I mean first method will
16:12 JustinHitla reallocate new memory right ? so it will be tough for a garbage collector
16:13 rindolf joined #perl6
16:13 awwaiid pmurias: I'm thinking that we don't need to go that far because the base language is already pretty flexible, like the DSL on the ruby example. I do think using the concept of supplies and promises will be very powerful.
16:14 MadcapJake m: my %id-port = 0..10 Z=> 0 xx 10; say %id-port # JustinHitla
16:14 camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 0}␤»
16:14 JustinHitla MadcapJake: what is that ?
16:14 awwaiid JustinHitla: are you running into memory issues, or is this premtive optimization?
16:15 MadcapJake JustinHitla: setting a sequence of keys' values to zero
16:15 MadcapJake actually reassigning to the variable
16:15 JustinHitla awwaiid: I'm interested if there will be memory issues or not at all
16:16 MadcapJake m: my %id-port = 0..10 Z=> 0 xx 10; %id-port{3..5} = 1 xx 3; say %id-port
16:16 camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 1, 4 => 1, 5 => 1, 6 => 0, 7 => 0, 8 => 0, 9 => 0}␤»
16:17 jnthn The `$id_port[0]=0` approach will produce less garbage to collect
16:17 jnthn Though unless the profiles are telling you you're already spending a lot of time in GC...
16:17 awwaiid maybe you could build it up and then clone it when you need it to be reset
16:18 JustinHitla I mean when I create variable at the begining of the programm like  "my %id_port=( 0=>0, 1=>0, );" what is the right way to set it all to zero again, use the same code ? but I want just to set them to zero I don't need to reallocate memory
16:18 jnthn .value = 0 for %id_port; # one way :)
16:18 awwaiid ya, I like that way :)
16:18 JustinHitla really ?
16:19 jnthn Well, it depends, if you just have two keys you might as well just re-assign it :)
16:19 JustinHitla or what if I do this, create 2 variables  "my %id_port=( 0=>0, 1=>0, ); my %id_port_all_zeros=( 0=>0, 1=>0, );" and then I just do "$id_port=$id_port_all_zeros" ?
16:20 JustinHitla jnthn: what if I have this: "my %id_ip=( 0=>[0,0,0,0], 1=>[0,0,0,0] );" will ".value = 0 for %id_ip"; work as well ?
16:20 awwaiid I think that'll copy the top-level reference but not deep-copy, so when you edit $id_port values you'll edit the $id_port_all_zeros values
16:20 JustinHitla so ".value" is a perl6 trick ?
16:22 MadcapJake .value is calling the method "value" on the topic variable which is set by the for loop (in this case it iterates over a list of the pairs of the Hash)
16:24 JustinHitla so if I want to just zet all to zero in %id_ip can I just use "%id_ip=( 0=>[0,0,0,0], 1=>[0,0,0,0] );" or not ?
16:24 dogbert17 if anyone has a moment to review my attempt to doc methods 'IO' and 'SPEC' in IO::Path the gist is here: https://gist.github.com/dogbert17/18381bf2024f59e38ed10af8914ee1c3
16:24 MadcapJake after `rakudobrew build moar` this morning, panda doesn't work (or install via rakudobrew)
16:24 moritz dogbert17: looks good
16:25 tony-o MadcapJake: that happens to me every time i rebuild moar - did you nuke first?
16:25 MadcapJake JustinHitla: I don't see what you'r asking there
16:25 MadcapJake tony-o: oh nope I didn't, thanks!
16:25 [Coke] m: my %id_ip=( 0=>[0,0,0,0], 1=>[0,0,0,0] ); say %id_ip.perl;
16:25 camelia rakudo-moar e39ce3: OUTPUT«{"0" => $[0, 0, 0, 0], "1" => $[0, 0, 0, 0]}␤»
16:26 tony-o MadcapJake: now with logotype icons :-)
16:26 JustinHitla MadcapJake: at least can you tell if ".value = 0 for %id_port;" is only works in perl6 ?
16:26 wamba joined #perl6
16:26 dalek gtk-simple: 0f5fd75 | RabidGravy++ | / (2 files):
16:26 dalek gtk-simple: Implement monospace property on TextView
16:26 dalek gtk-simple:
16:26 dalek gtk-simple: This partially addresses #7 however a more complete solution
16:26 dalek gtk-simple: (allowing setting of an arbitrary font on the widget,) requires
16:26 dalek gtk-simple: the implementation of gtk_widget_set_font_map and all the
16:26 dalek gtk-simple: attendant Pango bizness.
16:26 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/0f5fd756e2
16:26 dogbert17 moritz: many thanks, will commit
16:27 [Coke] JustinHitla: on works in perl6 ... as opposed to where/
16:27 [Coke] *only
16:27 MadcapJake JustinHitla: What? This is #perl6, we're talking about Perl 6 only (most times :P)
16:28 MadcapJake tony-o: nice! looks great!
16:28 moritz and if not, we say what language we talk about :-)
16:29 MadcapJake There's really only two languages that ".value = 0 for %id_port;" would even look normal in and personally I have no idea if that is valid Perl 5, I never learned that language.
16:30 JustinHitla so when you asked do you know perl you asking which perl ?
16:30 MadcapJake huh?
16:30 JustinHitla allright, there is only one perl, perl6
16:30 dalek doc: 9e95b4e | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod:
16:30 dalek doc: Added doc for methods 'IO' and 'SPEC' in IO::Path. moritz++
16:30 dalek doc: review: https://github.com/perl6/doc/commit/9e95b4e63b
16:31 Coleoid_m left #perl6
16:34 tony-o MadcapJake: now i need to go make logotype for all my modules
16:36 MadcapJake tony-o: xD good idea! any idea why my P6Dx icon isn't working? http://modules.zef.pm/search?terms=p6dx
16:36 awwaiid m: my %id_ip=( 0=>[0,0,0,0], 1=>[0,0,0,0] ); say %id_ip.perl; %id_ip{1}[2] = 23; say %id_ip.perl; %id_ip=( 0=>[0,0,0,0], 1=>[0,0,0,0] ); say %id_ip.perl
16:36 camelia rakudo-moar e39ce3: OUTPUT«{"0" => $[0, 0, 0, 0], "1" => $[0, 0, 0, 0]}␤{"0" => $[0, 0, 0, 0], "1" => $[0, 0, 23, 0]}␤{"0" => $[0, 0, 0, 0], "1" => $[0, 0, 0, 0]}␤»
16:37 awwaiid m: my %zero_id_ip=( 0=>[0,0,0,0], 1=>[0,0,0,0] ); my %id_ip = %zero_id_ip; say %id_ip.perl; %id_ip{1}[2] = 23; say %id_ip.perl; %id_ip = %zero_id_ip; say %id_ip.perl
16:37 camelia rakudo-moar e39ce3: OUTPUT«{"0" => $[0, 0, 0, 0], "1" => $[0, 0, 0, 0]}␤{"0" => $[0, 0, 0, 0], "1" => $[0, 0, 23, 0]}␤{"0" => $[0, 0, 0, 0], "1" => $[0, 0, 23, 0]}␤»
16:37 RabidGravy is there anyone else who has an interest in GTK::Simple?  If so please weigh in on https://github.com/perl6/gtk-simple/issues/29 before I just (mostly) unilaterally kebab all the snakey names
16:37 awwaiid JustinHitla: so yes, you can reset it to all zeros directly or through a loop, but if you try to keep the zeros in a variable that won't work because it only copies one layer deep
16:40 RabidGravy MadcapJake, was it you who was saying the Glade support in GTK::Simple would be nice?  If so do you want to take a look at https://github.com/perl6/gtk-simple/pull/16 with a view as to "is it worth the effort" ?
16:40 dalek ecosystem: d629f3f | araraloren++ | META.list:
16:40 dalek ecosystem: Add Getopt::Kinoko
16:40 dalek ecosystem:
16:40 dalek ecosystem: https://github.com/araraloren/Getopt-Kinoko/
16:40 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/d629f3f87a
16:40 dalek ecosystem: b57cf93 | RabidGravy++ | META.list:
16:40 dalek ecosystem: Merge pull request #207 from araraloren/master
16:40 dalek ecosystem:
16:40 dalek ecosystem: Add Getopt::Kinoko
16:40 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/b57cf93845
16:43 gregf_ MadcapJake: Perl5 reads right to left. perl6 reads left to right
16:43 MadcapJake gregf_: really?
16:43 gregf_ like so, my %id_port = map { $_ => 0 } 0..10; #Perl5 == (^10).map( * => 0 ) #Perl6
16:43 MadcapJake ahh i see!
16:44 gregf_ Perl6 imho is a Pure Object Orientated language. everything is a object as in Ruby
16:44 gregf_ s/a/an/
16:45 MadcapJake RabidGravy: I like the example given in the OP but I'm curious how that would be done via Supplies as jnthn mentioned.
16:45 AlexDaniel m: my %id_port = map( * => 0, ^5); say %id_port
16:45 camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
16:45 AlexDaniel m: my %id_port = map * => 0, ^5; say %id_port
16:45 camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
16:45 AlexDaniel m: my %id_port = ^5 .map( * => 0); say %id_port
16:45 camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
16:46 ugexe yeah that was a rather untrue statement
16:48 AlexDaniel m: my %id_port = (^5 .list ==> map * => 0); say %id_port
16:48 camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
16:48 AlexDaniel m: my %id_port = (map * => 0 <== ^5 .list); say %id_port
16:48 camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
16:48 RabidGravy MadcapJake, there's already code in there for connecting a Gtk signal to a P6 callback and thus emitting to a supply
16:48 MadcapJake AlexDaniel++ # the king of TIMTOWTDI ;)
16:49 ugexe m: my @a = map { $_ xx 2 }, <a b>; say @a.perl; my @b <== map { $_ xx 2 } <== <a b>; say @b.perl; <a b> xx 2 R= my @c; say @c.perl
16:49 camelia rakudo-moar e39ce3: OUTPUT«[("a", "a"), ("b", "b")]␤[("a", "a"), ("b", "b")]␤[("a", "b"), ("a", "b")]␤»
16:49 dalek doc: 16fd361 | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod:
16:49 dalek doc: Fixed typo and changed the documentation for the 'path' method
16:49 dalek doc: review: https://github.com/perl6/doc/commit/16fd361cf3
16:50 AlexDaniel oh, I forgot something
16:50 AlexDaniel m: my %id_port = (^5)».&(* => 0); say %id_port
16:50 camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
16:51 MadcapJake wow that one is really cool!
16:51 MadcapJake Didn't know that you could do that with WhateverStar
16:51 ugexe m: my %x is default(0); say %x<1>
16:51 camelia rakudo-moar e39ce3: OUTPUT«0␤»
16:52 AlexDaniel ugexe: well that's cheating
16:52 MadcapJake that one is perfect for JustinHitla's usecase perhaps
16:52 AlexDaniel ah, there's also one more thing…
16:53 MadcapJake how would you call :delete on every key?
16:53 AlexDaniel MadcapJake: just throw away your hash?
16:53 kaare_ joined #perl6
16:53 MadcapJake but then you would lose the `is default(0)` help
16:54 ugexe m: my %x is default(0); %x<a> = 1; %x<b> = 2; %x{*}:delete; say %x.perl
16:54 camelia rakudo-moar e39ce3: OUTPUT«{}␤»
16:54 AlexDaniel m: my %id_port = (^5) »=>« (0 xx 5); say %id_port
16:54 camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
16:55 AlexDaniel m: my %id_port = (^5) X=> 0; say %id_port
16:55 camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
16:55 MadcapJake m: my %x is default(0); %x<a> = 1; %x<b> = 2; %x{*}:delete; say %x<b>
16:55 camelia rakudo-moar e39ce3: OUTPUT«0␤»
16:55 AlexDaniel m: my %id_port = (^5) »=>» 0; say %id_port
16:55 camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
16:55 MadcapJake awesome, that would be the way I'd handle his question
16:56 MadcapJake What's the different between X=> and Z=> ?
16:56 MadcapJake difference*
16:56 araujo joined #perl6
16:57 AlexDaniel m: say 4,8,15 X 16,23
16:57 camelia rakudo-moar e39ce3: OUTPUT«((4 16) (4 23) (8 16) (8 23) (15 16) (15 23))␤»
16:57 AlexDaniel m: say 4,8,15 Z 16,23
16:57 camelia rakudo-moar e39ce3: OUTPUT«((4 16) (8 23))␤»
16:57 MadcapJake oh so it only looks the same because there was only 0 on the RHS
16:57 gregf_ zip?
16:57 AlexDaniel yeah, zip and cross
16:57 gregf_ product and zip in ruby :)
16:58 AlexDaniel you can spell it out if you want
16:58 AlexDaniel m: say cross (1,2,3), (4,5)
16:58 camelia rakudo-moar e39ce3: OUTPUT«((1 4) (1 5) (2 4) (2 5) (3 4) (3 5))␤»
16:58 AlexDaniel m: say zip (1,2,3), (4,5)
16:58 camelia rakudo-moar e39ce3: OUTPUT«((1 4) (2 5))␤»
16:58 AlexDaniel m: say roundrobin (1,2,3), (4,5)
16:58 camelia rakudo-moar e39ce3: OUTPUT«((1 4) (2 5) (3))␤»
16:58 domidumont joined #perl6
16:59 AlexDaniel m: say [X] (1,2,3), (4,5)
16:59 camelia rakudo-moar e39ce3: OUTPUT«((1 4) (1 5) (2 4) (2 5) (3 4) (3 5))␤»
16:59 AlexDaniel or whatever
16:59 AlexDaniel m: say &[X]((1,2,3), (4,5))
16:59 camelia rakudo-moar e39ce3: OUTPUT«((1 4) (1 5) (2 4) (2 5) (3 4) (3 5))␤»
17:00 AlexDaniel I can do that all day long but I think that I'll get back to that awesome thing I was working on…
17:01 kaare__ joined #perl6
17:01 MadcapJake RabidGravy: how would you propose using gtk_builder_connect_signals_full with supplies? just the same way signal_supply handles it?
17:03 JustinHitla m: my %id_port = (0,1).map( * => [0,0,0,0]); say %id_port
17:03 camelia rakudo-moar e39ce3: OUTPUT«{0 => [0 0 0 0], 1 => [0 0 0 0]}␤»
17:03 JustinHitla it works, thanks
17:04 RabidGravy pretty much, but there's probably some sugar to be had in the client code to do that under the hood
17:05 JustinHitla so is there difference between: "%id_port=( 0=>0, 1=>0, )" and  "%id_port = (0,1).map( * => 0)" ?
17:05 nicqbot joined #perl6
17:05 JustinHitla I mean first one should allocate memory every time ?
17:05 JustinHitla so first one will used garbage collector a lot, right ?
17:05 MadcapJake m: my %id_port is default([0,0,0,0]); %id_port<1> = [192,168,0,1]; say %id_port<1>; %id_port{*}:delete; %id_port<1>.say; # JustinHitla, I personally think this is the clearest way
17:05 camelia rakudo-moar e39ce3: OUTPUT«[192 168 0 1]␤[0 0 0 0]␤»
17:06 kaare__ joined #perl6
17:07 JustinHitla so "%id_port{*}:delete" sets all members to '0' ? it doesn't delete anything, right ?
17:08 MadcapJake JustinHitla: http://doc.perl6.org/syntax/%3Adelete
17:08 ugexe it deletes all the keys. anytime you access/vivify a new key it defaults to value 0
17:08 ugexe or whatever is default is
17:09 MadcapJake JustinHitla: it technically uses DELETE-KEY under the hood to remove that key and value from the collection.  The * just says "do it to all keys"
17:10 JustinHitla makes sence
17:10 MadcapJake the `is default` trait says "when there is no key set by user, just provide this value instead"
17:11 ugexe m: my %x is default(100); %x<a> = 1; %x<a> = Nil; say %x<a>;
17:11 camelia rakudo-moar e39ce3: OUTPUT«100␤»
17:11 * MadcapJake .oO( I seem to think that programming concepts can talk... )
17:11 ugexe so the user can still set a key and have the default used
17:18 sufrostico joined #perl6
17:18 ugexe m: my %x is default(-> { warn "setting default"; 0 }()); %x<a> = 1; say %x<a>; say %x<b>
17:18 camelia rakudo-moar e39ce3: OUTPUT«setting default  in block  at /tmp/mBNXZqIqbI line 1␤1␤0␤»
17:19 MadcapJake I think that was run at instantiation of the variable though, right?
17:20 lizmat m: my %h is default(42); %h<a><b>  # wondering if this is an LTA error
17:20 camelia rakudo-moar e39ce3: OUTPUT«Type Int does not support associative indexing.␤  in block <unit> at /tmp/rzZzFbDqlV line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/rzZzFbDqlV line 1␤␤»
17:20 ugexe yeah, i was just seeing
17:21 MadcapJake lizmat: could the error be made aware of it being called on a default-provided value?
17:21 MadcapJake s/called/subscripted/
17:21 lizmat well, I'm not sure it should throw at all
17:21 lizmat setting a default like that shouldn't set a constraint, I don't think
17:22 lizmat I understand why it's happening
17:22 lizmat afk&
17:22 vendethiel joined #perl6
17:27 tokuhirom joined #perl6
17:45 mspo has there been any interest in adding p6 regex to pcre or an external lib?
17:50 masak haven't heard of such interest
17:54 lizmat joined #perl6
17:59 mspo would be nicer than that ruby one that's been going around
18:05 vendethiel joined #perl6
18:18 dogbert17 does anyone want to review the 'new' docs for method 'resolve' in IO::Path, https://gist.github.com/dogbert17/8b4fa796509f18759db69cb42cc61f62
18:19 dogbert17 personally I'm hoping for suggestions on how to improve the text
18:26 avar joined #perl6
18:26 apejens joined #perl6
18:26 DrForr joined #perl6
18:26 gregf_ joined #perl6
18:26 tharkun joined #perl6
18:26 JustinHitla joined #perl6
18:27 jameslenz joined #perl6
18:27 pRiVi joined #perl6
18:27 tomboy65 joined #perl6
18:32 khw joined #perl6
18:32 spider-mario joined #perl6
18:34 olinkl joined #perl6
18:37 dalek doc: ae6d2af | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod:
18:37 dalek doc: Added docs for the method 'resolve' in IO::Path
18:37 dalek doc: review: https://github.com/perl6/doc/commit/ae6d2af170
18:39 JustinHitla netsplit
18:41 tokuhirom joined #perl6
18:53 dalek doc: 14b9ff4 | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod:
18:53 dalek doc: Added method header to abspath and implemented a textual change suggested by [Coke]++
18:53 dalek doc: review: https://github.com/perl6/doc/commit/14b9ff4721
18:54 vendethiel joined #perl6
18:59 jjido_ joined #perl6
18:59 _dolmen_ joined #perl6
19:01 kaare__ joined #perl6
19:02 dalek gtk-simple: bdb93cf | RabidGravy++ | / (8 files):
19:02 dalek gtk-simple: kebab-case the public interface
19:02 dalek gtk-simple:
19:02 dalek gtk-simple: I've added a DEPRECATION to all the old names with no particular
19:02 dalek gtk-simple: time being specified.  I guess I'll give it a month or so.
19:02 dalek gtk-simple:
19:02 dalek gtk-simple: Closes #29
19:02 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/bdb93cf1f0
19:04 ugexe well resolve is not portable yet, which is probably why it was not documented
19:05 dupek joined #perl6
19:09 dogbert17 ugexe: I saw that comment in the source, perhaps I should mention it?
19:11 ugexe every instance of it in the roast is marked as fudged/nyi
19:11 dogbert17 will it fail on Windows?
19:11 ugexe it wont give the right path
19:13 dogbert17 hmm, I guess I should mention it or remove it entirely
19:13 ugexe it doesnt fail though, no
19:15 dogbert17 ugexe: I'll add some text about this in a bit
19:20 khw joined #perl6
19:23 labster joined #perl6
19:38 TEttinger joined #perl6
19:38 tharkun joined #perl6
20:04 mohae joined #perl6
20:12 _mg_ joined #perl6
20:14 MadcapJake is perl6.org down?
20:14 tadzik yes: http://isup.me/perl6.org
20:18 mr-foobar joined #perl6
20:22 eiro RabidGravy, tony-o timotimo masak: thanks for you answers. i'll go for something simple (pure perl) for the moment
20:22 lizmat joined #perl6
20:23 [Coke] docs.perl6.org having issues also
20:28 jjido_ joined #perl6
20:29 cdg joined #perl6
20:30 lizmat OSCON expo shutting down&
20:30 maybekoo2 joined #perl6
20:36 JustinHitla when I create variables in perl using "my ($i,$j,$p,$n);" is there a way to set a default value ? something like "my ($i=0,$j=0,$p,$n);" ? or I should do it explicitly "$i=0;" ?
20:38 mst my ($i, $j, $p, $n) = (0, 0); ?
20:38 JustinHitla right
20:38 [Coke] m: my ($a, $b) is default(4); say $a, $b;
20:38 camelia rakudo-moar e39ce3: OUTPUT«44␤»
20:39 [Coke] m: my ($a, $b) is default(4); $a = 5; say $a; $a=Nil; say $a;
20:39 camelia rakudo-moar e39ce3: OUTPUT«5␤4␤»
20:39 JustinHitla m: my ($a, $b) is default(4,5); say $a, $b;
20:39 camelia rakudo-moar e39ce3: OUTPUT«(4 5)(4 5)␤»
20:39 JustinHitla m: my ($a, $b) is (default(4),default(5)); say $a, $b;
20:39 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/tgpNCSe3gU␤Invalid name␤at /tmp/tgpNCSe3gU:1␤------> 3my ($a, $b) is7⏏5 (default(4),default(5)); say $a, $b;␤»
20:40 [Coke] JustinHitla: no, you can't do that.
20:40 [Coke] and you should only use this if you really want it to be default, not if you just want to initialize them.
20:40 brrt joined #perl6
20:40 [Coke] m: my Int $a; say $a.perl;
20:40 camelia rakudo-moar e39ce3: OUTPUT«Int␤»
20:41 [Coke] m: my int $a; say $a.perl;
20:41 camelia rakudo-moar e39ce3: OUTPUT«0␤»
20:41 JustinHitla m: my ($a, $b) is default(2^10); say $a, $b;
20:41 camelia rakudo-moar e39ce3: OUTPUT«one(2, 10)one(2, 10)␤»
20:41 [Coke] you can also use the native 'int' class, which will default to 0 instead of the type.
20:41 JustinHitla what is that "one" ?
20:41 [Coke] JustinHitla: junctions
20:42 hoelzro you probably want 2 ** 10
20:42 hoelzro (for exponentiation)
20:43 Ven_ joined #perl6
20:43 sno joined #perl6
20:43 AlexDaniel or 2¹⁰ :)
20:43 hoelzro =)
20:44 JustinHitla by the way that one "my ($i, $j, $p, $n) = (0, 0);" will set $i and $j right ? what if I want to set $p and $n instead ?
20:44 hoelzro yes
20:44 hoelzro if you want to set $p and $n, reorder the LHS =)
20:44 JustinHitla just as I thought
20:44 hoelzro or do (Any, Any, 0, 0) on the RHS
20:46 perlpilot or ($,$, 0,0)
20:46 hoelzro perlpilot: on the RHS, though?
20:46 hoelzro m: "my ($i, $j, $p, $n) = ($,$, 0,0)
20:46 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/JxEIAFN0_n␤Variable '$i' is not declared␤at /tmp/JxEIAFN0_n:1␤------> 3"my (7⏏5$i, $j, $p, $n) = ($,$, 0,0)␤»
20:46 hoelzro m: \my ($i, $j, $p, $n) = ($,$, 0,0)
20:46 camelia rakudo-moar e39ce3: ( no output )
20:47 hoelzro m: my ($i, $j, $p, $n) = ($,$, 0,0)
20:47 camelia rakudo-moar e39ce3: ( no output )
20:47 hoelzro m: my ($i, $j, $p, $n) = ($,$, 0,0); say "$i.perl() $j.perl() $p.perl() $n.perl()"
20:47 camelia rakudo-moar e39ce3: OUTPUT«Any Any 0 0␤»
20:47 hoelzro I'll be damned
20:47 hoelzro perlpilot++
20:47 * geekosaur not very surprised
20:47 JustinHitla I'll go "$i=0; $j=0;" line
20:47 geekosaur it is a bit of a hack though
20:48 hoelzro oh, I guess it's kind of like anon state, huh?
20:48 geekosaur not kind of
20:48 geekosaur it's taking advantage of the fact that the anon state variable is initialized to Any
20:49 geekosaur (which also means it may not do what you want if you are *using* the anon state variable)
20:49 AlexDaniel m: my int $x is default(4)
20:49 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AlkD8HHRB7␤Can't use trait 'is default' on a native.␤at /tmp/AlkD8HHRB7:1␤------> 3my int $x is default(4)7⏏5<EOL>␤    expecting any of:␤        constraint␤»
20:49 tokuhirom joined #perl6
20:49 perlpilot geekosaur: for example?
20:49 geekosaur (admittedly, if you are doing that then you're probably not also devclaring other vars)
20:51 hoelzro geekosaur: but each $ is distinct from one another
20:51 geekosaur ah
20:51 geekosaur ok, ten it would work provided it's not $++ or something
20:51 hoelzro http://hoelz.ro/blog/anonymous-state-variables-and-how-they-work ;)
20:51 hoelzro yup
20:51 perlpilot JustinHitla: Just remember that simplicity and clarity trump cleverness every time :)
20:52 geekosaur ...or you come back in 6 months and can't understand your own code
21:09 gfldex m: my Int $i; dd $i; subset NullInt of Int is default(0);
21:09 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/er_8WE4P1j␤'NullInt' cannot inherit from 'default' because it is unknown.␤at /tmp/er_8WE4P1j:1␤»
21:10 gfldex perl6.org seams to be down
21:11 mst indeed it is
21:11 JustinHitla just when I need it, its down
21:12 JustinHitla I can ping it
21:14 _dolmen_ joined #perl6
21:16 pmurias joined #perl6
21:17 pmurias mst: re using rakudo.js vs js, the barrier of something being actually a better for technical reasons rather then just being more awesome is hard to cross
21:18 pmurias mst: the same exists on the backend side for perl6 vs perl5
21:22 dalek doc: 7b411d3 | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod:
21:22 dalek doc: Added a note about 'resolve' currently not working correctly on all platforms. ugexe++
21:22 dalek doc: review: https://github.com/perl6/doc/commit/7b411d3601
21:22 cpage_ joined #perl6
21:28 firstdayonthejob joined #perl6
21:29 Xliff Is modules.perl6.org down?
21:29 Xliff http://www.downforeveryoneorjustme.com/modules.perl6.org
21:31 Sgeo joined #perl6
21:37 jjido_ joined #perl6
21:54 jjido_ joined #perl6
21:59 travis-ci joined #perl6
21:59 travis-ci Doc build failed. Jan-Olof Hendig 'Added a note about 'resolve' currently not working correctly on all platforms. ugexe++'
21:59 travis-ci https://travis-ci.org/perl6/doc/builds/131537388 https://github.com/perl6/doc/compare/14b9ff4721f3...7b411d36015e
21:59 travis-ci left #perl6
22:06 obfusk joined #perl6
22:19 [Coke] I tried to ssh into to what I think is the hosting box, ssh hangs after a certain point
22:31 MasterDuke joined #perl6
22:54 timotimo oh, is hack having trouble again?
22:55 timotimo right now it seems fine
22:55 timotimo oh, www.p6c.org does have trouble
22:57 timotimo i went and rebooted it
22:57 timotimo collect.p6c.org shows it had been on 100% "wait" for all CPUs for a few hours now
23:05 timotimo aha, we apparently have a perlbrew set up for modules.perl6.org, but it's missing the Toadfarm.pm for some reason
23:05 timotimo that's why modules.perl6.org isn't coming up
23:09 timotimo huh. it's not using the perlbrew perl to run the web app?
23:09 Zoffix joined #perl6
23:09 Zoffix It does.
23:09 timotimo then why does it claim it can't find Toadfarm, even though i just cpanm installed it?
23:10 Zoffix Not sure. Why did you have to install it? :S
23:10 timotimo because it says "begin failed, compilatio naborted" "can't load application from file /etc/init.d/..."
23:10 timotimo "Can't locate Toadfarm.pm in @INC (you may need to install the Toadfarm module) (@INC contains: /etc/perl"
23:11 Zoffix Hm, I wonder if we ever tested that part :P
23:11 timotimo and the @INC doesn't contain /home/... at all
23:11 Zoffix timotimo, are you able to change my pub key on that server?
23:11 timotimo yes
23:12 Zoffix I'll log in and take a look
23:12 timotimo is being identified to nickserv adequate? :P
23:12 timotimo why not just point me at the github pub key thingie
23:13 timotimo https://github.com/zoffixznet.keys
23:13 Zoffix I'm not sure which one of those is my leliana box :P
23:14 Zoffix Last one it seems
23:14 timotimo well, not only did i get the key in two separate messages, but it's also prefixed with weechat decoration in each of the screenlines
23:14 Zoffix heh
23:14 timotimo i can't tell what user you were trying to log in as
23:15 Zoffix It was root
23:15 timotimo you don't have a zoffix user on that machine, but i can put your pubkey in for the modules.perl6.org user
23:15 timotimo oh, ok
23:15 Zoffix Well, the old key is assigned to root
23:16 timotimo ah, yeah, it is
23:16 Zoffix But it can be tossed really, 'cause I can access leliana from all my other boxes anyway
23:16 timotimo try now
23:17 Zoffix Yup. worked
23:17 Zoffix Thanks.
23:20 timotimo everything is reminding me of froggs :S
23:21 Zoffix ?
23:22 timotimo seeing the graphs on collect reminds me of his extremely frequent and surprisingly costly cron job
23:23 Zoffix heh
23:23 Zoffix Well, I launched the site manually and I believe I see a problem with the init.d script too :)
23:23 Zoffix It uses the brewed perl but doesn't include its INC
23:24 timotimo how is that even possible? :)
23:25 Zoffix 'cause the INC is setup with source ~/perl5/perlbrew/etc/bashrc in .bashrc file of modules.perl6.org user
23:25 Zoffix Which I guess isn't run by the init script
23:25 timotimo ah, hehe.
23:27 timotimo making stuff reboot-safe is always the hardest thing :P
23:29 timotimo thanks for the effort :)
23:33 kid51 joined #perl6
23:35 Zoffix Hm... So I'm following the policy of git commiting changes under /etc, but there are uncommited changes. I tried to just commit them before making my change, but it fails with .git/hooks/pre-commit: 4: .git/hooks/pre-commit: etckeeper: not found
23:35 Zoffix Does anyone know how to fix that without my having to learn wtf etckeeper is? :)
23:36 timotimo we threw out etckeeper at some point
23:36 timotimo and we didn't clean up the stuff in /etc yet ...
23:36 timotimo i'm not sure how exactly we should do that
23:36 ilmari rm .git/hooks/*?
23:36 Zoffix K. then I'll just update the modules.perl6.org init.d script without commiting anything :) I'm just adding use lib <> to it
23:37 timotimo mhm, ok
23:42 Zoffix didn't help :( K, I started it manually. I'll read up on how to fix it and then fix it in the next couple of days. If the app has to be started again for whatever reason, just su modules.perl6.org; cd ~/modules.perl6.org; hypnotoad bin/ModulesPerl6.pl
23:42 * Zoffix &
23:42 Zoffix left #perl6
23:42 timotimo we could put that into a text file in the user's home
23:51 jack_rabbit joined #perl6
23:56 Actualeyes joined #perl6

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

Perl 6 | Reference Documentation | Rakudo