»ö« 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.
Xliff \o 02:54
m: use v6.cl; 02:55
evalable6 (exit code 1) ===SORRY!===
Cannot call method 'typed_panic' on a null object
Xliff ^^ LTA?
ugexe i demand it call typed_panic on a null object
jmerelo releasable6: status 06:12
releasable6 jmerelo, Next release will happen when it's ready. 9 blockers. 61 out of 225 commits logged (⚠ 51 warnings)
jmerelo, Details: gist.github.com/85d9f685ae151e07e8...5dd3f60447
jmerelo weekly: Applied to Google Season of Docs: twitter.com/jjmerelo/status/1120224599101276160 07:16
notable6 jmerelo, Noted!
Xliff \o 07:30
Anyone know why I would get this from a NativeCall sub? "Type check failed for return value; expected NativeCall::Types::Pointer but got Whatever (*)" 07:31
Oh, fahrfignugen! I forgot the "is native..." 07:32
cpan-p6 New module released to CPAN! GTK::V3 (0.10.0) by 03MARTIMM 08:03
tyil docs.perl6.org is still down :< 08:15
does anyone know if there's a statsd client in perl 6 yet, and if not, how to send a simple udp packet
jmerelo tyil: yep, sadly. 08:26
tyil: you can send UDP packets with Cro, I think. IO::Socket also works with them. 08:27
tyil neat
I'm making an API in Cro, and have statsd running, so I wanted to push some metrics if I can 08:28
rindolf hi all! zef install GTK::Simple just hangs wo consuming any resources 10:24
is this a networking problem?
sena_kun it is related to ongoing issues with our server 10:25
it has a timeout of 3 minutes for a single mirror check and given that it checks 2 mirrors, there is a 6 minutes delay 10:26
rindolf sena_kun: ah
sena_kun there is also a touch command that changes the timestamp on a cache file, but I don't remember exact file name 10:27
greppable6, touch
greppable6, help
greppable6 sena_kun, Like this: greppable6: password # See wiki for more examples: github.com/perl6/whateverable/wiki/Greppable
sena_kun, 448 lines, 61 modules: gist.github.com/91e4e3bbde23db44e5...b052917c69
sena_kun quotable6, help
quotable6 sena_kun, Like this: quotable6: /^ ‘bisect: ’ / # See wiki for more examples: github.com/perl6/whateverable/wiki/Quotable
sena_kun quotable: /^ 'touch ' /
quotable6 sena_kun, OK, working on it! This may take up to three minutes (4582161 messages to process)
sena_kun, 16 messages (2005-07-14⌁2017-09-17): gist.github.com/611a371708a284d88f...b0ca0ae21d 10:28
sena_kun quotable: / 'touch ' / 10:29
quotable6 sena_kun, OK, working on it! This may take up to three minutes (4582161 messages to process)
sena_kun, 1034 messages (2005-02-26⌁2018-04-28): gist.github.com/e797f49d6d96c2709f...d3fbfafcdd 10:30
cpan-p6 New module released to CPAN! GTK::Glade (0.8.3) by 03MARTIMM 12:49
Juerd Who's hosting doc.perl6.org and what does it take to get that back online today? 12:58
I have servers.
timotimo we also have servers 12:59
doc.perl6.wakelift.de
Juerd So why can't we point doc.perl6.org there?
timotimo our hackers aren't good enough to hack into the dns server 13:00
also, it's illegal
Juerd DNS servers can be changed 13:01
timotimo this is my snarky way to say that we can't reach the person who has access to the dns server to change stuff, and we're honestly not even sure if we the person we've been trying to reach even is the right person
i don't think they can be changed without convincing the current domain owner/administrator/whatever
provider?
Juerd Damn 13:02
Meh, the whois info doesn't say who has the domain either
timotimo yep
i've reached out to the administrative contact and the other one via some web form
no answer as of yet
the holidays are making this extra difficult 13:03
Juerd Is there also a temporary main site? 13:07
lizmat perl6.wakelift.de
Juerd Great :) 13:08
Juerd I've redirected perl6.nl and doc.perl6.nl because that's a domain name I can remember :) 13:18
timotimo good 13:19
timotimo tomorrow we will get perl6.org back, most probably 13:19
Juerd Hope so; it was really hard to convince someone that Perl 6 is in fact a serious endeavour. 13:21
timotimo well, we're mostly volunteers - you could interpret that either as we're very serious, or we're not serious 13:22
BBL
patrickb tadzik, nine: I think rakudobrew should be reverted until we managed to get Travis to work with the new version. I created a respective PR. Whoever sees this, please merge. 16:12
.tell tadzik: Can I get a rakudobrew commit bit? That'd help in situations like this one. 16:13
yoleaux patrickb: What kind of a name is "tadzik:"?!
patrickb .tell tadzik Can I get a rakudobrew commit bit? That'd help in situations like this one.
yoleaux patrickb: I'll pass your message to tadzik.
tony-o m: Test 17:10
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/lHeQc_jogt
Undeclared name:
Test used at line 1
timotimo Juerd: hey 19:46
timotimo Juerd: i just put perl6.nl and docs.perl6.nl into the nginx config for the fallback server; please feel free to set the DNS up to be a regular A instead of whatever it is currently, then it'll also work with https immediately 19:47
Juerd timotimo: Done 19:53
timotimo great 19:59
sena_kun is there a way to change the, uhm. let's say I have a file with a name(not its content) encoded in SHIFT_JIS, but my system is utf8. I want to play with this file name in Perl 6, but it automatically produces me a an IO::Path with a "garbage" name, as it seem to try to get filenames in utf8. Is there a way to say "Get me this file with its name in bytes" or "Get me this file with its name decoded as SHIFT_JIS, not utf8"? 20:54
I have a looot of such files, so the ultimate goal is to write a script that will convert all broken names into proper unicode... but firstly I have to do it for a single file. 20:55
ugexe im guessing you need to use NativeCall since maorvm is doing encoding of e.g. input file paths 20:59
sena_kun unfortunately, I have no idea on how to resolve it with C(implying NativeCall) 21:01
sena_kun any points to functions I might want? 21:01
timotimo sena_kun: you can get back to the original bytes by decoding the stuff as "utf8-c8" 21:02
ugexe if you want to open such a file I'm guessing you would just call open instead of going through MVM_file_open_fh 21:03
sena_kun timotimo, what can I decode? I can only use `dir[0]` and it gives me an IO::Path with a name like `x94􏿽xED􏿽x8`. And I can't call `decode` on IO::Path or on Str, I don't have a Buf.
I can open it, I want to rename it to result of "get raw bytes of this file's name -> decode as SHIFT_JIS -> encode as UTF-8" operation 21:04
sena_kun I am starting to feel that I just want too much, maybe... 21:08
timotimo sena_kun: hold on 21:13
sena_kun yes
timotimo, I am now trying to look at in under Windows, actually
because Windows has SHIFT_JIS support and I wonder if I'll be able to do something with it... 21:14
timotimo you should be able to get the filename out of the IO::Path with the typical methods
you can use any Buf for an IO::Path by using .encode("utf8-c8") because moar will decode that to get the right bytes to use with the filesystem layer
m: IO::Path.new("\x01\x02\x03".encode("utf8-c8")).say 21:15
evalable6 (exit code 1) Cannot resolve caller new(IO::Path:U: Blob[uint8]:D); none of these signatur…
timotimo, Full output: gist.github.com/ebd5d486f36502291b...0ca42a072e
timotimo m: IO::Path.new("\x01\x02\x03").say
evalable6 "␁␂".IO
timotimo m: spurt("hello", "\x01\x02\x03"); .say for dir() 21:16
evalable6 (exit code 1) Failed to open file /home/bisectable/git/whateverable/hello: Read-only file system
in block <unit> at /tmp/3D0uZR2ejL line 1
timotimo m: qx/mount/
evalable6
sena_kun timotimo, what if I am getting filenames from `dir` and they are already decoded incorrectly?
timotimo it's not incorrect
just go via utf8-c8 to bytes, then via shift_jis to a string 21:17
ugexe they will just look incorrect right?
timotimo yes
timotimo when you just print them, you're encoding as utf8, and the string actually has some special-use sequences moarvm invents that are picked up by the utf8-c8 encoder 21:17
so it'll look funky, but it'll tell you what's in the original, especially if you have mostly utf8, but some b0rked bits in the middle 21:18
sena_kun like `dir[0].path.encode('utf-8').decode('windows-932')`? I am getting `Error decoding shiftjis string: could not decode byte 0xF4`
timotimo encode it via utf8-c8
sena_kun Unknown string encoding 'utf-8с' 21:19
timotimo you're not supposed to typo it :D 21:20
sena_kun укьююю
вэщр
oops, sorry
d'oh
timotimo с*ка бл**ь?
sena_kun please, don't 21:21
that's pretty offensive. :)
timotimo it's the one piece of russian i know :(
sena_kun oh woooo-hoooo
it worked
timotimo someone should blog about this whole business with the filenames and such
it's super weird :)
sena_kun well, not like its super weird... just Japanese publishers love their SHIFT_JIS encoding and I(and not only me) am having chronic pains with it. ;) 21:22
ok, now I can write a script with this...
timotimo++
thanks a lot!
timotimo YW 21:34
lizmat PSA: the Perl 6 weekly will be published tomorrow
jnthn It took me a moment to realize that tomorrow isn't Monday. :) 21:35
sena_kun it isn't. ;) 21:36
lizmat heh :-)
jnthn The confusion of long weekends :)
When I get to "Thursday" and realize it's actually Friday, I guess I'll be pretty happy, though... :)
El_Che lizmat: if the download sites are restore for the weekly, I'll have Ubuntu 19.04 packages available as well 21:38
timotimo what do you mean "the download sites"? 21:39
sena_kun rakudo.org?
timotimo ah 21:41
xinming termbin.com/dm70 22:38
Anyone here knows is it possible that I remove the use of immediate var %res there?
Thanks. :-)
I mean make the logic oneliner.
sena_kun xinming, what the code do? sorry, too sleepy to read it, but maybe I can write some... 22:39
so you have a hash of hashes, every inner has account and amount, and you want to get it in one line, right? 22:40
xinming Yes. 22:41
sena_kun m: my @h = {account => 'a', amount => 50}, {account => 'b', amount => 250};
evalable6
xinming I think we can use state var. But I'm not sure what is the best idea to do it.
sena_kun m: my @h = {account => 'a', amount => 50}, {account => 'b', amount => 250}; say @h.map({ $_<account> => $_<amount> }).Hash; 22:42
evalable6 {a => 50, b => 250}
sena_kun like this?
xinming But the 'account' may duplicate
my @h = {account => 'a', amount => 50}, {account => 'b', amount => 250}, { account => 'a', amount => 5 };
sena_kun maybe a Bag?
xinming the amount will be sumed
first group by account key, then, sum the list. 22:43
sena_kun has a feeling Bag is for such things
xinming Just wish to know the right way to do things in perl6. :-)
the code does work, but not elegant
sena_kun m: my @h = {account => 'a', amount => 50}, {account => 'b', amount => 250}, { account => 'a', amount => 5 }; say @h.classify({ $_<account> }).map({ .key => .value.map(*<amount>).sum }); 22:47
evalable6 (a => 55 b => 250)
sena_kun m: my @h = {account => 'a', amount => 50}, {account => 'b', amount => 250}, { account => 'a', amount => 5 }; say @h.classify(*<account>).map({ .key => .value.map(*<amount>).sum }); 22:48
evalable6 (b => 250 a => 55)
sena_kun is probably my best golf... And still looks so-so. 22:49
and just a friendly note that I'd not golf such an easy construct
in this late night I am having trouble reading a "normal" code without a comment on what it does, and after a golf... 22:50
xinming Thanks. :-) 22:55
I'm still thinking about how that worked. 22:56
Good night.
sena_kun o/
xinming m: my @h = {account => 'a', amount => 50}, {account => 'b', amount => 250}, { account => 'a', amount => 5 }; say @h.classify(*<account>).perl.say; 23:03
evalable6 (my Any %{Any} = :a($[{:account("a"), :amount(50)}, {:account("a"), :amount(5)}]), :b($[{:account("b"), :amount(250)},]))
True
xinming finally understand how classify worked. :-) 23:04
Xliff_ m: @a = (1, 2, 3, 4); say @a.rotor: 2 23:21
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/RYbn2iTe3s
Variable '@a' is not declared
at /tmp/RYbn2iTe3s:1
------> 03<BOL>08⏏04@a = (1, 2, 3, 4); say @a.rotor: 2
Xliff_ m: my @a = (1, 2, 3, 4); say @a.rotor: 2
evalable6 ((1 2) (3 4))
Xliff_ m: my @a; my @b; @a.append |$_.rotor(2) for 1, 2, 3, 4; say @a; 23:24
evalable6 WARNINGS for /tmp/2Fpjs40l0l:
[]
Useless use of "|" in expression ".append |$_.rotor(2)" in sink context (line 1)
Xliff_ m: my @a; my @b; @a.append: |$_.rotor(2) for 1, 2, 3, 4; say @a;
evalable6 []
Xliff_ m: my @a; my @b; @a.append: |$_.rotor(2) for (1, 2, 3, 4); say @a;
evalable6 []
Xliff_ m: my @a; my @b; @a.append: |.rotor(2) for (1, 2, 3, 4); say @a;
evalable6 [] 23:25
Xliff_ m: my @a; @a.append: .rotor(2) for (1, 2, 3, 4); say @a;
evalable6 []
Xliff_ m: my @a; @a.append: |. for (1, 2, 3, 4).rotor(2); say @a;
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/UV0jdmg_HO
Prefix …
Xliff_, Full output: gist.github.com/0a2425f05a4b2b1b8b...6e6024b647
Xliff_ m: my @a; @a.append: |$_ for (1, 2, 3, 4).rotor(2); say @a; 23:25
evalable6 [1 2 3 4]
Xliff_ m: my @a = ^9; say @a(^4) 23:54
evalable6 (exit code 1) Invocant of method 'CALL-ME' must be a type object of type 'List', not an object instance of type 'Array'. Did you forget a 'multi'?
in block <unit> at /tmp/WJUv3dH7iO line 1
Xliff_ m: my @a = ^9; say @a[^4] 23:55
evalable6 (0 1 2 3)