»ö« 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!
Set by sorear on 4 February 2011.
00:01 nymacro joined 00:10 icwiener_ left 00:24 Rotwang left 00:28 justatheory left 00:29 justatheory joined 00:33 justatheory left 00:47 nothingmuch joined 00:48 jaldhar joined 00:57 woosley joined 00:58 ponbiki left 01:00 icwiener joined 01:02 justatheory joined
cotto rakudo: 4..24.pick(*) 01:18
p6eval rakudo 405afa: ( no output )
cotto rakudo: 4..24.pick(*).say
p6eval rakudo 405afa: OUTPUT«24␤»
cotto rakudo: 4..24.pick(*).join(',').say
p6eval rakudo 405afa: OUTPUT«24␤»
01:21 whiteknight left 01:23 ponbiki joined, silent_h_ joined
cotto rakudo: (4..24).pick(*).join(',').say 01:24
p6eval rakudo 405afa: OUTPUT«5,9,18,13,7,6,23,8,24,22,12,15,4,10,11,20,14,16,17,21,19␤»
cotto goes off to find out if 24 is better in random order 01:25
01:34 silent_h_ left 01:39 rdesfo left 01:53 donri left 01:59 GinoMan joined 02:05 benabik joined 02:24 ymasory left 02:39 ajs joined 02:40 benabik left, icwiener left
ajs Curious if anyone has an improvement on my code at essays.ajs.com/2011/03/perl-6-for-f...owers.html -- I could golf it a bit, but that wasn't what I had in mind. 02:40
It's based on a python example that I wanted to play with a bit. 02:41
02:44 benabik joined 02:46 ymasory joined
sorear ... is an unnecessarily big gun for this problem 02:50
using .. would be safer
I might write the loop as for 2 .. $lim X 2 .. $lim -> $a, $b {
line 10 possibly better written using Hash.push 02:51
the closure on sort is unnecessary; pairs sort by .key automatically 02:52
%powers := classify { .key ** .value }, (2 .. $lim X=> 2 .. $lim) # perhaps too golfy 02:56
sorear pokes ajs 02:59
03:17 am0c joined
ajs hey 03:23
I thought ... was supposed to be used for looping now? When did it change back? 03:24
PerlJam It never changed to begin with. 03:25
... is the sequence generator
ajs Yeah, sorear, those are certainly more idiomatic approaches, but I don't know how much they improve the code.
PerlJam .. is just a range op 03:26
ajs Oh, and I don't think you can use X because of the way you have to short circuit the inner loop
PerlJam, I know. But there was a time on this channel when people were pushing ... as the right solution for loop ranges. I think it was when we were having the range vs. sequence discussion re: characters and strings. 03:27
PerlJam I don't think it matters much in this case. They may end up being the same thing 03:29
(i.e. I think that $a ... $b turns into $a .. $b when it can)
ajs I'm sure it's all jitted down to some SSE instruction that gets pushed out to the GPU ;-) 03:30
03:31 Limbic_Region left 03:33 GinoMan left 03:34 hudnix left 03:35 sftp left
ajs Actually, I might be wrong about "my Array %foo" 03:37
Would you be able to just push onto arbitrary indexes (e.g. %foo<blah>.push(0)) or is that goingt to fail because an undefined value of type Array is stored there? 03:38
sorear ajs: just use push %foo, blah => 0; 03:40
ajs I don't think that does the same thing 03:57
03:58 agentzh joined
ajs The idea is you have an empty %foo. You want to add one element to the array at index "blah". In Perl 5: push @{$foo{blah}}, 0; 03:58
sorear rakudo: my %foo; push %foo, blah => 1; push %foo, blah => 2; say %foo.perl; # Now do you beleive me? 04:01
p6eval rakudo 405afa: OUTPUT«Method '!fill' not found for invocant of class ''␤ in 'List::push' at line 2907:CORE.setting␤ in main program body at line 22:/tmp/gc85QxsW3I␤»
sorear hmm
ajs no ;) 04:02
sorear rakudo: my %foo; %foo.push: blah => 1; %foo.push: blah => 2; say %foo.perl;
p6eval rakudo 405afa: OUTPUT«{}␤»
sorear it's absolutely specced to work.
PerlJam wow.
sorear I thought it worked in Rakudo
ajs that would be very keen
PerlJam so did I
04:09 ymasory left 04:13 lue joined
mberends ajs++: nice blog 04:16
05:03 birdwindupbird joined 05:04 jimmy1980 left, birdwindupbird left 05:09 birdwindupbird joined 05:11 jimmy1980 joined, jimmy1980 left 05:12 jimmy1980 joined 05:13 bacek left
PerlJam rakudo: my %foo; %foo.push: 'blah' => 1; %foo.push: 'blah' => 2; say %foo.perl 05:17
p6eval rakudo 405afa: OUTPUT«{"blah" => [1, 2]}␤»
PerlJam sorear: it only seems to fail when you try to push a Pair that has an unquoted string on the LHS of the => 05:18
and with that ... I'm asleep
05:19 _dev0_ left 05:20 kaare_ joined 05:30 jimmy1980 left 05:31 justatheory left 05:33 mberends left 05:37 jimmy1980 joined 05:56 wtw joined 06:16 Mowah joined
moritz_ good morning 06:30
fwiw Hash.push is not specced to work with named arguments 06:31
the signature in S32 just mentions *@values 06:32
06:32 wiebie joined
dalek ecs: bb2a783 | moritz++ | S32-setting-library/Containers.pod:
[S32] typo or thinko in Hash.push signature
06:33
06:35 bacek joined, wiebie left
sorear oh! of course 06:36
good morning moritz_.
sorear out 06:44
moritz_ you witnessed: shift changeover in #perl6 :-) 06:45
the US slowly fades away, Europe slides into the sun's focus again 06:46
07:03 shi joined 07:14 chin_up joined 07:20 fhelmberger joined
tadzik guten morgen #perl6 07:33
07:49 ajs left 07:52 domidumont joined 08:02 fhelmberger left 08:03 fhelmberger joined
jdhore moritz_, ping 08:09
moritz_ jdhore: pong 08:10
jdhore moritz_, Do you think someone's going to take Release Manager for 2011.04 in the next ~2 weeks or should I just take it now (I want to give others a chance) 08:11
moritz_ jdhore: I'll ask around if anybody wants to do it 08:12
jdhore OK :)
moritz_ jdhore: it's great that you volunteer, I just want to keep the bus number high by diversivying 08:13
jdhore Exactly
08:13 fhelmberger left, fhelmberger_ joined 08:14 kostja_osipov joined 08:17 fhelmberger joined 08:18 kostja_osipov left 08:19 tzhs joined 08:20 fhelmberger_ left 08:34 kostja_osipov joined 08:36 benabik left 08:41 chin_up left 08:48 nothingmuch left
moritz_ btw today I received the 3rd item of the p6cc price :-) 08:54
"winning ways for your mathematical plays"
so that I won't botch up a p4-like task in future :-)
only one book missing, but that's a pre-order
08:58 Su-Shee joined
Su-Shee hello everyone! 08:58
moritz_ oh hai su shee
tadzik Su-Shee \o/ 09:01
09:04 araujo left 09:08 am0c left
Su-Shee so none of you had a journey to perl? :) -> twitter -> #myjourneytoperl :) 09:10
09:11 cosimo left
moritz_ had a journey to perl, but doesn't twitter 09:13
Su-Shee moritz_: it's a great announcement tool. 09:14
moritz_ I know. I should stop being so old-fashioned
Su-Shee moves moritz_' mouse over the "sign up" button. ;) 09:15
tadzik heh, I recently realized I'm some sort of an internet hipster, so if anything becomes too upstream I keep away from it. Like I'd never sign up to facebook
Su-Shee I'm a late early adopter. ;) 09:16
tadzik besides a false account I need for downloading music sheets sometimes, they often want "login with facebook"
Su-Shee I keep an eye on things and start when I actually see any value
moritz_ tadzik: I avoid facebook like the plague
Su-Shee after I realized that I could use twitter to get dates and appointments and events served easily, I made an account. 09:17
tadzik moritz_: same here
but that makes me think that if I ever get to microblogging, that'd be rather identi.ca, not twitter. Dunno why
Su-Shee tadzik: I don't think it's really about microblogging. well not within the geek community anyways. I see mostly links to docs, articles, short opinions, events etc 09:18
moritz_ Su-Shee: you've just given a good defintion of micro blogging :-) 09:19
tadzik yeah, 140 chars is to little for anyblogging :)
Su-Shee and there's the marketing aspect of course. announcements spread very nicely via twitter.
moritz_ ok, registered as 'nogoodnickleft' 09:22
tadzik I wonder if tadzik is taken 09:23
Su-Shee moritz_: *haha* nice one :)
tadzik username has already been taken. What a ....
moritz_ all my usual ones were taken already
even "perlgeek"
Su-Shee tadzik: that happens with 10 million people. I didn't get Su-Shee as well and had to go for my alternate sheeshee
moritz_ is happy he was an early github adopter, and got his usual nick there 09:24
tadzik see? Too mainstream! Even for tadzik!
09:26 Rotwang joined, ManOwl joined, bacek left 09:28 Rotwang left
tadzik oh, our kids will have serious problems 09:30
09:31 Rotwang joined
moritz_ no, they'll just use new services 09:31
do you really expect twitter to still be mainstream in 12 years?
09:32 Rotwang left, Rotwang joined
Su-Shee of course not. I have yet to see _any_ "social web" thingie which isn't out of fashion after 5 years. 09:34
09:34 Rotwang left, Rotwang joined
Su-Shee (kuro5hin, oloh, advogato, orkut...) 09:34
moritz_ myspace! 09:35
Su-Shee dropped rapidly indeed.
lifejournal.
moritz_ was there a social network before myspace?
09:35 Rotwang left 09:36 Rotwang joined
Su-Shee hm, if you count slashdot? 09:36
moritz_ that was never social :-) 09:37
Su-Shee harhar :)
09:39 Rotwang left 09:41 orafu left, orafu joined 09:43 Rotwang joined, Rotwang left
tadzik (: 09:44
09:44 Rotwang joined, Rotwang left 09:46 Rotwang joined 09:58 woosley left 10:02 Rotwang left, Rotwang joined, Rotwang left 10:03 Rotwang joined, Rotwang left 10:04 Rotwang joined 10:06 Rotwang1 joined 10:08 Rotwang1 left 10:09 Rotwang left, Rotwang joined 10:25 tzhs left 10:26 Rotwang left, Mowah left 10:29 Tene left 10:30 Tene joined 10:34 Mowah joined 10:41 fhelmberger left 11:02 PZt joined, agentzh left 11:10 ponbiki left 11:20 fhelmberger joined 11:25 ponbiki joined 11:28 fhelmberger_ joined 11:29 fhelmberger left 11:35 birdwindupbird left 11:37 kostja_osipov left 11:40 kostja_osipov joined 11:53 Patterner left 11:54 bacek joined, Psyche^ joined, Psyche^ is now known as Patterner 11:55 birdwindupbird joined 12:08 hudnix joined 12:24 nymacro left 12:27 Mowah left, MayDaniel joined 12:30 Mowah joined, Axius joined 12:38 MayDaniel left 12:46 Axius left 13:01 ManOwl left 13:07 sftp joined 13:09 ajs joined 13:12 tzhs joined 13:24 spq joined 13:28 Trashlord left 13:30 plainhao joined, nymacro joined 13:38 pmurias joined
pmurias sorear: ping 13:38
dalek kudo: 4bf1327 | perlpilot++ | docs/release_guide.pod:
Claim April release
13:46
moritz_ PerlJam++
13:47 tzhs left 13:48 mtk joined, mtk left 13:52 spq left 13:59 kaare_ left, mtk joined, mtk left 14:00 mtk joined
sorear pmurias: hi 14:04
good * #perl6 14:05
moritz_ good morning sorear
PerlJam buenos dias 14:06
sorear: I bet that Hash.push problem is relatively LHF (though I haven't really looked at it myself) 14:07
rakudo: my %h; %h.push: a => 1; say %h.perl;
p6eval rakudo 405afa: OUTPUT«{}␤»
PerlJam rakudo: my %h; %h.push: 'a' => 1; say %h.perl;
p6eval rakudo 405afa: OUTPUT«{"a" => 1}␤»
moritz_ PerlJam: it's spec, not LHF 14:08
PerlJam oh? That's odd. 14:09
moritz_ a => 1 is a named parameter to push()
'a' => 1 is a pair that's passed as a positional parameter
the spec says *@values, which catches the latter but not the former
PerlJam The devil is always in the details 14:10
moritz___
er, moritz_++
14:10 _buno_ joined
moritz_ it would be a LHF to change, but requires concious decision 14:10
also note that the use of named arguments would lead to weird behavior 14:11
%h.push: 'a' => 1, a => 2, 'a' => 3; # now, what's the order of %h<a> ?
a naive implementation would produce either 1, 3, 2 or 2, 1, 3 14:12
14:13 wtw left, stkowski joined 14:14 ymasory joined 14:15 envi joined
pmurias sorear: would finishing the lisp backend be a good gsoc project? 14:18
sorear: hi
14:20 gottreu joined
sorear PerlJam: I now beleive there is no problem. 14:25
pmurias: I doubt it
pmurias sorear: why? 14:26
not usefull enought?
or too small/big?
14:26 Trashlord joined
sorear that's what I'm thinking, not useful widely enough 14:26
moritz_ let's play the devil's advocate: what are the benefits for the perl (6) community at large?
14:28 _buno_ left 14:30 _buno_ joined 14:32 kaare_ joined 14:38 domidumont left 14:41 envi left 14:43 _buno_ left 14:44 justatheory joined
pmurias moritz_: adds a secondary backend to niecza targeting something largely different then .net removing showing .net specificness in niecza 14:48
14:48 donri joined
moritz_ pmurias: that in itself doesn't sound like a benefit for the perl community 14:48
then we know that $feature is .NET specific - so what? 14:49
pmurias moritz_: it's a backend we can expect good performance of as common lisps (like sbcl) offer good performance for a similiar language
PerlJam We get the benefit of all of these years of people hacking on lisp compilers. 14:51
moritz_ what does that mean? faster execution?
pmurias yes
moritz_ now *that's* something you can write in such a proposal 14:52
sorear out 14:53
14:54 MindosCheng joined 14:56 envi joined 14:58 cotto joined 15:01 kostja_osipov left 15:04 shi left 15:10 icwiener joined
pmurias moritz_: re if .net specific stuff is found in niecza i would make it more generall 15:15
moritz_ pmurias: that's still no benefit for the perl 6 community at large 15:16
pmurias: think in terms of "what does the user of your compiler care about?"
pmurias what the sbcl backend would over is hopefully reasonably good performance 15:18
but it's not a sure thing before it's done
s/over/offer 15:19
PerlJam pmurias: is there anything that having yet another Perl 6 backend intrinsically buys us? (other than the hopeful performance boost)
moritz_ integration with the vast landscape of lisp libraries? dunno if that exists... 15:20
PerlJam portability to more systems? 15:21
moritz_ I was about to say "it makes it easier to add more backends", but then the question is recursively "what do more backends buy us?" 15:22
PerlJam access to some lispian technology that would greatly benefit us?
15:22 domidumont joined 15:23 mj41 joined
PerlJam Is there a bootstrap path that if it involved lisp would obtain us an epic win? :) 15:24
TimToady rewrite emacs in Perl 6? 15:25
moritz_ now I'm scared.
TimToady oops, one day too early
PerlJam heh
TimToady hmm 15:26
flussence wonders if I could write a php grammar in 24 hours...
PerlJam flussence: isn't the grammar already out there somewhere? 15:27
TimToady php's grammar is written in lisp?!?
maybe we can work Paul Graham in there somewhere... 15:28
PerlJam TimToady: for an AFJ? Sure. :) 15:29
TimToady personally, I think a Haskell backend might be more useful than a Lisp backend :)
you just have to write a CheatAllOverThePlace monad 15:30
15:40 mj41 left 15:46 sivoais joined, poincare101 joined, plobsing left
poincare101 'perl6: say3:' 15:46
perl6: say3;
perl6: say 3; 15:47
sbp rakudo: say 3
p6eval niecza v4: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'say3' used at line Any()1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 387 (CORE die @ 2)␤ at /home/p6eval/niecza/src/STD.pm6 line 1141 (STD P6.comp_unit @ 75)␤ at
../home/p6eval/niecza…
..pugs: OUTPUT«*** No such subroutine: "&say3"␤ at /tmp/V5hXz43kDc line 1, column 1-5␤»
..rakudo 4bf132: OUTPUT«Could not find sub &say3␤ in main program body at line 22:/tmp/JhqcDX0V5d␤»
pugs, rakudo 4bf132, niecza v4: OUTPUT«3␤»
rakudo 4bf132: OUTPUT«3␤»
poincare101 rakdu say "hi!";
rakudo: say "hi!";
p6eval rakudo 4bf132: OUTPUT«hi!␤»
poincare101 that's exciting.
moritz_ rakudo: say 'patience, spelling :-)'
p6eval rakudo 4bf132: OUTPUT«patience, spelling :-)␤»
poincare101 moritz_: :) 15:48
TimToady
.oO(you ain't seen nuthin')
moritz_ rakudo: say [*] 1..6
p6eval rakudo 4bf132: OUTPUT«720␤»
moritz_ commute&
poincare101 I don't wanna write any more PHP, get on with Perl 6 please.
moritz_: WHOA
moritz_: that's like map in Haskell
sbp rakudo: my @ips = ((0..255).roll(4).join('.')for 0..99); .say for @ips.sort: { .&naturally };
p6eval rakudo 4bf132: OUTPUT«Could not find sub &naturally␤ in <anon> at line 22:/tmp/JSBglHth8g␤ in 'List::sort' at line 1␤ in main program body at line 22:/tmp/JSBglHth8g␤» 15:49
TimToady poincare101: it's a fold
sbp rakudo: sub naturally ($a) { $a.lc.subst(/(\d+)/, -> $/ { 0 ~ $0.chars.chr ~ $0 }, :g) ~ "\x0" ~ $a }; my @ips = ((0..255).roll(4).join('.')for 0..99); .say for @ips.sort: { .&naturally };
poincare101 TimToady: That's exciting. Again.
p6eval rakudo 4bf132: OUTPUT«(timeout)»
sbp rakudo: my @random-nums = (1..100).pick(*); my @odds-squared <== sort <== map { $_ ** 2 } <== grep { $_ % 2 } <== @random-nums; say ~@odds-squared; 15:51
p6eval rakudo 4bf132: OUTPUT«1 9 25 49 81 121 169 225 289 361 441 529 625 729 841 961 1089 1225 1369 1521 1681 1849 2025 2209 2401 2601 2809 3025 3249 3481 3721 3969 4225 4489 4761 5041 5329 5625 5929 6241 6561 6889 7225 7569 7921 8281 8649 9025 9409 9801␤»
sbp rakudo: my @d10 = 1 ... 10; my @scores = (@d10 X+ @d10) X+ @d10; say @scores.perl; 15:53
p6eval rakudo 4bf132: OUTPUT«[3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 10, 11, 12, 13, 14, 15,
..16, 1…
sbp rakudo: my @powers-of-two := 1, 2, 4 ... *; say @powers-of-two[^10].perl; 15:54
p6eval rakudo 4bf132: OUTPUT«(1, 2, 4, 8, 16, 32, 64, 128, 256, 512)␤»
flussence hm, google doesn't turn up any results for a php grammar...
15:54 rlb3 joined
donri Guys I quite like ==> but find it weird to have it end with the "my @foo", and to start with an assignment has weird precedence, requiring parenthesis. 15:55
Can't we change that?
sbp rakudo: my @Fibonacci := 0, 1, * + * ... *; say (@Fibonacci ...^ * > 10000).perl;
p6eval rakudo 4bf132: OUTPUT«(0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765)␤»
PerlJam flussence: www.icosaedro.it/articoli/php-syntax-ebnf.txt
tadzik flussence: trac.parrot.org/parrot/wiki/Languages
donri And similarly allow assignment with <==
tadzik there is a PHP implementation
PerlJam flussence: svn.php.net/repository/php/php-src/...e_parser.y 15:56
flussence: code.google.com/p/phpparser/source/...mmar/Php.g
flussence: all of those could be used as a starting poitn.
TimToady donri: I don't follow you at all, but maybe it's because I've only had half a pot of coffee... 15:57
sbp rakudo: my @random-stuff := 1, 3, 4, 7 ... *; say @random-stuff[^10].perl
p6eval rakudo 4bf132: OUTPUT«Method 'count' not found for invocant of class 'Failure'␤ in <anon> at line 861:CORE.setting␤ in 'List::at_pos' at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1808:CORE.setting␤ in <anon> at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1␤ in main program body at line
..1␤»
sbp — via jasondavies. is a bug?
flussence the BNF thing looks like something I can understand... I might try this.
tadzik: seems like it's dead :(
donri TimToady: "my @foo = @bar ==> grep stuff" will assign @bar, not the grepped result, i think
sbp in Soviet Perl6, @bar ==> grep stuff = @foo, my! 15:58
TimToady well, yes, sometimes you have to use parens to do unnatural precedence
donri but why is it unnatural?
TimToady there's no way to arrange a precedence table so that never happens 15:59
donri why doesn't assignment have the lowest precedence
TimToady feeds are "pipes" in a Unixy sense, and have to be very "heavy"
they're really intended for inter-thread use
PerlJam donri: just put my @foo on the other end and be happy :) 16:00
donri PerlJam: but that reads weird
PerlJam donri: read it to me.
donri mainly i'm curious if this behavior is a result of puristic idealism, or because of technical reasons, or just NYI 16:01
16:01 jimmy1980 left
donri or if it's actually useful in ways i haven't understood 16:02
16:03 colomon left 16:08 jimmy1980 joined
dalek ecs: b1878bf | larry++ | S03-operators.pod:
dig out a precedence fossil

