»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
00:00 qw3rty joined
lue afk 00:01
00:09 qw3rty left 00:16 Quadrescence left 00:22 Ross joined 00:26 qw3rty joined 00:30 roelos joined 00:31 roelos left 00:36 Ross left 00:52 grapa joined 00:59 alksentrs left 01:01 grapa left 01:03 vastak joined 01:07 whiteknight left
dalek ecs: a877659 | TimToady++ | S03-operators.pod:
move := and ::= to correct precedence section

  tylercurtis++ noticed they were still in the item assignment section
despite having been redefined as listop precedence.
01:12
01:18 molaf_ joined 01:22 molaf left 01:25 meppl joined 01:28 Schwern left 01:43 flatwhatson left 01:46 QinGW joined 01:51 leprevost left 01:55 flatwhatson joined 01:56 Schwern joined
sorear good * #perl6 02:14
02:24 brxue joined 02:33 lue left, lue joined 02:43 aloha left 02:44 bacek left 02:50 envi^home joined 02:51 drbean left, meppl left 02:52 drbean joined 02:54 petdance joined 03:01 orafu left, orafu joined 03:05 patspam joined
sorear seen jnthn 03:12
03:14 sftp left
TimToady not since Pisa 03:15
sorear TimToady: what are the rules on 'supercede method ACCEPT'? 03:16
TimToady well, if you supersede something that has already been used, you get what you pay for :) 03:18
and to my mind ACCEPTS is pretty low level 03:19
sorear how does "used" factor in?
normally I think of method calls not being fully resolved until runtime
but the given -> jumptable transformation relies on compile-time knowledge of ACCEPTS 03:20
TimToady indeed
smart matching is intended to be optimizable.
it might even make sense to turn ACCEPTS into a multi with lexical scope 03:21
the sort of dispatch that only cares about the pattern argument 03:22
sorear has a certain fondness for the CLOS notion of "there are no methods, only our multi sub" 03:23
TimToady if push comes to shove, I'm quite willing to make ACCEPTS a don't-touch primitive for optmizability
when 1 has to know its semantics
alternately though, it might be possible to decide teh semantics of ACCEPTS at CHECK time, and then optimize 'em 03:25
03:28 Guest27047 left
sorear rakudo: my ($foo) = (1 .. *).flat; say $foo; 03:35
p6eval rakudo 9993bb: OUTPUT«1␤»
03:40 vastak left 03:45 Schwern left 03:50 patspam left
dalek ecza: 6679769 | sorear++ | / (5 files):
Implement Match object generation
03:56
sorear Do I need to distinguish / $0 = [ x ] / from / $<0> = [ x ] /? 04:01
TimToady no
tylercurtis Wow. EXPR is scary. 04:04
TimToady just a couple loops around a lambda... :)
sorear The Perl 6 one in STD, or the PIR one in NQP? 04:05
IMO the latter is scarier ;)
tylercurtis sorear: good point. :) 04:06
04:39 QinGW left 04:40 QinGW1 joined 04:42 kjeldahl joined
sorear Should I have a MONKEY_TYPING.pm6? Or should I handle the use entirely in the compiler? 04:46
ash_ i image its more a compiler thing, or you could make it lexically scoped subs? would that work? 04:47
TimToady I suppose that depends on whether someone wants to monkey with MONKEY_TYPING. :) 04:48
(I'm fine with it in the compiler)
04:50 kjeldahl left 04:59 kaare joined, kaare is now known as Guest98246 05:09 meppl joined 05:28 qw3rty left 05:29 ash_ left 05:37 Guest98246 is now known as kaare_ 05:50 petdance left 05:57 plobsing left, wtw joined 06:05 c1sung joined 06:09 uniejo joined 06:13 baest joined 06:16 masak joined
masak oh hai, #perl6! 06:16
TimToady ohaio/ 06:17
tylercurtis \o, masak 06:18
TimToady I whacked on rosettacode.org/wiki/Number_reversal_game#Perl_6 some in kind of an interesting way 06:19
masak oh! it's Bill Gates' pancake flipping algorithm :) 06:21
sorear hello masak! 06:23
tylercurtis wonders, whenever reading discussion of naming conventions, whether he is the only person whose little finger hurts when using lots of underscores and capitals in variable/function names.
TimToady blames emacs
sorear wonders about <foo=!bar>
TimToady wonders about sourear 06:24
masak @jumbled-list[^$d] .= reverse; # this works? awesome!
TimToady *sorear
and it was in the original, so I can't claim it
well, I took out the spurious ()
masak :) 06:25
rakudo: my @a = 1..10; @a[^4].=reverse; say @a.perl
06:25 brxue left
p6eval rakudo 9993bb: OUTPUT«[4, 3, 2, 1, 5, 6, 7, 8, 9, 10]␤» 06:25
masak \o/
TimToady rakudo: my @a = 1..10; @a[0,2...8] .= reverse; say @a.perl 06:27
p6eval rakudo 9993bb: OUTPUT«[9, 2, 7, 4, 5, 6, 3, 8, 1, 10]␤»
diakopter sour ear
"not half unreadable once you get used to it". :) 06:29
kamsa: uhoi 06:33
masak I'm looking at the "declare variable in a postponed piece of code" idiom, and I just know I'll be using it a lot. 06:34
TimToady yeah, did it the other day with a given 06:35
sorear you mean like END my $x = 5; ?
diakopter wonders what chunk of all Perl 6 code ever executed (excluded the roast) has gone through p6eval 06:36
masak sorear: that's another place where it's possible.
06:37 mberends left
masak sorear: I can imagine using that one in one-liners. or more likely BEGIN my $sum = 0; 06:37
sorear masak: whart is "the idiom"?
TimToady see for example the link I just pasted
masak sorear: see TimToady's last few Rossetta Code entries.
sorear: the general pattern is that you declare a variable at a place in the code that is textually earlier but dynamically later than its first use/assigment. 06:38
sorear I see 06:39
TimToady rosettacode.org/wiki/Constrained_Ra...cle#Perl_6 is the most egregious
2nd example 06:40
sorear generally speaking niecza interprets foo my @x; as foo (ENTER { @x_slot := Array.new }, @x)
dukeleto howdy 06:45
06:48 qwebirc62872 joined
tylercurtis Hello. 06:48
sorear 2hello.
TimToady \ohaio 06:49
masak 4hello.
tylercurtis rakudo: my $foo = 'perl'; say 5.$foo; 06:50
p6eval rakudo 9993bb: OUTPUT«invoke() not implemented in class 'Perl6Str'␤ in main program body at line 22:/tmp/6TcBc8mMo5␤»
06:50 kjeldahl joined 06:52 s1n joined
dukeleto tylercurtis: what error would you expect? 06:55
tylercurtis dukeleto: I was expecting either a message saying you can't do that or for it to call 5.perl. 06:59
STD expects it to call 5.perl(well, more accurately, it expects q[my $termish = 'termish'; $here.$termish] to call $here.termish). 07:02
sorear that's probably Perl 5 leaking through 07:05
see S12:338 and S12:308 07:06
the correct form is $here."$termish"
07:07 cjk101010 joined
tylercurtis sorear: is viv incapable of handling $here."$termish"(), or should the instances of .$foo where $foo is a string in STD be removed? 07:08
sorear tylercurtis: it would probably not be hard to add $here."$termish" support to viv 07:09
07:10 tadzik joined 07:11 Ross joined 07:16 Ross left, Ross joined 07:27 bacek joined
tadzik hello hello 07:27
sorear hello 07:28
seen aloha
07:28 Ross left 07:30 aloha joined 07:34 Sanitoeter left
tylercurtis What's with the outdent on github.com/perl6/std/blob/master/STD.pm6#L4632? 07:35
moritz_ $a.$b takes $b as a code ref 07:36
07:37 ssm left
sorear Match generation is now fully working in niecza... 2x perf regression 07:39
oh, interesting, it's only a 10% regression with mono-sgen 07:40
dalek ecza: ba15f79 | sorear++ | / (6 files):
Implement basic augment syntax
ecza: bedd19a | sorear++ | / (3 files):
Implement {Match,Cursor}.at-{key,pos}
ecza: 064e443 | sorear++ | / (6 files):
Implement capturing for quantifiers and protoregexes
tylercurtis Precise GC! \o/
sorear tylercurtis: \o/ 07:41
tylercurtis Also generational GC! \o/
Actually, sgen is not fully precise according to developers.sones.de/2010/09/01/taki...or-a-walk/ "stacks and registers are scanned conservatively" 07:43
07:43 tadzik left
tylercurtis So, mostly-precise GC! \o/ 07:43
EXPR seems much easier to understand if I read the loop first. (and hopefully &reduce will be easier to understand once I better understand when it is called in the loop). 07:45
sorear I've been using sgen for a couple weeks now 07:51
it's usually a bit faster, but the 2x speed difference with the current niecza is... unexpected 07:52
tylercurtis Good night, #perl6! Tomorrow, I will hopefully find time to finish reading EXPR so I can start adding the appropriate actions to Bennu. 08:00
08:01 timbunce joined 08:08 tylercurtis left, f00li5h left 08:10 daxim joined
dukeleto perl6: say NaN.Rat 08:12
p6eval rakudo 9993bb: OUTPUT«-9.22337203685478e+18␤»
..pugs: OUTPUT«*** No such method in class Num: "&Rat"␤ at /tmp/gLwvJ5y5tF line 1, column 5 - line 2, column 1␤»
sorear cute
dukeleto i assume NaN.Rat should be NaN 08:13
08:16 sjn joined 08:18 f00li5h joined 08:23 meteorjay joined
dukeleto perl6: say 1i.Rat 08:24
p6eval rakudo 9993bb: OUTPUT«Method 'Rat' not found for invocant of class 'Failure'␤ in 'Rat' at line 2938:CORE.setting␤ in main program body at line 22:/tmp/mA0cNsDkHB␤»
..pugs: OUTPUT«0 + 1i␤*** No such method in class Bool: "&Rat"␤ at /tmp/HCjzmRZJyB line 1, column 1 - line 2, column 1␤»
08:25 azert0x joined
dukeleto what should 1i.Rat actually complain about? 08:25
dalek ast: 2f690f9 | leto++ | S32-num/rat.t:
[S32-num] Add fudged test for NaN.Rat
08:27 rcfox_ left 08:29 rcfox joined
sorear today's fun idiom: { say $/.pos } <!> 08:31
08:40 dakkar joined
masak prints, shoots, and backtracks. 08:41
dalek ast: 326ee0a | leto++ | S32-num/rat.t:
[S32-num] Add some tests for Rat representation of Inf
08:42
ecza: 88f2d4b | sorear++ | src/ (2 files):
More efficiently handle protoregexes that don't backtrack
08:44
ecza: e0c8d34 | sorear++ | lib/Kernel.cs:
Avoid method dispatch calling Sub subclasses
jnthn morning, #perl6 08:45
masak morning \o/ 08:47
masak streches a bit o /o/
s/ch/tch/ 08:51
08:52 thebird joined
jnthn stresses a bit 08:52
sorear hello jnthn 08:54
08:54 meppl left
sorear jnthn: I need a nice thread-friendly way of handling dispatch caches 08:55
jnthn sorear: Generally, I guess you want those to be fast to read, primarily. 08:56
sorear: I've not tested it yet, but in the 6model repo there's a sketched out multi dispatch catch
*cache
sorear: It uses an immutable/lock-free data structure approach to avoid locking, so it should have pretty good concurrency characteristics. 08:57
09:00 bacek left
sorear method dispatch is a hotspot in niecza 09:01
foreach (DynMetaObject k in GetMO().mro) { 09:02
if (k.methods.TryGetValue(name, out method)) {
// call it
I'd love to flatten that loop, by creating a flat method dispatch table per class at compose time
but you can add methods to Any at runtime 09:03
jnthn That's fine
They just don't make it into the flat table
09:03 bacek joined
jnthn We don't have to make augment efficient. 09:03
sorear What if I use augment to replace an existing method? 09:04
jnthn Then the table can be updated with the replacement.
sorear (also, my Any is defined as an empty class in very low-level code and is augmented about four times in the setting, but that could probably be changed)
jnthn It's not that the table is never re-built
masak blogs.perl.org/users/flavio_s_glock...n-net.html
jnthn It's more that the set of entries stays the same.
sorear it's the re-building that seems problematic to me 09:05
with threads involved
jnthn sorear: Maybe build a new one, and then CAS it in place; if you got beat, try again. 09:06
sorear ... 09:07
HOW COULD I HAVE FORGOTTEN CAS
jnthn ;-) 09:08
System.Threading.Interlocked class in .Net, fwiw.
sorear yeah
masak hastily googles CAS
sorear reads jnthn's latest blog
jnthn masak: Min concurrency model e CAS... 09:09
masak jnthn++! # groan
jnthn sorear: github.com/jnthn/6model/blob/master...chCache.cs # the MultiDispatch cache I sketched out 09:10
masak now niecza *has* to use CAS... :)
sorear In other news, niecza has now reached its goal of "10 times faster than viv" on the JSON-Tiny benchmark
masak sorear++
jnthn sorear++ # nice! 09:11
masak: 6model already is :-)
sorear I'd like to steal as much 6model stuff as I can...
jnthn Remember to send bug fixes upstream... ;)
sorear (note: this will help you too)
jnthn But, welcome. :-)
sorear: You're welcome to a 6model commit bit too, if that'll help.
masak I look forward to the day when we're comparing something like niecza to Rakudo, going "speed, or features?" 09:12
sorear may I have an ORIENTATION or HACKING to go along with the README? :) 09:13
sorear is looking at 6model
jnthn sorear: That's...a nice idea. I should really write one. 09:14
masak HACKME
sorear I should write a new one too 09:15
jnthn lol
masak: I so want to call it that now :P
sorear I hat one but it got pretty outdated :/
masak jnthn: I think you should.
jnthn Well, I do have a loooong train journey tomorrow. And another one on Wednesday. :-) 09:17
sorear 100us per loop iteration hmm 09:18
masak that time unit is not something that comes up a lot in here. :)
sorear I can't type \mu currently 09:20
I should be able to fix this, but XKB confuses me
09:21 gottreu left
masak μ # courtesy of Emacs :) 09:21
(I switched to TeX input mode and literally typed '\mu')
Emacs++
sorear wonders how likely a niecza program is to use 2^64 different method names in its lifetime 09:22
masak in toto or per class? :)
sjn µ (AltGr-m on my keyboard) 09:23
sorear .u µ
phenny U+00B5 MICRO SIGN (µ)
sorear .u μ
phenny U+03BC GREEK SMALL LETTER MU (μ)
sjn .u µ
phenny U+00B5 MICRO SIGN (µ)
sjn huh
sorear do they look the same to you? 09:24
sjn they do
masak here as well.
jnthn Look slightly different on my font.
sorear slightly different here.
sjn learned something new today :)
masak too 09:25
jnthn How aµsing.
sjn heheh
sorear .u HIRIGANA SYLLABLE MU
phenny sorear: Sorry, no results for 'HIRIGANA SYLLABLE MU'.
sorear .u HIRIGANA LETTER MU
phenny sorear: Sorry, no results for 'HIRIGANA LETTER MU'.
jnthn sjn: I hear there's a Perl 6 event in Oslo tomorrow... ;-)
09:26 goksie joined
sorear .u HIRAGANA LETTER MU 09:26
phenny U+3080 HIRAGANA LETTER MU (む)
sjn jnthn: trying to get more people involved :)
sorear that's a cooler mu, IMO
masak indeed.
jnthn sjn: :-) 09:27
sjn goes for some br^H^Hlunch
mathw o/ 09:32
masak \o 09:35
daxim ム it's private. 厶
sorear What's the first one? 09:36
daxim katakana mu
masak \㋡/ 09:37
daxim like in ゲーム
sorear no, the second is katakana mu
er wait sorry
asked backward
what's the second?
daxim private 09:39
know your radicals
09:39 meppl joined
daxim modern form is 私 09:39
09:40 tadzik joined
masak ooh. goes for hanzi too, it seems. 09:40
perhaps not too surprising.
09:53 ruoso left 10:03 QinGW1 left 10:08 Mowah joined 10:41 jhuni joined 10:51 brxue joined 10:52 svetlins left
brxue hello, I compiled perl6 rakudo star just now, It seems perl6 cost about 1 or 2 seconds to start up? 10:54
I mean the time between enter 'perl6' and it pops up '>'
jnthn brxue: Yes, Rakudo startup is currently around that order of magnitude. 10:55
masak depends on your machine, but yes, it sounds about right.
10:55 Kodi joined
jnthn brxue: It should improve drastically. 10:56
brxue: We have to build a load of stuff at startup at the moment that, in the future, we'll build at compile time, serialize and then just need to deserialize at startup. Should give quite a win, but it's kinda hard to get right. :-) 10:57
brxue oh, thanks for your explaination 10:58
anyway, perl6 is so exciting 10:59
11:10 goksie left
masak we think so too :) 11:10
11:11 f00li5h left, f00li5h joined, goksie joined
dalek ecs: 4517a6b | KodiB++ | S32-setting-library/Containers.pod:
[S32::Containers] Dropped the :replace argument to .grab and .grabpairs.

  $bag.grab(5, :replace) is better written as $bag.pick(5, :replace).
