»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
ugexe maybe someone does actually want to test that, but enough to give it an "all" command? 00:00
raschipi Well, tbrowder was just asking for it. 00:02
People also created a Task::Popular to do just that, for testing. 00:03
ugexe thats not ambiguous 00:04
ugexe there is zef smoke, which mostly works, but it does not install anything to avoid the issues i described earlier. it does test everything, but dependencies are fulfilled with -I/path/to/dep instead of from an installation 00:15
tbrowder ugexe: my thought was the ALL option would just install the 00:16
Zoffix alias zefall='for i in `perl6 -MWWW -e '\''"modules.perl6.org/search.json?q=".&....say'\''`; do echo "Installing $i"; zef install "$i"; done' 00:18
tbrowder latest which is what i'm doing at the moment (i hope). if i just ask zef ti install module X (without multiple authors), i assume the latest will be installed.
TimToady waves vacantly from Kyoto... 00:25
in general, .succ and .pred make little sense on enums; we only allow ++ and -- on Bool because it's more convenient for %seen{$key}++ and such 00:28
but those should be read as "set true" and "set false", not as relying on any underlying ordering of the type 00:30
because the idiom is relying primarily on the post-crement functionality, not the enum model
seetsighing & 00:32
AlexDaniel another thing to consider: 00:33
m: enum Animal (Cat => 25, Dog => 42); say Cat.succ
camelia 26
Zoffix \o 00:34
Zoffix imagines .succ/.pred stepping through the available enums 00:35
There's an ordered list of them in one of the methods... 00:37
Geth ecosystem: paulohrpinheiro++ created pull request #366:
Add Brazilian::FederalDocuments to ecosystem
01:03
Geth ecosystem/gabrielash-patch-1: 3d95475d18 | gabrielash++ (committed using GitHub Web editor) | META.list
Update META.list
01:20
ecosystem: gabrielash++ created pull request #367:
Update META.list
Garland_g[m] I'm looking to run a loop infinitely with the ability to escape it at any time with a given keypress. Is there an idiomatic way to do that? 01:47
ugexe use a promise 01:48
sacomo you could also do "last if $k" inside your loop where $k is the keypress value. 01:49
skids or both :-) start { (code to get a keypress) }.then({$k++}); loop { stuff; last if $k; stuff ; last if $k } 01:53
Garland_g[m] Thanks. 01:58
sacomo Garland_g[m], maybe something like this glot.io/snippets/etlq6yu6jg
ugexe thats not a keypress value though 02:00
sacomo it only captures input
ugexe or at least i understood it to be like they want to capture the keypress themselves
sacomo if you want to moitor keypresses in the background then I would use a different approach. maybe the promise. 02:01
s/moitor/monitor/ 02:02
Garland_g[m] In this case it's more of a timing issue. I have an audio loop that I'm playing until I hit the keypress, and then it goes on to the next track.
The promise approach is working welll.
sacomo sweet 02:03
AlexDaniel is there any way to list all dependencies of a module in zef? 02:12
I'd like to get a dependency tree or something like that 02:13
ugexe AlexDaniel: i can easily add it, i just never decided how to handle the output format for deep dependencies / long names 02:21
AlexDaniel ugexe: just a list of module names is probably ok 02:22
that'd be enough for me at least
ugexe the graph/structure is important, but i suppose that could be the eventual verbose output 02:25
AlexDaniel .seen Llfourn 03:22
yoleaux I saw llfourn 8 Aug 2017 16:12Z in #perl6-dev: <llfourn> nine: cheers :) 03:23
AlexDaniel llfourn: ping? :)
.tell llfourn maybe you can take a look at RT #132085 03:26
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=132085
yoleaux AlexDaniel: I'll pass your message to llfourn.
ugexe AlexDaniel: added `zef depends $identity` to 0.1.28 03:37
AlexDaniel \o/
ugexe: thanks
llfourn AlexDaniel: cheers I'll take a look 03:51
yoleaux 03:26Z <AlexDaniel> llfourn: maybe you can take a look at RT #132085
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=132085
AlexDaniel llfourn: thanks! 03:52
llfourn AlexDaniel: I responded to the RT please go ahead and close it :) 04:02
AlexDaniel llfourn: I see. OK, thanks! 04:03
todd Hi All. Sorry for such a dump question, but google inundates me with Perl 5 hits when I ask this. How do I get the name of my program? 04:56
todd I think I found it: $*PROGRAM-NAME 05:02
Geth ecosystem: 3d95475d18 | gabrielash++ (committed using GitHub Web editor) | META.list
Update META.list
05:11
ecosystem: d73d30af51 | (Jonathan Stowe)++ (committed using GitHub Web editor) | META.list
Merge pull request #367 from perl6/gabrielash-patch-1

Update META.list
ecosystem: bcc602fc02 | (Paulo Henrique Rodrigues Pinheiro)++ | META.list
Add Brazilian::FederalDocuments to ecosystem

See github.com/paulohrpinheiro/Brazili...lDocuments
05:12
ecosystem: 2789971e87 | (Jonathan Stowe)++ (committed using GitHub Web editor) | META.list
Merge branch 'master' into paulohrpinheiro
ecosystem: 9c8805b20c | (Jonathan Stowe)++ (committed using GitHub Web editor) | META.list
Merge pull request #366 from paulohrpinheiro/paulohrpinheiro

Add Brazilian::FederalDocuments to ecosystem
u-ou what should I do about a failed test when trying to zef install something? 06:23
AlexDaniel u-ou: which module? 06:25
u-ou: normally you'd just create an issue in the module repo
u-ou NCurses 06:26
AlexDaniel ah
u-ou it worked on macos but not whatever the rakudo star docker image is running on 06:27
AlexDaniel u-ou: github.com/azawawi/perl6-ncurses/issues/16
u-ou ahh. I see.
AlexDaniel actually, you're probably seeing some other issue
u-ou yeah, I'm on 2017.07 06:28
AlexDaniel it should work on 2017.07 and 2017.08
but not on HEAD
u-ou how can I find out what went wrong? 06:29
AlexDaniel u-ou: what's the error?
u-ou it just says Aborting due to test failure: NCurses:ver('0.6.2'):auth('github:azawawi') (use --force-test to override) 06:30
and then a stack trace
AlexDaniel u-ou: what's the output of perl6 --version ? 06:31
u-ou This is Rakudo version 2017.07 built on MoarVM version 2017.07 06:35
implementing Perl 6.c.
AlexDaniel u-ou: hmmm 06:45
u-ou is there somewhere I can look that tells what went wrong? zef logs or something?
u-ou I'm doing this on the rakudo star docker image. I git cloned zef so it should be easy to reproduce. 06:46
u-ou maybe I'm using the wrong version of zef or something 06:47
AlexDaniel u-ou: you did get Test Summary Report, right? When zef install failed
u-ou: and if so, what file failed? 06:48
u-ou: oh. maybe not. Try zef --verbose install NCurses 06:49
u-ou sec 06:55
u-ou it's not really saying much 07:03
AlexDaniel u-ou: indeed 07:06
u-ou: what about
AlexDaniel git clone github.com/azawawi/perl6-ncurses.git 07:07
u-ou pastebin.com/RKgMXuef
AlexDaniel PERL6LIB=lib perl6 t/02-basic.t
AlexDaniel (after cd-ing into the cloned repo) 07:07
u-ou hmm. it passed. 07:09
AlexDaniel u-ou: relevant comment rt.perl.org/Ticket/Display.html?id...xn-1490032 07:10
but it's weird because you should not be seeing this issue on rakudo 2017.07
the change that introduced the problem happened just 10 days ago 07:11
u-ou am I trapped in a time warp? 07:12
weird 07:13
well. must be a different problem, idk. 07:14
AlexDaniel u-ou: you can install the module anyway 07:16
u-ou: zef install --force NCurses 07:18
nine Worth reading: tomdale.net/2017/09/compilers-are-...rameworks/ 07:21
u-ou thanks
jast I kind of wish more people "aggressively" optimized their web code by deploying less of it in the first place 07:22
jast writing and bundling, too 07:22
nine It's about Javascript, but it easily translates to backend code as well. What if your router would actually compile optimized code for the routes you defined? 07:23
This also reminds me of nginx: its configuration is not interpreted. It actually compiles the configuration to byte code which runs on nginx' VM.
jast I believe load balancers already do this
nine Forced by the decision to write Perl 6 in Perl 6, it has become a language that's really nice for writing compilers. This could give us an edge in that game :) 07:24
TEttinger once the whole... optimizing thing is added to complete the phrase optimizing compiler 07:38
jast I think what the article is describing is going to happen, but if you keep piling frameworks and libraries on top of each other, only whole program optimization will help cut that back down, and it's not necessarily *that* smart :) 08:02
mattr p6: sub jojo (Str $s, Str $salu) { say "$salu $s"; } 08:39
camelia ( no output )
mattr p6: multi sub cap (Str $s, Str $salu) { say "$salu $s"; }
camelia ( no output )
mattr p6: multi sub cap (Str $s, Str $salu) { say "All's well, $salu $s"; } 08:40
camelia ( no output )
mattr p6: cap "Tom", "Captain"
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
cap used at line 1. Did you mean 'cas', 'map'?
lizmat mattr: p6: is not a REPL: it forgets everything between invocations
mattr Hi lizmat, I am wondering is this a bug in perl6 repl? When I redefine a multi sub with same signature I get something like this: Ambiguous call to 'jojo'; these signatures all match: :(Str $s, Str $salu) :(Str $s, Str $salu) in block <unit> at <unknown file> line 1 08:41
I expected to be able to redefine the sub for that signature.. indeed thought that is what had been happening until now. 08:42
lizmat m: multi a() {}; multi a() {}; a
camelia Ambiguous call to 'a'; these signatures all match:
:()
:()
in block <unit> at <tmp> line 1
lizmat one could argue that should be a compile-time error 08:42
mattr Hi lizmat, I see this is how perl6 programs work too so not in repl or the irc p6. Thanks, I am just trying to learn. 08:45
mattr @lizmat followup question please. In the repl I create a sub and then tried this: undefine &unwantedsub Cannot modify an immutable Sub (sub unwantedsub () 08:51
lizmat yeah, you cannot easily remove subs 08:52
mattr Sub inherits from Mu so I wondered why it is immutable. Then the docs for undef say "There is no undef in Perl 6. You can't undefine a function" so what is happening when I call undefine?
lizmat they're basically immutable (as the message says)
sub undefine(\x) { x = Nil } 08:53
is basically what happens
lizmat m: undefine(42) 08:53
camelia Cannot modify an immutable Int (42)
in block <unit> at <tmp> line 1
lizmat basically the same
fwiw, I think undefine() is a P5 relic that should be removed 08:54
it gives people the wrong idea :-)
u-ou I like perl 6 better tha perl 5 now
than
mattr Thanks. Sorry for taking a trip into the rabbit hole! ;) 08:55
lizmat mattr: no worries, sorry you did 08:57
need to be afk for a few hours& 08:58
u-ou bye
mattr thanks and best regards. signing off now. bye!
u-ou bye 08:58
it looks like im all alone here! 08:59
nadim no you are not 09:18
u-ou :) 09:19
Ulti out of interest is there a way to define unicode operators without actually having to use unicode? something akin to sub infix:<"\c[SHRUG]"> {} 09:44
pmurias nine: once slang work without nqp bits sticking out everywhere we will have advantage in that web-frameworks-as-compilers will be just modules in Perl 6 09:49
* slangs
jnthn Ulti: A bit like that but since <...> is literal inside it won't work that way
Ulti: Try infix:<< "\c[SHRUG]" >> or some such
Ulti aha 09:50
Zoffix Anyone in Toronto and wanna do a lightning talk on Perl, Rakudo, or anything else? www.meetup.com/Toronto-Perl-Monger...243346657/ 10:21
Zoffix Maybe I can do a Rakudo IO one. It's probably the one topic I can talk about without getting impostor syndrome :P 10:24
Zoffix Actually, last year a few people telecommuted. I think you don't have to be in Toronto. 10:32
robertle_ should docs.perl6.org/language/regexes#Adverbs mention :P5 ? 10:33
Zoffix robertle_: yeah 10:41
Would you add it, please?
robertle_: just need to edit this file: github.com/perl6/doc/edit/master/d...gexes.pod6
robertle_ jup, will do 10:44
Zoffix robertle_++ Thanks!
Zoffix decides not to do a talk 10:45
It's hard to understand me when I speak. 10:46
MasterDuke i thought that one you did a while ago was fine (i think for some toronto thing also)
Zoffix This? www.youtube.com/watch?time_continu...WuxwurtALc 10:48
MasterDuke yep 10:51
Zoffix Ok, then. I'll sign up for the IO talk. 10mins ain't gonna kill me :) 10:56
Zoffix .ask moritz Is there an easy way to build a PDF out of your book's sources? I think reading a PDF on the bus and later making corrections to markdown works out best for me. I think I can get a PDF off leanpub, but I'd like to get one freshly-squeezed 11:22
yoleaux Zoffix: I'll pass your message to moritz.
moritz Zoffix: leanpub builds it for me 11:23
yoleaux 11:22Z <Zoffix> moritz: Is there an easy way to build a PDF out of your book's sources? I think reading a PDF on the bus and later making corrections to markdown works out best for me. I think I can get a PDF off leanpub, but I'd like to get one freshly-squeezed
moritz Zoffix: I can either give it to you once, or give you an invitation to a dropbox folder where it's built all the time
Zoffix moritz: I'll have a go at building from markdown. Just thought maybe you already had a command handy for that 11:25
moritz Zoffix: it's a bit of an enhanced thingy; plain pandoc works partially, but for example the image captions don't work 11:26
Zoffix moritz: ok, then I'll go with give it to me once option. 11:27
[email@hidden.address] if you need it 11:29
Zoffix steps away for a bit
moritz Zoffix: sent 11:33
Zoffix Thanks! 11:39
Zoffix decides again not to do the talk; if anyone was keeping track :) 11:40
lizmat tries to persuade Zoffix to give it anyway
but only a little 11:41
Zoffix m: <go not-go>.pick.say 11:42
camelia not-go
Zoffix The Universe has spoken :p 11:43
Zoffix goes into isolation until next week to continue learning C and proofreading moritz++ book :)
lizmat m: <go not-go>.pick.say 11:46
camelia go
lizmat m: <go not-go>.pick.say
camelia not-go
lizmat ok, 2 out of 3 :-)
piojo Hey, do y'all have any advice about how manage the different versions of rakudo/nqp/moar when doing a git bisect to find a bad commit? 12:32
yoleaux 12 Sep 2017 12:10Z <[Coke]> piojo: - if you use rakudo's Configure.pl --gen-nqp it will automatically insure you have the appropriate version of nqp available. (it won't update if it finds a version that is new enough)
piojo oh! Coke already answered than!
.tell Coke thanks for the answer 12:33
yoleaux piojo: I'll pass your message to Coke.
piojo out of curiosity, I assume implementing "-i" wouldn't be ridiculously hard, would it? just hard? 12:40
perlpilot piojo: are you volunteering? :) 12:46
piojo perlpilot: I'd like to 12:47
perlpilot Cool. As far as using P6 for one-liners, '-i' is a conspicuous absence.
piojo it seems like if $*ARGFILES, -n, and -p are implemented, the pieces are there 12:48
I'll do some reading about settings and see if there's anything that gets in my way 12:49
MasterDuke piojo: btw, if you're bisecting rakudo, there's a bot that'll do that for you 12:54
bisectable6: help
bisectable6 MasterDuke, Like this: bisectable6: old=2015.12 new=HEAD exit 1 if (^∞).grep({ last })[5] // 0 == 4 # See wiki for more examples: github.com/perl6/whateverable/wiki/Bisectable
[Coke] leont++ # just read the backscroll on the prove issue.
piojo MasterDuke: thanks, that'll be helpful in the future :) Buf for now, I want to debug broken terminal interaction in the REPL within cygwin 12:55
I bet it was the recent change to output buffering, so I can start by reverting that... but not until I'm at work and have a windows box nearby 12:56
(the repl seems to just hang in cygwin, but in cmd.exe it works fine) 12:58
err, I mean with rlwrap. because the repl ALWAYS kills the terminal without rlwrap. (We should really add something about that to the documentation...) 12:59
jnthn Is this a normal Windows build being used from cygwin?
piojo jnthn: yes, built from either plain source or rakudobrew 13:00
jnthn (Since afaik you can't actually build MoarVM on cygwin, because libuv until recently wouldn't build there either, and we didn't bump to that libuv yet, though will after the next release)
piojo jnthn: oh, full cygwin support is coming? That's very exciting!
but it's a normal windows build that has multiple problems doing its REPL in cygwin 13:01
jnthn piojo: Well, more like: one big blocker is out of the way
piojo jnthn: gotcha. I'll be patient, and maybe try to contribute to the things that are within my ability :) 13:02
jnthn That would be most welcome. :) 13:03
[Coke] piojo: note that my comment is on a fresh install, or when you're always just upgrading. if you go backwards in time and build, you might end up with a too-new nqp 13:44
piojo Coke: I figured. I'll use the flag, and delete the nqp repo and install if I get a version error anyway. 13:57
oh, I saw there's also --gen-moar. I think I'm set :) 13:58
BooK lizmat: ping 14:29
lizmat pong 14:32
APic B-) 14:33
BooK lizmat: I did dump a wall of text on you in private :-) 14:37
lizmat BooK: then why don't you answer my /privmsg ? :-) 14:42
Skarsnik Hello 15:04
raschipi Hi 15:17
APic Hi 15:18
BooK lizmat: because I don't see it? 15:29
tyil anyone have some time to give feedback on www.tyil.work/tutorials/getting-pe...ry-pi.html ? 15:30
(its a small tutorial on getting a fresh pi up and running with perl 6, to make it easy for beginners to try out perl) 15:31
haxmeister is there a module in the repo for writing excel files? 15:44
yoleaux 21 May 2017 00:58Z <b2gills> haxmeister: If you want to see Perl 6 features misused have a look at my code golf entries codegolf.stackexchange.com/users/1...ab=answers
haxmeister I found XLSX::Writer but zef can't see it.. 15:45
raschipi haxmeister: Download it and have zef install it from the directory directly. 15:52
haxmeister ok ty
BooK is there a more idionatic way to write: my %h = map { $_ => $i++ }, @keys; 15:59
especially without the intermediate $i value 16:00
jnthn $++ 16:01
moritz my %h = @keys Z=> 0..*
BooK nice
lizmat m: dd %h = <a b c>.antipairs
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '%h' is not declared
at <tmp>:1
------> 3dd 7⏏5%h = <a b c>.antipairs
lizmat m: dd my %h = <a b c>.antipairs 16:02
camelia Hash %h = {:a(0), :b(1), :c(2)}
jnthn hah, win :)
moritz I thought something might that might exists, but I thought .vk instead of .kv :-) 16:03
lizmat well, that would be cheaper still
and yes, .vk has been on my mind a few times, first time around 4 years ago already I think
BooK if I create an enumeration with enum Foo < a b c >, it it possible to add a method to it after that? 16:20
timo m: enum Foo < a b c >; augment class Foo { method hello { say "hi" } }; a.hello 16:21
camelia 5===SORRY!5=== Error while compiling <tmp>
augment not allowed without 'use MONKEY-TYPING'
at <tmp>:1
------> 3enum Foo < a b c >; augment class Foo7⏏5 { method hello { say "hi" } }; a.hello
expecting any of:
generic role
timo m: use MONKEY-TYPING; enum Foo < a b c >; augment class Foo { method hello { say "hi" } }; a.hello
camelia hi
BooK nice
perlpilot BooK: why would you want this though?
jnthn I think you can use the does trait to compose a role into an enum 16:22
BooK for testing
jnthn Which would avoid the need for the augment
timo m: role greeting { method hello { say "hi" } }; enum Foo does greeting < a b c >; a.hello
camelia hi
timo cool, jnthn++
ugexe i just switched a bunch of zef stuff from Proc to Proc::Async, so if anyone sees any strange behavior in v0.1.29+ please let me know 16:56
haxmeister my zef is all messed up on this windows machine 17:07
Failed to update messages when I try to zef update 17:08
haxmeister Failed to update cpan m https//raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan.json 17:11
timo how did the : disappear 17:15
haxmeister mirror:
dunno
Failed to update cpan mirror: 17:16
Failed to update cpan mirror: https:
I'm in cygwin man.. I dunno
leont Is there an ordered map implementation for perl6? 17:18
Skarsnik sort ? HashMap? 17:22
*Set
ugexe haxmeister: ive never used cygwin. i'll try and setup such an env, but it'll take some time 17:24
haxmeister ugexe: I'm only using cygwin to ssh to this irssi instance on my server 17:26
haxmeister my perl6 install should be standard windows installation on this machine 17:26
though I'm not sure why it won't update.. 17:27
tyil have you tried turning it off and on again 17:29
its amazing how many bugs in windows get "fixed" with that 17:30
haxmeister lmao
haxmeister I considered punching the monitor.. but I restrained myself 17:30
ugexe you could try `zef nuke StoreDir` then see if the update works. if not, then zef is failing to find a viable adapter (program) to download with 17:31
haxmeister still no work 17:32
ugexe what is your version of zef? shown in identity field of `zef info zef` 17:33
haxmeister ver<0.1.29> 17:34
ugexe ah that is the latest version
leont I should have phrased better, I'm looking for something like insertion order 17:36
ugexe i think i know where to look, but can you paste the output of `zef update` after running `set ZEF_PLUGIN_DEBUG=1` ? (run `set ZEF_PLUGIN_DEBUG=` after to disable it)
haxmeister paste.pound-python.org/show/MxF0Fm...NtB2FKNpz/ 17:39
ugexe: ^
timo not sure why it fails after saying that pswebrequest works 17:41
ugexe haxmeister: what files are in C:\Users\jday\.zef\store and its subdirectory? 17:48
ugexe i presume there are only 2 or 3 17:50
or none
only guess right now is maybe file locks aren't working properly? i'm not personally able to reproduce on a windows vm 17:52
ugexe i mean it also fails to fetch the git repo version of the ecosystem after the powershell download attempt fails 17:55
ugexe it must be something with file locks, because zef was able to install itself (which takes a path that has no file locks) 18:00
but why wouldn't i be able to reproduce it? 18:01
ugexe one way to check would be to comment out all lines in sub lock-file-protect except the one with `code()` github.com/ugexe/zef/blob/403fb9f7...em.pm6#L54 but you'd have to `zef uninstall zef`, clone zef, edit that file, then see if `perl6 -I. bin/zef update` then works 18:10
haxmeister MANIFEST.zef and 3 folders 18:15
haxmeister folders are cpan, p6c, and Perl6-ecosystem.git and all are empty 18:16
haxmeister ugexe: maybe I can just uninstall zef and start over from scratch with it? 18:17
or maybe I should be running these commands in cygwin instead of regular windows command line 18:18
?
haxmeister nope.. cygwin don't see perl6 18:18
ugexe does `cmd.exe /c git --help` (type this entire thing into command line) show git help? 18:23
haxmeister paste.pound-python.org/show/SlAdeq...rIikZIPiO/
tried to reinstall... I deleted /users/jday/zef which you can't see
ugexe can you run with --debug flag to get test output? 18:24
haxmeister ok
haxmeister paste.pound-python.org/show/eCagte...vODikvA8u/ 18:26
ugexe hmmm, its failing to find prove even
haxmeister well this is windows.. so it may be easier to remove everything thoroughly and reinstall from scratch proper 18:27
at least I thought
wow.. trying to uninstall again says 18:30
ugexe did `cmd.exe /c git --help` show git help? 18:31
haxmeister brb got business to deal with 18:34
ugexe its looking like you're not getting the same env/path when the processes get spawned (since it cant see git, prove, or perl6 when zef itself tries to launch them) 18:36
i almost wonder if you launch zef from a different command prompt, such as `x86 Native Tools Command Prompt` (or whatever variant comes with your version of MSVC) if it would start working 18:37
haxmeister reinstalling latest perl6
Rakudo Star 2017.07
AlexDaniel leont: what about ArrayHash module? 18:40
AlexDaniel buggable: eco ArrayHash 18:40
buggable AlexDaniel, ArrayHash 'An array in a hash in an array... like a turducken': github.com/zostay/perl6-ArrayHash
leont The description confused me, but it might be what I want 18:41
haxmeister ugexe: uninstalled, reinstalled Perl6 rakudo to the latest and then zef reinstalled fine and updates fine 19:39
ugexe haxmeister: cool, glad you were able to solve it 19:41
haxmeister now just need to find and figure how to install a module for making excel files 19:43
zef search doesn't see anything 19:44
ugexe do you know if one exists already? 19:46
haxmeister found 2 19:46
github.com/jmcnamara/excel-writer-xlsx 19:47
haxmeister this one looks good because it doesn't say I need to install an additional binary 19:47
ugexe that is perl 5
haxmeister github.com/evanmiller/XLSX-Writer\ 19:48
github.com/evanmiller/XLSX-Writer
will have to be that one then
I already see problems getting it to find the library :( 19:49
moritz or you can use Inline::Perl5 and use the excellent perl5 library
andrzejku j #simulavr
leont Are BUILD and is default supposed to work together, because I think I'm observing that they don't 19:50
leont Never mind, suddenly problem is gone, no idea where I messed up 19:51
lizmat BUILD is agnostic of "is default"
lizmat "is default" is a property of the container used for the attribute 19:51
ugexe its not in the ecosystem. and while you could install it by url i dont see any example of how to setup the libxlsxwriter in windows
leont Ah, I think I can reproduce it now
m: class Foo { has Rat $.version is default(1.2); submethod BUILD(:$!version) { } }; Foo.new 19:52
camelia Type check failed in assignment to $!version; expected Rat but got Any (Any)
in submethod BUILD at <tmp> line 1
in block <unit> at <tmp> line 1
leont It works fine if $.version is an Any 19:53
m: class Foo { has Rat $.version is default(1.2); submethod BUILD(:$!version = Nil) { } }; Foo.new # does seem to work 19:54
camelia ( no output )
El_Che moritz: how is the regex book coming into shape? 20:00
moritz El_Che: I'm writing an email to the mailing list right now, on this very topic :-) 20:02
moritz El_Che: TL;DR: it's now feature complete, and I'm looking for proof-readers 20:02
El_Che moritz: I can have a look if I find some time. However, there are some parts of the grammars that I don't completely get yet 20:03
BooK I'm working on a patch for the core. Which version is preferred for operators? texas or unicode? 20:28
>= or ≥ ?
timo a Channel is a really neat mechanism for work credit management
Zoffix BooK: as a general thing, I don't think there's a hard preference. I think in the past more Texas stuff was used and now more Unicodey stuff sneaks in. But as for those ops in particular, check which one performs faster. There was a ticket where Unicode ones were a ton slower; I think there was a workaround inserted for the ops but the underlying issue wasn't fixed. 21:15
m: for ^10000 { $ = rand ≥ rand }; say now - INIT now
camelia 0.00846099
Zoffix m: for ^1000000 { $ = rand ≥ rand }; say now - INIT now
camelia 0.49497320
Zoffix m: for ^1000000 { $ = rand >= rand }; say now - INIT now
camelia 0.33882657
Zoffix m: for ^1000000 { $ = rand >= rand }; say now - INIT now 21:16
camelia 0.3456027
Zoffix m: for ^1000000 { $ = rand ≥ rand }; say now - INIT now
camelia 0.50973210
Zoffix Yeah, the Texas version still looks to be a bit faster for whatever reason
Zoffix But used to be 36x slower :D rt.perl.org/Public/Bug/Display.htm...et-history 21:17
Zoffix BooK: BTW, there's also #perl6-dev channel :) Some devs some times don't read all of this channel, so more eyes will see dev questions up in there :) 21:17
Zoffix moritz: you asquare? 21:26
moritz Zoffix: kinda 21:27
Zoffix moritz: How much editing am I allowed to make? If a sentence reads better with a change, should I make it or should I only focus on proofreading words themselves and punctuation?
moritz Zoffix: if it reads better, change it 21:28
Zoffix k :)
moritz Zoffix: if you want to re-arrange whole paragraphs or sections, better check with me first, or push it to a branch that's not master
Zoffix Nah, I don't plan to do that at the moment.
[Coke] rt #132091, timo - the implication is that you'd like this behavior not to change, ay? 21:34
synopsebot6 Link: rt.perl.org/rt3/Public/Bug/Display...?id=132091
moritz -> slee 21:44
p
:-)
Ulti someone is asking on StackOverflow about UNIX sockets, then I noticed this design.perl6.org/S32/IO.html#IO%3A...%3A%3AUnix 22:00
I'm right in thinking nothing like that has made it to Rakudo? 22:01
tyil afaik theres no unix sockets in it
I believe someone was looking at it, though
leont I was looking at it a while ago, but I didn't have time to get very far 22:05
leont It will require moar support, which is where I'm threading slowly 22:06
BooK Zoffix: thanks for the advice about #perl6-dev 22:08
BooK so I made a pred and succ for enumeration (following the recent discussions), and returning a Failure object seems to stop processing 22:12
I thought it was a "soft" exception? 22:13
leont It depends on how it's used
BooK ah, ok 22:15
BooK and if I want to try and just show the exception, but not actually stop processing? 22:17
well, just exit the try block and move on
try { CATCH { .say } ... } seems to print and then die 22:19
ugexe try { CATCH { default { .say } } 22:20
or try die "xxx"; say $!; say 42; if you fancy that way 22:21
timo [Coke]: i think it's an unwanted side-effect, but if there's not yet a test for the behavior, there should be one, IMO
timo m: enum enomnom (Foo => 1, Bar => 1, Baz => 1); say +Foo; say +Bar; say enomnom(1); 22:22
camelia 1
1
Baz
timo BooK: not sure if it has any bearing on your work on enum's succ and pred, but consider that multiple entries can have the same value, and also that entries and their values could come in different orders in the declaration 22:23
BooK timo: I don't understand the second part of your sentence 22:24
timo m: enum enomnom (Foo => 9, Bar => 1, Baz => 5, Quux => 2); 22:25
camelia ( no output )
timo would this change how succ and pred behave compared to if i had put it like
BooK in the above example, that Foo.succ would be Bar and Bar.succ would be Baz
timo m: enum enomnom (Bar => 1, Quux => 2, Baz => 5, Foo => 9);
camelia ( no output )
BooK as for the second example, yes the result would be different 22:26
timo OK
i don't have a preference, i just thought i'd point it out 22:27
BooK it's not about the values, but about the order of declaration
timo i think that's a good decision 22:27
we're not expecting people to have "enum Bool <True False FileNotFound>" :D
Zoffix BooK: FWIW try {} enables `use fatal`, which causes Failures to explode
Zoffix (inside the `try` block) 22:28
Many method calls also explode Failures
m: Failure.new.meow
camelia Failed

Actually thrown at:
in block <unit> at <tmp> line 1
Zoffix As does sinking it 22:29
m: Failure.new
camelia Failed

Actually thrown at:
in block <unit> at <tmp> line 1
BooK Zoffix: basically I'm running this to test my changes: 22:30
try { CATCH { .say; }; .pred.say }, .say , try { CATCH { .say; }; .succ.say }, "".say for Order.^enum_value_list;
I just want to check the failure is what I expect, and move on 22:31
Zoffix `try` fatalizes Failures
BooK so what should I use instead?
oh what a dummy
ah no, this fails too: .pred.say, .say, .succ.say, "".say for Order.^enum_value_list
timo CATCH is allowed inside a block without a try
BooK oh 22:32
Zoffix BooK: .say call on Failure will explode it
BooK ah
BooK .gist.say too it seems 22:33
Zoffix .say calls .gist
BooK oh 22:33
Zoffix A rule of thumb is: if you try to use a Failure where you'd use a value it'll explode. Failure is Nil and some methods will just propagate it further
What are you trying to do, just dump it for debug purposes?
BooK yes 22:34
for Order.^enum_value_list { CATCH { .dd }; .pred.say, .say, .succ.say, "".say } # gives me No such method 'dd' for invocant of type 'X::OutOfRange' 22:35
Zoffix m: sub f { rand ≥ ½ ?? fail("ded") !! "no fail" }; f() andthen .say orelse "Got a Failure; its exception is {.head.exception.gist}".say
camelia Got a Failure; its exception is Nil
BooK so it seems I get the Expection and not the Failure
Zoffix dd is a subroutine, not method 22:36
BooK ok 22:36
Zoffix Yeah, by that time the Failure already exploded by the .say call 22:36
Zoffix m: sub f { $^a eq 'b' ?? fail("ded") !! "no fail" }; for <a b c> { CATCH { default { "Got exception {.^name}; its exception is {.message}".say }; f } 22:37
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> 3 its exception is {.message}".say }; f }7⏏5<EOL>
Zoffix m: sub f { $^a eq 'b' ?? fail("ded") !! "no fail" }; for <a b c> { CATCH { default { "Got exception {.^name}; its exception is {.message}".say } }; f.say; f.say }
camelia 5===SORRY!5===
Calling f() will never work with declared signature ($a)
at <tmp>:1
------> 3; its exception is {.message}".say } }; 7⏏5f.say; f.say }
Calling f() will never work with declared signature ($a)
at <tmp>:1
------> 3xcep…
Zoffix is too sleepy to see what the problem is 22:38
BooK my $o = Order::Less; while $o.defined { $o.say ; $o = $o.succ } # says Less, Same, More 22:39
my $o = Order::Less; while $o.defined { $o.say ; $o = $o.pred } # says Less
Zoffix But yeah just CATCH {} above won't catch it. It'll do its thing and pass the exception further up. You need a `default` or some other `when` thing
Zoffix Yeah, that'll work. `.defined` (and `.Bool`) disarm Failures 22:40
BooK using Order in a while is kinda annoying, because Same is basically false
Zoffix Maybe this is helpful. Our impl. of `fails-like` routine that examines Failures: github.com/perl6/roast/blob/master...#L304-L319 22:41
BooK Zoffix: so using a default block inside the CATCH did disarm it 22:41
Zoffix Yeah
Well, no
timo hmm, we have "repeat { } while foo", right? 22:42
should we perhaps also have "repeat { } with $foo"?
Zoffix I mean disarmed what? Failure? No, by that point it wasn't a Failure already. But yeah, it disarmed (handled) the exception
BooK sorry, I'm still new to Perl 6, don't know the words 22:43
Zoffix Yeah, me too.
m: Failure.new orelse .perl.say 22:44
camelia Failure.new(exception => X::AdHoc.new(payload => "Failed"), backtrace => Backtrace.new)
Zoffix TIP: $o = $o.succ can be written as $o .= succ (same as $o = $o + 42 can be written as $o += 42) 22:51
timo and $_ = $_.succ can even be written just .=succ
Zoffix (currently it's slower tho; so don't use it in core
timo: wow really? TIL
timo er, at least i think so
m: $_ = "aaa"; .= succ; .say 22:52
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix .= instead
at <tmp>:1
------> 3$_ = "aaa"; .=7⏏5 succ; .say
timo oops, i'm wrong
Zoffix Same thing with the `»` hyper method call :) Wish it worked :)
Zoffix As in `».uc with <a b c>` :) 22:52
BooK timo, Zoffix: yeah I tried with .succ= and found myself looking for what to put on the rhs 22:54
github.com/rakudo/rakudo/pull/1156 # so here it is
BooK Bool has its own versions of pred/succ, but my plan is to drop most Bool methods that are provided by Enumeration 22:59
m: say Errno.WHAT
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Errno used at line 1
BooK I'd have thought Errno would also be an enumeration :-) 23:00
geekosaur errnos don't generally have a meaningful progression 23:01
Zoffix BooK: it might be too early in the "setting" (the core code) for it to afford that luxury 23:02
Zoffix BooK: not sure about the Failure in the PR. We can't do it with Bool, because we need to keep $foo++ idiom working, and if we don't do it in Bool, we still have this inconsistency that started this whole thing :) 23:03
BooK geekosaur: enums don't generally have a meaningful progression 23:04
BooK Zoffix: what's the $foo++ idiom? 23:05
Zoffix "%seen{$key}++" 23:06
From TimToady++'s comments yesterday irclog.perlgeek.de/perl6/2017-09-14#i_15160486
BooK right
scrape my PR then :-) 23:07
BooK from this comment, I'd think -- could be made special for Bool too, and follow the lead of Perl5's $| 23:08
BooK and that False.pred should be True 23:09
and not look for consistency in the other enums
Zoffix likes consistency more than Perl's use of $| and all the associated magicks :P 23:10
timo excuse me, what's $| do?
Zoffix timo: turns off buffering when it's False
timo oh, autoflush
tyil oh member when I used $|++; in perl 5 23:11
Zoffix timo: and it has this magic stuff where $|++ always makes it true and $|-- flips it back and forth
tyil it confused many people
BooK it's either 0 or 1, and $|++ goes to 1 and stays there, while $|-- flip flops
timo that's a bit strange
BooK golfers loved it 23:11
timo of course they did %) 23:12
BooK imagine %seen_odd_times{$key}-- :-)
and I meant even
arg
tyil %seen_odd_times{$even}-- looks ever weirder
Zoffix If we make .pred go to previous element (and just return the first element if it's already at the first element) and .succ go to next element (and just return the first element if it's already at the last element). We make Enumeration <-> Bool consistent AND keep the behaviour of Order and Bool semantically the same (More.succ currently returns 2, which is still "more") 23:14
Zoffix and user can assume that calling .succ/.pred on Order/Bool will always be non-explosive 23:15
BooK Zoffix: right, so remove the Failure
Zoffix Yeah 23:19
BooK do people link to perlgeek.de in the commit messages? 23:29
nevermind, they do 23:30
Failure dropped from the PR 23:31
Zoffix BooK++ merged. Thanks. 23:42
BenGoldberg m: constant meaning = 42; sub life () is asdf {}; 23:51
camelia 5===SORRY!5=== Error while compiling <tmp>
Can't use unknown trait 'is asdf' in a sub declaration.
at <tmp>:1
expecting any of:
rw raw hidden-from-backtrace hidden-from-USAGE
pure default DEPRECATED inlinable nodal
BenGoldberg m: constant meaning = 42; sub life () is meaning {};
camelia 5===SORRY!5=== Error while compiling <tmp>
Can't use unknown trait 'is ' in a sub declaration.
at <tmp>:1
expecting any of:
rw raw hidden-from-backtrace hidden-from-USAGE
pure default DEPRECATED inlinable nodal
BenGoldberg That is an LTA error message :( 23:52
Zoffix doesn't see the LTAness 23:53
Which part?
Ah, now I see it
lulz :) Would you file it?
huggable: rakudobug
huggable Zoffix, Report bugs by emailing to [email@hidden.address] See also: github.com/rakudo/rakudo/wiki/rt-introduction