»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
Voldenet I know that perl6 isn't haskell, but is there any way to get type safety out of Iterables? 02:14
m: sub do(Iterable[IO::Path] $paths) { … }; do(dir()) 02:15
evalable6 (exit code 1) Type check failed in binding to parameter '$paths'; expected Iterable[IO::Path] but got Seq ($((IO::Path.new("bin"...)
in sub do at /tmp/YlH_pRX7FC line 1
in block <unit> at /tmp/YlH_pRX7FC line 1
Voldenet that's what I wanted - now I'm working this around by just using that: 02:16
m: sub y(IO::Path @a) { }; y(dir.&(Array[IO::Path]))
evalable6
Voldenet it works, but I wonder if there's a better way of doing this 02:17
Xliff Voldnet: You can check arrays for types, but I don't do it in a parameter list. 02:20
m: sub do(IO::Path @paths) { … }; do(dir()) 02:21
evalable6 (exit code 1) Type check failed in binding to parameter '@paths'; expected Positional[IO::Path] but got List ($(IO::Path.new("bin",...)
in sub do at /tmp/sZ8ZnhLLLv line 1
in block <unit> at /tmp/sZ8ZnhLLLv line 1
Xliff m: sub do(IO::Path @paths) { … }; do(dir().Array)
evalable6 (exit code 1) Type check failed in binding to parameter '@paths'; expected Positional[IO::Path] but got Array ($[IO::Path.new("bin",...)
in sub do at /tmp/fadHCxxM4R line 1
in block <unit> at /tmp/fadHCxxM4R line 1
Xliff m: sub do(IO::Path @paths) { … }; do(|dir().Array)
evalable6 (exit code 1) Too many positionals passed; expected 1 argument but got 21
in sub do at /tmp/kXBq7vAPjz line 1
in block <unit> at /tmp/kXBq7vAPjz line 1
Xliff m: sub do(Array[IO::Path] @paths) { … }; do(|dir().Array) 02:22
evalable6 (exit code 1) Too many positionals passed; expected 1 argument but got 21
in sub do at /tmp/1PZKSTDpQi line 1
in block <unit> at /tmp/1PZKSTDpQi line 1
Xliff m: sub do(Array[IO::Path] @paths) { … }; do(dir())
evalable6 (exit code 1) Type check failed in binding to parameter '@paths'; expected Positional[Arra…
Xliff, Full output: gist.github.com/33c96da24514696d26...eb3edc87bd
ugexe m: sub y(@a where .all ~~ IO::Path) { }; say y(dir); y("a")
evalable6 (exit code 1) Nil
Type check failed in binding to parameter '@a'; expected Positional but got Str ("a")
in sub y at /tmp/geEl3fii95 line 1
in block <unit> at /tmp/geEl3fii95 line 1
Xliff Or that...
I keep forgetting about where. 02:23
m: sub y(@a where .all ~~ (IO::Path, Str).any) { }; say y(dir); y("a")
evalable6 (exit code 1) Nil
Type check failed in binding to parameter '@a'; expected Positional but got Str ("a")
in sub y at /tmp/RlCYcpcIb9 line 1
in block <unit> at /tmp/RlCYcpcIb9 line 1
Xliff m: sub y($a where .all ~~ (IO::Path, Str).any) { }; say y(dir); y("a")
evalable6 Nil
Voldenet but using where would effectively just test all elements in the signature 02:25
ugexe well that is going to happen one way or another 02:26
when you do Array[IO::Path] or whatever it has to check each item
dir.&(Array[IO::Path]) <-- this tests all alements 02:28
m: sub y(IO::Path @a) { }; y(my IO::Path @ = dir); # if you are just looking for an (arguably) cleaner way to write what you are already doing 02:32
evalable6
ugexe but this again is checking every element
Voldenet But if Iterator from dir returns failure from pull-one, I'd have to handle the failure on the call site 02:34
instead of the consumer site 02:35
ugexe that is true. however i would wonder if dir should not return failures. 02:37
for instance: is it reasonable to not throw a failure if it encounters a file that no longer exists after the dir handle was opened?
(i dont know if that is a real problem for us or not, just what i could think of failing for dir) 02:38
i assume permissions as well
Voldenet well, in most cases Failure is given instead of a list, but I wonder what happens if readdir returns an error 02:41
ugexe github.com/MoarVM/MoarVM/blob/631c...ops.c#L280 02:45
ugexe there is also Array[IO::Path].new(dir) 03:19
Xliff How can I get access to perl6 docs, right now? 03:25
Voldenet docs.perl6.wakelift.de 03:32
a propos dir operation: github.com/rakudo/rakudo/blob/38f4...h.pm6#L567 03:34
Xliff Voldenet++ # Thanks! 03:36
Is p6c down as well?
Voldenet it's described on p6c site 03:37
> www.p6c.org hosts many Perl 6-related websites, including the perl6.org main site, doc.perl6.org, modules.perl6.org and the Perl 6 design documents.
Xliff So that's a yes. That means zef is also effectively neutered. 03:41
Yikes.
...
Or not. Install finally finished.
Went to github. 03:42
So zef is fine, just takes a while.
jmerelo releasable6: status 06:43
releasable6 jmerelo, Next release will happen when it's ready. 11 blockers. 61 out of 225 commits logged (⚠ 51 warnings)
jmerelo, Details: gist.github.com/837da75eb6f5424fd0...0cbd5d519d
Xliff m: $_ = 'gchar'; s/g?char/Str/; .say 08:06
evalable6 Str
Xliff m: $_ = 'char'; s/g?char/Str/; .say 08:07
evalable6 Str
Xliff m: $_ = ' char'; s/g?char/Str/; .say
evalable6 Str
Xliff m: $_ = 'gchar $str char $a char $b'; s:g/g?char /Str/; .say 08:08
evalable6 Str $str Str $a Str $b
Xliff So why doesn't that work in my code?!? /o\
m: $_ = 'gchar $strchar $a char $b'; s:g/«g?char /Str/; .say 08:09
evalable6 Str $strchar $a Str $b
El_Che jmerelo: who is the release manager? 09:07
timotimo i believe it's kawaii 09:11
kawaii El_Che: me! 09:18
jmerelo kawaii: how is it going? 09:28
timotimo kind of nice to see how many people miss the perl6 website 09:29
kawaii jmerelo: I'm going to cut a release candidate on Monday hopefully
If everyone is happy with that, then we'll do a full release later in the week 09:30
timotimo how will we handle the blockers? 09:32
kawaii timotimo: I'm going to remove the blocker label from those that are going unnoticed/not causing much trouble. 09:35
(and then bug you guys to fix the real blockers ;) )
jmerelo kawaii: great! 09:45
El_Che kawaii: nice to hear we have a release manager. Thx 11:06
kawaii lizmat: did you have a suggested resolution for: github.com/rakudo/rakudo/issues/2815 ? 11:07
or can I remove the blocker label from it for this release? 11:08
rindolf hi all, what to do about this - travis-ci.org/shlomif/ci-gen-frame.../522517049 ? 13:57
gfldex lolibloggedalittle: gfldex.wordpress.com/2019/04/21/wr...g-a-scope/ 14:00
dogbert17 rindolf: that is due to network related problems 14:07
rindolf: a bit more info here colabti.org/irclogger/irclogger_lo...04-19#l810 14:09
ugexe rindolf: ouch 14:25
tadzik: ping travis-ci.org/shlomif/ci-gen-frame.../522517049
or nine^
.tell patrickb travis-ci.org/shlomif/ci-gen-frame.../522517049 rakudobrew has regressed 14:28
yoleaux ugexe: I'll pass your message to patrickb.
ugexe ah masak has opened an issue even 14:47
gabc hi, I'm looking at OO in p6, is there a way to give a type to the attributes of a class? Like class Foo { has Str $.whatever; } ? Or do you control that from the accessor functions
lucs r: class Foo {has Str $.s } ; Foo.new( :s(4.2) ) 14:50
perlbot lucs: Type check failed in assignment to $!s; expected Str but got Rat (4.2)␤ in block <unit> at /tmp/aFUFpT0NfM line 1␤␤[Exited 1]
gabc Cool thanks! 14:51
jaldhar FatRat is supposed to be arbitrary precision right? How do I specify exactly how many digits of precision I want? 15:00
rindolf dogbert17: ugexe : thanks
gfldex m: my $n = FatRat.new(1,2); $n = $n ** 2 for ^100; say $n.perl; 15:29
evalable6 (signal SIGHUP) «timed out after 10 seconds»
gfldex jaldhar: you can't limit precision on FatRat
m: my $n = FatRat.new(1,2); $n = $n ** 2 for ^10; say $n.perl;
evalable6 FatRat.new(1, 1797693134862315907729305190789024733617976978942306572734300811577326758055…
gfldex, Full output: gist.github.com/40cc1e0ee38c0a3872...02b425e24f
thundergnat jaldhar: Are you looking to control precision during calculation or for output? 15:36
tadzik ugexe: rakudobrew can/should be checked out at v1 to workaround this 15:37
we'll need to pester patzim about the proper fix
changes got merged before I managed to test them :/
and similar thing broke it for me too
thundergnat jaldhar: during calculation may be difficult without mucking around in the guts of FatRat. If you just want to control output stringification, check out Rat::Precise github.com/thundergnat/Rat-Precise (shameless plug) 15:39
jaldhar thundergnat: sorry had to step away. The module sounds like what I need. Thanks. 15:48
It's so annoying having *.perl6.org down
jmerelo Repo for season of docs ideas: perl-gsoc-2019.github.io/season-of-docs-ideas/ 17:32
It's two days to go, and it has overlapped with, well, life, so I didn't have much time to prepare this. Anyway, what we need for perl 6 documentation is clear enough. 17:33
Even so, if you can think of something different, or improve on what's there, I'll be inmensely grateful.
jmerelo Season of docs does not have the concept of "umbrella" organization, every documentation project will have its own application. So if you think it's a good idea to request documentation for something else, go ahead. 17:34
uzl jmerelo: "...the chosen persons of persons." -> "...the chosen person or persons."? Could it be a typo? 18:29
jmerelo uzl: very likely. Thanks. 18:30
uzl No problem! 18:32
masak hi #perl6! dialing in from a... (urgh!) web client, because SSH doesn't seem to work today. 18:47
my Travis CI runs are broken, and I'm sad about this :(
see github.com/tadzik/rakudobrew/issues/134
to add insult to injury, the PR that broke rakudobrew that broke Travis is named "Loads of stuff" :P 18:48
jmerelo masak: well, it's a whole lot of stuff 18:58
masak I guess the pain I'm feeling when I can't have Travis is a testament to some measure of success of the TDD/CI worldview
is there a "quick fix"? can I do anything at this point to keep using Travis with Perl 6?
ugexe masak: github.com/ugexe/Perl6-Net--HTTP/b...travis.yml you can do it the long way 18:59
jmerelo masak: I use Docker containers, my own. But there are a bunch around.
masak: this one works pretty well hub.docker.com/r/jjmerelo/test-perl6/ and in fact it's the base of what we use for docs and many modules. 19:00
masak: but tyil's got nightly builds, and there's a official Rakudo Star container, and you've got a lot to choose from.
masak this sounds good. I will try it the long way.
thanks. <3 19:01
jmerelo masak: you know the long way takes ~15 minutes longer than the other, right?
masak jmerelo: I did not, but in this case ~15 minutes is shorter than ~Inf minutes... and I did as for a workaround ;) 19:04
ugexe it also works for osx, and for blead moar/nqp (not just rakudo with tagged nqp/moar revisions)
masak "it" being Travis with the current rakudobrew? 19:09
ugexe no no, doing it manually instead of with a container 19:10
"doing it" meaning getting perl6 running on travisu 19:11
ugexe most things i work on could fail differently between linux and osx, so i test on both. having a linux container finish in 1m doesn't help with the osx still must run on bare metal and take 15 minutes to finish. 19:12
patrickb o/
yoleaux 14:28Z <ugexe> patrickb: travis-ci.org/shlomif/ci-gen-frame.../522517049 rakudobrew has regressed
patrickb seen it already.
Sorry about that, I'm looking into this right now. 19:13
patrickb ugexe: Travis CI lists you as someone to ping wrt perl6 travis. Can you tell me where the code that backs `language: perl6` in travis is? 19:19
patrickb tadzik: The rakudobrew merge seems to have broken travis testing at large. A quick revert might be a thing to consider... 19:19
ugexe github.com/travis-ci/travis-build/...t/perl6.rb
patrickb ugexe: Thanks! 19:20
niner: The rakudobrew merge seems to have broken travis testing at large. A quick revert might be a thing to consider. (I don't have a commit bit) 19:21
patrickb I just created a travis-build PR to fix the latest travis rakudobrew/perl6 regression: github.com/travis-ci/travis-build/pull/1693 19:46
ugexe: ^
We'll see how quickly this will go through...
ugexe i'm expecting it to take days 19:49
github.com/BanzaiMan (note status says On Vacation) 19:50
github.com/travis-ci/travis-build/pull/1643 this one took two weeks 19:52
and at that point may as well rewrite it to use the updated changes properly 19:53
patrickb .tell tadzik If possible, please revert rakudobrew for now. This breaks perl6 on travis. A PR was already committed, but may take days. I also pinged nine. 19:55
yoleaux patrickb: I'll pass your message to tadzik.
ugexe do you know what the underlying issue is yet? 19:56
patrickb .tell nine If possible, please revert rakudobrew for now. This breaks perl6 on travis. A PR was already committed, but may take days. I also pinged tadzik.
yoleaux patrickb: I'll pass your message to nine.
patrickb ugexe: I do.
ugexe what is it?
masak patrickb: hi. thank you. :)
ugexe to me it seems like it either nees to auto init or be able to understand a slightly different subset of cli arguments 19:57
but i'm guessing its not, because those should be easy to fix
patrickb The new rakudobrew relies on a shell function to be installed. It tests for it an complains when the hook is not found. The travis perl6.rb script does not install that hook.
It just exports the .rakudobrew/bin dir to $PATH and does nothing else. 19:58
ugexe can there be a fallback function that uses perl5?
until travis can be fixed at least
patrickb No, the sole purpose of the hook is to modify the shell of the caller. That can't be done any other way. 19:59
I'd just revert rakudobrew fully, wait for the PR to use the v1 branch to go through and then revert the revert.
ugexe can you point at the code/hook you are talking about specifically? 20:01
patrickb github.com/tadzik/rakudobrew/blob/...ok/Bash.pm 20:03
There is a thing that could make it work again.
Just switch the default mode to `shim` instead of `env`. Then it should continue to work as it did before.
masak how does one do that? set an environment variable? 20:04
ugexe well we can get more evil then
just have rakudobrew check if its (presumably) running on travis-ci
patrickb `rakudobrew mode shim` does that
Current problem: I don't have a commit bit to rakudobrew 20:05
ugexe i at least hope people arent seting $TRAVIS_BUILD_DIR in their local env :)
masak patrickb: yes, but with the setup I had in my .travis.yml, I wasn't directly using rakudobrew at all. I just had `language: perl6` 20:06
patrickb A four character change here would fix it: github.com/tadzik/rakudobrew/blob/...ng.pm#L140
masak so I can't apply that fix
patrickb masak: that `language: perl6` references this `github.com/travis-ci/travis-build/.../perl6.rb` file which does use rakudobrew. 20:07
masak ah, good to know 20:10
SyrupThinker rakudo.org refuses connections for me. Non tls works. 20:12
ugexe github.com/tadzik/rakudobrew/blob/...ng.pm#L232 This is missing .p6 20:13
patrickb .tell tadzik Alternatively merging github.com/tadzik/rakudobrew/pull/135 is worth a try first.
yoleaux patrickb: I'll pass your message to tadzik.
patrickb .tell nine Alternatively merging github.com/tadzik/rakudobrew/pull/135 is worth a try first.
yoleaux patrickb: I'll pass your message to nine.
ugexe maybe an ENV var to force shim/env would be nice too 20:16
patrickb ugexe: When would one use such an env var? 20:17
ugexe is this an install-time behavior and not a run-time behavior? 20:18
otherwise i would say this travis-ci issue is an ok example. for instance masak could add RAKUDOBREW_MODE=shim in their travis-ci file and it would start working again 20:19
patrickb ugexe: rakudobrew needs to change stuff when switching modes (modifying $PATH, creating shims).
ugexe: Do environment variables propagate to such language files? 20:20
ugexe i cant say for sure. i would expect anything under `env: ...` to be, but not something like `before_install: export ...` 20:23
patrickb Thinking about it some more I think changing the mode via environment variables is dangerous, because rakudobrew can't do it's setup work without being called. So setting the environment variable does not change anything without calling rakudobrew again. That would be very counter intuitive. The change would happen at the wrong point in time (basically the next rakudobrew invocation). 20:26
ugexe isn't that easy to detect and inform the user though?
i agree that does complicate things a bit though 20:27
patrickb ugexe: I have to leave. I hope we'll get this sorted out soon. I'll have an eye on this tomorrow. 20:30
ugexe: Thanks for your pointers, btw!
o/
masak moritz: heh. I went back in time to the commit where I added the James Bond pastiche for 007, and discovered it was you who inspired me to write it: github.com/masak/007/commit/a9f213...600b1ef948 :) 20:40
moritz it was? :D 20:51
curious
timotimo masak: were you usually logging in from irc.p6c.org? 21:27
patrickb masak: nine just merged the rakudobrew fix. Can you somehow try if this worked? 22:12
Going to bed now. We'll see tomorrow... 22:15
masak timotimo: aye 23:31
masak patrickb: sad to report it doesn't work: travis-ci.org/masak/007/builds/522856888 23:52