Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-02-06

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:01 BenGoldberg joined #perl6
00:14 Mouq joined #perl6
00:16 fhelmberger joined #perl6
00:18 skids Sum:: += librhash support.  Thankfully there are not as many hashing libs as hashing functions.
00:20 skids Of course I'll probably have to do one for OpenSSL libcrypto and one for that SSH standalone splinter of libcrypto
00:21 skids And at some point talk someone into being Sum::'s windows dev, cuz I aint gonna.
00:41 hoelzro .tell pmurias you said that the next bit of work is going to be around QASTNode; what exactly does that entail?
00:41 yoleaux hoelzro: I'll pass your message to pmurias.
01:05 Alina-malina joined #perl6
01:07 psch yay, byte[] marshalling works now \o/
01:08 psch now i just gotta dig up test cases for the 11 other possible typed arrays
01:09 psch oh, nvm, it's 11 including byte[]
01:09 psch and maybe i don't need SixModelObject[]..?
01:15 * psch sleeps &
02:03 retupmoca skids: just did a panda install Sum - passes all tests on my Windows 8.1 machine
02:06 retupmoca oh, looks like the NativeCall tests are disabled right now
02:06 skids Yeah, as once runtime is entered fails happen unless those libs are installed.
02:07 skids reupmoca++ thanks for testing.
02:07 skids damn I typoed retupmoca++ again
02:08 Mouq You reuped reupmoca?
02:16 skids Right now I am having fun fighting with a hinky NativeCall scnario: https://gist.github.com/skids/b33fcda50e7dad774835
02:17 fhelmberger joined #perl6
02:29 chenryn joined #perl6
02:32 skids Ah, it wasn't working because libmhash is broken. Heh.
02:59 adu joined #perl6
03:23 yeahnoob joined #perl6
03:26 prime joined #perl6
03:26 noganex joined #perl6
03:29 Mouq m: my $*THIS; sub term:<this> { $*THIS }; sub new(&fn, |c) { { my $*THIS = {} but role {method FALLBACK($name) is rw { self{$name} }}; fn(|c); $*THIS } }; sub Constructor(\attr) { this.foo = attr }; say new(&Constructor, "bar"); say new(&Constructor, "baz"); say this.perl
03:29 camelia rakudo-moar c453cd: OUTPUT«foo => bar␤foo => baz␤Any␤»
03:31 Mouq (It could be `new Constructor("bar")`, with new as a macro, but quasi's don't work with blocks in them, which we'd need for lexical $*THIS)
03:56 anocelot joined #perl6
04:10 dustinm` joined #perl6
04:10 anocelot joined #perl6
04:13 btyler joined #perl6
04:19 anaeem1_ joined #perl6
04:23 anaeem1 joined #perl6
04:24 telex joined #perl6
04:34 kaleem joined #perl6
04:51 telex joined #perl6
06:04 dustinm` joined #perl6
06:07 xfix joined #perl6
06:13 chenryn joined #perl6
06:22 Akagi201 joined #perl6
06:28 jack_rabbit joined #perl6
06:29 dustinm` joined #perl6
06:32 Rounin joined #perl6
06:38 diana_olhovik_ joined #perl6
06:45 dustinm` joined #perl6
06:50 kaleem joined #perl6
06:52 chenryn joined #perl6
06:58 vendethiel .botsnack
06:58 yoleaux :D
06:58 vendethiel .tell pmurias "function foo(){}"
06:58 yoleaux vendethiel: I'll pass your message to pmurias.
07:01 adu joined #perl6
07:06 gfldex joined #perl6
07:12 nbrown joined #perl6
07:14 alini joined #perl6
07:15 TimToady joined #perl6
07:16 jack_rabbit joined #perl6
07:19 mj41 joined #perl6
07:23 asdf12z_ joined #perl6
07:35 espadrine joined #perl6
07:37 Ugator joined #perl6
07:42 darutoko joined #perl6
07:45 chenryn joined #perl6
07:57 FROGGS joined #perl6
08:04 kjs_ joined #perl6
08:08 ab5tract joined #perl6
08:10 trone joined #perl6
08:13 [Tux] I cannot find it on doc.perl6.org: where can I see what can be used when I have CHECK in a class?
08:13 prime joined #perl6
08:15 moritz what you can use? every symbol that's in scope
08:15 [Tux] like the class (and its methods)?
08:15 moritz yes
08:16 moritz classes are being built and composed at BEGIN time, so at CHECK time, everything should be rosy
08:16 rurban_ joined #perl6
08:17 Mouq joined #perl6
08:17 [Tux] https://gist.github.com/Tux/dfe0257c49f38641f84a
08:17 [Tux] then I am missing something
08:18 FROGGS foo is a method, not a sub
08:18 moritz [Tux]: I've opened https://github.com/perl6/doc/issues/47 for you :-)
08:18 FROGGS at least, that's the first thing that comes to my mind
08:18 fhelmberger joined #perl6
08:18 [Tux] a method and a sub both are Routine, right?
08:18 moritz yes
08:19 moritz but you can't refer to method foo simply by writing foo
08:19 moritz methods live only in the method table
08:19 FROGGS [Tux]: but you call a method on its class or class instance
08:20 [Tux] I thought that the signature of alias would force it to be the method instead of a call to it
08:20 moritz alias(C.^find_method('foo'), < bar > )
08:20 moritz [Tux]: the arguments are evaluated first, then bound
08:20 moritz [Tux]: signature != p5 prototypes
08:20 [Tux] right
08:20 timotimo how do p5 prototypes behave?
08:21 timotimo ISTR something about changing how the parser treats a sub based on its prototype or something?
08:21 moritz timotimo: they modify parsing of the argument list
08:21 [Tux] and what if C is subclassed? Then C.^find_method will return the wrong foo?
08:21 moritz [Tux]: no
08:21 [Tux] ok
08:21 moritz [Tux]: TheSubclass.^find_method would return the wrong one
08:21 moritz a class doesn't even know of its subclasses
08:23 [Tux] drat. Slang::Tuxic is not (yet) in effect inside CHECK :( :(
08:25 [Tux] https://gist.github.com/Tux/22f8ced78cf9dc87db69
08:25 FROGGS but 'use' is BEGIN time...
08:26 FROGGS [Tux]: the way you line up curlies makes it hard to read your code
08:27 [Tux] funny you say that. for me it is always vice versa :)
08:28 [Tux] http://tux.nl/style.html if you want to know why
08:28 FROGGS [Tux]: well, that is something between you and the majority of the hackers :o)
08:28 * [Tux] is well aware of that
08:30 [Tux] missing :, https://gist.github.com/Tux/eacf46e310aed15795d1 works!!! :) :)
08:31 FROGGS ahh
08:31 FROGGS glad you solved it
08:33 sqirrel__ joined #perl6
08:37 andreoss joined #perl6
08:39 dalek rakudo/newio: 756a4ac | lizmat++ | src/core/Array.pm:
08:39 dalek rakudo/newio: [].VAR.name returns something more obviously wrong
08:39 dalek rakudo/newio:
08:39 dalek rakudo/newio: Namely "$ANON_VAR__10".  The "$x" seen originally, was an artefact of the name
08:39 dalek rakudo/newio: used of the variable used to itemize in the circumfix sub.  Hopefully, we can
08:40 lizmat sorry dalek
08:40 dalek joined #perl6
08:43 alini joined #perl6
08:46 masak good morning, #perl6
08:46 moritz good am, masak
08:47 Mouq joined #perl6
08:47 zakharyas joined #perl6
08:51 [Tux] callframe(0).annotations<line> is not valid in all contexts. is there a way to dynamically tell the current line?
08:51 [Tux] or the current line of the caller
08:51 FROGGS $?LINE ?
08:51 FROGGS that's not the caller though
08:54 chenryn joined #perl6
08:56 Mouq "Backtrace.new[mumble].line"? Not sure that's valid anywhere that callframe isn't, though
09:01 brrt joined #perl6
09:02 zakharyas1 joined #perl6
09:03 [Tux] In trying to slim down the situation that makes perl6 dump core, I found the combination that failed.
09:03 brrt which perl6... moar?
09:03 [Tux] putting that first though makes the script segfault somewhere else :(
09:03 [Tux] moar
09:04 FROGGS [Tux]: what does make it crash? we need to ticket and resolv that
09:04 [Tux] jnthn knows, but I'll greate a gist where you can copy to try to reproduce. one moment ...
09:05 brrt :-)
09:09 kjs_ joined #perl6
09:13 [Tux] https://gist.github.com/Tux/e398c043a80ecf498a05
09:13 [Tux] including valgrind output
09:14 * [Tux] leaves for $work
09:17 FROGGS [Tux]++
09:17 * Humbedooh walks 5 meters from home to work....done
09:20 FROGGS :/
09:20 * jnthn is kinda encouraged that the SEGV can be re-produced with a smaller test case; it reduces the chance it's a GC bug :)
09:20 jnthn Good morning, #perl6
09:20 FROGGS I have to walk 200x as much as Humbedooh :o(
09:20 FROGGS morning jnthn
09:20 FROGGS jnthn: I can golf that in a moment (in can I can reproduce in the first place)
09:23 jnthn FROGGS: OK. I'll look at it probably at the weekend; I'd like to focus on natives stuff today.
09:23 jnthn Also there's another strings bug I/someone needs to tackle.
09:23 ven joined #perl6
09:23 jnthn (RT'd by masak a while ago)
09:23 ven o/, #perl6
09:24 FROGGS ahh, will take a look when I have the chance
09:24 FROGGS hi ven
09:24 jnthn FROGGS: I think there's also a macro in src/strings/ops.c that you can turn on, which does rope sanity checks after every operation.
09:25 FROGGS k
09:25 Humbedooh FROGGS: I suppose I could do the walk 200 times if that makes you feel any better :)
09:25 FROGGS *g*
09:25 FROGGS not at all :P
09:26 jnthn Is this a bad time to mention I'm working at home today? :)
09:27 jnthn Also: nice, the MoarVM op-list parse/code-gen script (written in Perl 6) runs notably faster these days than in the past :)
09:27 FROGGS jnthn: no, my mood is in quite a good shape :o)
09:27 rindolf joined #perl6
09:32 ven eh, scala-to-js compiler no longer experimental. moore altjs :P
09:34 FROGGS Program received signal SIGSEGV, Segmentation fault.
09:34 FROGGS 0x00007ffff79de055 in MVM_string_concatenate (tc=0x603690, a=0x7ffff6684cb8, b=0x0) at src/strings/ops.c:321
09:34 FROGGS 321    if (!IS_CONCRETE((MVMObject *)a) || !IS_CONCRETE((MVMObject *)b))
09:34 FROGGS (b is NULL)
09:35 fhelmberger joined #perl6
09:37 * masak shomehow read "which does rope salty checks", which gave him pause
09:38 jnthn FROGGS: Hmm. Wonder where it comes from...
09:39 dalek rakudo/newio: 988984e | lizmat++ | src/core/Distro.pm:
09:39 dalek rakudo/newio: Introduce Distro.tmpdir
09:39 dalek rakudo/newio:
09:39 dalek rakudo/newio: The logic for determining what a good temporary directory is, is really
09:39 dalek rakudo/newio: dependent on the Distro we're working under, not on the IO::Spec.  One step
09:39 dalek rakudo/newio: closer to eradicating $*SPEC and IO::Spec!
09:39 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/988984ebc1
09:39 FROGGS jnthn: the salty rope check does not hit fwiw
09:40 jnthn FROGGS: No, that looks like a straight "it's NULL"
09:40 moritz salty licorice rope checks
09:41 FROGGS :S
09:41 jnthn Salty licorice is my favorite troll gift.
09:41 FROGGS MVM_SPESH_DISABLE=1 hides it
09:41 masak moritz: do they have those in .de? or is it just Scandinavia?
09:42 jnthn FROGGS: Oh, curious...
09:42 FROGGS MVM_JIT_DISABLE=1 does not hide it
09:43 * FROGGS tests inline and osr
09:43 moritz masak: dunno, I don't like licorice :-)
09:44 dalek rakudo/newio: 6a6f145 | lizmat++ | src/core/Process.pm:
09:44 dalek rakudo/newio: Initialize $*TMPDIR from $*DISTRO.tmpdir
09:44 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/6a6f145238
09:44 FROGGS jnthn: MVM_SPESH_INLINE_DISABLE=1 and MVM_SPESH_OSR_DISABLE=1 have no effect
09:44 arnsholt I think salty liquorice is mostly a Scandinavian/Nordic thing
09:44 lizmat eh, aren't you forgetting NL here ?
09:44 arnsholt And the Dutch
09:44 lizmat salty liquorice is also very much a Dutch thing
09:45 lizmat we even have the best salty liquorice in the world  :-)
09:46 FROGGS lizmat: which is not a good thing :o)
09:47 lizmat it's *the* remedy for low blood pressure  :-)
09:49 FROGGS I'll keep the low blood pressure instead, thanks :o)
09:51 pecastro joined #perl6
09:54 btyler joined #perl6
09:54 dagurval joined #perl6
09:54 Klaudioh joined #perl6
09:55 abraxxa joined #perl6
09:55 wicope joined #perl6
09:56 dalek rakudo/newio: 1aeeb95 | lizmat++ | src/core/Distro.pm:
09:56 dalek rakudo/newio: Distro.tmpdir should return an .IO object
09:56 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/1aeeb9598c
09:59 nine I have the name of a sub in a variable. How can I call the corresponding sub?
10:00 espadrine joined #perl6
10:00 mathw o/
10:01 moritz nine: &::($name)
10:01 moritz m: my $name = 'sin'; say &::($name)(pi)
10:01 camelia rakudo-moar c453cd: OUTPUT«1.22464679914735e-16␤»
10:02 lizmat m: my $a = sub { say "foo" }; $a()
10:02 camelia rakudo-moar c453cd: OUTPUT«foo␤»
10:02 lizmat ah, name
10:02 lizmat grrr
10:02 nine moritz: thanks!
10:03 lizmat jnthn: is it correct that we still don't have an nqp:: op to follow a symlink ?
10:04 jnthn lizmat: Lemme check
10:04 jnthn I seem to recall a readlink at some point.
10:05 kaleem joined #perl6
10:05 moritz mlenz@mlenz-workstation:~/p6/rakudo/nqp (master)$ git grep readlink|wc -l
10:05 moritz 0
10:05 moritz fwiw that's also the name I would have proposed :-)
10:05 jnthn I only see fileislink, symlink, and link
10:06 dalek Inline-Perl6: c57a1ec | (Stefan Seifert)++ | / (3 files):
10:06 dalek Inline-Perl6: Implement calling parameterless P6 functions from P5
10:06 dalek Inline-Perl6: review: https://github.com/niner/Inline-Perl6/commit/c57a1ec12a
10:06 lizmat so I guess it's still NYI
10:06 jnthn Probably we should have a readlink
10:07 lizmat agree  :-)
10:08 * lizmat dives into nqp to see what would be needed
10:09 dalek nqp: 2071014 | lizmat++ | docs/ops.markdown:
10:09 dalek nqp: Fix copy-pasto
10:09 dalek nqp: review: https://github.com/perl6/nqp/commit/2071014b48
10:11 jnthn lizmat: Well, needs VM-level addition first, I suspect.
10:12 jnthn https://github.com/libuv/libuv/blob/v1.x/include/uv.h#L1215 exists in libuv, which Moar uses for this stuff
10:13 lizmat ok, I'll follow the track laid out by "symlink" and try to follow in its footsteps  :-)
10:14 jnthn OK. Probably you need 1) function in fileops.c (and mention it in fileops.h), 2) Add readlink op to src/core/oplist (instructions at the top for how), run tools/updateops.p6, 3) implement op in interp.c to just call the function you write in fileops.c
10:15 Bucciarati joined #perl6
10:15 FROGGS and important, add the stuff to interp.c to directly before the sp_* ops
10:16 kaleem joined #perl6
10:16 jnthn I think the instructions at the top say that :)
10:16 avar joined #perl6
10:16 avar joined #perl6
10:18 jnthn Also, the way it gives you link back looks REALLY funky. o.O
10:18 jnthn Grep for readlink in http://docs.libuv.org/en/latest/fs.html
10:20 lizmat hmm.... running tools/update_ops.p6 gives me only 1 op afterwards ?
10:20 jnthn lizmat: Not sure I follow
10:21 jnthn Can you gist me something?
10:21 lizmat Parsed 1 total ops from src/core/oplist
10:22 lizmat ah, could be I broke something in perl6
10:22 lizmat in the newio branch
10:22 jnthn That is entirely possible.
10:23 jnthn If you gist me a diff of yoru src/core/oplist I can sanity check that before you go digging.
10:23 dalek rakudo/newio: 8a27ceb | lizmat++ | src/core/IO/Pathy.pm:
10:23 dalek rakudo/newio: Oops, forgot .d
10:23 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/8a27ceb418
10:23 jnthn .oO( salty check )
10:24 lizmat Parsed 670 total ops from src/core/oplist   # much better :-)
10:24 jnthn Sounds more like it :)
10:25 nwc10 it is, if your op isn't this one: http://en.wikipedia.org/wiki/One_instruction_set_computer
10:28 lizmat jnthn: the diff after running upadte_ops.p6: https://gist.github.com/lizmat/a02f943058b0930ddd3e
10:29 lizmat seems like it got sorted somewhere in the middle ??
10:29 pmurias joined #perl6
10:29 alini joined #perl6
10:29 jnthn lizmat: That's absolutely correct.
10:30 lizmat so what about keeping numbers the same for binary compatibility ?
10:30 lizmat (existing)
10:30 jnthn lizmat: The ops beyond that are ones that are never allowed to appear in bytecode files
10:30 pmurias .tell ven re jscript, I'm not spending much effort right now towards compatiblity with it, but I think in the future it might be important
10:30 yoleaux 00:41Z <hoelzro> pmurias: you said that the next bit of work is going to be around QASTNode; what exactly does that entail?
10:30 yoleaux pmurias: I'll pass your message to ven.
10:30 yoleaux 06:58Z <vendethiel> pmurias: "function foo(){}"
10:30 jnthn lizmat: The sp_ prefix is for spesh
10:30 lizmat ah, ok  :-)
10:31 jnthn lizmat: Those are ops that only the dynamic optimizer is allowed to insert.
10:31 lizmat I can commit this as adding a readlink stub, right ?
10:31 lizmat Ah, I need more
10:31 lizmat :-)
10:32 jnthn lizmat: I think you must add as stub in interp.c
10:32 lizmat yup
10:32 jnthn Otherwise the computed goto table will miss a label
10:32 lizmat indeed: src/core/oplabels.h:628:7: error: use of undeclared label 'OP_readlink'  :-)
10:32 jnthn You'll add something like
10:32 jnthn OP(readlink):
10:32 jnthn MVM_exception_throw_adhoc(tc, "readlink NYI");
10:33 jnthn phone, brb
10:38 jnthn back
10:38 lizmat added stub now, and Moar compiles
10:38 jnthn Moar ops!
10:41 lizmat I guess I now need to add a QAST::MASTOperations.add_core_moarop_mapping to src/vm/moar/QAST/QASTOperationsMAST.nqp ?
10:41 lizmat (first trying to get the stub in all the way, before messing more with Moar / libuv internals)
10:42 FROGGS lizmat: aye
10:45 diana_olhovik joined #perl6
10:59 pecastro joined #perl6
11:04 pecastro joined #perl6
11:08 ab5tract does anyone know why sillymoose hasn't released Module::Minter into the ecosystem?
11:08 ab5tract https://github.com/dnmfarrell/Module-Minter/blob/master/lib/Module/Minter.pm6
11:08 ab5tract (i think that's sillymoose, but maybe i am wrong)
11:15 bsh joined #perl6
11:16 kjs_ joined #perl6
11:16 ab5tract btw, digging into channels and supplies at $day_job with btyler. going to see if we can make that a $day-job sooner rather than later :)
11:19 moritz ab5tract: if you have any qualms with the docs for Supply or Channel on doc.perl6.org, please let me know
11:19 moritz ab5tract: (or open github issues about them)
11:20 ab5tract moritz: much appreciated. already enjoying the progress that has been made on them already
11:20 ab5tract what i really need is an open ticket on myself, because i'm still new to trying to think in this way :)
11:25 * jnthn points out http://wiki2.enlightenedperl.org/index.php5?title=2015_Ideas_Page
11:25 jnthn Wonder if we should migrate our ideas list there, or just link it from there? Maybe better for visibility to do the latter.
11:25 jnthn uh
11:26 jnthn the former
11:26 jnthn gah :)
11:29 bsh left #perl6
11:32 telex joined #perl6
11:43 ab5tract okay, first $ab5tract-problem .. how to construct a Promise such that it will call $channel.close at a specific time, such that we can use $channel.closed as a condition in a loop ( 'until $channel.closed' )
11:44 ab5tract but without wrapping the whole thing in an await
11:46 dalek nqp: 51b308b | lizmat++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
11:46 dalek nqp: Add mapping for nqp::readlink() on Moar
11:46 dalek nqp: review: https://github.com/perl6/nqp/commit/51b308b775
11:46 ab5tract https://paste.booking.com/5wshk@raw
11:46 ab5tract but we just found $supply.Channel coercion, so that might help :)
11:46 moritz "The connection to the server was reset while the page was loading."
11:47 moritz ab5tract: is that a private server?
11:47 moritz Promise.in(15).then({ $channel.close })
11:47 ab5tract yes, sorry
11:48 ab5tract but that's time based
11:48 ab5tract right?
11:48 moritz yes
11:48 ab5tract https://gist.github.com/anonymous/a624ddbed08512749b80
11:48 ven pmurias: I am 100% convinced is irrelevant. mind explaining your stance?
11:48 yoleaux 10:30Z <pmurias> ven: re jscript, I'm not spending much effort right now towards compatiblity with it, but I think in the future it might be important
11:49 travis-ci joined #perl6
11:49 travis-ci NQP build failed. Elizabeth Mattijsen 'Add mapping for nqp::readlink() on Moar'
11:49 travis-ci http://travis-ci.org/perl6/nqp/builds/49729260 https://github.com/perl6/nqp/compare/2071014b48d4...51b308b775af
11:49 travis-ci left #perl6
11:49 moritz ab5tract: Promise.alloff((^10).map: { ...}).then({$c.close})
11:53 moritz ab5tract: also https://perl6advent.wordpress.com/2014/12/23/webscale-sorting-of-the-sleepy-kind/
11:54 sqirrel__ joined #perl6
11:55 Ven joined #perl6
11:55 noganex joined #perl6
11:57 xiaomiao joined #perl6
11:58 ab5tract moritz: yup, i've got all the advents and docs open :)
11:58 btyler make that two of us
11:58 ab5tract https://gist.github.com/ab5tract/e214eccb652cfb6e514f
11:59 ab5tract so the allof just about solves it, but i end up having to do some non-perl6-y feeling "guard guarding" to avoid the run time error
11:59 ggoebel111111113 joined #perl6
12:00 esaym153 joined #perl6
12:01 isacloud joined #perl6
12:01 sjn joined #perl6
12:02 simcop2387 joined #perl6
12:02 arnsholt joined #perl6
12:02 moritz ab5tract: well, doing a loop is the wrong thing
12:02 moritz ab5tract: if you await the alloff promise, you know know you're done
12:03 ab5tract yeah, but then
12:04 ab5tract ... hmmm ...
12:04 moritz ab5tract: or if you act on the things as they come in, use a Supply
12:04 btyler this (using a supply instead of a channel) does what we expected. is this the Right Way: https://gist.github.com/kanatohodets/b97a0da7e97c2f10389f ?
12:04 moritz *if you want to act
12:04 btyler heh, lost the race :)
12:04 lizmat_ joined #perl6
12:04 moritz btyler: yes, that's how I'd do it
12:05 pmurias Ven: internet explorer has a fair amount of market share
12:05 nyuszika7h joined #perl6
12:06 moritz btyler: and you won the race for the code, just lost the race for advise :-)
12:06 pmurias Ven: if we don't support JScript, rakudo-js generated code will not run in internet explorer
12:07 Ven pmurias: IE is javascript, not jscript, really
12:07 Ven pmurias: quirks that jscript have introduced are not in use anymore. (stuff as in "foo() = 5")
12:08 ven- and most of the others bug I'm always trying to avoid only exist up to ie6
12:08 lizmat hmm... appears I need to bump NQP first
12:10 moritz lizmat: bump MOAR first in NQP
12:10 lizmat need to fix Moar (again) first, then I'll bump  :-)
12:10 dalek joined #perl6
12:10 moritz ok :-)
12:12 [Coke]_ joined #perl6
12:13 sivoais joined #perl6
12:13 [ptc]_ joined #perl6
12:13 nine_ joined #perl6
12:13 pmurias_ joined #perl6
12:13 djanatyn joined #perl6
12:14 diegok joined #perl6
12:14 rurban__ joined #perl6
12:14 broquain1 joined #perl6
12:16 pmurias_ joined #perl6
12:18 pmurias Ven: isn't JScript the name of the JavaScript engine inside Internet Explorer
12:18 Ven pmurias: no, it's chakra
12:19 Ven pmurias: jscript is what wsh uses
12:19 Ven (window script host)
12:19 Akagi201 joined #perl6
12:19 rurban joined #perl6
12:19 pmurias that's not supported
12:21 cdc joined #perl6
12:21 Klaudioh joined #perl6
12:21 btyler joined #perl6
12:21 anocelot joined #perl6
12:21 amalia joined #perl6
12:21 charsbar_ joined #perl6
12:21 Ulti joined #perl6
12:21 Aaron`J joined #perl6
12:21 revdiablo joined #perl6
12:21 pnu joined #perl6
12:21 grep0r joined #perl6
12:21 japhb joined #perl6
12:21 yogan_ joined #perl6
12:21 Spot__ joined #perl6
12:21 ggherdov joined #perl6
12:22 pmurias Ven: what I mostly care about supporting is commonly used browsers/node.js/and the thing facebook will be using for react.js native
12:23 pmurias Ven: other things will be supported if someone else is willing to either put in the work or convince me why it's important
12:24 grep0r joined #perl6
12:24 pmurias Ven: wikipedia refers to the internet explorer JavaScript as JScript
12:25 dalek nqp: 9f4ebea | lizmat++ | tools/build/MOAR_REVISION:
12:25 dalek nqp: Bump MOAR_REVISION to get readlink stub
12:25 dalek nqp: review: https://github.com/perl6/nqp/commit/9f4ebea968
12:27 Ven pmurias: ... but nobody else.
12:27 Ven it's what they used to have when ecma didn't exist.
12:27 pmurias Ven: but it seems wikipedia is being more and more controlled by shady/stupid people subverting the internal editiorial processes so it might not be trusted
12:27 Ven pmurias: I've stopped trusting wikipedia on topics I'm certain of long ago :P
12:28 Ven .oO( when they started adding "isomorphic javascript"
12:28 travis-ci joined #perl6
12:28 travis-ci NQP build passed. Elizabeth Mattijsen 'Bump MOAR_REVISION to get readlink stub'
12:28 travis-ci http://travis-ci.org/perl6/nqp/builds/49732627 https://github.com/perl6/nqp/compare/51b308b775af...9f4ebea96839
12:28 travis-ci left #perl6
12:29 pmurias Ven: what's isomorphic javascript
12:29 pmurias ?
12:30 Ven pmurias: "javascript running both on the client and the server". or, rather, people trying to use words they don't understand...
12:31 xfix joined #perl6
12:32 nine_ Ven: back in ye olde days IE's scripting really was called JScript.
12:32 Ven nine_: yes. I said "up to ie6"
12:33 dalek Inline-Perl6: 783e653 | (Stefan Seifert)++ | / (4 files):
12:33 dalek Inline-Perl6: Support passing string arguments to P5 functions called from P6
12:33 dalek Inline-Perl6:
12:33 dalek Inline-Perl6: Promoted Inline::Perl6Helper to a proper class that holds a pointer
12:33 dalek Inline-Perl6: to my_perl and pass my_perl to all C wrappers.
12:33 dalek Inline-Perl6:
12:33 dalek Inline-Perl6: Allows Inline::Perl6 to be used from multiple P5 interpreters in the
12:33 dalek Inline-Perl6: same process and allows re-using unmodified C code from Inline::Perl5.
12:33 dalek Inline-Perl6: review: https://github.com/niner/Inline-Perl6/commit/783e653f14
12:34 Ugator joined #perl6
12:36 dj_goku joined #perl6
12:39 rmgk_ joined #perl6
12:43 ab5tract m: sub dummy-id { return (^10).roll(*).join }; say dummy-id
12:43 camelia rakudo-moar c453cd: OUTPUT«(timeout)»
12:44 ab5tract ^^ times out locally as well
12:44 moritz ab5tract: yes, .roll(*) is an infinite list
12:45 moritz ab5tract: joining that takes infinite time
12:45 ab5tract m: say (^10).roll(*).join
12:45 camelia rakudo-moar c453cd: OUTPUT«(timeout)»
12:45 moritz m: say (^10).roll(*)[^20]
12:45 camelia rakudo-moar c453cd: OUTPUT«4 8 5 6 5 1 3 3 9 2 3 9 5 6 8 7 4 7 4 0␤»
12:45 ab5tract how bizare.. that has returned correctly for me before
12:45 moritz ab5tract: maybe you meant .pick(*)? or .roll(10)?
12:46 ab5tract moritz: i meant the latter, yeah. is there a shorthand for that?
12:46 moritz ab5tract: no
12:46 ab5tract (and i see now that when it was returning, it was the .pick(*) version)
12:47 moritz there's nothing intrinsic in a 10-sided die that makes it more natural to roll it 10 times than any other number
12:50 ab5tract moritz: agreed, still i expect to see a fair amount of @things.roll( +@things ). but i'm not complaining nor taking the position that such is wrong
12:52 moritz ab5tract: I don't expect that, fwiw
12:52 moritz ab5tract: my experience with rolling dice is that I use 1, 2 or 3 dice much more often than 6 or 20 :-)
12:55 ab5tract moritz: not a fan of 2nd edition Shadowrun then? ;)
12:58 moritz ab5tract: no, more Dark Eye (mostly popular in Germany)
12:58 psch o/
13:02 dustinm` joined #perl6
13:02 dalek rakudo-star-daily: bf07e36 | coke++ | log/ (9 files):
13:02 dalek rakudo-star-daily: today (automated commit)
13:03 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/bf07e36879
13:03 nine_ moritz: Lilyhammer++ :)
13:04 jnthn nine_++ # hacking on Inline::Perl6
13:13 colomon wait, is that a p5 module?
13:13 nine_ colomon: yes
13:14 colomon sweet
13:18 moritz nine_: glad you like it
13:20 ab5tract nine_: i noticed last night that there is a mismatch in argument passing with Inline::Perl5
13:21 nine_ ab5tract: care to elaborate?
13:21 ab5tract nine_: of course :)
13:23 ab5tract use Module:from<Perl5>; Module.method_which_takes_@_and_puts_it_in_a_hash( key1 => "thing", key2 => "other_thing" )
13:24 ab5tract i had to rewrite it as
13:24 ab5tract Module.method_which_takes_@_and_puts_it_in_a_hash( "key1", "thing", "key2", "other_thing" )
13:25 btyler what's the perl6 for this: my %foo = (a => 1, b => 2); %foo{qw(a b)}; #gives (a, 1, b, 2) -- the key/value pair hash slice
13:25 ab5tract so perhaps some extra sugar around the FALLBACK code
13:25 nine_ ab5tract: oh yes, there's no multi method p6_to_p5 for Pairs yet. Should be trivial to implement.
13:25 moritz that's not an argument passing mismatch, more a mismatch between p5's and p6's => operator
13:25 moritz btyler: %foo<a b>:p
13:25 btyler ah ha, an adverb
13:25 btyler lovely
13:25 FROGGS m: my %foo = a => 1, b => 2; say %foo<a b>
13:25 camelia rakudo-moar c453cd: OUTPUT«1 2␤»
13:25 moritz m: my %foo = (a => 1, b => 2); say %foo<a b>:p.perl
13:25 camelia rakudo-moar c453cd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/csQFPqS4tyâ�¤Two terms in a rowâ�¤at /tmp/csQFPqS4ty:1â�¤------> [32m%foo = (a => 1, b => 2); say %foo<a b>:p[33mâ��[31m.perl[0mâ�¤    expecting any of:â�¤        infix stopperâ�¤        infix o…»
13:25 FROGGS m: my %foo = a => 1, b => 2; say %foo<a b>:p
13:25 camelia rakudo-moar c453cd: OUTPUT«a => 1 b => 2␤»
13:26 ab5tract moritz: it doesn't seem to affect anything in other places
13:26 moritz m: my %foo = (a => 1, b => 2); say (%foo<a b>:p).perl
13:26 camelia rakudo-moar c453cd: OUTPUT«("a" => 1, "b" => 2)␤»
13:26 moritz m: my %foo = (a => 1, b => 2); say (%foo<a b>:kv).perl
13:26 camelia rakudo-moar c453cd: OUTPUT«("a", 1, "b", 2)␤»
13:26 btyler perfect, thanks! moritz++/FROGGS++
13:26 dalek nqp: 38cd1f0 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/BootJavaInterop.java:
13:26 dalek nqp: Implement marshalling of listy Types to typed Java arrays.
13:26 dalek nqp: review: https://github.com/perl6/nqp/commit/38cd1f0ddf
13:26 ab5tract and yes, the root of the mismatch stems from => being a real thing in perl 6, and not a fat comma
13:26 moritz btyler: :p for pair objects, :kv for keys/values list interleaved
13:27 moritz m: my @a = (a => 1, b => 2); say @a.elems; # for ab5tract
13:27 camelia rakudo-moar c453cd: OUTPUT«2␤»
13:27 ab5tract moritz: are you implying that i solved this without understanding that? :P
13:27 moritz $ perl -wE 'my @a = (a => 1, b => 2); say scalar @a'
13:27 moritz 4
13:27 moritz ab5tract: yes
13:28 ab5tract i know the differences, i'm saying that i've only encountered it in Inline::Perl5 wrt to argument passing
13:28 ab5tract moritz: that's pretty uncharitable man
13:28 ab5tract i didn't just pull the solution out of my ass
13:28 FROGGS *g*
13:28 moritz ab5tract: why? it shows I have high confidence in your problem solving ability :-)
13:29 ab5tract well, that just proves you doubly wrong ;P
13:33 bcode joined #perl6
13:33 * ab5tract didn't realize that being accused of not understanding lists in perl 5 would be such a trigger
13:35 * moritz didn't do such a thing
13:35 hoelzro o/ #perl6
13:36 bcode joined #perl6
13:39 jnthn o/ hoelzro
13:47 kaleem joined #perl6
13:48 ab5tract $supply.emit([ @array, %hash ]);   # legal ?
13:50 moritz yes
13:50 jnthn Sure, you can emit whatever object you like
13:50 jnthn (Just as you can take whatever you like.)
13:50 ab5tract we are getting a strange error: "cannot stringify this" which appears to trigger when we use $supply.emit in that way
13:51 jnthn m: my $s = Supply.new; $s.emit([ my @a, my %h ]); # golf?
13:51 camelia rakudo-moar c453cd: ( no output )
13:51 ab5tract trying to gold this now
13:51 ab5tract *golf
13:52 jnthn m: my $s = Supply.new; $s.tap(&say); $s.emit([ my @a, my %h ]); # golf?
13:52 camelia rakudo-moar c453cd: OUTPUT«␤»
13:52 jnthn m: my $s = Supply.new; $s.tap(*.perl.say); $s.emit([ my @a, my %h ]); # golf?
13:52 camelia rakudo-moar c453cd: OUTPUT«[]␤»
13:52 jnthn OK, I'll leave you to golf :)
13:54 hoelzro pmurias: did you see my message about what needs to be done for QASTNode?
13:55 zakharyas joined #perl6
13:56 pmurias hoelzro: hi
13:56 pmurias hoelzro: checking...
13:59 sqirrel__ joined #perl6
13:59 ab5tract rindolf
13:59 ab5tract rindolf's part message always catches my eye, but i'll never understand
13:59 hoelzro pmurias: there's no rush, I just wanted to talk about it so I have something to work on after work today =)
14:00 pmurias hoelzro: nqp::{istype,clone,curlexpad,findmethod}
14:00 hoelzro pmurias: awesome, thanks!
14:00 FROGGS ab5tract: same for me :o)
14:02 Ven ab5tract: summer glau's the "crazy" character in firefly. she's apparently given extraordinary powers by her fans :o)
14:02 Ven well, that's a misuse of "given". should be "attributed"
14:02 btyler m: my $sup = Supply.new; $sup.tap: -> [@foo] { say "yay"; } $sup.emit([1, 2]);
14:02 camelia rakudo-moar c453cd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/vgqIBOccTIâ�¤Two terms in a rowâ�¤at /tmp/vgqIBOccTI:1â�¤------> [32mnew; $sup.tap: -> [@foo] { say "yay"; } [33mâ��[31m$sup.emit([1, 2]);[0mâ�¤    expecting any of:â�¤        infix stopperâ�¤  â€¦Â»
14:02 btyler moment, totally unrelated to supplies
14:06 btyler m: my $sup = Supply.new; $sup.tap: -> [@foo] { say "yay"; }; $sup.emit([1, 2]);
14:06 camelia rakudo-moar c453cd: OUTPUT«cannot stringify this␤  in block <unit> at /tmp/gYK_YESL8k:1␤␤»
14:06 btyler jnthn: ^
14:07 btyler and maybe this is ab5tract and I totally failing to understand something, but in any case the error is LTA
14:07 psch m: my $f = -> [@a] { say "ok" }; $f()
14:07 camelia rakudo-moar c453cd: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in block <unit> at /tmp/eXB65z1YMz:1␤␤»
14:07 psch m: my $f = -> [@a] { say "ok" }; $f([1,2,3])
14:07 camelia rakudo-moar c453cd: OUTPUT«cannot stringify this␤  in block <unit> at /tmp/eh5vNIjRF3:1␤␤»
14:07 psch m: my $f = -> @a { say "ok" }; $f([1,2,3])
14:07 jnthn btyler: It looks like a problem in error reporting
14:07 camelia rakudo-moar c453cd: OUTPUT«ok␤»
14:07 moritz m: my $sup = Supply.new; $sup.tap: -> @foo { say "yay"; }; $sup.emit([1, 2]);
14:07 camelia rakudo-moar c453cd: OUTPUT«yay␤»
14:07 jnthn The unpack is wrong
14:08 moritz btyler: if you do the signature correct, it works :-)
14:08 anaeem1 joined #perl6
14:08 ab5tract yup :)
14:08 btyler right, figured we had something backwards
14:08 moritz but yes, the error message is LTA
14:08 ab5tract m: my $sup = Supply.new; $sup.tap: -> [@foo] { say "yay"; }; $sup.emit([[1]]); # works
14:08 camelia rakudo-moar c453cd: OUTPUT«yay␤»
14:08 Juerd Speaking of unpack, does Perl 6 have something like Perl 5's unpack?
14:08 ab5tract m: my $sup = Supply.new; $sup.tap: -> [@foo] { say "yay"; }; $sup.emit([1]); # LTA
14:08 camelia rakudo-moar c453cd: OUTPUT«cannot stringify this␤  in block <unit> at /tmp/R7VyJmaeaO:1␤␤»
14:09 ab5tract just for the record, this becomes a lot more obvious once it's golfed ;)
14:10 moritz Juerd: it has the beginnings of something like that, yes
14:10 moritz Juerd: but the plan is to do it a bit differently; more like the nativecall interface
14:13 * [Coke] has stopped puking, sleeping, and is now, tentatively, at $dayjob.
14:14 Juerd moritz: I see.
14:14 Juerd Things like N/a is where Perl 5's unpack really shines and saves you a lot of work.
14:15 jnthn [Coke]: That does sound like an improvement.
14:16 [Coke] jnthn: except for the dayjob part! ;)
14:18 jnthn tbh, I find pretty much every aspect of my dayjob preferable to puking... :P
14:19 nwc10 can I remind you of that next time the coffee catches you out?
14:21 jnthn Cold coffee doesn't taste *that* bad...
14:22 _mg_ joined #perl6
14:23 ab5tract okay, so i've re-golfed the "issue" we were running into
14:23 ab5tract i think it is less straight-forward
14:23 ab5tract but prefacing it with "i'm not sure that this is wrong"
14:23 Bowman42 joined #perl6
14:24 ab5tract m: my @a = <list of things>; my %h = %( hash => "of", things => "yup" ); my $sup = Supply.new; $sup.tap: -> [@a,%h] { say "yay"; }; $sup.emit([@a, %h]);  # cannot stringify
14:24 camelia rakudo-moar c453cd: OUTPUT«cannot stringify this␤  in block <unit> at /tmp/B8ASweYEh9:1␤␤»
14:25 pmichaud Juerd: http://doc.perl6.org/routine/unpack   # maybe
14:25 ab5tract m: my @a = <list of things>; my %h = %( hash => "of", things => "yup" ); my $sup = Supply.new; $sup.tap: -> [@a,%h] { say "yay"; }; $sup.emit([ $@a, $%h ]);  # itemize first
14:25 camelia rakudo-moar c453cd: OUTPUT«yay␤»
14:25 pmichaud good morning, #perl6
14:25 jnthn morning, pmichaud o/
14:25 Juerd pmichaud: It's a start
14:26 jnthn ab5tract: The [...] composer flattens
14:26 jnthn ab5tract: Try $sup.emit([$@a, $%h])
14:26 nwc10 good UGT, Pm
14:27 ab5tract jnthn: see my second working example :D
14:27 ab5tract okay, so that explains it
14:28 jnthn ab5tract: hah, I fixed a compile error between when I read your question and finished typing my answer..so didn't notice ;)
14:28 ab5tract jnthn++ # a hero of mine
14:28 FROGGS *g*
14:29 PerlJam greetings #perl6
14:30 psch jnthn: the "cannot stringify" comes from $error[0] in the subsig binding code.  .HOW.name on that $error[0] still can't stringify, which i don't understand :)
14:30 ab5tract on a related note, we are having an interesting time trying to discuss $@a (aka []) without saying arrayref
14:30 psch ab5tract: itemized array?
14:30 psch but i don't think [] is equivalent to $@a
14:30 jnthn psch: Hmmm...odd
14:31 ab5tract psch: i meant it as a structural reference
14:31 ab5tract but itemized array just sounds weird
14:31 psch ab5tract: oh, right, "how it behaves in assignment" and that kind of stuff.  right
14:31 ab5tract when you have an "itemized list" IRL, you are talking about the elements of the list being itemized. not the list itself
14:32 psch ah, right.  that discussion happened a few weeks back iirc.  itemified is the only alternative i remember but that's slightly awkward
14:32 ab5tract psch: but yeah, "itemized array" has been one  of the phrases we've been trying
14:35 skids joined #perl6
14:38 psch ab5tract: clog research reveals that raiph++ suggests "as [an]? item", and jnthn++ doesn't mind *ref.  i might have imagined someone suggesting "itemified" :)
14:38 psch ah, no, that was timotimo++
14:38 psch or maybe masak++
14:39 psch jnthn: i'm not sure how to follow that $error around through the binder code
14:39 dalek nqp/native-ref: 4c6574f | jnthn++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
14:39 dalek nqp/native-ref: Map some native ref nqp::ops.
14:39 dalek nqp/native-ref: review: https://github.com/perl6/nqp/commit/4c6574f2d9
14:41 jnthn psch: Oh, I see it...
14:41 jnthn Note that the thing that top-level handles the error is:
14:41 jnthn nqp::isinvokable(@error[0]) ?? @error[0]() !! nqp::die(@error[0]);
14:41 jnthn Things that want to throw a typed exception do so by putting it into $error
14:42 psch ooh
14:42 jnthn So assuming we have a string is errorneous
14:42 psch right, so subsig should do the same check?
14:42 psch isinvokable that is
14:42 jnthn Search for X::TypeCheck::Binding in BOOTSTRAP.nqp to see where it happens
14:42 jnthn Well, we could do that but...we still have no good way to attach the "oh btw it's in a subsig" ino
14:43 * jnthn glances at moritz++, resident typed exceptions expert :)
14:43 jnthn s/ino/info/
14:44 H2O1 joined #perl6
14:50 H2O1 left #perl6
14:54 _mg_ joined #perl6
14:59 moritz well, I'd just add an attribute for "in subsignature for parameter $parameter"
14:59 moritz to X::TypeCheck::Binding
14:59 moritz or an array, if we allow arbitrarily nested subsigs
15:00 jnthn moritz: X::TypeCheck::Binding is kinda not specific to signatures, though?
15:00 jnthn moritz: I was wondering if mixing in a role might be a way to go...
15:03 moritz jnthn: right, we should maybe start with a signature-specific error type
15:03 moritz jnthn: mixing in things on the fly sounds a bit too spooky for me :-)
15:06 psch m: sub f(Int $x) { }; { EVAL "f('foo')"; CATCH { default { .perl.say } } }
15:06 camelia rakudo-moar c453cd: OUTPUT«X::TypeCheck::Argument+{X::Comp}.new(filename => "EVAL_0", line => 1, column => Any, modules => Array.new(), is-compile-time => Bool::True, pre => "<BOL>", post => "f('foo')", highexpect => Array.new(), protoguilt => Bool::False, arguments => Array.new("st…»
15:07 [Coke] protoguilt?
15:07 kjs_ joined #perl6
15:07 dalek nqp: eb40eb0 | lizmat++ | tools/build/MOAR_REVISION:
15:07 dalek nqp: Bump Moar to get proper readlink(), FROGGS++
15:07 dalek nqp: review: https://github.com/perl6/nqp/commit/eb40eb0a1e
15:08 [Coke] lizmat++
15:09 psch m: proto foo($) {*}; multi foo(Int $) { "Int" }; { EVAL 'foo(1,2)'; CATCH { default { .perl.say } } }
15:09 camelia rakudo-moar c453cd: OUTPUT«X::TypeCheck::Argument+{X::Comp}.new(filename => "EVAL_0", line => 1, column => Any, modules => Array.new(), is-compile-time => Bool::True, pre => "<BOL>", post => "foo(1,2)", highexpect => Array.new(), protoguilt => 1, arguments => Array.new("Int", "Int")…»
15:10 psch [Coke]: "does the proto prevent dispatch" i suppose
15:10 psch 'cause &foo in that example can never take two scalars, no matter their type
15:12 psch the .message has «$.protoguilt ?? "Calling proto of '" !! "Calling '"»
15:12 andreoss m: my \n = 0; say n...(n+10);
15:12 camelia rakudo-moar c453cd: OUTPUT«0 1 2 3 4 5 6 7 8 9 10␤»
15:18 andreoss m: my \n = 2; say n, 2*n, 3*n ... n+10;
15:18 camelia rakudo-moar c453cd: OUTPUT«2 4 6 8 10 12␤»
15:18 andreoss m: my \n = 2; say n, 2*n, 3*n ... n;
15:18 camelia rakudo-moar c453cd: OUTPUT«2␤»
15:18 andreoss m: my \n = 2; say n, 2*n, 3*n ... n+1;
15:18 camelia rakudo-moar c453cd: OUTPUT«2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 1…»
15:19 andreoss m: my \n = 2; say n, 2*n, 3*n ... n+3;
15:19 camelia rakudo-moar c453cd: OUTPUT«2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 1…»
15:19 andreoss m: my \n = 2; say n, 2*n, 3*n ... 3;
15:19 camelia rakudo-moar c453cd: OUTPUT«2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 100 102 104 106 108 110 112 114 116 118 120 122 124 126 128 130 132 134 136 138 140 142 144 146 148 150 152 154 1…»
15:19 mr-foobar joined #perl6
15:20 dalek rakudo/nom: 8e91140 | lizmat++ | tools/build/NQP_REVISION:
15:20 dalek rakudo/nom: Bump NQP to get nqp::readlink
15:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8e9114053e
15:20 moritz andreoss: when the limit isn't matched exactly, it goes on forever
15:21 nine_ m: EVAL 'sub foo() { say "foo!"; }'; EVAL 'foo();';
15:21 camelia rakudo-moar c453cd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling EVAL_1â�¤Undeclared routine:â�¤    foo used at line 1â�¤â�¤Â»
15:21 nine_ why is that? ^^^
15:21 jnthn The code in an EVAL is its own lexical scope
15:22 nine_ jnthn: is there any way around that?
15:22 dalek perl6.org: fb2c904 | paultcochrane++ | README.md:
15:22 dalek perl6.org: Add link to the #perl6 irc channel
15:22 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/fb2c9047eb
15:22 dalek perl6.org: e798885 | paultcochrane++ | README.md:
15:22 dalek perl6.org: Add link to browsershots.org
15:22 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/e798885ab0
15:22 dalek perl6.org: 3051f25 | paultcochrane++ | README.md:
15:22 dalek perl6.org: Add formatting to emphasise text in README
15:22 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/3051f25143
15:22 jnthn m: EVAL 'our sub foo() { say "foo!"; }'; EVAL 'OUR::foo();';
15:22 psch there is :context on EVAL, but i don't understand how it works
15:22 camelia rakudo-moar c453cd: OUTPUT«Cannot find method 'Any'␤  in block <unit> at EVAL_1:1␤  in any <unit-outer> at EVAL_1:1␤  in sub EVAL at src/gen/m-CORE.setting:795␤  in block <unit> at /tmp/7glix27HYJ:1␤␤»
15:22 jnthn Hmm
15:22 moritz psch: it's for setting the outer scope
15:22 jnthn m: EVAL 'our sub foo() { say "foo!"; }'; EVAL 'GLOBAL::foo();';
15:22 camelia rakudo-moar c453cd: OUTPUT«Could not find symbol 'foo'␤  in method <anon> at src/gen/m-CORE.setting:14599␤  in any find_method_fallback at src/gen/m-Metamodel.nqp:2741␤  in any find_method at src/gen/m-Metamodel.nqp:988␤  in block <unit> at EVAL_1:1␤  in any <unit-outer> a…»
15:23 moritz psch: you can say  EVAL($string, :context(CALLER)) or so
15:23 andreoss moritz: is there something like n, 2*n,  3*n ... * where n < limit ?
15:23 FROGGS m: EVAL 'our sub foo() { say "foo!"; }'; EVAL '&GLOBAL::foo();';
15:23 camelia rakudo-moar c453cd: OUTPUT«foo!␤»
15:23 FROGGS m: EVAL 'our sub foo() { say "foo!"; }'; EVAL '&OUR::foo();';
15:23 camelia rakudo-moar c453cd: OUTPUT«foo!␤»
15:23 jnthn Oh, of course :)
15:23 jnthn FROGGS++
15:23 psch moritz: oh, i see
15:23 FROGGS :o)
15:24 moritz m: my \n = 5; say n, 2*n, 3n ... * >= 70
15:24 camelia rakudo-moar c453cd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/EwphE6AQwa�Confused�at /tmp/EwphE6AQwa:1�------> [32mmy \n = 5; say n, 2*n, 3[33m�[31mn ... * >= 70[0m�»
15:24 moritz m: my \n = 5; say n, 2*n, 3* n ... * >= 70
15:24 camelia rakudo-moar c453cd: OUTPUT«5 10 15 20 25 30 35 40 45 50 55 60 65 70␤»
15:24 moritz andreoss: ^^
15:24 andreoss thanks
15:24 moritz m: my \n = 5; say n, 2*n, 3* n ...^ * >= 70 # excluding the end
15:24 camelia rakudo-moar c453cd: OUTPUT«5 10 15 20 25 30 35 40 45 50 55 60 65␤»
15:24 Mouq joined #perl6
15:25 FROGGS m: my \n = 5; say n, 2*n, 3* n ^... * >= 70 # also nice
15:25 camelia rakudo-moar c453cd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ce82xYT8pZ�Unsupported use of . to concatenate strings; in Perl 6 please use ~�at /tmp/ce82xYT8pZ:1�------> [32mmy \n = 5; say n, 2*n, 3* n ^... [33m�[31m* >= 70 # also nice[0m�»
15:25 FROGGS err
15:26 nine_ So it seems that $p6.call(...) needs a $scope parameter. Cause builtins are in CORE::, not in GLOBAL:: or OUR::
15:26 psch m: say &say.package.^name
15:26 camelia rakudo-moar c453cd: OUTPUT«GLOBAL␤»
15:27 nine_ Unhandled exception: No such symbol '&::GLOBAL::say'
15:27 moritz m: say &MY::say
15:27 psch the first two : look wrong to me
15:27 camelia rakudo-moar c453cd: OUTPUT«(Any)␤»
15:27 psch m: say &GLOBAL::say.perl
15:27 camelia rakudo-moar c453cd: OUTPUT«Any␤»
15:27 moritz m: MY::('&say')(52)
15:27 camelia rakudo-moar c453cd: OUTPUT«===SORRY!===␤No such symbol 'MY::&say'␤»
15:27 moritz huh
15:27 psch m: say &UNIT::say
15:27 camelia rakudo-moar c453cd: OUTPUT«(Any)␤»
15:28 psch m: say &CORE::say
15:28 camelia rakudo-moar c453cd: OUTPUT«use of uninitialized value $name of type Any in string context  in block <unit> at /tmp/GTQpdeT3nv:1␤␤sub say (Any |) { #`(Sub|49029848) ... }␤»
15:28 psch m: say &CORE::say.perl
15:28 camelia rakudo-moar c453cd: OUTPUT«use of uninitialized value $name of type Any in string context  in block <unit> at /tmp/ovKZVnh6yy:1␤␤sub say (Any |) { #`(Sub|60298008) ... }␤»
15:28 dalek doc: e73ce03 | paultcochrane++ | lib/Language/modules.pod:
15:28 dalek doc: Replace github by GitHub
15:28 dalek doc:
15:28 dalek doc: This is how the GitHub people render the name.
15:28 dalek doc: review: https://github.com/perl6/doc/commit/e73ce03703
15:28 dalek doc: 43b1c8f | paultcochrane++ | lib/Language/modules.pod:
15:28 dalek doc: Link to markdown syntax documentation
15:28 dalek doc: review: https://github.com/perl6/doc/commit/43b1c8f663
15:28 dalek doc: e879e7b | paultcochrane++ | lib/Language/modules.pod:
15:28 dalek doc: Minor typographical updates
15:28 dalek doc: review: https://github.com/perl6/doc/commit/e879e7bfc6
15:28 jnthn psch: The .package simply means "what package were we in when the thing was declared"; whether it was actually installed in the package is a separate question.
15:28 moritz [ptc]++
15:29 nine_ m: my $name = "say"; &CORE::($name)("yes!");
15:29 camelia rakudo-moar c453cd: OUTPUT«yes!␤»
15:29 nine_ m: my $name = "say"; &GLOBAL::($name)("yes!");
15:29 camelia rakudo-moar c453cd: OUTPUT«===SORRY!===␤No such symbol '&::GLOBAL::say'␤»
15:29 moritz m: &::('say')(42)
15:29 camelia rakudo-moar c453cd: OUTPUT«42␤»
15:29 moritz nine_: &::(...) gives you the same look up that 'say()' does
15:29 xinming_ joined #perl6
15:29 gfldex joined #perl6
15:30 Ven joined #perl6
15:30 moritz nine_: that is, first in the lexical scopes, then in CORE
15:30 moritz nine_: 'our' isn't searched by default in Perl 6
15:30 andreoss m: my @x := n, 2*n, 3* n ... * >= 70; say @x[* - 1];
15:30 camelia rakudo-moar c453cd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/71ZfPTRgkgâ�¤Undeclared routine:â�¤    n used at line 1â�¤â�¤Â»
15:30 nine_ m: EVAL 'our sub foo() { say "foo!"; }'; my $name = 'foo'; &::($name)();
15:30 camelia rakudo-moar c453cd: OUTPUT«foo!␤»
15:31 andreoss m: my @x = n, 2*n, 3*n ... * >= 70; say @x[* - 1];
15:31 camelia rakudo-moar c453cd: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/2iJdxjuyZ_â�¤Undeclared routine:â�¤    n used at line 1â�¤â�¤Â»
15:31 nine_ moritz: ah, seems like &::(...) already does enough magic for me
15:31 moritz andreoss: add your  'my \n'
15:31 skids m: my \n = 2; my @x = n, 2*n, 3*n ... * >= 70; say @x[* - 1]
15:31 camelia rakudo-moar c453cd: OUTPUT«70␤»
15:32 pierrot joined #perl6
15:32 andreoss stupid me
15:32 profan joined #perl6
15:34 dalek doc: 46b4504 | paultcochrane++ | lib/Language/modules.pod:
15:34 dalek doc: Further typographical and formatting updates
15:34 dalek doc: review: https://github.com/perl6/doc/commit/46b4504b3f
15:35 andreoss left #perl6
15:45 andreoss joined #perl6
15:46 andreoss "@phi[k] = @phi[k] - (@phi[k] div n)"" that is 30 times faster than "@phi[k] -= (@phi[k] div n);"
15:47 rindolf joined #perl6
15:48 dalek rakudo/newio: 8e91140 | lizmat++ | tools/build/NQP_REVISION:
15:48 dalek rakudo/newio: Bump NQP to get nqp::readlink
15:48 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/8e9114053e
15:48 dalek rakudo/newio: 50a0dae | lizmat++ | tools/build/NQP_REVISION:
15:48 dalek rakudo/newio: Merge branch 'nom' into newio
15:48 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/50a0daed05
15:50 dalek Inline-Perl6: 167cbae | (Stefan Seifert)++ | / (2 files):
15:50 dalek Inline-Perl6: Support passing all non-object data types from P6 to P5
15:50 dalek Inline-Perl6:
15:50 dalek Inline-Perl6: Int, Book, Num, Rat, blob8, Hash, Positional
15:50 dalek Inline-Perl6: review: https://github.com/niner/Inline-Perl6/commit/167cbaef41
15:51 jnthn andreoss: Yeah, the optimizer doesn't make a great job of those just yet. The faster form is not only directly cheaper, but also will get better treatment from dynamic optimization too.
15:51 * jnthn wonders if we've a perl6-bench entry for that yet
15:53 * FROGGS thinks that it is not true that Book is a non-object data type
15:54 jnthn A Book is a data structure derived from a Tree...
15:54 skids And subclassed by Dict
15:55 dalek rakudo/native-ref: 168ca22 | jnthn++ | src/vm/moar/ops/container.c:
15:55 dalek rakudo/native-ref: Update Rakudo scalar contspec for updated API.
15:55 dalek rakudo/native-ref: review: https://github.com/rakudo/rakudo/commit/168ca22ffe
15:56 moritz jnthn: can 6pe be merged? or have you merged it already?
15:57 jnthn moritz: Potentially. I'd like to at least see it tested against the Star modules.
15:57 jnthn If anybody fancies taking that on, to get it landed faster, please do.
15:57 jnthn Also make sure that, when merged into nom, we don't lose any spectests.
15:58 jnthn There's more work to do in the 6pe area, but I think what's in the branch being merged won't be terribly disruptive.
15:59 moritz jnthn: what's the moarvm branch name? or is it only nqp+rakudo?
15:59 nine_ And Dict is really a Hash in Perl 5. So when Hashes are non-objects, the base of hashes cannot be objects either
16:00 FROGGS ;o)
16:01 jnthn moritz: The MoarVM and NQP 6pe branches are both already merged
16:01 moritz jnthn: oh, that simplifies things \o/
16:01 jnthn moritz: So it's only the 6pe-mop one that is up for merge.
16:02 jnthn The native-ref branches I'm currently working on will not be elligible for merge until after 2014.02
16:02 jnthn But I've plenty to be doing in them :)
16:02 FROGGS jnthn: I mused about testers.perl6.org... would be nice if we just did: PANDA_SUBMIT_REPORT=before-6pe panda smoke; <switch branach>; PANDA_SUBMIT_REPORT=after-6pe panda smoke
16:03 FROGGS and then a way to compare both tags
16:03 FROGGS switch branch*
16:03 adu joined #perl6
16:06 kaleem joined #perl6
16:08 nine_ This really shows how easy Inline::Perl6 is to write: even in my condition and unable to type I can make decent progress.
16:08 jnthn It's so easy when r-m has no embedding API! ;)
16:09 moritz t/spec/integration/weird-errors.t test 5 has been failing for me for a while on moarvm
16:09 moritz anybody know what's up there?
16:09 jnthn Not me
16:10 jnthn Didn't see it on the last spectest I ran on this box but I've no idea when that wsa.
16:10 moritz and t/spec/S17-supply/start.t fails test nine here
16:10 moritz # expected: [1, 1]
16:10 moritz #      got: [1, 1]
16:12 espadrine joined #perl6
16:12 nine_ jnthn: it's not NativeCall which makes up for most of it :0
16:12 nine_ ;)
16:13 dalek rakudo/newio: 459ebe6 | lizmat++ | src/core/IO/ (2 files):
16:13 dalek rakudo/newio: We can do .parent on files as well
16:13 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/459ebe65dc
16:16 lizmat moritz: to me, that's a flapper
16:16 lizmat runs ok by itself
16:20 jnthn nine_: Wow, it's amazing how little you actually need in that .xs file
16:20 jnthn But yeah, I need to provide better APIs for doing what you're doing from Moar...
16:22 PerlJam nine_: Have you tried Inline::Perl5 on different versions of Perl 5?
16:23 PerlJam nine_: I ask because my perlbrewed 5.20.0 has been working fine, but today I tried 5.20.1 and it barfed.  I haven't had time to investigate if it's just me or a general problem.
16:24 _mg_ joined #perl6
16:24 PerlJam nine_: I mean, I switched to 5.20.1 and attempted to install Inline::Perl5 with panda and it complains.
16:26 moritz jnthn: on 6pe-mop I get a test failure in t/spec/S14-roles/mixin.t (last test), though that is one testing an exact error message
16:26 jnthn moritz: Ah, yeah...
16:26 jnthn moritz: Typed exception time? :)
16:26 jnthn I do think the new text is an improvement.
16:26 moritz but running the code in that test on the command line seems to produce a fine error message
16:27 moritz jnthn: +1 to typed exceptions :-)
16:27 jnthn moritz: If you've the ork to put in a typed exception for it, feel free
16:27 jnthn moritz: Otherwise I can do it in the next day or so
16:28 nine_ PerlJam: I'm actually developing Inline::Perl5 on 5.20.1
16:29 moritz jnthn: I'm now testing panda + star modules, so no idea if/when I'll get to it
16:29 jnthn moritz: OK
16:29 moritz jnthn: ... or if I remember how to use a typed exception from a meta class/role :-)
16:29 jnthn Just serach for P6EX in src/Perl6/Metamodel :)
16:32 nine_ I wonder if I shouldn't just go in and actually use Inline::Perl5 for implementing Inline::Perl6. I'll end up copying most of the code anyway.
16:36 pmurias nine_: sharing code so that the Perl 5 objects behave the same in Perl 6 while using both of those modules seems like a good thing
16:39 dalek rakudo/newio: f5d730c | lizmat++ | src/core/IO.pm:
16:39 dalek rakudo/newio: Introduce MAKE-PARENT helper sub
16:39 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/f5d730c025
16:40 dalek roast: 5cea494 | skids++ | S32-exceptions/misc.t:
16:40 dalek roast: Add test for RT #72816
16:40 dalek roast: review: https://github.com/perl6/roast/commit/5cea4946ce
16:40 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=72816
16:41 dalek perl6-roast-data: 3600641 | coke++ | / (5 files):
16:41 dalek perl6-roast-data: today (automated commit)
16:41 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/3600641c37
16:42 raydiak joined #perl6
16:46 telex joined #perl6
16:51 pierrot joined #perl6
16:51 jferrero joined #perl6
16:52 synopsebot joined #perl6
16:52 retupmoca moritz: could I get you to look at https://github.com/cosimo/perl6-lwp-simple/pull/42 ?
16:55 dalek nqp/native-ref: 4d77554 | jnthn++ | docs/6model/repr-compose-protocol.markdown:
16:55 dalek nqp/native-ref: Spec nativeref compose protocol.
16:55 dalek nqp/native-ref: review: https://github.com/perl6/nqp/commit/4d7755444b
17:00 lizmat hmmm... looks like STAT_EXISTS is false on a cyclic symlink
17:01 sivoais joined #perl6
17:02 jnthn Maybe that's the OS's way of saying "I can't bear to look..." :P
17:02 lizmat yeah, which simplifies things :-)
17:02 jnthn Well, depends how portable that result is :)
17:03 lizmat true
17:03 lizmat ok, I'll build in a safeguard just in case
17:05 hoelzro that's consistent with Perl 5
17:05 hoelzro (at least)
17:06 lizmat hoelzro: what is consistent exactly?
17:06 hoelzro lizmat: that -e $cyclic_symlink is falsy
17:06 hoelzro on my machine, anyway =)
17:06 lizmat ok, just checking to be 100% sure
17:07 moritz retupmoca: nag me again later today/tonight
17:07 moritz now decommuting&
17:07 hoelzro it makes sense, in a way
17:07 moritz jnthn: fwiw rakudo 6pe-mop successfully tested star on moarvm
17:07 hoelzro there's no end of the chain of symlinks, so stat returns ELOOP
17:08 jnthn hoelzro: What OS are you trying it on, ooc?
17:08 moritz really gone&
17:08 jnthn moritz: OK, cool! Thanks!
17:08 hoelzro jnthn: Arch Linux
17:08 jnthn OK, and lizmat is presumably on OSX.
17:08 hoelzro (I think any Linux distribution would do this, though)
17:08 lizmat yep
17:08 jnthn And it's moot on Windows.
17:08 jnthn OK, so I guess we can skip the safeguard... :)
17:08 hoelzro I think so
17:11 lizmat okidoki
17:15 lizmat ah, and the libuv function actually follows symlinked symlinks already, so even more simple :-)
17:16 _mg_ joined #perl6
17:17 lizmat ah, no, need to do that myself  :-(
17:18 sunnavy joined #perl6
17:19 FROGGS m: use Test; class Foo { method bar { } }; my $foo = Foo.new; my @a = <a b c d>; sub baz(|) { ok $foo.bar, "bar" }; for @a { for @a { baz @a } } # jnthn: that's [Tux]'s segfault
17:19 camelia rakudo-moar 8e9114: OUTPUT«(signal SEGV)not ok 1 - bar␤␤# Failed test 'bar'␤# at /tmp/sjtxnWMYjo line 1␤not ok 2 - bar␤␤# Failed test 'bar'␤# at /tmp/sjtxnWMYjo line 1␤not ok 3 - bar␤␤# Failed test 'bar'␤# at /tmp/sjtxnWMYjo line 1␤not ok 4 - bar␤␤# Faile…»
17:19 hoelzro lizmat: you're following the symlinks by hand?
17:19 FROGGS jnthn: I golfed it 'a little' because I was unable to follow the problem in moar
17:19 lizmat yes, that seems to be needed
17:20 hoelzro lizmat: is that in Moar, or in NQP/Rakudo?
17:20 hoelzro I remember deleting some manual symlink following logic from MoarVM a while back
17:20 jnthn FROGGS++
17:20 lizmat at the moment I do it in Perl 6
17:20 hoelzro ah ha
17:21 jnthn lizmat: What exactly do you need to handle, ooc?
17:21 dalek rakudo/newio: cf9e9fe | lizmat++ | src/core/IO.pm:
17:21 dalek rakudo/newio: Implement FILETEST-L
17:21 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/cf9e9fef2c
17:21 lizmat see above commit
17:21 PZt joined #perl6
17:22 alini joined #perl6
17:22 hoelzro what's -L, again?
17:22 jnthn lizmat: Remind me what -L is?
17:22 jnthn haha :)
17:22 lizmat readlink
17:22 jnthn lizmat: Should it recurse?
17:23 lizmat well, good question
17:23 jnthn It's not clear to me it should, fwiw.
17:23 jnthn 'cus then you have no way to get the "what exactly does this link to", plus we can't say it's the Perl 6 way of spelling readlink...
17:24 TimToady readlink should not recurse
17:24 dalek nqp-js: 7bb9ec8 | (Pawel Murias)++ | src/vm/js/ (3 files):
17:24 dalek nqp-js: Add a --nyi=warn option to nqp-js to print out NYI stuff to standard error.
17:24 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/7bb9ec8ffb
17:24 dalek nqp-js: 3539435 | (Pawel Murias)++ | TODO:
17:24 dalek nqp-js: Add a bunch of missing opcodes to TODO.
17:24 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/35394358c8
17:24 * hoelzro thought readlink followed symlinks already
17:24 Kristien joined #perl6
17:24 FROGGS lizmat: that's related: http://irclog.perlgeek.de/perl6/2014-11-10#i_9636226
17:24 Kristien hola
17:24 TimToady what if the program wants to count the indirections?
17:24 lizmat ok, fair enough  :-)
17:25 dustinm` joined #perl6
17:25 TimToady primitives need to be primitive
17:25 FROGGS TimToady: clearly we should expose a stat_file_get_indirections(...) like there probably exists in PHP :o)
17:25 dalek nqp-js: 0ee266e | (Pawel Murias)++ | HACKING:
17:25 dalek nqp-js: Add a scavenging hint.
17:25 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/0ee266e766
17:26 FROGGS[mobile] joined #perl6
17:26 FROGGS[mobile]2 joined #perl6
17:26 FROGGS[mobile]2 joined #perl6
17:27 dalek rakudo/newio: e4823c0 | lizmat++ | src/core/IO.pm:
17:27 dalek rakudo/newio: Primitives need to be primitive
17:27 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/e4823c0a68
17:27 hoelzro nope, nevermind
17:27 pmurias hoelzro: I added a bunch of stuff to the nqp-js TODO, they should be of varied difficulty
17:27 hoelzro pmurias: awesome, thanks!
17:30 ingy1 joined #perl6
17:31 lizmat TimToady: how about a "desymlink" function that *would* recurse ?
17:32 Alina-malina joined #perl6
17:32 FROGGS[mobile]2 "de"?
17:32 PerlJam lizmat: what's the use-case?
17:33 dalek doc: 42f0d4e | paultcochrane++ | lib/Language/mop.pod:
17:33 dalek doc: Typographical etc. corrections to mop.pod
17:33 dalek doc: review: https://github.com/perl6/doc/commit/42f0d4eb1c
17:33 dalek doc: de216c8 | paultcochrane++ | lib/Language/mop.pod:
17:33 dalek doc: Wrap paragraphs consistently in mop.pod
17:33 dalek doc: review: https://github.com/perl6/doc/commit/de216c8e61
17:33 dalek doc: f1699aa | paultcochrane++ | lib/Type/Metamodel/Finalization.pod:
17:33 lizmat well, -d on a symlink
17:33 dalek doc: Move X<DESTROY> into documentation body
17:33 dalek doc:
17:33 dalek doc: This stops htmlify from complaining that it can't find the =SUBTITLE.
17:33 dalek doc: review: https://github.com/perl6/doc/commit/f1699aae6d
17:33 TimToady it's just a one-liner, which argues that it's not much bloat, but also not much utility
17:34 lizmat I ran into this when testing tmpdir functionality
17:34 lizmat in OS X /tmp is a symlink
17:34 * TimToady agrees the use case is limited, not that may people are interested in absolute paths
17:34 lizmat I would like to know whether something resolves to a symlink or not
17:34 lizmat *many ?
17:34 TimToady ya
17:36 TimToady we don't need convenience features for seldom-used stuff
17:36 lizmat but this also implies that I can't really test for -d for features such as $*CWD
17:37 lizmat because they might be valid if they\re a symlink as well
17:37 lizmat hmmm...  I think I know another way  :-)
17:40 FROGGS[mobile]2 see the link I postet about stat
17:41 lizmat FROGGS[mobile]2: once I'm done with readlink, I'll do lstat  :-)
17:43 dalek nqp-js: 6b20680 | (Pawel Murias)++ | HACKING:
17:43 dalek nqp-js: Add a hint how to get beautified output.
17:43 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/6b2068098b
17:46 timotimo o/
17:46 dalek specs/newio: 3b5f3b8 | lizmat++ | S16-io.pod:
17:46 dalek specs/newio: Readlink is not used often, so de-hufmannize
17:46 dalek specs/newio: review: https://github.com/perl6/specs/commit/3b5f3b8b1d
17:49 Rounin joined #perl6
17:50 dalek rakudo/newio: 3d80ceb | lizmat++ | src/core/IO.pm:
17:50 dalek rakudo/newio: FILETEST-L -> FILETEST-READLINE
17:50 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/3d80cebac5
17:51 FROGGS[mobile]2 lizmat++
17:51 geekosaur READLINK?
17:51 geekosaur (hopefully that's just a commit message typo)
17:52 lizmat yes, commit message typo  :-(
17:52 lizmat too late to fix now
17:52 TimToady doesn't need to be THAT dehuffmanized :)
17:57 * TimToady hits the road again for Seattle...
17:57 TimToady afk &
17:58 Mouq joined #perl6
17:59 lue joined #perl6
18:02 molaf joined #perl6
18:10 tgt joined #perl6
18:51 Alina-malina joined #perl6
18:54 rindolf joined #perl6
18:54 diana_olhovik joined #perl6
19:03 nsharrok joined #perl6
19:06 Kristien .tell vendethiel I decided to write a custom VM
19:06 yoleaux Kristien: I'll pass your message to vendethiel.
19:06 Kristien yoleaux: thanks you're great
19:08 * moritz blug again: http://perlgeek.de/blog-en/perl-6/2015-doc-perl6-org.html
19:10 _mg_ joined #perl6
19:10 jnthn moritz++
19:12 alini joined #perl6
19:15 beastd joined #perl6
19:19 nsharrok left #perl6
19:20 pmichaud moritz++
19:20 pmichaud I also wonder if there's a place for "what's the p6 equivalent of p5's XYZ?"
19:22 moritz pmichaud: there's certainly a place for that, though it's not on my personal agenda
19:22 kjs_ joined #perl6
19:23 Hor|zon joined #perl6
19:23 moritz pmichaud: also it might be economical to wait and see if there is really going to be a big migration movement from 5 to 6 at some point
19:24 moritz pmichaud: maybe our users will come from unexpected corners (like the go folks expecting to attact C programmers, and attracted many python programmers)
19:26 dalek rakudo/nom: 7f20855 | moritz++ | src/core/ (2 files):
19:26 dalek rakudo/nom: move X::Does::TypeObject to operators.pm
19:26 dalek rakudo/nom:
19:26 dalek rakudo/nom: it reads much nicer to have the exception defined close to where it is thrown
19:26 dalek rakudo/nom:
19:26 dalek rakudo/nom: Also record the type that was attempt to mix into
19:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7f20855734
19:26 retupmoca moritz++ # blog
19:26 dalek doc: bfefd0a | moritz++ | lib/Type/X/Does/TypeObject.pod:
19:26 dalek doc: Document X::Does::TypeObject.type
19:26 dalek doc: review: https://github.com/perl6/doc/commit/bfefd0aa99
19:26 dalek doc: 70de3c2 | moritz++ | util/sync-build-log:
19:26 dalek doc: Avoid syncing the results of a failed build
19:26 dalek doc: review: https://github.com/perl6/doc/commit/70de3c2e25
19:27 retupmoca moritz: also, now nagging you again about LWP::Simple PR :)
19:27 virtualsue joined #perl6
19:29 moritz retupmoca: looking...
19:29 moritz retupmoca: first piece of feedback: I'd appreciate separate features in separate pull requests
19:29 moritz retupmoca: but that won't stop me from merging them :-)
19:30 retupmoca sorry, will split them in the future
19:31 alini joined #perl6
19:32 pmichaud my p5 question isn't driven by expected migration as much as within the past week I've already fielded a number of questions of the form "what's Perl 6's equivalent to Perl 5's ______?"   So it's at least a frequently asked question.
19:32 moritz pmichaud: that *is* a good reason for putting it into the docs
19:33 moritz pmichaud: please collect the specific quesitions you were ask (as far as you remember them)
19:33 pmichaud well, one was about unpack
19:33 pmichaud another was __FILE__
19:34 pmichaud another one that comes up (but is already documented) is "length"
19:37 pmichaud another one (that I didn't have an answer for) was Moose's "required" flag on attributes
19:37 jnthn has $.foo = die "You must have a foo"; # or write an 'is required' trait that does the right thing; I'm sure there'll be modules
19:37 Hor|zon joined #perl6
19:38 pmichaud jnthn++, but I'm also interested in seeing that documented/answered somewhere.  the "required" question has come up for me at least twice within the past few months
19:39 pmichaud anyway, these questions just made me wonder about a p5-to-p6 index of some sort.
19:40 jnthn It probably makes sense to have a place to collect them.
19:40 pmichaud I'm afk for a while... probably until Monday-ish
19:41 jnthn Have a good weekend
19:42 [ptc] moritz++ # blog
19:44 dalek doc: 82740f8 | paultcochrane++ | lib/Language/objects.pod:
19:44 dalek doc: Typographical etc. corrections to objects.pod
19:44 dalek doc: review: https://github.com/perl6/doc/commit/82740f809b
19:44 dalek doc: cd2bed6 | paultcochrane++ | lib/Language/objects.pod:
19:44 dalek doc: Wrap paragraphs consistently in objects.pod
19:44 dalek doc: review: https://github.com/perl6/doc/commit/cd2bed6312
19:44 dalek doc: e340b18 | paultcochrane++ | / (2 files):
19:44 dalek doc: Merge branch 'master' of github.com:perl6/doc
19:44 dalek doc: review: https://github.com/perl6/doc/commit/e340b1804e
19:45 jdv79 whoa.  wasn't there a perl 5 wiki that ?Schwern? spearheaded?  i thought there was also a perl 6 wiki that looked similar.  i can't find either.
19:49 muraiki yeah, a wiki might be a nice way to let people contribute to docs
19:50 FROGGS joined #perl6
19:51 hoelzro it would be nice to be able to easily find information on operators, or p5->p6 info (ex. "p5: $0")
19:51 FROGGS std: $0
19:51 camelia std f9b7f55: OUTPUT«ok 00:00 135m␤»
19:52 jdv79 it looks like the perl5 wiki was taken down
19:52 skids jdv79: The old stuff on http://www.perlfoundation.org/perl6/index.cgi?documentation is still up, if you meant that.
19:53 dustinm` joined #perl6
19:53 jdv79 oh, look at that.
19:54 muraiki is this "old stuff" in the sense of "stuff that's out of date and misleading?" :)
19:54 skids Some of it.
19:54 skids Some could use to be harvested into docs, with some proofreading, probably.
19:55 Kristien joined #perl6
19:55 skids But don't bother to improve on that site because everyone hated editing using it.
19:56 muraiki haha
19:57 jdv79 wow, its like peering back 5/10 years ago
19:57 jdv79 all old
19:57 Util_ moritz++ # For blog, p.s. doc.perl6.org is very nice
19:58 Util_ moritz: re: "searching for variables, syntactic constructs and keywords isn't easily possible"
19:58 Util_ Yesterday, I was thinking about this need, and started writing to meet it, but then I found these:
19:58 Util_ http://www.perlfoundation.org/perl6/index.cgi?witch     What Is This Character Here (WITCH)
19:58 Util_ http://www.perlfoundation.org/perl6/index.cgi?perl_6_index_tablet
19:58 Util_ Just FYI, as something to steal entries or organizational ideas from.
19:58 ugexe is there an easier way to search a Buf for a specific (in this case 3 bytes) sub-buffer other than using a loop like `for ^$buf.bytes { return 'utf8' if $buf.subbuf($_, 3) eqv Buf.new(0xEF, 0xBB, 0xBF) }`?
19:59 Util Oh, I see conversation has outpased me :)
19:59 FROGGS ugexe: this might be faster: https://github.com/sergot/http-useragent/blob/master/lib/HTTP/UserAgent.pm6#L54
20:00 jdv79 i think some of that is on http://www.perl6.org/documentation/ already
20:00 Util ugexe: will the .subbuf method work for your purpose?
20:03 ugexe it only needs to search the first 1024 bytes, so speed isnt too important. mostly just trying to do it as perl6y as possible
20:04 FROGGS ugexe: I'd like to see a method on Blob or so for that purpose
20:04 ugexe fwiw its something im working on for decoding detection for http::useragent
20:05 moritz fwiw a possible workaround is to decode as latin-1, and then use string methods
20:05 ugexe im not sure about latin-1, but for instance decoding baidu.com as 'ascii' caused an error
20:06 moritz ugexe: ascii != latin-1
20:06 moritz ugexe: ascii maps only half of the possible bytes
20:06 moritz ugexe: but latin-1 (or at least our implementation of it) maps all
20:07 ugexe ah. i almost considered using unpack('A1024')
20:08 ugexe i assume for someone in the US that is likely using latin-1?
20:08 * moritz assumes so too
20:09 FROGGS TimToady: what do you think, do we want a .index method on Buf?
20:09 Util ugexe: Idiomatic Perl 6 that does not need to be efficient... Hmmm. Untested:
20:09 Util return 'utf8' if any(map {$buf.subbuf($_, 3)}, (^( [max] $buf.bytes - 3, 1024))) eqv Buf.new(0xEF, 0xBB, 0xBF)
20:12 geekosaur danger will robinson! the byte order mark is only defined in utf16, not utf8!
20:13 dalek rakudo/native-ref: 6f5d937 | jnthn++ | / (2 files):
20:13 dalek rakudo/native-ref: Add a NativeRefHOW.
20:13 dalek rakudo/native-ref: review: https://github.com/rakudo/rakudo/commit/6f5d937c01
20:13 dalek rakudo/native-ref: 24974ca | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
20:13 dalek rakudo/native-ref: Basic bootstrap of various native ref types.
20:13 dalek rakudo/native-ref: review: https://github.com/rakudo/rakudo/commit/24974ca21a
20:14 espadrine joined #perl6
20:15 FROGGS I think that is quite 6y:
20:15 FROGGS m: my $a = lines[0].encode; my $b = utf8.new(0x6d, 0x61, 0x6f);    say $a.list.first-index({ $a.list[(state $i = -1) .. $i++ + $b.elems] ~~ $b.list });
20:15 dustinm` joined #perl6
20:15 camelia rakudo-moar 8e9114: OUTPUT«25␤»
20:20 ugexe what does `my $a = lines[0].encode;` do? set the default encoding to something?
20:20 FROGGS ugexe: encodes the given string to a Buf type (utf8 by default)
20:20 FROGGS m: say lines[0] # just some sample input
20:20 camelia rakudo-moar 8e9114: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤»
20:20 FROGGS m: say lines[0].encode
20:20 camelia rakudo-moar 8e9114: OUTPUT«utf8:0x<43 c3 a9 61 64 20 73 6c c3 a1 6e 20 61 67 20 73 6c c3 a9 69 62 68 74 65 20 6d 61 6f 72 67 61 20 43 68 6f 6e 74 61 65 20 44 68 c3 ba 6e 20 6e 61 20 6e 47 61 6c 6c>␤»
20:21 FROGGS see
20:21 ugexe ah gotcha
20:22 skids I always get envious when I see .gist use 0x< >
20:25 FROGGS would be nice to have that as literals
20:25 skids I'm happy to wait for 6.1.0 for that though :-)
20:25 FROGGS :o)
20:25 FROGGS me too
20:34 Ugator left #perl6
20:41 retupmoca moritz++ # accepting PR
20:45 moritz jnthn: p-spectest and j-spectest are both clean after a 6pe-mop merge
20:46 moritz jnthn: testing star now, though it's slooow, and I don't know the exact expected outcomes (iirc both p-star and j-star aren't clean)
20:51 kjs_ joined #perl6
20:52 jnthn moritz++
20:58 [Coke] moritz++ indeed.
21:00 rurban__ joined #perl6
21:04 moritz [Coke]: fwiw parrot star doesn't hang anymore during module build (nor during test), so it would be awesome if you could re-enable it for your daily star runs
21:06 ingy joined #perl6
21:11 bobv joined #perl6
21:15 hoelzro would if my $value = routine() { ... } be considered an anti-pattern?
21:16 hoelzro coming from Perl 5, I can see how a lot of others would make that mistake
21:17 jnthn hoelzro: That's a parse error, isn't it?
21:17 hoelzro m: if my $a = 3 { say $a }
21:17 camelia rakudo-moar 7f2085: OUTPUT«3␤»
21:17 jnthn m: oh
21:17 camelia rakudo-moar 7f2085: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/DqLl29Qb8Kâ�¤Undeclared routine:â�¤    oh used at line 1. Did you mean 'on'?â�¤â�¤Â»
21:17 moritz m: if my $v = sin(42) { say $v }
21:17 jnthn duh :)
21:17 hoelzro m: if my $a = 3 { say $a } ; say $a
21:17 camelia rakudo-moar 7f2085: OUTPUT«-0.916521547915634␤»
21:17 camelia rakudo-moar 7f2085: OUTPUT«3␤3␤»
21:17 jnthn Misread :)
21:18 moritz hoelzro: well,    if function() -> $value { ... } is certainly more idiomatic
21:18 hoelzro jnthn: I was thinking about if a warning should be issued for that (not likely by default, though)
21:18 jnthn But yeah, you probably want if 3 ->$a { say $a }
21:18 hoelzro jnthn: exactly
21:18 * moritz chants linter, linter, linter
21:18 jnthn Not sure it wants a warning under normal conditions, feels more like a critic style thing
21:18 hoelzro jnthn, moritz: right
21:19 hoelzro is there an existing linter project?
21:19 psch it's not a mistake as such, is it?
21:19 hoelzro psch: well, to me, it would be
21:20 psch hoelzro: because the var stays alive outside the if scope?
21:20 psch (if it does.. :s )
21:20 psch m: sub foo { "bar" } ; if my $baz = foo() { say $baz }; say $baz
21:20 camelia rakudo-moar 7f2085: OUTPUT«bar␤bar␤»
21:20 psch i don't disagree that it's not idiomatic, fwiw
21:20 hoelzro because if I use if(my $value = routine()) { ... } in Perl 5, I expect $value to go out of scope after the if block
21:21 hoelzro in Perl 6, it does *not* go out of scope
21:22 psch i guess i agree with moritz and jnthn, too much visibility for a variable seems like something for a linter
21:22 hoelzro that sounds good to me
21:25 dalek rakudo/native-ref: 4d1b9de | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
21:25 dalek rakudo/native-ref: Register native reference types with HLL.
21:25 dalek rakudo/native-ref: review: https://github.com/rakudo/rakudo/commit/4d1b9de7a9
21:26 japhb Is there a tempfile/tempdir generator in core?  I know I'm tired, but 1. I could swear we had one, and 2. I'm not seeing it in the grep results (just the thing in IO::Spec that returns the machine tmp dir for each OS)
21:27 psch japhb: ecosystem has File::Temp
21:30 japhb psch++ # Thanks
21:30 dj_goku_ joined #perl6
21:40 grettir joined #perl6
21:40 dalek rakudo/native-ref: 3c56352 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp:
21:40 dalek rakudo/native-ref: Configure native ref types as containers.
21:40 dalek rakudo/native-ref: review: https://github.com/rakudo/rakudo/commit/3c5635299f
21:42 [Sno] joined #perl6
21:44 dalek star: aece474 | moritz++ | docs/announce/2015.01.md:
21:44 dalek star: release announcement: mention that parrot support maybe suspended/dropped in future
21:44 dalek star: review: https://github.com/rakudo/star/commit/aece474bf1
21:44 beastd|2 joined #perl6
21:46 dj_goku joined #perl6
21:46 dj_goku joined #perl6
21:48 moritz http://moritz.faui2k3.org/tmp/rakudo-star-2015.01-RC1.tar.gz # R* hopefully final release candidate
21:56 skids started it building on my 32-bit system.  If it doesn't abort, it might still be running when I get home in an hour :-)
22:04 Peter_R So what's the rational for stuff in if conditions not being scoped to the if?
22:04 FROGGS_ joined #perl6
22:04 psch Peter_R: the my in "if my $a" is scope at the same level as the if
22:04 Peter_R Indeed, but why
22:05 jnthn Peter_R: Simpler scoping rules: things are declared inside the pair of curlies you see them in.
22:05 moritz Peter_R: scoping is tied to blocks of curlies and their signatures
22:05 psch Peter_R: while the formal parameter to the block in "if foo() -> $x { }" is scoped to the block
22:05 Peter_R e.g. I find my $a; if blah to be more intuitive
22:05 psch because "-> $x { }" is general "this is a param to the block" syntax
22:05 moritz Peter_R: and nothing stops you from writing that
22:06 timotimo moritz: how do we feel about a comments/questions section in docs.perl6.org?
22:06 moritz timotimo: negatively
22:06 Peter_R psch, as long as there is a way and it isn't too bad to use, sounds alright :)
22:07 moritz timotimo: the comments often get out of date, and then I don't know what to do with them. And they need to be modreated.
22:07 moritz timotimo: if you are looking for ways to make contributions easier, a link to the respective source file on github would be a better way
22:08 Peter_R Hmm, this is actually better than the P5 way, because I'll never have to write my $persists; if($persists = ...
22:09 timotimo OK
22:09 Mouq joined #perl6
22:11 hoelzro what powers the search bar on doc.perl6.org?
22:13 raydiak hoelzro: jqueryui autocomplete widget + static generation at htmlify time
22:13 hoelzro oh, so the terms are embedded in a JS file, or in the HTML?
22:13 raydiak in the js
22:13 raydiak https://github.com/perl6/doc/blob/master/template/search_template.js
22:13 hoelzro interesting
22:14 raydiak and https://github.com/perl6/doc/blob/master/htmlify.p6#L529
22:14 raydiak the end result is no extra traffic once the js is cached, and zero server load for the searches
22:15 hoelzro right, it's quite clever
22:15 hoelzro I'm thinking about the conversation earlier, about moritz' blog post
22:15 raydiak I thought so too...I didn't design it, just integrated it
22:15 * raydiak backlogs
22:16 hoelzro (about 2.5h ago)
22:16 alini joined #perl6
22:16 moritz http://perlgeek.de/blog-en/perl-6/2015-doc-perl6-org.html that's the post
22:17 hoelzro one thing I think about is "what if someone searches for ':'"?
22:17 hoelzro or 'colon'
22:18 raydiak well it used to handle all kinds of funny chars, but over time things have gotten out of sync and urls are wrong depending on what generated them
22:18 hoelzro it would be nice if we had an interface that described invocants in signatures, paren-less call syntax, labels, etc
22:19 hoelzro I was thinking about other types of searches users might do (based on what I've asked, thought of, and seen here)
22:19 raydiak it would be nice if it generated a more extensive index perhaps, instead of just types and routines like moritz++'s blog says
22:19 hoelzro mhmm
22:19 hoelzro I feel like operators would be a good (yet difficult) next step
22:19 moritz hoelzro: maybe a bit like we handle routines, for example http://doc.perl6.org/routine/type
22:20 moritz hoelzro: that's simply the docs from all routines called 'type', and where they come from
22:20 hoelzro yeah, that would work
22:20 moritz we could the same for syntax/colon or syntax/:
22:20 hoelzro the canonical URL for ':' could be doc.perl6.org/operator/colon
22:20 hoelzro ooo, I like "syntax" better
22:20 moritz ... once we actually have the description, and index it will the relevant characters
22:21 hoelzro moritz: yes, that's the real work, isn't it? =)
22:21 moritz anyway, time for sleep here. See y'all tomorrow
22:21 moritz hoelzro: aye
22:21 moritz &
22:21 raydiak g'night moritz
22:21 hoelzro o/ moritz
22:21 timotimo moritz: how do we feel about linking to this here IRC channel from docs.perl6.org more prominently? or maybe have some sort of "private-ish comment thread per page" thing?
22:21 timotimo oh, i should get to bed, too!
22:21 timotimo o/
22:21 hoelzro timotimo: I was thinking about something like that as well
22:22 hoelzro kind of like perlbot on #perl
22:22 raydiak good night timo
22:22 hoelzro o/ timotimo
22:24 jnthn 'night, moritz++
22:24 jnthn And timotimo :)
22:27 kaare_ joined #perl6
22:27 colomon joined #perl6
22:29 colomon joined #perl6
22:30 grettir joined #perl6
22:34 Mouq moritz++
22:34 Araq joined #perl6
22:35 pmurias joined #perl6
22:38 Mouq Re: nativetypes: htmlify *shouldn't* care what the filename is... it's designed to be able to read definitions (`=h1 class int`) where ever it finds them, so something like "lib/Type/native_int.pod" *should* work fine. This hypothesis is however untested
22:38 * Mouq will work to document htmlify this weekend
22:39 dolmen joined #perl6
22:39 raydiak .oO( metadocumentation )
22:39 Mouq Or perhaps, more generally, adding docs for contributing to the docs
22:39 Mouq raydiak: Beat me to the punch :9
22:39 raydiak :)
22:40 * Mouq has to do some cleaning first, alas
22:45 nebuchadnezzar joined #perl6
22:46 telex joined #perl6
22:46 raydiak wrt search I wonder if we should have an indirection page for everything (not just syntax), and build a per-search-term result page which lists all doc pages containing a hit (sorted by hits); also wonder how much execution time that would add to htmlify
22:46 Araq left #perl6
22:49 raydiak easier even, have a big index listing page somewhere like you find in the back of a book, and have an 'Index: search-term' result listed for each term in the index which just links to an anchor on the big index page
22:50 raydiak (marginally easier, anyway)
22:50 adu joined #perl6
22:50 jnthn If you're already doing jQuery UI for the search to work at all, could just generate a JSON blob mapping term to result set...
22:51 jnthn And use that blob to project out the list of terms for completion, and to generate the result list
22:57 Mouq raydiak: Don't we already do that with the disambiguation pages?
22:57 virtualsue_ joined #perl6
22:57 Mouq Oh, per-search-term
22:57 raydiak Mouq: we have disambiguation pages?
22:58 Mouq For example: http://doc.perl6.org/routine/temp
22:58 Mouq Or just http://doc.perl6.org/temp
22:59 raydiak oh I haven't seen that...then yes perhaps we are :)
22:59 * Mouq wonders why we don't seem to have an infix:<+> in the docs
23:02 Mouq Weird...
23:02 * Mouq submits an issue for this bug
23:09 rurban joined #perl6
23:12 Mouq So, htmlify has bulked up to an ungainly 743 hardly commented lines. I'm planning to review the code and pull what's sensible into individual modules.
23:15 colomon joined #perl6
23:16 Mouq Also, we have several files in lib/Perl6/ and lib/Pod that could be reclassified into their own repositories. One advantage of this is that they'd be more likely to be installed via panda, aka compiled, aka faster
23:23 jnthn sleep; 'night
23:24 raydiak g'night jnthn...sorry I didn't get back to your suggestion, I'm still mulling it over...sent my wheels spinning in several different directions :)
23:25 Mouq night jnthn :0
23:25 Mouq :)
23:25 Mouq *
23:28 BenGoldberg joined #perl6
23:29 BenGoldberg joined #perl6
23:30 Mouq Inspired by the conversation a few nights ago about adding to core, I created https://github.com/Mouq/p6-Syntax-GetMethod
23:30 Mouq Please review :)
23:34 colomon joined #perl6
23:45 BenGoldberg m: class Human { has $!name; method whoami { $!name } }; say &Human::whoami;
23:45 camelia rakudo-moar 7f2085: OUTPUT«(Any)␤»
23:45 BenGoldberg m: class Human { has $!name; method whoami { $!name } }; say &Human::asdfsadf;
23:45 camelia rakudo-moar 7f2085: OUTPUT«(Any)␤»
23:46 BenGoldberg What's happening there?
23:46 Mouq p6: say &Huh::wtf
23:46 camelia rakudo-{parrot,moar} 7f2085: OUTPUT«(Any)␤»
23:47 Mouq p6: say &Huh::wtf; module Huh { our sub wtf { 42 } }
23:47 camelia rakudo-parrot 7f2085: OUTPUT«sub wtf () { #`(Sub|5227838163442078284) ... }␤»
23:47 camelia ..rakudo-moar 7f2085: OUTPUT«sub wtf () { #`(Sub|77553728) ... }␤»
23:47 Mouq Looks like something isn't doing parse-time checking properly
23:48 BenGoldberg m: module Foo { }; class Foo { }; say 1;
23:48 camelia rakudo-moar 7f2085: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/un_TACniGdâ�¤Redeclaration of symbol Fooâ�¤at /tmp/un_TACniGd:1â�¤------> [32mmodule Foo { }; class Foo [33mâ��[31m{ }; say 1;[0mâ�¤    expecting any of:â�¤        generic roleâ�¤Â»
23:49 BenGoldberg If it's illegal to have both a module and a class of the same name, then we could use the same syntax for finding a function in a module and finding a method in a class.
23:50 Mouq m: class Foo { method bar { 42 }; our sub bar { "not 42" } }; my &bar = Foo::bar; say bar
23:50 camelia rakudo-moar 7f2085: OUTPUT«Type check failed in assignment to '&bar'; expected 'Callable' but got 'Str'␤  in block <unit> at /tmp/YwVE8EOR0x:1␤␤»
23:50 Mouq Er
23:50 Mouq m: class Foo { method bar { 42 }; our sub bar { "not 42" } }; my &bar = &Foo::bar; say bar
23:50 camelia rakudo-moar 7f2085: OUTPUT«not 42␤»
23:53 skids joined #perl6
23:54 BenGoldberg m: class Human { has $!name; method whoami { $!name }; our sub asdf { 'jkl;' }; }; say &Human::asdf;
23:54 camelia rakudo-moar 7f2085: OUTPUT«sub asdf () { #`(Sub|71062016) ... }␤»
23:54 BenGoldberg m: class Human { has $!name; method whoami { $!name }; our sub asdf { 'jkl;' }; }; say &Human::asdf :method;
23:54 camelia rakudo-moar 7f2085: OUTPUT«sub asdf () { #`(Sub|60113488) ... }␤»
23:54 BenGoldberg Does that :method (which obviously doesn't do anything here) get passed to say?
23:57 BenGoldberg Because adding a named parameter is, imho, probably more perl6-ish than adding yet more syntax...
23:58 Mouq BenGoldberg: I'm not really sure where that method's going. It gets parsed as a fake_infix
23:59 Mouq It looks like it just gets thrown away?
23:59 Mouq :/

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

Perl 6 | Reference Documentation | Rakudo