00:09 mikehh left 00:29 ruz_mac left 00:30 M_o_C left 00:36 ruz_mac joined 00:39 SmokeMachine joined, lumi left 00:40 Grrrr left 00:43 jferrero left, lumi joined 00:51 FCO joined, SmokeMachine left 01:05 arthur-_ joined 01:23 Limbic_Region left 01:24 justatheory left 01:28 Whiteknight left 01:29 missingthepoint joined 01:30 Aisling left, Aisling joined 01:47 tann left
meppl good night 02:06
02:08 meppl left 02:20 ashizawa left 02:56 Jedai left 03:03 SmokeMachine joined 03:04 missingthepoint left 03:20 FCO left 03:28 unitxt joined 03:30 xinming left, xinming joined 03:31 justatheory joined 03:37 sparc joined 03:41 FCO joined 03:43 ab5tract joined, ab5tract left, SmokeMachine left 03:56 PZt joined 03:58 JimmyZ joined 04:09 SmokeMachine joined 04:14 molaf joined 04:16 molaf left 04:19 SmokeMachine left, SmokeMachine joined 04:20 kane_ left 04:24 FCO left, arejay_ left 04:25 arejay joined
pugs_svn r27826 | kyle++ | [t/spec] Test for RT #68086 04:30
r27827 | kyle++ | [t/spec] Tests for RT #68074
r27828 | kyle++ | [t/spec] Tests for RT #68008
04:31 tann_ joined
JimmyZ rakudo: say '3'.^method.perl 04:34
p6eval rakudo e02bc0: OUTPUT«Method 'method' not found for invocant of class 'ClassHOW'␤»
JimmyZ rakudo: say '3'.^methods.perl
p6eval rakudo e02bc0: OUTPUT«[{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ...
..}, { …
JimmyZ rakudo: '3'.^methods.map({.name}).join(', ').say 04:36
p6eval rakudo e02bc0: OUTPUT«WHICH, ACCEPTS, perl, sprintf, Scalar, pred, encode, succ, floor, rand, truncate, round, sort, rindex, sqrt, split, match, grep, words, values, can, lcfirst, srand, Complex, map, polar, cis, kv, samecase, log, min, capitalize, max, first, trans, flip, does, Int, p5chop, lc,
..subst, …
JimmyZ rakudo: '3'.^methods.map({.name}).perl.say
p6eval rakudo e02bc0: OUTPUT«["encode", "succ", "WHICH", "ACCEPTS", "perl", "sprintf", "Scalar", "pred", "chr", ":d", ":e", ":f", "comb", "floor", "round", "chop", "split", "match", "words", "can", "lcfirst", "uc", "srand", "Complex", "keys", "map", "polar", "cis", "log", "substr", "min", "max", "pick",
.."first…
JimmyZ rakudo: '3'.^methods.perl.say
p6eval rakudo e02bc0: OUTPUT«[{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ...
..}, { …
tann_ rakudo: no strict; $i = 2; say $i; 04:46
p6eval rakudo e02bc0: OUTPUT«Symbol '$i' not predeclared in <anonymous> (/tmp/HjoGGW7pUx:2)␤in Main (src/gen_setting.pm:3363)␤»
tann_ pugs: no strict; $i = 0; say $i;
p6eval pugs: OUTPUT«*** ␤ Unexpected " ="␤ expecting "::"␤ Variable "$i" requires predeclaration or explicit package name␤ at /tmp/oh6U8lkTxL line 1, column 14␤»
sjohnson how's it going dudes 04:47
JimmyZ rakudo: $i = 2; say $i; 04:54
p6eval rakudo e02bc0: OUTPUT«Symbol '$i' not predeclared in <anonymous> (/tmp/K375UkQxhe:2)␤in Main (src/gen_setting.pm:3363)␤»
JimmyZ rakudo: $_ = 2; .say ;
p6eval rakudo e02bc0: OUTPUT«2␤»
wayland76 sjohnson: The weather is golfy :) 04:55
sjohnson hi wayland
\o/
wayland76 hi
:)
sjohnson perl!
wayland76 6!
sjohnson i love it everyday
i think the people who hate it
just aren't capable, or haven't seen the beauty of its expressiveness 04:56
wayland76 Don't agree
The big advantage of perl is that it lets you program the way you want 04:57
tann_ rakudo: my @a = 1..10; my @b = 100..110; my @c = @b >>-<< @a; say @c.perl;
wayland76 But if the people you work with have a widely different idea of what is good, then naturally it creates problems
p6eval rakudo e02bc0: OUTPUT«Non-dwimmy hyperoperator cannot be used on arrays of different sizes or dimensions.␤in Main (/tmp/UsNjSMm1AF:2)␤»
wayland76 Something like Python, OTOH, has the One True Way to do things 04:58
04:58 ewilhelm left
tann_ rakudo: my @a = 1..10; my @b = 101..110; my @c = @b >>-<< @a; say @c.perl; 04:58
p6eval rakudo e02bc0: OUTPUT«[100, 100, 100, 100, 100, 100, 100, 100, 100, 100]␤»
wayland76 And that keeps idiots from doing something stupid with it
So if you work with idiots, you like Python :)
tann_ wayland76: disagree
wayland76 (Or something else other than perl; pick your own B&D language) 04:59
tann_ wayland76: it *tries* to keep idiots from doing bad things...but that doesn't mean they can't do it
wayland76 Ah, yes, good point
I should've made that clearer :)
tann_ i've read ugly python code as well 05:00
wayland76 "FORTRAN programmers can write FORTRAN in any language", etc :)
tann_ it's much about the person who writes the code
sjohnson tann_: i take it you like Perl too a lot
tann_ sjohnson: it's handy 05:01
sjohnson: i'm not so religious about languages
i don't like some of perl6's stuff..but what do i know? timtoady is always god regardless :P 05:02
wayland76 What do you not like?
(I want to see if I also dislike them :) )
sjohnson well, God said that maybe he might consider $string[3] indexing for strings 05:03
tann_ wayland76: i think some of the builtin variables
sjohnson like in many languages
i think that'd be sweet
wayland76 tann_: You'd prefer to have fewer?
tann_ also, stuff like %h<key> vs %h{'key'} etc.
wayland76: yes 05:04
if possible
wayland76 tann_: But you can still use %h{'key'} if you want
tann_ wayland76: that's the thing i don't like
wayland76 The variables are still far from fixed (ie. in a state of flux)
tann_ it'll confuse the heck outta people
wayland76 Did you ever read the essay about Perl being a postmodern language? 05:05
tann_ yup
larry as always is way too smart :P
and look at people around him, pmichaud, damian etc.. all scarily smart folks
wayland76 The idea I'm thinking of here is something like "We put in everything and let people use the bits they want" 05:06
tann_ so i sit and learn...keep quiet :D
wayland76 I agree about the "smart" business
sjohnson you guys know a lot more Perl than i do :(
tann_ sjohnson: when it comes to p6, i know as much as you do
probably you know more than me :D 05:07
wayland76 I remember talking with someone recently who said something like "The #perl6 channel is strange; I don't usually feel like the dumbest person in the room" :)
tann_ probably because he was talking to me
sjohnson hahah 05:08
wayland76 tann_: No, I don't think it was you.
sjohnson you have a good sense of humour
wayland76 Oh, wait, I got your comment backwards :)
sorry :)
sjohnson is it too radical to say that people who are funny also tend to be able to program in Perl effectively?
wayland76 Why are the words "in Perl" in that sentence? :) 05:09
tann_ sjohnson: i don't claim either :P
05:09 ewilhelm joined
JimmyZ rakudo: for '0001.jpg' .. '0010.jpg' { .say } 05:09
p6eval rakudo e02bc0: OUTPUT«0001.jpg␤0002.jpg␤0003.jpg␤0004.jpg␤0005.jpg␤0006.jpg␤0007.jpg␤0008.jpg␤0009.jpg␤0010.jpg␤»
tann_ scary eh, jimmy? :) 05:10
sjohnson tann_ / wayland76: do you guys get to use Perl at work?
JimmyZ rakudo: for 'zhao_0001.jpg' .. 'zhao_0010.jpg' { .say }
p6eval rakudo e02bc0: OUTPUT«zhao_0001.jpg␤zhao_0002.jpg␤zhao_0003.jpg␤zhao_0004.jpg␤zhao_0005.jpg␤zhao_0006.jpg␤zhao_0007.jpg␤zhao_0008.jpg␤zhao_0009.jpg␤zhao_0010.jpg␤»
tann_ sjohnson: yes....100%
sjohnson tann_: 100%? 05:11
i get to use it like, 5%
but that 5% is bliss to me
tann_ sjohnson: our system, platform rely heavily on perl
sjohnson the other 95% is PHP and javascript and i hate it
tann_: you must have been a saint in a past life
wayland76 sjohnson: When I can 05:12
tann_ sjohnson: then i would be programming in html now
sjohnson you like HTML?
i hate it as much as I hate javascript
tann_ marginally
wayland76 xhtml2 looks all right, though :)
sjohnson my favourite thing is backend tasks in Perl
tann_ javascript? 05:13
jquery?
sjohnson jquery i have been told solves all my complaints
tann_ our backend and apps are mostly in c++, java etc...
sjohnson i dont know how easily it is to get Jquery setup where i work
tann_ front end is mostly php and yui :) 05:14
but platform and system work are almost all perl
uh oh..too many details..you probably guess which company i'm working for :D
sjohnson mhm 05:15
amazon?
let me keep guessing if i am wrong
tann_ notice the javascript lib for the front end ;)
JimmyZ rakudo: '3'.WHICH.perl.say 05:16
p6eval rakudo e02bc0: OUTPUT«"3"␤»
sjohnson JimmyZ: try this
ahh nevermind
you know what you're doing
JimmyZ sjohnson: yep 05:17
just want give it a try.
s/want/want to/
tann_ which new stuff in p6 you guys like? 05:19
sjohnson oh man
wayland76 tann_: Custom slangs :)
tann_ :) 05:20
sjohnson this says it all: use.perl.org/~masak/journal/39025
JimmyZ rakudo: '3'.PARROT.say
wayland76 Access to syntax tree
p6eval rakudo e02bc0: OUTPUT«Str␤»
JimmyZ rakudo: '3'.WHAT.say
tann_ i like the multi sub/method lots
05:20 missingthepoint joined
p6eval rakudo e02bc0: OUTPUT«Str()␤» 05:20
missingthepoint rakudo: class A { method b { say 'b' } }; my $a = A.new; $a.b () 05:21
p6eval rakudo e02bc0: OUTPUT«Statement not terminated properly at line 2, near "()"␤in Main (src/gen_setting.pm:3363)␤»
missingthepoint rakudo: class A { method b { say 'b' } }; my $a = A.new; $a.b()
p6eval rakudo e02bc0: OUTPUT«b␤»
wayland76 tann_: Note that that article about sjohnson was actually written by masak :) 05:22
tann_ i'm not fond of that *unspace* thingy
05:23 synth joined
tann_ i know lots of programmers like to put a space after an identifier name 05:23
now they have to retrain their habit
wayland76 Well, I never put space after "if" and "while". Now I have to retrain :) 05:24
tann_ urg
i thought perlstyle recommended that
space between a control keywords and openning paren
wayland76 possibly 05:25
tann_ but not for methods and subs
wayland76 But when perlstyle said "spaces instead of tabs", then I basically ignored it :)
tann_ damian also said so in his perl best practices book
wayland76: why?
wayland76 I don't mind if people want their tabs to be 4 spaces wide, but I think they should use actual tabs instead of spaces 05:26
tann_ i'm also an advocate of spaces over tabs
well, i like to see code indented properly
wayland76 I agree about that
I can live with spaces on other people's projects, but unindented code is just evil :)
tann_ some editors don't interpret tabs right 05:27
wayland76 So fix the editors :)
tann_ i always have ts=8 sts=4 sw=4 et in my vimrc
wayland76 (incidentally, which editors?)
tann_ padre? :)) 05:28
05:28 justatheory left
tann_ 'cause i can't install that darn thing on my mac :D 05:28
wayland76 Well, I know both nano and vi seem to work sensibly with tabs 05:29
05:29 kane_ joined
wayland76 and I'm sure emacs would handle them appropriately with sufficient e-lisp :) 05:29
I guess I like tabls because they let each programmer choose how they want to see the code :) 05:30
So if I like more indentation, I can get more, and others can get less if they like that better :)
tann_ why a unfavorable view about spaces? makes your files larger? :D
wayland76: understood 05:31
ruby guys even have 2 spaces of indentation :D
and i know graham barr also did that at one point....having the pleasure of browsing his code lots :) 05:32
wayland76 So you're starting to see my point (even if it's not enough to convice you to switch :) )
sjohnson tann_: can i haz an example?
i'm not sure i know what you mean
tann_ wayland76: naw, not switching...tim bunce already got me hooked with spaces and stuff :D
05:32 lumi left
tann_ sjohnson: you can view graham's code on cpan 05:33
wayland76 sjohnson: an example of code with tabs, or spaces? :)
tann_ though i had the pleasure of browsing his code when i worked with both him and tim at a certain company :)
sjohnson spaces 05:35
tann_ i've learned much about programming just by browsing those two geniuses' code
sjohnson who's Graham?
wayland76 tann_: I know what you mean. I learned a lot about regex in the early days just by reading the FAQ whose answer was s/^\s*(.*?)\s*$/$1/ 05:36
tann_ sjohnson: graham wrote most of the perl core modules
wayland76 Graham Barr wrote a bunch of the more important modules on CPAN
tann_ sjohnson: here's an example of spaces :) cpansearch.perl.org/src/TNGUYEN/Loc.../Format.pm
05:37 lumi joined
missingthepoint newbie question: what's the current eqv of "use lib" in Perl 6? 05:37
wayland76 I don't recall, but setting PERL6LIB works 05:39
(environment variable, that is)
tann_ missingthepoint: BEGIN { @*INC.push: 'lib' }
or @*INC.unshift: 'lib' whichever is fine with you 05:40
missingthepoint thanks both of you :)
tann_ i prefer push as it makes lib lower precedence
missingthepoint ah, that makes sense 05:41
wayland76 tann_: Both need to be in a BEGIN {} though, right? 05:43
tann_ wayland76: yes
sjohnson alright dudes 05:44
i've had enough PHP tasks, i am gonna take off
see ya guys
tann_ take it easy
wayland76 o/
tann_ has anyone attempted to hook std.pm into rakudo? :)
05:45 iblechbot joined
tann_ i like to take a look at some adverbial stuff such as :by but rakudo parser doesn't handle it yet 05:45
wayland76 pmichaud says it won't go until we've done at least the LTM milestone from the ROADMAP 05:48
Now you know why I keep asking about it :) 05:49
tann_ where can i find the roadmap?
JimmyZ LTM was longest token matching? 05:50
tann_ rakudo.org should be sexier... it seems that there's only moritz updating it and he's already doing a superb job of wearing many hats 05:51
this warms my heart wiki.github.com/rakudo/rakudo/rakud...ment-draft 05:53
JimmyZ github.com/rakudo/rakudo/blob/e02bc...cs/ROADMAP
eternaleye rakudo: '3'.^methods>>.name.grep(/^p/).join(', ').say # Why's everyone been using map for this?
p6eval rakudo e02bc0: OUTPUT«pred, perl, pick, polar, p5chop, p5chomp, pairs, print, perl␤»
JimmyZ or see github.com/rakudo/rakudo/tree/maste...cs/ROADMAP 05:55
tann_ rakudo: say "".^methods>>.name.perl
p6eval rakudo e02bc0: OUTPUT«["pred", "encode", "succ", "ACCEPTS", "perl", "WHICH", "sprintf", "Scalar", "flip", "int", "does", "split", "match", "words", "srand", "reverse", "isa", "polar", "ucfirst", "comb", "fmt", "first", "trans", "chop", "rindex", "values", "subst", "elems", "chomp", "index", "keys",
.."chr…
JimmyZ rakudo: say "".^methods(.name).perl 05:56
p6eval rakudo e02bc0: OUTPUT«Method 'name' not found for invocant of class 'Failure'␤»
JimmyZ rakudo: say "".^methods(>>.name).perl 05:57
p6eval rakudo e02bc0: OUTPUT«Statement not terminated properly at line 2, near "(>>.name)."␤in Main (src/gen_setting.pm:3363)␤»
tann_ so from the roadmap, it looks like rakudo 1.0 won't have threads 05:59
JimmyZ rakudo: ("f","oo","bar").>>.chars.say; 06:00
p6eval rakudo e02bc0: OUTPUT«Statement not terminated properly at line 2, near ".>>.chars."␤in Main (src/gen_setting.pm:3363)␤»
06:00 meppl joined
JimmyZ rakudo: ("f","oo","bar")>>.chars.say; 06:01
p6eval rakudo e02bc0: OUTPUT«123␤»
JimmyZ is it a bug? 06:02
rakudo: ("f","oo","bar",'da',6)>>.chars.say; 06:03
p6eval rakudo e02bc0: OUTPUT«12321␤»
JimmyZ rakudo: ("f","oo","bar",'da',6)>>.name.say; 06:04
p6eval rakudo e02bc0: OUTPUT«Method 'name' not found for invocant of class 'Str'␤»
06:05 jhelwig left
wayland76 Yes, LTM = Longest Token Matching 06:06
JimmyZ rakudo: say "".^methods.name.perl
p6eval rakudo e02bc0: OUTPUT«Method 'name' not found for invocant of class 'Perl6Array'␤»
wayland76 pmichaud has been talking about having it mostly done by the end of the summer (I'm guessing this is the end of August, or maybe even September, in his part of the world)
I'm predicting next February, just to be difficult :) but since pmichaud is the one working on it, I'm hoping he's right :) 06:07
JimmyZ rakudo: ("f","oo","bar",'da',6).>>.name.say;
p6eval rakudo e02bc0: OUTPUT«Statement not terminated properly at line 2, near ".>>.name.s"␤in Main (src/gen_setting.pm:3363)␤»
eternaleye rakudo: ("f","oo","bar",'da',6)>>(.^methods>>.name).say 06:08
p6eval rakudo e02bc0: OUTPUT«foobarda6␤»
eternaleye rakudo: ("f","oo","bar",'da',6)>>.^methods>>.name.say
p6eval rakudo e02bc0: OUTPUT«Method 'name' not found for invocant of class 'Perl6Array'␤»
JimmyZ rakudo: ("f","oo","bar",'da',6).>>.chars.say;
p6eval rakudo e02bc0: OUTPUT«Statement not terminated properly at line 2, near ".>>.chars."␤in Main (src/gen_setting.pm:3363)␤»
JimmyZ It's from S03
eternaleye rakudo: ("f","oo","bar",'da',6)>>.^methods>>>>.name.say
p6eval rakudo e02bc0: OUTPUT«Statement not terminated properly at line 2, near ">>>>.name."␤in Main (src/gen_setting.pm:3363)␤»
JimmyZ maybe it is not implemented 06:09
tann_ JimmyZ: which? 06:10
JimmyZ rakudo: ("f","oo","bar",'da',6).>>.chars.say;
eternaleye rakudo: ("f","oo","bar",'da',6)>>.chars.say;
p6eval rakudo e02bc0: OUTPUT«Statement not terminated properly at line 2, near ".>>.chars."␤in Main (src/gen_setting.pm:3363)␤»
rakudo e02bc0: OUTPUT«12321␤»
eternaleye JimmyZ: You have an extra dot
tann_ no dot before .>>
JimmyZ I copy it from S03
tann_ the syntax is [list] >> something
JimmyZ not an extra dot
("f","oo","bar").>>.chars; # (1,2,3) 06:11
eternaleye JimmyZ: compare your code to the one I used. There should not be a '.' between ) and >>
JimmyZ: Then it's a bug in the spec
JimmyZ @positions.»++; # Same thing, dot form
lambdabot Unknown command, try @list
JimmyZ @positions».++; # Same thing, dot form
lambdabot Unknown command, try @list
tann_ how to type these things »+« with a us keyboard? :)
eternaleye Thank you for finding that, in that case 06:12
tann_: Define a compose key, or use the 'Texas' variants
JimmyZ it is a bug in rakudo ,not spec
eternaleye JimmyZ: If the sepc says ("f","oo","bar").>>.chars then it's wrong. The first dot should not be there. 06:13
*spec
JimmyZ and @positions.»++; ?
It is wrong too ?
tann_ that's confusing..why timtoady allows both with and without the dot?
JimmyZ and @objects.».run(); ?? 06:14
eternaleye Ditto. >> is not a method, it's an infix operator that takes anything that does Positional on the left and Callable on the right
At least, that's what I've been told
tann_ one would think the dot implies a reassignment
JimmyZ Were all that in spec a bug ? 06:15
eternaleye tann_: No, assigning the result of a method call back to the object is .=
tann_ spec is supposed the bible
i'd say rakudo's bug
JimmyZ shoulde we ask lwall :(
eternaleye @foo.=map(*.uc) changes everything in @foo to uppercase in place
lambdabot Unknown command, try @list
tann_ eternaleye: yea..i was confused for a sec there 06:16
eternaleye tann_: There's a category in RT (the bugtracker) for the spec
It has seen use.
Also, the spec is still changing
Implementations provide info on what's feasible and what's desirable, and the spec changes in response 06:17
Just run 'svn log <filename>' on the spec docs in the pugs repo, and see the huge number of changes made, including recent ones 06:18
JimmyZ I don't think it is a spec bug
anyway
eternaleye JimmyZ: Quite possible, my understanding isn't perfect
JimmyZ: TimToady, pmichaud, and jnthn are really the people who would know best 06:19
JimmyZ yes
06:23 adm joined 06:25 mberends_ joined 06:28 mberends left 06:29 mberends_ is now known as mberends 06:33 meppl left 06:36 iblechbot left 06:40 mberends_ joined, mberends_ left
missingthepoint rakudo: say 10.^methods 06:42
p6eval rakudo e02bc0:
..OUTPUT«succperlACCEPTSWHICHScalarabsStrpredp5choplcjoincharscanlcfirstrootsreduceComplextrimmap:dcis:e:flogminrandmaxtruncatebytessortsqrtIntgrepabsenducceilingp5chompunpolarsamecasefloorsubstrordroundflipdoesintsplitmatchwordssrandreverseisapolarucfirstcombfmttransfirstchoprindexvaluessu…
missingthepoint oh dear 06:43
PerlJam eternaleye: postfix ops can have an intervening dot as per the spec. >> is a "postfix prefix" meta-op (not an infix). (i.e. >> doesn't stand by itself) At least that's how I understand things.
06:44 hah joined
missingthepoint rakudo: my %h = map($_ => 1, ''.^methods, 10.^methods); say %h.perl; 06:45
06:45 JimmyZ left
p6eval rakudo e02bc0: OUTPUT«No applicable candidates found to dispatch to for 'map'␤in Main (/tmp/g7egt1eW1v:2)␤» 06:45
06:46 JimmyZ joined
PerlJam missingthepoint: what are you trying to do with that hash? 06:46
missingthepoint PerlJam: not sure, experimenting... 06:47
rakudo: my %h = map { $_ => 1 }, 1..4; say $h.perl 06:48
JimmyZ like: .++ ?
p6eval rakudo e02bc0: OUTPUT«Symbol '$h' not predeclared in <anonymous> (/tmp/27eQGG0KRs:2)␤in Main (src/gen_setting.pm:3363)␤»
missingthepoint gah
rakudo: my %h = map { $_ => 1 }, 1..4; say %h.perl
p6eval rakudo e02bc0: OUTPUT«Use of uninitialized value␤No applicable candidates found to dispatch to for 'map'␤in Main (/tmp/tQ2pXIiicj:2)␤»
missingthepoint i have map woes.
JimmyZ PerlJam: like: .++ ?
PerlJam JimmyZ: yep.
missingthepoint: your map's block looks like a hash, so perl probably thinks it is one. 06:49
JimmyZ that it, the test case should be ignore some cases.
missingthepoint rakudo: my %h = map($_ => 1, 1..4); say %h.perl; 06:50
p6eval rakudo e02bc0: OUTPUT«No applicable candidates found to dispatch to for 'map'␤in Main (/tmp/HdHwyaUBLF:2)␤»
PerlJam oh. Hrm. 06:52
Maybe something more fundamental with map
eternaleye rakudo: my %h = map {; $_ => 1 }, 1..4; say %h.perl
p6eval rakudo e02bc0: OUTPUT«{"1" => 1, "2" => 1, "3" => 1, "4" => 1}␤»
JimmyZ t/spec/S03-operators/hyper.t loses some cases.
rakudo: $_ = 1; .++.say; 06:53
p6eval rakudo e02bc0: OUTPUT«Syntax error at line 2, near ".++.say;"␤in Main (src/gen_setting.pm:3363)␤»
PerlJam rakudo: my @a = map(2 * $_, 1..4); say @a.perl;
p6eval rakudo e02bc0: OUTPUT«Use of uninitialized value␤No applicable candidates found to dispatch to for 'map'␤in Main (/tmp/AtfADUWrle:2)␤»
PerlJam rakudo probably doesn't grok postfix forms with an intervening dot. 06:55
eternaleye PerlJam: the first argumentto map needs to 'does Callable' - your 2 * $_ expression is being evaluated, and the _result_ passed to map
JimmyZ PerlJam: yep.
eternaleye rakudo: my @a = map(2 * *, 1..4); say @a.perl;
p6eval rakudo e02bc0: OUTPUT«[2, 4, 6, 8]␤»
eternaleye rakudo: my @a = map({2 * $_ }, 1..4); say @a.perl;
p6eval rakudo e02bc0: OUTPUT«[2, 4, 6, 8]␤» 06:56
PerlJam aye. I'm not thinking too clearly at this hour
missingthepoint PerlJam: what's your localtime? :)
PerlJam almost 2am
tann_ rakudo: my @a = (1..4).map: { 2 * $_ }; say @a.perl; 06:57
p6eval rakudo e02bc0: OUTPUT«[2, 4, 6, 8]␤»
tann_ rakudo: my @a = (1..4) >>*<< 2; say @a.perl; 06:58
p6eval rakudo e02bc0: OUTPUT«Non-dwimmy hyperoperator cannot be used on arrays of different sizes or dimensions.␤in Main (/tmp/AD0CwxwKVQ:2)␤»
tann_ rakudo: my @a = (1..4) >>* 2; say @a.perl; 06:59
p6eval rakudo e02bc0: OUTPUT«Statement not terminated properly at line 2, near ">>* 2; say"␤in Main (src/gen_setting.pm:3363)␤»
JimmyZ ah, too much way ;(
rakudo: my @a = (1..4).map({ 2 * * }); say @a.perl; 07:00
p6eval rakudo e02bc0: OUTPUT«[{ ... }, { ... }, { ... }, { ... }]␤»
JimmyZ rakudo: my @a = (1..4).map({ 2 * $_ }); say @a.perl;
p6eval rakudo e02bc0: OUTPUT«[2, 4, 6, 8]␤»
JimmyZ rakudo: my @a = (1..4).map({ 2 * * }); say @a.join(' ').perl; 07:01
p6eval rakudo e02bc0: OUTPUT«"!whatever_closure !whatever_closure !whatever_closure !whatever_closure"␤»
tann_ rakudo: my @a = (1..4) >>*>> 2; say @a.perl;
p6eval rakudo e02bc0: OUTPUT«[2, 4, 6, 8]␤»