»ö« 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:01
mcmillhj joined,
margeas left
00:05
mcmillhj left
00:08
comborico1611 left
|
|||
lookatme | :) | 00:25 | |
00:36
mcmillhj joined
00:39
w_richard_w joined
00:41
mcmillhj left
|
|||
timotimo | .tell rindolf fwiw, the euler 287 program when slightly modified to be valid nqp code runs in 1:13.8, which is almost 45s faster than perl6 with only minor code differences | 00:44 | |
yoleaux | timotimo: I'll pass your message to rindolf. | ||
El_Che | timotimo, the resident microoptimizer :) | 00:45 | |
timotimo | sorry about that :\ | ||
El_Che | no, it's interesting | ||
00:46
ryn1x joined
00:47
ryn1x left
|
|||
timotimo | oh, look, it's doing the thing again where it does all arithmetic as nums | 00:47 | |
00:55
raschipi joined
|
|||
buggable | New CPAN upload: Memoize-0.0.2.tar.gz by ELIZABETH modules.perl6.org/dist/Memoize:cpan:ELIZABETH | 01:02 | |
01:09
mcmillhj joined
|
|||
tbrowder_ | lizmat++ | 01:13 | |
01:14
mcmillhj left
01:36
mcmillhj joined
01:41
mcmillhj left
01:44
raschipi left
01:48
ilbot3 left
01:56
ilbot3 joined,
ChanServ sets mode: +v ilbot3
02:05
dct left
02:06
mcmillhj joined
02:11
mcmillhj left
02:12
john_parr left
02:23
mahafyi joined,
mcmillhj joined
02:28
mcmillhj left
02:35
john_parr joined
02:36
fascinum joined
|
|||
buggable | New CPAN upload: Sparrowdo-0.0.38.tar.gz by MELEZHIK modules.perl6.org/dist/Sparrowdo:cpan:MELEZHIK | 02:52 | |
03:13
aindilis joined
03:16
Schepeers left
03:21
mcmillhj joined
03:23
fascinum left
03:26
mcmillhj left
03:39
Schepeers joined
03:43
fascinum joined
03:48
Schepeers left
04:04
Schepeers joined
04:14
mcmillhj joined
04:18
mcmillhj left
|
|||
buggable | New CPAN upload: P5chdir-0.0.4.tar.gz by ELIZABETH modules.perl6.org/dist/P5chdir:cpan:ELIZABETH | 04:22 | |
04:28
mcmillhj joined
04:32
mcmillhj left
04:34
Schepeers left
04:41
Schepeers joined
04:42
curan joined
04:50
kurahaupo left
04:55
lizmat left,
psychoslave_ joined
04:58
eliasr left
04:59
xtreak joined
05:01
lizmat joined
05:02
kurahaupo joined,
mcmillhj joined
05:07
mcmillhj left
|
|||
AlexDaniel | squashable6: next | 05:11 | |
squashable6 | AlexDaniel, ⚠🍕 Next SQUASHathon in 1 day and ≈4 hours (2018-06-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
05:21
sauvin joined
|
|||
buggable | New CPAN upload: Sparrowdo-0.0.39.tar.gz by MELEZHIK modules.perl6.org/dist/Sparrowdo:cpan:MELEZHIK | 05:32 | |
05:46
domidumont joined
05:48
mcmillhj joined
05:49
skids left
05:52
domidumont left,
mcmillhj left
05:53
domidumont joined
06:15
mcmillhj joined
06:16
jmerelo joined
06:17
fascinum left
06:19
domidumont left,
mcmillhj left
|
|||
jmerelo | o/ | 06:20 | |
yoleaux | 30 May 2018 20:45Z <El_Che> jmerelo: < mrdside> jmerelo: i found this - docs.perl6.org/type/Encoding | ||
jmerelo | .tell mrdside right; you would have to implement something that mixes the Encoding role. | 06:21 | |
yoleaux | jmerelo: I'll pass your message to mrdside. | ||
06:34
wamba joined
06:37
domidumont joined
06:43
rindolf joined
06:50
Ven`` joined
06:51
mcmillhj joined
06:54
Ven`` left,
Ven`` joined
06:56
mcmillhj left
|
|||
Geth | doc: eed1918137 | (JJ Merelo)++ | xt/word-variants.t Rewrites test to use actual regexes Also adds "zero width" → zero-width. Closes 2041. |
07:02 | |
doc: 266d9f0cdd | (JJ Merelo)++ | 2 files Adds file system → filesystem |
|||
doc: 1fdc6ed2a8 | (JJ Merelo)++ | 8 files Extensive word substitution and reflow |
|||
doc: 1b0518bfc3 | (JJ Merelo)++ | xt/word-variants.t Puts correct explanation closes #2041 |
07:03 | ||
07:06
mcmillhj joined
07:11
mcmillhj left
07:14
darutoko joined
|
|||
Voldenet | That may be a silly question, but how do I add a day to a date with local timezone? | 07:17 | |
and I'm not sure why dates don't have a timezone | |||
It matters a little bit, because some countries might have skipped a day or two, but I guess it's possible to use DateTime everywhere | 07:20 | ||
but in-timezone doesn't actually accept a timezone, which is even more confusing, it accepts a number | 07:21 | ||
jmerelo | Voldenet: hum. Not sure I understand you. | ||
Let's rewind. You have an Instant, a DateTime or a Date? | 07:22 | ||
Voldenet | I have a string-formatted date and need to get a utc timestamp of previous and next day | 07:23 | |
jmerelo | Voldenet: the TZ is somewhere else, right? Or you have something like 2015-12-24T12:23:00+0200 | 07:25 | |
07:25
aindilis left
|
|||
jmerelo | Voldenet: you can convert the date to UTC and then simply add or substract one day. There are all these methods to add/substract offset docs.perl6.org/type/DateTime#method_timezone | 07:26 | |
07:26
zakharyas joined
|
|||
Voldenet | hm, but adding a day to utc timestamp will lose the repeating hours | 07:26 | |
made by dst changes | 07:27 | ||
I like how the day can have 23 or 25 hours thanks to that, it makes my life easier and better :D | |||
and obviously, this is wrong: DateTime.now.later(days => 200).say | |||
in CEST it returns a date that's one hour too late | 07:28 | ||
jmerelo | Voldenet: but DST changes by country, even by state | ||
Voldenet | Yes! That's why we have timezones :P | ||
jmerelo | Voldenet: it's difficult to put that into a core module. | 07:29 | |
07:30
dakkar joined
|
|||
jmerelo | Voldenet: DST actually changes the TZ. | 07:30 | |
TEttinger | 200 days and a move cross-country | ||
Voldenet | It changes the offset, but the TZ remains Europe/Berlin for example | 07:31 | |
TEttinger | 200 days and in that time venezuela changes their timezone by 15 minutes | ||
Voldenet | ...I think, I'm not sure | ||
07:31
mcmillhj joined
|
|||
jmerelo | Voldenet: it's because in Europe all the TZ changes DST at the same time. | 07:31 | |
Voldenet: I seem to remember Arizona is, depending on DST, either in Pacific or Rocky Mountains time. | 07:32 | ||
Voldenet | good heavens... | ||
jmerelo | Voldenet: eu.azcentral.com/story/travel/2017.../98639074/ | ||
So you need additional information besides TZ to take DST into account. | 07:33 | ||
Voldenet: it's even worse, because inside Arizona, the actual time will depend on whether you are inside a Navajo or Hopi reservation. | 07:34 | ||
07:34
mrdside joined
|
|||
jmerelo | Voldenet: you should visit Arizona. Beautiful country, if somewhat wacky re: clocks and time. | 07:35 | |
donpdonp | 'store all dates as utc, apply timezone tweaks for display. | 07:36 | |
07:36
mcmillhj left
|
|||
Voldenet | I really wonder why tz db doesn't have America/Arizona and how do people in IT deal with this issue | 07:36 | |
mrdside | hi. i asked tomorrow about new encoding. i found this - docs.perl6.org/type/Encoding and this - github.com/tony-o/perl6-encoding-h...an/PP6.pm6 . but i can't find information about 'Encoding::Decoder' | 07:38 | |
yoleaux | 06:21Z <jmerelo> mrdside: right; you would have to implement something that mixes the Encoding role. | ||
jmerelo | mrdside: it's a method you have to override docs.perl6.org/type/Encoding#method_decoder | 07:39 | |
07:39
aindilis joined
|
|||
Voldenet | meh, for now I'll just add 86400 to a timestamp and hope nobody notices :) | 07:41 | |
mrdside | i should define class, that doing role Encoding with overrid there four methods. and what about 'Encoding::Registry'? | ||
lookatme | I make a binding of libiconv currently | 07:42 | |
It seems work now, but have not publish on CPAN | 07:43 | ||
github.com/araraloren/perl6-libiconv | |||
07:44
mcmillhj joined
|
|||
Voldenet | hm, last time I checked, Blob.decode did not use the encoding registry, but it was some time ago | 07:47 | |
07:48
mcmillhj left
|
|||
Geth | doc: 7d8b76a755 | (JJ Merelo)++ | 2 files Revising Str.match, subst and subst-mutate. * All match adverbs and cases are mentioned. * All subst adverbs are also mentioned in its own place. I have changed the ordering of the sections. * subst-mutate is linked from subst. So I would say the concerns of #919 have been adressed. Closes #919. (some minor reflow in this and faq file too) |
07:56 | |
Voldenet | mrdside: this more or less how it's used, but .decode method just won't even peek into the registry: ix.io/Mi6 | 08:02 | |
08:03
xtreak left,
mcmillhj joined
08:08
mcmillhj left
08:24
scimon joined
|
|||
mrdside | Voldenet: thx. Unknown string encoding: 'custom' in block <unit> at decoder.p6 line 40 | 08:25 | |
Voldenet | I know, right? | ||
08:25
pmurias joined
|
|||
pmurias | hi | 08:25 | |
mrdside | p6: say 'Hi!'; | 08:27 | |
camelia | Hi! | ||
mrdside | p6: ix.io/Mi6 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Confused at <tmp>:1 ------> 3http:7⏏5//ix.io/Mi6 expecting any of: colon pair |
||
Voldenet | mrdside: ix.io/1bTH this is the solution I came up with | 08:28 | |
I guess it's far from elegant | |||
and I guess there's a bug in it | 08:30 | ||
08:32
xtreak joined
08:33
xtreak_ joined
|
|||
mrdside | Voldenet: looks pretty nice, thanks | 08:33 | |
Voldenet | (I've used @state instead of @!state) | ||
08:36
xtreak left
|
|||
Voldenet | And it has a huge problem: when decode is used internally (socket), you'll need to use bytes | 08:38 | |
mrdside | Voldenet: i need read file with specific encoding | 08:42 | |
like 'my $fh = open "data.txt", enc => "custom";' | 08:43 | ||
Voldenet | It just won't work. :) | ||
mrdside | :) | ||
Voldenet | (maybe it can work, but I'm doing something wrong) | ||
mrdside | Voldenet: anyway thanks a lot | 08:44 | |
08:49
mcmillhj joined
08:50
wamba left
|
|||
Voldenet | Oh, I might've been wrong | 08:51 | |
08:53
mcmillhj left
|
|||
Voldenet | mrdside: I'm taking that "it won't work" back, because it actually does work ix.io/1bTP | 08:55 | |
apparently, some methods use decoders properly | |||
08:58
mahafyi left
|
|||
Geth | doc: 9f2cdfe13e | (JJ Merelo)++ | 2 files Some reflow and rephrasing following @b2gills' advice |
09:04 | |
doc: 4c75cd95ab | (JJ Merelo)++ | doc/Language/regexes.pod6 Improved backtracking example closes #629 |
|||
synopsebot | Link: doc.perl6.org/language/regexes | ||
09:06
mcmillhj joined
09:10
mcmillhj left
09:17
natrys joined
09:19
ExtraCrispy joined
09:29
mcmillhj joined
09:35
sena_kun joined,
mcmillhj left
09:38
scimon left,
scimon joined
09:43
mahafyi joined
10:06
gregf_ joined
10:22
xtreak_ left
10:23
w_richard_w left
|
|||
Geth | doc: e9de3277ba | (JJ Merelo)++ | 4 files Un-reflows to put L links in the same line |
10:24 | |
doc: 546102f55a | (JJ Merelo)++ | doc/Language/packages.pod6 Expands confusing name lookup examples And fixes some of them. Closes #969 |
|||
synopsebot | Link: doc.perl6.org/language/packages | ||
10:25
darutoko left
10:29
xtreak joined
10:42
margeas joined
10:44
margeas is now known as markong
10:45
markong is now known as markoong
|
|||
AlexDaniel | squashable6: next | 10:52 | |
squashable6 | AlexDaniel, ⚠🍕 Next SQUASHathon in ≈23 hours (2018-06-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
Geth | doc: 469bdb40ba | (JJ Merelo)++ | doc/Programs/03-environment-variables.pod6 Adds documentation on environment variables. This would go towards solving #949. It's a page adapted from the Rakudo one, which is linked, along with author attribution. |
||
doc: 3de171f8a5 | (JJ Merelo)++ | doc/Programs/03-environment-variables.pod6 Adds more env vars from the wiki by @masterduke17 This would close #949. |
|||
jmerelo | Today is my last "official" day with the TPF grant. The number of issues is down to 175, which fill only 7 pages of issues. I'm kinda stopping solving issues for today, and focus a bit more on the report. | 10:56 | |
El_Che | jmerelo: 🍕 for you! | 10:57 | |
:) | |||
jmerelo | I'm gonna stick around, but will decrease the time devoted to this. Also I'll try to focus on more complicated, "big" issues, as well as try to respond ASAP to new issues | 10:58 | |
AlexDaniel | cool | ||
jmerelo | El_Che: thanks. | ||
AlexDaniel | El_Che: no! That pizza was reserved for the squashathon! | ||
:) | |||
jmerelo | AlexDaniel: here, have it back :-) | 10:59 | |
AlexDaniel | nah don't worry, we'll order fresh ones for tomorrow :D | ||
jmerelo | AlexDaniel: :-) | ||
El_Che | AlexDaniel: it's probably Hawaii, half of the people hate it | 11:02 | |
there will be some leftovers :) | |||
11:11
Ven`` left
11:16
xtreak left,
mahafyi_ joined
11:17
mahafyi left,
mahafyi_ is now known as mahafyi
11:23
xtreak joined
11:24
zakharyas left
11:38
wamba joined
|
|||
Geth | doc: ismailarilik++ created pull request #2084: Add missing right paranthesis |
11:42 | |
doc: d0c4d01508 | (İsmail Arılık)++ (committed using GitHub Web editor) | doc/Language/glossary.pod6 Add missing right paranthesis |
11:43 | ||
doc: 51e0943728 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/glossary.pod6 Merge pull request #2084 from ismailarilik/patch-1 Add missing right paranthesis That's awesome. Thanks! |
|||
synopsebot | Link: doc.perl6.org/language/glossary | ||
jmerelo | Well, this is something I wanted to look at: perl6/doc file entropy fusiontables.google.com/data?docid...rtnew:id=3 | 11:49 | |
11:50
mahafyi_ joined,
mahafyi left
|
|||
jmerelo | It reflects the amount of "information" different files have, as in the number of different authors and variety of collaboration | 11:50 | |
11:50
mahafyi_ is now known as mahafyi
|
|||
El_Che | perl6 domains look to be down | 11:52 | |
jmerelo | The main one? | ||
Ulti | not for me | ||
El_Che | yes | 11:53 | |
weird | |||
it's back | |||
11:54
psychoslave_ left
|
|||
jmerelo | An article on author entropy just in case someone is interested. scholarsarchive.byu.edu/cgi/viewco...ext=facpub | 11:59 | |
El_Che | bookmarked | 12:00 | |
12:13
kini left
12:15
xtreak left
|
|||
Geth | doc: ismailarilik++ created pull request #2085: Fix a typo |
12:17 | |
12:18
xtreak joined
12:19
xtreak left
12:20
kini joined
12:24
natrys left
|
|||
jmerelo | Here's the hall of fame of the files with the highest number of authors raw.githubusercontent.com/JJ/TPF-G...dified.png in perl6/doc | 12:28 | |
Can you guess without looking at the chart? It's a tie, actually. | |||
And here's the top 20 authors with the highest number of modified files github.com/JJ/TPF-Grant/blob/maste...dified.png That one is easier to guess. | 12:29 | ||
A factoid: there are ~1300 files in the repo, some 400 of them have been modified by a single author. All this data is in the TPF repo, of course. raw.githubusercontent.com/JJ/TPF-Grant/ | 12:30 | ||
12:31
Ven`` joined
|
|||
jmerelo | He, and I just realized there's .DS_Store (or was) in the repo... | 12:31 | |
El_Che | raw.githubusercontent.com/JJ/TPF-Grant <-- err 400 | 12:32 | |
12:33
scimon left
|
|||
jmerelo | Sorry: correct address https:/github.com/JJ/TPF-Grant/ | 12:35 | |
12:36
mcmillhj joined,
mcmillhj left
|
|||
jmerelo | There are actually only 452 files now, actually. | 12:36 | |
Geth | doc: c7eb3227b6 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Type/Supply.pod6 Rewrite rakudo-specific note Normally implementation-specific things are not documented, but in this particular case we can prevent a lot of banging against a wall by mentioning some known issues. In this case the behavior has changed quite a bit so IMO it's a worthy mention. See issue #1486 for more info on docs vs implementation-specific notes. |
||
synopsebot | Link: doc.perl6.org/type/Supply | ||
12:37
jmerelo left,
HaraldJoerg joined
|
|||
AlexDaniel | good job AlexDaniel, talking about a releases that do not exist yet :) | 12:37 | |
s/a// | |||
12:41
mcmillhj joined
12:46
Ven` joined,
Ven` left
12:47
Ven` joined
|
|||
Geth | doc: 46f4ac6099 | (Will "Coke" Coleda)++ | README.pt.md whitespace |
12:47 | |
doc: 9e1b78a730 | (Will "Coke" Coleda)++ | doc/Type/IO/Path.pod6 fix compilation |
|||
synopsebot | Link: doc.perl6.org/type/IO::Path | ||
12:49
Ven`` left
|
|||
Geth | whateverable: 2be293f0a5 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files Add fragile workarounds for signal issues More info: github.com/rakudo/rakudo/issues/1888 |
12:52 | |
12:55
Azry joined
12:57
zakharyas joined
|
|||
titsuki_ | bisectable: use Test; is set("cat","bug"), set("bug","cat"); | 13:15 | |
bisectable6 | titsuki_, On both starting points (old=2015.12 new=c80ea2f) the exit code is 0 and the output is identical as well | ||
titsuki_, Output on both points: «ok 1 - » | |||
13:21
Ven` left,
Ven`` joined
13:26
psychoslave_ joined
13:29
kurahaupo_ joined,
kurahaupo left
13:31
psychoslave_ left,
psychoslave_ joined
13:33
scimon joined
13:52
skids joined
13:54
mcmillhj left
13:56
Zoffix joined,
Ven`` left
|
|||
Zoffix | titsuki_: the bug is in that line of code :) sets are unordered and unless you stringify them with .gist or .perl (pending RT#131244 ) you'll get them stringified as unordered. The `is` routine is not an appropriate routine to test sets. Use `is-deeply` instead. | 13:57 | |
yoleaux | 30 May 2018 12:42Z <lizmat> Zoffix: re your last tweet: I would stick "@*ARGS.List.perl.say" in a script called "qw" :-) | ||
synopsebot | RT#131244 [new]: rt.perl.org/Ticket/Display.html?id=131244 Baggy/Setty .Str/.gist/.perl needs to guarantee order, like Map/Hash do | ||
Zoffix | Ah, ok, .Str is also apparently meant to be ordered. | 13:58 | |
13:58
mcmillhj joined
|
|||
Zoffix | titsuki_: then there are two bugs. RT#131244 and using `is` routine, as say, `set($(<foo bar>), 42)` and `["foo bar", 42]` would still have the test passing despite being wrong types and having wrong contents | 13:59 | |
14:01
Ven`` joined
|
|||
titsuki_ | so I should use "is-deeply" and use data type other than set (e.g., Array) ? | 14:02 | |
14:03
mcmillhj left
|
|||
Zoffix | titsuki_: you can use a set | 14:03 | |
m: use Test; is-deeply set(<a b c>), set <b c a> | |||
camelia | ok 1 - | ||
titsuki_ | Zoffix: Thanks! I see. | 14:04 | |
Zoffix | m: use Test; is ["foo bar", 42], set($(<foo bar>), 42) | 14:05 | |
camelia | ok 1 - | ||
Zoffix | m: use Test; is-deeply ["foo bar", 42], set($(<foo bar>), 42) | ||
camelia | not ok 1 - # Failed test at <tmp> line 1 # expected: (42,("foo", "bar")).Set # got: $["foo bar", 42] |
||
14:08
Zoffix left
|
|||
Juerd | What does ,= do, and what's the usecase for that? | 14:23 | |
",=" was mentioned in #perl as the operator that push could have been. I began to wonder if Perl 6 did anything with it. It does, but it doesn't seem too useful. | 14:24 | ||
In its defense @foo ,= 6; does do exactly what @foo = @foo, 6; does... | 14:26 | ||
14:26
nnunley joined
|
|||
jkramer | m: my @foo = <foo bar baz>; @foo,=6; dd @foo | 14:26 | |
camelia | Array @foo = ((my @Array_76155224) = [@Array_76155224, 6]) | ||
jkramer | Wat | ||
m: my @foo = <foo bar baz>; @foo,=6; .say for @foo | |||
camelia | (\Array_66713320 = [Array_66713320 6]) 6 |
||
Juerd | You get an array of a self-reference and the new value. | ||
@foo is @foo[0] is @foo[0][0] is @foo[0][0][0] ad infinitum :D | 14:27 | ||
jkramer | Nice :D | ||
m: my $foo = 5; $foo,=6; dd $foo | |||
camelia | List $foo = (my \List_63201824 = $(List_63201824, 6)) | ||
Juerd | But am I understanding it correctly, and does it have *any* use case at all? | ||
jkramer | It's not listed in docs.perl6.org/language/operators | 14:28 | |
moritz | = is a meta operator; I don't think we list all the combinations you can do with operators | 14:39 | |
+= *= /= -= etc. | 14:40 | ||
AlexDaniel | squashable6: next | ||
squashable6 | AlexDaniel, ⚠🍕 Next SQUASHathon in ≈19 hours (2018-06-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
jkramer | Actually ,= would be quite nice and useful if it worked like .push | 14:45 | |
14:45
Zoffix joined
|
|||
Zoffix | Juerd: yeah, you can combine hashes with it | 14:45 | |
m: my %h1 = <a 1 b 2>; my %h2 = <b 3 c 4>; %h1 ,= %h2; dd %h1 | 14:46 | ||
camelia | Hash %h1 = {:a(IntStr.new(1, "1")), :b(IntStr.new(3, "3")), :c(IntStr.new(4, "4"))} | ||
Juerd | Thanks | ||
14:47
Azry left
|
|||
Zoffix | m: say [] ,= 42 | 14:48 | |
camelia | Cannot assign to an immutable value in block <unit> at <tmp> line 1 |
||
Zoffix | What immutable value? | ||
moritz | m: [] = 42 | 14:49 | |
camelia | ( no output ) | ||
moritz | m: [] = [], 42 | 14:50 | |
camelia | ( no output ) | ||
moritz | looks like a bug to me | ||
Zoffix | Yeah, looks like the genned QAST uses assign instead p6store op | ||
m: my @a; my @b; @a ,= @b | 14:51 | ||
camelia | ( no output ) | ||
Zoffix | m: my @a; my @b; @a [R,]= @b | ||
camelia | Cannot assign to an immutable value in block <unit> at <tmp> line 1 |
||
14:51
curan left
14:52
rindolf left
|
|||
Zoffix | R#1890 | 14:52 | |
synopsebot | R#1890 [open]: github.com/rakudo/rakudo/issues/1890 [codegen] Bad codegen with `,=` meta op | ||
14:53
psychoslave_ left
14:54
Zoffix left
14:56
sjn left,
rindolf joined
14:59
mrdside left
15:05
Ven`` left
15:09
Ven`` joined
|
|||
[Coke] | docs - what is the purpose of the multi-lingual readmes when we force everyone to generate docs in english atm? | 15:21 | |
is the thought that this is a precursor to getting docs in multiple languages? | 15:22 | ||
AlexDaniel | I wondered this too | 15:24 | |
but interestingly people are so eager to contribute this | 15:25 | ||
which is great | |||
15:33
Ven`` left
15:43
mahafyi left
|
|||
[Coke] | aye | 16:02 | |
16:04
domidumont left
16:07
lucasb joined
16:08
psychoslave_ joined
16:09
mcmillhj joined
16:10
mcmillhj left
|
|||
lucasb | moritz quote at the end of the README also gets translated to other languages. This is funny | 16:13 | |
16:14
jmerelo joined
|
|||
jmerelo | o/ | 16:14 | |
16:14
mcmillhj joined
|
|||
lucasb | hola | 16:15 | |
jmerelo | Buenas :-) | 16:16 | |
This question is still unanswered (sorta) in SO: stackoverflow.com/questions/506110...-multi-sig Any idea? | 16:17 | ||
moritz | lucasb: somebody wanted a "vision statement" from me to know what goes into the doc repo; it kinda makes sense to translate that | 16:20 | |
16:21
zakharyas left
16:23
dakkar left
16:27
scimon left
16:31
ExtraCrispy left
16:37
comborico1611 joined
16:42
natrys joined
16:43
domidumont joined
16:54
atroxaper joined
17:02
psychoslave_ left,
zakharyas joined
17:15
lucasb left
17:20
Khisanth left
17:25
eliasr joined
17:27
cpage_ joined
17:30
cpage left,
cpage_ is now known as cpage
|
|||
Geth | ¦ doc: coke self-assigned Sharing Pod 6 caches github.com/perl6/doc/issues/1952 | 17:30 | |
17:33
Khisanth joined
17:34
raynold joined
17:39
matzek joined,
atroxaper left
17:48
wamba left
|
|||
AlexDaniel | .seen jstruder | 17:58 | |
yoleaux | I haven't seen jstruder around. | ||
AlexDaniel | .seen jstuder | ||
yoleaux | I saw jstuder 1 Apr 2018 15:51Z in #perl6-dev: <jstuder> yeah, don't understand why it would be performing that op on the iterator itself though | ||
17:59
zakharyas left
|
|||
lizmat | AlexDaniel: yeah, he doesn't hang out online much | 18:00 | |
AlexDaniel | that's ok | ||
I'll just file a ticket :) | |||
18:09
molaf joined
18:12
sena_kun left
|
|||
jmerelo | Another nice chart: open and closed issues through the history of the perl6/doc repo github.com/JJ/TPF-Grant/blob/maste...d-diff.png | 18:17 | |
Data in the usual place, the same TPF grant repo | 18:18 | ||
March and April were the 2nd and 3rd with the highest number of issues open, BTW | 18:19 | ||
April and May 1st and second with the highest number of issues closed. | |||
I keep finding September'17 was a very special month. Summer 17, in general. Any idea what happened? | 18:20 | ||
matzek | Hello folks. I have a perl6 script which is checking links, getting A records etc. and then stores all in a postgres database. The script is working well so far. But it stores nothing in a database when it runs via cron (fbsd, PATH is set properly). Any hints? | 18:22 | |
jmerelo | matzek: cron has usually got its own user. Also, possible problems with path. | 18:23 | |
timotimo | it could be unable to find its necessary libraries | ||
18:23
pmurias left
|
|||
matzek | path is set - the job is running as root | 18:24 | |
top also shows that moar is running and consuming cpu time | |||
timotimo | that seems like a very bad idea :) | ||
matzek | there are many jobs runng as root ;) | ||
jmerelo | matzek: could be library path. You'll have to find why it's not putting anything into the database. Most likely privileges; maybe root has not privileges to update the database... | ||
18:25
sauvin left
|
|||
timotimo | well, if it can't find the libraries, it would probably die early throwing an exception | 18:25 | |
so perhaps that isn't what's wrong | |||
matzek | root has its own db | ||
so i should print some debug stuff in a file first, hm | 18:26 | ||
timotimo | can always hook up to the moar process with gdb, "up" a few times until you're in a frame that has a tc available (for example MVM_interp_run) and then "call MVM_dump_backtrace(tc)", resume, ctrl-c, repeat | ||
to figure out what it's doing | |||
El_Che | or do like I do and insert prints all over the place :) | ||
timotimo | can you access the prints while the program is running, or only when cron has finished and sends the mail? | 18:27 | |
El_Che | cron sends a mail with the output | 18:32 | |
or you can write to a file (>) etc | |||
lizmat | jmerelo: maybe in the summer more people have time to try out fun things ? | 18:39 | |
jmerelo | lizmat: who knows. That might be the case... | 18:42 | |
matzek | nah, cron dont get an output..the log says just that the job has startet | 18:45 | |
lizmat: strange logic :D | 18:46 | ||
jmerelo | lizmat: it's only that particular month in that particular summer, though... | ||
lizmat | well, there *was* a Perl conference in Amsterdam that month :-) | 18:47 | |
jmerelo | lizmat: so you think that was it? Lots of people were encouraged to try Perl 6? | 18:49 | |
lizmat | I'd like to think so :-) | 18:50 | |
jmerelo | lizmat: it didn't happen in the American conference, though... | ||
matzek | maybe thats the reason for perl6 :D | 18:52 | |
masak | is it just me, or is Python's read-and-evaluate style of traversing a program surprisingly similar to Lisp's? | 18:54 | |
18:56
psychoslave_ joined
|
|||
matzek | El_Che: sorry, you are right @mail :) | 18:57 | |
lizmat | jmerelo: I didn't attend the American Perl Conference last year :-) | 19:01 | |
19:03
psychoslave_ left
19:04
domidumont left
19:09
mrdside joined
|
|||
AlexDaniel | squashable6: next | 19:15 | |
squashable6 | AlexDaniel, ⚠🍕 Next SQUASHathon in ≈14 hours (2018-06-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
masak | m: say "pun".indent(4) # pun indented | 19:18 | |
camelia | pun | ||
masak | sorry. I'm backlogging 2014, and that one was too funny not to do again in the present :P | ||
19:19
raynold left
|
|||
masak | we also had one for "Girl, Interrupted" | 19:19 | |
jmerelo | masak: :-))))) | ||
masak | m: for "Girl".comb { .print; last if ++(state $ ) == 2 } # interrupted | ||
camelia | Gi | ||
19:20
wamba joined
19:21
jmerelo left
19:25
psychoslave joined
19:36
stee3 joined
19:37
mrdside_ joined
19:38
stee left
19:39
mrdside left
19:41
mrdside_ left
|
|||
matzek | omfg..it was a relative path deep in a sub :/ hell... | 19:51 | |
19:53
mcmillhj left
19:56
Guest59250 joined
|
|||
Guest59250 | How do you qx{...} interactively? | 19:56 | |
19:56
rindolf left
|
|||
matzek | Guest59250: what do you mean with interactively? | 19:57 | |
19:57
uzl joined
|
|||
Guest59250 | matzek: Output -> User Interaction -> Output | 19:58 | |
matzek | dunno, maybe qqx{} fits into your needs? | 20:00 | |
AlexDaniel | sounds like Proc::Async is needed | ||
20:01
rindolf joined
|
|||
AlexDaniel | this was a nice example: my $p = Proc::Async.new: ‘less’, :w; start { sleep 2; await $p.put: “hello world $_” for ^50; sleep 3; $p.close-stdin }; react { whenever $p.start { say ‘pager closed’ } } | 20:01 | |
it is somewhat unrelated to the question, but maybe some ideas can be borrowed from it :) | |||
Guest59250: what program are you running? And what kind of user interaction is expected? | 20:02 | ||
Guest59250 | AlexDaniel: qx{apt-get install ...} | 20:03 | |
matzek | and you would like to give an answer .. if needed? | 20:04 | |
AlexDaniel | Guest59250: ok, and by user interaction what do you mean? | ||
Guest59250 | AlexDaniel: y | ||
El_Che | apt-get install -y | ||
Guest59250 | El_Che: Not like that. | 20:05 | |
El_Che | qx is not an Expect replacement | ||
AlexDaniel | El_Che: hold on | ||
you can still bind stdin, no? | |||
matzek | is qx{} not more like shoot and forget? | ||
uzl | Hi, guys! I was reading about Polish notation and I'm wondering if I could overload the + operator to behave in the following way: | 20:07 | |
a b + => a + b | |||
m: [+] 2, 3; | 20:08 | ||
camelia | Potential difficulties: Useless use of [+] in sink context at <tmp>:1 ------> 3<BOL>7⏏5[+] 2, 3; |
||
20:08
epony left
|
|||
uzl | m: say [+] 2, 3; | 20:08 | |
camelia | 5 | ||
20:08
epony joined,
mcmillhj joined
|
|||
Guest59250 | Is that RPN? | 20:09 | |
AlexDaniel | Guest59250: ok, here it is | 20:10 | |
matzek | AlexDaniel: you mean bind-stdin? can this be used for a "dialog" with the shell? | ||
AlexDaniel | Guest59250: my $p = Proc::Async.new: ‘apt-get’, ‘install’, ‘pidgin’, :w; react { whenever Promise.in(3) { $p.put: ‘n’ }; whenever $p.start { say ‘done’} }' | ||
like, that's one way | |||
let's try with bind-stdin also | |||
20:11
matzek_ joined
|
|||
AlexDaniel | here it is: my $p = Proc::Async.new: ‘apt-get’, ‘install’, ‘pidgin’; $p.bind-stdin: $*IN; react { whenever $p.start { say ‘done’ } } | 20:11 | |
El_Che: can we now declare Proc::Async to be expect replacement? :P | 20:12 | ||
El_Che | Expect had a very simple linear api | 20:13 | |
async tends to make your head explode :) | |||
AlexDaniel | El_Che: sounds like a great module, well volunteered | 20:14 | |
geekosaur | and expect handles things that want a terminal, you need to at least do more work to make Proc::Async use a pty instead of a pipe | ||
AlexDaniel | .oO( 6pect ) |
||
El_Che | yeah, I'll add it to the plan after I finish this damn dessertation :) | ||
AlexDaniel | geekosaur: yes that's true :( | 20:15 | |
20:15
matzek left
|
|||
AlexDaniel | in fact I'm a bit surprised that apt-get says “Do you want to continue? [Y/n]” to a non-tty | 20:15 | |
like, who is it talking to? | |||
geekosaur | …and now you;re in trouble on windows which doesn't do ptys (and other related things, like, er, entire tty interface. which makes interactive programs idiosyncratic in general when run in batch context) | 20:16 | |
El_Che | AlexDaniel: debian has a hive mind | ||
Geth | whateverable/master: 5 commits pushed by (Aleks-Daniel Jakimenko-Aleksejev)++ | ||
geekosaur | iirc that's semi-deliberate. as in, they punish interactiove use in non-interactive contexts directly instead of potentially leading to nasty surprises later | 20:17 | |
AlexDaniel | makes sense | ||
geekosaur: hey, but if I do bind-stdin to $*IN, what's going to happen exactly? | 20:18 | ||
will it be a simple pipe? | 20:19 | ||
geekosaur | depends on what it was given. by defaultg is is a pipe | 20:21 | |
bind-stdin is too late to change this | |||
you have to plumb the process with the right thing beforehand | |||
AlexDaniel | but the process is not started before .start | ||
and you can't bind-stdin after .start | 20:22 | ||
iirc | |||
geekosaur | this may mean the interface has made a common mistake that renders it potentially broken in other cases as well | ||
AlexDaniel | what do you mean? What common mistake? | 20:23 | |
geekosaur | the very fact you're asking this… no understanding of how inter-process communication works? how it has to work? | ||
there are many common mistakes, really. I'm not exactly sure what it does currently therefore which of many mistakes it could have made | 20:24 | ||
at one point the implementation did "link one procerss's stdout to anothrer's stdin" by making thjem separate and writing data --- once --- from one to the othet | |||
which. very no. | |||
worked for extremely simple things, broke anyone trying to actually use it | 20:25 | ||
AlexDaniel | m: my $p = Proc::Async.new: ‘bash’, ‘-c’, ‘if [ -t 1 ] ; then echo terminal; else echo "not a terminal"; fi’; $p.bind-stdin: $*IN; react { whenever $p.start { say ‘done’ } } | ||
camelia | Proc::Async 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 |
||
AlexDaniel | e: my $p = Proc::Async.new: ‘bash’, ‘-c’, ‘if [ -t 1 ] ; then echo terminal; else echo "not a terminal"; fi’; $p.bind-stdin: $*IN; react { whenever $p.start { say ‘done’ } } | ||
evalable6 | not a terminal done |
||
AlexDaniel | well, here it's not a terminal ofc | ||
geekosaur | Proc::Async is using pipes | ||
AlexDaniel | but if you run it locally | ||
then it say “terminal” | |||
geekosaur | hold on | 20:26 | |
I guess I have to go dig thought the impl now | |||
AlexDaniel | yeah | ||
but I guess I answered my question | |||
geekosaur | and then confuse you a different way instead of the current way, probably | ||
I *think* bind-stdi9n means you connected to its input, so output is still the thing you ran it on | 20:27 | ||
AlexDaniel | ooooooh | ||
geekosaur | because stdin and stdout are not magically always connected, otherwise you couldn't use pipes a | b | c becuase the first would loop a and b together | ||
leaving nothing for c | |||
*terminals* bind the tty / pty to all of stdin, stdout, stderr by default | 20:28 | ||
ok, yes, bind-stdin tells the Proc::Async how to plumb the process's input | 20:29 | ||
AlexDaniel | right | ||
geekosaur | output is not affected and will be that of the perl script | ||
Guest59250 | AlexDaniel: Method 'bind-stdin' not found for invocant of class 'Proc::Async' | ||
AlexDaniel | but my -t check is useless, right… | 20:30 | |
geekosaur | which for camelia is a service environment, stdout is a log file or /dev/null depending on how service is set up | ||
and for a command line is going to be the pty unless redirected | |||
AlexDaniel | Guest59250: what is your rakudo version? | ||
geekosaur | as for that last, Proc::Async::Pipe actually | ||
Guest59250 | AlexDaniel: This is perl6 version 2015.11 built on MoarVM version 2015.11 | 20:31 | |
AlexDaniel | Guest59250: well, that's very old, in fact that's even before the first stable language release | ||
huggable: deb | |||
huggable | AlexDaniel, Alpine, CentOS, Debian, Fedora, OpenSUSE and Ubuntu Rakudo packages: github.com/nxadm/rakudo-pkg#rakudo-pkg | ||
Guest59250 | I'm using Mint. | ||
AlexDaniel | Guest59250: maybe you can grab a package from here ↑ | 20:32 | |
Guest59250 | They don't have Mint? | ||
geekosaur | doesn't look like we currently expose pty. iirc that's a separate libuv interface and may be difficult, not to say unportable to windows | ||
Guest59250, for very nearly everything Mint is Ubuntu | |||
unless you're running LMDE in which case it's the corresponding debian unstable | 20:33 | ||
AlexDaniel | unless you're using a debian-based mint, I think | ||
matzek_ | .oO( what about openbsd :( ) |
20:34 | |
AlexDaniel | matzek_: it should work if you compile it | ||
we do try to keep it working on openbsd & freebsd | 20:35 | ||
matzek_ | rakudo * wont build and rakudobrew also dont build on obsd 6.3 | ||
AlexDaniel | matzek_: btw maybe you can even help with this ticket: github.com/rakudo/rakudo/issues/1867 | ||
.seen Kaiepi | 20:36 | ||
yoleaux | I saw Kaiepi 27 May 2018 11:10Z in #perl6: <Kaiepi> thanks | ||
AlexDaniel | matzek_: maybe talk to Kaiepi about that, it looks like they have it working on 6.3 | ||
matzek_ | fbsd works well | ||
AlexDaniel | geekosaur: thank you, by the way | ||
matzek_ | currently there is a port for rakudo 2017.10 or on obsd | 20:37 | |
geekosaur | POSIX IPC is tricky business. ptys make it more so. at one point there was something in ecosystem with a simple expect interface, I think, but it may be broken | ||
buggable: eco pty | 20:38 | ||
buggable | geekosaur, Nothing found | ||
geekosaur | bah | ||
20:39
psychoslave left
|
|||
geekosaur is actually a bit fried right now | 20:40 | ||
AlexDaniel leaves for a quick nap | 20:41 | ||
matzek_ | gn8 gents | 20:42 | |
20:42
matzek_ left
|
|||
AlexDaniel | heh, I'm very confused about github.com/sergot/http-useragent/pull/200 | 20:45 | |
sergot: I think did a boo-boo there ↑ | 20:46 | ||
I did* | |||
reverted the merge, now I go to bed :) | 20:49 | ||
20:52
raschipi joined
|
|||
buggable | New CPAN upload: Memoize-0.0.3.tar.gz by ELIZABETH modules.perl6.org/dist/Memoize:cpan:ELIZABETH | 20:52 | |
21:03
mcmillhj left
21:05
scovit joined
|
|||
scovit | Hello, if there is a function with a slurpy signature (non positional). Can I pass a set to it the same way I can pass a list? | 21:07 | |
moritz | scovit: example of the signature? | 21:08 | |
"non positional" sounds like "named", and I don't think you can pass a set to a slurpy named | 21:09 | ||
scovit | sub pickBinomial(Numeric(Cool) $p, *@list --> Seq:D) { sat @list; }; pickBinomial(0.3, <a b c>); | ||
m:sub pickBinomial(Numeric(Cool) $p, *@list --> Seq:D) { sat @list; }; pickBinomial(0.3, <a b c>); | |||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/EQ1HUaRAeK Undeclared routine: sat used at line 1. Did you mean 'set', 'say'? |
||
scovit | m:sub pickBinomial(Numeric(Cool) $p, *@list --> Seq:D) { say @list; }; pickBinomial(0.3, <a b c>); | 21:10 | |
evalable6 | (exit code 1) [a b c] Type check failed for return value; expected Seq but got Bool (Bool::True) in sub pickBinomial at /tmp/_a5nvQ2w7M line 1 in block <unit> at /tmp/_a5nvQ2w7M line 1 |
||
moritz | m: sub f(*@a) { say @a.elems }; f set(1, 2, 3) | ||
scovit | m:sub pickBinomial(Numeric(Cool) $p, *@list) { say @list; }; pickBinomial(0.3, <a b c>); | ||
camelia | 1 | ||
evalable6 | [a b c] | ||
scovit | m:sub pickBinomial(Numeric(Cool) $p, *@list) { say @list; }; pickBinomial(0.3, <a b c>.set); | ||
evalable6 | (exit code 1) No such method 'set' for invocant of type 'List'. Did you mean any of these? Set sec in block <unit> at /tmp/I_bd6aIScS line 1 |
||
scovit | m:sub pickBinomial(Numeric(Cool) $p, *@list) { say @list; }; pickBinomial(0.3, <a b c>.Set); | ||
evalable6 | [set(a b c)] | ||
moritz | scovit: seems sets are not flattened out | ||
scovit | exactly | ||
m:sub pickBinomial(Numeric(Cool) $p, *@list) { say @list; }; pickBinomial(0.3, |<a b c>.Set); | |||
evalable6 | [c => True b => True a => True] | ||
scovit | m:sub pickBinomial(Numeric(Cool) $p, *@list) { say @list.elems; }; pickBinomial(0.3, |<a b c>.Set); | 21:11 | |
evalable6 | 3 | ||
scovit | so what would you do? add a multi? | 21:12 | |
moritz | yes | ||
buggable | New CPAN upload: P5chdir-0.0.5.tar.gz by ELIZABETH modules.perl6.org/dist/P5chdir:cpan:ELIZABETH | ||
lizmat | wow, CPAN upload notifications are running ~13 hours behind | 21:14 | |
21:17
lizmat left
21:19
lizmat joined
|
|||
buggable | New CPAN upload: IConv-0.0.1.tar.gz by ALOREN modules.perl6.org/dist/IConv:cpan:ALOREN | 21:22 | |
scovit | I understand the logic: sets are not positional | 21:25 | |
m:sub pickBinomial(Numeric(Cool) $p, *%list) { say %list; }; pickBinomial(0.3, <a b c>); | 21:26 | ||
evalable6 | (exit code 1) Too many positionals passed; expected 1 argument but got 2 in sub pickBinomial at /tmp/jbVIk2IX_C line 1 in block <unit> at /tmp/jbVIk2IX_C line 1 |
||
scovit | m:sub pickBinomial(Numeric(Cool) $p, *%list) { say %list; }; pickBinomial(0.3, <a b c>.Set); | 21:27 | |
evalable6 | (exit code 1) Too many positionals passed; expected 1 argument but got 2 in sub pickBinomial at /tmp/yQHISkQXg5 line 1 in block <unit> at /tmp/yQHISkQXg5 line 1 |
||
scovit | m:sub pickBinomial(Numeric(Cool) $p, *%list) { say %list; }; pickBinomial(0.3, <a b c>.Set.Hash); | 21:28 | |
evalable6 | (exit code 1) Too many positionals passed; expected 1 argument but got 2 in sub pickBinomial at /tmp/lwwMsx4qbs line 1 in block <unit> at /tmp/lwwMsx4qbs line 1 |
||
scovit | and hash never flattenb | ||
21:29
natrys left
|
|||
buggable | New CPAN upload: P5math-0.0.1.tar.gz by ELIZABETH modules.perl6.org/dist/P5math:cpan:ELIZABETH | 21:32 | |
21:32
mcmillhj joined
21:37
mcmillhj left
|
|||
b2gills | Zoffix I edited [1] to fix the Markdown ordered list syntax (indent included text by 4 spaces), and to cleanup the links (place urls at top so they are easier to edit in the future). Hope you don't mind [1]: stackoverflow.com/posts/50630100/revisions | 21:38 | |
scovit | m: sub pickBinomial(Numeric(Cool) $p, List() *@list) { say @list; }; pickBinomial(0.3, <a b c>); | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Slurpy positional parameters with type constraints are not supported at <tmp>:1 ------> 3Binomial(Numeric(Cool) $p, List() *@list7⏏5) { say @list; }; pickBinomial(0.3, <a b expecting any… |
||
scovit | m: sub pickBinomial(Numeric(Cool) $p, List() @list) { say @list; }; pickBinomial(0.3, <a b c>); | 21:39 | |
camelia | Type check failed in binding to parameter '@list'; expected Positional[Any] but got List ($("a", "b", "c")) in sub pickBinomial at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
b2gills | m: sub pickBinomial(Numeric(Cool) $p, *@list) { say @list; }; pickBinomial(0.3, <a b c>); | ||
camelia | [a b c] | ||
b2gills | You are asking for Positional[List], not List | ||
scovit | m: sub pickBinomial(Numeric(Cool) $p, @list) { say @list; }; pickBinomial(0.3, <a b c>); | 21:40 | |
camelia | (a b c) | ||
21:40
skids left
|
|||
scovit | Ok b2gills | 21:41 | |
b2gills | m: sub pickBinomial(Numeric(Cool) $p, +@list) { say @list; }; pickBinomial(0.3, <a b c>); # note that +@ *@ **@ are different | ||
camelia | [a b c] | ||
b2gills | `my List @foo` is basically the same as `my @foo is Array[List]` | 21:42 | |
scovit | m: sub pickBinomial(Numeric(Cool) $p, +@list) { say @list; }; pickBinomial(0.3, <a b c>.Set); | 21:43 | |
camelia | [set(a b c)] | ||
scovit | a set is not iterable? | 21:44 | |
b2gills | m: multi sub pickBinomial(Numeric(Cool) $p, +@list) { say @list; }; multi sub pickBinomial(Numeric(Cool) $p, Set $set){ samewith $p, $set.keys}; pickBinomial(0.3, <a b c>.Set); | 21:45 | |
camelia | (b c a) | ||
b2gills | m: .say for set(<a b c>) | ||
camelia | c => True a => True b => True |
||
scovit | m: .say for <a b c>.Set; | ||
camelia | a => True b => True c => True |
||
geekosaur | it doesn't automatically unwind itself into a list, no. 'iterable' sounds like you;re using a different model than per; | ||
perl6 | |||
scovit | geekosaur just learning | ||
b2gills | scovit: You want to call .keys on a Set | 21:46 | |
geekosaur | +@ gives you a list made up of everything left, the one thing left is a set | ||
b2gills | +@ will reuse the list if there is one *@ will flatten **@ doesn't flatten | ||
scovit | b2gills to use multi was the solution proposed also by moritz. But I am left wondering how different is this from augment that is considered MONKEY | 21:49 | |
geekosaur | multi is declaring up front you want to allow additions. augment allows arbitrary additions at runtime | ||
so augment is monkey patching something not intended for it | |||
also you can't alter a multi across modules iirc, but augment can. (this means augment forces runtime resolution whereas multi can be compile time resolved because it knows it will see all variants) | 21:50 | ||
runtime is more flexible but a lot slower, no optimizations possible | 21:51 | ||
scovit | I understand.. compile time errors are good also | ||
geekosaur | not just errors. if the compiler knows which variant will be used ahead of time, it can skip the runtoime part entirely and hardcode the one it knows | ||
this makes for fairly big speedups compared to runtime dispatching | 21:52 | ||
El_Che | if you don't need something specific from runtime, always to for compile time | ||
errors will be catch before data is touched | |||
21:52
sjn joined
|
|||
buggable | New CPAN upload: P5math-0.0.2.tar.gz by ELIZABETH modules.perl6.org/dist/P5math:cpan:ELIZABETH | 21:52 | |
scovit | but let's say i'm lazy, I would just write: | 21:58 | |
m: sub pickBinomial(Numeric(Cool) $p, $list) { $list.pick(3).say }; pickBinomial(0.3, <a b c>.Set); | 21:59 | ||
camelia | (c a b) | ||
scovit | m: sub pickBinomial(Numeric(Cool) $p, $list) { $list.pick(3).say }; pickBinomial(0.3, <a b c>); | ||
camelia | (b a c) | ||
scovit | m: sub pickBinomial(Numeric(Cool) $p, $list) { $list.pick(3).say }; pickBinomial(0.3, Mu); | ||
camelia | Type check failed in binding to parameter '$list'; expected Any but got Mu (Mu) in sub pickBinomial at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
scovit | works with lists, sets, but fail Runtime | ||
and i fail to see a way that let me do that as a lazy person | 22:02 | ||
(compile time checks) | |||
22:04
scovit left,
aindilis left
|
|||
geekosaur | you probably don;t want Mu, it's somewhat special | 22:08 | |
for most purposes you want Any. Mu is used when you need specific handling for Junction, which otherwise autothreads so it will do what you intended it to do | 22:09 | ||
b2gills | .tell scovit It seems like the compile time error doesn't throw unless both the parameter and argument are different sub-types of Any | ||
yoleaux | b2gills: I'll pass your message to scovit. | ||
b2gills | m: sub foo ( Str $ ){}; foo(Int) | 22:11 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Calling foo(Int) will never work with declared signature (Str) at <tmp>:1 ------> 3sub foo ( Str $ ){}; 7⏏5foo(Int) |
||
b2gills | m: sub foo ( Str $ ){}; foo( class :: is Mu {} ) | ||
camelia | Type check failed in binding to parameter '<anon>'; expected Str but got <anon|1> (<anon|1>) in sub foo at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
b2gills | m: sub foo ( Str $ ){}; foo( my $ is class :: is Mu {} ) # nevermind | 22:13 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Can't use unknown trait 'is class' in a variable declaration. at <tmp>:1 ------> 3sub foo ( Str $ ){}; foo( my $ is class7⏏5 :: is Mu {} ) # nevermind expecting any of: TypeObj… |
||
b2gills | m: sub foo ( Str $ ){}; foo( my $ is Mu ) | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> is trait on $-sigil variable not yet implemented. Sorry. Did you mean: my Mu $? at <tmp>:1 ------> 3sub foo ( Str $ ){}; foo( my $ is Mu 7⏏5) expecting any of: constraint |
||
22:28
mcmillhj joined
22:34
mcmillhj left
22:36
HaraldJoerg left
22:47
mcmillhj joined
22:53
mcmillhj left
22:57
rindolf left,
entonian joined
22:58
mcmillhj joined
23:00
zapwai joined
23:01
entonian left,
entonian joined
23:03
mcmillhj left
23:08
entonian left,
entonian joined
23:11
entonian left
23:14
mcmillhj joined,
Zoffix joined
23:15
zapwai left
|
|||
Zoffix | Why do people edit my stuff? AlexDaniel on GitHub, now b2gills on SO. Get your own content and edit that. | 23:15 | |
b2gills: it looks like shit now. | 23:16 | ||
This exactly why I hate SO. Every pedant feels they have to do something | 23:17 | ||
raschipi | Zoffix: group maintenece is where's at. Owning content in frowned upon by modern communities. | ||
Zoffix | Yeah, well, that's the last time I responded to anything on SO. Own that. | ||
23:17
Zoffix left
|
|||
raschipi | Next he will add some files to MoarVM or Rakudo and complain when people change them. | 23:18 | |
23:19
mcmillhj left
|
|||
El_Che | Zoffix: don't get pissed off by small potatoes | 23:20 | |
23:22
Zoffix joined
|
|||
Zoffix | raschipi: the files in MoarVM and Rakudo do not have "posted by Zoffix" next to them | 23:22 | |
El_Che | they do have a "edited by the devil" though | 23:23 | |
Zoffix | El_Che: I'm not pissed off. I'm just pointing out the very obvious fact that it's rude to just go in and willy-nilly mess up formatting of another person's content. I don't make random sentences bold and I don't give my lists ugly offsets if I can help it. Why would a stranger go in and add that on things that have my name on it. | 23:24 | |
23:24
mcmillhj joined
|
|||
Zoffix | If you have your own style, use it on your own content. Don't force it down the throat of others. | 23:24 | |
El_Che | Zoffix: that pretty much how SO rolls. It's a "perk" for people with > 2K reputation | 23:25 | |
I am not a fan of that, but not too annoyed either | |||
you can probably rollback changes as the authior | 23:26 | ||
23:26
psychoslave joined
23:27
Zoffix left
23:29
mcmillhj left
23:31
psychoslave left
23:43
uzl_ joined
23:45
mcmillhj joined,
uzl left
23:48
aindilis joined
23:49
mcmillhj left
23:59
w_richard_w joined
|