»ö« 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.
00:01 llfourn joined 00:02 zakharyas joined, espadrine left
IOninja Can't tell! The bot won't join in! :) 00:03
00:04 buggable joined, ChanServ sets mode: +v buggable
IOninja Oh, looks like the bot strike is over. 00:04
00:04 huggable joined, ChanServ sets mode: +v huggable, NeuralAnomaly joined, ChanServ sets mode: +v NeuralAnomaly
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 perl6.fail/release/stats for details
IOninja :)
timotimo ah, still a bit left to go, nice 00:05
00:06 llfourn left
BenGoldberg m: 3.WHICH.say; 00:13
camelia rakudo-moar b51a55: OUTPUT«Int|3␤»
00:24 TeamBlast joined
BenGoldberg m: use nqp; 00:28
camelia ( no output )
BenGoldberg m: use nqp; say nqp::boothash()
camelia rakudo-moar b51a55: OUTPUT«{}␤»
BenGoldberg m: use nqp; dd nqp::boothash()
camelia rakudo-moar b51a55: OUTPUT«{}␤»
BenGoldberg m: use nqp; dd nqp::bootint() 00:29
camelia rakudo-moar b51a55: OUTPUT«Int␤»
00:30 zakharyas left 00:32 lucs_ is now known as lucs
timotimo the magic of hllize turns those into "proper" types 00:36
00:40 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 00:48 parisba_ is now known as parisba 01:03 llfourn joined 01:08 llfourn left 01:30 kaare_ joined, eliasr left, kaare__ left 01:42 lizmat joined 01:45 MasterDuke joined 01:57 zacts joined
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 01:57
02:04 llfourn joined 02:09 llfourn left 02:10 skids joined 02:14 Sgeo_ joined
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:15
perl 5 even corrected some of that, before spending a couple decades collecting its own cruft 02:16
02:16 Sgeo left
cale2 geekosaur: comparatively, how do you see perl6? 02:17
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:18
02:21 Beginner_don is now known as beginner_guy
beginner_guy perl6 is a rock. perl6 is an island. but typing .pl6 makes me hurt and cry 02:22
samcv type .p6 :) 02:23
hi beginner_guy
02:25 ssotka left 02:26 atweiden-air joined
beginner_guy hiya! 02:27
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
when i switch to testing with `is`, this is the output
expected: 'Header[Int]<140620794464128>'
got: 'Header[Int]<140620794464088>'
whatever that number is, it is consistently off by 40
cale2 just type .pl or .pm and include use v6 :P 02:30
anyone read the early release of Think Perl 6 yet? 02:31
02:33 Actualeyes left
atweiden-air for now, i'm using a custom `sub infix:cmp` as a workaround: 02:35
github.com/atweiden/finn/commit/e4...0ef46469d6
but i've tried golfing it to no avail, so maybe i'm missing something 02:36
02:37 avalenn left 02:38 avalenn joined
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:40
02:47 ilbot3 left 02:48 ilbot3 joined, ChanServ sets mode: +v ilbot3 02:50 mr-fooba_ left
atweiden-air b2gills: i'll use cmp-ok with custom &sub from now on, thanks 02:51
02:52 kalkin- left 02:53 kalkin- joined
atweiden-air github.com/atweiden/finn/commit/d1...6ef2985282 02:54
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:01
03:02 _Vasyl joined, andrzeju_ joined 03:03 olinkl_ joined, cpage__ joined 03:04 mithaldu__ joined, aindilis` joined, zostay_ joined, Some-body_ joined, w4and0er96_ joined, xfix_ joined, r3m_ joined 03:05 llfourn joined 03:06 Celelibi left, Celelibi_ joined, ugjka left, smash_ joined, obra_ joined, roguelazer_ joined, integral joined, ChoHag_ joined, avarab joined, integral left, integral joined, avarab left, avarab joined, atweiden-air left, xui_nya[m]1 joined, profan_ joined 03:07 ugjka joined, hwu_ joined
cale2 on second thought, this rabbit thing is getting a bit too graphic 03:07
03:07 ssm_ joined, roguelazer left, zostay left, andrewalker left, timeless left, olinkl left, w4and0er96 left, jsimonet left, smash left, ChoHag left, Vasyl left, xui_nya[m] left, mulk[m] left, mithaldu_ left, koki left, integral_ left, ssm left, avar left, obra left, profan left, DarthGandalf left, geekosaur left, aindilis left, cpage left, hwu left, andrzejku left, r3m left, xfix left, cpage__ is now known as cpage, Some-body_ is now known as DarthGandalf, r3m_ is now known as r3m, roguelazer_ is now known as roguelazer, zostay_ is now known as zostay, mithaldu__ is now known as mithaldu_, jsimonet joined 03:08 koki joined, w4and0er96_ is now known as w4and0er96, geekosaur joined, cgfbee left, mulk[m] joined, andrewalker joined, john51 left 03:09 john51 joined, olinkl_ is now known as olinkl, shadowpaste0 joined, cgfbee joined 03:10 llfourn left 03:11 BuildTheRobots left 03:17 BuildTheRobots joined, MasterDuke left 03:19 MasterDuke joined 03:23 faraco joined 03:33 cibs_ is now known as cibs 03:34 nightfrog left 03:36 noganex_ joined 03:38 noganex left
samcv heh 03:39
03:41 mr-foobar joined, nightfrog joined 03:50 agentzh joined 03:53 ssotka joined
cale2 samcv: How do you read IRC? do you use a client? 03:56
I'm using a barebones website
03:57 wamba joined
BenGoldberg Real hackers netcat straight to the irc server ;) 03:57
03:58 xtreak joined
cale2 lol 04:05
04:05 cale2 left 04:07 llfourn joined 04:11 llfourn left
faraco howdy 04:15
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 left, tharkun joined 04:31 Cabanoss- joined 04:35 Cabanossi left, Cabanoss- is now known as Cabanossi 04:48 agentzh left
samcv i'm thinking this should be expanded github.com/perl6/Atom-as-a-Perl6-IDE 04:54
because i want to put info on how to make `git diff` recognize perl 6 classes and other objects
04:57 skids left 05:01 timeless joined 05:03 BenGoldberg left
samcv though it may already sorta do it, i gotta check some things 05:03
05:05 BenGoldberg joined, Tonik joined 05:06 alphah joined 05:08 imcsk8_ left 05:09 llfourn joined 05:13 alphah left, llfourn left 05:14 alphah joined 05:16 imcsk8 joined 05:17 wamba left 05:20 BenGoldberg left
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:22
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:25
you probably want a TWEAK submethod for this (see the end of docs.perl6.org/language/objects#Ob...struction) 05:26
you'll also have to consider how to initialize $!item in a Check 05:28
05:29 khw left
alphah Thank you, I see the issue now, that worked: 05:30
class Check {has $.item}; class Waiter { has $.check = Check.new; method order {say $!check.item}; }; Waiter.new.order
I will review the docs again, I was under the impression that if I defined attribues with $. it will be initialized 05:31
geekosaur no, that just means that an initializer method is created 05:33
which is to say, you can use $.check from outside the class 05:34
05:34 CIAvash joined
geekosaur it does not guarantee initialization in and of itself 05:34
(think: getters and setters)
alphah got it, Appreciate it. 05:37
05:46 alphah left
samcv m: my @array; say @array.defined 05:46
camelia rakudo-moar b51a55: OUTPUT«True␤»
samcv why does this give True :(
are arrays always defined
i have an optional array argument for a routine. i guess i will need to make it a $ sigil?
CIAvash m: my @array; say ?@array 05:49
camelia rakudo-moar b51a55: OUTPUT«False␤»
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:52
basically .defined is not a proxy for .empty 05:53
er `not .empty`
06:10 llfourn joined
samcv i just expected an optional parameter that's an array wouldn't be defined 06:11
if it wasn't supplied
06:15 llfourn left
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),]␤»
samcv and this is odd
i would assume it would copy it, not make an array of arrays
any way to stop it from doing that? 06:17
geekosaur I wouldn't. $s is one item, that happens to be a list
m: my $s = (1,2,5,5); my @array = @$s; say @array.perl
camelia rakudo-moar b51a55: OUTPUT«[1, 2, 5, 5]␤»
samcv ok 06:18
thank you
06:29 girafe left 06:31 wamba joined, zacts left 06:33 zacts joined 06:39 Todd_ joined, faraco left
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:39
06:40 bjz joined
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:41
CIAvash Todd_: docs.perl6.org/language/syntax#Mul...d_comments 06:42
Todd_ that was easy! Thank you! 06:44
06:46 wamba left, curan joined
Todd_ that p5 p5 for loop worked. 06:49
p5 to p6 worked
You guys have a link to p6 patter matching. I am trying to trnaslate a P5 06:51
if ( $x =~ /y/ ) {do something}
06:51 RabidGravy joined
CIAvash Have you tried searching in docs.perl6.org ? 06:54
There are 5to6 docs that can help you docs.perl6.org/language/5to6-nutsh.../_Regexp_) 06:55
Todd_ Yes! I got nowhere!
CIAvash also docs.perl6.org/language/regexes 06:57
you can see a list of those pages on docs.perl6.org/language.html 06:58
samcv Todd_, you want regex?
$x ~~ /blah/
some of the things are different though
Todd_, docs.perl6.org/language/regexes
also welcome to #perl6
06:59 ssotka left
Todd_ Thank you! 06:59
I am trying to fix this:
if ( $Line ~~ m/${ServiceName}⏏/ )
samcv what is ${ } in perl 5 mean to uh
what does that do
in perl 5?
access $ServiceName?
and is there just text in $ServiceName or a regex text string? 07:00
Todd_,
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
Todd_ Let me try without then
samcv you can just do /$variable/
which will do literal text
~~ / 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 Tonik left
samcv also you can do {$blah} 07:02
you can even put code in there if you wanna go crazy, more useful when doing grammars
m: say 'a' ~~ /{say 'hi'}/ 07:03
camelia rakudo-moar b51a55: OUTPUT«hi␤「」␤»
samcv heh
m: say '1' ~~ /{3 - 2}/
camelia rakudo-moar b51a55: OUTPUT«「」␤»
samcv oh well thought that may or may now work
Todd_ What I am after is if "$ServiceName" exists inside $Line, then Bollean true
samcv well it will evaluate to true
m: say '1' ~~ /1/ 07:04
camelia rakudo-moar b51a55: OUTPUT«「1」␤»
samcv m: say so '1' ~~ /1/
camelia rakudo-moar b51a55: OUTPUT«True␤»
samcv you can use so to find out what it would be bool as, or as a method call would be .Bool
you don't have to worry about that if it's in an if statment or somtehing
since it evals as boolean already
Todd_ I just meant do the contents insdie the {}. if {} else {} etc. 07:05
samcv m: my $ServiceName = 'tools'; say 'blahtools' ~~ /$ServiceName/
camelia rakudo-moar b51a55: OUTPUT«「tools」␤»
samcv m: my $ServiceName = 'tools'; if 'blahtools' ~~ /$ServiceName/ { say 'found servicename' }
camelia rakudo-moar b51a55: OUTPUT«found servicename␤»
Todd_ if $Line ~~ /$ServiceName/ 07:07
is no longer giving me a syntax error. Problem. it doesn't work. passes everything.
sub GetServiceStatus ( $ServiceName ) {
my @SystemCtl; 07:08
my $Status;
for @SystemCtl -> $Line {
f $Line ~~ /$ServiceName/ {
print "$Line\n";
}
return $Status;
}
geekosaur can I suggest using a pastebin of some kind? lpaste.net, gist.github.com, dpaste.de, ...
Todd_ I refuse to use grep! 07:09
that is "if $Line". I cut off the "i"
07:11 llfourn joined
Todd_ I am thinking I have the wrong syntax for using a variable inside the // 07:12
what is a pastebin?
07:13 stmuk_ joined
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
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
Todd_ Any idea what I am doing wrong with "if $Line ~~ /$ServiceName/ {}"? 07:15
geekosaur (gist and lpaste offer that last feature)
07:15 stmuk left
moritz Todd_: what's in $Line? What's in $Servicename? 07:16
07:16 llfourn left
Todd_ GetServiceStatus ( "CimTrakAppServer.service" ); 07:17
f $Line ~~ /$ServiceName/ {
for @SystemCtl -> $Line {
@SystemCtl = qx ( systemctl -la ) ;
moritz Todd_: don't copy&paste all
Todd_: if you expect a line to match, what's in that line? 07:18
Todd_ $Line is full of stuff like
moritz NO
not "stuff like"
Todd_ time-sync.target loaded active active System Time Synchronized
moritz copy&paste one *actual* line that you want to match CimTrakAppServer.service
Todd_ if $Line contains "CimTrakAppServer.service" then do {} 07:19
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" }
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>␤ …»
moritz m: my $Line = 'contains CimTrakAppServer.service, raelly'; my $ServiceName = 'CimTrakAppServer.service'; if $Line ~~ /$ServiceName/ { say "found something" }
camelia rakudo-moar b51a55: OUTPUT«found something␤»
moritz Todd_: ^^ see? if the line contains the string, it matches
Todd_: if it doesn't match, one of these variables doesn't contain what you think it does 07:21
Todd_: find out which one
Todd_ Trouble is, it matches EVERYTHING
07:22 bpmedley joined
moritz m: my $Line = 'no such luck, raelly'; my $ServiceName = 'CimTrakAppServer.service'; if $Line ~~ /$ServiceName/ { say "found something" } 07:22
camelia ( no output )
moritz Todd_: not in my test
07:22 bjz left
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
This is what I am trying to do written in bash 07:23
$ systemctl -la | grep -i CimTrakAppServer.service
moritz try this: say $ServiceName.perl;
before the regex match
what does it print?
Todd_ print "$ServiceName\n"; 07:25
gives
CimTrakAppServer.service
moritz that's not what I asked you to print
Todd_ which was what was expected
moritz but if you don't want help, fine
Todd_ oops
print "$ServiceName.perl\n" 07:26
CimTrakAppServer.service.perl
07:26 bjz joined
Todd_ what did that tell you? 07:26
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:27
masak Todd_: `say $ServiceName.perl;` is the statement moritz asked for. not the print statement you used. 07:28
Todd_: there's a certain technique to getting good help. you haven't mastered it yet ;)
Todd_ Oh poop. the array has line feed in it. Maybe my loop is one long line!
masak moritz: what was the term, "help vampire"? 07:29
07:29 bjz left
masak it's not malicious, it's mostly Dunning and Kruger 07:29
moritz irclog.perlgeek.de/perl6/2017-02-15#i_14105627 07:30
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?
Todd_ say $ServiceName.perl;
"CimTrakAppServer.service"
moritz geekosaur: being annoyed that them failing do so so *twice* isn't fair, even though copy&paste exists?
geekosaur mopritz, are you looking for excuses to argue? 07:32
*moritz
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
geekosaur is gradually getting better at recognizing when he's in that kind of state and backing away from the keyboard
masak .oO( and that's how #perl6 turned into #perl )
geekosaur: I know what you mean. 07:33
geekosaur without, y'know, maligning the other person
moritz I can stay away if that's what you want me to do
07:33 moritz left
masak :( 07:34
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:35
so then, what am I doing wrong in this line that doesn't give me an array of line? 07:36
@SystemCtl = qx ( systemctl -la ) ;
what I am erally getting back is a single string.
El_Che /usr/local/pulse/PulseClient.sh: line 413: rpm: command not found 07:37
<-- the ubuntu package of pulse vpn client
Todd_ Perl 5 converted tht to an array of line of text. Do I have to tell perl6 to do that?
El_Che they seems to have outsourced their QA to 3 cats and a pony
arnsholt El_Che: Whee! =)
07:41 xtreak left
Todd_ docs.perl6.org/routine/split 07:41
But I am not sure what I am looking at
I am only finding perl 5 ways of doing it on google 07:43
my @abc = split('',$line);
geekosaur Todd_, what you generally want is .lines
Todd_ what do you mean? 07:44
07:44 xtreak joined
geekosaur @SystemCtl = qx( systemctl -la ).lines ; 07:44
so it splits it into a list by lines
Todd_ YIPPEE!!!! Thank you guys! 07:45
Hopefully, I won't have to pester you guys for a while. 07:47
bye bye
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:48
07:49 brrt joined, Todd_ left 07:50 wamba joined 07:51 brrt left 07:57 Todd joined
Todd I am back. That did not take me too long. 07:57
I am not gettig the difference beteen the perl5 split and perl6 07:58
split ( / +/, $Line, 6)
in p5 eats up all the multiple spaces in the line
in p6, I get 07:59
------> split ( / +⏏/, $Line, 6);
expecting any of: term
geekosaur regexes in perl 6 act like perl 5's /x modifier
Todd what do you mean? 08:00
geekosaur m: say so 'a b' ~~ /<:space>+/ 08:01
camelia rakudo-moar b51a55: OUTPUT«True␤»
geekosaur literal spaces are not significant in regexes normally
m: say so 'a b' ~~ /' '+/ 08:02
camelia rakudo-moar b51a55: OUTPUT«True␤»
geekosaur m: say so 'a b' ~~ /' ' +/
camelia rakudo-moar b51a55: OUTPUT«True␤»
geekosaur so you can format it for readability instead of the usual chunk of incomprehensible glyphs of old-style regexes
also so you can do things more like parsers: you can define your own tokens and match them with angle brackets 08:03
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> + /
camelia rakudo-moar b51a55: OUTPUT«True␤»
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 xtreak left
Todd ( $Blanks, $Unit, $Load, $Active, $Sub, $Description ) = split ( /<:space>+/, $Line, 6); 08:05
what am I doing wrong inside the // ? 08:06
08:06 xtreak joined 08:09 ufobat joined
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 cyphase left
geekosaur this is ... uh 08:10
08:11 rindolf joined
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
m: my $Line = 'a b c d e f g'; my ($Blanks, $Unit, $Load, $Active, $Sub, $Description ) = split ( /' '+/, $Line, 6); say $Description.perl
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␤␤»
geekosaur m: my $Line = 'a b c d e f g'; my ($Blanks, $Unit, $Load, $Active, $Sub, $Description ) = split (' ', $Line, 6); say $Description.perl
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␤␤»
geekosaur oh
you will have to unlearn gnu stupidity 08:12
m: my $Line = 'a b c d e f g'; my ($Blanks, $Unit, $Load, $Active, $Sub, $Description ) = split(' ', $Line, 6); say $Description.perl
camelia rakudo-moar b51a55: OUTPUT«" c d e f g"␤»
ufobat good morning ;D
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
camelia rakudo-moar b51a55: OUTPUT«"f g"␤»
08:12 cyphase_eviltwin joined
geekosaur you are not allowed to put a space between the function and its parameter list 08:12
if you do, you are passing the list as a single parameter iirc 08:13
08:13 llfourn joined
geekosaur (still, that should have been reported better in the error message) 08:13
08:14 rindolf left
Todd split ( /<space>+/, $Line, 6); 08:14
Too few positionals passed; expected at least 2 arguments but got only 1
What is "Too few positionals passed"?
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);
geekosaur you have this foul habit: function (parameters)
don't do that
it must be: function(parameters)
or it will be taken as a single parameter which is a list 08:16
Todd docs.perl6.org/routine/split
08:16 xinming_ joined, rindolf joined
Todd lots of () in that. What should I remove 08:16
geekosaur the space
not the parens
split(...) 08:17
not split (...)
ufobat its split() vs split()
oups
geekosaur they mean different things
do not write a space after the function name
ufobat (some,thing) <- is a List
so split (...) is split <SomeList>
Todd I am lost.
ufobat so youre passing this list as one parameter 08:18
geekosaur do you see the difference between "split()" and "split ()"?
08:18 llfourn left
geekosaur there is a space after the word "split" 08:18
*that space* is your error
Todd the space after the "t" in split?
geekosaur yes
ufobat aye
geekosaur you can't do that in perl 6
because if you do, you are giving split a single list argument instead of 3 different arguments 08:19
Todd YIPPEE!!! Thank you!
taking out the space works perfect.
08:19 xinming left
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
Todd So in Perl 6, I have the bad habbit of adding a space after the function name. I will reform!
geekosaur (so we all got used to writing with parentheses whenever there is a chance of that happening) 08:21
perl 6 replaces it with the new behavior, but now you have to be careful about a space between function name and parameters
Todd Thank you! 08:22
bye bye for now. you guys are saving my butt
my $IAm = qx ( whoami ); 08:31
needs the space after the qx. Is that an exception?
also, how do I get rid of the line feed? chomp( $IAm ) doesn't work 08:32
DrForr Yes, because otherwise it tries to call 'qx' the function. 08:33
Todd okay
08:34 jonas1 joined
Todd I also figured out chomp. it is $IAm=chomp($IAm) 08:34
The original is not modified as in perl 5
DrForr Yep, it *is* a different language.
El_Che DrForr: Do that Sister Language thing again. Play that funcky music 08:35
:)
DrForr www.youtube.com/watch?v=AoATQO82k-k 08:36
As you wish.
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:37
08:38 abraxxa joined
DrForr method foo( $x, $opt=1, $str where 3 < * <= 18 ) { ... } 08:38
El_Che Todd: sub signatures should be in core in the next release. For now, use experimental: search.cpan.org/~shay/perl-5.24.1/p...Signatures 08:41
Todd wht is different about that tha what I am subbently doing. I blab away inside the sub's () 08:43
how do I put a sub inside an if statement? 08:44
if ( not GetServiceStatus ( "CimTrakAppServer.service" ) eq "active" ) {
08:45 xtreak left
Todd an error is not thrown, but the proofing statement inside the sub lets me know it never got called 08:45
08:46 bjz joined 08:47 xtreak joined
samcv Todd, sub inside an if statement? calling a sub or declaring one? 08:47
DrForr Better written as 'if GetServiceStatus("...") ne "active { }' IMO :)
samcv yeah you don't need parens in perl 6 08:48
DrForr Parentheses are even more optional.
samcv are they optional in perl 5?
i know they are if they come after something
say 'blah' if 'foo'
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
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
samcv DrForr, did i hear something about perl 5 able to type signatures? or am i misremembering
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
DrForr Todd: Also, check out Perl::ToPerl6 on CPAN. It's a touch code-rotted but it should do the basics. 08:52
08:57 xtreak left
Todd Thank you! 08:57
I have been using this guy a lot: docs.perl6.org/language/5to6-perlfunc 08:58
DrForr Excellent. I did a bunch of transform operations based pretty closely on that plus my observations. 08:59
09:01 wamba left 09:02 wamba joined
samcv i ♥ perl6 09:03
i hope you learn to like it too Todd 09:04
DrForr Hmm, can't we color those now? :)
samcv lol. you mean emoji presentation
or you mean irc color
3♥
yeah irc
DrForr emoji, IRC color codes are trivial.
samcv uhm. lol you mean that presentation about the red heart 09:05
well it wasn't about it, but was mentioned
i think they mean ♥ emoji + variation selector 17 which means to display it as an emoji and not text
u: ♥
unicodable6 samcv, U+2665 BLACK HEART SUIT [So] (♥)
samcv u: red heart
unicodable6 samcv, Found nothing!
samcv u: heart
unicodable6 samcv, U+2619 REVERSED ROTATED FLORAL HEART BULLET [So] (☙)
samcv, U+2661 WHITE HEART SUIT [So] (♡)
samcv, gist.github.com/2b904b57bdc2e8ebba...986a375b13 09:06
samcv looks like there are many colors but not red
maybe heart decoration is red in emoji presentation
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 ?
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
i would especially recommend the section on objects and uhm 09:08
exceptions
i'm rereading it and it seems kind of boring now. but maybe that's because i know it really well now lol 09:09
if you know perl already i'd start with '### Scoping' section there 09:10
and go downward
Todd thank you . I just bookmarked it! 09:11
09:11 dakkar joined 09:12 andrzeju_ left
Todd whu is this giving me a bad time? 09:12
my @Result = qx ( systemctl restart $Service ).lines;
Too few arguments.
with quotes around the variable, i get 09:13
Failed to expand names: Invalid argument
DrForr qqx, just like q vs qq in perl 5, I believe.
Todd $Service does have something in it 09:14
09:14 llfourn joined, sena_kun joined
Todd qqx worked. Is the rule, if I have a variable in qx I need to use qqx? 09:17
09:17 ribasushi left
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 llfourn left
jast side note: don't do this if the value of your variable can be influenced by an untrusted user :) 09:20
Todd Bye bye 09:21
09:21 Todd left
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:21
09:23 ribasushi joined 09:28 xtreak joined 09:34 TEttinger left
samcv 09:58
09:59 profan_ is now known as profan 10:00 xtreak left 10:03 xtreak joined 10:04 sena_kun left 10:05 code42 joined 10:06 code42 left 10:16 llfourn joined 10:21 bjz_ joined, llfourn left 10:22 xtreak left, bjz left 10:23 xtreak joined, ufobat left 10:24 xtreak left 10:38 ufobat joined 10:43 cyphase_eviltwin left 10:47 cyphase joined 11:00 eliasr joined 11:09 bjarneholen joined, bjarneholen left 11:17 llfourn joined 11:22 Xliff_ joined, espadrine joined, llfourn left, xtreak joined 11:25 Xliff left 11:31 eliasr left 11:35 eliasr joined 11:39 wamba left 11:45 notbenh left, notbenh joined 11:47 xtreak left 11:50 xtreak joined 11:56 xtreak left 11:58 cyphase left 12:04 wamba joined 12:07 AlexDaniel joined 12:08 cyphase joined 12:11 cyphase left, cyphase joined 12:13 cyphase left, cyphase joined, ocbtec joined 12:19 llfourn joined 12:24 llfourn left 12:26 bjz_ left 12:27 bjz joined 12:30 lukaramu joined 12:45 labster left 12:50 skids joined 12:54 bjz left 13:05 ShoaibJahejo joined, ShoaibJahejo left, gdonald left, gdonald joined, gdonald left
IOninja So quiet... I guess Perl 6 is so good people no longer have any problems to ask about. 13:15
DrForr Guess so. 13:16
13:18 CIAvash left
IOninja Sweet. Job well done. 13:18
IOninja walks around congratulating the audience 13:19
abraxxa we're getting older, rakudo faster...
13:19 ShoaibJahejo joined, ShoaibJahejo left
DrForr . o ( And Leon is geting laaaaaarger ) 13:19
13:20 llfourn joined 13:23 ShoaibJahejo joined, ShoaibJahejo left, ocbtec left 13:25 llfourn left 13:26 ShoaibJahejo joined 13:30 lukiramu joined 13:31 brrt joined 13:34 lukaramu left
masak I have problems to talk about :) 13:41
currently very confused with some scope-related things involving quasis (whee!) 13:42
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.
masak: conversely, remember this time and have your future self hop in the time machine and come back to tell you answers
masak perlpilot: you remind me of something Kent Beck said on Twitter a while ago. 13:48
(paraphrasing, because I can't remember it exactly)
"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:49
I think that kind of thinking has influenced me a bit lately; cf my latest blog post 13:50
13:51 ocbtec joined
perlpilot Interesting. Since some post you did long ago, I tend to think of macros in terms of time machines :) 13:52
[Coke] Whoever added doc test xt/examples-compilation.t - it's been failing for a few days now. 13:53
masak that would be strangelyconsistent.org/blog/macros...el-is-hard 13:54
13:54 curan left
[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:54
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:55
masak: Also ... I didn't realize it until now, but ... you've effectively done non-invasive brain surgery on me. :-) 13:57
13:59 Actualeyes joined
masak I'll take that as a compliment ;) 14:03
I'm not as sure that the brain surgery macros have done on *me* has been non-invasive...
14:05 cdg joined, sammers left 14:12 cdg_ joined 14:16 cdg left
AlexDaniel well, if you had a way to time travel into the future, why would you ever want to go back? :P 14:17
14:18 sammers joined
IOninja What if the future sucks? :) 14:20
14:21 stallix joined 14:22 llfourn joined 14:27 llfourn left 14:28 skids left
AlexDaniel then hold onto your optimism and make another jump into the future 14:34
14:34 wamba left
IOninja ...and get eaten by Morlocks 14:34
14:36 kurahaupo joined
mspo_ are we talking about futurama? 14:37
14:38 mspo_ is now known as mspo
IOninja I wasn't 14:39
en.wikipedia.org/wiki/Morlock
14:40 pmurias joined
IOninja m: class Foo { our method bar {42} }; say Foo::bar(Foo) 14:42
camelia rakudo-moar b51a55: OUTPUT«42␤»
IOninja TIL 14:43
m: class Foo { our method !bar {42} }; say Foo::bar(Foo)
camelia rakudo-moar b51a55: OUTPUT«42␤»
14:44 Ven joined
IOninja m: class Foo { our method !bar($:) {self.^name} }; say Foo::bar(Int) 14:45
camelia rakudo-moar b51a55: OUTPUT«Int␤»
IOninja :D
14:47 jonas1 left 14:49 kurahaupo left 14:53 kurahaupo joined 14:57 sena_kun joined 15:01 user9 left 15:02 user9 joined, user9 left 15:10 eroux left 15:16 Celelibi_ is now known as Celelibi 15:19 eroux joined 15:23 llfourn joined 15:25 Ven left 15:29 llfourn left, user9 joined 15:32 japhb left 15:33 japhb joined 15:36 stallix left 15:43 Khisanth left 15:45 brrt left
IOninja Did you know that README.md is a valid domain name? 15:51
haha, some developer recruitment website. Smart :) 15:52
15:55 Khisanth joined 16:17 wamba joined, lucasb joined 16:25 llfourn joined 16:30 llfourn left 16:31 ccntrq left 16:33 japhb left, ccntrq joined 16:35 japhb joined
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: rt.perl.org/rt3//Public/Bug/Displa...?id=130787
lucasb m: say \('a'=>1) ~~ :($a)
camelia rakudo-moar cf500e: OUTPUT«True␤»
lucasb m: say \(['a'=>1]) ~~ :(@a ($a))
camelia rakudo-moar cf500e: OUTPUT«False␤»
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␤»
jnthn m: say ['a'=>10].Capture.perl
camelia rakudo-moar cf500e: OUTPUT«\(:a(10))␤»
jnthn By the point the subisgnature sees it, it's just a Pair inside of an Array 16:38
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? :)
jnthn Well, not without deciding to break that behavior of Array.Capture, no
lucasb ok, thanks for the explanation, jnthn 16:40
16:41 khw joined 16:42 gregf_ joined 16:47 Mithaldu left 16:52 ccntrq left 16:53 sena_kun left 16:54 ccntrq joined 16:55 Mithaldu joined 16:56 ssotka joined 17:06 matiaslina joined 17:14 itaipu joined 17:21 gfldex_ is now known as gfldex 17:24 dwarring joined 17:26 llfourn joined 17:32 llfourn left 17:33 cpage_ left 17:36 dakkar left 17:40 MasterDuke left
Geth evalbot: a9ed3caa2b | (Zoffix Znet)++ | lib/EvalbotExecuter.pm
Fix incorrect reportation of received signals
17:43
17:44 camelia left, camelia joined 17:45 ChanServ sets mode: +v camelia 17:48 Actualeyes left 17:49 lucasb left
IOninja Hm, looking through irclog.perlgeek.de/perl6/search/?n...p;q=signal I don't see any problems with signal reporting :/ Wonder how it worked before... 17:55
timotimo thanks for looking into it :) 17:56
17:57 awwaiid left 17:59 matiaslina left 18:06 ggoebel left 18:11 Geth left 18:17 Geth joined, ChanServ sets mode: +v Geth 18:20 ggoebel joined 18:23 ufobat left 18:28 llfourn joined 18:29 ssotka left, ssotka1 joined 18:32 llfourn left
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:56
18:57 itcharlie joined 19:03 retupmoca joined 19:10 eliasr left 19:13 darutoko left 19:16 robertle joined
AlexDaniel youtu.be/zSNeOj8XeMo?t=4 19:22
19:28 ssotka1 left, cibs left, robertle left 19:29 robertle joined, llfourn joined 19:30 cibs joined 19:33 cdg joined 19:34 llfourn left, cpage_ joined 19:35 cpage__ joined 19:36 cdg_ left 19:38 cdg left, cpage_ left, cpage__ is now known as cpage_ 19:39 girafe joined
RabidGravy boom 19:44
Woodi hi today :) 19:47
some bug fixed in Eve Online, possibly interesting. or even scary... from today: community.eveonline.com/news/dev-b..._campaign= 19:48
RabidGravy I went to the pub in the week for the first time this year :)
19:49 espadrine left 19:50 kyan left
mspo RabidGravy: congrats for falling off the wagon? 19:51
RabidGravy I wasn't really on the wagon I've just been whacked from commuting :) 19:52
but a recruiter wanted to buy me a beer :) 19:53
19:56 bjz joined
tbrowder good day, #perl6! 19:57
20:01 ssotka joined 20:02 kyan joined
mspo RabidGravy: p6 job? 20:02
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:03
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
anyone please point to it off the top of their head?
20:05 Tonik joined 20:06 AlexDaniel left 20:11 bjz left
gfldex m: sub s(\p){ dd p }; s(Empty); 20:13
camelia rakudo-moar a78c73: OUTPUT«Empty␤»
gfldex tbrowder: ^^^ did you mean Empty? 20:14
IOninja m: sub foo {}; for foo {}
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>␤␤»
IOninja m: sub foo {}; for foo() {}
camelia ( no output )
20:14 agentzh joined
IOninja m: sub s(\p, \b){ dd [p.WHAT, b] }; s(Empty, 42); 20:16
camelia rakudo-moar a78c73: OUTPUT«[Slip, 42]␤»
IOninja cool
s: &infix:<orelse>
SourceBaby IOninja, Sauce is at github.com/rakudo/rakudo/blob/b055...rs.pm#L658
IOninja oh
(was thinking tis a way to get rid of Empty heuristic in that op) 20:17
m: sub s(+a){ dd a[0].WHAT }; s(Empty, 42); 20:18
camelia rakudo-moar a78c73: OUTPUT«Int␤»
20:18 AlexDaniel joined, agentzh left 20:20 bjz joined 20:21 agentzh joined 20:30 llfourn joined 20:31 bjz left 20:33 bjz joined, espadrine joined 20:35 llfourn left
tbrowder sorry 20:36
20:37 skids joined
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␤»
tony-o mspo++ for that article idea 20:39
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␤»
tbrowder i'm dumb, one more time 20:41
20:41 bjz left
IOninja Don't think you can use subs with when? 20:41
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␤»
IOninja m: sub f {say 'f'}; given f {when f() {f}}
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}…»
IOninja bah
Well, it's the gobbling thing
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…»
IOninja parentheses-less sub parses the block as the argument to the sub leaving when/for/anything that wants a block without a block
TimToady two places, even
IOninja m: sub f {say 'f'}; given f() {when f() {f}}
camelia rakudo-moar a62882: OUTPUT«f␤f␤f␤»
TimToady (f) also works 20:44
IOninja hehe
perlpilot that would make me think of haskell.
TimToady or use term:<f>
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)
IOninja :o
Ah 20:45
20:45 bjz joined
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
m: sub f { @_.say }; sub or { $^a }; say f or 42
camelia rakudo-moar a62882: OUTPUT«[42]␤True␤»
IOninja hehe
tbrowder ok ok, i give up, just my use case will help 20:47
IOninja tbrowder: and a dozen subs require parents 'cause we catch mistaken uses: github.com/rakudo/rakudo/blob/nom/...3284-L3290 20:48
20:48 awwaiid joined
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?
IOninja ¯\_(ツ)_/¯
20:50 Tonik left
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!!"
IOninja relocates
tbrowder well ya know you're always looking for unplowed ground 20:51
20:52 cdg joined 20:53 cale2 joined
cale2 hey all 20:53
yoleaux 04:19Z <samcv> cale2: I use a ZNC bouncer and my client is HexChat
cale2 if anyone is good with Perl6 testing, I could use help converting PerlKoans to Perl6Koans: github.com/WildYorkies/Perl6Koans 20:54
or rather, if anyone is good with Perl6 packaging. That's the tricky part
20:56 bjz left 20:57 robertle left, itaipu left 21:01 bjz joined 21:04 robertle joined 21:05 cdg left
IOninja I volunteer RabidGravy for the task :) 21:06
cale2 first task is simply to get the same exact thing working with the perl6 executioner 21:09
That's the part I need help with
21:11 bjz left
cale2 Test::More is basically the same as Perl6's Test, so that's nice 21:11
21:13 ocbtec left
perlpilot cale2: you might want to do something wrt "Copyright (c) 2012, Salesforce.com, Inc." 21:14
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
in any case, it says you can do whatever as long as you keep the copyright in the file
perlpilot no, it says "Redistribution and use in source and binary forms, with or _without_modification_, are permitted provided ..." 21:17
oh I can't even read myself :) 21:18
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
perlpilot can't type either 21:19
eh ... just ignore me. My brain is obviously not fully engaged. 21:20
IOninja
.oO( it's not stealing if you make enough changes... )
21:22
cale2 I'm gonna suggest we keep that in there regardless of how many changes are made haha 21:23
I'm not going to jail for perlpilot
21:23 cdg joined 21:24 cdg left 21:25 cdg joined, bjz left
Geth doc: eb9a455926 | (Will "Coke" Coleda)++ | xt/examples-compilation.t
Allow passing in file names on the command line.
21:26
doc: 9db61a98b5 | (Will "Coke" Coleda)++ | xt/examples-compilation.t
Only have to verify it's compilable.

Don't bother actually running the code.
doc: 3363f099b2 | (Will "Coke" Coleda)++ | xt/examples-compilation.t
fix typo
21:32 llfourn joined 21:34 ocbtec joined 21:38 llfourn left 21:40 cdg left, cdg joined 21:43 TEttinger joined 21:52 gregf_ left 21:54 eroux left 21:58 itcharlie left 21:59 zacts left 22:02 wamba left 22:06 cdg left, cdg joined 22:07 cdg left 22:08 cdg joined 22:09 RabidGravy left 22:10 bjz joined 22:14 rindolf left
Ulti is there another copy of nine's fosdem talk? 22:20
its reported broken
22:24 cdg_ joined 22:25 cdg_ left, kst` is now known as kst 22:26 cdg_ joined 22:27 cdg left, kurahaupo left 22:31 rindolf joined
samcv dammit i still can't get proc::async working for this one program. working fine for echo 22:32
and i can run it in terminal fine and type in the input
err i meant cat 22:33
but yeah ugh
22:34 llfourn joined, MasterDuke joined
samcv i can't seem to see any of the stdout output 22:35
cale2 samcv: do you have a gist of it? of glot.io link? 22:36
geekosaur is the program still running?
cale2 ^ if it is, you should probably catch it...
geekosaur (programs writing to pipes buffer. you can try using stdbuf to alter this)
samcv gist.github.com/d77abc42255b56ca68...769ac12d7e
this is all i'm doing
and it's my own program. and it was running when i checked ps 22:37
can't even see the printf output that it does on program start
i should be able to see it due to the tap
geekosaur yes
and no
samcv what must I do
write to stdbuf? 22:38
geekosaur stdbuf --output=0 ./build/bitfield
samcv how can i change the program to not need it?
fprintf(stdbuf, or what
22:39 llfourn left
samcv ok that worked geekosaur 22:39
geekosaur setvbuf(stdout, 0, _IONBF 0)
er
setvbuf(stdout, 0, _IONBF, 0)
or equivalently setbuf(stdout, 0) 22:40
(the former is more standards-compliant, the latter historical but very widely supported)
both tell the program not to buffer its output (and the stdbuf invocation forces this from outside, via LD_PRELOAD hackery iirc) 22:41
samcv so c programs using printf are going to be bufffered? 22:42
unless you do this?
geekosaur when writing to anything other than directly to the terminal, yes 22:44
basically stdio's fopen does isatty(opened fd) and sets line buffering if true, block buffering if false
because both are faster than unbuffered 22:45
22:48 cale2 left
samcv how can i force line buffering? 22:49
22:52 girafe left
geekosaur setvbuf(stdout, 0, _IOLBF, BUFSIZ); 22:59
23:02 john51 left 23:04 lukiramu left 23:09 john51 joined 23:10 Guest1691 joined 23:15 rindolf left 23:18 Guest1691 left 23:21 retupmoca left 23:24 ocbtec left, ocbtec joined 23:25 bjz left 23:34 rindolf joined, itcharlie joined 23:35 lep_ left, llfourn joined 23:37 lep-delete joined 23:40 llfourn left
Geth doc: 6c1eeab3bf | (Tom Browder)++ | doc/Language/control.pod6
emphasize probs with when

please correct as necessary
23:41
23:42 bjz joined
Geth doc: c771fa146a | (Tom Browder)++ | doc/Language/control.pod6
don't test
23:43
23:44 cdg_ left 23:49 Actualeyes joined
[Coke] samcv: ISTR we documented that on the doc site. 23:50
samcv ISTR? 23:51
[Coke] bah. docs.perl6.org/type/IO$COLON$COLON..._terminals but it doesn't actually say how 23:52
samcv should have a link to it on Proc::Async
[Coke] ... and that seems to indicate the default is buffered. ah well.
ISTR is "I seem to recall"
geekosaur you also can't control what buffering a program you spawn uses, except via stdbuf *if* the program uses libc + stdio 23:53
23:57 bjz left 23:58 pmurias left 23:59 bjz joined