»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
Juerd m: sub forty-two { 42 }; say 123 ~~ &forty-two; 00:00
camelia rakudo-moar e39ce3: OUTPUT«42␤»
Sgeo Ooh. Except that doesn't necessarily play nice with `when`
Unless the result of `when` is visible?
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 $_ }
camelia rakudo-moar e39ce3: OUTPUT«5␤»
Sgeo How can I get 6 from there?
AFK 00:02
Juerd I don't think you can
00:02 tbrowder left
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
On the other hand, when &closure -> $x { ... } would perhaps be nice.
Currently it throws an error that I don't understand (Too few positionals passed; expected 1 but got 0)
00:05 cpage_ left
Juerd (Okay, I do understand it, but I think it's unclear.) 00:05
sortiz m: say 5 ~~ (-> $a {$a + 1}) 00:07
camelia rakudo-moar e39ce3: OUTPUT«6␤»
Juerd sortiz: If I understand Sgeo correctly, they want to somehow capture that return value with 'when'. 00:08
It works with if:
m: given 5 { if $_ ~~ { $^x + 1 } -> $six { say $six } } 00:09
camelia rakudo-moar e39ce3: OUTPUT«6␤»
sortiz I don't really understand what Sgeo want :-) 00:10
Juerd Well, if I do: 00:11
sortiz But a capture can smartmatch a signature also:
Juerd m: given 5 { when { $^x + 1 } -> $six { say $six } }
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␤␤»
sortiz m: say \('foo') ~~ :(Int $a); say \(5) ~~ :(Int $a)
camelia rakudo-moar e39ce3: OUTPUT«False␤True␤»
00:17 ssotka joined, ssotka left 00:18 MasterDuke joined 00:23 cdg left 00:26 vendethiel joined 00:28 colomon joined 00:34 BenGoldberg left, cpage_ joined 00:36 BenGoldberg joined 00:40 BenGoldberg left 00:45 pierre joined 00:46 BenGoldberg joined 00:48 vendethiel left 00:49 aries_liuxueyang left 00:52 BenGoldberg left, aries_liuxueyang joined 00:57 BenGoldberg joined 00:58 vendethiel joined, BenGoldberg left 00:59 astj joined
Sgeo "To really bind to a signature, use the * pattern to delegate binding to the when statement's block instead." 01:02
m: given 5 { when * -> $a { say $a } }
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␤␤»
Sgeo design.perl6.org/S03.html#Smart_matching
Blah
01:03 BenGoldberg joined
Sgeo m: 5 ~~ (5|6) 01:08
camelia ( no output )
01:08 MasterDuke left
Sgeo m: say (5 ~~ (5|6)) 01:08
camelia rakudo-moar e39ce3: OUTPUT«True␤»
AlexDaniel Sgeo: what are you trying to do? 01:10
MadcapJake: www.mattermost.org/
MadcapJake: and www.mattermost.org/why-we-made-mat...ternative/
01:13 cpage_ left
AlexDaniel m: { say * }(42) 01:14
camelia rakudo-moar e39ce3: OUTPUT«*␤»
AlexDaniel hehe
timotimo sub calls are borders through which auto-currying wth Whatever will not go
Sgeo auto-currying? 01:17
01:18 cpage_ joined
Sgeo vaguely considers writing the ff operator in Haskell 01:20
Wait, no 01:21
01:26 kurahaupo joined 01:38 kurahaupo left 01:42 vendethiel left 01:46 cpage_ left 01:47 ilbot3 joined 01:52 vendethiel joined 01:57 zakharyas joined 01:59 pierre left 02:03 tokuhirom joined
Sgeo m: say 5.VAR 02:04
camelia rakudo-moar e39ce3: OUTPUT«5␤»
Sgeo ?? 02:05
m: my $a = 5; say $a.VAR
camelia rakudo-moar e39ce3: OUTPUT«5␤»
02:05 MasterDuke joined 02:07 tokuhirom left
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
and suggestions that don't involve me buying more ram?
gfldex add more swap and go to bed while it muches the data 02:10
MasterDuke yeah, that's probably my next attempt 02:11
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:12
AlexDaniel MasterDuke: how much memory do you have? 02:13
MasterDuke 8gb 02:14
02:23 cpage_ joined
Sgeo I still struggle to understand any mutability model that isn't Rust's 02:27
(Well, no, I understand them, I just... ugh) 02:28
02:37 MasterDuke left 02:38 mohae_ joined
MadcapJake AlexDaniel: yeah mattermost looks awesome but it's not provided as a service so would require a machine. 02:39
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)␤»
AlexDaniel MadcapJake: that can be solved. Unlike proprietary jail
02:41 mohae left
MadcapJake very true, but it's not like we don't rely on another proprietary jail: GitHub 02:42
(maybe not as "jailish" as Slack)
02:42 jack_rabbit joined 02:43 cpage_ left
AlexDaniel yes, it's a problem 02:43
but it does not mean that we should tolerate other jails :)
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
like so many fads, people joined and never said a word :P
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:49
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:50
AlexDaniel wait what, IRC client that is not gratis? 02:51
MadcapJake well they do have a large github presence but I'm not sure if it's all there: github.com/irccloud 02:52
geekosaur the reason hexchat exists is that the xchat windows port went nonfree 02:53
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:57
geekosaur is on linux. butt ugly is a given. >.< 02:58
02:58 noganex_ joined
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:58
02:58 BenGoldberg left 02:59 vendethiel left, pierre joined
MadcapJake I am too! Gnome Shell though so it's mostly really nice looking :) 02:59
03:00 BenGoldberg joined 03:04 pierre left, pierre joined, adu joined 03:07 willthechill joined 03:09 vendethiel joined 03:16 ssotka joined 03:27 aries_liuxueyang left 03:28 cpage_ joined
Sgeo For objects just meant to represent some data, do I make its fields rw or not? 03:39
Such an easy question to answer in Rust and Haskell, for more... mutable languages, I don't know
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:40
03:43 cpage_ left
adu Sgeo: to rw or not to rw, that is the question... 03:43
whether 'tis nobler in the mind to suffer the slings and arrows of mutability...
03:49 cpage_ joined 03:50 aries_liuxueyang joined, aries_liuxueyang left 03:53 vendethiel left, aries_liuxueyang joined 03:58 aries_liuxueyang left
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 03:59
04:00 aries_liuxueyang joined 04:06 drforr1 joined
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:08
Sgeo Thanks for reminding me that I really should go retreat into Rust again 04:11
Even "mutable" methods don't enable action-at-a-distance unless you do extra stuff
ugexe thats certainly one way to extremely verbose code 04:15
to write
Sgeo Moonpig::DateTime 04:19
oops
sub as-many($head, *@rest)
Should that example use **@rest as a better practice for newbies to emulate?
learnxinyminutes.com/docs/perl6/
04:19 tokuhirom joined
Sgeo (I don't actually know which is typical, but docs gave the impression **@rest is preferred, I think) 04:19
ugexe those arent the same 04:20
m: sub foo($head, *@rest) { say @rest.perl }; foo(1, [1,2])
camelia rakudo-moar e39ce3: OUTPUT«[1, 2]␤»
ugexe m: sub foo($head, **@rest) { say @rest.perl }; foo(1, [1,2])
camelia rakudo-moar e39ce3: OUTPUT«[[1, 2],]␤»
04:21 ssotka left
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:21
ugexe better depends entirely on what they are doing with it 04:24
04:24 tokuhirom left
ugexe its not a matter of best practice 04:24
04:24 ssotka joined, aries_liuxueyang left 04:25 aries_liuxueyang joined
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:28 pierre left 04:29 adu left, adu joined 04:32 aries_liuxueyang left
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
camelia rakudo-moar e39ce3: OUTPUT«([2, 3], 4)␤(2, 3, 4)␤»
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);␤»
Sgeo m: multi f(Str $foo) { say "Str"; }; do { multi f(Int $foo) { say "Int"; }; f(5); };
camelia rakudo-moar e39ce3: OUTPUT«Int␤»
Sgeo Hmm, interesting 04:34
Helps alleviate some of my concern about conflicting trait names... I think
04:35 aries_liuxueyang joined 04:36 BenGoldberg left 04:38 vendethiel joined 04:43 adu left 04:47 Cabanossi joined 04:55 aries_liuxueyang left 04:56 aries_liuxueyang joined 05:00 vendethiel left 05:07 vendethiel joined 05:25 CIAvash joined 05:28 pierre_ joined 05:29 vendethiel left 05:31 pierre_ left, skids left 05:33 pierre_ joined 05:42 vendethiel joined 05:51 domidumont joined 05:53 garu left 05:55 domidumont left 05:56 domidumont joined 06:00 tardisx joined 06:03 vendethiel left 06:07 tardisx left 06:09 domidumont left
timotimo Unrecognized character name BOX DRAWINGS $weight HORIZONTAL 06:15
grmbl
i'm *not* going to use EVAL for this :) 06:16
buharin hiho
06:17 Amnez777 joined, grondilu joined
timotimo we don't seem to have nqp::codepointfromname anywhere in the CORE setting 06:19
06:19 domidumont joined, domidumont left 06:20 domidumont joined 06:22 Amnez777 left
Sgeo m: role Foo {}; say ((0 but Foo) ~~ Foo) 06:24
camelia rakudo-moar e39ce3: OUTPUT«True␤»
Sgeo Neat
06:24 vendethiel joined 06:29 tokuhirom joined 06:30 firstdayonthejob joined
masak morning, #perl6 06:34
06:37 mohae_ left
sjn good morning, masak & #perl6 :) 06:37
masak .oO( I was greeted in a junction )
06:38 _mg_ joined 06:39 firstdayonthejob left 06:41 jjido joined
sjn hm. what happens when one uses different junctions on two overlapping durations? 06:44
timotimo it'll be like a cross operator 06:45
06:45 ssotka left
sjn would imagine an & would work on a timeline like a "merge", and a "| like a "branch" 06:45
06:45 Amnez777 joined
sjn :) 06:45
06:45 vendethiel left 06:46 jjido left 06:50 telex joined 06:51 RabidGravy joined 06:54 jjido joined
moritz actually & is a branch followed by a merge, and | is just a branch 06:54
06:55 CIAvash left
masak that... doesn't sounds dual enough 06:56
sound* 06:57
06:58 jjido left 06:59 vendethiel joined
moritz is there a Standard of Duality that dictates that all important concepts must come with sufficient Duality? :-) 06:59
06:59 jjido joined, CIAvash joined
masak ... 07:00
yes! :)
masak realizes that people who haven't been smashed in the head by Category Theory might not be aware of this 07:01
El_Che x 07:03
masak m: say "x <--- you are here" 07:04
camelia rakudo-moar e39ce3: OUTPUT«x <--- you are here␤»
07:05 jjido left 07:06 grondilu left, abraxxa joined 07:07 wamba joined 07:14 rindolf joined 07:17 BinGOs joined 07:20 avenj joined 07:22 vendethiel left
RabidGravy concludes that something similar to AttributeFacade but using an attribute rather than the invocant would make GTK::Simple happier 07:30
07:34 dakkar joined, jack_rabbit left 07:36 darutoko joined 07:37 avenj left 07:38 trkldoi joined, avenj joined 07:45 baest joined 07:50 vendethiel joined
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 07:51
07:54 domidumont left 08:07 domidumont joined, sno joined 08:08 pierre_ left 08:12 astj left 08:13 vendethiel left 08:14 pierre_ joined 08:32 huggable joined 08:35 araujo joined, araujo left 08:37 aries_liuxueyang left 08:38 pierre_ left, aries_liuxueyang joined 08:39 pierre_ joined, pierre_ left, pierre_ joined 08:53 domidumont left 08:55 domidumont joined
gregf_ hello morning 08:58
can roles be instantiated too?
m: role Foo { method test(){ say "what"; } }; 0 but Foo.test(); # like this 08:59
camelia rakudo-moar e39ce3: OUTPUT«what␤»
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
jnthn (And it is cached, so we don't do that expensive computation every time)
gregf_ oh, expensive computation as in applying the role? 09:02
jnthn Yes
gregf_ ok - thanks jnthn! 09:03
09:07 domidumont left 09:08 domidumont joined, wamba left
gregf_ jnthn: and can roles be applied programmatically? *i know its silly to apply a role to an instance* 09:08
09:09 wamba joined
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:09
anyways, i'll stick to the basics. *digressing* 09:13
09:14 eiro joined
eiro hello everyone 09:14
dalek k-simple: 0d097d0 | RabidGravy++ | / (2 files):
Add editable, cursor-visible properties to TextView

Closes #8
09:15
09:16 labster1 joined
RabidGravy gregf, yes you can 09:16
run-time application is with "does" on an instance 09:17
so, e.g. "my $a = SomeClass.new; $a does SomeRole;"
jnthn Ah, programatically as in "to an instance"...what RabidGravy said. You can use the MOP to programatically create classes too
gregf_ RabidGravy: ah - so simple :) 09:18
RabidGravy or if you want to do it do a type object of some class then you use "but" 09:19
e.g. "constant RoleClass = ( SomeClass but SomeRole)"
gregf_ yeah
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 :)
RabidGravy: jnthn cheers!
RabidGravy yeah, it's a lovely thing 09:21
09:30 raoulvdberge joined, vendethiel joined 09:31 zakharyas left 09:49 araujo joined 09:50 araujo left 10:03 jjido joined 10:08 jjido left 10:14 vendethiel left 10:18 vendethiel joined 10:41 vendethiel left 10:45 kid51 joined 10:47 pierre_ left
RabidGravy who was it that was saying that they'd like to see a Glade/GtkBuilder thingy in GTK::Simple? 10:52
10:52 CIAvash left
RabidGravy anyhow whoever they are they could help by fixing github.com/perl6/gtk-simple/pull/16 so it is mergeable 10:53
10:53 kaare_ joined, Xliff joined
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:54
RabidGravy there seem to have been lots of commits 10:56
haven't the faintest whether it actually works or not
moritz blogs.perl.org/users/pawel_murias/ has the progress reports
awwaiid ok cool 10:58
thanks! :)
10:59 AlexDaniel joined
RabidGravy so actually it's in pretty good shape 11:00
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:02
timotimo just running perl6 code in a browser, and on node.js 11:03
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.
JimmyZ :)
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 bey 11:07
kaare_: I want to bring all those things to rakudo-js :) 11:08
kaare_: 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:11
RabidGravy if anyone uses or has an opinion on GTK::Simple please feel free to comment on github.com/perl6/gtk-simple/issues/29 11:14
11:16 zero-one joined 11:21 brrt joined 11:23 tokuhirom left 11:24 rindolf left 11:27 vendethiel joined 11:31 Amnez777 left 11:33 rindolf joined 11:36 Amnez777 joined 11:38 rindolf left 11:39 rindolf joined 11:42 wamba left 11:48 brrt left, vendethiel left 11:50 kid51 left 11:51 |2701 joined 11:54 labster1 left 12:06 nicqbot joined, vendethiel joined
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] {}␤»
masak should this be allowed?
(restricting the parameter of a role to the role itself)
timotimo how do you actually instantiate this, then? :) 12:09
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
moritz role T does R[R] { }
role S does R[T] { }
timotimo but can you put R[R]? doesn't it have to be R[R[R[R[R[R[...]]]]]] 12:10
moritz ah right 12:11
but you could
m: role R[R ::T = R] { }
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] { }␤»
timotimo oh, really?
moritz well, you could, if it worked
but [..] is just a signature
timotimo what is R, though? roles don't have "type objects"
oh, actually they do 12:12
moritz so you can add optional parameters
timotimo right
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?
moritz yes, would have to be very careful :-) 12:13
not saying it should work, just that one can imagine a language variant where that works
timotimo mhm
12:20 pierre_ joined 12:24 tokuhirom joined 12:28 pierre_ left 12:29 tokuhirom left 12:31 rindolf left 12:32 huggable left, daxim joined 12:38 pmurias joined
pmurias awwaiid: I'll write another progress report today as I have been neglecting those recently 12:38
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 12:45 brrt joined 12:47 pierre_ left 12:49 vendethiel left
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 12:49
13:00 domidumont left 13:01 domidumont joined
pmurias blogs.perl.org/users/pawel_murias/2...mpile.html 13:04
13:07 vendethiel joined 13:10 raoulvdberge left
dalek c: 7102514 | (Christopher Bottoms)++ | doc/Type/Int.pod:
code formatted Int
13:16
c: e2dcd75 | RabidGravy++ | doc/Type/Int.pod:
Merge pull request #525 from molecules/patch-1

code formatted Int in the documentation for the polymod routine for Int
13:23 ocbtec joined 13:25 tokuhirom joined 13:29 vendethiel left 13:30 tokuhirom left 13:31 pierre_ joined
masak pmurias++ # blag 13:33
pmurias: s/leather/lather/
13:33 aborazmeh joined, aborazmeh left, aborazmeh joined
tadzik I thought leather is some meme there :) 13:33
pmurias++ 13:34
13:34 nicqbot left, nicqbot joined, araujo joined 13:37 Actualeyes joined 13:38 vendethiel joined 13:41 araujo_ joined 13:42 lizmat joined 13:43 araujo__ joined 13:44 pierre_ left 13:45 araujo__ left, araujo__ joined, araujo left 13:46 araujo__ left, araujo_ left 13:51 mst joined 13:53 jast joined 14:01 vendethiel left
tony-o MadcapJake: can i pm? 14:05
14:09 aborazmeh left, vendethiel joined 14:12 itaipu joined 14:13 yqt joined
masak .oO( compile-time error: attempt to verb Patrick Michaud ) 14:21
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
"werbować" means "to recruit"
MadcapJake tony-o: sure!
eiro i wonder if a fresh start (with objects and methods like .id, .class) would be better
14:23 pmurias left, yqt left
tony-o eiro: as a rewrite ? 14:24
brrt masak: did you ever get further with the trinity thing... 14:25
eiro not a rewrite: an OO based abstraction over html node
(eventually using XML::Writer beneath its .str method 14:26
brrt i really appreciated that article :-)
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
masak eiro: too long since I looked at XML::Writer, sorry 14:28
14:28 rindolf joined
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
masak brrt: not significantly, no. still plan to.
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 rindolf left
brrt i'm... kind of wrapping my head arround whether the three-tier thing is a pain point or a good thing 14:29
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
brrt in the sense that it runs in all contexts (although it still maintains barriers between them)
14:30 pmurias joined 14:31 vendethiel left
RabidGravy tony-o, looks like he hasn't touched it since September github.com/FROGGS/p6-XML-LibXML 14:32
eiro ok ... why not just use perl6 to generate the output?
will it be that faster to write a NativeCall extrension? worth to deal with external dependencies
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
eiro i'm only speaking about the serializer. the parser is an Emmet one 14:34
i wrote it as example for the talk i want to give at FPW
RabidGravy Ah, here's the article perl6advent.wordpress.com/2015/12/...-beyond-c/
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
AlexDaniel I don't want to get into this unicode vs texas debate any further… 14:41
14:42 pierre__ joined, brrt left
nemo ♥ unicode 14:42
unicode 4eva! 14:43
tony-o you guys in austin, tx ? 14:45
lizmat is
going to expo floor&
14:45 lizmat left 14:47 molaf joined 14:49 pmurias left, pmurias joined
dalek c: 96ae37f | (Tom Browder)++ | doc/Language/functions.pod:
fix typo
14:50
c: 6a7c020 | (Tom Browder)++ | doc/Language/functions.pod:
really back to phasers, and add a comma
c: 8c3819e | RabidGravy++ | doc/Language/functions.pod:
Merge pull request #523 from tbrowder/func-pod-fix

