»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
TimToady boarding for SJC & 00:04
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:19
avuserow crucialrhyme: check out the LEAVE phaser and the `will leave` constructs 00:27
m: my $x will leave {note "got here";}; say "hi"; die "omg";
camelia rakudo-moar b1c444: OUTPUT«hi␤got here␤omg␤ in block <unit> at <tmp> line 1␤␤»
avuserow crucialrhyme: docs.perl6.org/language/phasers 00:29
harmil Good flight, TimToady
crucialrhyme avuserow: thanks. so put the cleanup inside the "will leave" block? 00:33
avuserow yeah, so maybe something like: my $fh = open(...) will leave {.close;} # the variable itself is available as $_ in the block 00:34
or if it's not attached to a single variable, just do: LEAVE { #`(cleanup here) }
crucialrhyme cool! this is definitely a case where $_ is pretty nice 00:35
[Coke] skids: marked 00:36
skids [Coke]++ 00:37
TimToady and Glo are home, admiring our Very Own Bed 04:33
s/our/their/ 04:35
Xliff_zzzzz \o 04:40
Xliff Well, my EXPORT experiment seems to be working, however there are odd issues that I have encountered. 04:40
Given a signature of EXPORT(*@a), I can get things to work when the invocation is "use Module <a b>" 04:41
Xliff However, "use Module <a>" and just plain "use Module" will complain with a weird error. 04:41
"Cannot find method 'merge-symbols': no method cache and no .^find_method"
And this is in stage parse...
Is this a bug?
Xliff When I try turing EXPORT into a multi, things stay the same. 04:42
"multi sub EXPORT" with a returned map won't compile either.
Neither will "multi sub EXPORT($a)" 04:43
I can get the single case of "use Module <a>" working if I do "use Module <a>.list"
But that's ugly and would not make much sense to any consumers of my module.
Any thoughts? 04:44
SmokeMachine____ Hi! If I have: class A { class B{} } # is there any method that I can call on A::B that returns A? 04:58
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␤␤»
SmokeMachine____ m: my $ab; class A{ $ab = class B{} }; say $ab.^methods 05:03
camelia rakudo-moar b1c444: OUTPUT«()␤»
SmokeMachine____ Of course...
m: my $ab; class A{ $ab = class B{} }; say $ab 05:04
camelia rakudo-moar b1c444: OUTPUT«(B)␤»
SmokeMachine____ m: my $ab; class A{ $ab = class B{} }; say $ab.keys 05:05
camelia rakudo-moar b1c444: OUTPUT«()␤»
SmokeMachine____ m: my $ab; class A{ $ab = class B{} }; say A.keys
camelia rakudo-moar b1c444: OUTPUT«()␤»
SmokeMachine____ m: class A{ class B{} }; say A.keys 05:07
camelia rakudo-moar b1c444: OUTPUT«()␤»
SmokeMachine____ m: class A{ class B{} }; say ::A.keys
camelia rakudo-moar b1c444: OUTPUT«()␤»
avuserow m: class A { class B {} }; say A::.keys
camelia rakudo-moar b1c444: OUTPUT«(B)␤»
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?
Any idea? 05:09
grondilu m: class A { class B {} }; say $A::B::?CLASS;
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…»
grondilu m: class A { class B {} }; say A::B::?CLASS;
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
m: class A { say ::?CLASS }
camelia rakudo-moar b1c444: OUTPUT«(A)␤»
grondilu m: class A { class B { say ::?CLASS } }
camelia rakudo-moar b1c444: OUTPUT«(B)␤»
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?
*attr 05:12
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)␤»
SmokeMachine____ Hum!!! 05:13
Thanks! 05:14
Will it work for a method "injected" by a metaclass? 05:16
Outer is about the lexical scope, right?
Thanks.. I'll try tomorrow 05:17
Have a goodnight
avuserow yeah I think it's scope. CALLER is for call stack :) 05:18
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: gist.github.com/lizmat/ab00347d5cc44a23c65b 06:28
nine bartolin: ^^^ 06:31
Xliff: it's odd. I don't remember having such a hard time with Inline::Perl5's generated EXPORT subs: github.com/niner/Inline-Perl5/blob...5.pm6#L863 06:33
Xliff nine: How did you generate EXPORT subs? 07:12
nine Xliff: have you looked at the code? 07:13
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:14
elohmrow Xliff: you are using Inline::Perl5 on Moar, right, not jvm? 07:21
elohmrow is trolling to see if anyone could build any modules on jvm backend :) 07:22
Xliff Not using Inline::Perl5 at all. Just trying to write a custom EXPORT sub to handle selective module loading.' 07:26
Xliff I have A::B, and I have modules A::B::C through A::B::F 07:26
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
Xliff However, I have that last part working. 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.
nine Xliff: can you paste your code somewhere?
Xliff It's currently on github 07:29
github.com/Xliff/p6-color-names/bl...r/Names.pm
Xliff I can get "use A::B <c>.list" to work 07:30
But "use A::B" does not
And neither does "use A::B <c>"
leont What's @INC called in p6? 07:31
timotimo m: say $*REPO.repo-chain
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…»
Xliff I've tried turning EXPORT into multi's to handle the different cases but that doesn't even pass stage parse
I get this: 07:32
"Cannot find method 'merge-symbols': no method cache and no .^find_method"
leont timotimo: thanks! 07:34
timotimo YW
masak good antenoon, #perl6 08:07
nine Xliff: you sure you want the "is export" trait on the subs when you already have an EXPORT sub? 08:12
masak heh, today's one-liner: 08:14
$ perl6 -pe'$_ = $ *= 2'
(produces successive powers of 2 as output: 2, 4, 8, 16...) 08:15
hm :) 08:16
$ perl6 -ne'say $ *= 2'
slightly shorter
masak m: say -"42" 08:26
camelia rakudo-moar b1c444: OUTPUT«-42␤»
masak ...guess that is the Least Surprising behavior for a language -- instead of saying "uh, need to be a number to be negated" 08:27
timotimo pff. it should give you -4 and then 2 08:28
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:29
masak .oO( just big enough to have a bootstrapping parser and runtime ) 08:31
Ven timotimo, jnthn: I can confirm the GC bug disappeared! Amazing :D. 09:46
timotimo cool
jnthn Ven: Excellent. :) 09:47
Ven <jnthn timotimo>>>.++ 09:48
timotimo only jnthn this time 09:50
Ven Failed cloning git repository 'git://github.com/jnthn/oo-monitors.git' 09:51
timotimo: well, you did the Gtk bind, and I'm using it :).
timotimo um, actually, jnthn made the gtk bindings :) 09:53
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?
timotimo *shrug*
jnthn I've not worked on them for a long while :)
Ven timotimo: github.com/perl6/gtk-simple/graphs/contributors no, no. 09:55
Ven (azawawi++ as well) 09:55
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:57
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
Ven it only takes 2.5!
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
nine After my talk at the APW2016, I should be able to find some time for that. 10:19
timotimo \o/
Ven nine++ # amazing work on modules and all for more than a year now 10:20
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
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:58
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?
nadim depends on the implementation is my guess 11:02
nine maybe worth reporting to #moarvm? 11:05
lambd0x Hi everyone! 11:09
LeCamarade Hi. 11:10
DrForr Afternoon. 11:11
lambd0x Guys, does any of u know if array datatype currently has allocation size limitations? 11:12
DrForr Of course it does. It's called RAM :) 11:13
nadim ugexe: zef working fine now 11:14
lambd0x DrForr: Of Course . But not in any other aspect? :P 11:15
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␤»
moritz lambd0x: we might assume that array indexes are fixed-sized integers, probably 64bit 11:17
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.
moritz (though I don't know any OS that lets you manage more than 2**64 byte of RAM)
nadim Any sparse array class around? 11:19
DrForr m: my @x;@x[5001]="foo";
camelia ( no output )
nadim I don't know why I though the P6 arrays would be sparse
moritz they're already resizable and lazy, that's quite a feat :-) 11:20
lambd0x bubble alg: bpaste.net/show/186fd80687c2. input it receives: bpaste.net/show/0ea8cb3faba7
I know the problem is the bubble function, but don't know what... Any thoughts? 11:23
moritz if it's reproducable on the latest rakudo, please submit a bug report 11:26
nadim moritz: we like feats! 11:27
nine lambd0x: I'm curious why you'd write a bubble sort?
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:28
lambd0x moritz: 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...
moritz lambd0x: I just recompiled a brand new rakudo version and it also segfaults 11:31
lambd0x: so please submit as a bug to [email@hidden.address]
nine tbrowder: we do have UInt?
tbrowder er, "miss NOT having a Uint"
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;␤␤»
tbrowder m: my UInt $s;
camelia ( no output )
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␤␤»
moritz 0x
tbrowder m: my UInt $s = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff;
lambd0x moritz: Ok ;)
camelia ( no output )
tbrowder m: my UInt $s = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff;
camelia ( no output )
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␤»
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␤␤»
DrForr I note in passing that UInt doesn't appear on docs.perl6.org...
tbrowder ok, but it's not searchable, and I've not seen it in docs
m: my UInt $s = 0x0001_0001_0001_0001_0001_0001_001f_0001; say $s.base(16) 11:37
camelia rakudo-moar b1c444: OUTPUT«100010001000100010001001F0001␤»
tbrowder m: my UInt $s = 0x0001_0001_0001_0001_0001_0001_0001_0001; say $s.base(16)
camelia rakudo-moar b1c444: OUTPUT«10001000100010001000100010001␤»
tbrowder m: my UInt $s = 0x0001_0001_0001_0001_0001_0001_0001_0001; ++$s; say $s
camelia rakudo-moar b1c444: OUTPUT«5192376087906286159508272029171714␤»
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)
camelia rakudo-moar b1c444: OUTPUT«10001000100010001000100010002␤»
lambd0x nine: sorry, RT number? 11:39
nine lambd0x: the ticket number from your bug report 11:39
or just the URL 11:40
tbrowder okay then, thanks, moritz et al., looks like a doc issue
never mind, old issue 11:41
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:43
nine I think 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
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
moritz: I did a little gdbing
moritz nine: ok
lambd0x bpaste.net/show/8c8915f6e3d5 (current version). Error persists. I'm issuing it then. 11:49
dalek c: 8acb21b | (Tom Browder)++ | doc/Type/Str.pod6:
corrections, improvements, notes modified or added, unimplemented features marked NYI (after testing on late model rakudo)
11:50
c: 739629a | (Tom Browder)++ | doc/Type/Str.pod6:
remove unproved text, stick with 'unimplemented' as a fact
c: cf22b09 | RabidGravy++ | doc/Type/Str.pod6:
Merge pull request #870 from tbrowder/sprintf-update

