»ö« 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:02
sena_kun left
00:03
mcsnolte left
00:05
mcmillhj left
00:09
ryn1x left,
ryn1x_ left
00:10
ryn1x__ left
00:15
nadim left
00:21
mcmillhj joined
00:24
ryn1x joined,
ryn1x_ joined,
ryn1x__ joined
00:26
mcmillhj left,
mr-foobar left
00:27
mr-foobar joined
00:28
Exodist left
00:29
ryn1x__ left,
ryn1x_ left,
ryn1x left
00:30
Exodist joined
00:33
neilb left
00:37
mcmillhj joined
00:40
EAACWS3 joined,
GHAA4MIP joined,
ryn1x joined
00:42
mcmillhj left
|
|||
El_Che | with the alpine package a rakudo base image goes from a 150mb to 37mb | 00:43 | |
00:45
BenGoldberg joined
00:51
mcmillhj joined
00:56
mcmillhj left
|
|||
comborico1611 | El_che, i can sympathize to the "with pain my heart I started rewriting the wrapper in go". | 00:57 | |
01:02
mcmillhj joined
01:04
cdg joined
01:07
mcmillhj left
01:08
cdg_ left,
cdg left
01:09
mcmillhj joined
|
|||
lookatme | :) I don't like golang. | 01:11 | |
phogg | languages that assign with := are all suspect | 01:12 | |
01:13
mcmillhj left
|
|||
lookatme | yeah, and the function signature syntax is uncomfortable | 01:13 | |
for me | 01:14 | ||
01:16
cdg joined
01:17
ryn1x left
|
|||
samcv | TimToady: okay thanks. i will fix the test then | 01:18 | |
i was 95% it was incorrect but wanted to double check since it was in roast | |||
01:19
mcmillhj joined
01:21
cdg left
01:24
mcmillhj left
01:28
mr-foobar left
01:30
mr-foobar joined
01:31
mcmillhj joined
01:35
cpage_ left,
Exodist left
01:36
mcmillhj left,
Exodist joined
01:39
ryn1x_ joined,
ryn1x joined,
ryn1x__ joined
|
|||
comborico1611 | Anyone know about Java here? | 01:40 | |
01:42
cdg joined,
aborazmeh joined,
aborazmeh left,
aborazmeh joined
01:43
cpage_ joined,
Exodist left
01:44
ryn1x_ left,
ryn1x left,
ryn1x__ left
01:45
Exodist joined
01:46
mcmillhj joined
01:47
cdg left
01:48
ryn1x joined,
ryn1x_ joined,
ryn1x__ joined
01:49
kalkin--- joined
01:52
mcmillhj left,
kalkin-- left
01:53
astronavt joined
01:57
mr-foobar left
|
|||
lookatme | I wrote a p6 script find source file like `find` | 02:00 | |
But it is too slow, so I rewrite it with nqp | |||
02:01
mr-foobar joined
|
|||
lookatme | And it is still slow than find, So I want use NativeCall improve it | 02:02 | |
But I faced some problem, here is the code: ideone.com/3i6Mv3 | 02:03 | ||
The readdir_r version always return nothing. And the readdir can not get .name or it will Segment fault | 02:04 | ||
What's the problem with my code ? | |||
02:05
mcmillhj joined
|
|||
MasterDuke | comborico1611: i've done some java programming, you have a question about it? | 02:05 | |
comborico1611 | Is it okay to learn Java 6 instead of 7? | 02:06 | |
lookatme | Why you want learn the old one ? | ||
comborico1611 | Just to keep it in my back pocket, in case a job opportunity comes. | 02:07 | |
02:07
Cabanossi left
|
|||
MasterDuke | there's obviously lots of overlap, but all the java i've seen recently has been 7 or 8 | 02:07 | |
comborico1611 | And i don't have much money for new version book. | ||
90% overlap? | 02:08 | ||
MasterDuke | i wouldn't worry about buying a new book. the differences should be easy to learn about from online resources | ||
02:08
Cabanossi joined
|
|||
comborico1611 | That was my thinking. Thanks! | 02:09 | |
geekosaur | lookatme, the Dirent will already be passed as a pointer. sub readdir_r(DIR, Dirent, Pointer[Dirent] is rw --> int32) is native(Str) { * } | 02:10 | |
02:10
aindilis left,
mcmillhj left
|
|||
lookatme | I will try | 02:12 | |
02:12
kaare__ joined
02:13
ryn1x__ left
02:14
ryn1x left,
ryn1x_ left
02:15
kaare_ left
|
|||
comborico1611 | My order has been submitted. It's always exciting when you know a book is on its way. | 02:16 | |
02:18
ryn1x joined
02:20
mcmillhj joined
02:22
ryn1x left
|
|||
comborico1611 | Goodnight! I will remember this day, how i was discouraged but received hope from talking with some guys on #perl6! | 02:22 | |
lookatme | :) 88 | 02:23 | |
comborico1611 | :-)) | ||
Big smile with some double-chin action. Night! | 02:24 | ||
02:24
comborico1611 left
02:25
astronavt left
02:26
yht joined,
mempko left,
mr-foobar left
02:27
mr-foobar joined
02:29
aindilis joined
02:31
espadrine left
02:39
troys is now known as troys_
|
|||
lookatme | geekosaur, not working. I think the problem is `Str $.name`. The C side need consequent memory space. | 02:40 | |
02:40
lookatme left
|
|||
geekosaur | that is possible, NativeCall assumes Str behaves a certain way on the C side. Probably need a buf[uint8] and marshal/unmarshal from Str in the class | 02:41 | |
and preallocate the buf | |||
02:43
Exodist left
02:45
Exodist joined,
silug left
02:47
ilbot3 left
02:51
Exodist left
02:52
konsolebox left,
Cabanossi left,
Exodist joined
02:53
ryn1x_ joined,
ryn1x joined,
ryn1x__ joined
02:54
Cabanossi joined
02:56
ilbot3 joined,
ChanServ sets mode: +v ilbot3
02:57
mr-foobar left,
ryn1x_ left,
ryn1x left
02:58
ryn1x__ left,
silug joined
02:59
konsolebox joined,
mr-foobar joined
03:04
cdg joined
|
|||
AlexDaniel | m: BEGIN {use nqp;put nqp::getlexdyn(‘$/’)} | 03:05 | |
camelia | BEGIN {use nqp;put nqp::getlexdyn(‘$/’)} | ||
AlexDaniel | that's still far from 28 :( | ||
still cool though. | 03:06 | ||
03:08
ryn1x joined,
mcmillhj left
03:09
ryn1x_ joined
03:10
ryn1x__ joined
03:11
pilne left,
mcmillhj joined
|
|||
AlexDaniel | huggable: quine :is: BEGIN {use nqp;put nqp::getlexdyn(‘$/’)} | 03:16 | |
huggable | AlexDaniel, Added quine as BEGIN {use nqp;put nqp::getlexdyn(‘$/’)} | ||
03:16
mcmillhj left
03:18
cdg left
03:19
noganex joined
03:20
Cabanossi left
03:21
dansimon joined
03:22
noganex_ left
|
|||
dansimon | Hi there! Can you do something like if (/firstline/ .. /lastline/){ print; } in perl6? | 03:22 | |
Juerd | dansimon: Look for ff | ||
03:24
Cabanossi joined
|
|||
AlexDaniel | dansimon: what are you trying to do exactly? | 03:24 | |
dansimon | Juerd: Ah, interresting... AlexDaniel: I'm trying to print a section of a file | ||
More spesifically print from a matching line to an empty line | 03:25 | ||
03:26
mcmillhj joined
|
|||
AlexDaniel | wow, you actually need ff! :) | 03:27 | |
although you can maybe do it with a regex also, like /^^firstline$$ .*? ^^lastline$$/ (or something similar) | 03:28 | ||
03:28
ufobat___ joined
|
|||
AlexDaniel | but docs on ff conveniently give the example for exactly that use case :) docs.perl6.org/language/operators#infix_ff | 03:29 | |
dansimon | thanks guys :) | 03:30 | |
03:31
mcmillhj left,
ufobat_ left
03:37
mcmillhj joined
03:38
Ben_Goldberg joined,
BenGoldberg left,
Ben_Goldberg is now known as BenGoldberg
03:41
wander joined
03:42
mcmillhj left
03:44
darkmorph left
03:48
wander left,
wamba joined
03:52
cdg joined
03:54
kaare__ left,
kaare__ joined
03:56
napo1eon joined,
mcmillhj joined
03:58
mr-foobar left
04:01
mcmillhj left
04:03
mr-foobar joined,
eliasr left
04:05
Cabanossi left
04:07
Cabanossi joined
04:11
dugword joined
04:12
kaare__ left
04:13
kaare__ joined,
mcmillhj joined
04:17
afresh1 joined,
mcmillhj left
04:21
kaare__ left,
kaare__ joined
|
|||
Juerd | AlexDaniel: ff is very useful in one liners; I use the equivalent quite often in Perl 5. | 04:23 | |
In any larger program, I find its hidden state annoying. | 04:24 | ||
04:27
mcmillhj joined
04:28
mr-foobar left
04:29
mr-foobar joined
04:30
dansimon left
04:32
mcmillhj left
04:34
wamba left
04:38
u-ou joined,
u-ou left,
u-ou joined
04:42
mcmillhj joined
04:44
lookatme joined
|
|||
lookatme | . | 04:44 | |
u-ou | hi | 04:45 | |
lookatme | hi ? | ||
u-ou | → u-ou joined (sid257727@gateway/web/irccloud.com/x-ahbyooofghomedvy) | 04:46 | |
04:46
mcmillhj left
04:59
aborazmeh left
|
|||
lookatme | Still have some problem, but it can get other info except the name of file | 05:07 | |
ideone.com/G7vOaQ | |||
The script `segmentation fault` when access name field | 05:09 | ||
05:10
BenGoldberg left
05:11
pentashift_ joined
05:12
troys_ is now known as troys,
mr-foobar left
05:20
kaare__ left,
mr-foobar joined,
kaare__ joined
05:31
khw left
05:35
Cabanossi left
05:36
ryn1x__ left
05:37
ryn1x_ left,
ryn1x left,
Cabanossi joined
05:41
AlexDaniel left
05:49
Exodist left
05:51
Exodist joined
05:55
kaare_ joined
05:56
kaare__ left
05:59
yht left
06:00
Exodist left
06:02
Exodist joined
|
|||
lookatme | I think it has some bug of NativeCall, it can not handle array in C struct | 06:03 | |
ideone.com/HpjtHV | |||
06:09
Exodist left
06:10
Exodist joined
06:12
mr-foobar left
06:15
mr-foobar joined
06:19
Exodist left
06:21
Exodist joined,
Cabanossi left
06:22
Cabanossi joined
06:23
yht joined
06:32
piojo joined
06:39
Exodist left,
Exodist joined
06:42
mcmillhj joined
06:43
mr-foobar left
06:44
mr-foobar joined
06:47
mcmillhj left
06:48
Exodist left
06:49
Exodist joined
06:52
holyghost joined
06:55
Exodist left
06:58
Exodist joined
06:59
domidumont joined
07:01
dugword left
07:03
darutoko joined,
domidumont left
07:04
Exodist left,
domidumont joined
07:06
Exodist joined
07:08
nadim joined
07:10
troys left
07:12
geospeck joined
07:13
mr-foobar left
07:14
mr-foobar joined
07:19
mniip left
07:20
parv joined
07:28
cdg left
07:29
cdg joined
07:33
cdg left
07:35
dugword joined
07:36
abraxxa joined
07:37
Exodist left,
Exodist joined
07:38
astj_ left
07:39
astj joined,
astj left,
astj joined
07:42
mr-foobar left
07:43
mr-foobar joined
07:47
Exodist left
07:48
philomath joined
07:49
Exodist joined
07:51
Cabanossi left
07:52
Cabanossi joined
07:55
yht left
07:57
Exodist left
07:58
Exodist joined,
lowbro joined,
lowbro left,
lowbro joined
08:00
parv left
08:03
neilb joined,
neilb left
08:04
mempko joined
08:06
Ven joined,
Ven is now known as Guest25031
08:10
yht joined,
Guest25031 left
08:20
Cabanossi left
08:22
Cabanossi joined
08:25
philomath_ joined
08:28
philomath left
08:29
lookatme left
08:30
cdg joined
08:32
Exodist left
08:33
Exodist joined,
mempko left
08:41
rindolf joined
08:42
dugword left,
mr-foobar left
08:43
Exodist left
08:45
dakkar joined
08:46
mr-foobar joined
08:48
Exodist joined
08:52
pmurias joined
08:59
Exodist left
|
|||
ZzZombo | I'm going crazy. WHAT ON EARTH CAN MAKE IDENTICAL STRINGS NOT COMPARE SO? | 09:00 | |
09:01
mempko joined,
Exodist joined
|
|||
ZzZombo | For the past days I've been debugging a very specific problem, in a list of objects I need to find ones with a particular name, so I `.grep` the array that holds them with `*.name eq $name`, but somehow the check fails, so I get no results. I'm sure I do have matching objects in the array. | 09:03 | |
I can dump it, add debug output at the place where I populate it, and it all confirms that. Hell, I can copy the string I use to search for, and the name of matching elements from the debug output I've added, and run a simple `say <str1> eq <str2>` on camelia, and it yields `True` as expected. | 09:05 | ||
But in the very specific method that searches for named objects it all fails bizarrely! I'm at the point of giving up. | 09:06 | ||
I have no more ideas to check. | |||
09:08
zakharyas joined
|
|||
pmurias | ZzZombo: maybe check that the strings are equal while extracting them from the array with a manually specified path? | 09:09 | |
09:09
philomath_ is now known as philomath
|
|||
pmurias | ZzZombo: dumping the strings might be changing them | 09:10 | |
09:12
sena_kun joined,
TEttinger left,
mr-foobar left
09:15
Exodist left
09:16
mr-foobar joined
09:17
cdg left
09:18
Exodist joined
|
|||
ZzZombo | Can it be somehow related to encoding? The file that is used to parse and populate the array is in UTF-16LE, while the rest of the project is in UTF-8. | 09:22 | |
I can't find much info on encoding in the docs. | |||
pmurias | ZzZombo: try extracting the elements from the array using the indexes and see how they compare | 09:23 | |
09:23
Exodist left
|
|||
ZzZombo | I parse it using my hand-written `Grammar`, with the corresponding encoding supplied to `parsefile`. | 09:23 | |
I'll try it now. | |||
09:24
cdg joined
09:25
neilb joined
|
|||
ZzZombo | `True`... | 09:25 | |
that is, the names' equal. | 09:26 | ||
09:26
Exodist joined
09:28
cdg left
|
|||
piojo | ZzZombo: are they equal if you encode them both to binary (utf-8)? $a.encode eqv $b.encode | 09:29 | |
pmurias | ZzZombo: if all things fail maybe golf your buggy program and nopaste it somewhere so we can tak a look? | ||
piojo | ZzZombo: last time I had a problem like that, it was because of a BOM which was invisible in text editors. A hex editor showed it to me. That may or may not be applicable. | 09:30 | |
pmurias | ZzZombo: did you check that the .grep is actually trying to do the comparision? | 09:32 | |
09:35
Exodist left,
Exodist joined
09:42
telex left,
telex joined
|
|||
ufobat___ | is this spectest actually right? github.com/perl6/roast/blob/master...win.t#L319 on the first test I would expect C:\/ (where / is the "path") | 09:48 | |
for example, a "dir C:/" is not the same as "dir C:\" in the windows command line | 09:49 | ||
09:49
ShalokShalom joined
|
|||
ZzZombo | piojo: yes, they are. | 09:50 | |
piojo | ZzZombo: are the strings equivalent? $a eqv $b? | 09:53 | |
ZzZombo: If not, you can find which string is "funky": check $a.encode.decode eqv $a and $b.encode.decode eqv $b | |||
Oh, you can do that check with '===' and not worry about 'eqv' | 09:55 | ||
09:55
Exodist left,
Exodist joined
|
|||
piojo | Next, you can find out if there's part of a substring that's causing it to not match. First, check the whole string (to prove `substr` isn't changing the result): $a.substr(0..*) === $b.substr(0..*) | 09:55 | |
then use a binary search to find which region of the string doesn't match. preferably, just one character | 09:56 | ||
10:01
yht left
10:05
Cabanossi left
10:08
Cabanossi joined,
zakharyas left
10:09
zakharyas joined
10:12
mr-foobar left
10:15
mr-foobar joined
|
|||
ZzZombo | guys... do you fancy zero width spaces? Because I surely don't. IS THEM TO BLAME!! | 10:19 | |
IT IS* | |||
10:20
robertle joined
|
|||
pmurias dislikes all the fancy unicodes | 10:21 | ||
10:23
ShalokShalom_ joined
10:27
ShalokShalom left
10:32
mr-foobar left
10:33
Exodist left,
Exodist joined
|
|||
ZzZombo | Man, I was really going crazy, it's driving you insane when you see impossible things happen, like if `$a === $a` yielded false w/o screwing with overloading and whatnot. | 10:34 | |
10:42
Exodist left
10:43
gregf_ joined
10:44
Exodist joined
10:50
xinming left
10:51
Cabanossi left
10:52
xinming joined,
Cabanossi joined
10:53
Exodist left
10:55
Exodist joined
10:59
pmurias left
11:00
pmurias joined,
cpage_ left,
Ven joined
11:01
Ven is now known as Guest32862
11:03
cpage_ joined
11:05
Guest32862 left
11:08
Exodist left
11:11
Exodist joined
11:14
araraloren joined
|
|||
araraloren | HI | 11:14 | |
11:16
Exodist left,
Exodist joined
11:27
Exodist left
|
|||
El_Che | twitter.com/nxadm/status/928947538618613760 <-- alpine pkgs for Rakudo == smaller docker images | 11:29 | |
11:29
Exodist joined
|
|||
El_Che | sorry, that was meant for lizmat: twitter.com/nxadm/status/928947538618613760 <-- alpine pkgs for Rakudo == smaller docker images | 11:38 | |
lizmat | El_Che++ | ||
11:40
Exodist left
|
|||
pmurias | El_Che: rakudo.js strategy question: to get travis to work with rakudo.js I should try to get node.js to work on top of the java travis? | 11:40 | |
yoleaux | 11:14Z <Zoffix> pmurias: yes, there's a bug in moarvm with num stringification. It loses at least 1 digit of precision | ||
11:41
Aaronepower joined,
Exodist joined
11:46
wander joined
11:48
Aaronepower left,
ZzZombo1 joined
11:49
Exodist left,
philomath left
11:50
Cabanossi left
|
|||
araraloren | If I do a post operator to server, I get a 302 status code. How I know what should I do next ? | 11:50 | |
11:50
ZzZombo left
|
|||
araraloren | GET the Location url in the header or ? | 11:51 | |
11:51
Exodist joined
|
|||
araraloren | I use the module HTTP::UserAgent, it do a POST after get a 302 response code | 11:52 | |
11:53
Cabanossi joined
|
|||
araraloren | And someone can help me ensue is this a bug of NativeCall: ideone.com/HpjtHV | 11:55 | |
The lib code is inside the script | 11:56 | ||
11:58
darkmorph joined
|
|||
araraloren | :) Anyone interest on it please try that code . | 11:59 | |
12:02
llfourn joined
12:06
Exodist left
12:07
Exodist joined
|
|||
pmurias | <:Name> matches characters that have a name? | 12:08 | |
El_Che | pmurias: I don't know enough (yet) about rakudo.js. Is it built on top of node? | ||
pmurias | El_Che: I'm running it on top of node.js | 12:09 | |
jnthn | araraloren: Not a bug, because `char array[128];` in the struct means the values are stored directly in the struct body, but `has CArray[int8] $.array;` is a pointer to the array | ||
araraloren | jnthn, so what should I create that Struct ? | 12:10 | |
El_Che | pmurias: docs.travis-ci.com/user/languages/...th-nodejs/ <-- it seems built in | ||
jnthn | araraloren: char *array; | ||
El_Che | pmurias: but you need to build regular moarvm rakudo as well? | 12:11 | |
pmurias: I just took the generic images, and put everything I needed in a container | 12:12 | ||
pmurias | El_Che: moarvm nqp | ||
araraloren | jnthn, I mean in Perl 6 side | ||
jnthn | araraloren: Not sure if that's possible yet | ||
araraloren: As for the HTTP 302 question, I researched those a while back, and yeah, 302 means do a GET: github.com/croservices/cro-http/bl...t.pm6#L351 | 12:13 | ||
araraloren | Actually I want solve this problem about `struct dirent` : ideone.com/G7vOaQ | ||
El_Che | pmurias: well, looking at my ubuntu 14.04 img (github.com/nxadm/rakudo-pkg/blob/m...64-14.04), the only thing needed is build-essential | ||
and git | |||
maybe wget to download the source | 12:14 | ||
12:14
Exodist left
|
|||
jnthn | lunch, bbiab | 12:14 | |
araraloren | Hmm, oh so it must do GET after get 302 , thanks | ||
El_Che | 14.04 packages (what travis run) are built by the image above and this script: github.com/nxadm/rakudo-pkg/blob/m..._rakudo.pl (you can ignore the pkging part) | ||
the sub build does what you want, and that could be just a few lines of shell | 12:15 | ||
12:16
Exodist joined
|
|||
El_Che | so, yes, get the nodejs image, add build-essential, git and wget packages on top | 12:16 | |
and build away :) | |||
the other way round is get the rakudobrew perl6 travis integration and install nodejs on top | 12:17 | ||
12:17
ZzZombo1 left,
ZzZombo1 joined,
ZzZombo1 is now known as ZzZombo
|
|||
ZzZombo | What? There is rakudo.js? What's that? | 12:18 | |
araraloren | jnthn, I think we are wrong, the wiki said GET is not a standard implement: en.wikipedia.org/wiki/HTTP_302 | 12:19 | |
pmurias | ZzZombo: in the js branch of rakudo | ||
jnthn | araraloren: Well, that's the difference between standards and what the real world does; the latter tends to be more useful :) | 12:20 | |
pmurias | ZzZombo: it's rakudos JavaScript backend | ||
araraloren | jnthn, yeah, I know :) anyway thanks | ||
ZzZombo | That is, Perl 6 implemented in Javascript and usable from it? | ||
12:24
Exodist left
|
|||
pmurias | It's Perl 6 compiled to Javascript | 12:25 | |
12:28
Exodist joined
|
|||
El_Che | pmurias: it all depends what matrix you want to test | 12:32 | |
pmurias: against different node releases? against different rakudo releases? etc | |||
12:37
Exodist left
12:38
Exodist joined
12:48
HoboWithAShotgun joined
12:49
Exodist left,
AHoboWithAShotgu joined
12:50
Ven joined,
Ven is now known as Guest3192,
Exodist joined
|
|||
AHoboWithAShotgu | interesting. hexchat us acting up | 12:50 | |
i'm looking for a word,. when something doesnt need to know about something else, it is <xxx> to that something else. | 12:51 | ||
12:54
Guest3192 left
|
|||
AHoboWithAShotgu | ah come on, i KNOW that word. i just can't get hold of it. | 12:55 | |
like "ignorant of" but more computer sciency | |||
12:56
AHoboWithAShotgu left
|
|||
El_Che | no patience | 12:56 | |
pmurias | El_Che: testing against the newest node would be enough (and the js backend is part of rakudo so testing it against different rakudo releases doesn't make sense) | 12:57 | |
HoboWithAShotgun | no, still here | ||
12:57
wamba joined
|
|||
HoboWithAShotgun | as i said, hexchat acting up. | 12:57 | |
12:58
Exodist left
|
|||
El_Che | HoboWithAShotgun: Loosely Coupled? | 12:58 | |
HoboWithAShotgun | nope | ||
12:59
Exodist joined,
zakharyas left
|
|||
El_Che | HoboWithAShotgun: separation of concerns? | 13:00 | |
13:00
thundergnat joined
|
|||
HoboWithAShotgun | no, i'm looking for an adjective. | 13:00 | |
El_Che | separation-of-concernish? | ||
:) | |||
HoboWithAShotgun | lol | ||
thundergnat | HoboWithAShotgun orthogonal perhaps? | 13:01 | |
El_Che | not an adjective: Principle of Least Knowledge | ||
ZzZombo | eh, if my sub argument has a default value, shouldn't passing Nil into it make use of the said default instead of setting it to `(Any)`? | ||
El_Che | Law of Demeter | ||
13:02
thundergnat left
13:03
piojo left
13:04
wamba left
|
|||
[Coke] | ZzZombo: what's your sub sig? | 13:05 | |
13:05
Cabanossi left
|
|||
ZzZombo | sub loadKV_simple(Str:D $filepath,Grammar::VDF::Actions $parser=Grammar::VDF::Actions,|params) | 13:05 | |
13:06
cdg joined
13:08
Cabanossi joined
|
|||
MasterDuke | HoboWithAShotgun: idempotent? | 13:28 | |
ZzZombo | [Coke]: ^ | ||
HoboWithAShotgun | m: sub x($y = "z"){ say $y; }(Nil); | ||
camelia | Nil | ||
HoboWithAShotgun | m: sub x($y = "z"){ say $y; }("a"); | ||
camelia | a | ||
HoboWithAShotgun | m: sub x($y = "z"){ say $y; }(); | 13:29 | |
camelia | z | ||
HoboWithAShotgun | interesting word, MaterDuke but no | 13:30 | |
MasterDuke | agnostic? | 13:31 | |
13:31
pmurias left
13:36
comborico1611 joined
13:40
dugword joined
13:42
AlexDaniel joined
13:44
dugword left
|
|||
HoboWithAShotgun | yes. | 13:47 | |
that's it :) | |||
13:49
mson joined
13:54
Guest13239 is now known as Levex,
Levex left,
Levex joined
13:56
mcmillhj joined
|
|||
ZzZombo | #perl6, anybody with an answer to my question? | 13:59 | |
13:59
llfourn left
14:00
abraxxa left
|
|||
gfldex | m: sub f($a = 42){ my $b = 'answer'; $b = $a; say $b }; f Nil; | 14:01 | |
camelia | (Any) | ||
gfldex | m: sub f($a is raw = 42){ my $b = 'answer'; $b = $a; say $b }; f Nil; | ||
camelia | (Any) | ||
gfldex | ZzZombo: I'm undecided. | 14:02 | |
m: sub f($a is raw = 42){ my $b is default('answer'); $b = $a; say $b }; f Nil; | 14:04 | ||
camelia | answer | ||
gfldex | m: sub f($a is raw = 42){ my $b is default('answer'); $b = True; $b = $a; say $b }; f Nil; | ||
camelia | answer | ||
gfldex | ZzZombo: I would say the answer to your question is: It's complicated. | 14:05 | |
ZzZombo: The default value of a container (that is what concerns Nil) is not the very same as the default value of a parameter. | 14:06 | ||
gfldex takes note of the ENOTDOC | 14:07 | ||
14:08
perlpilot joined
|
|||
lizmat | it would make object creation quite a bit faster if it were, but the slightly different semantics make this 6.d material | 14:08 | |
ZzZombo | I want it... it was a nasty surprise. | 14:09 | |
comborico1611 | Morning, everyone. | 14:11 | |
jnthn | The Nil returning a Scalar to its default value is a semantic of assignment, but signatures are bound | 14:12 | |
So while we might call both defaults, they have no mechanism in common at all | |||
timotimo | we currently set default values based on "how many positionals were passed" and "which named parameters were used", not at all "which values were passed", fwiw | 14:13 | |
that also allows us to throw out default value initialization code in spesh by knowing only the callsite; we can completely ignore what values were actually passed, since we know which were passed and which were left out | |||
lizmat remembers the discussion with jnthn again | 14:14 | ||
scratch the idea for is default for parameters :-) | |||
timotimo | in theory we could allow a syntax like sub foo($a //= "lol") | ||
jnthn | There's what Timo said, but also at the moment it's easy to explain when the default runs and people can rely on it meaning *nothing at all was passed" | 14:15 | |
14:15
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
jnthn | //= in signatures is something I've wanted before :) | 14:15 | |
14:19
setty1 joined
14:24
zakharyas joined
|
|||
timotimo | i have an idea how to implement, but not the wrists to do it | 14:24 | |
14:25
aborazmeh left
|
|||
jnthn | An RFC ticket is probably a decent idea | 14:26 | |
timotimo | 6.d only? | 14:27 | |
jnthn | There may be issues with the idea that I didn't think of | ||
m: sub foo($x //= 1) { } | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed parameter at <tmp>:1 ------> 3sub foo($x7⏏5 //= 1) { } expecting any of: constraint |
||
jnthn | We could require use v6.d to get access to it | ||
But it won't break anything | |||
timotimo | that's fair | ||
funny exception messages when you run a 6.c that doesn't yet have it, though | |||
14:28
zakharyas left
14:29
wamba joined,
zakharyas joined
14:32
grondilu joined
14:34
neilb left
14:36
domidumont left
|
|||
comborico1611 | I really like the name choice of slurp and spurt! | 14:36 | |
gfldex | ZzZombo: filed as github.com/perl6/doc/issues/1669 | 14:37 | |
comborico1611 | I can picture Stroustrup objecting to the informal names. That's how he comes off to me anyway. A VERY professional formal guy. And that's okay. | ||
gfldex | where would the RFC ticket go? | 14:38 | |
14:47
leont left
14:48
leont joined
14:49
philomath joined
|
|||
jnthn | gfldex: Rakudo issue tracker will be fine | 14:53 | |
14:57
geospeck left
|
|||
El_Che | AlexDaniel: I spent some time tuning the rakudo alpine packages and no failing tests so far. (You asked me to ping you before 2017.11 in case of alpine trouble) | 14:57 | |
AlexDaniel | El_Che: sounds great! Thank you! | 14:58 | |
releasable6: status | |||
releasable6 | AlexDaniel, Next release in 8 days and ≈4 hours. No blockers. 0 out of 147 commits logged | ||
AlexDaniel, Details: gist.github.com/20502fb599f6b4c340...42061cbbff | |||
14:58
committable6 left
|
|||
El_Che | still time for some blockers :) | 14:58 | |
AlexDaniel | yeah :) | ||
14:58
committable6 joined
15:01
khw joined
|
|||
robertle | comborico1611: I was in a talk by stroustrup a while ago, when C++11 came out. he was talking about reasons why C++ is a great language, and the weird thing is that all the time htroughout the talk I was thinking larry would have said teh same thing about perl! very odd experience | 15:02 | |
it was all about community, long-term outlook, maturity, a powerful language, what aprts of the language should be verbose adn which should not... | 15:03 | ||
15:07
census joined
|
|||
census | how do i read it 2 different variables from an input file? my current code reads in only 1 | 15:14 | |
for example. input: pastebin.com/amWSE9dZ. i want the first variable to be $id. the second to be $term | 15:15 | ||
code: pastebin.com/3mkbHq8p | |||
15:16
comborico1611 left
15:17
philomath left
15:18
domidumont joined
15:20
ryn1x_ joined,
ryn1x joined,
ryn1x__ joined
15:30
mcmillhj left,
mcmillhj joined
|
|||
lizmat | census: contain the lines comma separated fields ? | 15:31 | |
census | lizmat i'm not sure what you mean exactly. do you mean make it a .csv and not .txt ? | ||
because i can control the input file | |||
also it says length() has been dropped? | 15:32 | ||
lizmat | m: my ($id,$term) = "529,Hemophilia B".split(","); dd $id,$term # is that what you need ? | ||
camelia | Str $id = "529" Str $term = "Hemophilia B" |
||
lizmat | m: say "a".length | 15:33 | |
camelia | No such method 'length' for invocant of type 'Str'. Did you mean any of these? chars codes in block <unit> at <tmp> line 1 |
||
lizmat | usually you want .chars in that case | ||
census | lizmat yes i think the split command is what i want? how would i incorporate that though with my current code when i only had the disease name as in my @terms = "listpatentreo.txt".IO.lines.map: *.subst(:g, " ", "+").&uri_encode | 15:34 | |
that is, lizmat, how do i read it in from a .txt ? | |||
lizmat | well, I think you first need to figure out which steps you are taking: | 15:36 | |
15:36
ryn1x___ joined
|
|||
lizmat | I see: 1. read lines | 15:36 | |
then I guess: 2. split into id / term | |||
then 3: uri_encode ?? | 15:37 | ||
15:38
ryn1x___ left
|
|||
census | lizmat how does the split command work? i'm looking at perl doc. can i just split on the comma? | 15:39 | |
lizmat | yes, you can | 15:40 | |
census | my ($id,$termname) = $term.split(","); | ||
lizmat | if $term contains "529,Hemophilia B", yup | ||
15:42
ryn1x___ joined
|
|||
census | lizmat my code is pastebin.com/Gz9aacRP however it's outputting the words like "Hemophilia B" as "Hemophilia+B" | 15:44 | |
15:45
philomath joined
|
|||
timotimo | that's url encoding | 15:49 | |
though i would have expected %20 but i suppose both mean the same thing? | |||
15:49
ryn1x left
15:50
ryn1x_ left
|
|||
timotimo | ah, + is only equivalent to %20 in the query part, not the path part? | 15:51 | |
15:51
llfourn joined
15:54
ZzZombo1 joined
|
|||
timotimo | at least the URI::Encode module always uses %20 for spaces | 15:55 | |
which module are you using to get the uri_encode function? | |||
15:55
ZzZombo1 left,
ZzZombo1 joined
|
|||
timotimo | oh it does look like you're using URI::Encode | 15:55 | |
15:56
ryn1x___ left
|
|||
timotimo | ... you are replacing spaces with + yourself | 15:56 | |
15:56
ryn1x joined
15:57
ZzZombo left
15:59
ZzZombo1 is now known as ZzZombo
|
|||
ZzZombo | why? | 16:02 | |
m: sub x($a --> Str(Cool)){$a};say x('asd');say x(1) | |||
camelia | Str<51413496> Int<51413616> |
||
ZzZombo | Isn't it supposed to turn it into strings? | 16:03 | |
Not into whatever is that. | |||
16:03
eliasr joined
|
|||
timotimo | i think coercion types as return type constraints aren't implemented yet | 16:03 | |
ZzZombo | but the docs say otherwise then. | 16:04 | |
timotimo | link please? | 16:05 | |
ZzZombo | "...only implements them in signatures, for both parameters and return types." | ||
timotimo | huhk | ||
ZzZombo | docs.perl6.org/language/functions#...cion_Types | ||
timotimo | oh, haha | 16:06 | |
m: sub x($a --> Str(Cool)){$a};say x('asd').^name;say x(1).^name | |||
camelia | Str Str |
||
timotimo | those are both strings | ||
how is it doing it though? because it looks like it calls WHICH rather than .Str as it should | |||
m: sub x($a --> Int(Cool)){$a};say x('999');say x(1 | 16:07 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1) at <tmp>:1 ------> 3 --> Int(Cool)){$a};say x('999');say x(17⏏5<EOL> |
||
timotimo | m: sub x($a --> Int(Cool)){$a};say x('999');say x(1) | ||
camelia | Unable to coerce the return value from Cool to Int; no coercion method defined in sub x at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
timotimo | pretty strange | 16:09 | |
16:09
kaare_ left
|
|||
timotimo | like, what do our tests look like for this feature? | 16:09 | |
16:13
gregf_ left
|
|||
Geth | perl6-most-wanted: bf3f303c4d | (Tom Browder)++ (committed using GitHub Web editor) | most-wanted/modules.md update remove published module Geo::Ellipsoid, add wanted module RTF::Writer |
16:17 | |
MasterDuke | timotimo: there are some in S06-signature/definite-return.t | ||
timotimo | "definite" return, eh? that doesn't sound like the right file for coercion types in return | 16:18 | |
lizmat | sorry census: was afk for a bit | ||
16:19
gregf_ joined,
ryn1x left
16:20
Cabanossi left
|
|||
ZzZombo | I have been using a variation of | 16:22 | |
m: sub x($a){$_ ~~ Numeric ?? .Numeric !! .Str with val $a};say x('') | |||
camelia | 0 | ||
16:22
Cabanossi joined
|
|||
ZzZombo | to save values as numbers where possible, but it turned out empty strings are converted to 0, but that's undesirable, what would be the easiest way to circumvent it? | 16:23 | |
ugexe | m: sub foo($a) { say $_.Numeric }; foo(69) | 16:26 | |
camelia | Use of uninitialized value of type Any in numeric context 0 in sub foo at <tmp> line 1 |
||
ugexe | where is $_ coming from? | ||
ZzZombo | `with` | ||
ugexe | ah, thats a hellova statement to parse heh | ||
16:27
comborico1611 joined
|
|||
comborico1611 | robertle, that is interesting! Thanks. | 16:28 | |
timotimo | ZzZombo: maybe use "val"? | 16:29 | |
m: dd val(""); dd val("abc"); dd val("999") | |||
camelia | IntStr.new(0, "") "abc" IntStr.new(999, "999") |
||
ZzZombo | did the `val` sub change this year or earlier? Because I don't remember it saying to return the string itself if it fails to parse a number... maybe it was just docs not completely up to date. | ||
timotimo | hmm. | ||
it was always supposed to work on anything, i believe | 16:30 | ||
ZzZombo | Yeah, timotimo, I see now in the docs I can just use `val` w/o anything else for my purposes. | ||
I swear it wasn't so back then I wrote this piece of code. In fact, I recall some of our channel regulars suggesting me this code for my problem, when I asked about it here. | 16:31 | ||
16:33
ch3ck3r joined
|
|||
MasterDuke | c: all dd val("abc") | 16:36 | |
committable6 | MasterDuke, gist.github.com/8bbf582d0d62d7ce03...ac9212c03b | ||
16:36
napo1eon left
16:39
rgrau joined
16:40
wamba left
|
|||
Geth | perl6-most-wanted: 32596209fc | (Tom Browder)++ (committed using GitHub Web editor) | most-wanted/modules.md add WIP reference |
16:43 | |
16:46
zakharyas left,
lowbro left
|
|||
gfldex | ZzZombo: RFC filed as github.com/rakudo/rakudo/issues/1245 | 16:48 | |
16:49
ryn1x__ left
|
|||
ZzZombo | Good! | 16:51 | |
16:51
Cabanossi left
|
|||
timotimo | ZzZombo: be careful about the IntStr and similar objects, they will typematch Int and Str both, so your logic may need a bit of tweaking in some places | 16:52 | |
16:52
Cabanossi joined
|
|||
ZzZombo | That's okay, I guess. | 16:53 | |
17:01
mcmillhj left
17:03
troys joined
17:05
mempko left
17:07
domidumont left
17:20
mcmillhj joined
17:21
mniip joined
17:24
ryn1x joined
17:27
philomath left
17:28
ryn1x left
|
|||
comborico1611 | Ping | 17:29 | |
I guess I mean, reverse ping. | |||
Or inverse ping? | |||
moritz | it's called "pong" :-) | 17:31 | |
comborico1611 | You sure? When I'm just checking in, i send a ping but ping is usually when the other points to check-in on the "other guy". | 17:33 | |
I guess... | 17:34 | ||
moritz | ping is usually "ICMP echo request", and pong is "ICMP echo response". Works on IRC too :-) | ||
[Coke] | here, you typically ping someone, and they pong in response. | ||
17:35
dakkar left
|
|||
comborico1611 | So I'm self-ponging! | 17:35 | |
17:35
kaare_ joined
|
|||
TimToady | both probably derived from the game of 乒乓 | 17:37 | |
El_Che | TimToady: you had to bring utf8 into the conversation, didn't you? :) | 17:38 | |
comborico1611 | The ping is the initiator for a response, where checking-in is initiates nothing, it is not a response. | ||
17:39
domidumont joined
|
|||
TimToady never thought of utf8; was thinking of Chinese | 17:39 | ||
comborico1611 | That looks like a graphic of a store-front. | ||
With the the stores having lids for roofs. | 17:40 | ||
moritz | if you just want to announce your presence, a greeting is the usual way :-) | ||
El_Che | TimToady: :) | 17:41 | |
MasterDuke | ftp.arl.mil/~mike/ping.html my dad's claim to computing fame is that he was roommates with Mike Muus in college | 17:43 | |
17:43
ch3ck3r left,
kaare_ left
|
|||
MasterDuke | and if everybody hasn't already read it before, www.amazon.com/review/R2VDKZ4X1F992Q is great | 17:43 | |
17:43
kaare_ joined
|
|||
comborico1611 | Instead of given and when, i would have used is-it and this. So, isit $value {this 0..9 {say "one digit"} this $_ < 99 {say "two digits"}} | 17:44 | |
17:44
wamba joined
17:46
ryn1x joined
|
|||
comborico1611 | You'd read it as, "$value isit this? No. This? No. This. Yes! | 17:46 | |
moritz | slightly confusing, because "this" in object-oriented code traditionally contains the invocant | 17:47 | |
comborico1611 | That's how i read it in c++. The switch and... (Forgot the "when" equivalent) was confusing wording. | 17:48 | |
moritz | case, probably | ||
comborico1611 | You're right. What about "that" ? | ||
Yeah, case... | |||
Switch and case are very foreign. Perl6 does much better. | 17:49 | ||
17:50
ryn1x left
|
|||
moritz | what's wrong with given/when? | 17:50 | |
"given a string, when it's 'x', print 42" | |||
17:50
cdg left
|
|||
comborico1611 | Stroustrup said switch statements are archaic. I think he meant obsolete. | 17:50 | |
moritz | also "given" works without "when" too | ||
17:51
cdg joined
|
|||
comborico1611 | He said that in his Programming book. | 17:51 | |
I see. | |||
moritz | m: given "abc" { say S/a/x/; .say } | ||
perlpilot | I'm pretty sure he didn't mean obsolete. There's still some good use case for the "simple" switch | ||
camelia | xbc abc |
||
moritz | perlpilot: duff's device, eh? :-) | ||
perlpilot | :-0 | ||
er, :-) | |||
comborico1611 | I really don't have the experience to make the judgement call. I only read it naturally as "is it" and "this". | 17:52 | |
El_Che | switch is a very ideomatic way to write if - if else - ... - else construction | ||
in go by example | |||
TimToady | the main problem with switch/case from my perspective is that it's using nouns that name the construct rather than just using natural functor words for topicalization and conditionalization | 17:53 | |
17:53
mr-foobar joined
|
|||
TimToady | it's as if, instead of "if", they used "conditional" | 17:53 | |
conditional $a == $b { say "True" } | 17:54 | ||
moritz | sounds very COBOLesque | ||
El_Che | mm | ||
moritz | just needs to shout it | ||
TimToady | at least COBOL had the sense to use verbs like PERFORM | ||
moritz | CONDITIONAL $a .EQ. $b { say "TRUE" } | ||
17:55
cdg left
|
|||
El_Che | TimToady: I had to read your sentence twice, but indeed. | 17:55 | |
TimToady | comborico1611: the problem with "isit" is that it sounds like it's asking a yes/no question, when it's really just topicalization | ||
17:55
mempko joined
|
|||
perlpilot | you know, I never really thought about why switch/case are named thusly or who came up with those names | 17:56 | |
El_Che | perlpilot: that's TimToady's job :) | ||
comborico1611 | I don't have the experience to understand topicalization. Bravo, though, for whoever came up with slurp and spurt. | 17:57 | |
AlexDaniel | hah :) | ||
moritz | slurp was easy | 17:58 | |
comborico1611 | The way I learn how to program, is to speak the commands in English. And, if I cannot figure out how to phrase in English, I don't learn it. | ||
moritz | but all English verbs that relate to produce large amounts of output at once sound kinda dirty | ||
TimToady | yeah, spurt is just the least worst :) | 17:59 | |
17:59
kaare_ left
|
|||
perlpilot | and it fits well with slurp | 17:59 | |
comborico1611 | I never realized spurt is a word. But it describes the priest peculiar action very well. | ||
Minus priest (Android keyboard) | 18:00 | ||
TimToady was wondering what the priest was spurting... | |||
timotimo | hey TimToady, how do you like the syntax 'sub foo($bar //= "hi") { }' for values that get a default if anything undefined or if nothing at all is passed? | 18:01 | |
perlpilot | timotimo: as opposed to? ;) | 18:02 | |
TimToady | it seems relatively straightforward | ||
comborico1611 | The only reason i have any interest in perl is because of your Think Big interview videos on YouTube. | ||
timotimo | 'sub foo($bar = "hi") { }' which gives a default if nothing is passed, otherwise lets anything through, even Nil or Any | ||
perlpilot: ^ | |||
AlexDaniel | speaking of naming things, I'm constantly bothered by stuff that has different amount of characters. For example: True and False | 18:03 | |
timotimo | True and Fals | ||
perlpilot | AlexDaniel: you'd rather Tru and Fal? ;) | ||
comborico1611 | Big Think* | ||
moritz | O_CREAT | ||
postgresql uses t and f for true and false | 18:04 | ||
AlexDaniel | True and Nono? :) Well, there are these thingies: ⊨ ⊭ … | ||
moritz | (though "true" and "false" also work, iirc) | ||
AlexDaniel | u: ⊨⊭ | ||
unicodable6 | AlexDaniel, U+22A8 TRUE [Sm] (⊨) | ||
AlexDaniel, U+22AD NOT TRUE [Sm] (⊭) | |||
perlpilot | comborico1611: long before I knew who Larry Wall was, I was draw to perl because a) someone I admired suggested it and b) once I played with it, I was amazed at how "comfortable" it felt -- lots of power and easy to get into and minimal restrictions | ||
comborico1611 | I see. | 18:05 | |
TimToady still doesn't know who Larry Wall is... | |||
AlexDaniel | but I guess ⊨ ⊭ are used for a different purpose so not that great of an idea | ||
El_Che | TimToady: a famous guy with hawaii shirt and big hats | 18:06 | |
perlpilot | TimToady: you can never know who someone is in the same way that you can never step in the same stream twice. | 18:07 | |
moritz | it's funny how children tend to ask the hard questions, like "who are you?" | 18:08 | |
18:08
kaare_ joined,
darkmorph left
|
|||
huf | that's easy... compared to the 49th "why" | 18:09 | |
comborico1611 | Alright, guys. I need to get ready for lunch. I'll have to tell my brother and wife that i spoke to the Larry guy today. Pretty neat! | ||
wander | perlpilot: perl is the best language of all bad languages, no language always be good :( | ||
yoleaux | 9 Nov 2017 20:46Z <Zoffix> wander: Yes: rt.perl.org/Ticket/Display.html?id...et-history You can see all open tickets on fail.rakudo.party (plus GitHub Issues: github.com/rakudo/rakudo/issues P.S.: we also have #perl6-dev | ||
El_Che | camelia: bon appetit | 18:10 | |
timotimo | perlpilot: any opinion on the //= thing in signatures? | 18:12 | |
moritz | botnom :-) | ||
perlpilot | wander: well ... it's just like when people ask "is this the best way to do X?"; you need some criteria for "best"--best along the "least memory usage" axis, best along the "fastest execution" axis, best because it's the simplest to understand, best because it's least likely to go wrong ... what's the criteria? All programming languages suffer this. | ||
timotimo: +1 | |||
wander | timotimo: so we have both `=` and `//=` ? | 18:14 | |
if implemented | |||
timotimo | yes | 18:15 | |
wander | a new trap :P | ||
perlpilot | wander: trap? | ||
moritz | I'm not sure there is need for that, but if there is, I like the syntax | 18:16 | |
wander | that how you imply 'default' parameter | ||
gfldex | m: multi s(Any:D $a) { say $a }; multi s(Any:U $a) { s 42 }; s Nil; | ||
camelia | 42 | ||
moritz | more often, I'd like to say on the caller side "give me the default" | ||
but //= is callee-side | |||
timotimo | jnthn pointed out he'd wanted that in the past | 18:17 | |
doing it on the caller side is a bit difficult, what with multiple dispatch and complicated signatures | 18:18 | ||
moritz | right | ||
I guess it helps if you have two functions, and one mostly passes arguments to the second | 18:19 | ||
wander | more like `sub f($a is default(42)) { ... }` and keep consistency of Nil assignment (quite verbose though) | ||
moritz | then you can get away with declaring the default values only in the second, and use a simple ? to make them optional in the first | ||
timotimo | no, signature binding is binding, not assignment | ||
18:20
Cabanossi left
|
|||
gfldex | m: multi s($a = 42){ say [$a ~~ Nil, $a.^name] }; s Failure.new("foo"); | 18:20 | |
camelia | [True Failure] | ||
18:22
ryn1x joined
|
|||
timotimo | interesting datapoint. if implemented naively, the definedness check in the //= will disarm a Failure object | 18:22 | |
m: my $foo = Failure.new("oh"); my $bar is default(99); $bar = $foo; say $bar; say $foo | |||
camelia | oh Actually thrown at: in block <unit> at <tmp> line 1 |
||
18:22
Cabanossi joined
|
|||
timotimo | m: my $foo = Failure.new("oh"); say "test"; my $bar is default(99); say "test2"; $bar = $foo; say $bar; say $foo | 18:23 | |
camelia | test oh test2 Actually thrown at: in block <unit> at <tmp> line 1 |
||
timotimo | m: my $foo = Failure.new("oh"); say "test"; my $bar is default(99); say "test2"; $bar //= $foo; say $bar; say $foo | ||
camelia | test oh test2 99 Actually thrown at: in block <unit> at <tmp> line 1 |
||
timotimo | hm, it doesn't say handled, eh? | ||
18:23
HaraldJoerg joined
|
|||
perlpilot | timotimo: what precipitated adding //= to sigs? (I know the topic if differentiating between the caller providing a value and providing a defined value keeps coming up, but I haven't really paid attention to the details) | 18:25 | |
timotimo | it's annoying to use flattening to get the default value for some argument | 18:26 | |
18:26
ryn1x left
18:32
mcmillhj left
18:36
lostinfog joined
18:38
Actualeyes left
18:44
darutoko left
|
|||
tbrowder | i just looked at wikipedia article on p6 and wonder if snake-case naming is worth a mention (it sure is handy for two-finger typists!) | 18:44 | |
18:44
wamba left
18:48
darkmorph joined
18:49
ryn1x joined
18:52
Cabanossi left,
Cabanossi joined
18:55
ryn1x left,
mcmillhj joined
18:57
geospeck joined
18:58
HoboWithAShotgun left
18:59
HoboWithAShotgun joined,
ryn1x joined
19:01
mcmillhj left
19:04
mcmillhj joined
19:09
ryn1x left
19:12
AndChat|688961 joined
19:13
comborico1611 left
|
|||
timotimo | but that's kebap-casing rather than snake-casing? | 19:13 | |
i *think* snake_casing is with underscores? | |||
wikipedia tends to agree on that | 19:15 | ||
19:15
rgrau left
19:19
Cabanossi left
19:21
lostinfog left,
AndChat|688961 left
19:22
comborico1611 joined
19:23
Cabanossi joined
19:28
geospeck left
|
|||
TimToady | I believe the reference is to a boa constrictor swallowing an elephant, as in stephaniebrewton.wordpress.com/201...r-talents/ | 19:28 | |
19:29
mson left,
Aceeri_ joined
19:36
dogbert17 joined
19:37
eliasr left
19:38
dct joined
19:39
philomath joined
19:44
TEttinger joined
|
|||
wander | what's your opinions on documented Named Regexes? Should it be in /lang/regex, /lang/grammar, or both (for verbose is sometimes good). | 19:44 | |
perlpilot | wander: redundancy is a good thing in this case IMHO | 19:45 | |
wander | additionally, 'subrules' don't have to be named | ||
comborico1611 | oin: khw [2601:281:8380:7f0:a5f4:ab25:7b30:eeab] | 19:46 | |
<robertle> comborico1611: I was in a talk by stroustrup a while ago, when C++11 came out. he was talking about reasons why C++ is a great language, and the weird thing is that all the time htroughout the talk I was thinking larry would have said teh same thing about perl! very odd experience | |||
<robertle> it was all about community, long-term outlook, maturity, a powerful language, what aprts of the language should be verbose adn which should not... | |||
Wander, you reminded me of that which was said earlier today. | 19:47 | ||
wander | what's that | ||
comborico1611 | Stroustrup saying which parts of the language should be verbose, and which parts shouldn't. | 19:48 | |
I just received news on when the next Deitel C++17 (from Paul Deitel himself) will be released. | 19:50 | ||
(Parentheses in a confusing place.) | 19:51 | ||
19:53
pentashift_ left
19:54
domidumont left
|
|||
tbrowder | sorry, i meant kebab | 19:54 | |
wander | emmmmm...now I am thinking about we ought to call them 'subrules' or something better | 19:55 | |
'Named regex' implies they should be named | |||
19:56
cdg joined
|
|||
wander | and we actually have declarator 'regex', 'rule' and 'token', so call them 'subrules' a little improperly | 19:56 | |
m: my $pattern = regex { \w+ }; say "abc" ~~ $pattern | 19:57 | ||
camelia | 「abc」 | ||
20:00
ufobat___ is now known as ufobat
20:05
mcmillhj left
|
|||
comborico1611 | let me preface this statement with this, I'm just giving my feedback as someone new to programming and you to Pearl 6. I don't actually think my way is the best way. No I'm going to write in that style. The topical variable is a bad name. Alias should be somehow used in the name. | 20:09 | |
You = new | |||
20:09
ryn1x joined
|
|||
ufobat | m: IO::Path::Win32.new(:volume<C:>, :basename("/\x[308]")).absolute.say | 20:09 | |
camelia | Cannot dispatch to method new on IO::Path because it is not inherited or done by IO::Path::Win32 in block <unit> at <tmp> line 1 |
||
comborico1611 | No = though | ||
ufobat | huh! | ||
comborico1611 | But I'm liking Perl6 more and more. | 20:10 | |
ufobat | m: IO::Path.new(:volume<C:>, :basename("/\x[308]"), :SPEC(IO::Spec::Win32).absolute.say | 20:11 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in argument list; couldn't find final ')' (corresponding starter was at line 1) at <tmp>:1 ------> 3]"), :SPEC(IO::Spec::Win32).absolute.say7⏏5<EOL> |
||
ufobat | m: IO::Path.new(:volume<C:>, :basename("/\x[308]"), :SPEC(IO::Spec::Win32)).absolute.say | 20:12 | |
camelia | IO::Path is disallowed in restricted setting in sub restricted at src/RESTRICTED.setting line 1 in method new at src/RESTRICTED.setting line 32 in block <unit> at <tmp> line 1 |
||
ufobat is confused, this works on my box | 20:13 | ||
20:14
ryn1x left,
cdg_ joined
20:15
mcmillhj joined
|
|||
comborico1611 | Hmm. Mysterious call from San Jose... I wonder who they could be... | 20:16 | |
20:17
cdg left
20:20
perlpilot left
|
|||
comborico1611 | They said i just won a trip to the Bahamas. | 20:23 | |
ufobat | my congratulations :-) | 20:24 | |
comborico1611 | Heh. I think it's a scam. I don't even live in California. | 20:27 | |
Great production they put on. | |||
20:30
troys is now known as troys_
20:34
census left
20:37
mempko left
20:44
ryn1x joined
20:47
comborico1611 left
20:49
ryn1x left
21:01
robertle left
21:04
troys_ is now known as troys
21:20
ryn1x joined
21:24
ryn1x left,
philomath left
21:25
comborico1611 joined
21:29
asdf23456 joined,
pilne joined
21:42
jstuder joined
|
|||
jstuder | hi everyone. | 21:42 | |
haven't been on irc yet | 21:43 | ||
I've contributed a bit to the doc repo | |||
as jstuder-gh (donkey picture) | 21:44 | ||
and wanted to introduce myself | |||
japhb | jstuder: Hi there! You happened to have come to visit during a bit of a lull. | ||
jstuder | i see. no problem | 21:45 | |
japhb | I normally don't follow this channel because it's much too fast most days. But since I happened to be here ... well, it's always nice to have someone respond when one says hello for the first time. :-) | ||
jstuder | I agree. Thanks | ||
I figured that I should pop in here since i've been contributing but have never actually spoken to anyone :P | 21:46 | ||
japhb | We're a pretty friendly bunch. | ||
But the mix of who is actually around varies pretty strongly by timezone and weekday v. weekend. | 21:47 | ||
jstuder | okay. thanks for the heads up. | ||
ufobat | welcome :-) | 21:48 | |
21:49
wamba joined
21:50
mcmillhj left
21:55
mcmillhj joined
|
|||
jstuder | In the doc repo, I noticed in doc/language/syntax that the { } hash literal operator is used. Since Issue #1380 states the %() is the preferred style, I want to change it to that. | 21:57 | |
I'm not sure if I should include the { } delimiters as well. It's already documented in doc/Type/Hash | |||
and I don't want to copy and paste the explanation as to why its not preferrable | 21:58 | ||
21:59
mcmillhj left
|
|||
jstuder | i figure that if people want to they can check Hash to get the full story. | 22:00 | |
any objections? | 22:01 | ||
22:11
cpage_ left,
darkmorph left
22:24
ryn1x joined
22:26
releasable6 left,
releasable6 joined
22:28
gregf_ left,
setty1 left,
ryn1x left
22:30
mr-foobar left
22:31
mr-foobar joined
22:33
mr-foobar left,
kaare_ left,
kaare__ joined
22:36
rgrau joined
22:48
mr-foobar joined
22:51
luke___ left
22:56
cpage_ joined
23:06
darkmorph joined
23:14
rindolf left
23:17
ryn1x joined
23:20
darkmorph left
23:21
ryn1x left,
Cabanossi left
23:22
Cabanossi joined
23:37
HaraldJoerg left
23:40
darkmorph joined
23:45
mson joined
23:49
darkmorph left
23:50
darkmorph joined,
ryn1x joined,
wamba left
23:55
mcmillhj joined,
ryn1x left
23:56
nadim left
|