Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-05-10

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:09 risou left #perl6
00:14 sftp left #perl6
00:14 Ali_h_ joined #perl6
00:14 ali_h left #perl6
00:14 Ali_h_ is now known as ali_h
00:28 mtk left #perl6
00:34 benabik joined #perl6
00:36 mtk joined #perl6
00:41 mtk left #perl6
00:50 PhatEddy left #perl6
01:02 miso2217 left #perl6
01:07 cdarroch left #perl6
01:16 woosley joined #perl6
01:30 drbean joined #perl6
01:35 drbean left #perl6
01:43 whiteknight left #perl6
01:47 miso2217 joined #perl6
02:01 noganex left #perl6
02:03 leprevost joined #perl6
02:05 noganex joined #perl6
02:24 am0c joined #perl6
02:25 colomon joined #perl6
02:28 ymasory left #perl6
02:28 ymasory joined #perl6
02:29 nymacro joined #perl6
02:32 leprevost left #perl6
02:37 cognominal jnthn++
02:42 colomon jnthn++
02:43 * colomon figures that's safe enough, even if he's not sure why yet.  ;)
02:51 REPLeffect left #perl6
03:04 * colomon tries to build nom
03:10 justatheory left #perl6
03:10 justatheory joined #perl6
03:13 colomon make: *** No rule to make target `/Users/colomon/tools/nom/rakudo/parrot_install/bin/nqp'
03:14 justatheory left #perl6
03:23 Su-Shee_ joined #perl6
03:27 Su-Shee left #perl6
03:27 alester_ joined #perl6
03:29 hudnix left #perl6
03:32 kaare_ joined #perl6
03:39 am0c left #perl6
03:46 TimToady kfa
03:48 sorear ?
03:48 TimToady afk ** -1
03:50 TimToady afk⁻¹ even
03:50 TimToady arcafk
03:53 jaldhar left #perl6
03:54 am0c joined #perl6
03:54 jaldhar joined #perl6
04:35 ymasory left #perl6
04:46 alester_ left #perl6
05:03 y3llow_ joined #perl6
05:05 baest_ joined #perl6
05:06 dju__ joined #perl6
05:06 y3llow left #perl6
05:06 y3llow_ is now known as y3llow
05:07 baest left #perl6
05:10 dju_ left #perl6
05:24 birdwindupbird joined #perl6
05:29 moritz colomon: you need perl Configure.pl --gen-nqp
05:39 jaldhar left #perl6
05:39 jaldhar joined #perl6
05:47 colomon left #perl6
05:50 wtw joined #perl6
05:56 dalek ecosystem: 43ecb15 | tadzik++ | / (2 files):
05:56 dalek ecosystem: uri has been adopted
05:56 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/43ecb152cd
06:04 colomon joined #perl6
06:17 SHODAN joined #perl6
06:23 Su-Shee_ is now known as Su-Shee
06:26 dalek roast: ef5b438 | pmichaud++ | S03-operators/relational.t:
06:26 dalek roast: Add relational op tests for NaN.
06:26 dalek roast: review: https://github.com/perl6/roast/commit/ef5b43853a
06:26 pmichaud lolicommitted
06:27 dalek rakudo: c929021 | pmichaud++ | src/core/Num.pm:
06:27 dalek rakudo: Fix relational operator tests to work properly with NaN values.
06:27 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/c92902177f
06:27 dalek rakudo: 7e81699 | pmichaud++ | src/core/ (2 files):
06:27 dalek rakudo: Optimize Numeric.ACCEPTS and Real.ACCEPTS to use ??!! instead of if/else
06:27 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/7e81699bf0
06:27 dalek rakudo: e930364 | pmichaud++ | Test.pm:
06:27 dalek rakudo: [Test.pm]: Avoid (now-redundant) test for NaN in is_approx, comparison of NaN always returns false.
06:27 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/e9303644be
06:30 moritz pmichaud++
06:30 pmichaud I'm about to bump PARROT_REVISION and then will benchmark rakudo-master against others
06:31 pmichaud it's so nice to be able to run rakudo spectests in under 5 mins :-)
06:32 pmichaud also, I'm *really* glad we didn't make a star release for 2011.02.  That was fortunate.
06:41 mj41 joined #perl6
06:44 colomon left #perl6
06:48 dalek rakudo: 065788e | pmichaud++ | build/PARROT_REVISION:
06:48 dalek rakudo: Bump PARROT_REVISION to get latest Parrot gc and related changes.
06:48 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/065788e149
07:01 colomon joined #perl6
07:01 baest_ is now known as baest
07:04 wamba joined #perl6
07:05 am0c left #perl6
07:09 kaare_ left #perl6
07:12 fhelmberger joined #perl6
07:12 drbean joined #perl6
07:16 agentzh joined #perl6
07:16 drbean left #perl6
07:18 am0c joined #perl6
07:27 jnthn pmichaud++ \o/
07:27 jnthn commits!
07:29 jnthn colomon, moritz: Improvements to "oh no, no nqp" failure mode welcome. :)
07:30 jaldhar left #perl6
07:31 jaldhar joined #perl6
07:32 kaare_ joined #perl6
07:33 awoodland joined #perl6
07:45 Sefnajjer joined #perl6
07:46 Sefnajjer hello Gentlemen
07:47 Sefnajjer left #perl6
07:50 mathw jnthn++ 6model Rakudo!
07:50 mathw Very exciting blog post
07:50 moritz indeed, jnthn++
07:51 tadzik spectest under 5 minutes? Oh wow
07:51 tadzik how long was it for you before, pmichaud?
07:51 pmichaud around 30.
07:51 jnthn Whoa.
07:51 jnthn pmichaud: GC threshold changes + the numerics patch above?
07:51 tadzik ...whoa!
07:52 pmichaud no, the spectest time improvements are strictly because I got a new machine on friday :-)
07:52 pmichaud to replace my outdated desktop from 2005
07:52 jnthn oh!
07:52 jnthn That's cheating. :P
07:52 tadzik I'm planning to give a talk on Warsaw.pm in about July, something like "Rakudo Star, year ago and now"
07:52 pmichaud 6 core 3.2GHz amd phenom processor
07:52 * mathw drools, just a little
07:52 jnthn Hell yeah
07:53 * jnthn wants one too :)
07:53 mathw honestly my dual-core laptop and my quad-core desktop are just fine... just fine...
07:53 pmichaud and, no, it's not cheating if it saves me 25+ minutes per spectest run :-)
07:53 jnthn mathw: Heh, that's exactly the setup I have. :)
07:53 mathw I really don't mind at all that I can't run City of Heroes with maxed-out graphics settings anymore (they upgraded the engine since I could do that)
07:53 mathw And I've never sat there saying 'I wish you would compile more quickly'
07:53 pmichaud but it's really nice to see things like core.pm compiling in 65 seconds instead of 240+
07:54 mathw :D
07:54 mathw I bet
07:54 mathw that is a really significant speedup
07:54 * moritz is surprised that single processors still get so much faster
07:54 mathw if only it was through some awesomely clever patch to parrot or rakudo
07:54 mathw hey here's an idea, we could ship rakudo with a database of all possible programmes, ready compiled, so it can just look them up in a hash table, super-fast!
07:55 mathw storage is cheap, right?
07:55 tadzik is (self.isNaN ??  $other.isNaN !! $other == self) really faster than if/else?
07:55 jnthn Yes
07:55 moritz tadzik: fewer scopes
07:55 jnthn No block
07:55 tadzik oh, I see
07:55 moritz tadzik: each block is compiled to a separate parrot-level sub
07:56 tadzik so that could be optimized one day, but now it's not?>
07:56 jnthn In NQP we can flatten blocks out and do. In Rakudo, I'm not sure we can.
07:56 moritz so you get rid of an invocation and a return
07:56 moritz maybe with sufficient static analysis
07:56 moritz we should spec that intermediate blocks are optional in stack traces
07:57 jnthn Contextuals would seem to prevent scope flattening. In Perl 6 every block has some.
07:57 moritz or maybe they shouldn't show up at all
07:57 moritz jnthn: if you can prove that they are not used somehow...
07:57 jnthn moritz: But it's a contextual, so short of full program analysis or something that seems...hard.
07:57 jnthn Maybe in some cases we can.
07:58 mathw oh fun
07:58 moritz jnthn: would be a huge win if we analyzed the setting for use of contextuals
07:59 jnthn moritz: True.
07:59 jnthn moritz: But even then it only helps for sub calls
07:59 jnthn moritz: Since a method call could be overridden at any point.
07:59 jnthn But perhaps still worth it :)
08:00 jnthn In fact, I guess it means all operators win.
08:01 moritz unless they do things like $a.Num + $b.Num
08:01 mathw As long as you don't tell too many people, so they won't start writing sub-only code 'because it's faster'
08:01 jnthn moritz: Right
08:02 jnthn Though if people are really after speed they'd presumably have added type annotations so the compiler can find and inline infix:<+>(Num,Num)
08:11 jedai_ left #perl6
08:13 jedai joined #perl6
08:15 tadzik 48.9% of modules now have Panda badges :)
08:17 moritz are any of mine among the missing?
08:20 mathw What's a Panda badge?
08:20 cosimo tadzik: would be useful if clicking on the panda I could know what that means :)
08:20 cosimo and hello, #perl6
08:22 jnthn mathw: It means your module is unbearably good.
08:22 moritz hello cosimo
08:22 moritz it means a META.info location is known for that module
08:26 tadzik nope
08:26 tadzik it means it conforms to the latest specs.pod
08:26 moritz oh
08:26 tadzik which currently means "it has a source-url field"
08:27 moritz you see, even I get it wrong :-)
08:27 tadzik it means "good maintainer, takes care of what happens in the ecosystem"
08:27 cosimo damn, now I need to fix my other perl6 modules ;)
08:28 tadzik please do! :)
08:28 mathw Something I've definitely not been doing lately
08:28 tadzik one could maintain an autoupdater/notifier for META.infos and achive ultimate glory
08:28 cosimo now that the socket stuff is stable, I really need to finish Cache::Memcached
08:31 moritz you mean, after we completely broke and then rewrote it? :-)
08:31 moritz http://www.perlmonks.org/?node_id=903800 nice challenge
08:31 moritz can anybody think of a clever Perl 6 solution?
08:32 dalek rakudo/nom: 924ea54 | moritz++ | / (3 files):
08:32 dalek rakudo/nom: detect missing nqp executable at Configure.pl time
08:32 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/924ea541a9
08:32 moritz niezca: say 'abc' ~~ /<*abcd>/
08:33 moritz niecza: say 'abc' ~~ /<*abcd>/
08:33 p6eval niecza v5: OUTPUT«[31m===[0mSORRY![31m===[0m␤␤Action method assertion:sym<*> not yet implemented at /tmp/AyDRZnznUi line 1:␤------> [32msay 'abc' ~~ /<*abcd[33m⏏[31m>/[0m␤␤Unhandled exception: Unable to resolve method oplift in class Str␤  at /home/p6eval/niecza/src/RxOp.pm6 line 9 (RxOp
08:33 p6eval ..C8_…
08:36 jnthn rakudo: say '1443123456983' ~~ / :my $last; [(\d) <?{ ($last + 1) % 10 == $0 ?? ($last = $0; 1) !! 0 }>]+ /
08:36 p6eval rakudo 065788: OUTPUT«Use of uninitialized value in numeric context  in <anon> at line 22:/tmp/VUupEPKjPB␤144312345␤»
08:37 jnthn dang
08:37 jnthn :)
08:38 moritz rakudo: say '1443123456983' ~~ / :my $last; (\d) { $last = +$0 } [(\d) <?{ ($last + 1) % 10 == $1 ?? ($last = $0; 1) !! 0 }>]+ /
08:38 p6eval rakudo 065788: OUTPUT«␤»
08:39 colomon left #perl6
08:41 colomon joined #perl6
08:41 moritz http://www.perlmonks.org/?node_id=903927 just a weird idea
08:44 [particle]1 joined #perl6
08:44 [particle] left #perl6
08:47 lue left #perl6
08:47 lue joined #perl6
08:48 colomon left #perl6
08:55 dakkar joined #perl6
08:55 colomon joined #perl6
09:00 pnu left #perl6
09:02 pnu joined #perl6
09:08 colomon left #perl6
09:14 donri joined #perl6
09:15 colomon joined #perl6
09:16 tzhs joined #perl6
09:21 awoodland left #perl6
09:29 icwiener joined #perl6
09:34 colomon left #perl6
09:43 colomon joined #perl6
09:49 kaare_ left #perl6
09:53 pnu left #perl6
09:58 icwiener_ joined #perl6
10:00 pnu joined #perl6
10:00 icwiener left #perl6
10:04 am0c left #perl6
10:06 Su-Shee_ joined #perl6
10:09 Su-Shee left #perl6
10:12 ggoebel joined #perl6
10:17 ggoebel left #perl6
10:22 ggoebel joined #perl6
10:22 woosley left #perl6
10:24 kaare_ joined #perl6
10:36 Su-Shee_ is now known as Su-Shee
10:41 icwiener_ left #perl6
10:41 cosimo_ joined #perl6
10:45 wamba left #perl6
10:52 tadzik remember when I said Rakudo is fast enough when I can run ForestFire.pl smoothly? Ladies and Gentleman, Rakudo is Fast Enough :)
10:53 tadzik oh, my bad, it isn't :)
10:53 tadzik I was using a small board
11:02 Psyche^ joined #perl6
11:05 Patterner left #perl6
11:05 Psyche^ is now known as Patterner
11:07 mux_ is now known as mux
11:08 icwiener joined #perl6
11:19 satyavvd joined #perl6
11:25 cosimo_ left #perl6
11:27 dakkar left #perl6
11:27 woosley joined #perl6
11:28 woosley left #perl6
11:28 dakkar joined #perl6
11:50 woosley joined #perl6
11:54 agentzh left #perl6
12:07 takadonet morning all
12:07 takadonet tadzik: url for ForestFire.pl ?
12:12 f00li5h left #perl6
12:14 mtk joined #perl6
12:17 satyavvd left #perl6
12:28 sftp joined #perl6
12:31 pernatiy left #perl6
12:33 [particle]1 is now known as [particle]
12:44 jnthn afternoon o/
12:45 leprevost joined #perl6
12:46 Vlavv_ left #perl6
12:48 takadonet jnthn: yo
12:48 jnthn o/ takadonet
12:49 takadonet jnthn: how are you doing?
12:49 drbean joined #perl6
12:50 bluescreen10 joined #perl6
12:51 leprevost left #perl6
12:51 leprevost joined #perl6
12:51 Holy_Cow joined #perl6
12:52 Holy_Cow left #perl6
13:01 jnthn takadonet: Pretty well, thanks. :-) Mostly done with $dayjob for the next week and a half. :)
13:02 takadonet jnthn: nice so more Rakudo hacking
13:02 woosley left #perl6
13:02 jnthn takadonet: Yes, and a bit of vacation too :)
13:05 woosley joined #perl6
13:10 pernatiy joined #perl6
13:16 takadonet newest rakudo build took off 10 seconds off my script runtime!
13:17 jnthn yay :)
13:17 takadonet still a thousands time slower then p5 version :(
13:17 takadonet p6 version: 2 min 42 seconds p5 version: 0.1 seconds
13:17 jnthn :(
13:20 satyavvd joined #perl6
13:36 woosley left #perl6
13:38 Sefnajjer joined #perl6
13:39 Sefnajjer Hello Gentlemen
13:39 moritz Sefnajjer: hello
13:39 Sefnajjer is now known as Moukeddar
13:40 Moukeddar How are you doing moritz ?
13:40 phenny Moukeddar: 08 May 17:20Z <sorear> tell Moukeddar http://mail.pm.org/pipermail/chicago-talk/2008-January/004726.html
13:41 moritz same as usual
13:41 Moukeddar oh yeah , the naming thing , how nice of you to clarify that ;)
13:42 Moukeddar Camel Art , Tasty
13:45 ab5tract joined #perl6
13:47 Moukeddar http://blog.amt.in/video-perl-programming-best-practices-linuxco
13:51 dalek rakudo/nom: c929021 | pmichaud++ | src/core/Num.pm:
13:51 dalek rakudo/nom: Fix relational operator tests to work properly with NaN values.
13:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c92902177f
13:51 dalek rakudo/nom: 7e81699 | pmichaud++ | src/core/ (2 files):
13:51 dalek rakudo/nom: Optimize Numeric.ACCEPTS and Real.ACCEPTS to use ??!! instead of if/else
13:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7e81699bf0
13:51 dalek rakudo/nom: e930364 | pmichaud++ | Test.pm:
13:51 dalek rakudo/nom: [Test.pm]: Avoid (now-redundant) test for NaN in is_approx, comparison of NaN always returns false.
13:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e9303644be
13:51 dalek rakudo/nom: 065788e | pmichaud++ | build/PARROT_REVISION:
13:51 dalek rakudo/nom: Bump PARROT_REVISION to get latest Parrot gc and related changes.
13:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/065788e149
13:51 dalek rakudo/nom: 7ff55d7 | jnthn++ | / (7 files):
13:51 dalek rakudo/nom: Merge branch 'master' into nom
13:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7ff55d7f89
13:52 [Coke] left #perl6
13:53 Jdoneright joined #perl6
13:53 Moukeddar_ joined #perl6
13:53 Moukeddar_ left #perl6
13:54 Jdoneright So, who else researches J language beside me?
13:55 moritz Jdoneright: maybe try asking in a J-related IRC channel?
13:55 Jdoneright But I love Perl!
13:56 moritz that's nice, but still your chances are higher in a J-related channel
13:56 Su-Shee .oO(what are J languages?)
13:56 Jdoneright Ahh, I get you. Its not some J advice I seek
13:57 Jdoneright J is more humane version of APL
13:57 Jdoneright vectorized programming language
13:57 moritz Su-Shee: Java, Javascript, ... *SCNR*
13:57 Jdoneright no-no-no
13:57 Su-Shee moritz: well that's what I first thought actually...
13:58 colomon moritz++, jnthn++, pmichaud++
13:58 Jdoneright q=. 2 3 5 7 9                define q
13:59 Jdoneright +/ q                         sum q
13:59 Jdoneright */\ q                        partial products of q
14:00 moritz rakudo: my @q = 2, 3, 5, 7, 9; say [+] @q; say join ', ', [\*] @q
14:00 p6eval rakudo 065788: OUTPUT«26␤2, 6, 30, 210, 1890␤»
14:02 colomon jnthn: ld: can't open output file for writing: perl6, errno=21
14:04 jnthn colomon: huh?
14:05 moritz colomon: check if your disc is full?
14:05 Tedd1 left #perl6
14:05 jnthn colomon: Compiling...what exactly?
14:05 colomon jnthn: that's my latest problem building r-nom
14:05 jnthn Oh.
14:05 moritz colomon: try:  perl -wE '$! = 21; say $!'
14:05 jnthn That's...really odd given it's just the same old pbc_to_exe that we've used for a long time.
14:05 colomon moritz: I've got 200 gigs free
14:05 moritz colomon: what does it say on your platform?
14:05 moritz should be enough, even if it's close :-)
14:06 colomon Is a directory
14:06 jnthn wtf, the directory should be called Perl6, not perl6.
14:06 moritz case independent file systems
14:06 jnthn And on Windows it ain't an issue 'cus it's perl6.exe.
14:06 jnthn grr
14:06 dalek rakudo/nom: 0c08f4b | jnthn++ | NOMMAP.markdown:
14:06 dalek rakudo/nom: Update plan.
14:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0c08f4ba51
14:06 jnthn OK, I dunno what to do about that.
14:07 moritz but macos has case insensitive file systems *and* no .exe extensions
14:07 jnthn ew.
14:07 colomon actually, OS X has case sensitive file systems but tries to pretend it doesn't, I believe.
14:07 bluescreen10 left #perl6
14:07 moritz colomon: it has some, but it doesn't enable it by default
14:08 moritz it's just case preserving, not case sensitive
14:08 moritz how about not writing to ./Perl6, but to src/gen/Perl6 or gen/Perl6 or so?
14:09 jnthn moritz: It's the PBСs that go in there
14:09 jnthn And they're located by normal use statement.
14:09 moritz jnthn: so, generated files
14:09 jnthn moritz: Well, if that's your measure, then we put perl6 executable in src/gen too.
14:09 moritz so we need to twiddle with INC or whatever the equivalent is, right
14:10 jnthn Note that only perl6.pbc gets bundled into the executable.
14:10 jnthn Everything else is just a PBC file loaded at runtime.
14:11 moritz so maybe a runtime/ dir?
14:11 jnthn We could try and mess around with some load prefix or something.
14:11 moritz or blib or so
14:11 jnthn Maybe, but it needs to work after install too.
14:12 jnthn So long as we install with a blib prefix I guess it's OK.
14:12 jnthn hmm, but then we need to work out how to get it to load from there...
14:13 moritz I'd like to hear pmichaud's opinion on the whole thing befor we do anything about it
14:13 jnthn Sure
14:13 jnthn I'm happy for somebody else to solve this.
14:13 jnthn At the moment it's not even worth building anyway. :)
14:13 moritz jnthn: is it the nqp use statement that does its loading?
14:13 jnthn moritz: Yes.
14:13 moritz s/its/the/
14:14 icwiener left #perl6
14:14 moritz jnthn: does it go solely by module name? or does it also look into the file, and verify that it found the package it was supposed to load?
14:14 jnthn The name just locates the file.
14:14 moritz if the former, a   use blib::Perl6::Actions  might work, even if it's ugly
14:15 jnthn Yes, it would :)
14:15 jnthn The only thing it cares about once it's loaded the file is GLOBALish and EXPORT.
14:15 jnthn Which are both in UNIT
14:15 jnthn And thus locatable without worrying over filename.
14:16 jnthn Talking of export...that's what I need to do next...or a first cut, anyway ;)
14:18 Tedd1 joined #perl6
14:18 wtw left #perl6
14:23 Jdoneright left #perl6
14:24 drbean left #perl6
14:24 bluescreen10 joined #perl6
14:27 Tedd1 left #perl6
14:28 pmichaud good morning, #perl6
14:28 PerlJam good morning Pm
14:30 moritz good am, pm
14:32 jnthn morning, pmichaud
14:32 PhatEddy joined #perl6
14:32 colomon pmichaud!  \o/
14:33 PhatEddy Hi - I'm trying to build the latest rakudo on Win Vista and hitting intermittent (but frequent) Error -1073741819 from nqp when building parrot.
14:33 PhatEddy Any suggestions ?
14:35 jnthn Hmm...isn't that equivalent to segfault?
14:35 jnthn :/
14:36 jnthn PhatEddy: What toolchain are you using?
14:36 moritz googling for "Error 1073741819" throws up lots of results that suggest a virus or worm might be the issue
14:36 jnthn rakudo: say 1073741819.base(16)
14:37 p6eval rakudo 065788: OUTPUT«3FFFFFFB␤»
14:37 jnthn rakudo: say -1073741819.base(16)
14:37 p6eval rakudo 065788: OUTPUT«-3␤»
14:37 jnthn meh
14:37 pmichaud masakbug!
14:37 moritz precedence!
14:37 spq joined #perl6
14:37 PhatEddy I can't rule out a virus!  I was infected last week and had to clean up ...
14:37 jnthn pmichaud: Is that actually wrong, btw?
14:37 pmichaud jnthn: no, moritz++ has it right
14:37 moritz rakudo: say (-1073741819).base(16)
14:37 p6eval rakudo 065788: OUTPUT«-3FFFFFFB␤»
14:37 jnthn pmichaud: Thought so.
14:38 moritz :-)
14:38 pmichaud it's a precedence issue :)
14:38 pmichaud too early here -- haven't had a dr pepper yet
14:38 jnthn Well, yes, but is it a Rakudo bug of just Perl 6 spec'ing it that way :)
14:38 dalek rakudo/nom: 7cd9d0c | jnthn++ | src/Perl6/ (2 files):
14:38 dalek rakudo/nom: First cut of import. Seems to do the right kinda thing.
14:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7cd9d0c8fe
14:38 jnthn lol i can write import in very few lines now!
14:38 pmichaud I'm currently looking over the last set of benchmark results
14:38 ggoebel left #perl6
14:41 hercynium joined #perl6
14:43 Moukeddar left #perl6
14:44 ggoebel joined #perl6
14:45 Tedd1 joined #perl6
14:46 spq left #perl6
14:47 pmichaud https://github.com/pmichaud/rakbench/blob/master/results/kiwi-x86_64-201105100844.txt  # rakbench on 2GB kiwi
14:47 pmichaud summary:  gms wins core.pm and rx tests, ms2 (both 2011.01 and patched 2011.04) wins all others
14:47 moritz that's surprising
14:48 jnthn Odd.
14:49 pmichaud oh, 2011.01 (ms2) didn't win pickwords.p6.  but patched 2011.04 (ms2) did.
14:49 pmichaud same for atan2
14:53 bluescreen10 left #perl6
14:58 simcop2387 left #perl6
14:59 simcop2387 joined #perl6
15:00 mj41 left #perl6
15:07 ab5tract left #perl6
15:08 bluescreen10 joined #perl6
15:12 satyavvd left #perl6
15:22 risou joined #perl6
15:25 Su-Shee left #perl6
15:25 tzhs left #perl6
15:26 Su-Shee joined #perl6
15:26 noganex left #perl6
15:29 noganex joined #perl6
15:29 nymacro left #perl6
15:33 Shozan joined #perl6
15:37 MayDaniel joined #perl6
15:40 Shozan left #perl6
15:41 justatheory joined #perl6
15:44 risou_ joined #perl6
15:46 risou left #perl6
15:51 domidumont left #perl6
15:52 MayDaniel left #perl6
15:56 edenc left #perl6
16:06 moritz pmichaud: have you backlogged, regarding locations of generated setting .pbc files in nom?
16:06 jnthn Note, it's not just setting, but meta-objects and other compiler bits
16:06 jnthn Suggest reading my blog post yesterday for background also.
16:07 * moritz should finish that, yes
16:07 TimToady I'm getting really tired of seeing (and I suspect people are tired of typing) things like: say ~( LIST )
16:07 TimToady we need a "so" equivalent for stringifying
16:07 pmichaud [~] LIST    # :-)
16:08 TimToady um, no
16:08 moritz that joins without whitespace
16:08 Mowah joined #perl6
16:08 moritz TimToady: I thought the same today
16:08 pmichaud ah, with the whitespace
16:08 TimToady cat fails too
16:09 pmichaud maybe an abbrev for "join"
16:09 pmichaud "jo"
16:09 pmichaud "jn"
16:09 pmichaud maybe just "sp"
16:09 TimToady unfortunately we can't use "str"
16:09 pmichaud say sp List
16:09 TimToady that's not too bad
16:09 pmichaud *LIST
16:10 jnthn sp?
16:10 TimToady then we could have "spay" for short
16:10 pmichaud joins LIST with spaces
16:10 jnthn oh!
16:10 TimToady what .Str does
16:10 tadzik takadonet: I believe it's on RosettaCode
16:10 jnthn say Str( LIST ); :)
16:10 tadzik Great! I'm not looking, and jnthn implements import! Unfair!
16:10 hudnix joined #perl6
16:10 TimToady and then we could have .sp as alias for .Str
16:10 jnthn tadzik: It's not complete. :)
16:11 PerlJam I'm not too tired of ~(LIST) yet  (fwiw :-)
16:11 jnthn tadzik: But it does look in lexical IMPORT :)
16:11 pmichaud moritz: I did see the dicussion on the .pbc's yes
16:11 jnthn tadzik: And does make the imported symbols available to the compiler. :)
16:11 pmichaud I'm not likely to have tuits to throw at it today... perhaps tomorrow
16:11 moritz pmichaud: any opinions?
16:11 TimToady PerlJam: it really wants a listop so you don't have to find/remember the trailing )
16:11 moritz ok
16:11 jnthn And does install them in the static lexpad... :)
16:11 jnthn That's already 3 things we didn't do before. ;)
16:12 pmichaud I should be able to review it Thursday if I don't get to it before then
16:12 PerlJam TimToady: aye, but perhaps it's one those things that "feels familiar" for me that I don't have that problem.
16:12 cdarroch joined #perl6
16:12 cdarroch left #perl6
16:12 cdarroch joined #perl6
16:12 PerlJam TimToady: you could always confuse people by making a ~( op that doesn't need the )    ;-)
16:12 pmichaud say &prefix:<~>(LIST)   # works also  :-P
16:13 pmichaud might need an extra set of parens
16:13 PerlJam does prefix:<~~> mean anything yet?
16:13 moritz rakudo: say prefix:<~>  <a b c>
16:13 p6eval rakudo 065788: OUTPUT«a b c␤»
16:13 moritz PerlJam: don't even think of it
16:13 PerlJam moritz: too late!  :)
16:13 pmichaud PerlJam: it means you got your smartmatch in the wrong position, usually :)
16:13 moritz PerlJam: when you define a prefix:<~~>, you can't detect accidental usage of   some_sub ~~ condition   anymore
16:13 pmichaud std:  say ~~ 3
16:14 p6eval std 9f27365: OUTPUT«[31m===[0mSORRY![31m===[0m␤Expecting a term, but found either infix ~~ or redundant prefix ~␤  (to suppress this message, please use space between ~ ~) at /tmp/QdHD1Ju7zU line 1:␤------> [32msay ~~[33m⏏[31m 3[0m␤Parse failed␤FAILED 00:01 114m␤»
16:14 tadzik jnthn++ # import
16:14 PerlJam aye.  that one can't work for a variety of reasons.  But sometimes you've got to mentino the bad ideas for contrast
16:14 ggoebel left #perl6
16:14 KyleHa joined #perl6
16:15 pmichaud maybe &prefix:<⏏>   :-P
16:15 pmichaud say ⏏  LIST
16:15 tadzik that looks like a jmp instruction in Mario programming language
16:16 PerlJam I don't even know how to type that character .... so  ~(LIST) continues to work fine for me  :)
16:16 moritz now I want a metaop that lowers the precdence of an operator
16:16 moritz say L~ 1, 2, 3
16:16 moritz then we can abandon 'and' for L&&
16:16 moritz or becomes L||
16:16 PerlJam moritz: a generalized precedence twiddler does seem to be useful  (where you can raise or lower precedence as needed)
16:17 pmichaud traditionally, the generalized precedence twiddler has been ()  :-P
16:17 PerlJam a more infix one
16:17 PerlJam or prefix
16:17 pmichaud I don't suppose (~) works
16:17 pmichaud say (~) LIST
16:18 moritz but () stands for tight precedence
16:18 jnthn say )~( LIST
16:18 moritz having it *loosen* the precedence of another op feels wrong
16:18 moritz jnthn: :-)
16:18 pmichaud then )~.... what jnthn said
16:19 jnthn OH NO if two people thunk it it must be right!
16:19 jnthn ;)
16:19 ggoebel joined #perl6
16:22 pmichaud note about RT #89972 (.roll isn't random enough)
16:22 pmichaud That looks like a recent bug.  It worked fine in 2011.01
16:22 pmichaud http://gist.github.com/964805
16:22 pmichaud so it should be low-hanging fruit
16:22 pmichaud oh, it works fine in 2011.04, too
16:23 pmichaud so it's broken sometime between 2011.04 and current master
16:23 jnthn pmichaud: Yeah, deliberate Parrot chance, it seems.
16:23 jnthn *change
16:23 jnthn pmichaud: The discussion that followed was basically a be-useful-to-HLLs FAIL.
16:24 jnthn </trolling>
16:24 miso2217_ left #perl6
16:24 jnthn pmichaud: Long story short, easiest way is for us to call srand ourselves at startup, or some such.
16:24 KyleHa left #perl6
16:24 ggoebel left #perl6
16:28 justatheory left #perl6
16:29 ggoebel joined #perl6
16:30 pmichaud where's the discussion, ooc?
16:31 jnthn pmichaud: Was on #parrot
16:32 benabik pmichaud: Starts at http://irclog.perlgeek.de/parrot/2011-05-05#i_3678681
16:32 jnthn pmichaud: http://irclog.perlgeek.de/parrot/2011-05-05#i_3678709
16:32 jnthn oh... :)
16:32 benabik jnthn: Jinx?
16:33 pmichaud so, is this another "we're making a change outside of the deprecation policy" sort of thing?
16:33 jnthn Seems so.
16:33 am0c joined #perl6
16:34 jnthn As well as making a change that I can't see being a benefit to ANY HLL.
16:34 benabik It looks like srand was being initialized as part of the hashing code.
16:39 Tedd1^ joined #perl6
16:40 Tedd1 left #perl6
16:46 risou joined #perl6
16:46 risou_ left #perl6
16:54 birdwindupbird left #perl6
16:56 dakkar left #perl6
16:56 risou left #perl6
16:57 Vlavv_ joined #perl6
17:03 risou joined #perl6
17:05 risou left #perl6
17:05 risou joined #perl6
17:05 risou left #perl6
17:10 risou_awy joined #perl6
17:10 icwiener joined #perl6
17:13 risou_awy is now known as risou
17:15 tadzik how much time 'til #phasers?
17:16 jnthn 1 hour 45 mins, iirc.
17:16 jnthn oh, or is it just 45 mins
17:16 jnthn no, I was right first time :)
17:17 tadzik goodie. Thanks
17:21 tadzik spam on the RT
17:21 tadzik we can close 2 tickets! \o/ :)
17:26 dalek rakudo/nom: a80a744 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.pm:
17:26 dalek rakudo/nom: Flesh out bootstrap types a little more.
17:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a80a744609
17:26 dalek rakudo/nom: 9fd9be6 | jnthn++ | src/Perl6/Compiler/ (2 files):
17:26 dalek rakudo/nom: Toss old compile-time representations of parameter and signature - we can now just instantiate the real parameter and signature objects and use them in the compiler, then (if we're running right away) the same ones at runtime.
17:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9fd9be658a
17:26 dalek rakudo/nom: 457c06a | jnthn++ | src/Perl6/SymbolTable.pm:
17:26 dalek rakudo/nom: Compile-time symbol location and is_type.
17:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/457c06a7bd
17:26 dalek rakudo/nom: f08cd62 | jnthn++ | src/Perl6/Metamodel/AttributeContainer.pm:
17:26 dalek rakudo/nom: Fix attribute introspection.
17:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f08cd62725
17:26 dalek rakudo/nom: adf72d8 | jnthn++ | src/Perl6/ (2 files):
17:26 dalek rakudo/nom: Start to refactor grammar and actions for compile time Signature/Parameter creation.
17:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/adf72d8faf
17:26 Mowah left #perl6
17:28 jnthn nom &
17:30 pernatiy left #perl6
17:38 masak joined #perl6
17:38 masak evening, zebras.
17:38 jnthn evenin', masak
17:39 pmichaud I should probably write up reports for #parrotsketch and #phasers
17:39 masak ooh, #phasers.
17:42 risou is now known as risou_awy
17:42 risou_awy is now known as risou
17:44 Chillance joined #perl6
17:48 orafu left #perl6
17:51 ab5tract joined #perl6
17:53 benabik left #perl6
17:57 tadzik oh, masak :)
17:57 dalek rakudo: 72cbadc | pmichaud++ | build/PARROT_REVISION:
17:57 dalek rakudo: Bump PARROT_REVISION to get random number seeding from Parrot.  Fixes #89972.
17:57 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/72cbadc34c
17:57 pmichaud now that #89972 is fixed, is there a good way we can test it?
17:57 tadzik a test running a .pl file?
17:57 tadzik I thought about it too
17:59 pmichaud more directly:  should I close the ticket, or leave it with "we need a test"?
18:01 pmichaud I'm going to leave it open.
18:02 colomon pmichaud++
18:02 tadzik tickets++
18:02 miso2217 left #perl6
18:02 wamba joined #perl6
18:03 pmichaud it's been so long since I did a report at #phasers that I have to remember what one looks like :)
18:04 jnthn pmichaud: The current standard is to write it all in uppercase, with maximum line length 30 chars.
18:05 diakopter lol.
18:06 tomaw left #perl6
18:06 tadzik did you mean: LOL!
18:06 PerlJam heh
18:06 PerlJam though, this isn't #phaser :)
18:07 PerlJam er , #phaseres
18:07 PerlJam crap
18:07 PerlJam I would try again, but it's likely to come out as #phrases or something
18:08 tomaw_ joined #perl6
18:08 diakopter or #sharpes
18:11 icwiener left #perl6
18:12 colomon bother.  new version of gcd in setting appears to break Math::BigInt.  :(
18:14 colomon well, Math::BigInt's gcd, anyway
18:15 tomaw_ is now known as tomaw
18:15 colomon rakudo: multi sub gcd(Rat $a, Rat $b) { say "Rats!" }; gcd(10.0, 15.0)
18:15 p6eval rakudo 065788: OUTPUT«Rats!␤»
18:20 masak colomon: oh! sorry about that. :/
18:21 colomon masak: I'm sure it's not really your fault.  Some stupid glitch in Rakudo's dispatch.
18:21 rgrau joined #perl6
18:22 colomon and probably not worth fixing because it's all about to change anyway.
18:22 masak probably worth bugreporting, though.
18:23 jnthn oh surprise, masak++ wants to report a bug ;P
18:23 * jnthn is all for it - more for nom to close ;)
18:23 pernatiy joined #perl6
18:23 jnthn pre#phasers stroll &
18:25 colomon masak: the trouble is going to be golfing it
18:25 masak oh?
18:26 colomon rakudo: class A { our multi sub gcd(Rat $a, Rat $b) is export { say "Rats"; }; }; gcd(10.0, 15.0)
18:26 p6eval rakudo 065788: OUTPUT«Method 'gcd' not found for invocant of class 'Rat'␤  in <anon> at line 3920:CORE.setting␤  in 'gcd' at line 1␤  in main program body at line 22:/tmp/3pr_oCfqxu␤»
18:26 colomon huh
18:26 colomon rakudo: say gcd(10.0, 15.0)
18:26 p6eval rakudo 065788: OUTPUT«Method 'gcd' not found for invocant of class 'Rat'␤  in <anon> at line 3920:CORE.setting␤  in 'gcd' at line 1␤  in main program body at line 22:/tmp/oozOPuKyYp␤»
18:26 colomon ah, okay.
18:27 colomon well, probably can be golfed down to a simple module, anyway
18:27 masak aye.
18:29 miso2217 joined #perl6
18:31 hercynium left #perl6
18:31 colomon https://gist.github.com/965082 -- masak, think you can improve on that golfing?
18:34 justatheory joined #perl6
18:34 justatheory left #perl6
18:35 justatheory joined #perl6
18:36 jaldhar left #perl6
18:37 * masak looks
18:40 masak rakudo: class Gcd does Real { our multi sub gcd(Gcd $a, Gcd $b) is export(:DEFAULT) { say "Gcd!" }; gcd Gcd.new, Gcd.new
18:40 p6eval rakudo 72cbad: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
18:41 masak rakudo: class Gcd does Real { our multi sub gcd(Gcd $a, Gcd $b) is export(:DEFAULT) { say "Gcd!" } }; gcd Gcd.new, Gcd.new
18:41 p6eval rakudo 72cbad: OUTPUT«Method 'gcd' not found for invocant of class 'Gcd'␤  in <anon> at line 3920:CORE.setting␤  in 'gcd' at line 1␤  in main program body at line 22:/tmp/H0Chu2jTX1␤»
18:41 masak rakudo: class Gcd { our multi sub gcd(Gcd $a, Gcd $b) is export(:DEFAULT) { say "Gcd!" } }; gcd Gcd.new, Gcd.new
18:41 p6eval rakudo 72cbad: OUTPUT«Method 'gcd' not found for invocant of class 'Gcd'␤  in <anon> at line 3920:CORE.setting␤  in 'gcd' at line 1␤  in main program body at line 22:/tmp/huJEujRGx2␤»
18:41 masak rakudo: class Gcd { our sub gcd(Gcd $a, Gcd $b) is export(:DEFAULT) { say "Gcd!" } }; gcd Gcd.new, Gcd.new
18:41 p6eval rakudo 72cbad: OUTPUT«Method 'gcd' not found for invocant of class 'Gcd'␤  in <anon> at line 3920:CORE.setting␤  in 'gcd' at line 1␤  in main program body at line 22:/tmp/GyIWhsGP89␤»
18:42 masak hm, of course it's not visible.
18:42 masak I'm not importing it... :)
18:43 colomon right.
18:43 * masak runs the files instead
18:44 colomon "does Real" is unnecessary, that's a miniature golf.
18:44 colomon so is "(:DEFAULT)"
18:46 [particle] left #perl6
18:51 ab5tract left #perl6
18:54 [particle] joined #perl6
18:58 mtk left #perl6
18:59 masak #phasers in 1?
19:00 jnthn yes, back justin time
19:07 mtk joined #perl6
19:11 masak today's mini-challenge. (this one is for hard-core people.)
19:11 fhelmberger left #perl6
19:12 newbee joined #perl6
19:13 masak on the integers modulo $P, make an algorithm that quickly finds the inverse of $n.
19:13 masak (that is, a number $m such that $n * $m == 1 (mod $P))
19:14 p6eval left #perl6
19:15 p6eval joined #perl6
19:16 newbee rakudo: class Calendar {  has Str $.file is rw;  method BUILD {  say "Opening $.file";  } }; my $cal = Calendar.new(file=>'somefile.txt');
19:16 p6eval rakudo 72cbad: OUTPUT«Opening Any()␤»
19:17 masak newbee: you should probably make BUILD a submethod.
19:17 newbee "sub" instead of "method"?
19:17 masak no, 'submethod' instead of 'method'.
19:18 jnthn newbee: One day a sub met a method and they made a submethod
19:18 newbee mmm and why the difference?
19:18 masak newbee: submethods don't partake in inheritance.
19:19 TimToady submethods can't accidentally be called on the wrong part of the object's infrastructure
19:19 TimToady says the domain expert :)
19:19 masak :P
19:19 newbee rakudo: class Calendar {  has Str $.file is rw;  submethod BUILD {  say "Opening $.file";  } }; my $cal = Calendar.new(file=>'somefile.txt');
19:19 p6eval rakudo 72cbad: OUTPUT«Opening Any()␤»
19:20 masak TimToady: see? people expect BUILD not to override attribute initialization...
19:20 masak that's, like, the seventh people who have expected that in just three years.
19:20 TimToady rakudo: class Calendar {  has Str $.file is rw;  submethod BUILD ($.file) { say "Opening $.file";  } }; my $cal = Calendar.new(file=>'somefile.txt');
19:20 p6eval rakudo 72cbad: OUTPUT«Opening somefile.txt␤»
19:21 masak s/people/person/
19:21 masak hm.
19:21 justatheory left #perl6
19:21 justatheory joined #perl6
19:21 masak I stand corrected.
19:21 newbee so, giving parameters to BUILD is used to specify "required" attributes...
19:22 masak yes.
19:22 masak of course, you could have several multi BUILD submethods.
19:22 newbee nice :)
19:22 newbee then i should declare them as "submethod multi BUILD"
19:22 TimToady flip those
19:22 masak 'multi submethod'.
19:23 jnthn Is declaring a multi method and a multi submethod "illegal"?
19:24 jnthn What type of method should a generated proto be?
19:24 * TimToady would not be surprised if that were the case
19:24 * jnthn will happily make it the case, otherwise things will be Greatly Insane.
19:24 jnthn Well, may be. :)
19:24 TimToady we want to have the GI tractable
19:24 jnthn It's a conservative thing to do anyway :)
19:25 masak yes.
19:25 risou is now known as risou_awy
19:25 jnthn I know masak filed at least one RT relating to mutlis and submethods.
19:25 * masak cackles involuntarily
19:26 masak it's OK, just implement new features; I'll be nice. I promise.
19:26 jnthn yeah yeah worreva :P
19:26 justatheory left #perl6
19:28 molaf__ left #perl6
19:28 tadzik the nice trick for required attributes is "$.foo = die "foo is required"
19:29 masak thunks++
19:29 TimToady yes, but that requires the current post-BUILD check semantics, not the preset-then-call BUILD semantics
19:30 TimToady so you can't have it both ways...
19:30 tadzik (for some definition of nice, I must say I'd prefer "is required" of some sort
19:31 leprevost left #perl6
19:32 TimToady declarative is often preferable to procedural
19:35 TimToady I suppose we could preset the attributes with "futures" that de-lazify on first FETCH, and are easily overridden by BUILD, but that wouldn't help for native attrs
19:37 birdwindupbird joined #perl6
19:39 dju_ joined #perl6
19:41 PhatEddy Either jnthn or moritz (or anyone) around for my vista problem?  I strongly suspect it is NOT a virus.  On two of my vista systems I can build a rakudo git revision from three days ago but not the one from this morning.
19:43 dju__ left #perl6
19:45 masak doesn't sound like a virus.
19:46 masak rakudo: given "82665409266027476709324472" { my $diff = join "", map { ($^b - $^a) % 10 }, (.comb Z .comb.rotate); my $longest = $diff.comb(/9+ | 1+/, :match).max({.to - .from}); say .substr($longest.from, $longest.to - $longest.from) } # my http://www.perlmonks.org/?node_id=903800 entry
19:46 p6eval rakudo 72cbad: OUTPUT«65␤»
19:48 colomon errr... that's not the correct answer, is it?
19:51 masak it isn't?
19:51 masak oh! "654"! :/
19:51 masak back to the drawing board. :)
19:54 benabik joined #perl6
19:55 masak I think that's just an off-by-one error.
19:55 masak rakudo: given "82665409266027476709324472" { my $diff = join "", map { ($^b - $^a) % 10 }, (.comb Z .comb.rotate); my $longest = $diff.comb(/9+ | 1+/, :match).max({.to - .from}); say .substr($longest.from, $longest.to - $longest.from + 1) }
19:55 p6eval rakudo 72cbad: OUTPUT«654␤»
19:56 masak rakudo: given "82665409266027476709324472" -> $seq { my $diff = join "", map { ($^b - $^a) % 10 }, ($seq.comb Z $seq.comb.rotate); my $longest = $diff.comb(/9+ | 1+/, :match).max({.to - .from}); say $seq.substr($longest.from, $longest.to - $longest.from + 1) }
19:56 p6eval rakudo 72cbad: OUTPUT«654␤»
19:56 justatheory joined #perl6
19:58 newbee rakudo: class Calendar { has Str $.file is rw; submethod BUILD($.file) { say $.file }; }; my $cal = Calendar.new(file=>'somefile.txt'); $cal.perl.say;
19:58 p6eval rakudo 72cbad: OUTPUT«somefile.txt␤Calendar.new(file => "somefile.txt")␤»
19:58 newbee rakudo: class Calendar { has Str $.file is ro; submethod BUILD($.file) { say $.file }; }; my $cal = Calendar.new(file=>'somefile.txt'); $cal.perl.say;
19:58 p6eval rakudo 72cbad: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in 'Calendar::BUILD' at line 7643:CORE.setting␤  in 'Calendar::BUILD' at line 22:/tmp/7eKADe1BUO␤  in main program body at line 22:/tmp/7eKADe1BUO␤»
19:58 newbee rakudo: class Calendar { has Str $.file is ro; }; my $cal = Calendar.new(file=>'somefile.txt'); $cal.perl.say;
19:58 p6eval rakudo 72cbad: OUTPUT«Calendar.new(file => "somefile.txt")␤»
19:59 newbee i don't quite get this behavoir.... when i declare a constructor, i can no longer write to an ro attribute with the function "new"
20:00 ymasory joined #perl6
20:00 newbee the idea is to write it once at construction time.
20:01 masak newbee: I agree that's a slightly unfair behaviour.
20:01 masak the internals get to assign to the 'ro' attribute, but user-provided BUILD methods don't.
20:02 TimToady I'm not aware of any 'ro' trait in Perl 6...
20:02 masak on the other hand, BUILD is just a normal submethod, which happens to assign to $.file; not necessarily at object creation time.
20:02 masak no, it's just that traits are not checked.
20:03 masak TimToady: Moose has 'ro'. maybe it's time for Perl 6 to follow suit?
20:04 diakopter (but isn't that the default?)
20:04 TimToady rakudo: class Calendar { has Str $.file is ro; submethod BUILD($!file) { say $!file }; }; my $cal = Calendar.new(file=>'somefile.txt'); $cal.perl.say;
20:04 p6eval rakudo 72cbad: OUTPUT«somefile.txt␤Calendar.new(file => "somefile.txt")␤»
20:04 masak rakudo: given "82665409266027476709324472" -> $seq { my $diff = ($seq.comb Z $seq.comb.rotate).map({ ($^b - $^a) % 10 }).join; my $longest = $diff.comb(/9+ | 1+/, :match).max({.to - .from}); say $seq.substr($longest.from, $longest.to - $longest.from + 1) }
20:05 TimToady use $! instead of $. in a submethod
20:05 newbee rakudo: class Calendar { has Str $!file is ro; submethod BUILD($!file) { say $!file }; }; my $cal = Calendar.new(file=>'somefile.txt'); $cal.perl.say;
20:05 p6eval rakudo 72cbad: OUTPUT«654␤»
20:05 p6eval rakudo 72cbad: OUTPUT«somefile.txt␤Calendar.new(file => "somefile.txt")␤»
20:05 TimToady otherwise you're trying to set $.file via a readonly virtual method
20:06 masak newbee: and note that it's not readonly because of 'ro', but by default.
20:06 masak newbee: the trait for readonliness is 'readonly'.
20:09 newbee mmm ok, i'll work with 'rw' only...
20:10 masak technically, that's all you need.
20:10 TimToady in fact, it should not let you use the $.file form in a submethod, according to S12:680
20:11 TimToady within a BUILD the object is not completely constructed, and virtual methods are likely to call a subclass whose BUILD hasn't been run yet
20:13 * masak .oO( "the policeman's BUILD is half-constructed" )
20:13 LoRe left #perl6
20:14 masak TimToady: is it fair to say that submethods work at the bang-twigil layer whereas proper methods work at the dot-twigil layer?
20:15 TimToady I would say that proper methods work at either level
20:15 TimToady depending on whether they want to talk to the abstract interface or the concrete interface of the object
20:16 TimToady proper methods have one hand inside the black box and one hand outside
20:16 masak oh, right. it's a limitation in Rakudo that objects can't change each others' private attrs...
20:17 TimToady well, we assume that a class trusts itself, but we do require private calls to a different object to go through the $obj!method interface
20:18 masak ...but if there's no !method, it defaults to the attr, no?
20:18 jnthn Private attrs don't imply a method
20:19 masak I know that.
20:19 LoRe joined #perl6
20:19 masak but there could be one, I guess.
20:19 TimToady presumably something underneath can figger out what the user wants
20:19 masak even if there's an attribute with that name.
20:19 masak rakudo: class A { has $!x; method !x { say "OH HAI" }; method foo { self!x } }; A.new.foo
20:19 p6eval rakudo 72cbad: OUTPUT«OH HAI␤»
20:19 jnthn TimToady: IIUC though, $obj!foo is not really allowed, it should be qualified?
20:20 TimToady well, unless it makes sense to default to the current class
20:21 jnthn Is it fair to say that privates are never virtual, though?
20:21 TimToady yes
20:22 jevin left #perl6
20:22 TimToady these are all, at worst, function calls
20:22 jnthn *nod*
20:22 jnthn OK
20:22 jnthn TimToady: It's not until now that I've really ahd the infrastructure to contemplate really implementing stuff like "trusts" and to be able to do privates properly.
20:23 masak pugs: class A {}; class B { trusts A }; say "alive"
20:23 p6eval pugs: OUTPUT«alive␤»
20:23 masak man, pugs is fast.
20:23 jnthn Haskell's got faster faster than Parrot's got faster, evidently.
20:24 TimToady yes, it had already optimized away the class declarations before you even typed them.  :)
20:24 masak of course Haskell is fast. no side effects, no processor heating. :P
20:25 LoRe left #perl6
20:26 [Coke] joined #perl6
20:29 LoRe joined #perl6
20:30 slavik so is pugs very active now?
20:30 tadzik (:
20:30 tadzik for some definition of active...
20:30 slavik how active is it compared to rakudo? :P
20:31 PerlJam slavik: it's approximately dead compared to rakudo
20:31 slavik :(
20:31 slavik maybe I should learn haskel
20:31 slavik i mean, I wanted to, but wanted to tie perl6 into it
20:31 TimToady learning Haskell is easy, I've done it five or six times now...
20:31 slavik D:
20:31 masak slavik: when you find out how Haskell works, please let us know. :)
20:32 slavik speaking of which, what is your opinion on it?
20:32 TimToady monads are too hard to lift
20:32 PerlJam haskell is a great language.
20:32 masak it's an eye-opener, for sure.
20:32 masak I think the difficulty of monads is over-hyped.
20:32 moritz it requires a major brain rewiring
20:32 TimToady any individual monad is fine
20:32 slavik aren't monads simply "do x, then y"constructs?
20:32 PerlJam the whole immutability thing takes a little while to get used to.
20:33 jnthn .oO( It'd take me a whole månad to learn them! )
20:33 masak TimToady: oh, you're talking about monad transformers. (hence, the "lift", I see...)
20:33 TimToady yes, it's sort of a pun
20:33 masak TimToady: haven't tried those much, I admit.
20:33 PerlJam masak: he's always punning don't you know
20:33 TimToady but I mean it seriously too
20:33 masak yeah. I know because we've had this exact conversation once before :P
20:33 slavik TimToady: so, when are you going to write STAR?
20:34 TimToady I thought I'd just write RATS and then play it backwards
20:34 slavik hmm
20:34 diakopter what's STAR
20:34 slavik but how will * look backwards?
20:34 moritz like this: *
20:34 masak !revetahw
20:34 masak rakudo: say "*".flip
20:35 p6eval rakudo 72cbad: OUTPUT«*␤»
20:35 PerlJam masak++
20:35 slavik "My favorite language is call STAR.  It's extremely concise.  It has exactly one verb '*', which does exactly what I want at the moment."
20:35 slavik a quote in my signature on ubunty forums :)
20:35 masak slavik: either I'm missing something, or you have very low requirements. :P
20:35 slavik ?
20:36 masak oh, nevermind. I'm just being deliberately obtuse.
20:36 slavik I am fairly active in the programming talk forum ;)
20:36 imamelia joined #perl6
20:36 TimToady well, the point is that the * language is heavily context dependent, so I can't tell you how much effort will go into setting up the context in any particular case
20:37 diakopter * * * * * *
20:37 slavik TimToady: do you remember what that was in response to? I can no longer find where it is.
20:37 TimToady the * in the STAR language just means "doit", but you have to tell it what "it" is via environment variables :)
20:37 slavik D:
20:37 masak I've been reading Perl 6 RFCs of late. it's interesting to see how the Perl 6 dream is coming true, but not at all with the syntax proposed in the RFCs. (thankfully!)
20:38 TimToady I don't remember when I mentioned STAR first; the idea actually comes out of GEB, if I recall
20:38 PerlJam Mu
20:38 masak there was some criticism that the "Implementation" sections almost never contained anything useful. I think knowing what we know today, that's easier to excuse. :)
20:39 PerlJam The trancendental cow goes "mu"
20:39 TimToady one could spend years blogging about the relationships of the RFCs to Perl 6
20:39 masak "Implementation: well, first we'll need a type system with a meta-object protocol..."
20:39 masak TimToady: yes, I'm tempted :)
20:40 PerlJam masak: you could use it as the basis for a PhD!  ;)
20:41 TimToady and then you could lecture to nearly-empty classrooms about it for the rest of your life
20:41 PerlJam Just like higher math
20:42 masak you make it sound so tempting.
20:42 TimToady frankly, we like your bugs
20:42 masak awww <3
20:42 sbp hehe
20:43 rgrau left #perl6
20:43 masak oh wait, this is the Unicode channel.
20:43 sbp .u heart
20:43 phenny U+2766 FLORAL HEART (❦)
20:43 masak awww ♥
20:43 sbp .u white heart
20:43 phenny U+2661 WHITE HEART SUIT (♡)
20:43 TimToady otoh we could use someone to dredge through the RFCs and see if we've overlooked anything
20:43 masak yeah.
20:43 masak I wouldn't mind doing it, and blogging. in practice, I've already started.
20:45 masak see http://strangelyconsistent.org/blog/speaking-hypothetically-in-perl-6
20:45 TimToady and any sidebars on how Perl 5 solved it differently (and why they *had* to solve it differently) would also be of great interest
20:45 masak aye.
20:46 TimToady some problems may be solved *only* by invoking Second System effects
20:47 TimToady otherwise your legacy ties you down forever; cf chromatic
20:47 TimToady 's latest blog
20:47 diakopter oh, doh, thought you were punning
20:47 masak yeah, don't ruin it for us here! :P
20:48 * masak goes back to visualizing chromatic with rope
20:48 TimToady as I was reading the blog, I kept thinking "new wine in old wineskins"
20:48 masak TimToady: what, you've also been rolling your eyes over old Perl versions?
20:50 diakopter .u black heart
20:50 phenny U+2665 BLACK HEART SUIT (♥)
20:50 diakopter depending on your terminal...
20:50 masak anyone know a university that would give me a PhD salary in exchange for reading RFCs and running Perl 6 code all day?
20:53 masak (not really serious, I like my current vocation)
20:53 birdwindupbird left #perl6
20:55 * jnthn breathes a sigh of relief :)
20:57 saaki joined #perl6
20:59 masak "welcome, masak, to our compa... hey! come back!"
21:00 jnthn :P
21:00 jnthn we, er, didn't book any train tickets :)
21:01 mj41 joined #perl6
21:02 jnthn er, wrong window
21:07 TimToady I thought it was cute that J's "op/\" also gets a picture of a triangle in there like [\op] does
21:09 newbee left #perl6
21:11 dju__ joined #perl6
21:15 dju_ left #perl6
21:26 PhatEddy left #perl6
21:30 [1]imamelia joined #perl6
21:30 imamelia left #perl6
21:30 [1]imamelia is now known as imamelia
21:37 cognominal left #perl6
21:40 kaare_ left #perl6
21:44 imamelia left #perl6
21:47 dalek rakudo: 85f0df2 | pmichaud++ | Configure.pl:
21:47 dalek rakudo: Have Configure.pl automatically create a "config.status" file on output
21:47 dalek rakudo: that contains the command options used.
21:47 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/85f0df2fb4
21:48 wamba left #perl6
21:49 masak '♞, #perl6.
21:49 masak left #perl6
21:52 imamelia joined #perl6
21:59 bluescreen10 left #perl6
22:06 Su-Shee_ joined #perl6
22:09 Su-Shee left #perl6
22:13 dalek rakudo: e801644 | pmichaud++ | Configure.pl:
22:13 dalek rakudo: Fixes to --makefile-timing flag:
22:13 dalek rakudo:   - If a recipe has a leading @, be sure to preserve it in leading position;
22:13 dalek rakudo:     i.e.,   "@time perl ..."  and not "time @perl ..."
22:13 dalek rakudo:   - Don't time "echo" commands in the makefile recipes
22:13 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/e801644ba9
22:25 benabik left #perl6
22:37 mj41 left #perl6
22:39 dalek rakudo: 08e717b | pmichaud++ | Configure.pl:
22:39 dalek rakudo: \1 better written as $1 at Configure.pl line 181.
22:39 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/08e717b6b5
22:41 donri left #perl6
22:46 cdarroch left #perl6
22:47 slavik left #perl6
22:47 dorlamm joined #perl6
22:55 dju__ is now known as dju
22:57 mtk left #perl6
22:58 mtk joined #perl6
22:58 slavik joined #perl6
23:04 dorlamm left #perl6
23:06 awoodland joined #perl6
23:11 whiteknight joined #perl6
23:14 rgrau joined #perl6
23:19 tty234 left #perl6
23:19 tty234 joined #perl6
23:25 awoodland left #perl6
23:42 dalek std: 11bafbe | larry++ | STD.pm6:
23:42 dalek std: catch miscontextualized attrs, has/method decls
23:42 dalek std: review: https://github.com/perl6/std/commit/11bafbe818
23:43 jnthn -    rule method_def () {
23:43 jnthn +    rule method_def ($d) {
23:43 jnthn hey, nice :)
23:44 jnthn TimToady: I'll have the various other worries, but I won't implement them like that.
23:44 jnthn TimToady: It's fine for STD, but I have a LOT more detailed information to hand. Like, the actual meta-object to ask what it can do. :)
23:45 jnthn +      given $*SCOPE {
23:45 jnthn Did you mean given $*IN_DECL?
23:46 jnthn method ain't a $*SCOPE...
23:46 jnthn Unless I'm missing some other change.
23:47 jnthn $*IN_DECL feels a tad risky though.
23:47 jnthn method foo() { return sub { $!x } }
23:55 Chillance left #perl6
23:57 dawud joined #perl6

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

Perl 6 | Reference Documentation | Rakudo