fix typo
14:50 vendethiel joined 14:56 pmurias left 14:58 domidumont left 14:59 pmurias joined 15:01 lizmat joined
lizmat waves from OSCON expo floor 15:02
15:10 trkldoi left 15:12 yoleaux joined, ChanServ sets mode: +v yoleaux 15:14 vendethiel left 15:15 domidumont joined, domidumont left 15:19 kaare_ left 15:20 kaare_ joined 15:21 maybekoo2 joined
dogbert17 o/ # perl6 15:21
dogbert17 wonders if masak is around 15:22
huf ...tuit?
15:23 Actualeyes left
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
Where does p6 fit in?
timotimo you write react in p6 instead of es6 15:27
like you would write react in typescript or coffeescript or what have you
kaare_ ok, that's nice (I guess)
mst is probably going to write an @has decorator for ES6 15:30
MadcapJake I guess?
15:35 ssotka joined
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:36
15:37 kaare__ joined
MadcapJake oops forgot the mountNode arg to render, but that's the idea at least 15:37
15:37 kaare_ left, kaare__ is now known as kaare_
kaare_ MadcapJake: Yes; I guess it's nice. 15:38
15:38 nicqbot left, mohae joined
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:39
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"
certainly that's how I feel about this
kaare_ I have to try it out myself to evaluate the niceness
MadcapJake kaare_: at least 1 developer thinks its nice for every language listed here: github.com/jashkenas/coffeescript/...pile-to-js
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:42
15:42 pierre__ left
dalek k-simple: d5a943d | RabidGravy++ | lib/GTK/Simple.pm6:
All "properties" are now handle by a trait

This is a slightly modified version of AccessorFacade that uses WIDGET to get the object to pass as the first argument.
There is one that has been left because it takes two arguments
Closes #28
15:43
kaare_ MadcapJake: And this is the other way around, and that's good.
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?
MadcapJake mst: the part where "people" doesn't include you :) 15:44
mst because I'm perfectly happy being a polyglot
kaare_ mst is not in the "people" set. I guess ;-)
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:45
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
writing my reactjs code in not-JS, less so
mspo dart? 15:47
elm?
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
15:48 araujo joined 15:49 araujo left 15:50 araujo joined
MadcapJake mst: yeah I think ES6 is a huge leap forward in JS usability 15:50
15:50 M-matthew joined
mst use strict + let + arrow function notation 15:50
15:50 araujo left
mst is ... enough 15:50
15:51 erdic joined
mst though I could do with 'has', hence considering writing it 15:51
MadcapJake mst: are decorators available through Babel? 15:52
15:53 mohae_ joined
mst MadcapJake: yes 15:55
I'm using babel+react+mobx atm
MadcapJake mobx looks nifty! 15:56
15:56 mohae left 15:58 ssotka left
awwaiid As an example of this in Opal(ruby)/React.rb, here is the app I've been playing with -- github.com/awwaiid/reactrb-elephan...example.rb . You could translate this ruby code very directly into p6. 15:58
pmurias kaare_: react is a library, you can use it from javascript (or Perl 6 compiled to javascript) 15:59
15:59 abraxxa left 16:03 vendethiel joined
pmurias kaare_: there is JSX which allows you to use some syntax sugar which we will replace with a dsl 16:04
kaare_ pmurias: Thanks, got it now :-) 16:05
pmurias awwaiid: we will be able to have a P6X sugar layer, remember we have slangs 16:06
16:06 ssotka joined 16:09 pmurias left 16:12 JustinHitla joined
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
reallocate new memory right ? so it will be tough for a garbage collector
16:13 rindolf joined
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:13
16:13 wamba left
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}␤»
JustinHitla MadcapJake: what is that ?
awwaiid JustinHitla: are you running into memory issues, or is this premtive optimization?
MadcapJake JustinHitla: setting a sequence of keys' values to zero 16:15
actually reassigning to the variable
JustinHitla awwaiid: I'm interested if there will be memory issues or not at all
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}␤»
jnthn The `$id_port[0]=0` approach will produce less garbage to collect 16:17
Though unless the profiles are telling you you're already spending a lot of time in GC...
awwaiid maybe you could build it up and then clone it when you need it to be reset
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 :)
awwaiid ya, I like that way :)
JustinHitla really ?
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" ?
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
JustinHitla so ".value" is a perl6 trick ?
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:22
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: gist.github.com/dogbert17/18381bf2...f8914ee1c3
MadcapJake after `rakudobrew build moar` this morning, panda doesn't work (or install via rakudobrew)
moritz dogbert17: looks good
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
tony-o: oh nope I didn't, thanks!
16:25 _mg_ left
[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]}␤»
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
dalek k-simple: 0f5fd75 | RabidGravy++ | / (2 files):
Implement monospace property on TextView

This partially addresses #7 however a more complete solution
  (allowing setting of an arbitrary font on the widget,) requires
the implementation of gtk_widget_set_font_map and all the attendant Pango bizness.
16:26
dogbert17 moritz: many thanks, will commit
[Coke] JustinHitla: on works in perl6 ... as opposed to where/ 16:27
*only
MadcapJake JustinHitla: What? This is #perl6, we're talking about Perl 6 only (most times :P)
tony-o: nice! looks great! 16:28
moritz and if not, we say what language we talk about :-)
16:28 dakkar left
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:29
JustinHitla so when you asked do you know perl you asking which perl ? 16:30
MadcapJake huh?
JustinHitla allright, there is only one perl, perl6
dalek c: 9e95b4e | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod:
Added doc for methods 'IO' and 'SPEC' in IO::Path. moritz++
16:34 sno left
tony-o MadcapJake: now i need to go make logotype for all my modules 16:34
MadcapJake tony-o: xD good idea! any idea why my P6Dx icon isn't working? 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
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]}␤»
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]}␤»
RabidGravy is there anyone else who has an interest in GTK::Simple? If so please weigh in on github.com/perl6/gtk-simple/issues/29 before I just (mostly) unilaterally kebab all the snakey names
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
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 github.com/perl6/gtk-simple/pull/16 with a view as to "is it worth the effort" ? 16:40
dalek osystem: d629f3f | araraloren++ | META.list:
Add Getopt::Kinoko

  github.com/araraloren/Getopt-Kinoko/
osystem: b57cf93 | RabidGravy++ | META.list:
Merge pull request #207 from araraloren/master

Add Getopt::Kinoko
gregf_ MadcapJake: Perl5 reads right to left. perl6 reads left to right 16:43
MadcapJake gregf_: really?
gregf_ like so, my %id_port = map { $_ => 0 } 0..10; #Perl5 == (^10).map( * => 0 ) #Perl6
MadcapJake ahh i see! 16:44
gregf_ Perl6 imho is a Pure Object Orientated language. everything is a object as in Ruby
s/a/an/
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
camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
16:45 willthechill left
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}␤»
AlexDaniel m: my %id_port = ^5 .map( * => 0); say %id_port
camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
ugexe yeah that was a rather untrue statement 16:46
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}␤»
AlexDaniel m: my %id_port = (map * => 0 <== ^5 .list); say %id_port
camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
RabidGravy MadcapJake, there's already code in there for connecting a Gtk signal to a P6 callback and thus emitting to a supply
MadcapJake AlexDaniel++ # the king of TIMTOWTDI ;)
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")]␤»
dalek c: 16fd361 | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod:
Fixed typo and changed the documentation for the 'path' method
AlexDaniel oh, I forgot something 16:50
m: my %id_port = (^5)».&(* => 0); say %id_port
camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
MadcapJake wow that one is really cool! 16:51
Didn't know that you could do that with WhateverStar
ugexe m: my %x is default(0); say %x<1>
camelia rakudo-moar e39ce3: OUTPUT«0␤»
AlexDaniel ugexe: well that's cheating 16:52
MadcapJake that one is perfect for JustinHitla's usecase perhaps
AlexDaniel ah, there's also one more thing…
MadcapJake how would you call :delete on every key? 16:53
16:53 kaare_ left
AlexDaniel MadcapJake: just throw away your hash? 16:53
16:53 kaare_ joined
MadcapJake but then you would lose the `is default(0)` help 16:53
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«{}␤»
AlexDaniel m: my %id_port = (^5) »=>« (0 xx 5); say %id_port
camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
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}␤»
MadcapJake m: my %x is default(0); %x<a> = 1; %x<b> = 2; %x{*}:delete; say %x<b>
camelia rakudo-moar e39ce3: OUTPUT«0␤»
AlexDaniel m: my %id_port = (^5) »=>» 0; say %id_port
camelia rakudo-moar e39ce3: OUTPUT«{0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0}␤»
MadcapJake awesome, that would be the way I'd handle his question
What's the different between X=> and Z=> ? 16:56
difference*
16:56 araujo joined, araujo left
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))␤»
AlexDaniel m: say 4,8,15 Z 16,23
camelia rakudo-moar e39ce3: OUTPUT«((4 16) (8 23))␤»
MadcapJake oh so it only looks the same because there was only 0 on the RHS
gregf_ zip?
AlexDaniel yeah, zip and cross
gregf_ product and zip in ruby :)
AlexDaniel you can spell it out if you want 16:58
m: say cross (1,2,3), (4,5)
camelia rakudo-moar e39ce3: OUTPUT«((1 4) (1 5) (2 4) (2 5) (3 4) (3 5))␤»
AlexDaniel m: say zip (1,2,3), (4,5)
camelia rakudo-moar e39ce3: OUTPUT«((1 4) (2 5))␤»
AlexDaniel m: say roundrobin (1,2,3), (4,5)
camelia rakudo-moar e39ce3: OUTPUT«((1 4) (2 5) (3))␤»
16:58 domidumont joined
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))␤»
AlexDaniel or whatever
m: say &[X]((1,2,3), (4,5))
camelia rakudo-moar e39ce3: OUTPUT«((1 4) (1 5) (2 4) (2 5) (3 4) (3 5))␤»
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:00
17:01 kaare__ joined
MadcapJake RabidGravy: how would you propose using gtk_builder_connect_signals_full with supplies? just the same way signal_supply handles it? 17:01
17:02 kaare_ left
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]}␤»
JustinHitla it works, thanks
RabidGravy pretty much, but there's probably some sugar to be had in the client code to do that under the hood 17:04
JustinHitla so is there difference between: "%id_port=( 0=>0, 1=>0, )" and "%id_port = (0,1).map( * => 0)" ? 17:05
17:05 nicqbot joined
JustinHitla I mean first one should allocate memory every time ? 17:05
so first one will used garbage collector a lot, right ?
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
camelia rakudo-moar e39ce3: OUTPUT«[192 168 0 1]␤[0 0 0 0]␤»
17:06 kaare__ left, kaare__ joined
JustinHitla so "%id_port{*}:delete" sets all members to '0' ? it doesn't delete anything, right ? 17:07
17:08 vendethiel left
MadcapJake JustinHitla: 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
or whatever is default is
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:09
JustinHitla makes sence 17:10
MadcapJake the `is default` trait says "when there is no key set by user, just provide this value instead"
ugexe m: my %x is default(100); %x<a> = 1; %x<a> = Nil; say %x<a>; 17:11
camelia rakudo-moar e39ce3: OUTPUT«100␤»
MadcapJake .oO( I seem to think that programming concepts can talk... )
ugexe so the user can still set a key and have the default used
17:13 kaare__ left 17:18 sufrostico joined
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␤»
MadcapJake I think that was run at instantiation of the variable though, right? 17:19
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␤␤»
ugexe yeah, i was just seeing
MadcapJake lizmat: could the error be made aware of it being called on a default-provided value? 17:21
s/called/subscripted/
lizmat well, I'm not sure it should throw at all
setting a default like that shouldn't set a constraint, I don't think
I understand why it's happening 17:22
afk&
17:22 lizmat left, vendethiel joined 17:27 tokuhirom joined 17:31 tokuhirom left 17:44 vendethiel left
mspo has there been any interest in adding p6 regex to pcre or an external lib? 17:45
masak haven't heard of such interest 17:50
17:54 lizmat joined 17:55 maybekoo2 left
mspo would be nicer than that ruby one that's been going around 17:59
18:05 vendethiel joined 18:08 cdg left
dogbert17 does anyone want to review the 'new' docs for method 'resolve' in IO::Path, gist.github.com/dogbert17/8b4fa796...b42cc61f62 18:18
personally I'm hoping for suggestions on how to improve the text 18:19
18:26 JustinHitla left, avar joined, apejens joined, DrForr joined, gregf_ joined, tharkun joined, JustinHitla joined 18:27 jameslenz joined, pRiVi joined, tomboy65 joined 18:32 khw joined, spider-mario joined 18:33 vendethiel left 18:34 olinkl joined
dalek c: ae6d2af | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod:
Added docs for the method 'resolve' in IO::Path
18:37
18:39 khw left
JustinHitla netsplit 18:39
18:41 tokuhirom joined 18:46 tokuhirom left
dalek c: 14b9ff4 | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod:
Added method header to abspath and implemented a textual change suggested by [Coke]++
18:53
18:54 vendethiel joined 18:59 jjido_ joined 19:00 _dolmen_ joined 19:01 kaare__ joined
dalek k-simple: bdb93cf | RabidGravy++ | / (8 files):
kebab-case the public interface

