Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-15

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 llfourn joined #perl6
00:02 zakharyas joined #perl6
00:03 IOninja Can't tell! The bot won't join in! :)
00:04 buggable joined #perl6
00:04 IOninja Oh, looks like the bot strike is over.
00:04 huggable joined #perl6
00:04 NeuralAnomaly joined #perl6
00:04 IOninja NeuralAnomaly: status
00:04 NeuralAnomaly IOninja, [✘] Next release will be in 3 days and 5 hours. Since last release, there are 40 new still-open tickets (1 unreviewed and 0 blockers) and 155 unreviewed commits. See http://perl6.fail/release/stats for details
00:04 IOninja :)
00:05 timotimo ah, still a bit left to go, nice
00:13 BenGoldberg m: 3.WHICH.say;
00:13 camelia rakudo-moar b51a55: OUTPUT«Int|3␤»
00:24 TeamBlast joined #perl6
00:28 BenGoldberg m: use nqp;
00:28 camelia rakudo-moar b51a55: ( no output )
00:28 BenGoldberg m: use nqp; say nqp::boothash()
00:28 camelia rakudo-moar b51a55: OUTPUT«{}␤»
00:28 BenGoldberg m: use nqp; dd nqp::boothash()
00:28 camelia rakudo-moar b51a55: OUTPUT«{}␤»
00:29 BenGoldberg m: use nqp; dd nqp::bootint()
00:29 camelia rakudo-moar b51a55: OUTPUT«Int␤»
00:36 timotimo the magic of hllize turns those into "proper" types
00:40 Ben_Goldberg joined #perl6
01:03 llfourn joined #perl6
01:30 kaare_ joined #perl6
01:42 lizmat joined #perl6
01:45 MasterDuke joined #perl6
01:57 zacts joined #perl6
01:57 cale2 I actually kind of like how perl5 didn't have subroutine signatures. I didn't realize that aspect of it before. Makes the language feel pretty weird/minimal
02:04 llfourn joined #perl6
02:10 skids joined #perl6
02:14 Sgeo_ joined #perl6
02:15 geekosaur perl 3 was fairly minimal, actually. it just got a lot of stuff layered on top without much attention to rational language design :)
02:16 geekosaur perl 5 even corrected some of that, before spending a couple decades collecting its own cruft
02:17 cale2 geekosaur: comparatively, how do you see perl6?
02:18 geekosaur a badly needed rationalization, but also fairly experimental in a number of ways (and I fully expect the experiments to evolve and change --- in fact this has already happened a few times before release)
02:22 beginner_guy perl6 is a rock. perl6 is an island. but typing .pl6 makes me hurt and cry
02:23 samcv type .p6 :)
02:23 samcv hi beginner_guy
02:26 atweiden-air joined #perl6
02:27 beginner_guy hiya!
02:28 atweiden-air in testing parametric roles with `is-deeply`, i'm getting this recurring issue where the output is identical but the tests fail
02:28 atweiden-air when i switch to testing with `is`, this is the output
02:28 atweiden-air expected: 'Header[Int]<140620794464128>'
02:28 atweiden-air got: 'Header[Int]<140620794464088>'
02:28 atweiden-air whatever that number is, it is consistently off by 40
02:30 cale2 just type .pl or .pm and include use v6 :P
02:31 cale2 anyone read the early release of Think Perl 6 yet?
02:33 Actualeyes left #perl6
02:35 atweiden-air for now, i'm using a custom `sub infix:cmp` as a workaround:
02:35 atweiden-air https://github.com/atweiden/finn/commit/e4ed5207c4ae72f9de3cef91ca71b60ef46469d6
02:36 atweiden-air but i've tried golfing it to no avail, so maybe i'm missing something
02:38 avalenn joined #perl6
02:40 b2gills &is checks if two values stringify the same, &is-deeply checks if the data-structures are the same, but only goes into Hash/Array/Set etc. You may want &cmp-ok
02:48 ilbot3 joined #perl6
02:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:51 atweiden-air b2gills: i'll use cmp-ok with custom &sub from now on, thanks
02:53 kalkin- joined #perl6
02:54 atweiden-air https://github.com/atweiden/finn/commit/d1a70923485cfae57de441ec536ad06ef2985282
03:01 cale2 What if I re-wrote my rabbit fibonnaci code to be reactive. So the rabbits would be a supply. whenever a month ticks by, baby rabbits are born...
03:02 _Vasyl joined #perl6
03:02 andrzeju_ joined #perl6
03:03 olinkl_ joined #perl6
03:03 cpage__ joined #perl6
03:04 mithaldu__ joined #perl6
03:04 aindilis` joined #perl6
03:04 zostay_ joined #perl6
03:04 Some-body_ joined #perl6
03:04 w4and0er96_ joined #perl6
03:04 xfix_ joined #perl6
03:04 r3m_ joined #perl6
03:05 llfourn joined #perl6
03:06 Celelibi_ joined #perl6
03:06 smash_ joined #perl6
03:06 obra_ joined #perl6
03:06 roguelazer_ joined #perl6
03:06 integral joined #perl6
03:06 ChoHag_ joined #perl6
03:06 avarab joined #perl6
03:06 integral joined #perl6
03:06 avarab joined #perl6
03:06 xui_nya[m]1 joined #perl6
03:06 profan_ joined #perl6
03:07 ugjka joined #perl6
03:07 hwu_ joined #perl6
03:07 cale2 on second thought, this rabbit thing is getting a bit too graphic
03:07 ssm_ joined #perl6
03:07 jsimonet joined #perl6
03:08 koki joined #perl6
03:08 geekosaur joined #perl6
03:08 mulk[m] joined #perl6
03:08 andrewalker joined #perl6
03:09 john51 joined #perl6
03:09 shadowpaste0 joined #perl6
03:09 cgfbee joined #perl6
03:17 BuildTheRobots joined #perl6
03:19 MasterDuke joined #perl6
03:23 faraco joined #perl6
03:36 noganex_ joined #perl6
03:39 samcv heh
03:41 mr-foobar joined #perl6
03:41 nightfrog joined #perl6
03:50 agentzh joined #perl6
03:53 ssotka joined #perl6
03:56 cale2 samcv: How do you read IRC? do you use a client?
03:56 cale2 I'm using a barebones website
03:57 wamba joined #perl6
03:57 BenGoldberg Real hackers netcat straight to the irc server ;)
03:58 xtreak joined #perl6
04:05 cale2 lol
04:07 llfourn joined #perl6
04:15 faraco howdy
04:19 samcv .tell cale2 I use a ZNC bouncer and my client is HexChat
04:19 yoleaux samcv: I'll pass your message to cale2.
04:30 tharkun joined #perl6
04:31 Cabanoss- joined #perl6
04:54 samcv i'm thinking this should be expanded https://github.com/perl6/Atom-as-a-Perl6-IDE
04:54 samcv because i want to put info on how to make `git diff` recognize perl 6 classes and other objects
05:01 timeless joined #perl6
05:03 samcv though it may already sorta do it, i gotta check some things
05:05 BenGoldberg joined #perl6
05:05 Tonik joined #perl6
05:06 alphah joined #perl6
05:09 llfourn joined #perl6
05:14 alphah joined #perl6
05:16 imcsk8 joined #perl6
05:22 alphah Hello!, Not sure if this is the right place to ask (hope it is), I'm new to programming, What do i need to change to not get "can't lookup attributes" error when executing this code: p6: class Check {has $.item}; class Waiter { has Check $.check; method order {say $!check.item}; }; Waiter.new.order
05:25 geekosaur you need to initialize .check somehow to an actual instance of Check; right now it's initialized to the type object, which is a typed "undefined value"
05:26 geekosaur you probably want a TWEAK submethod for this (see the end of https://docs.perl6.org/language/objects#Object_Construction)
05:28 geekosaur you'll also have to consider how to initialize $!item in a Check
05:30 alphah Thank you, I see the issue now, that worked:
05:30 alphah class Check {has $.item}; class Waiter { has $.check = Check.new; method order {say $!check.item}; }; Waiter.new.order
05:31 alphah I will review the docs again, I was under the impression that if I defined attribues with $. it will be initialized
05:33 geekosaur no, that just means that an initializer method is created
05:34 geekosaur which is to say, you can use $.check from outside the class
05:34 CIAvash joined #perl6
05:34 geekosaur it does not guarantee initialization in and of itself
05:34 geekosaur (think: getters and setters)
05:37 alphah got it, Appreciate it.
05:46 samcv m: my @array; say @array.defined
05:46 camelia rakudo-moar b51a55: OUTPUT«True␤»
05:46 samcv why does this give True :(
05:46 samcv are arrays always defined
05:46 samcv i have an optional array argument for a routine. i guess i will need to make it a $ sigil?
05:49 CIAvash m: my @array; say ?@array
05:49 camelia rakudo-moar b51a55: OUTPUT«False␤»
05:52 geekosaur perl 5 does/did (they deprecated defined on arrays, iirc) the same. the distinction in p5 used to be an internal detail (whether the vector to hold possible elements had been allocated or not)
05:53 geekosaur basically .defined is not a proxy for .empty
05:53 geekosaur er `not .empty`
06:10 llfourn joined #perl6
06:11 samcv i just expected an optional parameter that's an array wouldn't be defined
06:11 samcv if it wasn't supplied
06:16 samcv m: my $s = (1,2,5,5); my @array = $s; say @array.perl
06:16 camelia rakudo-moar b51a55: OUTPUT«[(1, 2, 5, 5),]␤»
06:16 samcv and this is odd
06:16 samcv i would assume it would copy it, not make an array of arrays
06:17 samcv any way to stop it from doing that?
06:17 geekosaur I wouldn't. $s is one item, that happens to be a list
06:17 geekosaur m: my $s = (1,2,5,5); my @array = @$s; say @array.perl
06:17 camelia rakudo-moar b51a55: OUTPUT«[1, 2, 5, 5]␤»
06:18 samcv ok
06:18 samcv thank you
06:31 wamba joined #perl6
06:33 zacts joined #perl6
06:39 Todd_ joined #perl6
06:39 Todd_ okay I give up.  Google is failing me here.  how do I do a multi line comment?  Google give me "opinons" on Perl 6
06:40 bjz joined #perl6
06:41 Todd_ Is the this the right translation of Perl 5 to Perl 6? p5: for my $Line ( @SystemCtl ){ print "$Line\n"; } P6: for @SystemCtl -> $Line  { print "$Line\n"; }
06:42 CIAvash Todd_: https://docs.perl6.org/language/syntax#Multi-line_/_embedded_comments
06:44 Todd_ that was easy!  Thank you!
06:46 curan joined #perl6
06:49 Todd_ that p5 p5 for loop worked.
06:49 Todd_ p5 to p6 worked
06:51 Todd_ You guys have a link to p6 patter matching.  I am trying to trnaslate a P5
06:51 Todd_ if ( $x =~ /y/ ) {do something}
06:51 RabidGravy joined #perl6
06:54 CIAvash Have you tried searching in https://docs.perl6.org ?
06:55 CIAvash There are 5to6 docs that can help you https://docs.perl6.org/language/5to6-nutshell#Regular_Expressions_(_Regex_/_Regexp_)
06:55 Todd_ Yes!  I got nowhere!
06:57 CIAvash also https://docs.perl6.org/language/regexes
06:58 CIAvash you can see a list of those pages on https://docs.perl6.org/language.html
06:58 samcv Todd_, you want regex?
06:58 samcv $x ~~ /blah/
06:58 samcv some of the things are different though
06:58 samcv Todd_, https://docs.perl6.org/language/regexes
06:58 samcv also welcome to #perl6
06:59 Todd_ Thank you!
06:59 Todd_ I am trying to fix this:
06:59 Todd_ if ( $Line ~~ m/${ServiceName}⏏/ )
06:59 samcv what is ${ } in perl 5 mean to uh
06:59 samcv what does that do
06:59 samcv in perl 5?
06:59 samcv access $ServiceName?
07:00 samcv and is there just text in $ServiceName or a regex text string?
07:00 samcv Todd_,
07:01 Todd_ in p5 ${x} is the same as $x.  The brackets are when yo are string a lot of variable together and you want to remove any misunderstanding
07:01 samcv ah ok
07:01 Todd_ Let me try without then
07:01 samcv you can just do /$variable/
07:01 samcv which will do literal text
07:02 samcv ~~ / blah / is like m/blah/s in perl 5, spaces are not significant. but with /$vriable/ they are i think it's like \Q blah\E in perl 5
07:02 Todd_ $Servicename will vary.  Right now it is "CimTrakAppServer.service"
07:02 samcv also you can do {$blah}
07:02 samcv you can even put code in there if you wanna go crazy, more useful when doing grammars
07:03 samcv m: say 'a' ~~ /{say 'hi'}/
07:03 camelia rakudo-moar b51a55: OUTPUT«hi␤「」␤»
07:03 samcv heh
07:03 samcv m: say '1' ~~ /{3 - 2}/
07:03 camelia rakudo-moar b51a55: OUTPUT«「」␤»
07:03 samcv oh well thought that may or may now work
07:03 Todd_ What I am after is if "$ServiceName" exists inside $Line, then Bollean true
07:03 samcv well it will evaluate to true
07:04 samcv m: say '1' ~~ /1/
07:04 camelia rakudo-moar b51a55: OUTPUT«「1」␤»
07:04 samcv m: say so '1' ~~ /1/
07:04 camelia rakudo-moar b51a55: OUTPUT«True␤»
07:04 samcv you can use so to find out what it would be bool as, or as a method call would be .Bool
07:04 samcv you don't have to worry about that if it's in an if statment or somtehing
07:04 samcv since it evals as boolean already
07:05 Todd_ I just meant do the contents insdie the {}.  if {} else {} etc.
07:05 samcv m: my $ServiceName = 'tools'; say 'blahtools' ~~ /$ServiceName/
07:05 camelia rakudo-moar b51a55: OUTPUT«「tools」␤»
07:05 samcv m: my $ServiceName = 'tools'; if 'blahtools' ~~ /$ServiceName/ { say 'found servicename' }
07:05 camelia rakudo-moar b51a55: OUTPUT«found servicename␤»
07:07 Todd_ if  $Line ~~ /$ServiceName/
07:07 Todd_ is no longer giving me a syntax error.  Problem.  it doesn't work.  passes everything.
07:07 Todd_ sub GetServiceStatus ( $ServiceName ) {
07:08 Todd_ my @SystemCtl;
07:08 Todd_ my $Status;
07:08 Todd_ for @SystemCtl -> $Line  {
07:08 Todd_ f  $Line ~~ /$ServiceName/  {
07:08 Todd_ print "$Line\n";
07:08 Todd_ }
07:08 Todd_ }
07:08 Todd_ return $Status;
07:08 Todd_ }
07:08 geekosaur can I suggest using a pastebin of some kind? lpaste.net, gist.github.com, dpaste.de, ...
07:09 Todd_ I refuse to use grep!
07:09 Todd_ that is "if $Line".  I cut off the "i"
07:11 llfourn joined #perl6
07:12 Todd_ I am thinking I have the wrong syntax for using a variable inside the //
07:12 Todd_ what is a pastebin?
07:13 stmuk_ joined #perl6
07:14 moritz it's a service where you copy&paste code into, so that you only have to give us the URL, not paste many lines on IRC
07:14 Todd_ okay
07:14 geekosaur also most of them provide editing, and many of them have some way to let other people make their own changes and show the changes as diffs or etc
07:15 Todd_ Any idea what I am doing wrong with "if  $Line ~~ /$ServiceName/  {}"?
07:15 geekosaur (gist and lpaste offer that last feature)
07:16 moritz Todd_: what's in $Line? What's in $Servicename?
07:17 Todd_ GetServiceStatus ( "CimTrakAppServer.service" );
07:17 Todd_ f  $Line ~~ /$ServiceName/  {
07:17 Todd_ f  $Line ~~ /$ServiceName/  {
07:17 Todd_ for @SystemCtl -> $Line  {
07:17 Todd_ @SystemCtl = qx ( systemctl -la ) ;
07:17 moritz Todd_: don't copy&paste all
07:18 moritz Todd_: if you expect a line to match, what's in that line?
07:18 Todd_ $Line is full of stuff like
07:18 moritz NO
07:18 moritz not "stuff like"
07:18 Todd_ time-sync.target loaded    active   active    System Time Synchronized
07:18 moritz copy&paste one *actual* line that you want to match CimTrakAppServer.service
07:19 Todd_ if $Line contains "CimTrakAppServer.service" then do {}
07:20 Todd_ are you on a linux system?
07:20 moritz m: my $Line = 'contains CimTrakAppServer.service, raelly'; my $ServiceName = 'CimTrakAppServer.service'; if $Line ~~ /$ServiceName { say "found something" }
07:20 camelia rakudo-moar b51a55: OUTPUT«5===SORRY!5===␤Regex not terminated.␤at <tmp>:1␤------> 3 /$ServiceName { say "found something" }7⏏5<EOL>␤Unable to parse regex; couldn't find final '/'␤at <tmp>:1␤------> 3 /$ServiceName { say "found something" }7⏏5<EOL>␤    â€¦Â»
07:20 moritz m: my $Line = 'contains CimTrakAppServer.service, raelly'; my $ServiceName = 'CimTrakAppServer.service'; if $Line ~~ /$ServiceName/ { say "found something" }
07:20 camelia rakudo-moar b51a55: OUTPUT«found something␤»
07:20 moritz Todd_: ^^ see? if the line contains the string, it matches
07:21 moritz Todd_: if it doesn't match, one of these variables doesn't contain what you think it does
07:21 moritz Todd_: find out which one
07:21 Todd_ Trouble is, it matches EVERYTHING
07:22 bpmedley joined #perl6
07:22 moritz m: my $Line = 'no such luck, raelly'; my $ServiceName = 'CimTrakAppServer.service'; if $Line ~~ /$ServiceName/ { say "found something" }
07:22 camelia rakudo-moar b51a55: ( no output )
07:22 moritz Todd_: not in my test
07:22 moritz Todd_: if it matches everything, it's likely that $ServiceName isn't what you think it is
07:22 Todd_ I will print it out and check
07:23 Todd_ This is what I am trying to do written in bash
07:23 Todd_ $ systemctl -la | grep -i CimTrakAppServer.service
07:23 moritz try this: say $ServiceName.perl;
07:23 moritz before the regex match
07:23 moritz what does it print?
07:25 Todd_ print "$ServiceName\n";
07:25 Todd_ gives
07:25 Todd_ CimTrakAppServer.service
07:25 moritz that's not what I asked you to print
07:25 Todd_ which was what was expected
07:25 moritz but if you don't want help, fine
07:25 Todd_ oops
07:26 Todd_ print "$ServiceName.perl\n"
07:26 Todd_ CimTrakAppServer.service.perl
07:26 bjz joined #perl6
07:26 Todd_ what did that tell you?
07:27 moritz that you still didn't do what I asked you to, and that it's not worth my time trying to help you further
07:28 masak Todd_: `say $ServiceName.perl;` is the statement moritz asked for. not the print statement you used.
07:28 masak Todd_: there's a certain technique to getting good help. you haven't mastered it yet ;)
07:28 Todd_ Oh poop.  the array has line feed in it.  Maybe my loop is one long line!
07:29 masak moritz: what was the term, "help vampire"?
07:29 masak it's not malicious, it's mostly Dunning and Kruger
07:30 moritz https://irclog.perlgeek.de/perl6/2017-02-15#i_14105627
07:31 geekosaur I don't think that was fair, tbh. this is someone who is quite new and apparently interpreted what you asked for in terms of what they currently understand
07:31 moritz geekosaur: asking somebody to put in a debug statement isn't fair?
07:31 Todd_ say $ServiceName.perl;
07:31 Todd_ "CimTrakAppServer.service"
07:31 moritz geekosaur: being annoyed that them failing do so so *twice* isn't fair, even though copy&paste exists?
07:32 geekosaur mopritz, are you looking for excuses to argue?
07:32 geekosaur *moritz
07:32 moritz geekosaur: I try to help lots of folks in my free time, free of charge. I think I can be picky about when I stop giving that support
07:32 * geekosaur is gradually getting better at recognizing when he's in that kind of state and backing away from the keyboard
07:32 * masak .oO( and that's how #perl6 turned into #perl )
07:33 masak geekosaur: I know what you mean.
07:33 geekosaur without, y'know, maligning the other person
07:33 moritz I can stay away if that's what you want me to do
07:33 moritz left #perl6
07:34 masak :(
07:35 Todd_ Figured it out.  I put a line counter in my print line.  My array is all one line.  So, of course my test would find it
07:36 Todd_ so then, what am I doing wrong in this line that doesn't give me an array of line?
07:36 Todd_ @SystemCtl = qx ( systemctl -la ) ;
07:36 Todd_ what I am erally getting back is a single string.
07:37 El_Che /usr/local/pulse/PulseClient.sh: line 413: rpm: command not found
07:37 El_Che <-- the ubuntu package of pulse vpn client
07:37 Todd_ Perl 5 converted tht to an array of line of text.  Do I have to tell perl6 to do that?
07:37 El_Che they seems to have outsourced their QA to 3 cats and a pony
07:37 arnsholt El_Che: Whee! =)
07:41 Todd_ https://docs.perl6.org/routine/split
07:41 Todd_ But I am not sure what I am looking at
07:43 Todd_ I am only finding perl 5 ways of doing it on google
07:43 Todd_ my @abc = split('',$line);
07:43 geekosaur Todd_, what you generally want is .lines
07:44 Todd_ what do you mean?
07:44 xtreak joined #perl6
07:44 geekosaur @SystemCtl = qx( systemctl -la ).lines ;
07:44 geekosaur so it splits it into a list by lines
07:45 Todd_ YIPPEE!!!!  Thank you guys!
07:47 Todd_ Hopefully, I won't have to pester you guys for a while.
07:47 Todd_ bye bye
07:48 CIAvash language/regexes doesn't show up in search results when I search for "regex". It seems to be caused by 50 results limit
07:49 brrt joined #perl6
07:50 wamba joined #perl6
07:51 brrt left #perl6
07:57 Todd joined #perl6
07:57 Todd I am back. That did not take me too long.
07:58 Todd I am not gettig the difference beteen the perl5 split and perl6
07:58 Todd split ( / +/, $Line, 6)
07:58 Todd in p5 eats up all the multiple spaces in the line
07:59 Todd in p6, I get
07:59 Todd ------>              split ( / +⏏/, $Line, 6);
07:59 Todd expecting any of: term
07:59 geekosaur regexes in perl 6 act like perl 5's /x modifier
08:00 Todd what do you mean?
08:01 geekosaur m: say so 'a   b' ~~ /<:space>+/
08:01 camelia rakudo-moar b51a55: OUTPUT«True␤»
08:01 geekosaur literal spaces are not significant in regexes normally
08:02 geekosaur m: say so 'a   b' ~~ /' '+/
08:02 camelia rakudo-moar b51a55: OUTPUT«True␤»
08:02 geekosaur m: say so 'a   b' ~~ /' ' +/
08:02 camelia rakudo-moar b51a55: OUTPUT«True␤»
08:02 geekosaur so you can format it for readability instead of the usual chunk of incomprehensible glyphs of old-style regexes
08:03 geekosaur also so you can do things more like parsers: you can define your own tokens and match them with angle brackets
08:04 Todd I have tried /<:space>+/  and /' '+/ and I am still pulling syntax errors
08:04 geekosaur m: my token a-space { ' ' }; say so 'a  b' ~~ / <a-space> + /
08:04 camelia rakudo-moar b51a55: OUTPUT«True␤»
08:05 geekosaur (I'm being careful about "space" there because I think it's already defined, but not solely as space characters)
08:05 Todd the whole line is
08:05 Todd ( $Blanks, $Unit, $Load, $Active, $Sub, $Description ) = split ( /<:space>+/, $Line, 6);
08:06 Todd what am I doing wrong inside the //  ?
08:06 xtreak joined #perl6
08:09 ufobat joined #perl6
08:10 geekosaur m: my $Line = 'a b      c d e  f g'; my ($Blanks, $Unit, $Load, $Active, $Sub, $Description ) = split ( /<:space>+/, $Line, 6); say $Description.perl
08:10 camelia rakudo-moar b51a55: OUTPUT«Too few positionals passed; expected at least 2 arguments but got only 1␤  in block <unit> at <tmp> line 1␤␤»
08:10 geekosaur this is ... uh
08:11 rindolf joined #perl6
08:11 geekosaur doesn't say where the error is, or what is complaining. if nothing else, that is either bug or at least LTA
08:11 geekosaur m: my $Line = 'a b      c d e  f g'; my ($Blanks, $Unit, $Load, $Active, $Sub, $Description ) = split ( /' '+/, $Line, 6); say $Description.perl
08:11 camelia rakudo-moar b51a55: OUTPUT«Too few positionals passed; expected at least 2 arguments but got only 1␤  in block <unit> at <tmp> line 1␤␤»
08:11 geekosaur m: my $Line = 'a b      c d e  f g'; my ($Blanks, $Unit, $Load, $Active, $Sub, $Description ) = split (' ', $Line, 6); say $Description.perl
08:11 camelia rakudo-moar b51a55: OUTPUT«Too few positionals passed; expected at least 2 arguments but got only 1␤  in block <unit> at <tmp> line 1␤␤»
08:11 geekosaur oh
08:12 geekosaur you will have to unlearn gnu stupidity
08:12 geekosaur m: my $Line = 'a b      c d e  f g'; my ($Blanks, $Unit, $Load, $Active, $Sub, $Description ) = split(' ', $Line, 6); say $Description.perl
08:12 camelia rakudo-moar b51a55: OUTPUT«"  c d e  f g"␤»
08:12 ufobat good morning ;D
08:12 geekosaur m: my $Line = 'a b      c d e  f g'; my ($Blanks, $Unit, $Load, $Active, $Sub, $Description ) = split(/<:space>+/, $Line, 6); say $Description.perl
08:12 camelia rakudo-moar b51a55: OUTPUT«"f g"␤»
08:12 cyphase_eviltwin joined #perl6
08:12 geekosaur you are not allowed to put a space between the function and its parameter list
08:13 geekosaur if you do, you are passing the list as a single parameter iirc
08:13 llfourn joined #perl6
08:13 geekosaur (still, that should have been reported better in the error message)
08:14 Todd split ( /<space>+/, $Line, 6);
08:14 Todd Too few positionals passed; expected at least 2 arguments but got only 1
08:14 Todd What is "Too few positionals passed"?
08:15 geekosaur you have passed a single parameter, which is a list consisting of a regex, a scalar variable, and a number
08:15 Todd split ( /<:space>+/, $Line, 6);
08:15 geekosaur you have this foul habit:   function (parameters)
08:15 geekosaur don't do that
08:15 geekosaur it must be:   function(parameters)
08:16 geekosaur or it will be taken as a single parameter which is a list
08:16 Todd https://docs.perl6.org/routine/split
08:16 xinming_ joined #perl6
08:16 rindolf joined #perl6
08:16 Todd lots of () in that.  What should I remove
08:16 geekosaur the space
08:16 geekosaur not the parens
08:17 geekosaur split(...)
08:17 geekosaur not split (...)
08:17 ufobat its split() vs split()
08:17 ufobat oups
08:17 geekosaur they mean different things
08:17 geekosaur do not write a space after the function name
08:17 ufobat (some,thing) <- is a List
08:17 ufobat so split (...)  is split <SomeList>
08:17 Todd I am lost.
08:17 ufobat so youre passing this list as one parameter
08:18 geekosaur do you see the difference between "split()" and "split ()"?
08:18 geekosaur there is a space after the word "split"
08:18 geekosaur *that space* is your error
08:18 Todd the space after the "t" in split?
08:18 geekosaur yes
08:18 ufobat aye
08:18 geekosaur you can't do that in perl 6
08:19 geekosaur because if you do, you are giving split a single list argument instead of 3 different arguments
08:19 Todd YIPPEE!!!  Thank you!
08:19 Todd taking out the space works perfect.
08:20 Todd split( /<:space>+/, $Line, 6 );
08:20 geekosaur this is how perl 6 resolves a conflict in perl 5, where writing a function that takes a list without using parentheses gobbles everything after it
08:20 Todd So in Perl 6, I have the bad habbit of adding a space after the function name.  I will reform!
08:21 geekosaur (so we all got used to writing with parentheses whenever there is a chance of that happening)
08:21 geekosaur perl 6 replaces it with the new behavior, but now you have to be careful about a space between function name and parameters
08:22 Todd Thank you!
08:22 Todd bye bye for now.  you guys are saving my butt
08:31 Todd my $IAm = qx ( whoami );
08:31 Todd needs the space after the qx.  Is that an exception?
08:32 Todd also, how do I get rid of the line feed?  chomp( $IAm )  doesn't work
08:33 DrForr Yes, because otherwise it tries to call 'qx' the function.
08:33 Todd okay
08:34 jonas1 joined #perl6
08:34 Todd I also figured out chomp.  it is $IAm=chomp($IAm)
08:34 Todd The original is not modified as in perl 5
08:34 DrForr Yep, it *is* a different language.
08:35 El_Che DrForr: Do that Sister Language thing again. Play that funcky music
08:35 El_Che :)
08:36 DrForr https://www.youtube.com/watch?v=AoATQO82k-k
08:36 DrForr As you wish.
08:37 Todd P5's subs drive me around the bend.  It is suppose to be a high level languare, but it passes variables to subs in @_.  Can we say "assembly code".  I can't wait to learl Perl 6!
08:38 abraxxa joined #perl6
08:38 DrForr method foo( $x, $opt=1, $str where 3 < * <= 18 ) { ... }
08:41 El_Che Todd: sub signatures should be in core in the next release. For now, use experimental: http://search.cpan.org/~shay/perl-5.24.1/pod/perlsub.pod#Signatures
08:43 Todd wht is different about that tha what I am subbently doing.  I blab away inside the sub's ()
08:44 Todd how do I put a sub inside an if statement?
08:44 Todd if ( not GetServiceStatus ( "CimTrakAppServer.service" ) eq "active" ) {
08:45 Todd an error is not thrown, but the proofing statement inside the sub lets me know it never got called
08:46 bjz joined #perl6
08:47 xtreak joined #perl6
08:47 samcv Todd, sub inside an if statement? calling a sub or declaring one?
08:47 DrForr Better written as 'if GetServiceStatus("...") ne "active { }' IMO :)
08:48 samcv yeah you don't need parens in perl 6
08:48 DrForr Parentheses are even more optional.
08:48 samcv are they optional in perl 5?
08:48 samcv i know they are if they come after something
08:48 samcv say 'blah' if 'foo'
08:49 DrForr They are in perl 5 to a certain extent too, Perl 6 takes that to a new level :)
08:49 samcv Todd, perl 5 sorta has signatures but you have to enable experimental features. apparentnly been around a while. but. dunno why still it is experimental
08:49 Todd the code I am converting uses them.. Don't know if it is optinal or not.  I do know you'd better put a space after the "(" or your get the finger wagged at you
08:49 samcv DrForr, did i hear something about perl 5 able to type signatures? or am i misremembering
08:50 Todd YIPPEE!! the extra paranthsis was the issue
08:50 DrForr Typed signatures? *maybe* Function::Signatures, but when p5 borrowed ~~ they didn't bring the type system with them, and that's what caused its downfall.
08:51 darutoko joined #perl6
08:52 DrForr Todd: Also, check out Perl::ToPerl6 on CPAN. It's a touch code-rotted but it should do the basics.
08:57 Todd Thank you!
08:58 Todd I have been using this guy a lot: https://docs.perl6.org/language/5to6-perlfunc
08:59 DrForr Excellent. I did a bunch of transform operations based pretty closely on that plus my observations.
09:02 wamba joined #perl6
09:03 samcv i ♥ perl6
09:04 samcv i hope you learn to like it too Todd
09:04 DrForr Hmm, can't we color those now? :)
09:04 samcv lol. you mean emoji presentation
09:04 samcv or you mean irc color
09:04 samcv 3♥
09:04 samcv yeah irc
09:04 DrForr emoji, IRC color codes are trivial.
09:05 samcv uhm. lol you mean that presentation about the red heart
09:05 samcv well it wasn't about it, but was mentioned
09:05 samcv i think they mean ♥ emoji + variation selector 17 which means to display it as an emoji and not text
09:05 samcv u: ♥
09:05 unicodable6 samcv, U+2665 BLACK HEART SUIT [So] (♥)
09:05 samcv u: red heart
09:05 unicodable6 samcv, Found nothing!
09:05 samcv u: heart
09:05 unicodable6 samcv, U+2619 REVERSED ROTATED FLORAL HEART BULLET [So] (☙)
09:05 unicodable6 samcv, U+2661 WHITE HEART SUIT [So] (♡)
09:06 unicodable6 samcv, https://gist.github.com/2b904b57bdc2e8ebba646a986a375b13
09:06 samcv looks like there are many colors but not red
09:06 samcv maybe heart decoration is red in emoji presentation
09:07 Todd I already do.  that is why I am bangin my head trying to pick it up as fast as possible!
09:07 samcv :) have you seen learnxinyminutes.com/docs/perl6 ?
09:07 samcv i contributed to some of that, so it is pretty good i think. i mean not perfect. but it's a very good starting point
09:08 samcv i would especially recommend the section on objects and uhm
09:08 samcv exceptions
09:09 samcv i'm rereading it and it seems kind of boring now. but maybe that's because i know it really well now lol
09:10 samcv if you know perl already i'd start with '### Scoping' section there
09:10 samcv and go downward
09:11 Todd thank you . I just bookmarked it!
09:11 dakkar joined #perl6
09:12 Todd whu is this giving me a bad time?
09:12 Todd my @Result = qx ( systemctl restart $Service ).lines;
09:12 Todd Too few arguments.
09:13 Todd with quotes around the variable, i get
09:13 Todd Failed to expand names: Invalid argument
09:13 DrForr qqx, just like q vs qq in perl 5, I believe.
09:14 Todd $Service does have something in it
09:14 llfourn joined #perl6
09:14 sena_kun joined #perl6
09:17 Todd qqx worked.  Is the rule, if I have a variable in qx I need to use qqx?
09:17 jast if you want it expanded, yes
09:17 DrForr If you need to interpolate the name, yep. Like I said, it's the equivalent of q{} vs. qq{} in perl 5.
09:20 jast side note: don't do this if the value of your variable can be influenced by an untrusted user :)
09:21 Todd Bye bye
09:21 jast in fact I'd say don't do it at all, but you're gone so what does it matter what I say ;)
09:23 ribasushi joined #perl6
09:28 xtreak joined #perl6
09:58 samcv ⍨
10:03 xtreak joined #perl6
10:04 code42 joined #perl6
10:06 code42 left #perl6
10:16 llfourn joined #perl6
10:21 bjz_ joined #perl6
10:23 xtreak joined #perl6
10:38 ufobat joined #perl6
10:47 cyphase joined #perl6
11:00 eliasr joined #perl6
11:09 bjarneholen joined #perl6
11:17 llfourn joined #perl6
11:22 Xliff_ joined #perl6
11:22 espadrine joined #perl6
11:22 xtreak joined #perl6
11:35 eliasr joined #perl6
11:45 notbenh joined #perl6
11:50 xtreak joined #perl6
12:04 wamba joined #perl6
12:07 AlexDaniel joined #perl6
12:08 cyphase joined #perl6
12:11 cyphase joined #perl6
12:13 cyphase joined #perl6
12:13 ocbtec joined #perl6
12:19 llfourn joined #perl6
12:27 bjz joined #perl6
12:30 lukaramu joined #perl6
12:50 skids joined #perl6
13:05 ShoaibJahejo joined #perl6
13:05 gdonald joined #perl6
13:15 IOninja So quiet... I guess Perl 6 is so good people no longer have any problems to ask about.
13:16 DrForr Guess so.
13:18 IOninja Sweet. Job well done.
13:19 * IOninja walks around congratulating the audience
13:19 abraxxa we're getting older, rakudo faster...
13:19 ShoaibJahejo joined #perl6
13:19 DrForr . o ( And Leon is geting laaaaaarger )
13:20 llfourn joined #perl6
13:23 ShoaibJahejo joined #perl6
13:26 ShoaibJahejo joined #perl6
13:30 lukiramu joined #perl6
13:31 brrt joined #perl6
13:41 masak I have problems to talk about :)
13:42 masak currently very confused with some scope-related things involving quasis (whee!)
13:44 masak as usual, 007 proves to be an invaluable test bed, but right now it's one that confuzzles the heck out of me
13:44 IOninja Too late! We already concluded Perl 6 is perfect!
13:45 perlpilot masak:  Just hop in your time machine and go to the future and ask yourself what the solution is.
13:45 perlpilot masak: conversely, remember this time and have your future self hop in the time machine and come back to tell you answers
13:48 masak perlpilot: you remind me of something Kent Beck said on Twitter a while ago.
13:48 masak (paraphrasing, because I can't remember it exactly)
13:49 masak "I often find it useful when I need to go back and correct things to ask myself 'what would have been the perfect message from my future self about this problem?'"
13:50 masak I think that kind of thinking has influenced me a bit lately; cf my latest blog post
13:51 ocbtec joined #perl6
13:52 perlpilot Interesting.  Since some post you did long ago, I tend to think of macros in terms of time machines  :)
13:53 [Coke] Whoever added doc test xt/examples-compilation.t - it's been failing for a few days now.
13:54 masak that would be http://strangelyconsistent.org/blog/macros-time-travel-is-hard
13:54 [Coke] (to save you time: Language/concurrency.p6 and Language/haskell-to-p6.p6 have bad examples - test doesn't say where, but the latter is almost certainly from trying to run haskell code in perl 6)
13:55 perlpilot probably so.  I'm not conscious of it any more, it's just part of the "macro fabric" in my brain.  (much like your comments about moving chess pieces)
13:57 perlpilot masak: Also ... I didn't realize it until now, but ... you've effectively done non-invasive brain surgery on me.  :-)
13:59 Actualeyes joined #perl6
14:03 masak I'll take that as a compliment ;)
14:03 masak I'm not as sure that the brain surgery macros have done on *me* has been non-invasive...
14:05 cdg joined #perl6
14:12 cdg_ joined #perl6
14:17 AlexDaniel well, if you had a way to time travel into the future, why would you ever want to go back? :P
14:18 sammers joined #perl6
14:20 IOninja What if the future sucks? :)
14:21 stallix joined #perl6
14:22 llfourn joined #perl6
14:34 AlexDaniel then hold onto your optimism and make another jump into the future
14:34 IOninja ...and get eaten by Morlocks
14:36 kurahaupo joined #perl6
14:37 mspo_ are we talking about futurama?
14:39 IOninja I wasn't
14:39 IOninja https://en.wikipedia.org/wiki/Morlock
14:40 pmurias joined #perl6
14:42 IOninja m: class Foo { our method bar {42} }; say Foo::bar(Foo)
14:42 camelia rakudo-moar b51a55: OUTPUT«42␤»
14:43 IOninja TIL
14:43 IOninja m: class Foo { our method !bar {42} }; say Foo::bar(Foo)
14:43 camelia rakudo-moar b51a55: OUTPUT«42␤»
14:44 Ven joined #perl6
14:45 IOninja m: class Foo { our method !bar($:) {self.^name} }; say Foo::bar(Int)
14:45 camelia rakudo-moar b51a55: OUTPUT«Int␤»
14:45 IOninja :D
14:53 kurahaupo joined #perl6
14:57 sena_kun joined #perl6
15:02 user9 joined #perl6
15:19 eroux joined #perl6
15:23 llfourn joined #perl6
15:29 user9 joined #perl6
15:33 japhb joined #perl6
15:51 IOninja Did you know that README.md is a valid domain name?
15:52 IOninja haha, some developer recruitment website. Smart :)
15:55 Khisanth joined #perl6
16:17 wamba joined #perl6
16:17 lucasb joined #perl6
16:25 llfourn joined #perl6
16:33 ccntrq joined #perl6
16:35 japhb joined #perl6
16:35 lucasb about ticket RT #130787, when you need to bind a pair to a positional parameter, you can type func('a'=>1) or func((a=>1)), because plain a=>1 would be considered a named parameter, right? should this same behavior be honored inside sub-signatures? I guess it should.
16:35 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=130787
16:35 lucasb m: say \('a'=>1) ~~ :($a)
16:35 camelia rakudo-moar cf500e: OUTPUT«True␤»
16:35 lucasb m: say \(['a'=>1]) ~~ :(@a ($a))
16:35 camelia rakudo-moar cf500e: OUTPUT«False␤»
16:37 lucasb m: sub f(@a (:$a)) { $a }; say f(['a'=>10])  # <-- positional parameter 'a'=>10 is getting bound to named parameter :$a (?)
16:37 camelia rakudo-moar cf500e: OUTPUT«10␤»
16:37 jnthn m: say ['a'=>10].Capture.perl
16:37 camelia rakudo-moar cf500e: OUTPUT«\(:a(10))␤»
16:38 jnthn By the point the subisgnature sees it, it's just a Pair inside of an Array
16:39 jnthn Array inherits the Capture coercion from List, which in turn promotes Pair to a named
16:39 lucasb so, there's no way around it? :)
16:39 jnthn Well, not without deciding to break that behavior of Array.Capture, no
16:40 lucasb ok, thanks for the explanation, jnthn
16:41 khw joined #perl6
16:42 gregf_ joined #perl6
16:53 ccntrq joined #perl6
16:55 Mithaldu joined #perl6
16:56 ssotka joined #perl6
17:06 matiaslina joined #perl6
17:14 itaipu joined #perl6
17:24 dwarring joined #perl6
17:26 llfourn joined #perl6
17:43 Geth ¦ evalbot: a9ed3caa2b | (Zoffix Znet)++ | lib/EvalbotExecuter.pm
17:43 Geth ¦ evalbot: Fix incorrect reportation of received signals
17:43 Geth ¦ evalbot: review: https://github.com/perl6/evalbot/commit/a9ed3caa2b
17:44 camelia joined #perl6
17:55 IOninja Hm, looking through https://irclog.perlgeek.de/perl6/search/?nick=camelia&amp;q=signal I don't see any problems with signal reporting :/ Wonder how it worked before...
17:56 timotimo thanks for looking into it :)
18:17 Geth joined #perl6
18:20 ggoebel joined #perl6
18:28 llfourn joined #perl6
18:29 ssotka1 joined #perl6
18:56 timotimo what are those "found duplicate index entry xyz" all about? what do we need to do to fix them? can they give more info than those #i44, #i244, ... lists that i don't know what they refer to?
18:57 itcharlie joined #perl6
19:03 retupmoca joined #perl6
19:16 robertle joined #perl6
19:22 AlexDaniel https://youtu.be/zSNeOj8XeMo?t=4
19:29 robertle joined #perl6
19:29 llfourn joined #perl6
19:30 cibs joined #perl6
19:33 cdg joined #perl6
19:34 cpage_ joined #perl6
19:35 cpage__ joined #perl6
19:39 girafe joined #perl6
19:44 RabidGravy boom
19:47 Woodi hi today :)
19:48 Woodi some bug fixed in Eve Online, possibly interesting. or even scary... from today: https://community.eveonline.com/news/dev-blogs/sleeping-beauty/?utm_source=launcher_motd&amp;utm_medium=launcher&amp;utm_campaign=
19:48 RabidGravy I went to the pub in the week for the first time this year :)
19:51 mspo RabidGravy: congrats for falling off the wagon?
19:52 RabidGravy I wasn't really on the wagon I've just been whacked from commuting :)
19:53 RabidGravy but a recruiter wanted to buy me a beer :)
19:56 bjz joined #perl6
19:57 tbrowder good day, #perl6!
20:01 ssotka joined #perl6
20:02 kyan joined #perl6
20:02 mspo RabidGravy: p6 job?
20:03 mspo I was thinking about writing a blog post: "So you want to write a web framework" just to list out all of the components you need to make
20:04 tbrowder another day of some coding, and, while using a busy when block, i discover calling a sub i need to include the empty parens. i remember that that is mentioned somewhere but i haven't yet found it in control.pod6 or other likely places. i would like to add a note about that in the section on use of the while but want to see the definitive text first.  can
20:04 tbrowder anyone please point to it off the top of their head?
20:05 Tonik joined #perl6
20:13 gfldex m: sub s(\p){ dd p }; s(Empty);
20:13 camelia rakudo-moar a78c73: OUTPUT«Empty␤»
20:14 gfldex tbrowder: ^^^ did you mean Empty?
20:14 IOninja m: sub foo {}; for foo {}
20:14 camelia rakudo-moar a78c73: OUTPUT«5===SORRY!5===␤Function 'foo' needs parens to avoid gobbling block␤at <tmp>:1␤------> 3sub foo {}; for foo {}7⏏5<EOL>␤Missing block (apparently claimed by 'foo')␤at <tmp>:1␤------> 3sub foo {}; for foo {}7⏏5<EOL>␤␤»
20:14 IOninja m: sub foo {}; for foo() {}
20:14 camelia rakudo-moar a78c73: ( no output )
20:14 agentzh joined #perl6
20:16 IOninja m: sub s(\p, \b){ dd [p.WHAT, b] }; s(Empty, 42);
20:16 camelia rakudo-moar a78c73: OUTPUT«[Slip, 42]␤»
20:16 IOninja cool
20:16 IOninja s: &infix:<orelse>
20:16 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob/b0555b1/src/core/operators.pm#L658
20:16 IOninja oh
20:17 IOninja (was thinking tis a way to get rid of Empty heuristic in that op)
20:18 IOninja m: sub s(+a){ dd a[0].WHAT }; s(Empty, 42);
20:18 camelia rakudo-moar a78c73: OUTPUT«Int␤»
20:18 AlexDaniel joined #perl6
20:20 bjz joined #perl6
20:21 agentzh joined #perl6
20:30 llfourn joined #perl6
20:33 bjz joined #perl6
20:33 espadrine joined #perl6
20:36 tbrowder sorry
20:37 skids joined #perl6
20:38 tbrowder m: sub f {say 'f'}; given f {when f &f}}
20:38 camelia rakudo-moar a62882: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub f {say 'f'}; given f {when f &f7⏏5}}␤    expecting any of:␤        block or pointy block␤        postfix␤»
20:39 tony-o mspo++ for that article idea
20:40 tbrowder m: sub f {say 'f'}; given f {when f &f()}}
20:40 camelia rakudo-moar a62882: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub f {say 'f'}; given f {when f &f()7⏏5}}␤    expecting any of:␤        block or pointy block␤        postfix␤»
20:41 tbrowder i'm dumb, one more time
20:41 IOninja Don't think you can use subs with when?
20:42 IOninja m: sub f {say 'f'}; given f {when f() &f}
20:42 camelia rakudo-moar a62882: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub f {say 'f'}; given f {when f() &f7⏏5}␤    expecting any of:␤        block or pointy block␤»
20:42 IOninja m: sub f {say 'f'}; given f {when f() {f}}
20:42 camelia rakudo-moar a62882: OUTPUT«5===SORRY!5===␤Function 'f' needs parens to avoid gobbling block␤at <tmp>:1␤------> 3sub f {say 'f'}; given f {when f() {f}}7⏏5<EOL>␤Missing block (apparently claimed by 'f')␤at <tmp>:1␤------> 3sub f {say 'f'}; given f {when f() {f}…»
20:42 IOninja bah
20:42 IOninja Well, it's the gobbling thing
20:43 tbrowder m: sub f {say 'f'}; given f {when f {&f()}}
20:43 camelia rakudo-moar a62882: OUTPUT«5===SORRY!5===␤Function 'f' needs parens to avoid gobbling block␤at <tmp>:1␤------> 3sub f {say 'f'}; given f {when f {&f()}7⏏5}␤Missing block (apparently claimed by 'f')␤at <tmp>:1␤------> 3sub f {say 'f'}; given f {when f {&f()}7…»
20:43 IOninja parentheses-less sub parses the block as the argument to the sub leaving when/for/anything that wants a block without a block
20:43 TimToady two places, even
20:43 IOninja m: sub f {say 'f'}; given f() {when f() {f}}
20:43 camelia rakudo-moar a62882: OUTPUT«f␤f␤f␤»
20:44 TimToady (f) also works
20:44 IOninja hehe
20:44 perlpilot that would make me think of haskell.
20:44 TimToady or use term:<f>
20:44 tbrowder right, i will put that in docs at the while descrip, i just needed a good ref to good wording (and maybe a reference for more detail)
20:44 IOninja :o
20:44 IOninja Ah
20:45 bjz joined #perl6
20:46 IOninja tbrowder: it's also not just with blocks. `f or 42` for example also needs parens. It parses `or` as a term and tries to call the `or` sub
20:46 IOninja m: sub f { @_.say }; sub or { $^a }; say f or 42
20:46 camelia rakudo-moar a62882: OUTPUT«[42]␤True␤»
20:46 IOninja hehe
20:47 tbrowder ok ok, i give up, just my use case will help
20:48 IOninja tbrowder: and a dozen subs require parents 'cause we catch mistaken uses: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L3284-L3290
20:48 awwaiid joined #perl6
20:49 IOninja Well, I guess only a couple of them are actually callable with no args.
20:49 tbrowder i know you have a good ref for all the gory details, or should i post a doc pr using the crux of replies?
20:49 IOninja ¯\_(ツ)_/¯
20:50 tbrowder ok, i'll wing it...thanks
20:50 IOninja the `f or 42` bit me a couple of times. I was going "wtf are you looking for or sub!!"
20:50 * IOninja relocates
20:51 tbrowder well ya know you're always looking for unplowed ground
20:52 cdg joined #perl6
20:53 cale2 joined #perl6
20:53 cale2 hey all
20:53 yoleaux 04:19Z <samcv> cale2: I use a ZNC bouncer and my client is HexChat
20:53 cale2 if anyone is good with Perl6 testing, I could use help converting PerlKoans to Perl6Koans: https://github.com/WildYorkies/Perl6Koans
20:54 cale2 or rather, if anyone is good with Perl6 packaging. That's the tricky part
21:01 bjz joined #perl6
21:04 robertle joined #perl6
21:06 IOninja I volunteer RabidGravy for the task :)
21:09 cale2 first task is simply to get the same exact thing working with the perl6 executioner
21:09 cale2 That's the part I need help with
21:11 cale2 Test::More is basically the same as Perl6's Test, so that's nice
21:14 perlpilot cale2: you might want to do something wrt "Copyright (c) 2012, Salesforce.com, Inc."
21:16 cale2 perlpilot: I thought it was a bit odd. Apparently SalesForce uses Perl. And they love it so much they used their own name in the copywrite of these Koans...
21:16 cale2 in any case, it says you can do whatever as long as you keep the copyright in the file
21:17 perlpilot no, it says "Redistribution and use in source and binary forms, with or _without_modification_, are permitted provided ..."
21:18 perlpilot oh I can't even read myself  :)
21:18 perlpilot in any case, I if you change the whole thing (which you will end up doing) is it the "same work"?
21:18 bjz joined #perl6
21:19 * perlpilot can't type either
21:20 perlpilot eh ... just ignore me.  My brain is obviously not fully engaged.
21:22 IOninja .oO( it's not stealing if you make enough changes... )
21:23 cale2 I'm gonna suggest we keep that in there regardless of how many changes are made haha
21:23 cale2 I'm not going to jail for perlpilot
21:23 cdg joined #perl6
21:25 cdg joined #perl6
21:26 Geth ¦ doc: eb9a455926 | (Will "Coke" Coleda)++ | xt/examples-compilation.t
21:26 Geth ¦ doc: Allow passing in file names on the command line.
21:26 Geth ¦ doc: review: https://github.com/perl6/doc/commit/eb9a455926
21:26 Geth ¦ doc: 9db61a98b5 | (Will "Coke" Coleda)++ | xt/examples-compilation.t
21:26 Geth ¦ doc: Only have to verify it's compilable.
21:26 Geth ¦ doc:
21:26 Geth ¦ doc: Don't bother actually running the code.
21:26 Geth ¦ doc: review: https://github.com/perl6/doc/commit/9db61a98b5
21:26 Geth ¦ doc: 3363f099b2 | (Will "Coke" Coleda)++ | xt/examples-compilation.t
21:26 Geth ¦ doc: fix typo
21:26 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3363f099b2
21:32 llfourn joined #perl6
21:34 ocbtec joined #perl6
21:40 cdg joined #perl6
21:43 TEttinger joined #perl6
21:58 itcharlie left #perl6
22:06 cdg joined #perl6
22:08 cdg joined #perl6
22:10 bjz joined #perl6
22:20 Ulti is there another copy of nine's fosdem talk?
22:20 Ulti its reported broken
22:24 cdg_ joined #perl6
22:26 cdg_ joined #perl6
22:31 rindolf joined #perl6
22:32 samcv dammit i still can't get proc::async working for this one program. working fine for echo
22:32 samcv and i can run it in terminal fine and type in the input
22:33 samcv err i meant cat
22:33 samcv but yeah ugh
22:34 llfourn joined #perl6
22:34 MasterDuke joined #perl6
22:35 samcv i can't seem to see any of the stdout output
22:36 cale2 samcv: do you have a gist of it? of glot.io link?
22:36 geekosaur is the program still running?
22:36 cale2 ^ if it is, you should probably catch it...
22:36 geekosaur (programs writing to pipes buffer. you can try using stdbuf to alter this)
22:36 samcv https://gist.github.com/d77abc42255b56ca682ce1769ac12d7e
22:36 samcv this is all i'm doing
22:37 samcv and it's my own program. and it was running when i checked ps
22:37 samcv can't even see the printf output that it does on program start
22:37 samcv i should be able to see it due to the tap
22:37 geekosaur yes
22:37 geekosaur and no
22:37 samcv what must I do
22:38 samcv write to stdbuf?
22:38 geekosaur stdbuf --output=0 ./build/bitfield
22:38 samcv how can i change the program to not need it?
22:38 samcv fprintf(stdbuf, or what
22:39 samcv ok that worked geekosaur
22:39 geekosaur setvbuf(stdout, 0, _IONBF 0)
22:39 geekosaur er
22:39 geekosaur setvbuf(stdout, 0, _IONBF, 0)
22:40 geekosaur or equivalently setbuf(stdout, 0)
22:40 geekosaur (the former is more standards-compliant, the latter historical but very widely supported)
22:41 geekosaur both tell the program not to buffer its output (and the stdbuf invocation forces this from outside, via LD_PRELOAD hackery iirc)
22:42 samcv so c programs using printf are going to be bufffered?
22:42 samcv unless you do this?
22:44 geekosaur when writing to anything other than directly to the terminal, yes
22:44 geekosaur basically stdio's fopen does isatty(opened fd) and sets line buffering if true, block buffering if false
22:45 geekosaur because both are faster than unbuffered
22:49 samcv how can i force line buffering?
22:59 geekosaur setvbuf(stdout, 0, _IOLBF, BUFSIZ);
23:08 john51 joined #perl6
23:10 Guest1691 joined #perl6
23:24 ocbtec joined #perl6
23:34 rindolf joined #perl6
23:34 itcharlie joined #perl6
23:35 llfourn joined #perl6
23:37 lep-delete joined #perl6
23:41 Geth ¦ doc: 6c1eeab3bf | (Tom Browder)++ | doc/Language/control.pod6
23:41 Geth ¦ doc: emphasize probs with when
23:41 Geth ¦ doc:
23:41 Geth ¦ doc: please correct as necessary
23:41 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6c1eeab3bf
23:42 bjz joined #perl6
23:43 Geth ¦ doc: c771fa146a | (Tom Browder)++ | doc/Language/control.pod6
23:43 Geth ¦ doc: don't test
23:43 Geth ¦ doc: review: https://github.com/perl6/doc/commit/c771fa146a
23:49 Actualeyes joined #perl6
23:50 [Coke] samcv: ISTR we documented that on the doc site.
23:51 samcv ISTR?
23:52 [Coke] bah. https://docs.perl6.org/type/IO$COLON$COLONHandle#Buffering_terminals but it doesn't actually say how
23:52 samcv should have a link to it on Proc::Async
23:52 [Coke] ... and that seems to indicate the default is buffered. ah well.
23:52 [Coke] ISTR is "I seem to recall"
23:53 geekosaur you also can't control what buffering a program you spawn uses, except via stdbuf *if* the program uses libc + stdio
23:59 bjz joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo