»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
sorear good * #perl6 00:51
colomon \o 00:56
sorear ruoso: hi! 01:01
sorear colomon: hi 01:21
colomon sorear: I've just managed to update a bunch of stuff on my MBP, wonder if I'll be able to get an up-to-date Mono as well? :) 01:25
Tene prods jnthn 06:29
sorear colomon: I'm running an up-to-date Mono on a MBP which is between 5 and 10 years old (it's hard to accurately date frankenputers...) 06:30
moritz_ good morning 07:02
sorear++ # nicza v3
moritz_ niecza: sub f($x) { say $x}; f :x<foo> 09:13
p6eval niecza v3-28-ge477540: OUTPUT«Unhandled exception: No value for parameter $x in MAIN f␤ at /tmp/k2on_rHLrm line 0 (MAIN f @ 0)␤ at /tmp/k2on_rHLrm line 1 (MAIN mainline @ 1)␤ at /home/p6eval/niecza/lib/SAFE.setting line 1185 (SAFE C489_ANON @ 2)␤ at /home/p6eval/niecza/lib/SAFE.setting line
..1186 (SAFE modul…
donri Can you use HLLCompiler via Rakudo? 09:35
rather than nqp
dalek ast: 324876d | moritz++ | S (7 files):
fudge and simplify some test files for Niecza
ecza: 8b59a93 | moritz++ | t/spectest.data:
7 more passing spectest files
cpk sorear: hi ! i have downloaded th v3 of niecza buit the executable fails when i try to run it 09:56
sorear: my system is win7 x64 with .net 4 extended installed 09:57
moritz_ cpk: it's likely that I can't help you, but you should state at least *how* it fails
cpk the error message is Unhandled exception: System.BadImageFormatException: Could not load file or assembly 'Kernel, Version = 0.0.0.0, Culture = neutral, PublicKeyToken = null' or one of its dependencies. This asse mblys was built by a runtime newer than the currently loaded runtime and can not be loaded. Filename: 'Kernel, Version = 0.0.0.0, Culture = neutral, PublicKeyToken = null' to MAIN.Main (String []) 09:58
dalek ast: c95cb9a | moritz++ | S (4 files):
more fudgign for niecza
ecza: 8f168dd | moritz++ | t/spectest.data:
three more passing test files
09:59
cpk moritz_: i think it is related to my version of .net but i'm not really sure 10:00
moritz_ cpk: same here. I also had to install a newer version of mono to get niecza running again
cpk moritz_: what about windows .net ? 10:01
moritz_: do you think there is a newer version ?
moritz_ irclog.perlgeek.de/perl6/2011-02-28#i_3342984
I'd expect .net 4 to implement the NET_4_0 profile, but since I don't use it, that's just speculation 10:02
cpk moritz_: i have .net 4.0 full and client installed ( version info => C:\Windows\Microsoft.NET\Framework64\v4.0.30319 ) 10:06
cpk moritz_: i just wanted to get a try with niecza, so this issue is not very important for me but I thought I could share it there 10:10
moritz_ cpk: I'm sure sorear will appreciate it (I do, but I can't help you :/)
it's just not his usual uptime at the moment (different timezone) 10:11
dalek kudo: e0bfb29 | moritz++ | / (4 files):
[build] git_describe is enough, no need for a separate version specification.

Also made some error messages nicer
kudo: 4138622 | moritz++ | Configure.pl:
explicitly chose generational GC

Parrot folks say that it will probably not be the default for the next release, so there is no harm in selecting it explicitly.
  tadzik++ for the idea
