»ö« 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. |
|||
00:03
mcmillhj joined
|
|||
TimToady boarding for SJC & | 00:04 | ||
00:05
setty2 left
00:17
kyclark joined
00:18
gfldex left
|
|||
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 | |
00:21
kyclark left
|
|||
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«higot hereomg 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 | |
00:36
margeas left
|
|||
[Coke] | skids: marked | 00:36 | |
skids | [Coke]++ | 00:37 | |
00:44
girafe left
00:50
tadzik left,
Matthew[m] left,
ilmari[m] left,
M-Illandan left
00:51
Actualeyes joined
00:52
mcmillhj left
00:55
maybekoo2 left
00:59
mcmillhj joined
01:00
cyphase left
01:01
BenGoldberg joined
01:02
itaipu left,
itaipu joined
01:04
perigrin joined,
mcmillhj left,
itaipu left
01:05
cyphase joined
01:08
itaipu joined
01:12
zengargoyle left
01:17
cdg left
01:18
mcmillhj joined
01:23
mcmillhj left
01:34
mcmillhj joined
01:35
bjz left
01:37
Ulti left,
Ulti joined,
mrf joined
01:38
mcmillhj left
01:40
danlei joined
01:45
ilbot3 left
01:47
ilbot3 joined
01:49
labster left
01:53
mcmillhj joined
01:55
zengargoyle joined
01:58
mcmillhj left
02:00
pierre_ left
02:03
harmil left
02:07
mcmillhj joined,
pierre_ joined,
ilmari[m] joined,
MasterDuke joined
02:08
pierre_ left,
pierre_ joined
02:11
mcmillhj left
02:12
kyclark joined
02:16
itaipu left
02:17
itaipu joined
02:22
mcmillhj joined
02:23
kyclark left
02:27
mcmillhj left
02:32
wamba joined
02:33
eliasr left
02:34
mcmillhj joined
02:37
bob777 joined
02:39
mcmillhj left,
tadzik joined,
M-Illandan joined,
Matthew[m] joined
02:41
noganex_ joined
02:44
noganex left
02:45
itaipu left
02:46
kyclark joined
02:50
kyclark left,
itaipu joined,
kyclark joined
02:51
markk_ left
02:52
markk joined,
kyclark left,
mcmillhj joined
02:57
mcmillhj left
03:07
mcmillhj joined
03:08
MasterDuke left
03:12
mcmillhj left
03:18
itaipu left,
mcmillhj joined
03:23
mcmillhj left,
itaipu joined
03:24
pierre_ left,
skids left
03:31
wamba left,
pierre_ joined
03:34
aries_liuxueyang joined
03:35
pierre_ left
03:36
pierre_ joined
03:37
pierre_ left
03:40
BinGOs joined
03:42
labster joined
03:45
mcmillhj joined,
pierre_ joined,
Actualeyes1 joined
03:46
Actualeyes left
03:48
pierre_ left
03:49
bjz joined,
pierre_ joined
03:51
mcmillhj left
03:52
kyclark joined
03:54
danlei left
03:55
aries_liuxueyang left
03:56
aries_liuxueyang joined
04:01
BillSussman joined,
AndyBotwin left
04:02
mcmillhj joined
04:06
itaipu left
04:07
itaipu joined,
kyclark left
04:08
mcmillhj left,
aries_liuxueyang left
04:09
aries_liuxueyang joined
04:16
mcmillhj joined
04:17
obfusk_ joined,
obfusk left,
markk left,
Kaffe left,
Cabanossi left,
markk joined
04:18
Kaffe joined
04:20
Cabanossi joined,
aries_liuxueyang left,
aries_liuxueyang joined
04:21
mcmillhj left
04:22
labster left
04:26
labster joined
04:32
canopus left
|
|||
TimToady and Glo are home, admiring our Very Own Bed | 04:33 | ||
s/our/their/ | 04:35 | ||
04:36
aries_liuxueyang left
04:38
aries_liuxueyang joined
04:39
khw left
|
|||
Xliff_zzzzz | \o | 04:40 | |
04:40
Xliff_zzzzz is now known as Xliff
|
|||
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 | ||
04:41
canopus joined
|
|||
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? | |||
04:42
BenGoldberg left
|
|||
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 | ||
04:48
mcmillhj joined
04:52
mcmillhj left
04:53
pierre_ left
04:55
pierre_ joined
04:58
grondilu joined
|
|||
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 | |
05:00
pierre_ left
05:01
mcmillhj joined
|
|||
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«()» | ||
05:06
mcmillhj left
|
|||
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 postfixat <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 postfixat <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 | ||
05:12
itaipu left
05:13
Possum left
|
|||
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
|
|||
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 | |
05:26
dj_goku left
05:32
jjido joined
05:33
mcmillhj joined
05:34
CIAvash joined
05:38
mcmillhj left
05:44
rindolf joined
05:59
itaipu left
06:01
itaipu joined
06:04
pierre_ joined
06:06
pierre_ left,
pierre_ joined
06:19
itaipu left
06:20
brrt joined
06:22
brrt left
06:23
itaipu joined
06:25
elohmrow joined
|
|||
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 | |
06:31
firstdayonthejob joined
|
|||
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 | ||
06:33
mcmillhj joined
06:34
Wiertek joined
06:36
domidumont joined
06:37
firstdayonthejob left
06:38
mcmillhj left
06:40
jjido left
06:41
domidumont left
06:42
domidumont joined
06:49
mcmillhj joined
06:54
mcmillhj left
06:58
rindolf left
06:59
Wiertek left,
itaipu left
07:02
stux|RC-only joined
07:04
itaipu joined
07:11
aries_liuxueyang left
|
|||
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 | ||
07:17
sivoais left
07:18
sivoais joined
07:20
Wiertek joined
|
|||
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 | ||
07:22
domidumont left
07:23
nightsh joined
07:24
Possum joined,
sivoais left
|
|||
Xliff | Not using Inline::Perl5 at all. Just trying to write a custom EXPORT sub to handle selective module loading.' | 07:26 | |
07:26
aries_liuxueyang joined
|
|||
Xliff | I have A::B, and I have modules A::B::C through A::B::F | 07:26 | |
07:27
darutoko joined
|
|||
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 | |
07:28
sivoais joined
|
|||
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? | ||
07:29
cibs left
|
|||
Xliff | It's currently on github | 07:29 | |
github.com/Xliff/p6-color-names/bl...r/Names.pm | |||
07:29
leont joined
|
|||
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>" | |||
07:31
cibs joined
|
|||
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 | ||
07:43
mcmillhj joined
07:45
pierre_ left
07:46
cibs left
07:47
itaipu left
07:48
cibs joined,
itaipu joined
07:49
mcmillhj left,
LeCamarade left
07:51
pierre_ joined
07:56
lizmat left
07:59
mcmillhj joined
08:00
dakkar joined
08:01
cibs left
08:02
zakharyas joined
08:03
cibs joined,
mcmillhj left
|
|||
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 | |
08:12
g4 joined,
RabidGravy joined,
mcmillhj joined
|
|||
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 | |||
08:17
mcmillhj left,
imcsk8 left,
imcsk8_ joined
08:18
itaipu left
08:19
itaipu joined
08:23
notostraca joined
08:24
ribasushi_ left
08:25
TEttinger left
08:26
Possum left
|
|||
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 | |
08:28
notostraca is now known as TEttinger
|
|||
timotimo | pff. it should give you -4 and then 2 | 08:28 | |
08:29
BuildTheRobots left
|
|||
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 | |
08:29
ggherdov left
|
|||
masak | or maybe 007 isn't a small language, I dunno | 08:29 | |
08:31
BuildTheRobots joined
|
|||
masak .oO( just big enough to have a bootstrapping parser and runtime ) | 08:31 | ||
08:32
ggherdov joined
08:33
Possum joined
08:34
ribasushi joined
08:37
ggherdov left,
leont left
08:40
ggherdov joined,
mcmillhj joined
08:43
itaipu left,
itaipu joined
08:45
mcmillhj left
08:48
cibs left
08:51
cibs joined
08:52
margeas joined
08:54
mcmillhj joined
08:58
mcmillhj left
08:59
pierre_ left
09:04
pierre_ joined
09:08
mcmillhj joined
09:12
mcmillhj left
09:14
domidumont joined
09:20
mcmillhj joined
09:22
domidumont left
09:24
mcmillhj left
09:27
TEttinger left
09:31
nightsh left
09:32
mcmillhj joined
09:36
rindolf joined
09:37
mcmillhj left
09:41
jjido joined
09:43
mcmillhj joined,
nightsh joined
09:46
Ven joined
|
|||
Ven | timotimo, jnthn: I can confirm the GC bug disappeared! Amazing :D. | 09:46 | |
timotimo | cool | ||
09:47
jjido left
|
|||
jnthn | Ven: Excellent. :) | 09:47 | |
09:47
mcmillhj left
|
|||
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 :). | |||
09:52
itaipu left
09:53
LeCamarade joined
|
|||
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 | |
09:55
chienjo joined
|
|||
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 | |
09:58
itaipu joined
10:02
chienjo left
10:03
bjz_ joined,
bjz left
10:14
labster left
|
|||
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 | |
10:20
aries_liuxueyang left
10:22
aries_liuxueyang joined,
nadim joined
10:23
itaipu left
10:25
Ven left
10:29
itaipu joined
10:32
mcmillhj joined
10:35
AlexDaniel left
10:36
mcmillhj left
10:37
grondilu left
10:39
grondilu joined,
pierre_ left
10:45
pierre_ joined
10:49
pierre_ left,
pierre_ joined
10:50
aindilis left
10:53
pierre_ left
|
|||
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 | |
10:58
mcmillhj joined
|
|||
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 | |
11:03
mcmillhj left
|
|||
nine | maybe worth reporting to #moarvm? | 11:05 | |
11:09
lambd0x joined
|
|||
lambd0x | Hi everyone! | 11:09 | |
11:10
mcmillhj joined
|
|||
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 | |
11:15
mcmillhj left
|
|||
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 | ||
11:25
kurahaupo joined
|
|||
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? | ||
11:28
gucore joined
|
|||
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 | |
11:29
mcmillhj joined,
skids joined
|
|||
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 Intat <tmp>:1------> 3my Uint7⏏5 $s;Malformed myat <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 ) | ||
11:33
mcmillhj left
|
|||
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 | |
11:39
skids left
|
|||
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 | ||
11:42
eliasr joined
11:43
mcmillhj joined
|
|||
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 | ||
11:47
mcmillhj left
|
|||
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 | |
11:58
mcmillhj joined
|
|||
lambd0x | nine: github.com/MoarVM/MoarVM/issues/400 or #400 is the code you requested of me :P | 12:01 | |
12:02
bpmedley left
|
|||
lambd0x | Later fellas o/ | 12:02 | |
12:03
mcmillhj left,
bpmedley joined
|
|||
moritz | nine: I've reformatted your comment | 12:04 | |
nine | moritz: thanks | 12:05 | |
12:09
pierre_ joined
12:11
LeCamarade left
12:14
itaipu left
12:15
itaipu joined
12:18
cpage_ left
12:27
MasterDuke joined
|
|||
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 dnamed d» | ||
MasterDuke | ^^^ what am i missing? i would expect a final "positional d" to be printed | 12:30 | |
12:31
MetaZoffix joined
|
|||
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 dnamed dpositional d» | ||
moritz | MasterDuke: nextsame just uses the same argument list as the current routine | 12:36 | |
MasterDuke: otherwise it's the same as nextwith | |||
12:40
itaipu left
12:48
Wiertek left,
cpage_ joined
12:52
zoosha left
12:53
zoosha joined,
aries_liuxueyang left
12:56
xxpor joined
12:57
MilkmanDan left,
MilkmanDan joined
12:58
aries_liuxueyang joined
13:01
mcmillhj joined
13:02
MasterDuke left
13:06
cdg joined,
cdg left,
cdg joined
13:07
domidumont joined
13:08
markk left
13:09
salva left,
markk joined,
dj_goku joined,
dj_goku left,
dj_goku joined,
Wiertek joined
13:10
skids joined
13:12
salva joined,
liztormato joined
13:20
liztormato left
13:22
Sgeo left,
Unavowed joined
13:32
sufrostico joined
13:34
nightsh left
13:39
MasterDuke joined,
nilptr joined
13:40
nilptr is now known as n1lp7r,
telex left
|
|||
MasterDuke | Xliff: have you looked into docs.perl6.org/type/Signature#Sing...ule_Slurpy for your EXPORT problem? | 13:40 | |
13:42
telex joined,
wamba joined,
MetaZoffix left
13:45
bioduds left
|
|||
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/ | ||
13:49
domidumont left
|
|||
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 | |||
13:51
bioduds joined
|
|||
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 | ||
13:54
elohmrow left
13:58
MetaZoffix joined
|
|||
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 | |||
13:59
nightsh joined
14:00
kyclark joined
|
|||
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? | ||
14:03
pmurias joined
|
|||
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 | ||
14:09
LeCamarade joined
|
|||
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) | ||
14:11
domidumont joined
|
|||
moritz won't build a KPI for rakudo | 14:11 | ||
bioduds | 67.205.136.118/install.sh | ||
14:11
perlpilot joined
|
|||
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 | |||
14:14
sena_kun joined,
MasterDuke left
|
|||
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 | |
14:19
kyclark left
14:21
kyclark joined
|
|||
moritz | I can only comment that the proper place for this comment would be an issue on the perl6/specs repo | 14:21 | |
14:24
perlpilot left
14:25
bjz joined
|
|||
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 | |
14:26
perlpilot joined
14:27
bjz_ left
14:32
MetaZoffix left
|
|||
bioduds | takes a while to install | 14:33 | |
14:33
sena_kun left
|
|||
bioduds | made some initial changes, will upload in a while | 14:37 | |
14:47
domidumont left
|
|||
melezhik | Hi guys! | 14:47 | |
bioduds | wow, its a long install | ||
melezhik | I have class with property "results" | 14:49 | |
has Array @.results; | |||
14:50
pullphinger joined
|
|||
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 :) | ||
14:51
pullphinger left
|
|||
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 | |
14:53
pullphinger joined
|
|||
melezhik | jnthn: kinda | 14:54 | |
I wanted to push into Array a hash | |||
this way works fine: @!results.push: [{ foo => "bar" }]; | 14:55 | ||
14:55
domidumont joined,
g4 left
|
|||
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 | |
14:59
mcmillhj left
|
|||
melezhik | yes, sure! | 15:00 | |
thanks | |||
15:00
mcmillhj joined,
sufrostico left
15:02
Actualeyes joined
15:03
kyclark left,
Actualeyes1 left
|
|||
tbrowder | ref docs (and UInt): please see PR "github.com/perl6/doc/pull/871" | 15:07 | |
15:09
kyclark joined
15:10
itaipu joined
15:11
zacts joined
15:12
khw joined
15:13
wamba left
|
|||
bioduds | hi nine | 15:13 | |
my initial test worked | |||
:) | 15:14 | ||
nine | excellent :) | 15:19 | |
15:19
MorayJ joined
|
|||
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 | ||
15:27
zapwai joined
|
|||
bioduds | please send me a line when you also can run some tests on it [email@hidden.address] | 15:27 | |
15:28
Wiertek93 joined,
nowan left
15:30
nowan joined
15:31
Wiertek left
|
|||
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) | |||
15:37
gfldex joined
|
|||
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 | |
15:39
cyphase left
15:41
Wiertek93 left
|
|||
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 | |
15:44
cyphase joined
|
|||
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 |
|||
15:53
eliasr left
15:57
pierre_ left
16:03
imcsk8_ is now known as imcsk8
16:05
bob777 left
|
|||
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 | ||
16:07
dalek left
|
|||
gfldex | kyclark: known issue, you can uninstall the offending module, install Pod::To::BigPage and reinstall the offending module as a workaround | 16:07 | |
16:08
dalek joined,
ChanServ sets mode: +v dalek
|
|||
kyclark | Oh, wait, needed to panda update | 16:08 | |
gfldex | that would be IO::Socket::SSL (IIRC) | ||
kyclark | Successfully installed Pod::To::BigPage | ||
16:08
JJMambrams joined,
JJMambrams left
|
|||
timotimo | i think panda should check how old the definitions file is when saying "module not found" | 16:09 | |
16:09
zacts left
|
|||
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 | ||
16:11
mcmillhj left
|
|||
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 | ||
16:20
mcmillhj joined
|
|||
stmuk_ | timotimo: yes that's right .. it's pretty awful hacky code TBH but it should "mostly" work | 16:25 | |
16:26
mcmillhj left
|
|||
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 | ||
16:29
atta joined
|
|||
stmuk_ | p6doc might even pick up CSV.pod6 if its under doc/ :) | 16:30 | |
16:30
perlpilot left,
perlpilot joined
|
|||
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 | |
16:36
canopus left,
mcmillhj joined
|
|||
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 | |
16:39
Actualeyes left
16:41
Elfoonto joined
|
|||
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 | ||
16:43
mcmillhj left
|
|||
El_Che | moritz: exactly | 16:43 | |
16:43
dakkar left
|
|||
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 | |
16:43
canopus joined
|
|||
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 | ||
16:46
dalek left,
dalek joined,
ChanServ sets mode: +v dalek
16:47
AndroUser joined
|
|||
AndroUser | Whats the difference between bless and new? | 16:50 | |
16:50
AndroUser left
|
|||
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 | |||
16:51
ItayAlmog joined
|
|||
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 | ||
16:56
mcmillhj joined
|
|||
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 | ||
16:58
acrussell joined
|
|||
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 | |||
16:58
zacts joined
|
|||
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 | |
17:01
mcmillhj left,
leont joined
|
|||
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 | |
17:07
bioduds left
|
|||
[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 | ||
17:08
atta left
|
|||
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 | |
17:09
bioduds joined
|
|||
[Coke] | anyone using bailador or http::easy? trying to figure out how it's handling multiple simultaneous requests. | 17:09 | |
17:10
dogbert11 left,
zapwai left
|
|||
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 | |
17:10
dogbert17 joined
|
|||
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 | |
17:10
lizmat joined,
mcmillhj joined
|
|||
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 | ||
17:14
LeCamarade left
|
|||
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 | ||
17:17
firstdayonthejob joined
|
|||
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 | |
17:19
sufrostico joined,
kyclark left
|
|||
tbrowder | m: my UInt $u; | 17:20 | |
camelia | ( no output ) | ||
gfldex | dogbert17: it wasn't changed by accident so that info is just missing | ||
17:21
espadrine joined
|
|||
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" | ||
17:21
kyclark joined
17:22
AlexDaniel joined
|
|||
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 itat <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 | |||
17:34
zapwai joined,
zapwai left,
zapwai joined
|
|||
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 :) | ||
17:35
kyclark left
17:36
kurahaupo left
|
|||
bioduds | free-thinking you oo model same way subsets allow you to "re-build" your types | 17:36 | |
17:37
itaipu left
|
|||
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 | ||
17:38
Wiertek joined
|
|||
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 | ||
17:39
itaipu joined
|
|||
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 | |
17:43
domidumont left
|
|||
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 | |||
17:45
ItayAlmog left
|
|||
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. | ||
17:46
ItayAlmog joined
|
|||
ItayAlmog | Interesting, will think about it | 17:46 | |
rindolf | ItayAlmog: hi. | 17:47 | |
17:47
spider-mario joined
|
|||
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? | ||
17:47
MilkmanDan left
|
|||
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
espadrine left,
leont left,
spider-mario left
|
|||
rindolf | ItayAlmog: ah, nice, so am I. | 17:47 | |
17:48
zakharyas left,
MilkmanDan joined
|
|||
ItayAlmog | rindolf: Nice to meet you :) | 17:48 | |
rindolf | ItayAlmog: nice to meet you too. | ||
ItayAlmog: where do you live? | |||
17:49
spider-mario joined
|
|||
ItayAlmog | I am in modi'in | 17:49 | |
rindolf | ItayAlmog: ah, szabgab is there. | ||
17:49
zacts left
|
|||
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! | |||
17:50
ItayAlmog left
17:52
ItayAlmog joined,
ItayAlmog left
|
|||
timotimo | "read error: connection refused" seems like a strange way to disconnect | 17:54 | |
17:59
margeas left
18:00
leont joined
18:05
Elfoonto left
18:08
bpmedley left
18:12
bpmedley joined,
mcmillhj left
18:16
n1lp7r left
18:17
woolfy joined
|
|||
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 | |||
18:22
ufobat left
18:24
mcmillhj joined
|
|||
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 | ||
18:26
ItayAlmog joined
|
|||
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 | ||
18:29
leont left,
mcmillhj left
|
|||
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 | |
18:32
ItayAlmog left
|
|||
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! | ||
18:33
ranguard_ is now known as ranguard,
ItayAlmog joined,
ItayAlmog left
|
|||
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 | |
18:33
girafe joined
|
|||
timotimo | i hope itay reads irclog | 18:33 | |
timotimo is AFK for a bit | 18:34 | ||
18:34
ItayAlmog joined
|
|||
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:35
cdg left
|
|||
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» | ||
18:38
sufrostico left
|
|||
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 | |
18:41
wamba joined
|
|||
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 | |
18:43
ItayAlmog left,
ItayAlmog joined
18:45
mcmillhj joined,
ItayAlmog left
18:46
keithbro joined,
ItayAlmog joined,
andrzejku joined
|
|||
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
|
|||
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 | ||
18:50
mcmillhj left,
fruunode joined
|
|||
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 | |
18:54
zacts joined
|
|||
fruunode | Unavowed: how would it know how how to distribute the elements among the two arrays/? | 18:56 | |
18:56
leont joined
18:57
zacts left
|
|||
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 parametersat <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 myat <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 characterat <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 | ||
:) | |||
18:59
MorayJ left
|
|||
fruunode | m: my (@a, @b) := [[1], [2]][0,1]; dd [@a, '|', @b] | 18:59 | |
camelia | rakudo-moar af4c2e: OUTPUT«[[1], "|", [2]]» | ||
18:59
fruunode left,
ItayAlmog left
19:00
darutoko left,
Ven joined
19:02
ItayAlmog joined
19:04
vendethiel joined
|
|||
Unavowed | thanks, guys | 19:04 | |
tbrowder | duh, ref travis err: one has to spell the dependencies correctly: s/Test::Meta/Test::META/ | 19:05 | |
19:05
mcmillhj joined
19:06
skrshn joined
19:12
brrt joined
19:19
espadrine joined
|
|||
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 ;) | |||
19:23
zakharyas joined
19:29
zacts joined,
brrt left
19:30
TEttinger joined
19:32
perlpilot left
|
|||
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)» | ||
19:38
labster joined,
labster left,
labster joined
19:39
domidumont left,
jjido joined
|
|||
timotimo | ah | 19:42 | |
19:43
perlpilot joined
19:44
jjido left
19:47
bbkr left,
jjido joined
19:54
obfusk_ left,
obfusk joined
19:58
cdg joined
|
|||
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. | ||
20:00
kaare__ left
|
|||
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) | ||
20:04
bioduds left
20:05
bioduds joined
|
|||
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? | |||
20:05
mspo left
|
|||
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 | |
20:13
woolfy left
|
|||
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. | ||
20:14
andrzejku left,
eliasr joined
|
|||
[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 | ||
20:18
acrussell left
|
|||
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 | |||
20:23
zacts left
|
|||
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 | ||
20:27
itaipu left
|
|||
[Coke] | because that is not how bash works | 20:27 | |
20:27
MasterDuke joined
|
|||
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 | ||
20:29
cdg left
|
|||
[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
20:32
harmil_wk joined
|
|||
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 | |
20:33
brrt joined,
brrt left
|
|||
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 | |||
20:35
margeas joined
|
|||
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 | ||
20:37
rindolf left
|
|||
[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? | ||
20:41
itaipu joined
|
|||
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 | ||
20:43
rindolf joined
|
|||
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 | |
20:44
woolfy1 joined
|
|||
bioduds | ok, ill put it visible | 20:44 | |
20:44
woolfy left
|
|||
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. | ||
20:48
nadim_ joined
|
|||
bioduds | yes, i got it is hairy | 20:49 | |
20:49
nadim left
|
|||
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. | |||
20:53
zakharyas left
|
|||
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 | |
20:55
nadim_ left,
rindolf left
|
|||
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 | ||
20:57
jjido left
|
|||
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 | |||
21:00
Ven left
|
|||
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 | |
21:01
skids left
|
|||
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 | |
21:02
gucore left
|
|||
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 | |||
21:11
mempko joined
|
|||
leont | dash is a fine /bin/sh, really. This might have worked better if they had done it 10 years earlier | 21:11 | |
21:11
atweiden joined
|
|||
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 | |||
21:16
woolfy1 left,
woolfy joined
|
|||
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 | |||
21:17
mcmillhj left
21:18
woolfy1 joined,
woolfy left
|
|||
ugexe | i guess you could use perl6 to spawn a shell to set the PATH but why | 21:18 | |
21:19
pullphinger left
|
|||
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 | |
21:20
jjido joined
|
|||
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 | ||
21:22
margeas left,
margeas joined
|
|||
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 | |||
21:26
jjido left
|
|||
atweiden | has anyone played around with generating text/fuzzing from a p6 grammar? | 21:27 | |
e.g. github.com/zimmski/tavor | 21:28 | ||
21:30
jjido joined
|
|||
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 | |
21:34
Wiertek left
|
|||
bioduds | trying | 21:36 | |
jnthn | github.com/jnthn/grammar-generativ...rative.pm6 is the code | ||
21:36
jjido left
21:37
CIAvash left,
BillSussman left
|
|||
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
21:51
setty1 joined
21:59
keithbro left
22:01
espadrine left
22:07
stmuk joined,
mcmillhj joined
22:13
itaipu left
22:15
pmurias left,
mcmillhj left
22:17
cdg joined
22:18
Sgeo joined
22:27
firstdayonthejob left
22:28
mcmillhj joined
22:33
mcmillhj left
22:34
RabidGravy left
22:41
wamba left
23:03
mcmillhj joined
23:07
mcmillhj left
23:08
atta joined
23:10
labster left
23:12
margeas left
23:15
nightsh left,
grondilu left
|
|||
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…» | ||
23:18
spider-mario left
|
|||
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 | |
23:20
bjz left,
mcmillhj joined
|
|||
El_Che | file /usr/lib/x86_64-linux-gnu/libc.so | 23:22 | |
/usr/lib/x86_64-linux-gnu/libc.so: ASCII text | |||
:) | |||
23:24
labster joined
23:25
mcmillhj left
23:26
skids joined
|
|||
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
23:42
bpmedley left,
leont left
23:43
bpmedley joined
23:45
mcmillhj left
23:59
mcmillhj joined
|