»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by moritz_ on 1 September 2010.
00:04 justatheory left
[Coke] ~ 00:05
00:08 justatheory joined 00:09 pjcj joined 00:16 svetlins joined 00:19 svetlins left, svetlins joined 00:22 svetlins left, svetlins joined 00:25 araujo left, svetlins left 00:26 svetlins joined 00:29 svetlins left, svetlins joined, alksentrs joined 00:31 KyleHa joined, svetlins left
KyleHa Hello #perl6! 00:31
00:32 svetlins joined
lue hello o/ 00:37
00:37 svetlins left
KyleHa I see write access to the new Git repos that have been spawned from the old pugs repo. 00:38
s/see/seek/
00:38 svetlins joined
TimToady have you a github account? 00:39
KyleHa Yes. It is called 'kyleha'. 00:40
TimToady now I just have to figger out how to do it...
KyleHa If I knew, I'd help. :) 00:41
From here, there may be an 'Admin' button up near Watch and Fork: github.com/perl6/specs 00:42
TimToady there's a switch context button
I believe I've done it 00:43
00:43 masak joined
KyleHa Yes! 00:43
masak hi, #perl6! 00:44
phenny masak: 04 Sep 14:18Z <isBEKaml> tell masak yapsi fails on recent version of rakudo though it works on older 2010.07 and .08 versions. -->bin/yapsi -e 'say 42'
KyleHa Thanks, TimToady!
masak isBEKaml: thanks. will investigate.
00:44 colomon joined
masak moritz_++ # Pugs repository move 00:45
KyleHa moritz_++ # Agreed 00:46
masak Juerd++ # feather
colomon Juerd++ moritz_++
phenny colomon: 04 Sep 19:31Z <smash> tell colomon gil.di.uminho.pt/users/smash/rakudo-bench.html updated with new test scripts
colomon phenny: tell smash Yay! And I just added another....
phenny colomon: I'll pass that on when smash is around.
lue why is the spectest repo called roast? [I expect some witty backronym here :)] 00:47
TimToady repo of all spec tests is only the first 00:48
KyleHa The announcement I saw called it 'spectests', so I was confused for a minute or two. 00:49
00:49 whiteknight joined
TimToady yes, but we've been speculating all day about a real name, both before and after that 00:50
masak likes 'roast'
TimToady and I decided it was better to rename it before everyone starts programming to the old name 00:51
masak it's close to other test-related words, such as 'smoke'.
TimToady Really Obnoxious Anti-Subset Test 00:52
lue Refurbished Official Assimilation of Standard Tests
KyleHa What's wrong with the old name? 00:53
TimToady not tab friendly with specs
Getty then you could call it "Borg" ;)
KyleHa Can't argue with that.
00:54 Psyche^ joined
TimToady and I tend to cd to directores by unique substrings 00:54
lue
.oO(I guess I'll give in to putting all my module code in a subfolder for now)
TimToady which is hard when one name is (nearly) a substring of the other
00:55 Patterner left
TimToady and I thought it was high time to give the validation suite a (slightly) more official proper name 00:55
00:55 Psyche^ is now known as Patterner
masak wow. interesting flood of newcomers earlier today. 00:56
lue
.oO(you could've named it 'Repository of Tests' (RT) if you wanted to make a joke)
masak lue: that'd be "RoT", would it not? :) 00:57
TimToady and roast isn't a joke?
afk & 00:59
masak heating things so that they get a crispy surface is serious business, no joking.
at some point I will write a blog article about the inverse correlation between how long people remain on this channel, and the extent of their lack of grasp of English. 01:01
KyleHa I was thinking en.wikipedia.org/wiki/Roast_(comedy) 01:02
masak the underlying reasons probably aren't very funny. it's taxing to be on the channel without extensive English language skills. and not much to be done about that, except try to accomodate people.
lue I do notice that you don't get a lot of bad english here. Maybe it's time for one or two #perl6-[language code] channels? 01:04
rakudo: my $a = 3 #= hello␤ say "I'm alive" 01:05
p6eval rakudo ff5b4c: OUTPUT«===SORRY!===␤Whitespace character is not allowed as a delimiter at line 22, near " hello\n sa"␤» 01:06
lue methinks that's a bug.
masak lue: it's the ' ' after the '#='
01:06 meppl joined
masak std: #= hello 01:07
p6eval std 32123: OUTPUT«ok 00:01 113m␤»
masak I think that one has been reported.
lue: it's not that everone here has perfect English. but people with very limited bandwidth due to insufficient grasp of English tend to be short-lived, or to stay away altogether. I can think of numerous examples. 01:08
s/short-lived/short-lived on the channel/ # :) 01:09
dalek kudo: c7f6f27 | kyleha++ | / (2 files):
spectests in git
01:10
lue
.oO(Half of me is a really lousy guy to talk to about problems here with English, considering I'm half American.)
masak: how is 'bandwith' and 'insufficient grasp of English' linked? 01:11
masak lue: for example: I can write in Chinese, but I can't do it as quickly as the ones on #perl-cn. nor can I read as quickly. 01:12
if I had a better grasp on Chinese, I'd be able to read and write faster.
01:12 risou joined
alksentrs Hello #perl6 01:17
masak alksentrs! \o/
lue hello alksentrs o/
alksentrs What does o/ actually mean?
masak it's a figure or a head and a waving arm. 01:18
s/or/of/
alksentrs "Hello"
masak or "Goodbye" :)
01:18 jhuni left
diakopte1 or a person swinging by one arm 01:19
alksentrs When I started reading the IRC logs, occasionally they were quite hard to follow (even though I'm a native English speaker)
diakopte1 join the club
masak heh 01:20
alksentrs The mixture of IRC terms, Perl guts and internet memes
"lexpad"
masak alksentrs: I think I felt like that for the first four or so years.
alksentrs: oh oh! I can explain "lexpad" to you! :)
alksentrs It's the symbol table
or something
masak aye.
alksentrs Is there a glossary? 01:21
masak alksentrs: my $a; my $b; { my $a } # how many lexpads do you count here?
alksentrs 2? (guess)
masak me too.
alksentrs: there's no glossary as far as I know. but the IRC logs sometimes underline words and give explanations.
alksentrs A Wiki page could be created 01:22
masak well volunteered!
and keeping it up-to-date will make sure you learn all the terms :)
alksentrs right... 01:23
masak :)
alksentrs I've written/writing a couple of Perl6 programs
masak great. how does it feel?
alksentrs fun
masak \o/ 01:24
alksentrs I'm writing a little interpreter for an esoteric language
diakopte1 and that's a person drowning in quicksand
masak diakopte1: you should get paid for explaining Internet lore.
diakopte1 hm 01:25
alksentrs I ran into an issue w.r.t. parsing C-style integer literals
Attempting to parse 0x0 would parse 0 as an integer, and then fail on the x0
token int { $<dec> = <digit>+ | $<hex> = [[0x|0X] <xdigit>+] }
diakopte1 wanders around github perl6.. then looks for some gui tool to use git 01:26
o_O TortoiseGit
masak alksentrs: try changing the order of those
diakopte1 masak: std: 4 ?? !! 4 01:27
masak token int { $<hex> = [[0x|0X] <xdigit>+] | $<dec> = <digit>+ }
alksentrs I thought order didn't matter with |
but did with ||
masak alksentrs: you're right, it doesn't.
alksentrs: but Rakudo doesn't have Real LTM yet.
Tene Yes, what masak said 01:29
alksentrs masak: It works! (I think)
masak wonders idly if we'll see an "always put longest token first" idiom emerge in Perl 6 code 01:30
(1) it enhances readability 01:31
(2) it works against implementations that don't have LTM
lue would I just use @*ARGS to get a filename from the commandline?
ingy need some naming help
masak phenny: tell isBEKaml negatory on the Yapsi fail. repeat, negatory on being able to reproduce bin/yapsi -e 'say 42' fail on recent Rakudo. over. 01:32
phenny masak: I'll pass that on when isBEKaml is around.
masak lue: that, or MAIN.
lue I think I'll have fun with @*ARGS though :) 01:33
alksentrs Question: If you've caught an exception, how do you print a backtrace? (I've managed to get either infinite looping or error message only) 01:34
masak alksentrs: try/CATCH is seriously b0rk. :(
alksentrs masak: Ah. Never mind. 01:35
masak rakudo: try { no-such-sub(42) }; say $!
p6eval rakudo ff5b4c: OUTPUT«Could not find sub &no-such-sub␤»
masak rakudo: try { no-such-sub(42) }; say $!.backtrace
p6eval rakudo ff5b4c: OUTPUT«Method 'backtrace' not found for invocant of class 'Perl6Exception'␤ in main program body at line 22:/tmp/wB7GnLlSjG␤»
masak submits rakudobug
ingy: go right ahead. 01:36
sorear hello #perl6
diakopte1 ahoi
masak hi sorear 01:37
sorear diakopte1: what's so suprising about 'niecza: say 3' 01:38
diakopte1 I didn't know you/moritz made it work on my vps
(yet) 01:39
01:39 alksentrs left 01:41 KyleHa left 01:45 risou left
sorear diakopte1: huh, I thought p6eval was running on moritz_'s personal equipment 01:45
diakopte1 sigh 01:46
masak has a weird mental image reading that
sorear attempts to resolve
lue can I change the error message that pops up with MAIN ? 01:47
masak rakudo: sub MAIN($foo) {}
p6eval rakudo ff5b4c: OUTPUT«Usage:␤/tmp/9eJ3nshzSH foo␤»
masak lue: that one?
lue yes. "Usage: \n -e '...' x y z" isn't optimal 01:48
01:49 araujo joined
masak rakudo: sub MAIN($foo) {}; sub MAIN_HELPER($retval, $MAIN?) { say "OH HAI" } 01:49
p6eval rakudo ff5b4c: OUTPUT«OH HAI␤»
masak lue: ^
lue :D 01:50
masak the answer was in src/core/MAIN.pm, found by doing "ack -Q 'Usage: ' src/" #teachamantofish 01:51
lue
.oO(too bad I could never get ack working on my remote server...)
01:52
masak grep would work just as well in this case.
lue I especially like the part where stray arguments get stuffed into remaining parameters 01:53
01:53 crythias left
sorear git-grep is better for rakudo anyway 01:55
and I think it comes with git
masak sorear++ # git grep 01:56
didn't know about that one.
lue rakudo: sub MAIN($foo) {}; sub USAGE($retval, $MAIN?) { say "OH HAI" } 01:58
p6eval rakudo ff5b4c: OUTPUT«Not enough positional parameters passed; got 0 but expected between 1 and 2␤ in 'USAGE' at line 22:/tmp/GGFB9WPtlP␤ in 'MAIN_HELPER' at line 6917:CORE.setting␤ in main program body at line 1:/tmp/GGFB9WPtlP␤» 01:59
lue rakudo: sub MAIN($foo) {}; sub USAGE { say "OH HAI" }
p6eval rakudo ff5b4c: OUTPUT«OH HAI␤»
masak oh, indeed.
USAGE, not USAGE_HELPER.
lue++
sorear hugme: show mu 02:02
hugme sorear: sorry, I don't know anything about 'mu'
sorear hugme: show nqp
hugme sorear: sorry, I don't know anything about 'nqp'
sorear hugme: show nqp-rx
hugme sorear: the following people have power over 'nqp-rx': P⁣erlJam, T⁣imToady, [⁣particle], c⁣olomon, j⁣nthn, m⁣asak, m⁣oritz_, p⁣michaud. URL: github.com/perl6/nqp-rx/
lue I love Perl 6! It's the only language I've seen with such impressive commandline argument handling. 02:03
diakopte1 THIS JUST IN: programmers flock to Perl 6... DEVELOPING... 02:04
tough crowd 02:06
masak diakopte1: ok, is that a meme or something? I saw "DEVELOPING" in you twitter feed as well.
s/you/your/
diakopte1 oh, just a variant of crythias' joke I retweeted, yeah :)
lue
.oO(No matter how many times I look at Go, I just can't seem to like it.)
02:07
masak I get it. it would be more funny if I had heard it before, though :)
lue: I think it looks OK. it would be fun to try to write an LTM grammar engine in it.
sorear lue: Perl has had built-in argument processing for ages and ages :) 02:09
tylercurtis Go has some annoyances (like the lack of a nice build system and the total lack of any capability of dynamic loading). 02:10
But it also is pretty nice in some ways.
02:10 jjore left
lue For one thing, there's no PPC compiler, so I can't even run a Go program :) 02:11
02:11 jjore joined
lue wonders if an OS in Perl 6 is possible (with a perl6 frontend for gcc of course) 02:11
02:12 Italian_Plumber joined 02:18 jhuni joined
sorear really? no ppc compiler? 02:19
I don't beleive that
lue Well, their gccgo program should. Their custom-built family of compilers doesn't. 02:22
sorear oh right
you like to ignore gccgo
lue [ like I'd expect them to take the time to build a compiler for PPC in the first place :) ] 02:26
ingy masak: got it all figured out. thx 02:28
masak \o/ 02:29
02:30 whiteknight left
lue gist.github.com/565675 typing perl6 file.p6 INPUTTEXT doesn't put INPUTTEXT in $input. I think it has something to do with giving $input a shortname. 02:30
masak lue: if you use named parameters, you have to specify named options on the command line. 02:31
lue alright. 02:32
02:48 azert0x left
lue How can I check if a module exists if I do something like eval("A::$name") ? Is there some cool trick, or would I have to live with try/catch ? 03:04
masak rakudo: module Exists {}; say eval("Exists").WHAT; say eval("DoesNotExist").WHAT 03:06
p6eval rakudo c7f6f2: OUTPUT«Method 'WHAT' not found for non-object␤ in main program body at line 22:/tmp/pLDHBKcHMz␤»
masak oh right.
rakudo: class Exists {}; say eval("Exists").WHAT; say eval("DoesNotExist").WHAT
p6eval rakudo c7f6f2: OUTPUT«Exists()␤Failure()␤»
masak rakudo: class Exists {}; say eval("Exists") !~~ Failure; say eval("DoesNotExist") !~~ Failure 03:07
p6eval rakudo c7f6f2: OUTPUT«1␤0␤»
masak rakudo: sub itExists($class) { eval($class) !~~ Failure }; class Exists {}; say .&itExists for <Exists DoesNotExist> 03:08
p6eval rakudo c7f6f2: OUTPUT«1␤0␤»
masak bbl & 03:10
03:10 masak left
lue arigato, masak-san 03:10
03:16 Italian_Plumber left 03:28 BillN1VUX joined 03:41 masak joined, meppel joined 03:42 jacob_applebaum joined 03:45 meppl left 03:50 BillN1VUX left 03:51 meppel is now known as meppl 03:53 vanadium joined 03:58 BillN1VUX joined 04:06 envi^home joined, Chillance_ left 04:09 meppl left 04:22 plobsing left 04:25 BillN1VUX left 04:26 BillN1VUX joined 04:28 Guest23195 joined 04:30 gfx joined
masak so, I was looking at samizdat.cc/cyoa/ -- which is a case of someone knowing how to create beautiful diagrams to show data. 04:32
04:32 BillN1VUX left
masak and I was thinking about how to do this more easily. 04:32
TimToady thinking is dangerous
masak can't help it. :)
and I just spent 15 minutes writing up the first diagram -- the one with all the pages in different colors -- in a yet-unwritten diagram DSL. 04:33
gist.github.com/565752
04:33 mfollett joined
masak I've cheated a bit with the colors of the different texts, just not to overcomplicate things. likely the margins and things like that are wrong, too. but the general structure is there, both of the diagram and of my DSL. 04:34
imagine having this tool. :)
04:35 BillN1VUX joined
masak basically, it's a way to map an object hierarchy onto the elements of an SVG file, not having to care too much about lengths and coordinates. 04:36
lue masak: I couldn't get the first link working. 04:37
Tene the samizdat page won't load for me :(
masak hm. me neither, now. 04:38
maybe we slashdotted it :/
Tene google has a cache of it, but that won't load either
as it's waiting for the cached page, according to my status bar? 04:39
shorl.com/trabrihyhibiko -- google cache
masak I'll make a screenshot for you.
04:39 ruiwk joined
TimToady when is the buf patch showing up, and does it do buf32? 04:40
masak it looks like this: masak.org/carl/cyoa-table.png
TimToady (have a rosettacode problem that could sure use it)
masak TimToady: sorry, are you expecting a buf patch from me? :/ 04:41
TimToady just thought you might know somethin' about it :) 04:43
masak could you be a bit more specific about what it is you expect showing up?
if it's the 'buf' type with a small-letter 'b', then you might have to wait a while :/
TimToady well, what I'd really like is compact arrays... 04:44
masak same here, along with a bit of S09 goodness...
TimToady that and oh about 30 other things
masak we're all at the mercy of the implementors, and their ability to push out features. 04:46
TimToady it's just a bit hard to debug the Hofstadter-Conway $10,000 sequence when it takes an hour of CPU to get to the segfault 04:48
masak that's why we need more performance. :)
lue [I'm guessing it's not this simple, but] for a module's Makefile, do you just need to put it in one of the locations in @*INC ? 04:49
Tene masak: Interesting sketch. 04:50
masak lue: you can put the Makefile anywhere you want.
lue: but it has to know where to find the files to make.
Tene: thanks. I think I will eventually build a module that does that. might be a while, though. 04:51
sorear TimToady: I have an optimizer, can I help?
lue aah, bad grammar on my part. $_ = the module 04:52
Tene masak: that kind of ties into the whole tree transformers, action methods, tree matching grammars, etc. area.
TimToady ooh, it got up to 2**16, maybe I've licked the segfault; needs to get up to 2**20
masak Tene: aye.
Tene: which is another reason it'd be fun to explore.
Tene: also, it'd be an opportunity to toy with a cusom metaclass. 04:53
Tene Yes.
TimToady the only way to get rid of the segfaults was to banish all range and series and for loops, and use loop () {...}
masak iterators are evil :)
TimToady looks like it's handling the array with a million entries this time
masak someone should do a one-week project in which a lot of different Perl 6 loops and series forms get compiled down to simple while loops and assignments in C. :) 04:54
lue
.oO(it's likely a bit more than putting modules in the first location in @*INC and the program in the right bin/ folder)
sorear masak: You look dangerously close to rewriting dot
masak sorear: I've toyed a bit with dot.
diakopte1 masak: you is up late
masak diakopte1: yes. :) 04:55
been shifting my waketimes all week. will soon fix them down again on something I like.
04:57 diakopter joined
masak sorear: IIUC, dot is exclusively for making graphs. my little language is more for laying out SVG objects in general. 04:57
that said, I've sometimes been wanting something very much like dot, too. 04:59
would proabbly be interesting to hook up inline dot to Perl 6 as well.
Tene graphviz is great. I've done a lot with graphviz. 05:00
masak: you'd really like search.cpan.org/~lbrocard/GraphViz-...z/Regex.pm if you haven't seen it before.
masak hasn't 05:01
Tene I have a little cgi that runs it up at: allalone.org/cgi-bin/regex-graph
masak oh, that one! yes, I've seen that.
acme++
sorear TimToady: Why is it that, after my @*foo; my int @*bar; ... @*foo[0] := @*foo[3] works, but @*bar[0] := @*bar[3] doesn't?
Tene I rendered something like that for STD.pm a year or two ago. 05:02
lue rakudo: class Foo {}; my $a = "Foo"; say eval($a) !~~ Failure 05:04
p6eval rakudo c7f6f2: OUTPUT«1␤»
lue however, replacing $a with "use A::B" results in eval($a) being a Failure. 05:05
TimToady sorear: are you speakin' of rakudo? 05:06
lue Is it some weird thing with eval() that's not letting "use A::B" work ?
05:08 Sec left
masak rakudo: class A::B {}; my $a = "A::B"; say eval($a) !~~ Failure 05:09
p6eval rakudo c7f6f2: OUTPUT«1␤»
masak lue: worksforme.
sorear lue: please read perlmod and perlsub
05:11 Trashlord left
lue what're perlmod and perlsub? 05:11
sorear perl 5 documentation
'man perlmod' on any Unix after installing Perl
otherwise see perldoc.perl.org 05:12
lue I remember from a distant conversation that eval() was the only way to use a module you didn't know the name of. Is that true?
sorear no, string require will also do the job
masak lue: perldoc.perl.org/perlmod.html perldoc.perl.org/perlsub.html 05:13
sorear also see S01:0027
despite its position, this paragraph is one of the most overlooked parts of the spec 05:14
diakopter :)
masak I know about it, but I don't give it much weight.
05:15 Trashlord joined
masak for example, S03 says nothing about how to negate strings. 05:15
diakopter hum, the S01.html#line_0027 anchor link doesn't seem to work
masak in Perl 5, -$str gives '-' . $str
I highly doubt that's the case in Perl 6.
sorear diakopter: does S01:27 work? 05:16
TimToady maybe we should add to that "...except for the places where Perl 5 is obviously completely bogus."
diakopter yup
masak TimToady: yeah, that'd make it less ambiguous :P
tylercurtis rakudo: say (-'12foo').perl;
p6eval rakudo c7f6f2: OUTPUT«-12␤»
diakopter I mean, sorear, yup
sorear If we allowed leading dashes in identifiers that rule wouldn't be needed 05:17
It exists, AFAICT, mostly to allow use Foo -option => 2; 05:18
which a few legacy modules *cough Tk* want
masak oh, that's why :/
sorear |("-foo" => 2) gets a little annoying after a while
lue perl(mod&sub) will tell me all I want to know, and more, right? 05:19
masak lue: when you ask such a question, what to you fashion the answer to be? :)
sorear lue: It will tell you everything about "use" but not much about "class"
ignore the stuff about Exporter, that's been replaced
lue I'm sorry. It's nighttime here, and I'm getting impatient, so I have this "I WANT AN ANSWER NOW!" attitude, which I'm trying to hide. [ Being told to read two fairly large documents to get an answer doesn't help :) ] 05:23
masak hugme: hug lue
hugme hugs lue
masak lue: catb.org/~esr/faqs/smart-questions.html :) 05:24
05:24 mfollett left
sorear lue: "I WANT AN ANSWER NOW" and "the use of modules in Perl 6 is not very Perl 6" are incompatible attitudes 05:25
masak did lue ever say the latter? 05:26
sorear 16:45 CDT 05:27
05:28 Trashlord left, Sec joined
sorear irclog.perlgeek.de/perl6/2010-09-04#i_2785572 05:28
masak ah, just found it.
lue I think today I've been trying to do too many things I shouldn't need to be doing :) 05:29
05:29 constant left 05:30 constant joined, constant left, constant joined
Tene lue: I'd still like to see a discussion on p6l about /.../Foo::Bar.pm 05:32
sorear I oppose it, fwiw 05:33
masak me too.
sorear for entirely pragmatic reasons
masak aye.
sorear @*INC searches are expensive
doing twice as many for aestetic reasons is untenable 05:34
masak if someone wants that, let them override the module loader.
sorear: twice as many? I count more. for each new path component, you have to check if the rest of the components exist in the colon form.
that's O($components)
sorear masak: Oh, I assumed it was all-or-nothing 05:35
Tene masak: it depends on exactly what you allow.
masak right.
sorear also Foo::Bar::Baz.pm is illegal on most filesystems, even classical Unix
lue I don't know what it is, I just can't seem to get a handle on modules :/
Tene I don't expect that just allowing :: to replace / in any module name is going to be the right answer, but I wouldn't be surprised if something good came out of a discussion that started there. 05:36
I also wouldn't be surprised if nothing of note came out of it, though. :)
masak lue: start simple. all 'use A::B' does is find A/B.pm6 for you.
Tene lue: what are you trying to do with modules that you can't do? 05:40
sorear lue's greatest problem and greatest virtue is that he doesn't take "you're doing it wrong" for an answer
05:43 cognominal joined 05:45 Trashlord joined 05:52 Trashlord left
masak I'm preparing for sending in my code patches for GSoC. it is with some pride I note how many non-Buf commits I've made to the spec during the summer. 05:57
sorear Pride? 05:58
TimToady you didn't know he was a lion? 05:59
masak is that not the word? the noun form of "proud"? :)
8 Buf-related commits to the spec, 8 other commits.
06:00 cognominal left, cognominal joined 06:01 Trashlord joined
moritz_ good morning 06:02
masak mo', mo'
Tene masak: yes, that's the right word. 06:03
lue good morn' moritz_ o/
dalek ecza: 3e8d824 | sorear++ | lib/Cursor.cs:
[nrx] use Take mechanism for extra cursor returns
06:05
ecza: ebb3662 | sorear++ | / (3 files):
[nrx] Expose basic nrx functionality to CgOp
06:06 Trashlord left 06:08 Trashlord joined
masak wow. I download *all* of perl6/roast, and it takes a fraction of the time it usually took to update t/spec :) 06:12
lue afk and goodnight o/ 06:14
masak 'night, lue
moritz_ is perl6/roast the new spectest suite? 06:15
TimToady ayup 06:16
many backronyms welcome
repo of all spec tests is the first 06:17
moritz_ really obsessive, always stupid tests
TimToady many puns also available
moritz_ Perl 6 - pun -driven development 06:18
TimToady really obnoxious anti-subset tests
masak repo official although somewhat turgid 06:19
TimToady ruby obviously ain't so trippin'
masak :D
hm, meant 'turbid'...
moritz_ sounds like frech word order (masak's "repo official")
masak moritz_: or just no verb. :) 06:20
TimToady rakudo only apes sincere truth
masak hey! :)
06:20 f00li5h joined
masak I mean, ook ook! 06:21
TimToady carpe diem: only one complaint per day
masak ETOOFEWDAYS
samizdat.cc/cyoa/ is back up! 06:22
06:22 f00li5h left, f00li5h joined
TimToady roast only almost seems terrific 06:23
masak moritz_: I made a sketch for a DSL this morning: gist.github.com/565752 is a recipe for the first diagram (third image) on samizdat.cc/cyoa/ -- maybe you have some views on such a DSL.
TimToady rapid online answers seem trite 06:24
cognominal really only another stupid testsuite 06:25
TimToady reliable official assertions sometime tomorrow
masak ropes of all sizes, together 06:26
TimToady replicable ontology and sure thing
rants over any stupid task 06:27
masak :)
06:27 gfx left
TimToady I think roast will do. :) 06:28
most importantly, it starts with a different letter
masak respect others' answers, so tough 06:29
TimToady test harness could be renamed "rotisserie" or some such
sorear roast: it's what make spectest does to CPUs
masak ooh! and some people may have noticed how I cheated and didn't include the 'pages' thing on the left in gist.github.com/565752 -- I skipped it because it was too hard to do declaratively. I now realize the positioning of those should be done with action methods! \o/ 06:31
and perhaps inline code blocks is a non-bad idea too.
06:33 ruiwk left
mathw o/ 06:37
masak \o
could an &exists sub be written in pure Perl 6? it can't, right? because at the point the arguemnt is sent in, it has already evaluated to the hash value (which may or may not exist), and the info on the key is gone. 06:41
moritz_ one could try to introspect the returned value for a WHENCE closure that points to a hash... no idea if that works 06:42
masak up until a few moments ago, I've been wanting &exists just as it is in Perl 5. but now that I realize how magical it is, I might appreciate more the need for other solutions. 06:43
still don't like adverbs very much, though.
06:44 f00li5h left
masak if you ask me, 'if %my-hash-with-a-long-name<and>[100]<long><key><accesses> :exists' is end-weighted in a bad way. 06:44
diakopter starts yet another rerererererererererererewrite 06:45
masak compare 'if exists %my-hash-...'
TimToady point of the :exists/:deletes adverb is it highjacks subscript notation for, say, multidimensional subscripts
masak I don't grok what you mean by that.
TimToady otherwise we need some other way to treat a slice subscript as first class
06:46 Guest23195 left
masak that's basically what &exists needs to do, one way or the other, no? 06:46
TimToady how do you delete @array[42; *; 0..5]?
masak and &delete, too.
right. the magical part of both subs is that they expect the evaluation of the argument to be delayed. 06:47
which it isn't.
TimToady and an adverb can modify the last operation to be 'en passant'
otherwise they have to be macros
masak couldn't 'exists' and 'delete' just be macr... what TimToady said. 06:48
TimToady that's essentially what they are in Perl 5
Tene masak: you could write an 'exists' macro
masak I think my stance now is that we should keep those macros for Perl 6.
Tene oh, he said that
masak because of people like me, who would otherwise get them through a pragma. 06:49
TimToady I'm sure that would make many p5 programmers happy, or less unhappy
moritz_ feels like a p5 programmer today 06:50
06:50 Ross joined
TimToady looks for his pajama top, and realizes he wore it all day 06:50
06:50 BillN1VUX left
masak just as I like to have the choice between prefix:<++> and postfix:<++> even when the evaluation order doesn't matter, I'd like the choice between &exists and :exists 06:51
06:51 f00li5h joined 06:52 BillN1VUX joined
TimToady well, if you can figure out what .[stuff]:exists translates to, you're home free, give or take 06:52
masak :) 06:53
"Perl 6: it looks easy, but..."
mathw then you just need to implement macros in Rakudo
masak tempting... 06:55
06:57 Ross left, Ross joined
sorear cheat 06:58
allow macros - that are written in NQP-rx in Perl6::Actions in the form of a conditional in term:name 06:59
diakopter growls at whoever deleted my ToJS.pm from std's dir
sorear or is that term:identifier, I can't remember which is which
diakopter now I can't even find a copy
moritz_ diakopter: locally revert 197a3b4569dd8485c1c77aaf110462718a42ff70
sorear diakopter: that would probably be me. I removed all traces of js-sprixel
diakopter moritz_: i don't use git (yet) 07:00
moritz_ diakopter: then you won't have fun with src/perl6/ anymore anyway
lives now in github.com/perl6/std/
diakopter not yet
moritz_ speaking of which... we need a whole bunch of new dalek monitoring targets 07:01
diakopter found a copy
moritz_ perl6/{perl6.org,modules.perl6.org,mu,roast,std,specs} 07:02
masak nom / 07:14
&
07:14 masak left 07:22 zulon joined
TimToady attempts to use his pajamas as intended 07:23
&
07:25 ruiwk joined
sorear apparently ok $thing-that-should-be-0, 0, "blah blah" is not a valid test 07:26
moritz_ it is not
because ok() expects only 2 args
did you mean to use is() instead?
sorear yes ;)
niecza doesn't know to carp on excess args yet 07:27
so I just got a failure (?0 === False)
and was baffled
07:28 szabgab joined, masonkramer_ left, tylercurtis left 07:29 drbean left, rbuels left
moritz_ understandable 07:29
07:29 tylercurtis joined, gabiruh left 07:30 drbean joined, justatheory left
ruiwk hi 07:30
07:30 gabiruh joined
moritz_ good morning 07:30
ruiwk how i gonna try the code in the perl6 pdf file in linux
07:30 masonkramer joined
moritz_ you store it in a file 07:31
and run perl6 file.pl
ruiwk i type using ? 07:32
moritz_ sorry, I don't understand the question 07:33
ruiwk i need sth like notepad or other ?
moritz_ you need a text editor, yes
like gedit
kwrite
ruiwk and save it as .pl file 07:34
moritz_ right
ruiwk padre is it avaiable for perl6?
moritz_ yes, that too
ruiwk moritz:thx very munch 07:35
i going to install padre 1st
moritz_ bbl
07:36 zulon left 07:42 rbuels joined, Trashlord left 07:43 Trashlord joined
dalek ecza: 6652b77 | sorear++ | / (2 files):
[nrx] Support exhaustion of match lists
07:45
ecza: 605deee | sorear++ | / (3 files):
[nrx] Expose backtracking and labels to cgop
07:54 rbuels left 07:56 _jaldhar joined 07:57 jaldhar left 07:58 thepler joined 07:59 rbuels joined 08:02 tylercurtis left 08:03 xinming left, xinming joined
ruiwk how to test is it perl 6 is installed in my system ? 08:15
coz i try the hello world code and get error 08:16
sorear please say in more detail what you are doing and what happens 08:18
ruiwk i use Padre ide to try the code 08:19
i type
use v6; 08:20
say "hello";
and save it as .pl file
run it
sorear why are you using padre? 08:21
ruiwk and get error state tat perl v6.00 is requires--this is onlyv5.10.1
sorear how are you running it?
you need to run it with Perl 6, not Perl 5.10.1
ruiwk just press the play button in the ide 08:22
sorear padre is a Perl 5 ide
ruiwk ooo
i i try to install the rakudo star also 08:23
sorear there might be some way to get it to use Perl 6 for running, but I'm not the one to ask
seen azawawi
aloha Sorry, I haven't seen azawawi.
ruiwk ok thx
sorear until someone tells you, you should use perl6 from the command line 08:24
perl6 <full path to where you saved the file>
colomon I think there is a way to get padre to run Perl 6 files. But I forget what it is. (Played with padre for about ten minutes sometime last year...) 08:29
diakopter just wrote a reader (in C#) for a custom (not yet committed) serialization format for std 08:30
sorear not JSYNC? :(
diakopter nah that's too complex 08:31
and nih 08:33
now to strip down the old sprixel.pl to emit this format 08:36
my ToJS.pm emitter for std was scads (eyeballed) faster than the yaml one(s) 08:38
this new format is much more compact, and should be more efficient to emit as well
sorear how does it stack up to the Storable emitter? 08:39
diakopter no idea
08:39 risou joined
diakopter never tried it 08:39
diakopter wonders if this is still the right interface: STD->parse($s, actions => 'Actions', setting => $setting)->{'_ast'} 08:40
sorear yes 08:41
diakopter thanks :)
sorear although I'd recommend against using Actions if you can avoid it
diakopter oh?
what should be used
sorear STD->parse($s, setting => $setting)
diakopter k 08:42
sorear Actions takes one parse tree and turns it into a slightly different parse tree
diakopter $setting is CORE, right?
sorear the only real "value added" is that operands become children of binops instead of siblings
diakopter oh; I like that added value 08:43
sorear at the cost of being fairly slow (adds 10-20% to parse time) and having bitten me many times
bug-wise
diakopter oh; good to know; thanks
08:43 lasse_ joined
sorear \o/ regexes work again under the new niecza parser engine 08:44
diakopter wonders how big the output of STD in this format will be
sorear (regressed quite a bit, but still)
diakopter how big is STD in Storable 08:45
sorear 15MB
diakopter ah; tiny
compared to yaml
which was in the hundreds of MB iirc
dalek ecza: ce9e29e | sorear++ | / (5 files):
[nrx] compile /literalstring/
08:50
ecza: 066f98c | sorear++ | / (3 files):
[nrx] implement /a||b/ form
diakopter sorear: thanks tons for making (and letting me help you make) std windows-friendly 08:51
08:51 kuzuha left 08:54 BillN1VUX left, BillN1VUX joined 09:25 azawawi joined
azawawi hi 09:25
sorear: ping
sorear azawawi: pong 09:28
azawawi sorear: i ran into a problem installing S:H:P6 that re-uses cpan STD. 09:30
sorear: apparently some old files are still there from old version (e.g. uniprops) and that breaks tests
sorear: s/version/versions
sorear if I see the maintainer of S:H:P6 around, I'll relay that. 09:31
azawawi :) 09:32
im the maintainer of it.
sorear: im thinking of removing STD old files on re-installation... is it wise? 09:34
sorear: especially *.pmc and uniprops
09:34 Mowah joined
azawawi sorear: an example of the failure since CursorBase finds uniprops in the root before the data directory. www.cpantesters.org/cpan/report/8409438 09:36
09:37 masak joined
sorear do I look like #toolchain to you 09:37
I am not the person to ask about CPAN subtleties
also, I'm half asleep
azawawi sorear: sorry :)
azawawi fixes it 09:38
09:38 azawawi left
sorear out. 09:38
dalek ecza: 9cf770c | sorear++ | / (4 files):
[nrx] Reimplement quantifiers
09:44
09:54 rhebus joined
rhebus morning 09:54
masak o/ 09:55
rhebus most of the perl6-examples don't have very good docs explaining what they do. perl6-examples/99-problems/P01-scottp.pl has a good example; does anyone mind if I start filling in similar docs for other examples?
seems like perl6-examples has been somewhat unloved in terms of recent commits 09:56
but I don't want to tread on anyone's toes
masak rhebus++ # I say go right ahead
in this world, comments and documentation are scarce resources. 09:57
rhebus that's what I'm noticing
I started learning perl 6 properly yesterday
and it's not easy
masak nod 09:58
rhebus which brings me to a second question: perl6-examples/99-problems/P01-scottp.pl has some pod in it. Is perl 6 pod the same as perl5 pod?
masak no.
rhebus or is there anything I need to know before adding pod?
masak it's close, but not the same.
there's no =cut, for one thing. 09:59
you can write things with =begin TAG/=end TAG
or =for TAG
or just =TAG
rhebus hmm, perl6-examples/99-problems/P01-scottp.pl has =cut. Does it need updating? Is there somewhere I can learn p5pod -> p6pod reasonably quickly?
and how do I view pod in a p6 script? 10:00
masak you're a couple of months early :) 10:01
I'm planning to do grant work on exactly this.
10:01 Trashlord left
rhebus is =cut in p6 pod harmful? should I cut it out? (it's not necessary for p6 pod parsers in perl6-examples/99-problems/P01-scottp.pl, since it's at the end of the file) 10:01
masak I actually don't know how a conformant Pod parser should treat =cut. it's a good question. 10:02
don't think S26 brings that up.
rhebus actually, the =cut confuses p5pod, i think I'll dike it out
10:02 Trashlord joined
rhebus consults S26 10:03
argh, can't even view S26 on github because github is confused by the pod its written in :/ 10:05
masak indeed. 10:07
now you see the very depth of the lack of a solid Pod parser.
also, S26 is still slightly slushy, and not finalized in all respects... 10:08
rhebus is it possible/desirable to write pod which is both pod5 and pod6?
masak beyond very simple things, I wouldn't think so. 10:09
rhebus :/
makes writing pod6 difficult then. not sure whether to just put pod5 in the examples for the moment or not bother and just put it all in comments 10:10
masak I'd do the latter for now.
rhebus yeah sounds reasonable
masak inside the comments, you could put real Pod6, if you like. :)
for practice. 10:11
rhebus no i couldn't
not without learning it
and it's not easy to learn
specially not without a program to tell me when i've got it wrong
or rather, i could, but that would take tuits from other tasks such as writing the documentation :) 10:13
masak nod
let's split up -- you write documentation, I make a Pod parser :) 10:14
rhebus :)
10:14 whiteknight joined
moritz_ back 10:17
10:18 BillN1VUX left
moritz_ rakudo: sub MAIN($foo) { }; sub USAGE { say "Usage: not like this" } 10:18
p6eval rakudo c7f6f2: OUTPUT«Usage: not like this␤»
moritz_ lue: see above
masak moritz_: lue eventually figgered it out. 10:19
despide my confusing advice.
10:19 isBEKaml joined
masak isBEKaml! \o/ 10:19
isBEKaml OHHAI!
phenny isBEKaml: 01:32Z <masak> tell isBEKaml negatory on the Yapsi fail. repeat, negatory on being able to reproduce bin/yapsi -e 'say 42' fail on recent Rakudo. over.
isBEKaml negatory? punnerific! :D 10:20
masak: hmm, I can still produce it here. Simply change the shebang in bin/yapsi to point to daily Rakudo build location. 10:21
10:21 Guest23195 joined, Guest23195 left
masak er. when I make install my Rakudo, I get the latest when running Yapsi. 10:22
10:22 Guest23195 joined
masak and it works here. 10:22
I still agree with moritz_' diagnosis, that you have a stale .pir file somewhere.
isBEKaml you make install to a global location ?
that you can get from /usr/bin/env perl6 ?
rhebus rakudo accepts my vim .swp files without error. interesting.
(stupid windows cmd.exe tab completion)
isBEKaml bin/yapsi -e 'say 42' Could not find sub &Nil 10:23
masak isBEKaml: yes. I make install to a global location.
moritz_ find / -name '*.pir'
isBEKaml moritz_: root? you don't want to do that. :) 10:24
moritz_ -or -name '*.pbc'
isBEKaml: I'm very sure it's a stale .pir or .pbc file. If you cleaning attempts so far haven't been successful, it's time to think more globally
masak ~/.perl6/lib, perhaps. 10:25
isBEKaml moritz_: I cleaned out ~/.perl6/lib and the yapsi .pir file before doing make on yapsi. 10:26
moritz_ isBEKaml: what about parrot_install/ ?
isBEKaml moritz_: I'm looking at that now 10:27
10:27 masak left
isBEKaml wow, I still have alpha on the path. pfft 10:29
10:29 M_o_C joined
rhebus rakudo: <A B C D E F>[1 .. *].say 10:37
p6eval rakudo c7f6f2: OUTPUT«(timeout)» 10:38
rhebus :/
is it possible to do ranged subscripting of lists and/or arrays yet? 10:39
moritz_ yes, just not with infinite lists
rakudo: say <a b c d e f>[1..4]
p6eval rakudo c7f6f2: OUTPUT«bcde␤»
rhebus hmm, the example I'm working on is "get the last two elements of a list" 10:40
rakudo: say <a b c d e f>[*-2,*-1]
moritz_ [*-2, *-1]
p6eval rakudo c7f6f2: OUTPUT«ef␤»
rhebus but it doesn't scale to "last three" or "last N" elements
moritz_ right
that would be *-$n .. *, but that doesn't work yet in rakudo for a variety of reasons 10:41
isBEKaml rakudo: say (2,4, *** ... *).munch(15)
p6eval rakudo c7f6f2: OUTPUT«===SORRY!===␤HyperWhatever (**) not yet implemented at line 22, near "* ... *).m"␤»
moritz_ for now you have to obtain the count of elements, and do the math yourself
isBEKaml: spaces help
isBEKaml rakudo: say (2,4, * * * ... *).munch(15) 10:42
p6eval rakudo c7f6f2: OUTPUT«2483225681922097152171798691843.6028797018964e+166.1897001964269e+262.23007451985306e+431.38034926935811e+703.07828173409332e+1134.24910394253414e+1831.30799390525667e+297␤»
isBEKaml moritz_: Just wanted to see how rakudo did that. "HyperWhatever (**) not yet implemented " - made me laugh silly.
moritz_ isBEKaml: glad it amused you :-) 10:43
rhebus where can I read about #?rakudo skip?
is it just a test directive or does it work in general code?
moritz_ rhebus: github.com/perl6/roast#readme 10:44
rhebus would be useful for valid perl6 examples which don't compile on rakudo yet
10:44 svetlins_ joined
rhebus s/compile/work/ 10:44
10:46 svetlins left
rhebus aha, so it's a test suite thing 10:46
10:52 zulon joined 10:55 snearch joined 10:59 Trashlord left 11:00 Trashlord joined
isBEKaml heh. it works now. I cleaned out 2010.07 rakudo and 2.6.0 parrot both in a global install and ~/.perl6/lib. did a fresh Yapsi build and installed the libs to ~/.perl6/lib. It just works. Weird. 11:02
Yapsi was working all the while with 2010.07 globally installed rakudo.
rakudo: say (1,2,4, * * * ... *).munch(15) 11:03
p6eval rakudo c7f6f2: OUTPUT«12483225681922097152171798691843.6028797018964e+166.1897001964269e+262.23007451985306e+431.38034926935811e+703.07828173409332e+1134.24910394253414e+183␤»
isBEKaml this is wrong! 11:04
11:04 synth left
isBEKaml rakudo: say (1,1,2,4, * * * ... *).munch(15) 11:04
p6eval rakudo c7f6f2: OUTPUT«112483225681922097152171798691843.6028797018964e+166.1897001964269e+262.23007451985306e+431.38034926935811e+703.07828173409332e+113␤»
isBEKaml rakudo: say (1,2,2, * * * ... *).munch(15) 11:05
p6eval rakudo c7f6f2: OUTPUT«122483225681922097152171798691843.6028797018964e+166.1897001964269e+262.23007451985306e+431.38034926935811e+703.07828173409332e+113␤»
rhebus does ~@x put spaces between the elements of any Positional? 11:06
isBEKaml the ~ prefix stringifies the variable IIRC
rakudo: my @x = [1,2,3,4,5,6]; (~@x).say 11:07
rhebus but where can I read about what the stringification process means in detail?
p6eval rakudo c7f6f2: OUTPUT«1 2 3 4 5 6␤»
isBEKaml S03, I think. perlcabal.org/syn/ . 11:08
rhebus there's a little discussion in perlcabal.org/syn/S03.html#Symbolic...precedence but it doesn't say in detail what will happen when anything is stringified. In particular, do all Positionals stringify the same way? 11:10
isBEKaml I'm not qualified enough to answer that. :-) 11:11
rhebus heh 11:12
well, I'll document it as such in the examples and someone can correct it later if i'm wrong 11:14
isBEKaml where are you documenting these? 11:16
rhebus perl6-examples/99-problems/*
they have minimal docs at the moment, most are just code with no explanation. the main thing is getting a problem specification into each one 11:17
then perhaps some explanation as to what's going on
then we can point people to it for some good beginner examples 11:18
fine accuracy isn't the main goal; but I like to be as accurate as I can anyway :)
Tene rhebus: might also be nice to pull in Perl 6 examples from rosettacode. 11:19
rhebus Tene: yeah that would be good
I'm starting small, and just documenting 99-problems
then I might try the rest of perl6-examples if i have tuits
11:20 Ross left, lasse_ left
isBEKaml rakudo: sub gcd($x,$y) { my ($a,$b) = ($x,$y); if ($b == 0) { return $a; } else { return gcd($b, $a mod $b); }; }; say gcd(36,63); 11:23
p6eval rakudo c7f6f2: OUTPUT«9␤»
isBEKaml rhebus: ^^ recursive. :)
rhebus isBEKaml: huh?
isBEKaml rhebus: your gcd solution was a non-recursive one. I just made it recursive. 11:24
11:24 hatseflats joined
rhebus isBEKaml: it was non-recursive because rakudo doesn't do tail-call (yet) 11:24
isBEKaml rhebus: github.com/perl6/perl6-examples/blo...-rhebus.pl
rhebus: TCO isn't mandatory. :) 11:25
rhebus but if you think that's better (after all, these are perl 6 examples, not rakudo examples) then be my guest
isBEKaml: yeah, particularly for euclid's algorithm, which shouldn't recurse too deeply
isBEKaml rhebus: euclid's algorithm is particularly a recursive one, IIRC. 11:26
yeah, there's a small chance that it can go out of the stack depth.
never pushed rakudo there.
rakudo: sub gcd($x,$y) { my ($a,$b) = ($x,$y); if ($b == 0) { return $a; } else { return gcd($b, $a mod $b); }; }; say gcd(1916, 2644); 11:27
p6eval rakudo c7f6f2: OUTPUT«4␤»
isBEKaml rakudo: sub gcd($x,$y) { my ($a,$b) = ($x,$y); if ($b == 0) { return $a; } else { return gcd($b, $a mod $b); }; }; say gcd(15553, 23456)
p6eval rakudo c7f6f2: OUTPUT«1␤»
rhebus you need to put pretty large fibonacci pairs into euclid to get a large depth
isBEKaml rhebus: hmm, you can try that out. You can see the sub yourself. 11:28
rhebus rakudo: sub gcd($x,$y) { my ($a,$b) = ($x,$y); if ($b == 0) { return $a; } else { return gcd($b, $a mod $b); }; }; say gcd(14930352, 24157817);
isBEKaml rhebus: I can't think of any. Just saw your P32 solution, found it non-recursive, tried a recursive one on p6eval. 11:29
p6eval rakudo c7f6f2: OUTPUT«1␤»
rhebus those are the smallest pair of numbers for which steps == 45 (I think)
we need to go *much* bigger to get down to, say, 100 11:30
It's only an example, if you want to push it to github I don't think there's much argument against it
11:31 Ross^ joined 11:34 rare joined
isBEKaml rakudo: sub gcd($x,$y) { my ($a,$b) = ($x,$y); if ($b == 0) { return $a; } else { return gcd($b, $a mod $b); }; }; say gcd(2232,654) 11:36
p6eval rakudo c7f6f2: OUTPUT«6␤»
isBEKaml rhebus: I'm not about to push to github over this silly thing. You're free to push that bit in if you like.
Besides, you're doing good already. 11:37
rhebus i'm focussing elsewhere too :)
that's why i wanted you to do it :P
isBEKaml Well, no. That's not necessary. 11:42
11:44 masonkramer left 11:46 isBEKaml left 11:47 svetlins_ left 11:56 azert0x joined, zulon left 12:04 svetlins_ joined 12:08 meppl joined 12:17 REPLeffect joined
rhebus haha, just seen this in S03: "(And please do not overload the bitshift operators to do I/O.)" :) 12:43
12:45 f00li5h left, f00li5h joined
moritz_ rakudo: class A { method @.a; method Str { ~@.a>>.uc } }; say A.new(a => [<foo bar baz>]) 12:49
p6eval rakudo c7f6f2: OUTPUT«===SORRY!===␤Malformed method at line 22, near "@.a; metho"␤»
moritz_ rakudo: class A { has @.a; method Str() { ~@.a>>.uc } }; say A.new(a => [<foo bar baz>])
p6eval rakudo c7f6f2: OUTPUT«FOO BAR BAZ␤»
12:51 M_o_C left
rhebus is pack a builtin? 12:51
aha, it's listed in S32/Str 12:52
12:58 ruiwk left
moritz_ has a simple class for Nonograms that supports stringification, provided all column and row specs are signle digits 13:09
13:09 orafu left, orafu joined 13:10 larsen joined 13:23 zulon joined 13:31 masonkramer joined 13:45 tadzik joined
tadzik hello #perl6 13:46
13:46 snearch left
moritz_ o/ 13:47
13:48 stepnem left 13:49 M_o_C joined 13:50 M_o_C left 13:52 M_o_C joined 13:55 Axius joined 13:56 M_o_C left 13:58 M_o_C joined 14:00 masonkramer left, stepnem joined
gfldex how do i say a white space that aint a newline in a grammar? 14:05
moritz_ \h
is "horizontal whitespace"
rhebus you can't call splice on a Parcel can you? 14:06
moritz_ I don't think parcels are mutable, so "no"
rhebus thanks
I'm working on P21 from 99-problems: "# P21 (*) Insert an element at a given position into a list." That's a find description for LISP, which has no mutable objects; but how do I express "don't modify the original sequence, create a copy" in perl6 context? 14:08
"Create a new list by inserting an element at a given position into a list"
seems a bit clunky
i suppose I could just have the example do both styles 14:09
moritz_ my @copy = @old; @copy.splice(...)
"Insert an element at a given position into an array"
rhebus sorry, i'm asking how to document it clearly, rather than how to code it :)
moritz_: that sounds like mutating the original array, rather than creating a copy
moritz_ it modifies the problem a bit, according to what you can do in Perl 6 14:10
rhebus yeah
moritz_ which is fine, IMHO
rhebus i think the best answer is to do it both ways and demonstrate the difference
which i will do
moritz_ if you don't like, that you can say "copy the list with a new element inserted"
14:14 Trashlord left 14:15 plobsing joined 14:16 Trashlord joined
pmichaud good morning, #perl6 14:16
rhebus o/ 14:17
moritz_ \o
rhebus \m/
tadzik \o/ 14:18
moritz_ pmichaud: I have received a mail with two desktop ini files (for gnome or kde, afaict) for inclusion in R* - they are basically links to documentation, along with a description 14:20
gerd said they'd help the Fedora package
14:21 Italian_Plumber joined
moritz_ should I add them in a subdirectory? or should we avoid non-portable files in R*? 14:21
rhebus in parameter lists, what does (@x is readonly) mean for arrays? what does it stop me doing? 14:24
moritz_ assigning to @x
@a = 1, 2,3 # boom
rhebus but i can still do .splice 14:25
?
[Coke] .
moritz_ it's also illegal to modify @a (like with @a.push(3)), but the compiler isn't forced to enforce that
rhebus rakudo: sub foo (@x is readonly) { @x.push(3) } my @a = <a b c>; foo(@a); @a.say 14:26
p6eval rakudo c7f6f2: OUTPUT«===SORRY!===␤Confused at line 22, near "sub foo (@"␤»
rhebus rakudo: sub foo(@x is readonly) { @x.push(3) }; my @a = <a b c>; foo(@a); @a.say
p6eval rakudo c7f6f2: OUTPUT«abc3␤»
rhebus ok so it's not allowed, but it's not forbidden :)
moritz_ correct
rhebus and readonly is default, so if i want to mutate it I need (@a is rw)? 14:27
moritz_ correct again
rhebus thanks very much
pmichaud moritz_: thinking 14:28
14:29 macroron joined 14:31 jaldhar_ joined 14:33 dangbinghoo joined, tylercurtis joined 14:34 x3nU_ joined, x3nU_ left 14:35 _jaldhar left
pmichaud moritz_: where are the .ini files? i.e., where's the patch? (and why did it come to you via email, ooc?) 14:35
gfldex can i dump Match? 14:36
arnsholt To a certain extent
There's a lot of information in there, so finding what you want can be tricky though
14:37 dangbinghoo left
gfldex Match.perl() seams to take a while :) 14:38
14:38 _jaldhar_ joined
ingy gfldex: try it in 2020. 14:40
14:41 jaldhar_ left 14:43 sahadev joined
tadzik I personally prefer Match.Str :) 14:48
rhebus rakudo: say 5 !%% 3 14:49
p6eval rakudo c7f6f2: OUTPUT«===SORRY!===␤Infix !% is deprecated in favor of infix %% at line 22, near "% 3"␤»
rhebus if i have 2 Ints, does it matter if I use % or mod? 14:51
14:51 Axius left
TimToady probably not 14:54
14:55 M_o_C left 14:57 jhuni left
rhebus sad, P91-edpratomo.pl gives erroneous results. It's quite impressive otherwise... 14:59
it's a knight's tour solver 15:00
15:07 Axius joined
pmichaud did anyone see moritz_++'s announcement on any mailing list other than perl6-compiler yesterday? I seem to have only received the one copy. 15:08
rhebus i got it on perl6-language 15:10
colomon pmichaud: when you've got a second, I've got a weird observation from working on benchmarking stuff yesterday. might be interesting. (might be obvious?) 15:12
15:12 ruoso left 15:18 ruoso joined
pmichaud I've got a second 15:19
15:20 sahadev left
tadzik I've got it on p6u 15:25
moritz_ pmichaud: moritz.faui2k3.org/tmp/rakudo.desk.in.tar.gz contains the files. No idea why gerd sent it to me, not to a bug tracker 15:26
pmichaud rhebus/tadzik: thanks. I don't know why I only received the p6c copy. 15:28
rhebus pmichaud: are all the mailing lists handled by the same software? Is it being Too Clever? 15:29
moritz_ pmichaud: it probably filters out dupes
where it = the mailing list software
15:30 rbuels left
pmichaud hmmm 15:30
wfm, I guess.
15:31 timbunce joined
moritz_ on the web interface, I see it both on p6l and p6c 15:31
haven't checked the others
and it was on planetsix, which means it must have gone to p6a too
15:34 risou_ joined
colomon pmichaud: say ~slurp('unixdict.txt').words.pick(300); works fine 15:35
(unixdict.txt is a 25,104 line file, each line with a single work on it.)
15:36 Axius left
colomon for lines('five-letter-words.txt') { say $_ } segfaults reliably 15:36
sorry, lines('unixdict.txt'), I mean.
pmichaud colomon: from the repl or as a script?
colomon script
pmichaud I'm thinking it's the gc bug. 15:37
colomon seems likely (which is why I didn't report it)
but it seems weird to me that constructing two 25,000 element arrays works fine.
pmichaud arrays != linked lists, though
it's linked lists that cause problems
15:38 risou left
pmichaud in other words, it's not the size of the array, it's the length of the pointer chain that causes Parrot problems 15:38
15:38 jferrero joined
colomon words does generate a linked list, right? 15:38
pmichaud I don't know -- I'd have to look.
and it depends on how the iterator gets consumed.
colomon yes, it does
pmichaud i.e., if we aren't keeping the head of the list anywhere, then it doesn't matter.
colomon huh.
pmichaud because the list gets regularly gc'ed 15:39
colomon say ~slurp('unixdict.txt').words.pick(300) .... pick copies the list to an array internally
I don't know if that operation would keep the head of the list or not?
pmichaud probably not 15:40
15:40 Axius joined
colomon my @l = @.list.Seq; is what .pick does 15:40
pmichaud that doesn't keep the head around, no.
.Seq will end up consuming the iterators, converting things into an array 15:41
so there's no "long chain of nodes", because it's being compressed into an array
colomon by the same token, +slurp('unixdict.txt').words.grep(/(.)$0/) segfaults
pmichaud I suspect that one is keeping the head around somewhere. 15:42
colomon grep is "for @.list" internally
pmichaud it's also gather/take 15:44
which does tend to build chains
but I don't think that's the problem here. 15:45
colomon but words is already using gather / take to build a chain of that length. (and it works in the other one)
pmichaud I suspect prefix:<+> keeps the head. In fact, it probably must. 15:46
how about +slurp('unixdict.txt').words.grep(/(.)$0/).Str ?
colomon pmichaud: but it's keeping the head of the result of the grep, which is significantly shorter
pmichaud sorry 15:47
.Seq
colomon trying
pmichaud url for unixdict.txt?
I'll try a few here locally.
colomon github.com/perl6/bench-scripts/blob...ixdict.txt 15:49
still segfaults with Seq 15:50
trying again with a tighter grep which should produce a very small list at the other end. 15:52
still segfaults. 15:53
rhebus rakudo: +$_.say for ((1,2),3,(4,5),(6)); 15:55
p6eval rakudo c7f6f2: OUTPUT«1␤2␤3␤4␤5␤6␤»
tylercurtis rakudo: +.say for ((1, 2), 3, (4, 5), (6))
pmichaud omg slurp is painfully slow
p6eval rakudo c7f6f2: OUTPUT«1␤2␤3␤4␤5␤6␤»
moritz_ there was a parrot patch that made readall() read the whole file at once. It made rakudo module loading segfault :/ 15:56
pmichaud yes, that patch was broken
I knew it was broken as soon as I saw the patch.
moritz_ did it confuse characters and bytes? 15:57
rhebus rakudo: (<a b c> X <1 2 3>).perl
p6eval rakudo c7f6f2: ( no output )
rhebus rakudo: (<a b c> X <1 2 3>).perl.say
p6eval rakudo c7f6f2: OUTPUT«(("a", "1"), ("a", "2"), ("a", "3"), ("b", "1"), ("b", "2"), ("b", "3"), ("c", "1"), ("c", "2"), ("c", "3"))␤»
pmichaud it basically tried to solve the problem in the wrong way. 15:58
rhebus rakudo: say (<a b c> X <1 2 3>).map: { ~$_ }
p6eval rakudo c7f6f2: OUTPUT«a 1a 2a 3b 1b 2b 3c 1c 2c 3␤»
pmichaud I don't understand why readall() thinks that it has to do line-oriented reads.
moritz_ rakudo: say ~(<a b c> X~ <1 2 3>)
p6eval rakudo c7f6f2: OUTPUT«a1 a2 a3 b1 b2 b3 c1 c2 c3␤»
rhebus moritz_: nice, thanks 15:59
pmichaud it should be reading the file in large (e.g., ~4k) chunks. 16:00
moritz_ agreed
pmichaud that way we're doing 500 reads and concatenations instead of 25,000
16:01 zulon left
pmichaud sorry, 50 reads versus 25,000 16:01
rhebus rakudo: ((1,2,3) X* (1,2,3)).perl.say 16:02
p6eval rakudo c7f6f2: OUTPUT«(1, 2, 3, 2, 4, 6, 3, 6, 9)␤»
colomon pmichaud: I just rewrote the script to recode grep by hand using .list, loop, and shift. That version works fine. 16:03
so it seems like it's the for statement in grep which is the source of the problem.
[Coke] somuchpun.com/2010/09/04/funny-puns-camelflage/
pmichaud colomon: oh yes, it is likely the for statement 16:04
well
hrm
I would rewrite grep 16:06
as
self.map({ next unless $_ ~~ $test; $_})
16:06 Axius left
pmichaud or even better 16:06
self.map({ $_ if $_ ~~ test })
and avoid the gather/take altogether 16:07
moritz_ rakudo: say <a b c>.map({$_ if $_ ~~ 'b' }).perl
p6eval rakudo c7f6f2: OUTPUT«(Nil, "b", Nil)␤»
moritz_ rakudo: say <a b c>.grep('b').perl
p6eval rakudo c7f6f2: OUTPUT«("b")␤»
colomon pmichaud: for what it's worth, I left out the gather / take from the above description, but it was there and does work in this case.
moritz_ is that actually the same?
colomon map does seem like it should be more efficient, though. 16:08
pmichaud moritz_: good question.
moritz_ I'd argue since .perl sees a difference, it can't be the same
16:08 justatheory joined, svetlins_ left
pmichaud then there's a question as to which is correct :) 16:09
moritz_ I'm pretty sure that grep is correct
colomon pmichaud: how fast is doing "next" in map? My (admittedly weak) intuition is that it is on the slow side... 16:10
pmichaud colomon: it's an exception... but so is gather/take
so they're roughly equivalent.
colomon pmichaud: right, but it switches the sense of the exception.
pmichaud doing next won't help here, though.
if we're wanting to avoid the Nils
rhebus gah, new laptop has no capslock light. i ONLY KNOW i'VE HIT IT WHEN IT'S TOO LATE 16:11
colomon oh, really?
pmichaud rakudo: say <a b c>.map({next unless $_ ~~ 'b'; $_}).perl
p6eval rakudo c7f6f2: OUTPUT«(Nil, "b", Nil)␤»
colomon gotcha.
pmichaud next puts a value into the output list also
colomon I missed that step of the above logic.
pmichaud maybe
rakudo: say <a b c>.map({$_ if $_ ~~ 'b'}).list.perl 16:12
p6eval rakudo c7f6f2: OUTPUT«(Nil, "b", Nil)␤»
pmichaud I'm wondering if .list should remove the Nil's
rhebus rakudo: say <a b c>.map({ $_ ~~ 'b' ?? $_ !! () }).list.perl 16:13
p6eval rakudo c7f6f2: OUTPUT«((), "b", ())␤»
16:13 sahadev joined
pmichaud I need a short break, then will look at this problem more directly. 16:14
rhebus which synopsis should I consult re $^a and $^b? 16:15
tried S02, S04, S06, nothing concrete talking about them 16:16
tylercurtis perlcabal.org/syn/S06.html#Placeholder_variables
moritz_ S06
moritz_ decides he needs a turtle 16:17
rhebus thanks
pmichaud oh!
try recoding grep to use .map instead of 'for'
since right now our 'for' is inherently eager 16:18
brb
16:21 stepnem left
colomon trying now 16:24
errr.... huh 16:26
no segfault, but the script doesn't work right, either.
16:26 stepnem joined
pmichaud okay, first I think the incredibly slow slurp has to go. 16:33
TimToady .list is not .flat
16:33 zulon joined
colomon oh, I'll bet the map doesn't do anything, because nothing is using its output 16:34
pmichaud: sadly, slurp is actually the first way to do I/O at the minute in rakudo. :(
pmichaud colomon++ correct
colomon: right, which is why I'm going to fix it to be not slow.
colomon *fast way
pmichaud++ 16:35
16:35 vanadium left
TimToady btw, is sink context careful to throw away its eager evaluations as it makes them, or can they hang around as a space leak? 16:35
pmichaud we don't have a full sink context yet
but it will throw them away
TimToady it can't just call .eager, I think, since that would treasure everything up
pmichaud right. I've worked on sink a couple of times, but keep running into a design difficulty (I don't remember what it is, but it has to do with lack-of-want) 16:36
moritz_ my @x = 1..*; # how do we ensure that @x isn't in sink context, even though it's returned from the 'my' declaration? 16:37
TimToady sinkness is something that has to propagate down from nodes to statement lists; it can't be determined during the initial parse of the statement list
pmichaud oh yes, that was it. we didn't have a good way to avoid sinkness on assignment and the like 16:38
TimToady so has to be an ast operation
pmichaud the attributes that were in STD.pm6 weren't sufficient to describe the cases
16:39 Axius joined
TimToady STD doesn't do ast yet without something like viv adding actions, which sorear++ keeps deprecating, but I still think is useful from a typological perspective so nodes can dispatch on type rather than examining data 16:40
pmichaud right
TimToady disregarding whether or not it's buggy :)
pmichaud we didn't have the right set of operator attributes to be able to sufficiently describe sink context
I'll look at it again in a bit... I want to fix slurp($filename) first. 16:41
TimToady btw, my Hofstadter-Conway $10000 sequence finally got all the way through a million entries; took 3 hours though 16:42
and had to use only loop (), no lists
rakudo/parrot tended to roll over on any sequence longer the 32768 16:43
rhebus perl6: say list(1..4).map { 42 }
p6eval pugs: OUTPUT«*** ␤ Unexpected "{"␤ expecting operator, ":" or ","␤ at /tmp/OUomH3SQc_ line 1, column 20␤» 16:44
..rakudo c7f6f2: OUTPUT«===SORRY!===␤Confused at line 22, near "say list(1"␤»
rhebus perl6: say list(1..4).map: { 42 }
p6eval pugs: OUTPUT«42424242␤»
..rakudo c7f6f2: OUTPUT«42␤»
rhebus perl6: say list(1..4).map: { ( 1..16).pick }
p6eval rakudo c7f6f2: OUTPUT«15␤»
..pugs: OUTPUT«7228␤»
rhebus perl6: say ~list(1..4).map: { ( 1..16).pick }
p6eval rakudo c7f6f2: OUTPUT«6␤» 16:45
..pugs: OUTPUT«6 11 13 13␤»
rhebus hmm, is there another way to generate N numbers from (1..K).pick in rakudo?
moritz_ (1..K).pick(N, :replace)
rhebus thank you 16:46
16:50 Ross^ left, Italian_Plumber1 joined, Italian_Plumber left 16:51 zulon left, Italian_Plumber1 left
pmichaud gist.github.com/566158 # time of old slurp versus new slurp 16:52
spectesting now. 16:56
arnsholt Nice. That's a respectable speedup
rhebus right 17:00
i think that's enough work documenting the perl6-examples for now
tylercurtis is curious to see how pmichaud++ got that speedup. 17:01
17:04 masonkramer joined
pmichaud gist.github.com/566173 # how I got the speedup. 17:05
17:06 Axius left 17:09 M_o_C joined
moritz_ pmichaud: I'm pretty sure it needs a leading ~ on the last line 17:09
pmichaud: otherwise it will be a parrot string, and methods like .trans fail
17:10 Axius joined
pmichaud moritz_: you're probably right, but it's no different than what IO.slurp() is currently doing. (I.e., it's likely to fail in the same manner as before.) 17:11
moritz_ pmichaud: then the previous is probably buggy too
pmichaud right
I'm thinking it's time to just do type mapping for Str 17:12
rather than stick spurious ~'s all over the place. 17:13
maybe I'll try that when this current spectest run is done 17:14
17:16 icwiener_ joined 17:26 envi^home left 17:28 Axius left 17:47 Trashlord left, risou_ left
moritz_ is currently very annoyed by "Use of uninitialized value in numeric context" without line number 17:50
mathw line numbers are nice 17:51
17:51 Trashlord joined
dalek kudo: 77a72a3 | pmichaud++ | src/core/IO.pm:
Refactor slurp($filename) to use Parrot's .readall($filename);

See TT #1749 for related parrot details.
17:52
17:56 Mowah left
diakopter 09:33 -!- dangbinghoo changed the topic of #perl6 to: 18:05
diakopter wonders what it was prior...
tadzik I had both in a message and I didn't see any difference either 18:07
pmichaud moritz_: yes, I need to go fix up the annotations to be accessible from more than just exceptions. 18:11
18:14 justatheory left 18:15 jaldhar joined 18:18 PacoLinux left, _jaldhar_ left
colomon sorry about disappearing off the face of the conversation back there. sudden call to deal with groceries and make noms. :) 18:19
pmichaud colomon: 16:52 <pmichaud> gist.github.com/566158 # time of old slurp versus new slurp 18:20
colomon I saw! pmichaud++
grep(Mu $test) { gather { @.map({ take $_ if $_ ~~ $test; }).eager; } leads to segfault again. 18:21
pmichaud colomon: how long does it usually take for 18:22
for lines('unixdict.txt') { say $_ }
to segfault?
colomon about a minute, I think, but let me time it. 18:23
18:23 icwiener_ left
pmichaud okay 18:23
just hadn't seen a segfault yet on this end
colomon running here.....
segfault here, right after indefensible 18:24
pmichaud I'm up to 'our'
18:24 _jaldhar joined
colomon interesting. 18:24
pmichaud 'raze' 18:25
'sand'
'snub'
segfault after 'stagecoach'
okay, let me look. I suspect it's an eager/sink issue.
colomon good hunting! 18:26
diakopter seems I can't pipe input to viv anymore
18:28 jaldhar left 18:32 Trashlord left 18:33 Trashlord joined 18:34 jaldhar_ joined 18:36 masonkramer left 18:37 _jaldhar left 18:38 rhebus left 18:40 Mowah joined, alester joined, rhebus joined 18:42 whiteknight left 18:44 jacob_applebaum left 18:46 reisio joined 18:48 Axius joined 18:54 sahadev left 18:55 PacoLinux joined 18:56 macroron left 18:57 Axius left
colomon pmichaud: your new slurp is slightly wrong. 19:03
returns a String instead of a Str
> slurp('five-letter-words.txt').trans("a" => "A")
too few positional arguments: 2 passed, 3 (or more) expected
moritz_ I've commented as much in the backlog 19:04
colomon hmmm... how to easily add a test for that to real-strings.t?
moritz_++
on it. 19:07
pmichaud colomon: as I noted, that problem existed with the previous slurp() also. 19:10
and I don't thinkt he answer is for us to be adding ~ to everything that might return a Parrot String.
19:10 Axius joined
colomon do you have a better answer than adding 19:10
%r = new ['Str']
assign %r, $S0
at the end of the PIR?
(or whatever is needed for your code here.) 19:11
pmichaud yes, let's try type-mapping Parrot's String PMC to a Rakudo Str.
colomon was there a test which showed the previous version was wrong? (I mean in spectest) 19:12
pmichaud I don't think there's a test that showed the previous version as being wrong, no.
moritz_ don' tthink so
pmichaud I'm fine with adding a test for it.
colomon I've just added it 19:13
pmichaud let's see what happens with type mapping
colomon doh! I don't have permission to push to spectest 19:14
roast
Or maybe I've just got it checked out incorrectly.
moritz_ should be able to fix that
colomon: ah, you need to edit .git/config
pmichaud the default checkout doesn't grant push privs
moritz_ colomon: and change the url to [email@hidden.address]
pmichaud ...roast? 19:15
moritz_ roast
pmichaud why roast?
colomon it's what my computer does when I run the full thing. ;)
rhebus should I return Bool::True or is returning 1 fine? (similarly Bool::False and 0)
colomon moritz_++ # updated test checked in
pmichaud I don't like that name. I'd much prefer 'spectests', as that's what they are.
colomon pushed, I mean.
19:16 Italian_Plumber joined
colomon rhebus: I prefer Bool::True if that's really what you mean. 19:16
rhebus yeah, it's for a sub is_prime (P31 in 99-problems)
colomon rhebus: if your testing for truth either has the same result, but Bool::True better documents what you are returning, IMO. 19:17
pmichaud there are other differences
i.e., ~~ $true is different from ~~ ` 19:18
i.e., ~~ $true is different from ~~ 1
tylercurtis pmichaud: TimToady likes his tab-completion.
pmichaud tylercurtis: ah. :-(
moritz_ also prefered spectests, which is why he named the repo that way initially
rhebus pmichaud: that's a very good point.
pmichaud also, True.succ is different from 1.succ 19:19
hll_map fail
colomon afk # get ready to head out for the coldest folk in the park of the year... 19:20
pmichaud go ahead and add the prefix ~'s if you'd like. 19:21
I don't feel like trying to resolve the hll_map issues anytime soon (esp. since I fear it will just make things even slower) 19:22
tylercurtis pmichaud: although, looking back at the log, he was talking about names for it before he commented on the tab-completion collision. 19:24
smash hello everyone
phenny smash: 00:46Z <colomon> tell smash Yay! And I just added another....
pmichaud tylercurtis: okay. If it's a TimToady preference, then I'll squelch my distaste. :)
smash pmichaud: updated gil.di.uminho.pt/users/smash/rakudo-bench.html
colomon: will update tests and run later 19:25
19:25 sahadev joined
tadzik smash: how come it's being updated while Rakudo version remains the same? 19:25
smash tadzik: the bench scripts changed 19:26
tadzik ah, I see
pmichaud the iteration and recursion bench scripts weren't at all indicative of... well, anything.
5 loop iterations isn't really a stressful test. :) 19:27
19:27 rbuels joined
tylercurtis Wow, iteration-for.p6 really messes up the scale on the light scripts graph. 19:27
pmichaud ...but look at how much it improved :) 19:28
(or, restated, how wrong it was before :)
tylercurtis (whoever made that happen)++ 19:29
smash pmichaud: yes, big improvement
tadzik I believe it's colomon++ 19:30
moritz_ and pmichaud++
pmichaud I think the version that went into 2010.08 was mine.
still, colomon++ did a lot of the improvemtn as well.
19:33 reisio left
rhebus given a list <a b c d e> and an infix:<foo> ($a,$b), I want to construct the list (a foo b, b foo c, c foo d, d foo e). Here's what I've got: 19:34
lue ohai o/
smash in sub f(@list) {....}, is list flattened ?
rhebus rakudo: my @l = <a b c d e>; my $prev = shift @l; my @m = gather for @l {take $pref ~ $_; $prev = $_; }
p6eval rakudo 77a72a: OUTPUT«===SORRY!===␤Symbol '$pref' not predeclared in <anonymous> (/tmp/E714ekAf5C:22)␤»
rhebus rakudo: my @l = <a b c d e>; my $prev = shift @l; my @m = gather for @l {take $prev ~ $_; $prev = $_; }
p6eval rakudo 77a72a: ( no output )
rhebus rakudo: my @l = <a b c d e>; my $prev = shift @l; say my @m = gather for @l {take $prev ~ $_; $prev = $_; } 19:35
p6eval rakudo 77a72a: OUTPUT«␤Cannot modify readonly value␤ in '&infix:<=>' at line 1␤ in main program body at line 22:/tmp/mxmTqqLiDR␤»
rhebus well something like that anyway
pmichaud rhebus: how about: @list[0..3] »foo« @list[1..4]
rhebus pmichaud: wonderful, thanks
i suppose it generalises: @list[0..+@list-2] >>foo<< @list[1..+@list]? (or with * when rakudo supports that) 19:36
pmichaud yes, something like that 19:37
there's also:
for ^(@list-1) { $list[$_] foo $list[$_+1] }
sorry, @list[$_] and @list[$_+1] 19:38
rakudo: my @l = <a b c d e>; my @a = (for ^(@l-1) { @l[$_] ~ @l[$_+1] }); say @a.perl; 19:39
p6eval rakudo 77a72a: OUTPUT«["ab", "bc", "cd", "de"]␤»
rhebus that works too 19:40
19:41 timbunce left
lue rakudo: my $a = 3; say $a\i 19:44
p6eval rakudo 77a72a: OUTPUT«0 + 3i␤»
lue rakudo: my $a = 3; say ($a)i
p6eval rakudo 77a72a: OUTPUT«0 + 3i␤»
rhebus does perl6 ever need << and not «? how do you set your editor up for the funny unicode symbols? 19:46
ie can « shift bits?
pmichaud << is never a bitshift
bitshift is +< or +> or ~< or ~> 19:47
moritz_ rhebus: on linux, compose < < produces «
rhebus i'm on windows, using vim
19:47 Axius left
pmichaud in vim, ctrl-k + < + < 19:47
moritz_ Ctrl+k < <
rhebus oh thanks
pmichaud see :dig for the vim shortcuts
moritz_ :help digraph # for more info
19:48 timbunce joined, Ross^ joined
rhebus thanks 19:48
moritz_ likes Ctrl+k OK for ✓
lue I don't really see tests for ($x)i and $x\i (I see tests that *use* them, but no tests *for* them). Should I add them in? 19:49
pmichaud tests good
tylercurtis is stealing Perl 6's module syntax for Perl 5 (because he's too lazy to type "package Foo;␤use warnings;␤use strict;␤" and such all the time).
perigrin tylercurtis: don't just say package Foo;\nuse Moose;\n and you'e done :) 19:51
lue rakudo: my $a = 0.53; say $a.perl 19:52
p6eval rakudo 77a72a: OUTPUT«53/100␤»
rhebus can I get a review on my P33 example: gist.github.com/566270 I worry I'm using hyper operators because they're cool rather than because they're the best tool :/ 19:56
in particular, infix:<coprime> seems an odd choice for an operator (or would do outside perl 6 anyway) 19:57
tylercurtis perigrin: module, not class. For classes, I usually just use MooseX::Declare.
pmichaud gcd is: ($a, $b, *%* ... 0).[*-2]
rhebus pmichaud: wow, not come across that syntax yet. will add it to the example when I understand it 19:59
tylercurtis rhebus: * % * is a closure created by the whatevers(*). It means { $^a % $^b } 20:00
pmichaud when we have the ability to mark infix operators as chained, you would be able to do: 20:01
tylercurtis rhebus: most operators can be curried like that.
perigrin tylercurtis: I haven't written anything that isn't a class in so long ...
pmichaud [coprime] @fib; # true if all adjacent elements of @fib are coprime
perigrin well ... except for Roles.
pmichaud rhebus: I think the use of the hyper is okay here. 20:02
20:04 tadzik left
pmichaud gist.github.com/566282 # why Parrot's GC is so painful :( 20:08
gist.github.com/raw/566282/69c06d2e...file1.perl # without github formatting ugliness
moritz_ waitwaitwait 20:09
loading perl6.pbc makes it 11 times slower?
pmichaud yes.
moritz_ just because it marks-and-sweeps all PMCs in there each time?
pmichaud note that I'm not even in the perl6 HLL namespace.
20:11 osfamero1 joined
rhebus tylercurtis, pmichaud thanks for your feedback 20:11
20:11 perigrin_ joined, jjore_ joined, draxil_ joined, BillN1VUX joined
lue just running perl6 path/to/test.t is good enough for making sure the tests you added works, right? 20:14
moritz_ in general 'make t/spec/foo/bar.t' 20:15
20:15 __sri joined
moritz_ if fudge is involved 20:15
20:15 yahooooo7 joined
lue hm, I made my changes in roast/, not rakudo/t/spec 20:15
20:16 sahadev left, PacoLinux left, tylercurtis left, jjore left, bacek left, draxil left, p6eval left, PerlJam left, cosimo left, perigrin left, osfameron left, tylercurtis joined 20:19 inotifyAPI joined, inotifyAPI left, timbunce left 20:22 PerlJam joined, p6eval joined, ChanServ sets mode: +v p6eval 20:23 Quadrescence joined 20:24 sjohnson joined, bacek joined
rhebus gah, vim is munging » to » when I reopen a file with a hyper operator 20:28
20:28 sahadev joined
moritz_ rhebus: then some settings wrt character encodings are broken 20:28
rhebus quite
moritz_ having an UTF-8 locale, and set encoding=utf-8 in .vimrc helped on linux 20:29
20:31 svetlins joined, lichtkind joined, PacoLinux joined
rhebus yeah, set encoding=utf8 in _vimrc works for me 20:32
sorear good * #perl6
lue hello sorear o/ 20:33
pmichaud message sent to parrot-dev
afk, computer repair
lichtkind szabgab: thanks
20:34 Mowah left
lue [on a dry run]: 20:39
You can't push to git://github.com/perl6/roast.git
Use [email@hidden.address]
sorear That error message contains fix instructions 20:40
Use them
moritz_ sorear: reading error messages is so web 1.0 20:44
20:44 Trashlord left 20:46 tylercurtis_ joined, tylercurtis left, tylercurtis_ is now known as tylercurtis 20:54 justatheory joined 20:59 nimiezko joined
rhebus Here's my P34 (euler's totient function): gist.github.com/566318 how does it look? 21:00
BillN1VUX RosettaCode claims primality test $n %% none 2, 3, *+2 ... sqrt $n works with Rakudo Star version 2010.08 but with $n = 2 generates infinite list instead of terminating. i 21:03
rhebus it never generates a value in sequence which is eqv sqrt(2) 21:04
BillN1VUX series ends on eqv not > ? 21:05
tutorial seemed to say > iirc
rhebus so says S03
perlcabal.org/syn/S03.html#List_infix_precedence
BillN1VUX S03 by definition is right, but that doesn't seem useful. 21:06
wonder why rosetta said it worked
rhebus replace the limit with a closure? (2,3,*+2... *<sqrt $n) 21:07
except "(We can't implement this till we fix all the old usages of right-hand generators, however.)" 21:08
eqv means that the constructor doesn't care if the sequence is increasing or decreasing 21:10
hmm, playing with the REPL suggests it's not eqv in rakudo atm 21:11
I can't read, sorry: "If any value in the series is eqv to the limit value, the series terminates, including that final limit value. For any value after the first lefthand value, if that value and the previous value fall on opposite sides of the limit, the series terminates without including either the limit value or the value that exceeded the limit." 21:12
BillN1VUX fall on opposite.
rhebus aaah so they're always above sqrt(2) so the limit doens't terminate
BillN1VUX i see. both 2 3 are >
yup
that's behavior seen
rhebus could hack a fix with 2+sqrt $n 21:13
21:14 sahadev left
BillN1VUX would be close enough 21:14
rhebus night all o/ 21:15
BillN1VUX so FAD and it's bug in the example. thanks. going to use this example with Rakudo* demo for our PM group
21:18 rhebus left
shortcircuit BillN1VUX: The code on Rosetta Code is all visitor-contributed. Somone indicated that it worked with Rakudo, but that template usually means that a code example depends on a particular implementation of a language. We have no automated testing or unit tests. Any code review is done at the charity of time of other visitors. 21:20
BillN1VUX shortcircuit: understood. odd that someone labelled it as working with the exact version it fails with. 21:21
shortcircuit: is Rosetta culture normal wiki culture of see something wrong, log in and fix it ? 21:22
21:22 Ross^ left
BillN1VUX shortcircuit: interesting, p6eval and TimToady are both on #RosettaCode too 21:36
shortcircuit BillN1VUX: Yeah 21:37
BillN1VUX: By all means, if something's broken, fix it. If you do something that's against the grain of the wiki, someone will leave a note on your talk page and help you integrate.
BillN1VUX maybe I'll register so I can fix that and fix credit on Abigail's primality Regex - which is stated as translation from Python. 21:38
21:39 Guest23195 left 21:40 nimiezko left, alester left
lichtkind mberends: ohai 21:41
21:42 tylercurtis left 21:47 kst`` joined 21:48 kst` left 21:49 kst`` is now known as kst 22:01 svetlins left, svetlins joined 22:02 svetlins left 22:03 svetlins joined
lue [stupid question time] It's not really mentioned, but I assume the Pod6:: organization is required? 22:05
22:05 svetlins left 22:06 svetlins joined 22:07 svetlins left, svetlins joined 22:15 svetlins left, svetlins joined 22:18 svetlins left, svetlins joined 22:20 svetlins left
lue afk 22:20
22:20 svetlins joined 22:22 svetlins left, svetlins joined
TimToady rosettacode.org/wiki/Hofstadter-Con...nce#Perl_6 22:24
22:24 svetlins left, svetlins joined 22:26 svetlins left, svetlins joined 22:27 M_o_C left, rgrau_ joined, svetlins left 22:28 svetlins joined 22:29 svetlins left 22:30 svetlins joined 22:32 plobsing_ joined, svetlins left, svetlins joined 22:34 svetlins left, svetlins joined 22:37 svetlins left, svetlins joined 22:40 svetlins left, svetlins joined 22:42 svetlins left 22:43 svetlins joined
diakopter sorear: ping 22:45
I'm getting an '_xact' node that is an arrayref blessed as 'STD::P6' ... any ideas? 22:46
22:46 svetlins left
diakopter while parsing position 173765 of STD.pm6 22:46
:)
22:46 svetlins joined
diakopter svetlins: yer connection flappeth 22:47
22:47 svetlins left
diakopter :/ 22:47
22:48 ChanServ sets mode: +o diakopter
sorear diakopter: I'm only now starting to understand how the _xact system works 22:48
diakopter ok.. 22:49
22:49 diakopter sets mode: -o diakopter
diakopter I'm only now starting to learn of the existence of the _xact system 22:49
:) what is it?
sorear it's how STD/Cursor handles cut operators 22:50
diakopter oh, ok 22:51
sorear _xact nodes reify choice points
diakopter cool, makes sense. I handled that in perlesque's grammar engine, just not with a cute name like that 22:52
sorear &CursorBase::_COMMITLTM (/ :: /) walks the _xact list to commit all choice points until the last open |-alternation
etc
theoretically, all _xact nodes are supposed to be stripped out during the match-building process and you shouldn't see them outside the dynamic scope of ->parse 22:53
diakopter :) 22:55
well they're there, creeping around my parse tree result
STD::Regex::_X_SsSlash 22:56
is the node under which the first appears
STD::Q::_X_SQcc::_X_SsBra_Ket is another 22:57
they're all one of those two types, so far
sorear mm nibblers 23:00
diakopter adds an exception to ignore/strip _xact nodes 23:04
(to my emitter)
C:\perl6\std>perl sprixel_csv.pl STD.pm6 >out3.csv 23:05
hah
interesting... I think it finished 23:07
now to see how long the reader takes to reconstruct the asg
ooo 10 seconds
not awful
the tree takes 360MB of .net memory; heh 23:10
23:11 Bucciarati left
diakopter 24,311,313 out3.csv 23:12
bytes
so about twice Storable's
does Storable use compression?
23:13 Bucciarati joined, jhuni joined
diakopter the .csv compresses nicely to 3.1MB 23:15
extracts in .5s
diakopter slows down the channel spamming
sorear: do you think it's ok if I add sprixel_csv.pl to std/tools/ 23:21
diakopter clicks wildly around in TortoiseGit 23:22
23:27 patrickas joined
patrickas the new rosetta code for primality test seems awfully complicated 23:32
rosettacode.org/wiki/Primality_by_t...ion#Perl_6 23:33
23:33 rgrau_ left
sorear diakopter: it's ok 23:34
23:34 echosystm joined
echosystm hi guys 23:34
sorear diakopter: don't think Storable uses compression, but it is a binary format
hi echosystm
echosystm a problem i'm having in perl 5 is the lack of class/static methods and variables 23:35
23:35 rgrau_ joined
sorear echosystm: perl 5 doesn't have class members at all; the standard way to fake a class variable is 'our' 23:35
echosystm yep 23:36
now my question is, will this be improved at all in perl 6?
in php and python, it's possible to do "late static binding"
sorear well, perl 6 has actual classes
rakudo: class Foo { method bar() { say "hi" } }; Foo.bar 23:37
p6eval rakudo 77a72a: OUTPUT«hi␤»
sorear perl 6 doesn't have static methods as such; every method can be used as static if it doesn't access instance slots
echosystm yep 23:38
i understand and that is what we do in perl5
sorear then why are you asking me?
23:38 patrickas left
echosystm but theres no concept of late binding in perl 5 23:38
for example
sorear there's no concept of anything but late binding in perl 5
except for operators
23:38 rgrau_ left 23:39 aesop joined
echosystm this is difficult for me to explain 23:39
in python and php, i can create a class with a class variable $a
i can then declare a static method referencing theCurrentClass::$a
when i subclass this class and override the value of $a, the inherited static method will now point to the new value of $a 23:40
sorear I don't understand why you're here
echosystm this isnt possible in perl 5
and im trying to find out if it is possible in perl 6
sorear You're wrong. MooseX::ClassAttribute 23:41
echosystm will this be possible in perl 6 without the overhead of another library? 23:42
sorear That is a very silly question 23:44
diakopter libraries aren't overhead, necessarily.
not everything can be "native"
sorear If you take away the culture of creating and using libraries, there is no reason to keep using Perl
anyways, the answer is in S12 23:45
echosystm libraries shouldn't be required to compensate for lacking features in the language
thats part of the reason people have such a love-hate relationship with perl
our company uses 100% perl, but everyone hates it for reasons like this 23:46
i'm not trying to troll or put the wind up you, but it needs to be said
sorear sheesh
diakopter the same attitude explains the Perl6 features-kitchensink-ness ... there are almost always more than layer of primitives in languages 23:47
more than 1
sorear echosystm: we try not to be hostile here, and we expect newcomers to do the same.
diakopter sorry, that last msg should've been split into 2
BillN1VUX patrickas: sadly the old code failed
23:47 smash left
echosystm im not trying to be hostile, im just trying to be honest 23:48
BillN1VUX patrickas: discussed the problem here 2 hours ago
echosystm constructive criticism isn't always easy to swallow
basically everyone at our company is hoping for perl6 to be the fresh start that will save our sanity 23:49
sorear the syntax is "our $.foo" btw
diakopter echosystm: may I ask how many perl folks at your company 23:50
echosystm we have about ~50 developers, but most of our ~60 odd network "engineers" use perl on a daily basis
diakopter it's hard to assess your claim "everyone hates it for reasons like this" 23:51
because "reasons like this" can be very very big 23:52
echosystm of course, its a sweeping generalisation
i should have been more verbose
23:53 plobsing_ left
echosystm most of the people i interact with here dislike having to use Moose - they see it as a failure of the language 23:53
diakopter think about it the other way 23:54
if you just had the fancy object layers, but no access to muck around in the guts of the low-level primitives, they would complain about that. 23:55
echosystm well, one would think that, yet most here prefer java which is obviously far more abstract 23:56
23:57 chromatic joined
diakopter the fancy object layers have to be implemented somewhere.. they probably have a very skewed idea of how much "runtime overhead" the fancy object layers bring. 23:57
chromatic: o hai :) good timing
chromatic Gentlemen, don't be rude.
echosystm has a valid point.
With that said, echosystm, unless very very fast and frequent startup is a necessity for your applications, the Moose penalty is minimal. 23:58
The benefits are large.
echosystm i think everyone here is going to be happy with perl6
i think our WTFs per minute will definitely be reduced :P
but the topic of class methods/variables is still a bit of an issue 23:59
chromatic echosystm, your coworkers may benefit from reading: www.modernperlbooks.com/drafts/mode...er_07.html
echosystm in the perl community there seems to be this idea that class members are a bastardisation of a pure object model