corrections, improvements, notes modified or added, unimplemented fea…
moritz nine: I did a little valgrind too :-) 11:53
lambd0x nine: github.com/MoarVM/MoarVM/issues/400 or #400 is the code you requested of me :P 12:01
lambd0x Later fellas o/ 12:02
moritz nine: I've reformatted your comment 12:04
nine moritz: thanks 12:05
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␤»
MasterDuke ^^^ what am i missing? i would expect a final "positional d" to be printed 12:30
moritz MasterDuke: nextwith dispatches to the next possible candidate that fits the current argument list 12:31
but the first candidate doesn't fit the :c("d") argument, so it's not in the dispatcher list 12:32
if you want to call, jut call self.b(:c("d"))
MasterDuke i thought that was nextsame 12:33
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␤»
moritz MasterDuke: nextsame just uses the same argument list as the current routine 12:36
MasterDuke: otherwise it's the same as nextwith
MasterDuke Xliff: have you looked into docs.perl6.org/type/Signature#Sing...ule_Slurpy for your EXPORT problem? 13:40
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:47
moritz El_Che: pmichaud has trouble setting up HTTPS for rakudo.org 13:48
[Coke] there's a ticket open for that.
Please add a comment about how it's impacting downloads, though.
El_Che something specific with https?
[Coke] rt.perl.org/Ticket/Display.html?id=128423
El_Che thx 13:49
[Coke] El_Che: try going to rakudo.org/
El_Che there you go; 13:50
The certificate is only valid for the following names: host.pmichaud.com, www.host.pmichaud.com
he needs to add an aliad to the certificate
I'll add it to the ticket
bioduds is nine there? 13:51
moritz there's some cpanel integration involved
El_Che moritz: certainly, but it will never work with that cert
bioduds hey nine, you there? 13:52
I think I got the shell script
moritz El_Che: aye
MetaZoffix El_Che: "nqp and rakudo have pgp signatures (asc) but not key"... are you saying something is missing? 13:59
and if yes.. what
El_Che MetaZoffix: the public key of the one that made the signature 14:00
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
El_Che well, the pgp one is the better option,but the most cumbersome
MetaZoffix: that can NOT be replaced 14:02
MetaZoffix El_Che: why not?
El_Che the attacker can sign with his own key, but that one is not on your keyring
moritz MetaZoffix: well, for gpg signatures, if the rakudo.org server is compromised, they still don't have access to my private GPG key
El_Che only the rakudo one
konobi MetaZoffix: the public key is needed to establish trust... once you have the "trust", you can verify the signature of the file
moritz we just don't provide an official rakudo keyring
yet
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?
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
moritz MetaZoffix: yes
El_Che MetaZoffix: thing http (as in now) and man in the middle
konobi El_Che: the signature gives me cryptographic verification of the contents of the file 14:04
so the transport doesn't matter
El_Che MetaZoffix: someone connects to a 'conference' wifi and someone replace the download rakudo source with a patched one (or just regular malware)
MetaZoffix El_Che: and how do you verify it? You just get the .asc from the same site, don't you?
El_Che: ... and they replace the .asc with a new one too
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
El_Che MetaZoffix: the asc will be invalid
konobi no
El_Che MetaZoffix: because the attacker does not have the (offline) private key
konobi *blink* i think i'm back to front on this somehow
MetaZoffix El_Che: whose private key?
El_Che rakudo 14:06
MetaZoffix El_Che: why would they need it?
konobi whoever signed the .asc
MetaZoffix The attacker signed the .asc
They replaced it, together with the hacked package
konobi i don't trust that attacker, so it's invalid
MetaZoffix Ah, I see.
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
El_Che 3a. user downloads and verifies ok
MetaZoffix I don't know if the public key thing you're looking for maybe here: github.com/rakudo/rakudo/tags
El_Che 3b. attacker replaces tar and signaru
MetaZoffix "GPG key ID: 02273204444FF29C" is that something?
moritz it is
El_Che 4b. signature does not verify because the user does not trust the key of the attacker
konobi we need a copy of the public key that goes along with the private key that did the signing
you want the public key for that GPG key (identified by ...) 14:08
bioduds hello
is nine there?
nine?
El_Che you want the key in several public servers
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?
bioduds hi nine
I think I got a initial installing shell script
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
nine I could at least have a look at it
bioduds sure, its quite simple
konobi El_Che: openxpki =0)
moritz won't build a KPI for rakudo 14:11
bioduds 67.205.136.118/install.sh
bioduds line would be install.perl6.org | sh 14:11
once https is set
and install subdomain points to the install.sh script
also, I can improve it. it is really a start point 14:12
i mean, setting it to tell it is linux only and stuff
but bottomline it should work once gcc build essentials is there
im testing now on a 2Gb RAM Digital Ocean Ubuntu 14.04 14:13
it is installing I believe
bioduds first test local worked but I already had Perl6 on 14:15
Im trying on an fresh installation now
sena_kun Can any core dev/spec wizard look here - github.com/perl6/doc/pull/870? The last comment brings up a question about sprintf modificators status which needs a spec clarification. 14:18
moritz I can only comment that the proper place for this comment would be an issue on the perl6/specs repo 14:21
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:25
bioduds takes a while to install 14:33
bioduds made some initial changes, will upload in a while 14:37
melezhik Hi guys! 14:47
bioduds wow, its a long install
melezhik I have class with property "results" 14:49
has Array @.results;
melezhik but once I try to push into results I have this error 14:50
bioduds you may need to write is rw
to be able to push into the array
I guess
jnthn Since @ already means Array, that's declaring an Array of Array also :)
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"))
A code looks like - @!results.append: { foo => "bar" };
jnthn melezhik: Yup, it's what I said :) 14:53
melezhik jnthn: kinda 14:54
I wanted to push into Array a hash
this way works fine: @!results.push: [{ foo => "bar" }]; 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 ?
jnthn Do you actually want an array of arrays?
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
my @foo = Array.new; @foo.push: { d => 100 }; say @foo;
jnthn has Pair @.results; # means an Array constrained to only contain Pair
has Array @.results; # means an Array constrained to contain other arrays
That's not the same though
melezhik [{d => 100}]
jnthn my @foo = Array.new 14:57
Is the same as
my @foo = []
Whioth is the same as
my @foo
my Array @foo;
Is the same as
my @foo := Array[Array].new
melezhik so. how can alter my class constructor?
to get a desired behavior?
jnthn I don't know, I didn't understnad what you want yet... :) 14:58
What's wrong with just `has @.results`?
melezhik currently I have "has Array @.results;"
jnthn Yes, why did you put Array there?
melezhik ahh, got you!
jnthn Ah, good :)
melezhik I need to have just @.results;
)))
jnthn Yes :)
melezhik thanks
jnthn Arrays are really common, so it's just an @ to get it :) 14:59
melezhik yes, sure! 15:00
thanks
tbrowder ref docs (and UInt): please see PR "github.com/perl6/doc/pull/871" 15:07
bioduds hi nine 15:13
my initial test worked
:) 15:14
nine excellent :) 15:19
bioduds jeff said he will also do some tests later on :) 15:26
it'd be great to run a test on a mac too i believe 15:27
bioduds please send me a line when you also can run some tests on it [email@hidden.address] 15:27
Unavowed Has anyone considered type-parametrising Promises at any point? (e.g. Promise[Int] like Array[Int]) 15:32
RabidGravy you could already do this by sub-classing Promise and implementing ^parameterize :-) 15:36
(this may or may not be recommended practice however)
dalek c: 645930a | (Tom Browder)++ | doc/Type/UInt.pod6:
add rudimentary doc on UInt
15:38
c: daf4149 | (Tom Browder)++ | doc/Type/UInt.pod6:
Merge pull request #871 from tbrowder/uint

