»ö« 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. |
|||
grondilu | m: use NativeCall; role Foo[Sub &native] { has &.native }; role Bar is repr('CPointer') {}; | 00:00 | |
camelia | ( no output ) | ||
grondilu | m: use NativeCall; role Foo[Sub &native] { has &.native }; role Bar is repr('CPointer') {}; class :: does Foo(sub {}) {} | ||
camelia | rakudo-moar d43ea0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unable to parse expression in typename; couldn't find final ')' at <tmp>:1------> 3 repr('CPointer') {}; class :: does Foo(7⏏5sub {}) {}» | ||
grondilu | m: use NativeCall; role Foo[Sub &native] { has &.native }; role Bar is repr('CPointer') {}; class :: does Foo(my & = sub {}) {} | ||
camelia | rakudo-moar d43ea0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unable to parse expression in typename; couldn't find final ')' at <tmp>:1------> 3 repr('CPointer') {}; class :: does Foo(7⏏5my & = sub {}) {}» | ||
grondilu | m: use NativeCall; role Foo[Sub &native] { has &.native }; role Bar is repr('CPointer') {}; class :: is Foo(sub {}) {} | ||
camelia | rakudo-moar d43ea0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Cannot resolve caller trait_mod:<is>(<anon|78520784>, Foo, Sub); none of these signatures match: (Mu:U $child, Mu:U $parent) (Mu:U $child, :$DEPRECATED!) (Mu:U $type, :$rw!) (Mu:U $ty…» | ||
grondilu | wth | ||
oh | 00:01 | ||
m: use NativeCall; role Foo[Sub &native] { has &.native }; role Bar is repr('CPointer') {}; class :: is Foo[sub {}] {} | |||
camelia | rakudo-moar d43ea0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Cannot resolve caller trait_mod:<is>(<anon|59022496>, Foo, Array); none of these signatures match: (Mu:U $child, Mu:U $parent) (Mu:U $child, :$DEPRECATED!) (Mu:U $type, :$rw!) (Mu:U $…» | ||
grondilu | m: use NativeCall; role Foo[Sub &native] { has &.native }; role Bar is repr('CPointer') {}; class :: does Foo[sub {}] {} | 00:02 | |
camelia | rakudo-moar d43ea0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>No appropriate parametric role variant available for 'Foo'at <tmp>:1» | ||
grondilu | damn it | ||
back to basic: | |||
m: role Foo[Int $] {}; class :: does Foo[13] {} | |||
camelia | ( no output ) | ||
grondilu | ok | 00:03 | |
m: role Foo[Sub &] {}; class :: does Foo[sub {}] {} | |||
camelia | rakudo-moar d43ea0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>No appropriate parametric role variant available for 'Foo'at <tmp>:1» | ||
grondilu | hum | ||
m: say .WHAT given sub {} | |||
camelia | rakudo-moar d43ea0: OUTPUT«(Sub)» | ||
grondilu | Can't I use a Sub as a parameter in a parametric role? | ||
00:16
mtj_ left,
mtj_ joined
|
|||
grondilu | m: role Foo[$] {} | 00:18 | |
m: say "hi" | |||
camelia | ( no output ) | ||
rakudo-moar d43ea0: OUTPUT«hi» | |||
grondilu | wow that first one took its time | ||
m: role Foo[$] {} | |||
camelia | ( no output ) | ||
grondilu | actually not | ||
m: role Foo[$] {}; class :: does Foo[my $ = sub {}] {} | 00:19 | ||
camelia | ( no output ) | ||
grondilu | m: role Foo[$f] { my $.f = $f; method f { $!f() } }; class :: does Foo[my $ = sub { say "hi!" }] {}.f | 00:20 | |
camelia | rakudo-moar d43ea0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Package 'Foo' already has a method 'f' (did you mean to declare a multi-method?)at <tmp>:1» | ||
grondilu | m: role Foo[$f] { my $.f = $f; method talk { $!f() } }; class :: does Foo[my $ = sub { say "hi!" }] {}.talk | ||
camelia | rakudo-moar d43ea0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Attribute $!f not declared in role Fooat <tmp>:1------> 3] { my $.f = $f; method talk { $!f() } }7⏏5; class :: does Foo[my $ = sub { say "hi expecting any of: horizontal whitespac…» | ||
grondilu | m: role Foo[$f] { has $.f = $f; method talk { $!f() } }; class :: does Foo[my $ = sub { say "hi!" }] {}.talk | 00:21 | |
camelia | rakudo-moar d43ea0: OUTPUT«Cannot look up attributes in a type object in method talk at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
grondilu | m: role Foo[$f] { method talk { $f() } }; class :: does Foo[my $ = sub { say "hi!" }] {}.talk | ||
camelia | rakudo-moar d43ea0: OUTPUT«hi!» | ||
grondilu | m: role Foo[$f] { method fork { $f() } }; class :: does Foo[my $ = sub fork() is native {}] {}.fork; say "hi" | 00:22 | |
camelia | rakudo-moar d43ea0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Can't use unknown trait 'is native' in a sub declaration.at <tmp>:1 expecting any of: rw raw hidden-from-backtrace hidden-from-USAGE pure default DEPRECATED inlinable nodal …» | ||
grondilu | m: role Foo[$f] { method fork { $f() } }; class :: does Foo[my $ = sub fork() is native() {}] {}.fork; say "hi" | ||
camelia | rakudo-moar d43ea0: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Can't use unknown trait 'is native' in a sub declaration.at <tmp>:1 expecting any of: rw raw hidden-from-backtrace hidden-from-USAGE pure default DEPRECATED inlinable nodal …» | ||
grondilu | m: use NativeCall; role Foo[$f] { method fork { $f() } }; class :: does Foo[my $ = sub fork() is native {}] {}.fork; say "hi" | ||
camelia | rakudo-moar d43ea0: OUTPUT«hihi» | ||
grondilu | nice | ||
00:23
mtj_ left,
mtj_ joined
|
|||
grondilu | m: use NativeCall; role Foo[$f] { method fork { $f() } }; class :: does Foo[sub fork() is native {}] {}.fork; say "hi" | 00:24 | |
camelia | rakudo-moar d43ea0: OUTPUT«hihi» | ||
grondilu | m: use NativeCall; role Foo[$f] is repr('CPointer') { method fork { $f() } }; class :: does Foo[sub fork() is native {}] {}.fork; say "hi" | 00:25 | |
camelia | rakudo-moar d43ea0: OUTPUT«hihi» | ||
grondilu | that looks a lot like what I was considering doing. Cool. | ||
b2gills | 「Sub &」 declares that it requires a Callable that returns a Sub | 00:29 | |
tbrowder | ugexe: thanks | 00:31 | |
.tell ugexe thanks | 00:32 | ||
yoleaux | tbrowder: I'll pass your message to ugexe. | ||
00:33
mcmillhj joined
00:38
BenGoldberg joined,
mcmillhj left
00:40
nbrown joined
00:41
nbrown left
00:43
nbrown joined
|
|||
grondilu | m: role Foo[Sub &] {}; class :: does Foo[sub (--> Sub) { sub {} }] {} | 00:43 | |
camelia | ( no output ) | ||
grondilu | b2gills: you're right | ||
m: role Foo[&] {}; class :: does Foo[sub {}] {} | 00:44 | ||
camelia | ( no output ) | ||
00:53
pierre_ joined
00:55
araujo_ joined
00:58
mcmillhj joined
00:59
araujo left,
zacts left,
nbrown left
01:04
mcmillhj left
01:09
olinkl left
01:10
kipd left,
mithaldu_ left,
BuildTheRobots left,
notbenh_ left,
Lucas_One left
01:11
AngeloMichael left,
SmokeMachine____ left
01:12
woodruffw left
01:13
zengargoyle left,
Actualeyes joined
01:14
zengargoyle joined,
mcmillhj joined
01:16
_slade_ left
01:17
woodruffw joined,
woodruffw left,
woodruffw joined
01:18
_slade_ joined
01:19
mcmillhj left,
Lucas_One joined
01:20
SmokeMachine____ joined
01:23
gfldex left,
olinkl joined
01:24
beatdown joined
01:25
kipd joined
01:26
mithaldu_ joined
01:27
notbenh_ joined,
AngeloMichael joined,
grondilu left
01:28
BuildTheRobots joined
01:31
BillSussman left
01:33
mcmillhj joined
01:37
mcmillhj left
01:38
zacts joined
01:42
TEttinger left
01:45
TEttinger joined,
r_i_d joined
01:51
mcmillhj joined
01:56
mcmillhj left
02:05
mcmillhj joined
02:10
mcmillhj left
02:12
_slade_ left,
Praise left,
_slade_ joined
02:16
wamba joined
02:23
mcmillhj joined
02:28
mcmillhj left
02:33
n1lp7r left
02:37
mcmillhj joined
02:43
noganex_ joined,
mcmillhj left,
r_i_d left
02:45
noganex left
02:51
mcmillhj joined
02:54
zacts left
02:55
mcmillhj left
03:07
r_i_d joined
|
|||
r_i_d | is there a built-in way to check if a variable is an element in a given array? | 03:09 | |
right now i iterate over the array with a for-loop and trigger a duplicate flag accordingly -- is there a better way? | 03:10 | ||
03:11
cuonglm joined
|
|||
cuonglm | jnthn: Is there any design doc about NFG implementation in MoarVM? | 03:12 | |
harmil | r_i_d: you can use a Set, but if you are doing this just once, it's more efficient to just scan the list | ||
cuonglm | I read your article www.jnthn.net/papers/2015-spw-nfg.pdf | 03:13 | |
r_i_d | okay, thanks | ||
ugexe | m: my @arr = <a b c d>; say "a" ~~ @arr.any; say "z" ~~ @arr.any | ||
yoleaux | 00:32Z <tbrowder> ugexe: thanks | ||
camelia | rakudo-moar d43ea0: OUTPUT«TrueFalse» | ||
r_i_d | oh, that's nice. | 03:14 | |
ugexe | m: my @arr = <a b c d>; say @arr.contains("a"); say @arr.contains("z") | ||
camelia | rakudo-moar d43ea0: OUTPUT«TrueFalse» | ||
r_i_d | perfect. | 03:16 | |
harmil | I didn't even know there was a contains. That's handy. I assume it just scans the array? | 03:18 | |
r_i_d | Larry thought of everything, aparently. | ||
geraud | m: my @a = <a b c d e>; say "d" ∈ @a; | ||
camelia | rakudo-moar d43ea0: OUTPUT«True» | ||
ugexe | m: say "abc".contains("a"); say "abc".contains("z") | ||
camelia | rakudo-moar d43ea0: OUTPUT«TrueFalse» | ||
03:19
mcmillhj joined
|
|||
ugexe | `cd rakudo && git grep "method contains"` will generally make it easy to find where and how something is implemented | 03:21 | |
03:28
mcmillhj left
03:32
mcmillhj joined,
r_i_d left,
wamba left
03:37
mcmillhj left
03:38
TEttinger left
03:41
TEttinger joined
03:44
zacts joined
03:46
araujo__ joined,
cuonglm left
03:49
TEttinger left,
araujo_ left
03:52
TEttinger joined
03:53
nester joined
03:54
mcmillhj joined
04:04
notostraca joined
04:07
TEttinger left
04:13
notostraca left
04:15
notostraca joined
04:26
mcmillhj left
04:28
khw left
04:34
notostraca left,
cgfbee left
04:37
notostraca joined
04:39
mcmillhj joined
04:40
pierre_ left
04:41
skids left
04:44
mcmillhj left
04:46
notostraca left
04:47
pierre_ joined
04:48
notostraca joined,
mohae_ joined
04:49
nester left
04:51
mohae left,
pierre_ left
04:55
holyghost left
04:56
mcmillhj joined
04:58
zacts left
05:00
mcmillhj left
05:10
notostraca left
05:14
notostraca joined
05:20
mcmillhj joined
05:22
zacts joined
05:23
Actualeyes left
05:25
mcmillhj left
05:32
mcmillhj joined
05:34
araujo__ left
05:35
notostraca left
05:36
Actualeyes joined
05:37
mcmillhj left
05:38
notostraca joined
05:47
_slade_ left
05:48
notostraca left
05:50
notostraca joined,
pierre_ joined
05:52
CIAvash joined
05:55
pierre_ left
06:03
pierre_ joined,
pierre_ left
06:05
mcmillhj joined,
robinsmidsrod left
06:06
robinsmidsrod joined,
pierre_ joined
|
|||
avuserow | m: class Foo {has $!x; method x {return Proxy.new(FETCH => sub ($) {$!x}, STORE => sub ($, $v) {note "got here"; $!x = $v;})}}; my $f = Foo.new; $f.x = 1; say $f.x; my @attrs = Foo.^attributes(:local)[0].set_value($f, 2); say $f.x; note "pre-3"; $f.x = 3; say $f.x; | 06:09 | |
camelia | rakudo-moar d43ea0: OUTPUT«got here12pre-3got hereCannot assign to an immutable value in sub at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
avuserow | looks like set_value and Proxies interact poorly? | ||
06:09
mcmillhj left
|
|||
avuserow | anyway I don't need to use a Proxy per se, I just want to update one attribute whenever another is set... not sure what good ways there are for that | 06:10 | |
nine | harmil: do _not_ use .contains! That checks if the given value is a substring. On lists it will check if the value is a substring of the stringified list. So it'll find "1" in (10, 11, 12). | 06:19 | |
ugexe: ^^^ | |||
06:19
mcmillhj joined
|
|||
nine | lizmat++ noticed this and already suggested a fix, but for now that's unfortunately how it is. | 06:20 | |
06:21
labster joined
06:24
mcmillhj left
06:33
nadim joined
06:41
domidumont joined
06:45
domidumont left
06:46
domidumont joined
06:47
nadim_ joined,
mcmillhj joined
06:49
movlex left
06:50
nadim left
06:53
mcmillhj left
07:02
mcmillhj joined,
BenGoldberg left
07:06
mcmillhj left
07:10
notostraca left
07:11
cgfbee joined,
notostraca joined
07:21
notostraca left
07:24
notostraca joined
07:28
espadrine joined
07:30
canopus left
07:33
RabidGravy joined
07:34
mcmillhj joined
07:38
canopus joined
07:40
mcmillhj left,
ufobat joined
07:43
notostraca left
07:44
firstdayonthejob joined
07:45
mcmillhj joined,
notostraca joined
07:47
ufobat left,
ufobat joined
07:48
darutoko joined
07:50
mcmillhj left
07:51
notostraca left
07:54
pierrot joined
07:58
notostraca joined
07:59
mcmillhj joined
08:02
jonas2 joined
08:04
mcmillhj left
08:06
notostraca left,
quester joined
08:07
notostraca joined
08:09
Jody_ joined,
g4 joined
08:11
Jody_ left
08:16
firstdayonthejob left
08:19
leont joined
08:20
firstdayonthejob joined
08:22
araujo joined
08:24
notostraca is now known as TEttinger
08:28
TEttinger left
08:29
lizmat left
08:30
TEttinger joined
08:31
salva joined
08:37
mcmillhj joined
08:42
mcmillhj left
08:43
TEttinger left
08:44
TEttinger joined
08:45
mvorg joined
08:46
DrEeevil left
08:47
xiaomiao joined
|
|||
jnthn | .tell cuonglm No design doc, though the key data structures are described somewhat in the .h files; of note see github.com/MoarVM/MoarVM/blob/mast...ings/nfg.h and github.com/MoarVM/MoarVM/blob/mast...ormalize.h | 08:49 | |
yoleaux | jnthn: I'll pass your message to cuonglm. | ||
08:53
mcmillhj joined
08:55
TEttinger left
08:57
mcmillhj left
08:59
TEttinger joined,
Actualeyes1 joined,
Actualeyes left
09:03
pierre_ left
09:06
smls joined
|
|||
TEttinger | jnthn: is that grapheme normalization stuff? guessing by names | 09:08 | |
09:09
TEttinger left,
TEttinger joined,
mcmillhj joined
|
|||
jnthn | TEttinger: Yes :) | 09:10 | |
(Was answering a question from the backlog :)) | |||
09:12
user9 joined
09:15
mcmillhj left,
quester left
09:16
notostraca joined
09:19
TEttinger left,
notostraca is now known as TEttinger
09:26
mcmillhj joined
09:31
mcmillhj left
09:33
Actualeyes1 left
09:35
nadim_ left
09:43
TEttinger left
09:54
Actualeyes joined
09:57
mcmillhj joined
10:02
mcmillhj left
|
|||
melezhik | Good day gentlemen | 10:16 | |
how I can create a perl6 class with a "nested" name? Like class Foo::Bar::Baz | 10:17 | ||
looks like simple having "class Foo::Bar::Baz {}" does not work | |||
jnthn | m: class Foo::Bar::Baz { method m { 'bacon' } }; say Foo::Bar::Baz.m | 10:22 | |
camelia | rakudo-moar f2df2c: OUTPUT«bacon» | ||
jnthn | Seems to work fine, so I suspect you're running into some other problem :) | 10:23 | |
melezhik | jnthn: will double check thanks! | 10:24 | |
ok, I see the root now. Had to add class Name / file path into META.info , so t/ succeed when run panda --force install . | 10:26 | ||
10:27
kaare_ joined
|
|||
melezhik | anybody knows the reference to Perl6 Test ? all I find is perl6maven.com/how-to-test-perl6-modules but it is not enough for me ... | 10:28 | |
DrForr | docs.perl6.org/language/testing | 10:30 | |
melezhik | DrForr: thanks | ||
looks good :) | |||
10:30
leont left
|
|||
melezhik | how can have panda installer to show verbose test output when run my tests with `panda install .` | 10:31 | |
? | |||
looks like --verbose don't work | |||
10:31
mcmillhj joined
10:32
labster left
|
|||
DrForr | "Doesn't work" isn't as helpful as "I would have expected... but didn't see it." | 10:33 | |
melezhik | ok. "panda --force --verbose install ." give me a panda help info, instead of running tests | 10:34 | |
"panda --force install ." runs my tests and makes install | 10:35 | ||
10:36
mcmillhj left
|
|||
DrForr | I'll have to install locally to confirm. | 10:36 | |
nine | melezhik: add --verbose to your ~/.proverc | 10:37 | |
melezhik | DrForr: github.com/melezhik/outhentix | ||
head ~/.proverc | 10:38 | ||
--verbose | 10:39 | ||
DrForr | 'panda --force --verbose install .' appears to be failing correctly as '.' isn't a list of modules, but a directory. If you're used to that from Perl 5 tools, keep in mind this is perl 6 :) | ||
melezhik | but still have a none verbose output from "panda --force install ." | ||
10:39
salva left
|
|||
nine | DrForr: but "panda install ." can actually be used to install an unpacked dist from a directory | 10:40 | |
melezhik | DrForr: ok, let me say in other words. I have unit tests under t/ and I want to run them and see verbose output ... | ||
how can I do this? | |||
prove --exec perl6 -r t ? | 10:41 | ||
nine | melezhik: I usually run tests with prove -e 'perl6 -Ilib' -v t | ||
melezhik | yes, prove --exec perl6 -r t works | ||
tbrowder | melezhik: I'm having better luck with zef. | 10:42 | |
melezhik | I just expected that pand would respect --verbose | ||
ok. for now, "prove" is fine for me | |||
10:42
salva joined
10:49
mcmillhj joined
10:54
mcmillhj left
10:56
leont joined
|
|||
tbrowder | ugexe: do you know how to get info or verbose output from Build.pm? I'm using zef and only get info messages using --debug, nothing with --info (default) or --verbose. | 11:01 | |
dalek | osystem: cae96fc | (Sam Gillespie)++ | META.list: Adding Numeric::Pack to ecosystem. |
11:07 | |
osystem: 4f525ef | azawawi++ | META.list: Merge pull request #245 from samgwise/patch-2 Adding Numeric::Pack to ecosystem. |
|||
11:10
rindolf joined
|
|||
avar | shorter oneliner for this in perl6: perl -le"print substr(hex(substr(shift,0,2)),-1)" $(hostname -f | md5sum) ? | 11:10 | |
11:11
bjz joined
|
|||
avar | for "Pick N% of hosts depending on their hostname" | 11:11 | |
11:15
leont left
|
|||
avar | best I can think of: | 11:15 | |
perl6 -e 'exit :16(@*ARGS[0].substr(0,2)) % 10 == 0 ?? 0 !! 1' $(hostname|md5sum) | |||
11:18
xinming joined
|
|||
avar | substr not needed due to native bigint: | 11:20 | |
perl6 -e 'exit :16(@*ARGS[0]) % 10 == 0 ?? 0 !! 1' $(hostname|md5sum) | |||
11:22
xinming_ left
11:26
mcmillhj joined
11:28
MasterDuke joined
11:29
bioduds left
|
|||
MasterDuke | avar: perl6 -e 'exit :16(@*ARGS[0]) %% 10 ?? 0 !! 1' $(hostname|md5sum) | 11:29 | |
11:29
bioduds joined
|
|||
bioduds | im having trouble installing perl6 | 11:29 | |
DrForr | What kind of trouble? | 11:30 | |
bioduds | i have it installed but a very old version | ||
11:30
bjz left
|
|||
bioduds | ===SORRY!=== Error while compiling hello.pl Can't use unknown trait 'is required' in an attribute declaration. | 11:30 | |
11:30
mcmillhj left
|
|||
El_Che | that reads like Moo/Moose | 11:30 | |
bioduds | and i dont seem to be able to update it | 11:31 | |
no matter what I do | |||
I can't get it to work | |||
El_Che | bioduds: have you tried rakudobrew? | 11:33 | |
bioduds | yes | ||
tried a couple of times | |||
El_Che | how did you install the version you have? | ||
os package? | |||
bioduds | i installed by running sudo apt-get install rakudo | 11:34 | |
11:34
pierre_ joined
|
|||
bioduds | im on ubuntu 14.04 | 11:34 | |
moritz | try uninstalling it, and building from source instead | ||
bioduds | I did | ||
El_Che | sudo apt-get remove --purge rakudo | ||
bioduds | let me do it again | 11:35 | |
El_Che | then just follow the rakudo instructions, that should work | ||
DrForr | Right, so you got the versionfrom the repository, which isn't up-to-date. Have you tried removing the package that you installed, and building via rakudobrew? | ||
bioduds | i actually only removed it not purged | ||
El_Che | (as there is no rakudo on the system) | ||
(removed should be ok, purge is because I am a digitally clean type :) ) | |||
11:35
Actualeyes left
|
|||
bioduds | let me try | 11:35 | |
i would like to make a suggestion to the top cat p6 guys if i may and if they see this. The best installing way is Meteor | 11:36 | ||
curl install.meteor.com/ | sh | 11:37 | ||
perhaps this may be done with Perl6 | |||
DrForr | Well-volunteered, grab the file, change it to download rakudobrew and post a link in the channel? | 11:38 | |
11:38
mcmillhj joined
|
|||
bioduds | ok, so I did sudo apt-get remove --purge rakudo | 11:39 | |
moritz | you can also use the docker container: github.com/perl6/docker | ||
bioduds | now Im to follow which line? | ||
this here? perl6.org/downloads/ | |||
11:41
MilkmanDan left
|
|||
DrForr | bioduds: Are you Eduardo Capanema? If so, welcome! | 11:42 | |
bioduds | yep, I am. thanks DrForr | 11:43 | |
DrForr | (and even if you're not, still, welcome!) | ||
bioduds | I have one successful installation on my local machine | ||
ubuntu 16.04 | |||
11:43
bjz joined,
mcmillhj left
|
|||
bioduds | but on my AWS server ubuntu14.04 it is not working | 11:43 | |
i believe 16.04 repo apt is correct and 14.04 is not | 11:44 | ||
and once you put bad p6 version there is no way to upgrade it | |||
11:46
mr-fooba_ left
|
|||
DrForr | Well, the version from Ubuntu 16.04 is certainly going to be more recent. Like any other project, you can either wait for the next version to become available as a package, or go out and install it yourself. | 11:47 | |
El_Che | bioduds: read your post! | 11:48 | |
:) | |||
bioduds: damn straight to the point :) | |||
DrForr | Installing from packages is more convenient, certainly, but means that you have to wait until someone else packages the latest version, or you can go out and get the latest yourself. | ||
El_Che | bioduds: I build often from source for my docker setup and it's pretty straightfwd (but it takes a long time to finish) | 11:49 | |
pkgs is something we indeed need to provide | |||
bioduds | im trying again | ||
11:50
Actualeyes joined
|
|||
El_Che | ls | 11:50 | |
oops | |||
bioduds | my point is if perl6 is aimed at beginners, installation must be made reaaaaaly easy | ||
i purged current p6 version | 11:51 | ||
now i downloaded rakudobrew | |||
moritz | then help making it easy | ||
bioduds | and im running the script | ||
DrForr | No argument there. But doing that takes time and effort, effort that people have channeled into making the software actually work. | ||
bioduds | I am helping, I am trying to point out the easiest way I know | 11:52 | |
which is Meteor shell script after curl | |||
DrForr | Right. Feel free to rewrite it to use rakudobrew and submit it here. | ||
perlbrew has almost exactly the same setup, you might want to look at that first. | 11:53 | ||
moritz | bioduds: thing is, throwing "hey everybody, please do what I want" rarely works for open source projects, even if you offer a valid perspective | ||
bioduds | moritz, i am not throwing do what i want | 11:54 | |
not at all | |||
I am suggesting | |||
very different | |||
moritz | bioduds: the difference is just in wording, not in action | ||
bioduds | Im not demanding a thing moritz | ||
it is merely a suggestion | 11:55 | ||
11:55
smls_ joined
|
|||
El_Che | ok, let's get past this. bioduds, is rakudobrew running? | 11:55 | |
moritz | bioduds: and it's received. And I'm merely suggesting that you actually implement your suggestion, because that has the best chances of success | ||
bioduds | no not running | ||
11:55
smls left
|
|||
bioduds | Command failed (status 512): make Failed running /usr/bin/perl Configure.pl --backends=moar --gen-moar --git-reference="/home/ubuntu/.rakudobrew/bin/../git_reference" --make-install at /home/ubuntu/.rakudobrew/bin/rakudobrew line 58. main::run('/usr/bin/perl Configure.pl --backends=moar --gen-moar --git-r...') called at /home/ubuntu/.rakudobrew/bin/rakudobrew line 386 main::build_impl('moar', undef, '') called at /home/ubuntu/.raku | 11:55 | |
DrForr | And your suggestion is noted. Feel free to modify install.perlbrew.pl's script and submit it. | ||
bioduds: That's cut off. Please post your full install log as a github gist or something like that, where we can see it. | 11:56 | ||
El_Che | bioduds: | ||
How to get Rakudo Perl 6 | |||
The recommended way to use Rakudo is by downloading Rakudo Star – a useful and usable production distribution of Perl 6. Rakudo Star includes both the Rakudo compiler and some commonly used libraries. | |||
OS_Windows_8 .msi Rakudo Star | |||
2016.07 | |||
11:56
El_Che left,
pierre_ left,
El_Che joined
|
|||
bioduds | how do i do that? | 11:57 | |
tbrowder | jnthn: where is specification for the META6 file? | ||
El_Che | sorry for the flooding. Damns copy paste. I hope my leaving the channel stopped the flooding | ||
bioduds | post as a github gist? | ||
El_Che | bioduds: sudo apt-get instal build-essential git | ||
jnthn | tbrowder: No idea, sorry; I don't really work on that side of things. :) | 11:58 | |
El_Che | bioduds: maybe you're missing a depency for building rakudo | ||
jnthn | tbrowder: S11 or S22 at a guess though | ||
DrForr | Whatever pastebin you prefer. The point is that we could only see part of the log. pastebin.ca, snit.ch, any pastebin will do. | ||
bioduds | well, happened twice | ||
once in a digital ocean ubuntu 1404 | |||
and now on AWS ubuntu 14.04 | |||
DrForr | bioduds: Yes, and if you don't install the dependency it'll keep breaking. | ||
tbrowder | thanks, but how did you develop yr meta6 test? | 11:59 | |
bioduds | sorry? | ||
not following you tbrowder | |||
DrForr | tbrowder: He's talking to someone else. | ||
bioduds | oh, sorry | 12:00 | |
tbrowder | sorry, question was for jnthn | ||
12:00
smls_ is now known as smls
|
|||
bioduds | any ideas how should i proceed? | 12:00 | |
jnthn | tbrowder: Um...I don't think I did, are you confusing me with then other Jonathan? :) | ||
(Who goes as RabidGravy here :)) | 12:01 | ||
DrForr | bioduds: Yes, put your full install log somewhere that we can see it. | ||
tbrowder | probably, sorry! | ||
jnthn | :) | ||
DrForr | bioduds: Otherwise we're going to have to guess at what's going on, and that takes more time and patience than most of us have. | ||
jnthn | You wouldn't be the first one ;) | ||
bioduds | ok | ||
12:01
pierre_ joined
|
|||
bioduds | i installed build-essential git | 12:02 | |
can you tell exactly how to put log on? | |||
please | |||
im doing rakudobrew build moar | 12:03 | ||
El_Che | bioduds: paste.ubuntu.com/ <-- copy the code there, paste the url here | ||
by code I mean error | |||
DrForr | bioduds: Go to the site El_Che mentioned, paste the log there, share the link with us here. | ||
That way we can see what failed and can try to help. | |||
bioduds | doing it | 12:04 | |
12:05
eliasr joined
|
|||
bioduds | posted | 12:06 | |
paste.ubuntu.com/23107097/ | |||
tbrowder | ref META6 test: i did find the reference right where it should be expected: Jonathan Stowe has the reference to S22 toward the end of the README--i just hadn't read far enough: "RTFM, tbrowder!" | 12:08 | |
12:08
SpaceMario joined
|
|||
moritz | bioduds: looks like too little RAM. How much do you have available? | 12:08 | |
SpaceMario | m: gist.github.com/zoffixznet/dc09594...29756bb11c | ||
camelia | rakudo-moar f2df2c: OUTPUT«False» | ||
bioduds | not much | ||
DrForr | Stage parse : MVM_platform_alloc_pages failed: 12 # I'm guessing you're RAM-limited. | ||
bioduds | its a free tier in amazon | ||
SpaceMario | Are <ws> tokens not available for use in regular regexes? | ||
bioduds | and same error occurred in digital ocean minimal vps slice | 12:09 | |
moritz | bioduds: you need a bit more than 1GB | ||
maybe 1.5 | |||
bioduds | but my local machine is much better and worked | ||
SpaceMario | I'd say like 2 | ||
bioduds: get more swap. I successfully built on 1GB boxes with tons of swap | 12:10 | ||
moritz | m: say so 'a b' ~~ /a <ws> b/ | ||
camelia | rakudo-moar f2df2c: OUTPUT«True» | ||
moritz | SpaceMario: ^^ seems to work | ||
bioduds | im not sure i can manage swap in vps | ||
SpaceMario | moritz: Hm, I wonder why my gist fails. I seem to have all the right bits in place gist.github.com/zoffixznet/dc09594...29756bb11c | ||
moritz | bioduds: or build on your local machine, and copy over the resulting files (but you need the same paths) | ||
nine | DrForr: PLEASE stop recommending rakudobrew to normal users. There's probably only 5 people in rakudobrew's actual target audience and I don't think any one of us is actually using it. | 12:11 | |
DrForr | Okay, done, over with. | 12:12 | |
smls | nine: Explain? | ||
I'm using rakudobrew and have recommended it to some people. | |||
SpaceMario | m: gist.github.com/zoffixznet/1e0f8db...1072d98f6a | ||
camelia | rakudo-moar f2df2c: OUTPUT«True» | ||
DrForr | Then you get the privilege of being chided as well :) | 12:13 | |
SpaceMario | (was doing .lc on input, but regex still had uppercase letters) | ||
bioduds | so, just for me to know, I need at least 2 Gb Ram to safely install perl6? | ||
nine | smls: rakudobrew is for when people need to manage _multiple_ different rakudo installations on the same machine. It's not a good way to safe a user from typing in 3 commands on the shell. It causes much more problems than it solves. | ||
DrForr | Or 1GB and sufficient swap, as somene else says. | 12:14 | |
SpaceMario | bioduds: to build it, yeah, somewhere around that. And not RAM but memory, so swap will do in a pinch. | ||
bioduds | ok | ||
nine | smls: there have been lots and lots of reports of issues with module installation reported here and I actually stop reading once I see rakudobrew mentioned. | ||
bioduds | got it | ||
DrForr | Note to self: remove from slides :) | 12:15 | |
smls | nine: Interesting. Why would modules care where $PATH and stuff is set to? | ||
12:15
buggable left
|
|||
SpaceMario uses rakudobrew | 12:16 | ||
nine | smls: the problems usually come from having a mix of outdated and current rakudoversions installed and are undebuggable as rakudobrew users usually don't even know where the stuff gets installed to | ||
12:16
buggable joined
|
|||
SpaceMario | I just nuke everything when I upgrade :P | 12:16 | |
12:16
MilkmanDan joined
|
|||
smls | OK, so what is the best alternative for normal users? (Assuming their distro doesn't have a Rakudo package, or only an ancient one.) | 12:16 | |
nine | SpaceMario: exactly! That's completely unnecessary. Perl 6 is designed so you never have to re-install modules when upgrading Perl 6. | ||
SpaceMario | :) | 12:17 | |
12:17
SpaceMario left
|
|||
nine | git clone [email@hidden.address] && cd rakudo && perl Configure.pl --gen-moar --make-install | 12:18 | |
smls | ok | ||
nine | That ^^^ is all you need to do to install rakudo. Put that in a script, put that onto perl6.org and point people at curl rakudo.org/install-script | curl | ||
| bash of course | 12:19 | ||
12:19
Juerd joined
|
|||
nine | Upgrading that is just git pull && bash config.status && make install | 12:19 | |
bioduds | yep, or better yet install.rakudo.org | 12:20 | |
DrForr | bioduds: ^^^ There you go, first contribution! | ||
bioduds | im happy with that :) | ||
I learned to program in Perl! | |||
In 2006 | |||
you dont see many 'I began in Perl' guys out there and let me tell you one thing. It made me look at programming languages veeeery differently as I went out learning c, c++, java and stuff | 12:22 | ||
and this is the reason Im very excited with Perl6 | |||
MasterDuke | i have a perl6 directory in my home, i clone moar, nqp, and rakudo into there and then point them all at the same --prefix | ||
it works well for testing changes to those three individual components | 12:23 | ||
but having to clone a ton of modules and run everything with a giant -I list is kind of annoying | |||
12:23
buggable left
|
|||
MasterDuke | but when i first used panda several months ago it didn't work very well (and i apologize, but i don't remember why) | 12:24 | |
12:24
buggable joined
|
|||
nine | MasterDuke: if panda or zef give you trouble, please report that. Also until that is solved, you can install the cloned modules by: cd whatever-module ; perl6 ~/rakudo/tools/install-dist.pl . | 12:25 | |
MasterDuke | nine: ah ha! i had no idea about install-dist.pl | 12:26 | |
12:29
mcmillhj joined
|
|||
nine | It is fairly unknown. But I do have plans to rename it to raccoon and have it installed alongside perl6 | 12:33 | |
12:34
mcmillhj left
|
|||
RabidGravy | boo! | 12:34 | |
12:39
rindolf left
|
|||
Woodi | is there some way to clone module code and install it "manually", without panda or zef ? | 12:41 | |
nine | Woodi: what I just told MasterDuke? | ||
Woodi | nine: oops, -dist part hijacked my understanding of that :) thanx | 12:43 | |
RabidGravy | nine, +1 on actually installing it, have no feelings about the name | 12:46 | |
there should be a caveat with the above that if the module in question requires some build action (such as compiling so helper library,) it probably won't work | 12:47 | ||
El_Che | nine: I am kind of surprised. I get that rakudobrew does too much. But the only alternative according to the doc (rakudo.org/how-to-get-rakudo/#Insta...g-Rakudo). Isn't rakudo a better solution than directly compiling the src for a regular use (who will install systemwide and won't be able to clean it up afterwards)? | 12:49 | |
nine | RabidGravy: I actually hope we are gonna make some progress on the build front soon. I do want raccoon to be able to execute build steps. Primary use case being creating distro packages for Perl 6 modules. | 12:52 | |
RabidGravy | totally up for that :) | 12:53 | |
nine | El_Che: the steps listed as manual installation will _not_ install rakudo system wide. It will install into rakudo/install which can be removed easily. | 12:54 | |
El_Che: that's even easier than some hidden .rakudobrew directory. | |||
12:56
Averna joined
12:57
nadim joined
|
|||
nadim | hi, quick question, eqv is still not implemented for matches, right? | 13:01 | |
13:02
bjz_ joined,
bjz left
13:06
rmmm left
13:08
mcmillhj joined
13:14
cdg joined
13:17
rmmm joined
|
|||
Woodi | possibly it's problem with current *nix practicess of sharp distinction between system wide and ~user private only... | 13:20 | |
timotimo | Woodi: yeah, we should teach our platforms (like rakudo or v8 or python) to look into every user's home directories for libraries when they aren'n in the system's repository | 13:21 | |
"huh, today 'import sys' generated 95 terabyte of traffic over samba and nfs shares." | |||
i meant to say 'import syss' | 13:22 | ||
typos are hard when you're trying to make them intentonially | |||
Woodi | timotimo: :) i will write some story when system update will finish :) | 13:23 | |
[Coke] wonders how quickly irclog adds sends to its own search index. | 13:27 | ||
13:27
zakharyas joined
|
|||
[Coke] | stmuk_: you end with $COLON because you're also avoiding having a literal : in a file on disk, which isn't pleasant on some platforms (and we support people running the app out of a checkout) | 13:29 | |
[Coke] is sure there's a prettier way to solve this eventually, but this works. | |||
13:31
wamba joined,
MilkmanDan left,
ufobat left
|
|||
[Coke] | nine: I'm using rakudobrew for my local development. | 13:33 | |
if we're not supposed to be recommending it, why do we even have it? | |||
13:33
MilkmanDan joined
|
|||
[Coke] | .... and I caught up, seeing nine's objections later in backlog. | 13:33 | |
I don't think recommending "install from source" is a better option for most users. | 13:34 | ||
13:34
mr-foobar joined,
bjz_ left
|
|||
nine | [Coke]: the best option would probably we a small script that does pretty much those manual steps. | 13:34 | |
[Coke]: btw. even tadzik said that rakudobrew was actually more for developers :) | 13:35 | ||
mst | [Coke]: rakudobrew is for developers, just like using perlbrew isn't something you should ever suggest to newbies | ||
[Coke] | I respectfully disagree with him, building from source is for developers. :) | ||
mst | [Coke]: that's ... not the point | ||
13:35
domidumont left
|
|||
mst | the point is rakudobrew has lots of extra moving parts designed to accommodate multiple rakduo installs | 13:36 | |
[Coke] | in my mind, it would be (devs) -> source -> rakudobrew -> R * (non devs) | ||
mst | and also is rather inflexible and weird | ||
similar to perlbrew | |||
whereas if you just want *A* perl, then you use perl-build | |||
what we need basically is a rakudo-build equivalent | |||
[Coke] | As a user of perl 5, I use perlbrew all the time. YMMV. | ||
13:36
nebuchadnezzar left
|
|||
mst | if you're develop[ing against multiple perl5 installs it's useful | 13:36 | |
13:37
nebuchadnezzar joined,
pmurias joined
|
|||
mst | for newbies, it's a bunch of complicated fragile stuff they won't understand | 13:37 | |
[Coke] has never heard of perl-build, and a google search is not enlightening. | |||
mst | p3rl.org/Perl::Build | ||
13:37
domidumont joined
|
|||
mst | honestly, once I get Alien::Rakudo shipped I would argue that that's the simplest installer for newbies we have available currently | 13:38 | |
[Coke] | mst: that page doesn't really help explain what that is to someone who doesn't know, btw. | ||
mst | though, equally, I might consider obsoleting myself again later | ||
[Coke] | but I trust your collective judgement, that'sf ine. | ||
pmurias | for perl5 programmars 'cpanm Alien::Rakudo' seems like the easiest option | ||
mst | right, *if* you already have cpanm+local::lib I think it's a no-brainer | 13:39 | |
if you don't, well, I'll see about providing something for that case as well later | 13:40 | ||
pmurias | works for cpanm+perlbrew too ;) | ||
mst | I am still a little bit smug about how short twitter.com/shadowcat_mst/status/7...2365946883 is | 13:41 | |
MasterDuke | arch linux has a relatively recent rakudo in the AUR, but the rakudo available to apt in kubuntu 16.04 is 2015.11 | 13:43 | |
13:43
Sgeo left
|
|||
tadzik | nine, [Coke]: well, I am to blame for advertising it as an easiest way to install rakudo at some point :3 | 13:44 | |
(because it is/was) | 13:45 | ||
pmurias | mst: in addition to having Alien::Rakudo it would also be nice to have something that installs zef/panda | ||
mst | yes. but I'm unhappy with Alien::Rakudo::Inline::Perl5 currently | ||
nine | tadzik: it may as well still be the easiest way to get up and running. But unfortunately also an easy way to run into trouble later on. | 13:46 | |
mst | tadzik: it was. and I am both very glad you wrote it, and very glad I've now got something else I can use | 13:47 | |
pmurias | mst: what's wrong with it? | 13:48 | |
mst | 14:36 < mst> the point is rakudobrew has lots of extra moving parts designed to accommodate multiple rakduo installs | ||
14:37 < mst> for newbies, it's a bunch of complicated fragile stuff they won't understand | |||
I mean, I was never able to entirely work out what rakduobrew was *doing* | 13:49 | ||
eventually I straced the fucker and grepped for exec() calls | |||
but it's hardly the most transparent of systems | |||
as a result of which, that nine said | |||
*what | |||
timotimo | what's wrong with Alien::Rakudo::Inline::Perl5 except the long name? | ||
mst | it doesn't write a .packlist correctly yet because there's no way to get file lists out of the CUR, and I'm not sure there necessarily should be, so I'm not sure how I want to implement that | 13:50 | |
nine | mst: is there anything in the target CUR besides Inline::Perl5? | ||
13:51
Matthew[m] left,
M-Illandan left,
tadzik left,
ilmari[m] left
|
|||
mst | nine: currently, yes, it has to install into the Alien::Rakudo site CUR so that Inline::Perl6 finds it | 13:51 | |
I'm tempted to give it its own CUR instead and tweak Inline::Perl6 to know to look for it | |||
but basically then we're looking at "how does one handle module installation for Alien::Rakudo in general" | 13:52 | ||
and that's a bit more complicated | |||
ugexe | which files do you want to get from CUR? I'm pretty sure they should all be available in the meta | ||
mst | ok, so, during ::EU nine and I looked at it and it wasn't immediately obvious to me how to convert that to a .packlist | 13:53 | |
nine | The way baking rpm packages will work is: install-dist.pl --to /tmp/some_empty_temporary_build_directory --for vendor /path/to/module | ||
mst | also really I don't just want to do that | ||
I want to stage via blib/ | |||
nine | The files in /tmp/some_empty_temporary_build_directory can then be packaged and extracted over / on installation | 13:54 | |
13:54
g4 left
|
|||
mst | nine: ah, and --to is your snowflake name for DESTDIR? | 13:54 | |
nine | yes | ||
Because of course it was amateur hour :) | 13:55 | ||
13:55
tadzik joined
|
|||
tadzik | nine: yeah, true | 13:55 | |
nine | --for vendor or --for site is so the paths in the precomp files will be relative to those repositories. | ||
13:56
brrt joined
|
|||
mst | nine++ # bahahahahahaha | 13:56 | |
14:06
r_i_d joined
14:07
ilmari[m] joined
14:09
Averna left
14:10
telex left
14:12
telex joined
14:13
zakharyas left
|
|||
r_i_d | when writing a test, how do I include the file to be tested? | 14:13 | |
dalek | ateverable: b919be5 | MasterDuke17++ | Bisectable.p6: Convert Bisectable to use get-short-commit |
14:14 | |
ugexe | use lib 'lib'; but really you should be passing it via the command line: `prove -e 'perl6 -Ilib' t/` (the -Ilib) | ||
14:15
zakharyas joined
|
|||
r_i_d | when using 'lib', do I use the whole filename like "../filename.pm6"? | 14:16 | |
ugexe | if you have a module "Foo::Bar" in lib, then: `use lib 'lib'; use Foo::Bar;` | 14:17 | |
moritz | r_i_d: use lib is for directories containing modules, not for file names | ||
r_i_d | oh, okay, i don't have my module set up right. | 14:18 | |
ugexe | you can map the module name to file name differently in your META6.json `provides` field but its generally a good idea to follow the s{::}{/} naming convention | ||
r_i_d | how would i do it if I had in my project directory "filename.pm6" and "t/test-filename.t"? | 14:19 | |
timotimo | if filename.pm6 is supposed to be an executable script, it'd go into bin/ and most of its code into lib/App/YourMagicalApp.pm | 14:20 | |
ugexe | if your shell is in the project root: -I. otherwise `use lib <..>` | ||
timotimo | then the whole thing would be called App::YourMagicalApp | ||
14:21
skids joined
|
|||
timotimo | when panda, zef, and friends install your lib, they'll have the "lib/" folder set up appropriately for modules in it to be found with just "use TheModuleName" | 14:21 | |
ugexe | ~/my_project $ prove -v -e 'perl6 -I.' t/test-filename.t | ||
14:22
pmurias left
|
|||
timotimo | in general, though, it's quite uncommon to have scripts or modules in the root directory of a project | 14:22 | |
r_i_d | yeah, that makes sense. If i have "bin/filename.pm6" and "t/test-filename.t", how do I install it using panda? | 14:23 | |
14:23
domidumont left
|
|||
ugexe | Build.pm | 14:23 | |
14:23
pmurias joined
|
|||
ugexe | pm6 is a perl module extension, it probably doesn't belong in bin/ | 14:24 | |
moritz | uhm, adding them to the META6 file should be enough, no? | ||
ugexe | r_i_d: just look at other perl6 modules to get a feel for the boilerplate/layout | 14:27 | |
tbrowder | i'm still experimenting but i'm not sure the META6 file can handle a complex installation. Does the presence of a Build.pm override the META6? | 14:28 | |
ugexe | no | ||
nine | @all: please push people into putting their modules into a lib/ dir more strongly. Otherwise they will run into problems, e.g. when trying %?RESOURCES | 14:29 | |
14:30
jonas2 left,
benchable6 left,
domidumont joined
|
|||
timotimo | ugexe: um, are you sure Build.pm6 is needed for that at all? | 14:31 | |
ugexe | timotimo: is needed for what? | 14:32 | |
14:32
benchable6 joined
|
|||
timotimo | ugexe: having a bin/filename.pm6 | 14:33 | |
literal | avar: perl6 -e 'exit +!(:16(@*ARGS[0]) %% 10)' $(hostname|md5sum) | ||
ugexe | no, i was pointing out Build.pm is a module that is typically found in the project root | 14:34 | |
timotimo | oh | ||
OK, that's fair. i wouldn't expect it to be installed along with my module, though | |||
that's potentially far beside the point | |||
ugexe | it doesnt get installed | ||
timotimo | of course not :) | ||
so is the rule "modules directly inside the project root don't get installed"? | 14:35 | ||
ugexe | its more like only files inside bin/ get automatically installed. everything else must be declared explicitly in the META6 | ||
14:35
mcmillhj left
|
|||
ugexe | so technically you could install modules from the root | 14:36 | |
"provides" : { "Build" : "Build.pm" } | |||
timotimo | huh. for some reason i have completely forgotten about the existence of provides | ||
clearly, you shouldn't come to me for thoughts/advice on modules at all | 14:37 | ||
14:37
benchable6 left
|
|||
ugexe | but really `Build.pm` needs to be replaced with something more sane | 14:38 | |
nine | oh yes, please! | 14:39 | |
harmil | Sometimes it's impossible for me to express how much I love working in this language. From my recent sequences commit (Pascal's Triangle): "𝕀.triangle.map: -> ($n,$k) { $n choose $k }" | ||
14:39
mcmillhj joined,
ufobat joined
|
|||
timotimo | ugexe: a set of common functionalities as directives for the meta6.json? | 14:39 | |
nine | ugexe: I thought about just starting by giving raccoon everything it needs to build Inline::Perl5 | ||
driven by META6.json of course | |||
ugexe | well Inline::Perl5 has dependencies, so that requires finding all that stuff as well | 14:40 | |
14:40
acrussell joined
14:41
committable6 left
|
|||
mst | does it? | 14:41 | |
Inline::Perl5 was the only thing I had to add to a vanilla rakudo | |||
to have sstuff work | |||
nine | ugexe: I made them optional last week to simplify mst's life a bit | ||
mst | ah | ||
ugexe | the META.info still lists them as deps | 14:42 | |
nine | LibraryMake didn't help all that much anyway and File::Temp was only used in tests. | ||
ugexe | timotimo: essentially. or hooks design.perl6.org/S22.html#hooks | ||
nine | ugexe: Build.pm still uses LibraryMake and having File::Temp for tests is nice, too. And panda and zef have no problem installing it. | 14:43 | |
14:43
committable6 joined,
benchable6 joined
|
|||
nine | ugexe: installation via perl6 configure.pl6 && make && make install works without any dependencies | 14:43 | |
14:45
khw joined
|
|||
ugexe | nine: why not have the Build.pm just be `class Build { method build($dir) { run "perl6", "configure.pl6", :cwd($dir); } }` | 14:45 | |
nine | That.....is quite clever | 14:46 | |
14:48
mcmillhj left
|
|||
r_i_d | where are modules stored so I can look at the layout for comparison? | 14:50 | |
14:50
rindolf joined
14:51
n1lp7r joined,
kaare_ left
|
|||
harmil | r_i_d: That depends on how you installed Perl 6. If you used rakudobrew, then they're in your ~/.rakudobrew if you used Star, then they're under Star's prefix. If you used a Windows installer, then there's going to be a c:\rakudo I think | 14:54 | |
r_i_d | I used rakudobrew under ARM linux -- should I put my modules with the rest? | ||
tbrowder | ugexe: ref zef: for option '--verbose' how does one get a message in Build.pm visible to the user? | ||
ugexe | tbrowder: set `ZEF_BUILDPM_DEBUG=1` | 14:56 | |
mst | ugexe: amusingly, I *almost* ended up making Alien::Rakudo::Inline::Perl5's Makefile.PL that ;) | 14:57 | |
harmil | r_i_d: If you're writing a module, see docs.perl6.org/language/modules#Di...ng_Modules Once you've written your META6.json, you should be able to just "panda install ." | ||
14:58
cdg left
|
|||
r_i_d | ah, I have to WRITE a META6, got it. | 14:58 | |
15:00
notbenh left
|
|||
melezhik | Hi! Anybody could help me with '~' in perl6 regexps? | 15:01 | |
let's I have perl6 -e "say 'OK jjj OK' ~~ /OK ~ OK [ jjj ]/;" | 15:02 | ||
it says Nil | |||
15:02
notbenh joined
|
|||
melezhik | I could not find an proper explanation of ~ in perl6 regexp, but probably ( I might be wrong ) it is something for looking inside some sub area ? | 15:03 | |
15:03
zakharyas left
|
|||
melezhik | delimited by some regexps ( in my trivial case this is OK ... OK ) | 15:04 | |
ugexe | mst: you can also execute the Build.pm itself ala `perl6 -Ilib -I. -e '::("Build").new.build($*CWD.absolute);'` (this is how zef executes the Build process) | ||
er add a -MBuild after -I. | |||
15:04
Ven joined
|
|||
mst | aha | 15:04 | |
mst was about to ask | |||
Ven | o/ | 15:05 | |
15:05
mcmillhj joined
|
|||
melezhik | another example for this construction is github.com/moritz/json/blob/master...mar.pm#L26 | 15:06 | |
I understand this, and how this work but can't use the same thing at my regexps constructions | 15:07 | ||
tbrowder | ugexe: that doesn't work for me; the question is, what print-type statements inside Build.pm will show on stderr or stdout when using option --verbose? so far i can see say msgs with --debug but then i also get extra msgs from zef, verbose seems to do nothing | ||
15:10
MasterDuke left
|
|||
ugexe | ZEF_BUILDPM_DEBUG=1 will pass the stdout and stderr outwards to zef. zef filters messages based on --verbose/--debug etc | 15:11 | |
15:12
n1lp7r left
|
|||
pmurias | Ven: \o | 15:13 | |
15:13
kaare_ joined
|
|||
ugexe | if you are just testing your build then use `ZEF_BUILDPM_DEBUG=1 zef -v build .`. This will also output the exact command used to execute the Build.pm so you can do it without zef | 15:14 | |
15:15
M-Illandan joined,
Matthew[m] joined
15:19
kurahaupo joined
15:21
zacts left
|
|||
Ven | awww.. do we not have a grep-not of sorts? mmh | 15:21 | |
[Coke] | melezhik: you're looking for "OK" delimited by "jjj"? | 15:22 | |
melezhik | no, jjjj b/w 'OK' delimiters | 15:23 | |
[Coke] | I think you want the %% operator | 15:24 | |
not sure where you got ~ | |||
Ven | well, ~ is useful for this kind of things as well | 15:25 | |
melezhik | ok , please take a look at github.com/moritz/json/blob/master...mmar.pm#L5 or github.com/moritz/json/blob/master...mar.pm#L26 | 15:26 | |
I know that this one works. It validates something inside '[' .. ']' or something inside '"' | 15:27 | ||
now I want to have the similar regexps working on my code but I can't | 15:28 | ||
as far as I guess ( I might be wrong ) a construction kinda foo ~ bar is for looking something between foo and bar | |||
moritz | melezhik: note that ~ doesn't work too well with backtracking | 15:29 | |
melezhik | but I can reuse this approach at my regexps | ||
mortiz: I don't need a backtracking at least now ... | |||
moritz | melezhik: so, give a small example of what's not working for you? | 15:30 | |
melezhik | sure, just a second | ||
for example this one works fine "say '{ OK 9 OK }' ~~ /OK+ % \d /;" | |||
「OK」 | 15:31 | ||
and I want to changes this | |||
[Coke] | melezhik: btw: | ||
m: say '{ OK 9 OK }' ~~ /OK+ % \d / | |||
camelia | rakudo-moar f2df2c: OUTPUT«「OK」» | ||
melezhik | to this one - say '{ OK 9 OK }' ~~ /'{' ~'}' [ OK+ % \d ]/ | ||
and have - Nil | 15:32 | ||
not sure that this chunk - [ OK+ % \d ] is correct | |||
moritz | melezhik: nothing matches the whitespace in there | ||
melezhik: you also see that "OK 9 OK" ~~ /OK+ % \d/ matches only one OK, not the whole string | 15:33 | ||
m: say "OK 9 OK" ~~ /:s OK+ % \d/ | |||
camelia | rakudo-moar f2df2c: OUTPUT«「OK 」» | ||
moritz | m: say "OK 9 OK" ~~ /:s OK + % \d/ | ||
camelia | rakudo-moar f2df2c: OUTPUT«「OK 」» | ||
moritz | m: say "OK 9 OK" ~~ /:s OK + % \d / | ||
camelia | rakudo-moar f2df2c: OUTPUT«「OK 」» | ||
moritz | grml | ||
melezhik | this one "say '{OK9OK}' ~~ /'{' ~'}' [ OK+ % \d ]/;" | ||
still return Nil | |||
moritz | ok | ||
oh | |||
smls | 'OK' + | ||
moritz | OK | ||
right | |||
what smls said | 15:34 | ||
OK+ matches OK, OKK, OKKK etc. | |||
melezhik | sure I know | ||
moritz | m: say "OK 9 OK" ~~ /:s 'OK' + % \d / | ||
camelia | rakudo-moar f2df2c: OUTPUT«「OK 9 OK」» | ||
moritz | m: say '{ OK 9 OK }' ~~ /:s '{ 'OK' + % \d / | ||
camelia | rakudo-moar f2df2c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unable to parse expression in single quotes; couldn't find final "'" at <tmp>:1------> 3ay '{ OK 9 OK }' ~~ /:s '{ 'OK' + % \d /7⏏5<EOL> expecting any of: single quotes» | ||
moritz | m: say '{ OK 9 OK }' ~~ /:s '{' 'OK' + % \d / | ||
camelia | rakudo-moar f2df2c: OUTPUT«「{ OK 9 OK 」» | ||
moritz | m: say '{ OK 9 OK }' ~~ /:s '{' ~ '}' [ 'OK' + % \d ] / | ||
camelia | rakudo-moar f2df2c: OUTPUT«「{ OK 9 OK }」» | ||
moritz | ... and it works if you do it right :-) | 15:35 | |
m: say '{ OK 9 OK }' ~~ /:s '{' ~ '}' 'OK' + % \d / | |||
camelia | rakudo-moar f2df2c: OUTPUT«「{ OK 9 OK }」» | ||
moritz | the brackets aren't necessary, it seems | ||
15:35
n1lp7r joined
|
|||
avuserow | m: class Foo {has Int $.bar is rw;}; my $f = Foo.new(:bar(1)); say $f; $f.^attributes(:local).first(*.name eq q{$!bar})[0].set_value($f, 2); say $f; $f.bar = 3; # Anyone know why `bar` has become immutable here? | 15:36 | |
camelia | rakudo-moar f2df2c: OUTPUT«Foo.new(bar => 1)Foo.new(bar => 2)Cannot modify an immutable Int in block <unit> at <tmp> line 1» | ||
15:36
kaare_ left
|
|||
jnthn | Because set_value binds rather than assigns, I'd guess | 15:36 | |
moritz | avuserow: because set_value binds | ||
melezhik | yes, but this one still return Nil - say '{ OK 9 OK }' ~~ /:s '{' ~ '}' [ OK + % \d ] / | 15:37 | |
jnthn | Do get_value and assign to the returned container | ||
moritz | avuserow: try .set_value($f, (my $ = 2)) | ||
melezhik | if I have OK without quotes | ||
moritz | melezhik: that's the problem with OK+ again | ||
melezhik | strange | ||
moritz | melezhik: that matches OK, OKK, OKKK etc. | ||
melezhik: the + only applies to the last token, which is the K | |||
(so here, it matches OK, OK 9 K, OK 9 K 5 K etc.) | 15:38 | ||
you can observe this by matching without the ~ part | |||
avuserow | moritz, thanks, that works. | ||
moritz | m: say say '{ OK 9 OK }' ~~ /:s [ OK + % \d ] / | ||
camelia | rakudo-moar f2df2c: OUTPUT«「OK 」True» | ||
melezhik | yes, but can't still understand why + prevent in succeed , this one is at least one K which is true ... | ||
15:38
gfldex joined
15:39
shicheng joined
|
|||
Ven | moritz: what do you say say?:) | 15:39 | |
moritz | it doesn't match the whole string inside the curlies | ||
15:39
Zoffix3 joined
|
|||
moritz | Ven: whatever I want, in every way way! | 15:39 | |
Zoffix3 | Are goroutines like perl 6 promises? I'm preparing a talk and wanna know what to answer if someone asks... | 15:40 | |
15:40
shicheng left
|
|||
gfldex | Zoffix3: no, there are more like processes in erlang (IIRC) | 15:40 | |
melezhik | mortiz: thanks for help, need to rethink all of this ))) | 15:41 | |
Zoffix3 | hm /me doesn't know earlang. | ||
gfldex | you don't know go either, so it's all good :-> | ||
moritz | Zoffix3, gfldex: I think they share some similiarities; they are both threads managed by a thread pool | 15:42 | |
Zoffix3 | Well, I'm reading about them and I see they're concurrent and not parallel, but if you increase GOMAXPROCS then they will use more cores and so I see the difference blur between P6 promises | ||
gfldex | m: enum Collision(<Str Int>); my %c{Collision}; %c{Str}++; dd %c; my Str $s; | 15:43 | |
camelia | rakudo-moar f2df2c: OUTPUT«===SORRY!===This type cannot box a native string: P6opaque, Collision» | ||
gfldex | should that ^^^ work or is it just LTA? | ||
moritz | gfldex: this roughly the same as | 15:44 | |
m: my class Str { }; say "foo" | |||
camelia | rakudo-moar f2df2c: OUTPUT«===SORRY!===This type cannot box a native string: P6opaque, Str» | ||
15:45
elohmrow joined
|
|||
moritz | LTA, well-known, and kinda "shoot your own foot" | 15:45 | |
Zoffix3 | Is it? The hash is typed, so it shouldn't be stringifying things. | ||
m: enum Collision(<Str Int>); my %c{Collision}; %c{Str}++; | |||
camelia | ( no output ) | ||
dj_goku is currently learning elixir at work. | |||
Zoffix3 | Ah, nevemind | ||
moritz | Zoffix3: the enum Collision locally overrides the Int and Str types | ||
gfldex | m: enum Collision(<Collision::Str Collision::Int>); my %c{Collision}; dd %c; | 15:46 | |
camelia | rakudo-moar f2df2c: OUTPUT«Hash[Any,Collision] %c = (my Any %{Collision} = )» | ||
gfldex | m: enum Collision(<Collision::Str Collision::Int>); my %c{Collision}; dd %c.enums.keys; | ||
camelia | rakudo-moar f2df2c: OUTPUT«Method 'enums' not found for invocant of class 'Hash[Any,Collision]' in block <unit> at <tmp> line 1» | ||
moritz | so the compiler tries to look them up to box stuff into, and gets something that cannot (un)box | ||
gfldex | m: enum Collision(<Collision::Str Collision::Int>); my %c{Collision}; dd %c.keyof.enums.keys; | ||
camelia | rakudo-moar f2df2c: OUTPUT«("Collision::Str", "Collision::Int").Seq» | ||
gfldex | m: enum Collision(<Collision::Str Collision::Int>); my %c{Collision}; %c{Collision::Str}++; dd %c; | ||
camelia | rakudo-moar f2df2c: OUTPUT«Could not find symbol '&Str' in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
gfldex | should quallified enum keys work? | ||
moritz | uhm, not really :-) | 15:47 | |
tbrowder | ugexe: here is a simple Build.pm file: | 15:48 | |
elohmrow | The README for rakudo-star-2016.07 says: "Please note that this release of Rakudo Star is not fully functional with the JVM backend from the Rakudo compiler. Please use the MoarVM backend only." <-- what is the most recent version I can rely on, if I super-really want to use the jvm backend, please? | 15:49 | |
tbrowder | www.irccloud.com/pastebin/7EHwoo17/Build.pm | ||
using that file, the only way a msg gets to the user is by using --debug. -verbose doesn't work. suggestions? | 15:50 | ||
Zoffix3 | elohmrow: 2016.08.1 but it's not really fully functional there either. | 15:51 | |
stmuk_ | elohmrow: that release probably does basically work in terms of simple code examples | ||
Zoffix3 | elohmrow: rakudo.org/downloads/rakudo/ | ||
15:51
kaare_ joined
|
|||
ugexe | 1: you dont need `use Panda::Builder` or `is Panda::Builder`. secondly i guess you could print to $*ERR | 15:51 | |
tbrowder | but what is the intent of the verbosity options then? | 15:52 | |
Zoffix3 | elohmrow: note that you can use our bot camelia with j trigger to run code on JVM: /msg camelia j: say 'hello' | ||
15:53
pierre_ left
|
|||
elohmrow | Zoffix3 stmuk_: perhaps I have an env problem then. I can build on Moar, but on JVM fails every time, on every machine I tried. | 15:53 | |
stmuk_ | I think I could only get it to work with OpenJDK 1.6 | ||
ugexe | Build.pm is not specced and will go away, so its output is not a major concern | 15:54 | |
15:54
obfusk left,
ufobat left
|
|||
stmuk_ | I successfully built a week or two back using that version from debian stable | 15:54 | |
15:54
obfusk joined
|
|||
ugexe | the verbosity flags are used in many other places | 15:54 | |
elohmrow | I have tried J7 and J8 on OSX 10.10.5 (2 different machines), CentOS 7, and Ubuntu 16.04 | ||
15:55
zacts joined
|
|||
stmuk_ | I couldn't get OpenJDK 1.7 (7) to work | 15:55 | |
Zoffix3 | elohmrow: what's the error output that you get? | ||
tbrowder | um, printing to $*ERR doesn't work, either. | 15:56 | |
elohmrow | Zoffix3: well, if i do get an error, it ends up being about lack of RAM, and an error file. so if i fix up the jvm opts to give lots-o-ram, then i get a blank error 2 with no output file | ||
dj_goku | Just at first glance a lot of the Perl6 concurrency stuff feels very similar in erlang/elixir. But I have very little knowledge of both. | ||
Zoffix3 | no idea | ||
dj_goku | Zoffix3: what kind of talk are you doing? | 15:57 | |
ugexe | dont count on Build.pm for delivering messages to the user | ||
Zoffix3 | dj_goku: it's a short lightning talk: "Perl 6: What Programming In The Future Is Like?" | ||
tbrowder | ugexe: then what will be the future, any ideas? the "run ..." thing you showed earlier? is that the way to go? or use the META6 hook attribute? | ||
Zoffix3 | dj_goku: where I convert a 7-line password hashing program that runs in 63 seconds, to one that runs in 3.1 seconds, to one that's just one line of code. | ||
ugexe | i dont know. long ago zef had a hook implementation that simply ran a script ala `hooks/$pre-or-post_$phase.pl6` | 15:58 | |
stmuk_ | elohmrow: I didn't see that with 1.7 .. I can't remember the errors I saw .. but it does work with 1.6 (or did a week or so ago when I tried it) | ||
dj_goku | Zoffix3: nice! any new modules coming out from the talk? | ||
ugexe | whatever the solution is should allow the user to run it directly | 15:59 | |
elohmrow | so, stmuk_: you got 08.1 or 07.1 working with java 6? what OS? <-- debian, you say? v? | ||
Zoffix3 | dj_goku: nope, it's all raw, core Perl 6. | ||
tbrowder | ugexe: thanks, i'll keep experimenting then | ||
dj_goku | Zoffix3: cool! | ||
16:00
cdg joined
|
|||
stmuk_ | elohmrow: I got a version close to 08.1 to work .. one sec I will see if I have more details | 16:00 | |
elohmrow | stmuk_: thanks! | 16:01 | |
dj_goku | Zoffix3: where is the lightning talk at? | ||
stmuk_ | elohmrow: I don't have access to the laptop :( but I'm sure it was OpenJDK 1.6 (6) | 16:02 | |
Zoffix3 | dj_goku: Toronto. There also should be a live online feed and (later) a YouTube vid: www.meetup.com/Toronto-Perl-Mongers...233588645/ | ||
dj_goku | cool. are you in toronto? | ||
Zoffix3 | Brampton, about a 40-minute drive from Toronto. | ||
dj_goku | ahh | 16:03 | |
elohmrow | stmuk_: no problem, you've been a big help with this info alone. do you recall roughly the debian version? | ||
16:03
eliasr left
16:04
Xliff_zzzzz left
16:08
bob777 left,
grondilu joined
|
|||
grondilu | hello #perl6 | 16:08 | |
stmuk_ | elohmrow: I think I was wrong and I used 1.7 (I recall I had to downgrade a version for it to work) | 16:10 | |
elohmrow: github.com/rakudo/rakudo/blob/nom/README.md | |||
elohmrow: the instructions there refer to JDK 1.7 and also have a possible fix for your out of memory error | |||
elohmrow | stmuk_: the memory error i'm not very concerned about, as i can make it go away by changing the -X options | 16:11 | |
stmuk_ | probably was openjdk-7-jdk:amd64 7u111-2.6.7-1~deb8u1 | 16:12 | |
I can confirm in a day or two | |||
16:12
Zoffix3 left,
zacts left
|
|||
elohmrow | stmuk_: but, i will admit i had not read that part of the README :( <-- i only read the Configure line and then ran make, make test. but then make install always died | 16:12 | |
stmuk_: armed with the info from your experience, i will try once more ... thanks again! | 16:13 | ||
stmuk_ | I'm not even sure I ran "make install" I probably ran some code "in place" | ||
also see | |||
irclog.perlgeek.de/perl6-dev/2016-...i_12688822 | |||
"rakudo-j compiles but installing fails due to a precomp related error" | 16:14 | ||
elohmrow | stmuk_: ^^ very useful - maybe an older version of rakudo is better then ... 2016.04 seems like the one before the ones i tried? | 16:17 | |
so i downgrade java to 7, fiddle with some X-opts through the code, and use a slightly older rakudo, might be the trick to getting something that works right now | 16:18 | ||
stmuk_ | elohmrow: I doubt that helps .. the JVM backend has had problems for a while | ||
16:20
Ven left
|
|||
stmuk_ | I mean I don't know if older versions are better .. the rest of your plan is sound | 16:20 | |
16:20
domidumont left
|
|||
elohmrow | stmuk_: yeah, and yest i already tried for ex: install/bin/nqp-j <-- mucking around in there for memory stuff. but then i get sad --> note slides 16-19, and thene specially 20, here: www.slideshare.net/tokuhirom/perl6-meets-jvm <-- seems to have a very different experience than i have ;) | 16:25 | |
geekosaur | mostly you're trading off different bugs; the jvm backend has never been stable | ||
elohmrow | slide 20 is a vicious, vicious lie | ||
[Coke] | elohmrow: there is no fully functional JVM version. | 16:26 | |
not since (and including) the Christmas release in 2015.12 | 16:27 | ||
elohmrow | [Coke]: but can i at least install with ? | ||
i am all for using the version i used last year (august-ish) ... which is the last time i tried p6 :( | |||
i'm just trying to get it to work. nothing fancy yet | |||
[Coke] | elohmrow: you can install any version you want from source. | 16:28 | |
you'll have to experiment yourself to find the one that works for you, though. | |||
I would recommend using the latest version and opening tickets for any issues you find. | |||
but our release process doesn't test to make sure it even compiles on the JVM at this point. | 16:29 | ||
elohmrow | [Coke] only reason i had not done this yet is everywhere i looked, it seemed easy to do, so i began to suspect a deficiency between KAC | ||
stmuk_ | elohmrow: one of the probs is that the JVM version didn't fully survive a radical list refactoring (GLR) so even an old functioning version would be different to modern perl 6 | ||
[Coke] | KAC? | ||
elohmrow | kayboard and chair, sorry | ||
[Coke] | ah, PEBKAC. :) | ||
no, it's not you. It's us. :0 | |||
elohmrow | yeah, but i left out the peanut butter ;-P | ||
[Coke] | er, :) | ||
I will fire up a build right now and see how HEAD is doing. | 16:30 | ||
16:30
nadim_ joined
|
|||
elohmrow | ok well, this is all very good info. i will give one more good try, then i will give up for now. | 16:30 | |
16:31
nadim left
|
|||
[Coke] | ok. if you're will to be a canary, bug reports on what's not working make it easier to get it running again. | 16:31 | |
elohmrow | thanks again all, especially stmuk_ Zoffix3 [Coke] | ||
will do. i have pretty good notes on what i have tried, and on different machines. | |||
[Coke] | I can tell you that back when it was closer to working, it was missing most of the unicode work. pretty sure concurrency didn't land there. | 16:33 | |
elohmrow wanders off for a bit to try once more | 16:34 | ||
16:52
lizmat joined
17:00
mcmillhj left
17:03
mcmillhj joined
|
|||
tbrowder | ugexe: rooting around I see the zef client (the Build class in Build.pm I believe) is supposed to have a logger. can you, or anyone say how to use it? maybe that's the tie to verbosity | 17:06 | |
stmuk_ | Stage jast : 72.799 | 17:07 | |
17:08
mvorg left
|
|||
[Coke] | Stage jast : 45.793 | 17:14 | |
(having just got to the same spot.) | 17:15 | ||
stmuk_ | you will probably overtake! | 17:16 | |
[Coke] | make test has a lot of failures (mostly nativecall) | 17:21 | |
one or two non nativecall. | |||
REPL is busted. | |||
timotimo | uh oh :( | 17:22 | |
but that's just java? | |||
er, that came out wrong | |||
[Coke] | that's what I'm testing, yes. | ||
timotimo | only on the java backend, yes? | ||
[Coke] | m: / "asdfadsf" / ~~ 'asdf' | ||
camelia | rakudo-moar f2df2c: OUTPUT«Regex object coerced to string (please use .gist or .perl to do that) in block <unit> at <tmp> line 1» | ||
[Coke] | m: (/ "asdfadsf" / ~~ 'asdf').perl | ||
camelia | rakudo-moar f2df2c: OUTPUT«Regex object coerced to string (please use .gist or .perl to do that) in block <unit> at <tmp> line 1» | ||
[Coke] | hee | 17:23 | |
m: 'adsfasdf' ~~ / 'asdf' / | |||
camelia | ( no output ) | ||
[Coke] | so, jvm's issue there is that it can't give you the nice error message when you do something dumb. :) | ||
grondilu | a very basic example of NativeCall use with a typedef-ed structure: gist.github.com/grondilu/dc60a8f75...015505302a | ||
I thought it could be a useful example to add for instance in github.com/jnthn/zavolaj/tree/master/examples | 17:25 | ||
17:25
tomboy65 left
|
|||
timotimo | we still don't have an easy way to put an array of things with a given length in-line into a CStruct | 17:25 | |
grondilu | you mean that for instance with something like: struct vector_t { double coeff[3]; } ? | 17:27 | |
timotimo | yup | ||
grondilu | that's regrettable. | ||
timotimo | and we also don't yet have arrays of in-lined CStructs | ||
that's also qiute regrettable | |||
stmuk_ | make install does work on JVM so that's been fixed in the last 2 mon | 17:29 | |
grondilu | on the other hand, isn't that only a problem if we need to access the members of the CStruct from the Perl 6 code? Usually only the C code does it, it's often opaque to libraries. | ||
timotimo | hmm. | 17:30 | |
of course you can create an array of 8bit ints that's the right size | |||
stmuk_ | I get an impressive traceback trying to install panda | 17:36 | |
17:37
domidumont joined
17:38
webstrand left
|
|||
bartolin | fwiw, I'm still running my daily spectest for rakudo-j. apart from one failing test file (which runs fine standalone) there are no failures. (but there are quite some fudged tests) | 17:40 | |
github.com/usev6/perl6-roast-data/...ummary.out | |||
elohmrow | doesn't work for me yet, stmuk_: == Installing modules for JVM cd modules/panda && sh -c "PATH=/home/ghost/rakudo-star-2016.07/install/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games /home/ghost/rakudo-star-2016.07/install/bin/perl6-j bootstrap.pl" ^@==> Bootstrapping Panda ^@^@^@^@Cannot unbox a type object in result (gen/jvm/stage2/QAST.nqp) ... | 17:42 | |
bartolin | I've seen some strange failures recently (when all test files starting with integration/advent2014-something started to fail), but those seemed to be due to an OOM for the eval-server | ||
[Coke] | bartolin: are you not running 'make test' ? | ||
elohmrow | I did not this time, because it takes approximately as much time as the universe has existed | 17:43 | |
bartolin | [Coke]: no, I don't. I'm really only running the spectest to keep roast up to date wrt rakudo-j | ||
(in order to make it easier to start working on the JVM backend) | |||
elohmrow | stmuk_: <-- same-ish as what i pasted? | 17:44 | |
stmuk_ | elohmrow: yes I got "Cannot unbox.." too | ||
[Coke] | theoretically, 'make test' is more core than 'make spectest' | 17:45 | |
elohmrow | stmuk_: then i get at the end, in (gen/jvm/main.nqp) The spawned process exited unsuccessfully (exit code: 1) in sub MAIN at bootstrap.pl line 68 in block <unit> at bootstrap.pl line 9 Makefile:60: recipe for target 'modules-install-j' failed make: *** [modules-install-j] Error 1 | 17:46 | |
17:46
kurahaupo left
|
|||
elohmrow | at least it is consistent - i've gotten exactly this under java 7, 8 and 4 different machines on 3 OSs | 17:46 | |
harmil_wk | Is there a module of common mathematical constants in the works? I know we define a few globally, but there's a pretty big list including those at en.wikipedia.org/wiki/Mathematical..._constants that I could throw into a module... | 17:52 | |
17:53
pierre_ joined
17:55
Wiertek joined
17:58
pierre_ left,
MasterDuke joined
17:59
Piotr joined
18:03
Wiertek left,
MasterDuke left
18:05
Piotr left
|
|||
timotimo | s: Array, permutations | 18:05 | |
SourceBaby | timotimo, Something's wrong: ERR: Too few positionals passed; expected 1 argument but got 0 in block <unit> at -e line 6 | ||
timotimo | will i ever learn this? | 18:06 | |
s: Array, &permutations | |||
SourceBaby | timotimo, Something's wrong: ERR: Cannot resolve caller sourcery(Array, Sub); none of these signatures match: ($thing, Str:D $method, Capture $c) ($thing, Str:D $method) (&code) (&code, Capture $c) in block <unit> at -e line 6 | ||
timotimo | %) | ||
s: permutations | |||
SourceBaby | timotimo, Something's wrong: ERR: Too few positionals passed; expected 1 argument but got 0 in block <unit> at -e line 6 | ||
timotimo | s: &permutations | ||
SourceBaby | timotimo, Sauce is at github.com/rakudo/rakudo/blob/f2df...rs.pm#L663 | ||
[Coke] | bartolin++ running the java stuff. | 18:07 | |
18:08
cyphase left
|
|||
masak | today's autopun spotting (actually 2 of them): twitter.com/methode/status/768337146780475392 twitter.com/RuthanneReid/status/77...8764889092 | 18:09 | |
stmuk_ | zef errors with "===SORRY!=== Serialization Error: could not locate static code ref for closure" on JVM | 18:10 | |
ufo can be hacked up to work though :) | |||
18:13
cyphase joined,
n1lp7r left
|
|||
grondilu | a more elaborate example than above: paste.debian.net/794867/ | 18:14 | |
interestingly enough, we can actually just define C<class CStruct is repr('CStruct') {}> and use it for any opaque type defined as a pointer to a structure. | 18:15 | ||
(or rather as Pointer[CStruct]) | 18:16 | ||
timotimo | i find it a bit muddy to have CStruct be a pointer, but Pointer[CStruct] also .. or is that a pointe-to-pointer? | ||
grondilu | no CStruct is a struct, not a pointer to a struct. I may have expressed it poorly above. | 18:17 | |
timotimo | ah | 18:18 | |
grondilu | see lines 48 and 55 in above code. | ||
timotimo | the only difference it makes if you define the structure properly or not is when you .new it | ||
oh i didn't notice the link | |||
did you know about Inline::C? | |||
it'll automate the compiling step for you | |||
and you can then have the C code in-line in your perl6 code as sub bodies | 18:19 | ||
grondilu | I knew it existed, but is it really working? | ||
I mean that would look too good to be true. | |||
oh wait, I misunderstood. | |||
timotimo | it worked at one point | ||
haven't tested in a logn time | 18:20 | ||
grondilu | it creates the Perl 6 bindings? | ||
timotimo | my sub a_plus_b( Int $a, Int $b ) is inline('C') returns Int {' | 18:21 | |
DLLEXPORT int a_plus_b (int a, int b) { | |||
this is how you use it. that should explain everything, hopefully | |||
grondilu | I'm more interested in something that takes a header file and creates the Perl 6 bindings. | 18:22 | |
timotimo | that's gptrixie | ||
find it on modules.perl6.org and give it a shot | |||
18:23
CptnK joined
|
|||
CptnK | Is it possible from within sub EXPORT {} to get the file of where I'm exporting to? I'm tring to die() with a helpful error | 18:24 | |
And I've tried callframe().file with a bunch of values to callframe, but I can either get the file where the sub EXPORT is or Rakudo's guts... | |||
timotimo | right, the importation happens at compile time, so all you'll find on the stack is the compiler | 18:25 | |
CptnK | Ahh... ok | ||
elohmrow | stmuk_: correction - i did not pay enough attention. we do get a successful make install; what fails is the bootstrapping panda step. i may or not need panda right now. so i *do* have perl6 on jvm right now. oops. sorry for the false alarm. | 18:27 | |
18:28
setty1 joined
|
|||
stmuk_ | elohmrow: I guessed that! in short the JVM "mostly" works (with fudged tests) but not functional enough yet to install either panda or zef | 18:29 | |
elohmrow | exactly. | 18:30 | |
nine | $*W.current_file? | 18:33 | |
CptnK: ^^^ | |||
CptnK: note that I'm not sure if this is actually stable API | |||
timotimo | definitely not stable API | 18:35 | |
CptnK | nine++ hah, yeah it worked :) | ||
gfldex | m: class Str {}; say CORE::Str; | 18:36 | |
camelia | rakudo-moar f2df2c: OUTPUT«===SORRY!===This type cannot box a native string: P6opaque, Str» | ||
gfldex | m: class Str {}; print CORE::Str; | ||
camelia | rakudo-moar f2df2c: OUTPUT«===SORRY!===This type cannot box a native string: P6opaque, Str» | ||
gfldex | m: class Str {}; print SETTING::Str; | ||
camelia | rakudo-moar f2df2c: OUTPUT«===SORRY!===This type cannot box a native string: P6opaque, Str» | ||
elohmrow | stmuk_: and for completeness, same here for zef: ../rakudo-star-2016.07/perl6 -Ilib bin/zef install . ^@^@^@^@^@===SORRY!=== Serialization Error: could not locate static code ref for closure | 18:41 | |
so we are all in the same place, i guess ;) | 18:42 | ||
[Coke] | bartolin: don't need to add [MOARVM] to tickets. tagging the VM is fine. | 18:44 | |
bartolin | [Coke]: thanks, will (try to) remember :-) | 18:45 | |
18:45
Praise joined
|
|||
[Coke] | also, moarvm queue is mainly for stuff that is already identified as internal - anything that presents in the rakudo layer, it's fine to keep as an RT. | 18:46 | |
18:47
darutoko left,
cdg left
|
|||
grondilu discovered the `tabular` vim plugin. github.com/godlygeek/tabular Neat. | 18:50 | ||
18:52
TEttinger joined
|
|||
nine | nadim_: irclog.perlgeek.de/perl6-toolchain/...i_13112051 | 18:54 | |
CptnK | m: say $*SPEC.splitdir: 'foo\bar\ber'; | 19:00 | |
camelia | rakudo-moar f2df2c: OUTPUT«(foo\bar\ber)» | ||
CptnK | That kinda sucks | ||
19:01
CIAvash left
|
|||
timotimo | you can just use the spec that has \es | 19:01 | |
CptnK | timotimo: what do you mean? | ||
timotimo | m: say IO::Spec::Win32.splitdir: 'foo\bar\ber' | 19:02 | |
camelia | rakudo-moar f2df2c: OUTPUT«(foo bar ber)» | ||
timotimo | m: say IO::Spec::Win32.splitdir: 'C:\foo\bar\ber' | ||
camelia | rakudo-moar f2df2c: OUTPUT«(C: foo bar ber)» | ||
CptnK | m: say IO::Spec::Win32.splitdir: 'foo/bar/ber' | ||
camelia | rakudo-moar f2df2c: OUTPUT«(foo bar ber)» | ||
timotimo | hm, not sure how handling drive letters works, actually | ||
19:03
espadrine left
|
|||
dalek | osystem: 2c47dd0 | (Zoffix Znet)++ | META.list: Add SPEC::Func to ecosystem Import $*SPEC methods as functions: github.com/zoffixznet/perl6-SPEC-Func |
19:13 | |
19:16
girafe joined
|
|||
gfldex | m: IO::Path::Win32.new('C:\a\b').volume.say | 19:16 | |
camelia | rakudo-moar f2df2c: OUTPUT«C:» | ||
19:17
ufobat joined
|
|||
timotimo | ah | 19:19 | |
thanks, gfldex :) | |||
19:27
nadim_ left
19:29
nadim_ joined
19:33
domidumont left,
canopus left
19:42
canopus joined
19:43
nadim_ left
19:45
labster joined
19:50
CptnK left
19:52
zakharyas joined
|
|||
moritz | observer.com/2016/08/not-a-drill-se...eep-space/ wohoo! | 19:55 | |
19:59
cdg joined
|
|||
mspo | moritz: all of those screen savers paid off? | 20:02 | |
grondilu inserts "alien" meme | |||
lizmat starts on this week's Perl 6 Weekly | 20:03 | ||
vcv | lizmat++ love that these are on a monday, an otherwise dreadful day. | 20:04 | |
timotimo | derp space! | 20:05 | |
grondilu: "alien meme"? | |||
i've seen a project where you'd name branches "timo/foobar" and when a branch is named that, "timo" would be allowed to force-push | 20:06 | ||
but i find code ownership slightly problematic | |||
grondilu | timotimo: rather "aliens" | 20:08 | |
20:08
MasterDuke joined
20:10
sufrostico joined
|
|||
El_Che | lwp only has timeslots of 60, 120 and 240 minutes (or do I read it wrong)? act.yapc.eu/lpw2016/ | 20:12 | |
timotimo | the aliens meme is alien to me .. oh never mind, i've seen it! it has that bad-ass female protagonist in it! | 20:13 | |
20:16
wamba left
20:18
cdg left
20:19
cdg joined
20:32
ufobat left,
elohmrow left
|
|||
grondilu | enum (Foo => 1, Bar => Foo); can't be done apparently. Yet it exists in C. | 20:37 | |
timotimo | :D :D | 20:38 | |
could be done with a bit of parsing trickery, but ... bleeehhh :) | |||
if you can't do it with the meatmodel, there's always the potatomodel! | 20:39 | ||
20:40
leont joined
20:51
canopus left,
r_i_d left,
r_i_d joined
|
|||
grondilu | currently I'm looking at the Vulkan API, I saw this kind of enum there. | 20:51 | |
I think if it's possible and apparently done in C, it should also be done in Perl 6. | 20:52 | ||
konobi | vulkan? | 20:54 | |
grondilu | a new 3D graphics API | ||
20:54
zacts joined
20:55
skids left
|
|||
grondilu | it's weird because I vaguely recall it was possible to do something like that in Perl 6, but not with enums, rather with an other data structure. Can't quite remember which. | 20:55 | |
20:56
canopus joined
|
|||
konobi | well, in C, doesn't Foo just become a pointer, so therefore an address which is just an Int at the end of the day? | 20:56 | |
grondilu has no idea | |||
konobi | yeah... i think that basically how it works out | 20:57 | |
20:57
r_i_d left,
r_i_d joined
|
|||
arnsholt | An enum in C is an int, IIRC | 20:58 | |
grondilu | Is it not quite the same as writing this: | 20:59 | |
m: my ($a = 1, $b = $a); | |||
camelia | ( no output ) | ||
grondilu | m: my ($a = 1, $b = $a); say $b | ||
camelia | rakudo-moar f2df2c: OUTPUT«(Any)» | ||
grondilu | hum | ||
grondilu did not expect that | |||
konobi | so more like enum (Foo => 1, Bar => \Foo) | ||
grondilu | m: enum (Foo => 1, Bar => \Foo); say Bar | 21:00 | |
camelia | rakudo-moar f2df2c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Undeclared name: Foo used at line 1» | ||
21:00
r_i_d left
|
|||
konobi | (in concept, rather than as syntax ^_^) | 21:00 | |
grondilu | it's killing me that I can't remember where I've seen something like that. | 21:01 | |
konobi | \self.Foo might be more appropriate | ||
grondilu | maybe it was in constant definition. Is it possible to define several constants in a single statement? | ||
oh wait, it might have been in Perl 5 | 21:02 | ||
21:02
r_i_d joined
|
|||
grondilu | like: use constant { Foo => 1, Bar => Foo } | 21:03 | |
^that's apparently valid Perl 5 code. | |||
ahh no, it does not bode with 'use strict;' | 21:04 | ||
timotimo | so at least we don't regress in that regard :) | ||
konobi | is there a way to access the current enum from it's expression? | ||
(it's own expression) | 21:05 | ||
=0) | |||
grondilu doubts it | 21:06 | ||
konobi | timotimo? | 21:07 | |
21:08
mcmillhj left
|
|||
konobi | well, expressions should be able to use reflection on themselves, iirc | 21:08 | |
21:08
sufrostico left
21:10
acrussell left
|
|||
grondilu | they do in signatures, don't they? | 21:11 | |
m: say :($a, $b where $a == $b) | |||
camelia | rakudo-moar f2df2c: OUTPUT«($a, $b where { ... })» | ||
grondilu | thought that's definitely not the case I had in mind | ||
konobi | well, nested expression =0) | 21:13 | |
m: say enum (Foo => 1, Bar => :Foo) | 21:14 | ||
camelia | rakudo-moar f2df2c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Type error in enum. Got 'Pair' Expected: 'Int'at <tmp>:1------> 3say enum (Foo => 1, Bar => :Foo)7⏏5<EOL>» | ||
grondilu | I'm sure it was a bare word. I was using one in a statement while it was defined earlier in the same statement. | ||
maybe it was an enum and there was a regression | |||
21:15
sufrostico joined
|
|||
grondilu looks in some old code of his | 21:17 | ||
grondilu finds an example and it was indeed with constants in Perl 5 | 21:18 | ||
21:18
kyclark_ joined,
kyclark_ left
21:19
espadrine joined
|
|||
konobi | m: say enum (Foo => 1, Bar => $:Foo) | 21:19 | |
camelia | rakudo-moar f2df2c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Cannot use placeholder parameter $:Foo in the mainlineat <tmp>:1------> 3say enum (Foo => 1, Bar => $:Foo7⏏5)» | ||
konobi | huh, i'd have thought that should have worked | ||
m: say enum (Foo => 1, Bar => \$:Foo) | 21:20 | ||
camelia | rakudo-moar f2df2c: OUTPUT«5===SORRY!5===Cannot use placeholder parameter $:Foo in the mainlineat <tmp>:1------> 3say enum (Foo => 1, Bar => \$:Foo7⏏5)Other potential difficulties: To pass an array, hash or sub to a function in Perl 6, just pass it as is.…» | ||
timotimo | i expect the actual enum object is only composed when we reach the end of the parsing | ||
grondilu | I had no idea this code I had written was not "strict" compliant. | ||
timotimo | i'd assume it won't even be stubbed after we've reached the name of the enum | ||
konobi | but twigils should setting that to be somewhat lazily evaluated, no? | 21:21 | |
21:21
kyclark joined,
zacts left,
zacts_pi joined
|
|||
pmurias | konobi: hi | 21:21 | |
kyclark | Given a list of pairs/lists, how can I convert to a hash? | ||
konobi | m: say enum (Foo => 1, Bar => $*Foo) | 21:22 | |
camelia | rakudo-moar f2df2c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Type error in enum. Got 'Failure' Expected: 'Int'at <tmp>:1------> 3say enum (Foo => 1, Bar => $*Foo)7⏏5<EOL>» | ||
kyclark | my @list = (("name", "George"), ("age", 23)) | ||
pmurias | konobi: I'm working on packaging up nqp-js into proper npm-style packages | ||
21:22
kaare_ left
|
|||
konobi | pmurias: oh, nice | 21:22 | |
kyclark | I thought about something like ".map((=>))" but that doesn't work | ||
konobi | kyclark: check the list class | ||
pmurias | konobi: my current plan is it have seperate nqp-js-runtime and nqp-js-compiled-to-js packages | 21:23 | |
21:23
Actualeyes left
|
|||
timotimo | konobi: no, twigils will not make that happen for you | 21:23 | |
konobi | yeah... makes sense | ||
timotimo: ah | |||
21:24
mcmillhj joined,
cdg left
|
|||
konobi | m: say enum (Foo => 1, Bar => $.Foo) | 21:24 | |
camelia | rakudo-moar f2df2c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable $.Foo used where no 'self' is availableat <tmp>:1------> 3say enum (Foo => 1, Bar => $.Foo7⏏5) expecting any of: term» | ||
konobi | =0) | ||
yup | 21:25 | ||
timotimo | kyclark: mapping &[=>] onto a list of pairs like that is problematic because => expects two arguments, but it'll get a single list as its argument | ||
kyclark: what you can do, however, is flatten the list first to get its inner lists as a long list of pairs | 21:26 | ||
konobi | pmurias: yeah, having the js-runtime separately helps focus an improving the JS implementation by itself outside of work that changes from NQP bring | ||
timotimo | otherwise i think we do have some method that does what you want. i could be wrong, of course | ||
21:26
rindolf left
|
|||
timotimo | m: my @list = (("name", "George"), ("age", 23)); say @list>>.&[=>]; # i wonder | 21:26 | |
camelia | rakudo-moar f2df2c: OUTPUT«Too few positionals passed; expected 2 arguments but got 1 in block <unit> at <tmp> line 1» | ||
timotimo | m: my @list = (("name", "George"), ("age", 23)); say @list.map(*.[0] => *.[1]).perl | 21:27 | |
camelia | rakudo-moar f2df2c: OUTPUT«(:name(23),).Seq» | ||
timotimo | huh? | ||
hah | |||
m: my @list = (("name", "George"), ("age", 23)); say @list.perl; say @list.map(*.[0] => *.[1]).perl | |||
camelia | rakudo-moar f2df2c: OUTPUT«[("name", "George"), ("age", 23)](:name(23),).Seq» | ||
timotimo | the star is a new argument each time, of course | 21:28 | |
m: my @list = (("name", "George"), ("age", 23)); say @list.map({ $^a.[0] => $^a.[1] }).perl | |||
camelia | rakudo-moar f2df2c: OUTPUT«(:name("George"), :age(23)).Seq» | ||
timotimo | there we go. | ||
21:28
Actualeyes joined
|
|||
timotimo | m: my @list = (("name", "George"), ("age", 23)); say @%list | 21:28 | |
camelia | rakudo-moar f2df2c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable '%list' is not declared. Did you mean any of these? &list @list &last Listat <tmp>:1------> 3(("name", "George"), ("age", 23)); say @7⏏5%list» | ||
timotimo | m: my @list = (("name", "George"), ("age", 23)); say %@list # typod | ||
camelia | rakudo-moar f2df2c: OUTPUT«{name George => (age 23)}» | ||
timotimo | that's definitely not it :D | ||
m: my @list = (("name", "George"), ("age", 23)); say @list.pairup | 21:29 | ||
camelia | rakudo-moar f2df2c: OUTPUT«((name George) => (age 23))» | ||
timotimo | also not it | ||
kyclark | Well, that will do for now. Seems like it should be more elegant. Thanks! | ||
21:29
zacts_pi left
21:30
zakharyas left
|
|||
konobi | m: my @list = (("name", "George"), ("age", 23)); say %@list.antiparis | 21:31 | |
camelia | rakudo-moar f2df2c: OUTPUT«Method 'antiparis' not found for invocant of class 'Hash' in block <unit> at <tmp> line 1» | ||
konobi | m: my @list = (("name", "George"), ("age", 23)); say %@list.antipairs | ||
camelia | rakudo-moar f2df2c: OUTPUT«((age 23) => name George)» | ||
konobi | m: my @list = (("name", "George"), ("age", 23)); say %@list.kv | ||
camelia | rakudo-moar f2df2c: OUTPUT«(name George (age 23))» | ||
21:31
MasterDuke left
|
|||
konobi | m: my @list = (("name", "George"), ("age", 23)); say @list.kv | 21:31 | |
camelia | rakudo-moar f2df2c: OUTPUT«(0 (name George) 1 (age 23))» | ||
konobi | heh | ||
kyclark | gotta jet, but will reconnect at home. let me know if you find something cooler. | 21:32 | |
21:32
kyclark left
|
|||
konobi | m: my @list = (("name", "George"), ("age", 23)); say @list.flat.kv | 21:32 | |
camelia | rakudo-moar f2df2c: OUTPUT«(0 (name George) 1 (age 23))» | ||
konobi | m: my @list = (("name", "George"), ("age", 23)); say %@list.flat | ||
camelia | rakudo-moar f2df2c: OUTPUT«(name George => (age 23))» | ||
21:33
zacts joined
|
|||
konobi | k... time to recompile rakudo it seesm | 21:33 | |
avuserow | m: my @list = (("name", "George"), ("age", 23)); say @list.>>pairup | ||
camelia | rakudo-moar f2df2c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Missing dot on method callat <tmp>:1------> 3", "George"), ("age", 23)); say @list.>>7⏏5pairup expecting any of: postfix» | ||
avuserow | m: my @list = (("name", "George"), ("age", 23)); say @list>>.pairup | ||
camelia | rakudo-moar f2df2c: OUTPUT«((name => George) (age => 23))» | ||
21:37
pmurias left
|
|||
timotimo | avuserow: hah! short and sweet. very good | 21:37 | |
m: my @list = (("name", "George"), ("age", 23)); say @list.flat.pairup | |||
camelia | rakudo-moar f2df2c: OUTPUT«((name George) => (age 23))» | ||
21:37
cdg joined
|
|||
timotimo | m: my @list = (("name", "George"), ("age", 23)); say @list>>.Slip.pairup | 21:37 | |
camelia | rakudo-moar f2df2c: OUTPUT«((name George) => (age 23))» | ||
timotimo | hmm. | ||
m: my @list = (("name", "George"), ("age", 23)); say @list>>.list.pairup | |||
camelia | rakudo-moar f2df2c: OUTPUT«((name George) => (age 23))» | ||
avuserow | I find myself using >> a fair bit in p6 when processing collections like this. it's great to have. :) | 21:38 | |
21:38
mvorg joined
|
|||
timotimo | yup, it really, really, really is | 21:38 | |
gfldex | m: my @list = (("name", "George"), ("age", 23)); my @pairs = do for @list -> [$k, $v] { $k => $v }; dd @pairs; | ||
camelia | rakudo-moar f2df2c: OUTPUT«Array @pairs = [:name("George"), :age(23)]» | ||
timotimo | to the point where i want every language to have that now | ||
gfldex | ». gets rid of lots of simple loops | 21:39 | |
tbrowder | ugexe: I see the change you made, and what is needed to get the value into zef's guts. I just tried a few changes and think, at least for build, we can test for the actual value of $DEBUG (maybe change its name) instead of True or not. The ENV value tests as a Str and regex/match statements work well. For example I'll show some code fragments in a gist in | 21:41 | |
a few minutes. | |||
21:41
leont left
|
|||
lizmat | and a new Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2016/08/29/...om-zagreb/ | 21:41 | |
21:42
leont joined
21:43
mvorg is now known as margeas
|
|||
tbrowder | ugexe: here are the changed lines in this gist "gist.github.com/tbrowder/9ea0d5acd...781939fdb" | 21:47 | |
timotimo | lizmat: one of the links says "how to parse CSS" but the post is actually about RSS | ||
imagine my confusion when people were recommending using libxml2 | |||
i thought "um, that won't work" :D | 21:48 | ||
21:48
canopus left
|
|||
lizmat | timotimo++ # fixed | 21:48 | |
timotimo | thanks :) | ||
tbrowder | ugexe: notice the value of $DEBUG is tested two different ways, as needed: truth or value | ||
ugexe | tbrowder: those aren't neccesary. it will output with either --verbose or --debug, because INFO/VERBOSE/DEBUG/etc is part of the VERBOSITY enum | 21:49 | |
tbrowder | I know, but I don't want all the info from DEBUG for VERBOSE type items from user space, thus I have the option to test for values instead of truth. | 21:50 | |
Maybe I don't understand, but the ZEF_BUILDPM_DEBUG env var is treated as a string (which can be '') so it all just works in my short test. | 21:51 | ||
21:52
leont left
|
|||
ugexe | m: %*ENV<foo> = True; %*ENV<bar> = False; say %*ENV<foo>; say %*ENV<bar> | 21:53 | |
camelia | rakudo-moar f2df2c: OUTPUT«TrueFalse» | ||
timotimo | mst: Opan GangnaMSTyle! | ||
21:54
mcmillhj left
|
|||
tbrowder | I know I'm not explaining this clearly, but the $verbosity takes on a value of the enum, and when it is placed in an environment variable, it can take on many values, not just true or false. The original statement assigned truth where my change assigned a value to $verbosity. | 21:55 | |
21:56
canopus joined
|
|||
ugexe | the ::Service namespace doesn't get to work with the logger verbosity levels, that the job of the adapter. the fact $DEBUG is even there is just an artifact from when it was in Zef::Client | 21:56 | |
i.e. verbosity output should be handled in Zef::Build, not Zef::Service::Shell::Build | 21:58 | ||
Zef::Build will have access to the actual verbosity enum/types | 21:59 | ||
22:01
canopus left
|
|||
tbrowder | I couldn't see how to get the verbosity value in Buid.pm other than the DEBUG env var, but that would be the proper way to do it. | 22:02 | |
ugexe | you need to clarify between Zef::Build and Zef::Service::Shell::Build | 22:03 | |
because your gist says its for Zef::Build but its for Zef::SErvice::Shell::Build | |||
what i'm saying is the $DEBUG bit can probably be moved into Zef::Build from Zef::Service::Shell::Build. Zef::Build will have access to the actual verbosity type, no need to stringify anything | 22:04 | ||
tbrowder | Oh, I was a bit sloppy ref the name--let me look closer. | ||
22:05
mcmillhj joined,
sufrostico left
22:06
canopus joined
|
|||
tbrowder | The actual file is "Zef::Service:🐚:Build.pm", I've corrected the gist. | 22:09 | |
22:09
leont joined
22:10
mcmillhj left
|
|||
tbrowder | Argh, this unicode stuff is getting out of hand! Anyone else see a shell picture instead of "::Shel"? | 22:10 | |
s/Shel/Shell/ | |||
22:12
kyclark joined,
cyphase left
22:14
Sgeo joined
|
|||
ugexe | yes, i knew thats what you meant. but what needs to happen is to remove $DEBUG from ::Service::Build all together and filter the output in Zef::Build based on the verbosity level | 22:16 | |
22:16
zacts left
22:17
cyphase joined
|
|||
ugexe | ::Service::* are all dumb and essentially stand alone. Zef::Build/Test/whatever is the adapter for the various services, and what Zef::Client actually uses | 22:17 | |
22:18
skids joined
|
|||
ugexe | in fact it might Just Work if the $DEBUG conditions are all removed / assumed true | 22:20 | |
22:21
canopus left
22:24
firstdayonthejob left,
margeas left
22:27
buggable left
|
|||
tbrowder | ugexe: so how can i help you to scratch my itch? | 22:27 | |
22:27
smls left,
buggable joined
22:29
leont left
|
|||
tbrowder | Any Canadian p6 meetings during the period 16-22 Sep? | 22:30 | |
22:30
_slade_ joined
22:32
canopus joined,
zjlin joined
|
|||
tbrowder | Specifically from Quebec City, Prince Edward Island, Sydney, and Halifax. Yes, a cruise with wife and friends--p6 meeting would be better than being dragged on a shopping tour! | 22:33 | |
El_Che | I saw zoffix posting about the next toronto meeting, but later: 29 sept | 22:35 | |
kyclark | What would be the most efficient way to find all overlapping sequences from something like this? | 22:36 | |
my @pos = [9..11], [1..5], [3..6], [7..10] | |||
dalek | c: 71df199 | gfldex++ | doc/Language/typesystem.pod6: show how to get hold of type object for enum keys |
22:37 | |
grondilu | there is a known algorithm. | ||
kyclark: it'd be tough to figure it out yourself. Look it up. | |||
oh you want *all* overlapping sequences? Might even be harder. | 22:38 | ||
kyclark | It’s an n-squared thing, isn’t it? | ||
22:38
canopus left
|
|||
grondilu | the algorithm I was talking about is for the longuest overlapping sequence. | 22:38 | |
IIRC | |||
en.wikipedia.org/wiki/Longest_comm...ce_problem | 22:39 | ||
kyclark | for 0..@list.elems -> $i { for 1..@list.elems -> $j { if $i in $j { … }} | ||
22:44
zjlin left
22:47
mcmillhj joined
22:48
canopus joined
22:51
bjz joined
|
|||
timotimo | we don't have an "in" operator :) | 22:51 | |
22:51
NeuralAnomaly joined
22:52
mcmillhj left,
NeuralAnomaly left
|
|||
timotimo | and i think it's actually n^3? | 22:52 | |
hmm | |||
i'm recognizing my brain is getting tireder than recommended for thinking | 22:53 | ||
konobi | grondilu: you can use a set operation with a sort for that | 22:54 | |
22:56
NeuralAnomaly joined
|
|||
timotimo | it looks like we only have an iterated version of permutations, at least the sub version | 22:57 | |
grondilu | timotimo: iterated as opposed to what? | 22:59 | |
I mean how else would you implement it? | 23:00 | ||
timotimo | all-at-once | ||
grondilu is confused | |||
timotimo | i.e. an implementation for the push-all method in the iterator | ||
23:00
leont joined
|
|||
ugexe | tbrowder: it should do what you were looking for now | 23:01 | |
23:02
mcmillhj joined
|
|||
gfldex | Hash with fixed set of keys with the caveat of polluting the local scope: gist.github.com/gfldex/af2a861fc21...a944146c62 | 23:06 | |
23:06
bjz left,
canopus left
23:10
cdg left
|
|||
kyclark | m: my %things = dogs => [{:name("Bowzer")}, {:name("Patch")}], people => [{:name("George")}, {:name("Fred”)}]; put %things<dogs>.elems; for %things<dogs> -> $thing { put $thing<name> } | 23:11 | |
camelia | rakudo-moar f2df2c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable '$thing' is not declared. Did you mean '%things'?at <tmp>:1------> 3hings<dogs>.elems; for %things<dogs> -> 7⏏5$thing { put $thing<name> }» | ||
23:13
canopus joined
|
|||
kyclark | Hmm, I’m not able to show my problem. | 23:13 | |
Given a hash that has an array for values, how do I iterate over the values? | |||
my %things = dogs => [{:name("Bowzer")}, {:name("Patch")}], people => [{:name("George")}, {:name("Fred")}] | |||
for %things<dogs> -> $thing { put $thing<name> } | |||
That gives me: | |||
Type Array does not support associative indexing. | |||
timotimo | m: my %things = dogs => [{:name("Bowzer")}, {:name("Patch")}], people => [{:name("George")}, {:name("Fred”)}]; put %things<dogs>.elems; for (%things<dogs>) -> $thing { put $thing<name> } | 23:15 | |
camelia | rakudo-moar f2df2c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable '$thing' is not declared. Did you mean '%things'?at <tmp>:1------> 3ngs<dogs>.elems; for (%things<dogs>) -> 7⏏5$thing { put $thing<name> }» | ||
timotimo looks for non-closed double-quotes | |||
m: my %things = dogs => [{:name("Bowzer")}, {:name("Patch")}], people => [{:name("George")}, {:name("Fred”)}]; put %things<dogs>.elems; for (%things<dogs>) { put $_<name> } | 23:16 | ||
camelia | rakudo-moar f2df2c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unable to parse expression in double quotes; couldn't find final '"' at <tmp>:1------> 3ms; for (%things<dogs>) { put $_<name> }7⏏5<EOL>» | ||
timotimo | haha | ||
do you see that? | |||
m: ':name("Fred”)'.substr(*-3).comb.>>.uniname.say | 23:17 | ||
camelia | rakudo-moar f2df2c: OUTPUT«(LATIN SMALL LETTER D RIGHT DOUBLE QUOTATION MARK RIGHT PARENTHESIS)» | ||
avuserow | m: my %things = dogs => [{:name("Bowzer")}, {:name("Patch")}], people => [{:name("George")}, {:name("Fred")}]; put %things<dogs>.elems; for %things<dogs>.list -> $thing { put $thing<name> } | ||
camelia | rakudo-moar f2df2c: OUTPUT«2BowzerPatch» | ||
timotimo | perl6 does a lot of different combos of smart quotes, but not a regular ("dumb") one and a right "smart" one | ||
avuserow | not sure if there's a more graceful way of doing that | ||
23:17
kyclark left
|
|||
timotimo | avuserow: @ in front is short for ".list" at the end | 23:17 | |
avuserow | m: my %things = dogs => [{:name("Bowzer")}, {:name("Patch")}], people => [{:name("George")}, {:name("Fred")}]; put %things<dogs>.elems; for @%things<dogs> -> $thing { put $thing<name> } | 23:18 | |
camelia | rakudo-moar f2df2c: OUTPUT«2Type List does not support associative indexing. in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
avuserow | m: my %things = dogs => [{:name("Bowzer")}, {:name("Patch")}], people => [{:name("George")}, {:name("Fred")}]; put %things<dogs>.elems; for @(%things<dogs>) -> $thing { put $thing<name> } | ||
camelia | rakudo-moar f2df2c: OUTPUT«2BowzerPatch» | ||
timotimo | well, i'll be damned. | ||
m: my %things = dogs => ({:name("Bowzer")}, {:name("Patch")}), people => ({:name("George")}, {:name("Fred")}); put %things<dogs>.elems; for (%things<dogs>) { put $_<name> } | |||
camelia | rakudo-moar f2df2c: OUTPUT«2Type List does not support associative indexing. in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
timotimo | m: my %things = dogs => ({:name("Bowzer")}, {:name("Patch")}), people => ({:name("George")}, {:name("Fred")}); put %things<dogs>.elems; for @(%things<dogs>) { put $_<name> } | ||
camelia | rakudo-moar f2df2c: OUTPUT«2BowzerPatch» | ||
timotimo | that doesn't change much, it seems | ||
avuserow | I prefer a postfix method call to circumfix here... | 23:19 | |
timotimo | that's fair | ||
23:20
canopus left
23:21
mcmillhj left
|
|||
avuserow | m: my %things = dogs => [{:name("Bowzer")}, {:name("Patch")}], people => [{:name("George")}, {:name("Fred")}]; put %things<dogs>.elems; my @thing-container = %things<dogs>; for @thing-container -> $thing { put $thing<name> } | 23:22 | |
camelia | rakudo-moar f2df2c: OUTPUT«2Type Array does not support associative indexing. in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
23:23
adu joined
|
|||
timotimo | [Coke]: got any cool war stories to tell about angular 2 yet? :) | 23:24 | |
gfldex | m: my %things = (dogs => (:name<Bowzer>, :name<Patch>)), (people => (:name<George>, :name<Fred>)); put %things<dogs>.elems; for %things<dogs>.flat -> %h { dd %h<name> } | ||
camelia | rakudo-moar f2df2c: OUTPUT«2"Bowzer""Patch"» | ||
23:24
setty1 left
|
|||
gfldex | m: my %things = (dogs => (:name<Bowzer>, :name<Patch>)), (people => (:name<George>, :name<Fred>)); put %things<dogs>.elems; for %things<dogs> -> \i { dd i } | 23:25 | |
camelia | rakudo-moar f2df2c: OUTPUT«2List %things = $(:name("Bowzer"), :name("Patch"))» | ||
gfldex | m: my %things = (dogs => (:name<Bowzer>, :name<Patch>)), (people => (:name<George>, :name<Fred>)); put %things<dogs>.elems; for %things<dogs> -> \i { dd i.flat } | ||
camelia | rakudo-moar f2df2c: OUTPUT«2(:name("Bowzer"), :name("Patch")).Seq» | ||
23:27
canopus joined
23:28
mcmillhj joined
|
|||
gfldex | m: my %things = dogs => [:name<Bowzer>, :name<Patch>], people => [:name<George>, :name<Fred>]; dd %things; for %things<dogs>.Seq -> %h { dd %h } | 23:30 | |
camelia | rakudo-moar f2df2c: OUTPUT«Hash %things = {:dogs($[:name("Bowzer"), :name("Patch")]), :people($[:name("George"), :name("Fred")])}:name("Bowzer"):name("Patch")» | ||
gfldex | m: my %things = dogs => [:name<Bowzer>, :name<Patch>], people => [:name<George>, :name<Fred>]; dd %things; for %things<dogs> -> [%h] { dd %h } | 23:31 | |
camelia | rakudo-moar f2df2c: OUTPUT«Hash %things = {:dogs($[:name("Bowzer"), :name("Patch")]), :people($[:name("George"), :name("Fred")])}Too few positionals passed; expected 1 argument but got 0 in sub-signature in block <unit> at <tmp> line 1» | ||
gfldex | i'm confused that the destructuring doesn't work | ||
23:32
xinming left
|
|||
timotimo | because there isn't a single hash in that list | 23:32 | |
23:32
xinming joined
|
|||
timotimo | wait ... what ... | 23:32 | |
can we have this with a shorter literal please? my eyes cross over when trying to read all that :) | |||
oh, you just have a list of Pair objects in your hash there | 23:33 | ||
that surely won't destructure with [%h] | |||
skids | m: my %things = dogs => [:name<Bowzer>, :name<Patch>], people => [:name<George>, :name<Fred>]; dd %things; for %things<dogs> -> [*%h] { dd %h } # :/ | 23:37 | |
camelia | rakudo-moar f2df2c: OUTPUT«Hash %things = {:dogs($[:name("Bowzer"), :name("Patch")]), :people($[:name("George"), :name("Fred")])}{:name("Patch")}» | ||
skids | m: my %things = dogs => [:name<Bowzer>, :name2<Patch>], people => [:name<George>, :name<Fred>]; dd %things; for %things<dogs> -> [*%h] { dd %h } # :/ | 23:38 | |
camelia | rakudo-moar f2df2c: OUTPUT«Hash %things = {:dogs($[:name("Bowzer"), :name2("Patch")]), :people($[:name("George"), :name("Fred")])}{:name("Bowzer"), :name2("Patch")}» | ||
skids | Ah. Yes that does work. | ||
23:40
girafe left
23:47
canopus left
23:53
zoosha_ left,
zoosha joined
23:54
canopus joined
23:58
mcmillhj left
|