»ö« 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 Zoffix on 25 May 2018. |
|||
00:03
mcmillhj joined
00:07
mcmillhj left
00:22
markoong left
00:24
stmuk_ joined
00:25
stmuk left
00:35
wamba left
00:39
mcmillhj joined
00:43
mcmillhj left
00:49
Guest56583 left
00:51
mcmillhj joined
01:00
giraffe joined
01:01
giraffe is now known as Guest76646
01:08
aindilis left
01:09
aindilis joined
01:13
mcmillhj left
01:14
mcmillhj joined
01:25
spycrab0 left
01:26
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
kjk joined,
Khisanth left
|
|||
kjk | so when perl6 wants a list or a collection of things from an object, what class or role of the object does it assume or expect? Is it just @ (the Positional role?) or Seq or Iterable or ... ? | 01:33 | |
01:34
fake_space_whale joined
01:36
zachk left
01:37
aborazmeh left
|
|||
kjk | like when I have a slurpy sub (*@args) and I pass it @some-args, it knows the sub wants a bunch of objects and it is given a bunch of objects so the objects are all collected in @args | 01:37 | |
but if I have an object of my own class, what interface does it expect my class to support? | 01:38 | ||
01:39
Khisanth joined
|
|||
kjk | hmm Positional and PositionalBindFailover ? | 01:44 | |
01:46
gabiruh left
01:51
stmuk joined
01:53
stmuk_ left
01:57
committable6 joined,
ChanServ sets mode: +v committable6
02:15
dustinm`_ joined,
jhill_ joined
02:16
obfusk_ joined,
a3f_ joined,
bartolin_ joined,
bonsaikitten joined,
syntaxma1 joined
02:17
bonsaikitten left,
bonsaikitten joined,
haxmeist1r joined,
lucs_ joined,
literal_ joined,
klapperl_ joined
02:18
mcmillhj_ joined,
hobbified joined,
timo joined
02:19
timo left,
timo joined,
benchable6 left,
statisfiable6 left,
bisectable6 left,
nativecallable6 left,
greppable6 left,
releasable6 left,
Schepeers left,
scovit left,
obfusk left,
dylanwh joined,
dustinm` left,
mcmillhj left,
gfldex left,
klapperl left,
xiaomiao left,
cgfbee left,
Brock joined,
krunen_ joined,
jhill_ left,
jhill_ joined
02:20
krunen_ is now known as krunen,
Schepeers joined,
scovit joined,
Schepeers left,
dylanwh left,
b2gills joined,
dylanwh joined,
mtj_ joined,
lizmat left
02:21
cgfbee joined
02:22
jdv79 joined,
kjk left
02:23
moritz joined
02:24
avar joined,
gfldex joined
02:25
Schepeers joined
02:26
Schepeers left,
avar left,
avar joined
02:27
Schepeers joined
02:37
mcmillhj_ left,
kerframil left
02:42
mcmillhj joined
02:47
mcmillhj left,
literal_ is now known as literal
02:48
p6noob left
|
|||
Geth | doc: 1f70c83ebd | Coke++ | doc/Language/101-basics.pod6 Pass example compilation test |
02:50 | |
synopsebot | Link: doc.perl6.org/language/101-basics | ||
02:54
mcmillhj joined
02:56
mingdao joined
02:57
bisectable6 joined,
greppable6 joined,
statisfiable6 joined
02:59
mcmillhj left
03:02
aindilis left
03:05
mcmillhj joined
03:06
gabiruh joined
03:10
psychoslave joined,
mcmillhj left
03:11
gabiruh left
03:13
psychoslave left,
psychoslave_ joined
|
|||
b2gills | .tell lizmat in Weekly 2018.27: my account is b2gills not bdgills | 03:21 | |
03:30
aindilis joined
03:35
mcmillhj joined
03:36
caa51h joined
03:38
psychoslave_ left
03:40
mcmillhj left,
Xliff left
03:45
molaf joined
03:49
eliasr left
03:51
mcmillhj joined
03:55
mcmillhj left
04:07
gabiruh joined
04:11
yoleaux joined,
ChanServ sets mode: +v yoleaux
04:12
gabiruh left
04:19
hami joined
04:21
mcmillhj joined
04:22
molaf left
04:26
mcmillhj left
04:31
hami left
04:32
mcmillhj joined
04:35
epony left
04:36
mcmillhj left
04:45
sno left
04:48
aindilis left
04:52
aindilis joined
04:54
ufobat_ joined,
curan joined
05:05
stmuk left,
stmuk_ joined
05:08
mcmillhj joined
05:09
gabiruh joined
05:12
mcmillhj left
05:13
gabiruh left
05:16
xtreak joined
05:18
wamba joined
05:27
benchable6 joined
05:36
bonsaikitten left
05:37
xiaomiao joined
05:38
mcmillhj joined
05:43
mcmillhj left
05:44
jmerelo joined
05:46
stmuk joined
05:49
stmuk_ left
05:51
ChoHag left
|
|||
masak | has anyone here tried Marpa for parsing? | 05:54 | |
05:58
mcmillhj joined
06:02
mcmillhj left
06:07
sno joined
|
|||
jmerelo | masak: not that I now. If you're in Twitter, @jluis10 has given several talks on the subject. | 06:08 | |
yoleaux | 9 Jul 2018 21:04Z <tbrowder_> jmerelo: what is your final destination in Japan? | ||
jmerelo | .tell tbrowder_ I'm going to Osaka and then to Kyoto. | ||
yoleaux | jmerelo: I'll pass your message to tbrowder_. | ||
06:09
gabiruh joined
|
|||
masak | I'm fascinated by Jeffrey Kegler's blogging output, but I've yet to understand exactly what the Earley parser _is_ | 06:09 | |
jmerelo | masak: link? | 06:10 | |
06:11
Technato1 joined
|
|||
masak | jmerelo: I just finished reading jeffreykegler.github.io/Ocean-of-Aw...965_2.html | 06:12 | |
but I've recently read jeffreykegler.github.io/personal/timeline_v3 and found it very interesting | |||
Kegler's main thesis can maybe be summarized as "people who care about parsers have been doing mostly the wrong thing for decades, and I can show you how to do it right" | 06:13 | ||
06:13
gabiruh left
|
|||
masak | (I hope I'm doing it justice by phrasing it that way. it sounds a bit hubristic when phrased like that, but I'm pretty sure that's the message.) | 06:14 | |
06:17
mcmillhj joined
|
|||
masak | here he weighs in on Perl 6 parsing: jeffreykegler.github.io/Ocean-of-Aw...pdown.html | 06:17 | |
06:17
troys left
06:21
mcmillhj left
06:22
sauvin joined
|
|||
jmerelo | masak: sounds totally hubristic, but there could be a bit of true there... | 06:23 | |
bit of truth, I mean. | 06:24 | ||
masak | I'll say this: this has the *structure* of the kind of hubristic assertions that happen to be true | ||
(which is still not a total guarantee, but at least puts it in my "interesting, to read" inbox) | 06:25 | ||
jmerelo | masak: I've heard many good things about Marpa, most of which are over the top of my head. Heard them mostly from that person, a Barcelona Perl Monger. | ||
06:25
fake_space_whale left
|
|||
Geth | doc/master: 4 commits pushed by (JJ Merelo)++ | 06:37 | |
06:38
fake_space_whale joined
06:39
konsolebox left
06:41
go|dfish joined,
konsolebox joined
06:45
fake_space_whale left,
mcmillhj joined
06:46
HaraldJoerg joined
06:50
mcmillhj left
06:51
psychoslave joined
07:02
mcmillhj joined
|
|||
Geth | doc: ef5badcc1e | (JJ Merelo)++ | doc/Language/operators.pod6 Uniforms capitalization refs #1945 |
07:04 | |
synopsebot | Link: doc.perl6.org/language/operators | ||
07:07
mcmillhj left
07:10
gabiruh joined
07:13
domidumont joined
07:15
gabiruh left
07:19
domidumont left
07:20
Technato1 left,
domidumont joined
07:21
Technato1 joined
07:22
DarthGandalf joined
07:23
dakkar joined
07:24
wamba left
07:27
lizmat joined
|
|||
lizmat clickbaits p6weekly.wordpress.com/2018/07/09/...to-perl-6/ | 07:28 | ||
07:29
DarthGandalf left,
silug left
07:36
mcmillhj joined
07:37
Technato1 left
07:41
mcmillhj left
07:42
DarthGandalf joined
07:44
cpage_ joined
07:46
cpage left,
cpage_ is now known as cpage,
HaraldJoerg1 joined
07:48
HaraldJoerg left
07:51
Some-body_ joined
07:52
DarthGandalf left,
Some-body_ is now known as DarthGandalf
07:55
ChoHag joined,
xinming_ joined
07:56
Technato1 joined
07:58
xinming left
08:02
wamba joined,
Some-body_ joined
08:03
DarthGandalf left,
mcmillhj joined,
Some-body_ is now known as DarthGandalf
08:06
Qwerasd joined
|
|||
Qwerasd | How could I take an array, say ['foo', 'bar', 'baz'] and turn it in to a multi-level hash access (i.e. %hash{'foo'}{'bar'}{'baz'})? | 08:07 | |
08:07
mcmillhj left
|
|||
moritz | m: my %h = foo => { bar => {baz => 'x'}}; my $current = %h; $current = $current{$_} for <foo bar baz>; say $current | 08:10 | |
camelia | x | ||
moritz | Qwerasd: ^^ | ||
Qwerasd | :o | ||
08:11
gabiruh joined
|
|||
Qwerasd | What if I wanted to set the value at that location though? is $current at the end a reference to the actual location in the hash? | 08:11 | |
moritz | m: my %h = foo => { bar => {}}; my $current = %h; $current = $current{$_} for <foo bar baz>; $current = 'flurb'; say %h | ||
camelia | {foo => {bar => {}}} | ||
moritz | m: my %h = foo => { bar => {}}; my $current := %h; $current := $current{$_} for <foo bar baz>; $current = 'flurb'; say %h | 08:12 | |
camelia | {foo => {bar => {baz => flurb}}} | ||
moritz | works with binding | ||
Qwerasd | That's really cool. | ||
How could I filter out empty strings from an array? | 08:15 | ||
moritz | m: say ('abc', '', 'def').grep(&chars).perl | ||
camelia | ("abc", "def").Seq | ||
08:15
gabiruh left
|
|||
Qwerasd | coool | 08:16 | |
moritz | m: say ('abc', '', 'def').grep(&so).perl | ||
camelia | ("abc", "def").Seq | ||
08:22
Kaiepi joined
|
|||
Kaiepi | love when my irc client refuses to reconnect to channels | 08:22 | |
08:25
scimon joined
08:29
rindolf joined
|
|||
Qwerasd | How can I do a breadth-first search on a hash? | 08:30 | |
masak | Qwerasd: manually | ||
Qwerasd | I essentially want to get a layer at a depth n of a hash | ||
08:30
Technato1 left
|
|||
masak | Qwerasd: I think I'd do it as a helper function that takes a list of hashes, and gives back all the values of all the hashes | 08:31 | |
that'd be "one layer" of the BFS | |||
Qwerasd | if I have {a => { b => 'c' }, 1 => { 2 => 3 }}, and I want to get [[a, 1], [b, 2], ['c', 3]] how would I do that? | ||
08:32
xtreak left,
Technato1 joined
|
|||
masak | I don't think I can generalize exactly what you want from that example. | 08:32 | |
Qwerasd | ** ignore that ['c', 3], I only am interested in keys. | ||
masak | are there always two keys at the top level? what if there are more? | ||
Qwerasd | There are an arbitrary number of keys at any level | 08:33 | |
08:33
sena_kun joined
|
|||
Qwerasd | I'm generating a sitemap and I want to do a breadth-first search through it. | 08:33 | |
I guess I could do a recursive function. | 08:35 | ||
08:36
Ven` joined
|
|||
masak | a recursive function won't give you BFS | 08:36 | |
if it's DFS you want, a recursive function is fine | |||
Qwerasd | No, I mean a recursive function in order to get all keys at a certain level. Kinda a DFS for keys at a given level | 08:37 | |
08:38
quester joined
|
|||
masak | m: my %h = a => { b => { c => 0, d => 1 } }; sub level(%h, $l) { my @hashes = [%h]; for ^$l { @hashes = @hashes.map(*.values).flat }; return @hashes.map(*.keys).flat }; for 0..2 -> $L { say "Keys on level $L: ", level(%h, $L) } | 08:39 | |
camelia | Keys on level 0: (a) Keys on level 1: (b) Keys on level 2: (c d) |
||
Qwerasd | woah | 08:40 | |
Are you a wizard? | |||
quester | Yes, indeed Qwerasd. Masak is the author of strangelyconsistent.org/, designed most of what exists of the Perl6 implementation of macros, and... well, you can make up your own mind about wizardhood. | 08:47 | |
masak | according to strangelyconsistent.org/blog/perl-6-is-my-mmorpg I'm a warrior ;) | 08:49 | |
08:49
DarthGandalf left
|
|||
masak | there are plenty of mages around here, though | 08:49 | |
moritz | masak: I was about to bring that one up :-) | 08:50 | |
masak | moritz: I get to be quicker occasionally :P | ||
masak .oO( meet my brother, Tweedledee ) | |||
08:53
DarthGandalf joined
08:54
mcmillhj joined
|
|||
moritz | being a book author, am I an Archer now? | 08:54 | |
08:54
quester left
08:56
Some-body_ joined
08:58
DarthGandalf left,
Some-body_ is now known as DarthGandalf
08:59
mcmillhj left
09:00
sno left
|
|||
masak | I think books count as crossbows | 09:00 | |
Qwerasd | OK, I'm stumped. How could I modify that level function to ignore anything named with an empty string? | 09:02 | |
{'' => 'ignored', foo => {not => 'ignored'}} | 09:03 | ||
(not => 'ignored' is not ignored) | 09:04 | ||
09:05
spycrab0 joined,
sno joined,
Ven` left
|
|||
Qwerasd | Nvm solved it. | 09:07 | |
Maybe 0 sleep isn't the best for writing code :p | |||
09:07
xtreak joined
|
|||
masak | m: my %h = a => { b => { c => 0, d => 1 }, "" => { e => 1 } }; sub level(%h, $l) { my @hashes = [%h]; for ^$l { @hashes = @hashes.map(*.values).flat }; return @hashes.map(*.keys).flat.grep(* ne "") }; for 0..2 -> $L { say "Keys on level $L: ", level(%h, $L).perl } | 09:08 | |
camelia | Keys on level 0: ("a",).Seq Keys on level 1: ("b",).Seq Keys on level 2: ("e", "d", "c").Seq |
||
masak | the `.grep(* ne "")` is the addition | ||
Qwerasd | Yep | ||
Am I mistaken or would `.grep(*)` remove everything falsey? | 09:09 | ||
masak | you are mistaken :/ | 09:10 | |
m: my @a = "", 1, 0, "hi"; say @a.grep(*).perl | |||
camelia | ("", 1, 0, "hi").Seq | ||
09:10
mcmillhj joined
|
|||
masak | I mean, your instinct is sound, but the generalization is false | 09:10 | |
Qwerasd | I guess .map(-> $e {$e if $e}) will have to do | ||
moritz | Qwerasd: .grep(&so) removes everthing falsey | ||
masak | you can also do .grep({ $_ }) or .grep(*.so) | ||
or what moritz said | 09:11 | ||
Qwerasd | ah | ||
Thank you so much. | |||
masak | it's important to know that `* ne ""` is a WhateverCode but `*` is a Whatever, and they work differently in (e.g.) `.grep` | ||
09:11
gabiruh joined
|
|||
masak | think of it as a "wart" in the language | 09:12 | |
lizmat has been tempted many times to add a Whatever candidate for .grep that would do ?$_ | 09:13 | ||
masak | that temptation is there, for sure | ||
moritz | lizmat: you mean one without a matcher argument? | ||
masak | I think a discontinuity would show up _somewhere_ in the language, though, just further out | ||
lizmat | no. @a.grep(*) meaning @a.grep: { so $_ } | ||
masak | because we mean a whole lot of things by Whatever, not just that thing | 09:14 | |
lizmat | yeah, so the shortest way would really be: | ||
@a.grep: ?* | |||
masak | lizmat: I mean, an equally valid argument (I think) could be made for `@a.grep(*)` meaning "retain all the elements of @a" | ||
09:14
mcmillhj left
09:15
Ven` joined
|
|||
lizmat | yes, indeed, that's why I haven't done it :-) | 09:15 | |
masak | as in "whatever, I don't care to grep for things today" | ||
lookatme | work out a normal solution | ||
m: multi sub f(Hash $f, @a) { @a[@a.end].append: $f.keys; $f.values; } ; multi sub f($f, @a) { @a[@a.end].push($f); $*f = True;}; my @h = $%{a => { b => "c" }, 1 => { 2 => 3 }}; my @a = [[], ]; my $*f; while not $*f { @h = flat (f $_, @a for @h); @a.push: [];}; dd @a; | |||
camelia | Array @a = [["1", "a"], ["2", "b"], [3, "c"], []] | ||
lookatme | off work | ||
moritz | reminds me of the Date.new situation | ||
where it used to return Christmas, but people were surprised by that | |||
09:16
psychoslave left
|
|||
moritz | and I thought that if you want a specific date, they should say which one | 09:16 | |
lizmat | m: my @a; @a[9] = 1; dd @a.grep(*) # masak: seems it already does what you mean :-) | ||
camelia | (Any, Any, Any, Any, Any, Any, Any, Any, Any, 1).Seq | ||
09:16
gabiruh left
|
|||
masak | my _absolute favorite_ use of the whatever star is still `.indent(*)` where it means "the most aggressive deindentation possible" | 09:17 | |
lizmat: only about half of me meant that :P | |||
jnthn | grep smartmatches against the argument, and anything ~~ * is True | 09:18 | |
masak | actually, my main point is that an irreducible discontinuity exists | ||
between "smartmatch anything" (because of Whatever's smartmatch semantics) and "boolify" (because of consistency with WhateverCode in grep), in this case | 09:20 | ||
09:22
pecastro joined
|
|||
jnthn | Not sure I see the discontinuity. A WhateverCode happens to be written with a syntax using *, but it's a distinct type from Whatever and so can have its own smartmatch semantics. | 09:24 | |
masak | jnthn: | ||
<Qwerasd> Am I mistaken or would `.grep(*)` remove everything falsey? | |||
09:24
HaraldJoerg joined
|
|||
masak | jnthn: the discontinuity is not so much in the language as in people's expectations | 09:25 | |
jnthn | Well, "some people's", but yes, fair enough. :) | ||
moritz | we also have [] or [*] for "give me everything | ||
jnthn | And I guess the difference between Whatever and WhateverCode is not the first thing one would learn. :) | 09:26 | |
09:26
HaraldJoerg1 left
09:29
jeromelanteri joined,
mcmillhj joined
|
|||
Altreus | I just learned it | 09:29 | |
I just learned *of* it | |||
I have yet to learn it :P | |||
09:33
psychoslave joined
09:34
mcmillhj left
09:36
psychoslave left
|
|||
Qwerasd | So I'm using Data::Dumper::Tree and trying to set the option display_address to False, however: Type check failed in assignment to $!display_address; expected DDT_Address_Display but got Bool (Bool::False) | 09:37 | |
09:40
mcmillhj joined
09:42
pmurias joined
|
|||
lizmat | Qwerasd: that feels like it should be reported to the DDT author | 09:43 | |
Qwerasd | Is it a bug then? I wasn't sure if I was just being dumb, cause the documentation says it's True by default implying it's boolean | 09:44 | |
09:44
mcmillhj left
|
|||
lizmat | Qwerasd: I have no idea, it's not even in the ecosystem ?? | 09:45 | |
jmerelo | lizmat: DDT? Isn't it part of Rakudo? | 09:46 | |
lizmat | is it? | ||
Qwerasd | I found it via modules.perl6.org and installed it via zef | ||
jmerelo | lizmat: ah, no, it's not github.com/nkh/P6-Data-Dump-Tree | ||
Hum, but that's data _Dump_, not dumper... | 09:47 | ||
Qwerasd | Oh oops | ||
my bad, tired brain made a typo | |||
I indeed am talking about Data::Dump::Tree | |||
lizmat | Qwerasd: I suggest filing an issue at github.com/nkh/P6-Data-Dump-Tree/issues | 09:48 | |
jmerelo | lizmat: the tiny data dumper is part of Rakudo... And you wrote it :-) My mistake | ||
lizmat | jmerelo: yeah, so tiny it lost the T | ||
09:48
psychoslave joined
09:50
vimal2012 joined
09:51
vimal2012 left
|
|||
pmurias | Qwerasd: the docs to that module are outdated | 09:53 | |
Qwerasd | Oh? | ||
pmurias | Qwerasd: the modules used to expect a boolean for that parameter but it has been changed to an enum | ||
Qwerasd | How would I do that? | 09:54 | |
pmurias | github.com/nkh/P6-Data-Dump-Tree/b...nums.pm#L5 | ||
Qwerasd | Idk how 2 use enum | 09:55 | |
lizmat | try using DDT_DISPLAY_NONE instead of False | 09:56 | |
pmurias | github.com/nkh/P6-Data-Dump-Tree/b...se_class.t | ||
Qwerasd: ^ use can use that test as an example | |||
Qwerasd | err | 09:59 | |
Undeclared name: DDT_DISPLAY_NONE | |||
lizmat | try 0 then :-) | ||
Qwerasd | Oh I need to use the enums | ||
Thanks for the help! | 10:01 | ||
AlexDaniel | If anyone here is using Matrix and is not in perl 6 community, please let me know and I'll add you | ||
pmurias | Qwerasd: if you like the module, consider making a PR to fix the docs ;) | ||
Qwerasd | Can I get stdout as an IO::Handle? | 10:10 | |
10:11
mcmillhj joined
|
|||
AlexDaniel | Qwerasd: a handle to what? | 10:12 | |
Qwerasd | I'm not sure what you're asking me | ||
jmerelo | Qwerasd: you probably want $*OUT | ||
Qwerasd: docs.perl6.org/language/variables#...-%24%2AOUT | |||
Qwerasd | Ah yep, thanks | ||
AlexDaniel | ah, I thought this was about Procs :) | 10:13 | |
10:13
vimal2012 joined,
gabiruh joined,
Technato1 left,
vimal2012 left
10:14
Technato1 joined,
MasterDuke left
10:17
mcmillhj left,
psychoslave left,
gabiruh left
|
|||
tyil | AlexDaniel: is the Matrix perl 6 not linked to freenode's #perl6? | 10:24 | |
10:28
mcmillhj joined
10:29
scimon left
10:30
scimon joined
|
|||
pmurias | what is this Matrix thing? | 10:30 | |
10:31
tyil[m] joined
|
|||
tyil | pmurias: check matrix.org | 10:31 | |
it's a federated chat protocol | |||
some would describe it as "the next best thing after irc" | |||
I was unconvinced mostly due to the lack of good clients about a year ago | |||
10:33
mcmillhj left
|
|||
Qwerasd | How would I make a flag option for the command line? | 10:33 | |
lizmat | sub MAIN(:$foo) { } | ||
would give you --foo | |||
Qwerasd | Cool thanks | 10:34 | |
lizmat | docs.perl6.org/routine/MAIN#declar...%28MAIN%29 | 10:36 | |
10:38
tokik joined
|
|||
tyil | using riot.im I get the message from firefox that the webpage is slowing down the entire browser :'D | 10:39 | |
10:39
tokik left,
releasable6 joined
|
|||
AlexDaniel | pmurias: demonstration: riot.im/app/#/group/+perl6:matrix.org | 10:40 | |
there's also a twitter feed there, but looks like it's not visible to guests | |||
tyil: there's no native matrix perl 6 room | 10:41 | ||
tyil | hmm | ||
it's been over a year since I last logged in there | |||
AlexDaniel | I mean, #freenode_#perl6:matrix.org works just fine for that purpose | ||
tyil | what's the speciality of a community | ||
I dont think I've seen that before | |||
AlexDaniel | yeah, it's relatively new | ||
tyil | I thought you ment just a Perl 6 channel | ||
but on Matrix | 10:42 | ||
AlexDaniel | basically it's a group of rooms + a basic html page | ||
well, a list of rooms | |||
tyil[m] | ah | ||
does it automatically join all the Perl 6 related channels/room when joining a community? | |||
10:42
psychoslave joined
|
|||
pmurias | so it's sort of slack like thing | 10:42 | |
? | |||
AlexDaniel`` | I don't think it joins all of them | 10:43 | |
10:43
kaare__ joined
|
|||
AlexDaniel`` | but at least you can easily see the list :) | 10:43 | |
10:43
Technato1 left
|
|||
AlexDaniel | pmurias: yeah | 10:43 | |
pmurias: but bettah! | |||
because open-source all the way through and federated | |||
tyil[m] | open source and federation are very nice | ||
slack will hold your chat history hostage | 10:44 | ||
which doesn't sound open software/project friendly | |||
10:44
Technato1 joined
|
|||
tyil | the riot.im app is incredibly slow and using almost a full core :( | 10:45 | |
the web app I mean | |||
tbrowder_ | .tell jmerelo i was in japan for a couple of years in my youth. i will share stories of that time if we cross paths at a perl mtg someday | ||
yoleaux | 06:08Z <jmerelo> tbrowder_: I'm going to Osaka and then to Kyoto. | ||
tbrowder_: I'll pass your message to jmerelo. | |||
10:45
kaare__ left
|
|||
AlexDaniel | hmmm did you enable stickers? | 10:45 | |
I think there's a litle bug with loading the stickers, but could be anything | |||
I'm not seeing that here | |||
10:46
mcmillhj joined,
kaare__ joined
|
|||
tyil | idk, I just tried logging in and accepting the Perl 6 community invite | 10:46 | |
AlexDaniel | tyil[m]: I'd say the biggest problem currently is that most people use matrix.org which is really overloaded | 10:47 | |
tyil | got about 50 invites waiting on me ;~; | ||
that could be true, I don't know about the stats or load of any matrix servers | |||
AlexDaniel | well, on matrix.org you'd normally get like… uh… um… 3-4 seconds delay when sending a message… | 10:48 | |
also presence events are disabled because that would make it even worse… | |||
so everyone appears offline! :) | |||
but yeah, all that goes away once you start running your own homeserver :) | 10:49 | ||
10:49
kaare__ left
|
|||
tyil | do we have a Perl homeserver planned yet? :p | 10:49 | |
AlexDaniel | but I wonder, don't we want matrix homeserver on perl6.org? That'd be fun | 10:50 | |
yeah | |||
10:50
mcmillhj left
|
|||
tyil | it doesn't have to be Perl 6 specific, just Perl in general to cater to both 5 and 6 would be cool | 10:51 | |
AlexDaniel | I think you're right | ||
tyil | oh, pmurias: Matrix can bridge with an existing Slack community | 10:52 | |
so you can use Matrix to be part of all your Slack communities you're already in | |||
(but that will require some admins from your slack communities to approve it and configure it) | 10:53 | ||
10:58
Zoffix joined
11:01
pmurias left
11:03
mcmillhj joined
11:04
daxim left,
daxim joined
|
|||
Zoffix | New blog post: "Cancellation of Perl 6 Constants and Rationals Grant": blogs.perl.org/users/zoffix_znet/20...grant.html | 11:05 | |
11:08
mcmillhj left
11:12
pmurias joined
11:13
gabiruh joined
11:18
epony joined,
gabiruh left
11:19
mcmillhj joined
|
|||
jmerelo | tbrowder_: I hope that will happen in the near future. Going to Glasgow, maybe? | 11:19 | |
yoleaux | 10:45Z <tbrowder_> jmerelo: i was in japan for a couple of years in my youth. i will share stories of that time if we cross paths at a perl mtg someday | ||
tbrowder_ | a long shot, but trying to convince wife... | 11:20 | |
jmerelo | tbrowder_: Best of luck! | ||
tbrowder_ | thnx! are you there on academic business | 11:21 | |
jmerelo | tbrowder_: yep. | 11:22 | |
tbrowder_: first to Osaka for this summer school sigevo-summer-school-2018.github.io/ | |||
tbrowder_ | presenting? if so, title? | ||
jmerelo | then to Kyoto for GECCO: gecco-2018.sigevo.org/index.html/tiki-index.php | ||
pmurias | 6~/exit | ||
jmerelo | I'm actually presenting a couple of papers of stuff I did with Perl 6 :-) | ||
11:22
pmurias left
11:23
Ven` left
|
|||
tbrowder_ | very nice, good PR! | 11:23 | |
11:23
mcmillhj left
|
|||
jmerelo | tbrowder_: I'll share the slides as soon as they are ready, but the papers are available from my GitHub account. | 11:23 | |
tbrowder_: first one is about stateless concurrent evolutionary algorithms, and another about my EA library in Perl 6. My Mexican colleague, Mario, will be presenting that one. | 11:24 | ||
tbrowder_: thanks for asking :-) We people in academia can't seem to stop talking about our shit | |||
Here's the EA library: modules.perl6.org/dist/Algorithm::...an:JMERELO | |||
Qwerasd | How do I find the index of a certain elem in an array? | ||
tbrowder_ | have you used tha p6 genetic stuff written in pdf on the p6 site? | 11:25 | |
jmerelo | tbrowder_: He, no. I just wrote a few examples with a dummy DNA class. It could be used to optimize layout, for instance. I don't know. If someone can think about something, would gladly give it a try. | 11:26 | |
tbrowder_ | ref academia: Prof. Donald Knuth is one of my favorite people. i wish i could attend one of his regular seminars. | 11:28 | |
11:28
obfusk_ left,
obfusk joined
|
|||
tbrowder_ | can’t belive the mountains of work he has accomplished | 11:29 | |
11:33
daxim left
11:36
Zoffix left
11:37
mcmillhj joined
11:39
daxim joined,
noganex left
11:42
mcmillhj left
11:44
noganex joined
|
|||
jmerelo | tbrowder_: I never had the chance. Read some interviews | 11:44 | |
lizmat | Qwerasd: you can't, but you can loop like this: | 11:45 | |
Qwerasd | Thanks - but it turns out there was a better way to go about what I was doing. | ||
lizmat | m: my @a =<a b c>; for @a.kv -> $i, $letter { say "$i: $letter } | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in double quotes; couldn't find final '"' (corresponding starter was at line 1) at <tmp>:1 ------> 3a.kv -> $i, $letter { say "$i: $letter }7⏏5<EOL> expecting … |
||
lizmat | m: my @a =<a b c>; for @a.kv -> $i, $letter { say "$i: $letter" } | ||
camelia | 0: a 1: b 2: c |
||
11:45
kerframil joined
11:49
pmurias joined
11:52
mcmillhj joined
11:56
mcmillhj left,
Ven` joined
12:07
AlexDaniel left
12:14
gabiruh joined
12:17
llfourn joined
12:18
Zoffix joined,
gabiruh left
|
|||
Zoffix | m: say <a b c>.first: :k, "b" | 12:18 | |
camelia | 1 | ||
timo | m: say <a b c>.index("b") | 12:20 | |
camelia | 2 | ||
timo | oh? | ||
ah, that's the string one | |||
Zoffix | Yes | ||
timo | so the space in between counts | ||
masak .oO( significant whitespace ) | 12:28 | ||
12:28
gabiruh joined,
xtreak left
|
|||
Altreus | m: say <a b c>.index("b") | 12:31 | |
camelia | 2 | ||
12:31
xtreak joined
|
|||
Altreus | not *that* significant :P | 12:31 | |
standard significant | |||
tyil[m] | AlexDaniel: heh, I get to see camelia 's output before I see what timo and zoffix were trying to run with `m:` | ||
on matrix, that is | |||
timo | fabulous | 12:32 | |
tadzik | yeah, the irc bridge can be kind of wacky, especially with the ordering sometimes :) | ||
Zoffix | m: say <a b c>.Str.index("b") | 12:33 | |
camelia | 2 | ||
Zoffix | m: say <a b c>.Str.perl.say # this whitespace is what was meant | ||
camelia | "a b c" True |
||
masak | significant-ish. significant-oid. | 12:34 | |
12:36
xtreak left
|
|||
Altreus | it's the usual significance of whitespace, i.e. "any" vs "none" | 12:39 | |
is what I meant :) | |||
12:40
mcmillhj joined
|
|||
Zoffix | But I meant that you seem to mean that how you write `<a b c>` is where the significance is at, where that doesn't matter at all, it's how a List stringifies. | 12:40 | |
masak | it's not the same whitespace at all | 12:41 | |
Zoffix | m: my @l := <a b c> but "abc"; say @l.index: "b" | ||
camelia | 1 | ||
masak | the whitespace that you put into the source code is lovingly handcrafted. it's made by the sweat of your brow. | ||
Zoffix | m: my @l := "abc".comb.List; say @l.index: "b" | ||
camelia | 2 | ||
masak | the whitespace that .perl spits out is totally synthetic. I wouldn't eat it if I got paid to. | 12:42 | |
Zoffix | It's .Str tho | ||
12:42
Zoffix left
|
|||
masak | my point still stands. | 12:42 | |
I refuse to eat whitespace that's been made by a machine. | |||
Altreus | indeed, I don't think the whitespace that .Str gives us is worthy of attention | 12:43 | |
just set $" xD | |||
masak | m: $" | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Name must begin with alphabetic character at <tmp>:1 ------> 3$7⏏5" expecting any of: infix infix stopper statement end statement modifier … |
||
Altreus | I presume there is some analogy to that | ||
masak checks S28 | |||
Altreus | perl 5-to-6 doesn't seem to mention the punctuation variables | 12:44 | |
12:44
jeromelanteri left
|
|||
masak | no, there is no analogue | 12:44 | |
Altreus | nope, just uses spaces | 12:45 | |
masak | m: my $long-boi = <a b c> but role { method Str { self.join(" ") } }; say $long-boi.Str | ||
camelia | a b c | ||
masak | there ya go | ||
Altreus | nevertheless, "significant whitespace" to me is a term that means that the whitespace you put in the code has an effect on the outcome of the code | ||
masak | who needs special globals | ||
Altreus | And by this definition perl6 has significant whitespace only in that if you put none it is different from putting some | 12:46 | |
masak | Altreus: you're correct in so terming it ;) | ||
Altreus | As a derogatory term, "significant whitespace" simply means that the amount of whitespace you use is significant | ||
masak | we don't have time to be derogatory here | ||
Altreus | as opposed to being a binary state of existance | ||
12:47
sysdef joined
|
|||
Altreus | indeed, we have a future to craft | 12:47 | |
masak | I don't care how your significant your whitespace is -- hurry up and help! :P | ||
s/your // | |||
12:48
benjikun joined
12:49
benjikun2 left
12:52
Qwerasd left
12:55
jhill_ is now known as jhill
|
|||
Ulti | :cool: my tests are running about 20% faster than at xmas | 12:55 | |
++ all the peeps doing optimisation | 12:56 | ||
12:56
daemon joined
|
|||
Ulti | two sudden 10% jumps in the last month or so too | 12:56 | |
masak | m: say 100 * 1.1 * 1.1 | ||
camelia | 121 | ||
daxim | <blogs.perl.org/users/zoffix_znet/20...t.html> which direction does the word "remitted" mean, TPF→Zoffix or other way around? | 12:57 | |
lizmat | since TPF has not approved any payment for the grant yet, it means that Zoffix will not get paid for any of the work he's done | 13:01 | |
13:01
HaraldJoerg1 joined
|
|||
lizmat | at least that's the way I've interpreted it | 13:01 | |
13:01
HaraldJoerg left
13:12
scimon left
13:14
kerframil left
13:21
Zoffix joined
|
|||
Zoffix | Right, the work that's been done on constants has been done on volunteer basis. | 13:21 | |
13:23
silug joined
13:25
jmerelo left
13:27
Zoffix left
13:28
molaf joined
|
|||
pmurias | another naming question, what would be a good file extension for Perl 6/NQP precompiled to binary for use by the GraalVM/Truffle backend? | 13:32 | |
13:34
bdmatatu joined
|
|||
lizmat | .truffle ? | 13:34 | |
timo | that's a bit over-generic? | ||
there's more truffle than nqp | 13:35 | ||
El_Che | is .truffel6 ? | ||
timo | .tru64 | ||
El_Che | ooh | ||
:) | |||
lizmat | timo: that same argument would apply to .moarvm ? | 13:36 | |
tbrowder_ | “.nqp.truf” | ||
timo | but .moarvm files have their format dictated by moarvm itself, right? | ||
lizmat | is that so? no Perl 6 specific things in there ? | ||
I thought there were ? | |||
timo | i was assuming the perl6/nqp precompiled binary stuff for the gvm/t backend was a home-baked format | ||
13:37
Technato1 left,
Technato1 joined
|
|||
tbrowder_ | any rumors about site of next TPC::NA? A city in Canada would be nice, like Quebec City | 13:38 | |
lizmat | Pittsburgh, afaik | 13:39 | |
pmurias | lizmat: there are p6 specific ops in the .moarvm files Rakudo generate but the .moarvm format could be used by other languages | ||
13:42
gabiruh left,
gabiruh joined
13:44
Qwerasd joined
|
|||
Qwerasd | I'm getting this error w/ no stacktrace: Will not decode invalid ASCII (code point > 127 found) | 13:44 | |
13:45
noganex_ joined
|
|||
lizmat | Qwerasd: please supply a gist | 13:46 | |
Qwerasd | Huh? | ||
lizmat | I mean, you haven't supplied us with any info that would allow us to reproduce the problem | 13:47 | |
masak | a gist is just a text pasted into gist.github.com -- any similar pastebin is fine | ||
jnthn | Can also try --ll-exception option to perl6 | ||
Qwerasd | It's an issue w/ LWP::Simple it would seem | ||
13:47
psychoslave left
13:48
Kaiepi left
|
|||
Qwerasd | LWP::Simple.get('eckva.net') something about the response from this server causes the error | 13:48 | |
13:48
noganex left,
Kaiepi joined
|
|||
lizmat | well, maybe it claims to return ascii, but in fact returns utf-8 ? | 13:50 | |
Qwerasd | Hmmm that would make sense | ||
lizmat | FWIW, ASCII is a valid subset of UTF-8 afaik | 13:51 | |
so maybe you can override the encoding ? | |||
13:52
w17t joined
|
|||
Qwerasd | where does it report the encoding? There's nothing in the response headers... | 13:53 | |
13:53
w17t left
|
|||
jnthn | a curl -v of it shows it doesn't declare a content type in the headers | 13:53 | |
13:53
w17t joined
|
|||
Qwerasd | Yes it does. text/html | 13:54 | |
jnthn | gah! | ||
doesn't declare *an encoding in the content type" in the headers | |||
Sorry, doing 3 things at once | |||
Qwerasd | yeah :p | ||
jnthn | Tried it with another Perl 6 HTTP client and it works there | 13:55 | |
I'm guessing LWP::Simple is defaulting to ASCII | |||
Qwerasd | Hmmm | 13:56 | |
Odd, as LWP::Simple has Str $.default_encoding = 'utf-8'; | |||
jnthn | If you can get it to give you the body as a blob, then you can .decode it yourself, I guess | 13:57 | |
13:58
molaf left
|
|||
Qwerasd | Oh, in the github for perl6 LWP::Simple it says "At this point it is recommended that you use HTTP:UserAgent instead. I think I'll try that. I may not have this bug | 14:01 | |
14:02
Zoffix joined
|
|||
Zoffix | eco: WWW | 14:02 | |
buggable | Zoffix, WWW 'No-nonsense, simple HTTPS client with JSON decoder': github.com/zoffixznet/perl6-WWW 5 other matching results: modules.perl6.org/s/WWW | ||
Zoffix | Qwerasd: you can try that ^ module. It's like LWP::Simple, but simpler... and uses HTTP::UserAgent under the hood | 14:03 | |
14:03
skids joined
|
|||
Zoffix | $ perl6 -MWWW -e 'say get "eckva.net"' | 14:03 | |
Will not decode invalid ASCII (code point > 127 found) | |||
Qwerasd: no love | |||
Qwerasd | Oh RIP | ||
jnthn used Cro::HTTP::Client :) | 14:05 | ||
14:05
scimon joined
|
|||
Zoffix | eco: Cro::HTTP::Client | 14:05 | |
buggable | Zoffix, Nothing found | 14:06 | |
jnthn | eco: Cro::HTTP | ||
buggable | jnthn, Cro::HTTP 'Asynchronous HTTP, both client and server side. Includes HTTP/2.0 support.': github.com/croservices/cro-http.git 2 other matching results: modules.perl6.org/s/Cro%3A%3AHTTP | ||
jnthn | Part of that distribution | ||
Qwerasd | I recall using Cro::Websocket for a previous project, and discovering multiple bugs w/ it ;p | ||
I guess I can try Cro::HTTP | |||
14:10
markoong joined
|
|||
Zoffix | m: with IO::Socket::INET.new: :host<eckva.net>, :80port { .print: "GET / HTTP/1.1\r\nHost: eckva.net\r\n\r\n"; say .recv; .close } | 14:11 | |
camelia | IO::Socket::INET 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 |
||
Zoffix | e: with IO::Socket::INET.new: :host<eckva.net>, :80port { .print: "GET / HTTP/1.1\r\nHost: eckva.net\r\n\r\n"; say .recv; .close } | ||
evalable6 | HTTP/1.1 200 OK␦Date: Tue, 10 Jul 2018 14:11:59 GMT␦Server: Apache␦Last-Modified: Mon, … | ||
Zoffix, Full output: gist.github.com/38f5c8cb500c250338...88ce77543e | 14:12 | ||
Zoffix | e: with IO::Socket::INET.new: :host<eckva.net>, :80port { .print: "GET / HTTP/1.1\r\nHost: eckva.net\r\n\r\n"; say .recv.split("\r\n\r\n", 2).tail; .close } | ||
evalable6 | <!DOCTYPE html> <html lang="en"> <head><meta http-equiv="Content-Type" content="text/html;… |
||
Zoffix, Full output: gist.github.com/d571328f7259fcdd6b...186b587879 | |||
Zoffix | ^_^ | ||
Qwerasd | Cro::HTTP solved it for me | 14:13 | |
Zoffix | Filed github.com/perl6/perl6-lwp-simple/issues/29 and github.com/sergot/http-useragent/issues/207 | 14:22 | |
14:22
Zoffix left
14:23
mcmillhj left
14:24
scimon left
14:28
epony left
14:29
scimon joined
14:31
Kaiepi left
14:32
Kaiepi joined
14:34
HaraldJoerg1 left,
scimon left
|
|||
tyil[m] | Qwerasd: have you reported the bugs you had with `Cro::Websocket` on the repository? | 14:37 | |
Qwerasd | I actually ended up getting them fixed by complaining about them here. | 14:38 | |
14:38
mcmillhj joined
|
|||
tyil | Qwerasd: ah, that's fine too :> | 14:39 | |
tyil[m] | .tell AlexDaniel if the perl community were to get it's own Matrix homeserver, would it be interesting to link both perl.org and freenode's #perl6 channels to them? | ||
yoleaux | tyil[m]: I'll pass your message to AlexDaniel. | ||
14:40
Voldenet joined,
Voldenet left,
Voldenet joined
14:41
Technato1 left
14:44
Technato1 joined
14:45
fake_space_whale joined
|
|||
tbrowder_ | .tell jmerelo see updated doc wiki for phase 2 plan | 14:45 | |
yoleaux | tbrowder_: I'll pass your message to jmerelo. | ||
14:45
curan left
14:49
psychoslave joined,
scimon joined
14:53
scimon left,
scimon joined,
psychoslave left
14:54
psychoslave joined
|
|||
timo | Qwerasd: did you report the bugs you found in Cro::WebSocket? | 14:55 | |
Qwerasd | I was already asked and responded. "I actually ended up getting them fixed by complaining about them here." | ||
timo | oh, OK | 14:56 | |
very good :) | |||
14:56
scimon left
14:57
scimon joined,
raynold left
15:02
scimon left
15:05
Qwerasd left
|
|||
buggable | New CPAN upload: Dist-Helper-0.21.0.tar.gz by TYIL modules.perl6.org/dist/Dist::Helper:cpan:TYIL | 15:05 | |
15:06
epony joined,
psychoslave left
15:21
scimon joined
15:22
wamba left,
mcmillhj left
15:23
mcmillhj joined
|
|||
Geth | p6-sake: wbiker++ created pull request #23: Look for Sakefile in parent folders as well |
15:23 | |
b2gills | .tell Qwerasd to get the index of an element add :k to .first `[<a b c d>].first('b'):k` or use .grep if you want more than one. Can also be inside `.first(:k,'b')` `.first('b',:k)` | 15:25 | |
yoleaux | b2gills: I'll pass your message to Qwerasd. | ||
15:28
pmurias left,
pmurias joined
15:34
Technato1 left,
Technato1 joined
15:39
salasrod joined
15:43
dpk joined
15:51
troys joined
15:53
pukku joined
|
|||
pukku | Hi! A while back, some of you were willing to review some code I had written to suggest more idiomatic Perl6-isms. I've written another program, and I was wondering if I could ask for a review again? I think I've used most of the suggestions from last time, but I'm sure there are still places I could improve. | 16:01 | |
16:01
Sgeo__ joined
16:04
Sgeo_ left
16:07
mcmillhj left
|
|||
moritz | pukku: just paste a link here, and somebody will likely do it | 16:11 | |
pukku: I have to work a bit more, but will review in ~2 hours if nobody else has done by then | |||
pukku | Thanks! It's at github.com/pukku/ringing_halfsheets ; the particular file is gentroff.pl6. | ||
I don't want to take too much of people's time though -- if you (or others) are busy, don't make any special effort on my behalf. | 16:12 | ||
Thanks! | |||
16:17
mcmillhj joined
|
|||
tbrowder_ | pukku: looking now, but see typo on bcr logo | 16:22 | |
16:23
mcmillhj left
16:24
salasrod left
|
|||
pukku | Thanks -- the misspelling of "Boston Change Ringers" is intended -- change ringing (the hobby this is all related to) is all about permutations, so it's a (very poor) joke. | 16:25 | |
16:26
jmerelo joined
|
|||
jmerelo | o/ | 16:26 | |
yoleaux | 14:45Z <tbrowder_> jmerelo: see updated doc wiki for phase 2 plan | ||
jmerelo | .tell tbrowder OK | ||
yoleaux | jmerelo: I'll pass your message to tbrowder. | ||
16:26
fake_space_whale left
16:27
mcmillhj joined
|
|||
jmerelo | .tell tbrowder Right now sources are picked up by htmlify.p6 to generate URLs. I guess that wouldn't change, right? | 16:28 | |
yoleaux | jmerelo: I'll pass your message to tbrowder. | ||
tbrowder_ | correct. i see you’re up very early! ohaiyogozamaisu (sp?) | 16:30 | |
Geth | doc: 1775e07b82 | (JJ Merelo)++ | type-groups.json Moved type-groups.json to new branch and deleted closes #2164 |
16:32 | |
16:32
mcmillhj left
|
|||
[Coke] | jmerelo: can you note which branch in the ticket? | 16:33 | |
16:33
wamba joined
|
|||
tbrowder_ | the only diff is htmlify.p6 would pick up the generated sources in their Language subdirectory (or, maybe better yet, a more obscure subdir somewhere else). separating the source in another repo would be best solution imo. | 16:33 | |
[Coke] | ah, the obv. one. | ||
16:33
scimon left
|
|||
[Coke] | having another repo doesn't change how crappy the current htmlify is. | 16:34 | |
[Coke] reviews briefly | |||
the main problem I've heard here is that star is including the website build tools: another fix could be to make star smarter about how it's dealing with the doc directory. | 16:35 | ||
We need to at least include p6doc, so there's already something slightly more than the raw pod6 files. | 16:36 | ||
but: is there another problem aside from star that's driving this request? | |||
16:37
sno left,
pukku is now known as pukku_afk
|
|||
jmerelo | [Coke]: hey, htmlify.p6 also has feelings! | 16:38 | |
[Coke]: or maybe not. | |||
tbrowder_ | just general untidiness and keeping source from the build area... | 16:39 | |
16:39
robertle left
|
|||
jmerelo | [Coke]: I would say there is. Mainly the modules, which are not tested and might be useful outside the perl6/doc repo. | 16:39 | |
[Coke] | if we move them out, it's another maintenance issue. I would assume they are utility modules only unless someone has a particular case to make about individual ones. | 16:40 | |
if they are inside the repo, they can be elminated, method signatures changed, no impact to downstream users. | |||
jmerelo | [Coke]: Well, all Pod6 modules could be moved elsewhere. We can keep in the perl6 org in case we want to keep a close eye on them. | 16:41 | |
16:42
dakkar left
|
|||
jmerelo | [Coke]: plus I agree with the general untidiness that tbrowder_ has mentioned. | 16:42 | |
16:44
mcmillhj joined
|
|||
[Coke] | What general untidiness? | 16:44 | |
Can you point to specific untidiness? | |||
(that we can fix.) | |||
16:44
domidumont left
|
|||
[Coke] | sorry, emphasis on that; meaning that if it's specific, we can then fix it. | 16:44 | |
tbrowder_ | that was a careless comment i made...sorry. i just like to clearly separate often-edited source files from tooling | 16:47 | |
i remember first time i looked at doc repo seeing doc subdir was confusing...just the way i view things | 16:49 | ||
16:49
mcmillhj left,
p6noob joined
|
|||
jmerelo | [Coke]: basically having so many unrelated things in the same dir, with many directories hanging from the main one, I guess... | 16:54 | |
tbrowder_: right. There's a doc repo with a doc directory. Hum. | |||
[Coke]: there are also many files in the main directory. Some unused files like the one just deleted go undetected... | 16:55 | ||
Geth | doc: 535144cc61 | (JJ Merelo)++ | doc/Language/101-basics.pod6 Re-indexes adding 'Basics' many terms. Closes #2165 |
||
synopsebot | Link: doc.perl6.org/language/101-basics | ||
[Coke] | ... Yes, there is clean that can be done, sure. here's what'll happen to fix that if you move doc's doc/ into a new repository: nothing. | 16:56 | |
if there is cleanup that needs to happen, sure, let's clean it up. | 16:57 | ||
These docs aren't intended to be read raw from the repo, so again, not sure why the sub dir is a problem. | 16:58 | ||
but "cleanup crufty things", absolutely, that's been a low priority on going thing. | |||
tbrowder_: how do you feel about t/ and xt/, for example? | 16:59 | ||
(in my mind, they are critical to be in the same repo as the docs to insure doc quality) | |||
tbrowder_ | pukku: casual glance looks pretty good to me. do you ring bells at same site mostly? old church i assume. how old are bells? | 17:00 | |
Geth | doc: 0264be340b | (JJ Merelo)++ | doc/Type/IO/Notification.pod6 Index FileChangedEvent closes #1558 |
||
synopsebot | Link: doc.perl6.org/type/IO::Notification | ||
jmerelo | [Coke]: most of the tests are actually doc tests, but some are general document tests. For instance, testing the tests is now a, well, test | 17:01 | |
17:01
mcmillhj joined
17:02
Kaiepi left
|
|||
[Coke] | Sure. imagine my comment is just about the doc tests. | 17:02 | |
17:02
Kaiepi joined
17:03
konsolebox left
|
|||
tbrowder_ | in my maybe anal view i would change doc dir to something like doc-src or src-docs and never put build products in it. | 17:04 | |
more than once i’ve blown away the html dir forgetting that some input stuff was ther as well as the generated buid output | 17:06 | ||
17:06
mcmillhj left,
Technato1 left
|
|||
p6noob | Is there a more idiomatic way to destructure an object than: my ($x,$y,$h) = do given $object { .x, .y, .h } | 17:08 | |
17:08
konsolebox joined
17:09
mcmillhj joined
17:11
hobbified is now known as hobbs,
hobbs left,
hobbs joined
|
|||
TimToady | m: class Foo { has $.x = 1; has $.y = 2; has $.z = 3 }; my (:$x, :$y, :$z) := Foo.new; say "$x $y $z" | 17:13 | |
camelia | 1 2 3 | ||
TimToady | named binding will call methods on an object that is not Associative | 17:14 | |
[Coke] | tbrowder_: what build products are going in doc/ ? | 17:16 | |
I tought all the build stuff was going in html/ | |||
p6noob | TimToady: of course, that's great. | ||
17:16
jmerelo left
|
|||
[Coke] | ah. yes, html/ having gen'd stuff and source stuff is problematic, yes. | 17:16 | |
p6noob | TimToady: the only thing is that it complains if there are any extra attributes that you don't provide a variable for.. | ||
[Coke] | tbrowder_: but 'make clean' should do that for you. | 17:17 | |
p6noob | class Foo { has $.x = 1; has $.y = 2; has $.z = 3; has $.a = 4 }; my (:$x, :$y, :$z) := Foo.new; say "$x $y $z" # Unexpected named argument 'a' passed | ||
17:18
Zoffix joined
|
|||
Zoffix | m: class Foo { has $.x = 1; has $.y = 2; has $.z = 3 }; my ($x, $y, $z) = Foo.new.Capture<x y z>; | 17:18 | |
camelia | ( no output ) | ||
Zoffix | m: class Foo { has $.x = 1; has $.y = 2; has $.z = 3 }; my ($x, $y, $z) = Foo.new.Capture<x y z>; dd [$x, $y, $z] | ||
camelia | [1, 2, 3] | ||
[Coke] | that part of the build process could be cleaned up for sure | ||
p6noob | Zoffix, great. Thanks to you both | ||
Zoffix | m: class Foo { has $.x = 1; has $.y = 2; has $.z = 3; has $.meows = 42; method Capture { \(:$!x, :$!y, :$!z) } }; my (:$x, :$y, :$z) := Foo.new; dd [$x, $y, $z] | 17:19 | |
camelia | [1, 2, 3] | ||
Zoffix | (^ it doesn't call individual methods, it extracts all the things from the object's Capture) | ||
Also, you can stick a `|` into params | |||
p6noob | Zoffix, interesting. In my current case, that's even better though. | ||
Zoffix | m: class Foo { has $.x = 1; has $.y = 2; has $.z = 3; has $.meows = 42; }; my (:$x, :$y, :$z, |) := Foo.new; dd [$x, $y, $z] | ||
camelia | [1, 2, 3] | ||
TimToady | m: class Foo { has $.x = 1; has $.y = 2; has $.z = 3; has $.t = 4 }; my (:$x, :$y, :$z, *%) := Foo.new; say "$x $y $z" | ||
camelia | 1 2 3 | ||
Zoffix | or that :) | 17:20 | |
hobbs | I was just writing that. Sniped by TimToady :) | ||
p6noob | lol.. okay i'll take a look at all the above, thanks again TimToady & Zoffix | ||
hobbs | in that version the *% in the capture just means "there might be some more keys/values... accept them, but don't put them anywhere" | 17:21 | |
p6noob | Makes sense, thx hobbs | ||
Zoffix | p6noob: the `(:$x, :$y, :$z, *%)` thing in that constract is basically a signature, so all the features supported in `sub (...) {}`'s signature are supported there on language level (on Rakudo level, some things aren't implemented yet) | 17:23 | |
m: class Foo { has $.x = 1; has $.y = 2; has $.z = 3; has $.t = 4 }; my (:$x, :$y, :$z, *% (:$t)) := Foo.new; say "$x $y $z $t" | |||
camelia | Cannot call method 'Stringy' on a null object in block <unit> at <tmp> line 1 |
||
Zoffix | like this would normally stick 4 into $t | ||
m: class Foo { has $.x = 1; has $.y = 2; has $.z = 3; has $.t = 4 }; my (:$x, :$y, :$z, :$meows = "default meows", |) := Foo.new; dd $meows | 17:24 | ||
camelia | "default meows" | ||
Zoffix | m: my @a := <a b c>; my ($first, "b", $third) := @a; dd [$first, $third] | 17:25 | |
camelia | ["a", "c"] | ||
Zoffix | m: my @a := <a Z c>; my ($first, "b", $third) := @a; dd [$first, $third] | ||
camelia | Constraint type check failed in binding to parameter '<anon>'; expected "b" but got "Z" in block <unit> at <tmp> line 1 |
||
Zoffix | :) | ||
17:28
raschipi joined
|
|||
Zoffix | hm | 17:33 | |
m: :(&s :()) | |||
camelia | ( no output ) | ||
Zoffix | well weird. | 17:34 | |
That parses as invocant marker actually | 17:35 | ||
But, the weird part is this doesn't match: | |||
m: say :(&s :(), *%_) ~~ my method (&s: $ ()) {}.signature | |||
camelia | False | ||
Zoffix | m: .say for :(&s :(), *%_), my method (&s: $ ()) {}.signature | ||
camelia | (&s: $ (), *%_) (&s: $ (), *%_) |
||
Zoffix | how come it's False? | ||
17:36
raschipi left
|
|||
Zoffix | m: say :() ~~ my method () {} | 17:36 | |
camelia | Nil | ||
Zoffix | Nil? :S | ||
oh, forgot .signature | |||
rindolf | hi all | ||
Zoffix | \o | ||
rindolf | Zoffix: o/ | 17:37 | |
17:39
w17t left
|
|||
Zoffix | m: say :(&s:():) | 17:40 | |
camelia | No such method 'multi-invocant' for invocant of type 'Any' in block <unit> at <tmp> line 1 |
||
17:40
benjikun2 joined
17:41
Ven` left
17:42
benjikun left
17:43
sena_kun left,
HaraldJoerg joined,
sena_kun joined
17:44
MilkmanDan left,
MilkmanDan joined,
pukku_afk is now known as pukku
|
|||
Zoffix | Filed all the things as R#2044 | 17:44 | |
synopsebot | R#2044 [open]: github.com/rakudo/rakudo/issues/2044 LTAness with putting space before sig unpack of Callable | ||
17:46
Zoffix left,
domidumont joined
|
|||
TimToady | note that &foo:() is not supposed to mean sig unpacking, but to accept a typed function that takes 0 arguments | 17:47 | |
pukku | tbrowder_: Thanks! Yes, I ring at the Old North Church and Church of the Advent (since they are only about a mile apart). The bells at Old North are from 1745, and although their fittings have been redone a few times, the bells themselves are original and haven't been "fixed" in any way (ie, their overtones are all still intact). | ||
timo | does that mean "a function that has a proto of '0 args only'" or would a multi that has a candidate that accepts 0 args be fine, too? | 17:48 | |
17:48
HaraldJoerg left
|
|||
TimToady shrugs a covariant/contravariant shrug | 17:49 | ||
lizmat | pictures NLPW last weekend: du-chains-and-opts | 17:53 | |
eh... | |||
www.flickr.com/photos/wendyga/sets...1034878058 | |||
:-) | |||
17:59
MilkmanDan left
18:01
MilkmanDan joined
18:03
AlexDaniel joined
18:06
sno joined
|
|||
Altreus | Presumably, dying in a then block breaks the promise returned by then? | 18:11 | |
18:12
Zoffix joined
|
|||
timo | that's right | 18:12 | |
Altreus | so I can do $promise1.then(-> $r { if ($r) { ... } else { die $r.cause } }) | ||
is there a shortcut to that? | 18:13 | ||
Zoffix | timo: I would've thought the multi is fine, since my understand is the goal here is to take a callable that you can call with particular arguments, but looks like multies aren't actually accepted :( | ||
timo | yes, using $r.result will throw the exception if the promise was broken | ||
Zoffix | And I think maybe that's a bug because smartmatching doesn't work right either | ||
m: multi foo ($) {}; multi foo () {}; say &foo.candidates.tail ~~ :(&:()) | |||
camelia | False | ||
Zoffix | m: multi foo ($) {}; multi foo () {}; -> &:() { }( &foo.candidates.tail ) | ||
camelia | ( no output ) | ||
Zoffix | m: multi foo ($) {}; multi foo () {}; -> &:() { }( &foo ) | ||
camelia | Constraint type check failed in binding to parameter '<anon>'; expected anonymous constraint to be met but got Sub (proto sub foo (;; Mu ...) in block <unit> at <tmp> line 1 |
||
18:14
wamba1 joined
|
|||
moritz | pukku: github.com/pukku/ringing_halfsheet...ff.pl6#L97 I'd do that with a hash, but that's mostly a question of style | 18:14 | |
Altreus | oh! that makes sense, neat | ||
Zoffix | TimToady: what's the word for it? "signature specifier"? parametarizer? for the :(...) part in &foo:(...) | ||
18:14
wamba left
|
|||
Zoffix | .oO( crombabulator! ) |
18:15 | |
moritz | pukku: line 141, would be more robust with s:g/\n**2..*/\n/ | ||
Zoffix | pukku: also, instead of repeating `%rdata<urpic><img>` in each branch of `when` you can just write it with `%rdata<urpic><img> = do given ... { when ... { 'nagcr' } ... }` | 18:16 | |
moritz | and I'd write s:g/\"\;/"/ as s:g/'"'/"/ instead | ||
Zoffix | I'd just use HTML::Entities module :) | ||
eco: HTML::Entities | |||
buggable | Zoffix, Nothing found | ||
Zoffix | bah | ||
eco: HTML::Escape | 18:17 | ||
buggable | Zoffix, HTML::Escape 'Utility of HTML escaping': www.cpan.org/authors/id/M/MO/MOZNIO...0.1.tar.gz 1 other matching results: modules.perl6.org/s/HTML%3A%3AEscape | ||
timo | eco: slashes | ||
buggable | timo, Acme::Addslashes 'PHP security. Now in Perl 6.': modules.perl6.org/dist/Acme::Addsla...github:N'A | ||
moritz | pukku: finally, I like your style of having a pretty tight MAIN routine, and most of the log in subroutines | ||
</review> | |||
pukku | Moritz: thanks! I'm not sure why I didn't use a hash there. And I see what you mean about using the specifiers. I think I may have meant to type `\n\n+`, but `**2..*` is the new idiom, I guess? | 18:18 | |
Zoffix | yeah | 18:19 | |
pukku | Zoffix: I had tried to do that without the "do" keyword, but it didn't work, and the documentation of "do given" made it sound like it wouldn't work in this case. I'll see why I thought that and maybe suggest a change to the wording. | ||
Zoffix | pukku: weird, maybe documentation needs to be fixed? FWIW—since it's a common assumption—`given` and `when` are entirely separate constructs. `given` simply aliases a thing to `$_` topic variable and `when` smartmatches against `$_` (which is why you often see `given` and `when` used together), but if you already have the stuff in $_, you can just use `when` without `given` | 18:20 | |
m: for <a b c> { when 'a' { say "tis a" }; when "b" { say "tis b" }; say "something else, bruh" } | 18:21 | ||
camelia | tis a tis b something else, bruh |
||
wbn | so the `when` block also advances to the next iteration of the loop when it ends? | 18:23 | |
timo | there's `succeed` and `proceed` that control that behaviour | ||
Zoffix | wbn: the block form of it returns from current block, yes (doesn't have to be a loop) and you can control that behaviour with the keywords timo mentioned | 18:25 | |
m: { when * { say "meow" }; say "foo" }; say "bar" | |||
camelia | meow bar |
||
Zoffix | m: { say "meow" when *; say "foo" }; say "bar" | ||
camelia | meow foo bar |
||
Zoffix | m: { when * { say "meow"; proceed }; say "foo" }; say "bar" | ||
camelia | meow foo bar |
||
timo | `succeed` and `proceed` don't require a `given`, they can be used in other contexts, too | ||
Zoffix | m: { proceed; say 42 }; say 10 | 18:26 | |
camelia | proceed without when clause in block <unit> at <tmp> line 1 |
||
timo | oh, seems i was wrong | ||
18:26
sauvin left
|
|||
Zoffix | Would be handy in some whenless contexts, like inside `.tap: { ... }` | 18:26 | |
wbn | docs.perl6.org/language/control#proceed | 18:27 | |
i see | |||
Zoffix | Filed R#2045 for the earlier discussion on sig matching | 18:28 | |
synopsebot | R#2045 [open]: github.com/rakudo/rakudo/issues/2045 [@LARRY] Signature specifiers on Callables do not consider multi candidates | ||
18:28
jameslenz left
|
|||
Zoffix | ah, damn, and I realize why it doesn't function this way right after I file >_< | 18:30 | |
pukku | Thanks! | 18:31 | |
18:34
Zoffix left
18:37
Kaiepi left
18:39
Kaiepi joined
|
|||
pukku | Thanks for looking at the code. I've updated it with the suggested changes (I think). | 18:44 | |
18:49
lindylex joined
|
|||
lindylex | If I have a class such as :: my $testMe = Euclidean_algorithm.new( a=>+@*ARGS[0], b=>+@*ARGS[1] ); and I would like to pass new values later for variables a and b. How can I do this? | 18:50 | |
timo | you can set the attributes to "is rw" in the class declaration | 18:51 | |
geekosaur | if you declared them 'is rw' then you can assign to $testMe.a and $testMe.b. otherwise, you probably want a method to set them | ||
timo | then it'll let you $testMe.a = 1; $testMe.b = 9; | 18:52 | |
lindylex | Ok ok one sec let me try this. | ||
SmokeMachine | m: sub run(&foo:(--> Int)) { say foo + 1 }; run(-> --> Int { 41 }) | 18:56 | |
camelia | Too many positionals passed; expected 0 arguments but got 1 in block <unit> at <tmp> line 1 |
||
lindylex | This is what I am trying. pastebin.com/bkdFv2wr I tried $testMe.$!a=120; and $testMe.$a=120; neither worked. | 18:57 | |
[Coke] | lindylex: you're not in the class there. | 18:59 | |
timo | it has to be $testMe.a = 120 instead | ||
DrForr | o/ | ||
[Coke] | +1 | ||
timo | it works by giving you an accessor method named the same as the attribute, but without the sigil (because method names don't have sigils in them) | ||
lindylex | Ok got it now. | ||
timo | when i started out with perl6, this stumped me for like three days | 19:00 | |
lindylex | Thanks all for the help. | ||
timo | YW | ||
lindylex | timo : it is kicking my butt. I am really enjoying this damn language so much! | ||
timo | glad to hear | 19:01 | |
DrForr | lindylex: Yay! Where'd you hear about it? | ||
(Not taking an official poll, just curious.) | 19:02 | ||
19:02
warriors joined
19:04
mcmillhj left
|
|||
lindylex | DrForr : you mean the language? | 19:05 | |
DrForr | Yep. | ||
lindylex | Oh I have been programming since I was 14 years of age. I have perl on my resume. When the P stack was a thing on resumes. I need to get back into programming for financial reasons. I started to study many languages again. I decided to increase my understanding of Perl and realized the language was at version 6. I decided it would a be a good time to dedicate to learning this new version. It has been such a joy to do so. I do | 19:08 | |
not know of many places searching for Perl 6 programmers but the knowledge has been worth the continued investment in gaining proficiency. | |||
timo | well, perl 5 is still being developed as well, perl 6 isn't meant to replace it | 19:10 | |
lindylex | timo : what is the purpose of perl 6? | 19:11 | |
timo | oh, many things | ||
there were things in perl 5 that were impossible to change due to backwards compatibility, so perl 6 was meant to break backwards compatibility and Get Everything Right™ | 19:12 | ||
[Coke] | Zoffix++: added a comment to perl6advent.wordpress.com/2015/12/...ment-21093 | ||
DrForr | If you're looking for actual paying jobs, I'd probably look at Perl 5, at least for the next few years. But your investment in Perl 6 isn't wasted, there are many modules that bring Perl 5 almost to where Perl 6 is, albeit on the other syntax layer. | ||
timo | among other things, perl 6 is meant to be modifiable to adjust to any major changes in the future; the "100 year language" | ||
lindylex | That is my understanding of newer versions of programming languages. | ||
19:14
domidumont left
|
|||
lindylex | DrForr : so I am correct. Perl 6 is not going to land me a job as a perl 6 developer. | 19:14 | |
DrForr | Well, it will, there just aren't that many jobs out there for it right now. | ||
lindylex | What sector do you project the growth for perl 6 will occur? | 19:15 | |
19:15
wamba1 left,
wamba joined
|
|||
DrForr | Lots of us are using it alongside Perl 5, and have found that while Perl 5 is where the jobs are, the tasks that Perl 5 can do, Perl 6 can do just as well but it hasn't quite reached that critical mass yet. | 19:15 | |
timo | perl 6 currently tends to be slower than perl 5 for many things | 19:16 | |
but perl 6 has more features in the parallelism and asynchronous space | |||
DrForr | Beats me, I'm no market analyst. | ||
timo | interfacing with C libraries is simpler in perl 6 as well | 19:17 | |
DrForr | Though I'd probably lean towards higher-end parsing tasks because regexen are vastly more powerful in Perl 6, and as timo suggests, concurrency and asynch processing in the near term. | ||
lindylex | I can not find any data suggesting any trends with Perl 6. So this is why I have not though of it as a great way to generate income. | ||
DrForr | It certainly doesn't have the 30-year pedigree that Perl 5 has, especially for a language that was just released in 2015. | 19:18 | |
wbn | perl 6 is just fun! | 19:19 | |
masak | I stopped attaching my hopes and my happiness to Perl 6 massively gaining market share long ago. doesn't mean I don't wish Perl 6 well, of course. it happens to be one of my favorite languages. | ||
but I can still feel good and happy without needing it to succeed in any wider sense. | |||
warriors | will perl 6 ever be fast enough | ||
masak | quite probably | ||
timo | we're making progress all the time | 19:20 | |
masak | I mean, there's precedent in other languages | ||
timo | we just landed a major piece in the performance puzzle | ||
masak | they start out slow, then slowly get optimized. eventually the curves meet | ||
timo | we used to not be able to optimize much around assignment of scalars and such | ||
warriors | which was? | ||
masak | this has happened to Java, Python, Ruby... | ||
timo | we will be able to do that in the near future | ||
pmurias | lindylex: Perl 6 is not a good bet if you are looking for jobs in it | 19:21 | |
masak | timo: ooh, that sounds like something I need to read more about | ||
warriors | timo are you a core perl 6 developer | ||
timo | i am | ||
19:21
timo is now known as timotimo
|
|||
timotimo | ha-ha! | 19:21 | |
masak | now he's *two* core developers! :D | ||
timotimo | i was timotimo all along! | ||
warriors | :) | ||
timotimo | in disguise | ||
masak | *gasp* | ||
I certainly couldn't tell | |||
DrForr | It's fast enough for me. Asking if something is "fast enough" kind of requires that you set performance goals *beforehand* otherwise the goalposts keep moving. | 19:22 | |
warriors | the current trend in programming languages, people are moving code, from python to go, and from go to rust ... and from scala to scala native , so Perl 6 have it though | ||
masak | I know programming languages look like a zero-sum game, and maybe they partly are. | 19:23 | |
but I think there's also more to it than that. languages influence each other. the same developer gains insights in one languages and applies them in another. | |||
I want Perl 6 to be able to *enrich* the world in that sense, regardless of market share. | 19:24 | ||
to me, that's what the wider Perl culture is all about | |||
warriors | dynamic languages are loosing the race to static language, dart moved from optional typing, to statically typed ... clojure is kinda loosing | ||
masak | there's a trend, yes | 19:25 | |
warriors | :S | ||
DrForr | Shrug. We started out with static typing, moved to dynamic when people learned what freedoms could be gotten, then the crowd that grew up with dynamic languages learned how useful static typing is, I see it as a cycle. | 19:26 | |
19:26
Zoffix joined
|
|||
Zoffix | SmokeMachine: you're missing parentheses on foo call. | 19:26 | |
m: sub run(&foo:(--> Int)) { say foo() + 1 }; run(-> --> Int { 41 }) | |||
camelia | 42 | ||
warriors | is there a nice article that describe what gradual typin in perl 6 really means | ||
is it like dart's optional typing | 19:27 | ||
pmurias | the gradual typing Perl 6 sucks | ||
* in Perl 6 | |||
warriors | ohh | ||
Zoffix | heh | ||
masak | yes, it leaves something to be desired | ||
SmokeMachine | Zoffix: thanks! | ||
Zoffix | pmurias: why not improve it? | ||
You got the commit bit! | |||
masak | I've come to believe that TypeScript's structural typing is, to use a technical term, "pretty rad" | ||
19:28
HaraldJoerg joined
|
|||
masak | m: sub foo(Int @a) { say @a }; foo([1, 2, 3]) | 19:28 | |
camelia | Type check failed in binding to parameter '@a'; expected Positional[Int] but got Array ($[1, 2, 3]) in sub foo at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
masak | structural typing would help with... that | ||
SmokeMachine | Zoffix: why are those parentesis required? | ||
DrForr | I usually teach it as "ignore static typing until you run into a bug it could have prevented, then your program's probably in a consistent enough state to benefit." | ||
Zoffix | SmokeMachine: because listop precedence is lower than that of infix +, so you get `foo (+1)` operation | 19:29 | |
pmurias | Zoffix: I have too many Perl 6 project to work on it already | ||
SmokeMachine | Zoffix: thanks! | ||
masak | DrForr: I agree, but I'm currently more radical because I see it doing good already during refactoring, long before you run the thing | ||
pmurias | but it's borderline abusing the name to call what we have gradual typing | ||
masak | pmurias: oh! why do you think so? | 19:30 | |
pmurias | because that means if you add all the types you can your program becomes statically typed | ||
masak | ah, right | ||
yes, that's... overselling it a bit :) | |||
Zoffix | pmurias: yeah, but "gradual typing in perl 6 sucks" in response to a person asking for an article is kinda out of the blue statement slagging the language. | ||
warriors: is there actually a trend of "people moving code" or is that just a tiny subset of bloggers posting about the next shiny thing they found? | 19:31 | ||
pmurias | we shouldn't use it to sell the language | ||
Zoffix | warriors: moving existing code to another language is a very expensive and time consuming. I doubt many undertake that process for anything serious. | ||
19:31
pmurias left
|
|||
masak | well, you *can* reliably start untyped and then gradually add type information. just don't expect a pot of gold at the end. | 19:31 | |
Zoffix | Just because $foo is trending | 19:32 | |
DrForr | masak: I've done it increasingly as I get more comfortable with hacking, but it's not something I'd recommend to first-timers. I guess if you've got experience in C/C++/Java, which is still pretty common | ||
Zoffix | And also, the "trending" I often see reported is based on google searchers of "$foo tutorial"... I personally don't recall every googling that for any languages I was interested in. I just went to the main website and looked for the docs/tutorials there. | 19:33 | |
warriors | well, we can say its a trend .. in the blog-o-sphere :) .. so we can say, its a trend among the trendy | ||
Zoffix | I imagine a hypothetical language with super amazing docs would have very little google searches for it :) | ||
19:33
lex_ joined
|
|||
warriors | :) | 19:33 | |
masak | languages as such aren't even really the point | 19:35 | |
Zoffix | pmurias, there's a difference between not using something to sell the language and outright dissing the language without elaborating. | 19:36 | |
masak | beyond some fairly shallow surface and semantics, they're just meeting points, nexuses, around which communities form | ||
19:36
lindylex left
|
|||
Zoffix | Yeah, I agree, languages themselves matter little. | 19:36 | |
19:36
pmurias joined
|
|||
Zoffix | AutoIt is godawful to write in, but it gets the job done, and because of that it's an amazing language :) | 19:37 | |
warriors | everything matters | ||
masak | or rather, there are some *really* interesting effects around how a small core group of people "seed" a language community, and then that community goes on to realize and implement those values, whatever they are | 19:38 | |
Zoffix | PHP is just weird, but you can write a working program even if you never programmed before by just googling for stuff, and because of that it's an amazing language :) | ||
warriors | the language feature matters, performance matters, the ecosystem matters ... everything is important | ||
masak | PHP has massively succeeded *despite* PHP-the-language is how I would put it ;) | ||
but it's good to think of it that way because it means there *has* to be other merits to PHP than just the language | 19:39 | ||
ease of deployment comes to mind | |||
DrForr | I'd say that it succeeded by virtue of being easy to install, which led to it being installed everywhere. | 19:40 | |
pmurias | warriors: re blog-o-sphere trend it's interesting how much of it is caused by gigantic companies where CPU costs translate to tons of money | ||
masak | also the "ease" with which you can just wire the database directly into the HTML, which might not bite you for *months* if you're lucky | ||
Zoffix | warriors: depends on your purpose. Perl 6's tiny ecosystem is a huge plus for people who itch to develop some interesting projects from scratch instead of simply re-inventing the wheel that'll likely never get used because a language already got a go-to web framework, HTML parser, IRC client, etc. It's an unplowed field. | ||
warriors | Perl in general have a solid community, and i think Perl 6 is unique enough to attract many programmers ... I think once it becomes speedy, it will take a nice bounce in popularity | ||
what is the go-to web framework for Perl6 | 19:41 | ||
Zoffix | We don't got one. | ||
:) | |||
There's Cro, which is aiming for it | |||
masak | was gonna say | ||
Zoffix | Bailador is behind it | ||
DrForr | I'd say Cro right now, though there's an install issue (at least for me.) | ||
Zoffix | But there's no "go-to" polished web framework. If you start a web framework now, you have a good chance of coming up with a go-to framework :) | ||
masak | warriors: I've been using Perl 6 for 13 years. in a sense, it was fast enough for much of what I needed back then. it depends on the use. | 19:42 | |
Zoffix | Yeah, here's a chart with speed improvements for the past ~3yr tux.nl/Talks/CSV6/speed4.html | 19:44 | |
s/Yeah, //; | 19:45 | ||
19:45
buggable joined,
ChanServ sets mode: +v buggable
|
|||
warriors | so .. is there a nice gradual typing article, or is it a concensus that its no good :) | 19:45 | |
Zoffix | hahaha :D | ||
pmurias | warriors: a lot of people like it | 19:46 | |
warriors | (Y) | ||
cool | |||
Zoffix | warriors: I dunno, maybe this covers it: rakudo.party/post/Perl-6-Extra-Typical-Perl-6 | ||
warriors | i like the idea | ||
DrForr | warriors: Not specifically that I'm aware of. I teach it in classes, come on down to TPC in Glasgow and we can talk about it :) | ||
warriors | :) | 19:47 | |
masak | that article is nice, but it reminds me of one thing | 19:48 | |
19:48
jameslenz joined
|
|||
masak | then Perl 6 says "typing", it's definitely coming from the dynamic end of the spectrum | 19:48 | |
which I think is connected to pmurias' critique | |||
timotimo | yeah, we're no haskell or coq | ||
masak | right, and it's not realistic to expect Perl 6 to ever get there | ||
pukku | Unrelated, is there a function in Perl 6 to get the index in a list corresponding to a particular value? "index" in only for strings (ie, turns the list into a string and gives you that offset). | 19:49 | |
timotimo | pukku: "first" with the :k named argument would get you there | ||
Zoffix | warriors: tho skimming it, looks like it doesn't. But I can explain it in two sentences: you can omit types, or you can stick them in and by sticking them in you get to catch some errors, such us stuff of wrong type being given to other stuff. And you can narrow down how specific you wanna go, from general stuff like `Cool` which takes any stringy/numeric things, down to `Numeric`, which takes only numeric | ||
types, down to `Int`, which takes only Int types, down to `UInt`, which is a subset that takes only non-negative Ints, down to a subset of that subset that you can write as your own subset `subset UIntPrime of UInt where .is-prime` and that will restrict to non-negative integers that are also prime numbers. You can also use native machine types that can offer performance boosts in certain cases or the | |||
overflow/underflow behaviour if your program needs it | |||
Well, there was more than 2 sentences but still :) | |||
masak | I've seen some people ask now and then "Does Perl 6 have dependent types?" -- and I think the question is *ill-posed*, at least that's my conclusion, because Perl 6 doesn't have static types to begin with | ||
DrForr looks at the "POSIX Standard" on his web browser and reaches for the 4-point harness. | |||
pukku | timotimo: thanks! I completely missed that. | 19:50 | |
timotimo | if you expect multiple entries, you can grep instead | ||
grep also has :k, right? | |||
Zoffix | Yes | ||
pukku | no, I just need the one... | ||
Zoffix | m: say <a b c d>.first: :k, "c" | ||
camelia | 2 | ||
Zoffix | m: say <a b c d>.grep: :k, "c"|"b" | ||
camelia | (1 2) | ||
timotimo | check what it returns when nothing matches, too | ||
Zoffix | m: with <a b c d>.first: :k, "c" { say "index is $_" } else { say "not there, bruh" } | 19:51 | |
camelia | index is 2 | ||
Zoffix | m: with <a b c d>.first: :k, "meows" { say "index is $_" } else { say "not there, bruh" } | ||
camelia | not there, bruh | ||
masak | those :k parameters are a stroke of brilliance, because they unify so much stuff. I've always had an itching feeling we could do even more of that kind of unification :) | ||
timotimo | masak: it's a bit of a schwartzian transform, isn't it? | 19:52 | |
masak | mebbe | 19:53 | |
19:53
Zoffix left,
molaf joined
|
|||
masak | mostly it's a neat way to think about whole families of subs/methods as just being a "mode" to searching | 19:53 | |
like "oh yeah search for this, but give me back the index, not the thing" | |||
or "give me back both" | 19:54 | ||
m: my @a = <foo bar baz>; @a.first("bar", :p).value = "wow!"; say @a | 19:55 | ||
camelia | [foo wow! baz] | ||
masak | huh :) | ||
19:56
jameslen_ joined
19:57
jameslenz left
|
|||
lex_ | how do I display variable type? | 19:57 | |
19:57
jameslen_ left
|
|||
pmurias | masak: re Perl 6 getting there I don't think adding support for plugging static type systems from CPAN is that crazy | 19:57 | |
19:58
jameslenz joined
|
|||
pmurias | masak: crazy meaning something that we can expect to never happen | 19:58 | |
timotimo | lex_: do you actually want the variable's type, like in "my Int $foo", or the type of what's currently in it? | ||
DrForr | m: my $x=32; say $x.WHAT; # One way | 19:59 | |
camelia | (Int) | ||
19:59
|oLa| joined
|
|||
timotimo | better to have .^name actually | 19:59 | |
lex_ | DrForr: this thanks $x.WHAT | 20:00 | |
DrForr | Nod, I think WHAT returns a type object. | ||
m: my $x=32; say $x.WHAT.^name; # One way | |||
camelia | Int | ||
timotimo | yep, you can do more with the type object, but things like "put it into a string" will emit warnings | ||
DrForr | That's a stringified version. | ||
timotimo | m: my $x = 32; say "the type is " ~ $x.WHAT | ||
camelia | Use of uninitialized value of type Int in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. the type is in block <unit> at <tmp> line 1 |
||
timotimo | it'll warn and give the empty string instead | ||
and you don't need a .WHAT before the .^name | |||
m: my $x = 32; say "the type is " ~ $x.^name | |||
camelia | the type is Int | ||
timotimo | also, it can go into string interpolation if you put parens: | 20:01 | |
m: my $x = 32; say "the type is $x.^name()" | |||
camelia | the type is Int | ||
pmurias | masak: if I ever get tempted to try to get a PhD I might look into it | 20:02 | |
20:02
cjkinni joined
|
|||
masak | :) | 20:02 | |
20:03
jameslenz left
|
|||
pmurias | masak: although Perl 6 is like the opposite of what Computer Science encourages | 20:03 | |
20:05
DarthGandalf left
|
|||
pukku | If I want to have a parameter to MAIN that is optional, but must be one of a few values if supplied, how do I specify that so that the auto-generated usage knows what to say? Or is that not possible and I have to define USAGE? | 20:07 | |
moritz | m: sub MAIN($x where any(<a b c>)) { } | 20:10 | |
camelia | Usage: <tmp> <x> |
||
moritz | maybe with an enum? | ||
DrForr | You could create a subtype that limits a string to a certain number of values, dunno if usage would pick up the type. | ||
20:11
Kaiepi left
|
|||
moritz | m: enum PerformanceClass <mass ultra ssd>; sub MAIN(PerformanceClass $x) { } | 20:11 | |
camelia | Usage: <tmp> <x> |
||
moritz | :( | ||
20:11
Kaiepi joined,
warriors left
|
|||
pukku | Thanks -- I guess I'll have write a usage description. :-( | 20:12 | |
20:13
Kaiepi left,
Kaiepi joined
|
|||
pukku | Ooo -- it looks like I can add a die statement to the spec if it isn't one of the legitimate results. That's not the same, but it'll probably be close enough... | 20:14 | |
buggable | New CPAN upload: Version-Semantic-0.1.0.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...1.0.tar.gz | 20:15 | |
DrForr | Hrm, apparently forcing install of Cro doesn't help either. | ||
[Coke] | getting better information on usage on enums seems like a reasonable feature request | ||
DrForr | Cannot locate native library 'libssl.so': libssl.so: cannot open shared object file: No such file or directory | 20:16 | |
Yeah, it is. You could introspect the enum type to get a list of contents easily enough. | |||
Altreus | Is there a comprehensive list of what characters are special in p6 regexes? | 20:17 | |
cos it's a bit tedious checking the entire regex doc for everything that might be mentioned :) | |||
lex_ | timotimo : I like this ^name() . | 20:20 | |
20:22
jameslenz joined
|
|||
DrForr | Altreus: Not seeing one specifically, you could pull the list of topics from the regex page but that's by no means a guarantee that something wasn't missed. | 20:22 | |
perlreref had a summary entry in perl5... Well volunteered? :) | 20:23 | ||
pukku | bye | ||
20:23
pukku left
20:24
jameslenz left,
jameslen_ joined
20:25
bdmatatu left
|
|||
Altreus | ;_; | 20:27 | |
20:29
jameslen_ left
|
|||
Altreus | What's the right way of returning a copy from s/// ? | 20:31 | |
I'm assuming from the doc, although it is not explicit, that it replaces it in situ | 20:32 | ||
moritz | Altreus: S/// | ||
Altreus | oh cool | ||
thank :) | |||
DrForr | ?+*.<[{}]>|\%$ # should be a good start though. | ||
20:33
wamba left
20:34
lex_ left
|
|||
b2gills | Altreus: All non-alphanumeric characters are special in regexes | 20:39 | |
20:40
DarthGandalf joined
|
|||
Altreus | aha! | 20:40 | |
b2gills | m: say 'abcd' ~~ /.»/ | 20:42 | |
camelia | 「d」 | ||
DrForr | Special in the sense of "need to be escaped", not necessarily in the sense of "are metacharacters" though I think the sets are equivalent. | ||
b2gills | m: 'abcd' ~~ /``/ | ||
camelia | 5===SORRY!5=== Unrecognized regex metacharacter ` (must be quoted to match literally) at <tmp>:1 ------> 3'abcd' ~~ /7⏏5``/ Unrecognized regex metacharacter ` (must be quoted to match literally) at <tmp>:1 ------> 3'abcd' ~~ /`… |
||
20:43
Xliff joined
|
|||
Xliff | \o | 20:43 | |
I'm trying to initialize a Duration object, but no matter what I use, I keep getting a type-check error message. | |||
DrForr | Informal poll - Should I simply open dir('/lib') to find the current libreadline version? (I know there are more paths to look in.) | 20:44 | |
I started looking at `uname -a`, realized that was fragile in the sense that if a user upgrades readline it'll break. | |||
Xliff | nm. I was forgetting "Duration.new(\d+)" | 20:45 | |
DrForr | Though I do have to look at the version API to figure out how to convert the number 6 to version 6. | 20:46 | |
20:48
jameslenz joined
20:50
jameslen_ joined,
jameslenz left
|
|||
Xliff | m: v6.^name.say | 20:53 | |
camelia | Version | ||
Xliff | my $a = 6; v($a).^name.say | 20:54 | |
m: my $a = 6; v($a).^name.say | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: v used at line 1 |
||
Xliff | m: my $a = 6; v$a.^name.say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 3my $a = 6; v7⏏5$a.^name.say expecting any of: infix infix stopper statement end statement modifier … |
||
Xliff | m: my $a = 6; v{$a}.^name.say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: v used at line 1 |
||
Xliff | Yeah. That's a tricky one. | ||
20:54
jameslen_ left
|
|||
Xliff | m: my $v = Version.new( (6, 0, 0).join('.') ); say $v.parts | 20:56 | |
camelia | (6 0 0) | ||
Xliff | m: my $v = Version.new( (6, 0, 0).join('.') ); say $v.parts; say $v.^name | ||
camelia | (6 0 0) Version |
||
Xliff | DrForr: ^^ | ||
20:56
jameslenz joined
|
|||
Xliff | m: my ($a, $maj, $min) = (6, 2, 4); my $v = Version.new( ($a, $maj, $min).join('.') ); say $v.parts; say $v.^name | 20:57 | |
camelia | (6 2 4) Version |
||
Xliff | m: my ($a, $maj, $min) = (6, 2, 4); my $v = Version.new( ($a, $maj, $min).join('.') ); say $v.parts; say $v.^name; $v.say | ||
camelia | (6 2 4) Version v6.2.4 |
||
20:58
jameslenz left,
jameslenz joined
|
|||
DrForr | Yeah, just tried that after reading the Version page. | 20:59 | |
Xliff | :) | ||
DrForr | Thanks though, that reminds me of something else. | ||
21:02
DarthGandalf left,
skids left
21:03
jameslenz left,
DarthGandalf joined
21:17
DarthGandalf left
21:18
DarthGandalf joined
21:22
jameslenz joined
21:24
jameslen_ joined,
jameslenz left
21:29
jameslen_ left
21:38
HaraldJoerg left,
Xliff left
21:48
pmurias left
21:49
jameslenz joined
21:50
pmurias joined,
jameslenz left
21:51
jameslenz joined,
kerframil joined
21:54
MasterDuke joined
21:56
jameslenz left
21:57
jameslenz joined
21:59
jameslen_ joined,
jameslenz left
22:04
jameslen_ left,
sena_kun left,
sena_kun joined
22:07
sena_kun left
22:23
jameslenz joined
22:25
jameslen_ joined,
jameslenz left
22:29
jameslen_ left
22:36
benji__ joined,
rindolf left,
pmurias left
22:37
pmurias joined
22:38
pmurias left
22:39
benjikun2 left
|
|||
SmokeMachine | Is there a way to a module create a custom phaser? | 22:47 | |
timotimo | a slang allows you to parse a new phaser, but where code to support it has to go is entirely dependent on when they're supposed to run | 22:48 | |
22:49
jameslenz joined
22:51
jameslen_ joined,
jameslenz left
22:55
jameslen_ left
22:57
jameslenz joined
22:58
DarthGandalf left
22:59
jameslenz left,
jameslenz joined
23:04
jameslenz left
23:18
pecastro left,
DarthGandalf joined
|
|||
buggable | New CPAN upload: Readline-0.1.1.tar.gz by JGOFF modules.perl6.org/dist/Readline:cpan:JGOFF | 23:25 | |
New CPAN upload: Readline-0.1.2.tar.gz by JGOFF modules.perl6.org/dist/Readline:cpan:JGOFF | |||
23:28
DarthGandalf left
23:31
DarthGandalf joined
23:43
lizmat left
|
|||
tyil | for those who want to score some SO rep: stackoverflow.com/questions/512753...e-matching | 23:44 | |
23:45
cpage_ joined
23:48
cpage left,
cpage_ is now known as cpage
23:56
Some-body_ joined
23:57
DarthGandalf left,
Some-body_ is now known as DarthGandalf
23:59
Sgeo__ left,
Sgeo__ joined
|