Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-08-31

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:03 mcmillhj joined #perl6
00:04 * TimToady boarding for SJC &
00:17 kyclark joined #perl6
00:19 crucialrhyme does p6 have something that serves the same purpose as python's "with", or initializing resources in Java "try" statements? like to open a file for a block and automatically clean up no matter what happens?
00:27 avuserow crucialrhyme: check out the LEAVE phaser and the `will leave` constructs
00:27 avuserow m: my $x will leave {note "got here";}; say "hi"; die "omg";
00:27 camelia rakudo-moar b1c444: OUTPUT«hi␤got here␤omg␤  in block <unit> at <tmp> line 1␤␤»
00:29 avuserow crucialrhyme: https://docs.perl6.org/language/phasers
00:29 harmil Good flight, TimToady
00:33 crucialrhyme avuserow: thanks. so put the cleanup inside the "will leave" block?
00:34 avuserow yeah, so maybe something like: my $fh = open(...) will leave {.close;} # the variable itself is available as $_ in the block
00:34 avuserow or if it's not attached to a single variable, just do: LEAVE { #`(cleanup here) }
00:35 crucialrhyme cool! this is definitely a case where $_ is pretty nice
00:36 [Coke] skids: marked
00:37 skids [Coke]++
00:51 Actualeyes joined #perl6
00:59 mcmillhj joined #perl6
01:01 BenGoldberg joined #perl6
01:02 itaipu joined #perl6
01:04 perigrin joined #perl6
01:05 cyphase joined #perl6
01:08 itaipu joined #perl6
01:18 mcmillhj joined #perl6
01:34 mcmillhj joined #perl6
01:37 Ulti joined #perl6
01:37 mrf joined #perl6
01:40 danlei joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:53 mcmillhj joined #perl6
01:54 zengargoyle joined #perl6
02:07 mcmillhj joined #perl6
02:07 pierre_ joined #perl6
02:07 ilmari[m] joined #perl6
02:07 MasterDuke joined #perl6
02:08 pierre_ joined #perl6
02:12 kyclark joined #perl6
02:17 itaipu joined #perl6
02:22 mcmillhj joined #perl6
02:32 wamba joined #perl6
02:34 mcmillhj joined #perl6
02:37 bob777 joined #perl6
02:39 tadzik joined #perl6
02:39 M-Illandan joined #perl6
02:39 Matthew[m] joined #perl6
02:41 noganex_ joined #perl6
02:46 kyclark joined #perl6
02:50 itaipu joined #perl6
02:50 kyclark joined #perl6
02:52 markk joined #perl6
02:52 mcmillhj joined #perl6
03:07 mcmillhj joined #perl6
03:18 mcmillhj joined #perl6
03:23 itaipu joined #perl6
03:31 pierre_ joined #perl6
03:33 aries_liuxueyang joined #perl6
03:36 pierre_ joined #perl6
03:40 BinGOs joined #perl6
03:42 labster joined #perl6
03:45 mcmillhj joined #perl6
03:45 pierre_ joined #perl6
03:45 Actualeyes1 joined #perl6
03:49 bjz joined #perl6
03:49 pierre_ joined #perl6
03:52 kyclark joined #perl6
03:56 aries_liuxueyang joined #perl6
04:01 BillSussman joined #perl6
04:02 mcmillhj joined #perl6
04:07 itaipu joined #perl6
04:09 aries_liuxueyang joined #perl6
04:16 obfusk_ joined #perl6
04:17 mcmillhj joined #perl6
04:17 markk joined #perl6
04:18 Kaffe joined #perl6
04:20 Cabanossi joined #perl6
04:20 aries_liuxueyang joined #perl6
04:26 labster joined #perl6
04:33 * TimToady and Glo are home, admiring our Very Own Bed
04:35 TimToady s/our/their/
04:38 aries_liuxueyang joined #perl6
04:40 Xliff_zzzzz \o
04:40 Xliff Well, my EXPORT experiment seems to be working, however there are odd issues that I have encountered.
04:41 Xliff Given a signature of EXPORT(*@a), I can get things to work when the invocation is "use Module <a b>"
04:41 canopus joined #perl6
04:41 Xliff However, "use Module <a>" and just plain "use Module" will complain with a weird error.
04:41 Xliff "Cannot find method 'merge-symbols': no method cache and no .^find_method"
04:41 Xliff And this is in stage parse...
04:41 Xliff Is this a bug?
04:42 Xliff When I try turing EXPORT into a multi, things stay the same.
04:42 Xliff "multi sub EXPORT" with a returned map won't compile either.
04:43 Xliff Neither will "multi sub EXPORT($a)"
04:43 Xliff I can get the single case of "use Module <a>" working if I do "use Module <a>.list"
04:43 Xliff But that's ugly and would not make much sense to any consumers of my module.
04:44 Xliff Any thoughts?
04:48 mcmillhj joined #perl6
04:55 pierre_ joined #perl6
04:58 grondilu joined #perl6
04:58 SmokeMachine____ Hi! If I have: class A { class B{} } # is there any method that I can call on A::B that returns A?
05:01 mcmillhj joined #perl6
05:02 SmokeMachine____ m: my $ab; classA{ $ab = class B{} }; say $ab.^methods
05:02 camelia rakudo-moar b1c444: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    classA used at line 1␤␤»
05:03 SmokeMachine____ m: my $ab; class A{ $ab = class B{} }; say $ab.^methods
05:03 camelia rakudo-moar b1c444: OUTPUT«()␤»
05:03 SmokeMachine____ Of course...
05:04 SmokeMachine____ m: my $ab; class A{ $ab = class B{} }; say $ab
05:04 camelia rakudo-moar b1c444: OUTPUT«(B)␤»
05:05 SmokeMachine____ m: my $ab; class A{ $ab = class B{} }; say $ab.keys
05:05 camelia rakudo-moar b1c444: OUTPUT«()␤»
05:05 SmokeMachine____ m: my $ab; class A{ $ab = class B{} }; say A.keys
05:05 camelia rakudo-moar b1c444: OUTPUT«()␤»
05:07 SmokeMachine____ m: class A{ class B{} }; say A.keys
05:07 camelia rakudo-moar b1c444: OUTPUT«()␤»
05:07 SmokeMachine____ m: class A{ class B{} }; say ::A.keys
05:07 camelia rakudo-moar b1c444: OUTPUT«()␤»
05:07 avuserow m: class A { class B {} }; say A::.keys
05:07 camelia rakudo-moar b1c444: OUTPUT«(B)␤»
05:08 shantanu has anyone written a binding with FreeType for Perl6 yet?
05:08 SmokeMachine____ avuserow: that's it! And to get the opposite? I have the A::B and wants A?
05:09 SmokeMachine____ Any idea?
05:09 grondilu m: class A { class B {} }; say $A::B::?CLASS;
05:09 camelia rakudo-moar b1c444: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus postfix␤at <tmp>:1␤------> 3class A { class B {} }; say $A::B::7⏏5?CLASS;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        s…»
05:09 grondilu m: class A { class B {} }; say A::B::?CLASS;
05:09 camelia rakudo-moar b1c444: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Bogus postfix␤at <tmp>:1␤------> 3class A { class B {} }; say A::B::7⏏5?CLASS;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        st…»
05:10 grondilu meh
05:10 grondilu m:  class A { say ::?CLASS }
05:10 camelia rakudo-moar b1c444: OUTPUT«(A)␤»
05:10 grondilu m:  class A { class B { say ::?CLASS } }
05:10 camelia rakudo-moar b1c444: OUTPUT«(B)␤»
05:11 avuserow I don't know if there's a hierarchy that's being created which would let you do that :\
05:11 SmokeMachine____ Isn't there any arte like the Attribute's package attr?
05:12 SmokeMachine____ *attr
05:13 avuserow m: class A { class B { method get-outer { say OUTER::OUTER::<$?PACKAGE> } } }; A::B.get-outer; # Stuff like this works
05:13 camelia rakudo-moar b1c444: OUTPUT«(A)␤»
05:13 itaipu joined #perl6
05:13 SmokeMachine____ Hum!!!
05:14 SmokeMachine____ Thanks!
05:16 SmokeMachine____ Will it work for a method "injected" by a metaclass?
05:16 SmokeMachine____ Outer is about the lexical scope, right?
05:17 SmokeMachine____ Thanks.. I'll try tomorrow
05:17 SmokeMachine____ Have a goodnight
05:18 avuserow yeah I think it's scope. CALLER is for call stack :)
05:32 jjido joined #perl6
05:33 mcmillhj joined #perl6
05:34 CIAvash joined #perl6
05:44 rindolf joined #perl6
06:01 itaipu joined #perl6
06:04 pierre_ joined #perl6
06:06 pierre_ joined #perl6
06:20 brrt joined #perl6
06:23 itaipu joined #perl6
06:25 elohmrow joined #perl6
06:28 elohmrow so p6 on jvm i can now build but still can't get panda or zef ... so trying to install a module by hand gets me error like L29 here: https://gist.github.com/lizmat/ab00347d5cc44a23c65b
06:31 firstdayonthejob joined #perl6
06:31 nine bartolin: ^^^
06:33 nine Xliff: it's odd. I don't remember having such a hard time with Inline::Perl5's generated EXPORT subs: https://github.com/niner/Inline-Perl5/blob/master/lib/Inline/Perl5.pm6#L863
06:33 mcmillhj joined #perl6
06:34 Wiertek joined #perl6
06:36 domidumont joined #perl6
06:42 domidumont joined #perl6
06:49 mcmillhj joined #perl6
07:02 stux|RC-only joined #perl6
07:04 itaipu joined #perl6
07:12 Xliff nine: How did you generate EXPORT subs?
07:13 nine Xliff: have you looked at the code?
07:14 nine Xliff: Inline::Perl5 is a bit special, since the EXPORT subs are not for itself but for the loaded Perl 5 modules. So that use Foo:from<Perl5> <bar baz>; does the right thing
07:18 sivoais joined #perl6
07:20 Wiertek joined #perl6
07:21 elohmrow Xliff: you are using Inline::Perl5 on Moar, right, not jvm?
07:22 * elohmrow is trolling to see if anyone could build any modules on jvm backend :)
07:23 nightsh joined #perl6
07:24 Possum joined #perl6
07:26 Xliff Not using Inline::Perl5 at all. Just trying to write a custom EXPORT sub to handle selective module loading.'
07:26 aries_liuxueyang joined #perl6
07:26 Xliff I have A::B, and I have modules A::B::C through A::B::F
07:27 darutoko joined #perl6
07:27 Xliff if a user says "use A::B <c d>" I don't want it loading A::B::E or A::B::F
07:27 elohmrow right
07:28 Xliff However, I have that last part working.
07:28 sivoais joined #perl6
07:28 elohmrow I thought I read something in the docs about this yest, but I am sure you already read that too
07:28 Xliff It's when I try "use A::B" or "use A::B <c>" where I run into a problem.
07:28 nine Xliff: can you paste your code somewhere?
07:29 Xliff It's currently on github
07:29 Xliff https://github.com/Xliff/p6-color-names/blob/master/lib/Color/Names.pm
07:29 leont joined #perl6
07:30 Xliff I can get "use A::B <c>.list" to work
07:30 Xliff But "use A::B" does  not
07:30 Xliff And neither does "use A::B <c>"
07:31 cibs joined #perl6
07:31 leont What's @INC called in p6?
07:31 timotimo m: say $*REPO.repo-chain
07:31 camelia rakudo-moar b1c444: OUTPUT«(inst#/home/camelia/.perl6 inst#/home/camelia/rakudo-m-inst-1/share/perl6/site inst#/home/camelia/rakudo-m-inst-1/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-1/share/perl6 CompUnit::Repository::AbsolutePath.new(next-repo => CompUnit::Repository::NQ…»
07:31 Xliff I've tried turning EXPORT into multi's to handle the different cases but that doesn't even pass stage parse
07:32 Xliff I get this:
07:32 Xliff "Cannot find method 'merge-symbols': no method cache and no .^find_method"
07:34 leont timotimo: thanks!
07:34 timotimo YW
07:43 mcmillhj joined #perl6
07:48 cibs joined #perl6
07:48 itaipu joined #perl6
07:51 pierre_ joined #perl6
07:59 mcmillhj joined #perl6
08:00 dakkar joined #perl6
08:02 zakharyas joined #perl6
08:03 cibs joined #perl6
08:07 masak good antenoon, #perl6
08:12 nine Xliff: you sure you want the "is export" trait on the subs when you already have an EXPORT sub?
08:12 g4 joined #perl6
08:12 RabidGravy joined #perl6
08:12 mcmillhj joined #perl6
08:14 masak heh, today's one-liner:
08:14 masak $ perl6 -pe'$_ = $ *= 2'
08:15 masak (produces successive powers of 2 as output: 2, 4, 8, 16...)
08:16 masak hm :)
08:16 masak $ perl6 -ne'say $ *= 2'
08:16 masak slightly shorter
08:17 imcsk8_ joined #perl6
08:19 itaipu joined #perl6
08:23 notostraca joined #perl6
08:26 masak m: say -"42"
08:26 camelia rakudo-moar b1c444: OUTPUT«-42␤»
08:27 masak ...guess that is the Least Surprising behavior for a language -- instead of saying "uh, need to be a number to be negated"
08:28 timotimo pff. it should give you -4 and then 2
08:29 masak pro tip: if you create a small language, thinking "ah ah, it'll be a *small* language, so there won't be all that many bugs" -- you've got some differently-flavored surprises coming your way
08:29 masak or maybe 007 isn't a small language, I dunno
08:31 BuildTheRobots joined #perl6
08:31 * masak .oO( just big enough to have a bootstrapping parser and runtime )
08:32 ggherdov joined #perl6
08:33 Possum joined #perl6
08:34 ribasushi joined #perl6
08:40 ggherdov joined #perl6
08:40 mcmillhj joined #perl6
08:43 itaipu joined #perl6
08:51 cibs joined #perl6
08:52 margeas joined #perl6
08:54 mcmillhj joined #perl6
09:04 pierre_ joined #perl6
09:08 mcmillhj joined #perl6
09:14 domidumont joined #perl6
09:20 mcmillhj joined #perl6
09:32 mcmillhj joined #perl6
09:36 rindolf joined #perl6
09:41 jjido joined #perl6
09:43 mcmillhj joined #perl6
09:43 nightsh joined #perl6
09:46 Ven joined #perl6
09:46 Ven timotimo, jnthn: I can confirm the GC bug disappeared! Amazing :D.
09:46 timotimo cool
09:47 jnthn Ven: Excellent. :)
09:48 Ven <jnthn timotimo>>>.++
09:50 timotimo only jnthn this time
09:51 Ven Failed cloning git repository 'git://github.com/jnthn/oo-monitors.git'
09:51 Ven timotimo: well, you did the Gtk bind, and I'm using it :).
09:53 LeCamarade joined #perl6
09:53 timotimo um, actually, jnthn made the gtk bindings :)
09:54 jnthn I started them, others have done much more work on them since than my initial work to blaze the trail :)
09:54 nine Who is working on them?
09:54 timotimo *shrug*
09:54 jnthn I've not worked on them for a long while :)
09:55 Ven timotimo: https://github.com/perl6/gtk-simple/graphs/contributors no, no.
09:55 chienjo joined #perl6
09:55 Ven (azawawi++ as well)
09:57 timotimo i bet one of those people just have a high +/- ranking because the single file with all the stuff in it got split into a hundred files
09:58 itaipu joined #perl6
10:03 bjz_ joined #perl6
10:17 Ven timotimo: I love people who make code more modular, and make it so that loading my GTK app doesn't take 3-4 minutes :)
10:17 timotimo um ... i think i have bad news for you
10:17 Ven it only takes 2.5!
10:17 timotimo :)
10:17 timotimo a big portion of the time spent is decoding the same json file over and over again, but nine said he can change the code around that it won't have to parse any json at all
10:19 nine After my talk at the APW2016, I should be able to find some time for that.
10:19 timotimo \o/
10:20 Ven nine++ # amazing work on modules and all for more than a year now
10:21 aries_liuxueyang joined #perl6
10:22 nadim joined #perl6
10:29 itaipu joined #perl6
10:32 mcmillhj joined #perl6
10:38 grondilu joined #perl6
10:45 pierre_ joined #perl6
10:49 pierre_ joined #perl6
10:58 nadim timotimo:  you may remember the glibc/thread problem I talked about last week. I fixed it by rebuildnig libc, zef seems to work, at least it starts.
10:58 mcmillhj joined #perl6
10:58 nadim timotimo: but talking to a friend and looking around on the net, the problem can be a cpu/microcode/lic problem or a relasing a mutex that has already been released.
10:59 nadim timotimo: I don't know how moar uses the pthread library but it may be something to keep in mind
10:59 timotimo hm, shouldn't releasing a mutex that's already released crash anyway?
11:02 nadim depends on the implementation is my guess
11:05 nine maybe worth reporting to #moarvm?
11:09 lambd0x joined #perl6
11:09 lambd0x Hi everyone!
11:10 mcmillhj joined #perl6
11:10 LeCamarade Hi.
11:11 DrForr Afternoon.
11:12 lambd0x Guys, does any of u know if array datatype currently has allocation size limitations?
11:13 DrForr Of course it does. It's called RAM :)
11:14 nadim ugexe: zef working fine now
11:15 lambd0x DrForr: Of Course . But not in any other aspect? :P
11:16 DrForr m: my @x; @x[1_000_000_000_000] = 1;
11:16 camelia rakudo-moar b1c444: OUTPUT«Memory allocation failed; could not allocate 8000000000008 bytes␤»
11:17 moritz lambd0x: we might assume that array indexes are fixed-sized integers, probably 64bit
11:18 moritz so even if you have enough RAM to hold an array with more than 2**64 elements, you might not be able to use it
11:18 lambd0x Ok. I'm asking because my bubblesort alg is giving me seg. fault for arrays with 5000 lines.
11:18 moritz (though I don't know any OS that lets you manage more than 2**64 byte of RAM)
11:19 nadim Any sparse array class around?
11:19 DrForr m: my @x;@x[5001]="foo";
11:19 camelia rakudo-moar b1c444: ( no output )
11:19 nadim I don't know why I though the P6 arrays would be sparse
11:20 moritz they're already resizable and lazy, that's quite a feat :-)
11:20 lambd0x bubble alg: http://bpaste.net/show/186fd80687c2. input it receives: http://bpaste.net/show/0ea8cb3faba7
11:23 lambd0x I know the problem is the bubble function, but don't know what... Any thoughts?
11:25 kurahaupo joined #perl6
11:26 moritz if it's reproducable on the latest rakudo, please submit a bug report
11:27 nadim moritz: we like feats!
11:27 nine lambd0x: I'm curious why you'd write a bubble sort?
11:28 gucore joined #perl6
11:28 lambd0x nine: I'm a C programmer myself. Since I'm learning Perl6 I decided to try every alg I've done so far in this very language. So that's why... :)
11:29 mcmillhj joined #perl6
11:29 skids joined #perl6
11:30 lambd0x moritz: http://bpaste.net/show/533f37582a38 that's my rakudo version :)
11:30 tbrowder anyone miss having a Uint in p6?  seems to cause lots of problems with modules implementing various hash (digest) algorithms and functions...
11:31 moritz lambd0x: I just recompiled a brand new rakudo version and it also segfaults
11:31 moritz lambd0x: so please submit as a bug to rakudobug@perl.org
11:31 nine tbrowder: we do have UInt?
11:31 tbrowder er, "miss NOT having a Uint"
11:32 tbrowder m: my Uint $s;
11:32 camelia rakudo-moar b1c444: OUTPUT«5===SORRY!5===␤Type 'Uint' is not declared. Did you mean any of these?␤    uint␤    UInt␤    int␤    Int␤␤at <tmp>:1␤------> 3my Uint7⏏5 $s;␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 Uint $s;␤␤»
11:32 tbrowder m: my UInt $s;
11:32 camelia rakudo-moar b1c444: ( no output )
11:33 tbrowder m: my UInt $s = xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff;
11:33 camelia rakudo-moar b1c444: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff used at line 1␤␤»
11:33 moritz 0x
11:33 tbrowder m: my UInt $s = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff;
11:33 lambd0x moritz: Ok ;)
11:33 camelia rakudo-moar b1c444: ( no output )
11:33 tbrowder m: my UInt $s = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff;
11:33 camelia rakudo-moar b1c444: ( no output )
11:33 moritz m: my UInt $s = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; say $s.base(16)
11:33 camelia rakudo-moar b1c444: OUTPUT«FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF␤»
11:34 moritz m: my UInt $s = -1;
11:34 camelia rakudo-moar b1c444: OUTPUT«Type check failed in assignment to $s; expected UInt but got Int (-1)␤  in block <unit> at <tmp> line 1␤␤»
11:34 DrForr I note in passing that UInt doesn't appear on docs.perl6.org...
11:34 tbrowder ok, but it's not searchable, and I've not seen it  in docs
11:37 tbrowder m: my UInt $s = 0x0001_0001_0001_0001_0001_0001_001f_0001; say $s.base(16)
11:37 camelia rakudo-moar b1c444: OUTPUT«100010001000100010001001F0001␤»
11:37 tbrowder m: my UInt $s = 0x0001_0001_0001_0001_0001_0001_0001_0001; say $s.base(16)
11:37 camelia rakudo-moar b1c444: OUTPUT«10001000100010001000100010001␤»
11:37 tbrowder m: my UInt $s = 0x0001_0001_0001_0001_0001_0001_0001_0001; ++$s; say $s
11:37 camelia rakudo-moar b1c444: OUTPUT«5192376087906286159508272029171714␤»
11:38 nine lambd0x: do you have an RT number where I can post some additional findings?
11:38 tbrowder m: my UInt $s = 0x0001_0001_0001_0001_0001_0001_0001_0001; ++$s; say $s.base(16)
11:38 camelia rakudo-moar b1c444: OUTPUT«10001000100010001000100010002␤»
11:39 lambd0x nine: sorry, RT number?
11:39 nine lambd0x: the ticket number from your bug report
11:40 nine or just the URL
11:40 tbrowder okay then, thanks, moritz et al., looks like a doc issue
11:41 tbrowder never mind, old issue
11:42 eliasr joined #perl6
11:43 mcmillhj joined #perl6
11:43 lambd0x nine: I'm upgrading rakudo to check it again before sending a bug report. But if I do, where should I issue this bug?
11:44 nine I think https://github.com/MoarVM/MoarVM/issues/ would be the right place this time
11:44 moritz nine: I tend to submit my bugs as rakudo bugs when I observe the bug in rakudo
11:45 moritz nine: it's not like a user actually knows which layer a bug is in
11:45 nine moritz: the stacktrace points at a MoarVM issue
11:45 nine moritz: I did a little gdbing
11:45 moritz nine: ok
11:49 lambd0x http://bpaste.net/show/8c8915f6e3d5 (current version). Error persists. I'm issuing it then.
11:50 dalek doc: 8acb21b | (Tom Browder)++ | doc/Type/Str.pod6:
11:50 dalek doc: corrections, improvements, notes modified or added, unimplemented features marked NYI (after testing on late model rakudo)
11:50 dalek doc: review: https://github.com/perl6/doc/commit/8acb21b30b
11:50 dalek doc: 739629a | (Tom Browder)++ | doc/Type/Str.pod6:
11:50 dalek doc: remove unproved text, stick with 'unimplemented' as a fact
11:50 dalek doc: review: https://github.com/perl6/doc/commit/739629ae95
11:50 dalek doc: cf22b09 | RabidGravy++ | doc/Type/Str.pod6:
11:50 dalek doc: Merge pull request #870 from tbrowder/sprintf-update
11:50 dalek doc:
11:50 dalek doc: corrections, improvements, notes modified or added, unimplemented fea…
11:50 dalek doc: review: https://github.com/perl6/doc/commit/cf22b0931e
11:53 moritz nine: I did a little valgrind too :-)
11:58 mcmillhj joined #perl6
12:01 lambd0x nine: https://github.com/MoarVM/MoarVM/issues/400 or #400 is the code you requested of me :P
12:02 lambd0x Later fellas o/
12:03 bpmedley joined #perl6
12:04 moritz nine: I've reformatted your comment
12:05 nine moritz: thanks
12:09 pierre_ joined #perl6
12:15 itaipu joined #perl6
12:27 MasterDuke joined #perl6
12:29 MasterDuke m: class A { multi method b($c) { say "positional $c"; }; multi method b(:$c) { say "named $c"; nextwith($c) }; }; A.b("d"); A.b(:c("d"));
12:29 camelia rakudo-moar b1c444: OUTPUT«positional d␤named d␤»
12:30 MasterDuke ^^^ what am i missing? i would expect a final "positional d" to be printed
12:31 MetaZoffix joined #perl6
12:31 moritz MasterDuke: nextwith dispatches to the next possible candidate that fits the current argument list
12:32 moritz but the first candidate doesn't fit the :c("d") argument, so it's not in the dispatcher list
12:32 moritz if you want to call, jut call self.b(:c("d"))
12:33 MasterDuke i thought that was nextsame
12:35 MasterDuke m: class A { multi method b($c) { say "positional $c"; }; multi method b(:$c) { say "named $c"; self.b($c) }; }; A.b("d"); A.b(:c("d"));
12:35 camelia rakudo-moar dc7f27: OUTPUT«positional d␤named d␤positional d␤»
12:36 moritz MasterDuke: nextsame just uses the same argument list as the current routine
12:36 moritz MasterDuke: otherwise it's the same as nextwith
12:48 cpage_ joined #perl6
12:53 zoosha joined #perl6
12:56 xxpor joined #perl6
12:57 MilkmanDan joined #perl6
12:58 aries_liuxueyang joined #perl6
13:01 mcmillhj joined #perl6
13:06 cdg joined #perl6
13:06 cdg joined #perl6
13:07 domidumont joined #perl6
13:09 markk joined #perl6
13:09 dj_goku joined #perl6
13:09 dj_goku joined #perl6
13:09 Wiertek joined #perl6
13:10 skids joined #perl6
13:12 salva joined #perl6
13:12 liztormato joined #perl6
13:22 Unavowed joined #perl6
13:32 sufrostico joined #perl6
13:39 MasterDuke joined #perl6
13:39 nilptr joined #perl6
13:40 MasterDuke Xliff: have you looked into https://docs.perl6.org/type/Signature#Single_Argument_Rule_Slurpy for your EXPORT problem?
13:42 telex joined #perl6
13:42 wamba joined #perl6
13:47 El_Che for the one that puts the sources online for moarvm, nqp and rakudo: nqp and rakudo have pgp signatures (asc) but not key, and moarvm has nothing. Would it be possible to provide sha hashes and offer the download through https?
13:48 moritz El_Che: pmichaud has trouble setting up HTTPS for rakudo.org
13:48 [Coke] there's a ticket open for that.
13:48 [Coke] Please add a comment about how it's impacting downloads, though.
13:48 El_Che something specific with https?
13:48 [Coke] https://rt.perl.org/Ticket/Display.html?id=128423
13:49 El_Che thx
13:49 [Coke] El_Che: try going to https://rakudo.org/
13:49 El_Che there you go;
13:50 El_Che The certificate is only valid for the following names: host.pmichaud.com, www.host.pmichaud.com
13:50 El_Che he needs to add an aliad to the certificate
13:50 El_Che I'll add it to the ticket
13:51 bioduds joined #perl6
13:51 bioduds is nine there?
13:51 moritz there's some cpanel integration involved
13:51 El_Che moritz: certainly, but it will never work with that cert
13:52 bioduds hey nine, you there?
13:52 bioduds I think I got the shell script
13:52 moritz El_Che: aye
13:58 MetaZoffix joined #perl6
13:59 MetaZoffix El_Che: "nqp and rakudo have pgp signatures (asc) but not key"... are you saying something is missing?
13:59 MetaZoffix and if yes.. what
13:59 nightsh joined #perl6
14:00 kyclark joined #perl6
14:00 El_Che MetaZoffix: the public key of the one that made the signature
14:01 El_Che or the info somewhere on the site how to get it (public key servers, etc)
14:01 MetaZoffix I never understood those signatures..... If someone can replace the file, they can replace the signature, so it's useless
14:01 El_Che well, the pgp one is the better option,but the most cumbersome
14:02 El_Che MetaZoffix: that can NOT be replaced
14:02 MetaZoffix El_Che: why not?
14:02 El_Che the attacker can sign with his own key, but that one is not on your keyring
14:02 moritz MetaZoffix: well, for gpg signatures, if the rakudo.org server is compromised, they still don't have access to my private GPG key
14:02 El_Che only the rakudo one
14:02 konobi MetaZoffix: the public key is needed to establish trust... once you have the "trust", you can verify the signature of the file
14:02 moritz we just don't provide an official rakudo keyring
14:02 moritz yet
14:03 konobi moritz: still need a public key on the site though
14:03 MetaZoffix What is this stuff used for? To very that the file you downloaded is legit?
14:03 pmurias joined #perl6
14:03 El_Che MetaZoffix: when I am automating deployment I always try to verify the validity of downloads
14:03 konobi maybe a key that's been cross-signed a bunch
14:03 moritz MetaZoffix: yes
14:03 El_Che MetaZoffix: thing http (as in now) and man in the middle
14:04 konobi El_Che: the signature gives me cryptographic verification of the contents of the file
14:04 konobi so the transport doesn't matter
14:04 El_Che MetaZoffix: someone connects to a 'conference' wifi and someone replace the download rakudo source with a patched one (or just regular malware)
14:04 MetaZoffix El_Che: and how do you verify it? You just get the .asc from the same site, don't you?
14:04 MetaZoffix El_Che: ... and they replace the .asc with a new one too
14:05 El_Che konobi: for non gpg signatures you can replace the file and the signature at the same time
14:05 konobi the asc was generated from a private key... i "trust" the public key
14:05 El_Che MetaZoffix: the asc will be invalid
14:05 konobi no
14:05 El_Che MetaZoffix: because the attacker does not have the (offline) private key
14:05 konobi *blink* i think i'm back to front on this somehow
14:05 MetaZoffix El_Che: whose private key?
14:06 El_Che rakudo
14:06 MetaZoffix El_Che: why would they need it?
14:06 konobi whoever signed the .asc
14:06 MetaZoffix The attacker signed the .asc
14:06 MetaZoffix They replaced it, together with the hacked package
14:06 konobi i don't trust that attacker, so it's invalid
14:06 MetaZoffix Ah, I see.
14:07 El_Che 0. use trust the rakudo key 1. rakudo admin creates the tar. 2. rakudo admin signs the tar with the private key
14:07 konobi this is generic key exchange
14:07 El_Che 3a. user downloads and verifies ok
14:07 MetaZoffix I don't know if the public key thing you're looking for maybe here: https://github.com/rakudo/rakudo/tags
14:07 El_Che 3b. attacker replaces tar and signaru
14:07 MetaZoffix "GPG key ID: 02273204444FF29C" is that something?
14:07 moritz it is
14:07 El_Che 4b. signature does not verify because the user does not trust the key of the attacker
14:07 konobi we need a copy of the public key that goes along with the private key that did the signing
14:08 konobi you want the public key for that GPG key (identified by ...)
14:08 bioduds hello
14:08 bioduds is nine there?
14:08 bioduds nine?
14:08 El_Che you want the key in several public servers
14:09 LeCamarade joined #perl6
14:09 konobi that's what you share to indicate that this is what you use to validate the trust chain that it was actually them who signed it
14:09 nine bioduds: yes?
14:09 bioduds hi nine
14:09 bioduds I think I got a initial installing shell script
14:10 bioduds would you like to test it?
14:10 El_Che in the case of a rakudo key, it can be signed by several perl6 devs and users
14:10 nine I could at least have a look at it
14:10 bioduds sure, its quite simple
14:10 konobi El_Che: openxpki =0)
14:11 domidumont joined #perl6
14:11 * moritz won't build a KPI for rakudo
14:11 bioduds http://67.205.136.118/install.sh
14:11 perlpilot joined #perl6
14:11 bioduds line would be https://install.perl6.org | sh
14:11 bioduds once https is set
14:11 bioduds and install subdomain points to the install.sh script
14:12 bioduds also, I can improve it. it is really a start point
14:12 bioduds i mean, setting it to tell it is linux only and stuff
14:12 bioduds but bottomline it should work once gcc build essentials is there
14:13 bioduds im testing now on a 2Gb RAM Digital Ocean Ubuntu 14.04
14:13 bioduds it is installing I believe
14:14 sena_kun joined #perl6
14:15 bioduds first test local worked but I already had Perl6 on
14:15 bioduds Im trying on an fresh installation now
14:18 sena_kun Can any core dev/spec wizard look here - https://github.com/perl6/doc/pull/870? The last comment brings up a question about sprintf modificators status which needs a spec clarification.
14:21 kyclark joined #perl6
14:21 moritz I can only comment that the proper place for this comment would be an issue on the perl6/specs repo
14:25 bjz joined #perl6
14:25 sena_kun The problem is with the docs as far as I see. It is either wrong because of the modifiers content that popped out of nowhere or because of "docs-ahead-of-implementation" problem. I'll fill a new issue anyway, so this question wouldn't be forgotten. Thanks for the advice, moritz.
14:26 perlpilot joined #perl6
14:33 bioduds takes a while to install
14:37 bioduds made some initial changes, will upload in a while
14:47 melezhik Hi guys!
14:47 bioduds wow, its a long install
14:49 melezhik I have class with property "results"
14:49 melezhik has Array @.results;
14:50 pullphinger joined #perl6
14:50 melezhik but once I try to push into results I have this error
14:50 bioduds you may need to write is rw
14:50 bioduds to be able to push into the array
14:50 bioduds I guess
14:50 jnthn Since @ already means Array, that's declaring an Array of Array also :)
14:51 jnthn So if the error is like "expected Array" that's why :)
14:51 bioduds im a beginner but i believe you need has @.results is rw;
14:52 melezhik Type check failed in assignment to @!results; expected Array but got Pair (:foo("bar"))
14:52 melezhik A code looks like - @!results.append: {  foo  => "bar" };
14:53 jnthn melezhik: Yup, it's what I said :)
14:53 pullphinger joined #perl6
14:54 melezhik jnthn: kinda
14:54 melezhik I wanted to push into Array a hash
14:55 melezhik this way works fine: @!results.push: [{  foo  => "bar" }];
14:55 domidumont joined #perl6
14:55 jnthn Sure, 'cus you're pushing an Array
14:55 melezhik but it seems I need to convert "hash" into array of hash ?
14:55 jnthn Do you actually want an array of arrays?
14:56 jnthn has @.results; # means an Array containing anything
14:56 melezhik strange; if I have the same code , out of my class definition it works as expected
14:56 melezhik my @foo = Array.new; @foo.push: { d => 100 }; say @foo;
14:56 jnthn has Pair @.results; # means an Array constrained to only contain Pair
14:56 jnthn has Array @.results; # means an Array constrained to contain other arrays
14:56 jnthn That's not the same though
14:56 melezhik [{d => 100}]
14:57 jnthn my @foo = Array.new
14:57 jnthn Is the same as
14:57 jnthn my @foo = []
14:57 jnthn Whioth is the same as
14:57 jnthn my @foo
14:57 jnthn my Array @foo;
14:57 jnthn Is the same as
14:57 jnthn my @foo := Array[Array].new
14:57 melezhik so. how can alter my class constructor?
14:57 melezhik to get a desired behavior?
14:58 jnthn I don't know, I didn't understnad what you want yet... :)
14:58 jnthn What's wrong with just `has @.results`?
14:58 melezhik currently I have "has Array @.results;"
14:58 jnthn Yes, why did you put Array there?
14:58 melezhik ahh, got you!
14:58 jnthn Ah, good :)
14:58 melezhik I need to have just @.results;
14:58 melezhik )))
14:58 jnthn Yes :)
14:58 melezhik thanks
14:59 jnthn Arrays are really common, so it's just an @ to get it :)
15:00 melezhik yes, sure!
15:00 melezhik thanks
15:00 mcmillhj joined #perl6
15:01 Actualeyes joined #perl6
15:07 tbrowder ref docs (and UInt): please see PR "https://github.com/perl6/doc/pull/871"
15:09 kyclark joined #perl6
15:10 itaipu joined #perl6
15:11 zacts joined #perl6
15:12 khw joined #perl6
15:13 bioduds hi nine
15:13 bioduds my initial test worked
15:14 bioduds :)
15:18 nine excellent :)
15:19 MorayJ joined #perl6
15:26 bioduds jeff said he will also do some tests later on :)
15:27 bioduds it'd be great to run a test on a mac too i believe
15:27 zapwai joined #perl6
15:27 bioduds please send me a line when you also can run some tests on it bioduds@gmail.com
15:28 Wiertek93 joined #perl6
15:30 nowan joined #perl6
15:31 Unavowed Has anyone considered type-parametrising Promises at any point? (e.g. Promise[Int] like Array[Int])
15:36 RabidGravy you could already do this by sub-classing Promise and implementing ^parameterize :-)
15:36 RabidGravy (this may or may not be recommended practice however)
15:37 gfldex joined #perl6
15:38 dalek doc: 645930a | (Tom Browder)++ | doc/Type/UInt.pod6:
15:38 dalek doc: add rudimentary doc on UInt
15:38 dalek doc: review: https://github.com/perl6/doc/commit/645930a241
15:38 dalek doc: daf4149 | (Tom Browder)++ | doc/Type/UInt.pod6:
15:38 dalek doc: Merge pull request #871 from tbrowder/uint
15:38 dalek doc:
15:38 dalek doc: add rudimentary doc on UInt
15:38 dalek doc: review: https://github.com/perl6/doc/commit/daf4149f60
15:38 jnthn Unavowed: Do you have a use-case where it'd be especially helpful?
15:39 Unavowed jnthn: Not really, just learning P6 and trying to figure out how far you can go with static typing
15:42 RabidGravy strangely despite all the performance enhancements my smoke test of all my modules still takes approximately the same time as it did six months ago
15:42 dalek doc: 7fbee17 | titsuki++ | doc/Language/syntax.pod6:
15:42 dalek doc: Add an index for \ (unspace)
15:42 dalek doc: review: https://github.com/perl6/doc/commit/7fbee1729c
15:42 dalek doc: 37a0b77 | titsuki++ | doc/Language/syntax.pod6:
15:42 dalek doc: Merge pull request #872 from titsuki/index-unspace
15:42 dalek doc:
15:42 dalek doc: Add an index for \ (unspace)
15:42 dalek doc: review: https://github.com/perl6/doc/commit/37a0b770aa
15:42 kyclark I’ve install CSV::Parser using panda.  How can I pull up the perldocs on it?
15:42 dalek perl6-most-wanted: 398a494 | (Tom Browder)++ | most-wanted/modules.md:
15:42 dalek perl6-most-wanted: correct link for repo rename
15:42 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/398a4948f6
15:43 jnthn RabidGravy: Perhaps 'cus a lot of the improvements have been to runtime, and module smoke testing exercises compile time much more?
15:44 cyphase joined #perl6
15:46 RabidGravy jnthn, yeah almost certainly,  and also lots of things that are out of the control of rakudo (network services, native libraries etc etc)
15:47 RabidGravy kyclark, p6doc may do it (though last time I tried it was looking in the wrong places)
15:50 dalek doc: 3cc1cae | titsuki++ | doc/Language/syntax.pod6:
15:50 dalek doc: Delete trailing dollar symbols
15:50 dalek doc: review: https://github.com/perl6/doc/commit/3cc1cae30c
15:50 dalek doc: 06e4986 | titsuki++ | doc/Language/syntax.pod6:
15:50 dalek doc: Merge pull request #873 from titsuki/delete-dollar-symbol
15:50 dalek doc:
15:50 dalek doc: Delete trailing dollar symbols
15:50 dalek doc: review: https://github.com/perl6/doc/commit/06e4986fbf
16:06 kyclark FYI, I can’t install “p6doc”: Failed test 'load module Pod::To::BigPage'
16:07 kyclark And I can’t panda install that module, either
16:07 gfldex kyclark: known issue, you can uninstall the offending module, install Pod::To::BigPage and reinstall the offending module as a workaround
16:08 dalek joined #perl6
16:08 kyclark Oh, wait, needed to panda update
16:08 gfldex that would be IO::Socket::SSL (IIRC)
16:08 kyclark Successfully installed Pod::To::BigPage
16:08 JJMambrams joined #perl6
16:09 timotimo i think panda should check how old the definitions file is when saying "module not found"
16:09 timotimo and display something like "couldn't find module Blah::Blubb in the ecosystem ... but your list is from 99 days ago. run panda update to get the newest data"
16:09 kyclark OK, “Successfully installed p6doc” but there’s no “p6doc” ?
16:09 [Coke] having issues with a Bailador app; it seems to get requests, but sometimes seems to fail to run the 'start {}
16:09 kyclark “$ p6doc Text::CSV
16:09 kyclark -bash: p6doc: command not found"
16:10 timotimo kyclark: might need to "panda rehash" to get the binary in the bin/ folder of your rakudobrew
16:10 timotimo sorry
16:10 timotimo rakudobrew rehash is the command
16:10 [Coke] ' block in the request handler. any suggestions on debugging other than "add more debug output" ?
16:10 gfldex kyclark: panda doesn't tell you that you need to add something to your $PATH
16:10 kyclark OK, it’s found now.  Thanks.
16:10 timotimo gfldex: i think it actually does, though?
16:10 gfldex it may do now
16:10 timotimo but maybe only when you install it for the first time
16:11 kyclark If I do “p6doc Text::CSV” it says “No Pod found” but it does look like the author wrote docs (https://github.com/Tux/CSV/blob/master/lib/Text/CSV.pod6)
16:12 gfldex it's not looking for *.pod6, you have to have the pod inline in the module
16:14 timotimo it seems to look into /doc/ inside installed modules it seems?
16:16 timotimo actually, it seems to only grab Type/ and Language/ folders from inside there
16:16 timotimo maybe that's just for locating the "original" perl6 language doc that comes with p6doc?
16:20 mcmillhj joined #perl6
16:25 stmuk_ timotimo: yes that's right .. it's pretty awful hacky code TBH but it should "mostly" work
16:28 stmuk_ kyclark: it should work but I don't think the author actually installs CSV.pod6 (mainly due to confusion about how to do it)
16:28 stmuk_ I think Tux even asked how to do it a few months back
16:29 stmuk_ the answer now might be to list CSV.pod6 in https://design.perl6.org/S22.html#%25%3FRESOURCE
16:29 atta joined #perl6
16:30 stmuk_ p6doc might even pick up CSV.pod6 if its under doc/ :)
16:30 perlpilot joined #perl6
16:32 El_Che [Coke], moritz: rakudo and deps built fine on docker (as expected) on a ubuntu 64-bit image, but they also built fine (unexpectedly) on a self-created 32-bit ubuntu (docker is 64-bit only)
16:36 mcmillhj joined #perl6
16:38 moritz El_Che: so it's a 32 bit userland with a 64 bit kernel?
16:39 lambd0x nine: any news in #400? I've tested all the other sorting algs to check against the same error, but all of those works fine as they were supposed to :S
16:41 Elfoonto joined #perl6
16:41 Elfoonto m: given Proc::Async.new: "bash", :w { CATCH { default { say "sploops" } }; my $pp = .start; .write: "exit 2\n".encode; await $pp }
16:41 camelia rakudo-moar af4c2e: OUTPUT«Proc::Async is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting line 1␤  in method new at src/RESTRICTED.setting line 32␤  in block <unit> at <tmp> line 1␤␤»
16:41 Elfoonto I'm having trouble catching non-zero-exit exceptions from Proc::Async. Any idea how?
16:42 Elfoonto The above produces "The spawned process exited unsuccessfully (exit code: 2) in block <unit> at -e line 1" when run
16:43 El_Che moritz: exactly
16:43 tbrowder ref travis: anyone have a successful use of caching for a plain p6 module? if so, may we hear how you do it?
16:43 canopus joined #perl6
16:43 El_Che moritz: it looks a more straightforward way than crosscompiling (in a docker context)
16:44 Elfoonto Oh, now I remember.
16:44 Elfoonto given Proc::Async.new: "bash", :w { my $pp = .start; .write: "exit 2\n".encode; my $p = await $pp; say "sploops" if $p ~~ Broken }
16:45 Elfoonto the awaited promise gives a Proc that explodes when sunk
16:46 dalek joined #perl6
16:47 AndroUser joined #perl6
16:50 AndroUser Whats the difference between bless and new?
16:51 konobi new is a function, bless is an operator
16:51 Elfoonto .oO( function? )
16:51 timotimo er, what?
16:51 timotimo new is not a function, and bless is not an operator
16:51 ItayAlmog joined #perl6
16:51 konobi um... bah... sorry wrong turtle
16:52 timotimo ok, so here's what bless and new are:
16:52 timotimo .bless is the method you get for free from the Mu class, from which all other classes derive
16:53 timotimo it will allocate the appropriate size of memory for you, and then run the BUILDALL method that's also provided for free by Mu
16:53 timotimo BUILDALL is responsible for putting named arguments you passed to the bless method to be put into the right attributes and such
16:53 zostay m: say Instant.from-posix(0)
16:53 camelia rakudo-moar af4c2e: OUTPUT«Instant:10␤»
16:53 timotimo and BUILDALL also handles things like default values and such
16:53 Elfoonto leap seconds
16:54 timotimo "new" is an extra method you get for free that will by default just call self.bless with the named parameters you pass. if you pass positional parameters, it'll throw an exception for you.
16:55 timotimo the name "new" is not really special to perl6, it's just a convention. you can have as many different "constructors" as you want, and you can call them whatever you like
16:55 Elfoonto (erm, maybe, I've lost all confidence since I said it :P)
16:55 TimToady and new is the correct method to override if you want positional parameters in a custom constructor
16:56 timotimo ItayAlmog: does that help you? :)
16:56 ItayAlmog Oh so new is just for making it easier for people who don't know about the bless method
16:56 mcmillhj joined #perl6
16:56 timotimo that's not all
16:56 stmuk_ hmm maybe the difference between new and bless should be in the faq?
16:56 timotimo bless will only ever take named parameters, but you might want to support something like FooBar.new(1, 2, 3); i.e. positional arguments only
16:57 timotimo so like TimToady said above, implementing a custom "new" method is the right approach to that
16:57 ItayAlmog Oh, interesting
16:58 acrussell joined #perl6
16:58 TimToady generally, there's no reason to call .bless instead of .new, since .new is shorter, and the default .new gives you exactly the same semantics
16:58 TimToady and it's not a performance issue, since trivial methods get inlined
16:58 zacts joined #perl6
16:59 ItayAlmog Thanks, currently i am working on the compiler and I didn't quit understand how the object actually gets created
16:59 TimToady and calling .new gives child classes the chance to override .new, whereas overriding .bless is probably going to produce a world of hurt
16:59 timotimo yeah, explosions all around, gnashing of teeth, that kind of thing
16:59 dalek doc: 07f48e2 | (Jan-Olof Hendig)++ | doc/Language/control.pod6:
16:59 dalek doc: Corrected indentation of some code examples
16:59 dalek doc: review: https://github.com/perl6/doc/commit/07f48e2821
17:00 ItayAlmog So the bless allocates memory and BUILDALL assigns values in the allocated space
17:01 leont joined #perl6
17:01 TimToady well, the object has to be created with a particular representation by .CREATE
17:01 TimToady since we support representational polymorphism
17:02 timotimo right, the first thing bless does is call .CREATE
17:02 timotimo that is the part that actually kicks off the allocation
17:03 ItayAlmog Well, that helped me alot understand how it works, and now i think i can start to make the Mu class
17:04 timotimo ah, you're our native-p6-compiler person!
17:04 timotimo now i recognize the name %)
17:04 TimToady but how you allocate depends on what kind of object it is, P6opaque, VMarray, P5hash, CPPobject, Pyobject, etc
17:05 ItayAlmog Lol indeed, i have been reading alot about assembly so didnt have much progress on it
17:05 TimToady the class itself is not very aware of its representation
17:06 timotimo right, in rakudo we have nqp::getattr and nqp::bindattr, nqp::atpos, nqp::bindpos, ...
17:06 timotimo those are all "virtual" based on what representation the class that's responsible for the attribute (etc) is
17:06 TimToady so the same class could control a Perl object, a Python object, a Ruby object, or a C++ object
17:06 timotimo or a piece of XML string in memory
17:06 ItayAlmog Ok i lost you...
17:07 TimToady that's why we're talking about it :)
17:07 [Coke] .seen supernovus
17:07 yoleaux I saw supernovus 22 Apr 2016 23:27Z in #perl6: <supernovus> Well, I'm going to have to run. Have a great day/night everyone. I hope to fix up some of my long neglected libraries at some point when I'm not completely overloaded with work! :-)
17:08 ItayAlmog So you can use CPP class as a class in Perl6?
17:08 TimToady in theory
17:08 timotimo at the moment you have to use NativeCall and i think we can't allocate new instances or build new classes
17:08 TimToady the repr and mop layers are designed to allow that eventually
17:09 timotimo just work with existing classes that have code already in some library you're using
17:09 bioduds joined #perl6
17:09 [Coke] anyone using bailador or http::easy? trying to figure out how it's handling multiple simultaneous requests.
17:10 vcv I started using bailador, but it stopped serving requests for me altogether, so I don't think I can be much help
17:10 dogbert17 joined #perl6
17:10 ItayAlmog Ok, so i think i will right now stick with only Perl6 objects (at least the way i am creating object right now) and C structs and C++ objects (maybe) since these are the easiest in term of native code
17:10 lizmat joined #perl6
17:10 mcmillhj joined #perl6
17:10 timotimo you won't get very far if you don't have a list and a hash implementation, though
17:11 timotimo in rakudo those are also done via the "repr" mechanism
17:11 timotimo that's the different things that live under src/6model/reprs/
17:11 [Coke] vcv: I have a similar issue, maybe. It is now handling one request, then the next request shows up (get a HTTP/1.1 notification), but then no actual handling.
17:13 TimToady anyway, you might be interested in looking at nqp/docs/6model/* eventually to avoid baking in too many assumptions about representations
17:13 ItayAlmog Ok.... I will sure take a look at it :)
17:13 TimToady oh, timotimo++ already mentioned it
17:13 dogbert17 o/ #perl6
17:14 dogbert17 is gfldex around?
17:14 gfldex dogbert17: yes
17:15 timotimo well, i linked to the source, you linked to the docs. the docs are probably a bit more helpful :)
17:15 dogbert17 gfldex: I believe that there is some text missing from https://docs.perl6.org/language/control#return
17:17 firstdayonthejob joined #perl6
17:17 dogbert17 gfldex: I believe that the last sentence should point out that an exception is thrown if the type constraint check fails...?
17:18 vcv [Coke]: Just tried it again.  It just seems to hang on the request indefinitely. I will investigate more later on
17:18 gfldex dogbert17: i'm checking blame first before I change something, will take a bit
17:19 dogbert17 gfldex: thx
17:19 sufrostico joined #perl6
17:20 tbrowder m: my UInt $u;
17:20 camelia rakudo-moar af4c2e: ( no output )
17:20 gfldex dogbert17: it wasn't changed by accident so that info is just missing
17:21 espadrine joined #perl6
17:21 bioduds hi TimToady! how are you doing? :)
17:21 dogbert17 gfldex: cool
17:21 gfldex m: sub f(-->Int){"bork"}; f; CATCH { default {say .^name } }
17:21 camelia rakudo-moar af4c2e: OUTPUT«X::TypeCheck::Return␤»
17:21 timotimo ItayAlmog: representational polymorphism (i.e. not sure whether your object is backed by P6opaque or VMHash or VMArray) can be a big source of slowdowns if you don't have something adaptive like moarvm's "spesh"
17:21 kyclark joined #perl6
17:22 AlexDaniel joined #perl6
17:22 tbrowder m: my UInt $u = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; say $u
17:22 camelia rakudo-moar af4c2e: OUTPUT«340282366920938463463374607431768211455␤»
17:23 tbrowder m: my UInt $u = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; ++$u; say $u
17:23 camelia rakudo-moar af4c2e: OUTPUT«340282366920938463463374607431768211456␤»
17:23 tbrowder m: my UInt $u = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; say $u
17:23 camelia rakudo-moar af4c2e: OUTPUT«22300745198530623141535718272648361505980415␤»
17:23 TimToady SmokeMachine____, avuserow, grondilu: there's supposed to be an A::B::PARENT that gives you A, but I think it's NYI
17:23 timotimo tbrowder: UInt is a full-sized Int, hence the upper case I
17:23 tbrowder m: my UInt $u = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; ++$u; say $u
17:23 camelia rakudo-moar af4c2e: OUTPUT«22300745198530623141535718272648361505980416␤»
17:24 timotimo m: my UInt $u = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff; ++$u; say $u
17:24 camelia rakudo-moar af4c2e: OUTPUT«2839213766779714416208296124562517712318911565184836172974571090549372219192960637992933791850638927971728600024477257552869537611776␤»
17:24 timotimo m: my UInt $u = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff; ++$u; say $u.fmt("%x")
17:24 camelia rakudo-moar af4c2e: OUTPUT«100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000␤»
17:24 TimToady bioduds: I'm doing jet-lagged
17:24 ItayAlmog Well right now every object have a hashcode which is generated at conpile time and i will use it for quick type checking, a reference to the object's v-table and a reference to the inherited object definition
17:24 bioduds really? hope youre not in Brazil right now
17:24 timotimo that might not get you far
17:25 timotimo you see, you can derive a class of one repr from a class of another repr
17:25 bioduds cause we just crapped on our democracy, sorry the expression
17:25 timotimo that's (one part of) why the getattr and bindattr nqp ops ask you for the class the attribute is defined for
17:26 ItayAlmog After reading about this i realy see why it isn't enough
17:26 ItayAlmog Well, rethink time...
17:26 TimToady this stuff is pretty much beyond state-of-the-art, so copying someone else's object system is not going to give you the flexibility we're looking for
17:27 tbrowder m: my UInt $u = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; say $u.base(16)
17:27 camelia rakudo-moar af4c2e: OUTPUT«FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF␤»
17:27 tbrowder m: my UInt $u = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; say ++$u.base(16)
17:27 camelia rakudo-moar af4c2e: OUTPUT«Cannot resolve caller prefix:<++>(Str); none of these signatures match:␤    (Mu:D $a is rw)␤    (Mu:U $a is rw)␤    (Int:D $a is rw)␤    (int $a is rw)␤    (Bool $a is rw)␤    (Num:D $a is rw)␤    (Num:U $a is rw)␤    (num $a is rw)␤  in …»
17:27 tbrowder m: my UInt $u = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; ++$u; say $u.base(16)
17:27 camelia rakudo-moar af4c2e: OUTPUT«100000000000000000000000000000000␤»
17:28 timotimo tbrowder: what are you looking for?
17:28 ItayAlmog I create the object representation myself from looking at other languages but perl is much more dynamic
17:28 mspo what is beyond state of the art?
17:28 ItayAlmog I created*
17:28 TimToady we should really produce a better message if all the candidates are rejecting the argument on the basis of 'is rw'
17:28 dalek doc: 1104dc2 | gfldex++ | doc/Language/control.pod6:
17:28 dalek doc: name the exception on failed return type checks
17:28 dalek doc: review: https://github.com/perl6/doc/commit/1104dc2dbf
17:29 TimToady mspo: 6model's representational polymorphism
17:29 TimToady at least, state of the art in the realm of current non-academic languages :)
17:29 tbrowder ref docs, UInt addition, zoffix says since  UInt is a subset, it doesn't behave like a class because you can't instantiate it.  just experimenting.
17:30 TimToady most other common languages just say "here's our object representation, deal with it"
17:30 timotimo TimToady: yes, we should
17:30 mspo I never noticed moarvm called itself "A 6model-based.."
17:31 TimToady if we listed all the places where we're pushing state of the art, we'd have Entish names :)
17:31 ItayAlmog So i need a way to allow for custom object representation...
17:31 timotimo mspo: surprisingly, the moarvm.org front page doesn't mention 6model :\
17:31 timotimo ItayAlmog: it's effectively like a second vtable, really
17:31 TimToady shh! it's our sekrit sauce!
17:32 Elfoonto m: my $int = Int.new: 42;
17:32 camelia rakudo-moar af4c2e: ( no output )
17:32 Elfoonto m: my $uint = UInt.new: 42;
17:32 camelia rakudo-moar af4c2e: OUTPUT«You cannot create an instance of this type (UInt)␤  in block <unit> at <tmp> line 1␤␤»
17:32 timotimo on moar we have something called an STable, or "shared table". there's one for each combination of Type Oject + REPR
17:32 Elfoonto tbrowder: ^
17:33 TimToady basically, the .HOW and the .REPR pointers
17:33 dogbert17 gfldex++
17:34 Elfoonto m: class BetterInt is Int {};
17:34 camelia rakudo-moar af4c2e: ( no output )
17:34 Elfoonto m: class BetterInt is UInt {};
17:34 camelia rakudo-moar af4c2e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤UInt does not support inheritance, so BetterInt cannot inherit from it␤at <tmp>:1␤»
17:34 ItayAlmog My mind is going to explode...
17:34 Elfoonto tbrowder: ^ another one. subsets aren't classes, so it's wrong to call them such
17:34 Elfoonto And UInt is a subset
17:34 zapwai joined #perl6
17:34 zapwai joined #perl6
17:35 ItayAlmog I intended to create subsets like i create classes but they behave differently when compiling thr code
17:35 Elfoonto ItayAlmog: that's a mandatory part of being acquanted with Perl 6 :P
17:35 bioduds maybe classes could somehow deviate to whatever
17:35 bioduds using * or dev
17:35 Elfoonto That's why we sell spare minds :)
17:36 bioduds free-thinking you oo model same way subsets allow you to "re-build" your types
17:37 ItayAlmog Ok i will read the docs try to create a more dynamic system and than i will come back with more questions :)
17:37 AlexDaniel so you can't subset a subset?
17:38 timotimo ItayAlmog: feel free to ask as much as you want :)
17:38 timotimo ItayAlmog: oh btw did you see the perl6 implementation based on c++ called "arane"?
17:38 ItayAlmog I actually thought i could start to create the OO part xD
17:38 timotimo it was sadly abandoned rather quickly
17:38 Wiertek joined #perl6
17:38 ItayAlmog No i will sure check it out
17:38 timotimo https://github.com/BizarreCake/Arane
17:38 timotimo that's the one
17:39 timotimo ah, it's a bytecode compiler + interpreter though
17:39 timotimo you're building a bytecodeless to-native compiler, right?
17:39 bioduds class Butterfly * { handles <my> freely; subclass UInt <<change here>> } i dont know
17:39 itaipu joined #perl6
17:39 tbrowder so can someone please correct "doc/doc/Type/UInt.pod6" , and put the corrected text somewhere else if warranted, but keep it  searchable
17:39 timotimo bioduds: that seems just like syntax; you can freely do that with a slang already :)
17:39 ItayAlmog I am parsing perl6 source files and generate assembly code from it
17:40 konobi timotimo: i playing with nqp to native using terra (multi-stage programming runtime)
17:40 bioduds oh, that is cool. but does it allow you to change inherent class rules?
17:40 bioduds like rw for instance?
17:41 konobi terra does since it's runtime is JIT enabled
17:41 timotimo rw is very high-level, actually
17:41 bioduds required... and more, creating my own expected rules?
17:42 timotimo "is rw" just decides whether the Attribute will have a read-writable or just a readable public accessor generated for it when the class .compose-s
17:42 timotimo https://github.com/LLFourn/p6-AttrX-InitArg  https://github.com/pierre-vigier/Perl6-AttrX-Lazy  https://github.com/pierre-vigier/Perl6-AttrX-PrivateAccessor
17:42 timotimo a few examples of making attributes "different" to wet your appetite and show what's already easy
17:43 bioduds cool, I'll take a look
17:43 bioduds :)
17:43 ItayAlmog Should i make assembly inline in my compiler? Like the way in C you can just have the __asm__ thing?
17:44 timotimo it'll hurt compatibility with other compilers, but aside from that it seems fine to do that
17:45 Elfoonto Make it a pod block ;)
17:45 Elfoonto =begin asm ... =end or some such
17:45 timotimo Elfoonto: this way lies madness; just look at how javascript implements "use strict"
17:45 konobi all that matters at the native runtime layer is the slots
17:45 Elfoonto :D
17:45 konobi in terms of ro/rw
17:46 timotimo ro and rw for attributes? there's no such thing at the native runtime layer as a read-only attribute
17:46 konobi since the native code that's actually doing the setting/getting/etc.
17:46 ItayAlmog joined #perl6
17:46 ItayAlmog Interesting, will think about it
17:47 rindolf ItayAlmog: hi.
17:47 spider-mario joined #perl6
17:47 ItayAlmog rindolf: hey
17:47 konobi timotimo: depends on how the native layer decides it wants to deal with the slots declared by the MOP
17:47 rindolf ItayAlmog: are  you Israeli by any chance?
17:47 ItayAlmog Yes i am :)
17:47 timotimo ok, i should really have said: p6opaque doesn't have a notion of read-only/read-write attributes
17:47 rindolf ItayAlmog: ah, nice, so am I.
17:48 MilkmanDan joined #perl6
17:48 ItayAlmog rindolf: Nice to meet you :)
17:48 rindolf ItayAlmog: nice to meet you too.
17:48 rindolf ItayAlmog: where do you live?
17:48 spider-mario joined #perl6
17:49 ItayAlmog I am in modi'in
17:49 rindolf ItayAlmog: ah, szabgab is there.
17:49 Xliff .tell MasterDuke The +@ did not work.
17:49 yoleaux Xliff: I'll pass your message to MasterDuke.
17:49 rindolf ItayAlmog: I live in Tel Aviv.
17:50 ItayAlmog I got to go, will rethink my OO system, see you tomorrow
17:50 ItayAlmog rindolf: Nice!
17:52 ItayAlmog joined #perl6
17:54 timotimo "read error: connection refused" seems like a strange way to disconnect
18:00 leont joined #perl6
18:12 bpmedley joined #perl6
18:17 woolfy joined #perl6
18:18 Unavowed Is it possible to assign a method or submethod to a &variable ?
18:19 timotimo yes
18:19 timotimo but you'll have to carry the right invocant around as well
18:19 timotimo m: say Str.^find_method('uc').perl
18:19 camelia rakudo-moar af4c2e: OUTPUT«method uc (Str $: | is raw) { #`(Method|44815272) ... }␤»
18:20 Unavowed timotimo: thanks
18:20 timotimo m: my &uc_method = Str.^find_method('uc'); say uc_method("heyo")
18:20 camelia rakudo-moar af4c2e: OUTPUT«HEYO␤»
18:21 Unavowed I was hoping I could do the equivalent of (&f1, &f2).map(&Promise.start), but it seems like a non-trivial thing to write
18:21 masak isn't that the opposite of "carry[ing] the right invocant around"?
18:21 masak you have to pass it as an extra first argument with every call, is what you have to do
18:24 mcmillhj joined #perl6
18:24 timotimo what i mean is the method you grabbed doesn't have the invocant bound to it like in python
18:24 timotimo Unavowed: why not just .map(*.start)?
18:25 AlexDaniel Unavowed: what about (&f1, &f2).map(&start) or (&f1, &f2).map({start $_}) ?
18:25 AlexDaniel or whatever
18:25 moritz start $_()
18:25 Unavowed timotimo: Method 'start' not found for invocant of class 'Sub'
18:26 dalek doc: 68b6859 | (Tom Browder)++ | doc/Type/UInt.pod6:
18:26 dalek doc: define correct type of the UInt; show some example usage
18:26 dalek doc: review: https://github.com/perl6/doc/commit/68b6859ab6
18:26 Unavowed AlexDaniel: start is a prefix operator so can't do &start
18:26 ItayAlmog joined #perl6
18:26 timotimo m: say &start
18:26 camelia rakudo-moar af4c2e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    start used at line 1. Did you mean 'spurt', 'sort', 'sqrt'?␤␤»
18:26 AlexDaniel start is an operator? :o
18:26 RabidGravy though you can use .assuming on methods to get a thing which has the invocant pre-loaded as it were
18:26 timotimo oh, i see
18:27 timotimo right, because start takes a block and does special code-gen for $/ und $!
18:27 Unavowed timotimo: and as for .map({start $_})
18:27 Unavowed Useless use of $_ in sink context (line 6)
18:27 dalek doc: 7bdd250 | (Tom Browder)++ | doc/Type/UInt.pod6:
18:27 dalek doc: correct statement
18:27 dalek doc: review: https://github.com/perl6/doc/commit/7bdd25069c
18:27 moritz AlexDaniel: yes, it thunks the RHS
18:27 timotimo Unavowed: what you really want is $*SCHEDULER.start, i believe
18:27 moritz m: sub f() { 42 }; sub g { 23 }; await (&f, &g).map({ start $_() })
18:27 camelia rakudo-moar af4c2e: ( no output )
18:28 Unavowed I have had success with .map(-> &f { Promise.start(&f) })
18:28 Unavowed but I've been trying to write this in a more concise way
18:28 timotimo Unavowed: the thing is when you grabbed the start method of Promise you didn't make sure to pass the invocant (Promise in this case)
18:29 timotimo moritz solution looks good to me
18:30 ItayAlmog Ok, i think that i have a way for a rep system on the attributes part, but how do you treat a method ?
18:31 timotimo method lookup isn't so complicated
18:32 moritz m: say 2.5.^lookup('sqrt').perl
18:32 camelia rakudo-moar af4c2e: OUTPUT«method sqrt (Rat $: *%_) { #`(Method|45170040) ... }␤»
18:32 Unavowed moritz, timotimo: Ah, cool, thanks!
18:33 ItayAlmog joined #perl6
18:33 timotimo ItayAlmog: you can have a look at how moar handles method caching, and how the Metamodel/ stuff in rakudo (and also in nqp) handles "publishing the method table"
18:33 girafe joined #perl6
18:33 timotimo i hope itay reads irclog
18:34 * timotimo is AFK for a bit
18:34 ItayAlmog joined #perl6
18:34 AlexDaniel what's the difference between ^lookup and ^find_method?
18:34 ItayAlmog Ok so i think methods will be stored in a VT like i already did
18:36 moritz AlexDaniel: something with role punning, iirc
18:36 moritz m: say Real.^lookup('sqrt').perl
18:36 camelia rakudo-moar af4c2e: OUTPUT«method sqrt ($?CLASS $: *%_) { #`(Method|68905040) ... }␤»
18:36 moritz m: say Real.^find_method('sqrt').perl
18:36 camelia rakudo-moar af4c2e: OUTPUT«ForeignCode.new␤»
18:39 ItayAlmog So class will have representation type, a pointer to the VT and a pointer to the inherited type vt and a representation type of the inherited class, also there will be a data section for the current and for the inherited class (where the. Actual data is stored), than using the Rep type i can use the correct method for finding an attribute inside the class in runtime
18:40 moritz ItayAlmog: you make it sound like Perl 6 is C++ :-)
18:41 wamba joined #perl6
18:41 moritz we have method caches, which come close to VTs
18:42 ItayAlmog Well, i am writing a native compiler and this is the best way i can think of right now
18:42 jnthn AlexDaniel: .^lookup = look it up for introspection; gives you a Method object. Shorter; usually what you want. .^find_method = get something to invoke in order to call the method; it may not be the Method object itself in all cases (role punning, MOP plug-ins like grammar tracer, etc.)
18:42 jnthn And nice you're documenting it, this comes up quite a bit :)
18:43 moritz but they aren't always authoritative, for example if you have a FALLBACK method
18:43 ItayAlmog joined #perl6
18:45 mcmillhj joined #perl6
18:46 keithbro joined #perl6
18:46 ItayAlmog joined #perl6
18:46 andrzejku joined #perl6
18:47 keithbro hello, how does `panda installdeps` work? i can’t find a good description online anywhere
18:47 tbrowder can anyone help with a travis build problem?
18:47 domidumont joined #perl6
18:48 keithbro sorry, to clarify “how does it work” = “how do i use it”
18:48 gfldex tbrowder: what kind of problem is it?
18:48 tbrowder i want to use Test::META with the build but travis says it isn't in the ecosystem
18:49 gfldex tbrowder: can you link the .travos.yml in question?
18:49 tbrowder https://www.irccloud.com/pastebin/gd0IdWpW/
18:49 moritz keithbro: there's a META6.json file that lists the dependencies
18:49 moritz keithbro: in a module, that is
18:50 fruunode joined #perl6
18:50 moritz keithbro: and panda installdeps reads that meta file, extracts the dependencies, and installs them
18:50 gfldex tbrowder: try to add `panda update` (while I look for the module that caused me the same problem)
18:50 fruunode tbrowder: ensure it's listed in test-depends on your META file
18:50 keithbro thanks moritz , can you point me to an example of that JSON file?
18:50 tbrowder gfldex: I also show Test::META in my META6.json file in "build-depends"
18:51 tbrowder oh, "test-depends" instead of "build-depends"?--will try that
18:51 fruunode keithbro: pick any module on https://modules.perl6.org
18:51 fruunode keithbro: like this one: https://github.com/zoffixznet/perl6-SPEC-Func/blob/master/META6.json#L9
18:52 keithbro great thanks!
18:54 Unavowed Excuse the newb question, but is it possible to write something like: my (@a, @b) = [[1], [2]]; so it's unpacked resulting in @a getting [1] and @b getting [2]?
18:54 zacts joined #perl6
18:56 fruunode Unavowed: how would it know how how to distribute the elements among the two arrays/?
18:56 leont joined #perl6
18:57 fruunode m: my (:@a, @b) = ([1], [2]); dd [ @a, @b]
18:57 camelia rakudo-moar af4c2e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot put required parameter @b after variadic parameters␤at <tmp>:1␤------> 3my (:@a, @b7⏏5) = ([1], [2]); dd [ @a, @b]␤    expecting any of:␤        constraint␤»
18:57 fruunode m: my :(@a, @b) = ([1], [2]); dd [ @a, @b]
18:57 camelia rakudo-moar af4c2e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 :(@a, @b) = ([1], [2]); dd [ @a, @b]␤»
18:57 gfldex Unavowed: see https://docs.perl6.org/language/variables#index-entry-destructuring_assignment and https://docs.perl6.org/type/Signature
18:57 moritz m: my (@a, @b) := [1], [2, 3]; dd @a; dd @“
18:57 camelia rakudo-moar af4c2e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Name must begin with alphabetic character␤at <tmp>:1␤------> 3my (@a, @b) := [1], [2, 3]; dd @a; dd @7⏏5“␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤     …»
18:57 moritz m: my (@a, @b) := [1], [2, 3]; dd @a; dd @b
18:57 camelia rakudo-moar af4c2e: OUTPUT«[1]␤[2, 3]␤»
18:58 gfldex Unavowed: the left side of destructuring is a (slightly limited) Signature
18:58 moritz Unavowed: ^^
18:58 fruunode hax
18:58 fruunode :)
18:59 fruunode m: my (@a, @b) := [[1], [2]][0,1]; dd [@a, '|', @b]
18:59 camelia rakudo-moar af4c2e: OUTPUT«[[1], "|", [2]]␤»
19:00 Ven joined #perl6
19:02 ItayAlmog joined #perl6
19:04 vendethiel joined #perl6
19:04 Unavowed thanks, guys
19:05 tbrowder duh, ref travis err:  one has to spell the dependencies correctly: s/Test::Meta/Test::META/
19:05 mcmillhj joined #perl6
19:06 skrshn joined #perl6
19:12 brrt joined #perl6
19:19 espadrine joined #perl6
19:20 Unavowed I have written this work of beauty and it works: my (@a, @b) := (&f, &g).map({start $_()}).map({.result}).eager;
19:20 Unavowed All the effort didn't go to waste ;)
19:23 zakharyas joined #perl6
19:29 zacts joined #perl6
19:30 TEttinger joined #perl6
19:34 El_Che yeah: the first rakudo package with docker has been built (ubuntu 16.04 x64, other OS will follow). This means that whover release ubuntu can create native packages with one container command. Once evverything is stable, I'll upload it to docker hub.
19:35 timotimo Unavowed: personally, i'd >>.result; the .eager at the end surprises me a little bit
19:35 El_Che I am now finetuning the fpm options
19:36 Unavowed timotimo: the binding doesn't seem to work with a Seq, .eager converts to a List which works
19:36 Unavowed instead of eager, writing [0,1] or [*] also works
19:37 gfldex m: Map.new().List.WHAT.say
19:37 camelia rakudo-moar af4c2e: OUTPUT«(List)␤»
19:38 labster joined #perl6
19:38 labster joined #perl6
19:39 jjido joined #perl6
19:42 timotimo ah
19:43 perlpilot joined #perl6
19:47 jjido joined #perl6
19:54 obfusk joined #perl6
19:58 cdg joined #perl6
20:00 bartolin .tell elohmrow the UnwindException you get trying to install a module with rakudo-j is one of the bigger known bugs with the JVM backend: https://rt.perl.org/Ticket/Display.html?id=124279
20:00 yoleaux bartolin: I'll pass your message to elohmrow.
20:00 bartolin j: gather loop { take my $foo; last; }
20:01 camelia rakudo-jvm cd19db: OUTPUT«Error in socket connection:org.perl6.nqp.runtime.UnwindException␤     at org.perl6.nqp.runtime.ThreadContext.<init>(ThreadContext.java:125)␤  at org.perl6.nqp.runtime.GlobalContext.getCurrentThreadContext(GlobalContext.java:340)␤ at org.perl6.nqp.runtime.G…»
20:01 bartolin (at least I think, it is the same problem)
20:05 bioduds joined #perl6
20:05 bartolin .tell elohmrow there are a lot of skipped tests in roast due to this error. you can grep for UnwindException in roast to find tests with this failure mode
20:05 yoleaux bartolin: I'll pass your message to elohmrow.
20:05 bioduds hey guys
20:05 bioduds anyone pretty good in shell script there to help me out?
20:06 geekosaur this is probably not the best place to ask
20:06 bioduds I know, the thing is, I created a shell script to install perl6
20:06 bioduds everything is working fine except the damn PATH I don't seem to be able to get exported correctly
20:07 geekosaur in any case you are better off just asking, rather than trawling
20:08 bioduds trawling? me?
20:09 [Coke] at a guess, you're running the script and inside, exporting a path taht you're trying to use from the calling shell?
20:09 timotimo you do realize that when you export an environment variable, it has no way to "travel up" into the shell that called the script?
20:09 [Coke] if that's it, you need to run the script with ". awesome.sh" instead of "sh awesome.sh"
20:10 geekosaur trawling != trolling
20:10 bioduds oh, what is trawling?
20:10 bioduds coke, yes, just tried
20:10 bioduds with . awesome.sh
20:10 bioduds take a look
20:10 bioduds http://67.205.136.118/install.sh
20:11 geekosaur it's a form of fishing. in this case, meaning you're trying to catch an expert first instead of asking your question and letting people try to answer it
20:11 bioduds last lines
20:11 geekosaur the latter is much more effective on IRC
20:11 timotimo oh, like saying "i need an expert for my question!" and waiting for an expert to say "aye"
20:12 geekosaur ok, your problem is you are setting it inside your script
20:12 geekosaur tjis does not affect the shell that ran your script
20:12 bioduds oh, ok. then, i cant make my shell script export the PATH to perl6, I don't know why. Heres the script http://67.205.136.118/install.sh does someone know why?
20:12 geekosaur it's exactly the difference  between ". ~/.bashrc" and "sh ~/.bashrc"
20:12 bioduds line to run it is curl http://67.205.136.118/install.sh | sh
20:12 [Coke] ok, so that's not what that script is doing; you're adding exort PATH lines to your ~/.bashrc.
20:12 timotimo # curl https://install.perl6.org/ | sh
20:12 timotimo no.
20:13 [Coke] so you run this script. it updates your .bashrc. then what do you do - what happens, and what did you expect?
20:13 geekosaur basically, you need to make the invoking shell . your script, or echo commands for the user to run afterward
20:13 geekosaur as long as your script is run as a separate process, it *cannot* update its parent's environment
20:13 bioduds i run it, it installs perl6 fine but does not export the PATH so that perl6 would be directly usable in the command line
20:14 konobi unless your shell supports coprocs
20:14 [Coke] if I install something like macports that updates my .bash file, I do "exec bash" to create a new bash that sources the startup files. then I have all the updated paths available.
20:14 eliasr joined #perl6
20:14 [Coke] bioduds: right. that's not how shell scripts work.
20:14 timotimo https://www.idontplaydarts.com/2016/04/detecting-curl-pipe-bash-server-side/  -  have you seen this, bioduds?
20:14 bioduds I tried exec bash
20:14 bioduds let me try once again
20:14 [Coke] and even if they did, you're not updating PATH in that script
20:14 konobi `hash -r` on bash
20:15 [Coke] you're updating the startup script taht sets path the next time someone runs bash.
20:15 timotimo [Coke]: well, he is calling . ~/.bashrc at the end of run_install
20:15 konobi to tell it to not use a cache for avalues in PATH
20:15 geekosaur also if your installer adds the path to ~/.bashrc on my system I will find you and beat you up
20:15 [Coke] timotimo: AH. missed that.
20:15 timotimo :)
20:15 geekosaur I not only know but *need* the difference between .bash_profile and .bashrc
20:15 [Coke] ok. yes, and that won't work, for reasons discussed above.
20:15 [Coke] geekosaur: no need to threaten violence, sheesh. :P
20:15 timotimo but if we officially offer a way to "curl ... | sh" to install perl6, we'll be the/a laughing stock of ... people
20:16 timotimo it would be very much not well received
20:16 [Coke] I believe DrForr suggested bioduds write this script.
20:16 [Coke] if this is from the FB convo I saw.
20:17 timotimo i shall rant at DrForr, then
20:17 [Coke] so, directly any hatemail to DrForr, and we can offer constructive criticism to improve the script.
20:17 timotimo i find it problematic that the script just runs rm -rf ~/.rakudo without asking or announcing
20:17 [Coke] or, maybe, just no hate. :)
20:17 [Coke] yup, that's a problem.
20:17 bioduds Meteor is not being laughed at
20:18 [Coke] bioduds: do you have a pointer to their script?
20:18 bioduds sure
20:18 timotimo i sure hope we're holding ourselves to a higher standard than javascript frameworks?
20:18 bioduds https://install.meteor.com
20:18 [Coke] timotimo: that seems like unnecessary snark.
20:18 geekosaur even perlbrew expects you to curl|sh
20:18 timotimo :\
20:18 timotimo at least they use https urls
20:18 geekosaur it's *bad*. it's horribly insecure
20:19 El_Che I added 2 scripts on /opt/rakudo/bin on the pkgs I am building: install_panda_as_user.sh and install_zef_as_user.sh. Is this a good (tm) idea?
20:19 bioduds point is: perl6 is supposed to be highly accessible to beginners
20:19 bioduds creating a one liner to install it, in my view is important for that
20:19 timotimo perl6 is not supposed to make beginner's machines highly accessible to people on the same WIFI :)
20:19 [Coke] bioduds: I would recommend using docker, instead. btw.
20:19 geekosaur naturally it's The Right Way in the minds of the same people who mindlessly open spam and tap any URL texted to them by complete unknowns
20:20 [Coke] I agree that making it easy to install rakudo is a good thing.
20:20 bioduds is what im trying to do
20:20 timotimo we could ship a MojoInstaller for perl6 :3
20:20 timotimo hm, but that's kind of sort of more for binaries than for sources
20:20 [Coke] so that script has a lot more help, and just tells you what to add instead of adding it.
20:22 bioduds any specific do's for me guys?
20:22 bioduds nine created http://install.perl6.org that may be used to this script
20:22 timotimo bioduds: we should definitely use https urls as the first thing
20:22 [Coke] so, you're not going to get the existing path in the existing shell updated by running "curl * | sh" - it works for meteor, presumably, because they already have the path setup as part of the framework.
20:23 bioduds jeff goff told me he would put up a test VM later on to check the script
20:23 bioduds please, help me out
20:23 timotimo sorry for being so harsh :\
20:23 bioduds yep, https yes
20:23 bioduds definitely
20:23 bioduds no prob timotimo
20:23 [Coke] remove the rm command. remove the VERBOSITY stuff, that has nothing to do with rakudo or sh
20:23 bioduds im just not very familiar with bash
20:24 bioduds ok, removing
20:24 [Coke] the "run perl6 --version" isn't going to work. change those notes to tell the user what to add. Don't install into ~/.rakudo
20:25 bioduds where should I install it?
20:25 [Coke] there's a lot of ways this is going to fail, so I wouldn't get my hopes up. Also, join #perl6-toolchain
20:25 bioduds I used .rakudo to be invisible
20:25 bioduds like meteor does, it goes into .meteor
20:25 bioduds http://67.205.136.118/install.sh
20:25 bioduds removed rm -rf
20:26 [Coke] join #perl6-toolchain - they can do a much better job of pointing you in the right direction.
20:26 bioduds removed verbosity stuff (this I was hoping would prevent so much log on screen)
20:27 bioduds about the export? do you guys know why it does not do the export?
20:27 [Coke] because that is not how bash works
20:27 MasterDuke joined #perl6
20:27 bioduds cause when I put the same lines in another shell script like another.sh and run directly sh another.sh it does the trick
20:27 [Coke] https://stackoverflow.com/questions/496702/can-a-shell-script-set-environment-variables-of-the-calling-shell
20:28 bioduds ill try exec bash
20:28 bioduds thanks coke, I read this earlier
20:28 ugexe ]zef has a curl backend
20:29 [Coke] bioduds: not exec bash in your script
20:29 [Coke] if you want the CURRENT RUNNING SHELL to have the new path information, that isn't going to work and you shouldn't do that.
20:29 bioduds no? man, shell makes me so confused
20:30 [Coke] Well, this will be a great chance for you to learn, then. :)
20:30 bioduds yes. I like your spirit
20:30 woolfy joined #perl6
20:32 harmil_wk joined #perl6
20:33 DrForr bioduds: Like I mentioned in the FB posting you could do worse than look at what perlbrew does in its installer script.
20:33 brrt joined #perl6
20:34 bioduds hey DrForr, im not sure I have the capacity to do it, I mean going through perlbrew installer script. i thought I simply put a simple shell recipe and it would do the trick
20:35 bioduds it actually does
20:35 mst the perlbrew installer expects you to '.' a file afterwards
20:35 margeas joined #perl6
20:35 mst to get the updated PATH
20:35 bioduds installs perl6 like a charm but the PATH is killing me
20:35 mst you're trying to do something impossible, then beating yourself up that it doesn't work
20:35 mst I don't get it
20:35 mst write
20:36 mst 'export PATH=/wherever/you/put/perl6/bin:$PATH' to a ~/.rakudo/shellenv file
20:36 mst and document people need to source that
20:36 mst just like perlbrew does
20:36 [Coke] as opposed to your current setup of adding it directly to the .bashrc
20:36 DrForr bioduds: You can't export environment variables back to your parent, which is what you're trying to do in your installer, I'm guessing.
20:36 bioduds that would not be a one liner installation
20:37 [Coke] (which is problematic for users like geekosaur )
20:37 [Coke] bioduds: You're right. it's not
20:37 DrForr Neither is perlbrew, nor am I guessing is Meteor.
20:37 [Coke] it's the best you're going to do.
20:37 bioduds meteor is
20:37 geekosaur actually it's specifically problematic to and for perlbrew
20:37 [Coke] bioduds: meteor is part of a larger thign, yes?
20:37 [Coke] presumably, you already setup the path for that before running the meteor install.
20:38 bioduds no
20:38 bioduds simply curl https://install.meteor.com | sh
20:38 bioduds and thats it
20:38 mst bioduds: meteor's installer requires running as root and puts the binaries into /usr/local/bin
20:38 bioduds no it does not
20:38 bioduds you run with your user
20:38 mst PREFIX="/usr/local"
20:38 mst from the top of meteor's installer
20:39 bioduds yes, PREFIX="/usr/local"
20:39 bioduds i dont know what that is
20:39 mst and it tests /usr/local/bin/meteor
20:39 mst as I told you
20:39 bioduds would you please explain me
20:39 mst so yes it does
20:39 DrForr bioduds: "Now you need to do one of the following..." according to the documentation, just as perlbrew does.
20:39 [Coke] so if your path already has /usr/local in it... you didn't need to update it. that's probably quite common.
20:39 avuserow is there a list of specialty perl6 IRC channels somewhere?
20:39 mst bioduds: yep
20:39 mst bioduds: if you aren't root
20:39 [Coke] but since you're installing into a brand new location that the user isn't going to already ahve in the path... this is the standard way to do it. for example, this is what macports does, with /opt/local
20:40 mst bioduds: meteor tells you to set $PATH yourself
20:40 mst bioduds: I've just read their installer
20:40 perlpilot avuserow: I could make one real quick (might not be exhaustive)
20:40 mst bioduds: you are trying to do something impossible.
20:40 mst look, I'm actually kind of an installer specialist
20:40 bioduds so I should put PREFIX="/usr/local" on top?
20:40 mst telling me "no it doesn't" won't magically make the impossible possible
20:40 mst no
20:40 mst you should stop pretending meteor's installer does something it doesn't
20:40 bioduds please, mst, help me out
20:40 mst I did!
20:40 [Coke] Please accept the fact that you're not getting a one-line installer.
20:40 mst you can get just as close to one-line as meteor!
20:41 [Coke] If you don't trust us on that one, why would you trust us on anything else?
20:41 mst the problem is you misunderstood what meteor's did!
20:41 bioduds I trust you
20:41 mst so what haven't I already answered?
20:41 itaipu joined #perl6
20:41 bioduds so the solution is to have all installed and then run export commands?
20:41 bioduds a 3 liner?
20:41 mst what?
20:42 mst what's wrong with writing a script
20:42 mst that they add to their .bashrc
20:42 mst like perlbrew does
20:42 mst like I suggested originally
20:42 [Coke] bioduds: mst already answered that, getting url...
20:42 bioduds sorry mst, I believe I didnt catch that
20:42 gfldex where is camelias repo?
20:42 moritz gfldex: perl6/evalbot on github
20:42 [Coke] http://irclog.perlgeek.de/perl6/2016-08-31#i_13127326
20:42 mst write 'export PATH=/wherever/you/put/rakduo/bin:$PATH' to a ~/.rakudo/shellenv.sh or something
20:42 DrForr bioduds: meteor requires $HOME/.meteor be in your $PATH.
20:42 mst and tell the user to add '. $HOME/.rakudo/shellenv.sh' to their .bashrc
20:43 mst and everything shall work
20:43 bioduds 'export PATH=/wherever/you/put/perl6/bin:$PATH' to a ~/.rakudo/shellenv file
20:43 bioduds and source it?
20:43 DrForr perlbrew requires $HOME/.perlbrew be in your path.
20:43 mst exactly
20:43 rindolf joined #perl6
20:43 bioduds ok
20:43 bioduds let me do that
20:44 nine bioduds: reading the backlog. We actually want rakudo to be visible. Makes it a whole lot easier when people have module installation issues.
20:44 woolfy1 joined #perl6
20:44 bioduds ok, ill put it visible
20:44 DrForr Yes, the key is that the installer *user* edits whatever .bashrc/.zshrc file they want to use, and then reload their shell.
20:44 mst once you have that working
20:44 mst you can make the installer prompt yes/no to add to .bashrc for them
20:44 mst but that's significantly more complicated
20:45 DrForr Which is one reason why perlbrew tells the user what to do, rather than tries to edit the .rc file directly.
20:46 mst right
20:46 mst I have a plan for how to do that and make it sane, but it requires shaving a couple of particularly hairy yaks
20:47 bioduds here
20:48 bioduds http://67.205.136.118/install.sh
20:48 bioduds is this better?
20:48 DrForr Of course every few weeks we get someone complaining that perlbrew doesn't work, usually it's because they didn't read that step. Which is an argument for automating that process as well, but as mst points out it's a hairy problem.
20:48 nadim_ joined #perl6
20:49 bioduds yes, i got it is hairy
20:49 bioduds it is impossible. though nothing is impossible, i got that
20:49 El_Che Request for brutal feedback: perl6 ubuntu packages (I haven't tested the 32-bit on yet): http://claudio.ulyssis.be/perl6/ . Created with docker, so the release manager kan create the packages himself: https://github.com/nxadm/rakudo-pkg
20:50 El_Che simple minimalistic packages: installs everything on /opt/rakudo and doesn't touch the system. Put /opt/rakudo/bin in your $PATH
20:50 geekosaur no, strictly speaking there are ways to do it by running a debugger on the parent shell and injecting a new environment setting, or similar ugliness. excedpt if you do it at the wrong time the parent shell will dump core and their terminal goes away
20:50 geekosaur it's not designed for this use, you should not try to be clever or you will break things
20:51 bioduds understood
20:51 mst bioduds: get the source file ready and working first
20:52 mst have a chunk of 'echo' statements that tell them about it
20:52 bioduds so, right now it installs Perl6 and tells the user to run sh ~/rakudo/setpath.sh aside
20:52 mst (just like perlbrew and meteor)
20:52 mst er, no, '. ~/rakudo/setpath.sh'
20:52 mst not 'sh'
20:52 mst '.'
20:52 mst 'sh' will start another shell and not work
20:52 mst don't change the advice :(
20:52 bioduds oh, ok
20:52 timotimo mst: why would they want to call a script with the current directory? :P
20:52 timotimo directories aren't even executables!! ;)
20:52 mst bioduds: once you've got that working
20:52 mst then you can -add- code to offer to add it for them
20:53 mst and the instructions are already written and tested for when they say 'no'
20:53 geekosaur timotimo, the . command is the POSIX name for bash's "source" (which it stole from csh)
20:53 mst or when it doesn't work
20:53 mst etc. etc.
20:53 bioduds ok, let me test it
20:54 geekosaur it means load the script into the current shell instead of running it in a subshell. which is what you need if you want it to modify the current shell's environment
20:54 timotimo geekosaur: i do know that, i was being facetious, hence the smileys
20:54 geekosaur sorry.  lots of people *don't* know that; they know bash and think it is the definition of all shells
20:54 bioduds ok, so I'm running a test now to see if all is working
20:54 bioduds takes like 4-5 minutes to install all
20:55 geekosaur even debian finally gave up on trying to convince people otherwise :(
20:56 timotimo geekosaur: though i was about to say "why not write it as 'source', to make it clearer?"
20:56 timotimo because i thought . might be the moderner variant
20:56 bioduds so, geekosaur, once I verify that it works, I should try to run it inside my previous script?
20:56 geekosaur . dates from 7th Research Edition
20:57 geekosaur yet another holdover from when your "terminal" was a KSR-33
20:57 bioduds should I put source?
20:57 geekosaur (a teletype, more or less)
20:57 perlpilot geekosaur: I like how when I start to think I'm old, you always seem to remind me that there are people who are older  :)
20:57 bioduds source ~/rakudo/setpath.sh ?
20:57 timotimo nah, keep .
20:57 geekosaur if you only care about linux users
20:57 bioduds actually, I believe this will run on mac too
20:57 bioduds didn't test yet
20:58 timotimo doesn't mac osx ship a version of bash?
20:58 geekosaur yes, macs have bash as /bin/sh
20:58 geekosaur freebsd doesn't
20:58 geekosaur solaris doesn't
20:58 * geekosaur works with both of those ~daily
20:59 grondilu solaris doesn't have a shell??
20:59 El_Che the i386 pkg seems to work \o/
20:59 geekosaur sigh
20:59 mst grondilu: solaris sh is actually posix
20:59 geekosaur grondilu, is bash the only shell in exisutence, or just the only shell anyone is allowed to admit to?
20:59 mst it's a bit too posix for my taste
20:59 mst so I usually did 'exec ksh -o vi'
21:00 grondilu at college we used Solaris and we had at least csh
21:00 grondilu IIRC
21:00 * mst vomits
21:00 mst ksh ftw
21:00 mst (compared to csh at least)
21:00 geekosaur you missed my point. bash did not invent shells
21:00 mst grondilu: the point is /bin/sh is not always bash
21:01 El_Che ah solaris
21:01 bioduds I had to start over
21:01 grondilu of course, but what was written was "doesn't have /bin/sh"
21:01 * El_Che looks for his "Solaris Certified System Administrator" cert paper
21:01 bioduds last line still had a .rakudo
21:01 geekosaur bash started out as a ksh clone and grew from there, not every system has bash as /bin/sh, many have POSIX shells and older solaris doesn't even have that (it has the old System V /bin/sh)
21:01 bioduds changed that
21:01 * El_Che thinks it's in the trash
21:01 grondilu but I guess it was implied "doesn't have bash"
21:02 geekosaur erm, if that was in reference to what I wrote earlier, I did not say doesn't have /bin/sh
21:02 mst grondilu: no
21:02 mst grondilu: all he ever said was '/bin/sh is not always bash'
21:02 mst grondilu: then you went completely off piste for no reason I could quite understand ;)
21:02 gfldex lolibloggedaweebit https://gfldex.wordpress.com/2016/08/31/one-line-of-unicode-at-you-fingertips/
21:04 bioduds installing modules
21:04 bioduds why so serious
21:04 mst wat
21:05 bioduds https://i.ytimg.com/vi/7Uzm30LroAs/maxresdefault.jpg
21:05 grondilu 22:58 < timotimo> doesn't mac osx ship a version of bash?
21:05 grondilu 22:58 < geekosaur> yes, macs have bash as /bin/sh
21:05 grondilu 22:58 < geekosaur> freebsd doesn't
21:05 grondilu 22:58 < geekosaur> solaris doesn't
21:05 geekosaur yes, operative there is "bash as /bin/sh", not "/bin/sh"
21:06 grondilu yeah that what I missed.
21:06 * timotimo AFK for dinner
21:07 bioduds so it worked
21:08 bioduds let me . ~/rakudo/setpath.sh now
21:09 geekosaur also debian used to use dash as /bin/sh but they got tired of having to rewrite ~every linux-related shell script to be POSIX compliant instead of bash-only
21:10 El_Che ah dash
21:10 El_Che I remember that
21:10 El_Che bad times
21:11 mempko joined #perl6
21:11 leont dash is a fine /bin/sh, really. This might have worked better if they had done it 10 years earlier
21:11 atweiden joined #perl6
21:13 leont Then again, perl5's configure script starts with a special test for SCO csh, because it gets true and false the wrong way around. Have a hard time imagining a worse shell.
21:13 bioduds so
21:13 bioduds in meteor shell script
21:13 bioduds METEOR_SYMLINK_TARGET="$(readlink "$HOME/.meteor/meteor")" METEOR_TOOL_DIRECTORY="$(dirname "$METEOR_SYMLINK_TARGET")" LAUNCHER="$HOME/.meteor/$METEOR_TOOL_DIRECTORY/scripts/admin/launch-meteor"  if cp "$LAUNCHER" "$PREFIX/bin/meteor" >/dev/null 2>&1; then   echo "Writing a launcher script to $PREFIX/bin/meteor for your convenience."   cat <<"EOF"
21:13 bioduds this creates a symbolic link
21:14 bioduds that would be the approach, geekosaur?
21:14 bioduds mst?
21:14 mst bioduds: that's only necessary because meteor has a weird layout
21:14 mst you only need what I already said
21:14 geekosaur leont, that was actually a widespread bug
21:14 mst because perl6 is not that stupid
21:15 bioduds worked
21:15 bioduds so a 2 liner working
21:15 bioduds first
21:15 leont geekosaur: that is frightening!
21:15 bioduds curl https://install.perl6.org/ | sh
21:15 bioduds then
21:15 geekosaur an old, buggy csh that reversed the meanings of && and || was part of xenix and unisoft unix in the 1980s, and from there spread all over the non-4BSD world
21:16 bioduds . ~/rakudo/setpath.sh
21:16 bioduds and perl6 is up
21:16 bioduds it is in http://67.205.136.118/install.sh right now
21:16 woolfy joined #perl6
21:16 geekosaur (note: not true and false, but the shell conditional execution operators)
21:17 bioduds so, one suggestion
21:17 bioduds since I have Perl6 installed by the time I need to set the path, can't I actually use Perl6 to do the job?
21:17 bioduds actually, not a suggestion, a question
21:18 woolfy1 joined #perl6
21:18 ugexe i guess you could use perl6 to spawn a shell to set the PATH but why
21:19 bioduds cause then I would have my one liner
21:19 bioduds can you tell me how to do it ugexe?
21:19 bioduds how to spawn a shell and set the PATH?
21:19 geekosaur wut
21:20 bioduds using shell command?
21:20 jjido joined #perl6
21:21 bioduds shell ". ~/rakudo/setpath.sh"
21:21 ugexe ... how does that help you with a 1 liner vs doing it from the shell you would be invoking perl6 from to begin with
21:21 bioduds would that work?
21:21 bioduds from absolute path I guess
21:22 bioduds since it is installed
21:22 margeas joined #perl6
21:22 ugexe that doesnt answer the question
21:23 bioduds if I download a perl6 script and run it from the shell
21:23 bioduds or even using perl5 perhaps no?
21:24 bioduds run perl script from the installing sh to set the PATH?
21:24 bioduds let me try it
21:27 atweiden has anyone played around with generating text/fuzzing from a p6 grammar?
21:28 atweiden e.g. https://github.com/zimmski/tavor
21:30 jjido joined #perl6
21:31 jnthn atweiden: I did, and I gave a talk about it, and I think it goes down as the most confusing presentation I ever gave :)
21:31 jnthn The code is still on my github repo, though it's bitrotted some
21:32 jnthn And there's slides somewhere
21:32 jnthn http://jnthn.net/papers/2013-yapcna-grammar-generate.pdf are slides
21:32 atweiden great
21:32 atweiden indeed, what *if* p6 grammars could generate...
21:33 DrForr We'd hasten the creation of Skynet by 5 years.
21:36 bioduds trying
21:36 jnthn https://github.com/jnthn/grammar-generative/blob/master/lib/Grammar/Generative.pm6 is the code
21:39 MasterDuke jnthn: if you've got a min or two i asked a question in #perl6-dev about a ticket i've been playing with
21:39 yoleaux 17:49Z <Xliff> MasterDuke: The +@ did not work.
21:48 woolfy1 left #perl6
21:51 setty1 joined #perl6
22:07 stmuk joined #perl6
22:07 mcmillhj joined #perl6
22:17 cdg joined #perl6
22:18 Sgeo joined #perl6
22:28 mcmillhj joined #perl6
23:03 mcmillhj joined #perl6
23:08 atta joined #perl6
23:17 harmil_wk m: use NativeCall; sub abs(int32 $i) is native("c") returns Int {*}; say abs(-2)
23:17 camelia rakudo-moar ec9e81: OUTPUT«Cannot locate native library 'libc.so': /usr/lib64/libc.so: invalid ELF header␤  in method setup at /home/camelia/rakudo-m-inst-1/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 306␤  in method CALL-ME at /home/camelia/ra…»
23:17 harmil_wk Am I doing something wrong, there?
23:18 geekosaur m: use NativeCall; sub abs(int32 $i) is native("c") returns Int {*}; say abs(-2)
23:18 camelia rakudo-moar ec9e81: OUTPUT«Cannot locate native library 'libc.so': /usr/lib64/libc.so: invalid ELF header␤  in method setup at /home/camelia/rakudo-m-inst-1/share/perl6/sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall) line 306␤  in method CALL-ME at /home/camelia/ra…»
23:18 geekosaur whoops
23:19 geekosaur m: use NativeCall; sub abs(int32 $i) is native returns Int {*}; say abs(-2)
23:19 camelia rakudo-moar ec9e81: OUTPUT«2␤»
23:19 geekosaur libc's already in the image, otherwise it wouldn't be running. otherwise I think it's just getting the wrong one or something
23:19 El_Che or if you want to be explicit:
23:19 El_Che m: use NativeCall; sub abs(int32 $i) is native("c", v6) returns Int {*}; say abs(-2)
23:19 camelia rakudo-moar ec9e81: OUTPUT«2␤»
23:19 harmil_wk Ah okay, thanks
23:19 El_Che lib c is versioned
23:20 geekosaur mm, yes, probably libc.so is a linker script
23:20 mcmillhj joined #perl6
23:22 El_Che file /usr/lib/x86_64-linux-gnu/libc.so
23:22 El_Che /usr/lib/x86_64-linux-gnu/libc.so: ASCII text
23:22 El_Che :)
23:24 labster joined #perl6
23:26 skids joined #perl6
23:27 skids m: {:a, :b, :c}.perl.say; {:a :b :c}.perl.say
23:27 camelia rakudo-moar ec9e81: OUTPUT«{:a, :b, :c}␤{:a, :b(1), :c(1)}␤»
23:40 mcmillhj joined #perl6
23:43 bpmedley joined #perl6
23:59 mcmillhj joined #perl6

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

Perl 6 | Reference Documentation | Rakudo