»ö« 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:01
mcmillhj_ left
00:09
vcv_ left
|
|||
perlawhirl | the Download links at moarvm.org/releases.html do not work | 00:20 | |
MasterDuke | for doc code samples that die/throw at runtime, not compile time, should we use something other than the <compile time error>, or does that mean the compile time of the docs, not necessarily the compile time of the example? | ||
00:21
lancew joined
|
|||
MasterDuke | perlawhirl: yeah, looks like it's missing a 'MoarVM-' at the beginning of the file name | 00:21 | |
00:22
w_richard_w joined
|
|||
skids | m: sub l () { 1, 2 }; my $a = [3, 4]; @$a = (1,2); $a.say; | 00:32 | |
camelia | [1 2] | ||
skids | m: sub l () { 1, 2 }; my $a; @$a = (1,2); $a.say; # This is a skipped roast test | 00:33 | |
camelia | Cannot modify an immutable Any ((Any)) in block <unit> at <tmp> line 1 |
||
skids | I think that test is dubious. It is supposed to test that it is a list assignment, which it is. Autivivifying an array into a scalar due to a @ prigil... should that really happen? | 00:34 | |
(and there's a similar test with $a[]) | |||
00:37
lancew left
|
|||
mcmillhj | Which one of these is more idiomatic: "abc".comb() or "abc".split("", :skip-empty)? | 00:40 | |
00:41
mcmillhj_ joined
|
|||
skids | .comb is not obscure, it is used fairly commonly. | 00:43 | |
.split only if you are trying to write code readable to people who don't know Perl6. | 00:44 | ||
mcmillhj | skids++ thanks, I'll keep this in mind | ||
00:46
mcmillhj_ left,
melezhik joined
00:48
melezhik left
|
|||
MasterDuke | greppable6: comb | 00:50 | |
greppable6 | MasterDuke, 1563 lines, 251 modules: gist.github.com/7127aa8e6205a0c30a...d1b4697773 | 00:51 | |
AlexDaniel | greppable6: \bcomb\b | ||
greppable6 | AlexDaniel, 481 lines, 140 modules: gist.github.com/4cb18270d0a994b22a...0a618a0488 | ||
MasterDuke | yes, that's much better | ||
greppable6: \bsplit\b | 00:52 | ||
greppable6 | MasterDuke, 1549 lines, 310 modules: gist.github.com/83e5c520d7f423ca03...e1db33c631 | ||
perlawhirl | I would hazard a guess that most of those `split`s are splitting on a delimiter, and that most `comb`s are not... but i could be wrong :D | 00:54 | |
mostly it's about intent. one of these conveys intent more clearly: | |||
'this-and-that'.comb(/\W/) -vs- 'this-and-that'.split('-') | |||
the split makes more sense as that's the intent of the result. | 00:55 | ||
but for iterating or enumerating the chars of a string... `comb()` all the way | 00:56 | ||
erm... there's an error above... i meant: 'this-and-that'.comb(/\w+/) | |||
skids | i dunno I think there is just as valid "intent" argument for .comb in that case. | 00:57 | |
perlawhirl | i guess it depends on the context, yes | ||
AlexDaniel | I'd say the intent is even more clear with comb… | 00:58 | |
perlawhirl | interesting to note... in those examples, split produces a Seq, comb produces a List | ||
skids | however, .comb(','?<(<-[',']>)>','?) would be a bad intent expression | ||
AlexDaniel | perlawhirl: your rakudo is old, it seems | 00:59 | |
6c: dd ‘this-and-that’.comb(/\W/) | 01:00 | ||
committable6 | AlexDaniel, gist.github.com/0d43777986f9f37c34...799c516208 | ||
AlexDaniel | but not too old :D | ||
perlawhirl | ah, on this box, yes it is | 01:01 | |
i irc from my underpowered vps, so i'm using one of those app bundles from a few months back | |||
where can i get a new one of those | 01:02 | ||
everywhere else i build from HEAD, but it's too much hassle on a small vps | |||
AlexDaniel | huggable: deb | 01:03 | |
huggable | AlexDaniel, Alpine, CentOS, Debian, Fedora, OpenSUSE and Ubuntu Rakudo packages: github.com/nxadm/rakudo-pkg#rakudo-pkg | ||
AlexDaniel | btw 2018.04.1-1 in debian testing | 01:04 | |
weekly: tracker.debian.org/news/954566/rak...o-testing/ | |||
notable6 | AlexDaniel, Noted! | ||
01:06
mcmillhj left
01:08
perlbot left,
simcop2387 left
01:12
zachk left,
AlexDaniel left
01:21
windyhouse left
01:28
mcmillhj joined
01:33
mcmillhj left
01:34
simcop2387 joined,
simcop2387 left,
simcop2387 joined
01:35
simcop2387 left
01:38
simcop2387 joined
01:39
perlbot joined
01:42
comborico1611 left
01:45
markong left,
zakharyas joined
01:48
ilbot3 left
01:56
ilbot3 joined,
ChanServ sets mode: +v ilbot3
02:08
mcmillhj joined
02:13
mcmillhj left
02:30
Khisanth left
02:39
mcmillhj joined,
lookatme left
02:42
lookatme joined
02:44
mcmillhj left,
oplevunus left,
Khisanth joined
02:53
eliasr left
03:12
mcmillhj joined
03:17
mcmillhj left
03:36
mcmillhj joined
03:41
mcmillhj left
03:54
wamba joined
04:14
mcmillhj joined
04:17
syntaxman left,
syntaxman joined
04:18
khw left,
kentnl left,
Khisanth left,
kent\n joined
04:19
mcmillhj left,
Khisanth joined
04:27
syntaxman left
04:28
syntaxman joined
04:29
eythian left
04:30
eythian joined
04:33
Khisanth left,
athenot_ left
04:34
skids left
04:39
athenot joined
04:40
pilne left
04:41
syntaxman left
04:43
syntaxman joined,
athenot left,
athenot_ joined
04:48
athenot_ left,
athenot joined
04:49
Khisanth joined
04:51
mcmillhj joined
04:52
athenot left
04:53
epony left,
kaare_ joined
04:56
mcmillhj left
04:57
epony joined
05:07
jmerelo joined
|
|||
jmerelo | O/ | 05:11 | |
yoleaux | 9 May 2018 21:07Z <AlexDaniel> jmerelo: well, that issue in particular is not a problem with Whateverable or how it builds rakudo, but it's rakudo itself that is/was broken on HEAD | ||
9 May 2018 21:07Z <AlexDaniel> jmerelo: so generally if you see something like that you should feel free to file a rakudo bug | |||
jmerelo | .tell AlexDaniel thanks, although I don't have all the information on how that binary is built. I'll try to anyway. | 05:12 | |
yoleaux | jmerelo: I'll pass your message to AlexDaniel. | ||
05:13
sauvin joined
05:17
mcmillhj joined
05:22
mcmillhj left
05:29
a3r0 left
05:30
a3r0 joined
05:33
mcmillhj joined
05:34
wamba left
|
|||
jmerelo | One of the (still) unanswered questions in StackOverflow: custom hashing function for set/hash stackoverflow.com/questions/477360...-in-perl-6 | 05:35 | |
A solution was provided (sort of), but still there's no canonical answer. | |||
05:38
mcmillhj left
|
|||
lookatme | jmerelo, if for Array, there is a question about it | 05:55 | |
m: my %data := SetHash.new: Set(1, 2), Set(3, 4); say %data{Set(1, 2)} | |||
camelia | True | ||
lookatme | stackoverflow.com/questions/500510...a-hash-key | ||
and they explain why it is not working for Array | 05:56 | ||
jmerelo | lookatme: thanks; I had a vague recollection I had seen something like that... | ||
lookatme | welcome | 05:57 | |
05:58
unclechu left
06:01
unclechu joined
|
|||
Geth | doc: 322ad1a60f | (JJ Merelo)++ | doc/Language/setbagmix.pod6 Eliminates «<+» «>+» which were obsoleted Since 2017.07: github.com/rakudo/rakudo/blob/c66a...geLog#L793 Thanks to @lizmat for the heads up, this closes #2016 |
06:03 | |
synopsebot | Link: doc.perl6.org/language/setbagmix | ||
doc: 1eedc9949e | (JJ Merelo)++ | 2 files Remove from other files, refs #2016 |
|||
doc: 37acf75b27 | (JJ Merelo)++ | doc/Language/objects.pod6 Mention property where it's indexed. Closes #2018 |
|||
synopsebot | Link: doc.perl6.org/language/objects | ||
06:05
mcmillhj joined
|
|||
Geth | doc: JJ self-assigned Revise text on HyperOperators github.com/perl6/doc/issues/944 4a1e532f50 | (JJ Merelo)++ | 2 files Closes #2005, and maybe helps a little bit #1730. Also learn new words (from previous additions) |
06:10 | |
06:10
mcmillhj left
06:12
wamba joined
06:14
mcmillhj joined
06:21
mcmillhj left
06:24
windyhouse joined
06:29
mcmillhj joined
06:32
espadrine joined
06:33
mcmillhj left
06:34
MasterDuke left
06:45
darutoko joined,
espadrine left
|
|||
lookatme | Is someone well know cp :) | 06:51 | |
I want track the cp progressing, and I found -v is helpful option | 06:52 | ||
But when I catch the stdout of cp, it can not get anything before copying over :( | 06:53 | ||
And seems like other linux command also faced this problem | |||
such as | |||
cp -v xx yy /dir | more | |||
cp -v xx yy /dir | cat | 06:54 | ||
It didn't print anything before copying finished | |||
geekosaur | lookatme, that is output buffering. take a look at the stdbuf command, or consider using something like the script command | 07:00 | |
if you capture standard output to a file or pipe, the convention is to switch to block buffering, usually with a 4k or 8k block sie | |||
size | |||
07:01
mcmillhj joined
|
|||
lookatme | oh, I will take a look at stdbuf :) | 07:01 | |
thanks | |||
07:06
mcmillhj left
|
|||
jmerelo | lookatme: you might want to check rsync www.cyberciti.biz/faq/show-progres...-transfer/ | 07:08 | |
07:14
rindolf joined
07:17
espadrine joined
|
|||
lookatme | jmerelo, ok thanks | 07:20 | |
I just doing some exercise about Perl 6 | 07:24 | ||
07:25
dakkar joined
07:26
mcmillhj joined
|
|||
jmerelo | lookatme: we're here to help. Good luck. | 07:27 | |
lookatme | github.com/araraloren/perl6-getopt...ple/xcp.p6 | ||
jmerelo | lookatme: using nqp. Scary :-) | ||
lookatme | yeah, it is okay now | 07:28 | |
jmerelo | lookatme: great :-) | ||
lookatme | yeah, I just want get size of the file | ||
so don't want create a IO::Path or some other object | |||
jmerelo | lookatme: if you allow me a suggestion, wouldn't "Advanced" be better than "Advance"? | 07:29 | |
lookatme | where? | ||
jmerelo | lookatme: an option would be to use posix functions through the nativecall interface. Nqp is not really intended for human consumption... | ||
lookatme: in the module name. | 07:30 | ||
lookatme | oh | ||
maybe, but I have to modify a lot of things if I change the name | 07:31 | ||
07:31
mcmillhj left
|
|||
lookatme | anyway thanks for your suggestion, my EN is not good :) | 07:33 | |
I think it's worth to using nqp if we need better performance | 07:34 | ||
When I write my app github.com/araraloren/perl6-app-findsource, it is slowly when using IO::Path | 07:35 | ||
Of course, I am hope some day I can using IO::Path instead of it :) | 07:36 | ||
07:39
mcmillhj joined,
robertle joined
|
|||
jmerelo | lookatme: the problem with NQP is that it does not have any kind of stable interface; it might change at any moment. It might be faster, but the functions, their name, functionality, might change or disappear. That's why it might be better to use NativeCall. Stable, solid interface, machine-line speed. | 07:39 | |
lookatme | jmerelo, yeah, that's true | 07:40 | |
jmerelo | lookatme: check it out here github.com/perl6/nqp#using-nqp | ||
lookatme | hmm, I know this | 07:41 | |
07:43
mcmillhj left
07:44
mcmillhj joined
07:46
scimon joined
07:49
mcmillhj left
08:05
robertle left
08:06
mcmillhj joined
08:11
mcmillhj left
08:33
ChoHag left
08:34
espadrine left
08:36
Matthew[m] left,
Garland_g[m] left,
unclechu left
08:37
ilmari[m] left,
elcaro[m] left,
CIAvash[m] left,
mienaikage left,
wictory[m] left
08:38
squashable6 left,
quotable6 left,
undersightable6 left,
statisfiable6 left,
nativecallable6 left,
unicodable6 left,
greppable6 left
08:39
unicodable6 joined,
nativecallable6 joined,
undersightable6 joined,
greppable6 joined,
statisfiable6 joined,
quotable6 joined,
squashable6 joined,
committable6 left
08:41
mirlur[m] left,
tadzik left,
AlexDaniel` left
08:42
mcmillhj joined
08:47
mcmillhj left
08:48
|oLa| left
08:52
pmurias joined
08:55
mcmillhj joined,
espadrine joined
09:03
athenot joined,
mcmillhj left
09:04
wamba left
09:05
mcmillhj joined
09:07
darutoko left,
wamba joined
09:08
FROGGS joined
09:10
mcmillhj left
09:18
windyhouse left
09:20
wamba left
09:26
molaf joined
09:31
ufobat joined
09:34
mirlur[m] joined
09:35
ExtraCrispy joined,
athenot left
09:36
committable6 joined
09:43
ilmari[m] joined,
Matthew[m] joined,
wictory[m] joined,
unclechu joined,
AlexDaniel` joined,
tadzik joined,
elcaro[m] joined,
Garland_g[m] joined,
CIAvash[m] joined,
mienaikage joined
09:46
espadrine left
09:51
wamba joined
09:52
zakharyas left
10:04
w_richard_w left
|
|||
ufobat | is there a way to convert a perl5 regex into a perl6 regex? | 10:08 | |
El_Che | I know there is/was a perl5 mode, but I don't know if it works well (heard iti didn't) | 10:09 | |
jnthn | rx:P5/.../ will parse it as Perl 5 syntax | 10:10 | |
As to how well it works: depends what features you're depending on. | |||
ufobat | cool | 10:12 | |
but there is not other way round, i mean, assuming you have a p6 regex in a $variable and you want to bring it to perl5? | 10:13 | ||
lizmat | no: the P5 adverb just changes the parsing: if the p6 regex is in a variable, it's already parsed | 10:15 | |
timotimo | you do get the source string of the regex, though, don't you? | 10:16 | |
you could re-parse that into a QAST and transform it at that level | |||
though it might be difficult if you have things like nested captures and backreferences and such, and even trickier if you have subrules that you call | |||
ufobat | but that sounds at least possible :-) | 10:17 | |
i put this on the last position of the todo list for my sereal module | |||
ty :9 | 10:18 | ||
El_Che | ufobat: you have a million line code base in perl6 that you automatically want to convert to perl 5? :) | ||
ufobat | maybe you can just convert very basic things | 10:21 | |
i dont know | |||
sereal is quite perl5 specific | 10:22 | ||
there are other things that doesnt match perfectly into p6, i think | 10:24 | ||
jmerelo | Re: creating new tags in StackOverflow. A bunch of us can do that, and now the pace of new questions seem to be picking up enough to merit being more specific. I was thinking about creating the "zef" and "cro" tags. What do you think? | 10:26 | |
jnthn | jmerelo: Hm, I hadn't realized they had to be explicitly created; the Cro docs actually suggest people can get help by posting questions tagged "perl6" and "cro" on SO. :) | 10:31 | |
El_Che | hehe | 10:39 | |
are only admins allowed to create tags? | |||
jmerelo | jnthn: That means that it probably exists already... | ||
El_Che: only if you have 1500 karma | 10:40 | ||
jnthn | jmerelo: I haven't seen it used so far, actually :) | 10:41 | |
jmerelo | jnthn: you do now :-) stackoverflow.com/questions/tagged/cro | ||
jnthn | Hm, if it's only 1500 I probably can create it :) | ||
ah, you did it :) | |||
jmerelo | jnthn: I did create the tag, but it's got to be filled up, it's got no usage guidance. You can probably help with that :-) | 10:42 | |
jnthn | Apparently I don't have privs for that yet :) | 10:43 | |
Oh, I can submit a proposal and it'll be peer reviewed | |||
Interesting. Just noticed on my profile page it has an "Impact" (estimate of people reached) | |||
jmerelo | jnthn: right. | ||
jnthn | I've written only a handful of Perl 6 answers, and apparently already by impact is ~4k | 10:44 | |
s/by/my/ | |||
jmerelo | jnthn: congrats :-) | ||
jnthn: you are now in Perl 6 doc glossary :-), FWIW. Also adding your surname, right now, to the dictionary so that the spell check does not protest | 10:46 | ||
jnthn | What did I do to deserve that? :P | ||
El_Che | karma == reputation? | ||
jnthn | El_Che: Yeah :) | ||
El_Che | lolz | ||
i | |||
jmerelo | El_Che: we called it Karma in the Slashdot days, and it stuck | ||
El_Che | i am slightly below and I posted a few tiles in 2009 | 10:47 | |
and last in 2011 | |||
timotimo | i have a stackoverflow impact of ~45k, but it's mostly because of one answer to a python question i gave years ago | 10:50 | |
El_Che | wow, royalty | ||
10:50
markong joined
|
|||
timotimo | that answer got its last upvote on may 3rd | 10:51 | |
jnthn | Yeah, I've noticed having written some answers, one can occasionally get more reputation from those written long ago :) | ||
timotimo | aye | 10:52 | |
jmerelo | timotimo: people just find them when googling, and usually drop a friendly vote or two. I always do it when I find something valuable. | 10:54 | |
timotimo | at the GPW there was actual stackoverflow royalty, btw | ||
10:55
jmerelo left
10:58
albongo left
10:59
albongo joined
11:34
athenot joined
11:56
windyhouse joined
11:57
athenot left
11:59
japanois- left
12:01
japanoise joined
12:06
athenot joined
12:09
molaf left
12:12
athenot left
12:13
raynold left
|
|||
El_Che | I was compelled to answer a SO question to stop the voice of jmerelo in my head | 12:15 | |
12:24
molaf joined
|
|||
stmuk | this sort of thing is worrying -=> www.reddit.com/r/Python/comments/8...or_package | 12:27 | |
I wonder if anysort of technical solutions are possible long term maybe like granting/revoking permissions to some sort of more gradual restricted setting? | 12:28 | ||
s/gradual/granular | |||
El_Che | stmuk: in my head I thought that that was the idea after Star (I know now it's not): a list of vouched versions of specific modules | 12:31 | |
pmurias | stmuk: I don't think any technical solutions would help much | 12:35 | |
stmuk: maybe drone strike on perpetrators would help a bit, but I don't see use being able to arrange that ;) | 12:36 | ||
12:38
mcmillhj joined
12:39
windyhouse left
12:50
eliasr joined
12:51
itaipu joined
12:55
ufobat left
12:57
wamba left
13:09
athenot joined
13:11
zakharyas joined,
ufobat joined
13:14
wamba joined
|
|||
ufobat | timotimo, did you notice my oneliner to reproduce my free() issue? | 13:14 | |
13:17
AlexDaniel joined
13:19
ChoHag joined
13:23
zakharyas left
13:27
scimon left
13:28
scimon joined
13:29
itaipu_ joined
13:32
itaipu left
|
|||
ktown | Is it possible to tweek one core pm6 file then deploy this change without recompiling and installing all of perl6? | 13:34 | |
timotimo | ufobat: i saw it! i'll try it soon-ish, currently no opportunity | ||
jnthn | ktown: No | 13:38 | |
timotimo | ktown: if you want to experiment with changes, you can use "augment" | 13:39 | |
ktown | jnthn: thanks this question came to mind when I wanted you test your patch for src/core/IO/Socket/Async.pm6 | 13:42 | |
I modified the one line, then was thinking how can the compile and install be faster? | 13:44 | ||
jnthn | Faster hardware :) | ||
Well, and better compiler optimizations :-) | |||
All the src/core/ are concatenated into a single file, though | |||
Which forms the outer lexical scope of all programs | 13:45 | ||
ufobat | timotimo, okay cool :-) | ||
El_Che | ktown: fork rakudo and let travis build it? It won't be faster, but it will be remote | 13:48 | |
13:55
ufobat left
13:56
athenot left
14:00
athenot joined
|
|||
pmurias | any hints why I am getting java.lang.RuntimeException: No such attribute '$!do' for this object when trying to make j-all afte make j-bootstrap-files on the jvm backend? | 14:02 | |
paste.debian.net/1024136 | 14:03 | ||
14:05
athenot left
14:08
huf_ is now known as huf,
Bob joined
14:09
Bob is now known as Guest2185
14:11
wamba left
14:14
Guest2185 left
14:29
itaipu_ left
14:30
lucasb joined
14:31
athenot joined
14:35
scimon left
14:39
kaare_ left
14:41
wamba joined
14:44
skids joined
|
|||
gfldex | lolibloggedalittle: gfldex.wordpress.com/2018/05/10/de...-grammars/ | 14:52 | |
14:52
vivus-ignis joined
14:59
pmurias left
15:00
pmurias joined
15:03
vivus-ignis is now known as ignis__away
15:08
ignis__away is now known as vivus-ignis
15:10
pmurias left
15:17
jmerelo joined
15:18
pmurias joined
15:24
vivus-ignis is now known as ignis__away
15:32
khw joined
|
|||
Geth | doc: acbc2625b8 | (JJ Merelo)++ | 3 files Adds cheatsheet from Mu refs #114 |
15:33 | |
15:40
pmurias left
15:41
pmurias joined
|
|||
Geth | mu: 8cb379f278 | (JJ Merelo)++ | README Minor changes to README |
15:41 | |
15:43
FROGGS left
|
|||
timotimo | gfldex: cool! | 15:45 | |
gfldex: it doesn't make it better, but you can also pass :match to .comb that will also give you the results as match objects. i tend to use that more often than match :g for some reason | 15:46 | ||
but i see now that you're not using :g at all here, so your approach is cleaner | |||
jmerelo | gfldex: great :-) | ||
15:50
kaare_ joined
|
|||
jmerelo | You probably know, or don't, that while I'm doing the TPF grant I'm staying at home 3 days a week, to focus on the stuff. While I'm doing that, I'm also cooking for the whole family. | 15:57 | |
Baseline is: I'm cooking. And there was a desert competition today in the CS Faculty where I teach. So I cooked this jj.github.io/manzanachos-con-natamole/ | 15:58 | ||
Well, it's in Spanish, but it's basically a riff on the nachos with guacamole, only sweet. nachos become sweet apple and cinnamon chips, guacamole is still guacamole, but honey and vanilla and a bit of lime zest for color instead of garlic. | 15:59 | ||
So I won. | |||
Only two competing deserts, but what the hell, I wasn't second. | |||
Anyway. I'm telling you this because if it weren't for the Perl Foundation, I would be going pretty much every day to my office, not cooking for the family, not learning to cook, and so on. | 16:00 | ||
So this is kind of a collective thanks :-) And an offer to cook a few for the next Perl meetup, if anyone's interested. Apple chips are (obviously) vegan, natamole is not. Maybe for the next London Perl workshop :-) | 16:02 | ||
El_Che | jmerelo is on a roll! :) | 16:06 | |
16:12
comborico1611 joined,
espadrine joined
16:18
mcmillhj left
16:21
|oLa| joined
|
|||
stmuk | jmerelo: see comments on acbc262 | 16:25 | |
16:26
mcmillhj joined,
mcmillhj left
16:28
wamba left
|
|||
stmuk | actually maybe the cheatsheet should just be totally moved from mu into p6doc | 16:28 | |
16:28
|oLa| left
|
|||
stmuk | with a note left in mu of its new location | 16:28 | |
ideally also the html should probably be generated automatically from the txt version | 16:30 | ||
comborico1611 | How do you load a function from a file into memory of REPL? | ||
*routine | |||
Not like executing a file from REPL. | 16:31 | ||
16:32
epony left
|
|||
jmerelo | comborico1611: I don't think there's any REPL-specific function | 16:36 | |
You will have to load the file and then EVAL | 16:37 | ||
16:37
wamba joined
|
|||
comborico1611 | What is EVAL? Do you mean it has to be run via the file? | 16:37 | |
Read Eval Print. | |||
16:38
athenot left,
mcmillhj joined
|
|||
comborico1611 | Instead of copy and pasting the routine into the REPL, I'm wondering if there is a way to load it from file. | 16:38 | |
16:38
athenot joined
|
|||
jmerelo | comborico1611: this EVAL docs.perl6.org/routine/EVAL | 16:39 | |
comborico1611 | Okay. Thanks! | ||
jmerelo | comborico1611: you're welcome | ||
comborico1611 | jmerelo: How do I load file into REPL? | 16:41 | |
16:41
pmurias left
16:42
|oLa| joined
|
|||
jmerelo | comborico1611: same way you would into a Perl 6 program. IO.slurp. | 16:42 | |
far as I can tell, there are no REPL-specific commands. | |||
comborico1611 | Thanks! | ||
moritz | or if it's a module, just use it | ||
use JSON::Tiny; | |||
16:42
|oLa| left
16:43
pmurias joined
|
|||
Geth | doc: f35e1d6fa2 | (Will "Coke" Coleda)++ | 2 files fix grammar |
16:45 | |
doc: f8d4d3a727 | (Will "Coke" Coleda)++ | 2 files whitespace |
|||
comborico1611 | Can anyone point me to an article on the REPL, like a basic tutorial? REPL in Docs search yields no results. | ||
16:46
itaipu joined
|
|||
jmerelo | comborico1611: as I said, there's no such as a thing as a REPL. It's only a command line that interprets perl6 | 16:46 | |
comborico1611 | Oh. Hmm. | ||
Geth | doc: 6b5846bcc1 | (Will "Coke" Coleda)++ | xt/duplicates.t "that that" is not uncommon, allow it |
||
doc: 1eb0f76567 | (Will "Coke" Coleda)++ | doc/Language/community.pod6 whitespace |
16:47 | ||
synopsebot | Link: doc.perl6.org/language/community | ||
16:47
wamba left
|
|||
comborico1611 | I gotta go back to Kubuntu 17. I don't 18. I like menu bars... | 16:50 | |
[Coke] | I don't understand "no such thing as a REPL" | 16:54 | |
16:56
ExtraCrispy left
|
|||
jmerelo | [Coke]: There's a Read, Eval, Print, Loop. | 16:56 | |
16:56
wamba joined
|
|||
jmerelo | [Coke]: The REPL allows for history storage, prints the result. That's pretty much it. | 16:56 | |
16:57
dakkar left
|
|||
[Coke] | ..I know what a REPL is. you said there's no such thing. | 16:58 | |
which seems demonstrably false. | |||
jmerelo | [Coke]: OK, fair enough. | ||
moritz | I think jmerelo's sentiment was that you shouldn't look for special REPL tools to solve your problems | 16:59 | |
jmerelo | moritz: that's what I meant. Thanks :-) | ||
moritz | instead, ask yourself "how would I do it outside the REPL?", and then reuse that solution inside the REPL | ||
jmerelo | moritz: correct. | ||
comborico1611 | The opposite method is done with Lisp, working inside REPL to apply to outside. I think. | 17:00 | |
17:00
pmurias left
|
|||
[Coke] | I figured I was just lacking context. Thanks. | 17:01 | |
jmerelo | [Coke]++ | ||
17:02
khw left
|
|||
comborico1611 | Time to get rid of this glitchy and app wannabee Kubuntu 18. | 17:02 | |
Thanks for the responses! | |||
17:02
comborico1611 left,
raynold joined
|
|||
Geth | doc: 7b282ef9c7 | (JJ Merelo)++ | doc/Language/community.pod6 Fixed spotted error in POD format |
17:03 | |
synopsebot | Link: doc.perl6.org/language/community | ||
17:04
kybr left
17:06
wamba left
17:09
windyhouse joined
17:13
pmurias joined
|
|||
[particle] | moritz: i'm still here! | 17:16 | |
moritz | [particle]: \o/ | 17:17 | |
lucasb | stmuk: Can i bother you for a second about the star repo? | 17:19 | |
Geth | doc: 59250525c9 | (JJ Merelo)++ | doc/Language/community.pod6 Fixes accidental markdown refs #2022 |
||
synopsebot | Link: doc.perl6.org/language/community | ||
17:22
HaraldJoerg joined
|
|||
Geth | doc: b08a139959 | (JJ Merelo)++ | doc/Language/glossary.pod6 Fixes more accidental markdown refs #2022 |
17:22 | |
synopsebot | Link: doc.perl6.org/language/glossary | ||
doc: 0f14b4bc4e | (JJ Merelo)++ | 3 files Changes to HTML-rendered source Thanks @stmuk for the heads up. Refs #114. |
17:25 | ||
17:25
ufobat joined
|
|||
lucasb | stmuk: There's both modules/uri/ and modules/modules/uri/ in the star repo. Was the latter accidentally created? | 17:25 | |
17:29
ignis__away is now known as vivus-ignis
17:33
kybr joined
17:35
itaipu left
17:36
itaipu joined
17:42
vivus-ignis is now known as ignis__away
17:44
jmerelo left
17:45
ignis__away is now known as vivus-ignis
|
|||
stmuk | lucasb: yes that's an error I'll fix now. Thanks for the headsup! | 17:51 | |
17:52
wamba joined
|
|||
ktown | my daughter is taking Computer Science 101 this summer, ya! It's demonstrated with Python boo! | 18:05 | |
18:09
maettu left
|
|||
ktown | this is the text book: doc.lagout.org/programmation/pytho...-25%5D.pdf | 18:09 | |
check the math on page 42 :) | |||
18:11
athenot left,
athenot joined,
tt left,
pmurias left
18:12
vivus-ignis is now known as ignis__away
18:13
pmurias joined
18:15
mcmillhj left
18:17
athenot left,
athenot joined
18:18
lucasb left
18:19
kst` left,
lucasb joined
|
|||
moritz | hey, she is being taught a nice language *and* using a free-to-download textbook | 18:20 | |
18:20
committable6 left,
unicodable6 left,
nativecallable6 left,
undersightable6 left,
greppable6 left,
statisfiable6 left,
quotable6 left,
squashable6 left
18:21
undersightable6 joined,
quotable6 joined,
squashable6 joined,
statisfiable6 joined,
greppable6 joined,
nativecallable6 joined,
unicodable6 joined,
committable6 joined
18:22
ignis__away is now known as vivus-ignis
18:23
lucasb left,
sauvin left
|
|||
ktown | when I took cs101 it was in pascal, but yes it is good that she did not need to buy a $100 text book | 18:25 | |
18:32
pmurias left
18:33
comborico1611 joined
18:34
pmurias joined
18:35
mcmillhj joined
18:36
mcmillhj left
|
|||
El_Che | ktown: nothing wrong with Pascal | 18:37 | |
18:38
comborico1611 left
18:40
mcmillhj joined
|
|||
ktown | El_Che: ditto perl5 | 18:50 | |
18:51
pilne joined
18:52
pmurias left
18:55
vivus-ignis is now known as ignis__away
19:00
pmurias joined
19:02
ignis__away is now known as vivus-ignis
19:06
vivus-ignis left
19:08
vivus-ignis joined
19:12
pmurias left
19:25
MasterDuke joined
19:26
pmurias joined
19:28
zachk joined,
zachk left,
zachk joined
|
|||
El_Che | a workaround fork for people having problems with the Readline module on recent distributions using libreadline v7: github.com/drforr/perl6-readline/issues/22 | 19:45 | |
19:48
comborico1611 joined
|
|||
El_Che | the repl without readline or linenoise is painful :) | 19:49 | |
moritz | rlwrapper kinda works | 19:55 | |
El_Che | yes, that what I used in the meantime (Linenoise is broken as well :( ) | 19:58 | |
but the warning got to me :) | |||
C modules seem to break from time to time | 20:02 | ||
maybe a module variant is needed per version? Readline::v5, Readline::v6, Readline::v7. On the other hand, a lot of users will have no idea which to install | 20:04 | ||
(or 1 module containing different classes) | 20:05 | ||
20:05
rindolf left
20:09
rindolf joined
20:15
Ven`` joined
20:18
windyhouse left
|
|||
Ven`` | m: my regex flipped-subrule { 'cba' }; say so 'abcdef' ~~ / <?after <flipped-subrule>> 'def' /; | 20:19 | |
camelia | True | ||
Ven`` | o/ #perl6, any minds I can peruse to explain that^ mystery? | ||
moritz | it's a bug, related to <?after> reversing regex and string to do backwards matching | 20:22 | |
20:23
wamba left,
wamba1 joined
|
|||
Ven`` | ahaha; I see | 20:28 | |
20:34
Zoffix joined
20:35
comborico1611 left
|
|||
Ven`` | slightly different one now: | 20:38 | |
m: grammar Foo { token TOP {} }; class A {}; "foo; bar".subst(/ <TOP={::Foo.new(A.new)}> /) | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Null regex not allowed at <tmp>:1 ------> 3grammar Foo { token TOP {7⏏5} }; class A {}; "foo; bar".subst(/ <TOP |
||
Ven`` | ^ is there a way to give an action class to a grammar in such a case? | ||
20:39
comborico1611 joined
20:43
windyhouse joined
|
|||
Zoffix | There's a possibly unsupported .set_actions method | 20:43 | |
Ven`` | Yeah that's the one I found 😅 but I was wondering if there was a more "official" method | 20:46 | |
Zoffix | .ask did you still want for π, τ, and 𝑒 constants to be MidRats (Rat/FatRat allomorphs)? irclog.perlgeek.de/perl6-dev/2018-...i_15887340 Kinda think it's pointless unless we also implement all the trig functions that support Rationals otherwise we're just adding overhead of coercing them to Num. | ||
yoleaux | Zoffix: I'll pass your message to did. | ||
20:46
Zoffix is now known as did,
did is now known as Zoffix
|
|||
Zoffix | .ask TimToady did you still want for π, τ, and 𝑒 constants to be MidRats (Rat/FatRat allomorphs)? irclog.perlgeek.de/perl6-dev/2018-...i_15887340 Kinda think it's pointless unless we also implement all the trig functions that support Rationals otherwise we're just adding overhead of coercing them to Num. | 20:47 | |
yoleaux | Zoffix: I'll pass your message to TimToady. | ||
Zoffix | .tell TimToady plus also Complex with Rational components to make cool stuff like Euler's identity give "right" results :) | 20:48 | |
yoleaux | Zoffix: I'll pass your message to TimToady. | ||
Zoffix | Lastly, storing three irrational numbers in a type called "Rational" might just offend some mathematical deity. | 20:49 | |
20:57
athenot left
20:58
athenot joined,
vivus-ignis left
21:11
mcmillhj left
|
|||
Ven`` | m: grammar A { token TOP { 'a' } }; role AR[::T] is A {}; say "foo".subst(/ <TOP=.AR[Int]> /, -> $/ {}) | 21:12 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in metachar:sym<assert>; couldn't find final '>' (corresponding starter was at line 1) at <tmp>:1 ------> 3::T] is A {}; say "foo".subst(/ <TOP=.AR7⏏5[Int]> /, -> $/ … |
||
Ven`` | i was looking for a way out, but... That doesn't seem to be it :D | ||
21:16
Ven`` left
21:17
windyhouse left,
windyhouse joined
|
|||
pmurias | maybe someone needs to write a pure Perl 6 readline replacement? ;) | 21:25 | |
pmurias is *not* volunteering for that btw | 21:28 | ||
21:32
mcmillhj joined
|
|||
pmurias | nqp::say("Hello World") works on Truffle/GraalVM ;) | 21:35 | |
21:37
mcmillhj left
21:40
wamba1 left
21:41
khw joined
21:44
mcmillhj joined
21:45
rindolf left
21:49
mcmillhj left
22:01
rindolf joined
22:03
dct joined
22:17
pmurias left
22:18
mcmillhj joined
22:23
rindolf left,
mcmillhj left
22:24
Zoffix left
22:30
hythm_ joined
22:36
mcmillhj joined
|
|||
hythm_ | :m grammar G { rule TOP { <a> <b>}; rule a {'a'}; rule b { <?after <a>> 'b' }; }; G.parse('a b') | 22:39 | |
m: grammar G { rule TOP { <a> <b>}; rule a {'a'}; rule b { <?after <a>> 'b' }; }; G.parse('a b') | 22:41 | ||
camelia | ( no output ) | ||
hythm_ | m: grammar G { rule TOP { <a> <b>}; rule a {'a'}; rule b { <?after <a> >'b' }; }; G.parse('a b') | ||
camelia | ( no output ) | ||
b2gills | m: grammar G { rule TOP { <a> <b>}; rule a {'a'}; rule b { <?after <a> >'b' }; }; say G.parse('a b') | ||
camelia | 「a b」 a => 「a」 b => 「b」 |
||
22:41
mcmillhj left
|
|||
b2gills | hythm_: camelia doesn't present itself as a REPL | 22:42 | |
22:42
lizmat_ joined,
lizmat left,
Kaiepi left,
nebuchadnezzar left,
nebuchadnezzar joined,
undersightable6 left,
quotable6 left,
squashable6 left,
statisfiable6 left,
greppable6 left,
nativecallable6 left,
unicodable6 left,
committable6 left
|
|||
hythm_ | Noted. Thanks b2gills | 22:43 | |
22:43
Kaiepi joined,
markong left
|
|||
hythm_ | :m grammar G { rule TOP { <a> <b>}; rule a {'a'}; rule b { <?after <a>> 'b' }; }; G.parse('a b').say | 22:43 | |
22:43
japanoise left
22:44
markong joined
|
|||
hythm_ | m: :m grammar G { rule TOP { <a> <b>}; rule a {'a'}; rule b { <?after <a>> 'b' }; }; G.parse('a b').say | 22:44 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 3:m7⏏5 grammar G { rule TOP { <a> <b>}; rule a expecting any of: infix infix stopper statement end statement… |
||
hythm_ | m: grammar G { rule TOP { <a> <b>}; rule a {'a'}; rule b { <?after <a>> 'b' }; }; G.parse('a b').say | ||
camelia | Nil | ||
b2gills | hythm_: Also you can directly message camelia | ||
hythm_ | m: grammar G { rule TOP { <a> <b>}; rule a {'a'}; rule b { <?after <a> >'b' }; }; G.parse('a b').say | 22:45 | |
camelia | 「a b」 a => 「a」 b => 「b」 |
||
22:45
japanoise joined
|
|||
b2gills | Is there anything you are having trouble figuring out? | 22:45 | |
hythm_ | Why it does not parse if the "space" placed before 'b' ,,, and only works when the space is inside <?after <a> > | 22:46 | |
22:47
kurahaupo_ is now known as kurahaupo
|
|||
timotimo | the "significant whitespace" stuff allows you to have whitespace after the opening { of the rule declaration without having it actually count as a space | 22:47 | |
so rule a {'a'} and rule a { 'a'} are equivalent | 22:48 | ||
22:48
Kaypie joined,
vike1 joined,
comborico1611_ joined,
mcmillhj joined
22:49
cxreg joined,
nebuchadnezzar left,
nebuchadnezzar joined
|
|||
b2gills | hythm_: In general, I would say err on the side of using tokens instead of rules | 22:49 | |
22:50
ambs joined,
vike left,
comborico1611 left,
cxreg2 left,
Kaiepi left,
caa51h left,
ambs_ left,
ufobat left,
ufobat joined,
jdv79_ left
22:51
jdv79 joined
22:52
caa51h joined
|
|||
hythm_ | Understood this part. But What about inside look ahead regex,, it does not work as <?after <a>> 'b' ,,and works as <?after <a> >'b' | 22:52 | |
22:53
mcmillhj left
|
|||
hythm_ | I think the space should be significant after closing <?after > | 22:53 | |
22:54
HaraldJoerg left,
yoleaux left
|
|||
b2gills | hythm_: I still have difficulties knowing where a space is significant in a rule, and I've been here a while. | 22:55 | |
I mean it could be intentional, or a bug as far as I know | 22:56 | ||
Juerd | I've given up on trying to remember those whitespace rules. I'll write them explicitly :) | 22:57 | |
22:59
Todd joined
|
|||
hythm_ | Yes its confusing somrtimes, but the regex looks cleaner without inserting whitespaces every where | 23:00 | |
Todd | Hi All. I need to do a director of a folder. In p5, it was `opendir $DIR, $WorkingDir;`. How do I do this in p6? | ||
23:01
mcmillhj joined
|
|||
timotimo | use "dir" | 23:02 | |
Todd | checking the docs | ||
MasterDuke | e: say dir '.' | ||
evalable6 | ("bin".IO "t".IO "sandbox".IO "3rdparty".IO ".gitmodules".IO ".gitignore".IO "Sakefile".IO… | ||
MasterDuke, Full output: gist.github.com/549085deaccf3a5a3f...2acaec5789 | |||
Todd | Hi Timo: that was too easy. Yet another wonderful P6 clean up of p5. :-) | 23:04 | |
23:04
hythm_ left
23:06
mcmillhj left
|
|||
MasterDuke | dpk: looks like yoleaux has gone missing from #moarvm, #perl6-dev, and #perl6 | 23:10 | |
23:10
yoleaux joined
|
|||
dpk | fixed | 23:10 | |
23:10
ChanServ sets mode: +v yoleaux
|
|||
dpk | thanks for the heads up | 23:10 | |
MasterDuke | dpk: thanks! | 23:11 | |
23:17
Todd left
23:21
BenGoldberg joined
23:22
itaipu left
23:27
windyhouse left
23:36
mcmillhj joined
23:40
quotable6 joined,
ChanServ sets mode: +v quotable6,
nativecallable6 joined,
squashable6 joined
23:41
undersightable6 joined,
mcmillhj left
23:48
dct left
23:52
mr_ron joined
|
|||
mr_ron | m: use Test; grammar G { token A is export {'a'}; my token m-A is export {'ma'}; our token o-A is export {'oa'} }; import G; ok 'oa' ~~ /<o-A>/, 'fair enough'; ok 'ma' ~~ /<m-A>/, 'maybe but ?'; lives-ok {'a' ~~ /<A>/}, 'this should work at least as well as my' | 23:53 | |
camelia | ok 1 - fair enough ok 2 - maybe but ? not ok 3 - this should work at least as well as my # Failed test 'this should work at least as well as my' # at <tmp> line 1 # Type check failed in binding to parameter '<anon>'; expected G but got Match… |