Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-12-30

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:03 TimToady it's supposed to behave like [patA<.ws>|patB<.ws>]
00:03 fsergot joined #perl6
00:03 thou ok
00:03 thou and that <.ws> becomes part of the overall rule's match
00:04 TimToady yes, but rules are mostly for returning trees, not strings
00:06 thou ok. the full grammar i'm trying is https://gist.github.com/1536817
00:06 thou i guess i should stop worrying about the spaces and just start writing some actions to set .ast now
00:07 thou (i was reading masak's crypt.pl and decided to try writing it from scratch for fun)
00:24 drbean joined #perl6
00:52 whiteknight joined #perl6
00:55 alvis joined #perl6
00:56 drbean joined #perl6
01:04 dalek specs: 448a791 | larry++ | S05-regex.pod:
01:04 dalek specs: simplify sigspace rule
01:04 dalek specs:
01:04 dalek specs: Only constructs that are actual matchers look for following sigspace.
01:04 dalek specs: Colon declarations, opening brackets, disjunctions/conjunctions, and
01:04 dalek specs: closures specifically do not.  The beginning of a rule does not, so
01:04 dalek specs: the TOP rule may need to account for leading whitespace.  (A ^ followed
01:04 dalek specs: by whitespace is sufficient for this.)
01:04 dalek specs: review: https://github.com/perl6/specs/commit/448a791d19
01:05 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
01:05 colomon thou++
01:06 TimToady are you assuming a misspelled word like 'refridgerator' is a noun?
01:07 thou hehe
01:07 thou https://gist.github.com/1536817
01:07 colomon TimToady: undefine $a versus $a = Mu    ?
01:07 thou i'm making lots of other assumptions which are worse than that :-)
01:07 * colomon was looking in the spec, but his browser crashed.  :(
01:08 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
01:08 p6eval niecza v13-8-gc17e94b: OUTPUT«Any()␤»
01:08 colomon TimToady++
01:08 colomon nom: my $a = 1; $a = Nil; say $a
01:09 p6eval nom e6fee1: OUTPUT«Nil␤»
01:09 TimToady that's wrong by spec
01:09 TimToady b: my $a = 1; $a = Nil; say $a
01:09 p6eval b 1b7dd1: OUTPUT«Any()␤»
01:09 TimToady and a regression, apparently
01:11 TimToady 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 casey joined #perl6
01:12 Lilpid left #perl6
01:12 Lilpid joined #perl6
01:13 Lilpid left #perl6
01:15 datums_nb joined #perl6
01:17 dalek specs: 4405e4c | larry++ | S02-bits.pod:
01:17 dalek specs: assigning Nil resets container to default
01:17 dalek specs:
01:17 dalek specs: (Default is not always going to be undefined, if there is a declared default.)
01:17 dalek specs: review: https://github.com/perl6/specs/commit/4405e4cfc6
01:22 Guest28870 anybody here who can talk about some P6 sprintf semantics?
01:22 wknight8111 joined #perl6
01:22 wknight8111 masak asked me to implement the C format specifier in Parrot, but I want to make sure I have the requirements clear
01:29 meraxes_ joined #perl6
01:29 TimToady I don't know that I've ever seen %C discussed here...
01:33 wknight8111 all the more reason to start discussing it in earnest!
01:39 wknight8111 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 wknight8111 or, only the arguments which have not yet been processed?
01:42 alc joined #perl6
01:42 wknight8111 and I would be very surprised if this was all unicode-safe
01:43 wknight8111 ...wrong channel
01:43 TimToady whew!  :)
01:43 TimToady I would think only the remaining args
01:44 wknight8111 the example in the synopsis seems to suggest it gets all args
01:44 benabik %C is from perl6 sprintf
01:44 TimToady however, the example seems to suggest otherwise
01:45 TimToady the original example is from wayland
01:45 wknight8111 okay
01:46 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?
01:46 TimToady rather than relying on 'is rw' and knowledge of its exact position
01:47 wknight8111 yes, that does seem more reasonable to me
01:48 TimToady I'm leary of allowing the string to be modified, for similar reasons
01:48 * TimToady is biased towards FP these days...
01:49 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?
01:49 wknight8111 I have no idea
01:49 wknight8111 if only we could find the guy who created P5 and ask him.... :)
01:50 TimToady doesn't seem like it
01:50 TimToady not in 'perldoc -f sprintf' anyway
01:50 wknight8111 I think there was a %n modifier it's intending to replace
01:51 wknight8111 at least, that's what S32 says
01:51 thou niecza: https://gist.github.com/1537223
01:51 thou nom: https://gist.github.com/1537223
01:51 TimToady P5 has continued to create itself over the last decade, and not always with P6's design principles :)
01:51 p6eval niecza v13-8-gc17e94b: OUTPUT«unsorted: parsed northeast␤sorted: parsed northeast␤»
01:51 p6eval nom e6fee1: OUTPUT«unsorted: no parse␤sorted: parsed northeast␤»
01:51 thou ^ is that a bug in nom's LTM implementation?
01:52 TimToady could be
01:54 TimToady if masak is asking for %C, what's the use case he has in mind?
01:54 wknight8111 getting P6 complete
01:56 TimToady this also strikes me as a security hole
01:56 TimToady assuming a user is allowed to supply a format
02:00 * 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
02:02 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...
02:02 p6eval niecza v13-8-gc17e94b: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤ 'Z' used at line 1â�¤â�¤Potential difficulties:â�¤  &prefix:<XXX> is declared but not used at /tmp/qqb0tN1mFs line 1:â�¤------> [32msub prefix:['Z'][33mâ��[31m($a) { say $a; }; Z "hello"[0mâ�¤â�¤Unhandled exception: C…
02:02 colomon niecza: sub prefix:<Z>($a) { say $a; }; Z "hello"
02:02 p6eval niecza v13-8-gc17e94b: OUTPUT«hello␤»
02:03 TimToady XXX?!?
02:04 TimToady 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.
02:05 TimToady um, generally, that's how I18n is done...
02:05 TimToady for some definition of "user"
02:06 benabik I suppose it's less of a bad idea without C strings…
02:06 * sorear appears ...
02:07 sorear 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:08 sorear TimToady: yeah, probably.
02:09 sorear (re. fossil)
02:09 sorear another problem I have now
02:10 sorear $*OUT can't be initialized at BEGIN time because filehandles shouldn't be serialized
02:10 sorear so niecza sets up $*OUT etc in an INIT {} block
02:10 sorear niecza: BEGIN say "hi";
02:10 p6eval niecza v13-8-gc17e94b: OUTPUT«hi␤»
02:10 sorear niecza: CHECK say "hi";
02:10 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…
02:10 sorear hmm
02:10 sorear this is more complicated than I thought
02:11 sorear niecza: INIT say "hi";
02:11 p6eval niecza v13-8-gc17e94b: OUTPUT«hi␤»
02:23 simcop2387 joined #perl6
02:25 kshannon Does it make sense to decontainerize something which is not CONCRETE (e.g. the class object for Proxy)
02:26 kshannon If I modify decontainerize to do nothing unless IS_CONCRETE,  (plus a few other smallish hacks) I can get --target=past to work.
02:44 sorear kshannon: I thought that decontainerize did nothing except on containers.
02:44 sorear rakudo: say $*PERL.WHAT
02:44 p6eval rakudo e6fee1: OUTPUT«Failure()␤»
02:44 sorear rakudo: say $*PERL
02:45 p6eval rakudo e6fee1: OUTPUT«Failure.new(exception => Exception.new())␤»
02:45 sorear rakudo: say $?PERL
02:45 p6eval rakudo e6fee1: OUTPUT«===SORRY!===␤Variable $?PERL is not predeclared at line 1, near ""␤»
02:45 sorear rakudo: say GLOBAL::.keys
02:45 p6eval rakudo e6fee1: OUTPUT«0␤»
02:45 sorear rakudo: say ::GLOBAL.WHO.keys
02:45 p6eval rakudo e6fee1: OUTPUT«␤»
02:45 sorear rakudo: say ::PROCESS.WHO.keys
02:45 p6eval rakudo e6fee1: OUTPUT«$IN $OUT $ERR $FATAL $TZ @ARGS $ARGFILES %ENV $VM $CWD @INC $PID $OS $OSVER $EXECUTABLE_NAME $PROGRAM_NAME␤»
02:45 sorear rakudo: say $*VM.WHAT
02:45 p6eval rakudo e6fee1: OUTPUT«Hash()␤»
02:46 sorear rakudo: say $*VM
02:46 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", …
02:48 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␤»
02:50 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␤»
02:53 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␤»
02:53 benabik nom: say Proxy.new(FETCH => method { "test" })
02:53 p6eval nom e6fee1: OUTPUT«test␤»
02:55 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...
02:55 kshannon say Scalar
02:55 kshannon nom: say Scalar
02:55 benabik nom: my $a = 'test'; say Proxy.new(FETCH => method { $a }).perl
02:55 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␤»
02:55 p6eval nom e6fee1: OUTPUT«Str.new()␤»
02:56 benabik nom: my $a = 'test'; say Proxy.new(FETCH => method { $a })
02:56 p6eval nom e6fee1: OUTPUT«"test"␤»
02:56 kshannon Get the same issue with Scalar.
02:56 benabik Not sure why it adds the ""s there ^^
02:57 benabik nom: my $a = 'test'; say Proxy.new(FETCH => method { $a }).perl
02:57 p6eval nom e6fee1: OUTPUT«Str.new()␤»
02:57 kshannon say Scalar.new()
02:59 kshannon See,  I reckon it shouldn't be trying to decontainerize container class objects (i.e. the 6model IS_CONCRETE macro returns false)
03:00 kshannon 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:01 dalek roast: 0d74a86 | (Solomon Foster)++ | S06- (2 files):
03:01 dalek roast: Epic fudging for niecza.
03:01 dalek roast: review: https://github.com/perl6/roast/commit/0d74a86067
03:01 kshannon so currently: perl6 --target=past -e 1
03:01 kshannon dies during the dump...
03:02 dalek niecza: 77e2772 | sorear++ | / (2 files):
03:02 dalek niecza: Embed version information into builds
03:02 dalek niecza: review: https://github.com/sorear/niecza/commit/77e2772452
03:02 dalek niecza: c0ec840 | sorear++ | src/niecza:
03:02 dalek niecza: Add --version/-v option for masak
03:02 dalek niecza: review: https://github.com/sorear/niecza/commit/c0ec840979
03:06 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:13 colomon wow, rakudo's compile is painfully slow right now.
03:16 colomon damn it, I broke it for rakudo
03:21 sorear niecza: say $?PERL
03:21 p6eval niecza v13-10-gc0ec840: OUTPUT«{"name" => "niecza", "version" => "v13-10-gc0ec840", "build-time" => 1325212095.5008221}␤»
03:27 sorear colomon: huh?  it looks like niecza is less fudged than rakudo
03:27 colomon that's true
03:27 colomon but there's like 300 lines of warnings when you run the file
03:28 colomon maybe more.
03:28 colomon it's ugly as sin
03:29 sorear then don't
03:30 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:34 sorear you fudged something that does a different number of tests than fudge thinks it does
03:37 colomon or rakudo does...
03:38 tokuhirom joined #perl6
03:42 drbean joined #perl6
03:42 Psyche^ joined #perl6
03:48 colomon ah, think I found it.
03:49 colomon problem was on the rakudo side.
03:50 dalek roast: 7e6e783 | (Solomon Foster)++ | S06-operator-overloading/sub.t:
03:50 dalek roast: Fix fudging for rakudo.
03:50 dalek roast: review: https://github.com/perl6/roast/commit/7e6e783930
03:57 lutok joined #perl6
03:59 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 colomon No rush or anything, just seems like it might be interesting.
03:59 colomon I'm off to bed...
04:03 sorear sleep well
04:05 sorear oh, huh!  the error in CHECK handling was... PHASER_CHECK is not defined :|
04:33 shinobicl_ joined #perl6
04:49 drbean joined #perl6
05:05 kevin joined #perl6
05:07 ruoso hmm... my heavy-junction-oriented sudoku solving keep giving random segfaults and weird errors
05:09 moritz on which compiler?
05:10 ruoso rakudo... nom branch
05:10 ruoso paste?
05:11 ruoso ENOBOTS
05:11 moritz ruoso: just use gist.github.com
05:12 sorear o/ ruoso
05:12 ruoso https://gist.github.com/1538015
05:13 ruoso the junction part is in cleanup-impossible-values
05:13 moritz nom: https://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
05:14 ruoso and it takes a loong time and produces a lot of output
05:15 moritz oh
05:15 ruoso the input is just the set of numbers as in the comment but without the #
05:18 sorear and I guess it doesn't much like the Austrian anthem. ;)
05:22 ruoso my guess is the junction autothreading with the new parrot tasks is causign trouble
05:24 tokuhirom joined #perl6
05:25 moritz ruoso: did you patch rakudo?
05:25 moritz because currently it doesn't use threads/tasks at all
05:26 ruoso hmmm I didn't... so my guess was wrong
05:26 ruoso but it segfaults before solvign
05:27 alvis joined #perl6
05:27 ruoso night &
05:38 preflex_ joined #perl6
05:52 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
05:52 sorear jj?
05:53 sorear o/ [Coke]
05:57 [Coke] ww
05:57 [Coke] o/
06:03 moritz jaldhar: I'd go with the current development version of rakudo (or niecza)
06:04 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: http://strangelyconsistent.org/p6cc2011/NOTES )
06:06 moritz kshannon++
06:13 kaleem joined #perl6
06:14 sorear niecza: BEGIN say slurp "/etc/debian_version"
06:14 p6eval niecza v13-10-gc0ec840: OUTPUT«6.0␤␤»
06:16 dalek niecza: 9cfe863 | sorear++ | / (3 files):
06:16 dalek niecza: Major refactor to true phasers
06:16 dalek niecza:
06:16 dalek niecza: Adds CHECK support.  Closes the BEGIN/--safe loophole.  Guarantees that
06:16 dalek niecza: phasers will be called at most once per compartment.  Simplifies handling
06:16 dalek niecza: of "eval".  Treats phasers defined after call point as BEGIN.
06:16 dalek niecza: review: https://github.com/sorear/niecza/commit/9cfe8630ad
06:16 sorear eval 'INIT say "hi"; 1 1' # this now says hi
06:16 buubot_backup sorear: INIT say "hi"; 1 1
06:55 thou joined #perl6
07:00 dalek niecza: f29bd58 | sorear++ | src/NieczaFrontendSTD.pm6:
07:00 dalek niecza: Avoid warning spam when calling a protoless multi operator (colomon)++
07:00 dalek niecza: review: https://github.com/sorear/niecza/commit/f29bd58cbb
07:00 dalek niecza: 95ba995 | sorear++ | lib/Kernel.cs:
07:00 dalek niecza: Fix misgeneration of multi operator dispatchers
07:00 dalek niecza: review: https://github.com/sorear/niecza/commit/95ba99574c
07:02 jaldhar moritz: , kshannon: thanks
07:10 baest joined #perl6
07:21 tokuhirom joined #perl6
07:38 * sorear mind wanders to the subject of constant folding
07:48 lutok joined #perl6
07:49 datums_nb joined #perl6
07:51 HarryS joined #perl6
07:51 HarryS joined #perl6
08:00 molaf joined #perl6
08:00 sftp joined #perl6
08:07 kaare_ joined #perl6
08:34 arlinius joined #perl6
08:42 koban joined #perl6
08:53 * TimToady wonders how to go about testing for successful hash randomization...
08:53 TimToady Perl 5 is in the news in a good way; would hate to undo that for Perl 6...
08:56 TimToady 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:57 TimToady have no clue whether .NET/mono can do hash randomization easily...
08:58 TimToady zzz &
09:02 masak morningz, #perl6
09:12 masak nice one! https://rt.perl.org/rt3/Tic​ket/Display.html?id=107254
09:15 masak I'm *only* asking for %C because it's in the spec. actually, I think it's a horrible addition.
09:15 masak actually, I'll go ahead and de-spec it right now, since no-one still active seems to want it. :)
09:16 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.
09:16 masak Timbus: see S29, but hurry :P
09:16 masak S29/Str to be exact.
09:16 * Timbus runs
09:17 masak er, S32/Str -- sorry.
09:17 masak http://perlcabal.org/syn/S32/Str.html and grep for '%C'
09:18 Timbus .. no thanks
09:18 Timbus you can remove that 3:
09:18 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 :)
09:19 frettled (merry time-of-year)
09:19 Timbus ha HA i steal yet another tab complete
09:19 frettled Timbus: argh :)
09:19 masak frettled: time-of-year to you too, good sir!
09:19 frettled yay
09:19 masak Timbus: so *that's* your plan! o.O :P
09:20 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 )
09:20 Timbus heh
09:20 masak phenny: tell frettled something like this?
09:20 phenny masak: I'll pass that on when frettled is around.
09:20 frettled masak: ah, yes, thanks.
09:20 phenny frettled: 09:20Z <masak> tell frettled something like this?
09:21 frettled But TimToady is around, so, hmm :)
09:21 masak frettled: we need a bot for reminding people how to use the bots :P
09:21 Timbus he just went to bed
09:21 masak frettled: you're around too.
09:21 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)
09:21 frettled masak: yup, which is why phenny reminded me immediately.
09:21 Timbus no, only when you talked
09:21 proller_ joined #perl6
09:22 frettled aha
09:22 frettled darnit.  Well, what's one more line of spam between friends.
09:22 Timbus event based systems and all that jazz
09:22 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)   http://events.ccc.de/congress/2011/Fah​rplan/attachments/2007_28C3_Effective_​DoS_on_web_application_platforms.pdf
09:22 phenny frettled: I'll pass that on when TimToady is around.
09:22 frettled This time, I even remembered the URL!
09:24 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.
09:27 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:
09:27 dalek specs: [S32/Str] removed '%C' directive from sprintf
09:27 dalek specs:
09:27 dalek specs: The '%C' directive allows you to go in and change the arguments
09:27 dalek specs: to &sprintf during the &sprintf call itself, using callbacks
09:28 dalek joined #perl6
09:28 LlamaRider joined #perl6
09:28 masak dalek: sorry 'bout that.
09:28 masak you can read the whole commit comment online. :)
09:29 masak https://github.com/perl6/specs/commit/8​ef142f7f49fc62be17dd0569d34e7e17e02bc7b
09:29 LlamaRider Hello to all.
09:30 LlamaRider masak: Thanks for the reply for my contest questions. I'd need to bother you some more about '/' in t1 though :)
09:30 koban left #perl6
09:31 masak that's fine.
09:32 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 LlamaRider And if I am using 'div' you want me to print 'div' to output?
09:33 LlamaRider (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. :)
09:33 masak there will be differences between what the contestants get, so hitting as many numbers as possible is important.
09:34 masak 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:35 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. :)
09:35 masak LlamaRider: no, I said non-integer results probably won't be of much use, since the goal is to represent integers with four 9s.
09:36 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:37 LlamaRider but ok, I got it. back to modifying :)
09:38 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:39 masak 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
09:39 masak dang, we should have allowed sqrt() and floor() as well :P
09:39 Timbus more nines
09:40 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 :)
09:41 Timbus permutations are easy. should have made it more challenging by forcing people to optimize around pathological cases and the like
09:41 Timbus like a projecteuler question
09:41 Timbus but then again this isn't a math contest
09:42 LlamaRider I'm surprised there weren't more tasks that want unspeakable things done ot strings :) or asking for grammars
09:43 masak cognominal: https://rt.perl.org/rt3/Tic​ket/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 masak LlamaRider: "unspeakable things done to strings" sounds like a nice task for next year :)
09:47 Trashlord joined #perl6
09:52 Trashlord joined #perl6
09:53 LlamaRider yep, can't express 5 any longer ^^
09:53 LlamaRider but I'm done with 1 in any case, thanks for the clarifications.
09:54 masak anytime.
10:11 proller joined #perl6
10:12 masak community-driven Python documentation: http://late.am/post/2011/12/2​9/hitchhikers-guide-to-python
10:22 tjrandall joined #perl6
10:36 tokuhirom joined #perl6
10:40 daxim joined #perl6
10:45 tjrandall_ joined #perl6
10:45 LlamaRider are there any sorted datastructures in Perl6? I basically need pop and push operations that maintain the sorted order of elements.
10:46 masak t2, eh? :)
10:46 tadzik :>
10:47 LlamaRider :)
10:47 LlamaRider great way to learn Perl6 btw, keeps me entertained :)
10:47 tjrandall joined #perl6
10:48 masak that's the idea :)
10:48 masak no, there are no built-in priority-queue-like container types.
10:48 masak not like PriorityQueue in Java, for example.
10:49 LlamaRider understood
10:49 LlamaRider time to write my first Perl6 class then ^^
10:50 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:51 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
10:51 moritz LlamaRider: we have modules.perl6.org, and our plans are to gradually evolve that into the "real thing"
10:52 moritz LlamaRider: there have been many high-reaching cpan6 plans, and most of them never left the (over-) design stage
10:52 LlamaRider I see
10:53 bbkr rakudo: my $x = 2.2250738585072011e-308; say "alive";
10:53 p6eval rakudo e6fee1: OUTPUT«alive␤»
10:53 bbkr \o/
10:53 moritz what did you think? :-)
10:54 Trashlord joined #perl6
10:55 frettled Is that the PHP spend-an-eternity killer?
10:55 tadzik :>
10:55 * moritz thought that was Java
10:55 * masak too
10:55 masak rakudo: my $x = 5; say "al-five"
10:55 p6eval rakudo e6fee1: OUTPUT«al-five␤»
10:55 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
10:57 masak woo
10:58 moritz bbkr: p6eval runs on 64bit :-)
11:04 perl joined #perl6
11:08 bbkr I've checked, 32bit is also immune
11:19 LlamaRider joined #perl6
11:20 moritz the floating point conversion code is a bit naive
11:20 moritz but safe :)
11:32 perl joined #perl6
11:41 whiteknight joined #perl6
11:41 Lasse_ joined #perl6
11:47 drbean_ joined #perl6
11:50 mj41 joined #perl6
11:57 cognominal_ joined #perl6
12:04 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)␤»
12:05 tadzik masak, known?
12:07 tadzik meh, no spectests for that even
12:07 tadzik I wonder if that's acceptable to change the attributes after cloning the object
12:11 sayu joined #perl6
12:11 masak don't think that's known.
12:12 masak and I agree that .b should be 3 afterwards.
12:12 tadzik spectests agree
12:12 tadzik and it's not really a nom regression, it seems
12:12 masak that's the whole point of .clone to be a ".new but with the old object's attributes as defaults"
12:12 tadzik now it's just copying the repr
12:13 tadzik doing pir::repr_clone__PP(nqp::p6decont(self));
12:14 tadzik ok, reporting
12:15 masak tadzik++
12:28 tadzik hmm S12-construction/destruction.t refers to some $a which is not declared anywhere
12:29 tadzik I guess it means the '100' in 'for 1..100'
12:32 moritz feel free to sanitize the test
12:33 tadzik thinking about it. I've just dropped some random thoughts to #parrot
12:34 tadzik 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)␤»
12:34 p6eval ..niecza v13-13-g95ba995: OUTPUT«1..1␤»
12:34 p6eval ..pugs b927740: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode␤    at /tmp/ZFckbRQTLR line 1, column 1␤»
12:38 achromic what's the expected memory usage for rakudo nom doing a simple loop/sleep? i'm seeing it use 107MB.
12:39 tadzik I suppose pass should work with no params. In Test::More it does
12:39 tadzik achromic: the memory usage is quite high, we're aware of that
12:40 achromic ok
12:41 moritz tadzik: I think rakudo's Test.pm can be easily fixed
12:41 tadzik yeah, I'm on it
12:41 tadzik it's also full of protos, which were needed in the early days of nom, and are not needed now
12:42 dalek niecza: a69a678 | (Solomon Foster)++ | t/spectest.data:
12:42 dalek niecza: Turn on S06-operator-overloading/sub.t -- sorear++ for cleaning up the wall of warnings.
12:42 dalek niecza: review: https://github.com/sorear/niecza/commit/a69a678367
12:43 bluescreen10 joined #perl6
12:48 masak I'm still fascinated by http://www.cowlark.com/2009-11-15-go/ -- very nice language analysis/comparison.
12:50 tadzik huh, 18 insertions(+), 106 deletions(-)
12:51 tadzik let's see if it still works :)
12:52 tadzik it's still longer than the one in ng
12:53 moritz tadzik: what are you patching?
13:01 tadzik moritz: Test.pm
13:01 tadzik are there tests for Test.pm per se? :)
13:01 moritz there are, but they aren't good
13:01 tadzik ah
13:01 tadzik I can write some, maybe later today
13:02 tadzik I'm worried about false passes, those will be hard to find
13:02 tadzik we have a fail in t/spec/S05-capture/match-object.rakudo
13:04 tokuhirom joined #perl6
13:05 moritz tadzik: it has recently been changed; the fudging migth need updates
13:05 tadzik yep
13:07 moritz I'll take care of it, once my rakudo build has finished
13:12 dalek roast: 41ca236 | moritz++ | S05-capture/match-object.t:
13:12 dalek roast: fix rakudo fudging
13:12 dalek roast: review: https://github.com/perl6/roast/commit/41ca236a2b
13:41 geekosaur that the algol68 comparison?
13:42 dalek rakudo/nom: 5b58e03 | tadzik++ | lib/Test.pm:
13:42 dalek rakudo/nom: Cleanup Test.pm
13:42 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5b58e03c04
14:01 proller joined #perl6
14:37 cognominal___ joined #perl6
14:40 terrence joined #perl6
14:47 LlamaRider joined #perl6
14:53 masak geekosaur: yes.
14:54 masak see also http://strangelyconsistent.or​g/blog/the-ghost-of-algol-68
14:56 PacoAir joined #perl6
14:58 mtk joined #perl6
15:05 MayDaniel joined #perl6
15:06 sayu_ joined #perl6
15:17 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:â�¤------> [32msub foo([33mâ��[31m$n, *%h) { }; foo 1, n => 20, y => 300[0mâ�¤  %h is declared but not used at /tmp/nLqSM_cBgO line 1:â�¤------> [32msub foo($n, *[33mâ��[31m%h) { …
15:17 colomon niecza: sub foo($n, *%h) { say $n; say %h.perl }; foo 1, n => 20, y => 300
15:17 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…
15:18 moritz I'm considering to write a "Perl 6 in 2011" summary-ish blog post
15:18 moritz anyone interested in brainstorming?
15:18 colomon niecza: sub foo($n, *%h) { say $n; say %h.perl }; foo 1, n => 20, y => 300, 4000
15:18 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…
15:18 colomon moritz: sure
15:19 moritz I want to write about
15:19 moritz * nom
15:19 moritz * feature matrix
15:19 moritz * niecza progress
15:19 moritz * advent
15:19 moritz * important spec changes (which?)
15:19 moritz * perlito
15:20 moritz * panda, modules.perl6.org
15:20 moritz * grants
15:20 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".
15:20 moritz * pod
15:21 dalek roast: 5b9bca8 | (Solomon Foster)++ | S06-signature/slurpy-params.t:
15:21 dalek roast: Fudge for niecza.  Cleaned up one test.
15:21 dalek roast: review: https://github.com/perl6/roast/commit/5b9bca8e5c
15:22 dalek niecza: ddbe117 | (Solomon Foster)++ | t/spectest.data:
15:22 dalek niecza: Turn on S06-signature/slurpy-params.t.
15:22 dalek niecza: review: https://github.com/sorear/niecza/commit/ddbe11705f
15:22 masak hm, maybe I should write that fireworks animation that I tried and failed to write at the end of 2008... :)
15:23 masak (because Rakudo was too unstable)
15:24 hundskatt joined #perl6
15:25 masak hundskatt: \o
15:25 masak phenny: en sv "dog tax"?
15:25 phenny masak: "hunden skatt" (en to sv, translate.google.com)
15:25 masak phenny: almost. :)
15:28 tadzik masak: we can write some allegro bindings
15:28 tadzik It'll require some help from the good, ol' C
15:28 masak ooh
15:28 tadzik allegro is terrible for dyncalling
15:28 masak still, it would be a nice demo.
15:28 masak I'm available most of tomorrow for that.
15:28 tadzik allegro_init() is a macro, you read keystrokes by reading a global array, stuff like that
15:29 tadzik 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.
15:30 tadzik hmm
15:31 tadzik 6model/reprs/KnowHOWREPR.c has a gc_free function, which frees memory
15:31 tadzik maybe we could hook it to some Perl6HOW and have a simple DESTROY
15:31 tadzik moritz++ for the idea
15:33 moritz any other important Perl 6 stuff that happened in 2011?
15:34 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
15:34 tadzik ok
15:35 tadzik proper exceptions? Or is it too early?
15:36 moritz yes, I'll write about those (and the other grants)
15:53 mikemol joined #perl6
16:01 sayu joined #perl6
16:04 dalek niecza: 9738bcf | (Solomon Foster)++ | lib/CORE.setting:
16:04 dalek niecza: Add Cool.polar, Cool.roots, and sub roots.
16:04 dalek niecza: review: https://github.com/sorear/niecza/commit/9738bcf2fa
16:04 dalek niecza: 763b0b1 | (Solomon Foster)++ | t/spectest.data:
16:04 dalek niecza: Turn on S32-num/roots.t.
16:04 dalek niecza: review: https://github.com/sorear/niecza/commit/763b0b1d7d
16:11 sayu joined #perl6
16:34 thou joined #perl6
16:47 tokuhirom joined #perl6
16:53 imarcusthis joined #perl6
17:26 PacoAir joined #perl6
17:33 packetknife joined #perl6
17:40 PacoLinux joined #perl6
17:49 MayDaniel joined #perl6
17:50 * masak smiles at Cool.polar
17:51 masak clearly we need to invent Hot.equatorial, too
17:52 estrabd joined #perl6
17:54 LlamaRider joined #perl6
18:07 moritz o~kl,mk~.9~n
18:24 Chillance joined #perl6
18:25 drbean joined #perl6
18:28 kst joined #perl6
18:38 masak moritz: hi, Ronja :)
18:58 guest_ joined #perl6
18:58 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 guest_ i.e the hardest perl code the most advanced coding style ,...etc book preferred in html or pdf
19:00 drbean joined #perl6
19:02 masak guest_: first, read all of http://perldoc.perl.org/
19:02 masak all of it.
19:02 masak it's entirely free and of very good quality.
19:02 masak also, make sure you read http://www.onyxneon.com/bo​oks/modern_perl/index.html
19:03 masak then, read http://hop.perl.plover.com/
19:03 masak all of these are free and available online.
19:03 masak the latter two also exist as dead-tree books.
19:05 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:07 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:09 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:10 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.
19:10 masak guest_: but the best you can do is to practice while also getting a lot of good quality input, such as those books.
19:11 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.
19:11 masak guest_: the documents cover a lot of the concepts. some concepts are such that one only discovers them while writing actual code, though.
19:11 guest_ or does it have all the basics to advance concepts and coding tech's
19:12 masak those books cover a lot of topics, from basic ones to advanced ones.
19:12 hundskatt joined #perl6
19:12 preflex joined #perl6
19:12 wolfman2000 joined #perl6
19:12 jevin_ joined #perl6
19:12 snarkyboojum joined #perl6
19:12 pomysl joined #perl6
19:12 cotto joined #perl6
19:12 jnthn joined #perl6
19:12 kranius joined #perl6
19:12 Helios joined #perl6
19:12 chra joined #perl6
19:12 jasonmay joined #perl6
19:12 masak of course, those terms depend on what background you have from before. :)
19:13 masak 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
19:15 guest_ 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:16 kst joined #perl6
19:16 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 LlamaRider you can write a lot of unmaintainable code by just memorizing syntax ^^
19:18 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 hillu joined #perl6
19:18 guest_ or when you would think perl would be the better choice
19:18 kst joined #perl6
19:19 LlamaRider well, depends what you are doing
19:19 LlamaRider the CPAN gives you enormous help when doing some relatively common task, such as crawling the web or analysing texts
19:20 LlamaRider you can make your own custom crawler in 10 lines of code ^^
19:20 LlamaRider also bash is terrible for larger code bases
19:20 LlamaRider very hard to maintain
19:20 buubot_backup joined #perl6
19:21 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
19:21 LlamaRider I just gave you a recent one for me :)
19:21 Chillance joined #perl6
19:21 MayDaniel joined #perl6
19:21 arlinius joined #perl6
19:21 simcop2387 joined #perl6
19:21 pochi joined #perl6
19:21 cosimo joined #perl6
19:21 risou joined #perl6
19:21 orevdiabl joined #perl6
19:21 broquaint joined #perl6
19:22 packetknife joined #perl6
19:22 kshannon joined #perl6
19:22 kcwu joined #perl6
19:22 ingy joined #perl6
19:22 TimToady joined #perl6
19:22 Lothar joined #perl6
19:22 PZt joined #perl6
19:22 ashleydev joined #perl6
19:22 athomason joined #perl6
19:22 cxreg joined #perl6
19:22 kthakore joined #perl6
19:22 sorear joined #perl6
19:22 fhelmberger joined #perl6
19:22 Exodist joined #perl6
19:22 mattp_ joined #perl6
19:22 guest_ Also don't for get bash needs cygwin to run on windows :( . Thanks for the example
19:23 moritz https://github.com/moritz/perlgeek.de/blob/master​/source/blog-source-en/perl-6/perl-6-in-2011.txt # feedback welcome
19:24 hillu joined #perl6
19:24 estrabd joined #perl6
19:24 PacoAir joined #perl6
19:24 thou joined #perl6
19:24 bluescreen10 joined #perl6
19:24 mj41 joined #perl6
19:24 lutok joined #perl6
19:24 sivoais joined #perl6
19:24 Timbus joined #perl6
19:24 silug joined #perl6
19:24 ruoso joined #perl6
19:24 Khisanth joined #perl6
19:24 pothos joined #perl6
19:24 REPLeffect joined #perl6
19:24 rsimoes joined #perl6
19:24 domidumont joined #perl6
19:24 amkrankruleuen joined #perl6
19:24 ranguard joined #perl6
19:24 krakan joined #perl6
19:24 awwaiid joined #perl6
19:24 mathw joined #perl6
19:24 moritz joined #perl6
19:24 mux joined #perl6
19:24 rhr joined #perl6
19:24 moritz I plan to publish in about 12 to 16 hours
19:25 pothos joined #perl6
19:26 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:27 guest_ ok, and perl for more bigger things?
19:29 sorear good * #perl6
19:32 masak sorear! \o/
19:32 masak guest_: yes, for even *slightly* bigger things.
19:33 masak guest_: as soon as code size starts to scale, Perl is simply a better bet for soaking up complexity than bash.
19:34 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:35 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:36 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
19:36 flussence perl is a language for Getting Stuff Done.
19:36 masak guest_: Perl is said to have the "manipulexity" of C and the "whipuptitude" of shell.
19:37 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:39 colomon actually, perl is extremely portable
19:39 masak see 'perldoc perlport'.
19:39 cooper joined #perl6
19:40 cooper joined #perl6
19:47 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:48 Trashlord joined #perl6
19:52 fridim_ joined #perl6
19:52 rindolf joined #perl6
19:53 rindolf Hi all.
19:53 colomon o/
19:54 rindolf Did you people take a look at the paper referenced in the link at http://groups.google.com/group/sa​yeret-lambda/msg/ca009a0edc44d9bc 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:55 [particle] joined #perl6
20:03 moritz no
20:04 masak nope.
20:05 rindolf There's a folllow-up message by him now.
20:11 moritz fwiw the paper is at http://barzilay.org/misc/scribble-reader.pdf
20:11 moritz for those not wanting to chase links :-)
20:15 moritz (repost) and comments on https://github.com/moritz/perlgeek.de/blob/master​/source/blog-source-en/perl-6/perl-6-in-2011.txt before I publish it?
20:17 tokuhirom joined #perl6
20:17 * masak reads moritz' draft
20:18 masak s/its compiler/its compilers/
20:18 colomon I think I'd put more emphasis on the new metamodel in rakudo.
20:18 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/
20:20 masak 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)
20:20 Woodi and lastly was exceptions work and NCI
20:20 Woodi masak: moritz++ prepost
20:21 colomon moritz: should probably mention easy interoperability with CLR libraries in the niecza section
20:21 masak oh, I see it now :)
20:21 moritz colomon: OK, I'll mention it
20:21 Woodi k, gn ppls :)
20:21 arlinius joined #perl6
20:21 masak we never fixed the brain-damaged difference between print and say? :(
20:22 moritz I find them quite convenient, actually
20:23 rindolf moritz: looks good.
20:23 cognominal___ joined #perl6
20:24 masak moritz++
20:24 masak moritz: hope you caught the two typos I flagged above.
20:25 moritz do we have any blog post about the new NCI?
20:25 moritz masak: I'm catching up on them :-)
20:25 sftp joined #perl6
20:25 cedric joined #perl6
20:26 cedric hello #perl6!
20:26 cedric moritz++ # Retrospection 2011
20:26 colomon \o
20:27 colomon moritz: there was an advent post, late from tadzik++
20:27 guest_ heres a cool program I wrote guys check it out http://pastebin.com/RRAYHtNf
20:29 bluescreen10 joined #perl6
20:30 rindolf guest_: you have some typos in the header.
20:30 rindolf guest_: there are many Sudoku solvers around.
20:30 guest_ I know feel free to correct them and enjoy
20:31 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
20:33 moritz ok, I've mentioned NCI and CLR interop in https://github.com/moritz/perlgeek.de/commi​t/c385dc5426ace029e9d7d0b7c78253ad5cad1820 (masak++'s typo fixes are in a separate commit)
20:34 masak guest_: post it if you translate it into Perl *6*. this is #perl6.
20:34 drbean joined #perl6
20:36 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")␤»
20:36 masak er.
20:36 masak nom: my @chars = "this is just a simple example".comb; (my %offsets).push( @chars Z 0..* ); say %offsets.perl
20:36 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␤»
20:36 masak \o/
20:36 moritz \o/ indeed
20:37 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/…
20:37 masak awww :)
20:37 moritz shouldn't be too hard to implement :-)
20:37 colomon what's the test file for that?  ;)
20:38 moritz t/spec/S32-hash/push.t
20:38 moritz "of course" :-)
20:38 masak :P
20:38 * colomon needs to remember to focus on $work, dang it!
20:38 colomon well-named
20:38 moritz the implementation can probably be copied rather directly from rakudo
20:38 * masak whistles the siren song of Perl 6 for colomon :)
20:39 moritz perl6: my %h = a => 1, b => 1; say %h.invert.WHAT
20:40 p6eval niecza v13-17-g763b0b1: OUTPUT«Hash()␤»
20:40 p6eval ..pugs b927740: OUTPUT«*** No such method in class Hash: "&invert"␤    at /tmp/daw1WKG3Md line 1, column 29 - line 2, column 1␤»
20:40 p6eval ..rakudo 5b58e0: OUTPUT«List()␤»
20:40 moritz perl6: my %h = a => 1, b => 1; say %h.invert.perl
20:40 p6eval rakudo 5b58e0: OUTPUT«(1 => "a", 1 => "b").list␤»
20:40 p6eval ..pugs b927740: OUTPUT«*** No such method in class Hash: "&invert"␤    at /tmp/kcMGPtagra line 1, column 29 - line 2, column 1␤»
20:40 p6eval ..niecza v13-17-g763b0b1: OUTPUT«{"1" => "b"}.hash␤»
20:40 moritz fwiw it should return a List, not a Hash
20:40 * moritz opens nieczabug
20:41 masak moritz++
20:47 pothos joined #perl6
20:47 moritz die "Sorry, paths do not form a monoid." unless @paths;  # lib/CORE.setting line 2401
20:47 y3llow joined #perl6
20:48 moritz that is an... interesting way to formulate it :-)
20:48 masak what does it mean?
20:48 masak :)
20:48 * moritz sometimes wonders if sorear++ puts such errors in just to check if somebody reads the source or the diffs
20:50 y3llow joined #perl6
20:50 pothos joined #perl6
20:51 * colomon just wanted sat .WHAT in C++    :(
20:51 colomon *say
20:52 moritz colomon: in C++ you're supposed to know your types at compile time :-)
20:52 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 #perl6
20:52 colomon maybe sorear++ ported the code from pugs.  ;)
20:53 masak :P
20:53 pothos joined #perl6
20:53 moritz iirc a monoid needs a neutral element, so it can't be the empty set
20:54 moritz but it's still a rather weird way to formulate it
21:00 * moritz tries to implement Hash.push in niecza
21:00 kshannon Jeez,  rakudo sure leaks memory like a seive :(
21:00 colomon moritz++
21:02 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␤»
21:02 moritz #           got: {"a" => 1, "c" => 3, "b" => 2}
21:02 moritz #      expected: {"a" => 1, "b" => 2, "c" => 3}
21:03 moritz those look to be the same, just printed in different order
21:03 moritz or am I just being thick?
21:04 drbean joined #perl6
21:04 thou if you're just being thick, then i think thick is good
21:05 dalek niecza: 6c964f7 | moritz++ | lib/CORE.setting:
21:05 dalek niecza: implement Hash.push
21:05 dalek niecza:
21:05 dalek niecza: t/spec/S32-hash/push.t still fails all but the first test,
21:05 dalek niecza: but this seems to be because is_deeply does not like hashes,
21:05 dalek niecza: not because Hash.push is wrong
21:05 dalek niecza: review: https://github.com/sorear/niecza/commit/6c964f7df9
21:07 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 masak oh wait -- the first is from the evalbot, the second is from you :)
21:08 masak anyway, if the test framework reports those two as different, then it's wrong.
21:10 moritz it doesn't :-)
21:10 moritz i tries to recreate it the error in is_deeply in the evalbot, and failed
21:11 flussence argh... TAP::Parser has an actual_passed() and a passed() method. TAP::Parser::Aggregator only lets me get at the *useless* one.
21:12 flussence (now I recall why I never bothered to fix these graphs the first time...)
21:12 moritz is actual_passed + skip + todo == passed?
21:13 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"
21:17 flussence seems like it counts skips too :/
21:20 sorear moritz: I wonder why I did that.  Why couldn't it just return "." ?
21:21 sorear 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... )
21:21 moritz anyway, that error message is incomprehensible for most programmers :-)
21:22 sorear moritz: they're the same... is_deeply is currently using .perl
21:22 moritz ouch
21:22 moritz well, not so ouch if we change Hash.perl to sort the keys
21:22 * sorear will take recommendations :)
21:22 sorear re. errors
21:22 * sorear is now looking at the retrospective prepose
21:22 sorear prepost
21:23 dalek rakudo/nom: a8c513b | moritz++ | src/core/Hash.pm:
21:23 dalek rakudo/nom: make Hash.push a bit more efficient and correct
21:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a8c513ba14
21:23 sorear moritz++ using the One True Date Format in a header comment ;)
21:24 moritz sorear: :-) I've hacked my blog engine to use that instead of (stat $file)[9]
21:25 * masak hopes that the One True Date Format is YYY-MM-DD
21:25 moritz masak: in this context it's UNIX timestamp :-)
21:26 masak hah :)
21:37 tadzik o/
21:38 sorear o/
21:39 masak o/
21:39 jaldhar joined #perl6
21:49 bluescreen10 joined #perl6
22:01 masak 'night, #perl6
22:05 sorear bye
22:08 donri joined #perl6
22:09 shinobicl_ joined #perl6
22:12 dalek roast: 4edb4f0 | sorear++ | S32-hash/invert.t:
22:12 dalek roast: [S32-hash/invert] Unfudge for sorear/niecza#96
22:12 dalek roast: review: https://github.com/perl6/roast/commit/4edb4f02cd
22:14 donri left #perl6
22:14 dalek roast: 61a2146 | sorear++ | S02-lexical-conventions/unicode.t:
22:14 dalek roast: [S02-lexical-conventions/unicode] Hindi works in niecza now
22:14 dalek roast: review: https://github.com/perl6/roast/commit/61a214633e
22:15 dalek niecza: 4bdcc7e | sorear++ | lib/CORE.setting:
22:15 dalek niecza: Hash.invert should return List (fixes #96)
22:15 dalek niecza: review: https://github.com/sorear/niecza/commit/4bdcc7e8fb
22:19 colomon moritz++
22:19 sorear o/ colomon
22:19 colomon \o
22:20 colomon I slept through moritz's changes sitting up on the couch with my laptop on my lap and the (boring) bowl game on.
22:24 kshannon https://github.com/rakudo/rakudo/pull/47
22:24 * sorear has been thinking lately about constant folding
22:25 mj41 joined #perl6
22:26 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:29 dalek niecza: 4d836ba | sorear++ | lib/CORE.setting:
22:29 dalek niecza: Make Hash.perl sort the output
22:29 dalek niecza:
22:29 dalek niecza: Ideally is_deeply would be using eqv instead, but this change seems to
22:29 dalek niecza: be beneficial in its own right, so it goes in.
22:29 dalek niecza: review: https://github.com/sorear/niecza/commit/4d836ba751
22:29 sorear I love how short the diff is
22:30 sorear (though it could be shorter)
22:30 sorear (with better P6 support)
22:31 PacoAir joined #perl6
22:31 colomon :p   ?
22:33 colomon maybe I'm being dense, self.keys.sort makes sense, but what is self{self.keys.sort}:p  ?
22:34 colomon afk # need to pick up little guy from Granny's.
22:34 drbean joined #perl6
22:38 sorear :p, short form of :pairs, is an index adverb
22:39 sorear S02:2493
22:39 sorear nom: my %hash = a=>1,b=>2,c=>3; say (%hash<b c>:p)
22:39 p6eval nom a8c513: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2␤»
22:42 shachaf joined #perl6
22:42 sorear huh, seems there are *no tests at all* for :pairs in roast
22:42 sorear o/ shachaf
22:47 shachaf sorear: Hello.
22:50 thou_ joined #perl6
22:53 thou_ joined #perl6
22:55 sorear there are however some tests for :p in S03-operators/subscript-adverbs.t
23:02 kensanata joined #perl6
23:08 thou joined #perl6
23:10 colomon sorear: probably because rakudo has never implemented it?  (back with boy, now cooking dinner)
23:11 [Coke] https://gist.github.com/1476841 - niecza at 85.05%
23:18 sorear [Coke]: where are you getting 85.05%?
23:19 [Coke] missed a push...
23:20 [Coke] refresh.
23:22 colomon sorear:  is self{self.keys.sort}:p  actually better than self.pairs.sort?
23:22 Trashlord joined #perl6
23:23 sorear colomon: yes, because the latter doesn't work. :)
23:23 colomon why not?
23:23 sorear cmp is a horrible horrible hack at the moment
23:23 colomon cmp is a horrible hack which works on Pair.  ;)
23:24 colomon niecza: say  (a => 5) cmp (c => 2)
23:24 p6eval niecza v13-20-g4d836ba: OUTPUT«-2␤»
23:24 colomon niecza: say  (a => 5) cmp (a => 2)
23:24 p6eval niecza v13-20-g4d836ba: OUTPUT«3␤»
23:24 sorear huh!  someone must have added that while I wasn't looking
23:24 colomon ;)
23:24 colomon I needed it for a side program I was working on.
23:25 sorear colomon++ # d8f13342
23:26 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 colomon (I mean, in self{self.keys.sort}:p

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo