»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
ash_ i just merged your master, was the change to try.js mostly to add <kbd> tags? 00:00
00:09 ilogger2 joined
flussence yeah it did, my bad :( 00:09
ash_ no worries, i'll fix it 00:10
flussence k
00:11 DemoFreak joined
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
ash_ i am not a designer at all
flussence I'm not much of one either :)
00:15 mathw joined
ash_ flussence++ thanks for helping 00:21
ash_ bbl, apparently i am going to dinner now
00:22 _sri joined 00:27 c0d3d joined 00:34 nine joined, peters_mops joined, x3nU joined
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␤»
hudnix rakudo: say "hello"
p6eval rakudo 750a02: OUTPUT«PackFile_unpack: This Parrot cannot read bytecode files with version 8.4.␤␤PackFile header failed during unpack␤»
hudnix oops?
flussence hudnix: it's broken right now, "star: " might work though 01:21
hudnix star: class A {has $.prev = self;}; A.new.perl.say;
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
..line…
hudnix .perl doesn't like self references :) 01:22
01:35 leprevost joined 01:39 redicaps joined
redicaps perl6: say 1 , 3 ... 01:43
p6eval pugs: OUTPUT«(timeout)»
..rakudo 750a02: OUTPUT«PackFile_unpack: This Parrot cannot read bytecode files with version 8.4.␤␤PackFile header failed during unpack␤»
TimToady std: say 1 , 3 ...
p6eval std : OUTPUT«===SORRY!===␤Bogus term at /tmp/q630dsJ0rx line 1 (EOF):␤------> say 1 , 3 ...⏏<EOL>␤Parse failed␤FAILED 00:01 117m␤»
redicaps perl6: say 1, 3 , 5 .. 11; 01:44
p6eval pugs: OUTPUT«13567891011␤»
..rakudo 750a02: OUTPUT«PackFile_unpack: This Parrot cannot read bytecode files with version 8.4.␤␤PackFile header failed during unpack␤»
01:46 redicaps left 01:47 c0d3d left 02:16 araujo joined
ash_ whats wrong with rakudo? 02:26
02:26 leprevost left
plobsing looks like rakudo needs to be recompiled 02:32
hmmm... 8.4 is the latest PBC version. somehow rakudo got out of synch with whatever parrot is running it. 02:35
ash_ i bet its because they bumped the parrot revsion 02:36
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:37
plobsing the weird thing is, that message means perl6.pbc is PBCv8.4, which is the latest. 02:38
that means rakudo was compiled with a later version of parrot than the one running it.
ash_ i don't know why it does it but it seems to any time parrot bumps the pbc version 02:47
02:51 jaldhar joined 02:58 leprevost joined 02:59 dju_ joined 03:01 jaldhar left, jaldhar joined 03:15 leprevost left 03:21 leprevost joined 03:40 dju_ left 03:43 dju joined 03:52 Raynes joined 03:53 DemoFreak left
thowe star: <something Another> 03:55
p6eval star 2010.07: ( no output )
thowe star: say <something Another>
p6eval star 2010.07: OUTPUT«somethingAnother␤»
thowe star: say ~<something Another>
p6eval star 2010.07: OUTPUT«something Another␤»
thowe why?
why does putting the tilde in front of the list make them evaluate with a space between them? 03:56
this is in the perl6 book with no apparent explanation
plobsing star: (<x y z>).WHAT.say 03:57
p6eval star 2010.07: OUTPUT«Parcel()␤»
plobsing star: (~<x y z>).WHAT.say
p6eval star 2010.07: OUTPUT«Str()␤»
plobsing parcel handles its own printing, but stringifies differently 03:58
or something like that
thowe why does putting the ~ in front of it make it "strigified"?
er stringified 03:59
plobsing IIRC, unary ~ is the string context operator
thowe is it because it is the string concat operator?
:)
some days I almost fee adequate 04:00
so I could also...
star: say ~ <something Another>
p6eval star 2010.07: OUTPUT«something Another␤» 04:01
thowe so the lack of the space was stylistic
04:01 DemoFreak joined
diakopter pugs: say 1 ... 04:09
p6eval pugs: OUTPUT«(timeout)» 04:10
diakopter heh
phenny: ask moritz_ you around? ;)
phenny diakopter: I'll pass that on when moritz_ is around.
thowe is there some way to get a list of methods an object supports?
plobsing star: Str.^methods.say 04:11
p6eval star 2010.07:
..OUTPUT«StrIntpredBoolencodesuccNumACCEPTSWHICHperlcapitalizepredatanhexpcoseclcp5chopcharsto-radianssinhacotanlcfirstrootslinessectrimasectrim-leadingcotanhcisloglog10sechrandsprintftruncatebytessinsqrtasincoshsuccsignasinhabsacosechucceilingunpolarsamecasefloorsubstrasechordroundflipspli…
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
..tri…
thowe I was looking for Str. 04:13
When returning the object as a different class, is it the normal thing than for that method to be capitalized?
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.
thowe sweet
"Parcel" is a new one on me 04:15
plobsing I'd look that one up in the spec. 04:16
04:32 Psyche^ joined, Psyche^ is now known as Patterner 04:44 dju left, dju joined 04:49 dju_ joined, dju_ left, dju_ joined, dju left 05:16 Raynes left 05:20 dju joined 05:21 dju_ left 05:28 Raynes joined 05:32 Mowah joined 05:39 nymacro joined 05:46 \xF0 joined 06:04 wtw joined
sorear good * #perl6 06:07
wow, so much backlog in the last 21h that irssi's buffer has overflown 06:08
06:09 proller joined, barika joined
sorear oh nice, CPAN6 ball is finally rolling. 06:20
sorear wonders how GLOBAL merging interacts with BEGIN and eval
moritz_ good morning 06:21
phenny moritz_: 04:10Z <diakopter> ask moritz_ you around? ;)
moritz_ diakopter: yes
diakopter :)
moritz_: I think I forgot my question 06:24
anyone: what is GLOBAL merging 06:25
moritz_ diakopter: happens :-)
diakopter or, where is GLOBAL merging mentioned in the S 06:28
moritz_ never heard of it, and thinks it's an implementation detail 06:33
sorear S02:2622
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:34
diakopter ah. 06:36
06:48 Mowah left 07:13 Ross joined, Ross left, Ross joined 07:26 barney joined 07:35 Ross left 07:36 linux-m00n joined
Alias_ Dear 07:48
- 'Moritz Lenz [email@hidden.address]
- 'Johan Viklund [email@hidden.address]
Please stop breaking CPAN with your Perl 6 modules 07:49
KTHNKSBYE
Re: search.cpan.org/dist/JSON-Tiny/
07:50 tadzik joined
tadzik gmorning 07:51
mathw lo tadzik 07:54
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
nor from anybody else on #toolchain
07:57 bacek joined
moritz_ so it can't be that severe a breakage 07:57
KTHXBYE
sorear Hi Alias_ 08:02
Alias_: What is your current position on use.perl.org/~Alias/journal/35508 ? 08:04
08:04 aloha joined
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:05
08:10 szabgab joined
Alias_ sorear: Largely unchanged 08:14
And the slow spread of Devel::Declare into trivial domains is proving my point 08:15
Exporter::Declare...
Anything that uses Devel::Declare is unparsable by PPI
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
if I understand what's being said on #p5p right now 08:20
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
properly
moritz_ what's the relation between toolchain and the ability to statically parse a file? 08:22
08:22 kjeldahl joined
Alias_ moritz_, not a huge amount 08:22
Well, depeneds
sorear moritz_: SPOT
Alias_ The Perl 5 #toolchain is the stack of stuff you need to install and load modules
08:22 hudnix joined
moritz_ sorear: what is SPOT? 08:22
Alias_ It deals with complete, working code 08:23
So no real need for parsing
sorear moritz_: single point of truth
Alias_ PPI and friends are part of the larger language tooling ecosystem
Editors, analysis
Developer toosl
The two are for the most part orthagonal
sorear moritz_: any metadata which is maintained separately from the code is evil and a bug waiting to happen
moritz_ sorear: the compiler should provide the single point of truth
Alias_ moritz_, how do you know anything about uncompilable code? 08:24
moritz_ Alias_: you don't
Alias_ How do you syntax highlight 08:25
Or anything else
You can only syntax highight when the code legally compiles?
If so, how do you syntax highlight BEGIN { while 1 { $_++ } }
moritz_ well, there will always be tradeoffs one way or another
Alias_ That way lies the tooling approach of smalltalk 08:26
08:26 mjk joined
Alias_ Now, if you're happy to be a smalltalk like language, that's fine 08:26
If you want "normal" editors, well too ahd
bad
The majority of successful languages are, however, NOT like smalltalk
sorear BEGIN { *foo = (rand > 0.5) ? sub(){} : sub {} }; foo / ...
Alias_ BEGIN { exit unless christmas } 08:27
moritz_ is C a successful language, in your definition?
sorear likes a trend away from BEGIN
moritz_ you can't syntax highlight C properly unless you expand all macros 08:28
so, people use approximations
Alias_ Are macros turing complete?
moritz_ seems to work, mostly
no idea
Alias_ C and Perl 5 are about the same
moritz_ probably not
Alias_ Smalltalk is worse
And on that note, I have Roller Derby training :)
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
moritz_ I do see the danger in grammar changes
Alias_ Later
moritz_, and therein lies the great danger. Most people don'
t
Alias_ &
08:30 [hudnix] joined
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
and pmichaud
08:30 barney left
moritz_ just like it is/was with junctions: people think they are great; then they overuse them 08:30
and finally they find out that they have their uses, but that the use cases are fairly limited 08:31
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
sub dir(Mu $filter = none('.', '..')) is the most difficult useful case I've seen
08:34 hudnix left
moritz_ things like @list.grep(Int & * %% 2) can also be nice 08:35
08:35 dju left, dju_ joined, bacek left
sorear I think I'll invent an is-smartmatch-represented-as-closure parameter trait, and let gradual typing take care of that. 08:37
08:39 daxim joined 08:41 dakkar joined 08:42 aloha left 08:43 wallberg joined
moritz_ ideone.com/Bqzvw another way to run Perl 6 in the browser... seems to use the 2010.08 release 08:47
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␤»
tadzik :) 08:56
I hate this
moritz_ too
08:57 timbunce joined
moritz_ rakudo on p6eval will be unavailbe until ./wipe-and-rebuild-rakudo.sh has finished :-) 08:57
phenny: tell masak about a feature request for <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
moritz_ rakudo: b0rked 09:03
p6eval rakudo : OUTPUT«sh: ../p/bin/perl6: No such file or directory␤»
09:04 aloha joined 09:08 dju_ left 09:09 ascent_ joined 09:10 hirschnase joined
moritz_ rakudo: b0rked 09:14
p6eval rakudo : OUTPUT«Could not find sub &b0rked␤ in main program body at line 22:/tmp/bpit6tJ4uF␤»
moritz_ rakudo: say 1 09:16
p6eval rakudo 750a024: OUTPUT«1␤»
09:17 sundar joined 09:19 dju joined 09:21 icwiener joined
tadzik rakudo: say .WHAT 09:21
p6eval rakudo 750a024: OUTPUT«Any()␤»
tadzik heh, I don't feel worried about try.rakudo.org anymore: i.imgur.com/Thi1Z.png 09:27
09:34 Trashlord joined 09:35 wallberg left
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 09:41 sjn joined, wamba left 09:42 wallberg joined
moritz_ #cpan6sketch is cancelled? 09:42
who cancelled it, when and why?
09:43 sjn_ joined
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.
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␤»
nymacro is this supposed to work?
moritz_ it is
rakudo: enum Test <1 2 3 4 5>; say Test.enums.keys.pick(2) 09:53
p6eval rakudo 750a024: OUTPUT«53␤»
nymacro moritz_: cheers. Perl 6 book had example using pick as I did, but I guess it isn't absolutely correct 09:55
moritz_ nymacro: right; we should add a warning that it doesn't work at the moment 09:56
tadzik rakudo: enum Test <1 2 3 4 5>; say Test.WHAT # correct? 09:57
p6eval rakudo 750a024: OUTPUT«()␤»
moritz_ no; also known
tadzik so .enums is a workaround?>
moritz_ right
tadzik saner 09:58
moritz_ but it's spec that .enums works
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
moritz_ nymacro: with "known" I mean that masak (who implemented much of the enums stuff) knows about, and I do too :-) 09:59
it might well not be documented anywyere
10:00 Italian_Plumber joined
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)
tadzik does -gen-parrot work, not only --gen-parrot? 10:05
toebu: also, it very much depends on what you mean by Essential Perl 6 Thing
nymacro toebu: first slide: making not makeing 10:06
:>
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
though I was mainly targeting to make Perl 5 programmers curious
toebu tadzik -gen-parrot it did work when I tested it in august :-) ... 10:08
moritz_ 31-eq-test.p6 could use some horizontal aligning 10:09
toebu: that's probably a left-over from Getopt::Long used in Configure.pl, but the canonical spelling should be --gen-parrot
"Perl6 has no undef. Use Mu, Any, Str, Number." 10:10
Number is not a built-in type
toebu --gen-parrot seems to be 'the right thing'
moritz_ and btw rakudo supports regex modifiers directly after the m now 10:12
so m{ :i ... } can also be written m:i{ ... }
toebu moritz_ fixed
moritz_ regexp ... cool
moritz_ and the | in perl 5 regexes corresponds more to || in Perl 6 10:13
(though rakudo doesn't distinguish the two yet)
| is supposed to match the longest alternative
toebu goes for lunch ... will back in 2h 10:14
moritz_ # rule implies sigspace # should be :sigspace, IMHO 10:15
it might to worth mentioning that .pick(*) is shuffling
s/Fibonatchi/Fibonacci/ 10:16
otherwise very nice. toebu++
10:18 masak joined
masak greetings, metacamels. 10:19
phenny masak: 09:00Z <moritz_> tell masak about a feature request for <strangelyconsistent.org/>: RSS or Atom feed. That way we could add it to planetsix again.
masak moritz_: that is indeed my next planned feature.
and for exactly that reason.
10:23 leprevost left
mathw o/ masak 10:25
10:26 wallberg left
masak \o 10:28
it's odd, almost everybody loves PDFs... except for the Semantic Web posse, who hates it. www.flickr.com/photos/dullhunk/3367901850/
s/who/which/
mathw I only like PDFs for carting print layout stuff around 10:30
For non-print applications they're pretty terrible
daxim ↑ what he said 10:32
masak nod -- I use PDFs for replicating layouts. I use it for presentations, but now HTML5 seems to be a compelling competitor. 10:34
10:36 wamba joined 10:37 sundar left 10:39 sundar joined
masak try.rakudo.org made solidot: developers.solidot.org/article.pl?s...22/0144241 10:42
moritz_ load average on feather3 still low 10:43
tadzik a comment: If this has JIT, HTML6 have to join a local code buffer. 10:44
From Google translate, but I have no idea what this guy means
masak tadzik: sounds like the usual senseless jibe.
tadzik like "If it's fast I'm a queen of Scotland"? 10:45
10:46 Italian_Plumber left
masak maybe :) 10:46
mathw there's only one Queen of Scotland 10:48
it's an invalid comparison
10:53 masak left
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␤»
nymacro I'm guessing enums are completely screwed at the moment :/
10:58 nymacro_ joined 11:00 nymacro left, nymacro_ is now known as nymacro 11:05 ggoebel joined 11:07 ggoebel left 11:10 envi^home joined 11:12 cls_bsd joined 11:30 icwiener left
moritz_ oh ouch 11:39
11:39 masak joined
moritz_ submits rakudobug 11:40
nymacro++ # finding bugs 11:41
masak oh ouch, yes :/
probably easily fixable, though.
I'll have a look at that today; would be nice to release with as few new flaws as possible. 11:42
we're really lacking in enums tests, too. maybe I should pair up with someone to get that part done...
moritz_ we have lots of enum tests :-) 11:43
just not many passing tests
and not many for the new spec
masak right.
ash_: maybe hook 'next' and 'redo' to chapter navigation in try.rakudo.org? just a thought. 11:44
11:44 Kodi joined
nymacro rakudo doesn't come with complete test suite? 11:44
masak nymacro: we're working on the "complete" part.
nymacro :)
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
masak we hit 32k not long ago.
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?
phenny Kodi: I'll pass that on when pmichaud is around.
masak 32k passing tests, that is.
11:46 plobsing joined
masak std: say 1 , 3 ... # from backlog 11:47
p6eval std : OUTPUT«===SORRY!===␤Bogus term at /tmp/qFNvJqL5Hd line 1 (EOF):␤------> say 1 , 3 ... # from backlog⏏<EOL>␤Parse failed␤FAILED 00:01 117m␤»
toebu moritz_ thanks for the review ... I have integrated your suggesttions ... updated tutorial is on tobi.oetiker.ch/test/p6-tutorial.pdf
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."
moritz_ or it could be "missing term" 11:50
11:51 linux-m00n left
masak <Alias_> sorear: Next time, please notify me when you're having me 11:53
apparently, we still suck at this. :/
s/me/meetings/ # mis-copypaste :(
Alias_ Yes, you do 11:54
masak Alias_: #cpan6sketch every Tuesday at UTC 16:00.
Alias_ ok
11:54 snearch joined
masak Alias_: at this juncture, you're the most important person to have there during the meeting. 11:54
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␤»
masak wtf? that should not happen after the enums patch.
masak digs in
moritz_ .pick hasn't ever worked after the enums patch 11:58
masak it's defined here: github.com/rakudo/rakudo/blob/maste...num.pm#L12 11:59
moritz_ I know I've seen that line, and wondered why it doesn't work
masak a guess:
it works, but the call it makes doesn't.
moritz_ note that .pick(:$replace) should really be .roll 12:00
masak that, too.
12:00 sftp joined
masak rakudo: my $enummap = enum <a b c>; say $enummap.pick() 12:00
p6eval rakudo 750a024: OUTPUT«b 1␤»
masak rakudo: my $enummap = enum <a b c>; say $enummap.pick(2)
p6eval rakudo 750a024: OUTPUT«b 1a 0␤»
masak huh.
so much for that guess. 12:01
12:01 timbunce left
masak rakudo: enum Test <1 2 3 4 5>; say for Test.^methods 12:05
p6eval rakudo 750a024: OUTPUT«␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤»
masak rakudo: enum Test <1 2 3 4 5>; say for Test.^methods(:local) 12:06
p6eval rakudo 750a024: OUTPUT«␤␤␤␤␤»
moritz_ .say
rakudo: enum Test <1 2 3 4 5>; ssay for Test.^methods(:local)
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)
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␤»
masak rakudo: enum Test <1 2 3 4 5>; say .name for Test.^methods
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␤reverse␤end␤min␤max␤minmax␤pick␤roll␤classify␤reduce␤uniq␤kv␤keys␤values␤pairs␤postcircumfix:<[ ]>␤at_pos␤postcircumfix:<{
..}>␤at_key␤clone␤defined␤bless…
masak rakudo: enum Test <1 2 3 4 5>; say .name for Test.^methods(:local)
p6eval rakudo 750a024: OUTPUT«WHAT␤enums␤Str␤pick␤ACCEPTS␤»
masak std: say
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:␤------> say⏏<EOL>␤ok 00:02 114m␤»
masak rakudo: say
p6eval rakudo 750a024: OUTPUT«␤»
masak reported?
moritz_ yes
masak semi-thought so.
there's pick in there. 12:08
moritz_ moritz@trudi:~/rakudo>./perl6 -e 'enum A <b c d>; say A.pick'
c 1
moritz@trudi:~/rakudo>./perl6 -e 'enum A <b c d>; say A.roll'
d 2
masak ungood stringification.
but at least it does something.
so it's only the one-arg form that fails.
moritz_ rakudo: enum A <b c>; say A.pick
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)
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␤»
moritz_ just take a look at the signauters
masak positionals!
:(
12:09 timbunce joined
moritz_ anyway, I have a fix here 12:09
masak ok, great.
moritz_ - multi method pick(:$replace) { $values.pick($replace) } 12:10
- multi method pick($num, :$replace) { $values.pick($num, $replace)
+ multi method roll($num = 1) { $values.roll($num) }
+ multi method pick($num = 1) { $values.pick($num) }
masak moritz_++
oh, does .roll also default to 1?
I thought TimToady said it'd default to Inf or *
moritz_ rakudo: say <a b c>.roll
p6eval rakudo 750a024: OUTPUT«a␤»
moritz_ tries it with consistency 12:11
waiting for the spectest run to finish
masak maybe that was before it got the name 'roll', though.
ok, next question: why does it stringify to the pair, and not to, say "Test::c"? 12:12
there's a .Str method right there: github.com/rakudo/rakudo/blob/maste...num.pm#L21
moritz_ rakudo: say True 12:13
p6eval rakudo 750a024: OUTPUT«1␤»
moritz_ probably same reason
rakudo: say True.Str
p6eval rakudo 750a024: OUTPUT«Bool::True␤»
masak huh.
moritz_ must be a ftable somewhere
masak so... .Str and stringification aren't the same?
moritz_ *vtable
masak how do I have it affect stringification? 12:14
preferably, I'd like for it to say "True" when I do "say True" as well...
moritz_ it's supposed to print Bool::True 12:15
masak that worksforme too.
moritz_ first find out how the current stringification works
then fix it :-)
12:16 \xF0 left
masak aye :) 12:16
I think step 1 requires pmichaud or jnthn, though.
12:16 Mowah joined
moritz_ there's a guess 12:17
12:17 \xF0 joined
moritz_ src/builtins/Bool.pir 12:17
boolproto = p6meta.'new_class'('Bool', 'parent'=>'parrot;Boolean Cool')
maybe it gets the stringification vtable from the parent class?
masak does that tell us how to override it? 12:18
moritz_ tries something
... after the enums .pick/.role spectest run finishes :-) 12:20
12:22 sundar left 12:30 mjk left
moritz_ masak: even if I get stringification of True and False fixed, I'll likely wait 'til after the release 12:35
I guess it'll break a lot of modules
masak moritz_: jnthn's answer when it came to overriding stringification on the enum type object was "you can't".
moritz_: agreed. no need to rush.
12:38 bluescreen joined
moritz_ $ ./perl6 -e' say True' 12:44
Bool::True
12:45 bluescreen left
masak \\\ooo/// 12:45
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
masak moritz_++!
moritz_ flussence: rm -rf parrot_install/ parrot/ # if you have no important data there
flussence k
moritz_ flussence: then make realclean; perl Configure.pl --gen-parrot; make -j3 spectest_smolder
masak it's official: with the local patch moritz_ has, Rakudo will be *awesome*!
tadzik :) 12:47
dalek kudo: 8156beb | moritz++ | src/glue/enum.pm:
fix .pick and .roll on enums
moritz_ masak: pushed to branch bool-str
masak yay 12:48
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
moritz_ masak: it just add an PIR level method with :vtable('get_string') 12:50
masak hah! 12:51
so the biggest problem is that enum.pm is in Perl 6, then.
moritz_ not sure
how do you write a closure method in PIR? :-) 12:52
tadzik I think there is a way
12:52 plainhao joined
tadzik but I may be wrong :) 12:53
moritz_ would love an 'is vtable' trait in nqp and rakudo
tadzik I was looking throught the PIR docs few days ago and I was suprised how many things it can do
arnsholt moritz_: I've fiddled a bit with that, actually
Shouldn't be excessively hard to get working. It just has to be done
moritz_ tadzik: it's surprisingly high level for an assembler :-) 12:54
tadzik well, it's not PASM :)
I think there was a whiteknight's post on why PIR should die
but an assembly with syntatic sugar, dynamic typing and stuff is not bad :) 12:55
12:55 snearch left
moritz_ it feels like it only needs syntactical 'if' and 'loop' to be a quite usable programming language 12:55
arnsholt If PIR is to die, NQP needs to support more of what PIR brings to the table 12:56
(I think)
rakudo: say(min *+2, 1,2,3,0,5); 12:58
p6eval rakudo 750a024: OUTPUT«0␤»
masak code.google.com/p/close/ 13:00
I think Close looks enticing.
13:00 bluescreen joined, fridim joined
moritz_ flussence: btw you now have commit access to the try.rakudo.org repo 13:00
flussence: resistance is futile, all your patches are belong to us! :-) 13:01
masak not many updates lately on the Close blog. close-parrot.blogspot.com/ maybe Austin would like a helping hand.
arnsholt masak: Indeed. I'll have to look into that
(In my "copious free time" as Tom Lehrer puts it =)
flussence \o/
masak arnsholt: :)
me too, in the same kind of time. 13:02
ooh, the nqp-rx optable parsing wiki explanation page at trac.parrot.org/parrot/wiki/NQP-rx%...%20Parsing -- linked from the latest blog post on that blog -- looks like all kinds of goodness! 13:03
much of the summary there looks like what I learned when writing GGE. 13:04
but nicer, since nqp-rw is nicer.
s/rw/rx/
13:05 ruoso joined 13:07 hirschnase left
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
betterworld which is a bit cumbersome. Is there a better way to write this? I suppose I could do it with macros
(.lookup is a method that fills in all the attributes) 13:13
masak betterworld: or a custom metaclass.
hm, didn't jnthn++ do something like this with a role?
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 ;)
masak betterworld: welcome to the club :)
moritz_ betterworld: in a perfect Perl 6, you'd write has $.name = lazy { $.lookup };
13:14 patspam joined
masak right. the question is how to best workaround it today. 13:15
moritz_ however rakudo doesn't do lazy{} yet :/
betterworld moritz_: yes, I thought about default values too, and wished they could be lazy
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:16
moritz_ $accessor.wrap({ my $thing = callsame(); $.lookup unless defined $thing}) 13:17
masak betterworld: I think you might benefit from studying how github.com/jnthn/test-mock works under the hood.
moritz_ (plus a bit of bookkeeping)
13:17 Patterner left
masak betterworld: it does something quite close to what you want to do. 13:17
13:17 nymacro left
masak though arguably you have to do something akin to 'my $x = mocked(Foo);' to enable the lazy behavior. 13:18
but still. as workarounds go, that's quite a clean one.
betterworld moritz_: how do I get $accessor? &name is not defined
moritz_ betterworld: self.^methods(:local) and grep for attribute names (which you can find with self.^attributes) 13:19
it's a bit hacky, IMHO 13:20
oh wait, easier
self.can($name)
betterworld yes ;) I think this is what I meant by nice-looking
moritz_ you can't access method objects by name directly, unless they were declared as 'our method foo { }' 13:21
13:21 Holy_Cow joined
moritz_ I've come to dislike that limitation 13:21
masak I think I've come to accept it.
13:22 synth joined
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(); })
p6eval rakudo 750a024: OUTPUT«Method 'wrap' not found for invocant of class 'P6Invocation'␤ in main program body at line 22:/tmp/QLjGJ0hMHF␤»
tadzik I didn't like it from the beginning
moritz_ :(
13:22 ggoebel joined
masak known? 13:23
I think it is...
moritz_ rakudo: class C {has $!name }; C.^add_method('name', method() { say "in name"; $!name} }); say C.new(name => foo).name
p6eval rakudo 750a024: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
moritz_ rakudo: class C {has $!name }; C.^add_method('name', method () { say "in name"; $!name} }); say C.new(name => foo).name
p6eval rakudo 750a024: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 22␤»
moritz_ rakudo: class C {has $!name }; C.^add_method('name', method () { say "in name"; $!name }); say C.new(name => foo).name
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
p6eval rakudo 750a024: OUTPUT«in name␤foo␤»
moritz_ betterworld: something like this? :-)
betterworld oh well ;)
moritz_ "just" needs programmatic access to the attribute
might require fallback to pir::getattribute__PPS($obj, $name) for now 13:25
masak moritz_++
huh, you can still do .^add_method without MONKEY_TYPING?
that can't be right...
betterworld actually I thought about pir::getattribute__PPS too while looking for a solution :)
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␤»
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␤»
masak submits rakudobug
13:29 Psyche^ joined, Psyche^ is now known as Patterner 13:33 wamba left 13:34 patspam left
moritz_ btw for $job I've also encoutered phasers, erm, phasors actually: www.eu-phasors.eu/index.html 13:36
13:39 patspam joined
masak "set to stun" -- indicates a certain correlation between being a physicist there and having watched Star Trek... :) 13:40
also good to know we're not the ones with the most strained puns out there... :P
moritz_ :-) 13:41
13:42 tadzik left
masak rakudo: Rat.^add_method('lol', method ($what) { say "lol$what" }).lol('cat') 13:42
p6eval rakudo 750a024: OUTPUT«Null PMC access in find_method('lol')␤ in main program body at line 22:/tmp/KoUi3tNtnC␤» 13:43
13:43 patspam1 joined
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.
what's the difference?
I'm one Rakudo commit ahead of p6eval. 13:44
and my Parrot is at r49245, whereas p6eval's is at r49192. 13:45
anyone else not getting a Null PMC access locally on the above program?
13:46 patspam left
moritz_ masak: I'm one commit ahead of master, and get a Null PMC access too 13:47
masak hm. 13:48
oh well, never mind.
I can't close the ticket if it still fails in two different places.
mathw it's definitely wrong 13:49
somehow
betterworld masak: thanks, I looked at Test::Mock, but I think that technique is a bit more overhead than appropriate for my accessors..
masak betterworld: I agree -- it's more overhead than desired. 13:50
best would be to have the '= lazy { ... }' option that moritz_++ suggested.
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:52
13:53 tadzik joined
moritz_ the .^add_method thing should work completely generic, though verbose 13:53
13:54 patspam1 left
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 :-)
betterworld something like $!"$name"? 13:55
moritz_ I thought more of a non-syntactic way 13:56
.^attributes returns a list of Attribute objects
they could have a .get_value($object) method
betterworld analoguous to self."$name"()
moritz_ which looks sufficiently ugly to say "don't do this, it violates the object's privacy, unless it's your own ojbect" 13:57
betterworld ok, a .^attribute($name).get_value($object) would be nice 13:58
dalek ast: 44e9d50 | moritz++ | S32-hash/exists.t:
[exists.t] remove some wrong assumptions about how True stringifies
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
masak ok, I'm in way over my head. 13:59
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
with the knowledge that if you abuse such a system, it's your fault, not the class author's fault
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): gist.github.com/591718 - He wrote that off the top of his head in front of me and it worked first time :)
[Coke] (pir, if, loop) - check out ".hll_macros"
masak moritz_: I hear what you're saying. this just feels like a particularly big step in the break-encapsulation direction.
moritz_ masak: would you prefer a GET_VALUE in all uppercase as additional deterrent?
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.
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
masak moritz_: both of those are "on the object" in question. 14:03
but point taken.
mathw doesn't like the default constructor
moritz_ masak: what do you mean by "on the object"?
mathw but I see no reason not to provide ways around privacy
sometimes it's necessary
moritz_ betterworld++
masak moritz_: you call .perl and .new on the object with the private attributes that you're violating.
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
moritz_ huh? I still need the object to call get_value
masak right.
moritz_ so I don't understand the difference 14:05
betterworld timbunce: this looks interesting.. I'll have to investigate that
masak I'm talking about the difference between self.attr.get_value and $your_object.attr.get_value
14:05 ruoso left
mathw maybe there's a better way to do it 14:05
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:06
betterworld: maybe it's easiest to just store a hash with field names :-) 14:07
14:07 sundar joined
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:07
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.
masak finds p6l thread
betterworld moritz_: yes.. but I thought that would be against the intentions of Perl 6 objects 14:09
14:09 Holy_Cow left, Holy_Cow joined
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
14:10 patspam joined
masak moritz_: this reply by sorear++ to a question I had on p6l: www.nntp.perl.org/group/perl.perl6....34029.html 14:10
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
moritz_ masak: I do; it's just talking about a different "privacy leak"
masak right.
one that wasn't an issue, it turned out.
because $!foo-style variables are bound at compile time. 14:12
moritz_ right; it was only a rakudo issue, not a Perl 6 issue
masak aye.
moritz_ wonders if the indirect name syntax can be (ab)used for attribute access inside classes
14:12 mfollett joined
masak anyway, that made a lot of sense to me. with that view of things, private attributes were really quite private. 14:12
moritz_: you mean, specify the whole class name, and suddenly get the private attribute? 14:13
I don't think so, because the A!foo syntax is only for calling methods.
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
and that I offered betterworld solution 1) because 2) is harder to implement and spec :-)
14:15 molaf joined 14:22 ruoso joined
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
if it can, I'm not sure I need anything beyond that.
14:23 patspam1 joined
moritz_ I'm sure I do :-) 14:23
14:24 patspam left
masak good design is born out of discussions like this, I think. 14:24
moritz_: when is &eval not sufficient for you, and why?
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:25
masak oh, so the same old &eval mind ghost, then. 14:26
moritz_ that's one aspect
masak *all* input sent to sufficiently powerful primitives need to be sanitized.
there's nothing special about &eval in that respect.
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".
moritz_ (1) using its methods as API
masak whether you then choose to shoot yourself in the foot as well is up to you. :)
moritz_ (2) treating it as a meaningless collection of bytes or attribute values where you don't care about the particular structure
(2) is usually used for serialization, comparison, some forms of cloning etc. 14:28
I think we should support that kind of usage too
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.
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.
(and I like that)
moritz_ it's not.
14:30 pmurias joined
moritz_ see .perl. 14:30
see default .new
masak goes looking
14:31 Italian_Plumber joined
moritz_ rakudo: class A { has $!private }; say A.new(private => 'OH NOEZ').perl 14:31
p6eval rakudo 750a024: OUTPUT«A.new(private => "OH NOEZ")␤»
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)
masak and that was the difference I tried to articulate above.
you just got the object to voluntarily tell you its own private attributes. of course that must be allowed.
moritz_ no 14:33
14:33 silug joined
moritz_ class A has nothing in it saying "I allow you to access $!private" 14:33
so it was involuntarily
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.
moritz_ but you don't say it, it's just down in the user manual in a very small font
masak .perl and .new are OK because they're non-monkeypatched methods acting on self. 14:35
14:35 patspam joined
moritz_ neither would .get_value be monkeypatched 14:35
but provided by the implementation
masak yes. 14:36
14:36 wtw left
masak and you would be able to do it from outside the class. 14:36
14:36 patspam1 left
moritz_ just like you're able to call .perl and .new from outside the class 14:37
14:37 rgrau` joined
moritz_ honestly fails to see the difference 14:37
masak unlike what the .perl and .new methods do, which is contained within those methods.
.perl and .new abstract away the introspection.
.get_value doesn't.
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.
maybe we should resume this discussion once I have a concern. 14:39
moritz_ right
and it would be interesting to hear opinions from TimToady and The Object Folks :-)
pmurias why are "The Object Folks"?
* who
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
pmurias moritz_: i don't think .get_value should be specced
14:41 patspam1 joined
pmurias or if specced guaranted to work 14:41
masak perks up again
moritz_ pmurias: why?
pmurias: and would you like to see other introspection means instead?
14:42 patspam left
pmurias the ability to introspect the variables forces the optimizer to keep the attributes in a way that allows introspection 14:42
s/variables/attributes
moritz_: currently there is no way to get them out of the object 14:43
14:43 ash_ joined
moritz_ right; that's what I propose to change 14:43
masak and what I have an uneasy feeling about allowing.
pmurias moritz_: what's your proposal? 14:44
moritz_ pmurias: an .get_value($obj) method in class Attribute (which is what .^attributes[0] returns)
pmurias what's the use for that?
ash_ moritz_: can you add flussence to the try.rakudo.org repo? he's helping with the tutorials in there
moritz_ ash_: already done
pmurias: $serialize.serialize($obj)
pmurias should objects handle their own serialisation? 14:45
ash_ ah, sweet, thanks
pmurias * shouldn't
moritz_ pmurias: do they?
flussence hi ash_
moritz_ pmurias: should they be forced to know about all possible serialziation formats? 14:46
*serialization
flussence I'm slowly getting somewhere with it, should have something useful today
perigrin .get_value() would make me sad.
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)
ash_ flussence: awesome, i'll help out some this afternoon, i am just working on something for my graduate professor right now
masak I think it's mainly that moritz_' message "privacy was never real to begin with" is a bit hard to accept.
it might well be true.
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
moritz_ as TimToady put it once, in first approximation all computer memory is read- and writable
pmurias moritz_: if we have .get_value() it should be allowed to die with a "can't access that attribute"
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".
perigrin masak: right that's called a MOP. 14:50
masak I see.
moritz_ and since you need .^attributes to get to the Attribute object, you already took the Path of the Meta Object
perigrin in P6 terms something like Class.HOW.get_private_attribute_by_name($name).get_value() 14:51
perigrin isn't really good enough to write more accurate psudo-p6
moritz_ that's pretty much it
pmurias moritz_: in a way you already violated the privacy if you can see that a private attribute exists
moritz_ though we have a shortcut for the .HOW, it's .^
pmurias: right 14:52
ash_ $foo.^private-attribute($name).value; # whats with the long names?
masak yes, .value
moritz_ perigrin: so in Perl 6 it would $obj.^attributes.grep($name).get_value($obj) for now
perigrin ash_: Moose background :)
masak and .value needs .value($obj)
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
pmurias moritz_: should we allow setting the private attibute
masak I don't see why not.
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
moritz_ pmurias: IMHO, yes. But it's a battle I didn't want to fight today :-)
masak pmurias: .new needs it anyway
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...
perigrin ash_: no because at that point it's the data structure
ash_ ah
perigrin but you can get rid of hte first one
masak ash_: having the last $obj be anything but 'self' is what I don't like.
perigrin by using the Class instead :)
Class.^attributes<$name>.value($obj) 14:55
masak and that's very hard to enforce.
s/very hard/impossible/
pmurias why do you want to enforce that?
masak I... I don't know anymore. :)
because it would allow me to look into another object?
perigrin because the idea of "private" attributes being accessible publically is icky 14:56
masak yes, that.
perigrin actually likes the p5 solution
"Private? What private?"
but I'm an oddity in this world I think. 14:58
ash_ well, once your dealing with the MOP aren't you already outside the realm of normal access control? 14:59
masak guess so.
perigrin not neccessarily
depends on a number of things 15:00
dalek odel: 3e28165 | mberends++ | java/ (3 files):
[java] a classLoader for the Setting compiles ok but probably does not run
masak is it impossible to have a MOP that respects privacy?
s/respects/preserves/
perigrin no.
it is just more difficult
moritz_ the question is also if it's desireable 15:01
perigrin yes
that question usually comes first
masak indeed.
gfldex masak: is LD_PRELOAD allowed?
ash_ does your class trust the MOP? (in the perl6 sense of trusts)
masak gfldex: not only do I not understand the question; I don't even understand the context of it.
perigrin doesn't know the p6 sense of trust 15:02
masak ash_: that's an interesting view of it.
ash_ perigrin: perlcabal.org/syn/S12.html#Multi_dispatch
masak perigrin: it's like C++ friends, but (maybe, I don't remember) inversed.
gfldex masak: whatever you do to protect attributes one can start to fool around with your runtim/interpreter and get around it
masak s/inversed/inverted/
ash_ hmm, that might not be the best explanation of trust
let me look a bit more
s/look/ack/ 15:03
gfldex masak: you can make it only so hard that most ppl dont bother
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.
perigrin ash_: does an instance trust it's class?
15:04 mfollett_ joined
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?
or rather class
masak gfldex: yes.
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 :)
perigrin ash_: Class A { ... }; my A $a .= new(); # does $a trust A ?
ash_ yes
moritz_ $a is a variable, and as thus as passive as possible 15:06
perigrin then yes a Class A would trust A.ClassHOW
Juerd Hmm
moritz_ I don't see how it "trust" or 'distrust'
does your door key trust you?
Juerd That'd be a great buzzword compliant name for tied variables: Active Containers
15:07 mfollett left, mfollett_ is now known as mfollett
perigrin moritz_: I suspect it doesn't. 15:07
I have never gotten one for this house.
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
perigrin luckily we have a keypad system
ash_ images sentient door keys...
p6eval rakudo 8156be: OUTPUT«{"foo" => 1, "bar" => 2, "baz" => 3}␤»
15:07 wallberg joined
tadzik oh you 15:07
ash_ masak: that was evil :P
masak private access, special delivery!
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
thing
ash_ is there a way to tell your attributes not to show up in the .perl?
Juerd That's almost sentient
moritz_ Juerd: understandable, but not quiet what I was talking about :-)
perigrin the analogy is poor there though
moritz_ ash_: you can override your .perl method
perigrin Keys and Doors (and Keys and perigrins) are different classes of objects
ash_ good point
Juerd moritz_: No but I thought I'd mention how close reality gets to weird metaphores :)
moritz_ Juerd: :-) 15:09
perigrin does my car key trust the concept of Car Key-ness is the question :)
and I don't know, I don't speak key.
perigrin wonders if that means he speaks off key
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)
perigrin the point was that a Class is an instance of it's Meta-Class
I don't know if trust applies in that case or not 15:11
or even if the question makes sense when put in that context
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
and thus is allowed to have private access
the question is do you implement the checks to keep people not defined inside Class access as well
(and then the question is ... how ... ) 15:14
moritz_ re trusting the meta class: makes some sense to me
ash_ there is also the fact that if you need a private variable, you can use MONKEY_TPYING; augment class Foo { ... } ...
moritz_ wonder if use MONKEY_TYPING; quasi { augment class {{{$class_name}}} { ... } } will work 15:16
ash_ eval "use MONKEY_TYPING; augment class $class_name { ... } " ?
moritz_ modulo escaping, and anonymous classes 15:17
masak moritz_: how does one invoke a quasi quote? 15:24
15:24 Ross joined, Ross left, Ross joined
moritz_ masak: by magic :P 15:24
pmurias masak: they are used for returning code from macros
TimToady they just run themselves inline
moritz_ meaning "I don't know"
masak TimToady: oh, ok. 15:25
moritz_ TimToady: just like bare blocks?
TimToady yes, but return an AST
masak are there pointy quasis? :)
TimToady there can be adverbs
pmurias but my $foo = quasi { say "hi" };eval $foo should work?
moritz_ rakudo: class A { method list() { 1, 2, 3} }; .say for A.new() 15:26
p6eval rakudo 8156be: OUTPUT«A()<0x5edc6f0>␤»
TimToady but we haven't tried to invent pointy quasis
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:27
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 15:32 mberends left 15:42 risou joined 15:45 patspam joined 15:52 colomon joined 15:55 z-b joined 15:57 justatheory joined 15:58 wallberg left
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.
even if it turns out to be a foolish consistency, it's one I happen to like. :) 16:02
16:04 colomon left 16:06 wallberg joined
masak 'You can use processes, or async/events, or both processes and async/events, but definitely not threads. Threads are out.' -- tomayko.com/writings/unicorn-is-unix 16:13
16:15 envi^home left
moritz_ like most general statements, this is wrong. 16:21
maybe threads are "out", but there are still places where they trump the alternatives
masak I'm a total novice at threads. I gather from other people that it's very hard to get right. 16:22
some "alternative" implementations, such as STM and Erlang-style threads, seem alluring too, but it's uncertain what will bear out. 16:23
jnthn evening, #perl6 16:25
ash_ masak: concurrency in general is hard to get right, threads just increase the complexity 16:26
tadzik evening jnthn
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
btw, try.rakudo.org is now on apache with fastcgi, so hopefully the server will be a bit more stable 16:27
and faster, since its caching almost everything now
tadzik yay 16:28
masak ash_++
16:29 kjeldahl_ joined
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:29
masak ash_: no; haven't seen. I only recently learned about Python's GIL. 16:30
jnthn ash_: Nice! :-)
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:33
masak right. Erlang's big idea IIUC is to skip the shared memory altogether. 16:34
16:36 wallberg left
ash_ ya, they follow the 'share nothing' approach 16:36
16:36 pmurias left
masak nom & 16:37
16:37 masak left, ggoebel left
daxim web.archive.org/web/20070404033843/..._fight.jpg 16:37
ash_ why's it always gotta be a war? :P 16:38
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
slavik ash_: hence you fail :P 16:40
ash_ aww man
slavik god of war will be very not pleased
ash_ grumbles stupid god of war being all stupid
16:41 cdarroch joined, cdarroch left, cdarroch joined, icwiener joined
tadzik hah, language wars 16:42
reminds me of my blag toast
16:43 mfollett left 16:44 mfollett joined 16:45 meppl joined
flussence I got the tutorial code sorta-working 16:47
ash_ i'll try it out 16:48
its in your repo on github?
flussence yeah, tutorial branch
still needs work but it's functioning now at least
ash_ flussence++ ++ ++ 16:54
flussence :D
16:54 stkowski joined 16:55 zb joined, z-b left 16:56 mrBliss joined
ash_ are you looking for specific input or output? 16:56
flussence it's checking the input == the example text right now, not sure if it could be done better 16:57
I suppose it could check the input against a regex to allow looser whitespace...
16:57 mrBliss left
ash_ i guess we need to decide if 1 + 2 and 1 + 1 + 1 are both valid answers to the first thing 16:58
it gets tricky as the examples get more complicated
16:59 dakkar left
ash_ i guess your right though, we probably do need to match the input 17:01
[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...
ash_ ya, thats very true 17:03
17:05 daxim left, rgrau` left 17:06 Guest23195 joined
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.
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 :-)
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, mrBliss left
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.
jnthn o/ pmichaud 17:11
pmichaud: In case you don't notice it, trac.parrot.org/parrot/changeset/49242/ is good news. :-)
pmichaud jnthn: is that the default gc, or ... ? 17:12
I never know which gc is which :-/ 17:13
jnthn pmichaud: gc_massacre one 17:14
pmichaud: Should become default in a little bit.
pmichaud no, I mean within gc_massacre
is there just one gc there, or two?
jnthn Hmm, good question.
pmichaud it says "gc_ms2", so I'm not sure what the '2' represents.
jnthn I think it's a second one 17:15
But I'd imaigne if it has benefits it'll become the default.
ash_ wasn't there a gc_ms2 branch?
in parrot
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.
ash_ i think it got removed/merged into gc_massacre
jnthn pmichaud: Which is at least kinda encouraging. :-) 17:16
17:16 colomon joined
colomon o/ 17:16
jnthn o/ colomon
colomon anything happening roundabouts? 17:17
pmichaud why is the mark list managed as a linked list?
moritz_ we have patches for IPv6 support patches for parrot and rakudo
colomon (I'm in a high parking lot which seems to get a good 3G signal with a snoring toddler in his car seat.)
IPv6++
PerlJam good $localtime #perl6 17:18
What's new in the world?
TimToady lol
colomon PerlJam: I just asked the same thing approx 90 seconds ago. :)
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 :)
pmichaud jnthn: Linked_List and List_Item_Header appear to be new in the branch
jnthn Ah, OK
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.
dalek ast: ea847c7 | moritz++ | S0 (6 files):
remove more wrong uses of True and False as 0 and 1 (still more left); make good use of nok() function
ast: 672abda | moritz++ | S06-multi/type-based.t:
[type-based.t] fix another Bool stringification usage
pmichaud or even a simple stack
jnthn pmichaud: *nod*
PerlJam colomon: great minds think alike :) 17:21
colomon PerlJam++ ;)
TimToady well, you can do stack semantics with a linked list
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.
pmichaud: But that'd imply searching through the list for it.
Which would not be efficient.
17:22 timbunce left
jnthn pmichaud: Anyway, probably best to ask bacek++. :-) 17:22
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
PerlJam looks too just for the heck of it. 17:26
pmichaud nm
it was the "do...while" that was throwing me off.
jnthn oh, yeah 17:28
while (0) :-)
PerlJam only hopes macros in perl6 don't *cause* people to jump through additional hoops in their code :)
(except by choise, of course)
er, choice
17:29 stkowski left
TimToady I remember a great sense of evil delight when I started using that in the P5 source code :) 17:29
or was it heavenly disgust?... 17:30
17:32 JUSEF joined
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
17:32 stkowski joined
TimToady the macro trick was a way to turn a 0 into a 1 17:32
pmichaud is that anything like squaring a circle? ;-) 17:34
JUSEF hi 17:35
[Coke] ohayo 17:36
JUSEF i want some tuto about website administration with perl script
who can help me?
PerlJam JUSEF: I think you're in the wrong place. This channel is about Perl 6
JUSEF: It sounds like you really want #perl or #perlhelp which cover Perl 5
JUSEF ok 17:37
thanks
17:37 JUSEF left
ash_ is squaring a circle, circle * circle or circle = (square)circle; ? 17:39
pmichaud my $circle as Square; 17:40
s/my// 17:41
jnthn ...was gonna say, do we have variables that cast on assignment to them... :P
ash_ dynaminc_cast<square>(circle);
17:41 rainerschuster joined
jnthn visits the nomshop 17:41
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␤»
PerlJam my $○ = '□';
17:43 patspam left
TimToady rakudo: my (Num $x as Int); $x := pi; say $x 17:43
p6eval rakudo 8156be: OUTPUT«3.14159265358979␤»
TimToady err
rakudo: my (Num $x as Int); $x := pi; say $x.WHAT 17:44
p6eval rakudo 8156be: OUTPUT«Num()␤»
pmichaud we don't attach coercions to containers yet. not sure that's spec.
TimToady rakudo: sub foo (Num $x as Int) { say $x.WHAT }; foo(pi) 17:45
p6eval rakudo 8156be: OUTPUT«Int()␤»
TimToady I don't see why that should be different
ash_ rakudo: sub foo (Num $x as Int) { say $x, $x.WHAT }; foo(pi);
p6eval rakudo 8156be: OUTPUT«3Int()␤»
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
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"␤»
colomon rakudo: sub foo (Numeric $x as Num) { say $x; say $x.WHAT; } foo(4+0i);
p6eval rakudo 8156be: OUTPUT«===SORRY!===␤Confused at line 22, near "sub foo (N"␤»
TimToady rakudo: my (Num $x as Int); $x ::= pi; say $x
p6eval rakudo 8156be: OUTPUT«3.14159265358979␤»
ash_ rakudo: sub foo (Numeric $x) { };
p6eval rakudo 8156be: ( no output ) 17:48
colomon rakudo: sub foo ($x as Num) { say $x; say $x.WHAT; } foo(4+0i);
p6eval rakudo 8156be: OUTPUT«===SORRY!===␤Confused at line 22, near "sub foo ($"␤»
ash_ rakudo: say 4+0i;
p6eval rakudo 8156be: OUTPUT«4 + 0i␤»
colomon rakudo: sub foo ($x as Num) { say $x; say $x.WHAT; }; foo(4+0i);
p6eval rakudo 8156be: OUTPUT«4␤Num()␤»
colomon ah, missing semicolon
ash_ ah
colomon rakudo: sub foo ($x as Real) { say $x; say $x.WHAT; }; foo(4+0i);
p6eval rakudo 8156be: OUTPUT«4␤Int()␤»
ash_ i was wondering what was up with that
i missed the semicolon too 17:49
colomon rakudo: sub foo (Numeric $x as Real) { say $x; say $x.WHAT; }; foo(4+0i);
p6eval rakudo 8156be: OUTPUT«4␤Int()␤»
ash_ hey, thats um... odd
TimToady how so? 17:50
Real is a role, so it's looking for the best actual type to use
ash_ i just realized Int is Real, or a kind of Real number, i was confused because i fail at math
colomon TimToady: actually not the best 17:51
Complex.Real just returns the real part (iff the imaginary part is 0)
in this case, the real part is an Int.
rakudo: sub foo (Numeric $x as Real) { say $x; say $x.WHAT; }; foo(4.0+0i);
p6eval rakudo 8156be: OUTPUT«4␤Rat()␤»
TimToady rats 17:52
colomon but no fat rats yet, alas.
TimToady rakudo: sub foo (Numeric $x as Real) { say $x; say $x.WHAT; }; foo(4.0, pi\i)
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␤»
ash_ rakudo: say (4.0.Rat).numerator
p6eval rakudo 8156be: OUTPUT«4␤»
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)
p6eval rakudo 8156be: OUTPUT«1␤»
rakudo 8156be: OUTPUT«Failure()␤»
17:53 NordQ joined
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␤»
colomon TimToady: like I.... ooooo, interesting!
TimToady that's...LTA
colomon instead of failing when it cannot convert $x to a Real, it just calls the sub with $x as Failure.
PerlJam I always wonder about what a Bridge is when I see those errors. 17:55
17:56 ash_ left
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"
jnthn
.oO( should errors from the meta-model come out at OOps? )
17:57
TimToady 'as Real' should probably imply Real:D
colomon rakudo: say Failure.defined
p6eval rakudo 8156be: OUTPUT«0␤»
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
TimToady :D is the P6 equivalent to Haskell's 'just' types 17:59
but anyway, use of Failure as a value should be throwing the actual error message in the Failure somwhow, which is another problem 18:01
18:05 NordQ left, NordQ joined
perigrin :D aren't the "incredibly happy" types? 18:06
18:07 NordQ left
TimToady that too 18:10
18:10 colomon left
[Coke] tries to make javascript act more like tcl. 18:12
18:12 ggoebel joined 18:14 ash_ joined, timbunce joined, patspam1 joined 18:16 patspam left
diakopter OH in $work irc today: "There is no codebase so big, twisted, or complex that maintenance can't make it worse." 18:19
oh, they were quoting someone else :/
18:22 x3nU is now known as gorszek 18:24 gorszek is now known as x3nU 18:27 ash_ left 18:28 proller left 18:29 rindolf joined 18:30 ruoso left
rindolf Hi all. Should I package rakudo-star-2010.08 for Mandriva Cooker or should I wait for the 2010.09 release? github.com/rakudo/star/downloads/ 18:30
tadzik is Mandriva Cooker some special Mandriva? 18:31
18:31 ggoebel left
flussence equivalent of debian unstable, I guess 18:31
rindolf flussence: Debian Testing more like it.
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
flussence (I can never remember these long names right...)
18:33 ggoebel joined, molaf joined
rindolf TimToady: OK. 18:34
18:35 ggoebel left
rindolf TimToady: thanks for the tip. 18:39
18:44 patspam1 left 18:47 ruoso joined 18:48 cognominal joined 18:52 timbunce left
rindolf PackFile_unpack: This Parrot cannot read bytecode files with version 8.4. 18:56
tadzik rindolf: remove your parrot* and rebuild 18:57
rindolf p6eval: sqrt (3) ** 2 + (4) ** 2
tadzik you're not alone hating thins
s/thins/this/
rindolf tadzik: OK.
perl6: sqrt (3) ** 2 + (4) ** 2 18:58
p6eval pugs, rakudo 8156be: ( no output )
TimToady why are you parentesizing bare numbers?
rindolf TimToady: it's just that this makes me wonder - perlgeek.de/blog-en/perl-5-to-6/04-....writeback
TimToady: return sqrt ($x2-$x1)**2 + ($y2-$y1)**2;
I wonder whether the sqrt will apply to the entire expression or only to the parens. 18:59
18:59 timbunce joined
TimToady this isn't Perl 5, so the answer is different :) 18:59
it's only the same for certain prefix operators
19:01 patspam joined
TimToady currently the only prefix: in that category is abs 19:02
so any other function will parse as a list op
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:04
(unlike in P5) 19:05
19:05 Intensity joined
rindolf moritz_: perlgeek.de/blog-en/perl-5-to-6/04-....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
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:08
rindolf Hmmm... seems like sqrt(3) ** 2 + (4) ** 2 behaves differently from sqrt (3) ** 2 + (4) ** 2 19:11
PerlJam rindolf: indeed it does
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
rindolf: it's that last bit ("function arg parens") that you've encountered
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 19:20 nymacro joined 19:21 nymacro left 19:22 nymacro joined, kjeldahl left 19:23 plainhao left 19:24 bluescreen left
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'
ash_ that's just how repl spits out errors, i'll see if i can override it 19:27
or just do a regex over it to remove the path, since that won't change (or change much)
the server froze up again, i still don't know why it keeps doing that 19:28
flussence too much traffic? 19:29
ash_ its not that heavily trafficed
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;
p6eval rakudo 8156be: OUTPUT«abc␤abc␤»
19:30 stepnem joined
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:32
19:33 M_o_C joined
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:34
sorear How would conflict reporting work? 19:35
TimToady dunno, that's something I hope someone else works out :) 19:37
esp. today when I'm battling an infection
pmichaud should we skip today's call? I have little to report. 19:38
TimToady is not playing with all cylinders today
I only have lol to report :)
I'd be fine with skipping
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)
TimToady well, it *is* a list of lists
pmichaud sorear: I'm not in charge of #cpan6sketch. :) I just said I'd prefer to report on #phasers. :-) 19:40
19:40 bluescreen joined
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
19:40 breinbaas joined
pmichaud (so no, I'm not planning on making any special effort to be present at #cpan6sketch next week.) 19:41
sorear OK.
Is Alias on your contact list yet? (re. "obra and Schwern etc") 19:42
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
...and I have the impression that Alias isn't that impressed with me in general.
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 :)
pmichaud well, in my case I think it predates (and possibly colors) the latest interactions. :-| 19:46
19:47 ruoso left
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.
TimToady uh, I already canceled it
pmichaud oh, nm then. :)
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...
I emailed
pmichaud yes, hadn't checked email yet.
I'm not hitting on a full deck today either. :-|
TimToady ;) 19:51
jnthn
.oO( I normally just play games with the cards, not eat 'em... )
19:52
oh, hitting, not biting...
...yeah, me either.
tadzik wklej.org/id/392404/ -- am I missing something? 19:53
TimToady yes 19:54
multi MAIN (:$switchname) {...}
jnthn tadzik: Use named parameters fo rthat.
TimToady they're translated to named args
tadzik ah, ok
jnthn :$switchname! is maybe better
tadzik no, I just realized it can be just 'list', not '--list'
(less typing)++ 19:55
jnthn That's what BCPL said.
TimToady well, but less extensible
sorear pokes TimToady
TimToady has a hole now
19:57 alester joined 19:59 stkowski left
ash_ flussence: i made a few changes on the tutorial system if you want to try them 20:01
20:01 timbunce left
ash_ i pushed it to a branch on github, moritz/try.rakudo.org with the branch name tutorial 20:01
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 20:03 ruoso joined
sorear hello ruoso 20:05
20:06 stkowski joined
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
(an eval, unlike a file, doesn't always start in GLOBAL, but in
20:07 timbunce joined
TimToady the caller's UNIT, so it might never even have a GLOBAL) 20:07
and it can probably get borned with its idea of GLOBAL being "true" 20:08
flussence ash_: looks much nicer now! 20:09
ash_++
TimToady note that STD renamed UNIT::GLOBAL as UNIT::GLOBALish or some such to avoid finding the "wrong" GLOBAL
20:09 icwiener left
ash_ something's not right, its not scrolling to the bottom automattically, for me anyway, i am looking into that 20:09
TimToady apologizes for not realizing why he had a hole poked in him 20:10
TimToady goes off to take a geezer nap in the hopes it will make him a better person... 20:11
&
20:11 M_o_C left
flussence ash_: $("#stdout").scrollTo($("#stdout > *:last-child"), 300); 20:12
the ">" fixes it
ash_ it was p:last-child i switched it back to that 20:13
dalek osystem: 916f104 | tadzik++ | projects.list:
typo fix
20:14
20:14 Italian_Plumber joined, bluescreen left
tadzik phenny: tell supernovus HashConfig's missing deps.proto 20:16
phenny tadzik: I'll pass that on when supernovus is around.
tadzik moritz_: something funny's happening to Math-Rungekutta's tests 20:19
20:20 jedai joined
diakopter TimToady: borned? bored? boned? burned? 20:21
tadzik another 7 modules are gone 20:28
good and bad as well
or rather: bad and good
20:29 mfollett left
dalek osystem: a67b0bd | tadzik++ | projects.list:
Removed some nonexistent modules
20:32
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?
tadzik ash_: I
it'll be a nice warmup before my book sub-chapter
ash_ 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, github.com/moritz/try.rakudo.org/bl...pters/1.js is a good sample if you want to see how they are formatted 20:35
www.jsonlint.com/ is good if you need to check your json to make sure its formatted legally 20:36
tadzik Hardcore Forking Action
ash_ its the tutorial branch, so be sure to checkout that one 20:37
tadzik sure thing
flussence ooh, JS has a use strict; now 20:38
tadzik Mind if I mess a little with the existing stuff?
ash_ go for it
the worst that could happen is i don't merge your changes :P
tadzik :)
they're ought to be \d+\.js, right? 20:39
bah, too much question, not enought writing
ash_ tadzik: ya, to add a chapter 3, just do chapters/3.js etc.. 20:40
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
err IO::Pty::HalfDuplex 20:43
tadzik ! Finding IO::HalfDuplex on cpanmetadb failed.
oh, ok:)
sorear aha, I see how I broke mildew now 20:44
20:44 fridim left, rindolf left
tadzik ash_: where is this persist.pl? 20:45
flussence backend/
tadzik I see, thanks
ash_ in backend ya
try-rakudo.pl is in frontend
flussence you'll need a .config file in there with a single line containing the path to your perl6
tadzik it also needs POE
ash_ ah, i forgot about poe
i do 'echo "`which perl6` `pwd`/p6safe.pl" >> .config 20:46
if your in the backend folder
thats so it knows where to look for p6safe.pl 20:47
you might need to correct the path on the first line of p6safe.pl
(unless your system happens to be setup like mine)
tadzik I have no p6safe.pl in PATH 20:48
ah, ok it seems
nvm
and Digest::SHA1 20:50
flussence ash_: might want to change ARGFILES to use a relative path in p6safe.pl 20:52
ash_ ya, that would mean less configuring 20:53
ash_ changing classrooms 20:55
20:55 ash_ left 20:56 sundar left 20:59 ash_ joined, ruoso left
tadzik ash_: it doesn't print results for me 21:00
flussence any errors or does it just fail silently?
ash_ is persist.pl saying anything?
tadzik ash_: tadzik.mine.nu:3000/
oh 21:01
Reading from dead slave at persist.pl line 82
flussence try running the perl6 line in .config directly and see if that errors out
tadzik wklej.org/id/392438/
Unable to open filehandle from path '/home/john/Projects/try.rakudo.org/frontend/data/input_text.txt' 21:02
flussence oh
in p6safe.pl replace that with ../frontend
ash_ change the first line of p6safe.pl to my $*ARGFILES = open '../frontend/data/input_text.txt';
21:03 patspam left
tadzik oh, works 21:03
ash_: how do you like my chapters? 21:04
I decided to start from Hello world :)
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
so we can leave Hello world and put my chapter 2 after the math section
ash_ github.com/moritz/try.rakudo.org/bl...s/index.js was my outline 21:07
but feel free to modifiy/change anything that seems out of order
math though, was a good starting point because of how basic and easy it is 21:08
tadzik maybe
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:10
flussence I went and messed with index.js in my repo to make the text look consistent, feedback welcome 21:11
sorear wonders about giving Perl 6 a regular expression engine 21:12
tadzik I don't think things like [+] 1, 1, * + * ... 21 and similar magic are that good to show at the very beginning 21:13
it will show Perl 6 from the cryptic side, I don't think if it won't drive some people away 21:14
like "I was expecting something new and it's worse than Perl 5, hurr durr"
flussence I think it's best to avoid terse * usage at the beginning 21:15
that line at least is easier to follow if it's written { $^a + $^b }
ash_ hmm 21:16
well i'll push that back
21:18 Ross left, mfollett joined, mfollett left
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
21:20 wallberg joined
ash_ say 'Zażółć gęślą jaźń' try that on your version of try.rakduo 21:23
21:23 timbunce left
ash_ does that crash anyone? or look right? 21:24
diakopter star: say 'Zażółć gęślą jaźń'
p6eval star 2010.07: OUTPUT«Zażółć gęślą jaźń␤»
flussence mojibake here
ash_ try.rakudo.org fails hard on that
:-( i'll look into it
diakopter encoding mismatch 21:25
?
flussence I'm 100% sure all my LC_* things on that machine are set to utf8 too
tadzik Received input: id<60ca11616b9658820ea5dd19bf1b442278c07c3b> say 'Zażółć gęślą jaźń' at persist.pl line 133, <$cfg> line 1.
Reading from dead slave at persist.pl line 35
sorear it looks like urxvt used characters from six different fonts to synthesize that string
Zozolc gesla jazn with a bunch of diacritics
21:25 Italian_Plumber left
flussence it comes out garbled on the REPL too, but try.rakudo.org is doing it twice it seems 21:25
tadzik it's a Polish sentence with all the Polish diacritics 21:26
ash_ i know you need to not use readline in parrot
for that to work
configure parrot with --without-readline
tadzik bah, I'd give it some love tomorrow 21:28
Diem Perdidi :(
21:29 ash__ joined 21:30 ash_ left, ash__ is now known as ash_, timbunce joined
ash_ sorear: i have a question about IO::Pty::HalfDuplex 21:34
could IO::Pty::HalfDuplex be messing with encodings? 21:36
21:37 Guest23195 left
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
flussence bye tadzik!
21:39 tadzik left
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
21:47 nymacro left 21:53 cbk joined
ash_ i think i found the error 21:53
21:55 nymacro joined
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
note the %CPU figure. :/ 21:57
diakopter 61.7?
21:58 Italian_Plumber joined
sorear I wish 21:58
flussence 61.7 + a "D" = not good
looks like swap death to me... 21:59
diakopter quick, push
22:01 Italian_Plumber1 joined
sjohnson rakudo: say ^5 22:02
22:02 Holy_Cow left
p6eval rakudo 8156be: OUTPUT«01234␤» 22:02
sjohnson rakudo: my $a; $a += 0.1 for ^10; say $a == 1
p6eval rakudo 8156be: OUTPUT«1␤»
22:03 Italian_Plumber left
flussence is there a parrot bug for that readline thing? 22:05
22:05 Italian_Plumber1 left 22:08 sftp left, kjeldahl_ left
ash_ flussence: no, its not a bug, readline doesn't support unicode, its a readline issue 22:13
dalek : 959ccdd | sorear++ | v6/Dist-Zilla-Plugin-STD/lib/Dist/Zilla/Plugin/STD.pm:
Revert D:Z:P:STD to not scrape svn revisions
22:20
: 896eade | sorear++ | v6/Mildew (5 files):
[Mildew,Mildew-Setting-SMOP] Some fixes for new STD

It gets far enough to thrash cc1 now, which is an improvement?
sorear tries to build on feather1, which has 7x more RAM
22:28 wallberg left 22:32 araujo left 22:35 daemon joined
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:50 rgrau_ joined 22:51 timbunce left 23:10 nymacro left, araujo joined 23:11 leprevost joined, rgrau_ left 23:28 stkowski left 23:31 araujo left 23:34 ash_ left 23:37 nymacro joined 23:40 araujo joined, araujo left, araujo joined 23:53 ash_ joined