»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:07
cpage_ joined
00:13
Cabanossi left
00:15
robertle_ joined
00:16
Cabanossi joined
00:17
robertle left
00:24
Celelibi left
00:27
Celelibi joined,
aindilis joined
00:33
Cabanossi left
00:35
Cabanossi joined
00:37
robertle joined
00:41
robertle_ left
|
|||
BenGoldberg | m: my $a = *-1; my $b = *-1; say $a===$b; | 00:44 | |
camelia | False | ||
BenGoldberg | m: my $a = *; my $b = *; say $a===$b; | ||
camelia | True | ||
BenGoldberg | m: dd *-1 | 00:47 | |
camelia | { ... } | ||
BenGoldberg | m: dd (*-1).WHAT | ||
camelia | WhateverCode | ||
BenGoldberg wonders how many WhateverCode objects get construced, and whether caching would improve memory consumption. | 00:48 | ||
timotimo | one for every occurence in the source, plus probably closure clones | 00:49 | |
00:52
Actualeyes left
01:04
kurahaupo left,
labster left
01:09
robertle_ joined
01:10
robertle left
01:15
yqt left
|
|||
BenGoldberg | But a WhateverCode which doesn't refer to lexicals doesn't need to get cloned, no? | 01:18 | |
On an unrelated note, is there anything in perl6 similar to perl5's $, ? | 01:19 | ||
Or to $" ? | |||
01:22
eyck left
|
|||
MasterDuke_ | the docs say no and no | 01:22 | |
01:23
eyck joined
01:46
ilbot3 left
|
|||
BenGoldberg | m: sub foo( &cb (@bar) ) { cb(["X"]) }; my $callback = sub (Str @baz) { say @baz }; foo($callback); | 01:46 | |
camelia | Too few positionals passed; expected 1 argument but got 0 in sub-signature of parameter &cb in sub foo at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
BenGoldberg is confused. | 01:47 | ||
01:48
ilbot3 joined,
ChanServ sets mode: +v ilbot3
01:49
Cabanossi left
01:50
Cabanossi joined
01:52
lookatme joined
|
|||
lookatme | o/ | 01:52 | |
skids | o/ | 01:53 | |
02:03
Actualeyes joined
02:25
mcmillhj joined
02:30
mcmillhj left
02:39
geraud left,
imcsk8 left,
imcsk8 joined
02:50
pierre_ joined
02:52
Celelibi left
02:56
Celelibi joined
03:00
cog_ left
03:10
aborazmeh joined,
aborazmeh left,
aborazmeh joined
03:30
BenGoldberg left
03:35
Actualeyes left
03:37
Cabanossi left
03:38
Cabanossi joined
03:41
tailgate left
03:47
labster joined
03:48
geekosaur left
03:49
geekosaur joined
03:53
pierre_ left
|
|||
u-ou | what's a better way of saying: <multi> [ ' * ' <multi> ]* | 04:01 | |
ugexe | something like `<multi> *%% '*'` maybe | 04:14 | |
skids | Note the difference: | 04:20 | |
m: say "foo,bar," ~~ /<ident>+ %% "," (.*)/ | |||
camelia | 「foo,bar,」 ident => 「foo」 ident => 「bar」 0 => 「」 |
||
skids | m: say "foo,bar," ~~ /<ident>+ % "," (.*)/ | ||
camelia | 「foo,bar,」 ident => 「foo」 ident => 「bar」 0 => 「,」 |
||
04:30
curan joined
|
|||
u-ou | cool | 04:33 | |
is there a way to make %%'s right hand operand a regex? | 04:34 | ||
04:42
aborazmeh left,
grondilu_ is now known as grondilu
04:43
grondilu left,
grondilu joined
|
|||
lookatme | m: say "foo,bar-foo.bar" ~~ /<ident>+ %% <[\,\.\-]> (.*)/ | 04:43 | |
camelia | 「foo,bar-foo.bar」 ident => 「foo」 ident => 「bar」 ident => 「foo」 ident => 「bar」 0 => 「」 |
||
lookatme | u-ou, you mean this ? | 04:44 | |
u-ou | yeah | 04:46 | |
04:50
Actualeyes joined
04:57
khw left
05:06
skids left
05:08
Cabanossi left,
Cabanossi joined
05:09
lowbro joined,
lowbro left,
lowbro joined
05:14
CIAvash joined
|
|||
samcv | o/ everyone | 05:16 | |
05:16
japhdc joined
|
|||
lookatme | samcv, o/ | 05:20 | |
japhdc | Hello... On the archives of #perl6 I noticed a few reference to wanting a VirtualEnv like tool for Perl6... But it seems that share/nqp/lib/Perl6/*.moarvm and share/perl6/runtime/*.moarvm have the full compile time in the binary instead of a relative path... | 05:23 | |
samcv | japhdc, yes they use hardcoded paths | 05:25 | |
lookatme | I don't think so ~~ | ||
samcv | i have builds/can show you how to make them relative | ||
.o0(if we're both talking about the same thing) | |||
japhdc | samcv, yes, please show me how to make those paths relative | 05:29 | |
samcv | ok | ||
japhdc, this script will do it for you github.com/samcv/rakudo-appimage-m...ppimage.sh | |||
05:30
lookatme left
|
|||
samcv | it clones and does it all for you. but. it builds as prefix /rsu then it goes through and replaces in binary the /rsu with ././ | 05:30 | |
05:30
lookatme joined
|
|||
samcv | and uhm. then just gotta replace the perl6 script's cause i believe the substitution is different for those. i just copy my own | 05:30 | |
japhdc, github.com/samcv/rakudo-appimage-m...sh#L83-L96 mostly this | 05:32 | ||
but without the appimage part | |||
so these lines github.com/samcv/rakudo-appimage-m...sh#L83-L86 | 05:33 | ||
then copy this github.com/samcv/rakudo-appimage-m...erl6-basic | |||
then after that start it up japhdc so that anything can make sure it's compiled. then after that move it however you want | 05:34 | ||
I have appimages premade though github.com/samcv/rakudo-appimage-m...e/gh-pages | 05:35 | ||
has some weirdness because it starts out in the fake directory of the appimage. but you can dl the appimage and run `theappimage --appimage-extract` | 05:36 | ||
and it will extract itself. then just discard the appimage binary and everything is good to go | |||
builds are nightly | 05:37 | ||
lookatme | great | 05:39 | |
japhdc | That makes sense.... I think I see how it works and just need to give it a few tries. thanks for the thorough explanation! :-) | ||
05:41
wamba joined
|
|||
samcv | ok no problem! | 05:41 | |
glad my hard work can help someone out | 05:42 | ||
05:42
pierre_ joined
|
|||
samcv | took a while to get it right. and fyi the number of spaces is semi important | 05:42 | |
err | |||
/rsu (4 character) => ././ | |||
so you need it to be (no trailing slash) divisible by 2 | |||
and if you do /rsu make sure to chown -R $USER /rsu | |||
you can put it in any folder but. that's not the best idea. forget if i ran into problems with some perl6 moarvm bytecode having issues when i had like ./././././././././././././././ | 05:43 | ||
err actualy one thing missing from the perl6 script that you will need | 05:44 | ||
i will add it | |||
05:44
parv joined
05:49
domidumont joined
05:50
geekosaur left
05:51
geekosaur joined
05:54
Cabanossi left,
domidumont left,
domidumont joined,
Cabanossi joined
|
|||
samcv | japhdc, ok here you go github.com/samcv/rakudo-appimage-m...erl6-basic | 05:56 | |
05:57
domidumont left
|
|||
japhdc | samcv, ic... must add LD_LIB_PATH so that it can find libmoar.so? | 05:58 | |
samcv | uh just download perl6-basic | ||
and replace the perl6 script from your build with that | |||
05:58
domidumont joined
|
|||
samcv | cause other paths in there are also messed up and need to be fixed, so easier and more fool proof to just copy the scripts | 05:58 | |
and use `find` to replace the binary data | 05:59 | ||
japhdc | will do. thank you samcv! | 06:00 | |
06:07
pierre_ left
06:21
Cabanossi left
06:23
Cabanossi joined
|
|||
Geth | Swapped META.info → META6.json in 1 dists in github.com/perl6/ecosystem/commit/68b3f3279a | 06:31 | |
06:31
xtreak joined
06:33
raschipi joined
06:35
dct left
06:37
grondilu left
06:45
japhdc left
06:47
japhdc joined
06:49
raschipi left
06:51
Cabanossi left
06:54
Cabanossi joined
06:56
cyphase left
06:58
rindolf joined
07:00
espadrine joined
07:12
abraxxa joined
07:13
astj left
07:14
pierre_ joined,
astj joined
07:17
TEttinger left
07:19
TEttinger joined
07:21
ChoHag joined
07:22
Cabanossi left
07:23
Cabanossi joined
07:25
anton_p joined
|
|||
Geth | Swapped META.info → META6.json in 1 dists in github.com/perl6/ecosystem/commit/b6df013bec | 07:31 | |
07:31
wamba left
07:51
lizmat left
07:53
japhdc left
07:55
darutoko joined
07:58
zakharyas joined
07:59
Actualeyes left
08:01
cyphase joined
08:02
jonas1 joined
08:06
labster left
08:08
TEttinger left
08:09
shadowpaste0 is now known as shadowpaste
08:13
shadowpaste left
08:18
xtreak left
08:19
vs-midi joined
08:24
vs-midi left
08:25
wamba joined
08:27
japhdc joined
08:28
espadrine left,
xtreak joined
08:36
Cabanossi left
08:38
Cabanossi joined
08:45
darutoko left
08:52
colomon_ joined,
colomon left,
colomon_ is now known as colomon
08:53
z448 joined
08:56
z448 left
09:00
robertle_ left,
robertle joined,
z448 joined
09:07
grondilu joined
09:12
z448 left
09:16
gregf_ joined
09:19
domidumont left
09:21
Cabanossi left
09:24
Cabanossi joined
09:30
lookatme left
|
|||
japhdc | samcv, i've been experimenting with the results of your build-appimage.sh script to allow the perl6 path to be moved, but this way it always requires that you `cd $PERL6_BASE_DIR`... | 09:44 | |
samcv | japhdc, i don't see that var in my script? | 09:45 | |
japhdc | samcv, just saying that if i run perl6 from outside of the base directory after doing the transformation, then the various perl6 components are unable to find each other... | 09:47 | |
samcv | yep | 09:48 | |
that is true | |||
so you can use an appimage if you want it to do its magic | |||
09:48
cognominal joined
|
|||
samcv | because the thing is japhdc perl6 NEEDS to be in the folder to find things | 09:48 | |
since everything is relative. it's all relative to that path | |||
09:49
nadim_ joined
|
|||
samcv | what we need is a command line flag for perl6 that will chdir a the very first thing it does (before loading modules even) | 09:49 | |
japhdc | so is the vision that apps built on perl6 are all going to have to use appimage for distribution? | ||
samcv | but i have not been able to figure out where the hell to put it | ||
for now yes | |||
japhdc, or you can hack it | 09:50 | ||
uh | |||
github.com/samcv/rakudo-appimage-m...rl6-stable | |||
look at my hacks here | |||
it chdirs into OWD (the dir the appimage was started from) then it figures out all of the scripts given to it on the command line are located relative to OWD | 09:51 | ||
then it chdirs BACK into the appimage (or in your case would be $PERL6-BASEDIR | |||
then starts it | |||
i think i remember changing all the --libpath's to be absolute. pretty sure | |||
yeah then it would break modules and stuff built into perl 6 | |||
i remember | |||
japhdc | yes. that's a workaround.... but isn't requiring either compile time install path OR fixed working directory "Less Than Awesome"? | 09:52 | |
samcv | pretty much | ||
japhdc | :-) | 09:53 | |
samcv | so big someone to figure out where to put that perl6 code | ||
i'l add but i searched and couldn't figure out where to put it | |||
now 100% sure how the command line flags and all work tbh. like parts of it sure. but not like. all of it | |||
it's very abstracted | |||
but theoretically there's somewhere we can add a chdir in there, add a perl6 --chdir flag | 09:54 | ||
and then we will be gucci | |||
and perl6 will still know where its things are and you'll still be in the right $*CWD | |||
and can't put it in moarvm i already tried that. cause then moar starts up fine then all the modules are relative directories. so | 09:55 | ||
they become relative to whatever it was when perl6 started | |||
10:01
domidumont joined
|
|||
japhdc | yes, that does make sense... sounds like the flag that does the --chdir to help perl6 find it's component parts would be the way to go if $*CWD would not be impacted... perhaps choose a name other than --chdir to make the meaning more easily discoverable | 10:02 | |
parv | --startdir perhaps? | 10:05 | |
10:11
parv left
10:22
Cabanossi left
10:24
Cabanossi joined
10:33
kyan left
10:34
wamba left
10:38
parv joined,
kyan joined
10:39
wamba joined
10:44
wamba left
10:48
g4 left,
ChoHag left
10:49
ChoHag joined
10:54
japhdc left,
xtreak left,
xtreak joined
10:59
xtreak left
11:00
parv left
11:05
kurahaupo joined
11:11
xtreak joined
11:24
mr-foobar joined
11:28
xtreak left
11:33
wamba joined
11:34
Khisanth left
11:35
Actualeyes joined
11:36
Cabanossi left
11:37
g4 joined,
g4 left,
g4 joined
11:38
Cabanossi joined
11:39
xtreak joined
11:43
xtreak left
11:47
xtreak joined,
Khisanth joined
11:50
Actualeyes left
11:51
xtreak left
11:52
xtreak joined,
xtreak left
11:57
xtreak_ joined
12:08
kyan left
12:13
domidumont left,
domidumont joined
12:17
domidumont left
12:20
domidumont joined
12:24
raschipi joined
12:35
raiph left
12:36
raiph joined
12:44
mcmillhj joined
12:45
dj_goku left
12:47
dj_goku joined,
dj_goku left,
dj_goku joined
12:48
curan left
12:51
colomon_ joined
12:52
colomon left,
colomon_ is now known as colomon
12:55
colomon left
12:58
colomon joined
13:02
raschipi left
13:05
colomon left
13:06
japhdc joined
13:07
eyck_ joined
13:09
skids joined,
eyck left
13:14
Mithaldu left
13:16
smash left,
smash joined
13:17
Mithaldu joined
13:24
raiph left
13:25
colomon joined,
raiph joined
13:27
raiph left,
raiph joined
13:31
raiph left
13:32
raiph joined,
CIAvash left,
geekosaur left
13:34
Sound joined,
Sound is now known as Guest66008,
geekosaur joined
13:35
Guest66008 left
13:50
ChoHag left
13:51
mr-foobar left,
ChoHag joined
13:52
Cabanossi left
13:53
Cabanossi joined
|
|||
haxmeister | moritz: got a second? | 13:57 | |
13:57
lowbro left
|
|||
moritz | haxmeister: yes-ish | 13:58 | |
haxmeister | paste.pound-python.org/show/GwLeLk...VQmCOvo1z/ | ||
I have this json | |||
and your module | |||
but ignorant about how to get to the values once produced by your module :/ | |||
13:58
ChoHag left
|
|||
moritz | .oO( this is where it gets personal :-) ) |
13:58 | |
haxmeister | could you give a quick example? | ||
not personal.. I'm very newby | 13:59 | ||
moritz | haxmeister: that was a joke | ||
haxmeister | oh..lol | ||
moritz | haxmeister: use JSON::Tiny; my %stuff = from-json($your-json-string) | ||
haxmeister | got that | ||
but now a value | |||
hash of hash.. I dunno what to do as far as syntax :( | 14:00 | ||
moritz | and then something like for %stuff.kv -> $name, %obj { say "$name has path %obj<path>" } | ||
haxmeister | kk I'll tinker with that.. ty | ||
14:00
ChoHag joined
14:05
Exodist left
14:06
Exodist joined,
cpage_ left,
cpage_ joined
14:10
Sound_ joined
14:15
mr-foobar joined
14:16
japhdc left
14:20
alimon joined
|
|||
haxmeister | ah I see.. say %mystuff.keys[0] | 14:22 | |
still more.. | |||
moritz | haxmeister: I can recommend shop.oreilly.com/product/0636920065883.do for some introductory material to Perl 6 | 14:23 | |
(my book isn't available for purchase right now) | |||
(though USD 50.99 is quite a price...) | 14:24 | ||
haxmeister | moritz: I can't make a big purchase right now.. I'll just have to dig on google and ask silly questions for now | ||
14:24
khw joined
|
|||
haxmeister | but your module works and installs fine | 14:24 | |
I just realize I have no clue how to get data out of mixed data structures in perl6 | 14:25 | ||
moritz | haxmeister: pro tip: go to github.com/LaurentRosenfeld/thinkperl6 | ||
clone the repo | |||
cd book && pdflatex thinkperl6.tex | 14:26 | ||
enjoy a free PDF version | |||
haxmeister | oh wow | ||
thanks a million | 14:27 | ||
14:30
xtreak_ left
|
|||
curt_ | m: use JSON::Fast; say to-json(Int); | 14:32 | |
camelia | ===SORRY!=== Could not find JSON::Fast at line 1 in: /home/camelia/.perl6 /home/camelia/rakudo-m-inst-1/share/perl6/site /home/camelia/rakudo-m-inst-1/share/perl6/vendor /home/camelia/rakudo-m-inst-1/share/perl6 CompUnit::… |
||
14:32
matiaslina joined
|
|||
haxmeister | curt? | 14:34 | |
timotimo | star: use JSON::Fast; say to-json(Int); | 14:41 | |
camelia | Use of uninitialized value $obj of type Int in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in sub to-json at /home/camelia/star-2016.10/share/perl6/site/sources/11ED005DCC03AA42CAA87A439556… |
||
14:45
ChoHag left
14:47
ChoHag joined
14:49
japhdc joined
|
|||
curt_ | Fix for JSON::Fast github.com/timo/json_fast/pull/23 | 14:49 | |
14:49
stmuk joined
14:51
stmuk_ left,
TEttinger joined
14:55
nadim_ left
15:01
wamba left
15:05
pierre_ left
15:07
sufrostico left
|
|||
[Coke] sadly adds a 1-star review to p6&parrot essentials with a note about parrot. | 15:08 | ||
jdv79 | is that book useful now? | 15:09 | |
15:10
zakharyas left
|
|||
jdv79 | 2004. wow time flies. | 15:10 | |
geekosaur thinks the language has drifted just a bit from then | |||
15:12
cdg joined
15:13
gregf_ left
15:14
sufrostico joined
15:16
klapperl joined
15:18
poohman joined
15:22
matt_ joined,
matt_ is now known as Guest34177
15:23
kurahaupo left,
kurahaupo joined
15:28
Guest34177 is now known as matt_
15:29
domidumont left,
mr-foobar left
15:30
mr-foobar joined
15:32
mr-foobar left
|
|||
Geth | Swapped META.info → META6.json in 6 dists in github.com/perl6/ecosystem/commit/45fc38a106 | 15:33 | |
15:34
titsuki joined
15:36
rindolf left
15:40
rindolf joined
15:43
kyan joined
15:44
poohman left
15:48
poohman_ joined
15:53
zakharyas joined
15:56
abraxxa left
16:01
poohman_ left
16:02
mcmillhj left
16:06
perlpilot joined
16:10
ChoHag left
16:13
poohman joined,
ChoHag joined
16:14
matiaslina left
16:15
ChoHag left,
domidumont joined
16:17
mcsnolte joined,
domidumont left
16:18
domidumont joined
16:19
itaipu joined
16:21
Cabanossi left
16:24
Cabanossi joined
|
|||
haxmeister | odd when addressing the data structure, I can leave the dots out???.. | 16:26 | |
dots or no dots... that is the question | |||
%mystuff<mix-ins>[1]<shortname>; is the same as %mystuff.<mix-ins>.[1].<shortname>; | 16:27 | ||
either perl6 is really really smart.. or that's not supposed to work..lol | 16:28 | ||
timotimo | yeah you can leave the dots out | ||
haxmeister | man that is badass | 16:29 | |
timotimo | i think of it more like "you can put dots there if you want" | ||
haxmeister | who sat around and thought of all these conveniences.. brilliance in the little stuff | ||
timotimo | well, we took enough time :) | ||
haxmeister | lol.. I like it a lot | ||
timotimo | but many things were already in relatively early | ||
haxmeister | I was tromping through tuts and docs to try and figure how I was going to extract certain values from a mixed and nested data structure.. but wow.. I was over thinking it | 16:30 | |
#Perl6JustWorks | 16:31 | ||
16:32
stmuk_ joined
|
|||
timotimo | yeah, it really does | 16:32 | |
have you seen autovivification? | |||
m: my @thing; %thing<mix-ins>[2]<shortname> = "hey"; say %thing.perl | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '%thing' is not declared. Did you mean '@thing'? at <tmp>:1 ------> 3my @thing; 7⏏5%thing<mix-ins>[2]<shortname> = "hey"; s |
||
timotimo | m: my %thing; %thing<mix-ins>[2]<shortname> = "hey"; say %thing.perl | ||
camelia | {:mix-ins($[Any, Any, {:shortname("hey")}])} | ||
haxmeister | I can't make sense of all that | 16:33 | |
timotimo | by addressing things inside a structure you can build a structure even if it wasn't there before | 16:34 | |
in other languages the same code would be like: | |||
16:34
stmuk left
|
|||
haxmeister | oh you added list item to the shortname key | 16:34 | |
timotimo | "if 'mix-ins' not in %thing: %thing<mix-in> = Hash.new; ..." | ||
"if len(%thing<mix-ins>) < 2: %thing<mix-ins>[2] = Hash.new" | 16:35 | ||
etc etc | |||
BBL | |||
haxmeister | I'm digging in.. data structures are kindof important | 16:36 | |
ty | |||
timotimo | same with pure arrays | ||
m: my @foo; @foo[1;4;3;6;8;7] = "hi"; say @foo.perl | |||
camelia | [Any, [Any, Any, Any, Any, [Any, Any, Any, [Any, Any, Any, Any, Any, Any, [Any, Any, Any, Any, Any, Any, Any, Any, [Any, Any, Any, Any, Any, Any, Any, "hi"]]]]]] | ||
timotimo | you don't have to go through each dimension and make sure it has an array in there | 16:37 | |
or create a full array of arrays of arrays of arrays of arrays of arrays up front | |||
and if you don't want to have autovivification you set a type constraint on your leaf arrays/hashes so putting a hash or array in them wouldn't be acceptable: | 16:38 | ||
m: my @foo; @foo[2]<hey> = 1; say @foo; # autovivification of stuff inside @foo elements allowed | |||
camelia | [(Any) (Any) {hey => 1}] | ||
timotimo | m: my Str @foo; @foo[2]<hey> = 1; say @foo; # autovivification of stuff inside @foo elements allowed | ||
camelia | Type check failed in assignment to @foo; expected Str but got Hash (${}) in block <unit> at <tmp> line 1 |
||
haxmeister | ah yes.. I do like the constraint mechanism | ||
timotimo | not allowed ^ | ||
not only access with postcircumfix:<{ }> and postcircumfix:<[ ]> autovivifies | 16:39 | ||
"push" also does | |||
and append and unshift | |||
haxmeister | first time I've seen the @foo[1;2;5;6] syntax.. for multi-dim arrays.. (learned a new neat trick) | ||
timotimo | m: my %foo; push %foo<yeah>, "hi"; say %foo.perl | ||
camelia | {:yeah($["hi"])} | ||
16:39
mcmillhj joined
|
|||
timotimo | ^- creates an aray inside of the yeah key inside %foo | 16:40 | |
haxmeister | this needs to be in a tut specifically about complex data structures (aside from class/objects) | 16:41 | |
timotimo | m: my $foo; push $foo, "yeah"; say $foo.WHAT; say $foo.perl | ||
camelia | (Array) $["yeah"] |
||
timotimo | ^- creates an array inside a $foo variable | ||
(because arrays are what you push to) | |||
16:50
yqt joined
|
|||
haxmeister | my @foo[2]<mykey> = 1 the fact that this will create/nest a hash into the array and set a key/value pair just blows my mind | 16:56 | |
changing the way I would normally use this stuff | |||
17:00
aindilis left
|
|||
gfldex | haxmeister: multidim subscripts leave room for improvement, see: gfldex.wordpress.com/2017/04/17/sl...nfig-file/ | 17:03 | |
17:04
alimon left
17:07
Sound_ left
17:08
setty1 joined
|
|||
TreyHarris | print TODO[@Writing] Take a look at tut haxmeister mentioned above | 17:08 | |
d'oh | |||
17:11
mcmillhj left
17:13
wamba joined
17:18
alimon joined
17:25
mcmillhj joined
17:28
robertle_ joined,
zakharyas left
17:31
robertle left
17:34
japhdotcom joined
17:36
alimon left,
lizmat joined,
Cabanossi left
17:37
japhdc left
17:39
Cabanossi joined
|
|||
TreyHarris | From the logs, it seems like some folks have written Weechat scripts for typing Perl6 unicode characters even when the terminal only offers ascii input (like latex_unicode.py). Have any of you shared your script? I'm writing one for RFC 1345 and don't want to reinvent wheels | 17:44 | |
(partly because latex is too verbose, partly because latex interferes with Perl6 syntax, and partly because latex_unicode.py doesn't support the full range of symbols I'd like)- | 17:45 | ||
17:50
alimon joined
17:52
poohman_ joined
17:53
poohman left
17:57
alimon left,
revere left
18:04
japhdotcom left,
z448 joined
18:07
cdg left
18:08
revere joined
18:09
revere left
18:11
alimon joined
18:12
z448 left
18:14
espadrine joined,
revere joined
18:32
TimToady left
18:35
TimToady joined
18:36
alphah_ joined
18:39
kyan left
18:40
poohman_ left,
alphah left,
alphah_ left
18:41
alphah joined,
ChoHag joined
18:42
alphah_ joined
18:44
poohman joined
18:48
alphah_ left,
alphah left,
alphah joined
18:59
nadim_ joined,
lichtkind left
19:01
alphah left
19:03
salios joined
19:04
hythm joined
19:05
ChoHag left
19:11
lichtkind joined
19:12
ChoHag joined
19:16
user_4123 joined
19:18
user_4123 left
19:19
hythm left
19:21
hythm joined
19:25
domidumont left
19:27
kyan joined
19:28
Sound joined,
Sound left,
Sound joined
19:32
nadim_ left
19:37
hythm left
19:41
hythm joined
19:44
hythm left,
hythm joined
|
|||
tyil | !p say "t" ~~ ["t", "b"] | 19:45 | |
p6: say "t" ~~ ["t", "b"] | |||
camelia | False | ||
tyil | hmm | ||
I was hoping this to return True | |||
gfldex | m: say <t> ∈ <t e>; | 19:46 | |
camelia | True | ||
tyil | I dont even know where to start creating that character :p | ||
gfldex | tyil: you could start here: gfldex.wordpress.com/2016/08/31/on...ingertips/ | 19:47 | |
tyil | I use neither irssi nor screen tho | 19:48 | |
I just want to check wether a val exists in an array | |||
gfldex | tyil: this might help docs.perl6.org/language/unicode_entry | 19:49 | |
tyil | it would, if I know what chain to make with compose for it | ||
gfldex | tyil: you could steal (most) of github.com/gfldex/digraphs/blob/ma...igraphs.pl | 19:50 | |
19:51
Cabanossi left
|
|||
haxmeister | recommend good XML parsing package? | 19:52 | |
19:53
Cabanossi joined
19:54
AlexDaniel joined
19:57
hythm left
19:58
hythm joined
|
|||
haxmeister | nvm.. found them all | 19:59 | |
20:05
Zoffix joined,
Ven joined
|
|||
Zoffix | tyil: all fancy ops have ASCII alternatives: docs.perl6.org/language/unicode_texas | 20:06 | |
20:06
Ven is now known as Guest53690,
eyck_ left
|
|||
Zoffix | tyil: and you l | 20:06 | |
tyil: and you likely want .first method unless you don't care about speed or edge cases | 20:07 | ||
tyil | I already found those | ||
I just want to see if a $value exists in a @array | |||
Zoffix | ∈ is a set op, so it spends time converting the arrat to a set and then then you have the object identity issues | 20:08 | |
tyil | I settled for just looping through the array to see if the value exists | 20:09 | |
Zoffix | m: say 5 (elem) [1, 2, 5] | ||
camelia | True | ||
tyil | because that other guy was insisting solely I stick to unicode chars that he demands I use irssi and screen for | ||
lucs | Zoffix: Hey, never got around to thank you for adding the "try out the code" thing in your P6 tweets. | 20:10 | |
tyil | and I honestly just want it to work | ||
lucs | So, thanks! | ||
Zoffix | m: say 5 (elem) <1 2 5> # false Int 5 and IntStr 5 are not the same | ||
camelia | False | ||
Zoffix | tyil: just use (elem) instead of that thing | ||
20:10
cdg joined
|
|||
tyil | that still returned false for me, idk | 20:10 | |
Zoffix | tyil: what sort of stuff is in your array/$value? | 20:11 | |
tyil | a String $value and an @array of Strings | ||
Zoffix | Yeah, you probabpy have allomorphs in it | 20:12 | |
$value (elem) @array>>.Str | 20:14 | ||
$value.Str (elem) @array>>.Str | |||
tyil: $value eq any @array | |||
20:15
AndyDee joined
|
|||
Zoffix | m: say 5 == any <1 2 5> | 20:15 | |
camelia | any(False, False, True) | ||
Zoffix | m: say so 5 == any <1 2 5> | ||
camelia | True | ||
tyil | termbin.com/kazx | ||
that was what I was originally trying | 20:16 | ||
Zoffix | tyil: that looks like array is the wrong type for the job | ||
tyil | what should I use instead? | 20:17 | |
Zoffix | buggable: Set | ||
huggable: Set | |||
huggable | Zoffix, Immutable collection of distinct objects: docs.perl6.org/type/Set | ||
Zoffix | m: my $stuff = set <foo bar meow>; my $value = 'meow'; if $stuff{$value} { say "in it" } | 20:18 | |
camelia | in it | ||
Zoffix | m: my $stuff = set <foo bar meow>; my $value = 'meowaaa'; if $stuff{$value} { say "in it" } | ||
camelia | ( no output ) | ||
Zoffix | m: my $stuff = set <foo bar meow>; my $value = 'meow'; if $value (elem) $stuff { say "in it" } | 20:19 | |
camelia | in it | ||
Zoffix | some more docs on this stuff: docs.perl6.org/language/setbagmix | 20:20 | |
And there's an article on advent blog | 20:21 | ||
huggable: advent | |||
huggable | Zoffix, github.com/perl6/mu/blob/master/mi...6/schedule | ||
20:21
AndyDee left
|
|||
tyil | that seems to work, thanks Zoffix | 20:21 | |
Zoffix | this one perl6advent.wordpress.com/2016/12/07/ | 20:22 | |
cool | |||
20:22
Zoffix left
20:33
colomon left
20:35
colomon joined
|
|||
raiph | m: my $value = 'abc'; my @array = 'abc', 'def'; say @array (cont) $value # tyil: you had the args the wrong way round; `foo (cont) bar` means "array foo (cont)ains item bar" | 20:39 | |
camelia | True | ||
raiph | tyil: the (cont) op is the inverse of the (elem) op | ||
tyil | hmm | 20:42 | |
but I just changed it around to use a set ;~; | |||
raiph | that's another way | 20:43 | |
tyil | its github.com/scriptkitties/p6-MPD-Cl...k.pm6#L185 | ||
there's probably tons of other things that could be done better | |||
raiph | i like how you have it. reads clearly to me. | 20:44 | |
AlexDaniel | huggable: advent :is: github.com/perl6/mu/blob/master/mi...7/schedule | ||
huggable | AlexDaniel, Added advent as github.com/perl6/mu/blob/master/mi...7/schedule | ||
tyil | gonna add another page of mpd calls tomorrow probs | 20:45 | |
once I have them all, I'll add it to ecosystem | |||
unless I get around to adding a proper travis test before that point already | |||
20:46
colomon left,
colomon joined,
itaipu left
20:59
setty1 left,
Guest53690 left
21:00
Ven joined,
Ven is now known as Guest11399
21:01
skids left
21:03
mcmillhj left
21:05
scovit joined
21:09
alimon left
21:12
jetjr joined
21:16
ChoHag left
21:18
Celelibi left
21:21
Celelibi joined
|
|||
jetjr | I'm having an issue with pattern matching a string. It's acting "greedy" but I want each match to count: pastebin.com/fYATRmQF | 21:26 | |
timotimo | then put a ? after the ** | 21:28 | |
i think | |||
jnthn | m: my $s = "ATGXXXXXTAGXXXATGXXXXXTAG"; say $s ~~ m:g/ATG .**? 5..* TAG/; | 21:29 | |
camelia | (「ATGXXXXXTAG」 「ATGXXXXXTAG」) | ||
21:30
avuserow joined
|
|||
jnthn | All the quantifiers are greedy by default, but can be followed with a ? to make them frugal | 21:30 | |
jetjr | Great! Thanks it works. | ||
jnthn | (??, +?, *?, **?) | ||
21:32
Guest11399 left
21:33
dct joined
21:34
Ven_ joined
21:36
jetjr left
21:38
Cabanossi left,
Cabanossi joined,
Ven_ left
|
|||
perlpilot | That third * in jetjr's RE was slightly difficult for me to parse. My brain kept wanting to make it a quantifier. | 21:38 | |
timotimo | :D | 21:39 | |
i wouldn't have put the TAG directly after the * like that | |||
oh, jetjr already left | |||
perlpilot | Maybe I'm just too used to see .* in regex and so my brain naturally goes there | ||
timotimo | i would have pointed out that you're free to put spaces into your regexen | ||
:D | |||
21:43
z448 joined
21:44
z448 left
|
|||
jnthn | Yeah, I re-formatted it when trying it here :P | 21:44 | |
Oh, but another space coulda been good after the . too :) | 21:45 | ||
hythm | m: say 1+-+-+-+-2 | 21:46 | |
camelia | 3 | ||
21:46
dct left
21:49
vike left,
wamba left
21:51
anton_p left
21:58
vike joined
|
|||
AlexDaniel | hythm: yea :) | 21:59 | |
you can put any amount of infixes there | |||
timotimo | but those are mostly prefixes? | ||
AlexDaniel | this is what I meant… | ||
m: say 1+!!-+-?+!-+-?2 | |||
camelia | 1 | ||
AlexDaniel | was thinking not to say infix and in the end said it -_- | 22:00 | |
timotimo | :D | ||
also don't put ?? in there by accident | |||
AlexDaniel | m: say 1+!!-+-?\?+!-+-?2 | ||
camelia | 2 | ||
hythm | At first was thinking its a bug on my local rakudo version, Wanted to make sure | 22:01 | |
jnthn | Perl 6's parsing rules are, in this case, really very simple | 22:04 | |
After an infix, the only possible things we can be looking for are a term or a prefix | |||
So 1 is a term, + is an infix, after that we must parse prefixes | 22:05 | ||
So it's, counting aside, "easy to read" provided you know the langauge. :P | |||
timotimo | and it's important to know if the code included a module that provides an +-+-+-+-+ infix operator :D | ||
hythm | easy to read now :p | 22:06 | |
jnthn | timotimo: Then it's a different language ;-) | ||
timotimo | that's true | ||
cat is demanding belly rubs now | 22:07 | ||
jnthn | :) | ||
jnthn demands sleep | |||
'night o/ | 22:08 | ||
timotimo | nite jnthn! | ||
AlexDaniel | .oO( belly ribs? What? … ah… rubs… ) |
22:13 | |
22:18
skids joined
22:24
z448 joined
22:25
espadrine left
22:31
lichtkind is now known as Guest61242
22:32
labster joined
22:37
Actualeyes joined
22:39
z448 left
22:40
labster left
22:51
Cabanossi left
22:53
Cabanossi joined
22:55
AlexDaniel left,
Sound left
23:07
cpage_ left
23:12
cdg left
23:14
rindolf left
23:20
kurahaupo_ joined
23:23
kurahaupo left
23:24
sufrostico left
23:27
scovit left
23:32
BenGoldberg joined
23:37
sufrostico joined
23:45
krshn joined
|
|||
krshn | I just installed Rakudo Star 2017.04. Installed Rakudo Star for the first time. Earlier been using rakudobrew. I noticed that I am not able to use zef out-of-the-box | 23:46 | |
Steps to replicate on mac-osx: Copy the Rakudo folder to Applications shortcut. Add to PATH variable as mentioned in the README. Run zef install Math::Primesieve | 23:47 | ||
Got the following error -- | |||
gist.github.com/skrisna/140372f1ea...b0e7877649 | 23:50 | ||
I haven't seen this before when using rakudobrew | |||
timotimo | interesting, let's see. | 23:51 | |
could you set the environment variable ZEF_PLUGIN_DEBUG so we can find out what fetcher it's trying to use? also --verbose or something for the zef commandline? | 23:54 | ||
krshn | Sorry, need more info. What do I set ZEF_PLUGIN_DEBUG to? 1? | ||
timotimo | any non-empty string, i expect | ||
perhaps not 0 | |||
hm, actually, the update of the p6c ecosystem stuff doesn't really fail, just spits out some errors and continues working anyway | 23:55 | ||
i can't install primesieve either but that's because i don't have the library installed | |||
23:56
sufrostico left
|
|||
krshn | gist.github.com/skrisna/23bc0e5a3b...9cc74e1609 | 23:57 | |
Sorry -- gist.github.com/skrisna/7de76ef638...0a2b544072 | 23:58 |