Camelia, the Perl 6 bug

IRC log for #perl6, 2012-09-14

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs

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

All times shown according to UTC.

Time Nick Message
00:15 benabik joined #perl6
00:19 s1n joined #perl6
00:19 MikeFair joined #perl6
00:19 skids joined #perl6
00:25 Circlepuller joined #perl6
00:32 telex joined #perl6
00:34 kid51 joined #perl6
00:41 MikeFair joined #perl6
01:06 hypolin joined #perl6
01:07 s1n joined #perl6
01:16 scott_ joined #perl6
01:56 FROGGS_ joined #perl6
02:01 flightrecorder joined #perl6
02:05 gootle joined #perl6
02:08 OuLouFu joined #perl6
02:45 s1n joined #perl6
03:45 benabik joined #perl6
03:54 yarp joined #perl6
04:09 benabik joined #perl6
04:20 hypolin joined #perl6
04:26 hypolin joined #perl6
04:33 Khisanth joined #perl6
04:44 hypolin joined #perl6
04:53 hypolin joined #perl6
05:04 * TimToady admires all the crickets
05:08 kaleem joined #perl6
05:16 sorear o/
05:22 moritz \o
05:41 dalek roast: eecc10a | moritz++ | S06-multi/proto.t:
05:41 dalek roast: test {*} in terms within protos
05:41 dalek roast: review: https://github.com/perl6/roast/commit/eecc10acec
05:51 marmay joined #perl6
06:04 wtw_ joined #perl6
06:29 kaleem joined #perl6
06:33 GlitchMr joined #perl6
06:48 wk_ joined #perl6
06:50 sorear occasionally I do things so stupid I have to share them
06:50 sorear [core]
06:50 sorear excludesfile = /Users/sorear/.gitconfig
06:50 sorear it has been set up this way for several months
06:53 stepnem joined #perl6
07:01 Parul joined #perl6
07:04 LlamaRider joined #perl6
07:06 flightrecorder joined #perl6
07:07 wamba joined #perl6
07:07 FROGGS joined #perl6
07:09 yarp joined #perl6
07:16 fhelmberger joined #perl6
07:17 moritz erm, what? :-)
07:18 tadzik heh,took me a while to catch :)
07:19 * moritz looked up the docs for core.exludesfile in order to verify it was really what I though
07:19 tadzik I assume it's a path to .gitignore
07:20 sorear yeah.
07:20 sorear $ git add t/rt_gh2.t
07:20 sorear The following paths are ignored by one of your .gitignore files:
07:20 sorear t
07:20 sorear and I'm like "wtf?"
07:20 sorear in retrospect this explains why I was having such trouble getting $HOME/.gitignore to work
07:22 tadzik :P
07:30 FROGGS good morning btw
07:32 tadzik FROGGS: this looks nice
07:32 tadzik File::Spec
07:34 FROGGS ya, and the important thing, it works ;o)
07:35 FROGGS wasnt that easy to add methods to a class depending on $*OS
07:35 FROGGS and making them reusable, so that the Mac part uses the Unix stuff by default, just overwriting a few
07:36 FROGGS it would be easier if you just could do: self."$package".method()
07:37 moritz ::($package_name).^add_method($name, $method);
07:37 moritz ::($package_name).^compose
07:38 FROGGS inside submethod BUILD?
07:38 FROGGS and if $name is the method name to add, what is $method?
07:38 FROGGS what does compose do?
07:39 FROGGS so much questions... I hope you already got your coffee ;o)
07:40 cognominal joined #perl6
07:41 cognominal joined #perl6
07:42 hoelzro does NativeCall work with C functions that require callbacks?
07:42 FROGGS hoelzro: it does
07:42 FROGGS there is a t/callbacks.t, have a look at that
07:43 hoelzro =D
07:43 hoelzro I'm thinking of trying to write a small Gtk application in Perl6
07:44 FROGGS Its pretty easy
07:44 FROGGS you might have a look at SDL
07:44 FROGGS as an example
07:45 FROGGS https://github.com/PerlGameDev/SDL6/
07:45 hoelzro whoa, cool
07:45 FROGGS SDL::Mixer::Channels uses callbacks
07:45 * hoelzro wishes he had more time to contribute to Rakudo
07:46 tadzik FROGGS: how is SDL6's NativeCall different from the original one?
07:46 Su-Shee hoelzro: PLEASE do. and PLEASE make it Gtk3 and use the GIR stuff (look into the Perl5 module, Gtk3 already reaches out halfway to the target bindings..)
07:46 FROGGS ya, but writing modules is very important too
07:46 FROGGS tadzik: what do you mean?
07:46 hoelzro Su-Shee: GIR?
07:46 tadzik FROGGS: https://github.com/PerlGameDev/SD​L6/blob/master/lib/NativeCall.pm6
07:47 FROGGS ohh this one
07:47 tadzik it also makes me think we may need 'conflicts' and 'provides' in panda :F
07:47 hoelzro it would probably just be the minimum I'd need to write my application
07:47 FROGGS there is the refresh method (at bottom) commented out, my rakudo 2012.08 doesnt like it
07:47 hoelzro but that would be a repository accepting contributions for further refinement =)
07:47 FROGGS but it shouldnt be in the repo though :/
07:48 sorear FROGGS: have you tried using "handles"?
07:48 Su-Shee hoelzro: Gtk3 and related has made a facility to make bindings much easier by creating an external definition of all symbols (I think) so you just wrap _that_ and not the calls itself. the Gtk3 Perl5 module is like 150 lines of code and that's ALL gtk3. look into it before you wrap anything.
07:49 hoelzro Su-Shee: I knew that Gtk3 uses inspectable objects, which is nice!
07:49 sorear hoelzro: if you use niecza it is possible to directly use the "gtk#" CLR binding
07:49 hoelzro so I'll probably go with that =)
07:49 FROGGS sorear: if I dont exactly know what you mean, does it states "no"?
07:49 Su-Shee hoelzro: https://live.gnome.org/GObjectIntrospection/
07:49 Su-Shee hoelzro: yes, that's exactly it! really, look into the Perl5 module, it couldn't be shorter...
07:49 hoelzro ok =)
07:49 hoelzro thanks for the info!
07:50 Su-Shee hoelzro: and half of the gnome stack actually HAS GIR, it's not just Gtk, but many libs more.
07:50 hoelzro neat
07:50 sorear FROGGS: role File::Spec::Guts { ... }; class File::Spec { has $!guts handles File::Spec::Guts = pick-guts($*OS); }; class File::Spec::Unix does File::Spec::Guts { ... }
07:50 hoelzro so I could make a GIR module that Gtk3 would be based on
07:51 cognominal joined #perl6
07:51 sorear tadzik: so I hear you've been playing with niecza
07:51 Su-Shee well alright, it's 900 lines -> https://metacpan.org/source/​TSCH/Gtk3-0.008/lib/Gtk3.pm
07:51 FROGGS sorear: no, haven't seen that possibility yet
07:51 tadzik sorear: I'm playing with it from time to time; I just ran some bailador code on it recently
07:51 Su-Shee hoelzro: no, you basically incorporate the GIR definition you generated and re-map it to perl calls so to speak.
07:52 hoelzro I see...
07:52 hoelzro I'll have to investigate this some more...
07:52 sorear tadzik: I'm curious how it went
07:52 Su-Shee hoelzro: I strongly recommend it, otherwise you're doing the typical wrap-c-lib-by-hand stuff.
07:53 FROGGS sorear: I will try that, that looks pretty much like one approach I tried yesterday
07:53 tadzik sorear: oh it was nice :) After I got over the surprise that niecza doesn't automagically pick ~/.perl6/lib it all went smoothly
07:53 Su-Shee hoelzro: and your gtk stuff has to be configured with --gobject-introspection of course.
07:53 tadzik works faster and better than rakudo, as in: it doesn't actually work on rakudo at all
07:53 Su-Shee hoelzro: atk, glib, pango, cairo, gtk, hmhm and hmhmhm.
07:53 tadzik (HTTP::Easy is broken)
07:54 tadzik sorear: I got hit by the lack of nativecall later, quite understandably
07:54 sorear I wonder how hard it would be to get nativecall working on niecza
07:55 moritz surely there's already a nativecall interface for mono/.net?
07:55 hoelzro NativeCall, imo, is one of the coolest things about Perl 6^W^WRakudo
07:56 moritz n: sub f($a, $b) { }; say &f.signature.perl
07:56 p6eval niecza v21-2-gc592587: OUTPUT«Potential difficulties:â�¤  $a is declared but not used at /tmp/iV10pdzAmf line 1:â�¤------> [32msub f([33mâ��[31m$a, $b) { }; say &f.signature.perl[0mâ�¤  $b is declared but not used at /tmp/iV10pdzAmf line 1:â�¤------> [32msub f($a, [33mâ��[31m$b) { }; say &f.…
07:56 moritz n: sub f($a, $b) { $a + $b }; say &f.signature.perl
07:56 sorear moritz: yes, there is a .net nativecall interface
07:56 p6eval niecza v21-2-gc592587: OUTPUT«:(Any $a, Any $b)␤»
07:56 hoelzro I almost feel that the NativeCall library should be part of the spec
07:56 moritz n: sub f($a, $b) { $a + $b }; say &f.signature.params.perl
07:56 p6eval niecza v21-2-gc592587: OUTPUT«(Any $a, Any $b).list␤»
07:57 sorear hoelzro: it absolutely should be
07:57 sorear maybe not a "full synopsis", but its interface should be significantly standardized
07:57 hoelzro yeah
07:57 moritz maybe not in its current form, but after going through one or two incremental interface optimizations
07:58 cognominal joined #perl6
08:00 FROGGS @all: IMO every module should run in the end on all platforms/compilers/interpreters with the same behaviour
08:00 FROGGS there is no need to write extra specs, the docs should be enough, no?
08:01 FROGGS but if you think NativeCall as a "core" module then just the docs are at a different place
08:01 moritz right
08:02 FROGGS but hey, I can write a synopsis for my bubblebreaker game ;o)
08:04 sorear FROGGS: NativeCall is an unusual case because of how tied to the runtime it is
08:05 sorear Niecza and Rakudo are likely to have more or less exactly the same Temporal, for instance, in the future, even though Temporal is in the setting
08:05 sorear s/Temporal/DateTime/g
08:06 sorear NativeCall is outside the setting, yet I doubt niecza and rakudo will ever share much code there
08:06 * sorear is reading the docs for the .net "NativeCall"-like functionality
08:12 bugi joined #perl6
08:18 dalek niecza: f1ac9af | sorear++ | lib/CodeGen.cs:
08:18 dalek niecza: Use real constant-table entries instead of directly accessing Kernel.FooMO in the code generator
08:18 dalek niecza: review: https://github.com/sorear/niecza/commit/f1ac9af17d
08:18 dalek niecza: 3a9759e | sorear++ | lib/CodeGen.cs:
08:18 dalek niecza: Remove now-dead code generation for static field access
08:18 dalek niecza: review: https://github.com/sorear/niecza/commit/3a9759ef6d
08:18 FROGGS sorear: how can I return my class File::Spec::Unix by pick-guts that is declared in another file?
08:19 sorear require File::Spec::Unix; return ::("File::Spec::Unix")
08:19 FROGGS ohh
08:20 sorear theoretically you should be able to do just "return File::Spec::Unix"
08:20 Psyche^ joined #perl6
08:20 sorear but there are spec problems with the handling of double-colon names
08:24 domidumont joined #perl6
08:24 Guest14777 left #perl6
08:25 sorear I am thinking of speccing "require" to return the object which it treats as a bindable class name
08:26 sorear so that the code for FROGGS would simply become 'return require File::Spec::Unix'
08:27 sorear I would like at least one +1 before I commit to the spec
08:27 FROGGS sounds cool
08:27 FROGGS sorear++
08:27 FROGGS ?
08:29 moritz nr: say (require Test)
08:29 p6eval niecza v21-2-gc592587: OUTPUT«Unhandled exception: System.NotImplementedException: The requested feature is not implemented.␤  at Anon.1.Run.MAIN.C0mainline (Niecza.Frame ) [0x00000] in <filename unknown>:0 ␤  at Niecza.Kernel.RunCore (Niecza.Frame& cur) [0x00000] in <filename unknown>:…
08:29 p6eval ..rakudo 0e36b2: OUTPUT«Nil␤»
08:29 sorear n: say (require "Test")
08:30 p6eval niecza v21-2-gc592587: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Expressional forms of require NYI at /tmp/eZjBlgmnrD line 1:â�¤------> [32msay (require "Test"[33mâ��[31m)[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1435 (die @ 5) â�¤  at /home/…
08:30 jnthn Would it desugar to like do { require-primitive Foo::Bar; ::('Foo::Bar') } ?
08:30 jnthn And if the module doesn't actually have something matching that name, you just get Any or so?
08:30 sorear jnthn: per spec, require is supposed to stub Foo::Bar at compile time
08:30 sorear jnthn: then install something into it later
08:30 sorear I'm just adding a clause that the returned value is the installed value
08:30 jnthn S11 says a lot of things :)
08:31 jnthn Well, require can't really do the installation
08:31 jnthn It'd be a product of global merging, no?
08:31 sorear Well, "use" is already doing this
08:31 sorear Insofar as:
08:31 sorear A.pm: my class A { }
08:31 sorear b.pl: use A;
08:31 sorear finds an object in A.pm and binds it to 'A', without involving global scopes
08:31 moritz r: sub f { use Test }; say f()
08:31 p6eval rakudo 0e36b2: OUTPUT«Nil␤»
08:32 jnthn That will not get you an A unless you add "is export"
08:32 jnthn Exporting lexical stuff not marked as "is export" is just wrong.
08:32 jnthn And it can work without "use" doing any kind of stubbing.
08:32 sorear it absolutely will.
08:33 moritz sorear: which part?
08:35 jnthn I've considered locating what file to load and handling import and global merging as distinct things ever since EXPORT became lexical.
08:35 sorear they are separate things
08:35 jnthn Right, so why is the mere presence of a "use" statement thinking it should do symbol installation?
08:36 jnthn It's global merging and the stuff in EXPORT that adds any symbols anywhere.
08:36 sorear ok, jnthn
08:37 sorear how do you think "need MyClass" works?
08:37 sorear see also S11:181
08:37 jnthn That just loads the module in question and does global merging, but doesn't do any kind of import.
08:37 sorear there are two import steps in a "use" statement
08:38 sorear one of them installs a lexical alias to the module object that is being imported
08:38 sorear the other insgtalls aliases to exported symbols
08:38 jnthn "module object" makes no sense to me.
08:38 sorear n: use Test; say Test.WHAT
08:38 jnthn Also s11 says a lot of conflicting things.
08:38 p6eval niecza v21-2-gc592587: OUTPUT«Unhandled exception: Unable to resolve method gist in type Test␤  at /home/p6eval/niecza/lib/CORE.setting line 1293 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1295 (gistcat @ 6) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1297 (say @ 7) …
08:39 mucker joined #perl6
08:45 dalek specs: d46a8ab | sorear++ | S11-modules.pod:
08:45 dalek specs: Spec a useful return value for "require"
08:45 dalek specs:
08:45 dalek specs: This is inspired by some repetitive code being written for File::Spec, see
08:45 dalek specs: http://irclog.perlgeek.de/​perl6/2012-09-14#i_5986754 .
08:45 dalek specs: review: https://github.com/perl6/specs/commit/d46a8abe6b
08:47 wk__ joined #perl6
08:47 mdupont_ joined #perl6
09:03 daniel-s_ joined #perl6
09:11 kresike joined #perl6
09:11 kresike hello all you happy perl6 people
09:11 tadzik kresike! \o/
09:12 kresike tadzik, o/
09:18 Guest33156 0、
09:19 Guest33156 o/
09:19 tadzik hello
09:19 masak hi, Guest33156.
09:20 sorear o/
09:20 Guest33156 hi
09:21 Guest33156 why? my name is guest. i have named
09:22 M_o_C joined #perl6
09:23 Guest33156 in other service, i have the same set
09:23 Guest33156 but in this service i named Guest
09:24 cogno joined #perl6
09:24 Guest33156 i don't understand.
09:24 sorear Guest33156: someone else has registered your name.
09:25 sorear the system gave you 1 minute to present the correct password
09:25 sorear when you didn't, it renamed you.
09:26 Guest33156 oh.
09:26 sorear my advice is to pick a less common name
09:26 Guest33156 yes
09:27 anuby joined #perl6
09:27 anuby i renamed
09:29 anuby now i am not the guest.
09:29 sorear welcome, person formerly known as scott__
09:30 anuby sorear:how can you got my formerly name?
09:30 sorear moritz: I might put some effort into NativeCall on niecza this month or next, looking over the MSDN docs suggests this is highly possible
09:31 sorear anuby: if you run /whois anuby it will tell you a few bits of information
09:31 sorear on irc there are 2 secondary names
09:31 anuby sorear:thank, i got it
09:31 sorear your names are currently anuby, scott, and scott
09:32 sorear this doesn't prove that you are the same person as scott__, but it's enough to guess
09:32 anuby whois sorear
09:32 sorear needs the slash in front
09:32 anuby yes
09:35 raiph joined #perl6
09:37 FROGGS sorear: these handles are only initialized if I do File::Spec.new
09:38 FROGGS is there a good way to come around that without add all the methods that get declared in the ::Unix class?
09:38 raiph http://blogs.perl.org/users/perl_6_reports/​2012/09/perl6-summaries-for-2012-09-02.html
09:39 moritz raiph++
09:40 sorear r: class Foo { method bar { 2 } }; class Bar { method get_foo handles <bar> { Foo } }; say Bar.bar
09:40 p6eval rakudo 0e36b2: OUTPUT«===SORRY!===␤Cannot call 'trait_mod:<handles>'; none of these signatures match:␤:(Attribute:D $target, $thunk)␤␤at /tmp/a39kLIiaMg:1␤»
09:40 sorear r: class Foo { method bar { 2 } }; class Bar { our $!x handles <bar> = Foo }; say Bar.bar
09:40 p6eval rakudo 0e36b2: OUTPUT«===SORRY!===␤Cannot use ! twigil on our variable␤at /tmp/IS22kTlmRA:1␤»
09:40 sorear r: class Foo { method bar { 2 } }; class Bar { our $.x handles <bar> = Foo }; say Bar.bar
09:40 p6eval rakudo 0e36b2: OUTPUT«No such method 'bar' for invocant of type 'Bar'␤  in block  at /tmp/9fDMNGxt12:1␤␤»
09:40 sorear r: class Foo { method bar { 2 } }; class Bar { my $.x handles <bar> = Foo }; say Bar.bar
09:40 p6eval rakudo 0e36b2: OUTPUT«No such method 'bar' for invocant of type 'Bar'␤  in block  at /tmp/Q8cKoaym_v:1␤␤»
09:40 sorear r: class Foo { method bar { 2 } }; class Bar { my $!x handles <bar> = Foo }; say Bar.bar
09:40 p6eval rakudo 0e36b2: OUTPUT«===SORRY!===␤Cannot use ! twigil on my variable␤at /tmp/XPQCMEG5EM:1␤»
09:41 sorear FROGGS: it seems that there is no working way in current Rakudo
09:41 sorear FROGGS: you could use .^add_fallback directly, but don't ask me for the details
09:41 FROGGS k, thanks you
09:42 FROGGS k, I'll try something
09:44 raiph moritz: i did this report manually. took me forever.
09:44 am0c joined #perl6
09:44 raiph moritz: but the format is intended to be something that's very easy to produce.
09:45 raiph moritz: if there was an appropriate variant of or addition to your irclogging software
09:45 moritz raiph: that can be discussed :-)
09:45 moritz raiph: I already have a branch which adds (on request) check boxes
09:45 moritz which you can then click, and mark those lines that make up the summary
09:46 moritz and then I can add an export function or so
09:48 tadzik raiph: awesome job, thank you!
09:49 moritz raiph: what kind of tools do you want from the IRC logs/
09:49 moritz ?
09:49 raiph let me prepare my thoughts for a few minutes...
09:50 FROGGS raiph++
09:51 sorear tadzik: what's a nice NativeCall binding to focus on?
09:52 tadzik sorear: DBIish I guess
09:52 tadzik that's what stopped me from running źblog an niecza :)
09:53 the joined #perl6
09:53 Guest49709 hey
09:53 Guest49709 can anyone help
09:54 sorear Guest49709: not without knowing your problem.
09:56 moritz though maybe the right solution is to make niecza-specific backends for DBIish
09:56 tadzik I think sorear is generally trying to get NativeCall for niecza
09:57 sorear let's have sharable NativeCall versions
09:57 sorear but I guess an ADO.NET backend wouldn't be a horrible idea
09:57 sorear tadzik: what is źblog?
09:57 cogno joined #perl6
09:58 tadzik sorear: it's a not-really-blog engine on Bailador
09:58 tadzik it's using DBIish, templates and all this
10:03 daxim joined #perl6
10:05 wamba joined #perl6
10:08 arnsholt sorear: I'd love to talk about ways to have sharable NativeCalls for Rakudo and Niezca
10:10 sorear arnsholt: can it wait until tomorrow?
10:10 arnsholt Sure
10:10 sorear sleep&
10:11 arnsholt Sleep well. I'm in no rush
11:05 Su-Shee_ joined #perl6
11:14 drbean joined #perl6
11:24 raiph sleep&
11:25 moritz sleep well
11:25 crab2313 joined #perl6
11:30 eiro hello all
11:31 hoelzro o/ eiro
11:32 crab2313 joined #perl6
11:38 eiro is there a syntax to create a token within the regexp ? like perl5 named capture ?
11:38 arnsholt Yes
11:38 moritz $<foo> = [ regex here ]
11:38 arnsholt The <subrule> syntax creates it automatically
11:38 eiro qr/(?<id> \d+)/
11:39 arnsholt If you don't want to use a subrule, what moritz said
11:39 eiro ok thanks
11:39 moritz r: 'abc' ~~ /$<name>=\d+/; say $/.keys
11:39 p6eval rakudo 0e36b2: OUTPUT«␤»
11:39 moritz huh.
11:39 moritz r: 'abc' ~~ /$<name>=\w+/; say $/.keys
11:39 p6eval rakudo 0e36b2: OUTPUT«name␤»
11:39 moritz it helps to actually match :-)
11:39 arnsholt Yeah, that'll work better ^_^
11:40 eiro actually i'm trying to figure out what the url dispatching rule from flask '/user/<int:id>' could be written in a perl6 regex
11:41 Su-Shee probably the same way as in the dancer variant whatsitcalled.. bailador..
11:41 eiro rx( /user/[ $<id> = <digit>+ ] )
11:41 arnsholt So, that captures an int named id?
11:41 arnsholt Right
11:41 eiro cool!
11:41 eiro thanls
11:41 arnsholt I think that'll work, yeah
11:42 moritz if you don't want to capture each digit separately, use <.digit>
11:42 moritz oh, and you need to escape or quote those slashes
11:42 moritz so
11:42 arnsholt r: "/user/123" ~~ m{/user/$<id>=[\d+]}; say $<id>
11:42 p6eval rakudo 0e36b2: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter / (must be quoted to match literally) at line 2, near "user/$<id>"␤»
11:42 arnsholt r: "/user/123" ~~ m{"/user/"$<id>=[\d+]}; say $<id>
11:42 p6eval rakudo 0e36b2: OUTPUT«「123」␤␤»
11:42 eiro rx( /user/[ $<id> = <digit>+ { fail unless $0 < 1000 ] )
11:42 moritz rx{ '/user/' <$id> = \d+ }
11:42 eiro it can work ?
11:43 eiro moritz, <digit> isn't defined ? i thought it was
11:43 moritz eiro: nobody knows what fail() is supposed to do in regexes
11:43 eiro moritz, just don't match :)
11:43 arnsholt Digit should be defined
11:43 moritz rathr write  <?{ $<id> < 1000 }>
11:43 arnsholt Er, digit, that is
11:43 moritz nr: say '42' ~~ /<digit>/
11:43 p6eval niecza v21-4-g3a9759e: OUTPUT«#<match from(0) to(1) text(4) pos([].list) named({"digit" => #<match from(0) to(1) text(4) pos([].list) named({}.hash)>}.hash)>␤»
11:43 p6eval ..rakudo 0e36b2: OUTPUT«「4」␤ digit => 「4」␤␤»
11:43 arnsholt Damn sentence case
11:44 eiro outch... now i have to put it all together again ...
11:44 arnsholt eiro: http://perlcabal.org/syn/S0​5.html#Predefined_Subrules has all the predefined rules
11:44 moritz nr: say '/user/42' ~~ rx{ '/user/' $<id>=\d+ $ <?{ $<id> < 1000 }> }
11:44 p6eval niecza v21-4-g3a9759e: OUTPUT«#<match from(0) to(8) text(/user/42) pos([].list) named({"id" => #<match from(6) to(8) text(42) pos([].list) named({}.hash)>}.hash)>␤»
11:44 p6eval ..rakudo 0e36b2: OUTPUT«「/user/42」␤ id => 「42」␤␤»
11:44 eiro i'll use \d+
11:45 moritz nr: say so '/user/12345' ~~ rx{ '/user/' $<id>=\d+ $ <?{ $<id> < 1000 }> }
11:45 p6eval rakudo 0e36b2, niecza v21-4-g3a9759e: OUTPUT«False␤»
11:45 eiro p6eval,  rx{ '/user/' <$id> = \d+ <?{ $<id> < 1000 }>'}
11:46 eiro nr:  rx{ '/user/' <$id> = \d+ <?{ $<id> < 1000 }>'}
11:46 p6eval niecza v21-4-g3a9759e: OUTPUT«[31m===[0mSORRY![31m===[0m��Variable $id is not predeclared at /tmp/qSrg0Y6Yb7 line 1:�------> [32mrx{ '/user/' <[33m�[31m$id> = \d+ <?{ $<id> < 1000 }>'}[0m��Unrecognized regex metacharacter = (must be quoted to match literally) at /tmp/qSrg0Y6Yb7 …
11:46 p6eval ..rakudo 0e36b2: OUTPUT«=␀␀␀=␀␀␀=␀␀␀S␀␀␀O␀␀␀R␀␀␀R␀␀␀Y␀␀␀!␀␀␀=␀␀​␀=␀␀␀=␀␀␀␤␀␀␀V␀␀␀a␀␀␀r␀␀␀i␀␀␀a␀␀␀b␀␀␀l␀␀␀e␀␀␀ ␀␀␀$␀␀␀i␀␀␀d␀␀␀ ␀␀␀i␀␀␀s␀␀␀ ␀␀␀n␀␀␀o␀␀␀t␀␀␀ ␀␀␀d␀␀␀e␀␀␀c␀␀␀l␀␀␀a␀␀␀r␀␀␀e␀␀␀d
11:46 moritz $<id> vs. <$id>
11:46 eiro this was just a question mark :)
11:46 moritz ok :-)
11:46 eiro nr:  rx{ '/user/' $<id> = \d+ <?{ $<id> < 1000 }>'}
11:46 p6eval niecza v21-4-g3a9759e: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unrecognized regex metacharacter ' (must be quoted to match literally) at /tmp/wD4U5wdcVx line 1:â�¤------> [32m/user/' $<id> = \d+ <?{ $<id> < 1000 }>'[33mâ��[31m}[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/nie…
11:46 p6eval ..rakudo 0e36b2: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<{ }>, couldn't find final '}' at line 2, near "'/user/' $"␤»
11:47 eiro yeah :)
11:47 eiro thank you all
11:47 arnsholt <$id> will use the thing in $id as a subrule
11:47 eiro i'll talk about perl6 regexp during my pycon talk :)
11:48 tadzik wow :)
11:52 GlitchMr joined #perl6
11:53 the joined #perl6
11:55 snearch joined #perl6
12:08 eiro cya all and thanks
12:10 dalek faq: 426f666 | GlitchMr++ | answers.md:
12:10 dalek faq: `want` in Perl 5 is called `wantarray`, not `wantarry`.
12:10 dalek faq: review: https://github.com/perl6/faq/commit/426f666de1
12:12 GlitchMr Also: "easy to understand, explicit scoping rules (unlike Python)"
12:13 GlitchMr It reminds me why Python was rather annoying for me.
12:13 GlitchMr At least Python 3 has 'nonlocal', but it's still annoying
12:16 GlitchMr ... that `nonlocal` actually reminds me `use` from PHP
12:17 huf i wonder why they went the `nonlocal` way instead of the `use strict` way...
12:18 moritz to break less code, I think
12:18 GlitchMr Why not overload `global`?
12:18 huf it'd only affect new code anyway
12:18 huf use strict; aint gon magically appear in a source file
12:18 moritz yes, but if you want to use it, you have to fix the whole file
12:18 huf or whatever the pythonic equivalent of such a declaration would be
12:18 huf moritz: true
12:18 moritz oh, and did I mention that 'nonlocal' is a terrible name?
12:18 huf ah well, road to hell, good intentioned paving stones, all that
12:19 moritz why say what it's not?
12:19 GlitchMr This is why I think the scoping in JavaScript and Perl is better
12:19 moritz if it's not local, what is it? global? file scoped? related to closures? /me has no idea
12:19 huf up_yours
12:19 huf err, i mean the blocks
12:20 moritz (and if you can't find a good name for a concept, that can be a warning sign too0
12:20 moritz s/0/)/
12:20 GlitchMr I wonder how Pythonic would be this instead: 'def inner() using (x):
12:21 mtk joined #perl6
12:21 kaleem joined #perl6
12:21 huf GlitchMr: huh, on first glance, that looks saner than nonlocal
12:21 huf which is amazing, since it's lifted straight from php
12:22 arnsholt huf: use strict is right out, since Python doesn't distinguish declaration and use
12:23 huf arnsholt: but with a strict mode, it could, is what i'm saying.
12:23 arnsholt And, I'm pretty sure they want it to stay that way (for some reason)
12:23 huf of course, if my aunt had wheels, she'd be the tram
12:23 huf so this is all pointless faffing
12:23 arnsholt Well yes, but I don't think van Rossum wants that distinction in Python, for whatever reason
12:23 arnsholt Well true
12:24 benabik joined #perl6
12:25 GlitchMr (also, CoffeeScript, while compiles to JavaScript somehow manages to completely break scoping)
12:26 Su-Shee javascript's scoping is weird. how does coffeescript break it?
12:29 GlitchMr Su-Shee: http://lucumr.pocoo.org/2011/12/22​/implicit-scoping-in-coffeescript/
12:29 huf i am now very afraid.
12:29 GlitchMr JavaScript scoping was fine
12:30 huf i never understood why people think declaring is such a burden that it's worth introducing much more complex and weird interactions to do away with it
12:30 GlitchMr It wasn't block scoped, it was function scoped, but other than that it was fine
12:30 huf GlitchMr: the hoisting thing is scary as hell tho
12:30 huf function() { a = 1; var a; } /* just... why */
12:31 GlitchMr Why somebody would do that
12:31 moritz by accident
12:31 arnsholt huf: I agree. Especially since it precludes things like variable name checking, which is really, really nice
12:31 GlitchMr Why somebody would assign to variable before predeclaration
12:31 GlitchMr declaration*
12:31 moritz nr: eval 'say $foo'; my $foo = 42;
12:31 p6eval rakudo 0e36b2: OUTPUT«Any()␤»
12:31 p6eval ..niecza v21-4-g3a9759e: OUTPUT«Potential difficulties:â�¤  $foo is declared but not used at /tmp/qtflYjse8v line 1:â�¤------> [32meval 'say $foo'; my [33mâ��[31m$foo = 42;[0mâ�¤â�¤Any()â�¤Â»
12:31 huf GlitchMr: try to imagine a case that's a tiny bit more complex than the example i gave
12:31 moritz nr: sub f() { eval 'say $foo' }; my $foo = 42; f()
12:31 p6eval niecza v21-4-g3a9759e: OUTPUT«Potential difficulties:â�¤  $foo is declared but not used at /tmp/DYh7vwN94v line 1:â�¤------> [32msub f() { eval 'say $foo' }; my [33mâ��[31m$foo = 42; f()[0mâ�¤â�¤42â�¤Â»
12:31 p6eval ..rakudo 0e36b2: OUTPUT«42␤»
12:31 huf also try to imagine multiple programmers working on code, with differnet skillsets
12:31 huf sometimes some of them are tired
12:32 moritz note that variables are block-scoped in Perl 6, it's only the parser that restricts their use to after the declaration
12:32 huf oh heh
12:32 arnsholt huf: Also, I am intimately aware that I'm really stupid. I want all the help I can get from the compiler =)
12:32 huf arnsholt: oh _yes_
12:33 Su-Shee I don't even understand his problem in this article..
12:33 huf even if we're writing in a goo-language where everything is everything, some bondage is nice
12:33 JimmyZ joined #perl6
12:33 arnsholt Su-Shee: He wanted to shadow the variable log, but instead it overwrote the global one
12:35 GlitchMr That is - adding variable could break program
12:35 Su-Shee arnsholt: I understood the article. I don't understand what his problem is, but I usally don't get why people have problems with different kinds of scoping..
12:35 GlitchMr This simply wouldn't have happen in any other kind of scoping
12:35 arnsholt r: my $x = "outer"; { my $x = "inner"; say $x; }; say $x;
12:35 p6eval rakudo 0e36b2: OUTPUT«inner␤outer␤»
12:35 GlitchMr my/var or nonlocal/use based
12:36 arnsholt That's impossible in CoffeeScript, which is a problem since variables and functions share the same namespace
12:37 arnsholt So it's reasonably easy to overwrite a standard library function, which will lead to non-local failures and other action at a distance bugs, which will probably be hell to debug
12:37 GlitchMr http://coffeescript.org/#try:%23a%20%3D%​2010%0Ab%20%3D%20-%3E%0A%20%20a%20%3D%20​12%0Ac%20%3D%20-%3E%0A%20%20a%20%3D%2024
12:37 GlitchMr Uncomment first line to see problem
12:37 eiro if some want to review my slides: http://ramirez.u-strasbg.fr/pycon.odp
12:38 Su-Shee I think I had maybe one scoping-related mistake every 5 years...
12:38 Su-Shee eiro: what IS "opd"?!
12:38 Su-Shee err odp
12:38 arnsholt That's because you program in Perl, which is very explicit about scope (as long as you use strict) =)
12:38 arnsholt OpenOffice Presenter, I assume
12:39 arnsholt Or whatever OOo Power Point is called =)
12:39 Guest9049 joined #perl6
12:39 Su-Shee arnsholt: I program Perl, JavaScript, SQL, PL/SQL, C, Java, Ruby, Python and Smalltalk .. I don't have problems with different scoping..
12:40 GlitchMr Also, https://github.com/jashkenas/cof​fee-script/issues/search?q=scope
12:41 Su-Shee ah. I don't have any office programs anymore since 1998.
12:41 arnsholt Right. Then I guess you're just better at it than me =)
12:41 kresike What is the point of having a script language compile to another script language ?
12:42 Su-Shee arnsholt: that's not it, it's just not my realm of mistakes.
12:42 arnsholt I think the main motivation is that JavaScript has some really weird corners (and Python syntax, obviously =)
12:42 Su-Shee kresike: cleanup. coffeescript is the better, nicer javascript.
12:42 moritz kresike: the point is to make it run a platform (browser) that accepts just that single language
12:42 eiro it's oo presenter
12:42 eiro got to go
12:42 eiro cya
12:43 GlitchMr kresike: also, Perlito also does that
12:43 Su-Shee every DSL does it. ;)
12:44 GlitchMr Well, even every C compiler does that
12:44 kresike Instead of writing one of these compilers, maybe people should work on making the original script language better ?
12:44 GlitchMr Those compilers compile C to assembly
12:44 GlitchMr kresike: tell IE6 to magically improve ;-)
12:44 kresike But that would require a perfect world ...
12:44 Su-Shee kresike: wake up. how realistic is it that the entire planet switches to "browser x which now has the clean version of javascript"..
12:45 Su-Shee which first would require that they decide on one ;)
12:45 Su-Shee Dart? Rust? Coffeescript?
12:45 GlitchMr Perlito?
12:45 kresike :) Perl ?
12:45 GlitchMr Programming for the web using Perl could be fun
12:46 Su-Shee no, it's not, one thing that javascript has actually going for itself is the ease of moving function objects around and create objects on the fly thanks to "no classes" and the slightly evented twist in JS..
12:46 kresike GlitchMr, I believe that _can_ be done
12:47 kresike you just need to run it on a server, not a crappy browser ...
12:47 Su-Shee yes, they tried that already in the late 90ies, there was a short loved perl in browser thingie.
12:47 GlitchMr kresike: but in browser!
12:48 Su-Shee kresike: browsers aren't crappy, they're amazingly fast and sophisticated rendering engines with events and networking facilities these days. they just lack - for obvious reasons - nice file i/o
12:48 GlitchMr I know that you can make CGI in AWK. That doesn't matter.
12:48 huf Su-Shee: err..
12:48 Su-Shee short lived...
12:48 huf Su-Shee: they _are_ rather crappy when you get down to it :)
12:48 GlitchMr But in browser, you can only use JavaScript... or compile something to JavaScript
12:49 moritz or JVM
12:49 Su-Shee huf: no, they're not. consider the level of crappiness browsers are able to deal with. that's an amazing feat.
12:49 moritz what happend to the bad old java plugins?
12:49 huf the platform is changing really fast though, and the standards are insane in places, so i think it's understandable
12:49 huf but they're not good. they're perhaps as good as they can be, given circumstances.
12:50 kresike Su-Shee, tell that to all the programmers writing hacks to solve stupid problems caused by IE3...10 and all the other who knows what browsers out there ...
12:50 Su-Shee huf: so, what exactly isn't good these days about the technical features of a browser?
12:50 huf Su-Shee: UI, stability, speed
12:50 Su-Shee kresike: I'm one of them.
12:50 Su-Shee huf: WHAT?
12:50 kresike Yes, I know you can download a shiny new Chorme with the nice File API and be happy
12:50 huf Su-Shee: oh yeah and incompatibility
12:51 kresike but only 30% of the users have done that ...
12:51 Su-Shee huf: a) UI isn't a technical category. b) my firefoxes and chromes run with MONTHS of constant uptime - I call that stable for a standalone application which isn't a server and HOW on earth do you get to "speed"?!
12:52 huf Su-Shee: *shrug* i had to restart chrome about 10 times yesterday because its inspector suddenly fell over and refused to function. i'm not aware of a sane way to force a complete refresh of all the assets of a website in chrome; it sometimes works, sometimes doesnt. firefox is dead slow. all of them are incompatible with each other in hilarious ways.
12:54 Su-Shee ah, whatever, why do I bother. ok, browsers are bad and a piece of shit and all developers working on them are idiots. ;)
12:54 huf Su-Shee: not what i said.
12:54 Su-Shee huf: I didn't say that you said that.
12:54 huf what i'm saying is that out of all the things i use, browsers cause me the most grief in every imaginable way.
12:54 huf this might be the best that can be expected, given the way the web is
12:54 huf but i dont like to call this "good"
12:55 Su-Shee yeah, whatever. think what you want.
12:55 wamba joined #perl6
12:56 mucker joined #perl6
13:01 [Coke] I think huf's experiences are uncommon. My biggest problem with browsers is writing cross-platform web apps, and that gets muuuch easier when the low bar is at least set to IE8.
13:02 huf my experiences are fairly common among the people i talk to, or my coworkers. install a stock *, wiggle for an hour, shout.
13:02 huf kill -9, restart, continue
13:03 Woodi joined #perl6
13:03 [Coke] huf: what's your platform?
13:03 huf debian
13:13 moritz debian uses pretty ancient browsers
13:13 moritz the new ones are much better
13:13 tadzik which debian? :)
13:13 moritz even debian testing uses pretty ancient browsers :(
13:13 tadzik unless you mean stable, aka "OSS Museum" they're pretty decent
13:13 tadzik I don't have that impression
13:14 huf sid, but i dont see how this is really relevant. a) chrome is installed straight from google and b) i've seen these things consistently on winxp, win7, ubuntu and debian
13:14 huf and i dont mean to rag only on chrome, firefox is just as bad in very different ways :)
13:14 moritz $work still uses Debian Lenny in production :(
13:14 moritz (but I don't use browsers on it :-)
13:16 doy i haven't had any significant problem with firefox in a good year or two at this point
13:16 doy it did used to be pretty bad
13:17 doy but it has improved pretty dramatically lately
13:17 doy in my experience anyway
13:17 Ulti ooo Browser chat, FF is far better than Chrome at dealing with >30 tabs
13:18 tadzik I don't see why you need that. Both support bookmarks :)
13:18 huf doy: yes, i see the improvement too. i suppose my main problem is that since it's almost an OS, it's entirely monolithic and i cant mix-and-match like i can on linux
13:19 doy what do you want to mix and match?
13:19 Ulti everyone says this to me ;) I genuinely need this many things open at once, plus if I'm offline I still have what I need cached
13:19 Su-Shee tadzik: because it's a nice todo/toread list. I usally have about 30-40 tabs open - some constantly (mail), others "to read when time"...
13:19 Ulti I use 3 browsers just to have their caches for different projects with all the tabs left open
13:20 Su-Shee work alone is 7 tabs..
13:20 doy perhaps something like conkeror or uzbl is more what you're looking for if that's really important to you
13:20 doy and yeah, i use tabs in preference to bookmarks too
13:20 Su-Shee oh, I'm fine. ;)
13:20 doy Su-Shee: no, i'm talking to huf
13:20 doy (:
13:20 huf could be
13:21 doy recent versions of firefox are actually really nice about tab support too - tabs are lazily loaded now, so keeping 80 tabs or so open regularly isn't actually an issue at all
13:22 doy and the tab groups thing makes it easy to keep them organized
13:22 Su-Shee I've recently subscribed to pinboard and now I actually do bookmark things.. from time to time.
13:22 bluescreen10 joined #perl6
13:23 Ulti the key to lots of tabs is flashblock
13:23 Su-Shee what I really need is a proxy locally, capturing everything I've loaded, automatically analysing it, adding keywords and tags and load appropriate lists of suggestions when I input something into the urlbar.
13:24 fgomez joined #perl6
13:24 Su-Shee "flock" had a similar mechanism in its infancy..
13:25 Ulti yeah if I had time I'd write my own browser that performs topic allocation on all my tabs and groups them
13:26 PerlJam Ulti: and you're going to write it in perl 6?  :)
13:27 tadzik you can extend the existing one :)
13:27 tadzik it has gtk and webkit and stuff
13:28 Su-Shee it's 8 lines or so ;)
13:28 tadzik that too :)
13:28 Su-Shee here, it even has back and forward ;)
13:28 Su-Shee https://github.com/Su-Shee/pre​ttyperl/blob/master/webkit.pl
13:29 tadzik oh, but that's Perl 5 :)
13:29 tadzik https://github.com/sorear/niecza/blo​b/master/examples/gtk-webbrowser.pl
13:30 skids joined #perl6
13:30 Su-Shee "textonly"?!
13:30 tadzik I'm not sure what does that mean
13:30 tadzik istr it rendered everything just fine
13:30 Su-Shee mine has full-blown js support and everything ;)
13:33 Su-Shee I think the Webkit lib wrapped even finds flash if available and uses it..
13:49 sirrobert joined #perl6
13:59 benabik joined #perl6
14:05 flightrecorder joined #perl6
14:05 mtk joined #perl6
14:07 stopbit joined #perl6
14:07 thou joined #perl6
14:08 sirrobert if I have a class A { has $.config_file; has %.config }, I don't quite get how I can use BUILD (or something else?) to call something like .read_config and store it in %.config
14:08 sirrobert is it that I have to bless the object manually?
14:09 sirrobert ideally, there would be some way that I could hook into the object after it's completely built and do some initialization *after* everything else is done
14:10 yarp joined #perl6
14:10 dayangkun joined #perl6
14:12 spider-mario joined #perl6
14:12 moritz BUILD is the right place
14:12 FROGGS joined #perl6
14:12 moritz suppose someone inherits from your class
14:13 moritz he wants to be able to call self.config in his BUILD method
14:13 moritz and that only works if you do it at BUILD time
14:13 moritz so, what's stopping you from using it in BUILD?
14:14 PacoAir joined #perl6
14:16 PZt joined #perl6
14:19 Circlepuller_ joined #perl6
14:22 moritz sirrobert: http://perlgeek.de/blog-en/perl-6/objec​t-construction-and-initialization.html # you don't need to call bless if you use BUILD
14:22 Circlepuller joined #perl6
14:33 yarp joined #perl6
14:33 yarp r: say "hello"
14:33 p6eval rakudo 0e36b2: OUTPUT«hello␤»
14:35 FROGGS r: my $path = '//abc/def///ghi'; $path ~~ s:g|/+| = '/'; say $path
14:35 p6eval rakudo 0e36b2: OUTPUT«===SORRY!===␤Quantifier quantifies nothing at line 2, near "| = '/'; s"␤»
14:35 FROGGS r: my $path = '//abc/def///ghi'; $path ~~ s:g/\/+/ = '/'; say $path
14:35 p6eval rakudo 0e36b2: OUTPUT«===SORRY!===␤Confused␤at /tmp/nJqjJCdrQ7:1␤»
14:36 FROGGS r: my $path = '//abc/def///ghi'; $path ~~ s:g[\/+] = '/'; say $path
14:36 p6eval rakudo 0e36b2: OUTPUT«/abc/def/ghi␤»
14:36 FROGGS ahh
14:51 sqirrel joined #perl6
14:58 benabik_ joined #perl6
15:06 kresike bye folks
15:07 yarp joined #perl6
15:08 FROGGS what OSes do we support right now?
15:08 FROGGS unix and windows only, right?
15:11 tadzik I think so
15:12 FROGGS k, just because of the tests for File::Spec
15:12 FROGGS tadzik: I removed the roles, and calling the package subs directly, https://github.com/FROGGS/​p6-File-Spec/tree/no_roles
15:13 FROGGS feels cleaner and simpler
15:13 sirrobert moritz: thanks (was AFK a min)
15:13 FROGGS advantage: you dont have to declare dummy roles just to auto-add methods from another role
15:14 FROGGS disadvantage: you have to add all methods to your base class, with params etc
15:16 yarp Can't install Math::Vector due to ...?
15:26 * colomon perks up at the mention of Math::Vector
15:36 yarp ==> Fetching Math::Vector
15:36 yarp ==> Building Math::Vector
15:36 yarp Compiling lib/Math/Vector.pm
15:36 yarp ===SORRY!===
15:36 yarp Serialization Error: could not locate static code ref for closure 'block_immediate'
15:36 yarp Mu()
15:36 yarp build stage failed for Math::Vector: Failed building lib/Math/Vector.pm
15:36 yarp in block  at lib/Panda/Builder.pm:53
15:38 kaleem joined #perl6
15:39 tokuhiro_ joined #perl6
15:40 fgomez joined #perl6
15:49 sirrobert ok, the thing that always throws me off about BUILD is that I can only access the private version, not the accessors.  It makes perfect sense, but it's super hard to remember when you're learning.
15:49 sirrobert That should be something that's emphasized a fair bit in the "BUILD" section of some manual
15:49 sirrobert or whatever.
15:49 PerlJam we have a manual?  :)
15:49 sirrobert a theoretical future manual =)
15:49 sirrobert I will put up a blog post about it right now, actually...
15:52 TimToady it's kinda funny, http://rosettacode.org/wiki​/Ackermann_function#Perl_6 runs faster in rakudo than in niecza (actually, doesn't work at all in niecza since I put the memoizing into the proto)
15:52 TimToady otoh, http://rosettacode.org/wiki​/Truncatable_primes#Perl_6 runs 150 times slower in rakudo than in niecza
15:52 TimToady so maybe that would be a good one to profile
15:53 jnthn ooh
15:53 jnthn And I just stopped having an insane workload :)
15:54 * jnthn will give it a profile later :)
15:54 TimToady cool
15:57 skids r: role A [:$i = 1] { method foo { $i.say }}; role B [:$i = 2] { $i.say; also does A[:i($i)] }; class C does B[] { }; my C $c .= new(); $c.foo;
15:57 p6eval rakudo 0e36b2: OUTPUT«2␤Mu()␤»
15:58 am0c joined #perl6
15:58 skids I could understand where that would be ambiguous when done outside the braces, but how is either form specced?
15:59 jnthn Well, for one the Rakudo behavior on such ambiguity changed last night...
15:59 jnthn So now "first one wins".
15:59 jnthn oh, wait
15:59 jnthn The roles had differnt names
15:59 jnthn What ambiguity? :)
16:00 JimmyZ http://rosettacode.org/wiki​/Truncatable_primes#Perl_6, rakudo's answer is different?
16:00 JimmyZ only perl 6 one outputs 999983
16:01 TimToady the answer is the same, but it runs in 8 minutes rahter than 3 seconds (niecza)
16:01 JimmyZ no , i'm wrong
16:01 jnthn skids: Anyway, I think that the "also does" is evalauted once when parsing the role, since it's a trait and those are static.
16:01 jnthn Thus the $i is not yet defined at that point, thus the Mu.
16:02 jnthn Roles are macro-ish, but not actually macros :)
16:02 skids jnthn: I mean if you try to feed those role params forward in a role A [*] does B [*] then $i could be the role param or an in-scope $i.
16:02 kaleem joined #perl6
16:02 jnthn skids: oh
16:02 jnthn skids: But that's not ambiguous.
16:03 jnthn In the same way that sub foo($a) { } is not ambiguous about the scope of the $a :)
16:03 sirrobert r: class A { has $.x; submethod BUILD () { $!x = 4; } } class B is A { submethod BUILD ()     { $!x = 5; } } say A.new.x; say B.new.x;
16:03 p6eval rakudo 0e36b2: OUTPUT«===SORRY!===␤Confused␤at /tmp/bDJO2etryV:1␤»
16:03 sirrobert dang, one sec
16:03 jnthn It's just a signature on the role
16:03 sirrobert r: class A { has $.x; submethod BUILD () { $!x = 4; } }; class B is A { submethod BUILD ()     { $!x = 5; } }; say A.new.x; say B.new.x;
16:03 p6eval rakudo 0e36b2: OUTPUT«===SORRY!===␤Attribute $!x not declared in class B␤at /tmp/H_SuSbSZbo:1␤»
16:03 sirrobert is there any way to do that?
16:04 sirrobert to change a property from a super class in a subclass's BUILD?
16:04 skids Point being that role A [*] does role B [*] gets confusing, where the "also does" form is less so.
16:05 skids The other point being that not being able to DWIM above makes it kinda difficult to make a kitchen sink role and then use it as a crony for more specific roles.
16:06 jnthn sirrobert: You don't.
16:06 PerlJam sirrobert: you'd use the public accessor to do that.
16:07 PerlJam sirrobert: B's $!x would be and is different from A's $!x
16:07 jnthn skids: That may or may not be fixalbe.
16:07 sirrobert PerlJam: hm ok
16:07 jnthn Bit too tired to think clearly enough about it right now :)
16:07 sirrobert PerlJam: I didn't realize that
16:07 skids It would at least have to start with a spec clarification.
16:09 * skids lunchtime
16:11 sirrobert $!x is called the "private variable", self.x is the "public accesspr
16:11 sirrobert accessor"
16:11 sirrobert what would I call the $.x form?
16:11 sirrobert internal?
16:11 TimToady that's also just a public accessor, but when used in the has, implies the $!x as well
16:12 sirrobert but it's not synonymous with self.x
16:12 sirrobert how do I refer to the difference?
16:12 TimToady it means $(self.x)
16:13 TimToady likewise @.x means @(self.x)
16:14 sirrobert trying to write a tutorial-type blog entry
16:14 TimToady including the fact that you can pass arguments to the accessor, if .x is really a method  instead
16:14 sirrobert I want a name for the difference that accounts for this effect:
16:14 PerlJam sirrobert++  the more tutorials the better :)
16:14 TimToady so you can write @.x(1,2,3) and it means @(self.x(1,2,3))
16:14 sirrobert class A { has $.x; submethod BUILD () { self.x = 4; $(self.x) = 5; $.x = 6; } }; say A.new.x;
16:14 sirrobert r: class A { has $.x; submethod BUILD () { self.x = 4; $(self.x) = 5; $.x = 6; } }; say A.new.x;
16:14 p6eval rakudo 0e36b2: OUTPUT«===SORRY!===␤Virtual call $.x may not be used on partially constructed objects␤at /tmp/K8YkedqeQ5:1␤»
16:14 sirrobert r: class A { has $.x; submethod BUILD () { self.x = 4; $(self.x) = 5; } }; say A.new.x;
16:14 p6eval rakudo 0e36b2: OUTPUT«Cannot assign to a readonly variable or a value␤  in submethod BUILD at /tmp/Xj2RefjtY_:1␤  in method BUILDALL at src/gen/CORE.setting:655␤  in method bless at src/gen/CORE.setting:640␤  in method new at src/gen/CORE.setting:625␤  in block  at /tmp/Xj2RefjtY_:1␤␤»…
16:15 sirrobert ugh
16:15 sirrobert r: class A { has $.x is rw; submethod BUILD () { self.x = 4; $(self.x) = 5; } }; say A.new.x;
16:15 p6eval rakudo 0e36b2: OUTPUT«5␤»
16:15 sirrobert the first one doesn't work, the third form does.
16:15 sirrobert s/form/example/
16:16 sirrobert both self.x=4 and $(self.x)=5 work in BUILD
16:16 sirrobert as does $!x=6
16:16 TimToady yes, we arbitrarily disallow the $.x form while the object is still being built
16:16 sirrobert but $.x=7 doesn't
16:16 sirrobert so ... I need to talk about it as meaningfully different than the other forms ... =)
16:17 TimToady because it is in fact a virtual method call
16:17 sirrobert ok
16:17 TimToady and we don't want people to think of it as synonymous with $!x when it isn't
16:17 sirrobert I can talk about it as the virutal-method accessor
16:18 sirrobert I just needed to be able to say, "you can use the ___ and ___ accessors, but not the ___ accessor"
16:18 sirrobert during BUILD
16:18 TimToady and if people use virtual calls on an incomplete object, they're likely to get the wrong class's method
16:19 [Coke] jnthn: did you ever diagnose the rosetta spectest failures on your box?
16:19 TimToady or worse, they'll get the right method on a not-yet built part of the object
16:19 sirrobert lunch &
16:20 jnthn [Coke]: Yeah, it's newline related
16:20 jnthn It (for some reason) chooses to do a custom IO bound to $*OUT that collects the output
16:21 flightrecorder joined #perl6
16:21 FROGGS joined #perl6
16:24 Yazu joined #perl6
16:27 sergot_ hi o/ !
16:27 FROGGS hi
16:29 MayDaniel joined #perl6
16:37 [Coke] jnthn: that was so that we could use the code as is from RC.
16:37 [Coke] (which expects to print to the default handle)
16:38 [Coke] then we can automate the "grab code from RC" bits.
16:39 bluescreen10 joined #perl6
16:45 jnthn [Coke]: ah, I see
16:46 fgomez joined #perl6
16:47 GlitchMr perl6: so grep {say "Checking $_"; $_ == 2}, 1, 2, 3, 4, 5
16:47 p6eval niecza v21-4-g3a9759e: OUTPUT«Checking 1␤Checking 2␤Checking 3␤Checking 4␤Checking 5␤»
16:47 p6eval ..rakudo 0e36b2: OUTPUT«Checking 1␤Checking 2␤»
16:47 GlitchMr perl6: so grep {say "Checking $_"; $_ == 4}, 1 .. 1000
16:47 p6eval rakudo 0e36b2, niecza v21-4-g3a9759e: OUTPUT«Checking 1␤Checking 2␤Checking 3␤Checking 4␤»
16:48 GlitchMr huh?
16:48 GlitchMr So, Niecza is lazy... sometimes
16:48 GlitchMr I guess that depending on whatever it is lazy or not is bad idea
16:49 GlitchMr ... perhaps because 1, 2, 3, 4, 5 is eager and 1 .. 1000 isn't...
16:49 GlitchMr perl6: so grep {say "Checking $_"; $_ == 4}, (1 .. 1000).eager
16:49 p6eval rakudo 0e36b2: OUTPUT«Checking 1␤Checking 2␤Checking 3␤Checking 4␤»
16:49 p6eval ..niecza v21-4-g3a9759e: OUTPUT«Unhandled exception: Unable to resolve method eager in type Range␤  at /tmp/XT0grBHkfi line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571) ␤  at /home…
16:49 TimToady you probably want first instead of grep
16:50 GlitchMr I know. I was just checking something
16:50 GlitchMr I would use any for that anyways
16:50 GlitchMr But... niecza doesn't know .eager?
16:50 TimToady well, junctions are only theoretically lazy
16:51 TimToady might have eager as a listop
16:51 TimToady list assignment is supposed to be eager, in a pinch
16:52 TimToady http://rosettacode.org/wiki​/Truncatable_primes#Perl_6 avoids using 'prime all @x' because that is not lazy
16:53 TimToady and I couldn't find a better way to force it than: if prime @x[0] && prime @x[1] && prime @x[2] && prime @x[3] && prime @x[4] && prime @x[5]
16:53 GlitchMr "Highest ltp: 999983"
16:53 GlitchMr This is wrong
16:53 GlitchMr It should be 998443
16:54 TimToady hm, you're right
16:54 GlitchMr But, it's last prime
16:54 GlitchMr It's last prime, but it isn't left-truncatable prime
16:55 TimToady works when I put back the 'prime all @x'
16:55 TimToady but slower, obviously, about 15 seconds
16:55 TimToady oh, duh
16:55 TimToady needs to be 'and', not '&&'
16:56 GlitchMr ;-)
16:56 GlitchMr I guess that debugger would help noticing that error
16:56 GlitchMr Or -MO=Deparse, except we don't have that for Perl 6
16:56 TimToady and now works again, and back down to 3.6 seconds
16:57 GlitchMr Also, I find this grep in grep ugly
16:58 GlitchMr It works, but... I probably would do loop similar to one in Text::Abbrev
16:59 TimToady fixed http://rosettacode.org/wiki​/Truncatable_primes#Perl_6, GlitchMr++
16:59 spider-mario does “not grep {not prime $^n}, @x” not work, TimToady?
16:59 spider-mario (I mean “is it lazier than all?”)
17:01 TimToady yes, it appears to run fast
17:01 GlitchMr I should try doing that too :-)
17:01 GlitchMr It sounds fun
17:01 TimToady takes 8+ minutes and a hot lap to find that out for rakudo though...
17:02 skids r,std: (8 <<+<<< (1,2,3)).say
17:02 skids erm.
17:02 skids std: (8 <<+<<< (1,2,3)).say
17:02 p6eval std cfe8d43: OUTPUT«ok 00:00 44m␤»
17:02 skids r: (8 <<+<<< (1,2,3)).say
17:02 p6eval rakudo 0e36b2: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix < instead␤at /tmp/UPnUp90kl0:1␤»
17:03 TimToady LTM failure, I guess
17:03 TimToady r: (8 <<[+<]<< (1,2,3)).say
17:03 p6eval rakudo 0e36b2: OUTPUT«16 32 64␤»
17:03 TimToady yeah
17:04 TimToady 'course, I'd just write X+< there, and then you can omit the parens around the list
17:05 [Coke] 8m... not adding that to the test suite yet... ;)
17:05 skids TimToady++ and it's prettier.
17:05 TimToady r: (8 X+< 1,2,3).say
17:05 p6eval rakudo 0e36b2: OUTPUT«16 32 64␤»
17:05 TimToady and parses righter
17:06 TimToady r: (8 «+<« (1,2,3)).say
17:06 p6eval rakudo 0e36b2: OUTPUT«16 32 64␤»
17:06 TimToady or that
17:07 skids Does the rakudo slowdown on source file encoding kick in with « or only chars with higher codepoints?
17:08 skids (Because I really really do like « a lot :-)
17:11 * TimToady would ignore any such slowdowns until rakudo makes it not slow down :)
17:11 TimToady but I think the Latin-1 range is okay
17:11 TimToady it's the set operators that give it hissyfits, unless they've fixes that recently
17:11 TimToady *xed
17:12 aloha joined #perl6
17:14 [Coke] I thought that was fixed. hurmmm.
17:16 TimToady r: say set(1,2,3) ∪ set(3,4,5)
17:16 p6eval rakudo 0e36b2: OUTPUT«===SORRY!===␤Confused␤at /tmp/Re268nOlwq:1␤»
17:16 TimToady not fixed enough to put the setops back into the setting, it would seem
17:16 TimToady n: say set(1,2,3) ∪ set(3,4,5)
17:16 [Coke] bet it fails pretty quick, though! ;)
17:16 p6eval niecza v21-4-g3a9759e: OUTPUT«set(1, 2, 3, 4, 5)␤»
17:17 jnthn pmichaud looked into that during the hackathon but we didn't get to having a fix committed
17:17 Chillance joined #perl6
17:20 TimToady ooh, the "not grep {not prime $^n}, @x;" runs 50 seconds faster (7ish minutes) than the 'and' form (in rakudo)
17:20 TimToady doesn't make difference to niecza, which runs both forms in about 3.5 seconds
17:22 kaare__ joined #perl6
17:24 patspam joined #perl6
17:26 sirrobert back
17:28 M_o_C joined #perl6
17:30 mhasch Has Perl 6 now a prime operator?
17:31 jnthn TimToady: Is it expected that ltp would take massively longer than rtp?
17:32 jnthn Because in the profile I have here, 99% of the time is in ltp, and 1% is in rtp. Commenting out the ltp call, it does indeed to rtp in some seconds.
17:35 TimToady yes
17:36 TimToady the problem is that with ltp, you are going against the grain, and can't short-circuit the outer loops
17:37 TimToady I tried that, but then it doesn't find the maximum
17:37 TimToady (it finds the number with the largest righthand prime instead, which doesn't help)
17:39 GlitchMr I've tired using ":q" in Perl 6 REPL
17:39 TimToady mhasch: no, but see http://rosettacode.org/wiki/Pri​mality_by_trial_division#Perl_6
17:39 GlitchMr tried*
17:39 GlitchMr (not that I propose to add :q as alias for exit, this would be silly)
17:41 * [Coke] wonders why "https://github.com/perl6/specs/commit/d​46a8abe6b9b4988b1bd31d19fae88fb36144ab1" is "the most useful thing".
17:45 GlitchMr [Coke]: What else you would do?
17:45 GlitchMr Also, this is something I wanted to do in Ruby once
17:45 [Coke] if I have an installed perl6, works fine. cd to a rakudo build dir, it fails complaining about something in nqp
17:45 [Coke] guessing it's seeing a path in curdir and following that.
17:46 [Coke] GlitchMr: return nothing? I don't see the point in saying "it's the most useful" without actually explaining why.
17:47 GlitchMr require "MyAwesomeProgram::Plugins::$plugin"
17:49 TimToady the fixed the prime generator in http://rosettacode.org/wiki​/Truncatable_primes#Perl_6, which wasn't calling 2 a prime (though the calling code never asks whether 2 is prime)
17:50 flussence r: use MONKEY_TYPING; augment class Pair { method gist { exit 0 if self.key eq 'q'; callsame } }; say :q
17:50 p6eval rakudo 0e36b2: OUTPUT«␤»
17:50 sorear good * #perl6
17:50 FROGGS hi sorear
17:51 sorear [Coke]: there's an example in there of how it's useful, also a link to the irc log where it came up
17:52 sorear I'm trying to take the forgiveness > permission thing more to heart
17:53 [Coke] TimToady: woudl it be faster if you collapsed the junctional return of primes?
17:54 jnthn TimToady: Initial investigation suggests infix:<X> is to blame somehow.
18:00 raiph joined #perl6
18:02 TimToady [Coke]: only in the case of composites that haven't already been tested for, which might or might not be significant
18:04 [Coke] I didn't see a significant difference prepending the sub body with a 'so' on rtp
18:04 TimToady and someday someone will write an optimizer that will make junctions smarter about short circuiting
18:06 fgomez joined #perl6
18:06 benabik_ joined #perl6
18:07 mhasch the prime code is impressively short. Will sqrt be evaluated only once per prime() call?
18:08 benabik__ joined #perl6
18:09 Chillance joined #perl6
18:12 sivoais joined #perl6
18:16 stopbit_ joined #perl6
18:19 stopbit joined #perl6
18:20 TimToady mhasch: good question.  it's in a closure due the *, but I don't think that helps
18:21 FROGGS jnthn's debugger might help
18:22 mhasch What would be a good idiom for "all odd numbers from 3 to floor sqrt $i then?
18:22 TimToady I can write it as { $_ > (state $ = floor sqrt $i) } but the difference seems to be in the noise level
18:23 pyrimidine joined #perl6
18:24 zby_home joined #perl6
18:25 TimToady { $_ > (START floor sqrt $i) } ought to work too, but it seems that START forgets its value
18:26 TimToady at least in niecza; testing rakudo
18:26 TimToady which will take a while
18:26 colomon joined #perl6
18:27 TimToady jnthn: maybe I should try nested for loops and see what diff it makes
18:28 dalek rakudo/nom: a19ce8b | jnthn++ | src/core/LoL.pm:
18:28 dalek rakudo/nom: Make infix:<X> a bit cheaper. This doesn't really deal with what seems to be an algorithmic problem, but it is an easy and noticable win.
18:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a19ce8b0f9
18:28 jnthn TimToady: Would be interesting, yeah.
18:28 * jnthn -> shop
18:28 jnthn bbiab
18:29 mhasch for simplicity, I would just go with: $i > 1 and $i %% none 2, 3 .. floor sqrt $i
18:30 mhasch this wastes cucles for odd numbers but not for repeated sqrt.  The second solution iterating just over primes is still there.
18:30 mhasch cycles
18:30 TimToady that will test the evens too
18:32 mhasch Yes, they said even numbers may be eliminated, but it was not a requirement.  :-)
18:33 GlitchMr Just wondering, how can I implement operator precedence in Perl 6 grammars?
18:34 geekosaur is {looser|tighter}(op), IIRC
18:34 geekosaur probably need quoting on the op
18:34 timotimo is that the same in grammars?
18:34 tadzik good evening
18:35 sorear o/
18:35 geekosaur oh, misunderstood
18:35 geekosaur hm.  I am not sure, it would make sense to me to allow that on tokens but I don't know that is allowed
18:36 sorear GlitchMr: use EXPR or use recursive descent
18:36 geekosaur (or if that's even been given thought...)
18:36 TimToady rakudo handles { $_ > (START floor sqrt $i) }, and it cut down the run time by 5 seconds, which might be an issue if the rest of the program ran in 3 seconds :)
18:37 zby_home joined #perl6
18:37 GlitchMr sorear: What is EXPR?
18:38 TimToady nr: say 2.sqrt.floor.WHAT
18:38 p6eval rakudo 0e36b2, niecza v21-4-g3a9759e: OUTPUT«Int()␤»
18:38 cognominal joined #perl6
18:39 TimToady 'course that 5 seconds could also just be noise, when something is running 7 minutes
18:40 sorear GlitchMr: EXPR is one of two related methods which handles operator precedence in perl 6
18:45 GlitchMr PHP is popular... I guess that PHP features, such as left-associative ?: should be added to Perl 6
18:45 jnthn TimToady: I'd expect the commit I did a moment ago to shave off a bit of that. :)
18:46 wk_ joined #perl6
18:46 tadzik GlitchMr: ...you're trolling, right? :P
18:46 jnthn TimToady: Will see if I can work out the deeper issue, but it's one of those areas where Pm may grok what's happening an order of magnitude faster than I do.
18:46 tadzik or just kiddin g:)
18:47 GlitchMr Hmmm... I actually wonder how easy it would be to change associativity of ?? !! with mutable grammars
18:47 jnthn If I don't figger it I'll file a ticket with what I managed to work out, anyways...
18:47 tadzik FROGGS: the link is dead, did you merge the branch?
18:47 moritz hey, let's use \ as a namespace separator
18:48 GlitchMr Also, in PHP !$variable = 42 works.
18:48 jnthn moritz: That's a pretty cool idea. As a Windows user, I like how it'll remind me of file paths.
18:48 jnthn ;)
18:48 tadzik ha, that's the solution!
18:48 tadzik Now we don't need to distinguish between require "name" and require "path" :P
18:48 GlitchMr (actually, I have feeling that !$variable = 42 working in PHP is yet another PHP <del>bug</del> feature)
18:49 rurban joined #perl6
18:49 rurban I just read http://blogs.perl.org/users/perl_6_reports/20​12/09/perl6-summaries-for-2012-09-02.html#26 about LLVM
18:50 rurban To clarify: LLVM itself is not the right tool for a good dynamic language VM. But there is vmkit on top of LLVM which is the right tool.
18:50 rurban vmkit was the basis for a jvm rewrite (j3) and a .CLR rewrite (c3) on top of LLVM and mmtk (for gc)
18:51 rurban bot j3 and c3 have decent performance, j3 same speed to 2x slower than jvm and c3 at about the same speed as .net/mono
18:51 moritz https://github.com/adambard/​functools-for-matlab#readme # why didn't that exist a year ago? :-)
18:52 benabik rurban: It's designed around stack based machines?
18:52 rurban Which would lead to a nqp performance of about 10x faster, my,guess.
18:52 rurban llvm is stack and register based.
18:52 rurban You can use both.
18:52 benabik Right.  But is vmkit?
18:53 rurban vmkit is stack based which translates to registers
18:54 moritz afaict most modern VMs do that
18:54 rurban When I'm finished with the basic parrot fixes I'll start a little implementation just to test performance of some simple ops. calling a function and do some arith
18:55 * benabik wonders how it does with continuations.
18:55 rurban I don't like the lorito approach which looks like a full LLVM rewrite. Why rewriting it when you can just use it?
18:55 rurban No continuations at all.
18:55 rurban I do'nt think nqp needs needs continuations. Normal exceptions
18:56 GlitchMr raiph: http://feather.perl6.nl/~glitchmr/rakudo-bin.html
18:56 GlitchMr I've made quick Perl 5 script which makes it easier to use my already compiled Rakudo Star
18:57 GlitchMr I probably could compile more Rakudo Star releases, but that probably wouldn't be too friendly for disk space. It's limited.
18:58 benabik rurban: Pity.  Continuations are wonderful for supporting many control flow styles...
18:59 rurban If you can make fast continuations work in vmkit, fine :)
18:59 benabik Although as a PhD student, I probably shouldn't say "pity" to open problems.
18:59 rurban Most scheme's have fast and slim continuations, so it should be possible
18:59 GlitchMr Every Rakudo Star needs different NQP. But perhaps using this same Parrot version for every compilation would work.
19:00 sorear rurban: rakudo doesn't need full continuations, but coroutines are mostly indespensible
19:00 GlitchMr But I don't know how to make configuration where Parrot is somewhere and NQP is compiled for Perl 6
19:00 TimToady I know, let's port nqp to run on Scheme... :D
19:00 rurban coro's should be possible.
19:01 TimToady now I have an unbound number of problems..
19:01 rurban Most scheme's are not good enough to handle nqp. Maybe gambit
19:01 * TimToady was kidding, mostly
19:01 GlitchMr ... when I try using --gen-nqp, NQP is pushed to Parrot directory. Because of that I cannot use this same Parrot installation for older Rakudo Star releases.
19:02 TimToady Perl 6 is not designed to require continuations, in any case
19:02 eternaleye joined #perl6
19:02 rurban But I need a month or two. I also need to keep the p5p folks busy. They just started half-ass signatures
19:03 tadzik (:
19:03 TimToady .oO(P6 is not a menu of features for P5)
19:03 tadzik you mean p5-mop started, and p5p will stop going "naay" in 4 years or so? ;)
19:04 [Coke] if you want to use the same parrot or same nqp, you probably want to build your own dist, not use star.
19:04 [Coke] no?
19:04 doy started laying the groundwork for signatures, you mean
19:04 doy d:
19:04 doy and as far as i can tell, p5p is generally positive about p5-mop
19:05 rurban http://perl5.git.perl.org/perl.git/short​log/refs/heads/doy/subroutine-signatures
19:05 tadzik oooo
19:05 tadzik that's some good news
19:06 TimToady well, sigs are one of those things that won't work terribly well without a good type system
19:06 TimToady *cough* smartmatching *cough*
19:06 xinming_ joined #perl6
19:06 rurban And since doy refused to parse types nor allow type traits we are lost
19:06 doy seriously, i'm not refusing anything
19:07 doy and "we are lost" overstates the situation pretty significantly
19:07 rurban And can throw my type system approach away because it will not work in functions.
19:07 tadzik honestly, I'd be fine with Just Not Having To Type 'use Fun' everywhere :)
19:07 rurban doy: you have no idea. that's the problem.
19:07 doy tadzik: yes, that is the starting point
19:07 atrodo use Fun;
19:07 doy rurban: things would go a lot easier if you would stop assuming that
19:08 rurban then why do you leave it out. parsing sigs is almost the same as parsing MYTERM. my (@args) = @_;
19:08 jnthn This belongs on #p5p, not here.
19:08 rurban Sorry, yes.
19:09 doy we've already had this discussion on #p5p
19:09 TimToady hugme: hug rurban and doy
19:09 * hugme hugs rurban and doy
19:09 tadzik you can try #p6p now :P
19:09 doy (:
19:09 nohack joined #perl6
19:09 rurban maybe perl6 can teach the p5p folks something, on #p6p5
19:10 TimToady well, not insulting people is part of it
19:11 * tadzik exhales
19:11 jnthn (removing the over-general ban from yesterday)
19:11 TimToady whew!
19:12 jnthn huh? :)
19:12 jnthn oh...no, I wasn't gonna kick anyone :P
19:12 jnthn Just remembered I'd said I'd remove the ban :)
19:13 jnthn Hopefully we don't get any more compliments on shopping around for the best prices. :P
19:13 jnthn TimToady: I think X is managing to (expensively) evaluate the various sublists again and again.
19:13 jnthn Or something like that.
19:13 TimToady your fix took about a minute off
19:14 TimToady lemme try it with nested fors
19:14 jnthn Well, it wasn't a fix for the Real Problem.
19:14 jnthn Yes, if nested fors are a bunch faster it'll probably confirm my guess at what's going on.
19:16 TimToady indeed, reduced it from 6m20 to 0m19
19:17 [Coke] O_o
19:18 tadzik :)
19:18 jnthn yeah, that's the kinda difference I was looking for :)
19:18 TimToady so now is only about 5 times slower than niecza, a great improvement over 150
19:19 TimToady updating RC
19:19 jnthn Right. And it matches my tracking down of the issue to infix:<X>
19:20 jnthn I guess one would need to be really careful in fixing this so as not to break the laziness.
19:22 jnthn Think I'll delegate it, either to Pm or to a cleverer future me :)
19:22 jnthn dinner, then will write what I figured out into an RT &
19:23 TimToady revised ltp for http://rosettacode.org/wiki​/Truncatable_primes#Perl_6
19:31 the joined #perl6
19:43 thou joined #perl6
19:45 rhr joined #perl6
19:45 TimToady npr: say START { 42 } for 1..5;
19:45 p6eval niecza v21-4-g3a9759e: OUTPUT«42␤Nil␤Nil␤Nil␤Nil␤»
19:45 p6eval ..pugs: OUTPUT«42␤42␤42␤42␤42␤»
19:45 p6eval ..rakudo a19ce8: OUTPUT«Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤»
19:46 [Coke] ISTR pugs is cheating.
19:46 TimToady npr: say BEGIN { 42 } for 1..5;
19:46 p6eval rakudo a19ce8, niecza v21-4-g3a9759e, pugs: OUTPUT«42␤42␤42␤42␤42␤»
19:46 TimToady it should work like that
19:46 TimToady npr: say INIT { 42 } for 1..5;
19:46 p6eval pugs: OUTPUT«42␤42␤42␤42␤42␤»
19:46 p6eval ..rakudo a19ce8, niecza v21-4-g3a9759e: OUTPUT«Nil␤Nil␤Nil␤Nil␤Nil␤»
19:46 TimToady that one too
19:47 moritz nr: say INIT 42
19:47 p6eval rakudo a19ce8, niecza v21-4-g3a9759e: OUTPUT«Nil␤»
19:47 moritz nr: say START 42
19:47 p6eval rakudo a19ce8, niecza v21-4-g3a9759e: OUTPUT«42␤»
19:47 moritz nr: for 1 { say START 42 }
19:47 p6eval rakudo a19ce8, niecza v21-4-g3a9759e: OUTPUT«42␤»
19:47 moritz nr: for 1..3 { say START 42 }
19:47 p6eval rakudo a19ce8: OUTPUT«42␤42␤42␤»
19:47 p6eval ..niecza v21-4-g3a9759e: OUTPUT«42␤Nil␤Nil␤»
19:47 TimToady bugses
19:47 fgomez joined #perl6
19:48 moritz it seems rakudo has problems with START in statement-modifying loops
19:48 TimToady nr: for 1..3 { say INIT 42 }
19:49 p6eval rakudo a19ce8, niecza v21-4-g3a9759e: OUTPUT«Nil␤Nil␤Nil␤»
19:49 sorear phasers in niecza need to remember more values, yeah
19:49 * moritz submits rakudobugs
19:49 sorear r: for 1..2 { say START 42 for 1..2 }
19:49 p6eval rakudo a19ce8: OUTPUT«42 42␤42 42␤»
19:49 sorear r: for 1..2 { say (START 42) for 1..2 }
19:49 p6eval rakudo a19ce8: OUTPUT«Mu()␤Mu()␤Mu()␤Mu()␤»
19:50 TimToady which maybe points to some recloning differences
19:50 moritz r: say START 42 for 1
19:50 p6eval rakudo a19ce8: OUTPUT«42␤»
19:50 moritz r: say START 42 for 1, 2
19:50 p6eval rakudo a19ce8: OUTPUT«42 42␤»
19:50 TimToady the loop is in the START
19:50 moritz r: say START { 42 } for 1, 2
19:50 TimToady I think...
19:50 p6eval rakudo a19ce8: OUTPUT«Mu()␤Mu()␤»
19:51 [Coke] r: die Rat
19:51 p6eval rakudo a19ce8: OUTPUT«No such method 'VAR' for invocant of type 'Rat'␤  in method Str at src/gen/CORE.setting:736␤  in method message at src/gen/CORE.setting:8866␤  in block  at /tmp/Qze2qvSsN_:1␤␤»
19:51 [Coke] pn: die Rat
19:51 [Coke] npr: die Rat
19:51 p6eval pugs: OUTPUT«*** Died␤    at /tmp/lDbpwqSABF line 1, column 1 - line 2, column 1␤»
19:51 p6eval ..niecza v21-4-g3a9759e: OUTPUT«Unhandled exception: Rat()␤  at /home/p6eval/niecza/lib/CORE.setting line 1435 (die @ 5) ␤  at /tmp/PVNnpEKTEK line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4139 (module…
19:51 p6eval ..rakudo a19ce8: OUTPUT«No such method 'VAR' for invocant of type 'Rat'␤  in method Str at src/gen/CORE.setting:736␤  in method message at src/gen/CORE.setting:8866␤  in block  at /tmp/eebqU_qFVL:1␤␤»
19:52 moritz r: for 1, 2 { say START 42 }
19:52 p6eval rakudo a19ce8: OUTPUT«42␤42␤»
19:52 sorear npr: der Rat # surely?
19:52 p6eval pugs: OUTPUT«*** No such subroutine: "&der"␤    at /tmp/bJNM2gqaGu line 1, column 1 - line 2, column 1␤»
19:52 p6eval ..niecza v21-4-g3a9759e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'der' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1435 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /home/…
19:52 p6eval ..rakudo a19ce8: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&der' called (line 1)␤»
19:53 TimToady anyhoo, the prime test oughta just be able to put: @primes ...^ * > START $i.sqrt.floor
19:53 moritz sorear: or   die Ratte  :-)
19:53 FROGGS right
19:54 * FROGGS always wanted to have a german perl
19:54 TimToady the a workshop about those
19:54 TimToady *there's
19:55 FROGGS 'was a joke
19:55 FROGGS a friend of mine used to use german varnames in his delphi code
19:55 FROGGS its horrible to read
19:56 moritz FROGGS: $work code is all German. Well, mostly. I hate it.
19:56 FROGGS yay, like SAP does ;o)
19:56 moritz FROGGS: writing non-English commit messages simply doesn't work for me
19:56 moritz well, we're not quite as big as SAP :-)
19:56 tadzik I once read a code in Hungarian
19:56 tadzik I promised myself never to do that to any living being
19:57 sorear calling all undead programmers
19:57 FROGGS moritz: I mean the fieldnames in SAP are german, like PERNR for Personalnummer (employeenumber)
19:58 FROGGS our american colleges just dont know what it means
19:58 FROGGS but you have to work with it
19:58 moritz FROGGS: :(
19:58 sorear that's... not even that hard
19:59 FROGGS and when you want to switch to another module (transaction), these abbreviations are german too
19:59 sorear "I guess it's a personnel number of some kind"
19:59 sorear and if you abbreviate stuff enough it becomes unscrutable even in the same language
19:59 FROGGS sorear: what is ANREX?
19:59 sorear FROGGS: I'd guess it's an oil exploration company
19:59 FROGGS it is the titel, like Mr. or Mrs.
20:00 moritz 'anrede'
20:01 moritz but I wouldn't have guessed that from ANREX eitehr
20:01 sorear what, they don't want you to enter it as (forgot the list of common Germanic prenominals.  Herr?)
20:02 FROGGS moritz: Anredetext
20:02 FROGGS sorear: ya, its Herr and Frau
20:02 FROGGS I actually dont know if you can use Mr. there
20:03 moritz FROGGS: do you work a lot with SAP?
20:03 FROGGS btw, SAP R/3, the standard installation, has more than 100 thousand tables
20:03 FROGGS the docs for these tables are on 1900 pages (ebook)
20:04 sorear 50 tables per page?
20:04 FROGGS moritz: I usually have to provide interfaces to SAP, I'm not doing the SAP part, but the other side
20:04 moritz so
20:04 * sorear recalls once having SAP and S&P confused
20:05 sorear (Standard & Poor is a financial institution in the US best known for maintaining the "S&P 500", a stock market index)
20:06 moritz FROGGS: I'm working on a homegrown program that fills the same "all business-related functions" corner
20:06 moritz and the original author was often trying to be smart
20:07 moritz there are things like flags stored as characters, and their codepoint is used as a foreign key in another table
20:07 FROGGS hehe, nice
20:07 bluescreen10 joined #perl6
20:07 moritz if it's 'a' in this table, it's 97 in another table
20:07 sorear moritz: abusing VARCHAR() as a set type?
20:08 FROGGS so you have strings which contain several foreign keys to other tables?
20:08 moritz sorear: I don't think so, since there's only ever one of such characters. It's a complete mystery to me why it was done that way
20:09 * jnthn back
20:09 moritz and we have a column called 'bla', because the original author didn't bother to give it a proper name
20:09 FROGGS what the
20:09 moritz and now several applications share the same DB, and renames are non-trivial
20:10 moritz ('name' would have been an appropriate name of that column. It wasn't something hard to find a name for)
20:10 FROGGS but you killed him with fire, right?
20:11 moritz no, he's in the board of directors
20:11 FROGGS -.-
20:11 sorear .oO( it's not too late )
20:12 moritz oh, and there's a custom error handling system (like Try::Tiny but in crazy)
20:12 moritz and lots of other fun
20:13 FROGGS and thats at your new $work?
20:13 moritz but it's "only" about 50k lines of perl code
20:13 moritz FROGGS: yes
20:13 [Coke] moritz: If it weren't for updating legacy systems, I'd have a much worse paying job. But I do like it when I can do something new from the ground up instead.
20:13 FROGGS 50k for Try::Tiny::Crazy?
20:13 FROGGS no way
20:13 moritz FROGGS: no, for the entire application
20:14 moritz including all the craziness
20:14 FROGGS all right
20:14 * [Coke] is in the middle of cleaning up 3 kilolines of coldfusion, if that makes you feel better, moritz. :)
20:14 moritz [Coke]: I've been patching Net::Whois::RIPE, which was a very welcome distraction
20:15 inokenty joined #perl6
20:15 moritz a small, isolated(-ish) module that still does something useful, not too much legacy :-)
20:15 moritz [Coke]: actually I don't feel very bad. I like to complain a bit, but all in all it's still a nice job
20:16 [Coke] moritz: sounds about right. :)
20:16 * [Coke] chuckles at "who is ripe"
20:16 moritz not all parts are crazy, and we have some nice tools too (push to quality assurance and built of debian packages in a single command)
20:17 moritz SQL diffs for schema changes
20:18 moritz and there's also a heavily patched OTRS installation to maintain when I'm tired of our CRM system :-)
20:21 FROGGS but it is always good to have something to complain about ;o)
20:22 moritz aye
20:23 moritz and now for something completely different
20:23 moritz sleep
20:23 moritz good night :-)
20:23 sorear good night moritz
20:23 FROGGS gnight
20:34 jnthn eval print 'a]' =~ /a]/
20:34 buubot_backup jnthn: 11
20:37 fgomez joined #perl6
20:41 erkan joined #perl6
20:45 skids r: my @b = (1,2,3); @b[* <<-<< (1,2)].say; @b[* X- (1,2)].say;
20:45 p6eval rakudo a19ce8: OUTPUT«3 2␤Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \v: Mu *%_)␤␤  in method Numeric at src/gen/CORE.setting:716␤  in sub infix:<-> at src/gen/CORE.setting:2526␤  in block  at src/gen/CORE.setting:11934␤  in sub coro at src/gen/CORE.setting:5346␤  in …
20:47 jnthn skids: Expecting that to whatever-curry?
20:49 skids Wondering what the X- does to the whatever that the hyperop doesn't.
20:49 jnthn oh, the first one *did* surry
20:49 jnthn *curry
20:52 skids I suppose the hyperop knows it has an item on the lhs, while the X- not necessarily.
20:58 * skids decommute
21:00 leont joined #perl6
21:01 crab2313 joined #perl6
21:07 Targen joined #perl6
21:25 masak ahoj, #perl6
21:26 tadzik o, hej masaku
21:26 sorear jo, masak
21:27 jnthn dobry vecer, masak
21:27 benabik joined #perl6
21:28 dalek nqp: c810874 | jnthn++ | src/QRegex/P5Regex/Grammar.nqp:
21:28 dalek nqp: Toss P6Regex leftover.
21:28 dalek nqp: review: https://github.com/perl6/nqp/commit/c810874a30
21:28 dalek nqp: 37cb811 | jnthn++ | src/QRegex/P5Regex/Grammar.nqp:
21:28 dalek nqp: Parse non-alphanumerics without a meaning as literal characters to match.
21:28 dalek nqp: review: https://github.com/perl6/nqp/commit/37cb811b4a
21:28 dalek nqp: f1027a4 | jnthn++ | t/p5regex/rx_charclass:
21:28 dalek nqp: Test for /a]/.
21:28 dalek nqp: review: https://github.com/perl6/nqp/commit/f1027a4e92
21:40 huf_ joined #perl6
21:40 dalek nqp: 1a194af | jnthn++ | / (2 files):
21:40 dalek nqp: Fix \B, plus a test.
21:40 dalek nqp: review: https://github.com/perl6/nqp/commit/1a194af38c
21:48 dalek rakudo/nom: ba04210 | jnthn++ | tools/build/NQP_REVISION:
21:48 dalek rakudo/nom: Get latest NQP for P5Regex improvements.
21:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ba04210c6c
21:48 dalek rakudo/nom: d624613 | jnthn++ | t/spectest.data:
21:48 dalek rakudo/nom: Run S05-modifier/perl5_1.t.
21:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d62461350a
21:48 dalek roast: fe3a0da | jnthn++ | S05-modifier/perl5_1.t:
21:48 dalek roast: Rakudo unfudges.
21:48 dalek roast: review: https://github.com/perl6/roast/commit/fe3a0da31e
22:05 tadzik hmm. I saw plenty of those in Oslo. Do you know the name of an input device wich is like a touchpad, but physically moves under your finger?
22:07 jnthn trackball?
22:07 tadzik no, not a ball. It was a shape of a touchpad
22:07 FROGGS and you move it like a mouse?
22:08 tadzik no, the device itself isn't moving
22:08 tadzik hmm
22:08 tadzik imagine a touchpad, where the layer you touch is movable
22:08 tadzik ...but the touchpad itself stays in place
22:08 sorear how big is the moving piece?
22:08 FROGGS so you move that surface like a joystick
22:09 sorear 10 mm^2?
22:09 tadzik sorear: like a regular laptop touchpad
22:09 jnthn hmm, dunno then.
22:09 sorear does it rotate?
22:09 tadzik internally, I believe so
22:09 tadzik from the users' point of view, it just moves under your finger
22:11 masak I think I know what you mean. I don't know the name of those, though.
22:12 FROGGS can't find it using google, so it doesn't exist
22:13 am0c joined #perl6
22:13 masak 'night, #perl6
22:13 FROGGS gnight masak
22:13 supernovus joined #perl6
22:14 FROGGS something like a "contour shuttleexpress"
22:14 FROGGS ?
22:15 FROGGS this http://retail.contourdesign.com/?/products/22
22:16 tadzik nah
22:16 tadzik let me draw this
22:16 supernovus Hmm, going through the logs, tadzik mention HTTP::Easy was broken. In testing now, it seems to bind only to localhost. Attempts to connect from an external address do not work. I am assuming something has changed in Rakudo's IO::Socket::INET library?
22:16 tadzik supernovus: the thing I noticed broken is something related to header parsing
22:19 tadzik http://i.imgur.com/CzJwW.jpg
22:19 tadzik this thing is rubber and striped
22:20 supernovus Ah. This library has not received much love. It was written to be a drop in replacement for HTTP::Server::Simple when that library was not compiling against Rakudo nom. Most of my web app testing, I use the SCGI protocol for the apps instead of HTTP. I'm still planning on writing a FastCGI library for those who prefer FastCGI to SCGI. In the meantime, if you can file a bug against HTTP::Easy,
22:20 supernovus I'll see what I can do about fixing its header parsing issues.
22:20 tadzik 'tis some Buf/Str confusion I think
22:21 FROGGS tadzik: maybe a suberpuck?
22:21 FROGGS your drawing is, well, how should I say, "not that helpful"
22:21 cognominal joined #perl6
22:21 tadzik :)
22:22 tadzik hey, I tried :P
22:22 supernovus tadzik: Oh, that makes sense now. Both HTTP::Easy and HTTP::Client need to be rewritten to work with Buf. When they were last worked on, there was no Buf implementation available (in Rakudo at least, I need to test all of my libraries against Niecza yet.)
22:22 tadzik I see
22:22 tadzik supernovus: HTTP::Easy works fine
22:22 tadzik at least Bailador works fine, and it uses HE under the hood
22:30 supernovus That's good to hear.
22:33 jnthn rest... &
22:33 crab2313 joined #perl6
22:43 skids joined #perl6
22:46 cognominal joined #perl6
22:48 * sorear tries and fails to find a reference to tadzik's device
22:48 sorear tadzik: do you know any of mthe people who had them?
22:48 sorear we could ask
22:48 sorear oslo.pm mailing, maybe
22:59 dalek perl6-roast-data: dad623b | coke++ | doit:
22:59 dalek perl6-roast-data: Clarify that these commits are not attended.
22:59 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/dad623bb9b
22:59 dalek perl6-roast-data: 746f725 | coke++ | p (2 files):
22:59 dalek perl6-roast-data: today (automated commit)
22:59 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/746f725379
22:59 dalek perl6-roast-data: 7a116b3 | coke++ | p (2 files):
22:59 dalek perl6-roast-data: today (automated commit)
22:59 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/7a116b34c1
22:59 dalek perl6-roast-data: 1f77bf9 | coke++ | / (4 files):
22:59 dalek perl6-roast-data: today (automated commit)
22:59 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/1f77bf92ca
22:59 dalek perl6-roast-data: 7c8ddc7 | coke++ | / (4 files):
22:59 dalek perl6-roast-data: today (automated commit)
22:59 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/7c8ddc74be
23:18 Targen joined #perl6
23:29 dayangkun joined #perl6
23:32 benabik joined #perl6
23:41 dalek roast: 5c64ac0 | coke++ | S06- (2 files):
23:41 dalek roast: niecza fudge
23:41 dalek roast: review: https://github.com/perl6/roast/commit/5c64ac0106
23:53 dalek ecosystem: e62cc8b | (Tobias Leich)++ | META.list:
23:53 dalek ecosystem: added File::Spec
23:53 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/e62cc8b846
23:53 FROGGS \o/
23:53 FROGGS Unix code is done
23:55 FROGGS gnight

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs