Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-06-13

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:02 aindilis joined #perl6
00:06 dmol joined #perl6
00:23 Pleiades` joined #perl6
00:32 ren1us m: class A = {}; my $a = A.new(); my $w = $a.WHICH; my $good = True; for (0 .. 20000) { if ($a.WHICH ne $w) { $good = False; } }; say $good;
00:32 camelia rakudo-moar e9e842: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/NRZaSTs8Z2â�¤Unable to parse class definitionâ�¤at /tmp/NRZaSTs8Z2:1â�¤------> [32mclass A [33mâ��[31m= {}; my $a = A.new(); my $w = $a.WHICH;[0mâ�¤    expecting any of:â�¤        statement list…»
00:33 ren1us m: class A {}; my $a = A.new(); my $w = $a.WHICH; my $good = True; for (0 .. 20000) { if ($a.WHICH ne $w) { $good = False; } }; say $good;
00:33 camelia rakudo-moar e9e842: OUTPUT«False␤»
00:33 ren1us that strikes me as bad.
00:34 colomon p6: class A {}; my $a = A.new(); my $w = $a.WHICH; my $good = True; for (0 .. 20000) { if ($a.WHICH ne $w) { $good = False; } }; say $good;
00:35 camelia rakudo-jvm e9e842: OUTPUT«(timeout)»
00:35 camelia ..rakudo-moar e9e842: OUTPUT«False␤»
00:35 camelia ..rakudo-parrot e9e842, niecza v24-109-g48a8de3: OUTPUT«True␤»
00:36 ren1us at least parrot's behaving
00:37 colomon pm: class A {}; my $a = A.new(); my $w = $a.WHICH; my $good = True; for (0 .. 2000) { if ($a.WHICH ne $w) { $good = False; } }; say $good;
00:38 ren1us p6: class A {}; my $a = A.new(); my $w = $a.WHICH; my $good = True; for (0 .. 2000) { if ($a.WHICH ne $w) { $good = False; } }; say $good;
00:39 camelia rakudo-{parrot,jvm,moar} e9e842, niecza v24-109-g48a8de3: OUTPUT«True␤»
00:40 Pleiades` joined #perl6
00:41 ren1us it doesn't just occur with high iterations, though.  the issue popped up for me with multiple changes in value over just ~100 iterations
00:42 dalek nqp/qast_lazy_annotation: b8de192 | (Timo Paulssen)++ | / (9 files):
00:42 dalek nqp/qast_lazy_annotation: initial work on making QAST annotations lazily allocated
00:42 dalek nqp/qast_lazy_annotation:
00:42 dalek nqp/qast_lazy_annotation: with these, m-test passes
00:42 dalek nqp/qast_lazy_annotation: review: https://github.com/perl6/nqp/commit/b8de19293c
00:42 timotimo ^ a tiny bit of per-backend work is required here, if anybody would like to fix this up for java and parrot, that would be spiffy
00:44 timotimo i'm getting into stage optimize for rakudo's setting now :3
00:45 timotimo Cannot find method 'can'  ← *snrk*
00:46 timotimo spectest time \o/
00:57 dalek nqp/qast_lazy_annotation: 31cdd29 | (Timo Paulssen)++ | src/QAST/ (2 files):
00:57 dalek nqp/qast_lazy_annotation: forgot to check this file in; also need has_ann method
00:57 dalek nqp/qast_lazy_annotation: review: https://github.com/perl6/nqp/commit/31cdd29825
00:58 dalek rakudo/qast_lazy_annotation: 33d0dce | (Timo Paulssen)++ | src/Perl6/ (4 files):
00:58 dalek rakudo/qast_lazy_annotation: first pieces of QAST annotation allocation lazyness
00:58 dalek rakudo/qast_lazy_annotation:
00:58 dalek rakudo/qast_lazy_annotation: this gets us to a bunch of passing spec tests.
00:58 dalek rakudo/qast_lazy_annotation: review: https://github.com/rakudo/rakudo/commit/33d0dcebcb
00:58 timotimo gonna head to bed for now
01:03 timotimo ^ seems to break whatever code chaining (with comparison operators like <)
01:06 timotimo t/spec/S32-io/IO-Socket-Async.t - seems unreliable; 1x 0 fails, 2x 1 fails, 1x 2 fails
01:06 timotimo other than that, spectests are almost completely clean. cool :)
01:06 hoverboard joined #perl6
01:21 timotimo saves about 11mb of ram in the core setting compilation on moarvm (out of 785 mb)
01:23 timotimo o/ #perl6
01:24 vendethiel o/
01:25 Su-Shee_ joined #perl6
01:34 klapperl joined #perl6
01:45 raiph joined #perl6
01:50 Sqirrel joined #perl6
02:03 Alina-malina joined #perl6
02:05 immortal joined #perl6
02:05 immortal joined #perl6
02:13 Pleiades` joined #perl6
02:33 btyler joined #perl6
02:33 atroxaper joined #perl6
02:37 PZt joined #perl6
02:39 xragnar_ joined #perl6
02:39 dalek specs: 67579a1 | (Stéphane Payrard)++ | S05-regex.pod:
02:39 dalek specs: :args named parcel argument in Grammar.parse
02:39 dalek specs: review: https://github.com/perl6/specs/commit/67579a1cf7
02:53 dalek roast: 1bc8a5f | (Stéphane Payrard)++ | S05-grammar/example.t:
02:53 dalek roast: test for Grammar.parse with :args
02:53 dalek roast:
02:53 dalek roast: partially deborked the rest of the tests
02:53 dalek roast: review: https://github.com/perl6/roast/commit/1bc8a5fee6
02:58 cognominal https://github.com/rakudo/rakudo/pull/279
03:36 atroxaper joined #perl6
03:38 kaare_ joined #perl6
03:42 bjz_ joined #perl6
03:54 PerlJam cognominal++
04:28 rurban joined #perl6
04:43 hoverboard joined #perl6
04:57 atroxaper joined #perl6
05:00 kaare_ joined #perl6
05:11 nwc10 as a footnote to my e-mail about the hackathon in Salzburg: http://www.nntp.perl.org/group/perl.perl6.compiler/2014/06/msg9598.html
05:13 nwc10 The venue is less than 4km from Germany, so it's almost the "German Perl 6 hackathon" that people were keen to have this year.
05:22 kaleem joined #perl6
05:34 PZt joined #perl6
05:37 [Sno] joined #perl6
05:45 bjz_ joined #perl6
06:18 rindolf joined #perl6
06:18 denis_boyun_ joined #perl6
06:21 lizmat joined #perl6
06:35 hoverboard joined #perl6
06:36 darutoko joined #perl6
06:44 SamuraiJack joined #perl6
06:55 thou joined #perl6
06:56 ChoHag Can I have a method in a role which modifies the behaviour of a method of the consuming class?
06:57 ChoHag Mostly for cosmetic reasons. I could always just use different method names in the role & class.
06:58 atroxaper joined #perl6
06:59 lizmat afaik, not with standard role consuming, as any method in a class will override the method in the role
07:00 lizmat which is the only way you can do resolution of consuming two roles with identical method names
07:00 lizmat commut&
07:07 zakharyas joined #perl6
07:11 ChoHag Why does this work: > my $rx = rx/abc/; $rx.perl;
07:11 ChoHag regex (Mu: *%_) { #`(Regex|140087721929376) ... }
07:11 ChoHag But this doesn't: > my %rh = { rx/abc/ => 1 }; $rh.perl;
07:11 ChoHag {"" => 1}
07:11 ChoHag Where does the second regex go?
07:11 timotimo m: my $rxobj = rx/abc/; say $rxobj.Str;
07:11 camelia rakudo-moar e9e842: OUTPUT«␤»
07:12 timotimo m: my $rxobj = rx/abc/; say $rxobj.perl;
07:12 camelia rakudo-moar e9e842: OUTPUT«regex (Mu: *%_) { #`(Regex|139834052115832) ... }␤»
07:12 timotimo that's why; .Str is called to generate a key
07:12 ChoHag Ah.
07:12 ChoHag Presumably a hash is not the best choice then for a map of test => actions?
07:13 ChoHag Or do I just need to not use Str somehow?
07:14 timotimo you can have a hash that takes Object Keys
07:14 igorsutton joined #perl6
07:15 timotimo m: my %objhash{Any} = rx/abc/ => -> { say "yay!" }, rx/def/ => -> { say "nay" }; for %objhash -> $pair { say "testing ", $pair.key.perl; if "abc" ~~ $pair.key { $pair.value() } }
07:15 camelia rakudo-moar e9e842: OUTPUT«testing regex (Mu: *%_) { #`(Regex|140564895669568) ... }␤testing regex (Mu: *%_) { #`(Regex|140564895670392) ... }␤»
07:15 timotimo hm, almost.
07:17 timotimo m: say "abc" ~~ rx/abc/
07:17 camelia rakudo-moar e9e842: OUTPUT«「abc」␤␤»
07:18 timotimo m: my $pair = rx/abc/ => "hi there"; say "abc" ~~ $pair.key
07:18 camelia rakudo-moar e9e842: OUTPUT«「abc」␤␤»
07:18 timotimo m: my %h{Any} = rx/abc/ => "hi there"; say %h.perl; say %h.keys[0].WHAT
07:18 camelia rakudo-moar e9e842: OUTPUT«Hash[Any,Any].new(regex (Mu: *%_) { #`(Regex|140086181605032) ... } => "hi there")␤(Regex)␤»
07:19 timotimo m: my %h{Any} = rx/abc/ => "hi there"; say %h.perl; say "abc" ~~ %h.keys[0]
07:19 camelia rakudo-moar e9e842: OUTPUT«Hash[Any,Any].new(regex (Mu: *%_) { #`(Regex|140502318527160) ... } => "hi there")␤「abc」␤␤»
07:19 timotimo oh, duh :)
07:19 timotimo m: my %objhash{Any} = rx/abc/ => -> { say "yay!" }, rx/def/ => -> { say "nay" }; for %objhash -> $pair { say "testing ", $pair.key.perl; if "abc" ~~ $pair.key { $pair.value.() } }
07:19 camelia rakudo-moar e9e842: OUTPUT«testing regex (Mu: *%_) { #`(Regex|139878260821112) ... }␤yay!␤testing regex (Mu: *%_) { #`(Regex|139878260821936) ... }␤»
07:19 timotimo there we go; i was getting the key, not invoking it
07:19 timotimo on the other hand, i'd suggest a list of pairs instead of a hash
07:20 timotimo gotta go for now
07:24 woosley left #perl6
07:24 SamuraiJack joined #perl6
07:24 FROGGS joined #perl6
07:33 timotimo ChoHag: did that help?
07:35 dmol joined #perl6
07:42 spider-mario joined #perl6
07:53 brrt joined #perl6
08:00 virtualsue joined #perl6
08:05 denis_boyun_ joined #perl6
08:12 Alula_ joined #perl6
08:15 ChoHag "use a list of pairs" did.
08:20 lizmat joined #perl6
08:24 lizmat bienvenue de la carrefour numerique au cite des sciences en Paris
08:25 ChoHag Hello from Hampshire.
08:25 fhelmberger joined #perl6
08:30 dalek Perlito: 55096c6 | (Flavio S. Glock)++ | TODO-perlito5:
08:30 dalek Perlito: Perlito5 - TODO update
08:30 dalek Perlito: review: https://github.com/fglock/Perlito/commit/55096c6d6d
08:34 anaeem1_ joined #perl6
08:37 lizmat r: say nqp::where(1).WHAT
08:37 camelia rakudo-{parrot,jvm,moar} e9e842: OUTPUT«(Int)␤»
08:37 lizmat jnthn: seems nqp::where is already returning a boxed Int
08:38 lizmat so there's no need to box it in Mu::WHERE: nqp::p6box_i(nqp::where(self))
08:38 lizmat or am I missing something
08:43 jnthn lizmat: Yes, you are.
08:43 thou joined #perl6
08:43 jnthn lizmat: How did you determine it's a boxed thing?
08:44 jnthn lizmat: I suspect it's just the code-gen auto-boxing it for you, 'cus you did e.g. .WHAT on it.
08:44 jnthn lizmat: I don't know how things are today; I know the code-gen for MoarVM will always do the right thing in that regard.
08:44 lizmat ah, ok
08:44 jnthn lizmat: I forget if Parrot's code-gen is a bit more sensitive.
08:44 jnthn It certainly was at one point
08:45 jnthn But maybe not since the QAST do-over
08:45 lizmat anyway, I shouldn't touch Mu::WHERE then  :-)
08:46 pecastro joined #perl6
08:46 jnthn lizmat: Well, doing it that way isn't harmful, as the compiler would emit it anyway.
08:46 jnthn On Moar/JVM bakcends, at least.
08:47 lizmat but would it not be boxed twice now?
08:48 jnthn huh?
08:48 jnthn The auto-boxing happens if the thing is used in a context that needs an object.
08:48 jnthn nqp::p6box_i does not supply such a context; it's a think that needs a native int.
08:51 lizmat ah, indeed:
08:51 lizmat r: my int $a=42; say $a.WHAT  # WHAT autoboxes
08:51 camelia rakudo-{parrot,jvm,moar} e9e842: OUTPUT«(Int)␤»
08:58 cognominal lizmat: "... du carrefour numérique ..." :)
09:00 atroxaper joined #perl6
09:00 lizmat merci  :-)
09:01 lizmat je pense que je suie trop moderne  :-)
09:01 lizmat *suis
09:01 cognominal see you tomorrow
09:02 arnsholt Doesn't penser que take the subjunctive? O:)
09:03 jnthn But subjunctives are hard... :P
09:03 arnsholt And sort of superfluous in French (but don't tell l'Académie Française =)
09:04 arnsholt Apparently Spanish still uses them to give different shades of meaning, but French has pretty much stopped doing that entirely
09:04 cognominal even many french got it wrong : "si j'aurais (sic) su, je n'aurais (sic) pas venu"
09:06 arnsholt Yeah, there's a huge gap between actual spoken French and the prescriptive written version
09:06 arnsholt Thankfully I can mostly get away with not thinking about the subjunctive, since it's often identical to the normal present when spoken =)
09:06 * lizmat refrains from speaking French online  :-)
09:09 arnsholt I usually refrain from speaking it when not in France, but I don't mind eavesdropping when there are French-speaking people around =)
09:11 moritz Norwegian killed my French
09:12 moritz whenever I try to remember a word in French, my brain helpfully comes up with the Norwegian word (if I know it)
09:13 brrt moritz, how does that happen :-) norwegian and french are not exactly similar
09:15 arnsholt It's very common
09:16 arnsholt Apparently all languages that you're learning and where your skill is in the lower range, it all gets sorted into a big bag labelled "miscellaneous" or something like that
09:17 xiaomiao gets worse when you learn more languages
09:17 jnthn The big bag is great for pulling multi-language puns out of, though. :)
09:17 * jnthn sucks at all languages, but can pun ok :P
09:17 arnsholt That is true =)
09:24 brrt apparently, the grammatical word / sentence structure of spoken language is not encoded in the sounds - i.e. there is no distinction between a end-of-sentence pause, an end-of-word pause, and an end-of-syllable pause
09:25 brrt i.e. the grammar of language is 'constructed' by the brain on top of the sounds, on the basis of what its knows of the language
09:25 brrt and i wonder how this relates to computer languages, i.e. the criticism of perl being line noise
09:27 xiaomiao I think that's mostly because perl deviates from most other languages in two ways
09:27 xiaomiao one is implicit stuff, which is "offensive" to some
09:28 brrt which is natural in real languages
09:28 xiaomiao and the other is the very high "density" achieved by using almost every ascii-character in the syntax
09:28 FROGGS joined #perl6
09:28 xiaomiao it takes some time to understand that, and figure out why it's not bad
09:28 brrt as does c, by the way, and c++
09:28 dalek rakudo/nom: bb75fa7 | (Elizabeth Mattijsen)++ | src/core/CompUnitRepo/Local/ (2 files):
09:28 dalek rakudo/nom: CURL::(File|Installation) are value based
09:28 dalek rakudo/nom:
09:28 dalek rakudo/nom: So provide a .WHICH and make sure there will always only be one for any
09:28 dalek rakudo/nom: given path.
09:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bb75fa7f3b
09:30 jnthn As somebody with sufficiently crappy eyesight that my parsing speed depends heavily on shape-matching words, and actually having to read the letters in words slows me down, Perl using all the chars on the keyboard to make different things visually stand out is really helpful for me.
09:30 dalek specs: f87f96b | (Elizabeth Mattijsen)++ | S99-glossary.pod:
09:30 dalek specs: Add CURL lemma
09:30 dalek specs: review: https://github.com/perl6/specs/commit/f87f96be64
09:35 donaldh joined #perl6
09:42 cognominal woolfy in a few minutes in the live feed : http://cite-sciences.ubicast.eu/lives/living-lab/
09:44 timotimo will she be speaking french, too? :(
09:45 cognominal I don't think so.  http://journeesperl.fr/fpw2014/talk/5520
09:45 timotimo ah, i've seen that talk before
09:47 vendethiel is he presenting ruby on rails :) ?
09:47 Psyche^_ joined #perl6
09:48 sqirrel_ joined #perl6
09:48 * lizmat hopes that woolfy is back in time from shopping
09:49 vendethiel oooh I hate these websites that think shift+? is a good thing to override for they help stuff. IM FRENCH AND I HATE YOU
09:51 cognominal real programmers use QWERTY : all the good stuff without shift.
09:51 vendethiel real programmers don't use the family computer...
09:53 cognominal you can configure your profile to QWERTY. My laptop is really AZERTY.
09:54 vendethiel I know, but then I have to change it every time
09:59 treehug88 joined #perl6
10:07 cosimo joined #perl6
10:11 brrt left #perl6
10:19 lizmat woolfy postponed until 14:00
10:26 cognominal r:  say (class C {}).HOW ~~ Perl6::Metamodel::ClassHOW
10:26 camelia rakudo-moar e9e842: OUTPUT«===SORRY!===␤Could not find symbol '&ClassHOW'␤»
10:26 camelia ..rakudo-jvm e9e842: OUTPUT«Could not find symbol '&ClassHOW'␤  in method <anon> at gen/jvm/CORE.setting:12847␤  in any find_method_fallback at gen/jvm/Metamodel.nqp:2627␤  in any find_method at gen/jvm/Metamodel.nqp:948␤  in any  at gen/jvm/BOOTSTRAP.nqp:1684␤  in block  at…»
10:26 camelia ..rakudo-parrot e9e842: OUTPUT«Could not find symbol '&ClassHOW'␤  in method <anon> at gen/parrot/CORE.setting:12838␤  in any find_method_fallback at gen/parrot/Metamodel.nqp:2710␤  in any find_method at gen/parrot/Metamodel.nqp:949␤  in any  at gen/parrot/BOOTSTRAP.nqp:1696…»
10:27 jnthn m: say Metamodel::ClassHOW
10:27 camelia rakudo-moar e9e842: OUTPUT«(Perl6::Metamodel::ClassHOW)␤»
10:29 cognominal ok
10:29 nwc10 t/spec/S32-io/IO-Socket-Async.t sometimes fails:
10:29 nwc10 not ok 4 - Echo server
10:30 nwc10 (that was on MoarVM, and on the inline branch, so might be especailly special)
10:31 sergot hi #perl6 o/
10:31 thou joined #perl6
10:34 donaldh joined #perl6
10:38 masak \o :)
10:41 SamuraiJack joined #perl6
10:45 kivutar joined #perl6
10:53 colomon \o
10:57 SamuraiJack joined #perl6
11:01 atroxaper joined #perl6
11:06 dalek rakudo/nom: 46b9d27 | (Elizabeth Mattijsen)++ | src/core/CompUnitRepo/Local/ (2 files):
11:06 dalek rakudo/nom: Normalize .gist and add .perl for roundtripping
11:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/46b9d27ac1
11:18 sergot Polish Perl Workshop 2014, only Saturday for now: https://www.youtube.com/playlist?list=PLf0lAaAcx8ybKJj_QAnVFvVdu3lHbqGz-
11:20 kurahaupo joined #perl6
11:23 * colomon used git-svn-migrate on his main $work repo last night...
11:41 SamuraiJack joined #perl6
11:46 masak sergot++
11:47 lizmat m: CompUnitRepo::Local::File.new(".").WHAT  # works fine
11:47 camelia rakudo-moar 46b9d2: ( no output )
11:48 lizmat m: CompUnitRepo::Local::File.new(".").WHAT.say  # huh?
11:48 camelia rakudo-moar 46b9d2: OUTPUT«Cannot look up attributes in a type object␤  in method gist at src/gen/m-CORE.setting:20843␤  in sub say at src/gen/m-CORE.setting:13797␤  in method say at src/gen/m-CORE.setting:1057␤  in block  at /tmp/xcsZ8spQJz:1␤␤»
11:48 lizmat apparently, the say is trying to .gist the output of WHAT
11:49 lizmat and that fails, because the WHAT returns a CURL::Local::File object, rather than a Str ?
11:49 lizmat banging my head trying to figure out what makes this .WHAT special
11:49 lizmat :-(
11:50 dalek rakudo/nom: 1ce594c | (Elizabeth Mattijsen)++ | src/core/CompUnitRepo/Local/ (2 files):
11:50 dalek rakudo/nom: Add some typing, to be sure
11:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1ce594cdd4
11:51 rurban joined #perl6
11:51 tadzik oh, when sunday's up I will know how much time did my talk really take :)
11:52 * masak .oO( it took 3 hours, but we were all riveted by that hand controller, so we didn't want to tell you )
11:52 tadzik heh
11:52 tadzik I actually did absolutely nothing with steroids since then
11:53 tadzik but I got sort of sucked into the bachelors thingy
11:53 masak what's that?
11:53 tadzik the thesis I write
11:53 tadzik well, wrote, basically :)
11:54 masak oh, that kind of bachelor's.
11:55 tadzik oh yes
11:55 tadzik I still like the "engineer" title better
11:58 mr-foobar joined #perl6
12:00 * vendethiel notices that masak's slides are plain basic. Whew, still got a chance !
12:01 cognominal joined #perl6
12:02 masak "plain basic"?
12:03 atroxaper joined #perl6
12:03 vendethiel masak: blank background
12:03 tadzik GOTO 10
12:03 vendethiel masak: the container, not the content ;)
12:04 masak yes, form is important.
12:04 * vendethiel saw the camels Woolfy++ showed him 2 days ago
12:06 cognominal Woolfy is live btw
12:06 vendethiel oh :)
12:06 vendethiel cognominal: the sound is terribly low
12:07 cognominal they can't do anything about it.
12:07 cognominal you know, computers...
12:07 vendethiel damn these computers.
12:08 vendethiel ooh, much better
12:09 cognominal asymmetric marketting
12:12 vendethiel cognominal: may I show you my slides, a bit later :) ? You'll tell me what you think
12:13 cognominal sure
12:15 ren1us joined #perl6
12:20 thou joined #perl6
12:21 jnap joined #perl6
12:23 mr-fooba_ joined #perl6
12:23 BenGoldberg joined #perl6
12:28 [Coke] "But this doesn't: > my %rh = { rx/abc/ => 1 }; $rh.perl;" <- you changed sigils, btw.
12:29 masak also, if you use the % sigil, then you don't need the {}
12:30 anaeem1_ joined #perl6
12:33 * lizmat gives up trying to understand why CURL::File.new(".").WHAT.say bombs
12:44 jsn_ joined #perl6
12:45 atroxaper joined #perl6
12:53 masak m: class C {}; class C::D {}; say C.WHAT; say C::D.WHAT
12:53 camelia rakudo-moar 1ce594: OUTPUT«(C)␤(C::D)␤»
12:58 mr-foobar joined #perl6
12:58 sqirrel_ joined #perl6
12:59 masak so there's something that distinguishes CURL::File from C::D.
12:59 masak m: class CURL::File {}; say CURL::File.WHAT
12:59 camelia rakudo-moar 1ce594: OUTPUT«(CURL::File)␤»
12:59 masak ...and it's not the name ;)
13:00 telex joined #perl6
13:03 atroxaper There is C::D and D::C (i.e. CURL::File)
13:09 guru joined #perl6
13:14 rurban joined #perl6
13:15 molaf joined #perl6
13:16 virtualsue joined #perl6
13:20 atroxaper joined #perl6
13:22 lizmat jnthn: would it be an idea to write a Lock class that would allow .protect(code), but would just execute the code
13:22 lizmat (and have that available in parrot)
13:23 lizmat so that we can easily protect some sensitive code (like pushing to *@INC) transparently on all backends?
13:27 dalek rakudo/nom: e030a7b | (Elizabeth Mattijsen)++ | src/core/CompUnitRepo/Local/ (2 files):
13:27 dalek rakudo/nom: Make sure we use absolute paths internally
13:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e030a7bbbc
13:33 dalek rakudo/nom: f412f8a | (Elizabeth Mattijsen)++ | src/core/ (3 files):
13:33 dalek rakudo/nom: Only store in @*INC what actually exists
13:33 dalek rakudo/nom:
13:33 dalek rakudo/nom: Please note that this is just runtime, it doesn't change anything in the
13:33 dalek rakudo/nom: configuration.
13:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f412f8a1e1
13:35 prevost joined #perl6
13:37 woolfy joined #perl6
13:40 [Coke] ^^ so if someone dyanmically creates that path after the program starts, it won't be used?
13:41 virtualsue joined #perl6
13:41 lizmat that's the idea...
13:42 lizmat there's nothing stopping you creating a path and shoving an entry in @*INC at runtime
13:42 lizmat for that path
13:42 * vendethiel is almost done writing his slides
13:42 lizmat [Coke]: does that alleviate your worries ?
13:42 vendethiel I still don't know when I'm due :D.
13:43 * vendethiel wrote more than he thought he {w,c}ould
13:43 lizmat vendethiel: passed your worry to elbeho
13:43 lizmat vendethiel++
13:43 vendethiel ha, thanks
13:43 vendethiel (it's totally in french though, I don't speak english :P)
13:44 lizmat pas de probleme
13:44 lizmat vendethiel: you're on at 17:30 tomorrow
13:45 [Coke] lizmat: what if the path is created outside of the perl process?
13:46 lizmat as long as you add the @*INC entry *after* the path is created, you're fine
13:46 vendethiel lizmat: eh, but there's somebody at 17h20 !
13:46 lizmat vendethiel: I'm just telling you what elbeho told me
13:46 lizmat :-)
13:46 lizmat I guess the program will change  :-)
13:46 * vendethiel is a bit lost
13:46 mr-foobar joined #perl6
13:47 lizmat vendethiel: why?  if elbeho says it's at 17:30, it will be (or a close approximation of) :-)
13:47 vendethiel lizmat: I sure hope so :P
13:47 SamuraiJack_ joined #perl6
13:48 vendethiel Okay, at some point I'm just gonna drop my slides and start talking "normally".
13:48 atroxaper joined #perl6
13:49 lizmat that would be best, and don't forget to breathe inbetween  :-)
13:50 vendethiel did I do that ?
13:50 mr-foobar joined #perl6
13:50 woolfy vendethiel: and remember that most people in the room are in awe of you, because you have the guts to go on stage and present slides, and they don't dare to, or don't know how to...
13:51 vendethiel woolfy: I certained wouldn't dare or know how to.
13:51 wooden joined #perl6
13:51 vendethiel this is all just an accident. Probably good one, though.
13:51 vendethiel (as opposed to head-hitting accidents)
13:51 timotimo the last time i did a talk - a lightning talk about Lojban - i used the "illusion of transparency" trick to become calm and present well
13:52 vendethiel oh, I'm not afraid of speaking :). I'm far too talkative to be scared :D.
13:52 vendethiel as lizmat, she had to listen to me for so long her hair grew below her shoulders.
13:52 vendethiel ask* lizmat
13:52 lizmat hehe, I'm used to listening a lot  :-)
13:53 BenGoldberg joined #perl6
13:54 xusia joined #perl6
13:54 [Coke] lizmat: how do you know to add the INC entry if you didn't create the dir?
13:55 [Coke] (I'm not saying this is a common usage, but isn't this a change from p5?)
13:55 lizmat it *is* a change from p5
13:55 lizmat but S11 changes in a lot of ways from p5
13:56 [Coke] ok.
13:56 lizmat I'm not even sure we need to expose @*INC as such
13:56 lizmat that by itself feels very p5ish
13:57 lizmat in any case, that change reduces the number of @*INC entries on my machine from ~10 to 2
13:59 lizmat if it should be possible to add a non-existing path to @*INC, we can always add a flag to the constructor for it
14:03 woolfy I am sure we will applaud ventethiel for giving a briliant presentation!
14:04 xinming_ joined #perl6
14:04 scumdog joined #perl6
14:04 btyler joined #perl6
14:08 thou joined #perl6
14:09 hummeleB1 joined #perl6
14:09 kaare_ joined #perl6
14:13 lizmat jnthn: is there a reason why Promise.vow is not just using a simple $lock.protect( {} ) structure ?
14:20 vendethiel Okay, talk is ready. I tried on my sis' and I talked for 20min (and 35 seconds, but I'm sure you guys will forgive me :p)
14:22 lizmat yes, we will  :-)
14:22 moritz typically my actual presentation speed is higher than when I practise, 'cause I'm a bit more excited
14:22 moritz that might remove the extra 35s :-)
14:24 SamuraiJack_ joined #perl6
14:34 lizmat_ joined #perl6
14:35 [Coke] S99 glossary says:
14:35 [Coke] Last Modified: 30 June 2014
14:35 [Coke] ^^ let's use metadata instead of text to figure this out. :P
14:37 * FROGGS .oO( But what describes the metadata? )
14:37 brrt joined #perl6
14:41 dalek rakudo/nom: d8cd804 | (Elizabeth Mattijsen)++ | / (2 files):
14:41 dalek rakudo/nom: Give parrot basic $lock.protect(&code) facility
14:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d8cd804fac
14:41 vendethiel to talk about a method, do you write Array#[]? Array::[] ?
14:41 lizmat_ Array.method
14:42 vendethiel alrighty
14:42 lizmat if it is a sub: Foo::sub
14:42 vendethiel yea, I guess you need :: to talk about packages
14:43 lizmat jnthn: if Promise.vow uses $lock.protect, it deadlocks some spectests, does that make sense?
14:44 atroxaper joined #perl6
14:47 [Coke] I have never heard our glossary def of edsel. for me it's "old tech"
14:48 treehug88 joined #perl6
14:51 lizmat WP calls if an alias for "failure"
14:52 ren1us joined #perl6
14:52 geekosaur in the US it's something of an idiom for somethingt hat was pushed hard and flopped hard
14:52 scumdog left #perl6
14:53 lizmat because it tried to be everything to everybody, but in the end was not special enough for anybody
14:53 lizmat the product of market research gone awry
14:58 dalek specs: dbfaf58 | coke++ | S99-glossary.pod:
14:58 dalek specs: minor fixes, updates
14:58 dalek specs: review: https://github.com/perl6/specs/commit/dbfaf58c56
15:04 lizmat [Coke]++
15:06 atroxaper joined #perl6
15:10 dalek specs: a93489e | coke++ | S99-glossary.pod:
15:10 dalek specs: add twigil
15:10 dalek specs: review: https://github.com/perl6/specs/commit/a93489e612
15:10 zengargoyle joined #perl6
15:11 [Coke] http://perlcabal.org/syn/S28.html#Secondary_Sigils_(also_known_as_%22twigils%22) doesn't mention OO twigils of ., !
15:11 [Coke] ... which makes sense given the wrapper, I suppose. Perhaps we need a better place to doc twigils.
15:12 [Coke] ... like the place in S02.
15:12 [Coke] S28 should just link to that, then, IMO.
15:13 atroxaper joined #perl6
15:24 atroxaper joined #perl6
15:26 ivanshmakov joined #perl6
15:28 brrt left #perl6
15:33 dalek specs: 2b04097 | coke++ | S99-glossary.pod:
15:33 dalek specs: fix twigil link
15:33 dalek specs: review: https://github.com/perl6/specs/commit/2b04097b88
15:42 [Sno] joined #perl6
15:53 Rotwang joined #perl6
15:57 rurban_ perl5 MAD is now being removed
15:57 timotimo what is this MAD thing?
15:59 geekosaur a badly bitrotted thing that was at one point intended to help with p5 to p6, iirc
15:59 geekosaur bitrotted enough that it makes more sense to kill it and try again later, than to try to fix it now
16:01 tadzik I didn't know Perl 5 had Perl6-related things
16:02 tadzik MAD = Misc Attribute Decoration; unmaintained attempt at preserving
16:02 tadzik the Perl parse tree more faithfully so that automatic conversion to
16:02 tadzik Perl 6 would have been easier.
16:02 tadzik ooops
16:02 tadzik here though: http://perl5.git.perl.org/perl.git/commit/c8fa53ba3bd1359fc05af9b2d700b94c8f67d072
16:02 tadzik 47 files changed, 1590 insertions(+), 14338 deletions(-)
16:02 geekosaur considering how many things added to recent p5 came from (or were at least inspired by) p6...
16:03 vendethiel :)
16:03 lizmat no wonder jhi remains #1 in the number of lines changed in p5
16:04 vendethiel jhi ?
16:04 lizmat Jarkko Hietaniemi
16:05 lizmat perl 5.8 pumpkin (among other things)
16:06 * vendethiel doesn't know what a perl pumpkin is
16:06 [Coke] release manager, basically.
16:06 geekosaur "patch pumpkin", woth the "pumpking" being the gatekeeper / release manager
16:07 [Coke] (but much more so than a rakudo release manager)
16:07 lizmat http://www.perlmonks.org/index.pl?node_id=813451
16:08 lizmat Patrick Michaud (pmichaud) is the Perl6 pumpkin
16:09 lizmat which basically means that if we can't decide about the implementation of a Perl 6 feature, he has the final word
16:09 dalek rakudo-star-daily: e0d3110 | coke++ | log/ (13 files):
16:09 dalek rakudo-star-daily: today (automated commit)
16:09 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/e0d3110ee0
16:10 lizmat [Coke], geekosaur, jnthn, masak: agree with that definition in Perl 6 context?
16:11 geekosaur it's reasonable; the historical aspects don't apply, but then they don't really apply to perl 5 any more either
16:19 FROGGS joined #perl6
16:20 [Coke] lizmat: I'm happy to defer to pmichaud most times. I don't know that he's still pumpking, though.
16:22 woolfy left #perl6
16:23 rurban joined #perl6
16:23 lizmat [Coke]: https://github.com/rakudo/rakudo at the bottom still says so
16:23 lizmat :-)
16:24 FROGGS he's the project manager, that is how I understand it
16:27 lizmat end of day one at the FPW, socializing commences...
16:27 lizmat afk&
16:39 molaf joined #perl6
16:43 bluescreen10 joined #perl6
16:45 dalek perl6-roast-data: 466852e | coke++ | / (6 files):
16:45 dalek perl6-roast-data: today (automated commit)
16:45 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/466852eba1
16:58 dalek roast: f7da720 | rurban++ | S32-list/roll.t:
16:58 dalek roast: Parrot-fudge tests that rely on $*EXECUTABLE_NAME
16:58 dalek roast: review: https://github.com/perl6/roast/commit/f7da720998
16:58 dalek roast: 3dd009a | (Tobias Leich)++ | S32-list/roll.t:
16:58 dalek roast: Merge pull request #42 from rurban/master
16:58 dalek roast:
16:58 dalek roast: Parrot-fudge tests that rely on $*EXECUTABLE_NAME
16:58 dalek roast: review: https://github.com/perl6/roast/commit/3dd009a446
16:59 REPLeffect joined #perl6
17:00 erdic joined #perl6
17:05 guru joined #perl6
17:07 hoverboard joined #perl6
17:09 dmol joined #perl6
17:19 carlin joined #perl6
17:30 jnap1 joined #perl6
18:09 anaeem1_ joined #perl6
18:14 raiph joined #perl6
18:25 Ben_Goldberg joined #perl6
18:26 itz joined #perl6
18:29 hummeleBop1 joined #perl6
18:37 FROGGS r: say "\c[LINE FEED (LF)]".ord
18:37 camelia rakudo-jvm d8cd80: OUTPUT«(timeout)»
18:37 camelia ..rakudo-{parrot,moar} d8cd80: OUTPUT«10␤»
18:39 vendethiel FROGGS: with numbers :P
18:39 FROGGS hmm?
18:39 vendethiel oh no, I read the pugs one :)
18:40 BenGoldberg r: say "\c[PILE OF POO]".ord;
18:40 camelia rakudo-jvm d8cd80: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfile�Unrecognized character name PILE OF POO�at /tmp/tmpfile:1�------> [32msay "\c[PILE OF POO[33m�[31m]".ord;[0m�»
18:40 camelia ..rakudo-{parrot,moar} d8cd80: OUTPUT«128169␤»
18:43 denis_boyun_ joined #perl6
18:43 treehug8_ joined #perl6
18:44 btyler http://benscheirman.com/2014/06/regex-in-swift/ I hadn't realized that swift could declare operators ("func =~ infix { <stuff to wrap ugly regex and present it like perl/ruby> }")
18:46 btyler er, sorry, messed it up. you predeclare the operator (operator =~ infix {}) and attach a func to it later
18:49 FROGGS why do they implement the old syntax? :P
18:54 FROGGS arrgggg!! Unmarshallable foreign language value passed for parameter 'module_context'
18:54 krunen joined #perl6
18:56 vendethiel FROGGS: the question is : why did no other language get it right before ?
18:57 FROGGS vendethiel: they do not want to scare off users I suppose
18:57 vendethiel FROGGS: mmh ?
18:58 FROGGS many languages are older than Perl 6, and I guess the goals are quite different to Perl 6's
18:58 ilogger2 joined #perl6
18:58 FROGGS so, these older languages would need to change a lot to do what Perl 6 has now
18:58 FROGGS and that would perhaps drive users away
18:58 FROGGS but I dunno, I'm just a hacker :o)
18:59 vendethiel Syntax is not that relevant, really.
18:59 rurban_ FROGGS: which icu version does camelia use?
18:59 vendethiel I'm talking about reusability
18:59 FROGGS rurban: no idea
18:59 * rurban_ had to kill my browser for 10 minutes to get better benchmark results
19:00 rurban_ I can try it icu 4.8 and 4.4 also for the parrot whitespace issues. Maybe I have a too new one
19:00 FROGGS rurban: I have icu 4.8.1.1, and the tests work for me too
19:00 rurban_ I was testing with 5.2
19:00 FROGGS hmmmm
19:01 FROGGS we'd need to work around these icu changes
19:01 rurban_ It could be unicode 6.0 - 6.2 which my parrot supports now
19:01 rurban_ yes
19:01 FROGGS I'm glad that MoarVM has the unicode database built-in...
19:02 timotimo m: say (1+2i, 2+3i, 4+4i, 1+1i).classify({ $_.re, $_.im });
19:02 camelia rakudo-moar d8cd80: OUTPUT«p6listitems may only be used on a List␤  in method classify-list at src/gen/m-CORE.setting:9550␤  in method classify at src/gen/m-CORE.setting:1577␤  in block  at /tmp/lmYCkyzzt1:1␤␤»
19:02 timotimo m: say [1+2i, 2+3i, 4+4i, 1+1i].classify({ $_.re, $_.im });
19:02 camelia rakudo-moar d8cd80: OUTPUT«p6listitems may only be used on a List␤  in method classify-list at src/gen/m-CORE.setting:9550␤  in method classify at src/gen/m-CORE.setting:1577␤  in block  at /tmp/f59yfRmHSM:1␤␤»
19:02 timotimo ... oh?
19:03 timotimo p: say [1+2i, 2+3i, 4+4i, 1+1i].classify({ $_.re, $_.im });
19:03 camelia rakudo-parrot d8cd80: OUTPUT«Can not get attribute '$!items' declared in class 'List' with this object␤  in method classify-list at gen/parrot/CORE.setting:9481␤  in method classify-list at gen/parrot/CORE.setting:9461␤  in method classify at gen/parrot/CORE.setting:1581␤  i…»
19:03 timotimo p: say (1+2i, 2+3i, 4+4i, 1+1i).classify({ $_.re, $_.im });
19:03 camelia rakudo-parrot d8cd80: OUTPUT«Can not get attribute '$!items' declared in class 'List' with this object␤  in method classify-list at gen/parrot/CORE.setting:9481␤  in method classify-list at gen/parrot/CORE.setting:9461␤  in method classify at gen/parrot/CORE.setting:1581␤  i…»
19:04 timotimo p6: say List.new(1+2i, 2+3i, 4+4i, 1+1i).classify({ $_.re, $_.im });
19:04 camelia rakudo-jvm d8cd80: OUTPUT«().hash␤»
19:04 camelia ..niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Excess arguments to List.new, used 1 of 5 positionals␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (List.new @ 1) ␤  at /tmp/tmpfile line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) …»
19:04 camelia ..rakudo-parrot d8cd80: OUTPUT«Can not get attribute '$!items' declared in class 'List' with this object␤  in method classify-list at gen/parrot/CORE.setting:9481␤  in method classify-list at gen/parrot/CORE.setting:9461␤  in method classify at gen/parrot/CORE.setting:1581␤  i…»
19:04 camelia ..rakudo-moar d8cd80: OUTPUT«p6listitems may only be used on a List␤  in method classify-list at src/gen/m-CORE.setting:9550␤  in method classify at src/gen/m-CORE.setting:1577␤  in block  at /tmp/tmpfile:1␤␤»
19:07 timotimo m: say [1+2i, 2+3i, 4+4i, 1+1i].categorize({ ($_.re, $_.im) });
19:07 camelia rakudo-moar d8cd80: OUTPUT«("1" => [Complex.new(1, 2), Complex.new(1, 1), Complex.new(1, 1)], "2" => [Complex.new(1, 2), Complex.new(2, 3)], "3" => [Complex.new(2, 3)], "4" => [Complex.new(4, 4), Complex.new(4, 4)]).hash␤»
19:16 anaeem1 joined #perl6
19:18 rurban_ I've added the missing parrot unicode charcater names as https://github.com/parrot/parrot/issues/1075
19:26 treehug88 joined #perl6
19:32 anaeem1_ joined #perl6
19:33 anaeem1_ joined #perl6
19:35 [Coke] we need to be clear about which version of unicode is being tested/supported.
19:35 [Coke] (will help avoid cross-version test failures)
19:36 rurban_ I checked the UnicodeData.txt versions. LINE FEED always was "LINE FEED (LF)" (from 4.0 until 6.3)
19:36 rurban_ http://www.unicode.org/Public/
19:36 rurban_ unicode 2.0 - 3.0 used "LINE FEED" only
19:37 rurban_ unicode 1.0 had no name
19:37 FROGGS this might be to blame/check also: nqp/src/vm/parrot/ops/nqp.ops:3183:inline op is_uprop(out INT, in STR, in STR, in INT) :base_core {
19:37 rurban_ I'll check now what's up with icu
19:38 rurban_ Oh, good catch FROGGS
19:40 rurban_ FROGGS: But didn't you say your nqp/perl6-p passes these tests?
19:41 FROGGS it does
19:41 rurban_ So I can only think of icu
19:41 FROGGS things is that we can perhaps still query icu in a way to get at that information
19:41 rurban_ I'll try to get at the bottom of this
19:41 FROGGS rurban_++
19:50 treehug88 joined #perl6
19:52 bluescreen10 joined #perl6
19:53 bluescreen10 joined #perl6
19:55 kaare_ joined #perl6
19:55 bluescreen10 joined #perl6
19:55 anaeem1 joined #perl6
19:56 bluescreen10 joined #perl6
20:00 itz joined #perl6
20:00 cognominal__ joined #perl6
20:02 denis_boyun__ joined #perl6
20:03 rurban_ It's parrot already failing in find_codepoint "NEXT LINE (NEL)" => -1
20:05 spider-mario joined #perl6
20:07 itz joined #perl6
20:12 Rotwang joined #perl6
20:13 guru joined #perl6
20:21 ren1us joined #perl6
20:22 pecastro joined #perl6
20:38 rurban_ icu refuses to resolve "LINE FEED (LF)". tchrist against for it http://bugs.python.org/issue12753, python was against it as they "are not defined in the Unicode standard"
20:39 rurban_ ... tchrist argued for it
20:39 [Sno] joined #perl6
20:41 dmol joined #perl6
20:42 timotimo i wonder what raydiak is up to these days
20:42 colomon masak: I'm puzzled by Text::Markdown
20:49 rurban_ Oh I understand now. "LINE FEED (LF)" is indeed not the proper unicode name, <control> is. "LINE FEED (LF)" is just the name alias. that's why icu fails. need to find this API now
20:53 FROGGS yay! I fix my hang in v5's statmentlist rule!
20:53 FROGGS rurban_: that is what I was thinking
20:54 FROGGS we put a lot of effort in parsing the unicode database to get all names and aliases right for MoarVM
20:55 rurban_ I wonder why everybody else does this too. perl5, python, moar, ... does ibm really not provide this API??
20:57 FROGGS rurban: I see it that way: when I have code that uses unicode stuff, and I know it works with the compiler of my choice version 1.2.3, I don't wanna see it broken because somebody has a newer libicu
20:57 spider-mario joined #perl6
20:57 FROGGS that is why Perl 6 is meant to let you choose your unicode version for your part of your program
20:58 FROGGS (not that this is supported right now, but this will get important some day)
20:58 rurban_ I don't see that any icu version ever could produce a correct result for control chars so far. They refused to support these names. Looking now how to search for Name_Alias
20:59 timotimo how much ram does a single copy of the database cost?
21:01 FROGGS good question
21:09 [Sno] Holland:Spain 5:1 - gz Oranje :)
21:11 FROGGS m: Holland:Spain
21:11 camelia rakudo-moar d8cd80: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Oxd22DiwHrâ�¤Undeclared name:â�¤    Holland:Spain used at line 1â�¤â�¤Â»
21:11 [Sno] big issue
21:12 [Sno] that must be supported
21:12 FROGGS ahh, I don't know :o)
21:12 FROGGS I don't even like Tennis
21:12 [Sno] Holland:Spain must produce "eliminated" or "weggefegt"
21:13 FROGGS *g*
21:16 [Sno] btw FROGGS - you tell me when p6 can support native binding - I'd like to add support like Unix::Statgrab to p6, too
21:17 [Sno] or tell Liz and she tells me next niederrhein.pm
21:18 FROGGS [Sno]: we have NativeCall that should do the trick
21:18 [Sno] nope
21:18 FROGGS no?
21:18 FROGGS why not?
21:18 [Sno] I tried to explain that to you in Lyon and to someone in Kiev
21:19 FROGGS ahh, I remember some weird discussion :o)
21:19 FROGGS but sadly not too many details :/
21:19 [Sno] because NativeCall want eg. to know about bitwidth of parameters
21:19 FROGGS yes, that is something that needs to get better
21:20 [Sno] I have some experience with native binding in several "VM"'s
21:20 [Sno] the concept of native call don't work for API's like libstatgrab
21:21 [Sno] SDL is written for special bitwidth, iirc - for portable data types
21:21 FROGGS problem is when we do not have a piece of code that needs some feature, it is hard to implement it
21:21 FROGGS no, not really
21:22 [Sno] so if you need piece of code, check out libstatgrab ;)
21:22 FROGGS you also have to care about endianess and graphic card hardware etc
21:22 [Sno] but in SDL you can control all that, can't you?
21:23 FROGGS how have are about that when making the bindings, and for some bits the "user" has to care
21:24 FROGGS s/how/you/
21:24 FROGGS grrr
21:24 FROGGS you have to care about*
21:24 FROGGS (I'm tired)
21:24 [Sno] "you" in sense of "you as the author of the C library"?
21:25 FROGGS you as the author of the Perl module that provides the bindings
21:25 [Sno] we shouldn't mix to much side-discussions in there
21:25 [Sno] the Perl module can't guess the bindings - we tried in Kiev and it failed and dumped always
21:26 FROGGS you usually can't guess, correct
21:27 [Sno] what is needed is some kind of registering as XSUB in p5 provides (newXSproto_portable ...)
21:28 [Sno] C code can guess easily
21:29 FROGGS well, you have more information at that point, information you cannot obtain by just looking at a lib
21:31 [Sno] precisely - and p6 should provide a way to get the "more of information" in some way
21:31 [Sno] anyway - tired, too
21:32 FROGGS yeah
21:32 [Sno] but let's keep in touch regarding that
21:33 FROGGS perl6-m -MNativeCall -e 'sub get_cpu_totals() returns Int is native("libstatgrab") { * }; say get_cpu_totals()'
21:33 FROGGS 140576014886592
21:33 [Sno] long running monitoring appliances isn't a worst early adopter scenario for p6 ;)
21:33 FROGGS now we'd need to unpack that mem to cpu_percent_t :o)
21:33 [Sno] but it doesn't return in - it returns a pointer to a list of structs
21:35 [Sno] while sizeof(int), sizeof(long) and sizeof(long long), size_t, time_t and void * are surprisingly different here and there (depending on compiler settings etc.)
21:35 [Sno] padding of structures is interesting, too
21:36 FROGGS yes, these are things that are hard to implement, but still possible
21:37 [Sno] I think, having an API like all other VM's provide to C side would be sufficient
21:37 jnthn I suspect NativeCall should export c_int, c_long, c_long_long, c_size_t and so forth.
21:37 [Sno] jnthn: and how code the padding? enums?
21:38 FROGGS perl6-m ../statgrab.pl
21:38 FROGGS cpu_percent_t.new(user => 2.80321910516779e-39, kernel => 0e0, idle => 7.00820190575056e-40, iowait => 0e0, swap => 2.63626055885674e-38, nice => 0e0)
21:38 jnthn Struct padding is already computed by the alignment of the system you're doing the calls on.
21:38 FROGGS does not look that correct yet
21:38 [Sno] FROGGS: call it twice
21:38 [Sno] wait a second between the calls
21:38 FROGGS perl6-m ../statgrab.pl
21:38 FROGGS cpu_percent_t.new(user => 2.80491607760809e-39, kernel => 0e0, idle => 7.0124898790514e-40, iowait => 0e0, swap => 2.64180325480253e-38, nice => 0e0)
21:39 [Sno] jnthn: the passing might change depending on compiler flags or __attribute__()
21:39 [Sno] passing => padding
21:40 FROGGS perl6-m ../statgrab.pl
21:40 FROGGS cpu_percent_t.new(user => 9.8447437286377e0, kernel => 2.46111631393433e0, idle => 87.6699752807617e0, iowait => 0.0959397628903389e0, swap => 0e0, nice => 0.0241753086447716e0)
21:40 FROGGS that's better
21:40 [Sno] rtfm helps ;)
21:40 FROGGS I used the wrong C function before
21:41 [Sno] how? which wrong one?
21:41 FROGGS %Cpu(s):  9,8 be,  2,5 sy,  0,0 ni, 87,6 un,  0,1 wa,  0,0 hi,  0,0 si,  0,0 st
21:41 FROGGS first I called get_cpu_totals, and the latter was cpu_percent_t *cpu_percent_usage(void);
21:42 FROGGS but you see, the numbers are correct
21:42 FROGGS the %Cpu line is from `top`
21:43 FROGGS that is the script: https://gist.github.com/FROGGS/ab192c9eac80bcd1b3c0
21:43 [Sno] but those cpu percent is just gaming ;)
21:43 jnthn Well, I don't think [Sno]'s point is "can we get it correct on one system", it's "can we get it correct portably"
21:43 [Sno] jnthn: correct
21:43 [Sno] and cpu_percent is finally double[6] - so it's easy
21:44 FROGGS all I can say it that it looks like it is working for my little case here
21:44 [Sno] fs_stats is more difficult
21:45 [Sno] network_iface_stats isn't to easy, either
21:45 FROGGS [Sno]: but you see you can play around with it... and when you hit a bug when trying to make fs_stats work, then we have something we can solve
21:46 FROGGS IMO that is a better approach then waiting for me to tell you that it works when it works
21:46 [Sno] FROGGS: it's not worth the time, because it doesn't work portable
21:47 FROGGS [Sno]: how do you know?
21:47 [Sno] FROGGS: because we tried in Kiev ;)
21:47 FROGGS can you provide the script?
21:47 [Sno] p6 only know about int32 or int64 etc.
21:48 [Sno] FROGGS: we didn't keep it after it only dumps
21:48 FROGGS :/
21:48 [Sno] but jnthn was around, he might remember
21:48 jnthn FROGGS: I already have cases where this happens on Windows vs Linux, fwiw. A C "long" can mean something different between those two.
21:48 [Sno] I told you what I think what is required - some native API
21:48 atroxaper joined #perl6
21:49 jnthn "native API" is kinda underpsecified...
21:49 FROGGS [Sno]: I cannot implement or fix something with that vague sentence, sorry
21:49 [Sno] I might have not much experience in writing new languages - but I have strong experience in binding native code into VM's in a portable way
21:50 FROGGS I'd prefer to have some specific code that cannot work right now, like calling a specific C-function and handling its return value
21:51 [Sno] let's start with: need to allocate and free VM variables (scalar, arry, hash)
21:51 [Sno] need to assign values to scalars
21:51 jnthn [Sno]: Uh, you *don't* every free things explicitly at a VM level in anything Perl 6 runs on.
21:51 jnthn *ever
21:51 jnthn That's Perl 5 thing, assuming ref counting.
21:51 jnthn But it sounds like you'd like us to recreate XS.
21:52 [Sno] jnthn: nope - there're other ways doing that
21:52 jnthn uh, Perl 5 think.
21:52 [Sno] but finally any kind of marshalling needs to define a way to exchange data structures ;)
21:52 jnthn Yes, that's the point of the CArray and CStruct REPRs.
21:53 FROGGS [Sno]: why do you want to alloc+free a scalar? isnt it enough to pass stuff to C function and get proper Perl 6 values back?
21:53 jnthn And there's no reason we can't parameterize them on layout strategy.
21:53 Sqirrel joined #perl6
21:53 [Sno] FROGGS: there're thing you cannot control (lack of information) when calling from perl6 -> native
21:54 [Sno] jnthn: it's a runtime (link time) thing
21:54 FROGGS still, allocating a Perl 6 variable won't help you there
21:54 [Sno] it's a start
21:54 jnthn [Sno]: Most things in Perl 6 are :P
21:54 [Sno] to many special cases (enum, attribute(packed), attribute(aligned), ...)
21:55 [Sno] so what you need is code a mapping where you know value range of src and tgt
21:55 [Sno] XS (perl5 api) is little bit over-complex
21:55 [Sno] so no need to repeat
21:56 jnthn Yes, my point in this is specifying the mapping should be *declarative*, not imperative.
21:56 [Sno] I don't get the sematic finesse of this sentence ;)
21:58 [Sno] how can you specify a declarative mapping when you don't know the compiler settings for default values of sizeof(enum), attribute(packed), attribute(aligned)
21:59 [Sno] in C, changing enums might change their size - but once created mapping at C level isn't affected
22:00 [Sno] and think about binding Go libraries, Fortran code or C++ classes
22:01 [Sno] with a native api (as Lua, Perl5, Python, ... provide) one can easily register objects and methods and have small facades/proxies calling the native objects
22:02 [Sno] c++ exported functions name mangeling can be "interesting" - at least when you never seen the compiler before
22:03 jnthn For the cases where we can't reaonably have NativeCall work out, there's absolutely nothing stopping you writing such an adapter. It's just that it's this time a things NativeCall understands => the library adapter.
22:03 jnthn In fact, I think people already did this.
22:04 [Sno] yes, it's the last fallback
22:04 [Sno] but always prefer better solutions
22:04 jnthn Asking for a "native API" to "the VM" in a Perl 6 context doesn't make a lot of sense. Which VM?
22:04 [Sno] it's a several step request
22:05 [Sno] JVM supports it - and it's likely possible to define in Perl6 to call "external JVM functions/methods"
22:05 [Sno] otherwise it wouldn't be possible to call Java code
22:05 jnthn Link me the thing you're referring to with "JVM supprots it".
22:06 denis_boyun joined #perl6
22:06 jnthn (So I've actually got a concrete example of what you're after.)
22:06 [Sno] a few years ago in a Project we played with that
22:06 [Sno] I have to dig, but I always assumed there was a way
22:07 FROGGS okay, one problem with sg_get_fs_stats is that the returned structure starts with the char*, and I don't know how to build up my CStruct class
22:07 [Sno] we finally abondoned JVM for Perl5, because XS suits our requirements much better
22:10 FROGGS jnthn: how would I declare an 'is native' sub when the C function looks like: foo(&bar) { ... } ?
22:10 [Sno] jnthn: quick google search results in http://stackoverflow.com/questions/903530/how-should-i-load-native-libraries-for-jni-to-avoid-an-unsatisfiedlinkerror being something we played with (I cannot swear - it's a 70% chance)
22:12 [Sno] but maybe NativeCall with some extensions as FROGGS suggest with a "compiler" for loader would be sufficient
22:13 [Sno] so a "h2p6 statgrab.h" creates the loader for the system it runs on
22:13 jsn_ joined #perl6
22:19 FROGGS perl6-m ../statgrab.pl
22:19 FROGGS cpu_percent_t.new(user => 9.68340015411377e0, kernel => 2.42127728462219e0, idle => 87.8722076416016e0, iowait => 0.0930133536458015e0, swap => 0e0, nice => 0.0231136325746775e0)
22:19 FROGGS sg_fs_stats.new(device_name => "/dev/sda1", fs_type => "ext3", mnt_point => "/")
22:20 FROGGS that CArray bit is ugly: https://gist.github.com/FROGGS/e61246c87d9b01998fd0
22:23 FROGGS but it works nicely here... last time I used NativeCall it did not supported sized ints at all :o)
22:23 FROGGS gnight
22:24 [Sno] FROGGS: show 2nd entry from fs_stats ;)
22:29 BenGoldberg joined #perl6
22:30 treehug88 joined #perl6
22:31 treehug88 joined #perl6
22:32 Mouq joined #perl6
22:32 Khisanth joined #perl6
22:34 dalek doc/redesign-sketch: c04689e | Mouq++ | sketch/ (21 files):
22:34 dalek doc/redesign-sketch: Change colors and create menu in the header
22:34 dalek doc/redesign-sketch:
22:34 dalek doc/redesign-sketch: Begin sketching redesign based on http://imgur.com/a/y1dHo .
22:34 dalek doc/redesign-sketch:
22:34 dalek doc/redesign-sketch: This commit changes the colors of the index page to match and adds the
22:34 dalek doc/redesign-sketch: menu items and the css to make the header look decent from many sizes.
22:34 dalek doc/redesign-sketch: review: https://github.com/perl6/doc/commit/c04689e63e
22:35 Mouq (I've wanted to work on this for mooonths)
22:36 denis_boyun__ joined #perl6
22:37 FROGGS Checking for library containing sg_get_process_stats_r... no
22:37 FROGGS *******************************************
22:37 FROGGS Couldn't find libstatgrab (at least 0.90)
22:37 FROGGS :o(
22:53 Khisanth joined #perl6
22:57 ivanshmakov joined #perl6
23:02 carlin_ joined #perl6
23:06 FROGGS joined #perl6
23:06 xenoterracide joined #perl6
23:12 xenoterracide can do generics in p6?
23:14 * Mouq has no idea what generics are
23:15 flussence Duck typing?
23:15 segomos_ typless variables?
23:16 segomos_ +e
23:18 Mouq If it's related to http://msdn.microsoft.com/en-us/library/vstudio/512aeb7t%28v=vs.100%29.aspx
23:19 Mouq , we do have parametric roles
23:19 Mouq Which I believe are the same thing?
23:21 xenoterracide generics are actually more like compiletime templates
23:22 xenoterracide you put parameters in place of class/interface, and it becomes strict typed
23:22 xenoterracide not sure on parametric roles though
23:25 xenoterracide basically it's a template for types
23:28 Mouq xenoterracide: huh. I'm sure masak knows :)
23:38 xenoterracide Mouq: reading s14 yes I'd say parametric roles achieves basically the same thing
23:47 Pleiades` joined #perl6
23:49 oetiker joined #perl6

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

Perl 6 | Reference Documentation | Rakudo