Camelia, the Perl 6 bug

IRC log for #perl6, 2012-03-10

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:00 felher o/
00:31 jnthn Good beervning, #perl6
00:36 colomon o/
00:37 wolfman2000 joined #perl6
00:58 ivan`` joined #perl6
01:08 benabik joined #perl6
01:14 dalek rakudo/name-cleanup: d1b53d7 | jnthn++ | src/Perl6/Grammar.pm:
01:14 dalek rakudo/name-cleanup: Fix typo; kboga++.
01:14 dalek rakudo/name-cleanup: review: https://github.com/rakudo/rakudo/commit/d1b53d756e
01:15 huf joined #perl6
01:15 sorear o/ jnthn
01:15 sorear why are jnthn and masak out of phase today?
01:15 jnthn sorear: I was out with folks from $client this evening
01:16 jnthn And busy doing @stuff for them during the day
01:16 jnthn I'm probably gonna sleep soon, though.
01:16 * jnthn has had on-and-off headache all day :/
01:17 jnthn Five days until vacation \o/
01:20 colomon one week until St. Patrick's Day gigs start.  \o/
01:21 plobsing_ joined #perl6
01:21 jnthn :)
01:22 sorear o/ colomon
01:22 colomon \o
01:32 jnthn Time for some rest...hopefully I get some hacking tuits tomorrow.
01:32 jnthn 'night
01:46 icwiener joined #perl6
01:59 cbk1090 Is there a way to call a method from inside the same class?
02:01 TimToady sure, you can either do it explicitly with self.foo, or as a pseudo-attribute, $.foo
02:02 cbk1090 so foo would be the method name?
02:02 TimToady yes
02:02 TimToady that's a virtual call
02:03 TimToady if you want a non-virtual call, you'll need to store its name somewhere you can call it as a subroutine
02:03 cbk1090 Ok got it!  Thanks!!!
02:03 cbk1090 I think the first way will work.  I dont need anyting fancy
02:03 TimToady the $.foo form works with args, in fact: $.foo(1,2,3)
02:04 TimToady basically, the external API hides whether something is actually implemented as an attribute or as a method
02:04 TimToady this helps with any later refactoring in that regard
02:06 cbk1090 TimToady, This is what I now got: self.addData( $topic, $remarks);  It works great!  I was thinking of making addData a sub but I really wanted it as a method for my data class.
02:08 evilcubed joined #perl6
02:14 icwiener joined #perl6
02:15 jaldhar joined #perl6
02:16 evilcubed is it out yet?
02:18 whiteknight joined #perl6
02:23 TimToady everyone is out on Friday night, so I would expect it to be out too
02:26 bynari :)
02:32 huf well then zip it back up, nobody wants to see that
02:44 evilcubed is perl 6 ready?
02:47 skids perl6: (?"Ready").say
02:47 p6eval pugs b927740: OUTPUT«1␤»
02:47 p6eval ..rakudo a8086d, niecza v15-4-g1f35f89: OUTPUT«True␤»
02:51 evilcubed dude i have no fracking clue what you and the bot just said
02:52 bynari He wrote some perl6 code and the perl6 bot eval'd it and returned the result
02:53 skids There are three perl6 implementations, pugs, rakudo, and niecza.  Each are ready for some things, not so much for other things.
02:53 benabik http://perl6.org/compilers/features
02:54 evilcubed so when i write a mod_perl or run perl from the shell in the latest CentOS it's jacked into one of these compilers?
02:54 benabik mod_perl is Perl 5
03:05 leprevost joined #perl6
03:06 orafu joined #perl6
03:08 evilcubed thank you skids, bynari, and benabik for the heads up
03:08 evilcubed appreciate your time
03:09 sorear evilcubed: Perl 6 is not "the next version" of Perl.
03:09 sorear it's a fork (yes I'm revising history here)
03:11 sorear so all the Perl stuff you're familiar with now is, and will stay for a while, Perl 5
03:13 sorear Perl 5 and Perl 6 are being developed in parallel
03:13 sorear run perl -V and it might say something like "version 12"
03:14 evilcubed thank you for explaining sorear
03:15 sorear perl 5 has a lot more manpower behind it, but is suffering from the legacy of a 25-year-old codebase that's shown to strongly resist extending
03:15 sorear the idea of perl 6 is to fix the architectural issues first
03:15 sorear perl 6 is slower and less useful than perl 5 now, but if we calculated right it should be better within the decade
03:15 sorear it's *usable* now.
03:15 sorear and arguably *more fun* to use now.
03:16 evilcubed can i chain perl 6 into mod_rewrite and mod_perl?
03:16 sorear but it IS slower, has fewer working libraries, etc
03:16 bynari mod_rewrite has nothing to do with perl, evilcubed
03:16 evilcubed anyone done it with production boxes?
03:16 sorear define "production"
03:16 evilcubed makes money
03:16 bynari And mod_perl is a nasty old module. Join us in the brave new world of the web where we have coolness like nginx with plack and starman
03:16 evilcubed can crash and burn, but makes money
03:17 evilcubed bynari: ah
03:17 sorear several people here have used perl 6 for non-website business purposes
03:17 evilcubed nginx, plack, and starman?
03:17 sorear websites ... need to be fast
03:17 sorear not much fun to use a wiki if all the page loads take a minute
03:17 evilcubed it's alright if it's a tad slow
03:18 bynari Well. nginx is a very fast, lean web server. Starman is a backend server used to run Perl web services using frameworks like mojolicious, dancer etc
03:18 bynari Look into Dancer, plack and starman
03:18 evilcubed okay
03:18 sorear evilcubed: the usual way cool people do web apps today is to have a perl-specific server that apache connects to
03:18 bynari They're for perl 5 btw
03:18 evilcubed kinda like fast-cgi then
03:18 sorear the perl-specific server tends to either speak http (using mod_proxy) or fastcgi
03:19 bynari I don't think perl 6 is really ready for web stuff just now, or at least there's not any frameworks etc. But you can certainly do a lot of fun things with perl 6 just now
03:19 sorear bynari: there does exist at least one working perl 6 web framework, tadzik's Bailador
03:19 PacoAir joined #perl6
03:19 bynari evilcubed: Like fast-cgi, yeah. Instead of fast cgi you'd have starman, or corola, or twiggy, or any of the other servers
03:19 * bynari nods at sorear
03:21 bynari You can join #dancer on irc.perl.org to ask more specific questions about that related stuff too
03:21 bynari I'm going a bit off-topic for #perl6
03:21 araujo well, perl 6 is _ready_ ... depends on the project or web stuff you want to do
03:21 evilcubed thank you for the heads up
03:21 evilcubed i appreciate it
03:22 bynari No one's doing production stuff with Perl 6 just now, but it's "ready" for fun projects
03:22 bynari And there seems to be some people using it for some serious'ish projects now too
03:23 bynari But the more people that start using it for fun stuff, the quicker it'll be production ready
03:23 evilcubed i am a bench warmer
03:23 bynari :-)
03:23 evilcubed i will wait
03:24 sorear I take issue with the equation of "production" with "runs a web server"
03:25 sorear FORTRAN is virtually never used for Web sites, but it's a living language that is very frequently used for meaningful tasks
03:26 * bynari reads "living language" and pictures Frankenstein's monster
03:27 bynari Eek. I saw a rather disturbing image of a large creature with a head that's an old computer from the 70's
03:27 sorear Perl is more the Frankenstein's monster here.
03:27 bynari And it reads FORTRAN on the screen
03:27 sorear c.f. wall.org/...pm...
03:28 sorear Perl 6 is already a pretty nice language for one-off scripting
03:28 colomon For what it's worth, I've got two short perl 6 scripts that I've been using for $work since 2009.  As well as a nice p6 tool for working with the ABC music format, another tool for reminding me when to practice music, and the GTK mandelbrot set program.  The only one where the p6 implementations feel limiting is the mandelbrot set one.
03:29 sorear Perl 6's type system is designed to allow "C"-style code in Perl 6 to run fast, but these dreams have not yet been fully realized
03:30 colomon perl 6 is already quite capable as a "glue" language for scripts.
03:30 sorear also, current Perl 6 parsers are _slow_
03:30 sorear Perl 5 can slurp 100,000 lines of code in 2 seconds on a 2GHz P4 from 2003
03:31 evilcubed Pentium 4 is pretty fast when it isn't being smothered by Flash.
03:31 sorear perl 6 ... well I was celebrating last month when I got the 4000 line standard library to parse in under a minute
03:31 evilcubed there's a lot of definition of production, please don't take "spitting out web pages" as the only definition
03:32 evilcubed i didn't mean to imply that
03:32 evilcubed and actually probably didn't imply that
03:32 sorear (I maintain one of the compilers so I can get away with being pessimistic, nobody thinks I'm just going to walk off :p)
03:32 sorear ah OK.
03:32 sorear a lot of people use "production" and rarely explain well what they mean by that.
03:33 sorear maybe I'd understand better if I weren't 21 and a work-virgin
03:34 evilcubed i noticed that last year .NET took a hit in a way, Metro was becoming very C++ friendly, warm to that type of developers.
03:35 evilcubed All the .NET foundation classes, not really a part of Metro.
03:35 dalek Pugs.hs/wip/ident: f54ade7 | au++ | Pugs/src/Pugs/ (2 files):
03:35 dalek Pugs.hs/wip/ident: * Properly implement apostrophe/dash identifier name rule as per S02.
03:35 dalek Pugs.hs/wip/ident: review: https://github.com/perl6/Pugs.hs/commit/f54ade7c88
03:35 sorear yeah, I haven't really been following that closely - I'm strictly a Mono guy
03:36 sorear I probably oughta
03:36 evilcubed Mono won't be following Metro very closely, there's no desire to create a Metro run-time clone for Linux.
03:37 sorear oh hey, au++ is coding again
03:37 sorear hi au.
03:37 evilcubed And when M$FT doesn't offer to keep Metro and WinRT open, that basically means they aren't going to ECMA it, not gonna standardize it, will patent encumber it up the ass
03:38 evilcubed so you can feel free to ignore Metro, if you are strictly Mono
03:38 au hi sorear.
03:39 sorear I wish there were a better application platform I could use... I don't want to write my own GC and native code generator
03:40 PacoAir joined #perl6
03:40 evilcubed Use whatever you want lah
03:40 sorear the need to work around delegates makes JVMs a lot less useful for me
03:41 evilcubed Just recognize that your working knowledge has a shelf life, so better bill as much as you possibly can while you can.
03:41 evilcubed Eventually the ecosystem is pulled out from under your feet.
03:41 sorear bill?
03:44 dalek Pugs.hs: 4a341a7 | au++ | Pugs/src/Pugs/Lexer.hs:
03:44 dalek Pugs.hs: * implements the proper ident semantic but runs into the many/many parsec error; improvements welcome before mergine
03:44 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/4a341a7302
03:44 dalek Pugs.hs: f54ade7 | au++ | Pugs/src/Pugs/ (2 files):
03:44 dalek Pugs.hs: * Properly implement apostrophe/dash identifier name rule as per S02.
03:44 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/f54ade7c88
03:44 dalek Pugs.hs: 2143b48 | au++ | Pugs/src/Pugs/Lexer.hs:
03:44 dalek Pugs.hs: * Parse "$x--" correctly.
03:44 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/2143b48932
03:44 benabik karma x
03:44 aloha x has karma of 106.
03:45 sorear au: What is the many many parsec error?
03:46 au (x*)*
03:46 au parsec guards against that form
03:46 TimToady early STD had that guard in there, but it dropped out of the cart somewhere alongside the road...
03:47 sorear STD has a "repetition of zero-width atoms" check in CursorBase.pmc, _STAR and friends
03:47 sorear that I don't understand
03:48 TimToady well, the check is easy to understand; it's the propagation of "nullable" that is difficult
03:49 TimToady it also became less important after the LTMer finds the LT
03:49 au yeah. the way parsec checks it is to just make sure cursor position moved between each iteration of (...)*
03:49 au *nod*
03:49 TimToady a la P5
03:50 TimToady but the harder you try to nail down the notion of "made progress", the harder it is to define, unless you have a language with monads :)
03:50 benabik monads++
03:51 TimToady anyway, the LTM took pressure off that to some extent, just as having an OPP in the middle layer took pressure off of having to detect left recursion
03:51 au "best of possible RealWorld#s"
03:51 benabik OPP?
03:51 au aye aye.
03:51 au ↪ lunch, bbl &
03:53 evilcubed left #perl6
03:53 sorear benabik: Operator precedence parser
03:54 sorear aka 'method EXPR'
03:54 benabik Ah.  That thing.
03:54 sorear PEGs have trouble with operator precedence, LR grammars don't
03:55 sorear PEGs have the nice property of always knowing what synactic form they are trying to parse
03:55 TimToady Mahou Shoujo Madoka Magica &
05:15 sorear Who is Jan Ingvoldstat?
05:16 sorear planetsix.perl.org seems to be have an issue with em
05:33 colomon joined #perl6
05:36 kaare_ joined #perl6
06:12 moritz that's frettled iirc
06:12 moritz good morning btw :-)
06:25 sorear good morning moritz.
06:29 thou joined #perl6
06:38 tokuhirom joined #perl6
07:07 SHODAN joined #perl6
07:52 * [Coke] yawns.
07:54 [Coke] au++ # yay-subs-with-dashes.
08:05 [Coke] phenny: tell colomon about feather.perl6.nl/~coke/sin.diff
08:05 phenny [Coke]: I'll pass that on when colomon is around.
08:16 sisar joined #perl6
08:24 sorear o/ sisar
08:28 tadzik good morning #perl6
08:29 sorear good morning tadzik
08:38 havenn joined #perl6
09:02 frettled sorear: good morning, what's the issue?
09:02 frettled moritz: (yup, and good morning)
09:03 sorear frettled: look at the top of planetsix.perl.org
09:03 sorear see it?
09:12 alvis joined #perl6
09:15 mucker joined #perl6
09:28 frettled oh.
09:28 frettled Oh dear.
09:28 frettled Trusty Yahoo! Pipes :(
09:28 sisar sorear: hi :)
09:29 frettled sorear: I can see no way to fix that quickly, except by removing my feed from planetsix
09:29 frettled (the pipe appears to work when I follow the link, though)
09:29 sisar tadzik: i'm getting Segmentation fault (core dumped) on running bootstrap.sh in panda
09:31 * sorear -> sleep
09:31 sisar 'night !
09:39 tadzik sisar: eek. Reproducable?
09:40 sisar yep
09:40 tadzik which Rakudo are you on?
09:40 sisar 'git pull' says 'already up-to-date'
09:40 tadzik okay, I'll take a look at it
09:41 sisar whoa ! 'perl6' also gives a segmentation fault !
09:42 moritz sisar: did you do 'make install'?
09:42 tokuhirom joined #perl6
09:42 sisar i don't remember. let me do 'make install' & recheck...
09:44 sisar moritz: ah that fixed it
09:44 sisar how could've i forgotten that !
09:45 moritz people often forget it. We need better sanity checks for that.
09:45 sisar how to exit from the 'panda>' prompt ?
09:46 tadzik ^D
09:46 sisar 'exit' & 'quit' don't work
09:46 tadzik as in EOF
09:46 sisar tadzik: ah, ok.
09:46 mj41 joined #perl6
09:49 sisar on http://strangelyconsistent.o​rg/blog/june-23-map-and-grep, what does this line mean 'Leaving out the & would...' ?
09:54 moritz writing   square   calls the function
09:54 moritz writing   &square    gives you the function object
10:00 sisar moritz: ah, so work for passing arguments to square one-by-one is done by map
10:03 sisar lower down the article, this line 'my @primes = grep { is_prime($_) }, 2..100; ' what are the braces around is_prime for ?
10:04 sisar (is_prime($_) just returns True or False)
10:07 fglock joined #perl6
10:12 * fglock reads perlmroapi
10:18 MayDaniel joined #perl6
10:19 NamelessTee joined #perl6
10:20 lateau joined #perl6
10:31 lichtkind joined #perl6
10:33 lichtkind cheers
10:33 tadzik hello
10:37 pmurias joined #perl6
10:37 pmurias fglock: hi
10:38 fglock pmurias: hi!
10:38 fglock I'm implementing @ISA
10:39 pmurias will you go through it every time or update the methods when it changes?
10:41 fglock yes, probably - there is an API for adding subs to a package, I'll plug it in there
10:41 fglock I mean, update when it changes
10:41 fglock but just get it to work, first
10:42 pmurias fglock: it turns feeding nam to niecza nowdays isn't as easy as it used to be
10:43 lichtkind tadzik: was great to see you again
10:44 tadzik yeah, same here. Next time I'm coming with some Deutch-fu so I can understand what you guys are talking about :)
10:44 fglock pmurias: alternately, compiling 5-to-6 should work fine
10:44 fglock not sure about speed
10:45 fglock but a low-level backend would be nice as a proof of concept
10:45 fglock that is, for fun
10:50 pmurias targeting low-level seems the right approach for targeting niecza, as it avoids the slow parsing, and jumping throught hoops to emulate minor differences
10:50 fglock hmm - UNIVERSAL is the last class to be looked up, right? after all @ISA
10:50 pmurias yes
10:50 fglock k
10:51 fglock fixing
10:55 lateau left #perl6
10:55 pmurias buying breakfeast&
10:57 lateau joined #perl6
11:05 masak g'day, #perl6
11:05 lichtkind moin
11:06 tadzik hey masak
11:06 masak hey all you wonderfuls.
11:08 masak heh -- any guesses as to when jnthn will show up today? :P
11:09 tadzik I thought you're the one to know :)
11:10 masak we're neighbours on the town level, I don't live with him ;)
11:10 tadzik right :)
11:10 masak well, apart from a few days when I was moving house in November... :)
11:10 fglock good morning masak
11:11 masak good fglock, afternoon.
11:11 buubot_backup joined #perl6
11:14 masak <sorear> define "production"
11:15 masak <evilcubed> makes money
11:15 masak that one's new.
11:15 masak are you sure you're not thinking of "commercial"?
11:16 tadzik if we all had the same definition of "production", life would be easier
11:17 tadzik (at least for us answering questions)
11:18 huf where's the fun in that?
11:23 masak I briefly considered writing a "when is Perl 6 production ready" from the viewpoint of an irate outgrouper who refuses to accept more than 1 bit of information.
11:23 huf is it webscale?
11:23 masak s:2nd/\"/" blog post/
11:23 tadzik I don't think that'd help
11:23 moritz masak: not worth the effort
11:23 huf you have to remember, *that* is the important bit of info :)
11:24 tadzik ridiculing and generalizing won't make people stop asking questions
11:24 tadzik what they want to know may be "should I suggest my boss using Perl 6 for a new project"
11:24 tadzik or such
11:24 moritz masak: as long as we can't simply answer "yes", our answer won't satisfy most people
11:24 tadzik +1
11:25 MayDaniel joined #perl6
11:31 birdwindupbird joined #perl6
11:33 au "ask not if perl 6 is ready for your production environment, ask if your production environment is ready for perl 6"
11:33 sporous joined #perl6
11:34 au (the reasoning being that folks have relatively more control over their production environment than over perl 6 implementations)
11:38 felher How do i iterate over '1, 2 X 3, 4' with a for loop and get '(1,3)', '(1,4)' assigned to $x, and not first 1, then 3, then 1, then 4 ...?
11:41 jnthn nom: for (1, 2 X 3, 4).tree -> $x { say $x }
11:41 p6eval rakudo a8086d: OUTPUT«1 3␤1 4␤2 3␤2 4␤»
11:42 * felher really has to look up 'tree' in the specs.
11:42 felher jnthn: awesome, thnx :)
11:44 * felher -> lunch
11:45 sisar joined #perl6
11:47 whiteknight joined #perl6
11:56 tadzik oh, hello jnthn
11:56 fglock yay! - @ISA works - http://perlcabal.org/~fglock/perlito5.html near 'package Printer;'
11:58 tadzik fglock: cool
12:01 jnthn hi tadzik :)
12:02 tadzik have a moment to talk about roles?
12:02 jnthn Sure
12:02 tadzik Within a role the has declarator always indicates the declaration from the viewpoint of the class. Therefore a private attribute declared using has is private to the class, not to the role
12:02 tadzik so says S14, and it's the only thing that rakudo does not implement right now
12:02 tadzik and the only spectest it's not running
12:02 jnthn Yeah. Hm. :)
12:03 jnthn It basically requires suppressing "undeclared attribute" checks until class composition time.
12:03 tadzik you mentioned something about that file may have been outdated, I hope this feature is not going to go away
12:03 tadzik aye
12:03 jnthn Well, we have a choice
12:03 tadzik so that's after CHECK time, si?
12:04 jnthn Well, it's kinda orthogonal to those. It's when .^compose gets called
12:04 jnthn For declarations that is BEGIN time
12:04 jnthn At the momnent, whenever we see a $!a, we go and ask the metaclass, "oh, do you know $!a?"
12:04 jnthn And if it says no, we complain
12:04 jnthn That's why attributes from roles are na issue
12:04 tadzik right
12:04 jnthn *an
12:05 jnthn Because they aren't added until composition time
12:05 jnthn Anyway, the choice we get is (1) make this work, or (2) decide that the attributes are private to roles like today, and find a way to prevent them conflicting.
12:05 jnthn The way things are today is kinda the worst of both worlds really.
12:06 tadzik I'm wholeheartedly for (1), and so is the spec, for that matter :)
12:06 jnthn *nod*
12:06 tadzik I'm no expert in OOP and roles, but that's kinda the way I'd expect it to work
12:06 jnthn OK, then let's fix it that way :)
12:06 tadzik is there something I can do?
12:07 jnthn tadzik: Well, you've probably the skills to write the patch if I tell you where to look and you're interested in doing so :)
12:08 tadzik sure thing
12:08 jnthn In rule package_def, declare a contextual where you'll store the names to check. A hash may be cheapest as then you can be sure you only check each name once.
12:09 jnthn oh, er :/
12:09 jnthn I've just realized why this is trickier than I first realized.
12:09 jnthn Code-gen depends on knowing if the attribute is natively typed or not.
12:10 JimmyZ_ joined #perl6
12:10 jnthn And we'd not know that for attributes being composed from roles.
12:10 tadzik uh
12:11 jnthn When I say code-gen, I mean building the PAST node for looking up the attribute.
12:11 lichtkind joined #perl6
12:13 jnthn Granted we can keep a list of such things and tweak them later.
12:14 * jnthn will ponder it a bit
12:14 jnthn Anyway, not so simple after all..
12:15 tadzik tormenting implementors, right? :)
12:15 jnthn Aye.
12:17 lasse__ joined #perl6
12:27 felher Oh, i like .tree :)
12:44 felher From 02-bits.pod: "The anonymous enum function takes a list of keys or pairs, and adds values to any keys that are not already part of a key.". Shouldn't that be more like: "The anonymous enum function takes a list of keys or pairs, and adds values to any keys that are not already part of a >>pair<<."?
12:45 jnthn That's seem more reasonable.
12:46 * felher fixes
12:46 jnthn tadzik: Having a fiddle with the attributes thing
12:47 tadzik okay
12:48 dalek specs: d43113a | (Felix Herrmann)++ | S02-bits.pod:
12:48 dalek specs: [S02] fix description of the anonymous enum function
12:48 dalek specs: review: https://github.com/perl6/specs/commit/d43113a90c
12:59 masak tadzik: I know I've had opinions on private attributes in roles. but it's too long ago, and I'm not focused enough to remember what I thought. and it might not be relevant anymore.
12:59 masak but I remember liking the idea of private attributes belonging to the *role* rather than the class. then same-named attributes will never conflict.
13:00 jnthn masak: I'm leaning a bit to that too, but it's not what the spec, or tests, or tadzik's use case expect.
13:00 masak but I feat that's not going to fly, because... there's only one "attribute storage", and that's the instance. unless we do name munging, things are gonna conflict.
13:00 masak fear*
13:00 jnthn masak: Oh, the name issue isn't an issue really
13:00 jnthn Use the role's type object as the key we store the attribute under.
13:00 masak oh!
13:01 jnthn We'd likely hae some fallout.
13:01 jnthn But it's very doable.
13:01 masak then... for the purposes of this discussion, I'm in the camp of doin' it like that.
13:01 masak it's very clean.
13:01 masak people from the future will thank us.
13:01 masak it makes little sense to have attributes from dozens of roles trample on each others' namespaces.
13:02 masak I'll happily change the spec... I assume it's S14?
13:03 jnthn masak: I think it may be worth getting TimToady's input first.
13:03 masak anyway, today my plan is to (a) blog about the macros D1 merge, and (b) rant on p6l about PRE/POST.
13:03 jnthn masak: Also, this doesn't help tadzik's use case.
13:03 masak jnthn: oki.
13:03 masak what's tadzik's use case?
13:03 jnthn tadzik: ping :)
13:03 jnthn iirc though it's about factoring certain things out in to roles
13:03 jnthn In the collection types
13:03 tadzik masak: Set refactoring
13:03 masak nom: say 'tadzik: ', 'ping' xx 50
13:03 p6eval rakudo a8086d: OUTPUT«tadzik: ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping ping␤»
13:04 tadzik :)
13:04 masak tadzik: could you be a bit specific about the use case? I'm curious.
13:04 jnthn What are you putting into the role?
13:05 jnthn And is there any sense in which exposing the shared stuff by using a private method would work?
13:05 tadzik masak: I thought %!elems and almost everything that operates on them cuold be in Settish role, and then classes like KeySet, KeyHash etc only need to implement sub register-arg
13:05 tadzik as a method, of course
13:06 tadzik it should be possible to expos %!elems througha private method, yes
13:06 jnthn Why does %!elems need to be visible in the class?
13:06 jnthn OK
13:06 tadzik I've probably tried that
13:06 jnthn Because we optimize private method calls somewhat also.
13:06 jnthn So it may well work out just fine
13:06 tadzik jnthn: it's when the class needs to overload something else than register-arg
13:06 tadzik like Str, gist, perl
13:06 jnthn OK, but I guess a private method could work?
13:06 tadzik or at_key for that matter
13:06 tadzik could, yes. I'll retry and report
13:06 jnthn method !elems() is rw { %!elems }
13:07 jnthn er, maybe don't call it elems :)
13:07 tadzik yeah ;)
13:07 jnthn It won't conflict with .elems but it will confuse the heck out of anyone
13:07 jnthn I suspect this discussion is going to end with a spec change rather than attributes from roles ending up like the spec says today, though.
13:07 tadzik right
13:07 jnthn So it's probably best not to depend on something that may be about to change.
13:10 Chillance joined #perl6
13:11 masak there's a sense in which private attributes in the role shouldn't disencapsulate out into the composed class.
13:12 masak this discussion is really about whether that concern weighs more heavily than the convenience of accessing private role attributes in the class.
13:13 masak my intuition tells me that the purity is more important than the convenience. which is why it's interesting to hear about and think about tadzik's use case.
13:13 jnthn Having just poked at the disencapsulation approach, it certainly introduces implementation baggage.
13:13 jnthn Well
13:13 jnthn It breaks certain rules we like to follow
13:13 jnthn Like, predeclaration in a given scope
13:14 masak "private attributes in the role shouldn't leak outside of the role block" would be strangely consistent with "private attributes in the class shouldn't leak outside of the class block".
13:14 masak I guess that's the case I'm making.
13:14 jnthn Right
13:15 jnthn Which makes sense in many ways.
13:15 tadzik masak: 'twas just confusing for me that private methods work while attriutes do not
13:16 jnthn I mean, if you find two roles on the internet, and you want to compose both of them into your class, then it limits your reuse if you have to luck out on them having non-overlapping attribute names.
13:16 tadzik if you really don't want anything to conflict and so, maybe it'd be better to use delegation
13:16 tadzik why wouldn't that be a case with private meths?
13:17 jnthn Because you can presumably write a method in your class to resolve the conflict in the way you prefer.
13:17 tadzik okay, right
13:20 * tadzik tries the new approach
13:26 GlitchMr joined #perl6
13:31 felher From an encapsulation point of view: Are there/shouldn't there be role-private methods, which are private to the role, not to the class? So that a role can have methods that violate some invariant of the role when used on their own?
13:32 tadzik there are
13:32 felher tadzik: great :)
13:32 * felher goes reading the specs on roles again :)
13:32 tadzik jnthn: it'd seem like access to role private methods from a consuming class does not work in the setting :/
13:33 jnthn tadzik: er
13:33 jnthn Is it really the setting?
13:33 lasse__ A year ago or so i was told that perl6 could not connect to SAP via perl5 module sapnwrfc. Is that still true? I'm greatful if anyone who knows can give an answer.
13:34 jnthn nom: role R { method !foo() { say 42 } }; class C does R { method bar() { self!R::foo() } }; C.bar
13:34 p6eval rakudo a8086d: OUTPUT«===SORRY!===␤Method 'is_trusted' not found for invocant of class 'Perl6::Metamodel::ParametricRoleGroupHOW'␤»
13:34 tadzik jnthn: https://gist.github.com/2011428 fails with Undefined private method 'storage' called in numerous places
13:34 jnthn nom: role R { method !foo() { say 42 } }; class C does R { method bar() { self!foo() } }; C.bar
13:34 p6eval rakudo a8086d: OUTPUT«42␤»
13:35 lutok joined #perl6
13:36 pmurias lasse__: you could try using niecza+it's perl5 interop
13:36 JimmyZ_ r: class C { trusts GLOBAL; }
13:36 p6eval rakudo a8086d:  ( no output )
13:36 pmurias lasse__: what os do you use?
13:36 lasse__ Preferably Linux but I can use Windows if I have to
13:37 pmurias Linux is preferable for that
13:40 pmurias lasse__: you are using rakudo right now?
13:40 moritz joined #perl6
13:41 jrockway joined #perl6
13:41 cj joined #perl6
13:43 MayDaniel joined #perl6
13:43 lasse__ Yes If have installed it and read a bit, but I need to do some new SAP comms stuff (which i have done PHP so far) but I like to learn perl6 so if it is possible i like to give rakudo a spin
13:46 JimmyZ_ nom: role R { has $!foo =42; method foo() { $!foo; } }; class C does R { method bar() { say self.foo } }; C.bar
13:46 p6eval rakudo a8086d: OUTPUT«Cannot look up attributes in a type object␤  in method foo at /tmp/d5QijfdPCI:1␤  in method bar at /tmp/d5QijfdPCI:1␤  in block <anon> at /tmp/d5QijfdPCI:1␤␤»
13:47 jnthn JimmyZ_: You need an instance if you're going to look up attributes
13:47 jnthn (C.new.bar)
13:47 JimmyZ_ oops...
13:49 JimmyZ_ nom: role R { has $!foo =42; }; class C does R { method bar() { say $!foo } }; C.new.bar
13:49 pmurias lasse__: to use sapnwrfc you will have to use niecza (which is a different perl implementation)
13:49 p6eval rakudo a8086d: OUTPUT«===SORRY!===␤Attribute $!foo not declared in class C␤at /tmp/qiNr_mxWta:1␤»
13:49 JimmyZ_ nom: role R { has $!foo =42; }; class C does R { method bar() { say $!foo } }; C.new.bar
13:49 p6eval rakudo a8086d: OUTPUT«===SORRY!===␤Attribute $!foo not declared in class C␤at /tmp/Q4v4bB9jcE:1␤»
13:49 JimmyZ_ nom: role R { has $!foo =42; }; class C does R { has $!foo= 42; method bar() { say $!foo } }; C.new.bar
13:49 p6eval rakudo a8086d: OUTPUT«===SORRY!===␤Attribute '$!foo' already exists in the class 'C', but a role also wishes to compose it␤»
13:49 JimmyZ_ bug?
13:49 JimmyZ_ may not
13:50 lasse__ niecza is that windows only?
13:50 pmurias no
13:50 pmurias it runs on mono
13:51 JimmyZ_ pugs: role R { has $!foo =42; }; class C does R { has $!foo= 42; method bar() { say $!foo } }; C.new.bar
13:51 p6eval pugs b927740: OUTPUT«42␤»
13:52 lasse__ pmurias: Thanks a lot I will try install niecza and give it a spin
13:53 pmurias beware that p5 interop in niecza is very experimental, so you'll have to hack around things
13:53 masak lasse__: welcome. it's nice to hear someone trying out SAP with Perl 6.
13:54 masak lasse__: I agree with pmurias -- you should try out Niecza on Linux.
13:54 lasse__ pmurias: I like problems so thats cool
13:55 felher nom: role R { my method !foo() { say 42 } }; class C does R { method bar() { self!foo() } }; C.bar
13:55 p6eval rakudo a8086d: OUTPUT«42␤»
13:56 felher Hm.. i expected this to die with "method !foo not found..." or something. I thought "my method !foo" isn't shared so C can not call it. Am i wrong about that?
13:56 jnthn The "my" here means nothing more than "install the method in the lexpad also"
13:56 tadzik !foo is private to a class, not to a role
13:57 masak nom: role R1 { method !foo { say "R1" } }; role R2 { method !foo { say "R2" } }; class C does R1 does R2 {}; say "alive?!"
13:57 p6eval rakudo a8086d: OUTPUT«alive?!␤»
13:57 masak nom: role R1 { method !foo { say "R1" } }; role R2 { method !foo { say "R2" } }; class C does R1 does R2 { method bar { self!foo() } }; say C.new.bar
13:57 p6eval rakudo a8086d: OUTPUT«Private method 'foo' not found on type C␤  in method dispatch:<!> at src/gen/CORE.setting:777␤  in method bar at /tmp/diNxcNUBGu:1␤  in block <anon> at /tmp/diNxcNUBGu:1␤␤»
13:58 masak huh!
13:58 masak nom: role R1 { method !foo { say "R1" } }; class C does R1 { method bar { self!foo() } }; say C.new.bar
13:58 p6eval rakudo a8086d: OUTPUT«R1␤True␤»
13:58 felher So i miunderstood: S14-roles-and-parametric-types.pod:126?
13:58 jnthn masak: Yeah, I've found the issue
13:58 jnthn masak: RoleToRoleApplier doesn't copy private methods
13:58 masak so... if private methods in a role collide... none of them gets installed?
13:59 masak oh.
13:59 masak then why did felher's oneliner work?
14:00 jnthn masak: Because RoleToRoleApplier never gets used there
14:00 jnthn masak: Because only one role is being applied
14:00 masak aaaaaaah.
14:01 jnthn So we don't need to compute the summation.
14:01 masak fwiw, I'm open to ParametricRoleHOW being renamed to RoleHOW. it would make one of jnthn++'s Metaprogramming slides look nicer ;)
14:01 masak and it is, in some sense, the "default" role HOW.
14:02 masak this message delivered from the guy who brought you... World. ;)
14:02 dalek rakudo/priv-role-attrs: fa7ffb2 | jnthn++ | src/Perl6/Actions.pm:
14:02 dalek rakudo/priv-role-attrs: Start declaring role attributes under the package they're declared in rather than the class they end up composed in to.
14:02 dalek rakudo/priv-role-attrs: review: https://github.com/rakudo/rakudo/commit/fa7ffb2cc5
14:02 dalek rakudo/priv-role-attrs: 6408afa | jnthn++ | src/Perl6/Metamodel/RoleTo (2 files):
14:02 dalek rakudo/priv-role-attrs: Start to liberalize role composers so that they allow attributes with the same name but from different roles.
14:02 dalek rakudo/priv-role-attrs: review: https://github.com/rakudo/rakudo/commit/6408afa8ca
14:02 dalek rakudo/priv-role-attrs: ab5f444 | jnthn++ | src/ (3 files):
14:02 dalek rakudo/priv-role-attrs: Allow multiple attributes of the same name to be added provided they are attached to different packages (e.g. different roles).
14:02 dalek rakudo/priv-role-attrs: review: https://github.com/rakudo/rakudo/commit/ab5f444049
14:02 dalek rakudo/priv-role-attrs: d1e0b2b | jnthn++ | src/Perl6/Metamodel/BUILDPLAN.pm:
14:02 dalek rakudo/priv-role-attrs: First crack at updating BUILDPLAN handling for new approach to role attributes.
14:02 dalek rakudo/priv-role-attrs: review: https://github.com/rakudo/rakudo/commit/d1e0b2b023
14:03 jnthn That lot starts sketching out how masak++'s idea for role attributes could work out
14:03 jnthn Though it doesn't actually work yet :)
14:05 masak nevertheless, \o/
14:07 felher I like the specs opinion on roles an private attributes. If one wants a real role-private attribute, the spec says: "you may wish to declare an attribute that is hidden even from the class; a completely private role attribute (that will exist per instance of the class) may be declared like this: my $!spleen;"
14:08 felher I like to have more ways, even if one may be bad in most situations.
14:09 felher I have to admit that compared to most of you folks i am a real noob. But isn't it more perlish to allow it and say "best don't use it if you don't have too", than to remove the possibility of doing so?
14:10 masak I hear ya.
14:10 masak my only question is: why would you want the default to be bad, and recommend the good alternative as a social convention?
14:11 felher Ah, so you don't want to remove the old way. Its more like swapping default/non-default?
14:11 masak right.
14:12 felher Oh, then i'm totally in for that :)
14:12 masak I'm sure there'll be a way for people to explicitly flaunt role encapsulation. :)
14:12 masak I don't care much exactly how it'll be done.
14:12 masak except to the degree it helps tadzik write actual CORE code.
14:12 felher kk.
14:12 pmurias masak: you want the "private to the role" to be the default?
14:13 masak I do.
14:13 felher Ok, so i just misunderstood the discussion. Sorry for the nosie :)
14:13 masak not at all -- it was a worthwhile point to make.
14:14 felher Well, even better than :)
14:15 masak also, we're all OO noobs, at least to a first approximation.
14:15 masak OOP is not too hard to grok, but OOD takes a lifetime.
14:19 jnthn masak: Did you file rakudobug on that priv meth from multiple roles issue?
14:19 * masak laughs again at au++'s "me" solution to moritz++'s Prisoners' Dilemma challenge
14:19 masak jnthn: no. doin' it now.
14:20 * masak submits rakudobug
14:22 jnthn masak: OK. Testing a patch locally for it.
14:22 jnthn Hopefully this unblocks tadzik++ too :)
14:24 masak jnthn: https://rt.perl.org/rt3/Tic​ket/Display.html?id=111664
14:25 jnthn tsm
14:25 jnthn <chuckle>
14:27 moritz "tadzik seems mad"? :-)
14:28 jnthn :D
14:31 moritz nom: sub a(\$arg) { say $arg.elems }; a(a => 2, 3)
14:31 p6eval rakudo a8086d: OUTPUT«Unexpected named parameter 'a' passed␤  in sub a at /tmp/b0l742_Tw0:1␤  in block <anon> at /tmp/b0l742_Tw0:1␤␤»
14:31 moritz nom: sub a(|$arg) { say $arg.elems }; a(a => 2, 3)
14:31 p6eval rakudo a8086d: OUTPUT«1␤»
14:32 masak late to the game: "tracker sans mystique"
14:32 dalek rakudo/nom: 149cb58 | jnthn++ | src/Perl6/Metamodel/RoleToRoleApplier.pm:
14:32 dalek rakudo/nom: Fix a typo.
14:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/149cb58baf
14:32 dalek rakudo/nom: 54e0769 | jnthn++ | src/Perl6/Metamodel/ (3 files):
14:32 dalek rakudo/nom: Implement private method composition when the private methods come from multiple roles.
14:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/54e07690e1
14:33 masak though maybe it should be "traqueur", given the other two words...
14:33 jnthn tadzik: Tried some 'mprovements ^^
14:34 isBEKaml joined #perl6
14:36 moritz n: my Str enum A <b c>; say b
14:36 p6eval niecza v15-4-g1f35f89: OUTPUT«b␤»
14:36 moritz n: my Str enum A <foo bar>; say b
14:36 p6eval niecza v15-4-g1f35f89: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'b' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1362 (die @ 3) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 33) â�¤  at /home/p6…
14:36 moritz n: my Str enum A <foo bar>; say foo
14:36 p6eval niecza v15-4-g1f35f89: OUTPUT«foo␤»
14:38 tadzik :P
14:39 tadzik I'll see if that helped
14:39 masak anyone remember https://gist.github.com/1061562 ?
14:39 masak I just re-ran things on nom.
14:39 tadzik I think so
14:39 tadzik istr it
14:39 masak now getting 1.665s real time with the same script.
14:40 masak if I natively type the sub params, I get about 1.236s real time.
14:40 tadzik now where is this image I always use in those occasions...
14:40 masak that's a 50% improvement.
14:40 tadzik here: http://29.media.tumblr.com/tumb​lr_lltzgnHi5F1qzib3wo1_400.jpg
14:40 masak :P
14:41 masak boy, I hope sometime soon quoting Shakespeare comes back into fashion.
14:44 tadzik :D
14:44 jnthn Nice :)
14:45 Jerkwad joined #perl6
14:46 jnthn afk for a bit
14:50 lateau_ joined #perl6
14:50 lateau_ left #perl6
14:53 felher perl6: say @$*IN;
14:53 p6eval rakudo a8086d: OUTPUT«IO<-5400900929721989300>␤»
14:53 p6eval ..niecza v15-4-g1f35f89: OUTPUT«TextReader.new(...)␤»
14:53 p6eval ..pugs b927740: OUTPUT«␤»
14:54 felher Spec says: instead of 'while (<HANDLE>) {...}' you  now write 'for @$handle {....}'
14:54 masak O RLY?
14:54 felher Might that be a fossil?
14:54 masak yes.
14:54 masak where is it?
14:55 felher S02, Files
14:55 felher Nearly at the bottom.
14:56 isBEKaml felher: did you perhaps mistake @$*IN for @*INC?
14:56 isBEKaml I only $*IN in there.
14:57 masak it's S02:4796.
14:57 tadzik hmm, roles don't seem to like having submethod BUILD
14:57 masak it might actually be correct.
14:57 tadzik and .new which the class re-uses
14:57 PacoAir joined #perl6
14:57 masak it coincides in time with the killing off of prefix:<=> in 2009.
14:58 masak tadzik: having a submethod BUILD in a role feels odd, given that the thing that submethods do is mostly twiddle with (private) attributes of the class.
14:58 tadzik nom: https://gist.github.com/2011660
14:58 p6eval rakudo a8086d: OUTPUT«Can not get non-existent attribute '$!a' on class 'MyRole'␤  in submethod BUILD at /tmp/_mMN5ilSiQ:8␤  in method BUILDALL at src/gen/CORE.setting:582␤  in method bless at src/gen/CORE.setting:567␤  in method new at /tmp/_mMN5ilSiQ:5␤  in block <anon> at /tmp/_mMN5i…
14:59 isBEKaml masak: that ack script takes 18s on my poor machine. :D
14:59 masak isBEKaml: is that the version with or without multis?
14:59 isBEKaml masak: ofcourse, after commenting out the tracking variable. And oh, niecza!
14:59 tadzik masak: well, I want to twiddle with those private attributes of a role :) (see gist)
15:01 masak tadzik: hm.
15:01 tadzik I guess it's the issue of BUILD being called for the class, which doesn't then have the %!elems anywhere
15:01 tadzik so that's the same underlying issue as before, maybe
15:01 masak tadzik: if your use case is "valid" (i.e. if we're not missing something obvious here), that indicates that roles should have their own BUILD, separate from classes. I'm not sure I believe that's feasible, or even a good idea.
15:02 masak but in terms of scoping, it makes a lot of sense. as long as the class can have a BUILD and the roles can too. the $!a is visible within the role, so it should be possible to refer to it.
15:04 isBEKaml tadzik: you're wrapping private methods into a role and making them available through classes via a facade? :)
15:04 tadzik isBEKaml: facade?
15:04 tadzik phenny: en pl "facade"?
15:04 phenny tadzik: "fasada" (en to pl, translate.google.com)
15:04 tadzik phenny: that doesn't make any sense :)
15:05 isBEKaml tadzik: hm, how do I say? (helper or wrapper function)
15:05 tadzik isBEKaml: they're not really "available through classes", I just don't want them to leak out for public use
15:05 tadzik I need a way to communicate between role and class that won't leak out as a public method of the eventual object
15:05 isBEKaml tadzik: exactly as I thought. :)
15:06 tadzik okay :)
15:06 isBEKaml phenny: pl en "fasada"?
15:06 phenny isBEKaml: "facade" (pl to en, translate.google.com)
15:06 isBEKaml does it make any sense? :D
15:08 isBEKaml funny, that's how I pronounce that word.
15:09 masak tadzik: "facade" is just an OO pattern-lingo word for "interface which presents you with a nices API than the thing it wraps".
15:10 tadzik I see
15:10 masak there are a number of related patterns in that area, with slightly overlapping meanings: "adapter", "wrapper", "facade".
15:10 isBEKaml masak: hey, I wasn't thinking of "Facade" pattern! :)
15:10 masak oh! I assumed you were.
15:10 isBEKaml Just what came to mind. (helper, thin layer) :)
15:11 masak you even used "wrapping" in the same sentence :P
15:11 isBEKaml I also said, "helper" :D
15:12 isBEKaml Personally, I find that design patterns tend to obscure the most straightforward approach. You end up thinking in terms of these patterns instead of the simplest approach.
15:14 isBEKaml Sure, it helps if you know about these things but I'd prefer people choose the best approach instead of blindly applying these patterns, all because they exist. </offtopic>
15:16 masak I disagree. OO patterns aren't meant to be followed slavishly, they're meant to provide a starting point for building a solution that both (a) encodes important lessons from experience and (b) fits the current terrain.
15:16 masak to satisfy (a), you follow the pattern. to satisfy (b), you adapt it judiciously for your particular problem.
15:17 isBEKaml (b) is what is missing most of the time. Judicious application (if only that were true in most of the projects I had worked on... )
15:19 xinming joined #perl6
15:19 isBEKaml masak: I think we are mostly in agreement in that we should *not* blindly apply these patterns. If you miss the big picture, you're working with half baked ideas (dangerously).
15:21 masak yeah, the danger of patterns is that they are applied blindly.
15:23 masak as with all other kinds of advice, they apply within a context. sometimes the context is different, and the advice doesn't apply.
15:24 isBEKaml A good doctor once told me (he was into Natural medicine): Treat the terrain, not the symptoms. :)
15:24 masak aye.
15:25 masak this bliki article is a nice example of that: http://martinfowler.com/articles/lmax.html
15:25 masak note: they started out trying all the conventional concurrency solutions. they didn't work for their application.
15:26 masak so they had to sit down and actually address the problem. going outside of the normal patterns, and ending up with a much more event-driven solution, as it were.
15:30 TimToady .oO(Patterns: pre-approved XY problems)
15:33 masak maybe some of them.
15:33 masak just like some patterns are really missing language features.
15:35 masak who wants to do the March release of Rakudo? it'll be an awesome release, and it's easy and fun to be a release manager.
15:36 arnsholt Patterns came up on #lisp at some point I was looking and someone said "patterns are for defective languages". I decided not to comment =)
15:37 isBEKaml March! March on for Rakudo! :)
15:37 isBEKaml bs goes in March, right?
15:38 masak right.
15:38 masak it's already merged.
15:38 masak and macros too.
15:38 masak and all the phasers.
15:38 isBEKaml \o/
15:38 isBEKaml Now, I just have to see if it builds on my machine. What's the memory usage like?
15:38 masak lower; still not great.
15:39 masak I mean, it's "great" in the literal sense... which isn't so great.
15:40 isBEKaml if it's still more than 1gig, it's hard. :|
15:41 masak I think it's slightly more.
15:45 Psyche^ joined #perl6
15:57 isBEKaml masak: great article. What fascinates me is, they haven't really used any new techniques. Rather, it's a different application of existing techniques to tackle known problems.
15:59 isBEKaml masak: They took a lot of care to make sure that their application runs smoothly, Event Sourcing and cache friendly collections using primitive types. All of them managed on a single core without concurrency. I really should explore CQRS and async event communication models. :)
16:01 isBEKaml hmm, s/core/thread/
16:06 masak aye.
16:06 masak there's a lot of neat stuff in there.
16:07 JimmyHoff joined #perl6
16:08 JimmyHoff left #perl6
16:08 * jnthn back
16:15 * masak left shoulder
16:17 isBEKaml gotta love this channel. You can discuss anything and you won't be too offtopic! (ducks)
16:17 isBEKaml (#perl6)++
16:18 masak isBEKaml: yes, you can even discuss ducks. :P
16:19 * isBEKaml right clavicle
16:19 isBEKaml :P
16:21 masak blog post! \o/ http://strangelyconsistent.org/blo​g/macros-progress-report-d1-merged
16:21 jnthn \o/
16:22 masak I'll take a walk before it turns dark, and then I'll write the rant to p6l.
16:23 jnthn [Cool use for a macro: meta for])https://gist.github.com/1809356)
16:23 jnthn fail
16:23 isBEKaml You can psee the slides here](http://masak.org/carl/gpw-2012-macros/talk.pdf).
16:23 isBEKaml markdown fail?
16:23 masak jnthn: oops, thanks, fixing.
16:23 masak isBEKaml: oh, another one! fail :)
16:23 masak fixing. jnthn++ isBEKaml++
16:23 isBEKaml masak: and spllelling
16:24 masak well, the 'p' was s'posed to be a '[' :)
16:24 jnthn Don't pee the slides!
16:26 isBEKaml masak++
16:26 Ulti 8/win 2
16:26 Ulti erk sorry
16:27 masak Util: I always go Alt-2, it's much faster.
16:28 isBEKaml hugme: hug masak (mistab)
16:28 * hugme hugs masak
16:29 MayDaniel joined #perl6
16:30 Ulti masak you would end up with line noise from me considering how often I switch between different keyboard layouts :)
16:31 masak heh.
16:31 masak oh, Ulti, oh Util!
16:31 Ulti haha yeah
16:31 * Ulti is claiming fame
16:31 masak I apologise to both of you for millions of mistabs I will make in the future!
16:32 Ulti its fine I'm under the assumption no one is going to want my attention on here ;)
16:32 Ulti unless someone is thinking of porting all of BioPerl to perl6
16:33 masak pyrimidine: ping :)
16:33 Ulti I have an outrageous question for everyone.. what's with all the perl6 hostility from some perl people?
16:34 Ulti I dont understand it, as far as I can see perl6 is set to be a great language with several sensible implementations
16:35 masak I don't actually think there's that much hating at this point.
16:35 masak I talk to lots of sensible Perl 5 people and I mostly hear support.
16:35 Ulti good
16:36 masak there's still a bit of a grumbling because of the name.
16:36 masak people fall straight into version think when they hear "Perl 5", "Perl 6".
16:36 Ulti its more I've been googling and keep finding blogs with people moaning about lack of magical perl6 setup.exe distributions... what do you expect from something thats still fluid and under huge dev effort?
16:36 Ulti yeah I guess that is a problem
16:37 masak it's good that people are pointing out what they want from Perl 6.
16:37 Ulti but as soon as I heard about perl6 I also heard "its a new language"
16:37 masak we try our best to deliver and to make the product more useful.
16:37 masak it's not a new language anymore. it's 11 years and a half :)
16:37 Ulti masak sure but there is a new version thats usable every month, packaging is non trivial especially cross platform.. you can expect core devs to do everything
16:37 Ulti *cant
16:37 masak but it's taking its time to mature, partly because we think it would be a mistake to let it mature too quickly.
16:38 TimToady .oO(almost a teenager...)
16:38 Ulti I've been looking into making a macport file
16:38 Ulti masak is that the language definition or a useful implementation age?
16:38 Ulti also where has the last decade gone! :3
16:41 masak the Perl 6 effort was announced on 2000-07-19. http://strangelyconsistent.org/bl​og/happy-10th-anniversary-perl-6
16:41 icwiener joined #perl6
16:41 masak as to "where has the last decade gone", it seems to be a common question, or common point of ridicule.
16:41 masak I'd just like to counter that after *half* that decade, I could already write real Perl 6 code on top of Pugs.
16:42 masak and that it does take some time to re-invent parsing from scratch a la STD.pm6 -- I'm not sure I'd be able to do it in under a decade, if at all.
16:42 Ulti masak: I meant more life in general ;)
16:44 Ulti I'm happy to wait rather than see all the interesting but hard to implement features drop out
16:44 abercrombie joined #perl6
16:45 isBEKaml "We need a solution that makes us need less vodka." :D
16:46 kaare_ joined #perl6
16:47 Limbic_Region joined #perl6
16:48 isBEKaml jnthn++ for that comment and masak++ too (publishing it in a talk!)
16:48 Ulti what was the problem?
16:49 isBEKaml macros
16:49 masak specifically, a problem that showed up in macros, that also showed up with roles.
16:50 Ulti if it helps I can probably post some more vodka
16:52 icwiener joined #perl6
17:00 thou joined #perl6
17:23 * TimToady feels lucky to have tricked so many brilliant people into working on Perl 6...  :)
17:34 rsimoes joined #perl6
17:49 gfldex perl6: sub postfix:<a>() is looser(&infix:<,>) {}
17:49 p6eval niecza v15-4-g1f35f89: OUTPUT«Potential difficulties:â�¤  &postfix:<a> is declared but not used at /tmp/N_yrtVBwZS line 1:â�¤------> [32msub postfix:<a>[33mâ��[31m() is looser(&infix:<,>) {}[0mâ�¤â�¤Â»
17:49 p6eval ..rakudo 54e076: OUTPUT«===SORRY!===␤Cannot call 'trait_mod:<is>'; none of these signatures match:␤:(Attribute:D $attr, Any :rw(:$rw)!)␤:(Attribute:D $attr, Any :readonly(:$readonly)!)␤:(Attribute:D $attr, Any :box_target(:$box_target)!)␤:(Routine:D $r, Any :rw(:$rw)!)␤:(Routine:D $r, Any…
17:49 p6eval ..pugs b927740:  ( no output )
17:50 gfldex std: sub postfix:<a>() is looser(&infix:<,>) {}
17:50 p6eval std 1ad3292: OUTPUT«ok 00:01 117m␤»
17:50 gfldex niecza++ :)
17:51 gfldex how does my Date $birthday = 1978,03,01a; # look to you?
17:53 masak I'd... intuitively expect a postfix to bind much more tightly than list infix.
17:53 masak (because there can be no whitespace before the postfix)
17:54 gfldex perl6: sub postfix:<a>([Int $y, Int $m, Int $d]) is looser(&infix:<,>) { say "$y-$m-$d" }; 1978,03,01a;
17:54 p6eval pugs b927740: OUTPUT«*** ␤    Unexpected "["␤    expecting formal parameter or ")"␤    at /tmp/eKYdPpd1UC line 1, column 17␤»
17:54 p6eval ..rakudo 54e076: OUTPUT«===SORRY!===␤Cannot call 'trait_mod:<is>'; none of these signatures match:␤:(Attribute:D $attr, Any :rw(:$rw)!)␤:(Attribute:D $attr, Any :readonly(:$readonly)!)␤:(Attribute:D $attr, Any :box_target(:$box_target)!)␤:(Routine:D $r, Any :rw(:$rw)!)␤:(Routine:D $r, Any…
17:54 p6eval ..niecza v15-4-g1f35f89: OUTPUT«Potential difficulties:â�¤  Leading 0 does not indicate octal in Perl 6; please use 0o3 if you mean that at /tmp/2vBUB4Fkk_ line 1:â�¤------> [32m(&infix:<,>) { say "$y-$m-$d" }; 1978,03[33mâ��[31m,01a;[0mâ�¤  Leading 0 does not indicate octal in Perl 6; please…
17:55 mj41 joined #perl6
17:57 gfldex well, on 2nd tought it seams like neat overkill :)
17:58 gfldex my Date $leapdays = .new(2,29); # not that much longer actually
17:59 [Coke] no change on spec test run from yesterday.
18:00 felher masak++ #blog post, macro hacking
18:01 felher TimToady++ #for tricking many people
18:24 masak well, most of us working to make Perl 6 more of a reality are idealists. which is why, I guess, we like to point out that we have a really down-to-earth, practical streak.
18:24 moritz r: sub enum(*@args) { say @args.perl }; enum('a', 'b')
18:24 p6eval rakudo 54e076: OUTPUT«Array.new("a", "b")␤»
18:25 moritz why doesn't that work locally?
18:25 moritz r: sub enum(*@args) { say @args.perl }; &enum('a', 'b')
18:25 p6eval rakudo 54e076: OUTPUT«Array.new("a", "b")␤»
18:25 masak 'cus you're in a branch, like JimmyZ was the other day? :)
18:25 moritz oh
18:25 moritz because I'm in the sink2 branch
18:25 moritz masak++
18:25 masak hah!
18:25 moritz I just realized at the same time as you did
18:25 * masak is psychic
18:39 moritz nom: my %a; my $x = -1; $x = %a<foo> = $x.succ; say $x
18:39 p6eval rakudo 54e076: OUTPUT«0␤»
18:39 moritz again something that doesn'T work locally
18:39 moritz and now I'm on nom :/
18:40 moritz nom: my %a; $_= 'b';  my $x = -1; $x = %a{$_} = $x.succ; say $x
18:40 p6eval rakudo 54e076: OUTPUT«0␤»
18:44 icwiener joined #perl6
18:44 [Coke] ah, here we go. "port install hs-cabal" is now installing an OLD version of gcc via macports.
18:49 arnsholt I've gone on to not like macports very much
18:49 arnsholt Better than fink, certainly, but lots of weirdness going on
18:53 tadzik 'evening
18:56 masak tadzik! \o/
18:56 tadzik \o/
18:59 MayDaniel joined #perl6
19:03 birdwindupbird joined #perl6
19:09 whiteknight joined #perl6
19:18 icwiener_ joined #perl6
19:20 proller_ joined #perl6
19:20 proller joined #perl6
19:23 icwiener_ joined #perl6
19:23 sporous joined #perl6
19:24 sorear good * #perl6
19:24 tadzik hello sorear
19:25 sorear masak: My understanding of "where has last decade gone" is that it mostly involved TimToady++ wrestling with his own bugs
19:27 felher o/ sorear
19:28 [Coke] sorear: like Tom Selleck in _Runaway_ ?
19:29 sorear I don't know that reference and my brain augmentation system is not working very well atm
19:31 sorear masak++ # blogging
19:32 mucker masak++
19:33 moritz masak++ indeed
19:33 * mucker git clone rakudo
19:37 sorear hello mucker.  Are you new here?
19:37 dalek rakudo/nom: 08417f8 | moritz++ | / (3 files):
19:37 dalek rakudo/nom: implement anon enums
19:37 dalek rakudo/nom:
19:37 dalek rakudo/nom: Not sure if we want to keep this factoring, it just reuses the
19:37 dalek rakudo/nom: old infrastructure for now. Passes the anon enum tests.
19:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/08417f8906
19:37 dalek rakudo/nom: bd6fdeb | moritz++ | docs/ChangeLog:
19:37 dalek rakudo/nom: add anon enums to ChangeLog
19:37 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bd6fdebff5
19:38 [Coke] still haven't managed to build niecza on osx yet.
19:38 [Coke] (sloooow)
19:39 mucker sorear: just a another lurker :)
19:41 sorear welcome
19:41 moritz wow, either I completely missed the point of anon enums, or they are much easier than I thought they would be
19:46 tokuhirom3 joined #perl6
19:46 localhost joined #perl6
19:49 tyatpi joined #perl6
19:50 tyatpi perl6: hel
19:50 p6eval niecza v15-4-g1f35f89: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'hel' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1362 (die @ 3) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 33) â�¤  at /home/…
19:50 p6eval ..pugs b927740: OUTPUT«*** No such subroutine: "&hel"␤    at /tmp/mYuOzNkPz3 line 1, column 1 - line 2, column 1␤»
19:50 p6eval ..rakudo 54e076: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&hel' called (line 1)␤»
19:50 tyatpi perl6: help
19:50 p6eval niecza v15-4-g1f35f89: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'help' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1362 (die @ 3) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 33) â�¤  at /home…
19:50 p6eval ..rakudo 54e076: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&help' called (line 1)␤»
19:50 p6eval ..pugs b927740: OUTPUT«*** No such subroutine: "&help"␤    at /tmp/e27lQULjVw line 1, column 1 - line 2, column 1␤»
19:51 moritz perl6: say 'I can only handle Perl 6 code'
19:51 p6eval pugs b927740, rakudo 54e076, niecza v15-4-g1f35f89: OUTPUT«I can only handle Perl 6 code␤»
19:54 tyatpi ha ha
19:54 sorear maybe we need sub CORE::help { say 'http://perlcabal.org/syn' }
19:54 tyatpi new feature to add !
19:54 raiph joined #perl6
19:55 tyatpi sorear: Maybe just a mention of that URL in the MOTD?
19:55 sorear tyatpi: we don't control the motd
19:58 moritz sorear: I think tyatpi means the topic in here
19:58 moritz but the better URL is really http://perl6.org/ which we already link to
20:00 Chillance joined #perl6
20:08 dalek roast: 6bc3067 | coke++ | S06-multi/syntax.t:
20:08 dalek roast: pugs fudge
20:08 dalek roast: review: https://github.com/perl6/roast/commit/6bc30675c6
20:10 dalek Pugs.hs: 3201cc1 | coke++ | t/spectest.data:
20:10 dalek Pugs.hs: run fudged test
20:10 dalek Pugs.hs: review: https://github.com/perl6/Pugs.hs/commit/3201cc10d3
20:21 dalek roast: a1e589c | coke++ | S06-operator-overloading/sub.t:
20:21 dalek roast: *eyeroll*
20:21 dalek roast: review: https://github.com/perl6/roast/commit/a1e589c8e0
20:22 bacek joined #perl6
20:22 lichtkind subrule prefixes are done
20:22 moritz [Coke]++
20:22 lichtkind do they deserve index entries?
20:23 lichtkind can subrule prefixes be combined?
20:26 moritz what do you mean by that?
20:28 sorear What's a subrule prefix?
20:31 lichtkind http://www.perlfoundation.org/perl6/in​dex.cgi?perl_6_lookup_tablet#subrules
20:32 lichtkind its eg the . which makes <.ws> none capturing
20:33 moritz then the answer is "no"
20:33 moritz though note that the * isn't such a prefix
20:34 moritz because the parser doesn't expect a rule name after <*
20:34 colomon joined #perl6
20:36 moritz I also don't see which two would make sense to combine
20:38 gfldex would sub foo( --> Bar|Any ) {...}# be valid Perl6 code?
20:39 moritz std: sub foo( --> Bar|Any ) {...}
20:39 p6eval std 1ad3292: OUTPUT«[31m===[0mSORRY![31m===[0m�Typename Bar must be predeclared at /tmp/wMyXUv4o1n line 1:�------> [32msub foo( --> Bar[33m�[31m|Any ) {...}[0m�Parse failed�FAILED 00:01 109m�»
20:40 moritz std: class Bar { }; sub foo( --> Bar|Any ) {...}
20:40 p6eval std 1ad3292: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse signature at /tmp/9rQVA7HTWy line 1:�------> [32mclass Bar { }; sub foo[33m�[31m( --> Bar|Any ) {...}[0m�Couldn't find final ')'; gave up at /tmp/9rQVA7HTWy line 1:�------> [32mclass Bar { }; sub foo( --> Bar[33m�…
20:40 moritz short answer: no
20:40 gfldex could it become valid Perl6 code? :->
20:41 moritz if you changed it to be valid Perl 6 code, yes
20:42 lichtkind moritz: ok thanks i change that
20:44 lichtkind done
20:50 havenn joined #perl6
20:57 icwiener_ joined #perl6
20:57 icwiener_ joined #perl6
21:12 icwiener_ joined #perl6
21:13 pmurias fglock: does perlito5 run any test from the orginal perl5?
21:25 TimToady std: class Foo {}; class Bar {}; sub foo ( --> Any where Foo|Bar ) {...}
21:25 p6eval std 1ad3292: OUTPUT«[31m===[0mSORRY![31m===[0m�Unable to parse signature at /tmp/rmxdRZOv6c line 1:�------> [32mclass Foo {}; class Bar {}; sub foo [33m�[31m( --> Any where Foo|Bar ) {...}[0m�Couldn't find final ')'; gave up at /tmp/rmxdRZOv6c line 1:�------> [32mFoo {}; class …
21:36 sorear o/ pmurias, fglock
21:38 pmurias sorear: hi
22:10 pmurias fglock: ping
22:13 am0c joined #perl6
22:13 pmurias fglock: I made perlito5.js pass all tests on node.js
22:14 pmurias fglock: hopefully i didn't break anything on d8, but I didn't test
22:29 masak sorear: I don't think "TimToady++ wrestling with his own bugs" quite covers it ;)
22:30 masak I see the past five years more as an effort to shrapen the spec against implementations, plugging as many eyes, hands, and brains into the process as we can find.
22:31 masak hi mucker-lurker. :)
22:35 * jnthn is home :)
22:36 jnthn moritz: On anon enums, I think now we have bs we should use the anon enum builder to build the key/value pairs that we install for named enums.
22:36 havenn joined #perl6
22:36 jnthn Rather than having two code paths.
22:36 jnthn So, having done anon enums is doubly good. moritz++
22:37 benabik joined #perl6
22:40 masak I'm guessing there will be more refactorings like that.
22:40 masak the "rather than having two code paths" kind, I mean.
22:45 icwiener_ joined #perl6
22:46 jnthn yes, it's generally a good direction to move in.
23:09 sorear bs was merged?
23:12 tokuhirom3 joined #perl6
23:12 masak about a week ago.
23:13 masak about at the time when Rakudo took a leap and put Niecza at 96%.
23:13 sorear rub it in, rub it in... :D
23:14 pmurias what's the current rakudo niecza ratio?
23:15 masak sorear: no, but that was why.
23:15 sorear still 96%, I think.
23:15 masak yeah.
23:16 sorear masak: I'm trying to act humorous - my feelings aren't *really* hurt.
23:16 pmurias sorear: we should integrate perlito5 and start passing perl5 (spec)tests ;)
23:16 sorear In fact I'm thrilled to think that I'm responsible for Rakudo regaining momentum
23:17 masak I think the statistics will do us good as long as we approach them un-seriously.
23:17 masak so I'm glad you're not really hurt ;)
23:17 Tene I actually have slower startup on the latest rakudo
23:18 jnthn Tene: Define "latest"
23:18 Tene on rakudo from approximately a month ago, i had consistent 0.4 second times for perl6 -e 1
23:18 Tene jnthn: Date:   Fri Mar 9 10:47:20 2012 +0100
23:18 Tene a8086d403ba034687b03a91f5a2c487d8a0a540c
23:19 Tene now the same test varies between 0.6s 0.9s
23:19 jnthn o.O
23:20 jnthn OK, then you're observing the exact opposite of what everybody else has.
23:21 Tene oh, uh... I have the 'nom' branch checked out, not 'master'
23:21 Tene Oops.
23:21 sorear you have a master branch?
23:21 Tene Apparently?
23:21 jnthn OK, now I'm really confused... :)
23:21 Tene Maybe it's old.
23:21 Tene I haven't pruned branches in my checkout in a very long time
23:22 Tene ahh, 'nom' is the main branch now.
23:23 sorear Yes.
23:23 Tene so, no, I'm using the right branch
23:23 Tene This is Parrot version 4.1.0-devel built for amd64-linux
23:26 Tene jnthn: if you'd like a login on my laptop, let me know.
23:30 Trashlord joined #perl6
23:51 robinsmidsrod joined #perl6
23:55 jnthn Tene: Thanks, will do...gonna be pretty tied up in the coming days, though.
23:55 jnthn Time for some sleep &

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

Perl 6 | Reference Documentation | Rakudo | Niecza | Specs