»ö« 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.
00:01 hanekomu left 00:13 soroush joined 00:24 kst left, kst joined
dalek odel: f0d70f0 | jonathan++ | dotnet/ (3 files):
[dotnet] Very first cut of auto-box/auto-unbox bits in PAST2DNST.pm. This means that we can start switching quite a few ops to work with native types, then use the natives when we have them to hand, avoiding epic boxing/unboxing. Switch a few equality ops over; code-gen looks rather better.
00:30
00:30 bluescreen joined 00:31 bluescreen is now known as Guest37415 00:33 hercynium left 00:34 whiteknight joined 00:36 jaldhar joined
sorear I wonder how dirent.d_ino and direntd_type could be exposed in Perl 6 00:44
00:51 soroush_ joined, soroush left 00:58 exodist joined
dalek odel: e2f7447 | jonathan++ | common/NQP/P6Objects.pm:
[common] Remove an unrequired explicit return. (Yeah, I'll teach the optimizer about that some day soon...)
01:02
odel: a4cb083 | jonathan++ | dotnet/compiler/DNST.pm:
[dotnet] Add an (optional) type attr to DNST::Literal.
odel: 572baa8 | jonathan++ | dotnet/compiler/PAST2DNSTCompiler.pm:
[dotnet] Make it possible for PAST::Val nodes to just compile to a DNST::Literal when $*TYPE_CONTEXT says we'd only go and unbox any object that was created anyway.
odel: 82b3bea | jonathan++ | dotnet/compiler/PAST2DNSTCompiler.pm:
[dotnet] Use box rather than emit_op, just for consistency, in PAST::Val.
sorear eeek! 01:07
sorear is motivated
jnthn piju ja...piju rad... :) 01:10
diakopter mono ... 01:14
jnthn stereo ...
dalek odel: d08fd86 | jonathan++ | dotnet/LHF.txt:
[dotnet] Add another LHF. Role up, role up. :-)
01:15
01:26 bpa joined
bpa How do I get @a.push(%hash) to work like @a[+@a] = %hash? 01:30
01:31 s0v left
bpa push adds a pair like its doing push(%h.pairs), which I don't want 01:33
jnthn Hmm...I wonder if that's right. I guess a hash in list context is a list of pairs though...
rakudo: my %h = a => 1, b => 2; my @a; @a.push(%h); say @a.perl 01:34
p6eval rakudo : OUTPUT«["a" => 1, "b" => 2]␤»
jnthn rakudo: my %h = a => 1, b => 2; my @a; @a.push(\%h); say @a.perl
p6eval rakudo : OUTPUT«[\("a" => 1, "b" => 2)]␤»
jnthn Not quite the same but prevents the flattening.
unconciousness & 01:35
bpa I want to be able to do: @a[0]<key>, and I'm happy to do the work around, if that's the right way 01:37
01:38 vila_ joined
bpa seems ,,vv 01:40
\]
ooooooooooooooooooooooooooooo
diakopter ?
bpa sorry, one of my kids decided to play on the laptop 01:41
01:41 vila_ left
diakopter :) 01:41
huf would've gotten away with it too, if it weren't for those meddling adults 01:42
01:47 mahnmut joined 01:48 silug joined 01:50 mahnmut left
bpa seems that if I assign to a scalar first, this works 01:51
sjohnson diakopter: hi 01:52
diakopter sjohnson: hi
01:52 kulp joined
sjohnson bpa: i hope my kids one day are as eager to try out perl6 as yours are 01:52
bpa rakudo: my %h = a => 1, b => 2; my $r = %h; my @a; @a.push($r); say @a.perl
p6eval rakudo : OUTPUT«[{"a" => 1, "b" => 2}]␤»
01:52 MaL0 joined
sjohnson we should probably include the ,,vv operator as well as \] before Python 3 gets wind of it 01:53
MaL0 hi
sjohnson a bit of child-like innocence could do us some good
bpa The young ones learn fast too 01:54
01:55 la-loca joined 02:01 la-loca left
huf rakudo: my %h = a => 1, b => 2; my @a; @a.push({%h}); say @a.perl 02:01
p6eval rakudo : OUTPUT«[{"a" => 1, "b" => 2}]␤»
bpa isn't that a copy?
huf hmm
02:03 wamba left
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index...._6_tablets 02:08
02:08 jferrero left 02:10 no joined 02:12 jasonmay left 02:15 jasonmay joined
sjohnson can hugme bot do perl 5 eval? 02:19
colomon sjohnson: Not so far as I know. 02:25
sjohnson hugme: help
hugme sjohnson: (add $who to $project | list projects | show $project | hug $nickname | tweet $twittername $message )
sjohnson i for some reason thought it could
whoa, twitter functionality!
hugme's getting sexier every year
02:26 no left 02:39 ch3ck3r left 02:48 shiduke joined 02:49 ch3ck joined 02:50 whiteknight left 02:51 sidke joined, sidek left 02:54 shiduke left, sidek joined 02:57 sidke left
colomon rakudo: say "This! is& a$ test33429".comb(/<alpha> | \s/) 02:57
p6eval rakudo : OUTPUT«===SORRY!===␤Non-variable $ must be backslashed at line 22, near "$ test3342"␤»
colomon rakudo: say "This! is& a\$ test33429".comb(/<alpha> | \s/)
p6eval rakudo : OUTPUT«This is a test␤» 02:58
colomon I thought Bag was in core? 03:00
guess not.
sorear good * #perl6 03:01
colomon o/
03:02 ch3ck left 03:04 risou_ joined, shiduke joined 03:07 sidek left, risou left 03:30 exodist is now known as Exodist 03:49 bitter16 left 03:53 lichtkind left 03:54 phio joined 04:06 envi joined 04:15 sidke joined 04:17 shiduke left
lue y o hai o/ 04:23
04:31 kst left 04:32 kst joined
sjohnson hi 04:50
sidke should we really have -t on this channel? 04:57
sorear yes 05:00
why? are you planning to spam?
diakopter what's -t 05:01
sorear diakopter: allows anyone to use the /topic NEWTOPIC command 05:02
diakopter oh
sidke I'm not planning to spam
I just was thinking about that as #notmath got attacked that way 05:03
well, it lasted only a few minutes
but it was really annoying
diakopter in the heyday of here, there was enough activity/members that -t wasn't needed
sidke yeah 05:04
actuallly, speaking of dead channels, I don't think I've seen someone even post a message in #perlnewbies for a few months 05:05
oh, wow
only 4 people were in it
there used to be around a hundred 05:06
I guess I'll just leave and let it die
05:07 orafu left, orafu joined 05:09 _twitch joined 05:13 lamstyle left 05:16 lamstyle joined
sjohnson so far no one has goofed around with it 05:25
it would be very easy to set +t, and put it back to the way it was
sidke true 05:26
sjohnson we will be punished in the afterlife if we do mess with it, which is why we're all afraid to touch it
05:29 jedai left 05:30 jedai joined 05:36 justatheory left 05:44 bpa left 05:46 kst left, kst joined 06:08 phio left 06:42 silug left 06:45 _twitch left 06:46 molaf joined 07:06 masak joined
masak hola, #perl6! 07:06
07:08 am0c left
sorear hello masak. 07:13
this is very annoying. I've finished a major refactor of the binder, and STD broke, but my testsuite didn't
masak huh.
need more tests, then :P 07:14
I'm now convinced at the direction Yapsi must take to reach its short-term goals.
sorear actually this never should have worked in the first place, I think 07:15
masak you're saying this uncovered a bug in STD?
sorear the relevant STD code is sub infixish($in_meta = $*IN_META) { my $*IN_META = $in_meta; ... } 07:16
07:17 kst left
sorear yesterday-niecza set up lexicals before evaluating default values 07:17
07:17 soroush_ left
sorear so $*IN_META evaluated to the frest my $*IN_META, and effectively defaulted to Any 07:17
07:17 kst joined, soroush joined
sorear now it reads from an uninitialized lexical and throws a System.NullReferenceException 07:17
masak tries to think this one through 07:18
my first thought was "hm, maybe this is a case of C<my $a; { $a; my $a }>..."
but I don't think it is.
sorear actually it is sort of related 07:19
masak since the first C<$*IN_META> is outside the curlies.
sorear perl6: my $*a = 5; { say $*a; my $*a; }
p6eval rakudo : OUTPUT«Any()␤»
..pugs: OUTPUT«␤»
masak std: my $*a = 5; { say $*a; my $*a; } 07:20
p6eval std a194beb: OUTPUT«ok 00:01 121m␤»
sorear masak: it's outside the curlies, but is evaluated in the scope of the curlies
I think
masak sorear: right.
sorear: then I see the problem.
sorear it definitely has to be able to see some lexicals
consider sub substr($string, $pos, $len = chars($string) - $pos) { ... }
masak aye. 07:21
but since it's textually before/outside the block, it can't see any lexicals defined in the block.
sorear: making the assignment to C<my $*IN_META> after evaluating the default of the parameter C<$in_meta> feels wrong, though. 07:22
sorear masak: the *assignment* doesn't happen after 07:24
masak um. sorry. I meant making it before. 07:25
sorear oh, absolutely
masak making it before feels wrong.
sorear doing assignments before the signature is ridiculous and I won't do it
masak I think the only remaining question is what the semantics is of same-block C<$*dynvar> accesses with a C<my $*dynvar> in between them. 07:26
lue goodnight o/
masak and (perhaps) whether there is a special case for routine signatures in this case. 07:27
night, lue.
sorear masak: viv converts C<my $*dynvar> into C<local $::dynvar>
masak ok.
sorear which becomes a GvSV/LVINTRO node, which when evaluated pushes $::dynvar onto the savestack
so it's localized at runtime 07:28
masak but then again, viv makes concessions because it has to cram Perl 6 semantics into Perl 5.
sorear contextuals, as I understand them, don't do any runtime licalizing stuff
TimToady: commentary wanted. 07:30
07:31 soroush_ joined
sjohnson thought you said vim for a sec 07:31
hehe
masak sorear: I have a distinct feeling that I've talked about this before with TimToady. 07:32
sorear: I'll do some searches in the backlog.
07:32 soroush left
sorear STD on STD finished in 8.3 seconds !!! wait, there's no "OK" D: 07:33
diakopter :
sjohnson ( `ー´) 07:34
07:52 kjeldahl left
sorear yay STD is working again. 07:55
dalek ecza: 6157c41 | sorear++ | / (5 files):
The long-awaited switch to an external binder

Instead of generating highly repetitive code to process arguments, a single data-driven binder is now used. No significant effect on runtime; cuts code size quite dramatically, especially for .dlls
  (SAFE goes from 213KB to 111KB).
07:57
masak sorear++ 07:58
sorear masak: I'm definitely doing monthly releases. If they're good enough for yapsi they're good enough for me. 08:02
masak \o/
sorear: I think I've found a project to pair up with niecza.
a pure-p6 markdown->HTML converter. 08:03
diakopter grammar + actions?
masak more or less. 08:04
er, well, maybe not.
depends on how faithful to the original p5 one wants to be.
and that depends on design dicisions of various sorts.
diakopter votes not-very-faithful
masak right now strangelyconsistent.org is using the p5 version. would be nice to have a p6 version of comparable speed.
sorear erm. I suppose I should implement actions then. :p 08:05
masak diakopter: I've seen markdown ports to other languages that went the faithful route. think it was in order to be able to track changes better in the original.
sorear: :)
08:07 _kaare joined
masak slot #5 is still up for grabs in the advent calendar. 08:09
08:10 kjeldahl joined 08:19 kst left, kst joined 08:37 hanekomu joined 08:40 adu joined
adu hi 08:40
masak hi adu 08:42
08:44 mberends left
adu how are you? 08:45
sorear hello
masak adu: reasonably relaxed, given the season. and you?
sorear hehehe. profiling STD finished in "user time" of 14 seconds
adu so is rakudo the primary implementation? 08:46
sorear yes
08:46 wamba joined
adu and it definitely uses parrot? 08:46
sjohnson oh ya
masak yes.
adu wow
sjohnson i'd bet my life on that being true
adu last time I looked at parrot you couldn't install it
sjohnson how long ago was that? :) 08:47
adu about a year ago
masak you could install Parrot a year ago...
adu it gave some error like "You don't want to install this, but if you do, type 'make reallyinstall'..."
sorear is there something wrong with Rakudo using Parrot/ 08:48
adu well i'm glad its changed
no I love parrot, its a beautiful virtual architecture
masak sounds like the 'make install-dev' thing that existed about a year ago. 08:49
sjohnson i think he was just worried it would be vapour ware, under the assumption that parrot wouldn't install i suppose
sorear adu: nothing has changed, Rakudo has always used Parrot
adu i was worried, actually
sjohnson hugme: hug adu
hugme hugs adu
sorear Rakudo was part of the Parrot repository until not long ago
adu :)
sjohnson hey, i couldn't get gentoo linux to install, and i was worried too 08:50
:)
adu In fact I was considering using Parrot for my toy language too 08:51
masak nice!
moritz_ good morning
adu but then i started looking around, like v8, tamarin, mono
masak morning, moritz_!
adu: yeah, lots of alternatives out there. 08:52
moritz_ colomon: what's up with your advent post?
adu but one thing I really like about Parrot is that it doesn't have those stupid stack things like rot3, rot4, swap, dup, yuck 08:53
masak you seem to really dislike stack VMs.
any rational reason behind the visceral dislike? :) 08:54
adu no, I just like registers more
masak I see.
sjohnson cash registers?
masak sjohnson: no, registers as in register-based VMs.
adu well I figure that getting a value from a pointer is faster than swizzling the stack to move things to the top 08:55
masak sjohnson: en.wikipedia.org/wiki/Processor_register
adu pointer/register
sjohnson yeah i was just being silly. probably had too much wine tonight
adu lol
masak don't let me stand in the way of your goofing off, then. :) 08:56
adu sjohnson: mee to!
I went to this thing called "Midnight Maddness"
masak: don't get me wrong, stacks are a great model, especially for functions which return multiple values 08:57
masak I think it's more a question of what abstractions you're able to build on top of stack- or register-based VMs. how well will you be able to support peephole optimization, etc. 08:58
and there, both types have their advantages and drawbacks. 08:59
JVM seems to do really well with stacks, to be honest.
but Parrot went the register path because there is more research about that.
sorear adu: no major VM actually uses stacks 09:00
adu: so you shouldn't think about the performance of stacks
adu: the JVM, mono, etc all translate stack bytecode into register instructions before running it
masak didn't know that 09:01
cool.
adu sorear: its rather impossible to say that about Java
since there are at least 50 implementations of it
sjohnson i heard someting about maybe someone doing a Python implementation using Parrot. i wonder if that was just a whim fancy or if it actually might happen.
sorear adu: by "the JVM" I mean Sun HotSpot
masak sorear: does that mean the the stack-based intermediate code is only used for the abstraction power it brings?
adu sorear: ok, then you can say that
masak sjohnson: allison has been working on a Python implementation, IIRC. 09:02
sorear masak: for a long time it was thought that stack bytecode is necessarily more compact
masak sjohnson: I have no idea what state it's in, but I get the feeling that it's fairly far along.
sjohnson: even with things such as Python 3k.
sorear masak: which matters for Java, since it was designed to send bytecode over dialup internet
masak sorear: ah.
sorear masak: and everyone else just copied Java because it was the VM market leader
masak *nod* 09:03
adu why is Java everywhere
masak adu: they did their marketing right. they managed to grab mindshare from various directions. 09:04
also, Java is not totally worthless, technologically.
adu i can has mindshare?
:)
masak the optimizations the JVM performs are quite impressive, for example.
adu i'm sure 09:06
sjohnson adu: good marketting might be the reason for java being everywhere
young computer science teenagers thinking it's l33t
who knows 09:07
i believe its speed has improved over the years
and it apparently does multi-core CPU threading very easily
so my brother says 09:08
masak threads are still a bother.
even in Java.
familiar syntax might factor into Java's success. in a sense it's something quite Smalltalkish, but with the Algol syntax we all know and love.
adu wonders what the world would be like if Sun marketed Scheme in the same manner 09:10
sjohnson ive never heard of scheme. i guess i would have if there was better marketing
sorear Scheme is insufficiently C-like to take over the world
sorry. 09:11
you will notice that Perl 6 has braces, semicolons, and operator precedence; this is on purpose
adu sjohnson: have you heard of Lisp?
sorear another reason Java prospers is inertia. By all rights C# should have killed it 09:12
masak inertia is part of mindshare, I guess.
dalek ecza: d8c3188 | sorear++ | lib/Kernel.cs:
Add Str.Bool and Hash.Bool context accelerators
sjohnson adu: i have yep
masak generally, Perl people seem to be overly preoccupied with killing off Java. :) 09:13
sorear what's a good collective name for $/ and $! ?
masak sorear: and not $_ ?
sorear $_ is different
adu sjohnson: "they" say that every sufficiently matured programming language is usually an implementation of half of Common Lisp
sorear slightly
"they" have apparently not played much with elf. 09:14
adu sorear: you mean the file format?
sjohnson adu: is it worth learning?
adu sjohnson: yes, CLOS in particular
sjohnson ive heard of it, but perl 5 handles my highlevel needs, and probably C++ my lower level needs
masak adu: it's called "Greenspun's Tenth Rule": en.wikipedia.org/wiki/Greenspun's_Tenth_Rule
sorear adu: no
elf: say 2 + 2
... 09:15
moritz_ ?
masak rakudo: say "alive!"
p6eval rakudo : OUTPUT«alive!␤»
sorear anyways it's a Perl 6 to Common Lisp compiler.
masak elf must have been put to rest at some point.
moritz_ sorear: ! 09:22
masak moritz_: sorear (I think) was wondering why p6eval no longer has an 'elf:' target. 09:23
sorear correct.
adu so is 'say' the equivalent of echo/printf? 09:24
masak adu: it's 'print' with an added newline at the end.
rakudo: say "OH HAI"; say 42
p6eval rakudo : OUTPUT«OH HAI␤42␤»
moritz_ sorear: on migrating p6eval to a new server, I didn't find instructions on how to build and run elf
there are several directories with 'elf' in the name, and I have no idea which one is the 'right' 09:25
sjohnson adu: say == print with a "
"\n" at the end
god i hate this laptop keyboard.
pipe symbol in the wrong place
moritz_ I think obscurity for outsiders was the main reason why elf never attracted more developers
adu lol 09:26
masak moritz_: yes, I think so too.
I'm glad sorear++ has taken the route of making more noise for niecza.
moritz_ after some month I could at least convince putter/mncharity to write a website 09:27
masak noise is the *only* reason, as far as I know, that Yapsi has been downloaded hundreds of times.
oh, and the fact that it's the official implementation...
sorear I should make release tarballs or something for niecza so I can count downloads
sjohnson moritz_: i used your hugbot as the framework for my own irc bot :)
masak sorear: github is very good for this. 09:28
sorear they wouldn't really offer anything git doesn't
masak sorear: no, except not needing git.
sjohnson heh
"git is good, git is great. it helps things that we create"
masak there was a quote in 2008 on #parrot about the two things perceived as our saviour that year: git, and Obama. 09:29
sorear prefers to think of git as "second system syndrome done right" 09:30
sjohnson we use git at work. i really like it 09:35
saves us a lot of time 09:36
i would shake Mr. Torvalds hand if i ever met him to thank him
masak he also made a little thing called the Linux kernel.
sjohnson im not a huge linux fan (yet, at least), so git holds a bigger place in my heart 09:38
masak :)
frettled :) 09:39
frettled loves both.
sjohnson like jnthn, i'm more of a windows-desktop kinda guy
frettled hugme: hug sjohnson
hugme hugs sjohnson and blushes
sjohnson i am ssh'd into an ubuntu machine though to talk here
ooo!!! i got a blush
must be this new cologne i'm wearing
sorear masak: how do I get clone stats from github? 09:53
masak good question. I don't know. 09:54
Khisanth hmm but git is much better at reverting things ...
sorear masak: how are you getting stats for yapsi? 09:55
masak sorear: github.com/masak/yapsi/downloads
dalek ecza: e7be5b2 | sorear++ | / (7 files):
Implement ability of regex matches to set $/
09:56
sorear masak: ah. thanlks
masak sorear: recently the tags are automatically provided as zip files. but I like those download numbers so much, I keep providing .tar.gz files manually too. 09:57
sorear -> sleep 10:00
only managed a 2s speedup today :/
masak 'night, sorear. dream of massive speedups. 10:01
10:07 DarthGandalf left 10:12 DarthGandalf joined 10:22 jhuni left
sjohnson hmm, what is niecza, if i may ask 10:22
kind of curious now
masak sorear: see? this is why you must make noise :P 10:23
sjohnson: it's a Perl 6 implementation. 10:24
sorear's writing it. it runs on Mono.
it's quite fast, and getting faster, because sorear++ is optimizing it.
sjohnson so its not running on parrot? 10:25
masak that's correct.
sjohnson niecza: say 3;
p6eval niecza d8c3188: OUTPUT«3␤»
sjohnson hmm.. that is kinda interesting
mono == en.wikipedia.org/wiki/Mono_%28software%29 ? 10:26
masak yeah.
sjohnson hmm, im having a hard time understanding what mono is. is it a VM? 10:28
or maybe it's something like Microsoft's .NET
i wonder what language niecza is written in, if thats the case 10:29
masak it's a free port of .NET, yes.
sjohnson something with a .cs extension 10:30
c#?
masak aye. 10:31
sjohnson hmm, makes me think i could write one! but maybe not
10:32 jferrero joined
sjohnson i'll let "the big boys" handle that 10:32
masak I remember thinking like that not long ago.
you just stick around, and stay curious, like I did. :)
masak goes for a small shopping round 10:33
sjohnson i wonder how SMOP is doing 10:35
10:44 hanekomu left 10:49 jferrero left 10:58 am0c^ joined 11:00 risou_ left 11:11 plobsing left 11:13 plobsing joined 11:24 MayDaniel joined 11:27 am0c joined 11:35 MayDaniel left 11:36 Chillance joined 11:50 adu left 12:07 MayDaniel joined 12:14 kanishka joined 12:16 MayDaniel left 12:37 shi joined 12:38 cognominal left 12:44 cognominal joined
masak heh, alpha has 'undef'. :) 12:58
masak is hacking on Web.pm
cls_bsd a/win 30 13:00
masak hugs cls_bsd, good irssi user 13:01
Juerd Not that good. Should be using go2.pl, and binding meta-. to /go 13:14
masak :)
Juerd <meta>.30<enter> Much faster.
And it allows you to use channel/query names instead of window numbers 13:15
masak I've been wondering about that.
Juerd genericorp.net/~count/irssi/go
masak I can see why irssi uses numbers, but it also hides a lot of useful information for those of us who tend to think in names. 13:16
Juerd Numbers are great for permanent residents of the Activity bar only.
masak and even for those, seems to me, not too great. 13:17
Juerd But I have >50 windows open and I really don't know what any of the windows >18 really is, without looking.
cls_bsd wow thx
masak Juerd++ # 'I believe that creativity is a response to being "sufficiently annoyed".' -- Erik Naggum 13:18
Juerd I didn't make go2.pl
masak no, but you let cls_bsd know about it. 13:19
Juerd Of course. cls_bsd is wasting valuable time that could be spent hacking. :)
masak exactly.
Tene: ping 13:24
13:25 amkrankruleuen joined
jnthn o/ #perl6 13:35
masak jnthn: \o 13:37
13:41 Patterner left 13:42 Psyche^ joined, Psyche^ is now known as Patterner
szbalint I also have a lot of open windows, but the numbers stay mostly the same for months, so I learn them. 13:43
masak szbalint: do you like to learn them?
colomon \o 13:45
masak o/
colomon moritz_: My Advent post is in wordpress and scheduled to go live in 6 hours or so. I'd like to get a round of edits in there first. Any comments welcome. 13:47
masak ah, good to know. I'll have a look.
if we don't have one already, I could write a fallback post for tomorrow. 13:48
jnthn ooh, I didn't sign up for the advent calendar at all this year..
masak jnthn: then you have a unique opportunity to help us with the hole we have in the schedule tomorrow :)
jnthn :P
No idea what to write about though. :) 13:49
Is anyone doing nested siggies, and did we have those a year ago?
masak there are a bunch of good ideas in the backlog.
don't think anyone did nested siggies.
jnthn k
masak jnthn: github.com/perl6/mu/tree/master/mi...vent-2010/ 13:50
szbalint masak: it's shorter to type. 13:51
colomon What's the current status of Bag?
masak rakudo: Bag
p6eval rakudo : OUTPUT«Could not find sub &Bag␤ in main program body at line 22:/tmp/udi5KZoMp2␤»
colomon I wanted to use it for my next Advent post, but much to my surprise it doesn't seem to exist anywhere.
jnthn doesn't remember it being implemented 13:52
masak it hasn't been.
Set has.
colomon I was able to cobble together a quick version that met my needs. 13:53
gist.github.com/728195 13:54
(Simple Markov chain using the sequence operator and Bag.)
jnthn away for a little bit...
colomon btw, big ++ to whomever it was that made the great error message when you use a Hash instead of a block in a map, that was a terrific help last night. 13:55
masak that would be moritz_++ 14:01
given the recent Str/Int discussions, one possible solution to the Hash/Block confusion could be to make Hash literals a special kind of Block... 14:02
I wanted to put a smiley at the end of that statement, but I realized I don't know how serious I am. 14:03
14:11 kanishka left 14:21 MayDaniel joined 14:22 whiteknight joined 14:27 Guest37415 left 14:29 muixirt joined 14:30 amkrankruleuen left
muixirt Perl not in the top200? www.r-bloggers.com/google-ai-challe...ogrammers/ 14:30
Wonder why and how Perl 6 can change that :-)
masak interesting set of graphs. 14:33
14:40 Guest37415 joined 14:44 cognominal left 14:46 cognominal joined, jaldhar left
flussence I don't know if it went unnoticed yesterday... any opinions on this idea? irclog.perlgeek.de/perl6/2010-12-03#i_3052989 14:48
masak flussence: .can ? 14:49
I thought .can was all about methods, not types. 14:50
flussence I guess what I'm getting at is whether duck typing would be a more useful default 14:51
jnthn No. 14:52
Also, .can is about methods, as masak++ said
It expects a method name to be passed to it
Not a type
masak flussence: ~~ is already pretty flexible, in that it checks .does, which takes things like roles and subtypes into consideration. 14:53
jnthn There's nothing to stop you creating duck types though
masak: Eventually it ends up delegating to the meta-object.
masak: So it'd be possible to implement duck-typing style things in Perl 6 :) 14:54
duck Foo { method bar() { ... }; method baz() { ... } }
And type-checking against Foo would do a bunch of .can checks on the object.
masak rakudo: class Duck { method quack() { say "quack!" } }; subset Kwackable where { .can("quack") }; my Duck $duck .= new; if $duck ~~ Kwackable { $duck.quack } 14:55
jnthn Once the meta-model re-working I'm doing is done with, that'll be not too hard to write in a module. :)
p6eval rakudo : OUTPUT«quack!␤»
jnthn Yes, there's also that way of course :)
Depends how much sugar you want
masak aye. 14:56
jnthn I guess .can("quack" & "swim") could also be a nice way to list a bunch of methods you want :)
masak oooh!
masak reluctantly likes junctions more and more
flussence has had his question thoroughly answered :) 14:57
masak flussence: hope it was us :)
jnthn masak: You're currently at a stage of liking and disliking them? :P
flussence and I hadn't seen that "subset" thing before, I'll have to remember that one
masak jnthn: no. yes. 14:58
flussence: subsets rock.
flussence: they're basically types with an open membership policy.
rakudo: class A { has $.x is rw }; my $a = A.new(:x(42)); subset Fortytwoish where { .x == 42 }; say $a ~~ Fortytwoish; $a.x++; say $a ~~ Fortytwoish 14:59
p6eval rakudo : OUTPUT«Bool::True␤Bool::False␤»
masak flussence: imagine using that as a parameter type. 15:00
allbery_b <haskell-geek>pity they're not true dependent types</haskell-geek> 15:01
masak allbery_b: have you seen Perl 6's parametric roles? 15:02
allbery_b yes, I'm just being snarky
masak hard to tell with you haskell geeks. :P
15:07 scorpil joined 15:15 scorpil left
masak currently tracking down a persistent alpha bug. 15:25
15:26 aindilis joined
masak symptoms most resemble a "poisoned" string variable which, when put into a .rindex call, yields the wrong result. 15:26
15:28 [Coke] left 15:29 smash joined
smash hello everyone 15:30
masak hi smash
smash updated gil.di.uminho.pt/users/smash/rakudo-bench.html 15:32
dice.pl is not working with the last release of rakudo star :\
masak smash++
smash: do you know why not?
smash phenny: tell takadonet gil.di.uminho.pt/users/smash/rakudo-bench.html updated
phenny smash: I'll pass that on when takadonet is around.
smash masak: let me check
15:33 kjeldahl left
masak also, what is this trans-sprintf.pl whose time has gone up since last release? 15:34
masak finds the link
smash masak: ahhh, nopaste.snit.ch/26508
masak smash: ah, yes. 15:35
I added that, rather than have it succeed by mistake.
probably means that for one or two releases, it *shouldn't* have worked. 15:36
.roll was implemented in Rakudo in September. 15:37
smash nods
masak so the September and October releases should also have had errors, if the script has been the same all that time. 15:38
moritz_ back
smash masak: let me double check
masak: rakudo-star-2010.11 is the only one printing out the error 15:40
15:41 [Coke] joined
masak smash: yes, because I introduced that error message in November. 15:41
all I'm saying is that the error *should* have been there from the start.
smash oh, right
masak difference between "should also have errors" and "should also have *had* errors" :) 15:42
smash :)
15:47 jferrero joined 16:12 MayDaniel left 16:15 risou joined 16:25 ch3ck joined 16:26 araujo left 16:27 kst left 16:28 kst joined 16:37 molaf left 16:40 drbean_ joined 16:43 drbean left
masak noms & 16:46
16:46 masak left 16:50 sftp_ joined
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ook_tablet 16:51
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....gex_tablet
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ics_tablet
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....eta_tablet
16:51 sftp left 16:53 envi left
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....tro_tablet 16:56
16:56 sftp joined 16:57 sftp_ left 16:59 envi joined 17:01 sftp_ joined 17:02 sftp left 17:04 risou_ joined 17:06 am0c left
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....eta_tablet 17:07
17:07 risou left, sftp joined 17:11 sftp_ left 17:13 [Coke] left, sftp left 17:14 sftp joined 17:19 [Coke] joined 17:20 Guest37415 left
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ble_tablet 17:23
17:23 sftp left, sftp joined
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ble_tablet 17:28
17:29 kulp left 17:32 soroush_ is now known as soroush, soroush left, soroush joined 17:36 jferrero left 17:37 kst left 17:38 kst joined 17:43 lichtkind joined
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....dex_tablet 17:44
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....dex_tablet 17:49
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....dex_tablet 17:55
18:02 ggoebel left 18:06 ggoebel joined
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....dex_tablet 18:11
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....kup_tablet 18:16
18:18 ggoebel left 18:23 envi left 18:29 cognominal left 18:34 cognominal joined 18:41 jferrero joined 18:51 kst left, kst joined 19:05 risou joined, risou left 19:08 risou_ left 19:16 risou joined 19:17 s1n joined 19:19 araujo joined 19:22 jaldhar joined 19:25 ch3ck left
sorear good * #perl6 19:35
diakopter hi
19:37 cls_bsd joined 19:39 soroush left 19:41 soroush joined
lichtkind same suspects as ever :) 19:43
19:54 whiteknight left
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ock_tablet 19:59
moritz_ phenny: tell colomon that Dec 04 is close to its end here (central europe), and we're still waiting for the advent post... might I ask you to hurry up a bit? 20:01
phenny moritz_: I'll pass that on when colomon is around.
colomon moritz_: post should have gone live 2 minutes ago 20:02
phenny colomon: 20:01Z <moritz_> tell colomon that Dec 04 is close to its end here (central europe), and we're still waiting for the advent post... might I ask you to hurry up a bit?
colomon hmmmm
20:02 smash left
moritz_ colomon: did you press "publish"? 20:02
colomon moritz_: I set a schedule for it. 20:03
supposed to fire at 20:00.
but I guess I can just press publish manually at this point.
It's up. 20:04
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....dex_tablet
moritz_ colomon: if you just save as draft, it doesn't publish 20:05
colomon ah
Do we have someone signed up for tomorrow's?
moritz_ no :( 20:06
if nobody chimes in, I'll wipe something up
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....lta_tablet 20:10
colomon Do you have something in mind?
moritz_ predictive parsing
20:11 wamba left
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ign_tablet 20:37
20:37 soroush left, soroush joined
Tene phenny: tell masak pong 20:37
phenny Tene: I'll pass that on when masak is around.
20:42 rindolf joined
rindolf Hi all. 20:42
Tene Juerd: you should perhaps look into adv_windowlist.pl irssi plugin
Juerd: allalone.org/adv_windowlist.png 20:46
20:50 jaldhar left
dalek ast: 744caf1 | (Solomon Foster)++ | integration/advent2010-day4.t:
Add tests for 2010 Advent calendar day 4.
20:50
20:50 jaldhar joined
dalek : 04ff529 | moritz++ | misc/perl6advent-2010/articles/predictive-parsing.pod:
[advent] add article, possibly for tomorrow: predictive parsing
20:51
moritz_ review and improvements welcome!
Tene phenny: tell masak you may also be interested in adv_windowlist.pl for irssi: allalone.org/adv_windowlist.png
phenny Tene: I'll pass that on when masak is around.
colomon moritz_++ 20:52
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ics_tablet 20:53
20:55 PABIRGJ joined
moritz_ is that article interesting and understandable for the casual programmer? 20:56
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....oop_tablet 20:58
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ine_tablet
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ock_tablet
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index...._io_tablet
colomon My judgement is yes, but I'm not sure I'm a good judge here.
flussence I like it, short and to the point
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ign_tablet 21:03
lue ohai o/ 21:10
colomon \o 21:12
21:16 gbacon joined
lue colomon: I think you meant 'preceded' (instead of 'proceeded') in your advent post, in the paragraph about the REPL. 21:18
21:18 ch3ck joined
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....dex_tablet 21:20
21:21 dnewkirk joined
lue rakudo: my @a = 1, .9, .99 ... *; say @a[^5]; 21:22
p6eval rakudo : OUTPUT«Method 'count' not found for invocant of class 'Failure'␤ in <anon> at line 835:CORE.setting␤ in main program body at line 1␤»
lue rakudo: my @a := 1, .9, .99 ... *; say @a[^5]; 21:26
p6eval rakudo : OUTPUT«Method 'count' not found for invocant of class 'Failure'␤ in <anon> at line 835:CORE.setting␤ in 'List::at_pos' at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1742:CORE.setting␤ in <anon> at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1␤ in main program body at line 1␤»
Juerd Tene: That'd take up way too much space with my >50 windows 21:29
Tene Juerd: 'k
lichtkind is 21:33
the dim command is gone right?
moritz_ dim? that's BASIC, not Perl
DIM a AS INTEGER
jnthn OH NO MY EYES
:P
moritz_ jnthn: do you want to write something for the advent calendar? 21:37
lichtkind moritz_: trust me once i read it in the syn it was perl
jnthn moritz_: Yes, pondering doing something on nested signatures, if that'd be interesting? 21:38
moritz_ jnthn: it sure would
lichtkind: $ git log -p|ack -w dim|wc -l
0
the perl6/specs git repo reaches back to 2006-02-24 21:39
and it was never mentioned in that time
lichtkind i did a search myself, thatswhy i asked, but not all is in history since specs moved out of pugs
moritz_ doesn't believe it until he sees prove of it 21:40
jnthn grep for is dim in dev.perl.org/perl6/doc/design/exe/E02.html
;)
moritz_ trait, not command :-) 21:41
jnthn Yeah, I can only ever think of it as a trait :) 21:42
But even that's dead now.
lichtkind jnthn: thanks, it was still living in the tablets 21:43
jnthn Kill! Kill!
lichtkind gone with the next save 21:44
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index...._io_tablet 21:47
colomon lue++
flussence my @a := 1/1, { my $a = .denominator*10; ($a-1)/$a } ... *; say ~@a[^5]; 21:53
rakudo: my @a := 1/1, { my $a = .denominator*10; ($a-1)/$a } ... *; say ~@a[^5];
p6eval rakudo : OUTPUT«1 0.9 0.99 0.999 0.9999␤»
flussence
.oO( if ( Perl6.parse($irc) ) { eval_anyway } )
21:54
lue
.oO(Apparently '...' doesn't quite detect all geometric sequences then...)
flussence isn't that a continued fraction?
or something not-quite-geometric... 21:55
lue I guess maybe I put the 1 in by mistake. 21:56
my @a := 0, .9, .99 ... *; say @a[^5];
rakudo: my @a := 0, .9, .99 ... *; say @a[^5];
p6eval rakudo : OUTPUT«Method 'count' not found for invocant of class 'Failure'␤ in <anon> at line 835:CORE.setting␤ in 'List::at_pos' at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1742:CORE.setting␤ in <anon> at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1␤ in main program body at line 1␤»
colomon Neither one of those is a geometric sequence. 21:57
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index...._io_tablet
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....dex_tablet
colomon mind you, I'm thinking those errors are incorrect. 21:58
lue well, I know .999... is the sum of an infinite geometric sequence /me refreshes on his knowledge
colomon .999.... is just 1 21:59
flussence would be nice if it was smart enough to print Failure.exception along with those Failure.$method errors... 22:00
colomon I suppose you can say it's .5 + .25 + .125, which is the sum of a geometric sequence.
flussence: I think it's a hole in the spec, actually. It's not clear what happens if you give three numbers and they are neither an arithmetic or a geometric sequence. 22:03
I believe it used to specify that it defaulted to .succ
22:03 masonkramer joined
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index...._io_tablet 22:03
colomon Certainly that's how it used to be implemented.
lue oh, silly me, I see where I goofed up. 22:08
rakudo: my @a := 0, .9, .09 ... *; say @a[^5]; 22:09
p6eval rakudo : OUTPUT«Method 'count' not found for invocant of class 'Failure'␤ in <anon> at line 835:CORE.setting␤ in 'List::at_pos' at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1742:CORE.setting␤ in <anon> at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1␤ in main program body at line 1␤»
lue rakudo: my @a := 1, .9, .09 ... *; say @a[^5];
p6eval rakudo : OUTPUT«Method 'count' not found for invocant of class 'Failure'␤ in <anon> at line 835:CORE.setting␤ in 'List::at_pos' at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1742:CORE.setting␤ in <anon> at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1␤ in main program body at line 1␤»
colomon If your geometric series starts with 1 & .9, then the next in the sequence is 22:10
rakudo: say .9 * .9
p6eval rakudo : OUTPUT«0.81␤»
colomon rakudo: say (1, .9, .81 ... *)[^5].perl
p6eval rakudo : OUTPUT«(1, 9/10, 81/100, 729/1000, 6561/10000)␤»
colomon It's impossible to have a geometric sequence starting with 0. 22:11
lichtkind is neutro successor of proto?
lue colomon++ for his post, because it's reminds me I need to review geometric/arithemic sequences and such :)
colomon lichtkind: parallel evolution
flussence is it just my IRC session lagging, or is p6eval a *lot* faster than it used to be?
lichtkind thanks
diakopter flussence: dunno 22:12
rakudo: say (1, .9, .81 ... *)[^5].perl
p6eval rakudo : OUTPUT«(1, 9/10, 81/100, 729/1000, 6561/10000)␤»
colomon lichtkind: but last time I checked, neutro worked and proto didn't. But masak++ might have fixed proto in November.
moritz_ doubts it 22:13
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....dex_tablet 22:14
22:17 lumi_ joined, lumi_ left
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index...._io_tablet 22:19
22:25 lamstyle left 22:26 ch3ck3r joined 22:28 rindolf left 22:31 ch3ck left
lichtkind moritz_: thanks for calendar texts 22:33
moritz_ lichtkind: you're welcome
22:34 lamstyle joined
moritz_ the one from yesterday was really by tadzik++, but i published it 22:34
and I didn't find an option to attribute it to tadzik in tha wordpress admin interface
post for tomorrow scheduled 22:40
moritz_ can go to sleep now :-)
diakopter moritz_: o/ 22:46
jnthn moritz_: night
sorear good * #perl6
dalek odel: 8fbb45c | diakopter++ | dotnet/compiler/ (3 files):
[dotnet] a descriptive commit message. some changes/additions.
22:48
odel: 512cfdb | diakopter++ | / (4 files):
Merge branch 'master' of github.com:jnthn/6model
lichtkind good night 22:50
diakopter 'nite
moritz_ (not quite in bed yet) diakopter, jnthn, sorear: feel free to claim slots in github.com/perl6/mu/blob/master/mi...0/schedule 22:51
diakopter I really should write one 23:00
:(
of the 25 last year's advent articles, how many are more targeted toward Perl 5 users than non-Perl 5 users, and vice versa? 23:01
23:03 zb joined
lue
.oO(I'm going to claim a spot for teaching Temporal, when I get some practice with it.)
23:04
23:23 kst left 23:24 kst joined 23:34 _kaare left
diakopter in Soviet Russia, Chuck Norris makes Chuck Norris jokes about YOU. 23:37
dalek odel: 903fb1c | jonathan++ | dotnet/compiler/DNST (2 files):
[dotnet] Enhance DNST::Local so it will be able to play the role of DNST::Temp also.
23:39
odel: 2bb3773 | jonathan++ | dotnet/compiler/PAST2DNSTCompiler.pm:
[dotnet] First couple of Temp => Local switches. Seems to work.
odel: a5467eb | jonathan++ | dotnet/compiler/PAST2DNSTCompiler.pm:
[dotnet] Another batch of Temp => Local.
23:50
23:57 mberends joined, justatheory joined
dalek odel: 45d5376 | jonathan++ | dotnet/compiler/PAST2DNSTCompiler.pm:
[dotnet] Eliminate DNST::Temp usage completely from PAST2DNST.
23:59
odel: cd7a4ff | jonathan++ | dotnet/compiler/DNST (2 files):
[dotnet] Eliminate DNST::Temp.