I've added a DEPRECATION to all the old names with no particular time being specified. I guess I'll give it a month or so.
Closes #29
19:02
ugexe well resolve is not portable yet, which is probably why it was not documented 19:04
19:05 dupek joined
dogbert17 ugexe: I saw that comment in the source, perhaps I should mention it? 19:09
ugexe every instance of it in the roast is marked as fudged/nyi 19:11
dogbert17 will it fail on Windows?
19:11 lizmat left
ugexe it wont give the right path 19:11
dogbert17 hmm, I guess I should mention it or remove it entirely 19:13
ugexe it doesnt fail though, no
19:15 _dolmen_ left
dogbert17 ugexe: I'll add some text about this in a bit 19:15
19:20 khw joined 19:23 labster joined 19:28 domidumont left, jjido_ left 19:38 TEttinger joined, tharkun left, tharkun joined 19:49 nicqbot left 20:04 mohae joined 20:06 mohae_ left 20:12 _mg_ joined
MadcapJake is perl6.org down? 20:14
tadzik yes: isup.me/perl6.org
20:18 mr-foobar joined
eiro RabidGravy, tony-o timotimo masak: thanks for you answers. i'll go for something simple (pure perl) for the moment 20:22
20:22 dupek left, lizmat joined
[Coke] docs.perl6.org having issues also 20:23
20:24 kaare__ left 20:28 jjido_ joined 20:29 cdg joined
lizmat OSCON expo shutting down& 20:30
20:30 lizmat left, maybekoo2 joined 20:32 darutoko left 20:34 jjido_ left
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:36
mst my ($i, $j, $p, $n) = (0, 0); ? 20:38
JustinHitla right
[Coke] m: my ($a, $b) is default(4); say $a, $b;
camelia rakudo-moar e39ce3: OUTPUT«44␤»
[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␤»
JustinHitla m: my ($a, $b) is default(4,5); say $a, $b;
camelia rakudo-moar e39ce3: OUTPUT«(4 5)(4 5)␤»
JustinHitla m: my ($a, $b) is (default(4),default(5)); say $a, $b;
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.
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
[Coke] m: my Int $a; say $a.perl; 20:40
camelia rakudo-moar e39ce3: OUTPUT«Int␤»
[Coke] m: my int $a; say $a.perl; 20:41
camelia rakudo-moar e39ce3: OUTPUT«0␤»
JustinHitla m: my ($a, $b) is default(2^10); say $a, $b;
camelia rakudo-moar e39ce3: OUTPUT«one(2, 10)one(2, 10)␤»
[Coke] you can also use the native 'int' class, which will default to 0 instead of the type.
JustinHitla what is that "one" ?
[Coke] JustinHitla: junctions
hoelzro you probably want 2 ** 10 20:42
(for exponentiation)
20:43 Ven_ joined, sno joined
AlexDaniel or 2¹⁰ :) 20:43
hoelzro =)
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
if you want to set $p and $n, reorder the LHS =)
JustinHitla just as I thought
hoelzro or do (Any, Any, 0, 0) on the RHS
perlpilot or ($,$, 0,0) 20:46
hoelzro perlpilot: on the RHS, though?
m: "my ($i, $j, $p, $n) = ($,$, 0,0)
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)␤»
hoelzro m: \my ($i, $j, $p, $n) = ($,$, 0,0)
camelia ( no output ) 20:47
hoelzro m: my ($i, $j, $p, $n) = ($,$, 0,0)
camelia ( no output )
hoelzro m: my ($i, $j, $p, $n) = ($,$, 0,0); say "$i.perl() $j.perl() $p.perl() $n.perl()"
camelia rakudo-moar e39ce3: OUTPUT«Any Any 0 0␤»
hoelzro I'll be damned
perlpilot++
geekosaur not very surprised
JustinHitla I'll go "$i=0; $j=0;" line
geekosaur it is a bit of a hack though
hoelzro oh, I guess it's kind of like anon state, huh? 20:48
geekosaur not kind of
it's taking advantage of the fact that the anon state variable is initialized to Any
(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)
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
perlpilot geekosaur: for example? 20:49
geekosaur (admittedly, if you are doing that then you're probably not also devclaring other vars)
hoelzro geekosaur: but each $ is distinct from one another 20:51
geekosaur ah
ok, ten it would work provided it's not $++ or something
hoelzro hoelz.ro/blog/anonymous-state-varia...-they-work ;)
yup
perlpilot JustinHitla: Just remember that simplicity and clarity trump cleverness every time :)
geekosaur ...or you come back in 6 months and can't understand your own code 20:52
20:54 tokuhirom left 20:55 cpage_ left 20:59 Ven_ left 21:02 vendethiel left
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␤»
gfldex perl6.org seams to be down 21:10
mst indeed it is 21:11
JustinHitla just when I need it, its down
I can ping it 21:12
21:12 _mg_ left, brrt left 21:14 _dolmen_ joined 21:16 pmurias joined
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:17
mst: the same exists on the backend side for perl6 vs perl5 21:18
dalek c: 7b411d3 | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod:
Added a note about 'resolve' currently not working correctly on all platforms. ugexe++
21:22
21:22 cpage_ joined 21:28 firstdayonthejob joined
Xliff Is modules.perl6.org down? 21:29
www.downforeveryoneorjustme.com/mod....perl6.org
21:31 Sgeo joined 21:37 jjido_ joined 21:41 jjido_ left 21:43 wamba left 21:51 _dolmen_ left 21:52 colomon left 21:54 jjido_ joined 21:56 jjido_ left 21:59 travis-ci joined
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.org/perl6/doc/builds/131537388 github.com/perl6/doc/compare/14b9f...411d36015e
21:59 travis-ci left 22:02 RabidGravy left 22:06 obfusk joined
[Coke] I tried to ssh into to what I think is the hosting box, ssh hangs after a certain point 22:19
22:31 MasterDuke joined 22:34 pmurias left 22:42 rindolf left 22:53 firstdayonthejob left
timotimo oh, is hack having trouble again? 22:54
right now it seems fine 22:55
oh, www.p6c.org does have trouble
i went and rebooted it 22:57
collect.p6c.org shows it had been on 100% "wait" for all CPUs for a few hours now
aha, we apparently have a perlbrew set up for modules.perl6.org, but it's missing the Toadfarm.pm for some reason 23:05
that's why modules.perl6.org isn't coming up
huh. it's not using the perlbrew perl to run the web app? 23:09
23:09 Zoffix joined
Zoffix It does. 23:09
timotimo then why does it claim it can't find Toadfarm, even though i just cpanm installed it?
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/..."
"Can't locate Toadfarm.pm in @INC (you may need to install the Toadfarm module) (@INC contains: /etc/perl"
Zoffix Hm, I wonder if we ever tested that part :P 23:11
timotimo and the @INC doesn't contain /home/... at all
Zoffix timotimo, are you able to change my pub key on that server?
timotimo yes
Zoffix I'll log in and take a look 23:12
timotimo is being identified to nickserv adequate? :P
why not just point me at the github pub key thingie
github.com/zoffixznet.keys 23:13
Zoffix I'm not sure which one of those is my leliana box :P
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
Zoffix heh
timotimo i can't tell what user you were trying to log in as
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
oh, ok
Zoffix Well, the old key is assigned to root
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
timotimo try now
Zoffix Yup. worked 23:17
Thanks.
23:18 maybekoo2 left 23:19 spider-mario left
timotimo everything is reminding me of froggs :S 23:20
Zoffix ? 23:21
timotimo seeing the graphs on collect reminds me of his extremely frequent and surprisingly costly cron job 23:22
Zoffix heh 23:23
Well, I launched the site manually and I believe I see a problem with the init.d script too :)
It uses the brewed perl but doesn't include its INC
timotimo how is that even possible? :) 23:24
Zoffix 'cause the INC is setup with source ~/perl5/perlbrew/etc/bashrc in .bashrc file of modules.perl6.org user 23:25
Which I guess isn't run by the init script
timotimo ah, hehe.
making stuff reboot-safe is always the hardest thing :P 23:27
thanks for the effort :) 23:29
23:33 kid51 joined
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
Does anyone know how to fix that without my having to learn wtf etckeeper is? :)
timotimo we threw out etckeeper at some point 23:36
and we didn't clean up the stuff in /etc yet ...
i'm not sure how exactly we should do that
ilmari rm .git/hooks/*?
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
timotimo mhm, ok 23:37
23:40 cpage_ left
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
timotimo we could put that into a text file in the user's home 23:42
23:51 jack_rabbit joined 23:56 Actualeyes joined