List assignment is looser than list infix, not just looser than comma.
16:08
TimToady feed operators are heavier than assignment operators, in part because they make promises about lack of side effects between threads, and because they're really message queues, which are intended to connect larger chunks of code than assignment typically does 16:12
16:13 colomon joined
TimToady they have larger names to indicate their greater weight too 16:13
they may also end up getting used for file IO 16:15
generator() ==>> io("filename") or some such
or more generally, allow channel targets a la Go 16:16
in the limit, some feed operators might be implemented by forking and using a real pipe 16:17
(or shared memory so you don't have to marshall/demarshall) 16:18
16:18 am0c joined
donri alright thanks :) 16:19
TimToady the prec table is in S03 if you're interested 16:20
feed operators are the loosest infix there is 16:21
(but note that rakudo only partially implements feed ops yet; the precedence is according to spec, though, afaik) 16:22
PerlJam I don't know ... semi-colons look infix to me ;)
TimToady sometimes they are :) 16:23
in any case, precedence table design is both a science and an art 16:24
we can give lots of reasons, but the overall reason is "it feels about right"
moritz_ it's often "so that $common_used_construct DWYM" 16:25
PerlJam TimToady: you should write a book called "The Art of Programming Language Design" ala Knuth :-) 16:26
Just don't take 40 years to finish it.
FSVO finish
moritz_ it'll never be finished, of course :-)
Eevee isn't that what Perl 6 is
"if you want to design a programming language, make this one" 16:27
TimToady well, depends on whether you want your language to be the universal root of all other languages...
PerlJam Eevee: Except TMTOWTDI and context is important. (all very perly lessons)
moritz_ there's still much room for designing special purpose language
[particle] writing a book on designing arabic? 16:28
moritz_ "optimized for poetry"
PerlJam I once asked Jon Bentley if he were going to update "More Programming Pearls" and in his response he indicated that languages like Perl have largely made the whole "little languages" idea obsolete. He couldn't have been more wrong. 16:29
pmurias moritz_: what about adding ...:from<C#> or use ...:from<perl5> to niecza 16:35
?
moritz_ pmurias: works for me 16:37
pmurias: I would also accept the lisp backend for niecza as a GSOC project, you just have to be very careful to forumlate the benefits for the community
whatever you do, remember that the majority of mentors who review your proposal are p5 hackers, so don't assume any domain knowledge 16:38
16:39 cdarroch joined, cdarroch left, cdarroch joined, kjeldahl joined 16:43 spq joined, spq left 16:44 birdwindupbird left
TimToady once you're done with it, all you have to do is invert the process to come up with a lisp-to-perl6 translator :) 16:47
16:58 icwiener left, rlb3 left 17:02 am0c left 17:17 takadonet joined
takadonet hey all 17:17
pmurias TimToady: so the plan would be to bait lisp hackers with our pretty syntax and use the lisp-to-perl6 translator to allow them to switch their code over? ;) 17:18
PerlJam lisp people are clearly not swayed by pretty syntax. 17:19
17:20 poincare101 left
cxreg or fearful of punctuation 17:21
17:22 mj41 joined 17:23 plobsing joined, icwiener joined 17:25 ajs left
TimToady just call it a fancy macro processor and they should eat it up 17:25
tadzik hello 17:26
my today's idea: one can measure docs coverage by counting how many ^methods have their .WHY 17:27
takadonet tadzik: i like
17:31 fhelmberger_ left 17:32 ymasory left 17:33 masak joined
masak oh hai zebras! 17:35
phenny masak: 30 Mar 23:00Z <sorear> tell masak STD has issues with nested subs; it generates spurious warnings. However it DID come up ok.
masak indeed :)
STD is generally so good that I'm always a little disappointed when it isn't perfect.
tadzik hey masak 17:36
17:37 kostja_osipov joined
masak tadzik: hey 17:44
kostja_osipov: hi! welcome.
takadonet how can you determine if a Class is already loaded? 17:46
moritz_ rakudo: use Test; say %*INC.perl 17:47
p6eval rakudo 4bf132: OUTPUT«undef␤»
moritz_ hm
I think there's a variable that holds the loaded modules
masak .perl shouldn't say 'undef'
moritz_ digging through the rakudo source should give an answer
masak: right 17:48
takadonet I have a list of objects and I don't want to load all of them since most of the time most will not be used
tadzik there should be no undef anywhere, should it?
masak tadzik: correct. 17:49
moritz_ rakudo: say keys %Perl6::Module::Loader::Loaded 17:50
p6eval rakudo 4bf132: OUTPUT«Null PMC access in isa()␤ in main program body at line 22:/tmp/Alr0qxiUAC␤»
moritz_ rakudo: say %Perl6::Module::Loader::Loaded.PARROT
p6eval rakudo 4bf132: OUTPUT«Null PMC access in find_method('PARROT')␤ in main program body at line 2:/tmp/9m52ufksHj␤»
moritz_ rakudo: say %Perl6::Module::Loader::LOADED.PARROT
p6eval rakudo 4bf132: OUTPUT«Null PMC access in find_method('PARROT')␤ in main program body at line 2:/tmp/SS7tvdNnGz␤»
moritz_ rakudo: say %Perl6::Module::Loader::LOADED 17:51
p6eval rakudo 4bf132: OUTPUT«Null PMC access in type()␤ in main program body at line 22:/tmp/BykO43DIJh␤»
moritz_ it's class Perl6::Module::Loader;
our %LOADED;
17:53 plobsing left
dalek d: a105156 | larry++ | STD.pm6:
don't complain about unused 'our' declarations
18:02
18:02 [sbp] joined 18:04 mberends joined 18:07 Chillance joined
masak \o/ 18:10
sjohnson yo
masak.excited
masak Bool::True 18:11
18:13 MayDaniel joined
sjohnson heh 18:14
18:16 plobsing joined 18:22 MayDaniel left 18:29 tyatpi_ joined 18:30 benabik joined 18:32 nymacro left
masak pop quiz: which Perl 6 implementation do you think will be the first to implement Bool as an enum? 18:33
tadzik yapsi 18:35
colomon pugs? 18:38
tadzik "will be" :)
TimToady perl6: my $x = Bool::False; $x++; say $x 18:40
p6eval rakudo 4bf132, niecza v4: OUTPUT«Bool::True␤»
..pugs: OUTPUT«1␤»
sjohnson *gasp*
perl6: my $x = Bool::False; $x++; $x++; say $x
p6eval rakudo 4bf132, niecza v4: OUTPUT«Bool::True␤» 18:41
..pugs: OUTPUT«2␤»
colomon pugs--
tadzik . o O ( pugs: OUTPUT«2» )
blah, I failed a joke
. o O ( pugs: OUTPUT«1» )
18:43 mj41 left 18:49 hudnix left 18:50 hudnix joined 19:00 ymasory joined 19:03 ronoreck left 19:05 patrickas joined
patrickas sbp: still here ? 19:06
masak making Bool an enum is challenging because Bool is usually a low-level concept (involved in 'if' and 'while' constructs, for example), while enums build on quite a number of things and is high-level. 19:07
patrickas I am not sure how to best handle the issue you reported with the sequence op in the backlog. Currently in your case the sequence op is "fail"ing with a message. 19:08
rakudo: use fatal; my @random-stuff := 1, 3, 4, 7 ... *; say @random-stuff[^10].perl
p6eval rakudo 4bf132: OUTPUT«Unable to figure out pattern of series␤ in 'get-next-closure' at line 1␤ in <anon> at line 860:CORE.setting␤ in 'List::at_pos' at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1808:CORE.setting␤ in <anon> at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1␤ in main
..program bo…
patrickas Oh and hello all :-) 19:09
tadzik hello patrickas 19:10
masak hi patrickas
tadzik patrickas: you're the Gentoo guy, aren't you?
sbp patrickas: I am, hello
patrickas tadzik no I am not! But I sure look like him!
tadzik is confused
sbp the use fatal message is certainly much more helpful 19:11
tadzik yeah, you're the rakudo maintainer :)
sbp I wonder if there's any way to make the message sans use fatal more helpful?
19:11 sivoais left
patrickas actually maybe someone can help .. is that the right way to handle failure inside the sequence op in the first place? 19:11
tadzik patrickas: you might want to take a look at github.com/tadzik/gmpup I'm looking for Gentooers' feedback on this one 19:12
patrickas tadzik: I am even more confused! I am not the Gentoo guy nor have I ever been! :-(
tadzik hrm, weird. Must've mistaken you for somebody else then, nevermind :) 19:13
patrickas tadzik: hence the silly failed joke of me looking like him :-)
tadzik now I get it :)
it's a Patrick too, this guy, I thought that was you :) 19:14
19:14 Holy_Cow joined
sbp patrickas: I don't really understand why the Failure that you get when you consume the dodgy sequence isn't reported, but passed along as an object to try to get .count on 19:14
surely it'd be better for it to choke on the Failure?
19:15 ronoreck joined
sbp I understand at least that the Failure isn't arising in the first statement because it's a lazy expansion 19:15
patrickas sbp: beats me ... All I did was fail "error message" thinking that was the right thing to do 19:16
19:18 tty234 left, hercynium joined 19:19 rlb3 joined
patrickas maybe someone will read backlog and help us out. I'll check the log later and if someone suggests a better way, I can implement any changes to the way the seq op fails. 19:22
bye all o/ 19:23
19:23 patrickas left
masak er. 19:23
1, 3, 4, 7 ...
I'm not sure I see the bug. 19:24
there's no obvious next number there.
PerlJam maybe it should have been 1, 2, 4 ,7 ? 19:25
19:25 rlb3 left
PerlJam (or someone could enlighten me what the pattern in the original sequence is) 19:25
masak even 1, 2, 4, 7 wouldn't have an obvious next number, by the narrow definition of "obvious next number" used in the spec. 19:27
there are two types of sequence supported natively: arithmetic, and geometric.
1, 2, 4, 7 is a nice start of some other type of sequence. :) 19:28
Su-Shee 1+3 is 4, 3+4 is 7 so the next number is 11. (4+7)
masak not without a closure giving that rule.
PerlJam What?!? you mean sequences aren't magical?
;)
masak yes, just not as magical as you seem to like :) 19:29
"Perl 6: the madn^H^H^H^Hmagic only goes so far"
Su-Shee pft. closure schmosure. if I see the next number with my own eyes.. :) 19:30
masak it would be nice to see an API in the spec for providing user-defined "sequence guessers", perhaps through clever use of multis or sump'n. 19:31
or we could let clever module developers handle that bit, that's OK too.
19:34 pmurias left 19:36 pmurias joined 19:51 Chillance left 19:52 Chillance joined
colomon Seems to me in the old days, if you couldn't determine that a sequence was arithmetic or geometric, you just made the generating function *.succ (or maybe *.pred if the right-hand-side was less than the left-hand-side). Seems weird that the spec now says nothing about what is done. 19:56
masak arguably giving a loud error message is a better failure mode than just guessing that a weird enough sequence suddenly proceeds by steps of one, though. 20:00
could be argued either way, I guess.
20:01 GinoMan joined
Util +1 for loud error message 20:04
20:05 GinoMan left
PerlJam what about some standard $*SEQUENCE_GUESSER as a fallback? (which would carp loudly by default) 20:05
or, how is the user to modify the sequence guessing algorithm? monkey patching?
masak again mumbles about someone providing a fantastic module for this... 20:06
Perl 6 is insanely pluggable. we don't need to provide everything out of the box.
the best we can do going forward is focus, not generalize... :)
"The core should be as big as is convenient, but no bigger." :P 20:08
20:08 jaldhar left
PerlJam masak: so ... how is someone to write such a module? 20:08
TimToady um, all you need is an inner lexical scope defining infix:<...>
masak and the existing ones need to at least gracefully receive a &nextsame 20:09
which I guess they do. 20:10
TimToady there's a reason the current language is defined *lexically*, not by any ISA chain
colomon isn't that reversed, though?
if you use nextsame, then you have to figure out whether or not to call the existing infix:<...> 20:11
ideally for what we've been talking about, you want yours called only if the existing one doesn't find a solution.
masak colomon: I was thinking that the new multi would get first dibs at looking for matches, it being the newest addition. if it doesn't it just lets the sequence through. 20:12
colomon: nicely enough, that works even if someone did it in a scope between yours and the setting.
Util If the native perl6 ... will throw an exception that the lexical ... will catch, then the lexical ... can just pass everything through to the native, and if an exception is raised, either do its magic DWIM or propogate the exception upwards. 20:13
colomon Util: true 20:14
masak Util: I read your message as having a lot of pauses, and had to re-read it. :P 20:15
20:15 mj41 joined
masak Util: why aren't you using our very nice infix:<...> syntax? :) 20:15
not that I'm forcing you. but it would make you look a lot less hesitant. 20:16
20:16 takadonet left
flussence
.oO( I tend to use markdown's ``s in normal text for that sort of thing )
20:16
masak Pod's C<...> would be fine too. 20:20
awww. I feel very stereotypical as a programmer, kvetching about people's lack of use-versus-mention distinction. :/
ok, general task for people: (1) there was a nice email to p6c or p6l some years ago. I don't remember who wrote it, but I remember it had a long list of the S28/S32 functions/methods, and it considered/commented the naming of all the parameters. could you help me locate this message? 20:21
(2) it would be very nice to act on the message in some way. maybe simply commit some of the suggested improvements to the spec, or submit RT tickets if they require some discussion? 20:22
20:24 envi left, Mowah left 20:26 MindosCheng left
moritz_ iirc it was a nopaste here on #perl6 20:29
and it expired when I came back to it later
masak awww :(
moritz_: who made it?
moritz_ I don't remember 20:30
20:30 kostja_osipov1 joined
PerlJam masak: ask on p6l and maybe whoever it is will come out of the woodwork 20:31
masak kostja_osipov1: Добро пожаловать :)
PerlJam++: good idea.
masak does that
20:33 kostja_osipov left 20:35 MayDaniel joined
masak mail sent. 20:35
20:39 Chillance left 20:40 Chillance joined, patrickas joined
patrickas back for a while! 20:41
masak: I was not questioning if the sequence should try to guess the next number, it was should it complain louder 20:43
20:43 noganex_ joined
masak patrickas: "Unable to figure out pattern of series" 20:44
that's the error.
patrickas here is the context
spb reported
rakudo: my @random-stuff := 1, 3, 4, 7 ... *; say @random-stuff[^10].perl
p6eval rakudo 4bf132: OUTPUT«Method 'count' not found for invocant of class 'Failure'␤ in <anon> at line 861:CORE.setting␤ in 'List::at_pos' at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1808:CORE.setting␤ in <anon> at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1␤ in main program body at line 20:45
..1␤»
patrickas I replied with
rakudo: use fatal; my @random-stuff := 1, 3, 4, 7 ... *; say @random-stuff[^10].perl
p6eval rakudo 4bf132: OUTPUT«Unable to figure out pattern of series␤ in 'get-next-closure' at line 1␤ in <anon> at line 860:CORE.setting␤ in 'List::at_pos' at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1808:CORE.setting␤ in <anon> at line 1␤ in 'Any::postcircumfix:<[ ]>' at line 1␤ in main
..program bo…
patrickas that's what I mean by louder ... unless you "use fatal" you have no idea what went wrong
masak huh.
masak didn't even know Rakudo had 'use fatal' already 20:46
yes, that one should definitely complain louder.
masak submits rakudobug
20:47 noganex left
Tene masak: Yes, I implemented it. :) 20:47
The exceptions system isn't quite right, but it's a ways down on my list right now. :(
I wish I had more time. :(
masak me too :( 20:48
hugme: hug me
hugme hugs masak
masak hugme: hug Tene too
hugme hugs Tene
20:49 tyatpi_ left, sivoais joined, stkowski left
masak oh, and Tene++ for implementing 'use fatal' :) 20:50
patrickas ok then ... that's settled, /me disapears again in a puff of smoke
Tene masak: "use fatal" == 'my $*FATAL = Bool::True;'
20:50 patrickas left
Tene similarly 'no fatal' 20:50
masak Tene: I don't care if it was trivial. you implemented it -- kudos :) 20:52
Tene 'k
masak I wish more people would pick LHF like that. not just in the Perl 6 world, but generally in software. 20:53
we need more _why-like people, who see opportunities and paint the world in joyous colors. :)
Tene I wish I could find sysadmins looking for work. 20:54
masak I've been thinking of color pickers lately, by the way. and how basically all of them suck.
Tene I think I like your wish a bit better, though.
masak a color picker shouldn't be based on RGB or even HSL. 20:55
it should be based on how the brain thinks about color.
Eevee Lab? 20:56
masak and the fact that all we have... in 2011... is mostly the boring old dull color pickers, is that people aren't _why-like enough to rise up and throw out crap and replace it with decent stuff.
flussence Pixel.new(pear => 0.8, beige => 0.2) ?
Eevee (fwiw HSL is how *I* think about color; RGB and HSV are foreign languages)
masak HSL is a good step up if all you have is RGB. 20:57
but I'm talking about something much more brain-friendly than just the right triplet model.
tadzik when/where is Tene's use fatal? 20:58
20:58 pyrimidine left
Tene masak: mypaint has a colour picker I haven't seen before in its "colour changer" tool. 20:58
masak take flussence's idea, for example. why can't I write "pear" and get a pear-toned color in my color picker?
why do I have to pick individual colors? why can't I pick them in matching threes or fours? why can't I set whole color themes all in one swoop? 20:59
Tene tadzik: src/Perl6/Actions.pm, Jan 3 2010
masak there's von Neumann bottleneck involved in color pickers. :)
Tene tadzik: 4456d81dc9c1551a867d58d22c011c977298e537
masak hugme: hug git
hugme hugs git
tadzik oh, I wasn't a Perl6er by then :) 21:00
Tene Haha, looking at my commit history in rakudo, it's mostly silly LHF. :) 21:01
masak same here.
tadzik same here :)
benabik People taking care of LHF is how stuff gets done.
masak many small brooks... 21:02
benabik (You need a few people on ladders, but there's an awful lot of fruit at the bottom.)
flussence masak, you might like this then: colorschemedesigner.com/
masak flussence: yess! 21:03
flussence: but give me that in Gimp, in Inkscape, in OpenOffice. not just as a webapp. this is how it should look, always.
but yes, that's exactly what I have in mind when I think "better". 21:04
Tene masak: One of the other color pickers in mypaint has it.
They've got like... five?
flussence there's also a Color::Scheme on CPAN, which afaik is exactly this thing without the GUI part
masak falls in love with colorschemedesigner.com/ 21:05
I should pick up Gimp or Inkscape and try to patch something like this in. see if they accept it. 21:06
Tene mypaint.intilinux.com/ -- open-source digital painting program; I wish I had known about it back when I would have actually used it. 21:07
flussence I think Gimp has plugin-able colour widgets, even
21:08 Rotwang joined 21:09 noganex_ is now known as noganex 21:21 REPLeffect left 21:22 MayDaniel left 21:29 ymasory left 21:32 kjeldahl left 21:36 hatseflats left, hatseflats joined 21:42 Rotwang left 21:43 REPLeffect joined
masak 'night, #perl6. 21:45
21:47 masak left, araujo joined 21:48 Rotwang joined 21:52 mj41 left 21:54 plainhao left
TimToady um, implementing 'use fatal' with a dynamic variable would be incorrect, since pragmas are supposed to be lexically scoped... 21:55
Tene TimToady: The commit message clearly says that it's an incorrect implementation. 21:56
TimToady nod
21:56 REPLeffect left
TimToady just checking... 21:56
21:58 plobsing left 22:01 donaldh joined 22:02 Holy_Cow left 22:03 ymasory joined 22:05 bacek left, Rotwang left 22:11 Rotwang joined 22:12 eternaleye joined 22:14 ymasory left, ymasory joined 22:16 dorlamm joined 22:20 plobsing joined 22:25 Rotwang left
sjohnson la la la 22:29
22:30 Rotwang joined 22:35 kaare_ left 22:39 icwiener_ joined 22:41 icwiener left 22:46 kostja_osipov1 left 23:01 whiteknight joined 23:04 dorlamm left 23:05 pmurias left, hercynium left, donaldh left 23:15 chitragupt left 23:17 Rotwang left 23:18 chitragupt joined, Rotwang joined 23:30 Rotwang left 23:35 Rotwang joined 23:38 icwiener_ left 23:52 chitragupt left 23:58 cosimo joined