moritz_ cpk: meanwhile you can try niecza via the bots here:
niecza: say 'abc'.uc x 2
p6eval niecza v3-28-ge477540: OUTPUT«ABCABC␤»
cpk moritz_: awesome ! 10:12
moritz_: but it will be a mess if I make lots of tests here 10:14
moritz_: thx for your answers, bye 10:15
moritz_ cpk: you can /msg the bot too
cpk: have the appropriate amount of fun :-)
dalek tpfwiki: (Bill Klobas)++ | www.perlfoundation.org/perl6/index....est_weblog 10:33
moritz_ seems that the tpf wiki is being spammed increasingly (I haven't checked if this particular change was spam, but some certainly were) 10:40
flussence_ if there's an easy way to undo spam on the wiki without clogging up the revision history further, I wouldn't mind doing it 11:10
daxim revert to a revision does not increase the revision counter, is that what you mean? 11:29
flussence_ yeah, just so the log isn't full of (spam, undo) xx 1000 11:49
colomon wow, my p6 code to generate graphs for the benchmarks is excruciatingly slow when fed all 120 timings. :( 12:22
moritz_ colomon: you can do a meta-benchmark: benchmarking how long the benchmark graphing takes :-) 12:37
colomon huh. the graph script is apparently still running, but it doesn't seem to have written out any new SVG graphs in the last 27 minutes. So it got six done in the first minute, and now it's just sitting there. :\
moritz_ disk full? RAM full? 12:40
colomon for sure not disk full. 12:40
and the machine seems to be working well enough otherwise, so I doubt RAM full. 12:41
I've just added some "say"s and restarted
looks like it's hanging in SVG::Plot... 12:42
and woof, using up 97% of my CPU
moritz_ colomon: if you push all that data + code into a repo, I can investigate tonight (ie in about 6 hours) 12:43
colomon github.com/colomon/Benchmark-Plot 12:44
that's without my debugging "say"s. results.txt is the full benchmark results file to be fed to bin/graph-bench.pl 12:45
moritz_ so $ perl6 bin/graph-bench.pl < results.txt ? 12:48
colomon that's exactly it
or even just $ perl6 bin/graph-bench.pl results.txt 12:49
moritz_ it seems to leak memory at an astonishingly low pace :-)
maybe it doesn't even leak, but simply uses it
colomon what's @ARGV in p6? 12:53
moritz_ @*ARGS
colomon figured it out myself on the third try. :) moritz_++
moritz_ but before you use it, ask yourself if MAIN isn't better suited
colomon it's a three-line script, I think it will do.
(and the third line is just a closing brace) 12:54
moritz_ :-)
colomon ah, frak, I hosed inkscape during the great macports upgrade yesterday.
moritz_ I just did a say @data.perl before the call to .plot 12:56
there's no visible difference in the data, compared to the previous calls
8 pairs, with the same keys as before
colomon moritz_++ # I just assumed that was so, looking at the results.txt file. 12:57
duh. I should try grepping just that data and see if it still fails. 12:58
(now running.....)
still running...
takadonet morning all 13:00
colomon \o
still running...
moritz_ I'm almost certain that we'll discover a rakudobug in the process :/ 13:01
colomon oooo, that's good! :)
yeah, it's that one specific set of data that's doing it. 13:02
colomon considers that odds are pretty good it's his own rakudobug. :|
moritz_ the code in which it hangs contains for-loops, gather/take and fun... but not while-loops or other things that would usually hang
oh wait, I've missed two method calls 13:03
colomon afk # might as well go feed A's cats and take a walk while inkscape is re-installing. 13:06
moritz_ colomon: found the error... 13:13
colomon: SVG::Plot uses min and max, and then calculates max - min
colomon: and assumes that the result is >= 0
colomon: which it is, but not if the pass in "105" instead of 105
so it uses lexicographic ordering 13:14
and produces a negative difference
the step width for the y axis is then calculated as $difference.log10.floor => NaN
now we can discuss if it's a bug to pass in numbers as strings, or if SVG::Plot should be more paranoid 13:16
JimmyZ So CPU is so stupid 13:19
moritz_ hm? 13:20
colomon: :values([@data>>.value>>.Rat]) fixes things
colomon what about :values([@data>>.value>>.Numeric]) ? 13:22
moritz_ should work too
colomon (cat-feeding temp. delayed due to a dirty diaper.)
moritz_ though SVG::Plot often works better with Rats
in particular if you feed it Nums, it sometimes anchors the y scale at 1.2e-107 instead of 0, or so :-) 13:23
colomon if it's a decimal number, it should be a Rat anyway. :)
rakudo: say "74.2868108".Numeric.WHAT
p6eval rakudo 413862: OUTPUT«Num()␤»
colomon doh! 13:24
moritz_ still the old bug
colomon sigh.
moritz_ (which was marked in RT as "LHF", btw :-)
colomon okay, .Rat it is.
colomon still reinstalling inkscape... 13:30
moritz_ with this change, the script completes
colomon wishes wordpress would let him directly upload SVG files
moritz_++ 13:31
moritz_ ... in less than 2 minutes. Not fast, but not crawling either 13:34
moritz_ rakudo: say pir::null() 14:02
p6eval rakudo 413862: OUTPUT«error:imcc:syntax error, unexpected '\n'␤ in file 'EVAL_11' line 50532630␤===SORRY!===␤syntax error ... somewhere␤»
moritz_ rakudo: say pir::null__p()
p6eval rakudo 413862: OUTPUT«Null PMC access in type()␤ in main program body at line 22:/tmp/I_jhBd9h9G␤»
masak greetings, zebras 14:06
phenny masak: 03 Mar 22:41Z <colomon> tell masak My timings runs using your data-generation script are showing very significant differences from one test run to another. For 80, for instance, I've gotten average (N, Y) runs of (10.8, 14.2), (9.4, 10.8), and (9.6, 11.4). Maybe difference has to do with different random strings?
masak maybe.
statistics is no simple matter. 14:07
masak let's let this simmer until it looks consistent/satisfactory. 14:07
cono karma cono 14:07
aloha cono has karma of 0.
masak drive-by karma? 14:08
moritz_ isn't it obvious? run the benchmark 100 times, and then plot mean and standard deviation :-) 14:10
moritz_ should really add error bars to SVG::Plot
masak yes, I think I should do something very much like that. 14:11
I think I'll need to do a blog post, though, to allay the worries of my (nonexistent) reader base. 14:12
moritz_ nonexistent? that would be a real surprise 14:12
masak moritz_: I could probably do a quick hack on SVG::Plot to add error bars.
moritz_ ... or use whatever you used to generate the last plot with error bars :-) 14:13
tadzik howdy 14:23
masak tadzik: \o 14:24
moritz_: I... I need to remind myself what that was :)
tadzik the weather question? You looked confused :) 14:25
oh nvm :)
moritz_ masak: I just pushed a hacky, untested and undocumented support for error bars in SVG::Plot 14:27
masak \o/
the program was Gnumeric, btw. I just checked.
moritz_ if it actually works, you can really impressed :-)
masak :) 14:33
sorear good * #perl6 15:34
moritz_ hello sorear 15:35
masak sorear: \o
sorear hrm, cpk is already out. 15:37
moritz_ is there a solution, besides upgrading .NET? or would you expect it to work with 4.0? 15:38
masak --> airport 15:40
sorear moritz_: I think the solution is to use Mono 2.6.7 to prepare the releases, rather than a Feb11 master build 16:00
jnthn -> airport 16:04
sorear tries to find his Novell bugzilla credentials 16:15
donri can't seem to find a list of rules included with pge 16:28
e.g. what is <ww>
plobsing wrong window? 16:29
moritz_ "within word" 16:37
moritz_ a zero-width assertion that's true if left and right character are both word characters 16:38
donri moritz_: is there a list? 16:42
moritz_ donri: in the source :-) 16:43
donri: S05 has a list, but it's probably not identical to what PGE/NQP-rx implement
pmurias sorear: hillu_ 16:50
sorear: hi
sorear pmurias: Hi 16:51
pmurias sorear: re problem with the pseudo-inliner is that the SAFE module name is only used with -CSAFE 16:53
pmurias sorear: is there a way we can avoid the hardcoding of the unit name in the inliner? 16:54
sorear Why are you renaming it? 16:55
The reliance on having a module named SAFE goes *much* deeper than just the inliner 16:57
pmurias i'm not renaming it
sorear For instance, the only class that is allowed to have no parents is SAFE::Mu
pmurias just running it with mono Niecza.exe -Bclisp SAFE.setting
pmurias the xrefs get a MAIN unit in that case 16:58
pmurias sorear: and what happens when the user defines a SAFE module? 16:58
moritz_ pmurias: then you can tell him "all-uppercase names are reserved for internal use, smartass" 17:02
ok, you can leave out that last word :-)
pmurias moritz_: hardcoding stuff based on names seems very inelegant to me 17:05
moritz_ it is, but that's a different matter 17:06
pmurias not fully 17:08
reserving stuff for internal use is part of the inelegantness
if the user wanted to have an alternative setting it would conflict with all the name based harcoding
sorear it's easy to have an alternative setting 17:11
sorear you don't get to make it the root setting - it has to be based on SAFE 17:11
but I don't see how this is fundamentally worse than the fact that you can't have user-defined classes with no parents
sorear (I just figured out a better way to handle --safe that doesn't leak over quite so much of the core; SAFE.setting will probably not exist tomorrow) 17:12
sorear moritz_: btw - bugzilla.novell.com/show_bug.cgi?id=677057 17:16
sorear pmurias: what are you trying to accomplish by using mono Niecza.exe -Bclisp SAFE.setting? 17:18
sorear niecza has two basic modes of operation when parsing code from a file - either it's compiling a complete program, or it's precompiling a module 17:20
sorear -C is needed to select the second mode, because there doesn't seem to be a good way to autodetect it 17:21
main programs are allowed to start with class Foo;
sorear (theoretically, niecza could look at the end, see {YOU_ARE_HERE}, and know it's dealing with a module. But 1. this doesn't work for arbitrary modules and 2. it violates the prohibition against N>1-pass parsing) 17:22
moritz_ sorear: sometimes when I run niecza I get the "[precompiling setting]" message... couldn't that be done as part of the build process? 17:23
I kinda feel that would be "righter"
sorear moritz_: it's done once as part of the build process, but it has to be redone if niecza thinks the setting has changed
the current check for "changed" is "different full path or different modification time" 17:24
pmurias sorear: i'm trying to make sure SAFE runs and then i'll work on making other code run it
sorear: we could expose the way to make a parent-less class 17:25
sorear I guess it would be better to make the psuedo-inliner, etc use a cheat more like Rakudo's SETTING_MODE 17:37
except because niecza allows non-root settings, it would be more of a ROOT_MODE thing 17:38
pmurias what does the SETTING_MODE do? 17:39
flussence rakudo: say ('abc' ~~ /(a)(b)/).perl 17:53
p6eval rakudo 413862: OUTPUT«Match.new(␤ from => 0,␤ orig => "abc",␤ to => 2,␤ positional => [␤ Match.new(␤ from => 0,␤ orig => "abc",␤ to => 1,␤ ),␤ Match.new(␤ from => 1,␤ orig => "abc",␤ to => 2,␤ ),␤ ],␤)␤»
flussence rakudo: say ('abc' ~~ /(a)(b)/)[0].perl
p6eval rakudo 413862: OUTPUT«Match.new(␤ from => 0,␤ orig => "abc",␤ to => 1,␤)␤»
moritz_ rakudo: say ('abc' ~~ /(a)(b)/).pretty 17:56
p6eval rakudo 413862: OUTPUT«=> <ab>␤ 0 => <a>␤ 1 => <b>␤␤»
moritz_ not so pretty with \n -> ␤ translation on, but IMHO better than .perl 17:57
flussence that's the *second* time I've forgot about that in a week! 17:59
TimToady is home finally, but disk drive on the laptop went haywire again, so talking from an ancient suse partition that came on the laptop originally...bleah... 18:07
phenny TimToady: 02 Mar 16:57Z <sorear> tell TimToady pmurias and I disagree on what sub infix:<=>($,$a) { say $a }; constant foo = 5; # should do
sorear welcome home TimToady 18:08
TimToady without looking at the discussion, I'll say that assignment to a declarator is only pseudo-assignment; the declarator is allowed to turn it into any operation it likes
TimToady note for instance that assignment to a 'has' doesn't even have a valid invocant when "executed" 18:13
so I doubt assignment to a constant looks at infix:<=> at all 18:14
colomon cannot believe that Inkscape is still installing on his MBP. I saw full builds of Python 2.7 (I think) and GCC 4.4 scroll by already.... 18:17
PerlJam TimToady: that makes assignment sort of thunky when it's used in an initialization context. 18:19
TimToady it makes the assignment pseudo :) 18:21
PerlJam the whole "= is assignment, except when it's not" idea makes me want some sort of marker to let me know that something special is going on. 18:22
TimToady yeah, except it also wants to be huffmanly short
PerlJam indeed 18:23
TimToady so I think it's a pain point we have to live with, until we get Unicode keyboards
sorear sometimes even when it is, it's not
flussence colomon: Inkscape uses Boost heavily, and from what I understand 9/10 of that is C++ templates that have to be recompiled for each downstream using it...
moritz_ Boost is known to cause horrible compile times 18:24
sorear ($foo) = (1, 2) and $foo = (1, 2) do different stuff for '='
colomon flussence: yup, boost went by there too....
moritz_ sorear: yes, but both are assignment
TimToady maybe real assignment is named infix:<← >
sorear TimToady has talked about = being a context-sensitive macro, but I haven't fully grokked how »=« works in that model 18:25
PerlJam TimToady: I now think you can read minds since I was thinking of something very similar (ascii version <-) 18:26
TimToady and list assignment is infix:<↞>
or ⇇
but I shouldn't design when I'm jetlagged... 18:27
PerlJam S, S-plus, R, and I'm sure lots of other languages use <- for assignment 18:28
flussence intercal
sorear fortran?
TimToady well, Algol orginally
sorear given that = has so many different contextual meanings, I wonder if &infix:<=> is meaningful 18:29
and =-derived metaoperators ([=], »=«, ...) 18:30
PerlJam sorear: it is when you want simple assignment :)
TimToady and I shouldn't backlag when jetlogged either... 18:37
Tene phenny: ask jnthn if he's had time to look at gist.github.com/838498 yet 19:04
phenny Tene: I'll pass that on when jnthn is around.
TimToady sorear: it might be possible to require functions with rw args to be predeclared, and only allow postdeclaration on non-mutators, if we have to do that for optimizations 19:52
rdesfo does any know how to fix this issue 19:53
perl6: error while loading shared libraries: libparrot.so.3.0.0:
p6eval rakudo 413862: OUTPUT«===SORRY!===␤Confused at line 22, near "error whil"␤»
..pugs: OUTPUT«*** ␤ Unexpected "3"␤ expecting ".", "\187", ">>", "=", "^", operator name, qualified identifier, variable name, "...", "--", "++", "i", array subscript, hash subscript or code subscript␤ at /tmp/L5DfSpvtpr line 1, column 52␤»
..niecza v3-32-g79b33ad: OUTPUT«===SORRY!===␤␤Unsupported form of term:name at /tmp/qygqgDOYnL line 1:␤------> error while loading shared libraries⏏: libparrot.so.3.0.0:␤␤Invocant handling is NYI at /tmp/qygqgDOYnL line 1:␤------> e loading shared
..libraries: libparrot.so…
sorear rdesfo: install parrot correctly? 19:54
rdesfo I believe so. I'm running arch linux so Parrot was installed by running 'pacman -S parrot' 19:56
diakopter TimToady: that'd be great - where would the purity detector go .. in STD? 19:57
sorear rdesfo: what was the next line of the error? 19:58
rdesfo: how did you build Rakudo?
diakopter would love a definition of pseudo-assignment 19:58
bah; too many netsplits.
sorear rdesfo: did you try to move the perl6 executable after the build? 19:59
rdesfo I moved it to /usr/local/perl6 20:02
sorear: sorry I moved it to /usr/local/rakudo 20:03
sorear that's your problem. 20:04
when you build Rakudo with --gen-parrot, it contains a hard-coded path to ../parrot_install/lib/libparrot.so.3.0.0 20:05
even if you hadn't, it would still contain the path to ../dynext/perl6_ops.so
rdesfo sorear: I didn't move parrot though 20:06
sorear how did you build Rakudo?
rdesfo downloaded tar.gz then ran perl 'Configure.pl --gen-parrot' ,   'make',   'make install' 20:07
sorear rdesfo: when you use --gen-parrot, Rakudo doesn't use the system parrot
it uses a parrot which is now in /usr/local/rakudo/parrot_install/ 20:08
and was somewhere else
rdesfo I'll try to reinstall and see where it gets me
sorear: thanks for the help 20:09
dalek ecza: dafccd8 | sorear++ | / (9 files):
Kill SAFE/CORE division; use is unsafe to implement safe mode
20:39
TimToady sorear: re YOU_ARE_HERE detection, that's why I was using a .setting extension to prevent mixups between modules and settings 20:45
in fact, the .syml names were set up to make it impossible to use a setting's .syml as a module
dalek ar: 18d84c8 | Util++ | README:
Fix wiki URL in README
21:32
donri are the names of some PGE rules significant to PCT? 21:59
e.g. I don't see <ws> used much in grammars but it seems to have an effect anyway?
moritz_ donri: read up on :sigspace and the difference between token and rule 22:06
donri: it will answer your question
donri ah thanks 22:07
is that a synops?
moritz_ it's in S05
patrickas and we're back 22:20
phenny patrickas: 23 Feb 10:22Z <moritz_> tell patrickas about rt.perl.org/rt3/Ticket/Display.html?id=71366 -- want to hack on MAIN again? :-)
moritz_ \o/ 22:21
patrickas o/
moritz_: I actually had a patch for it somewhere, but I have been unable to test anythign with rakudo lately
I am having the same problem as JimmyZ : "Unicode rindex not implemented" 22:22
moritz_ patrickas: :( have you tried installing icu?
patrickas I did a quick trial but did not go very far... 22:23
oh oh oh btw congracts ...
moritz_ thank you 22:23
patrickas I have been gone for a while! 22:24
moritz_ speaking of which, I need to change the small one's diaper... bbl
patrickas hehehe ... ah the joys of parenthood!
moritz_ back 22:30
patrickas wb
sorear hello patrickas 22:31
patrickas hello sorear! great progress with niecza! 22:32
moritz_ sorear: I think quite many spectests could be won if you implemented Parcel string- and numification
sorear moritz_: How should Parcel numify?
rakudo: say +(12)
p6eval rakudo 413862: OUTPUT«12␤» 22:33
sorear rakudo: say +(12,)
p6eval rakudo 413862: OUTPUT«1␤»
sorear ah, +(.list)
moritz_ like that, yes :-)
sorear still thinks (12,) and (12) should be equivalent
moritz_ and it stringifies like an array
sorear Rakudo: say ?() 22:34
rakudo: say ?()
p6eval rakudo 413862: OUTPUT«Bool::False␤»
sorear rakudo: say ?(0)
rakudo: say ?(0,)
p6eval rakudo 413862: OUTPUT«Bool::False␤»
rakudo 413862: OUTPUT«Bool::True␤»
moritz_ rakudo: say (12).WHAT 22:35
p6eval rakudo 413862: OUTPUT«Int()␤»
moritz_ I guess the answer is that rakudo just doesn't consider (12) to be a Parcel
and it always num- and boolifies a Parcel like a List
rakudo: say (0,).WHAT
p6eval rakudo 413862: OUTPUT«Parcel()␤»
moritz_ might be syntactic 22:36
sorear (12) isn't a Parcel; see S08:160
moritz_ doesn't really trust S06 22:37
erm, S08 I mean
sorear I don't either really :) 22:38
flussence that S08, always disguising itself as other specs so they get the blame!
sorear it just bugs me that a trailing comma is meaningless unless the list has exactly one item
() always making a parcel would work too, but then handling 4*(2+3) would get confusing 22:39
moritz_ anyway, even if you don't get single-item edge case correct (whatever it is that's correct), you'd win lots of tests
sorear: at some point single-item parcels were specced to behave exactly as their item 22:40
patrickas ok so i downloaded ICU ... how do I compile rakudo with ICU ?
moritz_ patrickas: when it is installed (including development files), reconfiguring parrot and then rebuilding rakudo should pick it up 22:41
dalek ecza: 32795f3 | sorear++ | lib/CORE.setting:
Add Parcel Bool, Str, Numeric
22:42
sorear (moritz++)
patrickas Thx I'll do that 22:43
moritz_: while waiting for new chapters of HP:MoR you can take a look at the Wastelands of Time (not quite the same league but almost as interesting) 22:44
I've read and enjoyed both without having read or seen any of the official Harry Potter stuff :-)
moritz_ patrickas: I'm currently reading "The Wise Man's Fear" by Patrick Rothfuss (sequel to "The Name of the Wind"). Very good stuff too, if you like fantasy 22:45
moritz_ oh, and I'm working on a website where you can collect semantic relations between books, e.g. that one book is a sequel of another 22:46
(but in Perl 5 for now)
patrickas I could give it a try, but I read HPMor because of Eliezer's other non fiction writing, then I saw somewhere he mentioned the wastelands ... I was not really into that before :-) 22:47
moritz_ www.perlmonks.org/?node_id=891508 is there a nice Perl 6 solution for that? 22:49
(swapping array items with even/odd indexes, so 1, 2, 3, 4 becomes 2, 1, 4, 3)
oh, of course 22:50
perl6: say (1..8).map(-> $a, $b { $b, $a }).perl
p6eval rakudo 413862: OUTPUT«((2, 1), (4, 3), (6, 5), (8, 7))␤»
..niecza v3-33-gdafccd8: OUTPUT«[2, 1, 4, 3, 6, 5, 8, 7]␤»
..pugs: OUTPUT«(\2, \1, \4, \3, \6, \5, \8, \7)␤»
patrickas rakudo: say (1..8).map({ $^b, $^a }).perl 22:51
moritz_ perl6: say (1..8).map({ $^b, $^a }).perl
p6eval rakudo 413862: OUTPUT«((2, 1), (4, 3), (6, 5), (8, 7))␤»
..niecza v3-33-gdafccd8: OUTPUT«[2, 1, 4, 3, 6, 5, 8, 7]␤»
..pugs: OUTPUT«(\2, \1, \4, \3, \6, \5, \8, \7)␤»
rakudo 413862: OUTPUT«((2, 1), (4, 3), (6, 5), (8, 7))␤»
patrickas sorear++ niecza has come quite far along 22:54
moritz_ good night 22:55
patrickas 'night 22:56
sorear 'night 22:57
sorear could use more ideas of Things To Do 22:58
flussence niecza: say 1; #`[...] say 2; 22:59
p6eval niecza v3-33-gdafccd8: OUTPUT«1␤2␤»
flussence oh, I think rakudo had more problems with those...
or at least the #= syntax... 23:00
sorear rakudo implements #= correctly according to an old spec 23:01
flussence ah
sorear iirc
flussence perl6: my $a; #= something
p6eval pugs: ( no output )
..niecza v3-33-gdafccd8: OUTPUT«===SORRY!===␤␤Action method comment:sym<#=> not yet implemented at /tmp/hDCqor0W7Y line 1 (EOF):␤------> my $a; #= something⏏<EOL>␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/SAFE.setting line 389 (SAFE
..die @ 2)␤ at /h…
..rakudo 413862: OUTPUT«===SORRY!===␤Whitespace character is not allowed as a delimiter at line 22, near " something"␤»
sorear rakudo: my $a; #=[ something ] 23:01
p6eval rakudo 413862: ( no output )
sorear wonders how weak references should be exposed to perl6 23:02
patrickas 'night all 23:18
pmurias sorear: are weak references important in a language with proper garbadge collection? 23:27
plobsing pmurias: yes. for example, a subscription-style event system works a lot more smoothly if the service holds weak references to the subscribers 23:32
which is why both .Net and JVM provide weak references despite being GCed 23:33
diakopter also, see "When to use Weak Reference" at www.shafqatahmed.com/2008/01/weakre...nce-b.html 23:34
(supports plobsing
's point) 23:35
sorear hey, plobsing even guessed my use case 23:36
specifically, niecza uses weak references so that subclass method caches can be invalidated when the superclass is augmented