»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
TimToady it's supposed to behave like [patA<.ws>|patB<.ws>] 00:03
00:03 fsergot joined
thou ok 00:03
and that <.ws> becomes part of the overall rule's match
TimToady yes, but rules are mostly for returning trees, not strings 00:04
00:05 mj41 left
thou ok. the full grammar i'm trying is gist.github.com/1536817 00:06
i guess i should stop worrying about the spaces and just start writing some actions to set .ast now
(i was reading masak's crypt.pl and decided to try writing it from scratch for fun) 00:07
00:16 drbean left 00:24 drbean joined 00:39 alvis left 00:49 drbean left 00:52 whiteknight joined, whiteknight is now known as Guest28870 00:55 alvis joined 00:56 drbean joined
dalek ecs: 448a791 | larry++ | S05-regex.pod:
simplify sigspace rule

Only constructs that are actual matchers look for following sigspace. Colon declarations, opening brackets, disjunctions/conjunctions, and closures specifically do not. The beginning of a rule does not, so the TOP rule may need to account for leading whitespace. (A ^ followed by whitespace is sufficient for this.)
01:04
TimToady (as discussed several weeks ago, iirc) 01:05
thou yay, i'm accepting a sentence like: give the blue dog and the shiny red cat some dull food from the refridgerator
colomon thou++
TimToady are you assuming a misspelled word like 'refridgerator' is a noun? 01:06
thou hehe 01:07
gist.github.com/1536817
colomon TimToady: undefine $a versus $a = Mu ?
thou i'm making lots of other assumptions which are worse than that :-)
colomon was looking in the spec, but his browser crashed. :(
TimToady $a = Nil is the equivalent; you can't guarantee that Mu will fit 01:08
colomon niecza: my $a = 1; $a = Nil; say $a
p6eval niecza v13-8-gc17e94b: OUTPUT«Any()␤»
colomon TimToady++
nom: my $a = 1; $a = Nil; say $a 01:09
p6eval nom e6fee1: OUTPUT«Nil␤»
TimToady that's wrong by spec
b: my $a = 1; $a = Nil; say $a
p6eval b 1b7dd1: OUTPUT«Any()␤»
TimToady and a regression, apparently 01:10
however, note that if a construct supports default separate from its type, undefine will set it to the type object, while = Nil will set it to the default, which may not be undefined! 01:11
01:11 casey joined 01:12 casey is now known as Lilpid, Lilpid left, Lilpid joined 01:14 Lilpid left 01:15 datums_nb joined
dalek ecs: 4405e4c | larry++ | S02-bits.pod:
assigning Nil resets container to default

  (Default is not always going to be undefined, if there is a declared default.)
01:17
Guest28870 anybody here who can talk about some P6 sprintf semantics? 01:22
01:22 Guest28870 is now known as wknight8111, wknight8111 left, wknight8111 joined
wknight8111 masak asked me to implement the C format specifier in Parrot, but I want to make sure I have the requirements clear 01:22
01:29 meraxes_ joined
TimToady I don't know that I've ever seen %C discussed here... 01:29
wknight8111 all the more reason to start discussing it in earnest! 01:33
so C takes a function ($s, @args), where $s is the output string that's been generated so far and @args is the entire arguments array? 01:39
or, only the arguments which have not yet been processed?
01:42 alc joined
wknight8111 and I would be very surprised if this was all unicode-safe 01:42
...wrong channel 01:43
TimToady whew! :)
I would think only the remaining args
wknight8111 the example in the synopsis seems to suggest it gets all args 01:44
benabik %C is from perl6 sprintf
TimToady however, the example seems to suggest otherwise
the original example is from wayland 01:45
wknight8111 okay
TimToady I would think that a more useful interface would be to pass in the remaining args, then return modified args 01:46
wknight8111 does C have an output? also, can it modify the existing string or does it get a read-only copy?
TimToady rather than relying on 'is rw' and knowledge of its exact position
wknight8111 yes, that does seem more reasonable to me 01:47
TimToady I'm leary of allowing the string to be modified, for similar reasons 01:48
TimToady is biased towards FP these days...
wknight8111 Parrot's strings are technically immutable, but inside the sprintf engine there is obviously a mutable buffer that we *could* play with 01:49
TimToady is this something that was borrowed from P5?
wknight8111 I have no idea
if only we could find the guy who created P5 and ask him.... :)
TimToady doesn't seem like it 01:50
not in 'perldoc -f sprintf' anyway
wknight8111 I think there was a %n modifier it's intending to replace
at least, that's what S32 says 01:51
thou niecza: gist.github.com/1537223
nom: gist.github.com/1537223
TimToady P5 has continued to create itself over the last decade, and not always with P6's design principles :)
p6eval niecza v13-8-gc17e94b: OUTPUT«unsorted: parsed northeast␤sorted: parsed northeast␤»
nom e6fee1: OUTPUT«unsorted: no parse␤sorted: parsed northeast␤»
thou ^ is that a bug in nom's LTM implementation?
TimToady could be 01:52
01:54 thou left
TimToady if masak is asking for %C, what's the use case he has in mind? 01:54
wknight8111 getting P6 complete
TimToady this also strikes me as a security hole 01:56
assuming a user is allowed to supply a format
TimToady will need to think about this... 02:00
wknight8111 okay, as soon as you know what it should look like, I'll implement it
colomon niecza: sub prefix:['Z']($a) { say $a; }; Z "hello" 02:02
TimToady it's also not clear what the desired units are going to be. graphemes, codepoints, columns...
p6eval niecza v13-8-gc17e94b: OUTPUT«===SORRY!===␤␤Undeclared name:␤ 'Z' used at line 1␤␤Potential difficulties:␤ &prefix:<XXX> is declared but not used at /tmp/qqb0tN1mFs line 1:␤------> sub prefix:['Z']⏏($a) { say $a; }; Z "hello"␤␤Unhandled exception: C…
colomon niecza: sub prefix:<Z>($a) { say $a; }; Z "hello"
p6eval niecza v13-8-gc17e94b: OUTPUT«hello␤»
TimToady XXX?!? 02:03
perhaps a fossil from when niecza couldn't evaluate code at compile time 02:04
benabik Generally, allowing the user to specify a printf format is a bad idea.
TimToady um, generally, that's how I18n is done... 02:05
for some definition of "user"
benabik I suppose it's less of a bad idea without C strings… 02:06
sorear appears ...
TimToady: 4405e4c makes me a wee bit uneasy, since it seems to require tracking the "default value" along with all containers, violating "you pay for what you use" 02:07
TimToady: yeah, probably. 02:08
(re. fossil) 02:09
another problem I have now
$*OUT can't be initialized at BEGIN time because filehandles shouldn't be serialized 02:10
so niecza sets up $*OUT etc in an INIT {} block
niecza: BEGIN say "hi";
p6eval niecza v13-8-gc17e94b: OUTPUT«hi␤»
sorear niecza: CHECK say "hi";
p6eval niecza v13-8-gc17e94b: OUTPUT«Unhandled exception: No match␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 919 (die @ 2) ␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1395 (EnumMap._lookup @ 4) ␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 754 (CommonEnum.postcircumfi…
sorear hmm
this is more complicated than I thought
niecza: INIT say "hi"; 02:11
p6eval niecza v13-8-gc17e94b: OUTPUT«hi␤»
02:23 simcop2387 left, simcop2387 joined
kshannon Does it make sense to decontainerize something which is not CONCRETE (e.g. the class object for Proxy) 02:25
If I modify decontainerize to do nothing unless IS_CONCRETE, (plus a few other smallish hacks) I can get --target=past to work. 02:26
sorear kshannon: I thought that decontainerize did nothing except on containers. 02:44
rakudo: say $*PERL.WHAT
p6eval rakudo e6fee1: OUTPUT«Failure()␤»
sorear rakudo: say $*PERL
p6eval rakudo e6fee1: OUTPUT«Failure.new(exception => Exception.new())␤» 02:45
sorear rakudo: say $?PERL
p6eval rakudo e6fee1: OUTPUT«===SORRY!===␤Variable $?PERL is not predeclared at line 1, near ""␤»
sorear rakudo: say GLOBAL::.keys
p6eval rakudo e6fee1: OUTPUT«0␤»
sorear rakudo: say ::GLOBAL.WHO.keys
p6eval rakudo e6fee1: OUTPUT«␤»
sorear rakudo: say ::PROCESS.WHO.keys
p6eval rakudo e6fee1: OUTPUT«$IN $OUT $ERR $FATAL $TZ @ARGS $ARGFILES %ENV $VM $CWD @INC $PID $OS $OSVER $EXECUTABLE_NAME $PROGRAM_NAME␤»
sorear rakudo: say $*VM.WHAT
p6eval rakudo e6fee1: OUTPUT«Hash()␤» 02:46
sorear rakudo: say $*VM
p6eval rakudo e6fee1: OUTPUT«("name" => "parrot", "config" => {"git_describe" => "RELEASE_3_11_0", "sha1" => "a6c5dd271c5c40144f2a08520d5d93e0665fce6b", "a" => ".a", "ar" => "ar", "ar_extra" => "", "ar_out" => "", "archname" => "x86_64-linux-gnu-thread-multi", "arflags" => "cr", "as" => "as", …
kshannon nom: say Proxy; 02:48
p6eval nom e6fee1: OUTPUT«Cannot look up attributes in a type object␤ in <anon> at src/gen/Metamodel.pm:2834␤ in method gist at src/gen/CORE.setting:684␤ in sub say at src/gen/CORE.setting:5649␤ in block <anon> at /tmp/65xxmrmvlM:1␤ in <anon> at /tmp/65xxmrmvlM:1␤»
kshannon nom: say Proxy.new(); 02:50
p6eval nom e6fee1: OUTPUT«invoke() not implemented in class 'Undef'␤ in <anon> at src/gen/Metamodel.pm:2834␤ in sub say at src/gen/CORE.setting:5649␤ in block <anon> at /tmp/QoBxKcrUJ9:1␤ in <anon> at /tmp/QoBxKcrUJ9:1␤»
benabik nom: say Proxy.new(FETCH => method() { "test" }) 02:53
p6eval nom e6fee1: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2␤»
benabik nom: say Proxy.new(FETCH => method { "test" })
p6eval nom e6fee1: OUTPUT«test␤»
kshannon Yeah, the problem is that it tries to run the FETCH routine when you try to do anything to Proxy (i.e. the Class object, not an instance) 02:55
benabik Proxy seems to act a little oddly...
kshannon say Scalar
nom: say Scalar
benabik nom: my $a = 'test'; say Proxy.new(FETCH => method { $a }).perl
p6eval nom e6fee1: OUTPUT«Cannot look up attributes in a type object␤ in method gist at src/gen/CORE.setting:684␤ in sub say at src/gen/CORE.setting:5649␤ in block <anon> at /tmp/Vv07kFkCUc:1␤ in <anon> at /tmp/Vv07kFkCUc:1␤»
nom e6fee1: OUTPUT«Str.new()␤»
benabik nom: my $a = 'test'; say Proxy.new(FETCH => method { $a }) 02:56
p6eval nom e6fee1: OUTPUT«"test"␤»
kshannon Get the same issue with Scalar.
benabik Not sure why it adds the ""s there ^^
nom: my $a = 'test'; say Proxy.new(FETCH => method { $a }).perl 02:57
p6eval nom e6fee1: OUTPUT«Str.new()␤»
kshannon say Scalar.new()
See, I reckon it shouldn't be trying to decontainerize container class objects (i.e. the 6model IS_CONCRETE macro returns false) 02:59
Of course, the only place you should ever really come across them is in something like the GLOBAL namespace - which is exactly what you get when trying to dump the PAST. 03:00
dalek ast: 0d74a86 | (Solomon Foster)++ | S06- (2 files):
Epic fudging for niecza.
03:01
kshannon so currently: perl6 --target=past -e 1
dies during the dump...
dalek ecza: 77e2772 | sorear++ | / (2 files):
Embed version information into builds
03:02
ecza: c0ec840 | sorear++ | src/niecza:
Add --version/-v option for masak
03:05 lutok left
colomon sorear: I've got S06-operator-overloading/sub.t working, but it is so fudged and noisy I'm very hesitant to put it into spectest.data. 03:06
03:11 wknight8111 left
colomon wow, rakudo's compile is painfully slow right now. 03:13
damn it, I broke it for rakudo 03:16
sorear niecza: say $?PERL 03:21
p6eval niecza v13-10-gc0ec840: OUTPUT«{"name" => "niecza", "version" => "v13-10-gc0ec840", "build-time" => 1325212095.5008221}␤»
sorear colomon: huh? it looks like niecza is less fudged than rakudo 03:27
colomon that's true
but there's like 300 lines of warnings when you run the file
maybe more. 03:28
it's ugly as sin
sorear then don't 03:29
colomon right now I'm trying to figure out why there are 64 tests when rakudo runs the file, and 65 when niecza does 03:30
sorear you fudged something that does a different number of tests than fudge thinks it does 03:34
03:35 drbean left
colomon or rakudo does... 03:37
03:38 tokuhirom joined 03:40 Patterner left 03:42 drbean joined, Psyche^ joined, Psyche^ is now known as Patterner 03:46 drbean left
colomon ah, think I found it. 03:48
problem was on the rakudo side. 03:49
dalek ast: 7e6e783 | (Solomon Foster)++ | S06-operator-overloading/sub.t:
Fix fudging for rakudo.
03:50
03:57 lutok joined
colomon sorear: actually, if you get a second, it might be worthwhile for you to take a look at S06-operator-overloading/sub.t in niecza. It prints out hundreds of lines of warnings before it ever gets to to "plan 65;" -- seems like something weird going on internally in niecza during the early stages? 03:59
No rush or anything, just seems like it might be interesting.
I'm off to bed...
sorear sleep well 04:03
oh, huh! the error in CHECK handling was... PHASER_CHECK is not defined :| 04:05
04:21 lutok left 04:33 shinobicl_ joined 04:49 drbean joined, shinobicl_ left 05:05 kevin joined 05:06 kevin is now known as Guest82240
ruoso hmm... my heavy-junction-oriented sudoku solving keep giving random segfaults and weird errors 05:07
moritz on which compiler? 05:09
ruoso rakudo... nom branch 05:10
paste?
ENOBOTS 05:11
moritz ruoso: just use gist.github.com
sorear o/ ruoso 05:12
ruoso gist.github.com/1538015
the junction part is in cleanup-impossible-values 05:13
05:13 tokuhirom left
moritz nom: gist.github.com/1538015 05:13
p6eval nom e6fee1: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are:␤:(Mu $v, Mu %_)␤␤ in method Numeric at src/gen/CORE.setting:648␤ in sub infix:<==> at src/gen/CORE.setting:2214␤ in sub infix:<==> at src/gen/CORE.setting:2214␤ in block <anon> … 05:14
ruoso oh, it's expecting input
and it takes a loong time and produces a lot of output
moritz oh 05:15
ruoso the input is just the set of numbers as in the comment but without the #
sorear and I guess it doesn't much like the Austrian anthem. ;) 05:18
ruoso my guess is the junction autothreading with the new parrot tasks is causign trouble 05:22
05:24 tokuhirom joined
moritz ruoso: did you patch rakudo? 05:25
because currently it doesn't use threads/tasks at all
05:25 alvis left
ruoso hmmm I didn't... so my guess was wrong 05:26
but it segfaults before solvign
05:27 alvis joined
ruoso night & 05:27
05:38 preflex_ joined, preflex_ is now known as preflex 05:51 _jaldhar is now known as jaldhar
jaldhar Hello. I would like to give the perl6 contest a try. Would it be better to stick to rakudo * 2011.7 or try a development version? 05:52
[Coke] jj
sorear jj? 05:53
o/ [Coke]
[Coke] ww 05:57
o/
moritz jaldhar: I'd go with the current development version of rakudo (or niecza) 06:03
kshannon jaldhar: Either should be OK. If you're going to use the dev version you'll need to get it from git, as the most recent monthly is missing '-c' support (see: strangelyconsistent.org/p6cc2011/NOTES ) 06:04
moritz kshannon++ 06:06
06:13 kaleem joined
sorear niecza: BEGIN say slurp "/etc/debian_version" 06:14
p6eval niecza v13-10-gc0ec840: OUTPUT«6.0␤␤»
dalek ecza: 9cfe863 | sorear++ | / (3 files):
Major refactor to true phasers

Adds CHECK support. Closes the BEGIN/--safe loophole. Guarantees that phasers will be called at most once per compartment. Simplifies handling of "eval". Treats phasers defined after call point as BEGIN.
06:16
sorear eval 'INIT say "hi"; 1 1' # this now says hi
buubot_backup sorear: INIT say "hi"; 1 1
06:31 Guest82240 left 06:33 alvis left 06:55 thou joined 06:56 datums_nb left
dalek ecza: f29bd58 | sorear++ | src/NieczaFrontendSTD.pm6:
Avoid warning spam when calling a protoless multi operator (colomon)++
07:00
ecza: 95ba995 | sorear++ | lib/Kernel.cs:
Fix misgeneration of multi operator dispatchers
jaldhar moritz: , kshannon: thanks 07:02
07:10 baest joined 07:21 tokuhirom left, tokuhirom joined 07:25 tokuhirom left
sorear mind wanders to the subject of constant folding 07:38
07:48 lutok joined 07:49 datums_nb joined 07:50 HarryS left 07:51 HarryS joined, HarryS left, HarryS joined 07:58 sftp left 08:00 molaf joined, sftp joined 08:07 kaare_ joined 08:23 thou left 08:26 arlinius left 08:34 arlinius joined 08:42 koban joined
TimToady wonders how to go about testing for successful hash randomization... 08:53
Perl 5 is in the news in a good way; would hate to undo that for Perl 6...
I see that parrot has a per-interp hash seed that gets xor'd in, but I wonder if that's sufficient for a long-running interp 08:56
have no clue whether .NET/mono can do hash randomization easily... 08:57
zzz & 08:58
masak morningz, #perl6 09:02
nice one! rt.perl.org/rt3/Ticket/Display.html?id=107254 09:12
I'm *only* asking for %C because it's in the spec. actually, I think it's a horrible addition. 09:15
actually, I'll go ahead and de-spec it right now, since no-one still active seems to want it. :)
Timbus whats %C 09:16
masak rationale: if you wanted to change the arguments to sprintf, you should've done that *before* calling sprintf, dearie.
Timbus: see S29, but hurry :P
S29/Str to be exact.
Timbus runs
masak er, S32/Str -- sorry. 09:17
perlcabal.org/syn/S32/Str.html and grep for '%C'
Timbus .. no thanks 09:18
you can remove that 3:
frettled Timbus: The presentation paper for the exploit against PHP, Java etc. provides the information necessary for performing a successful test against a hash implementation :)
(merry time-of-year) 09:19
Timbus ha HA i steal yet another tab complete
frettled Timbus: argh :)
masak frettled: time-of-year to you too, good sir!
frettled yay
masak Timbus: so *that's* your plan! o.O :P
frettled Now, how did that thingy about having a bot tell someone about something later on... 09:20
masak .oO( the Tab Completion Thief -- coming soon to an IRC channel near you )
Timbus heh
masak phenny: tell frettled something like this?
phenny masak: I'll pass that on when frettled is around.
frettled masak: ah, yes, thanks.
phenny frettled: 09:20Z <masak> tell frettled something like this?
frettled But TimToady is around, so, hmm :) 09:21
masak frettled: we need a bot for reminding people how to use the bots :P
Timbus he just went to bed
masak frettled: you're around too.
frettled TimToady: The presentation paper for the exploit against PHP, Java etc. provides the information necessary for performing a successful test against a hash implementation :) (And a merry time-of-year to you)
masak: yup, which is why phenny reminded me immediately.
Timbus no, only when you talked
09:21 proller_ joined
frettled aha 09:22
darnit. Well, what's one more line of spam between friends.
Timbus event based systems and all that jazz
frettled phenny: tell TimToady The presentation paper for the exploit against PHP, Java etc. provides the information necessary for performing a successful test against a hash implementation :) (And a merry time-of-year to you) events.ccc.de/congress/2011/Fahrpla...tforms.pdf
phenny frettled: I'll pass that on when TimToady is around.
09:22 Chillance left
frettled This time, I even remembered the URL! 09:22
Timbus does rakudo use parrots hashes? im assuming so but you never know 09:24
frettled What the presentation paper doesn't harp on about, is how PHP _has_ had available protection identical to the one they implemented, through the Hardened-PHP project's patch, since February 2005. The PHP core developers, however, didn't think hardening of the core was necessary, and rejected just about everything in those patches, so Hardened-PHP turned into Suhosin, and is still around for those of us (un)fortunate enough to work with web hosting.
Timbus hey now PHP has plenty of security and protection. if (int > MAX_INT) { overflow(); } 09:27
dalek specs: 8ef142f | masak++ | S32-setting-library/Str.pod:
specs: [S32/Str] removed '%C' directive from sprintf
specs:
specs: The '%C' directive allows you to go in and change the arguments
specs: to &sprintf during the &sprintf call itself, using callbacks
09:27 dalek left 09:28 dalek joined, ChanServ sets mode: +v dalek, LlamaRider joined
masak dalek: sorry 'bout that. 09:28
you can read the whole commit comment online. :)
github.com/perl6/specs/commit/8ef1...e17e02bc7b 09:29
09:29 datums_nb left
LlamaRider Hello to all. 09:29
masak: Thanks for the reply for my contest questions. I'd need to bother you some more about '/' in t1 though :) 09:30
09:30 koban left
masak that's fine. 09:31
LlamaRider so, am I allowed to use integer division on things like 10/9 (and I really mean '10 div 9'). Or I should be sure to divide well-divisible things. 09:32
And if I am using 'div' you want me to print 'div' to output?
(every little detail about these things yields completely different outputs, not sure how you'll test things) 09:33
masak I think we'll be fairly liberal. :)
there will be differences between what the contestants get, so hitting as many numbers as possible is important.
we didn't spec infix:<div> as one of the possible operators, but if you really want to include it, consider having a flag or something to switch it on. 09:34
LlamaRider well you specified infix:</> and then told me it's dangerous ;) Which confused me 09:35
masak I'm tempted to write a solution myself where all the different interpretations of t1 are represented by flags. :)
LlamaRider: no, I said non-integer results probably won't be of much use, since the goal is to represent integers with four 9s.
LlamaRider So it's my task to make sure I divide only when things are divisible? That' what I did first, then moritz (I think) told me here that you meant "the semantics of /" and not "/" itself, so I switched to div. :))) 09:36
but ok, I got it. back to modifying :) 09:37
masak well, depending on your model, nothing bad might happen if you divide things that don't result in an integer. you'll just get a result that you cannot use :) 09:38
the interesting things would be if those non-integer results could be combined into (otherwise unattainable) integer results. but I don't think four 9s are enough for such effects... 09:39
LlamaRider yep, they're not. actually you get very few numbers with just four nines
masak dang, we should have allowed sqrt() and floor() as well :P
Timbus more nines
masak LlamaRider: feel free to play around with different operators, as long as you provide a "per-spec" version of your solution. 09:40
LlamaRider haha, if you move it to real arithmetic you can express almost everything with them :)
Timbus permutations are easy. should have made it more challenging by forcing people to optimize around pathological cases and the like 09:41
like a projecteuler question
but then again this isn't a math contest
LlamaRider I'm surprised there weren't more tasks that want unspeakable things done ot strings :) or asking for grammars 09:42
masak cognominal: rt.perl.org/rt3/Ticket/Display.html?id=107292 feels more like a general complaint than a bug report. what's the observable? how can we close that ticket? 09:43
LlamaRider: "unspeakable things done to strings" sounds like a nice task for next year :)
09:47 Trashlord joined 09:48 Trashlord left 09:52 Trashlord joined
LlamaRider yep, can't express 5 any longer ^^ 09:53
but I'm done with 1 in any case, thanks for the clarifications.
masak anytime. 09:54
09:56 proller_ left 10:11 proller joined
masak community-driven Python documentation: late.am/post/2011/12/29/hitchhikers...-to-python 10:12
10:22 tjrandall joined 10:23 bkolera left 10:34 tjrandall left, alc left 10:36 tokuhirom joined 10:40 daxim joined 10:45 tjrandall_ joined
LlamaRider are there any sorted datastructures in Perl6? I basically need pop and push operations that maintain the sorted order of elements. 10:45
masak t2, eh? :) 10:46
tadzik :>
LlamaRider :) 10:47
great way to learn Perl6 btw, keeps me entertained :)
10:47 tjrandall joined, tjrandall_ left
masak that's the idea :) 10:48
no, there are no built-in priority-queue-like container types.
not like PriorityQueue in Java, for example.
LlamaRider understood 10:49
time to write my first Perl6 class then ^^
masak this summer I might set aside some time to create a nice "collections framework" for Perl 6, with things like deques and heaps in it. 10:50
LlamaRider are there plans for a CPAN6? or that is still far on the road 10:51
moritz sorted, push and pop... sounds like a heap would be nice implementation
LlamaRider: we have modules.perl6.org, and our plans are to gradually evolve that into the "real thing"
LlamaRider: there have been many high-reaching cpan6 plans, and most of them never left the (over-) design stage 10:52
LlamaRider I see
bbkr rakudo: my $x = 2.2250738585072011e-308; say "alive"; 10:53
p6eval rakudo e6fee1: OUTPUT«alive␤»
bbkr \o/
moritz what did you think? :-)
10:53 Trashlord left 10:54 Trashlord joined
frettled Is that the PHP spend-an-eternity killer? 10:55
tadzik :>
moritz thought that was Java
masak too
rakudo: my $x = 5; say "al-five"
p6eval rakudo e6fee1: OUTPUT«al-five␤»
masak \o/ 10:56
bbkr this is PHP-killer number - in 32 bit mode every iteration step don't cause to reduce approximation and converter goes into infinite loop. you can kill almost every php page by simply passing it as GET param
masak woo 10:57
10:58 tjrandall left
moritz bbkr: p6eval runs on 64bit :-) 10:58
11:00 perl left 11:04 perl joined
bbkr I've checked, 32bit is also immune 11:08
11:18 LlamaRider left 11:19 LlamaRider joined
moritz the floating point conversion code is a bit naive 11:20
but safe :)
11:28 LlamaRider left 11:29 perl left 11:32 perl joined 11:41 whiteknight joined, kaleem left, whiteknight is now known as Guest79645, Lasse_ joined 11:47 drbean_ joined, drbean left, drbean_ is now known as drbean 11:50 mj41 joined 11:57 cognominal_ joined 11:58 perl is now known as bash 11:59 bash left 12:00 cognominal left
tadzik nom: class A { has $.a; has $.b; }; A.new(a=>6, b=>7).clone(b => 3).perl.say 12:04
p6eval nom e6fee1: OUTPUT«A.new(a => 6, b => 7)␤»
tadzik masak, known? 12:05
meh, no spectests for that even 12:07
I wonder if that's acceptable to change the attributes after cloning the object
12:11 sayu joined
masak don't think that's known. 12:11
and I agree that .b should be 3 afterwards. 12:12
tadzik spectests agree
and it's not really a nom regression, it seems
masak that's the whole point of .clone to be a ".new but with the old object's attributes as defaults"
tadzik now it's just copying the repr
doing pir::repr_clone__PP(nqp::p6decont(self)); 12:13
ok, reporting 12:14
masak tadzik++ 12:15
12:28 proller left
tadzik hmm S12-construction/destruction.t refers to some $a which is not declared anywhere 12:28
I guess it means the '100' in 'for 1..100' 12:29
moritz feel free to sanitize the test 12:32
tadzik thinking about it. I've just dropped some random thoughts to #parrot 12:33
perl6: use Test; plan 1; class A { submethod DESTROY { pass; } }; A.new 12:34
p6eval rakudo e6fee1: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'pass' will never work with no arguments (line 1)␤ Expected any of:␤ :(Any $desc)␤»
..niecza v13-13-g95ba995: OUTPUT«1..1␤»
..pugs b927740: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode␤ at /tmp/ZFckbRQTLR line 1, column 1␤»
achromic what's the expected memory usage for rakudo nom doing a simple loop/sleep? i'm seeing it use 107MB. 12:38
tadzik I suppose pass should work with no params. In Test::More it does 12:39
achromic: the memory usage is quite high, we're aware of that
achromic ok 12:40
moritz tadzik: I think rakudo's Test.pm can be easily fixed 12:41
tadzik yeah, I'm on it
it's also full of protos, which were needed in the early days of nom, and are not needed now
dalek ecza: a69a678 | (Solomon Foster)++ | t/spectest.data:
Turn on S06-operator-overloading/sub.t -- sorear++ for cleaning up the wall of warnings.
12:42
12:43 bluescreen10 joined
masak I'm still fascinated by www.cowlark.com/2009-11-15-go/ -- very nice language analysis/comparison. 12:48
tadzik huh, 18 insertions(+), 106 deletions(-) 12:50
let's see if it still works :) 12:51
it's still longer than the one in ng 12:52
moritz tadzik: what are you patching? 12:53
tadzik moritz: Test.pm 13:01
are there tests for Test.pm per se? :)
moritz there are, but they aren't good
tadzik ah
I can write some, maybe later today
I'm worried about false passes, those will be hard to find 13:02
we have a fail in t/spec/S05-capture/match-object.rakudo
13:04 tokuhirom left, tokuhirom joined
moritz tadzik: it has recently been changed; the fudging migth need updates 13:05
tadzik yep
moritz I'll take care of it, once my rakudo build has finished 13:07
13:08 tokuhirom left
dalek ast: 41ca236 | moritz++ | S05-capture/match-object.t:
fix rakudo fudging
13:12
geekosaur that the algol68 comparison? 13:41
dalek kudo/nom: 5b58e03 | tadzik++ | lib/Test.pm:
Cleanup Test.pm
13:42
13:47 Lasse_ left 14:01 proller joined 14:37 cognominal___ joined 14:40 terrence joined, cognominal_ left 14:47 LlamaRider joined
masak geekosaur: yes. 14:53
see also strangelyconsistent.org/blog/the-gh...f-algol-68 14:54
14:56 PacoAir joined 14:58 mtk joined 15:00 hundskatt left 15:01 terrence left 15:05 MayDaniel joined 15:06 sayu_ joined
colomon niecza: sub foo($n, *%h) { }; foo 1, n => 20, y => 300 15:17
p6eval niecza v13-13-g95ba995: OUTPUT«Potential difficulties:␤ $n is declared but not used at /tmp/nLqSM_cBgO line 1:␤------> sub foo(⏏$n, *%h) { }; foo 1, n => 20, y => 300␤ %h is declared but not used at /tmp/nLqSM_cBgO line 1:␤------> sub foo($n, *⏏%h) { …
colomon niecza: sub foo($n, *%h) { say $n; say %h.perl }; foo 1, n => 20, y => 300
p6eval niecza v13-13-g95ba995: OUTPUT«Unhandled exception: Excess arguments to foo, used 0 of 1 positionals␤ at /tmp/naJjd0JV7Z line 0 (foo @ 0) ␤ at /tmp/naJjd0JV7Z line 1 (mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2573 (ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setti…
moritz I'm considering to write a "Perl 6 in 2011" summary-ish blog post 15:18
anyone interested in brainstorming?
colomon niecza: sub foo($n, *%h) { say $n; say %h.perl }; foo 1, n => 20, y => 300, 4000
p6eval niecza v13-13-g95ba995: OUTPUT«Unhandled exception: Excess arguments to foo, used 0 of 2 positionals␤ at /tmp/m8ljaD6DDJ line 0 (foo @ 0) ␤ at /tmp/m8ljaD6DDJ line 1 (mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2573 (ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setti…
colomon moritz: sure
moritz I want to write about 15:19
* nom
* feature matrix
* niecza progress
* advent
* important spec changes (which?)
* perlito
* panda, modules.perl6.org 15:20
* grants
masak moritz: I just realized that out of 17 spec commits I made in 2011, 4 were removals of the kind "no-one wants this, let's ditch it".
moritz * pod
dalek ast: 5b9bca8 | (Solomon Foster)++ | S06-signature/slurpy-params.t:
Fudge for niecza. Cleaned up one test.
15:21
ecza: ddbe117 | (Solomon Foster)++ | t/spectest.data:
Turn on S06-signature/slurpy-params.t.
15:22
masak hm, maybe I should write that fireworks animation that I tried and failed to write at the end of 2008... :)
(because Rakudo was too unstable) 15:23
15:24 hundskatt joined
masak hundskatt: \o 15:25
phenny: en sv "dog tax"?
phenny masak: "hunden skatt" (en to sv, translate.google.com)
masak phenny: almost. :)
tadzik masak: we can write some allegro bindings 15:28
It'll require some help from the good, ol' C
masak ooh
tadzik allegro is terrible for dyncalling
masak still, it would be a nice demo.
I'm available most of tomorrow for that.
tadzik allegro_init() is a macro, you read keystrokes by reading a global array, stuff like that
okay, we can run a little hackathon then :) 15:29
masak another possibility would be to write something in Perl 6 and compile it to something JS-and-canvas-y with perlito.
tadzik hmm 15:31
6model/reprs/KnowHOWREPR.c has a gc_free function, which frees memory
maybe we could hook it to some Perl6HOW and have a simple DESTROY
15:31 baest left
tadzik moritz++ for the idea 15:31
moritz any other important Perl 6 stuff that happened in 2011? 15:33
tadzik what do we have in the advent calendar that was unavailable before? New NCI? 15:34
moritz that kinda belongs to the "nom" topic
tadzik ok
proper exceptions? Or is it too early? 15:35
moritz yes, I'll write about those (and the other grants) 15:36
15:42 am0c left 15:43 LlamaRider left 15:53 mikemol joined 15:56 sayu left, sayu_ left 16:01 sayu joined 16:02 sayu left
dalek ecza: 9738bcf | (Solomon Foster)++ | lib/CORE.setting:
Add Cool.polar, Cool.roots, and sub roots.
16:04
ecza: 763b0b1 | (Solomon Foster)++ | t/spectest.data:
Turn on S32-num/roots.t.
16:11 sayu joined 16:19 sayu left 16:21 MayDaniel left 16:34 thou joined 16:47 tokuhirom joined 16:52 tokuhirom left 16:53 imarcusthis joined 17:12 daxim left 17:20 PacoAir left 17:21 PacoLinux left 17:26 PacoAir joined 17:32 packetknife left 17:33 packetknife joined 17:40 PacoLinux joined 17:49 MayDaniel joined
masak smiles at Cool.polar 17:50
clearly we need to invent Hot.equatorial, too 17:51
17:52 estrabd joined 17:54 LlamaRider joined
moritz o~kl,mk~.9~n       18:07
18:18 drbean left 18:22 Trashlord left 18:24 Chillance joined 18:25 drbean joined 18:28 kst joined
masak moritz: hi, Ronja :) 18:38
18:53 drbean left 18:58 guest_ joined
guest_ I am wondering if their is an advance perl guide equivalent to the linux documentation projects website bash guide out their? I know the basics and want to be come an advanced perl writter what is the hardest or best free advanced perl guide... in your opinon 18:58
i.e the hardest perl code the most advanced coding style ,...etc book preferred in html or pdf
19:00 drbean joined
masak guest_: first, read all of perldoc.perl.org/ 19:02
all of it.
it's entirely free and of very good quality.
also, make sure you read www.onyxneon.com/books/modern_perl/index.html
then, read hop.perl.plover.com/ 19:03
all of these are free and available online.
the latter two also exist as dead-tree books.
guest_ Ok, do you think if I can go thru all of these and understand/code all of those examples then I would be considered an advanced perl writter? Or does it get alot more advanced then these guides 19:05
LlamaRider You can't really become an advanced user of a language without writing an advanced application in that language. Or that would be my take on things. Similarly, you don't need to know all of perldoc to be good at what you need Perl for. 19:07
19:08 hundskatt left, preflex left, wolfman2000 left, jevin_ left, snarkyboojum left, pomysl left, cotto left, jnthn left, Helios left, kranius left, chra left, jasonmay left
guest_ agreed but if you can understand/code the bulk of those examples. And then practice alot. I was just wondering if their is harder stuff or if these documents miss some advanced perl stuff... 19:09
19:09 kst left
guest_ or if you should be all set in terms of being an advanced perl coder if you code alot and can understand the links 19:10
masak guest_: it takes years and years of practice.
guest_: but the best you can do is to practice while also getting a lot of good quality input, such as those books.
guest_ I agree but does the documents miss an of the concepts 19:11
masak guest_: the Camel book is reputedly very good too, but it costs money.
guest_: the documents cover a lot of the concepts. some concepts are such that one only discovers them while writing actual code, though.
guest_ or does it have all the basics to advance concepts and coding tech's
masak those books cover a lot of topics, from basic ones to advanced ones. 19:12
19:12 hundskatt joined, preflex joined, wolfman2000 joined, jevin_ joined, snarkyboojum joined, pomysl joined, cotto joined, jnthn joined, kranius joined, Helios joined, chra joined, jasonmay joined
masak of course, those terms depend on what background you have from before. :) 19:12
HOP is perhaps the most eye-opening of the three. 19:13
guest_ I know to get good you have to code/practice to get familar with all the concepts but that just comes with time if you have all the perl documents / coding syntax down / available to look up
you should just over time tend to memorize from doing it so long. And I come from a background of coding in alot of different languages :) 19:15
19:16 kst joined
LlamaRider You can go a very long way armed with just perldoc, as far as core language features are concerned. And reading other Perl projects worked best for me when learning how to make my own larger apps. 19:16
guest_ so you start by looking up syntax and end with memorizing it over time that is really all it is. If you know the concepts
19:16 kst left
LlamaRider you can write a lot of unmaintainable code by just memorizing syntax ^^ 19:16
19:18 packetknife left, fhelmberger left, Exodist left, mattp_ left
guest_ I am curious when one would choose perl over bash scripts in a linux os's. Also now that I am becoming advanced at bash, I see no benifit over the other... perl and bash both have regx... 19:18
19:18 hillu joined
guest_ or when you would think perl would be the better choice 19:18
19:19 kst joined, Chillance left, MayDaniel left, arlinius left, simcop2387 left, pochi left, cosimo left
LlamaRider well, depends what you are doing 19:19
the CPAN gives you enormous help when doing some relatively common task, such as crawling the web or analysing texts
you can make your own custom crawler in 10 lines of code ^^ 19:20
also bash is terrible for larger code bases
very hard to maintain
19:20 buubot_backup joined
guest_ does anybody have an example on when you would choose perl over bash and visa-versa. I think you could use either in most cases so pick the one you know the best and go with it 19:21
LlamaRider perldoc also gives you better facilities to document your code
I just gave you a recent one for me :)
19:21 Chillance joined, MayDaniel joined, arlinius joined, simcop2387 joined, pochi joined, cosimo joined, risou joined, orevdiabl joined, broquaint joined 19:22 packetknife joined, kshannon joined, kcwu joined, ingy joined, TimToady joined, Lothar joined, PZt joined, ashleydev joined, athomason joined, cxreg joined, kthakore joined, sorear joined, fhelmberger joined, Exodist joined, mattp_ joined
guest_ Also don't for get bash needs cygwin to run on windows :( . Thanks for the example 19:22
moritz github.com/moritz/perlgeek.de/blob...n-2011.txt # feedback welcome 19:23
19:23 lutok left, Timbus left, estrabd left, pothos left, bluescreen10 left, ruoso left, Khisanth left, REPLeffect left, hillu left, PacoAir left, mj41 left, sivoais left, silug left, thou left 19:24 hillu joined, estrabd joined, PacoAir joined, thou joined, bluescreen10 joined, mj41 joined, lutok joined, sivoais joined, Timbus joined, silug joined, ruoso joined, Khisanth joined, pothos joined, REPLeffect joined, rsimoes joined, domidumont joined, amkrankruleuen joined, ranguard joined, krakan joined, awwaiid joined, mathw joined, moritz joined, mux joined, rhr joined, pothos left
moritz I plan to publish in about 12 to 16 hours 19:24
19:25 pothos joined
masak guest_: bash is highly idiosyncratic and not good for writing bigger programs. I only ever use bash when I know my code is going to be (a) very short, and (b) consisting mostly of shell commands. 19:26
guest_ ok, and perl for more bigger things? 19:27
sorear good * #perl6 19:29
masak sorear! \o/ 19:32
guest_: yes, for even *slightly* bigger things.
guest_: as soon as code size starts to scale, Perl is simply a better bet for soaking up complexity than bash. 19:33
flussence Portage is a great example of a large project written entirely in bash code. After you see that you'll be thoroughly convinced not to copy it :) 19:34
guest_ well, when it gets more complicated won't you start using language such as c/c++ or java? When would you use perl before those? 19:35
masak guest_: many reasons. C and C++ are much more verbose than Perl. Perl gives you more punch per line of code. 19:36
guest_ is perl like between bash and a language like c/c++ /java
flussence perl is a language for Getting Stuff Done.
masak guest_: Perl is said to have the "manipulexity" of C and the "whipuptitude" of shell.
guest_ so when you you use c/c++ /java over perl ? ( I can only say if portability or coding an os from scratch then you would favor java or c/c++) 19:37
colomon actually, perl is extremely portable 19:39
masak see 'perldoc perlport'.
19:39 cooper joined, cooper left 19:40 cooper joined 19:43 molaf left
LlamaRider Except very high-performance computing, I see no other reason to choose the c/c++/java alternatives. And usually those are easy to embed with XS or Inline 19:47
19:48 Trashlord joined 19:52 fridim_ joined, rindolf joined
rindolf Hi all. 19:53
colomon o/
19:53 arlinius left
rindolf Did you people take a look at the paper referenced in the link at groups.google.com/group/sayeret-lam...0edc44d9bc about the quoting support in the new Racket (formerly known as PLT Scheme)? It is supposed to be a generalisation of here-docs and string interpolation. 19:54
19:55 [particle] joined 20:03 wolfman2000 left
moritz no 20:03
masak nope. 20:04
rindolf There's a folllow-up message by him now. 20:05
moritz fwiw the paper is at barzilay.org/misc/scribble-reader.pdf 20:11
for those not wanting to chase links :-)
(repost) and comments on github.com/moritz/perlgeek.de/blob...n-2011.txt before I publish it? 20:15
20:17 bluescreen10 left, tokuhirom joined
masak reads moritz' draft 20:17
s/its compiler/its compilers/ 20:18
colomon I think I'd put more emphasis on the new metamodel in rakudo.
Woodi hi today :) I started to wonder what means print is for computer readable output... to config files or files generaly ? 20:19
masak moritz: ss/(all the books) I've/$0 I/
Woodi: who says that? 20:20
colomon moritz: also, nci in the rakudo section? (is it mentioned later? I'm doing this as I read)
Woodi and lastly was exceptions work and NCI
masak: moritz++ prepost
colomon moritz: should probably mention easy interoperability with CLR libraries in the niecza section 20:21
masak oh, I see it now :)
moritz colomon: OK, I'll mention it
Woodi k, gn ppls :)
20:21 arlinius joined, tokuhirom left
masak we never fixed the brain-damaged difference between print and say? :( 20:21
moritz I find them quite convenient, actually 20:22
20:23 cognominal___ left
rindolf moritz: looks good. 20:23
20:23 cognominal___ joined, sftp left
masak moritz++ 20:24
moritz: hope you caught the two typos I flagged above.
moritz do we have any blog post about the new NCI? 20:25
masak: I'm catching up on them :-)
20:25 sftp joined, cedric joined
cedric hello #perl6! 20:26
moritz++ # Retrospection 2011
colomon \o
moritz: there was an advent post, late from tadzik++ 20:27
20:27 drbean left
guest_ heres a cool program I wrote guys check it out pastebin.com/RRAYHtNf 20:27
20:29 bluescreen10 joined
rindolf guest_: you have some typos in the header. 20:30
guest_: there are many Sudoku solvers around.
guest_ I know feel free to correct them and enjoy
moritz we enjoy Perl 6 code much more around here 20:31
guest_ I figured I would right one... I think I am going to translate it later into perl I will post it if I do
moritz ok, I've mentioned NCI and CLR interop in github.com/moritz/perlgeek.de/comm...ad5cad1820 (masak++'s typo fixes are in a separate commit) 20:33
masak guest_: post it if you translate it into Perl *6*. this is #perl6. 20:34
20:34 drbean joined
masak nom: my @chars = "this is just a simple example".comb; (my %offsets).push( @chars Z 0..* ); say @chars.perl 20:36
p6eval nom 5b58e0: OUTPUT«Array.new("t", "h", "i", "s", " ", "i", "s", " ", "j", "u", "s", "t", " ", "a", " ", "s", "i", "m", "p", "l", "e", " ", "e", "x", "a", "m", "p", "l", "e")␤»
masak er.
nom: my @chars = "this is just a simple example".comb; (my %offsets).push( @chars Z 0..* ); say %offsets.perl
p6eval nom 5b58e0: OUTPUT«("t" => [0, 11], "h" => 1, "i" => [2, 5, 16], "s" => [3, 6, 10, 15], " " => [4, 7, 12, 14, 21], "j" => 8, "u" => 9, "a" => [13, 24], "m" => [17, 25], "p" => [18, 26], "l" => [19, 27], "e" => [20, 22, 28], "x" => 23).hash␤»
masak \o/
moritz \o/ indeed
masak niecza: my @chars = "this is just a simple example".comb; (my %offsets).push( @chars Z 0..* ); say %offsets.perl 20:37
p6eval niecza v13-17-g763b0b1: OUTPUT«Unhandled exception: Unable to resolve method push in class Hash␤ at /tmp/eLUEKLZ9Io line 1 (mainline @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2587 (ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2588 (module-CORE @ 61) ␤ at /home/…
masak awww :)
moritz shouldn't be too hard to implement :-)
colomon what's the test file for that? ;)
moritz t/spec/S32-hash/push.t 20:38
"of course" :-)
masak :P
colomon needs to remember to focus on $work, dang it!
well-named
moritz the implementation can probably be copied rather directly from rakudo
masak whistles the siren song of Perl 6 for colomon :)
moritz perl6: my %h = a => 1, b => 1; say %h.invert.WHAT 20:40
p6eval niecza v13-17-g763b0b1: OUTPUT«Hash()␤»
..pugs b927740: OUTPUT«*** No such method in class Hash: "&invert"␤ at /tmp/daw1WKG3Md line 1, column 29 - line 2, column 1␤»
..rakudo 5b58e0: OUTPUT«List()␤»
moritz perl6: my %h = a => 1, b => 1; say %h.invert.perl
p6eval rakudo 5b58e0: OUTPUT«(1 => "a", 1 => "b").list␤»
..pugs b927740: OUTPUT«*** No such method in class Hash: "&invert"␤ at /tmp/kcMGPtagra line 1, column 29 - line 2, column 1␤»
..niecza v13-17-g763b0b1: OUTPUT«{"1" => "b"}.hash␤»
moritz fwiw it should return a List, not a Hash
moritz opens nieczabug
masak moritz++ 20:41
20:44 y3llow left 20:45 mj41 left, pothos left 20:47 pothos joined
moritz die "Sorry, paths do not form a monoid." unless @paths; # lib/CORE.setting line 2401 20:47
20:47 y3llow joined
moritz that is an... interesting way to formulate it :-) 20:48
20:48 rindolf left
masak what does it mean? 20:48
:)
moritz sometimes wonders if sorear++ puts such errors in just to check if somebody reads the source or the diffs
20:49 y3llow left 20:50 pothos left, y3llow joined, pothos joined
colomon just wanted sat .WHAT in C++ :( 20:51
*say
moritz colomon: in C++ you're supposed to know your types at compile time :-) 20:52
20:52 y3llow left
colomon moritz: yeah, well, that's being a problem at the moment. :) 20:52
masak "paths do not form a monoid" seems like an obscure way to say "if paths did form a monoid, you could pass in an empty @paths here, but they don't"
20:52 y3llow joined
colomon maybe sorear++ ported the code from pugs. ;) 20:52
20:53 pothos left
masak :P 20:53
20:53 pothos joined
moritz iirc a monoid needs a neutral element, so it can't be the empty set 20:53
but it's still a rather weird way to formulate it 20:54
20:56 drbean left
moritz tries to implement Hash.push in niecza 21:00
kshannon Jeez, rakudo sure leaks memory like a seive :(
colomon moritz++
moritz niecza: use Test; my %h = (a => 1, b => 2, c => 3); my %k = %h; is_deeply %h, %k, 'foo'; done 21:02
p6eval niecza v13-17-g763b0b1: OUTPUT«ok 1 - foo␤1..1␤»
moritz # got: {"a" => 1, "c" => 3, "b" => 2}
# expected: {"a" => 1, "b" => 2, "c" => 3}
those look to be the same, just printed in different order 21:03
or am I just being thick?
21:04 drbean joined
thou if you're just being thick, then i think thick is good 21:04
dalek ecza: 6c964f7 | moritz++ | lib/CORE.setting:
implement Hash.push

t/spec/S32-hash/push.t still fails all but the first test, but this seems to be because is_deeply does not like hashes, not because Hash.push is wrong
21:05
masak moritz: something is wrong with the test suite -- it reports "ok" and then goes on about "got" and "expected". it shouldn't do that. 21:07
oh wait -- the first is from the evalbot, the second is from you :)
anyway, if the test framework reports those two as different, then it's wrong. 21:08
21:08 Trashlord left
moritz it doesn't :-) 21:10
i tries to recreate it the error in is_deeply in the evalbot, and failed
flussence argh... TAP::Parser has an actual_passed() and a passed() method. TAP::Parser::Aggregator only lets me get at the *useless* one. 21:11
(now I recall why I never bothered to fix these graphs the first time...) 21:12
moritz is actual_passed + skip + todo == passed?
flussence actual_passed + todo_passed = passed, if the docs are correct. I'm gonna check the module just to make sure. 21:13
moritz because prove reports skipped as "passed"
flussence seems like it counts skips too :/ 21:17
sorear moritz: I wonder why I did that. Why couldn't it just return "." ? 21:20
wait, I get it, that's not a right-identity because "foo.txt/." is not interchangable with "foo.txt" 21:21
flussence
.oO( maybe I should write my own TAP parser in perl6, with a sane API... )
moritz anyway, that error message is incomprehensible for most programmers :-)
sorear moritz: they're the same... is_deeply is currently using .perl 21:22
moritz ouch
well, not so ouch if we change Hash.perl to sort the keys
sorear will take recommendations :)
re. errors
sorear is now looking at the retrospective prepose
prepost
dalek kudo/nom: a8c513b | moritz++ | src/core/Hash.pm:
make Hash.push a bit more efficient and correct
21:23
sorear moritz++ using the One True Date Format in a header comment ;)
moritz sorear: :-) I've hacked my blog engine to use that instead of (stat $file)[9] 21:24
masak hopes that the One True Date Format is YYY-MM-DD 21:25
moritz masak: in this context it's UNIX timestamp :-)
masak hah :) 21:26
21:26 bluescreen10 left 21:28 cedric left 21:35 jaldhar left
tadzik o/ 21:37
sorear o/ 21:38
masak o/ 21:39
21:39 jaldhar joined 21:45 risou is now known as risou_awy 21:49 bluescreen10 joined
masak 'night, #perl6 22:01
sorear bye 22:05
22:07 proller left 22:08 donri joined 22:09 shinobicl_ joined 22:12 LlamaRider left
dalek ast: 4edb4f0 | sorear++ | S32-hash/invert.t:
[S32-hash/invert] Unfudge for sorear/niecza#96
22:12
22:13 thou left 22:14 donri left
dalek ast: 61a2146 | sorear++ | S02-lexical-conventions/unicode.t:
[S02-lexical-conventions/unicode] Hindi works in niecza now
22:14
ecza: 4bdcc7e | sorear++ | lib/CORE.setting:
Hash.invert should return List (fixes #96)
22:15
colomon moritz++ 22:19
sorear o/ colomon
colomon \o
I slept through moritz's changes sitting up on the couch with my laptop on my lap and the (boring) bowl game on. 22:20
22:21 PacoLinux left 22:22 PacoAir left
kshannon github.com/rakudo/rakudo/pull/47 22:24
sorear has been thinking lately about constant folding
22:25 mj41 joined, shinobicl_ left
sorear niecza: my %hash = (a=>1, b=>2, c=>3); say (%hash<c b a>:p).perl 22:26
p6eval niecza v13-18-g6c964f7: OUTPUT«("c" => 3, "b" => 2, "a" => 1)␤»
22:26 drbean left
dalek ecza: 4d836ba | sorear++ | lib/CORE.setting:
Make Hash.perl sort the output

Ideally is_deeply would be using eqv instead, but this change seems to be beneficial in its own right, so it goes in.
22:29
sorear I love how short the diff is
(though it could be shorter) 22:30
(with better P6 support)
22:31 PacoAir joined
colomon :p ? 22:31
maybe I'm being dense, self.keys.sort makes sense, but what is self{self.keys.sort}:p ? 22:33
afk # need to pick up little guy from Granny's. 22:34
22:34 drbean joined
sorear :p, short form of :pairs, is an index adverb 22:38
S02:2493 22:39
nom: my %hash = a=>1,b=>2,c=>3; say (%hash<b c>:p)
p6eval nom a8c513: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2␤»
22:42 shachaf joined
sorear huh, seems there are *no tests at all* for :pairs in roast 22:42
o/ shachaf
22:45 kaare_ left
shachaf sorear: Hello. 22:47
22:50 thou_ joined 22:53 thou_ left, thou_ joined
sorear there are however some tests for :p in S03-operators/subscript-adverbs.t 22:55
23:02 kensanata joined 23:07 cooper left 23:08 thou joined
colomon sorear: probably because rakudo has never implemented it? (back with boy, now cooking dinner) 23:10
[Coke] gist.github.com/1476841 - niecza at 85.05% 23:11
23:14 mtk left
sorear [Coke]: where are you getting 85.05%? 23:18
[Coke] missed a push... 23:19
refresh. 23:20
colomon sorear: is self{self.keys.sort}:p actually better than self.pairs.sort? 23:22
23:22 Trashlord joined
sorear colomon: yes, because the latter doesn't work. :) 23:23
colomon why not?
sorear cmp is a horrible horrible hack at the moment
colomon cmp is a horrible hack which works on Pair. ;)
niecza: say (a => 5) cmp (c => 2) 23:24
p6eval niecza v13-20-g4d836ba: OUTPUT«-2␤»
colomon niecza: say (a => 5) cmp (a => 2)
p6eval niecza v13-20-g4d836ba: OUTPUT«3␤»
sorear huh! someone must have added that while I wasn't looking
colomon ;)
I needed it for a side program I was working on.
sorear colomon++ # d8f13342 23:25
colomon mind you, I suppose it is slightly less stable than what you've got, as you never even try to compare the values. 23:26
(I mean, in self{self.keys.sort}:p
23:29 Trashlord left