Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-06-01

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:08 xragnar_ joined #perl6
00:10 jack_rabbit joined #perl6
00:16 thou joined #perl6
00:18 jack_rabbit What can I do to help out perl6? I've found a lot of docs pointing me to different places, but one of the things most of them say are to check out the IRC channel.
00:34 hoverboard joined #perl6
00:40 pdcawley joined #perl6
00:43 Timbus jack_rabbit, use it!
00:44 jack_rabbit heh. :) It looks like there's still some stuff missing. I like the syntax better than Perl5 (I'm still learning how to be proficient in version 5)
00:45 jack_rabbit If perl6 has some documentation or tutorials, I'd love to take a look.
00:45 Timbus http://doc.perl6.org/ for some simple docs (that need work!)
00:46 Timbus http://modules.perl6.org/ for libraries you could use or improve
00:52 bjz joined #perl6
00:54 jack_rabbit Thanks. I'll see if I can help out.
01:01 timotimo welcome, jack_rabbit :)
01:02 timotimo in this place you'll find friendly conversation, help with learning and developing
01:02 timotimo ~1.5 years ago when i started helping, i found it surprisingly simple to work on the core itself (i worked mostly on the optimizer)
01:03 timotimo but outside of the core there's lots to improve, too: the spectest suite can always be expanded with tests for new bugs found for example
01:03 timotimo and the so-called "core setting" is pure-perl6 code; it contains all the classes and subs you'll end up using
01:04 timotimo (though it is rather performance-sensitive code, because much from inside the core setting gets used lots and lots)
01:04 hoverboard left #perl6
01:13 hoverboard joined #perl6
01:22 avuserow joined #perl6
01:30 FROGGS_ joined #perl6
01:38 Su-Shee_ joined #perl6
01:46 ishaynx joined #perl6
01:50 thistuso- joined #perl6
01:52 klapperl_ joined #perl6
01:57 SamuraiJack joined #perl6
02:01 avuserow joined #perl6
02:03 thistusooa joined #perl6
02:04 thou joined #perl6
02:39 xragnar joined #perl6
02:50 avuserow joined #perl6
02:54 thou joined #perl6
03:22 atroxaper joined #perl6
03:27 hoverboard joined #perl6
03:45 jack_rabbit timotimo, Thanks! I'm sure I don't know enough to be trusted messing with performance-sensitive code yet, but I'd be happy to take a look at some of the tests.
03:47 Timbus https://github.com/perl6/roast here be tests
03:48 Timbus its a lot
03:56 atroxaper joined #perl6
04:06 hoverboard joined #perl6
04:16 kaare_ joined #perl6
04:27 baest_ joined #perl6
04:34 rjbs- joined #perl6
04:34 japhb joined #perl6
04:37 dayangkun joined #perl6
04:39 ribasushi joined #perl6
04:41 atroxaper joined #perl6
04:45 rurban joined #perl6
04:46 atroxaper joined #perl6
05:16 pdcawley joined #perl6
05:19 Sqirrel joined #perl6
05:39 Timbus m: sub a(int $i) is cached { return unless $i; a($i-1) }; say a(4);
05:39 camelia rakudo-moar ce6acf: OUTPUT«Cannot find method 'gist': no method cache and no .^find_method␤  in method gist at src/gen/m-CORE.setting:7121␤  in block  at src/gen/m-CORE.setting:3357␤  in any enter at src/gen/m-Metamodel.nqp:3089␤  in method postcircumfix:<( )> at src/gen/m-C…»
05:41 xinming joined #perl6
06:31 Rotwang joined #perl6
06:45 rurban joined #perl6
06:49 japhb joined #perl6
06:59 darutoko joined #perl6
07:22 larks joined #perl6
07:59 rurban joined #perl6
08:17 anaeem1_ joined #perl6
08:25 kivutar joined #perl6
08:28 uniejo joined #perl6
08:35 anaeem1 joined #perl6
08:41 spider-mario joined #perl6
08:53 martinzaremba joined #perl6
08:54 martinzaremba left #perl6
08:54 martinzaremba joined #perl6
09:03 uniejo joined #perl6
09:05 pdcawley joined #perl6
09:38 lizmat good *, #perl6!
09:38 yoleaux 31 May 2014 22:31Z <vendethiel> lizmat: no, the replacement is fixed. but I'd need to generate stuff like <before "."x$len-1> ... stuff
09:47 Psyche^_ joined #perl6
09:51 lizmat Timbus: seems there is some confusion as to what gets passed to the sub
09:52 lizmat is cached uses the gist of the signature to creata a key
09:52 lizmat for caching the return value
09:52 lizmat m: sub a(int $i) is cached { return unless $i; a(($i-1).Int) }; say a(4)
09:52 camelia rakudo-moar ce6acf: OUTPUT«(Any)␤»
09:52 lizmat either defining $i as an Int, or making sure we pass an Int, is a workaround for now
09:54 itz joined #perl6
09:56 PZt joined #perl6
09:56 Timbus yeah. just thought it was an odd one
09:57 * lizmat submits rakudobug
09:59 dmol joined #perl6
10:03 denis_boyun_ joined #perl6
10:07 masak good antenoon, #perl6
10:08 lizmat masak Timbus o/
10:08 lizmat ^^^^ #122004
10:08 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122004
10:09 Timbus its an optimizer thing
10:09 Timbus also thanks for making the ticket :>
10:11 lizmat Timbus: ah, indeed, with MVM_SPESH_DISABLE=1 no problems
10:18 dalek rakudo/nom: a1f80d9 | (Elizabeth Mattijsen)++ | src/core/ThreadPoolScheduler.pm:
10:18 dalek rakudo/nom: Introduce RAKUDO_MAX_THREADS environment variable
10:18 dalek rakudo/nom:
10:18 dalek rakudo/nom: To make it easier to debug problems involving threads.
10:18 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a1f80d9692
10:19 lizmat m: say await do for ^13 { start { 1 for ^100000; $_ }
10:19 camelia rakudo-moar ce6acf: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/x2U9tuN2fAâ�¤Unable to parse expression in block; couldn't find final '}' â�¤at /tmp/x2U9tuN2fA:1â�¤------> [32mdo for ^13 { start { 1 for ^100000; $_ }[33mâ��[31m<EOL>[0mâ�¤    expecting any of…»
10:20 lizmat m: say await do for ^13 { start { 1 for ^100000; $_ } }
10:20 camelia rakudo-moar ce6acf: OUTPUT«(signal )»
10:20 lizmat m: say await do for ^13 { start { 1 for ^1; $_ } }
10:20 camelia rakudo-moar ce6acf: OUTPUT«(signal )===SORRY!===␤Spesh: failed to fix up handlers (132, -1, 154)␤»
10:21 lizmat m: await do for ^13 { start { 1 for ^1; $_ } }
10:21 camelia rakudo-moar ce6acf: OUTPUT«Unhandled exception: Spesh: failed to fix up handlers (132, -1, 154)␤   at src/gen/m-CORE.setting:11453  (/home/p6eval/rakudo-inst-2/languages/perl​6/runtime/CORE.setting.moarvm:throw:117)␤ from <unknown>:1  (/home/p6eval/rakudo-inst-2/languages/perl6/r…»
10:22 lizmat jnthn ^^^  I assume this is another expression of the 13 x 1 REPL issue
10:29 masak lizmat++
10:29 masak m: for ^13 { EVAL '1 for ^1; $_' }; say "alive"
10:29 camelia rakudo-moar ce6acf: OUTPUT«alive␤»
10:32 usernotexists joined #perl6
10:39 lizmat r: say $*PID; $*PID = 23; say $*PID  # is tha ability to change $*PID desirable ?
10:39 camelia rakudo-parrot ce6acf: OUTPUT«15667␤23␤»
10:39 camelia ..rakudo-moar ce6acf: OUTPUT«15675␤23␤»
10:39 camelia ..rakudo-jvm ce6acf: OUTPUT«20388␤23␤»
10:39 thou joined #perl6
10:46 eternaleye joined #perl6
10:47 FOAD joined #perl6
10:47 lizmat r: my @a = ^4; for @a <-> $_ {$_++}; say @a
10:48 camelia rakudo-{parrot,jvm} ce6acf: OUTPUT«1 2 3 4␤»
10:48 camelia ..rakudo-moar ce6acf: OUTPUT«0 1 2 3␤»
10:48 lizmat seem moar is wrong here
10:48 lizmat r: my @a = ^4; for @a -> $_ is rw {$_++}; say @a
10:48 camelia rakudo-{parrot,jvm} ce6acf: OUTPUT«1 2 3 4␤»
10:48 camelia ..rakudo-moar ce6acf: OUTPUT«0 1 2 3␤»
10:48 lizmat seems underlying "is rw" is faulty
10:49 lizmat masak: rakudobug ?
10:49 lizmat r: my @a = ^4; for @a {$_++}; say @a # default seems ok
10:49 camelia rakudo-{parrot,jvm,moar} ce6acf: OUTPUT«1 2 3 4␤»
10:50 xfix r-p: [].sorto
10:50 camelia rakudo-parrot ce6acf: OUTPUT«No such method 'sorto' for invocant of type 'Array'␤  in block  at /tmp/OPbzWb40QY:1␤␤»
10:51 lizmat .oO( that feels sorta right )
10:51 xfix Wouldn't it be nice if Rakudo could suggest using ".sort"?
10:51 lizmat ah, yes
10:51 lizmat indeed
10:51 lizmat on my list of things to do
10:51 lizmat m: sorto []
10:51 camelia rakudo-moar ce6acf: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/iN6cKT2lKyâ�¤Undeclared routine:â�¤    sorto used at line 1. Did you mean 'sort', 'sqrt'?â�¤â�¤Â»
10:52 lizmat like that, right ?
10:52 xfix Yes.
10:52 xfix m: sqrt []
10:52 camelia rakudo-moar ce6acf: ( no output )
10:52 xfix (hm, I guess that array is sorto number)
10:53 lizmat m: say +[]
10:53 camelia rakudo-moar ce6acf: OUTPUT«0␤»
10:53 lizmat the "problem" (which makes this a less LHF for me) is that the levenshtein logic lives in Perl6/World.nqp
10:53 lizmat and would need to access that from the Perl6 exception handler
10:54 masak if it were to be factored out into a common place, what would be the logical place for it?
10:55 lizmat well, that would be the other approach: would we want levenshtein functionality to be Perl6 core ?
10:56 lizmat OTOH, we need it at compile time as well, so the place it lives now is probably ok
10:57 xfix Anyway, I'm working on module for Perl 5 which would add Levenshtein logic for errors.
10:57 dalek rakudo/nom: 7e0940d | (Elizabeth Mattijsen)++ | src/core/Process.pm:
10:57 dalek rakudo/nom: Make sure $*PID is immutable
10:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7e0940d16b
10:57 xfix There are some issues, like accessing local variables, but I already figured how to do most things.
11:06 dalek roast: 6324a64 | (Elizabeth Mattijsen)++ | S02-magicals/pid.t:
11:06 dalek roast: Add test for immutability of $*PID
11:06 dalek roast: review: https://github.com/perl6/roast/commit/6324a642da
11:12 dalek roast: 8312a32 | (Elizabeth Mattijsen)++ | S02-magicals/pid.t:
11:12 dalek roast: Fudge $*PID immutability test for JVM / Parrot
11:12 dalek roast: review: https://github.com/perl6/roast/commit/8312a3247d
11:20 cognominal joined #perl6
11:23 martinzaremba joined #perl6
11:25 virtualsue joined #perl6
11:49 anaeem1 joined #perl6
11:50 Alula joined #perl6
11:53 pdcawley_ joined #perl6
11:54 lizmat r: class IntWithName is Int { has $.name }; my $a = IntWithName.new( :value(42), :name<foo> ); say $a; say $a.name # what am I doing wrong here ?
11:55 camelia rakudo-jvm 7e0940: OUTPUT«(timeout)»
11:55 camelia ..rakudo-{parrot,moar} 7e0940: OUTPUT«0␤foo␤»
11:55 timotimo the value most probably needs to put in with a box_i call
11:55 timotimo or set_i
11:56 lizmat nqp::box_i ?
11:57 timotimo i think so
11:57 timotimo you'd create an instance of IntWithName using box_i and then set the name ... or something
11:57 timotimo tbh, i'd rather plop a role onto an existing Int
11:57 lizmat I tried that too
11:57 timotimo oh
11:59 lizmat m: role Name { has $.name is rw }; my Int $a does Name = 42; $a.name = "foo"
11:59 camelia rakudo-moar 7e0940: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/OhRQaEthXa�Cannot call 'trait_mod:<does>'; none of these signatures match:�:(Mu:U $doee, Mu:U $role)�at /tmp/OhRQaEthXa:1�------> �»
11:59 timotimo m: role Name { has $.name is rw }; my Int $a = 42 but Name; $a.name = "foo"
11:59 camelia rakudo-moar 7e0940: ( no output )
11:59 lizmat m: role Name { has $.name is rw }; my Int $a but Name = 42; $a.name = "foo"
11:59 camelia rakudo-moar 7e0940: OUTPUT«Cannot modify an immutable Int+{Name}␤  in block  at /tmp/bKAqcAarFm:1␤␤»
11:59 timotimo m: role Name { has $.name is rw }; my Int $a = 42 but Name; $a.name = "foo"; say $a.name; say $a;
11:59 camelia rakudo-moar 7e0940: OUTPUT«foo␤42␤»
12:00 martinzaremba joined #perl6
12:00 lizmat timotimo++
12:09 * masak .oO( a 42 by any other name would smell just as sweet )
12:11 [Sno] joined #perl6
12:12 lizmat masak: more going for something like this: $ 6 'say $*UID; say $*UID.name'
12:12 lizmat 501
12:12 lizmat liz
12:15 martinzaremba joined #perl6
12:17 timotimo dang, $someone really ought to build a nice little demo for an asynchronous/multithreaded web server/framework thingie
12:18 lizmat someone will, when we get the bugs out of the asynchronous execution :-)
12:18 timotimo hmm.
12:19 lizmat timotimo: did you see the discussion about 1a224d30 on #moar ?
12:20 timotimo ah, yes
12:20 timotimo feel free to revert it
12:21 timotimo you could also just put a break; /* XXX this causes problems: *description* */ after case MVM_OP_can: case MVM_OP_can_s: in the optimize_bb function
12:21 timotimo and the same comment into the optimize_can_op function as well
12:21 timotimo or something like that.
12:23 martinzaremba joined #perl6
12:25 BenGoldberg joined #perl6
12:26 xenoterracide joined #perl6
12:37 masak lizmat: I would do that with 'handles', not 'is' or 'does'.
12:37 masak YMMV
12:37 lizmat masak: could you elaborate ?
12:39 masak the programmer meme that discusses this is called "favor delegation instead of inheritance"
12:40 masak or s/delegation/composition/, but it comes out as the same.
12:41 masak seems there's a Wikipedia page for it: https://en.wikipedia.org/wiki​/Composition_over_inheritance
12:42 masak lizmat: for some reason I feel like I'm channeling moritz++ when I'm saying this: "a UID is not a special kind of Int"
12:42 lizmat so you'd rather have a $*UID_NAME ?
12:42 xfix I personally dislike inheritance in its Java form.
12:42 xfix (but it's probably just me)
12:43 anaeem1_ joined #perl6
12:44 masak lizmat: *or* have whatever object is sitting in $*UID *not* be an Int, but happily numify and stringify to a UID, and also have a method .name
12:45 lizmat so what I did, is right, except that .WHAT says Int+{Name} ?
12:45 xfix *or* rename $*UID to $*USER, and make it stringify to name, but numify to ID.
12:46 masak lizmat: think so.
12:46 masak lizmat: I wouldn't use inheritance for... much at all, these days.
12:46 lizmat I'm trying to follow S28:122
12:46 synopsebot Link: http://perlcabal.org/syn/S28.html#line_122
12:46 xfix I personally like inheritance in JavaScript.
12:46 * masak looks
12:46 xfix It just seems more practical, with Object.create().
12:47 denis_boyun___ joined #perl6
12:47 masak xfix: same -- though I find I don't actually *use* the prototypal nature of the inheritance much in practice.
12:47 masak xfix: I get by with object cloning in most cases.
12:48 masak lizmat: S28:122 says that it *is* an Int, yes. I'd be fine with that. where does it say that it has a .name method?
12:48 synopsebot Link: http://perlcabal.org/syn/S28.html#line_122
12:48 masak (also, doesn't it strike you as slightly odd that a user *id* would have a name, rather than the user itself?)
12:49 lizmat so you would be in favour of renaming it to $*USER and numify to UID and stringify to name ?
12:49 lizmat or rather not have the user name available at all (as the spec currently suggests)
12:51 masak in that case, I'd vote for custom opaque object $*USER, string $*USER.name and int $*USER.id
12:51 Woodi is it *nix specific discusion or need to work the same universally ?
12:51 masak but I'd also be happy with no custom object, string $*USER_NAME and int $*UID
12:52 Woodi and hi everyone :)
12:52 lizmat Woodi o/
12:52 BenGoldberg joined #perl6
12:52 xfix $*UID seems like the UNIX specific distinction.
12:52 Woodi why is Levenstain needed in core ?
12:52 xfix Woodi, because it helps fixing misspellings.
12:52 lizmat m 42.sorta
12:53 lizmat m: 42.sorta
12:53 camelia rakudo-moar 7e0940: OUTPUT«No such method 'sorta' for invocant of type 'Int'␤  in block  at /tmp/lz4PZc_MSk:1␤␤»
12:53 lizmat suggest "sort" as a method name in such a runtime error
12:53 masak xfix: no, that's what it *does*, not why it's needed in core. :)
12:53 Woodi aha, now I know :)
12:53 lizmat m: sorta 42
12:53 camelia rakudo-moar 7e0940: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/_xZu7GD6Kvâ�¤Undeclared routine:â�¤    sorta used at line 1. Did you mean 'sort', 'sqrt'?â�¤â�¤Â»
12:53 xfix In Windows, users are recognized basing on their SID numbers, which look like S-1-5-21-1180699209-877415012-3182924384-500.
12:53 masak charming.
12:54 lizmat like that, but for runtime method lookups
12:54 xfix Technically, the last part is closest think to the UNIX ID, but that works only when you have one computer.
12:54 xfix s/think/thing/
12:55 Woodi last days I like to have simple functionalities available and then build complex things when needed. just packaged somehow
12:55 masak Woodi: yes, that sounds nice.
12:55 Woodi but sometimes not easy :)
12:56 masak Woodi: I think that's partly captured in the "easy things easy, hard things possible" slogan. but devil's in the details.
12:56 xfix I personally think that Perl 6 has too much in core, but Levenshtein distance doesn't seem like issue, as it's not publicly available.
12:57 xfix Why .is-prime not a module anyway?
12:57 xfix s/not/is not/
12:57 Woodi xfix: I had feeleing that CORE had gained a lot of functions lastly. but I never fully understand that simple core what was planned...
12:58 xfix I know that Perl 6 forms were removed from a core, but there are lots of other features that barely have any use.
12:58 Woodi maybe we need BATTERIES subsystem ? :)
12:59 xfix Python has huge standard library. Perhaps too big for its own good. But at least, core is relatively small.
13:00 Woodi but some say's and slurp's are needed. would be nice to have them packaged in packs and some just used auomatically
13:00 xfix Perl 5 was also minimalistic. It has get* and set* functions that nobody uses, but practically everything is in CPAN.
13:00 lizmat since most of the core is written in Perl 6, it should be relatively easy to move out stuff from the core if needed
13:00 xfix is also*
13:00 xfix I'm personally against moving "say" from the core. It just seems like an useful function for basic "Hello, world" examples.
13:00 Woodi some time ago was discusion about stat :x functionalities - there are in core ?
13:00 xiaomiao as a distro packager I suggest not removing things from the core / stdlib once they are in
13:01 xiaomiao that makes dependencies very frustrating and slows down adoption
13:02 Woodi I thinked about all that functions from C. do we need some C:: namespace with ::stdio ::others available ?
13:02 xfix There are lots of functions that nobody uses, but they are still in core, because perhaps someone uses them, and they cannot be removed. I assume it's still why Perl 5 has low level functions in core language.
13:03 lizmat afk for a few hours&
13:03 xfix s/it's still/a reason/
13:04 Woodi xfix: that Perl5 functionality was intentionally changed
13:04 xfix Before Perl 5, modules didn't exist.
13:05 xfix These days, modules exist. There is POSIX for example (which has lots of useless functions, but still).
13:07 Woodi and question is do scripting language needs all that low level functions. just using such function for performance probably is't a magic trick
13:08 xfix They aren't exactly for performance, perhaps with few exceptions.
13:08 xfix Sockets exist, but why anyone would use sockets directly?
13:08 Woodi and we want: a) syscals; b) /bin and /usr/bin utilities with all convenient switches  both :)
13:08 xfix (ok, perhaps it's for performance)
13:08 masak I don't think providing conveniences in core (such as .is-prime or .combinations) is a real problem.
13:09 masak but I do agree that we don't really have a general strategy or rule-of-thumb for what goes in core and what doesn't.
13:09 xfix Second System Syndrome?
13:09 masak could you expend it into an entire question?
13:10 masak expand*
13:10 xfix Perl 6 wants to do everything, and everything requires lots of builtins.
13:10 masak (1) that's not a question
13:10 Woodi ppls like feeling of control when using simple tools. low level reads used in Perl feels simple and feels to have good performance but autually Perl5 native read with buffering have usually better performance :)
13:10 masak (2) many general-purpose languages can be described in that way.
13:11 masak the "small core" ideal has the advantage that whatever ends up in core tends to be fairly powerful and combinable primitives.
13:11 masak but Perl 6 has never promised to be "small core"
13:12 masak and in any case, the setting is already outside of the core and is more of a standard library of by-default loaded functions and types.
13:12 xfix Well, it's possible to make too small core.
13:12 masak the real core is the grammar/actions and the mop.
13:12 xfix Lua's core practically has ntohing.
13:13 dmol joined #perl6
13:13 Woodi masak: I have idea of some library of all that stuff available and things "being" in core just being "referenced"
13:13 xfix Woodi, like glob in Perl 5?
13:13 Woodi there was "no core" meme or something ?
13:13 Woodi no, functionality available somehow, not technique
13:15 Woodi eg. say would be just something in STDP6 and just used by default in core
13:15 masak there has been discussion now and then about "lazy loading" of heavy dependencies.
13:15 xfix Well, glob() in Perl 5 behaves exactly like this.
13:15 xfix It loads File::Glob::glob().
13:15 Woodi ah, glob :)
13:15 masak for example, if you're not using any MOP stuff for your one-liner, maybe all the MOP stuff doesn't have to be loaded?
13:15 masak same thing with grammars, etc.
13:16 masak but I've never seen it proceed from the idea stage. and it would probably be hard to pull off, especially for the pieces I mentioned.
13:16 masak probably lots easier to lazily load parts further from the core, such as DateTime.
13:16 xfix That sounds like performance optimization, to be honest.
13:16 Woodi no, I think it is just (sh-like) functionality in P5 core not some functionality in P5 stdlibrary and autoavailable
13:16 masak it would primarily affect startup.
13:17 Woodi masak: yes pleas ! :)
13:17 Woodi no MOP by default :) if it's possible :))
13:17 masak the current problem with lazily loading things from the setting is that the setting is one big monolithic lexpad.
13:18 Woodi xfix: ok, I wasnt' avare it is that way
13:18 xfix There are LOTS of things in global namespace.
13:18 xfix Dynamically loading things wouldn't fix this.
13:18 masak "no MOP by default" would be... tricky. basically, someone would have to develop a "dumb" version of Rakudo that didn't presuppose an MOP, and launch into that one if no MOP usage was detected. note that any class declaration or some such would qualify as MOP usage.
13:19 Woodi masak: maybe we have "core" word overloaded ?
13:19 masak certainly.
13:19 masak Woodi: there's a moritz++ blog post about that.
13:19 masak but it's basically a "yes -- deal with it" situation.
13:19 xfix Also, there was a decision to make Perl 6 object oriented.
13:20 xfix Which leads to the situation where both `sqrt 2` and `2.sqrt` are valid.
13:20 Woodi masak: maybe no "no MOP by default" but only new crated objects to be just struct-like ?
13:21 Woodi with "is simple" trait or something ?
13:21 xfix In some languages, method(object) is syntactic sugar for object.method(), but this is not the case in Perl 6.
13:22 Woodi do we have pool of not quite instantiated objects ?
13:23 vendethiel xfix: not many languages, tho :)
13:23 xfix That's true.
13:23 vendethiel and don't you mean it the other way ?
13:23 vendethiel `object.method` being sugar for `method(object)` N?
13:23 xfix Well, right.
13:24 vendethiel OTTOMH, I can think of luna, but not many others. Doesn't lua do something like that ?
13:24 xfix Lua has metaclass attribute or something.
13:24 masak xfix: it's true to some extent.
13:25 xfix And a:method() is syntactic sugar for getmetatable(a).method(a)
13:25 masak m: class C { method foo { say "OH HAI from {self}!" } }; my $c = C.new; my $foo_method = C.can('foo')[0]; $foo_method($c)
13:25 camelia rakudo-moar 7e0940: OUTPUT«OH HAI from C<140421877400560>!␤»
13:25 masak xfix: ^^
13:26 xfix In Perl 6, classes themselves are objects (like null objects in other languages) which can call their methods, if I remember correctly.
13:26 xfix m: class C { method foo { say "Hi" } } C.foo
13:26 camelia rakudo-moar 7e0940: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ZPSGAr8ZYDâ�¤Two terms in a rowâ�¤at /tmp/ZPSGAr8ZYD:1â�¤------> [32mclass C { method foo { say "Hi" } } [33mâ��[31mC.foo[0mâ�¤    expecting any of:â�¤        postfixâ�¤        statement endâ�¤ …»
13:26 xfix m: class C { method foo { say "Hi" } }; C.foo
13:26 camelia rakudo-moar 7e0940: OUTPUT«Hi␤»
13:27 xfix But I guess that this .can is useful, even if it's not straightforward.
13:27 xfix (for calling methods on unrelated objects, perhaps)
13:30 Woodi masak: do settings are precompiled and are just some binary blob loaded on startup ?
13:30 xfix There is also another issue. Some application may not need certain features, but other programs absolutely need it.
13:30 xfix For example, I cannot see sin() being used for a simple web application.
13:30 masak Woodi: yes.
13:31 masak xfix: ...until you start doing animations, and need to calculate smooth trajectories... :)
13:31 masak xfix: then it's "gah what's this language doesn't even have sin()!!!"
13:31 xfix Yes.
13:31 Woodi xfix: I was dreamed some times ago compile-out functionality :) when program is compiled then not needed things from settings/core are compiled out :) but maybe compilers do this thes days :)
13:32 xfix gcc doesn't link with math by default.
13:32 pdcawley joined #perl6
13:32 xfix You need to specify -lm to be able to use functions like sin().
13:32 Woodi and probably lot's of programs do not need eval available at runtime :)
13:33 xfix Programs usually don't have to use every single feature of a programming language.
13:34 xfix And sometimes, they just cannot.
13:35 xfix Many cloud computing providers don't allow saving files.
13:35 xfix (you are expected to use a database instead)
13:36 flussence Does Rakudo have a good way to do fine-grained profiling of startup time?
13:36 xfix In this case, there is no point in opening files for writing.
13:37 flussence s/of/of its own/
13:37 xfix I assume you can --profile empty code, or something like this.
13:39 FROGGS joined #perl6
13:40 flussence Then that would be a better place to start than trying to decide via strawpoll what shouldn't be in core.
13:41 xfix Do you want a poll with 200 questions?
13:42 xfix (or more, I haven't really counted number of functions)
13:43 flussence I'm assuming here that the reason we're talking about the size of core is performance-related
13:44 xfix Not really.
13:44 Woodi ehmm, Mozilla and Debian asks for participations in some statistics colectings :)
13:45 xfix But I wonder about something else. Parse every single Perl 6 module, and check which methods and functions are most often called.
13:45 Woodi I think we need everything available and some of that functionalities loaded by default
13:45 masak Perl 5 has always been a language where you could build stuff you needed. CPAN attests to that.
13:45 masak with Perl 6, we aim to provide some of the nicer things by default. you can still build your own if/when you need it.
13:45 xfix Perl 5 needs CPAN for things more complex than text processing.
13:45 masak it's a different balance, a different local maximum. that's all.
13:46 Woodi masak: but it will introduce duplication of similiar code
13:47 dalek perl6-Text-Abbrev: 3a3cded | (Konrad Borowski)++ | META.info:
13:47 dalek perl6-Text-Abbrev: It's probably a good idea to fix the link.
13:47 dalek perl6-Text-Abbrev: review: https://github.com/xfix/perl6-​Text-Abbrev/commit/3a3cded6ce
13:47 xfix oops
13:47 xfix I forgot I still didn't disable this.
13:47 xfix Argh.
13:47 FROGGS about the state of panda and CPAN: my locally patched panda can almost fetch the MIRRORED.BY, only almost because panda does not use LWP::UserAgent, and the stuff I get is chunked
13:47 yoleaux 31 May 2014 21:33Z <lizmat> FROGGS: I'm also considering making @*INC an object with push/unshift/gist overloaded
13:47 yoleaux 31 May 2014 21:33Z <lizmat> FROGGS: so that a say @*INC will create a string that can be used with -I
13:48 FROGGS .tell lizmat yeah, would be nice to have a roundtripable @*INC
13:48 yoleaux FROGGS: I'll pass your message to lizmat.
13:48 FROGGS after we have the MIRRORED.BY, it is similar to fetching stuff from github...
13:49 FROGGS that means that I develop the stuff to fetch from CPAN independently to the "install to a database / S11" work
13:49 rurban joined #perl6
14:00 geekosaur joined #perl6
14:05 rindolf joined #perl6
14:09 sqirrel__ joined #perl6
14:15 anaeem1_ joined #perl6
14:21 zakharyas joined #perl6
14:26 eternaleye joined #perl6
14:37 zakharyas joined #perl6
14:42 TimToady Perl 6 is a large language by design, like English, but that mostly only means we have a large dictionary somewhere that we can look things up in; the actual definitions (bodies of subroutines and such) could be loaded lazily when we get to the point we want to bootstrap Perl 6 in our wristwatches that will be memory limited to only a few terabytes :)
14:47 anaeem1_ joined #perl6
14:49 masak :)
14:50 vendethiel o/ TimToady
14:50 masak damn, now I want Perl 6 in my wristwatch.
14:50 * vendethiel doesn't own a watch
14:54 timotimo wow, +<= looks odd
14:55 pippo joined #perl6
14:56 masak I guess you could write it as [+<]=
14:57 timotimo m: my $a = 10; $a [+<]= 3; say $a;
14:57 camelia rakudo-moar 7e0940: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/8QBFmpZgMV�Preceding context expects a term, but found infix = instead�at /tmp/8QBFmpZgMV:1�------> [32mmy $a = 10; $a [+<]=[33m�[31m 3; say $a;[0m�»
14:57 timotimo :o
14:57 sergot hi o/
14:58 timotimo hi there
14:58 timotimo how's the www stuff going? :)
14:59 pippo o/ #perl6
15:00 japhb Any special trick for installing v5? 'panda install v5' dies while compiling the second module, lib/Perl5/English.pm, complaining it can't find Perl5.
15:02 timotimo froggs wasn't able to make v5 panda-able yet :(
15:04 timotimo http://rosettacode.org/wiki/Dinesman%​27s_multiple-dwelling_problem#Perl_6 - i changed the description to point out what needs to be changed to work with a different problem statement. feel free to improve upon it
15:04 itz roll on ARM moarvm and we can have 'droid rakudo
15:06 japhb FROGGS: Is the Rakudo patch still needed for v5?
15:06 timotimo itz: we're working on it ... or rather nicholas clark is :)
15:16 itz japhb: its not
15:18 * masak .oO( itz not )
15:25 masak Perl 6 should have an entry here: http://codegolf.stackexchange.com/questio​ns/28786/write-a-program-that-makes-2-2-5
15:26 masak m: multi infix:<+>(2, 2) { 5 }; say 2 + 2
15:26 camelia rakudo-moar 7e0940: OUTPUT«5␤»
15:26 masak I might be biased, but that solution beats all the others on that page.
15:27 masak oh. I can't add that answer, because it's protected and (I'm pretty sure) I don't have 10 reputation on that site.
15:27 * masak adds it to HN instead
15:29 masak https://news.ycombinator.com/item?id=7829458
15:33 FROGGS japhb: no, the patch is not needed anymore
15:34 FROGGS perl6-m Configure.p6 && make install # that should do
15:41 japhb FROGGS: When I did the configure, the all target still pointed to p-all, so make by itself didn't work.  I eventually found 'make m-install' and that seemed to work.
15:42 FROGGS ahh, yes
15:42 FROGGS m-install is correct
15:43 FROGGS I'd like to get it panda installable, but the actions and grammar are nqp modules, and panda cannot install stuff for nqp :(
15:43 FROGGS would be awesome to turn it into pure Perl 6, but that is also a can of worms...
15:44 FROGGS but since this is what slangs will be, Perl 6, I go that way
15:44 FROGGS I need some brain cells of jnthn++ though for that task :o)
15:46 eternaleye joined #perl6
16:04 thou joined #perl6
16:04 japhb Is perl6-debug-m known broken right now?  I get 'Start argument to substr out of range. Is: -1, should be in 0..0' no matter how I use it (as a reply, with a -e '...' script, with a file script)
16:07 Khisanth joined #perl6
16:07 timotimo ... we ought to write tests that make sure stuff works in the debug frontend ...
16:07 japhb Oh, now *that's* interesting.  This is what `perl6-debug-m -v` prints: This is perl6 version  built on MoarVM version 2014.05-2-gb1add28
16:07 japhb Note the missing perl6 version.
16:07 timotimo could be worse :)
16:08 japhb I'm guessing someone forgot to update the debug front end when they changed how versions and such are picked up.
16:08 timotimo i *think* the -v piece of the debug program actually comes from the backend rather than the frontend
16:08 japhb timotimo: I think that (or a related bug during the process var refactoring) is why perl6-debug-m is failing.
16:09 japhb timotimo: But 'perl6-m -v' works fine.
16:10 eternaleye joined #perl6
16:11 timotimo okay; weird!
16:11 timotimo can you get a --ll-exception for the substr error?
16:16 molaf_ joined #perl6
16:23 sqirrel_ joined #perl6
16:30 masak Dijkstra was kind of a douche sometimes. he quotes another source, which contains the phrase "[...] to suggest some alternate avenues [...]", and he annotates "alternate" with '[meant is "alternative" EWD]', as if "alternate" weren't a workable synonym meaning "substitute".
16:34 japhb timotimo: There's a long dump if you do something in the REPL?
16:34 japhb s/"'"//
16:35 japhb s/'?'//
16:35 japhb Sigh.
16:35 timotimo er ... yeah
16:36 japhb timotimo: Anyway.  If you run 'perl6-debug-m' and then when the REPL comes up, do 'say "boo"', you should see the big backtrace
16:36 * timotimo reinstalls everything ...
16:50 eternaleye joined #perl6
17:25 sqirrel_ joined #perl6
17:43 hoverboard joined #perl6
17:51 virtualsue joined #perl6
17:52 thou joined #perl6
17:58 beastd joined #perl6
18:01 anaeem1 joined #perl6
18:15 pmurias joined #perl6
18:29 sqirrel_ joined #perl6
18:53 rurban joined #perl6
19:06 masak timotimo: *EVERYTHING*???
19:08 denis_boyun_ joined #perl6
19:12 bjz joined #perl6
19:12 ivanshmakov joined #perl6
19:16 ivanshmakov joined #perl6
19:19 timotimo masak: it is taking a while
19:19 timotimo waiting for the universe to cool down
19:21 vendethiel left #perl6
19:21 vendethiel joined #perl6
19:24 Rotwang joined #perl6
19:25 rurban joined #perl6
19:27 pdcawley joined #perl6
19:29 masak yeah, tell me about it.
19:40 thou joined #perl6
19:42 jack_rabbit joined #perl6
20:03 dalek panda/CPAN: ece2c62 | (Tobias Leich)++ | lib/Panda/Fetcher.pm:
20:03 dalek panda/CPAN: allow to fetch http resources
20:03 dalek panda/CPAN:
20:03 dalek panda/CPAN: We need this to fetch MIRRORED.BY to know what servers are best to query, but we
20:03 dalek panda/CPAN: also need to fetch the p6dists.json to know what distributions are out there, waiting
20:03 dalek panda/CPAN: for us.
20:03 dalek panda/CPAN: review: https://github.com/tadzik/panda/commit/ece2c62b1d
20:03 dalek panda/CPAN: 5d6a864 | (Tobias Leich)++ | / (3 files):
20:03 dalek panda/CPAN: add probe-mirrors target that pings CPAN servers
20:03 dalek panda/CPAN:
20:03 dalek panda/CPAN: Pinging all 263 CPAN servers takes up to three minutes since we only ping one server
20:03 dalek panda/CPAN: at a time. The good thing is that we only need to do that once.
20:03 dalek panda/CPAN: review: https://github.com/tadzik/panda/commit/5d6a864ac9
20:03 anaeem1 joined #perl6
20:07 rurban joined #perl6
20:08 vendethiel FROGGS: any reason to use `http '://'` instead of `'http://'` ?
20:12 FROGGS no, not really
20:14 FROGGS I think I did it because I first thought of / \w+ '://' /
20:14 FROGGS plan for tomorrow: let this also spit out information about the source (gihtub/CPAN):
20:15 FROGGS $ panda search native
20:15 FROGGS NativeCall               *          Call native libraries
20:15 FROGGS GTK::Simple              *          Simple GTK 3 binding using NativeCall
20:15 FROGGS gnight &
20:34 user3 joined #perl6
20:37 kivutar joined #perl6
20:43 virtualsue joined #perl6
20:44 dmol joined #perl6
20:45 bjz_ joined #perl6
20:47 bjz joined #perl6
20:55 rurban1 joined #perl6
21:02 timotimo yays :)
21:03 rurban joined #perl6
21:07 Ulti is there a way to do in place sorting of a list in Perl6 ?
21:07 tadzik sort of :)
21:07 tadzik (ha ha, get it? sort! PFFF)
21:07 Ulti :Z
21:07 colomon is there?!
21:07 tadzik m: my @a = <2 5 1 4>; @a.=sort; @a.perl.say
21:07 camelia rakudo-moar 7e0940: OUTPUT«Array.new("1", "2", "4", "5")␤»
21:08 Ulti and that acts on the list in RAM rather than creating a temporary one?
21:09 moritz it's not really in-place yet
21:09 colomon Ulti: no
21:09 Ulti okedoke
21:09 Ulti I wont worry about it for now then
21:11 Ulti tbh with statistics you can just subsample large data anyway
21:12 Ulti so I can just have a :sample(1000) adverb or something
21:15 Ulti also I notice 'rand' goes all the way down to the back ends so is there a spec for how random rand is?
21:19 colomon not that I know of
21:19 guru joined #perl6
21:19 colomon probably usually it's as random as C's standard library is
21:20 colomon though I seem to recall that the bigint rands we use usually go to an underlying crypto module.
21:20 pippo_ joined #perl6
21:21 dmol joined #perl6
21:23 rurban1 joined #perl6
21:26 Ulti tbh I'm not sure what is random enough for most statistical methods
21:27 Ulti I usually use a mersenne twister implementation
21:28 Ulti which is the default in R so probably random enough :S
21:29 thou joined #perl6
21:41 colomon m: say [1, 2, 3]
21:41 camelia rakudo-moar 7e0940: OUTPUT«1 2 3␤»
21:42 colomon m: say [1, 2, 3].Str
21:42 camelia rakudo-moar 7e0940: OUTPUT«1 2 3␤»
21:42 colomon m: say [1, 2, 3].perl
21:42 camelia rakudo-moar 7e0940: OUTPUT«[1, 2, 3]␤»
21:43 colomon m: my @a = 1, 2, 3; say @a
21:43 camelia rakudo-moar 7e0940: OUTPUT«1 2 3␤»
21:43 colomon m: my @a = 1, 2, 3; say @a.perl
21:43 camelia rakudo-moar 7e0940: OUTPUT«Array.new(1, 2, 3)␤»
21:43 * colomon scratches his head
21:43 rurban_ joined #perl6
21:44 jnthn [...] flattans, an @a doesn't, thus the different .perl output
21:45 rurban joined #perl6
21:46 bjz_ joined #perl6
21:46 martinzaremba joined #perl6
21:47 * colomon is finding it surprisingly hard to just get a nice [1, 2, 3] output
21:50 Ulti oh one quick question is there a ncie way to unpack kv from a list of pairs in a for loop? I was thinking: for $bag.pairs.sort -> $k, $v {} but you get $k as the Pair object
21:51 colomon Ulti: there is, but I can never remember the syntax
21:53 jnthn -> (:$key, :$value) { }
21:54 telex joined #perl6
21:56 Ulti neat thanks
21:59 jnthn np :)
22:08 martinzaremba hi guys
22:10 lizmat Ulti: alternately you could do:
22:10 yoleaux 13:48Z <FROGGS> lizmat: yeah, would be nice to have a roundtripable @*INC
22:10 lizmat m: for <a b b c c c>.Bag.pairs.sort>>.kv -> $k, $v { say "$k = $v" }
22:10 camelia rakudo-moar 7e0940: OUTPUT«a = 1␤b = 2␤c = 3␤»
22:10 lizmat as .kv also works on a Pair
22:12 rindolf joined #perl6
22:17 martinzaremba joined #perl6
22:20 pdcawley joined #perl6
22:23 dalek rakudo/nom: 6cd50fa | (Elizabeth Mattijsen)++ | src/core/Process.pm:
22:23 dalek rakudo/nom: Implement $*USER and $*GROUP (not yet specced)
22:23 dalek rakudo/nom:
22:23 dalek rakudo/nom: In numeric context, they provide uid/guid and in string context they provide
22:23 dalek rakudo/nom: the user's name and group.  Works by executing "id" where available, but only
22:23 dalek rakudo/nom: when $*USER and $*GROUP are actually used.
22:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6cd50fa0c2
22:23 dalek rakudo/nom: 57555c8 | (Elizabeth Mattijsen)++ | src/core/Process.pm:
22:23 dalek rakudo/nom: Make $*EXECUTABLE and $*EXECUTABLE_NAME immutable
22:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/57555c8d66
22:24 lizmat $ 6 'say ~$*USER; say +$*GROUP; say $*USER'
22:24 lizmat liz
22:24 lizmat 20
22:24 lizmat liz (501)
22:24 Ulti -> (:$key, :$value) {} didn't work out :S
22:24 lizmat taking masak's advice from earlier today
22:30 dalek specs: fb4171b | (Elizabeth Mattijsen)++ | S28-special-names.pod:
22:30 dalek specs: Spec $*USER, $*GROUP, $*EUSER, $*EGROUP
22:30 dalek specs: review: https://github.com/perl6/specs/commit/fb4171b5c7
22:30 jnthn r: my @a = a => 1, b => 2; for @a -> (:$key, :$value) { say "$key = $value" }
22:30 camelia rakudo-{parrot,jvm,moar} 7e0940: OUTPUT«a = 1␤b = 2␤»
22:31 jnthn Ulti: That bit in isolation seems to work, so maybe the problem is elsewhere?
22:32 Ulti r: my $bag = bag <1 2 2 3 4>; for $bag.pairs.sort -> (:key, :$value) { say "$key=$value" }
22:32 camelia rakudo-{parrot,jvm,moar} 7e0940: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Malformed parameterâ�¤at /tmp/tmpfile:1â�¤------> [32mag <1 2 2 3 4>; for $bag.pairs.sort -> ([33mâ��[31m:key, :$value) { say "$key=$value" }[0mâ�¤    expecting any of:â�¤â€¦Â»
22:32 Ulti oops
22:33 Ulti r: my $bag = bag <1 2 2 3 4>; for $bag.pairs.sort -> (:$key, :$value) { say "$key=$value" }
22:33 camelia rakudo-{parrot,jvm,moar} 7e0940: OUTPUT«1=1␤2=2␤3=1␤4=1␤»
22:33 Ulti weird
22:34 jnthn I'm curious what sort does on pairs...
22:34 Ulti especially as the >>.kv version works
22:34 Ulti its sorted by key
22:35 lizmat good night, #perl6!   more tests tomorrow  :-)
22:35 Ulti night lizmat
22:36 Ulti on the upside I now have code which appears to calculate the median of a Bag :S
22:41 * jnthn refrains from making a mean pun...
22:44 dmol joined #perl6
22:45 BenGoldberg joined #perl6
22:45 Ulti I'm not in the mode for puns
22:48 * jnthn enables sleep mode :)
22:48 jnthn Should have tuits again from tomorrow evening
22:48 jnthn 'night
22:49 timotimo hmm, this week's p6weekly will probably be dominated entirely by Eleven and lizmat's work
22:52 timotimo unless somebody swoops in and does some more interesting stuff ... *hint* *hint*
22:55 * timotimo will spend much of tomorrow on le road
23:03 kivutar joined #perl6
23:05 rurban joined #perl6
23:14 Sqirrel joined #perl6
23:17 thou joined #perl6
23:20 martinzaremba joined #perl6
23:47 pdcawley joined #perl6

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

Perl 6 | Reference Documentation | Rakudo