11:12
Kodi Is there a real PIR opcode I can use in place of the $P0[$P1] sugar? 11:14
11:15 \xF0 left 11:16 \xF0 joined 11:19 satyavvd joined 11:22 Infinoid left, Infinoid joined 11:27 mikehh left 11:32 testilbot joined
moritz_ $P0[$P1] desugars to a get_pmc_keyed vtable called 11:34
11:36 sftp joined
Kodi Oh, thanks. 11:47
masak moritz_: I've applied the enums patch locally, and it builds fine. doesn't pass any more tests in t/spec/S12-enums/basic.t, though. 11:54
moritz_: I'm thinking I might go over those tests and see which ones are still valid, and if any needs adding. 11:55
11:58 satyavvd left
masak this person seems to be asking something: twitter.com/func6996/status/24375483494 12:00
but what?
mathw masak: are there any languages you *don't* speak?
Now I see you tweeting in Japanese 12:01
at least Ithink it's Japanese
masak mathw: :)
mathw: I must confess, I don't speak Japanese.
Google Translate enhances my abilities a bit.
mathw lol
you clearly speak more of it than I do
masak if it round-trips, I trust it enough to tweet it. :)
moritz_ masak: I seem to recall that the enum tests tracked the old spec 12:02
masak I can believe that. I think they'll need a bit of revision. 12:03
I can do that later today. don't know how big a task it'd be.
it might require some thought, and I tend to avoid or postpone thought in my coding :)
12:04 plobsing joined
moritz_ :-) 12:04
jnthn The enum tests have, afaik, had any love (or updates) since the last enum spec revision. 12:09
They're probably woefully out of date. Not to mention that I considered various of them wtf-ish before...
takadonet morning all 12:11
masak morning, takadonet
I feel better about the current version of the enums spec than about any prior to it. it incorporates any feedback I've ever given on enums as a result of using them in application code. 12:13
jnthn o/ takadonet
12:33 plobsing left, smash joined
smash hello everyone 12:34
masak smash! \o/ 12:35
[Coke] ~~ 12:42
jnthn ...what do you want to be smart-matched against? :-) 12:43
[Coke] <CENSORED>
sometimes I hate this channel.
masak sorry... :) 12:44
rakudo: sub postfix:<~~>($n) { say "$n says hi!" }; "<[Coke]>"\ ~~ 12:45
p6eval rakudo 9993bb: OUTPUT«<[Coke]> says hi!␤»
masak you need the unspace there to make it work.
:)
tadzik dull day :| 12:49
12:49 wamba joined
masak as Mondays go, it's quite alright. 12:50
but let's start a discussion, if that helps: what do we want to accomplish prior to the next Rakudo monthly release? 12:51
Kodi masak: Well, I'm making good headway on container types for hashes. 12:52
tadzik I'd like a performance-usable read()/write()
Kodi Right now I'm passing tests for KeyHash, KeySet, and KeyBag.
masak whatever that means, it sounds good :)
tadzik hides
masak Kodi++
Kodi: ok, what I thought it meant, then.
tadzik , from hideout "so File::Copy would make sense"
masak tadzik: indeed. I'd like to see that, too. 12:53
pmichaud++ left a clue in the backlog. I think improving perf means trying that clue out in practice.
tadzik github.com/tadzik/perl6-Module-Tool...all.pm#L36
for this is just too ugly to be tolerated :(
in fact, I'm shameful for having this in a git history 12:54
12:54 patspam joined
tadzik so maybe: what particular features are we missing, and what of that list can we accomplish? 12:55
there's a list I think
masak here's pmichaud's clue: irclog.perlgeek.de/perl6/2010-09-11#i_2814518 12:56
I don't know yet if it's just a simple question of substituting one word for another.
jnthn masak: moze byt :-)
masak: It sounds quite feasible that it could be that simple. 12:57
tadzik will changing the container make copying byte-by-byte faster?
jnthn: did you mean: Może być? :)
masak here we go :)
tadzik: anyway, feel free to try the above pmichaud tip on Rakudo. if it builds and passes spectests, I'll happily apply it for you.
tadzik oh, in ROADMAP: Really important items -- module installer
jnthn I meant môže byť but couldn't be bothered with all the marks. :P
tadzik masak: I can try 12:58
masak I promise to work on pls in the coming week. last time I did it felt really hopeful.
jnthn pls do
masak next up is handling dependencies properly.
last time I tried I just managed to create a lot of test failures. I believe I was too tired to do things properly.
tadzik well, we have a module installer 12:59
and I think it even works on windows
masak that's good news.
tadzik I even wanted jnthn to check that out :)
tadzik gives a suspicious look
13:01 plainhao joined
jnthn masak: Too tired, or too full of good noms? :-) 13:02
Or have you hacked on proto since $last-visit? :-)
masak :) 13:03
aye, I hacked a bit on pls a week or so ago. 13:04
jnthn Oh, nice.
masak together with tadzik++, who helped triage different projects, I believe.
tadzik masak: has T @.contents; -- there should be this RIA?
masak tadzik: no, I'll show you where. 13:05
jnthn Somebody should really imeplement compact arrays. :-)
masak hold on.
tadzik: actually, now I don't see what pmichaud meant. 13:07
tadzik (:
masak tries to read the logs again 13:08
tadzik perl6: my @a; say @a.PARROT
p6eval rakudo 9993bb: OUTPUT«Array␤»
..pugs: OUTPUT«*** No such method in class Array: "&PARROT"␤ at /tmp/bk8o1ksqq7 line 1, column 12 - line 2, column 1␤»
tadzik pff
masak pugs doesn't have a .PARROT method? shocking!
tadzik Nice to have items -- module versioning and download -- what does that mean? 13:10
jnthn use Foo:ver<42>; 13:11
tadzik hmm
moritz_ which dies if no version >= 42 is available
tadzik and download?
moritz_ downloading stuff is the task of the toolchain, not of the compiler 13:12
tadzik but what does it mean in this context?
moritz_ ./installer install JSON:ver<1.0> 13:13
tadzik hmm 13:14
I can do it in neutro, or whatever
masak: I actually think neutro can be turned into something using App::Pls as a logic, not sure how much turning it would be, and if the "turning" won't become "reimplementing proof-of-concept" 13:15
masak tadzik: sounds interesting.
13:15 kaare_ left
masak also remember that proof-of-concept is just a proof of concept so far. 13:15
13:16 uniejo left
tadzik I know 13:16
(which is barely proving the concept :P)
13:17 Patterner left
tadzik masak: I'm also wondering how much sense does "fetched" have, as long as we need either to clone, or to pull, and you never know if something is actually fetched 13:18
13:19 ZadYree joined, jhuni left 13:22 am0c^ joined 13:27 Psyche^ joined, Psyche^ is now known as Patterner
tadzik masak: hmm, I now thought: instead of working at adjusting neutro to App::Pls needs, maybe it'd be better to work at Module::Tools to be a suitable Pls backend (frontend? worker?)? 13:28
masak also sounds worthwhile.
pluggability++
tadzik currently, there are just a bunch of subs: build(), install(), test() etc 13:31
masak sounds kinda similar. 13:32
tadzik bah, I wish some apps had --shut-up. prove's --QUIET is not enough 13:34
does windows have something like redirecting to /dev/null?
moritz_ I think > nul 13:35
TAP::Harness->new({ verbosity => -1, merge => 1 }) 13:36
daxim en.wikipedia.org/wiki/NUL: 13:38
tadzik well, I'm running prove via run()
no TAP in P6 yet, unfortunately
13:40 Holy_Cow joined 13:43 patspam left, qwebirc62872 left 13:46 PacoLinux joined 13:47 satyavvd joined 13:50 satyavvd_ joined 13:52 satyavvd left, satyavvd_ is now known as satyavvd 13:54 plobsing joined
jnthn -25 MSVC 13:54
oops, wrong window
14:06 patspam joined 14:08 risou joined 14:11 rcsheets joined 14:15 uiteoi joined
tadzik masak: I pushed a bugfix to pls, bug could possibly prevent Math::Model from building 14:15
masak checking.
that looks sane to me. 14:16
tadzik++ 14:17
tadzik it caused SVG::Something not to build in Module::Build
so I fixed this there and there
masak thanks.
inter-project dependencies are still broken in pls, though. need to look at that at some point. 14:18
14:20 Kodi left 14:21 b0m1ro joined
tadzik broken in what way? 14:22
masak hm, 'not yet implemented' would better describe them.
tadzik hmm 14:23
masak they work in the test suite, but not in proof-of-concept.
14:27 svetlins joined 14:36 wtw left 14:39 risou_ joined
tadzik colomon: mind moving mandelbrot scripts to bin/, so they can be neutro-installable? 14:40
masak: same goes for pun btw 14:41
and maybe tardis 14:42
masak tadzik: gotcha.
14:42 risou left
ZadYree perl6: my @array = 4, 5, 6; say @array[1] 14:43
p6eval pugs, rakudo 9993bb: OUTPUT«5␤»
14:45 Trashlord joined
ZadYree perl6: my @array = 4, 5, 6; say $array[1] 14:45
p6eval rakudo 9993bb: OUTPUT«===SORRY!===␤Symbol '$array' not predeclared in <anonymous> (/tmp/ReBL6fBSkx:22)␤»
..pugs: OUTPUT«*** ␤ Unexpected "["␤ expecting "::"␤ Variable "$array" requires predeclaration or explicit package name␤ at /tmp/AkQafPOkM0 line 1, column 32␤»
masak rakudo: my @a = 1..5; @a[ ^3 ] xx= 2; say @a.perl
p6eval rakudo 9993bb: OUTPUT«[1, 2, 3, 4, 5]␤»
masak huh. 14:46
TimToady std: my @array = 4, 5, 6; say $array[1]
ZadYree ouch
p6eval std 32123: OUTPUT«===SORRY!===␤Variable $array is not predeclared (did you mean @array?) at /tmp/Wfp04qZA0o line 1:␤------> my @array = 4, 5, 6; say $array⏏[1]␤Check failed␤FAILED 00:01 119m␤»
ZadYree I don't know if perl6 is for me ^^
TimToady you'll get used to it in about 1 day
and then you'll wish Perl 5 did it that way
masak ZadYree: for what it's worth, you're not the first one to say that.
ZadYree hehe
masak ZadYree: but as TimToady points out, people usually come around. 14:47
TimToady but rakudo's message is LTA (Less Than Awesome)
masak submits rakudobug
ZadYree++
TimToady ZadYree: you're stuck now, you've already contributed :) 14:48
ZadYree hhaha 14:49
aight
i'm pretty used w/ $array[$_]
TimToady I'd had more experience with it than you. :)
mathw You get used to it
real quick
14:49 rcsheets left
masak there are advantages to @array[$_] too, trust us. :) 14:50
TimToady you get used to it the first time you don't have to say @{...}
mathw absolutely
14:50 drbean left
mathw when you get what $array[$_] means in Perl 6 and what it's for :) 14:50
there is much rejoicing
or there was in my head anyway
14:50 drbean joined
masak TimToady: it's funny to read "I'd had more experience with it than you. :)", flipping back between knowing and (emulating) not knowing who you are. :P 14:50
ZadYree haha right hehe 14:51
masak s/back/back and forth/
ZadYree perl6: my $arr = ["aa", "bb", "cc"]; foreach($arr) {say $_ }; 14:52
p6eval rakudo 9993bb: OUTPUT«===SORRY!===␤Confused at line 22, near "foreach($a"␤»
..pugs: OUTPUT«*** ␤ Unexpected "{"␤ expecting operator␤ at /tmp/uPse3mAaJP line 1, column 45␤»
ZadYree well
so @{}? :P 14:53
PerlJam ZadYree: there is no foreach
ZadYree huh?
14:53 ash_ joined
tadzik just for 14:53
masak ZadYree: there's been a few changes... :)
tadzik rakudo: my $arr = ["aa", "bb", "cc"]; for $arr { .say }
p6eval rakudo 9993bb: OUTPUT«aa bb cc␤»
ZadYree ouch
masak one iteration.
ZadYree looks like ruby, js and all this shitty stuff xD 14:54
tadzik hrm
...excuse me?
masak tadzik: it's the $
tadzik rakudo: my $arr = ["aa", "bb", "cc"]; for $arr.list { .say }
masak tadzik: makes it not flatten.
p6eval rakudo 9993bb: OUTPUT«aa␤bb␤cc␤»
tadzik there we go
TimToady perl6: my $array = <a d e r Y Z>; say $array[5,0,1,4,3,2,2], '++'
tadzik ZadYree: you can have your say $_ if that's what you mean
p6eval pugs, rakudo 9993bb: OUTPUT«ZadYree++␤»
ZadYree ok
well, the problem is every perl <6 won't work anymore 14:55
tadzik it's not supposed to be backwards compatibile
TimToady that was the whole point
masak backwards incompatibility was part of the original deal.
ZadYree use perl5; or something like that?
14:55 Trashlord left
masak and Perl 5 is still there. 14:55
very much so, in fact.
TimToady we all still program in Perl 5 a lot 14:56
ZadYree Ok I see
yeah
14:56 svetlins left
tadzik ZadYree: perl6 compiler is not the replacement for a Perl 5 compiler, to explain it easily 14:56
ZadYree ok
tadzik ZadYree: just curious, is autoboxing "shitty stuff" for you, or what was that about? 14:57
14:57 Trashlord joined
ZadYree well, in fact I'm pretty afraid of thise type things 14:57
$foo.array or so
s!thise!these!
TimToady rakudo: my $arr = ["aa", "bb", "cc"]; for @($array) { .say } 14:58
p6eval rakudo 9993bb: OUTPUT«===SORRY!===␤Symbol '$array' not predeclared in <anonymous> (/tmp/qr6A8BRE1E:22)␤»
TimToady rakudo: my $arr = ["aa", "bb", "cc"]; for @($arr) { .say }
masak rakudo: foreach (1, 2, 3) {}
TimToady that's more like p5
p6eval rakudo 9993bb: OUTPUT«aa␤bb␤cc␤»
rakudo 9993bb: OUTPUT«===SORRY!===␤Unsupported use of 'foreach'; in Perl 6 please use 'for' at line 22, near " (1, 2, 3)"␤»
tadzik oh, you'll love them once you see 'em
masak std: foreach (1, 2, 3) {}
p6eval std 32123: OUTPUT«===SORRY!===␤Unsupported use of 'foreach'; in Perl 6 please use 'for' at /tmp/Sv3ikgiu3S line 1:␤------> foreach⏏ (1, 2, 3) {}␤Parse failed␤FAILED 00:01 114m␤»
TimToady rakudo: my $arr = ["aa", "bb", "cc"]; for @$arr { .say } 14:59
p6eval rakudo 9993bb: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at line 22, near "@$arr { .s"␤»
TimToady I presume that bug is logged
masak which one?
TimToady but @$arr is supposed to work too
masak @$arr is in RT, yes.
TimToady std: my $arr = ["aa", "bb", "cc"]; for @$arr { .say }
p6eval std 32123: OUTPUT«ok 00:01 120m␤»
jnthn @$arr as an alias to @($arr) is not nyi
TimToady and that's even more like p5
tadzik rakudo: (1, 2, 3, 4).grep({$_ %% 2}).map({ $_ + 1}).reverse.join.say
p6eval rakudo 9993bb: OUTPUT«53␤» 15:00
tadzik ZadYree: try to write such a chain in Perl 5 and you'll see what I mean
15:00 b0m1ro left
ZadYree haha yeah 15:00
15:00 Holy_Cow left
tadzik I alredy forgot which argument the array is, in Perl 5 functions 15:00
15:00 ruoso joined
ZadYree hum 15:01
perl6: my $arr = ["aa", {"foo" => "bar"}]; say $arr->[1]->{foo}; 15:02
p6eval rakudo 9993bb: OUTPUT«===SORRY!===␤Unsupported use of ->(), ->{} or ->[] as postfix dereferencer; in Perl 6 please use .(), .[] or .{} to deref, or whitespace to delimit a pointy block at line 22, near "1]->{foo};"␤»
..pugs: OUTPUT«*** ␤ Unexpected "->["␤ expecting "::", term postfix, operator, ":" or ","␤ at /tmp/DubndoAx96 line 1, column 45␤»
tadzik you don't need to
ZadYree what's the equivalent
tadzik ZadYree: you read to read perlgeek.de/en/article/5-to-6 15:03
ZadYree ya i'm reading it :P
masak rakudo: my $arr = ["aa", {"foo" => "bar"}]; say $arr[1]{foo}
p6eval rakudo 9993bb: OUTPUT«Could not find sub &foo␤ in main program body at line 22:/tmp/NhCwh0bPK0␤»
tadzik rakudo: my $arr = ["aa", {"foo" => "bar"}]; say $arr[1]<foo>
masak rakudo: my $arr = ["aa", {"foo" => "bar"}]; say $arr[1]<foo>
tadzik ...first!
p6eval rakudo 9993bb: OUTPUT«bar␤»
masak :)
I was deterred by my own sloppiness :)
TimToady perl6: my $arr = ["aa", {foo => "bar"}]; say $arr.[1].<foo>; # can use . if you like 15:04
masak ZadYree: $arr[1]{"foo"} and $arr[1]<foo> are the same.
p6eval pugs, rakudo 9993bb: OUTPUT«bar␤»
ZadYree ah I see
masak ZadYree: generally, one needs to quote hash keys when indexing, as opposed to in Perl 5.
TimToady <foo bar baz> is just qw/foo bar baz/, and works as a constant subscript
->{foo} was an underpowered and error prone construct 15:06
tadzik pardon my offtopic, has anybody seen "Salt", the movie?
masak plans to
TimToady I suppose someone has
15:06 b0m1ro joined
tadzik well, someone here who can tell me is it worth it 15:06
TimToady Ohh, rosettacode.org/wiki/Category:Perl_6 now has more than 200 entries, and spills to a second page \o/ 15:07
except for the fact that I now get to monitor two pages
masak tadzik: www.rottentomatoes.com/m/1213717-salt/
15:10 b0m1ro left
tadzik hmm, I suppose I'll go anyway 15:10
TimToady rakudo: class Foo {}; say Foo.new.perl; 15:16
p6eval rakudo 9993bb: OUTPUT«Foo.new()␤»
TimToady rakudo: class Foo {...}; say Foo.new.perl;
p6eval rakudo 9993bb: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤ in main program body at line 1␤»
TimToady rakudo: class Foo {...}; say Foo.new(42).perl;
p6eval rakudo 9993bb: OUTPUT«42␤»
TimToady o_O
masak O_o 15:17
masak submits rakudobug
15:17 b0m1ro joined
TimToady pugs: class Foo {...}; say Foo.new.perl; 15:17
p6eval pugs: ( no output )
masak TimToady: what should 'class Foo {...}; Foo.new' do?
TimToady allow an additional class Foo {} later, methinks 15:18
but otherwise act empty
masak but instantiable?
15:18 goksie left
TimToady if the ... runs, it runs at compile time 15:18
jnthn huh, I thought it just declared the name as "should be declared sometime later" and whined if that didn't happen.
Maybe it forgets to whine. 15:19
masak submits a rakudobug about that too
jnthn My intention when I put it in was that class Foo {...}; without a later non-stub class Foo would fail to compile though.
TimToady perhaps class {...} really means class { method new {...} }
as far as runtime goes
jnthn TimToady: I'm not convinced it should make it until runtime. 15:20
TimToady std: class Foo {...}; Foo.new.perl
p6eval std 32123: OUTPUT«ok 00:01 115m␤»
jnthn Could be more semantic than that. :-)
I guess the alternative is that it creates and installs a Foo, but it's not yet composed. 15:21
s/the/an/
TimToady I guess there are two entirely different reasons for stubbing a class
named (<compile run>) ~ " time"
I suppose if ... is reserved for compile time, you can always get run time with ::Foo 15:22
masak aye. 15:23
TimToady otoh, there could be other reasons for stubbing at compile time than just wanting a real definition later in the same file
jnthn Oh, I'd always seen the "class Foo { ... } so I can write Foo" as just an up-front promise that you'd define a Foo later but wanted to be able to talk about it now. 15:24
TimToady well, but that doesn't say whether it's defined at ctime or rtime
in that view, it just lets you drop the ::
jnthn As in, define one later in the same compilation unit.
TimToady that would generally be the case 15:25
is there a reason to make it mandatory?
s/reason/good enough reason/ 15:26
jnthn Well, at lesat partly that we don't have to worry about the answer to "so what is installed when I write class Foo { ... }"
I can think of answers, but not any that I really like. 15:27
Well, actually I quite like the "uncomposed" answer.
TimToady you have to mark the symbol table entry as a stub in any case
15:28 b0m1ro left
jnthn Troo. 15:28
masak so... no bug report? :)
TimToady and run-time is better for dependency injection
masak pushes the undo button on that bug report 15:30
15:32 plainhao left 15:33 plainhao joined
jnthn masak: I'm not quite sure everything is peachy... 15:34
15:34 Ross joined
jnthn masak: The behavior you showed is odd at best. 15:34
TimToady he meant the 2nd report
masak well, one bug of two got in.
jnthn Oh, OK 15:35
jnthn got slightly distracted by $dayjob :-)
ooh!
redgate++ :-D 15:36
(boss with contacts)++
15:36 satyavvd left
jnthn RedGate just sponsored me a copy of their .Net profiler for using in 6model work :-) 15:36
tadzik yay!
TimToady redgate++
\o/ frabjous day 15:37
tadzik specifically for 6model? Does this work per-project?
jnthn is very happy about that. It's already helped me understand performance stuff in the meta-model design.
15:38 Holy_Cow joined
jnthn tadzik: No, it's per-user actually, but it's my work on that which was interesting. 15:38
jnthn looks forward to implementing the new multi-dispatch stuff and cache and giving that a workout under the profiler, to see how it does. 15:39
15:41 icwiener joined
sorear good * #perl6 15:43
TimToady *.good 15:44
sorear jnthn: I remember the real problem now
jnthn: invalidating the correct classes seems to require a bunch of subclass weak refs
TimToady actually, now.good, since we're in the same TZ
sorear I guess maybe that could work if I had a Global Monkey-Typing Lock 15:45
(also, the .Net weak ref system sucks.)
ash_ rakudo: say localized-greeting;
p6eval rakudo 9993bb: OUTPUT«Could not find sub &localized-greeting␤ in main program body at line 22:/tmp/SyuNJCm0d3␤»
jnthn sorear: Maybe some pub/sub thing would be better than weak refs.
ash_ would be fun to add that to the eval bot :P 15:46
colomon tadzik: is it as simple as moving to bin, or does something else need to be done? I certainly don't mind moving them....
sorear jnthn: explain?
jnthn sorear: As in, an event based model
Oh, I guess in .Net you still need weak refs for it though...
tadzik colomon: no, just moving. and 755 would be nice too 15:47
jnthn So back to square one
15:47 mj41 left
colomon tadzik: what, you think the executables should be executable?!? ;) 15:47
tadzik :)
sorear jnthn: how would events work?
TimToady wonders if .pick(5, :replace) should be renamed pick-xx(5) 15:48
tadzik btw, does anyone have an idea of how chmod works? Is there a syscall, or something?
jnthn sorear: Sub-classes subscribe to be notified of changes to their parent classes.
sorear: Though it gives a more general model
sorear: So anyone could subscribe to know about changes to a class. 15:49
Could be an optional part of the MOP perhaps.
sorear: I've not thought too much about the details, but it could work.
colomon tadzik: done. 15:50
15:50 mj41 joined
tadzik colomon++ 15:50
15:52 justatheory joined
tadzik ouch 15:52
colomon: how about #!/usr/bin/env perl6 at the top? 15:53
sorear tadzik: yes, chmod is a syscall.
tadzik sorear: do you have an idea is it available in rakudo, under some different name? 15:54
sorear there's always pir::dlfunc
jnthn rakudo: chmod 'README', 700 15:55
p6eval rakudo 9993bb: OUTPUT«Could not find sub &chmod␤ in main program body at line 22:/tmp/VbPOkNDtuq␤»
jnthn Oh, I thought that was in.
tadzik time for File::Chmod then I guess
jnthn rakudo: pir::new('OS').chmod('README', 700)
p6eval rakudo 9993bb: ( no output )
jnthn rakudo: pir::new('OS').chmod('README', 700); say "lived"
p6eval rakudo 9993bb: OUTPUT«lived␤»
jnthn tadzik: Lajk that. :-) 15:56
ash_ lajk?
sorear is slowly pushing niecza towards a "$!x means $!Class::x and you have privacy from your children" modle
ping Alias_
jnthn ash_: "like" :-)
15:57 ash_ left 15:59 uiteoi left
masak ash_ is probably from a locale where 'j' is not pronounced [y] :) 16:01
tadzik and 'a' like [ey] 16:02
shortcircuit TimToady: This may be useful for you, to save you from monitoring two pages: rosettacode.org/wiki/Rosetta_Code/F...nted_tasks 16:06
TimToady: Not strictly as-is, but as an example for how to get that data programmatically.
TimToady shortcircuit: thanks, is there a way to get any addition marked Perl 6 to show up in my watch list? 16:08
jnthn masak: Oh, *those* places. :) 16:10
16:11 risou joined
shortcircuit TimToady: That has been a feature I've wanted automatable for years. Theoretically, Semantic MediaWiki should enable RSS feeds based on semantic queries, but I wasn't satisfied with the results the last time I did it. 16:12
pmichaud good morning, #perl6
16:12 risou_ left
TimToady morning.good 16:13
shortcircuit TimToady: What you can probably do is use the MediaWiki API to monitor that category, and make sure that all entries in it are added to your user's watch list.
TimToady: That'd require polling the category, though. (Be gentle, there! :) )
16:15 am0c^ left
TimToady well, just a list of anything recently touched in <lang perl6> would be useful; I'll poke a bit more, and yes, I've seen the performance discussion on #rosettacode :) 16:15
masak swimming & 16:16
16:16 masak left
tadzik cineming & 16:16
16:16 tadzik left
shortcircuit TimToady: That kind of performance thing happens every 9-18 months. I upgrade and/or tune, and then things settle for a while. A check every ten minutes would probably be just fine, if you needed it that often. 16:18
TimToady I'm thinking more like once or twice a day :)
shortcircuit Yeah, I don't think anyone would notice. :)
TimToady just don't want any Perl 6 code to slip past unaudited 16:19
shortcircuit I once had a maintenance bot spin, with hooks on all its functions calling another function that slept a certain number of seconds based on the server's load average.
16:28 plobsing left 16:29 spq1 joined 16:31 [particle] left 16:32 [particle] joined 16:37 spq1 left 16:39 tylercurtis joined 16:50 envi^home left 16:55 kjeldahl_ joined 16:56 kjeldahl left 16:57 dakkar left 16:58 meraxes joined 16:59 mantovani left, cls_bsd left, mantovani joined, cls_bsd joined 17:01 daxim left 17:04 sahadev joined
dalek ecza: 9f6189f | sorear++ | lib/ (2 files):
Cheat a bit with field access in the kernel
17:07
ecza: 72a824b | sorear++ | lib/Kernel.cs:
Use a MRO cache
17:09 icwiener left 17:12 Chillance joined 17:13 risou_ joined, risou left 17:17 plobsing joined
pmichaud I'm getting a ton of spectest failures with the latest parrot... known? 17:23
17:24 goksie joined 17:25 vapace joined 17:26 patrickas joined
patrickas o/ 17:26
TimToady: About the series crashing before producing enough elements in 0,0.001 ... 20, I think iti s a gather take issue that's way over my head :( 17:27
17:28 Axius joined
patrickas The following seems to dies the same way: sub foo () { gather { my $c=0; loop { $c = $c+0.001; take $c; } } } ; say $_ for foo(); 17:28
pmichaud ah, that sounds more like an iterator / list issue 17:38
sorear sounds more like the fact that the garbage collector is C-recursive 17:39
pmichaud right, the ultimate problem is the recursive gc
TimToady perlmonks appears to be down
pmichaud but still we don't want that to be holding 20,000 elements either
patrickas should I masak it ? 17:40
pmichaud how far does it get before crashing? 17:41
patrickas on my pc around 4.0xx
pmichaud okay
yes, I think it's okay to report it as a rakudobug
I'll look at it after lunch 17:42
patrickas BTW whith a while loop it seems to last a bit longer before dying
pmichaud hmmm
that doesn't make a lot of sense to me, but oh well :)
patrickas sub foo () { gather { my $c=0; loop { $c = $c+0.001; take $c; } } } ; my $s = foo(); say $_.shift() while($s);
pmichaud oh, like that
patrickas well It may just be a coincidence
pmichaud yes, that doesn't surprise me.
while is more efficient than for, there. 17:43
oh, I think I know what's happening. 17:45
I think we definitely need to null out registers in the case of for loops
I guess I'll add that to PAST::Compiler in a bit 17:47
that's going to be a little tricky -- have to make sure we don't null registers that correspond to lexicals 17:49
jnthn
.oO( Need to stop storing lexicals in registers... )
17:51
pmichaud jnthn: that too. Or I can just remove the parts of PAST::Compiler that try to optimize to re-use those registers.
i.e., to never use a lexical register for anything but declaring it 17:52
(and thus it never gets null'd)
jnthn pmichaud: I was more advocating a Parrot change there than just a PAST::Compiler one. :-)
pmichaud jnthn: yes, I followed that :)
I'm just speculating that a PAST::Compiler change will occur much sooner than that Parrot change. 17:53
jnthn Indeed.
sorear I've switched *to* storing variables in numbered registers, and it feels like an improvement
what do you mean it's not?
17:53 Axius left
jnthn sorear: Storing lexicals in an indexed storage is fine. 17:54
sorear: But that shouldn't be the same one that all the temporaries live in.
pmichaud sorear: right now parrot maps lexical symbols to call-frame registers
which means that if you null the register, you null the lexical too
it's the difference between 17:55
.lex '$x', $P0
null $P0
and
$P0 = find_lex '$x'
null $P0
I'm wondering if any of the PAST::Compiler changes are going to want/need a deprecation cycle, though. :( 17:57
maybe I make it a compiler option... "null temporaries" or something like that.
that's probably safer and more flexible in the long run 17:58
17:59 rblackwe joined
pmichaud afk, lunch 17:59
17:59 meppl left 18:02 cdarroch joined, cdarroch left, cdarroch joined
timbunce I spotted this old quote from TimToady recently: "The usability of a computer language is inversely proportional to the number of theoretical axes the language designer tries to grind." That made me smile and wonder how many theoretical axes perl6 is trying to grind :) 18:04
18:04 Axius joined
PerlJam timbunce: none! 18:06
timbunce: it let's the programmer grind his own axe. 18:07
s/'//
18:07 cjk101010 left
timbunce PerlJam: A language-axe grinding toolkit :) 18:07
flussence it's got dates and complex numbers, so it at least does the x/y/t axes :) 18:08
18:09 Axius left 18:11 Axius joined
TimToady fg 18:18
diakopter current: no such job
18:19 hercynium joined, hercynium left, hercynium joined 18:22 risou_ left 18:28 Axius left 18:32 newbod joined 18:46 azert0x left 18:48 alester left 18:50 newbod left 18:53 mberends joined 18:58 masak joined
masak ahoy! 18:58
mberends \o masak !
18:58 sdziegie joined
masak mberends! \o/ 18:58
18:58 sdziegie left
patrickas masak! 18:59
masak !
patrickas that's short for YAYITSMASAK!
masak \x[EXCLAMATION MARK] 19:00
19:00 sdziegie joined
masak or is that \c[]? I forget. 19:00
sorear \c[]
masak thanks sorear++
jnthn
.oO( \c[EXCLAMATION MASAK]
19:03
)
masak :)
tylercurtis thinks he understands how EXPR works now. :) 19:06
TimToady offers his condolences
tylercurtis It turned out surprisingly easy to understand when I read the loop before looking at &reduce. 19:07
masak TimToady's keynote is online now: www.presentingperl.org/ye2010/keynote/ 19:08
19:09 plainhao left 19:10 hercynium left
PerlJam where are the slides? 19:12
masak++ btw
19:12 Mowah left
masak mst++ twitter.com/shadowcat_mst/status/24397016927 19:12
patrickas what should should '07' ... '10' return ? 19:14
rakudo: say ~( '07' ... '10' ); # this is should be wrong
p6eval rakudo 9993bb: OUTPUT«07 08 09 10␤»
19:14 Intensity joined
patrickas I guess it should be : 07 06 05 04 03 02 01 00 17 16 15 14 13 12 11 10 #is my understanding correct ? 19:15
19:15 Raynes left
TimToady why would it do that? 19:16
masak o.O
00 17?
TimToady I think the digits have to agree on a direction 19:17
patrickas If the start and stop strings are the same length, this is applied at every position, with carry.
'aa' ... 'zz' # same as 'a' .. 'z' X~ 'a' .. 'z'
TimToady carry implies coherence
masak I should hope so! 19:18
patrickas '07' ... '10' # same as '0' .. '1' X~ '7' .. '0'
TimToady no
19:19 timbunce left
patrickas the first two lines are form the spec, the last line is my interpolation of the spec :-) 19:19
19:19 Raynes joined
PerlJam patrickas: you are clearly insane :) 19:20
patrickas perlcabal.org/syn/S03.html#line_2018
TimToady nah, he's just an attentive reader :) 19:21
patrickas PerlJam: Thanks! :-)
TimToady though the two are not mutually exclusive
PerlJam patrickas: Well, your presence on #perl6 more than qualifies you for insanity. I'm just being redundant by stating it. 19:22
masak PerlJam: you are clearly redundant :)
patrickas PerlJam: implementing the convoluted series operator is just icing on the insanity cake :-)
dalek ecza: 0c06bec | sorear++ | / (3 files):
Use a native Boolean for List $!flat
19:23
ecza: bde27dd | sorear++ | lib/Kernel.cs:
Pack bools in Variable in memory
ecza: af4b265 | sorear++ | src/Optimizer/RxSimple.pm:
Optimize cut literals and charclasses
TimToady I suspect we should add a rule that says if all the digits are, er, digits, then we force it to 0..9 semantics 19:24
19:25 Chillance left
TimToady we also need consistent ordering somehow 19:25
patrickas TimToady: but then what happens about using this to count in different bases ?
19:25 timbunce joined
patrickas Hence, to produce all octal numbers that fit in 16 bits, you can say: '000000' ... '177777' 19:26
then this part would need to be dropped too!
TimToady well, then forget decimal, but we do need to have a consistent ordeering
if the two sequences are the same length, the order is determined by cmp 19:27
if they are not the same length, it goes short to long
19:27 Chillance joined, azert0x joined
TimToady and maybe a rule that says any time you carry something that looks like digits (in context), it becomes 0 19:28
but also maybe just say, "screw you" at that point. ;) 19:29
patrickas hehehehe
well I did implement it the way it is currently specced 19:30
so I'll I guess i just need to detect that special case and fail("screw you") on it :-) 19:31
TimToady I may yet come around to your way of thinking, if they're gonna be screwed anyway
flussence IMO if someone wants numeric ranges, that's what the .Int method's for 19:32
rakudo: say ~('0o07'.Int ... 10)
p6eval rakudo 9993bb: OUTPUT«7 8 9 10␤»
19:33 goksie left
TimToady yes, but if they want octal numbers out, that doesn't do it 19:33
or worse, duodecimal
flussence oh, output? so it'd be "OUTPUT«0o07 0o10..." in that line above? 19:34
or whatever
TimToady well, it's still hard to encode 3 data points into 2 values 19:35
19:35 masak left
TimToady the current algoritm conflates starting value with low end of range 19:36
patrickas low end of range for each digit
TimToady what I meant 19:37
so either we ignore the end digits and take the 0 from the beginning, or we screw 'em
propagating a 0 is likely to dwtm
but yes, it does rather preclude the naïve X~ implementation 19:38
it's probably one of those things that really ought to have an explicit function that specs the ranges 19:39
19:40 gottreu joined
TimToady as in S03:2074 19:40
so maybe leave it at X~ for now 19:41
19:42 Italian_Plumber joined
patrickas ok 19:42
19:43 daemon left, wamba left 19:46 daemon joined
colomon random thought.... might it be more sensible to not spec anything like that at all, and just make sure there is a function to make base-N-in-string succ very easy to use for a series? 19:50
TimToady didn't I just say that?
colomon I dunno. but if you did, TimToady++
19:51 jaldhar left
flussence Is there a way to get at character classes in normal code? Something that looks like Range.new('000' => 'zzz', :chars<alnum>) would be easy enough for most people to understand. 19:51
TimToady that's what S03:2074 sez
patrickas :-) that's the S03:2074 thingy, *.succ-in(@greek)
TimToady flussence: it would be pretty easy to construct an @alnum by grepping 0..0x10ffff for /\w/ 19:53
perhaps @alnum isn't quite what you want htough 19:54
though even
you want %alnum-succ{$char} and %alnum-pred{$char}
and some indication of how to carry 19:55
PerlJam I want a way to define my "alphabet" and have .succ and .pred use it :) 19:56
TimToady that's the idea
only without clobbering the built-ins
PerlJam right
colomon +1
PerlJam how does Perl know how about 'a' .. 'z' anyway? 19:59
s/how//
TimToady S03:1997
PerlJam er, s:2nd/how// even
20:00 Italian_Plumber left
PerlJam That doesn't quite answer what I want to know I don't think. 20:01
20:02 Eevee left, timbunce left
PerlJam or maybe it does 20:03
patrickas Is there a more elegant wayt of getting $str.comb(/./) ?
PerlJam if I can lexically define a sub that determines "is alphabetic"
TimToady you mean like $str.comb? 20:04
tylercurtis rakudo: say .perl given 'abdklsfoeknl4r'.comb;
TimToady rakudo: say ~"patrickas".comb
patrickas oh yes that's the one!
p6eval rakudo 9993bb: OUTPUT«("a", "b", "d", "k", "l", "s", "f", "o", "e", "k", "n", "l", "4", "r")␤»
rakudo 9993bb: OUTPUT«p a t r i c k a s␤»
patrickas :-) 20:05
20:06 Eevee joined
TimToady PerlJam: a junction or hash would be more generally useful, along with a list 20:06
PerlJam I keep thinking there's some unrealized general mechanism here, but I guess we already have it. :) 20:07
TimToady for something called a lot you might want a curried successory function 20:08
tylercurtis was just looking for an excuse to try out '.meth given $something' as a way to call methods as prefixes.
20:08 timbunce joined
TimToady pictures a well successorized model 20:08
TimToady will probably be arrested for being a successory before the fact 20:09
PerlJam How would one do <a g c t> X~ <a g c t> X~ <a g c t> using the series op? 20:10
TimToady 'aaa', *.succ-in(<a g c t>) ... 'ttt' 20:11
or something curried to go faster
unless .succ-in is self-memoizing 20:12
but memoization overhead is probably worse than precalculating the hash of successors
diakopter sufferin' succohash 20:14
TimToady wonders if an enum map can store all that as both hashy and listy info
PerlJam .succ-in is a terribly name BTW :)
patrickas rakudo: say '1' .. '3'; say '3' .. '1';
p6eval rakudo 9993bb: OUTPUT«123␤␤»
TimToady a range's order check happens before conversion to ... 20:15
so '3' .. '1' is properly ()
sorear TimToady: Should regexes without explicit () parameter lists get $_ placeholders? 20:17
diakopter rakudo: say (3,6...6).perl
p6eval rakudo 9993bb: OUTPUT«(3, 6)␤»
diakopter rakudo: say (3,6...6.1).perl
p6eval rakudo 9993bb: OUTPUT«(timeout)»
diakopter hopes this is known
colomon diakopter: last series is infinite.
patrickas yes, that's "unexpected" behaviour of '10' ... '07' # same as '1' .. '0' X~ '0' .. '7'
flussence does .succ-in need to be a separate method? i.e. if .succ had the list as an optional param instead, would it mess anything up? 20:18
colomon diakopter: that's spec
diakopter k
sorear recent change
patrickas it's not even <1 0> X~ '0' .. '7' as I would have naively expected
sorear the limit in a ... is always exact now
colomon rakudo: say (3, 6 ... (* >= 6)).perl
p6eval rakudo 9993bb: OUTPUT«(3, 6)␤» 20:19
colomon rakudo: say (3, 6 ... (* >= 6.1)).perl
p6eval rakudo 9993bb: OUTPUT«(3, 6, 9)␤»
sorear (and a smart-match)
colomon rakudo: say (3, 6 ...^ (* >= 6.1)).perl
p6eval rakudo 9993bb: OUTPUT«(3, 6)␤»
colomon patrickas++
TimToady superstitious parens?
colomon TimToady: that's how I roll. 20:20
rakudo: say (3, 6 ...^ * >= 6.1).perl
p6eval rakudo 9993bb: OUTPUT«(3, 6)␤»
patrickas I guess by now we can call them patrickas parens
sorear TimToady: what blocks do I need to generate ($_?) sigs on, and which can I let be ()?
patrickas I think we could also name the space accidentally added after function calls after me :-)
TimToady sorear: for sure you don't need $_ if it isn't used... 20:21
though if something is expecting to feed a value to an arity-0 function, you still need the $? 20:22
20:23 kjeldahl_ left
TimToady rakudo: say ~(rand ... *)[^5] 20:23
p6eval rakudo 9993bb: OUTPUT«0.706235900378914 1.70623590037891 2.70623590037891 3.70623590037891 4.70623590037891␤»
TimToady that's a bad example though
probably means successive thinking needs a predeccessory nap 20:24
zzz &
sorear I thought rand ~~ 0..^1 20:25
20:25 perlygatekeeper joined
PerlJam sorear: it is 20:26
sorear oh, it's just being used as the initial
PerlJam right
20:26 shortcircuit joined
PerlJam rakudo: say ~({rand} ... *)[^5] 20:27
p6eval rakudo 9993bb: OUTPUT«0.306957105497958 0.771434015865577 0.355967136655586 0.380212301749527 0.67573216882009␤»
tylercurtis shopping &
Hopefully, I'll find some time to get Bennu parsing expressions, too.
By, folks.
PerlJam that seems like such a small change to great effect
patrickas rakudo: say ( [X~] ('000'.comb Z.. '122'.comb) ).perl; #I re-killed a coroutine
PerlJam perl6++
p6eval rakudo 9993bb: OUTPUT«Cannot resume dead coroutine.␤ in 'Any::join' at line 1␤ in 'List::Str' at line 2558:CORE.setting␤ in 'infix:<~>' at line 7033:CORE.setting␤ in <anon> at line 154:CORE.setting␤ in <anon> at line 1␤ in 'List::Bool' at line 1␤ in 'prefix:<?>' at line 416:CORE.setting␤ in
..<ano…
20:27 tylercurtis left
ZadYree perl6: my $fref = sub{ say("ABC");}; $fref(); 20:32
p6eval pugs, rakudo 9993bb: OUTPUT«ABC␤» 20:33
20:33 kjeldahl joined
ZadYree perl6: my $rlist = [sub{say"A"}, sub{my $a = 2; my $b = 4; say 2 + 4;}, sub{.say}]; $rlist[2](); 20:37
p6eval pugs: OUTPUT«*** ␤ Unexpected "$rlist"␤ expecting "=", context, ":" or "("␤ at /tmp/4S8UyNKYSI line 1, column 4␤»
..rakudo 9993bb: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
ZadYree perl6: my $rlist = [sub{say"A"}, sub{my $a = 2; my $b = 4; say 2 + 4;}, sub{.say}]; $rlist[2]("aaa"));
p6eval pugs: OUTPUT«*** ␤ Unexpected "$rlist"␤ expecting "=", context, ":" or "("␤ at /tmp/eh7O7W_GYC line 1, column 4␤»
..rakudo 9993bb: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
flussence ZadYree: you don't need to write "sub" in perl6
ZadYree ah?
tell me :S 20:38
flussence it's implied with the {...}s
ZadYree well
& what about hashtables in unreferences arrays?
in perl5: $foo = ["aa", {"bar" => "baz"}] 20:39
20:39 Guest27047 joined
flussence I don't understand it completely, but it probably works the same way map {...} does in p5 for differentiating the two 20:40
rakudo: say {a=>1}.WHAT; say { 1; 2 }.WHAT
p6eval rakudo 9993bb: OUTPUT«Hash()␤Block()␤»
ZadYree that's so weird 20:41
dukeleto flussence: { } is a code block in perl 6
ZadYree thos .THINGS are a PITA to learn
dukeleto flussence: => returns a Hash in the first example
20:42 rindolf joined
flussence rakudo: { ; a => 1 }.WHAT # curious 20:42
p6eval rakudo 9993bb: ( no output )
flussence whoops
rakudo: say { ; a => 1 }.WHAT
p6eval rakudo 9993bb: OUTPUT«Block()␤»
flussence rakudo: say { ; a => 1 }.().WHAT
ZadYree another question: Will my old p5 scripts be compatible w/ p6?
p6eval rakudo 9993bb: OUTPUT«Pair()␤» 20:43
flussence ah, that makes sense
sorear No.
dukeleto ZadYree: no, they won't, but you can use Perl 5 modules from Perl 6
ZadYree: with blizkost 20:44
ZadYree don't you find this weird?
sorear no
dukeleto ZadYree: why? perl 6 is not the same language as perl 5
sorear why would you want to run your old Perl 5 scripts on Perl 6?
ZadYree I mean, for every servers using p5 scripts, etc
sorear /usr/bin/perl is not going away
ZadYree ah
flussence it's like the difference between VB6 and VB.Net (or so I'm told) 20:45
PerlJam ZadYree: they can continue to use perl 5.
sorear it's impossible to do a rewrite this big without breaking bug-compatibility
dukeleto ZadYree: perl 5 lives on, independent of perl 6
ZadYree ooo
sorear which means that nobody is going to get rid of the old version
ZadYree I didn't know that
dukeleto ZadYree: people call them "sister languages"
ZadYree hehe
20:45 Guest27047 left
ZadYree that's pretty nice, cause I was starting freaking out my pants 20:45
sorear "other version" would be more appropriate 20:46
20:46 Guest27047 joined
ZadYree other perl distro ^^ 20:46
20:46 ruoso left
sorear perl 5.8, 5.10, and 5.12 all came out after Perl 6 started 20:46
ZadYree yup
sorear the two series have been cooperating quite a bit
perl 6 also targets a slightly different niche than Perl 5; quick-and-dirty file scraping and reporting scripts are NOT what we are focusing on this time 20:47
flussence OK so if I'm understanding series operators right, .succ is in effect a curried function that gets passed between values to generate the next one along? 20:52
20:54 Italian_Plumber joined 20:55 Ross left, tadzik joined
patrickas .succ is one of the possible functions depending on the endpoints 20:56
tadzik hello again
flussence 'lo
How does a range decide whether to use .succ/.pred, is that an implementation detail? 20:57
dukeleto sorear: what niche *is* perl 6 focusing on? ::puts on devils advocate hat::
jnthn All of them! ;-) 20:58
20:59 Italian_Plumber left
sorear dukeleto: the stuff people actually use Perl 5 for 20:59
patrickas flussence: it is specced in S03:1750 21:00
flussence: but it is still kind of a work in progress for some edge cases :-)
21:01 alester joined 21:04 rindolf left, whiteknight joined 21:06 tadzik left
patrickas out 21:09
21:09 patrickas left
flussence ah, I think I get it now 21:11
21:17 kjeldahl left, Entonian joined 21:23 Schwern joined
dalek ecza: 6617fa8 | sorear++ | src/ (3 files):
generate code for calling Backtrack once only
21:33
ecza: a85618a | sorear++ | src/Optimizer/RxSimple.pm:
optimization for cut befores, etc
ecza: 94cf523 | sorear++ | src/Niecza/Actions.pm:
Disable generation of $_ placeholder for rules
ecza: 1bf77fa | sorear++ | / (5 files):
Decouple LAD optimization from RxOp
21:34 Sandy joined 21:35 Sandy is now known as Guest43910, Guest43910 left 21:37 smash left 21:41 sdziegie left 21:56 cotto_work left 22:03 Holy_Cow left, vapace left, cj left 22:12 timbunce left 22:20 Entonian left 22:23 cj joined 22:25 meraxes left 22:32 amkrankruleuen joined 22:34 cj left 22:36 sftp left
dalek ecza: 1705097 | sorear++ | src/Optimizer/RxSimple.pm:
First crack at LAD-specific optimizer
22:38
ecza: 0c65460 | sorear++ | src/Optimizer/RxSimple.pm:
Optimization for negated character classes
ecza: a64e016 | sorear++ | / (3 files):
Implement special case for quantified character classes
22:42 Guest27047 left 22:44 mberends left 22:46 shortcircuit left, shortcircuit joined 22:48 araujo left, amkrankruleuen left 22:51 shortcircuit left 22:52 shortcircuit joined 22:56 meppl joined 22:57 christin1 left 22:58 mberends joined 22:59 cj joined 23:00 azert0x left 23:05 Schwern left 23:13 xinming left, xinming joined 23:23 cdarroch left 23:34 thundergnat joined 23:40 LionMadeOfLions left 23:41 ruoso joined, masonkramer joined 23:47 araujo joined 23:57 pochi joined
pmichaud gist.github.com/578279 # I'm very confused by this. The definition of Buf.decode2() is *exactly* the same as the definition of Buf.decode(). 23:58
(except for the name, obviously)