»ö« 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.
masak are you assuming that .NET is not a straight-jacket language? :P 00:00
jlaire it's not a language :P
masak g'ah, I keep doing that :)
Moukeddar it's a plateform
masak yes.
Moukeddar C# is the language 00:01
masak aye.
jlaire it's not *the* language :P
masak well, in a way it is.
Moukeddar well
it is "The" language to me !=
jlaire has anyone written a lambda calculus interpreter in perl6 yet? 00:03
jlaire thinks that'd be a good first project 00:04
TimToady sure, but you have to write your lambdas as -> $a, $b { $a + $b } :)
jlaire heh :) 00:05
I was thinking of doing parsing, too
pure untyped lambda-calculus
masak sounds like fun.
ISTR someone doing church numerals -- probably colomon++ 00:06
Moukeddar perl6 doesn't have lambdas ?
jlaire it ha
masak blog post! strangelyconsistent.org/blog/june-2...-connect-4
jlaire 'lambda calculus' is a very primitive programming language
hm, 7x6 seems more intuitive to me than 6x7 for some reason... 00:07
I think width x height is more common
Moukeddar it's the other way
masak jlaire: ok, fixing. 00:08
jlaire masak: board_is_full has a space after '(', looks non-symmetric
masak aye.
removing.
jlaire Moukeddar: I've got a citation for '7x6' :) www.connectfour.net/Files/connect4.pdf 00:10
Moukeddar hey, i used to play this game long time ago without knowing its real name 00:12
sounds like a fun summer project
lue ooh, can't wait to see how you do a P6-coded text adventure :)
masak lue: I intend to get quite fancy :) 00:13
TimToady masak: typo: wan_win 00:14
jlaire masak++ # can't find anything else to nit-pick on
masak TimToady: thanks, fixing.
lue the world model especially. [btw, my one design goal for my IF language is: "Create Perl 6 if it were made for IF games" :)] 00:15
masak I hope this wasn't too big a game to use as an example. apart from was_win, it felt very straightforward. and I still hope was_win can be simplified somehow.
TimToady typo: Notive 00:16
masak oh, that's fixed like two versions ago :) 00:17
but thanks :)
TimToady shoulda refreshed...
masak .oO( being an early adopter means you risk finding outdated bugs )
lue: I might choose a grid of rooms for simplicity. but I generally like a graph of 'em better. 00:18
00:18 donri left
jlaire is 'sub foo {}' identical to 'sub foo() {}' ? 00:18
masak yes. 00:19
jlaire good
masak yes :)
jlaire :)
TimToady but sub foo { @_ } is not identical to sub foo() { @_ }
00:19 Moukeddar left, whiteknight joined
jlaire ow 00:20
TimToady in fact
niecza: sub foo() { @_ }
p6eval niecza v7-11-g9ba8284: OUTPUT«===SORRY!===␤␤Placeholder variable @_ cannot override existing signature Any()() at /tmp/J8ixTqeKyJ line 1:␤------> sub foo() { ⏏@_ }␤␤Potential difficulties:␤ &foo is declared but not used at /tmp/J8ixTqeKyJ line 1:␤--…
masak rakudo: sub foo { @_ }
p6eval rakudo 72d158: ( no output )
lue what do you mean by a graph? I see a 3D grid as one of the few (if not only) choices.
masak rakudo: sub foo { say @_ }; foo 1, 2, 3
p6eval rakudo 72d158: OUTPUT«123␤»
masak rakudo: sub foo() { say @_ }; foo 1, 2, 3 00:21
p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Placeholder variable cannot override existing signature at line 22, near "; foo 1, 2"␤»
masak rakudo++
00:21 Moukeddar joined
jlaire ok, I'll keep using sub foo() 00:21
masak lue: by graph I mean that nodes (rooms) are connected to each other via edges (passages) in an ad-hoc manner, not according to a grid with coordinates. 00:22
TimToady adventure was merely on a graph, with n,s,e,w,u,d links (and a few random links)
masak right.
TimToady but it was no way in a 3d graph
masak graphs aren't inherently 2d or 3d.
they can be planar, but that's not so useful here.
TimToady I meant grid
jlaire
.oO( rendering general graphs in 2D is a very interesting problem )
TimToady you could holographically project the graph onto a grid, but there were discontinuities 00:23
jlaire Moukeddar: that ^ is a nice example of an algoritm problem
algorithm*
masak lue: does this graph idea make sense to you?
lue ah. I only mention 3D because that's what happens when you use up and down
yes
masak basically, no coordinates involved. 00:24
Moukeddar i'll get involved in game programming , it seems to be the best way to sharpen
masak only relations via passages.
TimToady up and down don't necessarily take you up and down in adventure
lue [unless of course you take each level and say "first level" and so on]
TimToady sometimes you go up one way and north the other way
masak confusing :) 00:25
TimToady one could force it to a 3d grid only by assuming passages wander off their initial line
masak I'd consider that a slightly bad UI :)
TimToady then there are the special directions, xyzzy, plugh, and iirc, ne
lue Hitchhiker's Guide To The Galaxy is my favorite text game [the solution to get into marvin's room is hilarious] 00:26
masak lue: it's a good game :)
lue ifMUD has 'xyzzy' teleport you to the main hall, or somewhere near there.
00:26 woosley joined
TimToady in a sense, all directions in adventure are teleports 00:27
that's what we mean by not-a-grid-but-a-graph
lue The only thing better than the games are the InvisiClues. I have a couple of times sat down and just read them (I have the Lost Masterpieces of Infocom collection) 00:28
Especially the questions designed to keep you from peeking ahead (in the InvisiClues' original incarnation), e.g. Zork I's "How do I get off the roof of the house?" 00:29
masak InvisiClues are cheating :)
lue Too bad I can't find any of it, except for two floppies, a map, and the second box's manual. Hopefully my old hard drive has all the copied games still on it. 00:31
masak among the Infocom games, "Suspended" was always one of my favorites due to its gameplay. I never got very far, but the concept intrigued me. 00:32
jlaire rakudo: sub postfix:<!!>($x is rw) { $x = !$x }; my $x = True; say $x!! for 1..6 00:34
p6eval rakudo 72d158: OUTPUT«Bool::False␤Bool::True␤Bool::False␤Bool::True␤Bool::False␤Bool::True␤»
masak lue: oh, and if you haven't player Photopia, stop anything you're doing and play it RIGHT NOW. :) www.wurb.com/if/game/255
played*
TimToady
.oO(I have a radio playing in my brain!)
00:35 cooper left
masak lue: best IF I've ever played. and -- paradoxically -- it's good partly because it isn't very interactive. it just has a story to tell, and tells it. 00:36
with occasional nudges from the player.
lue I'll spring for the color version. 00:37
masak TimToady: is it a pod-safe radio? :)
lue: yes, good. the colors are actually part of the story, too. 00:38
00:38 cbk left 00:39 icwiener left, cooper joined 00:40 PacoLinux_ left
lue [that's assuming, of course, gargoyle is going to give me color] 00:40
ooh I see color now. /me shuts up and plays 00:41
masak lue: enjoy. 00:43
'night, #perl6.
00:43 masak left
TimToady \oh drath 00:43
*t 00:44
though drath is a lovely word
00:48 cooper left 00:50 bkolera joined, bkolera1 left, nymacro joined 00:52 Chillance left, benabik joined 01:00 Moukeddar left 01:05 cooper joined 01:06 daniel-s joined 01:09 bkolera left 01:10 bkolera joined, bkolera left 01:21 thou left 01:25 Qiang joined 01:33 thou joined
lue masak: That was a fun game. I can't help but think it was influenced by the H2G2 text game a bit (the WHO AM I command and the line "sign of impending mental collapse" gives it away a bit) 01:41
01:45 tokuhirom joined 01:47 wamba left 01:54 whiteknight left
jnthn morning, #perl6 01:55
colomon \o 01:57
jnthn Ah, trig tests are busted because... 02:09
BEGIN { @*INC.push("t/spec/packages/") };
That won't work yet.
02:10 jaldhar left 02:11 rgrau` left, jaldhar joined 02:17 cooper left 02:18 cooper joined, galf left 02:20 ZaphrodZenovka left
dalek kudo/nom: ebe1051 | jonathan++ | NOMMAP.markdown:
Remove a couple of dealt with nommap items.
02:20
02:21 ZaphrodZenovka joined
ZaphrodZenovka Can someone point me to some good reading on NOM ? 02:21
PerlJam ZaphrodZenovka: um ... what sort of reading? :) 02:24
ZaphrodZenovka I want to understand it - top to bottom
I can't seem to find information which aides that... perhaps because I'm doing it wrong 02:25
PerlJam ZaphrodZenovka: it's just perl 6. do you mean you want to understand 6 model?
er, 6model
jnthn ZaphrodZenovka: There's various bits to be gleaned from blog posts on pmthium.com/, 6guts.wordpress.com/ and see also perlgeek.de/blog-en/perl-6/how-fast-is-nom.html. 6guts has a bunch on the object model
colomon jnthn: it may be a lot more reasonable to get rid of the trig test's extra include. I'll have to take a look tomorrow.
*now
ZaphrodZenovka Thanks for those links, I'll start there
jnthn colomon: OK. I'll fix those things up eventually 02:26
colomon: Probably even within a week.
ZaphrodZenovka When I see blogs talk about work on Rakuda/Nom I want to understand what is being referenced
TimToady perl6: say :10<1>.WHAT 02:27
p6eval niecza v7-11-g9ba8284: OUTPUT«===SORRY!===␤␤Action method alnumint not yet implemented at /tmp/9JPZLcYfB_ line 1:␤------> say :10<1⏏>.WHAT␤␤Action method rad_number not yet implemented at /tmp/9JPZLcYfB_ line 1:␤------> say :10<1>⏏.WHA…
..rakudo 72d158: OUTPUT«Num()␤»
..pugs: OUTPUT«Int␤»
TimToady nom: say :10<1>.WHAT
p6eval nom: OUTPUT«Could not find sub &radcalc␤current instr.: '_block1002' pc 74 ((file unknown):48238532) (:1)␤»
TimToady pugs: say :10<1.1>.WHAT 02:28
p6eval pugs: OUTPUT«Rat␤»
jnthn ZaphrodZenovka: "nom" is a branch in the Rakudo repository. The commit log is at github.com/rakudo/rakudo/commits/nom and you can browse the tree at github.com/rakudo/rakudo/tree/nom
TimToady pugs: say :10<1.1*10**23>.WHAT
p6eval pugs: OUTPUT«Rat␤»
TimToady hmm
jnthn ZaphrodZenovka: Also see jnthn.net/papers/2011-bjpw-rakudo.pdf
ZaphrodZenovka jnthn: awesome, I thought that but did not see anywhere that said so... and new object model or something like it I read once for the acronym... 02:29
jnthn: thanks - that should untangle the knot in my mind over this 02:30
02:38 Qiang left
soh_cah_toa ZaphrodZenovka: perlgeek.de/en/article/discovering-...t-protocol 02:39
02:47 Instil___ joined 02:48 Instil left
slavik1 media.photobucket.com/image/recent/...roes-1.jpg 02:51
hmm, wrong tab
felher phenny: tell masak your connect-4-blog-post was great :D . Just one thing: Couldn't you've used "^$HEIGHT" instead of "0 .. $HEIGHT -1" and "^$N" instead of all the "0 .. $N - 1"? I find ^$XYZ a bit easier to read. Guess this is just a matter of taste, though. :) 02:59
phenny felher: I'll pass that on when masak is around.
felher pmichaud++ for more-nom-features-blog-post, moritz++ for how-fast-is-nom 03:03
sleep & 03:04
03:11 woosley left 03:14 perlhack joined
perlhack 􏿽xB9􏿽xFE􏿽xB9􏿽xFE 03:14
i came back agagin 03:15
:-) 03:16
03:23 Su-Shee_ joined 03:24 perlhack left 03:27 Su-Shee left 03:30 sivoais joined 03:47 perlhack joined
perlhack What a wonderful day。 03:49
practice practice practice 03:54
03:54 cosimo joined
perlhack practice practice and practice 03:54
04:02 _twitch joined
ZaphrodZenovka if( ! $practice) {while (! $practice) {$practice = 1;}} 04:03
04:07 envi joined 04:22 tokuhirom left 04:25 daniel-s left, dayangkun joined
perlhack ZaphrodZenovka:you have humor. 04:29
04:30 _twitch left 04:41 whiteknight joined
moritz nqp: say(pir::exp__Nn(1e0)) 04:52
p6eval nqp: OUTPUT«2.71828182845905␤»
05:01 zby_home_ joined 05:02 zby_home left 05:05 kaare_ joined 05:12 drbean left 05:17 Qiang joined
dalek kudo/nom: f37d574 | moritz++ | src/core/ (4 files):
log()
05:19
kudo/nom: a08f69e | moritz++ | / (6 files):
exp, infix ** for Complex
ast: f59ce96 | moritz++ | S32-num/complex.t:
fudge complex.t for rakudo
05:20
moritz nom: say 3.1_41 05:25
p6eval nom: OUTPUT«0.0031␤»
05:26 perlhack left 05:27 perlhack joined 05:31 drbean joined 05:33 soh_cah_toa left
dalek kudo/nom: a930204 | moritz++ | / (2 files):
allow underscores in rat literals. Tests.
05:33
moritz nom: say (1, 2, 3)>>.log 05:34
p6eval nom: OUTPUT«Could not find sub !dispatch_method_parallel␤current instr.: '_block1002' pc 97 ((file unknown):32624033) (:1)␤»
moritz colomon++ # putting so much work into the math part of master that porting the stuff to nom is almost trivial 05:35
nom: all(1, 2) 05:39
p6eval nom: OUTPUT«Could not find sub &all␤current instr.: '_block1002' pc 80 ((file unknown):41743671) (:1)␤»
moritz nom: 1 & 2
p6eval nom: OUTPUT«Could not find sub &infix:<&>␤current instr.: '_block1002' pc 80 ((file unknown):40126807) (:1)␤»
moritz nom: say (1, 2, 3).map: *.exp 05:42
p6eval nom: OUTPUT«Method 'exp' not found for invocant of class 'Whatever'␤current instr.: '_block1002' pc 108 ((file unknown):58021931) (:1)␤»
moritz nom: say (1, 2, 3).map: exp(*) 05:43
p6eval nom: OUTPUT«Could not find sub &exp␤current instr.: '_block1002' pc 108 ((file unknown):68845163) (:1)␤»
moritz evalbot rebuild nom
p6eval OK (started asyncronously)
05:47 kaare_ left
dalek ast: a74d4c7 | moritz++ | S02-literals/subscript.t:
fudge subscript.t for nom
05:49
kudo/nom: 6f27881 | moritz++ | / (3 files):
two more passing test files, add List.fmt, grep() accepts non-Code matchers
05:50
06:09 cooper left, woosley joined 06:17 am0c joined
thou hi, anyone up for looking at a rakudo problem? I'm not sure why i'm getting "Cannot resume dead coroutine"; i tried with rakudo * 2011.04 and current git master. paste2.org/p/1500332 06:23
06:26 Bzek joined 06:49 benabik left, benabik joined 06:51 benabik left, benabik joined 07:00 thou_ joined 07:04 thou left 07:16 whiteknight left, [particle] left 07:17 [particle] joined 07:25 thou_ left 07:27 mj41 joined 07:36 jaldhar left, jaldhar joined 07:42 Mowah joined 07:49 wamba joined
tadzik good morning zebras 07:50
jnthn: are you around? 07:51
08:03 perlhack left 08:08 perlhack joined 08:09 isBEKaml joined 08:10 isBEKaml left
perlhack i came here again. 08:11
I am glad to see you 08:12
08:14 envi left 08:19 woosley left 08:31 am0c left 08:33 drbean left 08:50 envi joined 08:53 Su-Shee_ is now known as Su-Shee 08:54 daniel-s joined 08:57 envi left
Su-Shee hm, everyone ever heard of this book?! I'm confused. ebook-4free.net/ebook/perl-6-essentials.php 09:04
good morning. 09:05
tadzik good moritz Su-Shee
Su-Shee *hihi* 09:06
tadzik: haven't had a coffee yet? :) 09:07
tadzik oh snap 09:09
I need a more DWIM tab-completion
good MORNING Su-Shee :)
Su-Shee tadzik: pah minor semantic details.. I take a good whatever in the morning.. :) 09:11
perlhack I am here almost in the evening 09:24
tadzik time flies :) 09:28
09:28 xinming_ joined 09:31 xinming left
tadzik seen thou? 09:32
aloha thou was last seen in #perl6 3 hours 9 mins ago saying "hi, anyone up for looking at a rakudo problem? I'm not sure why i'm getting "Cannot resume dead coroutine"; i tried with rakudo * 2011.04 and current git master. paste2.org/p/1500332".
tadzik rakudo: my $a = 1, 2, 3; $a = $a.grep(* ne ''); say $a.perl 09:34
p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤ in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'List::perl' at line 2868:src/gen/core.pm␤ in main program body at line 22:/tmp/nEWs1EbFB4␤»…
tadzik there we are. Known bug?
rakudo: my $a = 1, 2, 3; $a = $a.grep(1); say $a.perl
p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤ in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'List::perl' at line 2868:src/gen/core.pm␤ in main program body at line 22:/tmp/oiuC05H09N␤»…
tadzik rakudo: my $a = 1, 2, 3; $a = $a.grep({1}); say $a.perl
p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤ in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'List::perl' at line 2868:src/gen/core.pm␤ in main program body at line 22:/tmp/iqwWixCws0␤»…
tadzik rakudo: my $a = 1, 2, 3; $a = $a.map({1}); say $a.perl 09:35
p6eval rakudo 72d158: OUTPUT«(1)␤»
tadzik rakudo: my $a = 1, 2, 3; $a = $a.grep(* ne '').flat; say $a.perl 09:36
p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤ in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'List::perl' at line 2868:src/gen/core.pm␤ in main program body at line 22:/tmp/8QGFB8fj1v␤»…
tadzik ok, whatever, not flooding anymore :)
09:36 dolmen joined 09:41 agentzh joined 09:57 masak joined
masak felher: hm, interesting. 09:57
phenny masak: 02:59Z <felher> tell masak your connect-4-blog-post was great :D . Just one thing: Couldn't you've used "^$HEIGHT" instead of "0 .. $HEIGHT -1" and "^$N" instead of all the "0 .. $N - 1"? I find ^$XYZ a bit easier to read. Guess this is just a matter of taste, though. :)
masak felipe: I've been *wanting* to use ^$HEIGHT et al, especially in the connect-4 post. 09:58
but I figured it's the kind of sugar that makes sense to experienced Perl 6 programmers but only confuses beginners.
I also find ^$XYZ easier to read, and I write it all the time.
now I have to make a poll. :)
people of #perl6 -- please give me your answer during the day if you can -- 0..$HEIGHT-1 or ^$HEIGHT in day 25 of the June blogging? 09:59
pmichaud my guess is that 0..$HEIGHT-1 will be more readable to a newbie. 10:00
masak has to reboot because his host OS is neurotic
10:00 masak left
tadzik pmichaud: is that grep issue known? (see 20 lines up) 10:01
pmichaud not known... looking
rakudo: my $a = 1; say $a.flat
p6eval rakudo 72d158: OUTPUT«1␤»
pmichaud rakudo: my $a = 1; say $a.flat.WHAT
p6eval rakudo 72d158: OUTPUT«List()␤»
pmichaud rakudo: my $a = 1; say $a.flat.grep(1); 10:02
p6eval rakudo 72d158: OUTPUT«1␤»
pmichaud rakudo: my $a = 1; say $a.grep(1);
p6eval rakudo 72d158: OUTPUT«1␤»
pmichaud oh, that's in rakudo.
my $a = 1; $a = $a.grep(1); 10:03
rakudo: my $a = 1; $a = $a.grep(1);
p6eval rakudo 72d158: ( no output )
pmichaud rakudo: my $a = 1; $a = $a.grep(1); say $a;
p6eval rakudo 72d158: ( no output )
pmichaud rakudo: my $a = 1; $a = $a.grep(1); say $a.perl
p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤ in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'List::perl' at line 2868:src/gen/core.pm␤ in main program body at line 22:/tmp/stVq9uhXS1␤»…
pmichaud rakudo: my $a = 1; $a = $a.grep(1); say $a.WHAT
10:03 perlhack left
p6eval rakudo 72d158: OUTPUT«List()␤» 10:03
pmichaud rakudo: my $a = 1; $a = $a.grep(1); say $a.elems
p6eval rakudo 72d158: OUTPUT«0␤»
pmichaud nom: my $a = 1; $a = $a.grep(1); say $a.perl; 10:04
p6eval nom: OUTPUT«(1,).list.item␤»
pmichaud it works in nom. :-)
tadzik :) 10:05
pmichaud rakudo: my $a = 1; $a = flat($a).grep(1); say $a.perl
p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤ in 'Iterable::Numeric' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'infix:<==>' at line 1:src/gen/core.pm␤ in 'ACCEPTS' at line 3536:src/gen/core.pm␤ in <anon> at line 1567:src/gen/core.pm␤ in <anon> at line 1:src/metam…
pmichaud likely a list bug somewhere. 10:06
I bet the gather/take is unneeded there anyway. 10:08
10:09 tokuhirom joined 10:11 nymacro left 10:15 lichtkind joined 10:17 Chillance joined
dalek kudo/nom: 430e461 | pmichaud++ | src/core/Any.pm:
Any.grep doesn't need a gather/take, .map is already lazy.
10:19
10:21 Moukeddar joined 10:22 masak joined 10:24 mj41 left
snarkyboojum nom is exciting 10:25
masak snarkyboojum! \o/ 10:29
tadzik seems that snarkyboojum is exciting too :) 10:31
10:31 PacoLinux joined 10:33 mj41 joined
snarkyboojum masak-san! 10:34
tadzik-san! :) 10:35
10:35 Kivutarrr joined 10:36 agentzh left
Su-Shee where are you folks all on g+? I want a perl6 circle. ;) 10:39
pmichaud haven't gotten an invite yet 10:40
Su-Shee I can't send some out via email as of yet. I'm too unimportant. 10:41
moritz pmichaud: how are the constants e, i and pi supposed to work in nom?
pmichaud probably using the 'constant' keyword, which is nyi 10:42
moritz ok
master cheated by using set_hll_global or some such
I guess we don't want that in nom
(and I guess it wouldn't work, due to the symboltable changes)
pmichaud I don't mind cheating here.
but yes, it probably wouldn't work.
masak Su-Shee: I get tiny impulses to join Google+, but pretty soon I remember that I don't like to be social online. 10:43
snarkyboojum masak: other than on IRC? :) 10:44
masak I'd sign up for an anti-social network any day.
snarkyboojum: this is conversation, not collecting friends and tending to imaginary farmland.
Su-Shee masak: it's a convenient way of spreading and aggregation information - why does everyone think it has to be used as a "social" tool?
snarkyboojum Su-Shee: I received an invite, but was told that they were temporarily exceeding their capacity... 10:45
Su-Shee masak: like twitter, but with better grouping facilities.
snarkyboojum: I had to try a couple of times..
masak Su-Shee: even the "social" aspects of Google Reader bugs me. I just want to read my feeds -- I have no interest whatsoever in what people I know recommended.
snarkyboojum masak: I enjoy that distinction :)
10:45 MayDaniel joined
Su-Shee masak: I've disabled all that in the reader. 10:45
masak ooh
masak didn't know that was an option
snarkyboojum Su-Shee: me2 :) 10:46
Su-Shee masak: I'm really using all of those kinds of tools as exactly that: convenient tools.
tadzik masak: speaking of anti-social, join diaspora :P
pmichaud I didn't even know there was a social aspect to Google Reader (and I use it all the time)
I mean, I see a little button that says I can share things... but I've never explored it.
10:46 Chillance left
snarkyboojum I share and like frequently, esp on interesting Perl 6 stuff :) 10:47
masak Su-Shee: my point is this: as a survoval mechanism, I tend to avoid things that will "suck me in" and give diminishing returns. Google+ seems like such a tool -- yet another place to check "updates" to various things, to what end?
10:47 perlhack joined
Su-Shee I share often, preferably via twitter but I never like. 10:47
masak: no idea, I'm not using it that way. :) 10:48
masak it's bad enough with Twitter. I have slight issues with the knowledge that I didn't read parts of the firehose. 10:49
Su-Shee masak: for example, I've made a perl circle but also a circle of all my editors/publishers. so if I have something to offer to them, I could either create that via email - or I just drop them a note within this circle
masak Su-Shee: I hear you. will consider the ramifications of this.
masak bikes to the .STORE to .FETCH things 10:50
Su-Shee masak: I'm very brutal anti-social-web, but I see the aggregation/multiplication features as very well done and convenient to use.
10:51 perlhack left 10:57 perlhack joined
perlhack hello again 10:58
11:01 perlhack left, perlhack joined, ab5tract joined 11:02 perlhack left
moritz Su-Shee: I have registered registrierterterrorist.de a long time ago for anti-social networking. I never got around to do anything useful with it :-) 11:08
11:09 MayDaniel left
Su-Shee moritz: that already is antisocial ;) 11:09
moritz: also excellent domain! :)
moritz :-) 11:10
Moukeddar antisocial ? isn't that like social phobia ? 11:11
moritz "anti" = "against"
or "opposite"
11:12 perlhack joined
Su-Shee I'm very social. I'm just not socialwebsocial ;) 11:12
perlhack :-)which you are using Linux desktop ? 11:14
tadzik the idea of an anti-social network clarifies in my mind. You are not to have any friends, but you can try stalking on someone else. When you do, you see his/her activities, and he/she sees yours. Activities consist of stalking other persons, probably nothing else: what else could you do?
Do you think that could be a Facebook-killer?
perlhack: I do
moritz too
perlhack which ?
tadzik which what? 11:15
Moukeddar well, the phobia makes you against :)
perlhack which Linux ?
tadzik Gentoo on my laptop, Ubuntu on the desktop
moritz tadzik: no, people don't stalk, people make terror attacks (on a map or so)
Debian + FVWM2
tadzik moritz: what information does terror give you then?
Su-Shee moritz: I think they call that "risiko" for at least three decades now and sell it ;)
tadzik I have that :)
Su-Shee tadzik: travel advice for starters ;)
perlhack which is best to use ? 11:16
tadzik we can call this Mission: Terror
perlhack: whichever suits you best
there is no The Best Linux, if it were, there would be only one Linux at all
moritz tadzik: terror isn't about information :-)
perlhack thanks
􏿽xB9􏿽xFE􏿽xB9􏿽xFE
tadzik moritz: oh, so it's a different social aspect :)
Su-Shee it's more of a geolocation thing ;)
moritz tadzik: no, it's an antisocial aspect 11:17
tadzik touche
Su-Shee tadzik: congregating cells (good thing google didn't name the circles cells ;) is the social aspect
tadzik Su-Shee: then we could put circles on the areas 11:18
moritz maybe I should have written "anti-social anti-networking"
Su-Shee tadzik: *hihi*
moritz I didn't plan any networking things at all :-)
tadzik not even the network of dis-trust?
Su-Shee that already is again a social thing :)
tadzik this turns into mmorpg, or mmorts. Or mmoboardgame
Su-Shee moritz: you should think more along the lines of deprivation, isolation, ignorance etc. ;) 11:19
no wait, remove ignorance ;)
11:29 Instil___ left 11:30 perlhack left 11:34 Qiang left 11:43 PhatEddy joined
felher masak: +1 for ^$HEIGHT :) 11:45
11:51 whiteknight joined
jlaire +1 if 0..$N-1 has been used a couple time before 11:52
11:52 Chillance joined 11:55 zby_home_ left
masak it hasn't, not once. 12:04
ab5tract tadzik, there might be no The Best Linux, but distro hopping ceased for me after I found Arch 12:10
12:10 kaare_ joined
pmichaud masak: I voted for 0..$N-1 just before you disconnected, not sure you saw it. 12:13
10:00 <pmichaud> my guess is that 0..$HEIGHT-1 will be more readable to a newbie. 12:14
ab5tract moritz, re: anti-social networking, were you ever familiar with Utu: ihate.rubyforge.org/
pmichaud but you might also consider 0..^$HEIGHT :-)
ab5tract moritz, and here: www.savingtheinternetwithhate.com/
12:17 mj41 left 12:19 envi joined
moritz ab5tract: didn't know about those back in 2006 12:27
12:27 wamba left 12:29 Moukeddar left 12:35 shachaf joined
PhatEddy perl6: my Num $x = NaN; my Num $y; say $x+2; say $y +2 12:37
p6eval pugs, rakudo 72d158, niecza v7-11-g9ba8284: OUTPUT«NaN␤2␤»
PhatEddy spec perlcabal.org/syn/S03.html#Declarators says "Native floating-point containers are by default initialized to NaN" which is why I tried that example. 12:40
tadzik ab5tract: yeah, Arch could be quite nice 12:42
PhatEddy perl6: my $x; if $x <=0 { say 'cmp OK' } 12:43
p6eval rakudo 72d158: OUTPUT«Use of uninitialized value in numeric context in 'Any::Numeric' at line 1498:src/gen/core.pm␤cmp OK␤»
..pugs, niecza v7-11-g9ba8284: OUTPUT«cmp OK␤»
PhatEddy perl6: my Int $x; if $x <=0 { say 'cmp OK' }
p6eval pugs, rakudo 72d158, niecza v7-11-g9ba8284: OUTPUT«cmp OK␤»
PhatEddy spec perlcabal.org/syn/S03.html#Comparison_semantics says "a comparison naturally throws an exception if either of its arguments is undefined" 12:44
moritz naturally. 12:46
PhatEddy So I am not sure which side is off but unless there is some objection will file bug reports on disagreement between implementation and spec. Comments? 12:48
12:49 f00li5h joined
moritz +1 to bug report 12:51
masak pmichaud: yes, saw it. so far I agree.
pmichaud: I consider 0..^$HEIGHT to be "half-way" to 0..$HEIGHT-1 -- and as such, it has all the same problems of non-obviousness as ^$HEIGHT 12:52
not sure how noticeable it is, but I'm writing the games in a fairly narrow subset of Perl 6. not NQP, but the same type of sugarlessness. 12:53
er, sorry. meant to say '"half-way" to ^$HEIGHT' 12:54
13:04 buubot_backup left 13:14 dayangkun left
moritz masak: maybe use the non-abbreviated forms in the post, and then do a second post on how to abbreviate several things from the previous post? 13:15
13:15 mj41 joined
masak moritz: yes. 13:16
moritz: I've been having an increasingly pent-up desire to do a "what I'm not telling you" post or two.
here's my current plan: this "month's" posts are going to end up in a github repo somewhere, and compile to PDF. 13:17
13:17 mj41 left
masak they'll then get "The whole story" sections for each post, where I tell people the non-essential details I omitted in the post. 13:17
tadzik Release it as a book
masak that's essentially what will happen.
I just won't make a big deal out of it :)
it'll be a "resource" more than a book. 13:18
13:21 jon_______ left 13:24 mj41 joined 13:26 buubot_backup joined 13:31 mj41 left
TimToady niecza: my $a = 1, 2, 3; $a = $a.grep(* ne '').flat; say $a.perl 13:31
p6eval niecza v7-11-g9ba8284: OUTPUT«(1, ).list.item␤»
TimToady note that it should also probably say "Useless use of 2 in sink context" 13:32
masak I sink so too :)
TimToady you can't assign a list to a scalar without parens 13:35
masak .oO( not without parenthetical supervision ) 13:36
TimToady these days I think cmp should not be throwing exceptions
masak +1
perhaps the default to .sort should be *.Str, like in Perl 5. 13:38
13:39 Chillance left
TimToady that's another viable approach 13:42
masak I was thinking both of them, combined. 13:43
because what doesn't make sense is to sort a list of heterogenous items and expect them to broker a cmp without any prior knowledge of the types. 13:44
TimToady well, the policy is that default sort should not be throwing exceptions
how we get there is negotiable
masak Perl 5 cuts that gordian knot by imposing string comparison semantics.
TimToady the other viable approach is to sort on type first and then cmp
that will give better results within a type, at the expense of making similar types look nonsensical 13:45
masak I already see people being surprised when their numbers from lines() are sorted using string comp semantics. I'd much rather tell them "sort assumes .Str by default" than "well, those numbers are really strings, you see".
TimToady it has worked pretty well for p5 anyway 13:46
13:46 bluescreen10 left, bluescreen10 joined
TimToady perhaps .gist, since we're taking away last-ditch-ness from .Str 13:47
PhatEddy perl6: my Str ($a) = () 13:48
p6eval pugs, niecza v7-11-g9ba8284: ( no output )
..rakudo 72d158: OUTPUT«Type check failed for assignment␤ Container type: Str␤ Got: Nil␤ in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in main program body at line 1:src/metamodel/RoleToInstanceApplier.nqp␤»
TimToady nom: my Str ($a) = () 13:49
p6eval nom: OUTPUT«Type check failed in assignment to '$a'; expected 'Str' but got 'Nil'␤current instr.: '_block6560' pc 304408 (src/gen/CORE.setting.pir:83896) (:1548)␤»
TimToady nom: my Str ($a) = Nil
p6eval nom: OUTPUT«Type check failed in assignment to '$a'; expected 'Str' but got 'Nil'␤current instr.: '_block6560' pc 304408 (src/gen/CORE.setting.pir:83896) (:1548)␤»
TimToady nom: my Str $a = Nil;
p6eval nom: OUTPUT«Type check failed in assignment to '$a'; expected 'Str' but got 'Nil'␤current instr.: '_block1002' pc 28 ((file unknown):0) (:1)␤»
TimToady rakudo: my Str $a = Nil; 13:50
p6eval rakudo 72d158: OUTPUT«Type check failed for assignment␤ Container type: Str␤ Got: Nil␤ in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in main program body at line 22:/tmp/jK7jxCEjPS␤»
TimToady is a bit surprised that fails
masak while writing connect-4 yesterday, I got a "can't modify rw thingie" from inside the reduction metaoperator. I was too focused on the game to track it down, but I could probably reproduce it. 13:51
(was doing [eq], so it was definitely a bug)
13:54 donri joined 13:55 Qiang joined
PhatEddy The case of of not enough initializers I thought I understood well enough for a bug report but I am less sure of the scalar assignment to Nil. I am guessing scalar assignment to nil usually does nothing? 13:56
s/to nil/from nil/ 13:57
TimToady see S02:2240 13:58
13:58 molaf joined
PhatEddy nom: my $x = Nil; say $x.perl 14:05
p6eval nom: OUTPUT«Nil␤»
PhatEddy rakudo: my $x = Nil; say $x.perl
p6eval rakudo 72d158: OUTPUT«Any␤»
14:05 dolmen left
PhatEddy rakudo is OK here I'm guessing ... 14:06
14:06 TBA2 left
TimToady yes 14:06
14:06 TBA2 joined
TimToady must get his family out of the hotel in, lessee...52 minutes 14:07
masak not only Perl 6 are having perceived naming issues: news.ycombinator.com/item?id=2722413 14:15
s/are/is/
14:27 Tedd1 left
masak rakudo: role R[R $r] {}; class C does R[R] {}; say C.new 14:38
p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Invalid typename in parameter declaration at line 22, near " $r] {}; c"␤»
masak nom: role R[R $r] {}; class C does R[R] {}; say C.new
p6eval nom: OUTPUT«Invalid typename in parameter declaration at line 1, near " $r] {}; c"␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
masak std: role R[R $r] {}; class C does R[R] {}; say C.new
p6eval std 37a0cdd: OUTPUT«ok 00:01 122m␤»
TimToady commuting to our next locale (ugh, locales...) & 14:45
may be back in a few hours...or not...
masak rakudo: class Back { method in {} }; my $a-few-hours; my $may = Back.in(:$a-few-hours) or not Back.in(:$a-few-hours); say "alive" 14:57
p6eval rakudo 72d158: OUTPUT«alive␤»
masak \o/
jlaire rakudo: sub postfix:<or_not>($x) { $x or not $x }; 42 > 9001 or_not; say "alive" 15:01
p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Confused at line 22, near "42 > 9001 "␤»
15:01 wamba joined
jlaire rakudo: sub postfix:<or_not>($x) { $x or not $x }; (42 > 9001) or_not; say "alive" 15:01
p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Confused at line 22, near "(42 > 9001"␤»
15:04 DarthGandalf joined
masak jlaire: postfixes need to be right next to the thing they're modifying. 15:07
rakudo: sub postfix:<or_not>($x) { $x or not $x }; (42 > 9001)or_not; say "alive"
p6eval rakudo 72d158: OUTPUT«alive␤»
masak rakudo: sub postfix:<or_not>($x) { $x or not $x }; (42 > 9001)\ or_not; say "alive"
p6eval rakudo 72d158: OUTPUT«alive␤»
masak ...or use unspace :)
flussence std: sub postfix:(' nope') { };
p6eval std 37a0cdd: OUTPUT«ok 00:01 121m␤»
flussence ...I hope that doesn't work 15:08
masak I think not.
I don't remember the exact rationale for this behavior with postfixes, but it does disambiguate them pretty effectively from corresponding infixes.
flussence I assume a unicode non-breaking space won't work either?
masak correct.
any whitespace takes you out of whatever mode expects a postfix or a postcircumfix. 15:09
jlaire masak: oic
flussence (you can do all sorts of evil things using it in PHP since it doesn't know unicode...)
masak seems S02:307 expounds on why there can't be whitespace before postfix. 15:13
15:16 birdwindupbird joined 15:20 mj41 joined 15:24 envi left 15:25 bloonix left 15:26 bloonix joined, arnsholt_ joined 15:27 arnsholt left, lichtkind left, Grrrr left 15:29 amkrankruleuen left, apejens left 15:30 amkrankruleuen joined 15:32 envi joined 15:36 am0c joined 15:37 cooper joined, bluescreen10 left, bluescreen100 left 15:38 tokuhirom left 15:44 Grrrr joined 15:47 zby_home joined 15:49 arnsholt_ is now known as arnsholt 15:55 envi left 16:03 Instil joined 16:04 envi joined 16:11 Qiang1 joined 16:13 cpk joined 16:14 Qiang left
cpk hi there ! 16:17
phenny cpk: 11 Mar 01:30Z <sorear> tell cpk I have a vague suspicion that on Windows Niecza isn't recognizing "\x0A" ~~ /\v/, and so rcrpg.pl is being interpreted as on one line, with the resulting right brace issues
cpk: 11 Mar 01:31Z <sorear> tell cpk [300 Mo Win64, 30 Mo Win32] Are both of those measurements for the second run? Sounds like more confusion from the "setting autocompilation on first run" wart.
masak hi, cpk.
cpk I have soome issue with niecza and the rcrpg.pl cript 16:18
i have already reported this issue for the v4
eror is : Any()Strange text after block (missing comma, semicolon, comment marker?)
16:19 barika left
cpk here is an old message from sorear 16:19
<sorear> tell cpk I have a vague suspicion that on Windows Niecza isn't recognizing "\x0A" ~~ /\v/, and so rcrpg.pl is being interpreted as on one line, with the resulting right brace issues
I still have the problem with the v7
I'm running the script under windows x64
just wanted to share this issue again 16:20
however the script test.pl doesn't report ant error 16:21
any error
16:22 mj41 left
cpk a good point is that I have no more the memory issue I reported few months ago 16:23
sorear: do you want I report this issue somewhere on the web ? 16:24
16:24 chhet joined 16:27 apejens joined
dalek : 44d088d | jimmy++ | docs/zh-cn/syn/S02-bits.pod:
revise wording a bit
16:33
tadzik masak: reading strangelyconsistent.org/blog/june-24-2011-types what does "Cool" stand for? 16:40
just came to my mind, and maybe it'd be easier to understand besides the punny meaning
also, noremal -> normal I think 16:41
also, nice post :)
16:43 daniel-s left 16:44 mj41 joined
masak tadzik: thanks :) 16:45
tadzik: hm, it didn't even occur to me to unravel "Cool", even though I know it's really an acronym.
tadzik: thinking about it, I don't consider saying "Convenient Object-Oriented Loopbacks" to a 12-year-old any help at all. 16:46
re typo: thanks, fixing. 16:47
16:48 barika joined
tadzik is the series aimed at 12 yo'lds? :) 16:48
16:58 lichtkind joined
masak yes. 17:04
in theory, at least.
strangelyconsistent.org/blog/a-mont...ndamentals 17:05
17:05 Qiang1 left 17:09 noganex joined
cotto pmichaud | moritz, ping 17:12
17:12 noganex_ left
pmichaud cotto: pong 17:14
cotto pmichaud, my understanding of whiteknight and my role as relationship managers is that when someone from Rakudo is having a Parrot problem that's not being adequately resolved, we're the people you can talk to to get it resovled. 17:15
Is there anything else that the role implies, or is it usually the Rakudo folks' responsibility to raise issues?
pmichaud At the moment, I see it primarily as a "problem escalation mechanism", so there aren't many other roles at the moment. 17:16
s/roles/duties/
cotto ok. That was my understanding too. Thanks.
17:17 Moukeddar joined
pmichaud However, I can see that it might not always be for "problems", it could also be that we're a smaller group that discusses longer-term strategic planning. 17:17
i.e., coordinating major efforts between the two projects.
cotto ok. I'm glad I asked then. 17:18
pmichaud I also conceive it could happen in reverse -- i.e., a Parrot dev is having a Rakudo problem that needs resolution.
That's much less likely, but it could happen.
so, whenever something comes up that requires "high-level" coordination and decision making between the two projects, we're the Supreme Court of sorts. :) 17:19
cotto wfm
pmichaud in some ways we get to be the Rakudo/Parrot cabal. :-) :-) 17:20
afk for a bit 17:21
masak \o/ Rakudo/Parrot cabal. 17:23
everyone on the outside seems to assume that's how it works, so we might as well do it. :P 17:24
cotto I've got a great smoke-filled room I can use for a couple hours a week. 17:26
17:26 Moukeddar left 17:33 PhatEddy left 17:37 birdwindupbird left, birdwindupbird joined
masak cotto: :) 17:45
17:55 birdwindupbird left
masak more opinion: me.veekun.com/blog/2011/06/27/perl-...-disaster/ 18:03
18:03 whiteknight left 18:05 orafu left
masak he's right insofar as arguing about naming won't help anything :) 18:05
18:05 orafu joined
masak also, why do people have a tendency to speak up *after* they've stopped being excited about Perl 6? 18:07
they're more useful to the Perl 6 world while they're excited. we have absolutely zero use for past excitement.
18:11 natureboy joined 18:12 chhet left, cooper left
jlaire "They're not doing anything to attract newcomers" doesn't sound right, and I wonder why he thinks the devs should be marketing a "disaster" anyway 18:18
18:21 natureboy left, cooper joined
masak it's easy to form opinions. it takes effort to check them against fact. 18:25
unfortunately, opinions seem to have a better reach than fact. :/
jlaire your over-sensationalist tweet is a good example :P 18:26
jlaire goes back to writing code 18:28
lichtkind masak: he is negative about nearly anything :) 18:34
18:35 dolmen joined
masak I see :) 18:36
lichtkind i once wanted to blob of the psychology of those rants 18:37
masak: he is recently atracted to python and that was propably his way to say sorry but i want to leave
but it takes more guts make cleare decision than to smear other peoples work to let make it obviouse so have to leave 18:38
my grandma does this also sometimes
18:39 cpk left 18:40 donri left
lichtkind i i want to get famous i just have to announce herberts law: every software projects looks like a disaster if you look just deep enough 18:40
masak ;) 18:41
arnsholt lichtkind: I think anything is a disaster once you look close enough =) 18:43
masak verily, the older I get, the more it seems a fluke that the world actually runs at all. 18:44
18:45 offby1 joined 18:46 thou joined
offby1 is there a way at runtime to find out the methods present on an object? For example, if I hav a string 'bob', I'd like to be able to type (at an interactive perl6 prompt) something like 'bob'.METHODS and see a list of things I could do with that string. 18:46
In Python there's something similar, called "dir"; I can type dir ('a string') and see lots of string methods. 18:47
masak rakudo: say "bob".^methods(:local).perl
thou offby1: try: $obj.^methods
p6eval rakudo 72d158: OUTPUT«[{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }]␤»
offby1 fab! thanks
masak rakudo: say "bob".^methods(:local)>>.name.perl
p6eval rakudo 72d158: OUTPUT«("ACCEPTS", "perl", "pred", "succ", "WHICH", "Bool", "Str", "encode", "indent")␤»
thou offby1: the .^ means "this objects meta-object"
offby1 oho
figured there's be something simple. 18:48
thou o/ masak!
masak thou: \o
rakudo: say "bob".WHAT; say "bob".^WHAT
p6eval rakudo 72d158: OUTPUT«Str()␤too many positional arguments: 2 passed, 1 expected␤ in main program body at line 22:/tmp/1fRq1yww6Q␤»
masak rakudo: say "bob".WHAT; say "bob".HOW.WHAT
p6eval rakudo 72d158: OUTPUT«Str()␤ClassHOW()␤»
thou masak, have you seen an error like this before: paste2.org/p/1500332 # "Cannot resume dead coroutine" 18:49
masak that 'ClassHow' is the name of the class metaobject.
thou: yes, but it was a while ago.
thou: usually having to do with gather.
masak looks
thou this is a really simple (it seems) test case, i tried it with current rakudo master (from last night) 18:50
masak try commenting out line 15 and running again.
thou ok 18:51
masak: same stack trace 18:52
masak ok, I didn't expect that. interesting.
I'll try to reproduce it here.
tadzik thou: I found the bug in that
thou tadzik: oh, cool
masak yep, getting the same error.
tadzik rakudo: my $a = 1, 2, 3; $a = $a.grep({1}); say $a.perl
p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤ in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'List::perl' at line 2868:src/gen/core.pm␤ in main program body at line 22:/tmp/h4QIKp4KYt␤»… 18:53
masak oh!
thou tadzik: thanks for boiling it down.
masak submits rakudobug
tadzik++
rakudo: my $a = 1; my $b = $a.grep({1}); say $b.perl
p6eval rakudo 72d158: OUTPUT«(1)␤»
masak rakudo: my $a = 1; $a = $a.grep({1}); say $b.perl 18:54
p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Symbol '$b' not predeclared in <anonymous> (/tmp/0QpKc9Tjrh:22)␤»
thou nom: my $a = 1, 2, 3; $a = $a.grep({1}); say $a.perl
masak rakudo: my $a = 1; $a = $a.grep({1}); say $a.perl
p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤ in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'List::perl' at line 2868:src/gen/core.pm␤ in main program body at line 22:/tmp/9RH76vqCP_␤»…
nom: OUTPUT«(1,).list.item␤»
masak rakudo: my $a = 1; $a = $a.grep(True); say $a.perl
p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤ in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'List::perl' at line 2868:src/gen/core.pm␤ in main program body at line 22:/tmp/RXwzWQ5X9b␤»…
masak rakudo: my $a = $a.grep(True); say $a.perl
p6eval rakudo 72d158: OUTPUT«Cannot resume dead coroutine.␤ in <anon> at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'Any::join' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in 'List::perl' at line 2868:src/gen/core.pm␤ in main program body at line 22:/tmp/vzVuEJqIQ9␤»…
thou weird that this hasn't shown up before 18:55
masak assignments with the same container in both the lhs and rhs being problematic has shown up before. 18:56
but the case I'm thinking of was about hashes.
ah; that's rt.perl.org/rt3//Public/Bug/Display...l?id=77586 18:58
thou masak: btw, i'm making some progress on the november tests. mostly easy stuff to fix.
masak \o/
thou not had a ton of time to work on it, but i'm learning and so it's fun!
masak: looks like "fixed in nom" is sufficient for closing rakudo bugs? which is cool; i guess filing a bug serves as documentation for rakudo users still 19:00
masak I'm not so sure why it should be considered sufficient. 19:01
but I'm not going to be a stickler about it either.
thou i inferred that from pm's comment on the bug
on 77586
well, "fixed in nom + spectest exists for this behavior" is sufficient 19:02
19:02 birdwindupbird joined
thou i guess it's a good measure of Pm's confidence in basing the next rakudo release on nom 19:03
masak it is. and it'd be kinda silly at this point to argue that that might not happen.
still everything else in RT is measured against rakudo master.
BooK: ping 19:04
19:04 donri joined
thou has potatoes to peel. thanks masak++ and tadzik++ ! 19:04
masak rakudo: my $a = $a.map({1}); say "alive" 19:05
p6eval rakudo 72d158: OUTPUT«alive␤»
offby1 rakudo: {a=>1, b=>2} eq {b=>2, a=>1}
p6eval rakudo 72d158: ( no output )
offby1 rakudo: {a=>1, b=>2} eq {b=>2, a=>1};
p6eval rakudo 72d158: ( no output )
offby1 hmm
masak offby1: 'say'
offby1 ah
rakudo: say {a=>1, b=>2} eq {b=>2, a=>1}; 19:06
p6eval rakudo 72d158: OUTPUT«Bool::False␤»
offby1 ok, how would I compare hashes, without regard to order?
I was hoping that'd have returned True.
masak first off, that's a string comparison.
offby1 oops
hence the False
masak rakudo: say {a=>1, b=>2}.Str
p6eval rakudo 72d158: OUTPUT«a 1␤b 2␤␤»
offby1 sure
masak hm, isn't this what 'eqv' does? 19:07
rakudo: say {a=>1, b=>2} eqv {b=>2, a=>1}
p6eval rakudo 72d158: OUTPUT«Bool::True␤»
masak \o/
offby1 rakudo: say {a=>1, b=>2} ~~ {b=>2, a=>1};
p6eval rakudo 72d158: OUTPUT«Bool::True␤»
offby1 /~\
masak /~~\ 19:08
offby1 any pros & cons for "eqv" versus ~~ ? 19:09
speed, generality, etc ?
masak eqv feels more specific.
that's basically what will happen in both cases anyway.
offby1 as it happens, I'm using the Test module, which lets me use "eqv" via its "is_deeply" thing, but doesn't appear to provide access to ~~, so .... 'eqv' it is. 19:11
lue hello world! o/ 19:20
19:22 Bzek left
masak hi there lue \o 19:25
19:25 tokuhirom joined 19:27 envi left 19:45 ab5tract left
TimToady debounces at Franklin 19:47
19:47 soh_cah_toa joined
TimToady there's intertubes here, as you might deductify 19:48
masak Franklin++ 19:49
20:04 kaare_ left 20:06 birdwindupbird left
lichtkind thou: hai 20:11
thou lichtkind: hallo. was ist los? 20:12
was machst du für das 4th of July?
masak er... nothing, since we're in Europe? :) 20:13
thou i know. just kidding.
masak :P
"Independence! Oh wait."
thou we have a friend here visiting from guatemala, and she wanted to see an american thanksgiving, so we're having thanksgiving today with a bunch of friends 20:14
we'll have like 25 people there i think
masak that must feel slightly odd.
it's so season-bound, I mean.
thou not typical for a 4th of july get-together, but it'll be fun!
yeah
it's too hot to be cooking so much inside :-)
it'll definitely have a different feel somewhat, since we're going to be drinking beer outside on the porch and enjoying the fireworks later in the evening 20:15
but, it'll be american all around, i guess
Util If I say `my $j = 1|2|3;`, how can I later remove the 2 from the junction, making it just 1|3 ? 20:17
moritz Util: you don't
Util: if you want that, you're abusing junctions as sets 20:18
or glorified lists
(I mean theere are ways, but they are very hacky)
Util moritz: point taken. Thanks!
masak recomments Set 20:19
recommends*, gah
moritz rakudo: sub f($x) { $x == 2 ?? 3 !! $x }; say f(1|2|3).perl
p6eval rakudo 72d158: OUTPUT«any(1, 3)␤»
BooK masak: pong
masak BooK: fairly short afterwards, I realized there's something wrong with gist.github.com/1045125
BooK: the level-4 call should yield 15 nodes, not 11. 20:20
but I don't know what's wrong yet. the code looks OK :/
BooK oh
masak just thought I'd let you know. it's probably something trivial, not a show-stopper.
Util rakudo: sub f { $^x if $^x != 2 }; say f(1|2|3).perl 20:22
p6eval rakudo 72d158: OUTPUT«any(1, 3)␤»
masak rakudo: sub separate-out($e, $j) { $j if $j != $e }; say separate-out(2, 1|2|3).perl 20:23
p6eval rakudo 72d158: OUTPUT«any(1, 3)␤»
20:23 perlin joined
moritz still, if you use junctions for anything but simple matchers, you are doing it RONG 20:24
20:24 bitpart joined
Util rakudo: my $j = 1|2|3; my $k = map { $_ if $_ != 2 }, $j; $k.perl.say; 20:24
p6eval rakudo 72d158: OUTPUT«any(1, 3)␤»
moritz people read about junctions, get all excited, and decide to use them for solving equations and other fancy stuff
and then run into limitations
masak I have a built-in aversion for junctions escaping from subroutines. I tend to add a '?' or a 'so' just so it doesn't leak junctions. 20:25
(when it generates one, that is)
Util moritz: Yes, I had already changed my code to not use junctions; I was just following up on my "note to self".
arnsholt moritz: "Some people, when confronted with a problem, think 20:26
moritz masak: yes, that's sane-ish
arnsholt: :-)
arnsholt “I know, I'll use junctions.” Now they have two problems."
With apologies to jmz
=) 20:27
tadzik now they have all() problems :(
arnsholt =D
Or any() problem
Util none() :^)
moritz colomon: now that we don't test the trig functions with all the bases, shouldn't we try to make them much more simple again? 20:28
tadzik I've got 99 problems, but Junctions aren't one()
soh_cah_toa what does the "is export" attribute do when applied to subroutines/methods? 20:30
colomon told me at yapc but i forget. i know it's supposed to replace the Exporter module or something
Util FYI, was for rosettacode.org/wiki/Dinesman's_mul...lem#Perl_6
tadzik soh_cah_toa: they are imported into the namespace when you use a module
moritz soh_cah_toa: on a subroutine it means that somebody who 'use's this module can import the sub 20:31
soh_cah_toa oh, so you don't need `our @EXPORT = qw/foo bar baz/`
moritz soh_cah_toa: on a method it means that a subroutine is automatically generated from the method
soh_cah_toa: correct
tadzik soh_cah_toa: so after you use github.com/perlpilot/benchmark/blo...chmark.pm6 timethis() is available for you
soh_cah_toa tadzik: that's exactly what i'm looking at :) 20:32
masak small world :)
soh_cah_toa how would i achieve behavior similar to @EXPORT_OK?
masak soh_cah_toa: see S11 -- Exportation. 20:34
soh_cah_toa ok great
masak perlcabal.org/syn/S11.html#Exportation 20:35
Eevee 11:07 < masak> also, why do people have a tendency to speak up *after* they've stopped being excited about Perl 6?
^ I wrote a couple patches for rakudo years ago; but I didn't have a lot of spare time, and the whole ecosystem kept getting rewritten too fast for me to keep up
tadzik :) 20:36
masak well, there is that. 20:38
but this whole operation is like, Perl (5 and 6) fought hard to remain relevant in the changing IT world. it succeeded. now the only thing that needs doing is to convince the world that it succeeded. 20:39
20:43 PacoLinux left
Eevee part of what frustrates me (and prompted the blog post) is that perl 5+6 both seem to be trying to fix what "succeed" means rather than fix perl 20:44
pmichaud anyone have a cool name for a new version of PAST (to be bundled as part of NQP)?
masak pmichaud: 'PAST perfect'? :) 20:45
20:45 yunga joined
moritz no, but it reminds me of something I thought of while waking up tonight... 20:45
erm, yesterday night
phenny: tell sorear about a name idea for niecza: "FeP6" - like "Iron Perl 6", but with the symbol Fe for iron :-)
phenny moritz: I'll pass that on when sorear is around.
20:46 thou left
masak Eevee: I get angry when I hear that. Perl 6 is pretty nice. people here are implementing it. you're saying they're redefining "succeed". I don't like that. 20:46
pmichaud Eevee: I spend far more hours writing Perl 6 than I do writing about the meaning of "succeed" for it. 20:47
20:47 mj41 left
Eevee well that's great 20:47
I know work is being done, I don't mean to downplay that
pmichaud "both seem to be trying to fix what 'succeed' means rather than fix perl" definitely sounds like downplaying that. 20:48
fixing perl is hard. For both 5 and 6.
masak Eevee: you don't seem to be quite in control of what you're saying, then.
pmichaud you're frustrated by the fact that it's hard and that progress is slow in coming. We share that frustration.
Eevee perhaps not. please give me the benefit of the doubt for a moment; I have no interest in merely slandering perl 20:49
20:50 perlin left
masak and I have no interest in shouting at someone who seems to have generally good intentions, but is expressing them clumsily :) 20:50
pmichaud moritz: heh. I was thinking of naming a sub-branch of nqp as "nqp-au" ("gold")
soon we'll be fighting over element symbols. I call Promethium, for what it's worth. :-P 20:52
masak dibs on Molybdenum!
moritz claims Palladium and Platin 20:55
pmichaud I feel I should also point out that Perl 6 is being built as a disruptive technology. We plan to compete on attributes other than pure speed, at least initially. (My target is to be within 10x of Perl 5.)
masak when you say "perl 5+6 both seem to be trying to fix what "succeed" means rather than fix perl" and then "I know work is being done, I don't mean to downplay that", which version of you should I talk with?
pmichaud after all, Perl 5 is a lot slower than C, but that doesn't mean it isn't useful.
Also, I invite you to try comparing the speed of Rakudo against perl -e 'use Moose;' :-P 20:56
moritz use Moose; use MooseX::Declare;
masak and some other modules.
Eevee masak: not in all areas. but people on the outside wanting a "finished" perl 6 come to mind.
moritz yes, autobox;
pmichaud Do we have a "finished" perl 5? if so, what's all the fuss? ;-) 20:57
masak Eevee: I want a finished Perl 6 too, to the extend that makes sense.
extent*
Eevee pmichaud: see, that's technically correct, but doesn't really address what those people *want* :P
masak Eevee: there's no difference between people on the inside and people on the outside in that regard.
we just happen to both want it and build it :)
moritz builds it because he wants it, and because building it is fun 20:58
pmichaud People want a Perl 6 that they can feel comfortable will solve the same set of problems (even more) that Perl 5 can currently solve. It's taken Perl 5 a long time to get to where it is now, and it had a bigger head start than we did (it could build on top of Perl 4. We've rewritten from scratch.)
20:58 colomon left
masak pmichaud: that's what I said at YAPC::Russia, only better expressed. 20:59
pmichaud++
pmichaud you expressed it better? what was your version? ;-)
masak no no, :)
I liked your version better.
Eevee masak: but for quite some time, such people were told "perl 6 is a spec, not a compiler" or "rakudo is working right now". and those are true, and I sympathize with them from an engineering view. but it sounds like brushing off the question
there is rakudo star now, though it still gives a bit of an impression of a blessed nightly 21:00
pmichaud and when people say "you've had 10 years", yes, that's true, but we lost the first four years discovering that Perl 5 wasn't powerful enough to write Perl 6.
masak I said something like "Perl 5 was 13 years old when Perl 6 got going, and people had expectations from the get-go that it would be *better* than Perl 6, and at once. It doesn't quite work like that."
pmichaud (and I've only been on the project for about 6 years, with forced extended absences every year or so)
masak Eevee: we say those things not to evade facing failure, but because they're true. 21:01
Eevee: if you have any concrete problems with Rakudo Star, please report them to us.
if it's just "a bit of an impression", then I'm sorry, that's basically your problem. 21:02
dalek kudo/nom: f131a60 | moritz++ | src/core/Numeric.pm:
sin, cos, tan as functions
pmichaud afk, hacking 21:03
masak how can you hack away from the keyboard? :P
pmichaud (yes, that's correct. I'm hacking away from my keyboard :-)
I found this cool new technology based on papyrus. 21:04
masak doing design? that's cheating!
pmichaud that and a non-electric "stylus" means I can do some pretty good design and coding. :)
masak yeah, but how do you commit? huh, huh?
Eevee masak: that doesn't seem very productive. isn't it perl 6's problem if people aren't getting the impression that they should use perl 6?
pmichaud usually by tossing some of the papyrus into the "waste bin" 21:05
Eevee: sure. and we're working on that. We're taking the key pain point ("speed") and fixing that.
masak Eevee: not if they can't express clearly why they're having that impression. we can only address concrete things, one at a time. not ghosts.
Eevee unfortunately ghosts are the heart of marketing 21:06
pmichaud Our target isn't to be as fast as Perl 5. Our target is to be fast enough that it's not painful for the folks whose problems map well into Perl 6.
Eevee (and I hate marketing)
21:06 am0c left
masak if someone comes here and says "it doesn't feel too good", then we're at a loss how to fix it. and the problem remains squarely at the customer. 21:06
Eevee that is true
masak that's what you described.
pmichaud really afk now
Eevee but explaining to the customer that their feeling is invalid doesn't make the feeling go away 21:07
masak no, and I didn't say that.
you're very welcome to explain your impression to us in concrete terms.
measurable, verifiable stuff. 21:08
we have an RT full of 800 of those. and thousands of fixed ones.
that's how progress is carried out.
moritz evalbot rebuild nom 21:10
p6eval OK (started asyncronously)
Eevee that's how you build a good product, yes. it's not the entire story of how you build a /popular/ product. 21:11
the most common and obvious question for an outsider is "when will there be a 1.0?"
masak aye.
moritz the best way to overcome that is to build cool stuff with Perl 6, and talk about it 21:12
Eevee but the responses are usually about why 1.0 isn't a thing to expect. even if perfectly rational and correct, that still gives off an air of "your problem doesn't matter"
frettled Eevee: Have you ever noticed how version numbers are used in marketing to give false impressions regarding the 1.0-ness of products? 21:13
Eevee: And how does it feel to you that nobody's lying about Perl 6 in that regard, as opposed to most other products? :)
Eevee oh, yes, I know. instantbird just jumped from 0.2 to 1.0 because windows users kept asking when it would be "stable"
it doesn't really need to be called 1.0 :P
frettled Word 2.0 -> 6.0 21:14
Emacs 0.xx.yy to Emacs xx.yy
21:14 Mowah left
frettled GCC anything 21:14
(and IMNSHO, Microsoft anything)
masak people make snap judgments based on version. news at 11.
Eevee I suspect the disconnect here is that the spec was written in its entirety first (and keeps evolving). so the implication of a "1.0" is "the entire spec works", which is unreasonable to expect in the short term.
frettled Eevee: it's so unreasonble that even after forty years, give or take, there _still_ isn't one for the current version of C. 21:15
Eevee well, "the entire spec works if you squint a bit".
frettled How's that for horribleness in versioning, when people DARE to call their compilers version somethingorother than 0.xx.yy alpha/gamma :)
moritz nom: say -6.0649708e0
p6eval nom: OUTPUT«-6.649708␤»
frettled Eevee: more than just a little bit :)
masak Eevee: do you have an impression of how much of the spec Rakudo implements? which version number does that correspond to, would you say?
moritz somehow that loses a 0 in there :/ 21:16
frettled moritz: that's interesting
Eevee so outsiders have the impression that they're waiting for a fully-compliant release. implementors (rightly) think that's silly and just want to go from rakudo to a better rakudo
masak nom: say -6.0064e0
p6eval nom: OUTPUT«-6.64␤»
frettled moritz: are the digits before and after the decimal perhaps represented separately?
moritz nom: say 6.06
masak moritz: not just one.
p6eval nom: OUTPUT«6.6␤»
moritz oh, I know why
Eevee neither understands the other, so outsiders think insiders are stuffy and slow, and insiders think outsiders are impatient and demanding
moritz and I'm to blame
a93020488f079cb77a27bb5a416e8271119eba58 is the problem 21:17
Eevee conjecturing wildly here but blogs on both sides seem to support this
masak moritz-- # we have your karma. fix bug to get it back !:)
moritz it discards leading zeros
masak: I will, but not tonight
masak :)
Eevee: there will always be an inside and an outside like that. nothing will change that. 21:18
frettled Eevee: What's special about the entire Perl 6 discussion, is that there IS a discussion about the 1.0-ness at all. I cannot recall having seen anything quite like it before, it's mind-boggling.
Eevee masak: and I was getting to: I actually have *no* idea how much of the spec rakudo implements. the spec is used as a direction, not a goal, but target users don't see it that way.
frettled: how many languages are specified before they're implemented?
frettled Eevee: I am, for instance, not using any Perl 6 implementation in a production environment, because it currently is a combination of a bit too much effort and a bit too cumbersome. Sort of like how I feel about Python and Ruby…
Eevee: it's pretty unusual, that, too. 21:19
Eevee: but C is a fairly good example
Eevee masak: so maybe it would help considerably to (a) carve the spec into several reasonable milestones, (b) use them as actual targets for actual blessed releases, and (c) actually keep track, somewhere, of what rakudo *does* at the moment
I can go find all manner of charts of what web browsers implement what parts of which specs 21:20
what does rakudo do? how do I find out? rakudo.org is just a blog
frettled Eevee: ooh, good example, if you ignore that HTML and CSS aren't programming languages, HTML and CSS are in the same situation.
Eevee right, but they're still languages with specs that do things.
TimToady that chart is mostly represented by annotations in the .t files
masak Eevee: you should check out ROADMAP in the Rakudo repo. it's basically what you describe.
Eevee also, the W3C doesn't consider a spec final until there are two reference implementations that mostly work 21:21
or something like that
frettled Eevee: yes, mostly annoy us programmers when we discover that Internet Explorer, Chrome/Safari, Firefox and Opera handle it differently.
masak we don't either :P
Eevee make this thing: www.webdevout.net/browser-support
for the perl 6 spec
complete with the pretty colors. they are important.
moritz Eevee: if you want to contribute, that would be a great start 21:22
masak I'd help.
21:22 Vlavv left
masak I've been wanting to make one like that for a while now. 21:22
Eevee haha, should've seen that coming. maybe
TimToady or something like the old smoke test chart, with multiple columns
moritz if I have to decide between spending my time on hacking the compiler, and compiling such a chart, currently I know that hacking the compiler is much more benefitial
frettled Eevee: something like that would be very nice, if it was up-to-date, but as you see, that document is largely useless because it's static and way out-of-date :) 21:23
TimToady: ooh, yes, good idea.
Eevee the classic documentation problem, yes.
I have to run, but bbs
TimToady Eevee: we don't mean "patches welcome" in the sense of "shutup"
we really mean it only in the sense that the person who is passionate usually does the best job
frettled Eevee: with Perl 6 test-driven implementations, that can almost be fully automated ;) 21:24
Running the spectests isn't slow enough to hinder daily runs for every major Perl 6 implementation, either. Hmmm. 21:25
TimToady so we should also set up a benchmark matrix where green is "faster than P5", yellow is "within 10x of P5", and red is, "well, not so much..." 21:28
frettled Faster than which P5? ;) 21:29
21:29 s1n left
TimToady well, there is that 21:29
there's also, running which algorithm? 21:30
masak ...on which platform?...
frettled I find that it's harder getting an upgraded Perl 5 than just installing Perl 6 in parallel, because the system impact is lesser from the latter solution.
TimToady using which emulation of P6 objects :)
frettled So at $orkplace, we're stuck with a mix of 5.8.x, 5.10.0(!) and 5.10.1.
moritz frettled: perlbrew somewhat eases that pain
frettled the latter comes from Debian squeeze, mostly.
TimToady: yup 21:31
For instances where Perl 5 just doesn't do the same thing, we could of course hold coding contests to come up with better solutions.
TimToady when we can run P6 native objects faster than P5 native objects, we'll have something :)
frettled That ought to be popular: «here's something Perl 6 does faster and better than Perl 5, with the following implementation – _contribute a better solution_» 21:32
masak std: -.5
p6eval std 37a0cdd: OUTPUT«ok 00:01 118m␤»
masak std: .5
p6eval std 37a0cdd: OUTPUT«ok 00:01 118m␤»
TimToady no problem there
std: 5.
p6eval std 37a0cdd: OUTPUT«===SORRY!===␤Decimal point must be followed by digit at /tmp/77HxsuWKqU line 1:␤------> 5.⏏<EOL>␤Unsupported use of . to concatenate strings; in Perl 6 please use ~ at /tmp/77HxsuWKqU line 1 (EOF):␤------> 5.⏏<EOL>…
masak oh! that's what doesn't work.
gotcha.
frettled moritz: well, yes, but only somewhat :-/
moritz rakudo: 5.
p6eval rakudo 72d158: OUTPUT«===SORRY!===␤Confused at line 22, near "5."␤»
moritz LTA error 21:33
masak lol, rakudo u so confusd
TimToady though I think we might relax that one eventually
masak submits rakudobug
frettled nom: 5.
p6eval nom: OUTPUT«Confused at line 1, near "5."␤current instr.: 'nqp;HLL;Grammar;panic' pc 23666 (src/stage2/gen/NQPHLL.pir:6372)␤»
masak TimToady: doesn't really seem worth it.
moritz otherwise we allow 5..sqrt 21:34
TimToady
.oO(the null method is really .Num, no, .Rat, no, .Int, uh...)
moritz ... unless we special-case that too
frettled nom: sqrt(5) 21:35
p6eval nom: OUTPUT«Could not find sub &sqrt␤current instr.: '_block1002' pc 75 ((file unknown):27188638) (:1)␤»
moritz nom: say 5.sqrt
p6eval nom: OUTPUT«2.23606797749979␤»
moritz frettled: LHF
frettled mm
21:35 Vlavv joined
moritz there's a lot of stuff in nom where somebody only added the method, not the sub form 21:35
this is one of them
21:36 bitpart left
TimToady we do not clearly have a policy that the foo() form should call the .foo form, and in fact I think arguably the foo() form should be considered more basic in many cases 21:37
if for no other reason than optimizability
moritz it's also a LHF to do that in nom :-) 21:38
in general it's easier to extend if the sub form calls the method form than the other way round 21:39
that way you don't have to lift around to make sure every exported multi follows the same path as the object does
in fact I thorougly dislike the fragility that lift introduces 21:40
slavik1 TimToady: will h2xs suffice in most situations for generating XS code? 21:41
dalek kudo/nom: 4d0dabf | moritz++ | src/core/Numeric.pm:
add sqrt function
TimToady slavik1: generally not 21:42
21:42 Psyche^ joined
TimToady unless it's gotten a lot smarter than it was at the beginning 21:42
slavik1 :( 21:43
21:43 Patterner left, Psyche^ is now known as Patterner 21:44 s1n joined
masak moritz: I'd sure like to hear more about that lift fragility. 21:44
moritz I probably have a patch for the rat issue
masak: if you pass around an object through multiple routines, and you call a method on it, you'll always get the same dispatch 21:45
masak: but if you call a sub with that object as an argument, you only get same multi candidates if every function along the call change lift()ed its caller's multis
masak right. 21:47
dalek ast: a15a50d | moritz++ | S32-trig/simple.t:
start a file with simplified trigt tests
moritz sadly I don't know any good solution for that problem either 21:48
moritz -> sleep 21:50
dalek kudo/nom: bf3eccf | moritz++ | src/Perl6/Actions.pm:
fix rationals with zeros after the decimal point
kudo/nom: e2a6299 | moritz++ | t/spectest.data:
run simplified trig tests
TimToady maybe instead of lifting everywhere we should just have a policy of reimporting whatever Foo imported when we say 'use Foo' 21:57
by default... 21:58
in a sense, we already have such a policy with the standard setting
21:58 yunga left
TimToady it would have to be something like a second-class import though, so you can import a different version that overrides, but then we get back to whether 'lift' is useful 22:01
I can see why it drives some folks to make their multiple dispatch tables global 22:02
pmichaud a lot of the sub forms are supposed to be handled by 'is export', IIRC. 22:03
some, not all.
i.e., method sqrt() is export { ... } 22:04
TimToady but it still comes down to the basic philosophical difference, is the meaning of "foo" defined by the current language, or by the one-and-only object in question
masak blog post! strangelyconsistent.org/blog/june-2...signatures 22:08
TimToady looking
lichtkind good night 22:09
pmichaud was the term "signature" introduced in a previous post?
i.e., would a newbie know what a signature is?
masak good point. 22:10
pmichaud specifically the line "We just adorn the signature with a type declaration:"
masak nod
22:10 lichtkind left
Krunch this feels like Haskell with a less readable syntax :) 22:11
masak agree about Haskell, disagree about less readable :)
managed to introduce the concept "signature". new version coming up. 22:13
mew version: strangelyconsistent.org/blog/june-2...signatures -- pmichaud++ 22:17
tadzik diff? :)
22:18 wamba left
pmichaud "We just adorn fib's parameter $n with a type parameter:" s/type parameter/type constraint/ maybe 22:18
masak ok, good.
or just "type".
pmichaud I prefer "constraint" explicitly there, because a lot of programmers expect it to be a coercion.
masak good point. 22:19
pmichaud but just "type" can work also.
22:19 [Coke] left
masak I'll go with "type", then. 22:19
22:20 Kivutarrr left
jdhore1 masak, hly SHIT 22:20
pmichaud in the part where you define /signature/, you might also give a more detailed description -- i.e., the signature identifies the parameter types for the subroutine
(it identifiers other stuff as well, of course :)
22:20 [Coke] joined
jdhore1 That's amazing that you can do variable checks in the signature 22:21
I want to have that in all the code i write
pmichaud Perl 6 is a cool language.
say Perl6 ~~ Cool # hmmm.
rakudo: say Perl6 ~~ Cool # hmmm.
p6eval rakudo 72d158: OUTPUT«Bool::False␤» 22:22
tadzik dang!
pmichaud we'll have to fix that.
jdhore1 :(
pmichaud :-)
tadzik rakudo: say not so Cool
p6eval rakudo 72d158: OUTPUT«Bool::True␤»
masak jdhore1: glad you like it :) 22:23
pmichaud: good idea. I'll add a sentence or two about that.
rakudo: so not Cool 22:25
p6eval rakudo 72d158: ( no output )
masak rakudo: say so not Cool
p6eval rakudo 72d158: OUTPUT«Bool::True␤»
tadzik rakudo: say not Cool 22:26
p6eval rakudo 72d158: OUTPUT«Bool::True␤»
masak rakudo: say so Cool.new
p6eval rakudo 72d158: OUTPUT«Bool::True␤»
masak Cool should really be an abstract class :)
benabik Isn't Cool a role? 22:28
masak nope.
we've introduced the concept of using roles for code reuse, but we don't quite believe in it yet :P 22:29
tadzik I don't think you can reuse Cool 22:30
masak 'night, #perl6
tadzik 'night masak
22:30 masak left
TimToady that's why it's important to have punning, so we can always make it into a Cool role that puns a class 22:30
22:33 Moukeddar joined
jnthn morning, #perl6 22:35
tadzik oh, jnthn
dang, just when I get asleep
TimToady o/ 22:36
how's Monday so far?
22:36 Moukeddar_ joined
tadzik sleepy 22:37
jnthn: is there any living example of using the SerializationContext?
22:38 Moukeddar left
jnthn TimToady: Good weather, but stomach aches. 22:38
tadzik: Er, most of Actions.pm? :)
tadzik really? 22:39
like, where? :)
I can't see the forest, the trees are in the way
jnthn tadzik: Anywhere that does $*ST.add_constant, or $*ST.create_parameter, or $*ST.create_code_object 22:40
tadzik: add_constant is probably most interesting for you.
tadzik oh, so it's strongly tied to the SymbolTable
jnthn tadzik: Yes
tadzik: Note that SymbolTable inherits from HLL::SerializationContext 22:41
tadzik oh, hold on
so I add a constant after constant, the primitives, and then add object which refer to those constants?
jnthn tadzik: Correct 22:42
tadzik stuff clarifies
jnthn tadzik: I expect you'll be adding a bunch of strings.
tadzik yeah, this all ends up as a bunch of strings
jnthn Well, a bunch of strings and AST nods, no?
POD AST nodes, I mean
tadzik so I'll need to come up with some identifiers for those?
jnthn POD::Block and so on
22:42 daveshawley joined
tadzik well, yes, but it all gets down to strings at some point 22:43
jnthn For now I suggest put them in the setting
tadzik they are
jnthn oh, yes.
:)
OK
tadzik a bit hacky, but yeah, it's there
22:43 daveshawley left
tadzik see github.com/rakudo/rakudo/commit/103b37b 22:43
jnthn You can do a lookup of something in the setting with $*ST.find_symbol['POD', 'Block'])
tadzik after I understand all this, I'll take all this shiny Pod and document all the SymbolTable and stuff 22:44
dalek kudo/nom: dcf30ef | jonathan++ | src/Perl6/ (2 files):
Assorted fixes to placeholder parameters.
kudo/nom: dcdd4b7 | jonathan++ | t/spectest.data:
Two more passing test files (placeholder related).
tadzik or I can do it now, and see if I actually understand this stuff 22:45
jnthn :) 22:47
tadzik now that I look at it, the code is a pretty good read too 22:48
jnthn: what is a "slot", used in the SerializationContextBuilder comments? What does this term represent? 22:50
slavik1 TimToady: what is your thought on calling haskel functions from perl? viable design?
jnthn tadzik: If you imagine the SC as like an array of objects, a slot is just an element in that array 22:51
tadzik okay. method add_object() is another thing I need, right?
jnthn tadzik: That puts an objct into the next slot along 22:53
22:53 wolfman2000 left
jnthn tadzik: It's a bit like a push, but it does a little bit more than that 22:53
TimToady slavik1: pugs demonstrates that it is possible, at least 22:54
if only by implementing a Perl 6 interpreter in Haskell
tadzik # Generates a series of PAST operations that will build this context if it doesn't exist, and fix it up if it already does
slavik1 TimToady: I found out that ghc (pugs is based on ghc) can compile to .so
tadzik that looks good
slavik1 TimToady: I was actually thinking of perl5, but perl6 is an obvious thought from that :)
tadzik oh, that's for the context, one and only 22:55
jnthn: suppose I add some new Pod::Block using add_object, how does sc know where do the object attributes live, and how to refer to them? 22:56
23:00 Moukeddar_ left 23:05 wolfman2000 joined
jnthn tadzik: You'd have to tell it 23:17
tadzik: What do your constructors look like?
tadzik jnthn: like the default .new methods. Pod::Block::Named.new(name => 'foobar', content => @children); 23:18
jnthn tadzik: OK.
tadzik: I think we can extend the $*ST.add_constant thingy that moritz++ did recently 23:19
tadzik: But teach it how to do named parameters too
tadzik: Then you have a really easy time :)
tadzik jnthn: I can do that. Let me have some hard time too :)
jnthn: but how is add_constant connected with named parameters to the constructor? 23:20
23:20 dolmen left
tadzik I'll add a type object and then a code block constructing something? 23:20
23:20 drbean joined
jnthn tadzik: see around here in add-constant: 23:21
elsif $primitive eq 'type_new' {
Lines in that elsif
If you extend that to support nameds too, then you've mostly got what you need :)
23:21 chhet joined
tadzik oh 23:21
jnthn tadzik: class Pod__Item is Pod__Block { 23:22
Why the cheating? :)
tadzik try to make it run w/o cheating :P
jnthn Also it should be my
tadzik funny stuff
something connected with stacktraces
jnthn my package Pod {
class Block { ... }
tadzik won't that conflict with the Block type/ 23:23
jnthn class Item is Block { ... }
}
tadzik it did when I tried
jnthn no, becuase it's a nested package.
tadzik let me try this again
jnthn It *should* be OK
If not, something is busted.
tadzik I'll try to bust it 23:24
yeah, Illegal redeclaration of class 'Block' at line 2898, 23:27
wklej.org/id/556873/ the code
jnthn tadzik: OK, can you add to nommap? 23:28
I'll look at it.
tadzik jnthn: sure 23:29
23:31 orafu left 23:32 chhet left
dalek kudo/nom: 62204fe | tadzik++ | NOMMAP.markdown:
Update NOMMAP with the Block in a package case
23:32
23:33 orafu joined
jnthn tadzik: thanks 23:34
tadzik no problem. I'm trying to get my head around this add_constant thingy :) 23:35
jnthn: how are named parameters treated in a callmethod PAST? 23:38
any examples on that?
jnthn tadzik: See in pkg_add_attribute the handling of %obj_args 23:39
tadzik thanks
offby1 I've written an ultra-simple class class X { has $.x ; } 23:41
how do I tell perl that two instances of it are equal when their members $.x are equal?
I assume there's a "magic" method I need to write
tadzik offby1: equal as in ==? 23:43
23:43 molaf_ joined
offby1 actually, eqv 23:43
since the member is gonna be a hash
rakudo: class X { has $.x ; }
p6eval rakudo 72d158: ( no output )
offby1 rakudo: my $x = X.new(x => {a=>1}); 23:44
p6eval rakudo 72d158: OUTPUT«Could not find sub &X␤ in main program body at line 22:/tmp/6BocpLPRRF␤»
offby1 oops
hmm
does each interaction with p6eval start with a clean slate?
rakudo: class X { has $.x ; }; my $x = X.new(x => {a=>1}); my $y = X.new(x => {a=>1}); say $x == $y; 23:45
p6eval rakudo 72d158: OUTPUT«Cannot take numeric value for object of type X␤ in 'Any::Numeric' at line 1496:src/gen/core.pm␤ in 'infix:<==>' at line 1:src/gen/core.pm␤ in main program body at line 22:/tmp/j3DEjzAMnW␤»
offby1 rakudo: class X { has $.x ; }; my $x = X.new(x => {a=>1}); my $y = X.new(x => {a=>1}); say $x eqv $y;
p6eval rakudo 72d158: OUTPUT«Bool::False␤»
offby1 basically: what do I need to do to make that come out True?
I'm guessing I need to add a method to X that tells one instance how to compare itself to another instance.
tadzik rakudo: class X { has $.x }; multi sub eqv(X $a, X $b) { $a.x eqv $b.x }; my $x = X.new(5); my $y = X.new(5); my $z = X.new(7); say $x eqv $y; say $x eqv $z; 23:46
p6eval rakudo 72d158: OUTPUT«Bool::False␤Bool::False␤»
tadzik dang
oh, wait
offby1 ... but I like where you're going :)
tadzik rakudo: class X { has $.x }; multi sub infix:<eqv>(X $a, X $b) { $a.x eqv $b.x }; my $x = X.new(5); my $y = X.new(5); my $z = X.new(7); say $x eqv $y; say $x eqv $z;
p6eval rakudo 72d158: OUTPUT«Bool::True␤Bool::True␤»
23:46 molaf left
offby1 wouldn't sub eqv need to be infix? 23:46
ha, jinx
tadzik still broken, but differently :P
offby1 very Paul Graham-y
jnthn tadzik: our multi sub...in master. 23:47
tadzik rakudo: class X { has $.x }; our multi sub infix:<eqv>(X $a, X $b) { $a.x eqv $b.x }; my $x = X.new(5); my $y = X.new(5); my $z = X.new(7); say $x eqv $y; say $x eqv $z;
p6eval rakudo 72d158: OUTPUT«Bool::True␤Bool::True␤»
tadzik no difference
offby1 curious
that approach seemed so promising! :)
tadzik rakudo: say 5 eqv 7
p6eval rakudo 72d158: OUTPUT«Bool::False␤» 23:48
tadzik just checkin'
offby1 :)
tadzik rakudo: class X { has $.x }; our multi sub infix:<eqv>(X $a, X $b) { $a.x == $b.x }; my $x = X.new(5); my $y = X.new(5); my $z = X.new(7); say $x eqv $y; say $x eqv $z;
p6eval rakudo 72d158: OUTPUT«Use of uninitialized value in numeric context in 'Any::Numeric' at line 1498:src/gen/core.pm␤Use of uninitialized value in numeric context in 'Any::Numeric' at line 1498:src/gen/core.pm␤Bool::True␤Use of uninitialized value in numeric context in 'Any::Numeric' a…
tadzik bah
offby1 heh, I'm a trouble-maker
tadzik no, that's interesting :) 23:49
jnthn tadzik: X.new(x => 5)
tadzik oh, sure 23:50
offby1 oh
tadzik jnthn: see? My brain now denies the named params!
until I fix those :P
offby1 so where did that bare 5 go? Was it just ignored?
23:50 dorlamm joined
jnthn breakfast & 23:50
tadzik I'm curious too
23:53 bluescreen10 joined 23:56 zby_home left
offby1 ix.io/1LY The first test passes; the second fails. I assume that's because the Test module is calling a sort of "global" eqv, and not my paste-me::eqv. So: how can I make my new "eqv" be accessible to the outside world, without needing qualification? 23:56
(also, I'd be happy for critiques on idiomaticness) 23:57
({if that's a word})
23:57 f00li5h is now known as felineiron
offby1 I seem to recall there's a built-in Bag type, which I'd use if I knew how :) 23:57
23:58 [Coke] left
tadzik Bag is only in spec so far :) 23:58
you could use just method empty { $!letters.empty } 23:59
23:59 bluescreen100 joined
lue phenny: tell masak in your 26 June post, the last two code examples are missing a ) on the last line. 23:59
phenny lue: I'll pass that on when masak is around.