Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-09-22

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:00 ash_ i just merged your master, was the change to try.js mostly to add <kbd> tags?
00:04 flussence yeah, nothing important
00:06 _sri left #perl6
00:08 _sri joined #perl6
00:08 peters_mops left #perl6
00:08 peters_mops joined #perl6
00:08 ilogger2 left #perl6
00:08 ash_ hmm, did that make the syntax highlighting stop working for you?
00:08 jnthn left #perl6
00:08 nine left #perl6
00:08 DemoFreak left #perl6
00:08 jnthn joined #perl6
00:09 nine joined #perl6
00:09 ilogger2 joined #perl6
00:09 flussence yeah it did, my bad :(
00:10 ash_ no worries, i'll fix it
00:10 flussence k
00:11 DemoFreak joined #perl6
00:12 sftp left #perl6
00:13 ash_ if you have any suggestions for a redesign or anything let me know
00:13 flussence I think it's pretty nice as it is now
00:13 ash_ i am not a designer at all
00:13 flussence I'm not much of one either :)
00:14 mathw left #perl6
00:15 mathw joined #perl6
00:21 ash_ flussence++ thanks for helping
00:21 * ash_ bbl, apparently i am going to dinner now
00:21 _sri left #perl6
00:22 _sri joined #perl6
00:26 cdarroch left #perl6
00:27 c0d3d joined #perl6
00:33 peters_mops left #perl6
00:33 nine left #perl6
00:34 nine joined #perl6
00:34 peters_mops joined #perl6
00:34 x3nU left #perl6
00:34 x3nU joined #perl6
00:51 stkowski left #perl6
01:20 hudnix rakudo: class A  {has $.prev = self;}; A.new.perl.say;
01:20 p6eval rakudo 750a02: OUTPUT«PackFile_unpack: This Parrot cannot read bytecode files with version 8.4.␤␤PackFile header failed during unpack␤»
01:20 hudnix rakudo: say "hello"
01:20 p6eval rakudo 750a02: OUTPUT«PackFile_unpack: This Parrot cannot read bytecode files with version 8.4.␤␤PackFile header failed during unpack␤»
01:20 hudnix oops?
01:21 flussence hudnix: it's broken right now, "star: " might work though
01:21 hudnix star: class A  {has $.prev = self;}; A.new.perl.say;
01:21 p6eval star 2010.07: OUTPUT«maximum recursion depth exceeded␤  in 'Mu::item' at line 1186:CORE.setting␤  in 'Mu::item' at line 1188:CORE.setting␤  in '&infix:<=>' at line 1␤  in 'Cool::substr' at line 2181:CORE.setting␤  in <anon> at line 1202:CORE.setting␤  in 'Any::join' at line 1␤  in 'Mu::attribs' at
01:21 p6eval ..line…
01:22 hudnix .perl doesn't like self references :)
01:35 leprevost joined #perl6
01:39 redicaps joined #perl6
01:43 redicaps perl6: say 1 , 3  ...
01:43 p6eval pugs: OUTPUT«(timeout)»
01:43 p6eval ..rakudo 750a02: OUTPUT«PackFile_unpack: This Parrot cannot read bytecode files with version 8.4.␤␤PackFile header failed during unpack␤»
01:43 TimToady std: say 1 , 3  ...
01:43 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Bogus term at /tmp/q630dsJ0rx line 1 (EOF):␤------> [32msay 1 , 3  ...[33m⏏[31m<EOL>[0m␤Parse failed␤FAILED 00:01 117m␤»
01:44 redicaps perl6: say 1, 3 , 5 .. 11;
01:44 p6eval pugs: OUTPUT«13567891011␤»
01:44 p6eval ..rakudo 750a02: OUTPUT«PackFile_unpack: This Parrot cannot read bytecode files with version 8.4.␤␤PackFile header failed during unpack␤»
01:46 redicaps left #perl6
01:47 c0d3d left #perl6
02:00 Chillance left #perl6
02:10 araujo left #perl6
02:16 araujo joined #perl6
02:20 Italian_Plumber left #perl6
02:26 ash_ whats wrong with rakudo?
02:26 leprevost left #perl6
02:28 meppl left #perl6
02:32 plobsing looks like rakudo needs to be recompiled
02:35 plobsing hmmm... 8.4 is the latest PBC version. somehow rakudo got out of synch with whatever parrot is running it.
02:36 ash_ i bet its because they bumped the parrot revsion
02:37 ash_ when parrot jumps up a pbc version you have to delete the install folder (or i do, as a simple solution) and then it works fine
02:38 plobsing the weird thing is, that message means perl6.pbc is PBCv8.4, which is the latest.
02:38 plobsing that means rakudo was compiled with a later version of parrot than the one running it.
02:46 plainhao left #perl6
02:47 ash_ i don't know why it does it but it seems to any time parrot bumps the pbc version
02:48 ash_ left #perl6
02:51 jaldhar joined #perl6
02:58 leprevost joined #perl6
02:59 dju_ joined #perl6
02:59 dju left #perl6
03:01 jaldhar left #perl6
03:01 jaldhar joined #perl6
03:03 justatheory left #perl6
03:08 pythonian4000 is now known as pythonian4000afk
03:15 leprevost left #perl6
03:21 leprevost joined #perl6
03:31 shade\ left #perl6
03:40 dju_ left #perl6
03:43 dju joined #perl6
03:51 Raynes left #perl6
03:52 Raynes joined #perl6
03:53 DemoFreak left #perl6
03:55 thowe star: <something Another>
03:55 p6eval star 2010.07:  ( no output )
03:55 thowe star: say <something Another>
03:55 p6eval star 2010.07: OUTPUT«somethingAnother␤»
03:55 thowe star: say ~<something Another>
03:55 p6eval star 2010.07: OUTPUT«something Another␤»
03:55 thowe why?
03:56 thowe why does putting the tilde in front of the list make them evaluate with a space between them?
03:56 thowe this is in the perl6 book with no apparent explanation
03:57 plobsing star: (<x y z>).WHAT.say
03:57 p6eval star 2010.07: OUTPUT«Parcel()␤»
03:57 plobsing star: (~<x y z>).WHAT.say
03:57 p6eval star 2010.07: OUTPUT«Str()␤»
03:58 plobsing parcel handles its own printing, but stringifies differently
03:58 plobsing or something like that
03:58 thowe why does putting the ~ in front of it make it "strigified"?
03:59 thowe er stringified
03:59 plobsing IIRC, unary ~ is the string context operator
03:59 thowe is it because it is the string concat operator?
03:59 thowe :)
04:00 thowe some days I almost fee adequate
04:00 thowe so I could also...
04:00 thowe star: say ~ <something Another>
04:01 p6eval star 2010.07: OUTPUT«something Another␤»
04:01 thowe so the lack of the space was stylistic
04:01 DemoFreak joined #perl6
04:09 diakopter pugs: say 1 ...
04:10 p6eval pugs: OUTPUT«(timeout)»
04:10 diakopter heh
04:10 diakopter phenny: ask moritz_ you around? ;)
04:10 phenny diakopter: I'll pass that on when moritz_ is around.
04:10 thowe is there some way to get a list of methods an object supports?
04:11 plobsing star: Str.^methods.say
04:11 p6eval star 2010.07:
04:11 p6eval ..OUTPUT«StrIntpredBoolencodesuccNumACCEPTSWHICHp​erlcapitalizepredatanhexpcoseclcp5chopcharsto-rad​ianssinhacotanlcfirstrootslinessectrimasectrim-le​adingcotanhcisloglog10sechrandsprintftruncatebyte​ssinsqrtasincoshsuccsignasinhabsacosechucceilingu​npolarsamecasefloorsubstrasechordroundflipspli…
04:12 plobsing star: Str.^methods.join(' ').say
04:12 p6eval star 2010.07: OUTPUT«Int pred Bool encode succ Num WHICH perl ACCEPTS Str ucfirst comb tan atan cos acos fmt eval trans chop rindex tanh subst Numeric chomp index IO chr acotanh trim-trailing from-radians capitalize pred atanh exp cosec lc p5chop chars sinh to-radians acotan lcfirst roots lines sec
04:12 p6eval ..tri…
04:13 thowe I was looking for Str.
04:13 thowe When returning the object as a different class, is it the normal thing than for that method to be capitalized?
04:14 thowe I didn't ask that right, but maybe you get the idea
04:14 plobsing I think by convention type names start with a upper case. Also by convention, coercion routines are the typename to which they coerce.
04:14 thowe sweet
04:15 thowe "Parcel" is a new one on me
04:16 plobsing I'd look that one up in the spec.
04:32 Patterner left #perl6
04:32 Psyche^ joined #perl6
04:32 Psyche^ is now known as Patterner
04:44 dju left #perl6
04:44 dju joined #perl6
04:46 barika left #perl6
04:49 dju_ joined #perl6
04:49 dju_ left #perl6
04:49 dju_ joined #perl6
04:49 dju left #perl6
05:16 Raynes left #perl6
05:20 dju joined #perl6
05:21 dju_ left #perl6
05:28 Raynes joined #perl6
05:30 aloha left #perl6
05:30 bacek left #perl6
05:32 Mowah joined #perl6
05:39 nymacro joined #perl6
05:45 \xF0 left #perl6
05:46 \xF0 joined #perl6
05:50 thowe left #perl6
06:04 wtw joined #perl6
06:05 ascent_ left #perl6
06:07 sorear good * #perl6
06:08 sorear wow, so much backlog in the last 21h that irssi's buffer has overflown
06:09 proller left #perl6
06:09 proller joined #perl6
06:09 barika joined #perl6
06:11 mberends left #perl6
06:20 sorear oh nice, CPAN6 ball is finally rolling.
06:20 * sorear wonders how GLOBAL merging interacts with BEGIN and eval
06:21 moritz_ good morning
06:21 phenny moritz_: 04:10Z <diakopter> ask moritz_ you around? ;)
06:21 moritz_ diakopter: yes
06:21 diakopter :)
06:24 diakopter moritz_: I think I forgot my question
06:25 diakopter anyone: what is GLOBAL merging
06:25 moritz_ diakopter: happens :-)
06:28 diakopter or, where is GLOBAL merging mentioned in the S
06:33 * moritz_ never heard of it, and thinks it's an implementation detail
06:33 sorear S02:2622
06:34 sorear basically, a compilation unit is only supposed to see GLOBAL symbols at BEGIN time if they are defined in a unit that the unit uses
06:36 diakopter ah.
06:38 pythonian4000afk is now known as pythonian4000
06:41 pythonian4000 left #perl6
06:48 Mowah left #perl6
07:00 synth left #perl6
07:13 Ross joined #perl6
07:13 Ross left #perl6
07:13 Ross joined #perl6
07:25 plobsing left #perl6
07:26 barney joined #perl6
07:35 Ross left #perl6
07:36 linux-m00n joined #perl6
07:48 Alias_ Dear
07:48 Alias_ - 'Moritz Lenz <moritz@faui2k3.org>'
07:48 Alias_ - 'Johan Viklund <johan.viklund@gmail.com>'
07:49 Alias_ Please stop breaking CPAN with your Perl 6 modules
07:49 Alias_ KTHNKSBYE
07:49 Alias_ Re: http://search.cpan.org/dist/JSON-Tiny/
07:50 tadzik joined #perl6
07:51 tadzik gmorning
07:54 mathw lo tadzik
07:56 moritz_ Alias_: after I uploaded JSON-Tiny, we've discussed the matter, and I asked several times if I should do something about it. No response from you.
07:56 moritz_ nor from anybody else on #toolchain
07:57 bacek joined #perl6
07:57 moritz_ so it can't be that severe a breakage
07:57 moritz_ KTHXBYE
08:02 sorear Hi Alias_
08:04 sorear Alias_: What is your current position on http://use.perl.org/~Alias/journal/35508 ?
08:04 aloha joined #perl6
08:05 sorear ("Why Perl 6 scares the hell out of me" / the perils of a culture of late binding as seen from the toolchaineer's POV)
08:09 szabgab left #perl6
08:10 szabgab joined #perl6
08:14 Alias_ sorear: Largely unchanged
08:15 Alias_ And the slow spread of Devel::Declare into trivial domains is proving my point
08:15 Alias_ Exporter::Declare...
08:15 Alias_ Anything that uses Devel::Declare is unparsable by PPI
08:18 Alias_ Or at least, the parse tree is semantically unuseful
08:18 * sorear likes the way that Perl 6 has more or less done away with sub import
08:20 sorear if I understand what's being said on #p5p right now
08:20 hudnix left #perl6
08:21 sorear Nicholas, Steffen: You're free to use PAUSE, but don't break the CPAN indexer (use separate dirs)
08:21 Alias_ Use no_index probably, as it was designed
08:21 Alias_ properly
08:22 moritz_ what's the relation between toolchain and the ability to statically parse a file?
08:22 kjeldahl joined #perl6
08:22 Alias_ moritz_, not a huge amount
08:22 Alias_ Well, depeneds
08:22 sorear moritz_: SPOT
08:22 Alias_ The Perl 5 #toolchain is the stack of stuff you need to install and load modules
08:22 hudnix joined #perl6
08:22 moritz_ sorear: what is SPOT?
08:23 Alias_ It deals with complete, working code
08:23 Alias_ So no real need for parsing
08:23 sorear moritz_: single point of truth
08:23 Alias_ PPI and friends are part of the larger language tooling ecosystem
08:23 Alias_ Editors, analysis
08:23 Alias_ Developer toosl
08:23 Alias_ The two are for the most part orthagonal
08:23 sorear moritz_: any metadata which is maintained separately from the code is evil and a bug waiting to happen
08:23 moritz_ sorear: the compiler should provide the single point of truth
08:24 Alias_ moritz_, how do you know anything about uncompilable code?
08:24 moritz_ Alias_: you don't
08:25 Alias_ How do you syntax highlight
08:25 Alias_ Or anything else
08:25 Alias_ You can only syntax highight when the code legally compiles?
08:25 Alias_ If so, how do you syntax highlight BEGIN { while 1 { $_++ } }
08:25 moritz_ well, there will always be tradeoffs one way or another
08:26 Alias_ That way lies the tooling approach of smalltalk
08:26 mjk joined #perl6
08:26 Alias_ Now, if you're happy to be a smalltalk like language, that's fine
08:26 Alias_ If you want "normal" editors, well too ahd
08:26 Alias_ bad
08:26 Alias_ The majority of successful languages are, however, NOT like smalltalk
08:26 sorear BEGIN { *foo = (rand > 0.5) ? sub(){} : sub {} }; foo / ...
08:27 Alias_ BEGIN { exit unless christmas }
08:27 moritz_ is C a successful language, in your definition?
08:27 * sorear likes a trend away from BEGIN
08:28 moritz_ you can't syntax highlight C properly unless you expand all macros
08:28 moritz_ so, people use approximations
08:28 Alias_ Are macros turing complete?
08:28 moritz_ seems to work, mostly
08:28 moritz_ no idea
08:28 Alias_ C and Perl 5 are about the same
08:28 moritz_ probably not
08:28 Alias_ Smalltalk is worse
08:28 Alias_ And on that note, I have Roller Derby training :)
08:29 sorear C macros are not Turing complete; they are limited to LINSPACE
08:29 Alias_ sorear: Next time, please notify me when you're having meetings
08:29 moritz_ I do see the danger in grammar changes
08:29 Alias_ Later
08:29 Alias_ moritz_, and therein lies the great danger. Most people don'
08:29 Alias_ t
08:29 * Alias_ &
08:30 [hudnix] joined #perl6
08:30 moritz_ I guess it's a cultural thing; people will experiment with them; there will be huge hype; there will be a backslash; in the end, a workable equillibrium will be found.
08:30 sorear I guess the thing to do at this point is to e-mail Alias the new plan
08:30 sorear and pmichaud
08:30 barney left #perl6
08:30 moritz_ just like it is/was with junctions: people think they are great; then they overuse them
08:31 moritz_ and finally they find out that they have their uses, but that the use cases are fairly limited
08:32 sorear I find that there's a very large overlap between cases where junctions are useful, and cases where an even slightly smart compiler can statically eliminate them
08:32 sorear sub dir(Mu $filter = none('.', '..')) is the most difficult useful case I've seen
08:34 hudnix left #perl6
08:35 moritz_ things like @list.grep(Int & * %% 2)  can also be nice
08:35 dju left #perl6
08:35 dju_ joined #perl6
08:35 bacek left #perl6
08:37 sorear I think I'll invent an is-smartmatch-represented-as-closure parameter trait, and let gradual typing take care of that.
08:39 daxim joined #perl6
08:41 dakkar joined #perl6
08:42 aloha left #perl6
08:43 wallberg joined #perl6
08:47 moritz_ http://ideone.com/Bqzvw another way to run Perl 6 in the browser... seems to use the 2010.08 release
08:55 moritz_ rakudo: .say for dir()
08:55 p6eval rakudo 750a02: OUTPUT«PackFile_unpack: This Parrot cannot read bytecode files with version 8.4.␤␤PackFile header failed during unpack␤»
08:56 tadzik :)
08:56 tadzik I hate this
08:56 * moritz_ too
08:57 timbunce joined #perl6
08:57 moritz_ rakudo on p6eval will be unavailbe until ./wipe-and-rebuild-rakudo.sh has finished :-)
09:00 moritz_ phenny: tell masak about a feature request for <http://strangelyconsistent.org/>: RSS or Atom feed. That way we could add it to planetsix again.
09:00 phenny moritz_: I'll pass that on when masak is around.
09:00 mberends joined #perl6
09:03 moritz_ rakudo: b0rked
09:03 p6eval rakudo : OUTPUT«sh: ../p/bin/perl6: No such file or directory␤»
09:04 aloha joined #perl6
09:08 dju_ left #perl6
09:09 ascent_ joined #perl6
09:10 hirschnase joined #perl6
09:14 moritz_ rakudo: b0rked
09:14 p6eval rakudo : OUTPUT«Could not find sub &b0rked␤  in main program body at line 22:/tmp/bpit6tJ4uF␤»
09:16 moritz_ rakudo: say 1
09:16 p6eval rakudo 750a024: OUTPUT«1␤»
09:17 sundar joined #perl6
09:19 dju joined #perl6
09:21 icwiener joined #perl6
09:21 tadzik rakudo: say .WHAT
09:21 p6eval rakudo 750a024: OUTPUT«Any()␤»
09:27 tadzik heh, I don't feel worried about try.rakudo.org anymore: http://i.imgur.com/Thi1Z.png
09:31 Trashlord left #perl6
09:34 Trashlord joined #perl6
09:35 wallberg left #perl6
09:40 sorear phenny: tell pmichaud Alias says that he never got the memo re. #cpan6sketch; now that that's cancelled, would you add him to your contact list?  Thanks.
09:40 phenny sorear: I'll pass that on when pmichaud is around.
09:40 wamba joined #perl6
09:41 sjn left #perl6
09:41 sjn_ left #perl6
09:41 sjn joined #perl6
09:41 wamba left #perl6
09:42 wallberg joined #perl6
09:42 moritz_ #cpan6sketch is cancelled?
09:42 moritz_ who cancelled it, when and why?
09:43 sjn_ joined #perl6
09:47 moritz_ phenny: tell pmichaud you added Milan.pm and BristolBath.pm as suggestions for release names to release-guide.pod. What's the background? (It seems that finding a release name is indeed the hardest part of a release these days :-)
09:47 phenny moritz_: I'll pass that on when pmichaud is around.
09:50 nymacro rakudo: enum Test <1 2 3 4 5>; Test.pick(2);
09:50 p6eval rakudo 750a024: OUTPUT«No candidates found to invoke for method 'pick' on object of type 'EnumMap'; available candidates have signatures:␤:(Mu : Whatever ;; *%_)␤:(Mu : Any $num = { ... };; *%_)␤␤  in 'pick' at line 1029:CORE.setting␤  in main program body at line 22:/tmp/qJA1qea11R␤»
09:50 nymacro is this supposed to work?
09:50 moritz_ it is
09:53 moritz_ rakudo: enum Test <1 2 3 4 5>; say Test.enums.keys.pick(2)
09:53 p6eval rakudo 750a024: OUTPUT«53␤»
09:55 nymacro moritz_: cheers. Perl 6 book had example using pick as I did, but I guess it isn't absolutely correct
09:56 moritz_ nymacro: right; we should add a warning that it doesn't work at the moment
09:57 tadzik rakudo: enum Test <1 2 3 4 5>; say Test.WHAT # correct?
09:57 p6eval rakudo 750a024: OUTPUT«()␤»
09:57 moritz_ no; also known
09:57 tadzik so .enums is a workaround?>
09:57 moritz_ right
09:58 tadzik saner
09:58 moritz_ but it's spec that .enums works
09:58 nymacro its useful to know; I searched some stuff quickly but didn't really find anything documenting it as broken. But I probably didn't search well enough. Cheers for the heads up
09:59 moritz_ nymacro: with "known" I mean that masak (who implemented much of the enums stuff) knows about, and I do too :-)
09:59 moritz_ it might well not be documented anywyere
10:00 Italian_Plumber joined #perl6
10:03 tadzik there is a Parrot opcode for GCD, wouldn't it be nice to have a sub/method for that?
10:03 toebu has created the LIS2010 slides tobi.oetiker.ch/test/p6-tutorial.pdf ... did I miss any essential perl6 thing (I focus on stuff that is working in rakudo)
10:05 tadzik does -gen-parrot work, not only --gen-parrot?
10:05 tadzik toebu: also, it very much depends on what you mean by Essential Perl 6 Thing
10:06 nymacro toebu: first slide: making not makeing
10:06 nymacro :>
10:07 toebu nymacro reload :-)
10:07 tadzik on my R* slides I mentioned: Typing, OOP, Sigils, Everything's a reference, Signatures, MAIN sub, Junctions, Laziness, try-CATCH and Grammars
10:07 tadzik though I was mainly targeting to make Perl 5 programmers curious
10:08 toebu tadzik -gen-parrot it did work when I tested it in august :-) ...
10:09 moritz_ 31-eq-test.p6 could use some horizontal aligning
10:09 moritz_ toebu: that's probably a left-over from Getopt::Long used in Configure.pl, but the canonical spelling should be --gen-parrot
10:10 moritz_ "Perl6 has no undef. Use Mu, Any, Str, Number."
10:10 moritz_ Number is not a built-in type
10:10 toebu --gen-parrot seems to be 'the right thing'
10:12 moritz_ and btw rakudo supports regex modifiers directly after the m now
10:12 moritz_ so m{ :i ... }  can also be written m:i{ ... }
10:12 toebu moritz_ fixed
10:12 toebu moritz_ regexp ... cool
10:13 moritz_ and the | in perl 5 regexes corresponds more to || in Perl 6
10:13 moritz_ (though rakudo doesn't distinguish the two yet)
10:13 moritz_ | is supposed to match the longest alternative
10:14 toebu goes for lunch ... will back in 2h
10:15 moritz_ # rule implies sigspace  # should be :sigspace, IMHO
10:15 moritz_ it might to worth mentioning that .pick(*) is shuffling
10:16 moritz_ s/Fibonatchi/Fibonacci/
10:16 moritz_ otherwise very nice. toebu++
10:18 masak joined #perl6
10:19 masak greetings, metacamels.
10:19 phenny masak: 09:00Z <moritz_> tell masak about a feature request for <http://strangelyconsistent.org/>: RSS or Atom feed. That way we could add it to planetsix again.
10:19 masak moritz_: that is indeed my next planned feature.
10:19 masak and for exactly that reason.
10:23 leprevost left #perl6
10:25 mathw o/ masak
10:26 wallberg left #perl6
10:28 masak \o
10:28 masak it's odd, almost everybody loves PDFs... except for the Semantic Web posse, who hates it. http://www.flickr.com/photos/dullhunk/3367901850/
10:28 masak s/who/which/
10:30 mathw I only like PDFs for carting print layout stuff around
10:30 mathw For non-print applications they're pretty terrible
10:32 daxim ↑ what he said
10:34 masak nod -- I use PDFs for replicating layouts. I use it for presentations, but now HTML5 seems to be a compelling competitor.
10:36 wamba joined #perl6
10:37 sundar left #perl6
10:39 sundar joined #perl6
10:42 masak try.rakudo.org made solidot: http://developers.solidot.org/a​rticle.pl?sid=10/09/22/0144241
10:43 moritz_ load average on feather3 still low
10:44 tadzik a comment: If this has JIT, HTML6 have to join a local code buffer.
10:44 tadzik From Google translate, but I have no idea what this guy means
10:44 masak tadzik: sounds like the usual senseless jibe.
10:45 tadzik like "If it's fast I'm a queen of Scotland"?
10:46 Italian_Plumber left #perl6
10:46 masak maybe :)
10:48 mathw there's only one Queen of Scotland
10:48 mathw it's an invalid comparison
10:53 masak left #perl6
10:55 nymacro rakudo: enum A <1 2 3>; enum B <a b c>; say A.enums.keys; say B.enums.keys;
10:55 p6eval rakudo 750a024: OUTPUT«abc␤abc␤»
10:55 nymacro I'm guessing enums are completely screwed at the moment :/
10:58 nymacro_ joined #perl6
11:00 nymacro left #perl6
11:00 nymacro_ is now known as nymacro
11:02 ggoebel left #perl6
11:05 ggoebel joined #perl6
11:07 ggoebel left #perl6
11:10 envi^home joined #perl6
11:12 cls_bsd left #perl6
11:12 cls_bsd joined #perl6
11:30 icwiener left #perl6
11:39 moritz_ oh ouch
11:39 masak joined #perl6
11:40 * moritz_ submits rakudobug
11:41 moritz_ nymacro++ # finding bugs
11:41 masak oh ouch, yes :/
11:41 masak probably easily fixable, though.
11:42 masak I'll have a look at that today; would be nice to release with as few new flaws as possible.
11:42 masak we're really lacking in enums tests, too. maybe I should pair up with someone to get that part done...
11:43 moritz_ we have lots of enum tests :-)
11:43 moritz_ just not many passing tests
11:43 moritz_ and not many for the new spec
11:43 masak right.
11:44 masak ash_: maybe hook 'next' and 'redo' to chapter navigation in try.rakudo.org? just a thought.
11:44 Kodi joined #perl6
11:44 nymacro rakudo doesn't come with complete test suite?
11:44 masak nymacro: we're working on the "complete" part.
11:44 nymacro :)
11:45 masak it's more complete now than it ever was.
11:45 moritz_ rakudo runs only those tests by default of which we know that they are passing
11:45 masak we hit 32k not long ago.
11:45 Kodi phenny: tell pmichaud that in perl6scalar-cleanup, I've what few changes seemed necessary, and all spectests pass. Any reason not to merge into master?
11:45 phenny Kodi: I'll pass that on when pmichaud is around.
11:45 masak 32k passing tests, that is.
11:46 plobsing joined #perl6
11:47 masak std: say 1 , 3  ... # from backlog
11:47 p6eval std : OUTPUT«[31m===[0mSORRY![31m===[0m␤Bogus term at /tmp/qFNvJqL5Hd line 1 (EOF):␤------> [32msay 1 , 3  ... # from backlog[33m⏏[31m<EOL>[0m␤Parse failed␤FAILED 00:01 117m␤»
11:47 toebu moritz_ thanks for the review ... I have integrated your suggesttions ... updated tutorial is on http://tobi.oetiker.ch/test/p6-tutorial.pdf
11:47 masak seems "Bogus term" here could be awesomized into "You think that infix:<...> can be used without an rhs, but it can't. Use * instead."
11:50 moritz_ or it could be "missing term"
11:51 linux-m00n left #perl6
11:53 masak <Alias_> sorear: Next time, please notify me when you're having me
11:53 masak apparently, we still suck at this. :/
11:53 masak s/me/meetings/ # mis-copypaste :(
11:54 Alias_ Yes, you do
11:54 masak Alias_: #cpan6sketch every Tuesday at UTC 16:00.
11:54 Alias_ ok
11:54 snearch joined #perl6
11:54 masak Alias_: at this juncture, you're the most important person to have there during the meeting.
11:57 masak rakudo: enum Test <1 2 3 4 5>; Test.pick(2)
11:57 p6eval rakudo 750a024: OUTPUT«No candidates found to invoke for method 'pick' on object of type 'EnumMap'; available candidates have signatures:␤:(Mu : Whatever ;; *%_)␤:(Mu : Any $num = { ... };; *%_)␤␤  in 'pick' at line 1029:CORE.setting␤  in main program body at line 22:/tmp/14TU3Kynv0␤»
11:57 masak wtf? that should not happen after the enums patch.
11:57 * masak digs in
11:58 moritz_ .pick hasn't ever worked after the enums patch
11:59 masak it's defined here: http://github.com/rakudo/rakudo/​blob/master/src/glue/enum.pm#L12
11:59 moritz_ I know I've seen that line, and wondered why it doesn't work
11:59 masak a guess:
11:59 masak it works, but the call it makes doesn't.
12:00 moritz_ note that .pick(:$replace) should really be .roll
12:00 masak that, too.
12:00 sftp joined #perl6
12:00 masak rakudo: my $enummap = enum <a b c>; say $enummap.pick()
12:00 p6eval rakudo 750a024: OUTPUT«b 1␤»
12:00 masak rakudo: my $enummap = enum <a b c>; say $enummap.pick(2)
12:00 p6eval rakudo 750a024: OUTPUT«b 1a      0␤»
12:00 masak huh.
12:01 masak so much for that guess.
12:01 timbunce left #perl6
12:05 masak rakudo: enum Test <1 2 3 4 5>; say for Test.^methods
12:05 p6eval rakudo 750a024: OUTPUT«␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤​␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤»
12:06 masak rakudo: enum Test <1 2 3 4 5>; say for Test.^methods(:local)
12:06 p6eval rakudo 750a024: OUTPUT«␤␤␤␤␤»
12:06 moritz_ .say
12:06 moritz_ rakudo: enum Test <1 2 3 4 5>; ssay for Test.^methods(:local)
12:07 p6eval rakudo 750a024: OUTPUT«Could not find sub &ssay␤  in <anon> at line 22:/tmp/y06xRswHPX␤  in main program body at line 1␤»
12:07 moritz_ rakudo: enum Test <1 2 3 4 5>; .say for Test.^methods(:local)
12:07 p6eval rakudo 750a024: OUTPUT«WHAT␤enums␤Str␤Method 'say' not found for invocant of class 'Perl6MultiSub'␤  in <anon> at line 22:/tmp/UsMPjDrwmm␤  in main program body at line 1␤»
12:07 masak rakudo: enum Test <1 2 3 4 5>; say .name for Test.^methods
12:07 p6eval rakudo 750a024: OUTPUT«WHAT␤enums␤Str␤pick␤ACCEPTS␤can␤isa␤does​␤list␤ACCEPTS␤Str␤Numeric␤Seq␤all␤any␤one␤none␤​join␤elems␤flat␤map␤sort␤rotate␤first␤grep␤reve​rse␤end␤min␤max␤minmax␤pick␤roll␤classify␤reduc​e␤uniq␤kv␤keys␤values␤pairs␤postcircumfix:<[ ]>␤at_pos␤postcircumfix:<{
12:07 p6eval ..}>␤at_key␤clone␤defined␤bless…
12:07 masak rakudo: enum Test <1 2 3 4 5>; say .name for Test.^methods(:local)
12:07 p6eval rakudo 750a024: OUTPUT«WHAT␤enums␤Str␤pick␤ACCEPTS␤»
12:07 masak std: say
12:07 p6eval std : OUTPUT«Potential difficulties:␤  Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/oAZ5stvMB1 line 1:␤------> [32msay[33m⏏[31m<EOL>[0m␤ok 00:02 114m␤»
12:07 masak rakudo: say
12:07 p6eval rakudo 750a024: OUTPUT«␤»
12:07 masak reported?
12:07 moritz_ yes
12:07 masak semi-thought so.
12:08 masak there's pick in there.
12:08 moritz_ moritz@trudi:~/rakudo>./perl6 -e 'enum A <b c d>; say A.pick'
12:08 moritz_ c       1
12:08 moritz_ moritz@trudi:~/rakudo>./perl6 -e 'enum A <b c d>; say A.roll'
12:08 moritz_ d       2
12:08 masak ungood stringification.
12:08 masak but at least it does something.
12:08 masak so it's only the one-arg form that fails.
12:08 moritz_ rakudo: enum A <b c>; say A.pick
12:09 p6eval rakudo 750a024: OUTPUT«Use of uninitialized value in numeric context␤Use of uninitialized value in numeric context␤␤»
12:09 moritz_ rakudo: enum A <b c>; say A.pick(1)
12:09 p6eval rakudo 750a024: OUTPUT«No candidates found to invoke for method 'pick' on object of type 'EnumMap'; available candidates have signatures:␤:(Mu : Whatever ;; *%_)␤:(Mu : Any $num = { ... };; *%_)␤␤  in 'pick' at line 1029:CORE.setting␤  in main program body at line 22:/tmp/zxGAsv5Cq4␤»
12:09 moritz_ just take a look at the signauters
12:09 masak positionals!
12:09 masak :(
12:09 timbunce joined #perl6
12:09 moritz_ anyway, I have a fix here
12:09 masak ok, great.
12:10 moritz_ -        multi method pick(:$replace) { $values.pick($replace) }
12:10 moritz_ -        multi method pick($num, :$replace) { $values.pick($num, $replace)
12:10 moritz_ +        multi method roll($num = 1) { $values.roll($num) }
12:10 moritz_ +        multi method pick($num = 1) { $values.pick($num) }
12:10 masak moritz_++
12:10 masak oh, does .roll also default to 1?
12:10 masak I thought TimToady said it'd default to Inf or *
12:10 moritz_ rakudo: say <a b c>.roll
12:10 p6eval rakudo 750a024: OUTPUT«a␤»
12:11 * moritz_ tries it with consistency
12:11 moritz_ waiting for the spectest run to finish
12:11 masak maybe that was before it got the name 'roll', though.
12:12 masak ok, next question: why does it stringify to the pair, and not to, say "Test::c"?
12:12 masak there's a .Str method right there: http://github.com/rakudo/rakudo/​blob/master/src/glue/enum.pm#L21
12:13 moritz_ rakudo: say True
12:13 p6eval rakudo 750a024: OUTPUT«1␤»
12:13 moritz_ probably same reason
12:13 moritz_ rakudo: say True.Str
12:13 p6eval rakudo 750a024: OUTPUT«Bool::True␤»
12:13 masak huh.
12:13 moritz_ must be a ftable somewhere
12:13 masak so... .Str and stringification aren't the same?
12:13 moritz_ *vtable
12:14 masak how do I have it affect stringification?
12:14 masak preferably, I'd like for it to say "True" when I do "say True" as well...
12:15 moritz_ it's supposed to print Bool::True
12:15 masak that worksforme too.
12:15 moritz_ first find out how the current stringification works
12:15 moritz_ then fix it :-)
12:16 \xF0 left #perl6
12:16 masak aye :)
12:16 masak I think step 1 requires pmichaud or jnthn, though.
12:16 Mowah joined #perl6
12:17 moritz_ there's a guess
12:17 \xF0 joined #perl6
12:17 moritz_ src/builtins/Bool.pir
12:17 moritz_ boolproto = p6meta.'new_class'('Bool', 'parent'=>'parrot;Boolean Cool')
12:17 moritz_ maybe it gets the stringification vtable from the parent class?
12:18 masak does that tell us how to override it?
12:18 * moritz_ tries something
12:20 moritz_ ... after the enums .pick/.role spectest run finishes :-)
12:22 sundar left #perl6
12:30 mjk left #perl6
12:35 moritz_ masak: even if I get stringification of True and False fixed, I'll likely wait 'til after the release
12:35 moritz_ I guess it'll break a lot of modules
12:35 masak moritz_: jnthn's answer when it came to overriding stringification on the enum type object was "you can't".
12:35 masak moritz_: agreed. no need to rush.
12:38 bluescreen joined #perl6
12:44 moritz_ $ ./perl6 -e' say True'
12:44 moritz_ Bool::True
12:45 bluescreen left #perl6
12:45 masak \\\ooo///
12:46 flussence hmm, I seem to have screwed up my local rakudo with the same error p6eval had
12:46 moritz_ unsprisingly it causes some fallout in the test suite - no surprise here
12:46 masak moritz_++!
12:46 moritz_ flussence: rm -rf parrot_install/ parrot/  # if you have no important data there
12:46 flussence k
12:46 moritz_ flussence: then make realclean; perl Configure.pl --gen-parrot; make -j3 spectest_smolder
12:47 masak it's official: with the local patch moritz_ has, Rakudo will be *awesome*!
12:47 tadzik :)
12:47 dalek rakudo: 8156beb | moritz++ | src/glue/enum.pm:
12:47 dalek rakudo: fix .pick and .roll on enums
12:47 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8​156beb6c2fb86ae71954f182dcc1bb7a12bf830
12:47 moritz_ masak: pushed to branch bool-str
12:48 masak yay
12:48 masak moritz_: is the trick you used applicable to the enum type object as well? I haven't checked how it works yet.
12:49 arnsholt joined #perl6
12:50 moritz_ masak: it just add an PIR level method with :vtable('get_string')
12:51 masak hah!
12:51 masak so the biggest problem is that enum.pm is in Perl 6, then.
12:51 moritz_ not sure
12:52 moritz_ how do you write a closure method in PIR? :-)
12:52 tadzik I think there is a way
12:52 plainhao joined #perl6
12:53 tadzik but I may be wrong :)
12:53 * moritz_ would love an 'is vtable' trait in nqp and rakudo
12:53 tadzik I was looking throught the PIR docs few days ago and I was suprised how many things it can do
12:53 arnsholt moritz_: I've fiddled a bit with that, actually
12:53 arnsholt Shouldn't be excessively hard to get working. It just has to be done
12:54 moritz_ tadzik: it's surprisingly high level for an assembler :-)
12:54 tadzik well, it's not PASM :)
12:54 tadzik I think there was a whiteknight's post on why PIR should die
12:55 tadzik but an assembly with syntatic sugar, dynamic typing and stuff is not bad :)
12:55 snearch left #perl6
12:55 moritz_ it feels like it only needs syntactical 'if' and 'loop' to be a quite usable programming language
12:56 arnsholt If PIR is to die, NQP needs to support more of what PIR brings to the table
12:56 arnsholt (I think)
12:58 arnsholt rakudo: say(min *+2, 1,2,3,0,5);
12:58 p6eval rakudo 750a024: OUTPUT«0␤»
13:00 masak http://code.google.com/p/close/
13:00 masak I think Close looks enticing.
13:00 bluescreen joined #perl6
13:00 fridim joined #perl6
13:00 moritz_ flussence: btw you now have commit access to the try.rakudo.org repo
13:01 moritz_ flussence: resistance is futile, all your patches are belong to us! :-)
13:01 masak not many updates lately on the Close blog. http://close-parrot.blogspot.com/ maybe Austin would like a helping hand.
13:01 arnsholt masak: Indeed. I'll have to look into that
13:01 arnsholt (In my "copious free time" as Tom Lehrer puts it =)
13:01 flussence \o/
13:01 masak arnsholt: :)
13:02 masak me too, in the same kind of time.
13:03 masak ooh, the nqp-rx optable parsing wiki explanation page at http://trac.parrot.org/parrot/wiki/NQP​-rx%20Operator%20Precedence%20Parsing -- linked from the latest blog post on that blog -- looks like all kinds of goodness!
13:04 masak much of the summary there looks like what I learned when writing GGE.
13:04 masak but nicer, since nqp-rw is nicer.
13:04 masak s/rw/rx/
13:05 ruoso joined #perl6
13:07 hirschnase left #perl6
13:12 betterworld I've got a bunch of attributes and accessors that look like this:  has Str $!name; method name (-->Str) { $.lookup() unless defined $!name; $!name; }
13:12 moritz_ "there's no precircumfix. At least, not yet" # lol
13:12 betterworld which is a bit cumbersome.  Is there a better way to write this?  I suppose I could do it with macros
13:13 betterworld (.lookup is a method that fills in all the attributes)
13:13 masak betterworld: or a custom metaclass.
13:13 masak hm, didn't jnthn++ do something like this with a role?
13:14 masak I believe he helped timbunce with something quite similar, but in the context of logging.
13:14 betterworld a custom metaclass could do this?  I'm afraid I'm quite clueless about metaclasses ;)
13:14 masak betterworld: welcome to the club :)
13:14 moritz_ betterworld: in a perfect Perl 6, you'd write  has $.name = lazy { $.lookup };
13:14 patspam joined #perl6
13:15 masak right. the question is how to best workaround it today.
13:15 moritz_ however rakudo doesn't do lazy{} yet :/
13:15 betterworld moritz_: yes, I thought about default values too, and wished they could be lazy
13:16 betterworld maybe I could call .wrap on the default accessors, but I couldn't quite figure out how to do this in a nice-looking manner
13:17 moritz_ $accessor.wrap({ my $thing = callsame(); $.lookup unless defined $thing})
13:17 masak betterworld: I think you might benefit from studying how http://github.com/jnthn/test-mock works under the hood.
13:17 moritz_ (plus a bit of bookkeeping)
13:17 Patterner left #perl6
13:17 masak betterworld: it does something quite close to what you want to do.
13:17 nymacro left #perl6
13:18 masak though arguably you have to do something akin to 'my $x = mocked(Foo);' to enable the lazy behavior.
13:18 masak but still. as workarounds go, that's quite a clean one.
13:18 betterworld moritz_: how do I get $accessor?  &name is not defined
13:19 moritz_ betterworld: self.^methods(:local) and grep for attribute names (which you can find with self.^attributes)
13:20 moritz_ it's a bit hacky, IMHO
13:20 moritz_ oh wait, easier
13:20 moritz_ self.can($name)
13:20 betterworld yes ;)  I think this is what I meant by nice-looking
13:21 moritz_ you can't access method objects by name directly, unless they were declared as 'our method foo { }'
13:21 Holy_Cow joined #perl6
13:21 moritz_ I've come to dislike that limitation
13:21 masak I think I've come to accept it.
13:22 synth joined #perl6
13:22 masak it's basically a clear separation between package things and OO.
13:22 betterworld rakudo: class C { has $.name; }; C.can("name").wrap({ say "looking up" unless defind callsame(); callsame(); })
13:22 p6eval rakudo 750a024: OUTPUT«Method 'wrap' not found for invocant of class 'P6Invocation'␤  in main program body at line 22:/tmp/QLjGJ0hMHF␤»
13:22 tadzik I didn't like it from the beginning
13:22 moritz_ :(
13:22 ggoebel joined #perl6
13:23 masak known?
13:23 masak I think it is...
13:23 moritz_ rakudo: class C {has $!name }; C.^add_method('name', method() { say "in name"; $!name} }); say C.new(name => foo).name
13:23 p6eval rakudo 750a024: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
13:23 moritz_ rakudo: class C {has $!name }; C.^add_method('name', method () { say "in name"; $!name} }); say C.new(name => foo).name
13:23 p6eval rakudo 750a024: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
13:23 moritz_ rakudo: class C {has $!name }; C.^add_method('name', method () { say "in name"; $!name }); say C.new(name => foo).name
13:24 p6eval rakudo 750a024: OUTPUT«Could not find sub &foo␤  in main program body at line 22:/tmp/1iYVX9LCu3␤»
13:24 moritz_ rakudo: class C {has $!name }; C.^add_method('name', method () { say "in name"; $!name }); say C.new(name => "foo").name
13:24 p6eval rakudo 750a024: OUTPUT«in name␤foo␤»
13:24 moritz_ betterworld: something like this? :-)
13:24 betterworld oh well ;)
13:24 moritz_ "just" needs programmatic access to the attribute
13:25 moritz_ might require fallback to pir::getattribute__PPS($obj, $name) for now
13:25 masak moritz_++
13:25 masak huh, you can still do .^add_method without MONKEY_TYPING?
13:25 masak that can't be right...
13:25 betterworld actually I thought about pir::getattribute__PPS too while looking for a solution :)
13:26 masak rakudo: Int.^add_method("ruby-loop", method(&c) { c for ^self }); 4.ruby-loop: { say "OH HAI" }
13:26 p6eval rakudo 750a024: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
13:28 masak rakudo: Int.^add_method("ruby-loop", method (&c) { c for ^self }); 4.ruby-loop: { say "OH HAI" }
13:28 p6eval rakudo 750a024: OUTPUT«OH HAI␤OH HAI␤OH HAI␤OH HAI␤»
13:28 * masak submits rakudobug
13:29 Psyche^ joined #perl6
13:29 Psyche^ is now known as Patterner
13:33 wamba left #perl6
13:34 patspam left #perl6
13:36 moritz_ btw for $job I've also encoutered phasers, erm, phasors actually: http://www.eu-phasors.eu/index.html
13:39 patspam joined #perl6
13:40 masak "set to stun" -- indicates a certain correlation between being a physicist there and having watched Star Trek... :)
13:40 masak also good to know we're not the ones with the most strained puns out there... :P
13:41 moritz_ :-)
13:42 tadzik left #perl6
13:43 masak rakudo: Rat.^add_method('lol', method ($what) { say "lol$what" }).lol('cat')
13:43 p6eval rakudo 750a024: OUTPUT«Null PMC access in find_method('lol')␤  in main program body at line 22:/tmp/KoUi3tNtnC␤»
13:43 patspam1 joined #perl6
13:43 moritz_ what's the return type of .^add_method supposed to be?
13:43 masak huh -- locally, that just gives a "couldn't find sub &lol" error.
13:43 masak what's the difference?
13:44 masak I'm one Rakudo commit ahead of p6eval.
13:45 masak and my Parrot is at r49245, whereas p6eval's is at r49192.
13:45 masak anyone else not getting a Null PMC access locally on the above program?
13:46 patspam left #perl6
13:47 moritz_ masak: I'm one commit ahead of master, and get a Null PMC access too
13:48 masak hm.
13:48 masak oh well, never mind.
13:48 masak I can't close the ticket if it still fails in two different places.
13:49 mathw it's definitely wrong
13:49 mathw somehow
13:49 betterworld masak: thanks, I looked at Test::Mock, but I think that technique is a bit more overhead than appropriate for my accessors..
13:50 masak betterworld: I agree -- it's more overhead than desired.
13:50 masak best would be to have the '= lazy { ... }' option that moritz_++ suggested.
13:52 betterworld but still I'd have to write that code for each attribute.  Unless I use macros or there is a way to generate these lazy default values
13:53 tadzik joined #perl6
13:53 moritz_ the .^add_method thing should work completely generic, though verbose
13:54 patspam1 left #perl6
13:54 clkao_ is now known as clkao
13:54 betterworld it'd have to fall back to pir::getattribute to look up the attributes by name
13:54 moritz_ ... unless you spec a way to access an attribute by name, and I implement it :-)
13:55 betterworld something like $!"$name"?
13:56 moritz_ I thought more of a non-syntactic way
13:56 moritz_ .^attributes returns a list of Attribute objects
13:56 moritz_ they could have a .get_value($object) method
13:56 betterworld analoguous to self."$name"()
13:57 moritz_ which looks sufficiently ugly to say "don't do this, it violates the object's privacy, unless it's your own ojbect"
13:58 betterworld ok, a .^attribute($name).get_value($object) would be nice
13:58 dalek roast: 44e9d50 | moritz++ | S32-hash/exists.t:
13:58 dalek roast: [exists.t] remove some wrong assumptions about how True stringifies
13:58 dalek roast: review: http://github.com/perl6/roast/commit/44​e9d50ec05d7f2716272e7021914830d640f64d
13:59 masak moritz_: I oppose such an addition on exactly those grounds. that shouldn't be possible.
13:59 moritz_ masak: and how would a serialization engine work?
13:59 Kodi left #perl6
13:59 masak ok, I'm in way over my head.
14:00 moritz_ masak: all modern OO languages offer such ways around; the access system should not be seen as a security measure, but as a deterrent
14:00 moritz_ with the knowledge that if you abuse such a system, it's your fault, not the class author's fault
14:01 moritz_ java offers that by reflection, C++ with nasty pointer arithmetics
14:01 timbunce betterworld: here's what jnthn++ did for my particular need (wrapping all the methods in a role with logging): http://gist.github.com/591718 - He wrote that off the top of his head in front of me and it worked first time :)
14:01 [Coke] (pir, if, loop) - check out ".hll_macros"
14:01 masak moritz_: I hear what you're saying. this just feels like a particularly big step in the break-encapsulation direction.
14:01 moritz_ masak: would you prefer a GET_VALUE in all uppercase as additional deterrent?
14:02 betterworld by the way, what I am creating is a class that provides access to the unix user database.  I hope there is no such module yet, though it is mentioned in S16
14:02 masak moritz_: no; what's bothering me is much deeper than naming.
14:02 moritz_ masak: you'll notice that the default constructor and default .perl method break the same encapsulation; I haven't heard you ranting about them
14:03 masak moritz_: both of those are "on the object" in question.
14:03 masak but point taken.
14:03 * mathw doesn't like the default constructor
14:03 moritz_ masak: what do you mean by "on the object"?
14:03 mathw but I see no reason not to provide ways around privacy
14:03 mathw sometimes it's necessary
14:03 moritz_ betterworld++
14:03 masak moritz_: you call .perl and .new on the object with the private attributes that you're violating.
14:04 masak moritz_: what you're talking about is giving the same kind of private access, but from the outside.
14:04 mathw well, via one of its class's attribute objects
14:04 moritz_ huh? I still need the object to call get_value
14:04 masak right.
14:05 moritz_ so I don't understand the difference
14:05 betterworld timbunce: this looks interesting.. I'll have to investigate that
14:05 masak I'm talking about the difference between self.attr.get_value and $your_object.attr.get_value
14:05 ruoso left #perl6
14:05 mathw maybe there's a better way to do it
14:06 moritz_ masak: do you want one "fine" way to access attributes programmatically that doesn't work outside, and another (or maybe not at all) that works from the outside, for more introspection-heavy stuff?
14:07 moritz_ betterworld: maybe it's easiest to just store a hash with field names :-)
14:07 sundar joined #perl6
14:07 masak moritz_: I don't know what I want. your arguments about Real Privacy are too persuasive; I'm left not with a coherent opinion, but just a general sense of unease. :)
14:08 moritz_ masak: I'm sorry for your unease
14:08 masak moritz_: let me do a real attempt at what I think is nice about Perl 6's attribute slots.
14:08 * masak finds p6l thread
14:09 betterworld moritz_: yes.. but I thought that would be against the intentions of Perl 6 objects
14:09 Holy_Cow left #perl6
14:09 Holy_Cow joined #perl6
14:10 moritz_ betterworld: that very much depends on your perspective. If you want "variables with variable names" then it's a sign that you should use a hash instead. If you know the set of possible names at compile time, better solutions should be sought.
14:10 patspam joined #perl6
14:10 masak moritz_: this reply by sorear++ to a question I had on p6l: http://www.nntp.perl.org/group/perl.​perl6.language/2010/07/msg34029.html
14:11 masak moritz_: you might remember it; you appeared in the thread too.
14:11 betterworld I know the names.  It's just that there are many of them, so I would like to generate these things
14:11 moritz_ masak: I do; it's just talking about a different "privacy leak"
14:11 masak right.
14:11 masak one that wasn't an issue, it turned out.
14:12 masak because $!foo-style variables are bound at compile time.
14:12 moritz_ right; it was only a rakudo issue, not a Perl 6 issue
14:12 masak aye.
14:12 * moritz_ wonders if the indirect name syntax can be (ab)used for attribute access inside classes
14:12 mfollett joined #perl6
14:12 masak anyway, that made a lot of sense to me. with that view of things, private attributes were really quite private.
14:13 masak moritz_: you mean, specify the whole class name, and suddenly get the private attribute?
14:13 masak I don't think so, because the A!foo syntax is only for calling methods.
14:14 moritz_ I'm now at the position that 1) we should have get_value for "evil instrospection" things and 2) another mechanism for getting and setting attributes programatically from within a class
14:14 moritz_ and that I offered betterworld solution 1) because 2) is harder to implement and spec :-)
14:15 molaf joined #perl6
14:22 ruoso joined #perl6
14:23 masak hm, wonder if (2) can be done with &eval even with an implementation that conforms to what sorear said in his p6l reply...
14:23 masak if it can, I'm not sure I need anything beyond that.
14:23 patspam1 joined #perl6
14:23 moritz_ I'm sure I do :-)
14:24 patspam left #perl6
14:24 masak good design is born out of discussions like this, I think.
14:24 masak moritz_: when is &eval not sufficient for you, and why?
14:25 moritz_ masak: whenever I need to interpolate a string into eval() I have a voice in the back of my mind screaming "NOOOOO" (because it has to be sanitized/escaped, which is usually impossible if you *really* need eval())
14:26 masak oh, so the same old &eval mind ghost, then.
14:26 moritz_ that's one aspect
14:26 masak *all* input sent to sufficiently powerful primitives need to be sanitized.
14:26 masak there's nothing special about &eval in that respect.
14:27 moritz_ the other is that in my mind, an object can be used be used in two meaningful ways
14:27 masak &eval is just saying "I didn't have enough information at compile time, but here it is now".
14:27 moritz_ (1) using its methods as API
14:27 masak whether you then choose to shoot yourself in the foot as well is up to you. :)
14:27 moritz_ (2) treating it as a meaningless collection of bytes or attribute values where you don't care about the particular structure
14:28 moritz_ (2) is usually used for serialization, comparison, some forms of cloning etc.
14:28 moritz_ I think we should support that kind of usage too
14:29 moritz_ re interpolation, that's true; but for most tasks we have primitives that avoid the need for escaping
14:29 masak moritz_: for some reason, I've always thought that (2) can be done without breaking encapsulation.
14:30 moritz_ in p5 you had to escape file names in open() before the three-argument form was invented
14:30 masak because, and I think that's my point, right now the encapsulation of private attributes in Perl 6 is *really* strong.
14:30 masak (and I like that)
14:30 moritz_ it's not.
14:30 pmurias joined #perl6
14:30 moritz_ see .perl.
14:30 moritz_ see default .new
14:30 * masak goes looking
14:31 Italian_Plumber joined #perl6
14:31 moritz_ rakudo: class A { has $!private }; say A.new(private => 'OH NOEZ').perl
14:31 p6eval rakudo 750a024: OUTPUT«A.new(private => "OH NOEZ")␤»
14:32 masak that's not quite what I mean, though.
14:32 moritz_ so, you can set a private attribute (unless the class author overrode .new), and you can read it (unless the class author overrode .perl)
14:32 masak and that was the difference I tried to articulate above.
14:32 masak you just got the object to voluntarily tell you its own private attributes. of course that must be allowed.
14:33 moritz_ no
14:33 silug joined #perl6
14:33 moritz_ class A has nothing in it saying "I allow you to access $!private"
14:33 moritz_ so it was involuntarily
14:34 moritz_ it's like shipping a new door, and saying "by default, if you turn the key, it just looks locked, but you can easily open it without the key"
14:34 masak I understand what you're saying. that's not what I mean.
14:34 moritz_ but you don't say it, it's just down in the user manual in a very small font
14:35 masak .perl and .new are OK because they're non-monkeypatched methods acting on self.
14:35 patspam joined #perl6
14:35 moritz_ neither would .get_value be monkeypatched
14:35 moritz_ but provided by the implementation
14:36 masak yes.
14:36 wtw left #perl6
14:36 masak and you would be able to do it from outside the class.
14:36 patspam1 left #perl6
14:37 moritz_ just like you're able to call .perl and .new from outside the class
14:37 rgrau` joined #perl6
14:37 * moritz_ honestly fails to see the difference
14:37 masak unlike what the .perl and .new methods do, which is contained within those methods.
14:37 masak .perl and .new abstract away the introspection.
14:37 masak .get_value doesn't.
14:38 moritz_ so your concerns are about instrospection, and not privacy?
14:38 masak I don't know. I wish I had a concern. all I have is an unease.
14:39 masak maybe we should resume this discussion once I have a concern.
14:39 moritz_ right
14:39 moritz_ and it would be interesting to hear opinions from TimToady and The Object Folks :-)
14:39 pmurias why are "The Object Folks"?
14:39 pmurias * who
14:40 daemon left #perl6
14:40 masak Object Folk, wherefore art thou? :)
14:40 moritz_ pmurias: those who have a basic understanding of the Perl 6 object system, and want to contribute an opinion
14:40 pmurias moritz_: i don't think .get_value should be specced
14:41 patspam1 joined #perl6
14:41 pmurias or if specced guaranted to work
14:41 * masak perks up again
14:41 moritz_ pmurias: why?
14:41 moritz_ pmurias: and would you like to see other introspection means instead?
14:42 patspam left #perl6
14:42 pmurias the ability to introspect the variables forces the optimizer to keep the attributes in a way that allows introspection
14:42 pmurias s/variables/attributes
14:43 pmurias moritz_: currently there is no way to get them out of the object
14:43 ash_ joined #perl6
14:43 moritz_ right; that's what I propose to change
14:43 masak and what I have an uneasy feeling about allowing.
14:44 pmurias moritz_: what's your proposal?
14:44 moritz_ pmurias: an .get_value($obj) method in class Attribute (which is what .^attributes[0] returns)
14:44 pmurias what's the use for that?
14:44 ash_ moritz_: can you add flussence to the try.rakudo.org repo? he's helping with the tutorials in there
14:44 moritz_ ash_: already done
14:44 moritz_ pmurias: $serialize.serialize($obj)
14:45 pmurias should objects handle their own serialisation?
14:45 ash_ ah, sweet, thanks
14:45 pmurias * shouldn't
14:45 moritz_ pmurias: do they?
14:45 flussence hi ash_
14:46 moritz_ pmurias: should they be forced to know about all possible serialziation formats?
14:46 moritz_ *serialization
14:46 flussence I'm slowly getting somewhere with it, should have something useful today
14:46 perigrin .get_value() would make me sad.
14:47 perigrin well not if it were a method on Attribute it wouldn't
14:47 moritz_ the point is that introspection allows you to do things of which the module author hasn't thought of (or didn't bother about)
14:47 ash_ flussence: awesome, i'll help out some this afternoon, i am just working on something for my graduate professor right now
14:47 masak I think it's mainly that moritz_' message "privacy was never real to begin with" is a bit hard to accept.
14:47 masak it might well be true.
14:48 masak but that doesn't make it any more fun to start agreeing with.
14:48 perigrin masak: as someone pointed out yesterday in #moose ... someone sufficiently motivated can always access your object state ... even if that requires doing nasty things with memory addresses
14:48 moritz_ as TimToady put it once, in first approximation all computer memory is read- and writable
14:48 pmurias moritz_: if we have .get_value() it should be allowed to die with a "can't access that attribute"
14:49 moritz_ pmurias: that's fine by me. It would also work for me to have an optional hook with which the method can represent and "alternative raw view" or so
14:49 masak perigrin: right, but we're not talking about memory addresses here. we're talking about an API for "here's how you ignore the privacy barriers of this object".
14:50 perigrin masak: right that's called a MOP.
14:50 masak I see.
14:50 moritz_ and since you need .^attributes to get to the Attribute object, you already took the Path of the Meta Object
14:51 perigrin in P6 terms something like Class.HOW.get_private_attribu​te_by_name($name).get_value()
14:51 * perigrin isn't really good enough to write more accurate psudo-p6
14:51 moritz_ that's pretty much it
14:51 pmurias moritz_: in a way you already violated the privacy if you can see that a private attribute exists
14:51 moritz_ though we have a shortcut for the .HOW, it's .^
14:52 moritz_ pmurias: right
14:52 ash_ $foo.^private-attribute($name).value; # whats with the long names?
14:52 masak yes, .value
14:52 moritz_ perigrin: so in Perl 6 it would $obj.^attributes.grep($name).get_value($obj) for now
14:52 perigrin ash_: Moose background :)
14:52 masak and .value needs .value($obj)
14:53 moritz_ (.value needs .value($obj) because the Attribute object is tied to the class of $obj, not to $obj itself)
14:53 perigrin moritz_: except if you're *serious* about privacy being private then attributes would need to be a multi-method
14:53 pmurias moritz_: should we allow setting the private attibute
14:53 masak I don't see why not.
14:53 perigrin that if you call from something local to the metaclass (ie from a class that derives from somthing the metaclass describes) you get all attributes
14:53 moritz_ pmurias: IMHO, yes. But it's a battle I didn't want to fight today :-)
14:53 masak pmurias: .new needs it anyway
14:54 perigrin if you call from outside of that tree you get only the public attributes
14:54 ash_ $obj.^attributes<$name>.value($obj) # i wonder if you could get rid of the last ($obj) some how...
14:54 perigrin ash_: no because at that point it's the data structure
14:54 ash_ ah
14:54 perigrin but you can get rid of hte first one
14:54 masak ash_: having the last $obj be anything but 'self' is what I don't like.
14:54 perigrin by using the Class instead :)
14:55 perigrin Class.^attributes<$name>.value($obj)
14:55 masak and that's very hard to enforce.
14:55 masak s/very hard/impossible/
14:55 pmurias why do you want to enforce that?
14:55 masak I... I don't know anymore. :)
14:55 masak because it would allow me to look into another object?
14:56 perigrin because the idea of "private" attributes being accessible publically is icky
14:56 masak yes, that.
14:56 * perigrin actually likes the p5 solution
14:56 perigrin "Private? What private?"
14:56 cbk left #perl6
14:58 perigrin but I'm an oddity in this world I think.
14:59 ash_ well, once your dealing with the MOP aren't you already outside the realm of normal access control?
14:59 masak guess so.
14:59 perigrin not neccessarily
15:00 perigrin depends on a number of things
15:00 dalek 6model: 3e28165 | mberends++ | java/ (3 files):
15:00 dalek 6model: [java] a classLoader for the Setting compiles ok but probably does not run
15:00 dalek 6model: review: http://github.com/jnthn/6model/commit/3​e281657d79e5e5acb1fd5c6942d7e8f289577c7
15:00 masak is it impossible to have a MOP that respects privacy?
15:00 masak s/respects/preserves/
15:00 perigrin no.
15:00 perigrin it is just more difficult
15:01 moritz_ the question is also if it's desireable
15:01 perigrin yes
15:01 perigrin that question usually comes first
15:01 masak indeed.
15:01 gfldex masak: is LD_PRELOAD allowed?
15:01 ash_ does your class trust the MOP?  (in the perl6 sense of trusts)
15:01 masak gfldex: not only do I not understand the question; I don't even understand the context of it.
15:02 * perigrin doesn't know the p6 sense of trust
15:02 masak ash_: that's an interesting view of it.
15:02 ash_ perigrin: http://perlcabal.org/syn/S12.html#Multi_dispatch
15:02 masak perigrin: it's like C++ friends, but (maybe, I don't remember) inversed.
15:02 gfldex masak: whatever you do to protect attributes one can start to fool around with your runtim/interpreter and get around it
15:02 masak s/inversed/inverted/
15:02 ash_ hmm, that might not be the best explanation of trust
15:02 ash_ let me look a bit more
15:03 ash_ s/look/ack/
15:03 gfldex masak: you can make it only so hard that most ppl dont bother
15:03 masak gfldex: direct memory access, fooling with the runtime, I'm not against such shenanigans. and I realize that they're difficult/impossible to do away with. and that's fine.
15:03 perigrin ash_: does an instance trust it's class?
15:04 mfollett_ joined #perl6
15:04 gfldex masak: the question is then if you want to force ppl to do the foolish stuff if they see need. Or if you provice a nice strict interface for them to do so.
15:04 ash_ perigrin: define instance?
15:04 ash_ or rather class
15:04 masak gfldex: yes.
15:05 * masak wonders how many people would resort to parsing .perl output to get at private attributes
15:05 gfldex i would like to have a nice strict interface for some serious fooling for sure :)
15:05 perigrin ash_: Class A { ... }; my A $a .= new(); # does $a trust A ?
15:05 ash_ yes
15:06 moritz_ $a is a variable, and as thus as passive as possible
15:06 perigrin then yes a Class A would trust A.ClassHOW
15:06 Juerd Hmm
15:06 moritz_ I don't see how it "trust" or 'distrust'
15:06 moritz_ does your door key trust you?
15:06 Juerd That'd be a great buzzword compliant name for tied variables: Active Containers
15:07 mfollett left #perl6
15:07 mfollett_ is now known as mfollett
15:07 perigrin moritz_: I suspect it doesn't.
15:07 perigrin I have never gotten one for this house.
15:07 masak rakudo: class X { has $!foo; has $!bar; has $!baz }; say eval(X.new( foo => 1, bar => 2, baz => 3).perl.subst("X.new(", "\{ ").subst(/\)$/, " }")).perl
15:07 perigrin luckily we have a keypad system
15:07 * ash_ images sentient door keys...
15:07 p6eval rakudo 8156be: OUTPUT«{"foo" => 1, "bar" => 2, "baz" => 3}␤»
15:07 wallberg joined #perl6
15:07 tadzik oh you
15:07 ash_ masak: that was evil :P
15:07 masak private access, special delivery!
15:08 Juerd moritz_: Actually, I have a key that does need to trust the door before it'll do its own whole challenge-response thin
15:08 Juerd thing
15:08 ash_ is there a way to tell your attributes not to show up in the .perl?
15:08 Juerd That's almost sentient
15:08 moritz_ Juerd: understandable, but not quiet what I was talking about :-)
15:08 perigrin the analogy is poor there though
15:08 moritz_ ash_: you can override your .perl method
15:08 perigrin Keys and Doors (and Keys and perigrins) are different classes of objects
15:08 ash_ good point
15:08 Juerd moritz_: No but I thought I'd mention how close reality gets to weird metaphores :)
15:09 moritz_ Juerd: :-)
15:09 perigrin does my car key trust the concept of Car Key-ness is the question :)
15:09 perigrin and I don't know, I don't speak key.
15:09 * perigrin wonders if that means he speaks off key
15:10 moritz_ and my opinion is that the concept of "trust" doesn't apply at this level
15:10 ash_ if a Class trusts its MOP then it has access to its private attributes accessors (in theory)
15:10 perigrin the point was that a Class is an instance of it's Meta-Class
15:11 perigrin I don't know if trust applies in that case or not
15:11 perigrin or even if the question makes  sense when put in that context
15:13 perigrin I would argue that ash_ is right, and that a Class has some kind of private/protected/friendly relationship with it's metaclass
15:13 perigrin and thus is allowed to have private access
15:13 perigrin the question is do you implement the checks to keep people not defined inside Class access as well
15:14 perigrin (and then the question is ... how ... )
15:14 moritz_ re trusting the meta class: makes some sense to me
15:14 ash_ there is also the fact that if you need a private variable, you can use MONKEY_TPYING; augment class Foo { ... } ...
15:16 * moritz_ wonder if   use MONKEY_TYPING; quasi { augment class {{{$class_name}}} { ... } }  will work
15:16 ash_ eval "use MONKEY_TYPING; augment class $class_name { ... }  " ?
15:17 moritz_ modulo escaping, and anonymous classes
15:24 masak moritz_: how does one invoke a quasi quote?
15:24 Ross joined #perl6
15:24 Ross left #perl6
15:24 Ross joined #perl6
15:24 moritz_ masak: by magic :P
15:24 pmurias masak: they are used for returning code from macros
15:24 TimToady they just run themselves inline
15:24 moritz_ meaning "I don't know"
15:25 masak TimToady: oh, ok.
15:25 moritz_ TimToady: just like bare blocks?
15:25 TimToady yes, but return an AST
15:25 masak are there pointy quasis? :)
15:25 TimToady there can be adverbs
15:25 pmurias but my $foo = quasi { say "hi" };eval $foo should work?
15:26 moritz_ rakudo: class A { method list() { 1, 2, 3} }; .say for A.new()
15:26 p6eval rakudo 8156be: OUTPUT«A()<0x5edc6f0>␤»
15:26 TimToady but we haven't tried to invent pointy quasis
15:27 * masak wonders if ASTs work exactly like closures in that they bind at creation and then remember their context, or if they bind at invoke time
15:28 moritz_ rakudo: class A { method list() { 1, 2, 3} }; .say for @(A.new())
15:28 p6eval rakudo 8156be: OUTPUT«1␤2␤3␤»
15:30 patspam1 left #perl6
15:32 mberends left #perl6
15:42 risou joined #perl6
15:45 patspam joined #perl6
15:52 colomon joined #perl6
15:55 z-b joined #perl6
15:57 justatheory joined #perl6
15:58 wallberg left #perl6
15:59 zb left #perl6
16:01 TimToady masak: yes, roll also defaults to 1; I decided that was a more natural default for the dice metaphor, and there's not much downside in requiring (*) on an infinite list generator from the documentation point of view
16:01 masak I'm glad.
16:02 masak even if it turns out to be a foolish consistency, it's one I happen to like. :)
16:04 colomon left #perl6
16:06 wallberg joined #perl6
16:13 masak 'You can use processes, or async/events, or both processes and async/events, but definitely not threads. Threads are out.' -- http://tomayko.com/writings/unicorn-is-unix
16:15 envi^home left #perl6
16:21 moritz_ like most general statements, this is wrong.
16:21 moritz_ maybe threads are "out", but there are still places where they trump the alternatives
16:22 masak I'm a total novice at threads. I gather from other people that it's very hard to get right.
16:23 masak some "alternative" implementations, such as STM and Erlang-style threads, seem alluring too, but it's uncertain what will bear out.
16:25 jnthn evening, #perl6
16:26 ash_ masak: concurrency in general is hard to get right, threads just increase the complexity
16:26 tadzik evening jnthn
16:26 ash_ if you can handle the complexity though, or if your languages/tools facilitate things, they are, generally speaking, a very fast way to handle concurrency, compared to a fork for instance
16:27 ash_ btw, try.rakudo.org is now on apache with fastcgi, so hopefully the server will be a bit more stable
16:27 ash_ and faster, since its caching almost everything now
16:28 tadzik yay
16:28 masak ash_++
16:29 kjeldahl_ joined #perl6
16:29 ash_ masak: have you seen multiprocessing in python? they work around the fact that python has a GIL by doing fork's with shared memory to pass vars between processes, it ends up looking exactly like their threads, but in fact runs on multiple cores
16:30 masak ash_: no; haven't seen. I only recently learned about Python's GIL.
16:30 jnthn ash_: Nice! :-)
16:33 ash_ masak: doing threads with subprocess is very challenging, because you need to synchronize your variables in multiple places (shared memory helps), so you can get even more complicated than traditional threads if you want, but true concurrency can pay off if you do it right
16:34 masak right. Erlang's big idea IIUC is to skip the shared memory altogether.
16:36 wallberg left #perl6
16:36 ash_ ya, they follow the 'share nothing' approach
16:36 pmurias left #perl6
16:37 masak nom &
16:37 masak left #perl6
16:37 ggoebel left #perl6
16:37 daxim http://web.archive.org/web/20070404033843/​farm.tucows.com/images/2005/12/humane_inte​rface/language_war_monkey_knife_fight.jpg
16:38 ash_ why's it always gotta be a war? :P
16:39 slavik ash_: that's the only thing we (people) are good at ... killing ourselves
16:39 ash_ i duno, i think i have managed the opposite pretty well so far in life
16:40 slavik ash_: hence you fail :P
16:40 ash_ aww man
16:40 slavik god of war will be very not pleased
16:40 * ash_ grumbles stupid god of war being all stupid
16:41 cdarroch joined #perl6
16:41 cdarroch left #perl6
16:41 cdarroch joined #perl6
16:41 icwiener joined #perl6
16:42 tadzik hah, language wars
16:42 tadzik reminds me of my blag toast
16:43 mfollett left #perl6
16:44 mfollett joined #perl6
16:45 meppl joined #perl6
16:47 flussence I got the tutorial code sorta-working
16:48 ash_ i'll try it out
16:48 ash_ its in your repo on github?
16:48 flussence yeah, tutorial branch
16:48 flussence still needs work but it's functioning now at least
16:54 ash_ flussence++ ++ ++
16:54 flussence :D
16:54 stkowski joined #perl6
16:55 zb joined #perl6
16:55 z-b left #perl6
16:56 mrBliss joined #perl6
16:56 ash_ are you looking for specific input or output?
16:57 flussence it's checking the input == the example text right now, not sure if it could be done better
16:57 flussence I suppose it could check the input against a regex to allow looser whitespace...
16:57 mrBliss left #perl6
16:58 ash_ i guess we need to decide if 1 + 2 and 1 + 1 + 1 are both valid answers to the first thing
16:58 ash_ it gets tricky as the examples get more complicated
16:59 dakkar left #perl6
17:01 ash_ i guess your right though, we probably do need to match the input
17:02 * [Coke] sees god of war in backscroll and YAYS at having finished the /first/ game. ;)
17:02 flussence besides, it can't easily check the output matches when things like .pick are involved...
17:03 ash_ ya, thats very true
17:05 daxim left #perl6
17:05 rgrau` left #perl6
17:06 Guest23195 joined #perl6
17:08 pmichaud good afternoon, #perl6
17:08 phenny pmichaud: 09:40Z <sorear> tell pmichaud Alias says that he never got the memo re. #cpan6sketch; now that that's cancelled, would you add him to your contact list?  Thanks.
17:08 phenny pmichaud: 09:47Z <moritz_> tell pmichaud you added Milan.pm and BristolBath.pm as suggestions for release names to release-guide.pod. What's the background? (It seems that finding a release name is indeed the hardest part of a release these days :-)
17:08 phenny pmichaud: 11:45Z <Kodi> tell pmichaud that in perl6scalar-cleanup, I've what few changes seemed necessary, and all spectests pass. Any reason not to merge into master?
17:09 mrBliss joined #perl6
17:09 mrBliss left #perl6
17:10 moritz_ phenny: tell Kodi to please wait with merging until after the release on Thursday
17:10 phenny moritz_: I'll pass that on when Kodi is around.
17:11 jnthn o/ pmichaud
17:11 jnthn pmichaud: In case you don't notice it, http://trac.parrot.org/parrot/changeset/49242/ is good news. :-)
17:12 pmichaud jnthn: is that the default gc, or ... ?
17:13 pmichaud I never know which gc is which :-/
17:14 jnthn pmichaud: gc_massacre one
17:14 jnthn pmichaud: Should become default in a little bit.
17:14 pmichaud no, I mean within gc_massacre
17:14 pmichaud is there just one gc there, or two?
17:14 jnthn Hmm, good question.
17:14 pmichaud it says "gc_ms2", so I'm not sure what the '2' represents.
17:15 jnthn I think it's a second one
17:15 jnthn But I'd imaigne if it has benefits it'll become the default.
17:15 ash_ wasn't there a gc_ms2 branch?
17:15 ash_ in parrot
17:15 jnthn pmichaud: Anyway, the main thing is that there's a GC that fixes the bug, and it's not taken a lot of code to do it. Provided the patch holds up, that is.
17:15 estrabd_afk is now known as estrabd
17:15 ash_ i think it got removed/merged into gc_massacre
17:16 jnthn pmichaud: Which is at least kinda encouraging. :-)
17:16 colomon joined #perl6
17:16 colomon o/
17:16 jnthn o/ colomon
17:17 colomon anything happening roundabouts?
17:17 pmichaud why is the mark list managed as a linked list?
17:17 moritz_ we have patches for IPv6 support patches for parrot and rakudo
17:17 colomon (I'm in a high parking lot which seems to get a good 3G signal with a snoring toddler in his car seat.)
17:17 colomon IPv6++
17:18 PerlJam good $localtime #perl6
17:18 PerlJam What's new in the world?
17:18 TimToady lol
17:18 colomon PerlJam: I just asked the same thing approx 90 seconds ago.  :)
17:19 jnthn pmichaud: That's probably a question for bacek, though it could always be hysterical raisons...
17:19 TimToady and I answered both of you :)
17:19 pmichaud jnthn: Linked_List and List_Item_Header appear to be new in the branch
17:19 jnthn Ah, OK
17:20 jnthn Not sure why it's being done that way. It feels maybe expensive-ish at first glance.
17:20 pmichaud seems like a ring buffer would be far more efficient.
17:20 dalek roast: ea847c7 | moritz++ | S0 (6 files):
17:20 dalek roast: remove more wrong uses of True and False as 0 and 1 (still more left); make good use of nok() function
17:20 dalek roast: review: http://github.com/perl6/roast/commit/ea​847c7f91f8d3aac63df6e12edfc4ce4ac0db15
17:20 dalek roast: 672abda | moritz++ | S06-multi/type-based.t:
17:20 dalek roast: [type-based.t] fix another Bool stringification usage
17:20 dalek roast: review: http://github.com/perl6/roast/commit/67​2abda9646c57d585a8d73b096bf0f380da06c5
17:20 pmichaud or even a simple stack
17:20 jnthn pmichaud: *nod*
17:21 PerlJam colomon: great minds think alike :)
17:21 colomon PerlJam++  ;)
17:21 TimToady well, you can do stack semantics with a linked list
17:22 pmichaud TimToady: I'm a bit more worried about the additional memory allocation overhead during Parrot's GC
17:22 jnthn pmichaud: It may be that stuff needs removing from the middle of it or soemthing, in which case linked list is quite efficient.
17:22 jnthn pmichaud: But that'd imply searching through the list for it.
17:22 jnthn Which would not be efficient.
17:22 timbunce left #perl6
17:22 jnthn pmichaud: Anyway, probably best to ask bacek++. :-)
17:25 pmichaud I'm looking at the definitions of LIST_REMOVE and LIST_APPEND in include/parrot/list.h and it hurts to read it.  :-(
17:25 * jnthn looks
17:26 molaf left #perl6
17:26 * PerlJam looks too just for the heck of it.
17:26 pmichaud nm
17:26 pmichaud it was the "do...while" that was throwing me off.
17:28 jnthn oh, yeah
17:28 jnthn while (0) :-)
17:28 * PerlJam only hopes macros in perl6 don't *cause* people to jump through additional hoops in their code  :)
17:28 PerlJam (except by choise, of course)
17:28 PerlJam er, choice
17:29 stkowski left #perl6
17:29 TimToady I remember a great sense of evil delight when I started using that in the P5 source code  :)
17:30 TimToady or was it heavenly disgust?...
17:32 JUSEF joined #perl6
17:32 TimToady that's the problem with 'there's only one way to do it' languages: some values of 1 are closer to 0...
17:32 stkowski joined #perl6
17:32 TimToady the macro trick was a way to turn a 0 into a 1
17:34 pmichaud is that anything like squaring a circle?  ;-)
17:35 JUSEF hi
17:36 [Coke] ohayo
17:36 JUSEF i want some tuto about website administration with perl script
17:36 JUSEF who can help me?
17:36 PerlJam JUSEF: I think you're in the wrong place.  This channel is about Perl 6
17:36 PerlJam JUSEF: It sounds like you really want #perl or #perlhelp which cover Perl 5
17:37 JUSEF ok
17:37 JUSEF thanks
17:37 JUSEF left #perl6
17:39 ash_ is squaring a circle, circle * circle or  circle = (square)circle; ?
17:40 pmichaud my $circle as Square;
17:41 pmichaud s/my//
17:41 jnthn ...was gonna say, do we have variables that cast on assignment to them... :P
17:41 ash_ dynaminc_cast<square>(circle);
17:41 rainerschuster joined #perl6
17:41 * jnthn visits the nomshop
17:43 TimToady rakudo: my Num $x as Int; $x = pi; say $x
17:43 p6eval rakudo 8156be: OUTPUT«Could not find sub &trait_mod:<as>␤  in main program body at line 22:/tmp/XeSlXzZxsv␤»
17:43 PerlJam my $○ = '□';
17:43 patspam left #perl6
17:43 TimToady rakudo: my (Num $x as Int); $x := pi; say $x
17:43 p6eval rakudo 8156be: OUTPUT«3.14159265358979␤»
17:43 TimToady err
17:44 TimToady rakudo: my (Num $x as Int); $x := pi; say $x.WHAT
17:44 p6eval rakudo 8156be: OUTPUT«Num()␤»
17:44 pmichaud we don't attach coercions to containers yet.  not sure that's spec.
17:45 TimToady rakudo: sub foo (Num $x as Int) { say $x.WHAT }; foo(pi)
17:45 p6eval rakudo 8156be: OUTPUT«Int()␤»
17:45 TimToady I don't see why that should be different
17:45 ash_ rakudo: sub foo (Num $x as Int) { say $x, $x.WHAT }; foo(pi);
17:45 p6eval rakudo 8156be: OUTPUT«3Int()␤»
17:46 colomon ash_++ # typing what I was going to type before I could type it.
17:46 ash_ i copied TimToady++'s and just added $x to see if $x was 3 like i expected
17:47 colomon rakudo: sub foo (Numeric $x as Real) { say $x; say $x.WHAT; } foo(4+0i);
17:47 p6eval rakudo 8156be: OUTPUT«===SORRY!===␤Confused at line 22, near "sub foo (N"␤»
17:47 colomon rakudo: sub foo (Numeric $x as Num) { say $x; say $x.WHAT; } foo(4+0i);
17:47 p6eval rakudo 8156be: OUTPUT«===SORRY!===␤Confused at line 22, near "sub foo (N"␤»
17:47 TimToady rakudo: my (Num $x as Int); $x ::= pi; say $x
17:47 p6eval rakudo 8156be: OUTPUT«3.14159265358979␤»
17:47 ash_ rakudo: sub foo (Numeric $x) { };
17:48 p6eval rakudo 8156be:  ( no output )
17:48 colomon rakudo: sub foo ($x as Num) { say $x; say $x.WHAT; } foo(4+0i);
17:48 p6eval rakudo 8156be: OUTPUT«===SORRY!===␤Confused at line 22, near "sub foo ($"␤»
17:48 ash_ rakudo: say 4+0i;
17:48 p6eval rakudo 8156be: OUTPUT«4 + 0i␤»
17:48 colomon rakudo: sub foo ($x as Num) { say $x; say $x.WHAT; }; foo(4+0i);
17:48 p6eval rakudo 8156be: OUTPUT«4␤Num()␤»
17:48 colomon ah, missing semicolon
17:48 ash_ ah
17:48 colomon rakudo: sub foo ($x as Real) { say $x; say $x.WHAT; }; foo(4+0i);
17:48 p6eval rakudo 8156be: OUTPUT«4␤Int()␤»
17:48 ash_ i was wondering what was up with that
17:49 ash_ i missed the semicolon too
17:49 colomon rakudo: sub foo (Numeric $x as Real) { say $x; say $x.WHAT; }; foo(4+0i);
17:49 p6eval rakudo 8156be: OUTPUT«4␤Int()␤»
17:49 ash_ hey, thats um... odd
17:50 TimToady how so?
17:50 TimToady Real is a role, so it's looking for the best actual type to use
17:50 ash_ i just realized Int is Real, or a kind of Real number, i was confused because i fail at math
17:51 colomon TimToady: actually not the best
17:51 colomon Complex.Real just returns the real part (iff the imaginary part is 0)
17:51 colomon in this case, the real part is an Int.
17:51 colomon rakudo: sub foo (Numeric $x as Real) { say $x; say $x.WHAT; }; foo(4.0+0i);
17:51 p6eval rakudo 8156be: OUTPUT«4␤Rat()␤»
17:52 TimToady rats
17:52 colomon but no fat rats yet, alas.
17:52 TimToady rakudo: sub foo (Numeric $x as Real) { say $x; say $x.WHAT; }; foo(4.0, pi\i)
17:52 p6eval rakudo 8156be: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in 'foo' at line 22:/tmp/Uz9tPwUv6p␤  in main program body at line 22:/tmp/Uz9tPwUv6p␤»
17:52 ash_ rakudo: say (4.0.Rat).numerator
17:52 p6eval rakudo 8156be: OUTPUT«4␤»
17:53 ash_ rakudo: say (4.0.Rat).denominator
17:53 TimToady rakudo: sub foo (Numeric $x as Real) { say $x; say $x.WHAT; }; foo(4.0 + pi\i)
17:53 p6eval rakudo 8156be: OUTPUT«1␤»
17:53 p6eval rakudo 8156be: OUTPUT«Failure()␤»
17:53 NordQ joined #perl6
17:54 TimToady rakudo: sub foo (Numeric $x as Real) { say $x + 1; }; foo(4.0 + pi\i)
17:54 p6eval rakudo 8156be: OUTPUT«Method 'Bridge' not found for invocant of class 'Failure'␤  in 'infix:<+>' at line 3529:CORE.setting␤  in 'foo' at line 22:/tmp/TOCN_XIjiF␤  in main program body at line 22:/tmp/TOCN_XIjiF␤»
17:54 colomon TimToady: like I.... ooooo, interesting!
17:54 TimToady that's...LTA
17:54 colomon instead of failing when it cannot convert $x to a Real, it just calls the sub with $x as Failure.
17:55 PerlJam I always wonder about what a Bridge is when I see those errors.
17:56 ash_ left #perl6
17:56 colomon ... which makes sense, because Failure ~~ Real.  Sigh.
17:56 TimToady there's should just be a global override that any message containing the word Bridge is translated to "oops"
17:57 jnthn .oO( should errors from the meta-model come out at OOps? )
17:57 TimToady 'as Real' should probably imply Real:D
17:57 colomon rakudo: say Failure.defined
17:57 p6eval rakudo 8156be: OUTPUT«0␤»
17:58 TimToady rakudo: say Failure ~~ Real:D
17:58 p6eval rakudo 8156be: OUTPUT«Could not find sub &Real:D␤  in main program body at line 22:/tmp/UMlpiQoUC9␤»
17:58 patspam joined #perl6
17:59 TimToady :D is the P6 equivalent to Haskell's 'just' types
18:01 TimToady but anyway, use of Failure as a value should be throwing the actual error message in the Failure somwhow, which is another problem
18:05 NordQ left #perl6
18:05 NordQ joined #perl6
18:06 perigrin :D aren't the "incredibly happy" types?
18:07 NordQ left #perl6
18:10 TimToady that too
18:10 colomon left #perl6
18:12 * [Coke] tries to make javascript act more like tcl.
18:12 ggoebel joined #perl6
18:14 ash_ joined #perl6
18:14 timbunce joined #perl6
18:14 patspam1 joined #perl6
18:16 patspam left #perl6
18:19 diakopter OH in $work irc today: "There is no codebase so big, twisted, or complex that maintenance can't make it worse."
18:19 diakopter oh, they were quoting someone else :/
18:20 pjcj left #perl6
18:22 x3nU is now known as gorszek
18:24 gorszek is now known as x3nU
18:27 ash_ left #perl6
18:28 proller left #perl6
18:29 rindolf joined #perl6
18:30 ruoso left #perl6
18:30 rindolf Hi all. Should I package rakudo-star-2010.08 for Mandriva Cooker or should I wait for the 2010.09 release? http://github.com/rakudo/star/downloads/
18:31 tadzik is Mandriva Cooker some special Mandriva?
18:31 ggoebel left #perl6
18:31 flussence equivalent of debian unstable, I guess
18:31 rindolf flussence: Debian Testing more like it.
18:32 rindolf The current rakudo cannot be installed because parrot was upgraded.
18:32 TimToady I'd wait a bit, since we're late in the Rakudo cycle
18:32 flussence (I can never remember these long names right...)
18:33 ggoebel joined #perl6
18:33 molaf joined #perl6
18:34 rindolf TimToady: OK.
18:35 ggoebel left #perl6
18:39 rindolf TimToady: thanks for the tip.
18:44 patspam1 left #perl6
18:47 cognominal left #perl6
18:47 ruoso joined #perl6
18:48 cognominal joined #perl6
18:52 timbunce left #perl6
18:56 rindolf PackFile_unpack: This Parrot cannot read bytecode files with version 8.4.
18:57 Intensity left #perl6
18:57 tadzik rindolf: remove your parrot* and rebuild
18:57 rindolf p6eval: sqrt (3) ** 2 + (4) ** 2
18:57 tadzik you're not alone hating thins
18:57 tadzik s/thins/this/
18:57 rindolf tadzik: OK.
18:58 rindolf perl6: sqrt (3) ** 2 + (4) ** 2
18:58 p6eval pugs, rakudo 8156be:  ( no output )
18:58 TimToady why are you parentesizing bare numbers?
18:58 rindolf TimToady: it's just that this makes me wonder - http://perlgeek.de/blog-en/perl-5-to​-6/04-subs-and-signatures.writeback
18:58 rindolf TimToady: return sqrt ($x2-$x1)**2 + ($y2-$y1)**2;
18:59 rindolf I wonder whether the sqrt will apply to the entire expression or only to the parens.
18:59 timbunce joined #perl6
18:59 TimToady this isn't Perl 5, so the answer is different :)
18:59 TimToady it's only the same for certain prefix operators
19:01 patspam joined #perl6
19:02 TimToady currently the only prefix: in that category is abs
19:02 TimToady so any other function will parse as a list op
19:04 TimToady but in any case "foo (3)" will also mean the same as "foo 3", since function arg parens are postfixes and don't admit intervening whitespace
19:05 TimToady (unlike in P5)
19:05 Intensity joined #perl6
19:08 rindolf moritz_: http://perlgeek.de/blog-en/perl-5-to​-6/04-subs-and-signatures.writeback - it says that comments have been disabled and that the comment form will not work. If it's not going to work, why display it?
19:08 sorear good * #perl6
19:08 rainerschuster left #perl6
19:08 sorear moritz_: I'm referring to pmichaud's comment on #cpan6sketch that he would contact various people privately and report back on #phasers, skipping #cpan6sketch
19:11 rindolf Hmmm... seems like sqrt(3) ** 2 + (4) ** 2 behaves differently from sqrt (3) ** 2 + (4) ** 2
19:11 PerlJam rindolf: indeed it does
19:12 PerlJam rindolf: < TimToady> but in any case "foo (3)" will also mean the same as "foo 3", since function arg parens are postfixes and don't admit intervening whitespace
19:12 PerlJam rindolf: it's that last bit ("function arg parens") that you've encountered
19:12 sorear TimToady: Would I be correct in thinking that GLOBAL handling requires unification?  A.pm=[ module A { package B is export {} }; package Foo { import A }; package Bar { import A } ]; B.pm=[ our sub Bar::B::x { say "hi" }; INIT { Foo::B::x; } ]; main.pl=[ need A; need B ]
19:19 ash_ joined #perl6
19:20 nymacro joined #perl6
19:21 nymacro left #perl6
19:22 nymacro joined #perl6
19:22 kjeldahl left #perl6
19:23 plainhao left #perl6
19:24 bluescreen left #perl6
19:26 stepnem left #perl6
19:26 TimToady sorear: it would be nice if that works; I think of the packaged entities as the real ones, and all the aliases to them as synonymous
19:26 tadzik ash_: try.rakudo.org is revealing some needless information, try 'say $x'
19:27 ash_ that's just how repl spits out errors, i'll see if i can override it
19:27 ash_ or just do a regex over it to remove the path, since that won't change (or change much)
19:28 ash_ the server froze up again, i still don't know why it keeps doing that
19:29 flussence too much traffic?
19:29 ash_ its not that heavily trafficed
19:30 ash_ about 1 new command every 10~15 seconds
19:30 nymacro rakudo: enum A <1 2 3>; enum B <a b c>; say A.enums.keys; say B.enums.keys;
19:30 p6eval rakudo 8156be: OUTPUT«abc␤abc␤»
19:30 stepnem joined #perl6
19:32 sorear TimToady: if BEGIN code generates .WHO references, does that mean it's possible for two !=== stash references to become aliases later in the compilation process?
19:33 M_o_C joined #perl6
19:34 TimToady well, we could either try to unify, or report a conflict.  I think we should try to unify to some extent, but not work too hard in case it's just an accidental name collision
19:35 sorear How would conflict reporting work?
19:37 TimToady dunno, that's something I hope someone else works out :)
19:37 TimToady esp. today when I'm battling an infection
19:38 pmichaud should we skip today's call?  I have little to report.
19:38 * TimToady is not playing with all cylinders today
19:38 TimToady I only have lol to report :)
19:38 TimToady I'd be fine with skipping
19:39 pmichaud I have to echo previous commenters:  "You think that's cute today...."  :-P
19:39 sorear pmichaud: Am I correct in thinking that you're cancelling next week's #cpan6sketch? (re. your "reporting on #phasers instead" comment)
19:39 TimToady well, it *is* a list of lists
19:40 pmichaud sorear: I'm not in charge of #cpan6sketch. :)  I just said I'd prefer to report on #phasers.  :-)
19:40 bluescreen joined #perl6
19:40 pmichaud if others want to have a #cpan6sketch, we can have one; but I figure let's just have the one meeting until we see a definite need for a separate one.
19:40 breinbaas joined #perl6
19:41 pmichaud (so no, I'm not planning on making any special effort to be present at #cpan6sketch next week.)
19:41 sorear OK.
19:42 sorear Is Alias on your contact list yet?  (re. "obra and Schwern etc")
19:43 pmichaud I'll see if I can craft an appropriate message to him.  He seemed a little miffed about me pinging him yesterday "without advance notice".
19:43 pmichaud ...and I have the impression that Alias isn't that impressed with me in general.
19:44 sorear I think he's a little miffed with us in general.. this whole completely failing at communicating times would do it
19:44 TimToady well, some people require a two-by-four to communicate :)
19:46 pmichaud well, in my case I think it predates (and possibly colors) the latest interactions.  :-|
19:47 ruoso left #perl6
19:49 sorear What sort of GLOBAL should an eval see?
19:49 pmichaud (today's call, in 11 mins)  I'll go ahead and call in.
19:49 TimToady uh, I already canceled it
19:49 pmichaud oh, nm then.  :)
19:50 pmichaud I'll call in just in case someone doesn't get the cancellation.  :)
19:50 TimToady I'm very decisive when it doesn't matter...
19:50 TimToady I emailed
19:50 pmichaud yes, hadn't checked email yet.
19:50 pmichaud I'm not hitting on a full deck today either.  :-|
19:51 TimToady ;)
19:52 jnthn .oO( I normally just play games with the cards, not eat 'em... )
19:52 jnthn oh, hitting, not biting...
19:52 jnthn ...yeah, me either.
19:53 tadzik http://wklej.org/id/392404/ -- am I missing something?
19:54 TimToady yes
19:54 TimToady multi MAIN (:$switchname) {...}
19:54 jnthn tadzik: Use named parameters fo rthat.
19:54 TimToady they're translated to named args
19:54 tadzik ah, ok
19:54 jnthn :$switchname! is maybe better
19:54 tadzik no, I just realized it can be just 'list', not '--list'
19:55 tadzik (less typing)++
19:55 jnthn That's what BCPL said.
19:55 TimToady well, but less extensible
19:55 * sorear pokes TimToady
19:55 * TimToady has a hole now
19:57 alester joined #perl6
19:59 stkowski left #perl6
20:01 ash_ flussence: i made a few changes on the tutorial system if you want to try them
20:01 timbunce left #perl6
20:01 ash_ i pushed it to a branch on github, moritz/try.rakudo.org with the branch name tutorial
20:02 ash_ i moved the text for the current step out of the console output area, and made it so it will move to the next chapter if you finish your current one
20:02 sorear TimToady: should &eval see the 'true GLOBAL' or should it somehow be tied to CALLER::UNIT::GLOBAL?
20:02 Italian_Plumber left #perl6
20:03 ruoso joined #perl6
20:05 sorear hello ruoso
20:06 stkowski joined #perl6
20:07 TimToady I think UNIT::GLOBAL wants to disappear into true GLOBAL as soon as it can, so that a lexical search for GLOBAL always finds the truest GLOBAL it can
20:07 TimToady (an eval, unlike a file, doesn't always start in GLOBAL, but in
20:07 timbunce joined #perl6
20:07 TimToady the caller's UNIT, so it might never even have a GLOBAL)
20:08 TimToady and it can probably get borned with its idea of GLOBAL being "true"
20:09 flussence ash_: looks much nicer now!
20:09 flussence ash_++
20:09 TimToady note that STD renamed UNIT::GLOBAL as UNIT::GLOBALish or some such to avoid finding the "wrong" GLOBAL
20:09 icwiener left #perl6
20:09 ash_ something's not right, its not scrolling to the bottom automattically, for me anyway, i am looking into that
20:10 * TimToady apologizes for not realizing why he had a hole poked in him
20:11 * TimToady goes off to take a geezer nap in the hopes it will make him a better person...
20:11 TimToady &
20:11 M_o_C left #perl6
20:12 flussence ash_: $("#stdout").scrollTo($("#stdout > *:last-child"), 300);
20:12 flussence the ">" fixes it
20:13 ash_ it was p:last-child i switched it back to that
20:14 dalek ecosystem: 916f104 | tadzik++ | projects.list:
20:14 dalek ecosystem: typo fix
20:14 dalek ecosystem: review: http://github.com/perl6/ecosystem/commit/​916f10403e23c4978f39528cd8cd243b554a2999
20:14 Italian_Plumber joined #perl6
20:14 bluescreen left #perl6
20:16 tadzik phenny: tell supernovus HashConfig's missing deps.proto
20:16 phenny tadzik: I'll pass that on when supernovus is around.
20:19 jedai left #perl6
20:19 tadzik moritz_: something funny's happening to Math-Rungekutta's tests
20:20 jedai joined #perl6
20:21 diakopter TimToady: borned?  bored? boned? burned?
20:28 tadzik another 7 modules are gone
20:28 tadzik good and bad as well
20:28 tadzik or rather: bad and good
20:29 mfollett left #perl6
20:32 dalek ecosystem: a67b0bd | tadzik++ | projects.list:
20:32 dalek ecosystem: Removed some nonexistent modules
20:32 dalek ecosystem: review: http://github.com/perl6/ecosystem/commit/​a67b0bd90e48d8ba21a4c2afba712ee4a0db27f2
20:34 ash_ now that flussence++ has the tutorial system worked out, except for maybe a few minor details? (it seems pretty solid to me), who wants to write try.rakudo.org tutorials? anyone :-D
20:34 sorear ruoso: how much do you know about mildew?
20:34 tadzik ash_: I
20:34 tadzik it'll be a nice warmup before my book sub-chapter
20:35 ash_ http://github.com/moritz/try.rakudo.org fork away, send a merge request if i haven't gotten moritz to give you access by the time you have some done, http://github.com/moritz/try.rakudo.org/blo​b/tutorial/frontend/public/js/chapters/1.js is a good sample if you want to see how they are formatted
20:36 ash_ http://www.jsonlint.com/ is good if you need to check your json to make sure its formatted legally
20:36 tadzik Hardcore Forking Action
20:37 ash_ its the tutorial branch, so be sure to checkout that one
20:37 tadzik sure thing
20:38 flussence ooh, JS has a use strict; now
20:38 tadzik Mind if I mess a little with the existing stuff?
20:38 ash_ go for it
20:38 ash_ the worst that could happen is i don't merge your changes :P
20:38 tadzik :)
20:39 tadzik they're ought to be \d+\.js, right?
20:39 tadzik bah, too much question, not enought writing
20:40 ash_ tadzik: ya, to add a chapter 3, just do chapters/3.js etc..
20:40 ash_ to run the server you need Mojolicious and IO::HalfDuplex cpan modules, you'll need to start the backend (just perl persist.pl) and the front end with perl try-rakudo.pl daemon --reload
20:43 ash_ err IO::Pty::HalfDuplex
20:43 tadzik ! Finding IO::HalfDuplex on cpanmetadb failed.
20:43 tadzik oh, ok:)
20:44 sorear aha, I see how I broke mildew now
20:44 fridim left #perl6
20:44 rindolf left #perl6
20:45 tadzik ash_: where is this persist.pl?
20:45 flussence backend/
20:45 tadzik I see, thanks
20:45 ash_ in backend ya
20:45 ash_ try-rakudo.pl is in frontend
20:45 flussence you'll need a .config file in there with a single line containing the path to your perl6
20:45 tadzik it also needs POE
20:45 ash_ ah, i forgot about poe
20:46 ash_ i do 'echo "`which perl6` `pwd`/p6safe.pl" >> .config
20:46 ash_ if your in the backend folder
20:47 ash_ thats so it knows where to look for p6safe.pl
20:47 ash_ you might need to correct the path on the first line of p6safe.pl
20:47 ash_ (unless your system happens to be setup like mine)
20:48 tadzik I have no p6safe.pl in PATH
20:48 tadzik ah, ok it seems
20:48 tadzik nvm
20:50 tadzik and Digest::SHA1
20:52 flussence ash_: might want to change ARGFILES to use a relative path in p6safe.pl
20:53 ash_ ya, that would mean less configuring
20:55 * ash_ changing classrooms
20:55 ash_ left #perl6
20:56 sundar left #perl6
20:59 ash_ joined #perl6
20:59 ruoso left #perl6
21:00 tadzik ash_: it doesn't print results for me
21:00 flussence any errors or does it just fail silently?
21:00 ash_ is persist.pl saying anything?
21:00 tadzik ash_: http://tadzik.mine.nu:3000/
21:01 tadzik oh
21:01 tadzik Reading from dead slave at persist.pl line 82
21:01 flussence try running the perl6 line in .config directly and see if that errors out
21:01 tadzik http://wklej.org/id/392438/
21:02 tadzik Unable to open filehandle from path '/home/john/Projects/try.rakudo.o​rg/frontend/data/input_text.txt'
21:02 flussence oh
21:02 flussence in p6safe.pl replace that with ../frontend
21:02 ash_ change the first line of p6safe.pl to my $*ARGFILES = open '../frontend/data/input_text.txt';
21:03 patspam left #perl6
21:03 tadzik oh, works
21:04 tadzik ash_: how do you like my chapters?
21:04 tadzik I decided to start from Hello world :)
21:06 ash_ i was going to do math ops first because they are a kind of universal thing people understand, even people that aren't programers
21:06 tadzik hmm
21:06 tadzik so we can leave Hello world and put my chapter 2 after the math section
21:07 ash_ http://github.com/moritz/try.rakudo.org/blob/​tutorial/frontend/public/js/chapters/index.js was my outline
21:07 ash_ but feel free to modifiy/change anything that seems out of order
21:08 ash_ math though, was a good starting point because of how basic and easy it is
21:08 tadzik maybe
21:10 ash_ there is a lot of cool magic you can do with math ops too, like say: "[+] 1, 1, * + * ... 21" is neat, and easy to explain if your working with math ops, but also shows some of the magic you can do with perl6
21:11 flussence I went and messed with index.js in my repo to make the text look consistent, feedback welcome
21:12 * sorear wonders about giving Perl 6 a regular expression engine
21:13 tadzik I don't think things like [+] 1, 1, * + * ... 21 and similar magic are that good to show at the very beginning
21:14 tadzik it will show Perl 6 from the cryptic side, I don't think if it won't drive some people away
21:14 tadzik like "I was expecting something new and it's worse than Perl 5, hurr durr"
21:15 flussence I think it's best to avoid terse * usage at the beginning
21:15 flussence that line at least is easier to follow if it's written { $^a + $^b }
21:16 ash_ hmm
21:16 ash_ well i'll push that back
21:18 Ross left #perl6
21:18 mfollett joined #perl6
21:18 mfollett left #perl6
21:20 * diakopter starts to ponder how much of core Perl 6 STD grammar can be reduced away because it's syntactic sugar for more verbose code
21:20 wallberg joined #perl6
21:23 ash_ say 'Zażółć gęślą jaźń' try that on your version of try.rakduo
21:23 timbunce left #perl6
21:24 ash_ does that crash anyone? or look right?
21:24 diakopter star: say 'Zażółć gęślą jaźń'
21:24 p6eval star 2010.07: OUTPUT«Zażółć gęślą jaźń␤»
21:24 flussence mojibake here
21:24 ash_ try.rakudo.org fails hard on that
21:24 ash_ :-( i'll look into it
21:25 diakopter encoding mismatch
21:25 diakopter ?
21:25 flussence I'm 100% sure all my LC_* things on that machine are set to utf8 too
21:25 tadzik Received input: id<60ca11616b9658820ea5dd19bf1b442278c07c3b> say 'Zażółć gęślą jaźń' at persist.pl line 133, <$cfg> line 1.
21:25 tadzik Reading from dead slave at persist.pl line 35
21:25 sorear it looks like urxvt used characters from six different fonts to synthesize that string
21:25 sorear Zozolc gesla jazn with a bunch of diacritics
21:25 Italian_Plumber left #perl6
21:25 flussence it comes out garbled on the REPL too, but try.rakudo.org is doing it twice it seems
21:26 tadzik it's a Polish sentence with all the Polish diacritics
21:26 ash_ i know you need to not use readline in parrot
21:26 ash_ for that to work
21:26 ash_ configure parrot with --without-readline
21:28 tadzik bah, I'd give it some love tomorrow
21:28 tadzik Diem Perdidi :(
21:29 ash__ joined #perl6
21:30 ash_ left #perl6
21:30 ash__ is now known as ash_
21:30 timbunce joined #perl6
21:34 ash_ sorear: i have a question about IO::Pty::HalfDuplex
21:35 eternaleye left #perl6
21:36 ash_ could IO::Pty::HalfDuplex be messing with encodings?
21:37 Guest23195 left #perl6
21:39 tadzik goodnight for today folks
21:39 sorear it's a pure byte channel, unless you have some stupid Perl 5 config that messes with bytes by default *cough* Win321
21:39 flussence bye tadzik!
21:39 tadzik left #perl6
21:47 ash_ hmmm, its not IO::Pty::HalfDuplex then, the text is fine if i print it right after i get it from io::pty::halfduplex
21:47 nymacro left #perl6
21:53 cbk joined #perl6
21:53 ash_ i think i found the error
21:55 nymacro joined #perl6
21:56 ash_ pushed my changes, flussence if you want to try them with unicode chars, also make sure parrot is configured without readline
21:56 sorear yikes, mildew::setting::smop -> 170,000 lines of C ->  9846 stefan    20   0  482m 231m  672 D  1.3 61.7   0:41.15 cc1
21:57 sorear note the %CPU figure. :/
21:57 diakopter 61.7?
21:58 Italian_Plumber joined #perl6
21:58 sorear I wish
21:58 flussence 61.7 + a "D" = not good
21:59 flussence looks like swap death to me...
21:59 diakopter quick, push
22:01 Italian_Plumber1 joined #perl6
22:02 sjohnson rakudo: say ^5
22:02 Holy_Cow left #perl6
22:02 p6eval rakudo 8156be: OUTPUT«01234␤»
22:02 sjohnson rakudo: my $a; $a += 0.1 for ^10; say $a == 1
22:02 p6eval rakudo 8156be: OUTPUT«1␤»
22:03 Italian_Plumber left #perl6
22:05 flussence is there a parrot bug for that readline thing?
22:05 Italian_Plumber1 left #perl6
22:08 sftp left #perl6
22:08 kjeldahl_ left #perl6
22:13 ash_ flussence: no, its not a bug, readline doesn't support unicode, its a readline issue
22:20 dalek mu: 959ccdd | sorear++ | v6/Dist-Zilla-Plugin-STD/li​b/Dist/Zilla/Plugin/STD.pm:
22:20 dalek mu: Revert D:Z:P:STD to not scrape svn revisions
22:20 dalek mu: review: http://github.com/perl6/mu/commit/959​ccdd32e1d8d6acae3192fde7cb2411e3af8aa
22:20 dalek mu: 896eade | sorear++ | v6/Mildew (5 files):
22:20 dalek mu: [Mildew,Mildew-Setting-SMOP] Some fixes for new STD
22:20 dalek mu:
22:20 dalek mu: It gets far enough to thrash cc1 now, which is an improvement?
22:20 dalek mu: review: http://github.com/perl6/mu/commit/896​eadea49de61ff2f6048964b18a399623970a1
22:20 * sorear tries to build on feather1, which has 7x more RAM
22:28 wallberg left #perl6
22:32 araujo left #perl6
22:35 daemon joined #perl6
22:38 sorear phenny: ask pmurias Does Mildew-Setting-SMOP normally require >3GB to build?  It's failing both locally and on feather1 with ENOMEM during the gcc call (so not an infinite allocation bug in our code)
22:38 phenny sorear: I'll pass that on when pmurias is around.
22:39 estrabd is now known as estrabd_afk
22:50 rgrau_ joined #perl6
22:51 timbunce left #perl6
23:10 nymacro left #perl6
23:10 araujo joined #perl6
23:11 leprevost joined #perl6
23:11 rgrau_ left #perl6
23:28 stkowski left #perl6
23:31 araujo left #perl6
23:34 ash_ left #perl6
23:37 nymacro joined #perl6
23:40 araujo joined #perl6
23:40 araujo left #perl6
23:40 araujo joined #perl6
23:53 ash_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo