Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-04-10

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:00 ruoso joined #perl6
00:10 lue joined #perl6
00:10 lue ololitsme
00:11 jnthn roflitslue
00:15 lue who doesn't love their computer shutting off at 11PM while finishing up a paper? I do! :(
00:16 jnthn :-/
00:17 lue ah well :D now to check the logs
00:17 quietfanatic joined #perl6
00:20 quietfanatic I just noticed, that "return ' ' ~ $_ if $_ = join( ' ', self.attributes>>.xml)"
00:20 quietfanatic could be more easily written "return ' ' X~ self.attributes>>.xml"
00:21 jnthn There's more than one way to cute it. :-)
00:21 quietfanatic I know I'm half a day late on that but whatever
00:21 jnthn I hadn't thought of that one. :-)
00:21 jnthn It is neat. :-)
00:25 quietfanatic seems half the time I enter this channel it's from an urge to reply to something in the log...
00:25 quietfanatic s/..//
00:25 quietfanatic err, s/\.\.// :)
00:27 lue s/$mistakes/$success/
00:27 jnthn s/'..'//
00:27 jnthn ;-)
00:28 quietfanatic more than one way to cute it.
00:29 lue TIMTOWTCI
00:31 frzntoz joined #perl6
00:31 lue phenny: "知無時" ?
00:31 jnthn Oh no, I accidentally the meme.
00:33 quietfanatic Haha, "Wisdom ignorance time"
00:33 lue Support Regular Language (promote "You is" and "I is")
00:33 lue quietfanatic: I knew the Toki in TimToki is "time", but is it really Wisdom Ignorance Time?
00:33 jnthn Just speak Swedish. They use är for all of them anyway. :-)
00:33 lue (the japanese is TimuToki, btw)
00:33 quietfanatic or "Wisdom no time"
00:34 quietfanatic but ignorance is the first interpretation my popup dictionary came up with
00:34 lue (checking babylon translator)
00:34 quietfanatic Incidentally, that's the same 無 as in Mu.
00:35 jnthn Well, I guess if you write Mu in a signature, you're being ignorant about what kinda thing can be passed. :)
00:35 quietfanatic In fact, if it's pronounce "timutoki" than it definitely is mu meaning nothing...
00:35 quietfanatic rakudo: say 無.WHAT
00:35 p6eval rakudo 43f865: OUTPUT«Could not find sub &無␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
00:35 lue "In intellect nothing" is what babylon.com says. (it's the most trustworthy translator as far as I can tell)
00:35 quietfanatic I'm a little disappointed that's not a synonym
00:36 quietfanatic :)
00:36 lue TimToady: "知無時" ?
00:36 jnthn quietfanatic: Well...it could be made one... ;-)
00:37 quietfanatic rakudo: macro 無 { 'Mu' }; say 無.WHAT
00:37 p6eval rakudo 43f865: OUTPUT«Could not find sub &無␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
00:37 jnthn .oO( There will be modules )
00:37 jnthn Sadly, macros NYI.
00:37 quietfanatic rakudo: constant 無 = Mu; say 無.WHAT
00:37 p6eval rakudo 43f865: OUTPUT«Could not find sub &無␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
00:37 jnthn rakudo: sub 無 { Mu }; say 無.WHAT
00:37 p6eval rakudo 43f865: OUTPUT«Mu()␤»
00:37 jnthn But then you can't use it as a type name...yeah, constant would be better.
00:38 quietfanatic gotta commute now
00:38 Yunga joined #perl6
00:38 jnthn o/
00:39 solu joined #perl6
00:39 lue bye-e o/
00:40 lue rakudo: my Mu $a = 3; say $a
00:40 p6eval rakudo 43f865: OUTPUT«3␤»
00:43 frzntoz joined #perl6
00:43 lue rakudo: multi sub token:<無>{Mu();}; my 無 $a = 3; say $a
00:43 p6eval rakudo 43f865: OUTPUT«error:imcc:syntax error, unexpected '\n'␤  in file 'EVAL_1' line 58␤Malformed my at line 11, near "\u7121 $a = 3; "␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
00:46 jnthn ...
00:46 lue .oO(worth a shot)
00:46 jnthn that's...impressive.
00:46 lue .oO(when you don't know how anything works)
00:46 jnthn You confused the codegenerator.
00:46 jnthn multi sub term:<無>{Mu();};
00:46 jnthn rakudo: multi sub term:<無>{Mu();};
00:46 p6eval rakudo 43f865: OUTPUT«error:imcc:syntax error, unexpected '\n'␤  in file 'EVAL_1' line 58␤»
00:47 lue .oO(apparently, 無 (mu) means bad, poor, zero, nothing, ignorance)
00:47 jnthn how on EARTH does that parse.
00:47 jnthn std: multi sub term:<無>{Mu();};
00:47 p6eval std 30353: OUTPUT«ok 00:01 111m␤»
00:47 jnthn ...wow!
00:48 lue what would that do?
00:48 jnthn Erm
00:48 jnthn Well, I didn't particularly expect std to say it was OK!
00:48 lue perl6: multi sub term:<無>{Mu();};
00:48 jnthn Given it has not one, but *two* unbalanced groping chars.
00:48 p6eval rakudo 43f865: OUTPUT«error:imcc:syntax error, unexpected '\n'␤  in file 'EVAL_1' line 58␤»
00:48 p6eval ..elf 30353, pugs:  ( no output )
00:48 jnthn *grouping.
00:49 jnthn oh wait
00:49 jnthn I mis-read a curly as not a curly
00:49 jnthn :-(
00:49 * jnthn is...too tired.
00:49 lue .oO(quick! how do you spell rakudo!)
00:50 jnthn rakudo: multi sub term:<無> { Mu(); };
00:50 p6eval rakudo 43f865: OUTPUT«error:imcc:syntax error, unexpected '\n'␤  in file 'EVAL_1' line 58␤»
00:50 jnthn rakudo: multi sub infix:<無> { Mu(); };
00:50 p6eval rakudo 43f865:  ( no output )
00:50 jnthn Oh, it's hosed on categories it doesn't grok.
00:50 jnthn rakudo: multi sub omgMEDVED:<無> { Mu(); };
00:50 lue .oO(an \n hydrant)
00:50 p6eval rakudo 43f865: OUTPUT«error:imcc:syntax error, unexpected '\n'␤  in file 'EVAL_1' line 58␤»
00:50 arnsholt loliblogged
00:51 jnthn arnsholt: omfg where?!
00:51 lue lolablagger
00:51 arnsholt Only took me a week to finish the damned post ^^
00:51 arnsholt http://blogs.perl.org/users/arne_skjaerho​lt/2010/04/parrotlog---backtracking.html
00:53 arnsholt I'm even starting to approach the point where I can start to try parsing som code and generating some ASTs
00:54 arnsholt Then we can see about generating some code
00:55 wknight8111 arnsholt++
00:55 jnthn arnsholt: Nice post! :-)
00:55 wknight8111 arnsholt: does that blog have a feed? I can't seem to find a link
00:56 arnsholt jnthn: Thank you! I'm still working on finding a tone and style that works for me, but I'm quite happy with that one
00:57 arnsholt Looks like the front page links to http://blogs.perl.org/user​s/arne_skjaerholt/atom.xml
00:57 lue lolitschemistry (I'll stop now)
00:57 wknight8111 arnsholt++ # I've subscribed!
00:58 arnsholt (And exclusive behind-the-scenes info: What catalysed this post into being was the opening sentence coming to me as I was brushing my teeth =)
00:59 lue It's an epiphany of semi-House proportions! (House proportions require people talking to you about random things)
00:59 arnsholt Cool. Knowing that some people are looking at what I'm doing is certainly a good incentive to keep on working
01:00 arnsholt I tend to do anti-House epiphanies. I complain about my problems to someone that happens to be around, and find the solution in mid-sentence =)
01:01 lue that's also known as Active Epiphany.
01:01 lue .oO(I can't tell you how many sentences like your post's first I make in a day)
01:01 lue afk (and in IRC-midday too! ah well)
01:08 snarkyboojum joined #perl6
01:08 snarkyboojum left #perl6
01:13 lisppaste3 cognominal pasted "I added the missing pair syntaxes in nqp" at http://paste.lisp.org/display/97593
01:14 cognominal will go thru to src/Perl6/Actions.pm to use them
01:15 jnthn It appears you patched the old NQP, not the new nqp-rx?
01:16 jnthn Rakudo uses the latter.
01:17 cognominal hum, let me see.
01:18 alester joined #perl6
01:22 cognominal yes, too bad.
01:23 cognominal I don't get it. rakudo mast does not pull nqp-rx?
01:23 jnthn No, it lives in etc/nqp-rx/ in Parrot.
01:24 cognominal why rakudo master does not use nqp-rx?
01:24 cognominal I am confused
01:25 cognominal there are so much branches around, that I have trouble to follow things
01:25 arnsholt From Rakudo's Makefile.in it does look like it uses Parrot's NQP
01:26 arnsholt Only references to nqp are "NQP_EXE = $(PARROT_BIN_DIR)/parrot-nqp$(EXE)" and a handful of files named .nqp
01:28 cognominal gen_parrot.pl pulls out : https://svn.parrot.org/parrot/trunk parrot
01:29 cognominal jnthn, I am completely lost there :(
01:29 cognominal probably need some zzzz
01:29 quietfanatic joined #perl6
01:32 cognominal so gen_parrot.pl pulls the new parrot but not nqp-rx...
01:33 cognominal anyway, even if my work is useless, I have learnt a lot in the process
01:34 jnthn cognominal: Rakudo master does use nqp-rx.
01:35 cognominal how can it if it only pulls the last parrot (which does  not use nqp-rx)?
01:37 TimToady std: constant 無 = Mu;
01:37 p6eval std 30353: OUTPUT«ok 00:01 109m␤»
01:37 TimToady std: subset 無 of Mu;  my 無 $x;
01:37 p6eval std 30353: OUTPUT«ok 00:01 107m␤»
01:38 pausenclown joined #perl6
01:38 TimToady std: subset 無 of Mu;  my 無 無 $x;
01:38 p6eval std 30353: OUTPUT«[31m===[0mSORRY![31m===[0m␤Multiple prefix constraints not yet supported at /tmp/016IAhnpTb line 1:␤------> [32msubset 無 of Mu;  my 無 無 [33m⏏[31m$x;[0m␤Compilation failed␤FAILED 00:01 107m␤»
01:38 jnthn Oh, subset should work in Rakudo.
01:38 jnthn rakudo: subset 無 of Mu;  my 無 $x;
01:38 p6eval rakudo 43f865: OUTPUT«Nominal type check failed for parameter '$original'; expected Any but got Mu instead␤current instr.: 'CREATE_SUBSET_TYPE' pc 336588 (src/gen/core.pir:17038)␤»
01:39 jnthn oh crap.
01:39 * jnthn summons masak++ :-)
01:39 pausenclown rakudo: say 10.fmt("0x%s")
01:39 p6eval rakudo 43f865: OUTPUT«0x10␤»
01:40 pausenclown rakudo: say '10'.fmt("0x%s")
01:40 p6eval rakudo 43f865: OUTPUT«0x10␤»
01:40 TimToady that seems relatively...useless...
01:41 pausenclown rakudo: say '50'.fmt("0x%s").chr
01:41 p6eval rakudo 43f865: OUTPUT«
01:41 pausenclown rakudo: say '55'.fmt("0x%s").chr
01:41 p6eval rakudo 43f865: OUTPUT«
01:42 pausenclown rakudo: say "5065726C36".comb(/<xdigit​>**2/)>>.fmt("0x%s")>>.chr
01:42 p6eval rakudo 43f865: OUTPUT«
01:43 pausenclown rakudo: say "5065726C36".comb(/<xdigit>**2/)>>.fmt("0x%s")
01:43 p6eval rakudo 43f865: OUTPUT«0x500x650x720x6C0x36␤»
01:45 pausenclown (published examples not working)--
01:48 pausenclown rakudo: my @array = <a b c>; for ^Inf Z @array -> $index, $item { say "$index, $item" }
01:48 p6eval rakudo 43f865: OUTPUT«0, a␤1, b␤2, c␤»
01:49 pausenclown rakudo: my @array = <a b c>; for 0..* Z @array -> $index, $item { say "$index, $item" }
01:49 p6eval rakudo 43f865: OUTPUT«0, a␤1, b␤2, c␤»
01:49 * jnthn sleep, night o/
01:53 TimToady rakudo: my @array = <a b c>; for ^* Z @array -> $index, $item { say "$index, $item" }
01:53 p6eval rakudo 43f865: OUTPUT«0, a␤1, b␤2, c␤»
01:53 TimToady rakudo: my @array = <a b c>; for @array.kv -> $index, $item { say "$index, $item" }
01:53 p6eval rakudo 43f865: OUTPUT«0, a␤1, b␤2, c␤»
01:53 pausenclown how many elements has Inf..* ? ;-)
01:54 TimToady well, count 'em...
01:54 TimToady dinner &
01:56 Psyche^ joined #perl6
01:58 hercynium joined #perl6
02:01 lue aw, I just missed TimToady! (bye jnthn)
02:03 lue rakudo: my @a = Inf..*; for @array.kv -> $index, $item { say "$index, $item" }
02:03 p6eval rakudo 43f865: OUTPUT«Symbol '@array' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
02:03 lue rakudo: my @a = Inf..*; for @a.kv -> $index, $item { say "$index, $item" }
02:03 p6eval rakudo 43f865:  ( no output )
02:19 frzntoz joined #perl6
02:31 mikehh joined #perl6
02:56 lue afk
03:02 ash__ joined #perl6
03:17 fridim joined #perl6
03:20 * diakopter delurks
03:32 am0c joined #perl6
03:42 tylerni7 joined #perl6
03:53 meppel joined #perl6
04:04 _jaldhar joined #perl6
04:41 lue oh hai whoevers der
04:52 eternaleye joined #perl6
04:52 pugssvn r30354 | lwall++ | [gimme5] support pointing to both ends of missing goal message
04:52 pugssvn r30354 | [STD] "Couldn't find final" message now point to both ends
04:52 pugssvn r30354 | [STD] more tweaking of sorry messages and goal failure messages
04:52 pugssvn r30354 | [STD] standard quotes now use ~ construct to set goal
04:52 pugssvn r30354 | [STD] vws extra lines now eat line with \V* \v
04:52 pugssvn r30354 | [STD] suppress confusing backtracking on ~<<
04:54 envi^home joined #perl6
05:00 sorear std: (some_big_function(subexp)
05:00 p6eval std 30354: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse parenthesized expression; couldn't find final ')' at /tmp/nQlDnTyPiE line 1 (EOF):␤------> [32m(some_big_function(subexp)[33m⏏[31m<EOL>[0m    expecting statement modifier loop␤Undeclared routines:␤       'some_big_function' used
05:00 p6eval ..at line …
05:04 am0c joined #perl6
05:09 kaare joined #perl6
05:14 gfx joined #perl6
05:17 xinming_ joined #perl6
05:21 TimToady std: (some_big_function(subexp)
05:21 p6eval std 30354: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse parenthesized expression; couldn't find final ')' at /tmp/yLllUVVPTh line 1 (EOF):␤------> [32m(some_big_function(subexp)[33m⏏[31m<EOL>[0m    expecting statement modifier loop␤Undeclared routines:␤       'some_big_function' used
05:21 p6eval ..at line …
05:21 TimToady ENOTYET
05:24 diakopter I think std now gets rebuilt at the bottom of the hour
05:27 lue .oO(ESTDNEVERWRONG (in addition, an EYOURFAULT error was returned.))
05:28 am0c joined #perl6
05:28 sorear lue: rule 2
05:29 lue O great. There's a rule book? (next week I'll learn about Eastern Orthodox Camelism)
05:30 lue I guess rule 2 is "stay on topic"
05:31 jrtayloriv joined #perl6
05:34 sorear lue: It only has two rules
05:35 TimToady std: (some_big_function(subexp)
05:35 p6eval std 30354: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse parenthesized expression at /tmp/BJmfMnVNz9 line 1:␤------> [32m([33m⏏[31msome_big_fun​ction(subexp)[0m␤Couldn't find final ')'; gave up at /tmp/BJmfMnVNz9 line 1 (EOF):␤------> [32m(some_big_function(subexp)[33m⏏[31m<EOL>[0m␤
05:35 p6eval ..…
05:37 lue std: [anArray[thatStatesthings]
05:37 p6eval std 30354: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse array composer at /tmp/h5MNT7Gbln line 1:␤------> [32m[[33m⏏[31manArray[that​Statesthings][0m␤Couldn't find final ']'; gave up at /tmp/h5MNT7Gbln line 1 (EOF):␤------> [32m[anArray[thatStatesthings][33m⏏[31m<EOL>[0m␤
05:37 p6eval ..expectin…
05:38 lue rule 1: camelCase is the only acceptable method of writing variable names with more than one word. :)
05:40 lue alpha: (my $words_of_joy = 3) andthen die('rule 1! rule 1!');
05:41 p6eval alpha 30e0ed: OUTPUT«rule 1! rule 1!␤in Main (file /tmp/ufRLtbSzjd, line 0)␤»
05:46 diakopter lue: see the 8th paragraph of http://perldoc.perl.org/perlhack.html#DESCRIPTION
05:49 lue ...I was wrong about the rules by ~ 75 NaNometers
05:49 lue .oO(my rule 1&2 are good though (what to call them however...))
05:50 lue I've heard of that before, I like the summary better (Larry is always right, even when he's wrong). I call it the right when wrong rule. :)
05:52 lue afk
06:01 frzntoz joined #perl6
07:14 moritz_ good morning
07:14 sorear hello
07:20 szabgabx joined #perl6
07:26 k23z__ joined #perl6
07:29 charnglinux_ joined #perl6
07:29 charnglinux_ left #perl6
07:31 masak joined #perl6
07:31 masak oh hai, #perl!
07:31 masak s/perl/perl6/
07:32 moritz_ \o/
07:32 * masak mostly enjoys the Temporal discussions on p6l
07:34 k23z__ hai
07:34 k23z__ hai masak
07:35 k23z__ I wants to ask if there is plans for symbolic computations like SymPy for Perl6 ?
07:35 masak no plans as far as I know.
07:35 masak would be fun if someone made it a project.
07:36 k23z__ because I was trying recently to work out Math::Symbolic from Perl5 and I encountered serious problems at which point I switched to SymPy
07:36 sorear "Not competing with Mathematica" is a stated design goal
07:36 sorear Rakudo build performance has increased 60 fold since I joined the project
07:37 sorear I just tried it, if finished in 13 minutes
07:37 sorear that's like, 1 month
07:37 moritz_ masak: do you agree with adding a Date-only type on Temporal?
07:38 masak moritz_: I'd tend to agree with anything autarch says :)
07:38 masak moritz_: what I am wondering is this: if there's to be a standalone Date type, is there also a need for a standalone Time type?
07:38 masak maybe I should ask him that on the list...
07:38 moritz_ not sure
07:40 k23z__ anyone here know a good book on writing a Symbolic computation package ?
07:40 k23z__ the main problem is that for example Math::Symbolic produces big expression trees that are hard to manipulate
07:42 moritz_ I think that's the main problem with all CAS packages
07:42 moritz_ because simplifying an expression tends to take exponential time
07:44 kerz___ well Math::Symbolic has  Math::Symbolic::Custom::Transformation
07:44 kerz___ with it you can write transformation for the expression trees
07:44 mberends joined #perl6
07:45 kerz___ thus yielding bigger or smaller expressions depending on desire
07:45 kerz___ but it has problems ... like for example I have to apply a lot of time some transformations to get the desired result
07:46 kerz___ and when I print my expression it has lots of redundant parenthesis
07:46 masak mberends!
07:46 moritz_ std: 'a' ~<< 1, 2
07:46 p6eval std 30354: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse quote words at /tmp/R8tKpiVD7m line 1:␤------> [32m'a' ~<<[33m⏏[31m 1, 2[0m␤Couldn't find final '>'; gave up at /tmp/R8tKpiVD7m line 1 (EOF):␤------> [32m'a' ~<< 1, 2[33m⏏[31m<EOL>[0m␤Compilation failed␤FAILED 00:01 109m␤»
07:46 mberends \o masak, I suggest a 'use Date' and Date.pm6 as an immediate solution
07:47 mberends for the question of whether Date as a type should be in core
07:48 mberends (I prefer to avoid core bloat)
07:50 masak I can definitely agree with that perspective.
07:51 masak it's still debatable whether DateTime itself belongs in core...
07:51 mberends we're starting to see candidate modules to be shipped with Rakudo *
07:52 mberends masak: well we need something time-related in the core, it's always a matter of drawing the line
07:53 masak *nod*
07:53 mberends masak: something derived from proto's Installer.pm and Ecosystem.pm will also go into Rakudo * ;)
07:54 mberends and we have Test.pm and Safe.pm.  I hope we begin copying them all to ~/.perl6/lib/ soon
07:54 moritz_ nope
07:55 moritz_ packages shipped with rakudo belong in the rakudo install dir
07:55 moritz_ so that a site wide install gets all the modules
07:56 mberends yes, that's better
07:57 Su-Shee joined #perl6
07:58 * moritz_ has a new display, 24" Dell wide screen
07:59 moritz_ sad that non-wide-screen monitors in that size aren't cheap
07:59 Su-Shee good morning.
08:00 mberends the movie industry is setting the hardware specs for the computer industry
08:00 masak Su-Shee: \o
08:00 Su-Shee sad that displays with a nice resolution are seriously expensive :/
08:00 moritz_ aye
08:01 moritz_ \o/ melange sorting bug fix is shipped
08:02 moritz_ /o\ but I can't view any proposals :(
08:10 masak I got GGE to build on master yesterday.
08:11 masak but it fails the 03-optable.t tests with 'Null PMC access in can()'... will investigate that next.
08:12 moritz_ Null PMC access in can() - that rings a bell
08:14 masak current instr.: '&infix:<=>'
08:14 masak if that helps.
08:15 moritz_ rakudo: use Test; plan 1; isa_ok (1|2), Junction
08:15 p6eval rakudo 43f865: OUTPUT«1..1␤Null PMC access in get_iter()␤current instr.: '!DISPATCH_JUNCTION_CORE' pc 16360 (src/builtins/Signature.pir:151)␤»
08:15 moritz_ hm, not can()
08:15 masak it will be interesting to see what is the cause of this :)
08:19 moritz_ http://code.google.com/p/soc/issues/detail?id=869
08:28 masak typical adaptation of a mid-sized Perl 6 application to new Rakudo master: http://github.com/masak/gge/commit/839​bd22dd4745679cb393f1d751df67d1e9560c9
08:36 moritz_ masak: how do you know it's typical?
08:37 snarkyboojum joined #perl6
08:38 masak because I've already done one before. :)
08:39 moritz_ my changes to JSON::Tiny looked quite different
08:39 moritz_ but that was in an earlier stage of rakudo
08:39 moritz_ and JSON::Tiny is much smaller
08:39 masak *nod*
08:48 masak the November adaptation was a little bit less involved: http://github.com/viklund/november/commit​/b26ef270f151c78c489aade4444ccb5fa5f8d4cc
08:53 masak my mom is showing me a bunch of plants, some of them of the Camelia family. :) apparently, the tea plant belongs in this family.
08:53 masak s:g/family/genus/
08:54 fridim_ joined #perl6
09:04 JimmyZ joined #perl6
09:07 sorear joined #perl6
09:09 masak wow, we've come a long way since this: http://www.perlmonks.org/index.pl?node_id=434972
09:09 masak we no longer allow subs to be called as methods.
09:09 jrtayloriv joined #perl6
09:10 masak I'm not sure *$x means the same in a signature... maybe, maybe not.
09:12 masak we do, however, allow subs to be automatically created from methods, though 'is export'.
09:38 masak jnthn++ # parrot-dev email
09:41 payload joined #perl6
09:41 am0c joined #perl6
09:42 masak rakudo: sub infix:<;>($a, $b) { $a + $b }; say 40; 2
09:42 p6eval rakudo 43f865: OUTPUT«42␤Method 'Num' not found for invocant of class 'Perl6Sub'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»
09:42 * masak cackles
09:43 payload1 joined #perl6
09:43 masak rakudo: sub infix:<;>($a, $b) { $a + $b }␤ say 40; 2
09:43 p6eval rakudo 43f865: OUTPUT«42␤»
09:43 masak whoa :)
09:43 payload joined #perl6
09:44 masak rakudo: sub infix:<#>($a, $b) { $a ~ $b }; say 'OH' # "HAI"
09:44 p6eval rakudo 43f865: OUTPUT«OH␤»
09:44 masak oh.
09:44 payload joined #perl6
09:44 masak probably gets eaten by the whitespace monster.
09:45 masak rakudo: sub infix:<,>($a, $b) { $a + $b }; say 1, 2, 3
09:45 p6eval rakudo 43f865: OUTPUT«123␤»
09:45 masak and there's a comma monster, too :)
09:45 masak &
09:45 sorear sorry if this is too much traditionalthink, but why would a comment NOT take precedence over an infix operator?
09:46 moritz_ sorear: it's an implementation detail
09:48 jhuni joined #perl6
09:52 moritz_ basically the rule that eats up the witespace before the # also eats the whole comment
09:52 moritz_ which is quite sane in terms of parsing speed
10:28 masak sorear: I'd tend to agree with you. as far as I know, the spec doesn't say which things override operators and which don't. as usual, I'm looking for ways to achieve consistency.
10:29 sorear std: sub infix:<#>($a, $b) { ... }; say 1 # syntax`error
10:29 p6eval std 30354: OUTPUT«ok 00:01 110m␤»
10:32 M_o_C joined #perl6
10:35 wknight8111 joined #perl6
11:07 jnthn o/
11:15 jnthn masak++ # Moving to master \o/
12:07 broquaint joined #perl6
12:07 CokeBot9000 joined #perl6
12:08 payload joined #perl6
13:13 * jnthn afk, herrfest
13:20 noobn joined #perl6
13:21 payload joined #perl6
13:36 payload joined #perl6
13:43 pmurias joined #perl6
13:45 * cognominal now makes sense of rakudo using nqp-rx. I guess this now should be the default.
13:50 noobn joined #perl6
13:51 szabgabx joined #perl6
13:54 alester joined #perl6
14:01 ash__ joined #perl6
14:09 agentzh joined #perl6
14:13 moritz_ rakudo: ([0, 0], [1, 1]).grep({say .perl; 1}).eager;
14:13 p6eval rakudo 43f865: OUTPUT«[0, 0]␤[1, 1]␤»
14:16 xinming joined #perl6
14:28 frzntoz joined #perl6
14:44 ash__ joined #perl6
14:48 TiMBuS joined #perl6
14:50 moritz_ rakudo: say [X] [<a b c>] xx 3
14:50 p6eval rakudo 43f865:  ( no output )
14:50 moritz_ rakudo: say [X] <a b c> xx 3
14:50 p6eval rakudo 43f865:  ( no output )
14:55 mikehh joined #perl6
14:57 arthur-_ joined #perl6
15:02 colomon joined #perl6
15:02 colomon we can haz intertubez?
15:03 moritz_ seemz like you haz
15:05 mdxi joined #perl6
15:06 pugssvn r30355 | moritz++ | [t/spec] tests for RT #67948, .perl in .grep with arrays in the list
15:08 athomason joined #perl6
15:11 synth joined #perl6
15:18 clintongormley joined #perl6
15:24 meppl joined #perl6
15:31 moritz_ when I write a Date module, should I handled years > 9999?
15:31 moritz_ :-)
15:31 ash__ what about years less than 1900? or in BC?
15:31 ash__ :p
15:31 ash__ (lots of date tools don't go very far backwards)
15:31 moritz_ less than 1900 can still be written as 0120 or so
15:33 ash__ how are you planning on storing the year? i don't see why it should stop at 9999
15:36 TimToady and year 1 BC is really 0 AD, and 2 BC is -1 AD, and so on.  :) * 1/3
15:40 moritz_ ash__: integers... It's more about allowed formats for the constructor
15:40 moritz_ ash__: but in the end I think it's sane to allow Date.new('YYYY-MM-DD') for years 0 to 9999, and require Date.new(:year(2e6), :day(), :month()) for all years outside that range
15:45 ash__ doesn't YYYY-MM-DD have a name?
15:45 ash__ like, that style of format
15:45 moritz_ yep, some ISO-$forgotthatnumber short format
15:46 pugssvn r30356 | lwall++ | [STD] inside quotes, when expecting a postfix extension,
15:46 pugssvn r30356 | presume that a backslash belongs to the quotes and is not an unspace
15:47 ash__ you could do Date.iso-8601('YYYY-MM-DD') format
15:47 ash__ i should probably read the new temporal before i start making stupid suggestions though
15:48 moritz_ after the discussion today or yesterday I thought I'd prototype a Date (no time) module
15:48 moritz_ and then ask people if they want something like that in core or not
15:48 moritz_ s/not/as an external module/
15:49 moritz_ anway, going away for a while...
15:49 ash__ Date.new just seems vague, IMO
15:51 ash__ i am obviously nit-picking the name of the constructor, but in this case i think Date.new can be confusing because there are so many different ways you can construct a date, being explicit might be useful to the date module to reduce confusion
15:52 moritz_ that's why I want MMD and awesome error messages
15:52 moritz_ and a very narrow selection of allowed things
15:52 ash__ Date.now (new date with the current time), Date.iso-8601, etc.
15:52 moritz_ Date.today()
15:52 ash__ yeah, that makes me since, .now would be a time thing, not a date specifically
15:53 moritz_ really afk &
15:53 am0c joined #perl6
15:57 colomon joined #perl6
15:58 colomon we can haz intertubez -- fur realz?
16:01 synth joined #perl6
16:03 diakopter o_o
16:04 colomon \o/
16:04 ash__ having intertubz is fun
16:04 diakopter \o_o/
16:05 * synth imagines his tub being wired for the internet
16:09 justatheory joined #perl6
16:09 wknight8111 joined #perl6
16:10 pugssvn r30357 | colomon++ | [Numeric] Move sqrt to Numeric. Remove incorrect return value type of roots.  Move cis and unpolar to Real.  Add to-radians and from-radians to Numeric.
16:11 am0c joined #perl6
16:15 M_o_C joined #perl6
16:15 lue y o hai!
16:15 colomon o/
16:20 noobn joined #perl6
16:22 lue 知無時! (wisdom ignorance time!)
16:28 avar eval: my $foo; my $bar; my $n; $foo [1] [$bar] [$n + 7];
16:30 pugssvn r30358 | lwall++ | [STD] dwim texas <<>> better
16:31 lue .oO(Larry's trying to DWIM Texas? How is that possible! (wonder what the <<>> are all about, though)) :)
16:35 mberends lue: wonder no more. Enter Texas in the search box at the top of http://perlcabal.org/syn/
16:37 lue rakudo: my @a=1,3; say (ff @a)
16:37 p6eval rakudo 43f865: OUTPUT«Could not find sub &ff␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
16:37 lue what exactly do the ff and fff operators do? (looking...)
16:38 TimToady std: 1 <<+<< 2
16:38 p6eval std 30357: OUTPUT«ok 00:01 109m␤»
16:38 TimToady std: 1 <<+<<< 2
16:38 p6eval std 30357: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unable to parse quote words at /tmp/WxurMP6nrX line 1:␤------> [32m1 <<+<<<[33m⏏[31m 2[0m␤Couldn't find final '>'; gave up at /tmp/WxurMP6nrX line 1 (EOF):␤------> [32m1 <<+<<< 2[33m⏏[31m<EOL>[0m␤Compilation failed␤FAILED 00:01 107m␤»
16:38 TimToady darn, missed the boat
16:39 TimToady std: my $x; "$x\[nonesuch\]";
16:39 p6eval std 30357: OUTPUT«ok 00:01 107m␤»
16:39 lue .oO(don't worry, the boat's coming back!)
16:39 TimToady in an hour :(
16:39 TimToady well, I'll go take a walk
16:39 TimToady bbl &
16:39 lue rakudo: say 1..3; say 1 ff 3
16:40 p6eval rakudo 43f865: OUTPUT«Confused at line 11, near "say 1 ff 3"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
16:40 lue alpha: say 1..3; say 1 ff 3
16:40 p6eval alpha 30e0ed: OUTPUT«Confused at line 10, near "ff 3"␤in Main (file <unknown>, line <unknown>)␤»
16:40 lue perl6: say 1..3; say 1 ff 3
16:40 p6eval pugs: OUTPUT«123␤*** No such subroutine: "&infix:ff"␤    at /tmp/Wj6sKWTly2 line 1, column 15 - line 2, column 1␤»
16:40 p6eval ..elf 30358: OUTPUT«Undefined subroutine &GLOBAL::infix_ff called at (eval 125) line 4.␤ at ./elf_h line 5881␤123␤»
16:40 p6eval ..rakudo 43f865: OUTPUT«Confused at line 11, near "say 1 ff 3"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
16:40 holli joined #perl6
16:41 lue :/ i guess it's still NYI then
16:44 lue rakudo: Inf.int.say; NaN.int.say
16:44 p6eval rakudo 43f865: OUTPUT«Method 'int' not found for invocant of class 'Num'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
16:44 lue rakudo: Inf.Num.say; NaN.Num.say
16:44 p6eval rakudo 43f865: OUTPUT«Inf␤NaN␤»
16:45 lue \o/ I guess that means #61602 is no more! (now to make sure there are tests...)
16:51 mberends phenny, tell moritz_ nice to see a pure Date module, hopefully 'perldoc Date::Simple' is an appropriate feature set.
16:51 phenny mberends: I'll pass that on when moritz_ is around.
16:53 lue rakudo: say (Inf.Num == Inf)
16:53 p6eval rakudo 43f865: OUTPUT«1␤»
16:54 lue std: Inf.int.say
16:54 p6eval std 30357: OUTPUT«ok 00:01 106m␤»
16:54 lue is it OK for int to die on Inf.int and NaN.int ?
16:54 mberends rakudo: say Inf+1
16:55 p6eval rakudo 43f865: OUTPUT«Inf␤»
16:55 mberends rakudo: say Inf+1 == Inf
16:55 p6eval rakudo 43f865: OUTPUT«1␤»
16:55 mberends therefore 1 == 0 ?
16:55 lue I'm just wondering if .int dying on Inf and NaN is because of implementation or because that's how it's supposed to be.
16:56 lue ( wouldn't want to test for something implementation-specific ;) )
16:56 mberends probably implementation. Inf should not allow all these operations.
16:57 lue so Inf.Num must die as well?
16:57 lue Although .Num returns either Inf or NaN (depending), they aren't numbers. They're concepts.
16:58 mberends yes, that would make sense imho. But maybe someone with a stronger mathematical background can show how some operations do make sense.
16:58 lue rakudo: say (Inf+1,Inf-1,Inf*1,Inf/1).join('\n')
16:58 p6eval rakudo 43f865: OUTPUT«Inf\nInf\nInf\nInf␤»
16:59 mberends whacky
16:59 lue rakudo: say (Inf+1,Inf-1,Inf*1,Inf/1).join("\n") # *cough*
16:59 p6eval rakudo 43f865: OUTPUT«Inf␤Inf␤Inf␤Inf␤»
16:59 lue rakudo: say (Inf+1,Inf-1,Inf*2,Inf/2).join("\n") # this would be a more conclusive test :)
16:59 p6eval rakudo 43f865: OUTPUT«Inf␤Inf␤Inf␤Inf␤»
17:00 lue my @a=1..3; say @a ~~ Inf
17:00 mberends rakudo: say Inf / Inf # heading for insanity
17:00 p6eval rakudo 43f865: OUTPUT«NaN␤»
17:00 lue rakudo: my @a=1..3; say @a ~~ Inf # *cough*
17:00 p6eval rakudo 43f865: OUTPUT«0␤»
17:00 lue rakudo: my @a=1..3; say @a ~~ (-Inf..Inf)
17:00 p6eval rakudo 43f865: OUTPUT«1␤»
17:01 diakopter std: 1 <<+<<< 2
17:01 p6eval std 30358: OUTPUT«ok 00:01 109m␤»
17:03 lue well, I'll be back soon (probably in ~ half-an-hour, considering that's when TimToady might come back), and discuss how Inf and NaN are handled :)
17:03 lue (rule 1!)
17:05 holli is there a way to make this dwim?
17:05 holli rakudo: say "2" ~~ /{ 1+1 }/
17:05 p6eval rakudo 43f865: OUTPUT«␤»
17:05 holli should be 1
17:12 ash__ diakopter: is there a <<< operator? or is that going to be split into a << and <
17:13 holli .oO( >>>, same as >> but may spread calculations across alternative universes)
17:15 mberends rakudo: say "2" ~~ / "2" { say "seen two" } /
17:15 p6eval rakudo 43f865: OUTPUT«seen two␤2␤»
17:15 alester joined #perl6
17:16 mberends holli: the / { ... } / is not part of the pattern to match, it's an action
17:16 holli rakudo: say "3" ~~ / [ "2" { say "seen two" } | { say "where is the two?" } ] /
17:16 p6eval rakudo 43f865: OUTPUT«where is the two?␤␤»
17:17 holli mberends: yes, i know. question was how to make the return value of the action become part of the pattern.
17:18 mberends holli: sorry, can't help you with that
17:18 am0c joined #perl6
17:33 TimToady rakudo: say "2" ~~ / <{ 1+1 }> /
17:33 p6eval rakudo 43f865: OUTPUT«␤»
17:33 Su-Shee joined #perl6
17:33 TimToady rakudo: say "2" ~~ / <{ ~(1+1) }> /
17:33 p6eval rakudo 43f865: OUTPUT«␤»
17:33 TimToady well, that's supposed to work
17:34 holli lol
17:34 TimToady rakudo: say "2" ~~ / $(1+1) /
17:34 p6eval rakudo 43f865: OUTPUT«␤»
17:34 holli i can literaly here the *sigh*
17:34 alester joined #perl6
17:34 TimToady rakudo: say "2" ~~ / $(~(1+1)) /
17:34 p6eval rakudo 43f865: OUTPUT«Confused at line 11, near "say \"2\" ~~"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
17:35 TimToady std: say "2" ~~ / $(~(1+1)) /
17:35 p6eval std 30358: OUTPUT«ok 00:02 111m␤»
17:35 TimToady std: say "2" ~~ / :my $x = 1+1; $x /
17:35 p6eval std 30358: OUTPUT«ok 00:01 108m␤»
17:35 TimToady rakudo: say "2" ~~ / :my $x = 1+1; $x /
17:36 p6eval rakudo 43f865: OUTPUT«␤»
17:36 TimToady rakudo: say "2" ~~ / :my $x = ~(1+1); $x /
17:36 p6eval rakudo 43f865: OUTPUT«␤»
17:36 TimToady rakudo: say "2" ~~ / :my $x = '2'; $x /
17:36 p6eval rakudo 43f865: OUTPUT«␤»
17:36 TimToady rakudo: my $x; say "2" ~~ / { $x = '2'} $x /
17:36 p6eval rakudo 43f865: OUTPUT«␤»
17:36 holli what's the colon supposed to do?
17:37 TimToady let you put a declarator
17:37 TimToady rakudo: my $x = '2'; say "2" ~~ / $x /
17:37 p6eval rakudo 43f865: OUTPUT«␤»
17:37 lue rakudo: Inf.Num.say # should this work?
17:37 p6eval rakudo 43f865: OUTPUT«Inf␤»
17:37 TimToady I thought that worked once
17:38 TimToady lue: sure
17:38 lue so that would be valid to test for in the spectest? (Inf.Num ~~ Inf)
17:38 TimToady rakudo: Inf.Int.say # this is also supposed to work
17:38 p6eval rakudo 43f865: OUTPUT«-9223372036854775808␤»
17:39 TimToady but not like that :/
17:39 lue ah, lowercasing doesn't work :)
17:39 ash__ joined #perl6
17:39 TimToady rakudo: Inf.int.say # should blow up
17:39 lue Inf.int (note lowercase int) used to return -2147483648
17:39 p6eval rakudo 43f865: OUTPUT«Method 'int' not found for invocant of class 'Num'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
17:40 TimToady int is a native type, and therefore can't hold Inf
17:40 TimToady only native num can hold Inf
17:40 lue rakudo: say -9223372036854775808 ~~ Inf
17:40 TimToady since IEEE defined it that way
17:40 p6eval rakudo 43f865: OUTPUT«0␤»
17:40 lue so #61602 is still a mystery :/
17:41 lue I can't help but feel uneasy that Inf and NaN are defined as numbers...
17:43 * holli reads something like "get_hll_global $P24, ["XML";"Parser";"Namespace"], "_block23"" and quickly decides to close that file again
17:44 cls_bsd joined #perl6
17:45 lue rakudo: say Inf.WHAT
17:45 p6eval rakudo 43f865: OUTPUT«Num()␤»
17:45 lue rakudo: say NaN.WHAT
17:45 p6eval rakudo 43f865: OUTPUT«Num()␤»
17:45 colomon At one point we were muttering about maybe making Inf and NaN their own types, instead of making them values of every Numeric (Real?) type...
17:46 lue .oO(Not A Number is Num....)
17:46 alester joined #perl6
17:47 lue (again, the thought of a dependency-tree-like method of defining numbers is thought)
17:48 lue maybe NaN and Inf can be defined as a Concept, and not a Num :)
17:50 lue rakudo: say Inf.Num.Int
17:50 p6eval rakudo 43f865: OUTPUT«-9223372036854775808␤»
17:50 * lue wonders what posesses rakudo/parrot to return that as an Int
17:51 * lue (of Inf, of course)
17:53 holli It "feels" right, imho
17:54 holli I mean, why should Inf be fractional?
17:55 holli rakudo: say Inf ** Inf
17:55 p6eval rakudo 43f865: OUTPUT«Inf␤»
17:56 kst joined #perl6
17:56 lue why should Inf be an integer? It's not a number, it's a concept.
17:59 dj_goku joined #perl6
17:59 lue what I meant was why return that number?
17:59 holli A concept of an arbitrarily large number
18:00 lue rakudo: say "17".fmt('%b')
18:00 p6eval rakudo 43f865: OUTPUT«10001␤»
18:00 lue rakudo: say "-9223372036854775808".fmt('%b')
18:00 p6eval rakudo 43f865: OUTPUT«100000000000000000000000000000​0000000000000000000000000000000000␤»
18:00 lue rakudo: say "-9223372036854775808".fmt('%b').chars
18:00 p6eval rakudo 43f865: OUTPUT«64␤»
18:01 holli there u got ur answer =)
18:01 holli nice catch
18:01 lue THAT'S IT! That's why it returns that number as Inf!
18:01 holli it it probably lower on my old 32 bit laptop
18:02 holli yup. here it says -2147483648
18:02 holli rakudo: say :2(-2147483648)
18:02 p6eval rakudo 43f865: OUTPUT«DON'T PANIC! Invalid character (-)! Please try again :) ␤current instr.: '&radcalc' pc 12048 (src/builtins/Parcel.pir:78)␤»
18:03 lue 2147483647 is what my computer says (G3 PPC)
18:03 holli rakudo: say :2<-2147483648>
18:03 p6eval rakudo 43f865: OUTPUT«Malformed radix number at line 11, near "<-21474836"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
18:03 lue try -2147483648.fmt('%b'). That's how you convert _to_
18:04 lue holli: you have 32-bit intel, correct?
18:05 holli rakudo: say :16(20)
18:05 p6eval rakudo 43f865: OUTPUT«32␤»
18:05 holli rakudo: say :2(100)
18:05 p6eval rakudo 43f865: OUTPUT«4␤»
18:05 holli ah, thats the other way aŕound =)
18:05 lue rakudo: say :4(222)
18:05 p6eval rakudo 43f865: OUTPUT«42␤»
18:06 holli honestly i have now idea what processor this is. but 32 bit, for sure
18:06 lue who manufactured the computer?
18:06 holli Its a Thinkpaf
18:06 lue rakudo: say "-2147483648".fmt('%b')
18:06 p6eval rakudo 43f865: OUTPUT«111111111111111111111111111111​1110000000000000000000000000000000␤»
18:06 holli *Thinkpad
18:06 lue then it's most likely intel
18:06 M_o_C joined #perl6
18:07 lue rakudo: say :2(1111111111111111111111111111111​110000000000000000000000000000000)
18:07 p6eval rakudo 43f865: OUTPUT«DON'T PANIC! Invalid character (8)! Please try again :) ␤current instr.: '&radcalc' pc 12048 (src/builtins/Parcel.pir:78)␤»
18:07 * holli discovers the sticker where it says Centrino and feels a bit silly
18:07 lue ō.o wow
18:07 lue how did the 8 get there?
18:08 holli rakudo: say :2(1111111)
18:08 p6eval rakudo 43f865: OUTPUT«127␤»
18:08 holli rakudo: say :2(11111111)
18:08 p6eval rakudo 43f865: OUTPUT«255␤»
18:08 holli rakudo: say :2(111111111)
18:08 p6eval rakudo 43f865: OUTPUT«511␤»
18:08 holli rakudo: say :2(1111111111)
18:08 p6eval rakudo 43f865: OUTPUT«1023␤»
18:08 holli rakudo: say :2(1111111111111)
18:08 p6eval rakudo 43f865: OUTPUT«8191␤»
18:08 holli rakudo: say :2(1111111111111111)
18:08 p6eval rakudo 43f865: OUTPUT«65535␤»
18:08 holli rakudo: say :2(1111111111111111111)
18:08 p6eval rakudo 43f865: OUTPUT«524287␤»
18:08 holli rakudo: say :2(1111111111111111111111)
18:08 p6eval rakudo 43f865: OUTPUT«DON'T PANIC! Invalid character (4)! Please try again :) ␤current instr.: '&radcalc' pc 12048 (src/builtins/Parcel.pir:78)␤»
18:08 lue 10000000000000000000000000000000 is what it should be. (now to go talk to who implemented .fmt)
18:08 holli rakudo: say :2(111111111111111111111)
18:08 p6eval rakudo 43f865: OUTPUT«DON'T PANIC! Invalid character (4)! Please try again :) ␤current instr.: '&radcalc' pc 12048 (src/builtins/Parcel.pir:78)␤»
18:08 holli rakudo: say :2(11111111111111111111)
18:08 p6eval rakudo 43f865: OUTPUT«DON'T PANIC! Invalid character (-)! Please try again :) ␤current instr.: '&radcalc' pc 12048 (src/builtins/Parcel.pir:78)␤»
18:08 holli rakudo: say :2(1111111111111111111)
18:09 p6eval rakudo 43f865: OUTPUT«524287␤»
18:09 lue rakudo: say radcalc('1111111111111111111111',2,10)
18:09 p6eval rakudo 43f865: OUTPUT«DON'T PANIC! The radix is out of range (2..36 only)␤current instr.: '&radcalc' pc 12048 (src/builtins/Parcel.pir:78)␤»
18:09 lue rakudo: say radcalc('1111111111111111111111',2)
18:09 p6eval rakudo 43f865: OUTPUT«DON'T PANIC! The radix is out of range (2..36 only)␤current instr.: '&radcalc' pc 12048 (src/builtins/Parcel.pir:78)␤»
18:09 * lue goes to look at radcalc again
18:10 lue rakudo: say radcalc(2,'1111111111111111111111')
18:10 p6eval rakudo 43f865: OUTPUT«4194303␤»
18:10 lue rakudo: say :2(1111111111111111111111)
18:10 p6eval rakudo 43f865: OUTPUT«DON'T PANIC! Invalid character (4)! Please try again :) ␤current instr.: '&radcalc' pc 12048 (src/builtins/Parcel.pir:78)␤»
18:11 lue good, it's a problem with the :[number] code, not with the radcalc helper function (which helps :[number])
18:11 holli rakudo: say :2('1111111111111111111111')
18:11 p6eval rakudo 43f865: OUTPUT«4194303␤»
18:11 holli rakudo: say :2('11111111111111111111111111')
18:11 p6eval rakudo 43f865: OUTPUT«67108863␤»
18:12 holli now that is strange
18:12 pugssvn r30359 | lwall++ | [S02] explicate (non)-relationship of interpolation and whitespace/unspace
18:12 holli or maybe not.
18:12 holli rakudo: say :2('1111111111111111111111111​11111111111111111111111111')
18:13 p6eval rakudo 43f865: OUTPUT«2.25179981368525e+15␤»
18:13 lue apparently, you need to string your number if it's big ō.o
18:14 holli that makes sense. No number could become bigger than the systems llimit anyway.
18:14 TimToady rakudo doesn't actually support Int yet
18:15 TimToady Int is arbitrary precision, including Inf :)
18:15 TimToady well, arbitrary size, to be precise
18:15 TimToady all integers have the same precision :)
18:16 lue a precision of 1, correct?
18:16 lue rakudo: say '2147483647'.fmt('%b')
18:16 p6eval rakudo 43f865: OUTPUT«1111111111111111111111111111111␤»
18:16 TimToady well, it will depend on how you define precision, of course
18:16 lue rakudo: say '2147483647'.fmt('%b').chars
18:16 p6eval rakudo 43f865: OUTPUT«31␤»
18:16 holli rakudo: say -1 ** 0.5
18:16 p6eval rakudo 43f865: OUTPUT«-1␤»
18:16 TimToady they're not equally precise under the "digits of precision" definition
18:16 holli ahemm. =)
18:17 TimToady rakudo: say (-1) ** 0.5
18:17 p6eval rakudo 43f865: OUTPUT«NaN␤»
18:17 lue that's should be i (for imaginary), actually
18:18 TimToady you will note that the precedence of ** is tighter than symbolic unaries
18:18 lue isn't that how it works in math?
18:18 iblechbot joined #perl6
18:18 TimToady yes, but holli seems to expect -1 ** 0.5 to make i
18:18 TimToady where -1 is the correct answer
18:19 holli expect is maybe a big word =)
18:19 holli *too big
18:19 * TimToady expectorates when he wants a big word
18:19 colomon rakudo: (-1 + 0i) ** .5
18:19 p6eval rakudo 43f865:  ( no output )
18:19 colomon rakudo: say (-1 + 0i) ** .5
18:19 p6eval rakudo 43f865: OUTPUT«6.12323399573677e-17 + 1i␤»
18:20 holli sure, make fun of the non native speakers ;-)
18:20 * holli goes looking up expectorate
18:20 TimToady I have nothing against the Romans...
18:21 lue I hate them, except for the irrigation system :)
18:21 lue 'Romani Ite Domum'
18:21 TimToady Roman Meal bread is pretty good, except I'm allergic to it.
18:21 TimToady sigh
18:21 TimToady taxes &
18:21 lue .oO(let us all mourn for Larry)
18:22 * lue thinks of annoying the math teacher by say exponents are tighter than negation
18:22 holli lue: 5 + 2 * 3 - 1
18:23 lue "So, you do multiplication first, and then addition, and--" "So, multiplication is tighter than addition?" "what?"
18:25 lue colomon: now we see the violence inherent in the system! (and by that I mean the murderous error given by rakudo)
18:25 * holli opens a Can Of Pittiness (+10 Adorabilty) for TimToady
18:26 holli rakudo: say Inf - Inf
18:26 p6eval rakudo 43f865: OUTPUT«NaN␤»
18:27 lue shouldn't that be 0? Or maybe it's Inf? Or maybe... .oO(AAAAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHH!!)
18:27 ash__ Inf +|-|*|/|% Inf should be Inf
18:28 * holli considers Inf - Inf to be special case
18:28 holli No rule without exception =)
18:29 ash__ but there is no magnitude on the Inf, and who's to say that two Inf's are the same value of Inf?
18:29 nihiliad joined #perl6
18:29 ash__ if you know that it might as well be a number
18:29 lue .oO(aleph and beth numbers in my head again) as I love saying: It's NaN, it's a concept.
18:29 holli rakudo: say 2*Inf < 3*Inf
18:29 p6eval rakudo 43f865: OUTPUT«0␤»
18:30 holli ;-D
18:30 holli rakudo: say 2*Inf == 3*Inf
18:30 p6eval rakudo 43f865: OUTPUT«1␤»
18:31 holli rakudo: say Nan.WHAT
18:31 p6eval rakudo 43f865: OUTPUT«Could not find sub &Nan␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
18:31 holli rakudo: say NaN.WHAT
18:31 p6eval rakudo 43f865: OUTPUT«Num()␤»
18:31 holli Now, THAT is paradox. ^^
18:32 ash__ lol, its a special kind of number, like imaginary ones
18:32 lue exactly. I'm thinking of the next #rs be about the state of the implementation of numbers.
18:32 lue (of course, not my decision, but...)
18:32 mberends "It's Number, Jim, but not as we know it..."
18:33 holli next #rs?
18:34 holli mberends++ # Master of Star Trek (Original) References
18:34 lue short for the #rakudosketch channel. It's to discuss the design & progress of rakudo.
18:35 holli aha, well, i looked at PIR code today.
18:35 holli so i dont want to have nothing to do with your #rs =)
18:36 lue Well, then I guess I'm part of the JPF (or is it the PFJ? I can't remember) :)
18:37 colomon splitter!
18:37 mberends future #rakudosketch meetings will probably happen on Tuesdays at 19:00 UTC
18:38 lue 11 AM (for me) on Tuesday? aw :(
18:39 lue There's no way I could make that until summer! :/
18:39 holli mberends++ # Master of Monty Python References
18:41 lue .oO(Romanus Eunt Domus)
18:43 lue "Well, division by zero is not so much 'physically impossible' as it is 'in violation of mathematical axioms.'"
18:46 lue afk
19:12 Exodist_ joined #perl6
19:21 zapad_ joined #perl6
19:26 mantovani joined #perl6
19:26 holli how do i get the last changed timestamp of a file?
19:30 jhuni joined #perl6
19:33 lue *chirp*
19:34 lue .oO(Oh hey, why do I have TimToady's cricket?)
19:36 cls_bsd_ joined #perl6
19:41 mberends holli: stat calls are available in Parrot, but only partly in Rakudo, and the dates are NYI.
19:42 holli ah, ok.
19:43 holli anyway, i got another problem. I did "ln ~/perl6/rakudo/perl6 /usr/bin/perl6"
19:44 holli but when i then start rakudu, i get a bunch of errors:
19:44 holli elements() not implemented in class 'Sub'
19:44 holli current instr.: '' pc -1 ((unknown file):-1)
19:44 holli is there something i can do about this?
19:46 mberends yes.
19:47 mberends you probably did not "make install"
19:48 mberends then you would "sudo ln -s /some/path/parrot_install/bin/perl6 /usr/bin/perl6"
19:49 lue I know rakudo's famous for this: if I go into the src folder of rakudo, then call ../perl6, this happens:
19:49 lue Null PMC access in find_method('get_parrotclass')
19:49 lue current instr.: 'perl6;ClassHOW;onload' pc -1 ((unknown file):-1)
19:49 lue Segmentation fault
19:49 jferrero joined #perl6
19:50 mberends holli: did you use "perl Configure.pl --gen-parrot" to begin building Rakudo?
19:50 holli I did. and i did make install.
19:52 mberends holli: then don't link to the perl6 in the rakudo directory, link to the one in parrot_install/bin/
19:52 holli ah, ln -s /some/path/parrot_install/bin/perl6 /usr/bin/perl6 did the trick
19:52 mberends :)
19:53 mberends I personally prefer /usr/local/bin/ on Ubuntu because it is less cluttered
19:55 mberends also, I have /usr/local/bin/rakudo and /usr/local/bin/alpha to match the evalbot names :)
19:55 lue mberends: any chance you know the cause of this famous rakudo error? (look up)
19:55 * mberends looks
19:56 shyam_iyer joined #perl6
19:57 lue where you can't call rakudo by navigating the directories (i.e. ../perl6 or rakudo/perl6)
19:58 mberends lue: it works locally, but could be related to this "parrot_install/bin" dependency. The perl6 in the rakudo directory is not expected to work when run from any other directory.
19:59 lue that seems a bit counter-productive. :)
19:59 mberends so it's documented. That makes it a "feature", not a "bug" ;P
20:01 mberends because "make install" solves the problem, there is no incentive to work on a second solution.
20:01 colomon except maybe giving a better error message when you haven't done "make install" (like alpha did)
20:02 lue I'm not the BDFL on the server I work on (so I don't feel like mucking around with make install), and locally I don't have the resources to compile anything I could install! :(
20:02 lue (I could make a symlink, but...)
20:02 colomon lue: for rakudo, make install installs locally by default.  You don't need any fancy permissions.
20:03 lue :D
20:04 mberends colomon: good point, probably worth a little look
20:04 lue but perl6 doesn't work after make install :( (still would need ./perl)
20:05 mberends lue: instead of "ln -s" you could define a bash alias
20:05 lue ō.o
20:06 cotto ooc, what kind of obstacles exist to writing a Perl 6 compiler targeting the DLR?
20:06 pmurias lack of manpower?
20:07 cotto there's a gsoc proposal about doing that and I'm curious what kind of difficulties the student will face
20:08 diakopter 1. The student would need to use one of the existing parsers, since implementing one of those for Perl 6 takes years
20:09 pmurias with STD and rakudo's one being the do sensible possibilitys
20:10 cotto Yeah.  I guess the vastness of Perl 6 itself would be the biggest hurdle.
20:10 diakopter 2. Perl 6 control flow (return via exceptions) is different enough from the CLRs that using Callsites in the DLR wouldn't gain anything.
20:12 mberends a scaled down but very achievable goal would be to add a DLR emitter to Perlito.
20:13 diakopter 3. Perl 6 types need multiple inheritance and roles; the binding and dispatch builders in the languages already implemented on the DLR wouldn't be of much help.
20:14 cotto perlito?
20:15 pmurias fglock's subset of Perl 6 to multiple backends compiler
20:15 diakopter http://github.com/fglock/Perlito
20:16 diakopter 4. Perl 6's multiple-stage compilation/evaluation is an issue that I'm not sure the DLR can surmount.
20:17 mberends see also http://www.perlito.org/ and try it online: http://www.perlito.org/js/
20:17 pmurias diakopter: sprixel targets .NET right?
20:17 diakopter pmurias: yes, in addition to the first stage being written in C#
20:18 pmurias first stage?
20:18 diakopter yes.  akin to rakudo's stage0, stage1, etc.
20:19 pmurias sprixel lives at http://github.com/diakopter/sprixel?
20:19 diakopter no
20:20 pmurias diakopter: where can i find that?
20:21 diakopter cotto: do you have any comments on the other points I mentioned?
20:21 diakopter pmurias: it's embedded somewhere in csmeta.org
20:26 cotto diakopter, no
20:26 cotto what you've mentioned is very helpful, especially perlito
20:36 lue afk
20:41 cotto thanks
20:41 masak joined #perl6
20:41 diakopter pmurias: are you looking into csmeta?  I've left it deliberately unusable except for those on vs2010rc.
20:41 masak ahoy, #perl6!
20:42 mberends \o masak
20:43 * masak continues to debug GGE under Rakudo master
20:44 * cotto hopes he's not trolling the dlr perl 6 proposal
20:46 diakopter cotto: btw, I was the one whose private commented included "... for several technical reasons"
20:46 masak rakudo: subset 無 of Mu;  my 無 $x;
20:46 p6eval rakudo 43f865: OUTPUT«Nominal type check failed for parameter '$original'; expected Any but got Mu instead␤current instr.: 'CREATE_SUBSET_TYPE' pc 336588 (src/gen/core.pir:17038)␤»
20:46 masak rakudo: subset A of Mu; my A $x
20:47 p6eval rakudo 43f865: OUTPUT«Nominal type check failed for parameter '$original'; expected Any but got Mu instead␤current instr.: 'CREATE_SUBSET_TYPE' pc 336588 (src/gen/core.pir:17038)␤»
20:47 pmurias diakopter: just wanted to see how it's doing, i'm not very interested in .NET
20:47 * masak submits rakudobug
20:49 diakopter rakudo: subset A of Mu;  my A $x;
20:49 p6eval rakudo 43f865: OUTPUT«Nominal type check failed for parameter '$original'; expected Any but got Mu instead␤current instr.: 'CREATE_SUBSET_TYPE' pc 336588 (src/gen/core.pir:17038)␤»
20:49 diakopter oh
20:49 diakopter hee
20:57 * pmurias wanders if there are any privates comments on his gsoc proposal ;)
20:58 mberends diakopter++: the Sprixel first stage roadmap http://code.google.com/p/csmeta/sou​rce/browse/trunk/Sprixel/notes.txt describes a fairly powerful bootstrapping language. Linking to any .NET class is a brilliant feature. How complete is the Sprixel0 implementation?
21:00 diakopter not very
21:01 diakopter static invocations work, e.g. Console.WriteLine("blah", 4432 + 332)
21:02 diakopter I'm just finishing up named sub declarations
21:02 mberends that must already have a lot of underlying code working. These things don't come easily.
21:03 masak diakopter++
21:04 diakopter today, I'm thinking it will be an assembly language, targetted by viv and/or nqp-rx
21:04 diakopter at least until I can get associativity working in the expression parser
21:04 diakopter but until then, precedence must have parens
21:05 diakopter I'm hoping that STD will be able to compile itself to this language, which I'm calling perlesque
21:05 masak perlesque \o/
21:06 mberends masak: Sprixel0 almost compiles on Linux as well, using mono 2.4.4
21:06 diakopter lots of transformations will be needed in its edition of viv; it probably won't be able to infer types in STD's output, so something will need to be done there
21:06 diakopter but "a lot can be accomplished with closures"
21:06 masak mberends: nice
21:07 masak :)
21:08 diakopter also, class declarations, sorta like PIR's
21:09 diakopter including generics eventually, I guess
21:09 diakopter so basically, a very small strongly typed impure functional subset of Perl 5/6
21:10 mberends sounds like a fun language :)
21:12 diakopter it'll remain vaporware, though, for a while longer.  if anyone wants to help, they could take a look at extending viv to other emitters
21:13 diakopter or to help TimToady in his quest to make viv --p5 emit the same thing as gimme5
21:13 diakopter , from which would provide a stable starting point to derive a perlesque emitter
21:14 masak ah. gotcha.
21:14 masak rakudo: class A {}; my $x = &A::nosuch
21:14 p6eval rakudo 43f865: OUTPUT«Null PMC access in can()␤current instr.: '&infix:<=>' pc 16989 (src/builtins/Junction.pir:245)␤»
21:14 masak alpha: class A {}; my $x = &A::nosuch
21:14 p6eval alpha 30e0ed:  ( no output )
21:14 * masak submits rakudobug
21:15 masak is that still the way to get at a method in Perl 6?
21:21 ash__ i only know of using .^methods
21:21 ash__ to get a method
21:21 ash__ rakudo: class Foo { method f { say 'f' } }; my $a = Foo.^methods(:local); say $a[0]();
21:21 p6eval rakudo 43f865: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤current instr.: 'perl6;Foo;f' pc 450 (EVAL_1:178)␤»
21:22 ash__ ehe, still nees a self
21:22 ash__ needs*
21:22 masak I've previously been using &Class::methodname to get at a method, and it's worked.
21:22 ash__ maybe thats supposed to work
21:23 ash__ rakudo: class Foo { method f { say 'f' } }; my $a = Foo.^methods(:local); $a[0]();
21:23 p6eval rakudo 43f865: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤current instr.: 'perl6;Foo;f' pc 439 (EVAL_1:177)␤»
21:23 ash__ oops
21:24 ash__ rakudo: class Foo { method f { say 'f' } }; my $a = Foo.^methods(:local); $a[0]('lol_not a foo');
21:24 masak I'm kinda expecting to use a way that doesn't involve the introspect API.
21:24 p6eval rakudo 43f865: OUTPUT«f␤»
21:24 masak mostly because I haven't needed it for this before.
21:24 ash__ well, maybe we should ask someone about &Class::methodname that seems perfectly reasonable
21:25 masak I'm all for asking someone perfectly reasonable :)
21:25 * mberends seems perfectly reasonable, until asked such a question ;)
21:26 ash__ is there a &() context?
21:27 colomon is the alternative Class::&methodname?  I feel like I'm missing context in this discussion...
21:28 ash__ would be nice to also grab methods off an instance as a closure, so you don't have to pass self
21:28 * colomon should probably go downstairs and find out what his father-in-law is doing to the house's electrical system...
21:29 masak ash__: you can always do that manually, through a closure. I did that in Rakudo back in late 2008 :)
21:29 masak I was greatly surprised that it worked...
21:30 ash__ yeah, but if your talking convenient method accessors...
21:30 JohnDoe365 joined #perl6
21:30 ash__ doing like: my &a = &($foo.methodname);  and having it still bound to $foo might be nice
21:30 masak in my case, I just expect to send in the invocant parameter as the first argument.
21:31 ash__ i guess thats currying isn't it?
21:31 masak no, it's passing the invocant parameter to something which has the form of a sub :)
21:32 masak alpha: class A { method foo($message) { say $message } }; my $bar = &A::foo; my $a = A.new; $bar($a, "OH HAI")
21:32 p6eval alpha 30e0ed: OUTPUT«OH HAI␤»
21:33 masak alpha: class A { method foo($message) { say $message } }; my $bar = &A::foo; my $a = A.new; my &closure = -> $m { $bar($a, $m) }; closure("currying! \o/")
21:33 p6eval alpha 30e0ed: OUTPUT«currying!
21:33 sundar joined #perl6
21:33 masak I guess that's currying, though...
21:34 masak a fairly manual kind.
21:34 masak alpha: class A { method foo($message) { say $message } }; my $bar = &A::foo; my $a = A.new; my &closure = $bar.assuming($a); closure("currying! \o/")
21:34 p6eval alpha 30e0ed: OUTPUT«currying!
21:34 ash__ rakudo: class A { method foo($message) { say $message } }; my $bar = &A::foo; my $a = A.new; my &closure = $bar.assuming($a); closure("currying! \o/")
21:34 p6eval rakudo 43f865: OUTPUT«Unrecognized backslash sequence: '\o' at line 11, near "/\")"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
21:35 masak oops, shoulda had double backslashes there... :)
21:35 ash__ rakudo: class A { method foo($message) { say $message } }; my $bar = &A::foo; my $a = A.new; my &closure = $bar.assuming($a); closure("currying! \\o/")
21:35 p6eval rakudo 43f865: OUTPUT«Null PMC access in can()␤current instr.: '&infix:<=>' pc 16989 (src/builtins/Junction.pir:245)␤»
21:36 ash__ so... some functionality from alpha still missing
21:36 masak nuh huh.
21:36 masak :)
21:37 masak to be fair, I'm missing less than I thought I would.
21:38 ash__ http://perlcabal.org/syn/S06.html#Currying
21:38 masak rakudo: class A { method foo { say "OH HAI" } }; my $meth = A.can("foo"); $meth(A.new)
21:38 p6eval rakudo 43f865: OUTPUT«OH HAI␤»
21:38 masak ah. I seemed to remember it was something like that.
21:39 ash__ is that the proper way of doing it?
21:39 masak I think jnthn++ said so.
21:40 masak slightly surprising, in my opinion. :)
21:41 ash__ http://perlcabal.org/~azawawi/html​/spec/S12-introspection/can.t.html has an example of that
21:43 * mberends goes to sleep, o/
21:43 colomon \o
21:43 masak o/
21:44 masak hm; I guess technically it is introspection, too. :)
21:44 masak but at least it doesn't explicitly involve the metaclass.
21:48 ruoso ash__, in Perl 6 methods are not registered in the package by default...
21:49 ruoso rakudo: class A { our method foo($message) { say $message } }; my $bar = &a::foo; my $a = A.new; $bar($a, "Hello");
21:49 p6eval rakudo 43f865: OUTPUT«Null PMC access in can()␤current instr.: '&infix:<=>' pc 16989 (src/builtins/Junction.pir:245)␤»
21:49 ash__ so doing &Classname::methodname shouldn't work?
21:49 ash__ unless you use our
21:49 ruoso ash__, unless you have a "our method"
21:49 ash__ got ya
21:49 masak ah.
21:49 ruoso rakudo: class A { our method foo($message) { say $message } }; my $bar = &A::foo; my $a = A.new; $bar($a, "Hello");
21:49 p6eval rakudo 43f865: OUTPUT«Hello␤»
21:51 ruoso it's important to notice that this &A::foo lookup is absolutely non-OO
21:51 ruoso it will look for a routine declared in that package
21:52 ash__ rakudo: class A { our method foo($message) { say $message } }; my $a = A.new; my &bar = &A::foo.assuming(self => $a); &bar("Hi");
21:52 masak gotcha.
21:52 p6eval rakudo 43f865: OUTPUT«Symbol 'self' not predeclared in <anonymous> (/tmp/sRy5L0z4Ap:11)␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
21:52 ash__ rakudo: class A { our method foo($message) { say $message } }; my $a = A.new; my &bar = &A::foo.assuming(:self($a)); &bar("Hi");
21:52 p6eval rakudo 43f865: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤current instr.: 'perl6;A;foo' pc 508 (EVAL_1:0)␤»
21:53 ruoso rakudo: class A { our method foo($s: $message) { say $message } }; my $a = A.new; my &bar = &A::foo.assuming($s => $a); &bar("Hi")
21:53 p6eval rakudo 43f865: OUTPUT«Symbol '$s' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
21:53 ruoso rakudo: class A { our method foo($s: $message) { say $message } }; my $a = A.new; my &bar = &A::foo.assuming($a); &bar("Hi")
21:53 p6eval rakudo 43f865: OUTPUT«Hi␤»
21:53 ash__ cool
21:53 ash__ that works too
21:57 ruoso when you look at a method as a routine, the invocant is just the first positional argument... just like p5
22:02 espadrine joined #perl6
22:03 lue ohai there!
22:03 masak lue!
22:04 lue .oO(I can't believe it. masak joined 5 minutes after I left a couple hours ago!)
22:04 pmurias ruoso: i'm running devel cover on mildew
22:05 pmurias * Devel::Cover
22:05 yjh joined #perl6
22:05 user_7310 joined #perl6
22:06 lue last off, I was hoping to resolve #61602, when I really opened a new can of worms :)
22:06 lue rakudo: Inf.Num.say; NaN.Num.say; Inf.Int.say; Inf.NaN.say; # note the number; it's only on 64-bit computers
22:06 p6eval rakudo 43f865: OUTPUT«Inf␤NaN␤-9223372036854775808␤Method 'NaN' not found for invocant of class 'Num'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
22:07 lue rakudo: NaN.Int.say # *cough*
22:07 p6eval rakudo 43f865: OUTPUT«-9223372036854775808␤»
22:08 espadrine left #perl6
22:12 JohnDoe365 left #perl6
22:13 pugssvn r30360 | pmurias++ | [mildew] fix our, saner handling of names with packages
22:13 masak that's not not a number. :)
22:14 lue exactly. If you look at #61602, i noted it returns the decimal of a binary number with the highest bit set (# of bits dependent on your CPU)
22:15 lue s/highest/most significant/
22:17 * lue is starting to get annoyed no-one has implemented := yet, it gets in the way of making sure some pre-ng tickets are still tickets :/
22:17 lue alpha: my @a = (1); @a[0] := @a; @a.perl
22:17 p6eval alpha 30e0ed: OUTPUT«rtype not set␤in Main (file <unknown>, line <unknown>)␤»
22:18 lue ō.o was expecting it to hang
22:21 masak it did, at one point.
22:21 lue I wanted to see if master is fine with it, but := is NYI :/
22:22 lue rakudo: say 3 ~~ !NaN
22:22 p6eval rakudo 43f865: OUTPUT«0␤»
22:23 masak that's not how you match negatively against types :)
22:23 masak though I've toyed with the idea myself of overloading prefix:<!> that way... :)
22:24 ash__ is the !NaN Inf?
22:24 lue rakudo: say 3 is not NaN # testing real-language :)
22:24 p6eval rakudo 43f865: OUTPUT«Confused at line 11, near "say 3 is n"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
22:25 masak lue: !~~
22:25 lue rakudo: say 3 !~~ NaN
22:25 p6eval rakudo 43f865: OUTPUT«1␤»
22:25 lue but that's just not equals. It would be more fun to say equals not Not a Number :)
22:26 lue wait, NaN is a *type*?
22:26 moritz_ nope
22:26 phenny moritz_: 16:51Z <mberends> tell moritz_ nice to see a pure Date module, hopefully 'perldoc Date::Simple' is an appropriate feature set.
22:26 moritz_ rakudo: say NaN.WHAT
22:26 p6eval rakudo 43f865: OUTPUT«Num()␤»
22:26 moritz_ phenny: tell mberends yes, Date::Simple is my main source of inspiration
22:26 phenny moritz_: I'll pass that on when mberends is around.
22:27 sorear lue: a type in Perl 6 is a set of values.  {NaN} is a type
22:27 moritz_ the other view is that every value that responds with False to .defined is a type
22:27 lue rakudo: say NaN.defined
22:28 p6eval rakudo 43f865: OUTPUT«1␤»
22:28 lue rakudo: my NaN $a = 3; say $a # if it's a type, I should be able to do this (?)
22:28 p6eval rakudo 43f865: OUTPUT«Type check failed for assignment␤current instr.: '&die' pc 17293 (src/builtins/Junction.pir:404)␤»
22:30 masak it's not a type.
22:30 lue rakudo: say 3 !~~ 4; say 3 ~~ !(4)
22:30 p6eval rakudo 43f865: OUTPUT«1␤0␤»
22:32 sundar Hi... I have some free time at hand, and would like to contribute to Perl6. What is something that might be easy to implement for a newbie?
22:33 masak sundar: cool! almost anything you do at this point that produces runnable Perl 6 code is of value.
22:33 masak sundar: it usually drags out bugs and highlights what needs to be done in order to make it to Rakudo Star.
22:34 sundar masak: you mean trying writing Perl 6 code and playing with it?
22:34 masak yes.
22:35 lue I agree with masak. I can't tell you how many weird bugs I've found trying out Perl6 code to do something completely random.
22:35 masak well, you're welcome to write something completely non-random too :)
22:36 IllvilJa joined #perl6
22:36 sundar Ok, that sounds good.. I'd learn Perl 6 better too this way. Thanks, getting to it right away. :)
22:36 masak \o/
22:37 masak sundar: when you do hit a snag -- and you will, if you keep at it long enough -- feel free to highlight it by executing a golfed line of code on p6eval here on the channel.
22:38 masak rakudo: $_ = "OH NOES"; s/NOES/HAI/; say $_
22:38 p6eval rakudo 43f865: OUTPUT«OH NOES␤»
22:38 lue I seriously think P6 is the most fun I've ever had learning a language. It may not be as quick (lack of documentation), but you'll have much more fun learning :)
22:39 lue masak: THAT'S how you use s///!
22:39 sundar masak: sure.. I've been watching "masak submits rakudobug"s for some time now. Ll be good to see one prompted by me too.. :)
22:39 lue .oO(I got very giddy when I caused a spec bloodbath a while ago (file test operators))
22:40 masak sundar: :)
22:41 * lue still wonders about this: $_ means "it", @_ means "them", %_ means...
22:44 masak 'themz' :)
22:44 sundar lue: some languages have a words for 'those two'... though that would still be a Pair, not a hash..
22:47 lue It bugs me that we have english pronouns for a bunch of things (*,$_, and so on) EXCEPT for %_
22:47 lue I'm going to be asking until Perl7 comes out, when %_ is abolished :)
22:49 * lue is looking at http://en.wikipedia.org/wik​i/English_personal_pronouns for guidance
22:50 snarkyboojum joined #perl6
22:51 lue o hai snarkyboojum o/
22:51 lue (right now I'm trying to find an english language equivalent to %_)
22:52 snarkyboojum hi lue
22:54 * lue is currently resorting to old english, before moving on to other languages
22:57 pugssvn r30361 | lwall++ | [STD] clean up some unneeded locmesses
22:57 pugssvn r30361 | distinguish "Parse failed" from "Check failed"
22:59 lue TimToady++ for clarity :)
23:02 lue .oO(is there a language out there that defines a pronoun referring to a hash-like structure?)
23:03 lue afk (in the meantime considering inventing a new english word if nothing else)
23:08 orafu joined #perl6
23:11 snarkyboojum re inconsistency in method naming in Temporal.pm, 'multi method day-of-week' vs 'multi method from_epoch' for example?
23:20 ruoso damian++  "that's a very sad reflection on our profession."
23:21 ruoso heh
23:31 payload joined #perl6
23:34 payload1 joined #perl6
23:42 snarkyboojum not an argument though :)
23:54 arnsholt ruoso: Where's that from?
23:54 TimToady std: my $x; "$x\[nonesuch\]";
23:54 p6eval std 30361: OUTPUT«ok 00:01 109m␤»
23:55 diakopter arnsholt: p6l
23:55 arnsholt Ah, right. I should probably subscribe to p6l

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

Perl 6 | Reference Documentation | Rakudo