add rudimentary doc on UInt
jnthn Unavowed: Do you have a use-case where it'd be especially helpful?
Unavowed jnthn: Not really, just learning P6 and trying to figure out how far you can go with static typing 15:39
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 c: 7fbee17 | titsuki++ | doc/Language/syntax.pod6:
Add an index for \ (unspace)
c: 37a0b77 | titsuki++ | doc/Language/syntax.pod6:
Merge pull request #872 from titsuki/index-unspace

Add an index for \ (unspace)
kyclark I’ve install CSV::Parser using panda. How can I pull up the perldocs on it?
dalek rl6-most-wanted: 398a494 | (Tom Browder)++ | most-wanted/modules.md:
correct link for repo rename
jnthn RabidGravy: Perhaps 'cus a lot of the improvements have been to runtime, and module smoke testing exercises compile time much more? 15:43
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:46
kyclark, p6doc may do it (though last time I tried it was looking in the wrong places) 15:47
dalek c: 3cc1cae | titsuki++ | doc/Language/syntax.pod6:
Delete trailing dollar symbols
15:50
c: 06e4986 | titsuki++ | doc/Language/syntax.pod6:
Merge pull request #873 from titsuki/delete-dollar-symbol

Delete trailing dollar symbols
kyclark FYI, I can’t install “p6doc”: Failed test 'load module Pod::To::BigPage' 16:06
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:07
kyclark Oh, wait, needed to panda update 16:08
gfldex that would be IO::Socket::SSL (IIRC)
kyclark Successfully installed Pod::To::BigPage
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” ?
[Coke] having issues with a Bailador app; it seems to get requests, but sometimes seems to fail to run the 'start {}
kyclark “$ p6doc Text::CSV
-bash: p6doc: command not found"
timotimo kyclark: might need to "panda rehash" to get the binary in the bin/ folder of your rakudobrew 16:10
sorry
rakudobrew rehash is the command
[Coke] ' block in the request handler. any suggestions on debugging other than "add more debug output" ?
gfldex kyclark: panda doesn't tell you that you need to add something to your $PATH
kyclark OK, it’s found now. Thanks.
timotimo gfldex: i think it actually does, though?
gfldex it may do now
timotimo but maybe only when you install it for the first time
kyclark If I do “p6doc Text::CSV” it says “No Pod found” but it does look like the author wrote docs (github.com/Tux/CSV/blob/master/lib.../CSV.pod6) 16:11
gfldex it's not looking for *.pod6, you have to have the pod inline in the module 16:12
timotimo it seems to look into /doc/ inside installed modules it seems? 16:14
actually, it seems to only grab Type/ and Language/ folders from inside there 16:16
maybe that's just for locating the "original" perl6 language doc that comes with p6doc? 16:17
stmuk_ timotimo: yes that's right .. it's pretty awful hacky code TBH but it should "mostly" work 16:25
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
I think Tux even asked how to do it a few months back
the answer now might be to list CSV.pod6 in design.perl6.org/S22.html#%25%3FRESOURCE 16:29
stmuk_ p6doc might even pick up CSV.pod6 if its under doc/ :) 16:30
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:32
moritz El_Che: so it's a 32 bit userland with a 64 bit kernel? 16:38
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:39
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␤␤»
Elfoonto I'm having trouble catching non-zero-exit exceptions from Proc::Async. Any idea how?
The above produces "The spawned process exited unsuccessfully (exit code: 2) in block <unit> at -e line 1" when run 16:42
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
El_Che moritz: it looks a more straightforward way than crosscompiling (in a docker context) 16:43
Elfoonto Oh, now I remember. 16:44
given Proc::Async.new: "bash", :w { my $pp = .start; .write: "exit 2\n".encode; my $p = await $pp; say "sploops" if $p ~~ Broken }
the awaited promise gives a Proc that explodes when sunk 16:45
AndroUser Whats the difference between bless and new? 16:50
konobi new is a function, bless is an operator 16:51
Elfoonto
.oO( function? )
timotimo er, what?
new is not a function, and bless is not an operator
konobi um... bah... sorry wrong turtle 16:51
timotimo ok, so here's what bless and new are: 16:52
.bless is the method you get for free from the Mu class, from which all other classes derive
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
BUILDALL is responsible for putting named arguments you passed to the bless method to be put into the right attributes and such
zostay m: say Instant.from-posix(0)
camelia rakudo-moar af4c2e: OUTPUT«Instant:10␤»
timotimo and BUILDALL also handles things like default values and such
Elfoonto leap seconds
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:54
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)
TimToady and new is the correct method to override if you want positional parameters in a custom constructor
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
timotimo that's not all 16:56
stmuk_ hmm maybe the difference between new and bless should be in the faq?
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
so like TimToady said above, implementing a custom "new" method is the right approach to that 16:57
ItayAlmog Oh, interesting
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
and it's not a performance issue, since trivial methods get inlined
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
timotimo yeah, explosions all around, gnashing of teeth, that kind of thing
dalek c: 07f48e2 | (Jan-Olof Hendig)++ | doc/Language/control.pod6:
Corrected indentation of some code examples
ItayAlmog So the bless allocates memory and BUILDALL assigns values in the allocated space 17:00
TimToady well, the object has to be created with a particular representation by .CREATE 17:01
since we support representational polymorphism
timotimo right, the first thing bless does is call .CREATE 17:02
that is the part that actually kicks off the allocation
ItayAlmog Well, that helped me alot understand how it works, and now i think i can start to make the Mu class 17:03
timotimo ah, you're our native-p6-compiler person! 17:04
now i recognize the name %)
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
TimToady the class itself is not very aware of its representation
timotimo right, in rakudo we have nqp::getattr and nqp::bindattr, nqp::atpos, nqp::bindpos, ... 17:06
those are all "virtual" based on what representation the class that's responsible for the attribute (etc) is
TimToady so the same class could control a Perl object, a Python object, a Ruby object, or a C++ object
timotimo or a piece of XML string in memory
ItayAlmog Ok i lost you...
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! :-)
ItayAlmog So you can use CPP class as a class in Perl6? 17:08
TimToady in theory
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
timotimo just work with existing classes that have code already in some library you're using 17:09
[Coke] anyone using bailador or http::easy? trying to figure out how it's handling multiple simultaneous requests. 17:09
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
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
timotimo you won't get very far if you don't have a list and a hash implementation, though 17:10
in rakudo those are also done via the "repr" mechanism 17:11
that's the different things that live under src/6model/reprs/
[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.
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 :)
TimToady oh, timotimo++ already mentioned it
dogbert17 o/ #perl6
is gfldex around? 17:14
gfldex dogbert17: yes
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 docs.perl6.org/language/control#return
dogbert17 gfldex: I believe that the last sentence should point out that an exception is thrown if the type constraint check fails...? 17:17
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
dogbert17 gfldex: thx 17:19
tbrowder m: my UInt $u; 17:20
camelia ( no output )
gfldex dogbert17: it wasn't changed by accident so that info is just missing
bioduds hi TimToady! how are you doing? :) 17:21
dogbert17 gfldex: cool
gfldex m: sub f(-->Int){"bork"}; f; CATCH { default {say .^name } }
camelia rakudo-moar af4c2e: OUTPUT«X::TypeCheck::Return␤»
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"
tbrowder m: my UInt $u = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; say $u 17:22
camelia rakudo-moar af4c2e: OUTPUT«340282366920938463463374607431768211455␤»
tbrowder m: my UInt $u = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; ++$u; say $u 17:23
camelia rakudo-moar af4c2e: OUTPUT«340282366920938463463374607431768211456␤»
tbrowder m: my UInt $u = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; say $u
camelia rakudo-moar af4c2e: OUTPUT«22300745198530623141535718272648361505980415␤»
TimToady SmokeMachine____, avuserow, grondilu: there's supposed to be an A::B::PARENT that gives you A, but I think it's NYI
timotimo tbrowder: UInt is a full-sized Int, hence the upper case I
tbrowder m: my UInt $u = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; ++$u; say $u
camelia rakudo-moar af4c2e: OUTPUT«22300745198530623141535718272648361505980416␤»
timotimo m: my UInt $u = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff; ++$u; say $u 17:24
camelia rakudo-moar af4c2e: OUTPUT«2839213766779714416208296124562517712318911565184836172974571090549372219192960637992933791850638927971728600024477257552869537611776␤»
timotimo m: my UInt $u = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff; ++$u; say $u.fmt("%x")
camelia rakudo-moar af4c2e: OUTPUT«100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000␤»
TimToady bioduds: I'm doing jet-lagged
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
bioduds really? hope youre not in Brazil right now
timotimo that might not get you far
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
timotimo that's (one part of) why the getattr and bindattr nqp ops ask you for the class the attribute is defined for
ItayAlmog After reading about this i realy see why it isn't enough 17:26
Well, rethink time...
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
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␤»
tbrowder m: my UInt $u = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; say ++$u.base(16)
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 …»
tbrowder m: my UInt $u = 0xffff_ffff_ffff_ffff_ffff_ffff_ffff_ffff; ++$u; say $u.base(16)
camelia rakudo-moar af4c2e: OUTPUT«100000000000000000000000000000000␤»
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
mspo what is beyond state of the art?
ItayAlmog I created*
TimToady we should really produce a better message if all the candidates are rejecting the argument on the basis of 'is rw'
dalek c: 1104dc2 | gfldex++ | doc/Language/control.pod6:
name the exception on failed return type checks
TimToady mspo: 6model's representational polymorphism 17:29
at least, state of the art in the realm of current non-academic languages :)
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.
TimToady most other common languages just say "here's our object representation, deal with it" 17:30
timotimo TimToady: yes, we should
mspo I never noticed moarvm called itself "A 6model-based.."
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...
timotimo mspo: surprisingly, the moarvm.org front page doesn't mention 6model :\
ItayAlmog: it's effectively like a second vtable, really
TimToady shh! it's our sekrit sauce!
Elfoonto m: my $int = Int.new: 42; 17:32
camelia ( no output )
Elfoonto m: my $uint = UInt.new: 42;
camelia rakudo-moar af4c2e: OUTPUT«You cannot create an instance of this type (UInt)␤ in block <unit> at <tmp> line 1␤␤»
timotimo on moar we have something called an STable, or "shared table". there's one for each combination of Type Oject + REPR
Elfoonto tbrowder: ^
TimToady basically, the .HOW and the .REPR pointers 17:33
dogbert17 gfldex++
Elfoonto m: class BetterInt is Int {}; 17:34
camelia ( no output )
Elfoonto m: class BetterInt is UInt {};
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␤»
ItayAlmog My mind is going to explode...
Elfoonto tbrowder: ^ another one. subsets aren't classes, so it's wrong to call them such
And UInt is a subset
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
bioduds maybe classes could somehow deviate to whatever
using * or dev
Elfoonto That's why we sell spare minds :)
bioduds free-thinking you oo model same way subsets allow you to "re-build" your types 17:36
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?
timotimo ItayAlmog: feel free to ask as much as you want :) 17:38
ItayAlmog: oh btw did you see the perl6 implementation based on c++ called "arane"?
ItayAlmog I actually thought i could start to create the OO part xD
timotimo it was sadly abandoned rather quickly
ItayAlmog No i will sure check it out 17:38
timotimo github.com/BizarreCake/Arane
that's the one
ah, it's a bytecode compiler + interpreter though 17:39
you're building a bytecodeless to-native compiler, right?
bioduds class Butterfly * { handles <my> freely; subclass UInt <<change here>> } i dont know
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 :)
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)
bioduds oh, that is cool. but does it allow you to change inherent class rules?
like rw for instance?
konobi terra does since it's runtime is JIT enabled 17:41
timotimo rw is very high-level, actually
bioduds required... and more, creating my own expected rules?
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
github.com/LLFourn/p6-AttrX-InitArg github.com/pierre-vigier/Perl6-AttrX-Lazy github.com/pierre-vigier/Perl6-Att...teAccessor
a few examples of making attributes "different" to wet your appetite and show what's already easy
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?
timotimo it'll hurt compatibility with other compilers, but aside from that it seems fine to do that 17:44
Elfoonto Make it a pod block ;) 17:45
=begin asm ... =end or some such
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
Elfoonto :D
konobi in terms of ro/rw
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.
ItayAlmog Interesting, will think about it 17:46
rindolf ItayAlmog: hi. 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
rindolf ItayAlmog: are you Israeli by any chance?
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
rindolf ItayAlmog: ah, nice, so am I. 17:47
ItayAlmog rindolf: Nice to meet you :) 17:48
rindolf ItayAlmog: nice to meet you too.
ItayAlmog: where do you live?
ItayAlmog I am in modi'in 17:49
rindolf ItayAlmog: ah, szabgab is there.
Xliff .tell MasterDuke The +@ did not work. 17:49
yoleaux Xliff: I'll pass your message to MasterDuke.
rindolf ItayAlmog: I live in Tel Aviv.
ItayAlmog I got to go, will rethink my OO system, see you tomorrow 17:50
rindolf: Nice!
timotimo "read error: connection refused" seems like a strange way to disconnect 17:54
Unavowed Is it possible to assign a method or submethod to a &variable ? 18:18
timotimo yes 18:19
but you'll have to carry the right invocant around as well
m: say Str.^find_method('uc').perl
camelia rakudo-moar af4c2e: OUTPUT«method uc (Str $: | is raw) { #`(Method|44815272) ... }␤»
Unavowed timotimo: thanks 18:20
timotimo m: my &uc_method = Str.^find_method('uc'); say uc_method("heyo")
camelia rakudo-moar af4c2e: OUTPUT«HEYO␤»
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"?
you have to pass it as an extra first argument with every call, is what you have to do
timotimo what i mean is the method you grabbed doesn't have the invocant bound to it like in python 18:24
Unavowed: why not just .map(*.start)?
AlexDaniel Unavowed: what about (&f1, &f2).map(&start) or (&f1, &f2).map({start $_}) ? 18:25
or whatever
moritz start $_()
Unavowed timotimo: Method 'start' not found for invocant of class 'Sub'
dalek c: 68b6859 | (Tom Browder)++ | doc/Type/UInt.pod6:
define correct type of the UInt; show some example usage
18:26
Unavowed AlexDaniel: start is a prefix operator so can't do &start
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'?␤␤»
AlexDaniel start is an operator? :o
RabidGravy though you can use .assuming on methods to get a thing which has the invocant pre-loaded as it were
timotimo oh, i see
right, because start takes a block and does special code-gen for $/ und $! 18:27
Unavowed timotimo: and as for .map({start $_})
Useless use of $_ in sink context (line 6)
dalek c: 7bdd250 | (Tom Browder)++ | doc/Type/UInt.pod6:
correct statement
moritz AlexDaniel: yes, it thunks the RHS
timotimo Unavowed: what you really want is $*SCHEDULER.start, i believe
moritz m: sub f() { 42 }; sub g { 23 }; await (&f, &g).map({ start $_() })
camelia ( no output )
Unavowed I have had success with .map(-> &f { Promise.start(&f) }) 18:28
but I've been trying to write this in a more concise way
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)
moritz solution looks good to me 18:29
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:30
timotimo method lookup isn't so complicated 18:31
moritz m: say 2.5.^lookup('sqrt').perl 18:32
camelia rakudo-moar af4c2e: OUTPUT«method sqrt (Rat $: *%_) { #`(Method|45170040) ... }␤»
Unavowed moritz, timotimo: Ah, cool, thanks!
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
timotimo i hope itay reads irclog 18:33
timotimo is AFK for a bit 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
moritz AlexDaniel: something with role punning, iirc 18:36
m: say Real.^lookup('sqrt').perl
camelia rakudo-moar af4c2e: OUTPUT«method sqrt ($?CLASS $: *%_) { #`(Method|68905040) ... }␤»
moritz m: say Real.^find_method('sqrt').perl
camelia rakudo-moar af4c2e: OUTPUT«ForeignCode.new␤»
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:39
moritz ItayAlmog: you make it sound like Perl 6 is C++ :-) 18:40
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
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.)
And nice you're documenting it, this comes up quite a bit :)
moritz but they aren't always authoritative, for example if you have a FALLBACK method 18:43
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?
keithbro sorry, to clarify “how does it work” = “how do i use it” 18:48
gfldex tbrowder: what kind of problem is it?
tbrowder i want to use Test::META with the build but travis says it isn't in the ecosystem
gfldex tbrowder: can you link the .travos.yml in question? 18:49
tbrowder www.irccloud.com/pastebin/gd0IdWpW/
moritz keithbro: there's a META6.json file that lists the dependencies
keithbro: in a module, that is 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)
fruunode tbrowder: ensure it's listed in test-depends on your META file
keithbro thanks moritz , can you point me to an example of that JSON file?
tbrowder gfldex: I also show Test::META in my META6.json file in "build-depends"
oh, "test-depends" instead of "build-depends"?--will try that 18:51
fruunode keithbro: pick any module on modules.perl6.org
keithbro: like this one: github.com/zoffixznet/perl6-SPEC-F...A6.json#L9
keithbro great thanks! 18:52
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
fruunode Unavowed: how would it know how how to distribute the elements among the two arrays/? 18:56
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␤»
fruunode m: my :(@a, @b) = ([1], [2]); dd [ @a, @b]
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]␤»
gfldex Unavowed: see docs.perl6.org/language/variables#...assignment and docs.perl6.org/type/Signature
moritz m: my (@a, @b) := [1], [2, 3]; dd @a; dd @“
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␤ …»
moritz m: my (@a, @b) := [1], [2, 3]; dd @a; dd @b
camelia rakudo-moar af4c2e: OUTPUT«[1]␤[2, 3]␤»
gfldex Unavowed: the left side of destructuring is a (slightly limited) Signature 18:58
moritz Unavowed: ^^
fruunode hax
:)
fruunode m: my (@a, @b) := [[1], [2]][0,1]; dd [@a, '|', @b] 18:59
camelia rakudo-moar af4c2e: OUTPUT«[[1], "|", [2]]␤»
Unavowed thanks, guys 19:04
tbrowder duh, ref travis err: one has to spell the dependencies correctly: s/Test::Meta/Test::META/ 19:05
Unavowed I have written this work of beauty and it works: my (@a, @b) := (&f, &g).map({start $_()}).map({.result}).eager; 19:20
All the effort didn't go to waste ;)
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:34
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
Unavowed timotimo: the binding doesn't seem to work with a Seq, .eager converts to a List which works 19:36
instead of eager, writing [0,1] or [*] also works
gfldex m: Map.new().List.WHAT.say 19:37
camelia rakudo-moar af4c2e: OUTPUT«(List)␤»
timotimo ah 19:42
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: rt.perl.org/Ticket/Display.html?id=124279 20:00
yoleaux bartolin: I'll pass your message to elohmrow.
bartolin j: gather loop { take my $foo; last; } 20:00
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)
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.
bioduds hey guys
anyone pretty good in shell script there to help me out?
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
everything is working fine except the damn PATH I don't seem to be able to get exported correctly
geekosaur in any case you are better off just asking, rather than trawling 20:07
bioduds trawling? me? 20:08
[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?
[Coke] if that's it, you need to run the script with ". awesome.sh" instead of "sh awesome.sh"
geekosaur trawling != trolling 20:10
bioduds oh, what is trawling?
coke, yes, just tried
with . awesome.sh
take a look
67.205.136.118/install.sh
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
bioduds last lines 20:11
geekosaur the latter is much more effective on IRC
timotimo oh, like saying "i need an expert for my question!" and waiting for an expert to say "aye"
geekosaur ok, your problem is you are setting it inside your script 20:12
tjis does not affect the shell that ran your script
bioduds oh, ok. then, i cant make my shell script export the PATH to perl6, I don't know why. Heres the script 67.205.136.118/install.sh does someone know why?
geekosaur it's exactly the difference between ". ~/.bashrc" and "sh ~/.bashrc"
bioduds line to run it is curl 67.205.136.118/install.sh | sh
[Coke] ok, so that's not what that script is doing; you're adding exort PATH lines to your ~/.bashrc.
timotimo # curl install.perl6.org/ | sh
no.
[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
as long as your script is run as a separate process, it *cannot* update its parent's environment
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
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.
[Coke] bioduds: right. that's not how shell scripts work. 20:14
timotimo www.idontplaydarts.com/2016/04/det...rver-side/ - have you seen this, bioduds?
bioduds I tried exec bash
let me try once again
[Coke] and even if they did, you're not updating PATH in that script
konobi `hash -r` on bash
[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
konobi to tell it to not use a cache for avalues in PATH
geekosaur also if your installer adds the path to ~/.bashrc on my system I will find you and beat you up
[Coke] timotimo: AH. missed that.
timotimo :)
geekosaur I not only know but *need* the difference between .bash_profile and .bashrc
[Coke] ok. yes, and that won't work, for reasons discussed above.
geekosaur: no need to threaten violence, sheesh. :P
timotimo but if we officially offer a way to "curl ... | sh" to install perl6, we'll be the/a laughing stock of ... people
it would be very much not well received 20:16
[Coke] I believe DrForr suggested bioduds write this script.
if this is from the FB convo I saw.
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.
timotimo i find it problematic that the script just runs rm -rf ~/.rakudo without asking or announcing
[Coke] or, maybe, just no hate. :)
yup, that's a problem.
bioduds Meteor is not being laughed at
[Coke] bioduds: do you have a pointer to their script? 20:18
bioduds sure
timotimo i sure hope we're holding ourselves to a higher standard than javascript frameworks?
bioduds install.meteor.com
[Coke] timotimo: that seems like unnecessary snark.
geekosaur even perlbrew expects you to curl|sh
timotimo :\
at least they use https urls
geekosaur it's *bad*. it's horribly insecure
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
creating a one liner to install it, in my view is important for that
timotimo perl6 is not supposed to make beginner's machines highly accessible to people on the same WIFI :)
[Coke] bioduds: I would recommend using docker, instead. btw.
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
[Coke] I agree that making it easy to install rakudo is a good thing. 20:20
bioduds is what im trying to do
timotimo we could ship a MojoInstaller for perl6 :3
hm, but that's kind of sort of more for binaries than for sources
[Coke] so that script has a lot more help, and just tells you what to add instead of adding it.
bioduds any specific do's for me guys? 20:22
nine created install.perl6.org that may be used to this script
timotimo bioduds: we should definitely use https urls as the first thing
[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.
bioduds jeff goff told me he would put up a test VM later on to check the script 20:23
please, help me out
timotimo sorry for being so harsh :\ 20:23
bioduds yep, https yes
definitely
no prob timotimo
[Coke] remove the rm command. remove the VERBOSITY stuff, that has nothing to do with rakudo or sh
bioduds im just not very familiar with bash
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
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
bioduds I used .rakudo to be invisible
like meteor does, it goes into .meteor
67.205.136.118/install.sh
removed rm -rf
[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)
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
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] stackoverflow.com/questions/496702...ling-shell
bioduds ill try exec bash 20:28
thanks coke, I read this earlier
ugexe ]zef has a curl backend
[Coke] bioduds: not exec bash in your script 20:29
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.
bioduds no? man, shell makes me so confused
[Coke] Well, this will be a great chance for you to learn, then. :) 20:30
bioduds yes. I like your spirit
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
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:34
it actually does 20:35
mst the perlbrew installer expects you to '.' a file afterwards
to get the updated PATH
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
I don't get it
write
'export PATH=/wherever/you/put/perl6/bin:$PATH' to a ~/.rakudo/shellenv file 20:36
and document people need to source that
just like perlbrew does
[Coke] as opposed to your current setup of adding it directly to the .bashrc
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.
bioduds that would not be a one liner installation
[Coke] (which is problematic for users like geekosaur ) 20:37
bioduds: You're right. it's not
DrForr Neither is perlbrew, nor am I guessing is Meteor.
[Coke] it's the best you're going to do.
bioduds meteor is
geekosaur actually it's specifically problematic to and for perlbrew
[Coke] bioduds: meteor is part of a larger thign, yes? 20:37
presumably, you already setup the path for that before running the meteor install.
bioduds no 20:38
simply curl install.meteor.com | sh
and thats it
mst bioduds: meteor's installer requires running as root and puts the binaries into /usr/local/bin
bioduds no it does not
you run with your user
mst PREFIX="/usr/local"
from the top of meteor's installer
bioduds yes, PREFIX="/usr/local" 20:39
i dont know what that is
mst and it tests /usr/local/bin/meteor
as I told you
bioduds would you please explain me
mst so yes it does
DrForr bioduds: "Now you need to do one of the following..." according to the documentation, just as perlbrew does.
[Coke] so if your path already has /usr/local in it... you didn't need to update it. that's probably quite common.
avuserow is there a list of specialty perl6 IRC channels somewhere?
mst bioduds: yep
bioduds: if you aren't root
[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
mst bioduds: meteor tells you to set $PATH yourself 20:40
bioduds: I've just read their installer
perlpilot avuserow: I could make one real quick (might not be exhaustive)
mst bioduds: you are trying to do something impossible.
look, I'm actually kind of an installer specialist
bioduds so I should put PREFIX="/usr/local" on top?
mst telling me "no it doesn't" won't magically make the impossible possible
no
you should stop pretending meteor's installer does something it doesn't
bioduds please, mst, help me out
mst I did!
[Coke] Please accept the fact that you're not getting a one-line installer.
mst you can get just as close to one-line as meteor!
[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!
bioduds I trust you
mst so what haven't I already answered?
bioduds so the solution is to have all installed and then run export commands? 20:41
a 3 liner?
mst what?
what's wrong with writing a script 20:42
that they add to their .bashrc
like perlbrew does
like I suggested originally
[Coke] bioduds: mst already answered that, getting url...
bioduds sorry mst, I believe I didnt catch that
gfldex where is camelias repo?
moritz gfldex: perl6/evalbot on github
[Coke] irclog.perlgeek.de/perl6/2016-08-31#i_13127326
mst write 'export PATH=/wherever/you/put/rakduo/bin:$PATH' to a ~/.rakudo/shellenv.sh or something
DrForr bioduds: meteor requires $HOME/.meteor be in your $PATH.
mst and tell the user to add '. $HOME/.rakudo/shellenv.sh' to their .bashrc
and everything shall work 20:43
bioduds 'export PATH=/wherever/you/put/perl6/bin:$PATH' to a ~/.rakudo/shellenv file
and source it?
DrForr perlbrew requires $HOME/.perlbrew be in your path.
mst exactly
bioduds ok 20:43
let me do that
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
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
you can make the installer prompt yes/no to add to .bashrc for them
but that's significantly more complicated
DrForr Which is one reason why perlbrew tells the user what to do, rather than tries to edit the .rc file directly. 20:45
mst right 20:46
I have a plan for how to do that and make it sane, but it requires shaving a couple of particularly hairy yaks
bioduds here 20:47
67.205.136.118/install.sh 20:48
is this better?
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.
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): claudio.ulyssis.be/perl6/ . Created with docker, so the release manager kan create the packages himself: github.com/nxadm/rakudo-pkg
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
it's not designed for this use, you should not try to be clever or you will break things
bioduds understood 20:51
mst bioduds: get the source file ready and working first
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
mst (just like perlbrew and meteor)
er, no, '. ~/rakudo/setpath.sh'
not 'sh'
'.'
'sh' will start another shell and not work
don't change the advice :(
bioduds oh, ok
timotimo mst: why would they want to call a script with the current directory? :P
directories aren't even executables!! ;)
mst bioduds: once you've got that working
then you can -add- code to offer to add it for them
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)
mst or when it doesn't work
etc. etc.
bioduds ok, let me test it 20:53
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
geekosaur sorry. lots of people *don't* know that; they know bash and think it is the definition of all shells
bioduds ok, so I'm running a test now to see if all is working
takes like 4-5 minutes to install all
geekosaur even debian finally gave up on trying to convince people otherwise :( 20:55
timotimo geekosaur: though i was about to say "why not write it as 'source', to make it clearer?" 20:56
because i thought . might be the moderner variant
bioduds so, geekosaur, once I verify that it works, I should try to run it inside my previous script?
geekosaur . dates from 7th Research Edition
yet another holdover from when your "terminal" was a KSR-33 20:57
bioduds should I put source?
geekosaur (a teletype, more or less)
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 :)
bioduds source ~/rakudo/setpath.sh ?
timotimo nah, keep .
geekosaur if you only care about linux users
bioduds actually, I believe this will run on mac too 20:57
didn't test yet
timotimo doesn't mac osx ship a version of bash? 20:58
geekosaur yes, macs have bash as /bin/sh
freebsd doesn't
solaris doesn't
geekosaur works with both of those ~daily
grondilu solaris doesn't have a shell?? 20:59
El_Che the i386 pkg seems to work \o/
geekosaur sigh
mst grondilu: solaris sh is actually posix
geekosaur grondilu, is bash the only shell in exisutence, or just the only shell anyone is allowed to admit to?
mst it's a bit too posix for my taste
so I usually did 'exec ksh -o vi'
grondilu at college we used Solaris and we had at least csh 21:00
IIRC
mst vomits 21:00
ksh ftw
(compared to csh at least)
geekosaur you missed my point. bash did not invent shells
mst grondilu: the point is /bin/sh is not always bash
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"
El_Che looks for his "Solaris Certified System Administrator" cert paper
bioduds last line still had a .rakudo
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)
bioduds changed that
El_Che thinks it's in the trash
grondilu but I guess it was implied "doesn't have bash"
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
grondilu: all he ever said was '/bin/sh is not always bash'
grondilu: then you went completely off piste for no reason I could quite understand ;)
gfldex lolibloggedaweebit gfldex.wordpress.com/2016/08/31/on...ingertips/
bioduds installing modules 21:04
why so serious
mst wat
bioduds i.ytimg.com/vi/7Uzm30LroAs/maxresdefault.jpg 21:05
grondilu 22:58 < timotimo> doesn't mac osx ship a version of bash?
22:58 < geekosaur> yes, macs have bash as /bin/sh
22:58 < geekosaur> freebsd doesn't
22:58 < geekosaur> solaris doesn't
geekosaur yes, operative there is "bash as /bin/sh", not "/bin/sh"
grondilu yeah that what I missed. 21:06
timotimo AFK for dinner
bioduds so it worked 21:07
let me . ~/rakudo/setpath.sh now 21:08
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:09
El_Che ah dash 21:10
I remember that
bad times
leont dash is a fine /bin/sh, really. This might have worked better if they had done it 10 years earlier 21:11
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
in meteor shell script
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"
this creates a symbolic link
that would be the approach, geekosaur? 21:14
mst?
mst bioduds: that's only necessary because meteor has a weird layout
you only need what I already said
geekosaur leont, that was actually a widespread bug
mst because perl6 is not that stupid
bioduds worked 21:15
so a 2 liner working
first
leont geekosaur: that is frightening!
bioduds curl install.perl6.org/ | sh
then
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
bioduds . ~/rakudo/setpath.sh 21:16
and perl6 is up
it is in 67.205.136.118/install.sh right now
geekosaur (note: not true and false, but the shell conditional execution operators) 21:16
bioduds so, one suggestion 21:17
since I have Perl6 installed by the time I need to set the path, can't I actually use Perl6 to do the job?
actually, not a suggestion, a question
ugexe i guess you could use perl6 to spawn a shell to set the PATH but why 21:18
bioduds cause then I would have my one liner 21:19
can you tell me how to do it ugexe?
how to spawn a shell and set the PATH?
geekosaur wut
bioduds using shell command? 21:20
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
bioduds would that work?
from absolute path I guess
since it is installed 21:22
ugexe that doesnt answer the question 21:22
bioduds if I download a perl6 script and run it from the shell 21:23
or even using perl5 perhaps no?
run perl script from the installing sh to set the PATH? 21:24
let me try it
atweiden has anyone played around with generating text/fuzzing from a p6 grammar? 21:27
e.g. github.com/zimmski/tavor 21:28
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
The code is still on my github repo, though it's bitrotted some
And there's slides somewhere 21:32
jnthn.net/papers/2013-yapcna-gramma...nerate.pdf are slides
atweiden great
indeed, what *if* p6 grammars could generate...
DrForr We'd hasten the creation of Skynet by 5 years. 21:33
bioduds trying 21:36
jnthn github.com/jnthn/grammar-generativ...rative.pm6 is the code
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.
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…»
harmil_wk Am I doing something wrong, there?
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…»
geekosaur whoops 23:18
m: use NativeCall; sub abs(int32 $i) is native returns Int {*}; say abs(-2) 23:19
camelia rakudo-moar ec9e81: OUTPUT«2␤»
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
El_Che or if you want to be explicit:
m: use NativeCall; sub abs(int32 $i) is native("c", v6) returns Int {*}; say abs(-2)
camelia rakudo-moar ec9e81: OUTPUT«2␤»
harmil_wk Ah okay, thanks
El_Che lib c is versioned
geekosaur mm, yes, probably libc.so is a linker script 23:20
El_Che file /usr/lib/x86_64-linux-gnu/libc.so 23:22
/usr/lib/x86_64-linux-gnu/libc.so: ASCII text
:)
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)}␤»