»ö« 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:06 rindolf left 00:08 itaylor57 joined 00:15 natrys left 00:21 _Kaiepi left 00:22 Actualeyes left 00:24 comborico1611 joined 00:27 Kaiepi joined 00:31 Kaiepi left 00:32 Kaiepi joined 00:38 Kaiepi left, Kaiepi joined
comborico1611 Can someone check out a little program from Think Perl6. 00:56
?
I use slightly unconventional style. But I've double-checked the code, and I'm getting a bazaar output. 00:57
timotimo feel free to upload it and send us the link
comborico1611 You mean on Github?
Hmm. I'll see if I can figure it out realquick.
Thanks! 00:58
timotimo you can just gist it
gist.github.com
doesn't even need a github account
00:59 mniip left 01:00 astj joined
comborico1611 Okay, thanks! 01:01
timotimo if you paste the link with "m: " in front on the channel, camelia will pull the code and run it for us
comborico1611 That's pretty crazy. 01:03
m: gist.github.com/clint-who/e9ce11b4...5edf1ea8f2
camelia (Any)
(Any)
(Any)
(Any)
(Any)
(Any)
(Any)
(Any)
(Any)
(Any)
(Any)
comborico1611 Yup. Same output as my end.
It is suppose to be a picture frame drawing.
timotimo you're calling print-grid before any of the variables have been assigned to 01:06
so you're getting the default value for all of them
comborico1611 Hmm. I didn't think that was an issue. 01:07
timotimo since those are definitions, you may want to use "constant" instead of "my" here
that makes them evaluated at compile time, so they'll have their value immediately
comborico1611 It's just a little sample problem. I just like to keep the "fluff" under "Definitions"
timotimo then you can have the program begin like:
comborico1611 Hmm. Interesting.
timotimo sub MAIN { print-grid( ); }
because the MAIN sub is called for you after the program's body has been run, so all the variables will have their values already 01:08
you can directly edit the gist on the site and put the link in here again to run it a second time 01:09
comborico1611 I see. I learn first on C++, so I think most in that way. 01:14
Let me see if I can find the part in the book that gave me the impression that order of execution wasn't an issue.
01:14 mniip joined, cdg joined
comborico1611 Here it is, "You don't have to create a subroutine before you can run it; the function definition may come after its call:" Is this correct? 01:14
01:14 unicodable6 left, benchable6 left, bloatable6 left, reportable6 left, committable6 left, quotable6 left, jferrero left, huf left, huf joined
geekosaur strictly true. it says nothing about what's *used by* that subroutine though 01:14
01:14 cdg left 01:15 jferrero joined
comborico1611 Something is going over my head. MAIN is main( ), right? 01:15
01:16 statisfiable6 left, nativecallable6 left, releasable6 left, nativecallable6 joined, statisfiable6 joined, releasable6 joined, ChanServ sets mode: +v releasable6
TimToady in C/C++ main() s the first (user-defined) thing that is called; in P6, it runs the whole program, then calls MAIN 01:16
geekosaur no, it is MAIN
like anbything elkse that is auto-called
01:17 unicodable6 joined, ChanServ sets mode: +v unicodable6, committable6 joined, ChanServ sets mode: +v committable6, quotable6 joined, ChanServ sets mode: +v quotable6
comborico1611 I think because the variables are important to the subroutine, therefore they must be declared first. The author is speaking strictly of subroutine calls and their definitions. 01:17
So in P6, main( ) is out of the user's defining, and calls MAIN? 01:18
Regardless, of the MAIN issue. I do believe I understand the main issue. 01:19
TimToady m: constant c = say "constant"; ENTER say "ENTER"; LEAVE say "LEAVE"; say "normal code"; sub MAIN() { say "MAIN" } 01:20
camelia constant
ENTER
normal code
MAIN
LEAVE
geekosaur in perl 6, main() would be a normal user-defined function 01:21
01:21 dct left
comborico1611 Oh no, not the codal explanation again. Hahaha. These tend to lead to more confusion. 01:21
geekosaur *anything* that is called automatically by perl 6 has an all-uppercase name.
comborico1611 OH! I see.
geekosaur this includes MAIN(), which is modeled after the way C/C++/Java use main() 01:22
comborico1611 m: gist.github.com/clint-who/e9ce11b4...5edf1ea8f2 01:23
camelia + - - - - + - - - - +
| | |
| | |
| | |
| | |
+ - - - - + - - - - +
| | |
| | |
| | |
| | |
+ - - - - +…
01:24 kerframil left
comborico1611 Well, it works in my terminal. 01:25
TimToady your terminal knows what a newline is :)
comborico1611 I see. Thank you. 01:26
geekosaur so does mine :)
(IRC text handler that inserts an actual newline after the \U+2422) 01:27
TimToady lucky you
01:27 Actualeyes joined
geekosaur and, the actual problem here is that initialization of variables is done at runtime at the script location. so at runtime, it calls print-grid, then *afterward* runs the variable initializations 01:28
running through the script in order
01:28 kerframil joined
comborico1611 So, why is it printing two window-frames? And why is the 2nd one slightly longer on the right side? 01:30
I definitely prefer my code against the author's. lol 01:32
I do see how his is more advanced in capturing and building elements, whereas mine is crap that will only work on simple entries.
Oh. My comment's aren't blocking. #begin #end? Hmm. 01:34
01:36 markong left
comborico1611 Alright guys. I'm off to rest. Thanks for the help Perl6 community! 01:38
01:38 comborico1611 left 01:43 cdg joined 01:47 troys_ is now known as troys 01:48 cdg left 01:49 cdg joined 02:02 bdmatatu joined 02:04 silug left
bdmatatu I'm seeing this warning that I don't understand: git.io/vNejj 02:06
Is this an issue in my code or would this be something in rakudo? 02:07
buggable New CPAN upload: App-Assixt-0.1.0.tar.gz by TYIL cpan.metacpan.org/authors/id/T/TY/...1.0.tar.gz 02:08
02:12 kerframil left 02:18 Zoffix joined
Zoffix bdmatatu: that's a deprecation warning. Looks like it's missing the stuff that it's the ":buffer" argument that's deprecated. You need to use ":out-buffer" 02:18
bdmatatu Thanks zoffix -- I was confused since it references src/core/io_operators.pm 02:19
Zoffix Yeah, I think I tested it printed right location only with the method call and forgot about &open. My bad. 02:22
bdmatatu Okay...so somewhere in my code (or its dependencies) there must be a call to &open that is sending :buffer instead of :out-buffer..? 02:23
tyil isn't zef supposed to show a list of the deps it couldnt find here: travis-ci.org/scriptkitties/perl6-...1237#L1317 02:24
Zoffix bdmatatu: yeah
bdmatatu got it, thanks
Zoffix Filed an issue to improve our deprecations as R#1362
synopsebot R#1362 [open]: github.com/rakudo/rakudo/issues/1362 Make Deprecations skip core locations by default
bdmatatu Great 02:26
Zoffix tyil: it should but sometimes it doesn't. When that happened to me, I installed a couple of modules separately and it worked. My wild guess is it's failing to detect deps that are being installed as part of the command or something
Last time it happend it was Cro and IRC::Client that I installed separately and then the rest got installed just fine
tyil if I install Dist::Helper first, the rest installs with `install --deps-only .` 02:28
the only diff from Dist::Helper and the rest is that Dist::Helper is recently uploaded
(tested installs locally after removing ~/.perl6) 02:29
02:30 bdmatatu left 02:33 Zoffix left 02:46 ilbot3 left 02:49 Summertime left 02:50 pilne left 02:51 cdg left 02:57 ilbot3 joined, ChanServ sets mode: +v ilbot3, lookatme left 02:59 troys is now known as troys_ 03:03 cdg joined 03:06 lookatme joined 03:07 cdg_ joined 03:08 cdg left, cdg joined 03:12 cdg_ left 03:13 cdg left 03:26 Sgeo_ left 03:35 xcm left 03:36 xcm joined 03:38 Sgeo joined 03:46 cibs left 03:49 vichib joined 03:57 jeromelanteri joined 03:59 Actualeyes left 04:15 MasterDuke left 04:31 kerframil joined 04:46 cdg joined 04:48 piojo left 04:50 Cabanossi left 04:51 Cabanoss- joined, piojo joined, Cabanoss- is now known as Cabanossi 04:52 piojo left 04:55 zacts left, piojo joined 05:02 eliasr left 05:06 cdg left 05:28 incredible_ left, Kaiepi left 05:29 Kaiepi joined 05:37 cdg joined 05:41 piojo left, cdg_ joined, cdg left 05:46 cdg_ left, cdg joined 05:50 cdg left 05:55 Actualeyes joined 05:59 cdg joined 06:03 cdg left 06:08 troys_ is now known as troys 06:16 kerframil left 06:23 troys left 06:26 khw left 06:27 cibs joined 06:35 hylcn joined 06:49 hylcn left 07:02 Kaiepi left, Kaiepi joined 07:04 Kaiepi left, Kaiepi joined 07:05 espadrine left 07:17 darutoko joined 07:27 lowbro joined, lowbro left, lowbro joined 07:54 xcm left 07:55 xcm joined 08:01 domidumont joined 08:02 abraxxa joined 08:04 someuser_ joined 08:07 domidumont left 08:08 domidumont joined 08:19 rindolf joined 08:20 zakharyas joined 08:23 andrzejku left 08:24 xcm left 08:25 xcm joined
Geth doc/master: 4 commits pushed by (Luca Ferrari)++ 08:44
08:46 AlexDaniel left 08:57 scimon joined, geekosaur left 08:58 geekosaur joined 09:01 geekosaur left 09:02 rindolf left 09:03 geekosaur joined 09:11 rindolf joined 09:14 sumdoc joined
sumdoc mybinder.org/ looks exciting project 09:15
I have written how we can use it here: sumdoc.wordpress.com/2018/01/04/us...in-binder/
09:15 wamba joined
lizmat sumdoc++ 09:17
09:18 cdg joined 09:23 cdg left 09:28 cdg joined 09:32 cdg left 09:37 rindolf left 09:52 scovit joined
El_Che sumdoc: we have a related talk at FOSDEM this year: fosdem.org/2018/schedule/event/perl6_jupyter/ 09:56
sumdoc El_Che Aye good to know!! 09:59
10:02 fluca1978 joined 10:03 Actualeyes left
Geth doc/master: 5 commits pushed by (Luca Ferrari)++ 10:04
10:08 scovit left 10:11 wamba left
tyil so I added some dd calls in Zef::Client to figure out why its failing to resolve all deps, but has no unresolved deps 10:16
it seems theres 12 entries in @needed, 11 entries in @prereq-candidates 10:17
which makes it fail the dependency resolve
but the grep call on @needed (whose output is stored in @not-found) returns an empty list 10:18
and it tries to output the @not-found list with the error
10:20 S007 joined
sumdoc If I try to execute this code in Perl 6 notebook `for 1..6 {say "Hello"}` it shows weird output. 10:27
DrForr What "perl6 notebook" is this? 10:28
sumdoc This is what output I get imgur.com/XOyJLmH
DrForr: This one sumdoc.wordpress.com/2018/01/04/us...in-binder/ 10:29
DrForr Never tried that. Looks though like there might be some wacky side effects from capturing Perl output using Python. 10:32
sumdoc DrForr: OK then I will file an issue with Brian Duggan. May be he will fix it then github.com/bduggan/p6-jupyter-kernel 10:35
It could be issue with the kernel then 10:36
DrForr That's all I can suggest, not having used it. It's interesting that there appears to be one 'hello' then the first line of output, followed by another 'hello' and 2 lines of output, and so on. 10:38
10:43 cpage joined
sumdoc DrForr: OK filed an issue github.com/bduggan/p6-jupyter-kernel/issues/28 Lets see 10:44
10:50 sumdoc left
DrForr Good luck. And wow, that site's got a lot of flashy stuff. 10:54
11:05 cdg_ joined 11:10 cdg_ left 11:15 cdg_ joined 11:16 wamba joined 11:19 cdg_ left 11:20 Kaffe joined 11:21 domidumont left, domidumont joined 11:35 vichib left 11:42 wamba left 11:43 wamba joined 11:46 markong joined 11:53 cschwenz joined
Ulti if you do print "Hello" in the jupyter notebook it gives you more clues 11:57
its concatenating the output per iteration for some reason
and storing it as a list too 11:58
probably a relatively simple bug in the kernel somewhere
oh sumdoc isnt here
I'll take a look later since I've been over this code before 11:59
12:02 reportable6 joined, ChanServ sets mode: +v reportable6
DrForr Yeah, I pointed that out as wel, looked like it was a good way to track down the problem. 12:03
In other news I'm the closing act for FOSDEM Perl room. No pressure :) 12:05
Ulti is fosdem the one that has good or really really bad video recording? 12:07
if its the good one Ill make sure to check out your talk
DrForr That just described about half the conventions I've been to :) But they've got that rep, yes.
12:08 manchicken joined
Ulti I've used audacity to clean up the audio on some P6 talks just so I could listen to them 12:09
:<
DrForr Well, having been dragooned into volunteering for FOSDEM audio a few times I'm amazed anything gets out at al, but it's *not* anything to do with the people, it's amazingly hodgepodge equipment. 12:11
Which isn't a great surprise, given budgets.
Ulti a cheap bluetooth mic on the speaker and a smartphone would be better than most of what I've seen.... it has to be a hodgepodge of 90s era "pro" equipment thats now far worse than any consumer grade stuff 12:13
DrForr Pretty much.
Ulti sounds like ambient mic on a dedicated camera at the back of the room
with someone fiddling with a coin on the same desk the camera is resting on 12:14
DrForr Yep. I think they miked the speakers last year but the audio went walkabout.
Ulti :Z
maybe we can have a whip around? 12:15
DrForr Better than a reacharound :)
Ulti hah 12:16
12:20 manchicken left 12:24 Kaffe_ joined 12:25 MasterDuke joined 12:26 Kaffe_ left 12:36 manchicken joined 12:53 zakharyas left, cschwenz left 12:55 cdg_ joined 12:56 manchicken left 12:59 cdg_ left 13:01 manchicken joined 13:04 cdg_ joined 13:07 wamba left 13:09 cdg_ left 13:15 wamba joined 13:23 wamba left 13:26 cdg_ joined 13:31 cdg_ left 13:34 Actualeyes joined 13:37 fluca1978 left 13:40 rindolf joined 13:41 mniip left 13:44 mniip joined 13:45 cdg_ joined 13:50 cdg__ joined, cdg_ left 13:53 cdg_ joined 13:54 cdg__ left 13:56 jeromelanteri left 13:57 cdg_ left 13:58 someuser1 joined 14:00 someuser_ left 14:02 zakharyas joined 14:08 cdg_ joined 14:09 cdg__ joined 14:12 cdg_ left 14:13 cdg__ left 14:14 cdg_ joined 14:15 cdg__ joined 14:18 cdg_ left 14:20 cdg__ left, cdg_ joined, domidumont left 14:22 xinming_ left 14:23 sumdoc joined
sumdoc rakudo: say "hi"; 42; 14:23
camelia WARNINGS for <tmp>:
hi
Useless use of constant integer 42 in sink context (line 1)
14:23 xinming joined
sumdoc 'rakudo: say "hi"; 42;' 14:24
14:24 cdg_ left
sumdoc rakudo: 'say "hi"; 42;' 14:24
camelia WARNINGS for <tmp>:
Useless use of constant string "say \"hi\"; 42;" in sink context (line 1)
sumdoc camelia p6: say "hi"; 42; 14:25
camelia WARNINGS for <tmp>:
hi
Useless use of constant integer 42 in sink context (line 1)
sumdoc What is this expression supposed to print ? 'say "hi"; 42;' 14:26
Isn't it both hi and 42
DrForr "hi" to stdout, and return 42 to something that's not there, so that's the warning you get.
14:26 cdg_ joined
jast if you surround it with '', it's just a string constant, not actual statements 14:28
sumdoc DrForr: Is this expected?
jast a warning on a useless constant? sure
sumdoc github.com/bduggan/p6-jupyter-kern...-355290889
jast you'll find that the "hi" output goes to STDOUT and the warning to STDERR
DrForr sub x { say "hi"; 42; } x();
m: sub x { say "hi"; 42; } x();
14:28 natrys joined
camelia WARNINGS for <tmp>:
Useless use of "x" in expression "sub x { say \"hi\"; 42; } x()" in sink context (line 1)
Sub object coerced to string (please use .gist or .perl to do that)
in block <unit> at <tmp> line 1
14:28
sumdoc See that thread
DrForr m: sub x { say "hi"; 42; }; x();
camelia hi
timotimo m: say sub x { say "hi"; } x 10 14:29
camelia Sub object coerced to string (please use .gist or .perl to do that)
xxxxxxxxxx
in block <unit> at <tmp> line 1
timotimo m: say sub noot { say "noot" } x 2
camelia Sub object coerced to string (please use .gist or .perl to do that)
nootnoot
in block <unit> at <tmp> line 1
DrForr sumdoc: Context here helps. C<perl6 -e'say "hi"; 42;'> will return the useless constant warning, because nothing in the environment has consumed it. 14:30
14:31 cdg_ left
jast to be honest, I'm not entirely sure how this is related to the issue you linked to. I don't see anything involving warnings going on there. 14:32
DrForr If you're treating the string as something that just goes into a 'perl6 -e' block, then the warning you're getting is perfetly understandable.
bduggan's reply makes sense to me. I think what he's saying is $*OUT isn't being captured correctly, it's actually the return from the print() statement, *not* the output text on STDOUT. 14:34
Does that help? 14:35
14:37 domidumont joined
DrForr So when it goes to the jupyter console, you get the $*OUT stream of 'hello'..'hello' that you expect *and* the return result from print(), which you *don't*. 14:37
sumdoc DrForr: Thanks 14:44
14:46 cdg_ joined
DrForr And in any case the PR or whatever is still in progress. I suspect it'll get fixed this weekend, given that FOSDEM is bearing down on us :) 14:47
14:48 cdg__ joined
sumdoc DrForr: :) 14:49
14:51 cdg_ left, cdg_ joined 14:52 cdg__ left 14:56 cdg_ left 14:57 cdg_ joined 15:00 cdg_ left, cdg_ joined 15:03 comborico1611 joined
comborico1611 I went to the Docs and still can't get Comments to work, specifically "#begin comment" and "#end comment" 15:03
15:05 sumdoc left
MasterDuke comborico1611: you mean POD? i think it should be '=begin comment' and '=end comment' 15:11
comborico1611 Heh. I'm still waking up. Thank you! 15:12
15:17 silug joined
comborico1611 I was reading = but keep seeing #, I guess. 15:17
15:19 bwisti left 15:26 geospeck joined 15:27 domidumont left, domidumont joined 15:31 markong left, markong joined 15:32 Kaiepi left, Kaiepi joined 15:38 kerframil joined
comborico1611 Quick question: What is wrong with the following: 15:43
m: =begin comment BLAH
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix = instead.
Did you make a mistake in Pod syntax?
at <tmp>:1
------> 3=begin 7⏏5comment
DrForr =begin needs a corresponding =end. You can use =comment there and whatever afterwards 'til the next blank line or leading = will be treated as a comment. 15:45
15:46 committable6 left, committable6 joined, ChanServ sets mode: +v committable6
comborico1611 m: =begin comment BLAH =end comment 15:47
camelia 5===SORRY!5=== Error while compiling <tmp>
Preceding context expects a term, but found infix = instead.
Did you make a mistake in Pod syntax?
at <tmp>:1
------> 3=begin 7⏏5comment
comborico1611 m: =comment BLAH 15:48
camelia ( no output )
DrForr Which also needs to be flush-left like =begin comment.
comborico1611 m: =comment BLAH = 15:49
camelia ( no output )
comborico1611 I don't quite understand. But I think I understand enough to use =comment and not =begin.
Thank you!
DrForr =begin comment .. =end comment # are just fine, you just need to make sure that both the =begin and =end are flush-left.
comborico1611 Hmm. I don't think there was any indentation. 15:51
=comment seems more forgiving, in some way. 15:52
15:59 jeromelanteri joined 16:03 raiph joined 16:04 squain left
comborico1611 I can't figure this simple program out. Mainly confused by: function( sub {say $value } ); Not a super big deal, but if someone is bored they can check it out: gist.github.com/clint-who/7164241e...51eb6b1e96 16:09
16:09 geospeck left
comborico1611 Oop! I see now. It is related to my comments. 16:12
You won't see it in the code in the link because I didn't put the extra stuff I have THOUGHT to have commented-out. 16:13
moritz \o 16:14
yoleaux 1 Jan 2018 02:28Z <timotimo> moritz: quotable6 can't grab irc data right now because irclog.perlgeek.de/p6dev/2017-12-31 gives a 500 internal server error if Accept: application/json is set :(
1 Jan 2018 06:22Z <Zoffix> moritz: spam bots wrote crap again: irclog.perlgeek.de/perl6-dev/2018-...i_15639243
16:14 troys joined
comborico1611 lol my favorite error message yet, "Bogus statement" 16:15
moritz! Fundamentals is on it's way to my house.
its*
moritz comborico1611: nice :) 16:16
tyil .tell ugexe Do you want me to close the ticket I created, as its a dupe of #157 16:17
yoleaux tyil: I'll pass your message to ugexe.
comborico1611 I have much on my plate, as they say. Learning HTML/CSS and Javascript.
So I'm not sure how rigoursly I can read it.
tyil .tell zoffix The issue I ran into with zef has a ticket open, in case you're interested in the cause: github.com/ugexe/zef/issues/157
yoleaux tyil: I'll pass your message to zoffix.
16:18 lowbro left
moritz .tell timotimo I can't reproduce your error; $ curl -H 'Accept: application/json' irclog.perlgeek.de/p6dev/2017-12-31; echo $? gives me {"header":["id","nick","timestamp","line"],"channel":"p6dev","day":"2017-12-31","rows":[]} 0 16:20
yoleaux moritz: I'll pass your message to timotimo.
moritz ZofBot: I've deleted the spam, but it seems to live on in some caches... :(
timotimo moritz: could be it was just there for a little while 16:21
yoleaux 16:20Z <moritz> timotimo: I can't reproduce your error; $ curl -H 'Accept: application/json' irclog.perlgeek.de/p6dev/2017-12-31; echo $? gives me {"header":["id","nick","timestamp","line"],"channel":"p6dev","day":"2017-12-31","rows":[]} 0
moritz closes that mental ticket
comborico1611 So to use =begin comment, nothing else can be on that line? Is that correct? 16:23
moritz everything else on that line will be considered part of the pod block name, I think 16:25
FTR, I'm back from about a week without Internet. If there's anything important that @perl6org on twitter should retweet that it hasn't yet, please let me know 16:27
comborico1611 Thank you. 16:28
I just learned something important. This is a no-no: do-four-times( &print-bottomless-grid( ) ); 16:30
I'm just use to referring to functions with the ( ).
I prefer the extra reminder of the ( ) to notify me that I'm dealing with functions.
( ) bit me on Parrot. And now () bites me on Rakudo. Heh. 16:31
moritz in Perl 6, () is (nearly) always an invocation 16:33
(as a postfix, that is)
Geth doc: baa653c3a6 | (Luca Ferrari)++ | doc/Language/5to6-perlvar.pod6
Reword about ~$/ vs $/.Str.

Link to the match object.
16:34
synopsebot Link: doc.perl6.org/language/5to6-perlvar
Geth doc: a06f33ab89 | (Luca Ferrari)++ | doc/Language/5to6-perlvar.pod6
Improve the $! section.

Explain that $! holds the exception, with link to the documentation(s). Provide a simple snippet to introduce the usage of $! as an object.
comborico1611 I see.
If you aren't busy, could you explain what is going on with the sub here: 16:37
sub say-four-times( $value ) { do-four-times( sub {say $value} );
(2nd sub)
moritz well, there appears to be a sub do-four-times, to which you can pass another subroutine, and it calls that passed subroutine four times 16:38
so now you declare a subroutine say-four-times with an argument $value 16:39
and it doesn't do the looping itself, it calls the do-four-times function to do the actual looping
and it creates an anonymous function that prints $value, and passes that to do-four-times 16:40
comborico1611 so "sub" is a declaring a parameter for an argument that is a function?
moritz no 16:41
"sub" declares a function, and also returns it
you can use it anywhere that a value is expected
comborico1611 sub is declaring the anonymous function?
moritz yes
comborico1611 Hmm. I'll meditate on that. I'll even put your words in a comment of the program for reviewing later. Thanks! 16:42
moritz you're welcome 16:43
16:45 scimon left
comborico1611 Correction: You called $value an argument when it is actually a parameter. 16:46
Geth doc: 8effa8516a | (Luca Ferrari)++ | doc/Language/exceptions.pod6
Small changes to exception introduction paragraph.

Specify a little better what an exception object is and which kind of information it can handle.
16:47
synopsebot Link: doc.perl6.org/language/exceptions
comborico1611 Moritz, so it is the "sub" part that enables do-four-times to pass another subroutine? 16:48
moritz it's say-four-times that passes a subroutine to another subroutine 16:50
comborico1611 Is "sub" being used to return anything here? I know you can't see the other function, but just guessing. 16:53
moritz the declaration that starts with "sub" returns the function it declares 16:54
16:54 khw joined
moritz but that's orthogonal to whether any of the functions involved return anything 16:54
comborico1611 Okay. Thank you for your time. Something isn't quite making sense. But I understand more than when I started. Lunch time! 16:56
16:56 comborico1611 left 16:57 squashable6 left 16:58 squashable6 joined 17:01 abraxxa left
timotimo maybe they're confused by "returns" in this context, as a "return" statement would usually exit the outer subroutine, too 17:02
17:13 BenGoldberg joined 17:15 lookatme left 17:16 lookatme joined 17:19 zakharyas left, abraxxa joined 17:20 Aaronepower left 17:22 coverable6 left, bloatable6 joined, ChanServ sets mode: +v bloatable6, coverable6 joined, benchable6 joined 17:27 kerframil left
buggable New CPAN upload: Verge-RPC-Client-0.0.2.tar.gz by BRAKMIC cpan.metacpan.org/authors/id/B/BR/...0.2.tar.gz 17:28
17:31 domidumont left, AlexDaniel joined 17:38 leont_ left 17:39 bisectable6 left, bisectable6 joined 17:40 troys is now known as troys_ 18:00 pilne joined 18:01 troys_ is now known as troys 18:08 abraxxa1 joined 18:11 abraxxa left 18:13 Kaiepi left 18:14 Kaiepi joined 18:22 jeromelanteri left 18:45 cibs left, raiph left 18:46 cdg_ left, cdg joined, wamba joined 18:50 cdg left 18:53 Aaronepower joined 18:55 geospeck joined 19:07 itaylor57 left, darutoko left, kerframil joined 19:11 eliasr joined 19:15 itaylor57 joined 19:39 greppable6 left, greppable6 joined 19:53 Ven`` joined 19:58 troys is now known as troys_ 19:59 troys_ is now known as troys, Kaiepi left, Kaiepi joined 20:01 cog__ joined 20:05 cog_ left, FROGGS joined
BenGoldberg m: my &lfsr = BEGIN { my uint $lfsr = 42; sub { my uint $xor = ($lfsr +& 1) ?? 0x800000000000000D !! 0; $lfsr +>= 1; $lfsr ^= $xor; $xor ?? 1 !! 0 } }; print lfsr; 20:14
camelia This type cannot unbox to a native integer: P6opaque, Junction
in sub at <tmp> line 1
in block <unit> at <tmp> line 1
20:15 manchicken left
timotimo ^ is a junction operator, BenGoldberg 20:15
m: say 1 ^ 2
camelia 1
2
timotimo m: say (1 ^ 2).perl
camelia one(1, 2)
timotimo m: say 0xabcdef +^ 0x123456 20:16
camelia 12188089
timotimo m: say (0xabcdef +^ 0x123456).base: 16
camelia B9F9B9
BenGoldberg Ooh, I forgot the _
Err, +
timotimo :)
BenGoldberg m: my &lfsr = BEGIN { my $lfsr = 42; sub { my $xor = ($lfsr +& 1) ?? 0x800000000000000D !! 0; dd $xor; $lfsr +>= 1; $lfsr +^= $xor; $xor ?? 1 !! 0 } }; say lfsr for ^4; 20:20
camelia Int $xor = 0
0
1
1
0
Int $xor = 9223372036854775821
Int $xor = 9223372036854775821
Int $xor = 0
BenGoldberg Now this is just strange, why does the output of dd come before and after like that?
timotimo dd uses stderr, while say goes to stdout 20:23
i believe the bot doesn't synchronize that properly
jnthn dd outputs to stderr, there's output buffering when the output isn't a tty, and the thing that collects the output isn't a tty, so it sees the effects of the buffering
20:26 comborico1611 joined
BenGoldberg wonders if it would be worth someone's time to set up a pty, or alternatively have the eval-ing subprocess deliberately turn buffering off. 20:27
comborico1611 I'm confused by Rakudo tarball instruction. I believe I need --prefix in "perl Configure" command, but I'm confused by the value for --prefix. 20:28
moritz where do you want rakudo to be installed?
comborico1611 i guess /opt/perl6 20:29
moritz then you need to run perl Configure.pl --prefix=/opt/perl6
comborico1611 Whenever i can get system-wide PATH
moritz and of course, you need to make /opt/perl6 writable for the current user 20:30
comborico1611 Sudo
And this will give me PATH?
The guys in the instructions used --prefix=$INSTDIR. Super confusing. 20:31
moritz this will install rakudo in /opt/perl6, so /opt/perl6/bin/perl6 20:33
comborico1611 That is what
BenGoldberg m: my &lfsr = BEGIN { my uint $state = 1; sub { my uint $xor = ($state +& 1) ?? 0x800000000000000D !! 0; $state +>= 1; $state +^= $xor; $xor ?? 1 !! 0 } }; my &goldbb = BEGIN { my uint ($zeros, $ones); sub { my uint ($b, $mask); repeat { $b = lfsr; $b ?? ++$ones !! ++$zeros; $mask = $ones +& $zeros; } until $mask; $ones -= $mask; $zeros -= $mask; $b } }; print goldbb for ^100;
camelia Cannot invoke this object (REPR: Uninstantiable; Callable)
in sub at <tmp> line 1
in block <unit> at <tmp> line 1
moritz so you need to add PATH=$PATH:/opt/perl6/bin or so to /etc/profile or something else that is read at startup 20:34
comborico1611 The address i use to assign into PATH?
moritz comborico1611: I don't understand your question
comborico1611 Okay. I'll try it! 20:35
You answered it.
Thank you!
That command will look /perl6/bin to etc/profile ? 20:36
Look = link
moritz no 20:38
comborico1611 Is there another step after PATH= ?
20:39 novalinium left
moritz you might need to login again for the new PATH to take hold 20:40
or start a new login shell, with "bash -n"
comborico1611 Thanks, dude! 20:41
20:45 cdg joined 20:58 evalable6 left 20:59 evalable6 joined, xcm left 21:01 xcm joined 21:02 setty1 joined
comborico1611 Ha! I can't believe it! It installed! First ever tar.gz. 21:03
Last time i got stuck because i was putting PATH= in prompt, not a file. 21:04
moritz so... you didn't even have a rakudo installed before?
or installed via some other method?
comborico1611 Other method.
The easiest method apt-get install rakudo
Which should be on the website, but it's not. 21:05
At least i didn't find it.
21:05 dct joined 21:09 a3r0 left, comborico1611 left 21:13 comborico1611 joined 21:17 comborico joined, cdg left 21:19 xi- left 21:20 xi- joined, Kaiepi left 21:22 Kaiepi joined 21:25 cdg joined 21:30 cdg left
comborico What is going on with this: my ( $days, $hours ) . . . 21:44
21:44 cdg joined
geekosaur you can declare more than one variable at once. beyond that, we'd need to see what you were ellipical about 21:45
21:53 bhm left 21:54 cdg_ joined 21:57 cdg left 22:03 Aceeri_ joined 22:13 troys is now known as troys_ 22:14 natrys left
comborico geekosaur, Thanks! 22:15
geekosaur (note that "my $days, $hours" parses as "((my $days), $hours) = 22:16
which is actually sensible in a number of cases, and lets you deconstruct e.g. a list while declaring on the fly any variables that weren't already. this is not all that unusual in perl 5 code, for example 22:17
therefore probably also in existing perl 6 code
comborico Thanks! 22:18
22:24 geospeck left, geospeck joined, geospeck left 22:27 lizmat left 22:28 xcm left, lizmat joined 22:29 xcm joined 22:35 Ven`` left 22:37 abraxxa1 left, abraxxa joined
comborico Getting a unit-scoped error. Please advise: gist.github.com/clint-who/7b6edd39...8438a27ec9 22:37
Oops! 22:38
I need to declare variables. Let me try that first.
I must go do some things. 22:41
22:41 comborico left, geospeck joined 22:46 geospeck left 22:54 dwarring left 22:59 wamba left
Geth perl6-examples: f799b0f0ab | (Shlomi Fish)++ | categories/best-of-rosettacode/ackermann-function.pl
Correct some typos.
23:11
23:14 setty1 left 23:17 FROGGS left 23:18 grumble left 23:21 comborico1611 left 23:23 comborico1611 joined 23:24 grumble joined 23:26 comborico joined
comborico I'm back. 23:27
23:31 espadrine joined 23:32 rindolf left
comborico Requesting help: A unit-scoped sub definition is not allowed except on a MAIN sub: gist.github.com/clint-who/7b6edd39...8438a27ec9 23:34
geekosaur the semicolon at the end of line 3 23:36
and that error is a bit LTA
comborico LTA?
Thanks, by the way!
geekosaur "less than awesome"
or, in this case, nearly incomprehensible until you spot the actual problem and work backwards to what the compiler thought it meant
comborico Heh, yeah. 23:37
geekosaur I would file that as a rakudobug, btw. include the [LTA] tag in the subject. 23:40
comborico I don't know how. 23:41
geekosaur if nothing else, it should not be talking about unit scope without an explicit "unit" declaration. (that's a holdover from before it was decided to add "unit", because of conflicts between unit scope and forward references)
huggable: rakudobug
huggable geekosaur, Report bugs on github.com/rakudo/rakudo/issues/new If you don't have access to GitHub, you can email your report to [email@hidden.address] . See also: github.com/rakudo/rakudo/wiki/rt-introduction
comborico huggable: rakudobug
huggable comborico, Report bugs on github.com/rakudo/rakudo/issues/new If you don't have access to GitHub, you can email your report to [email@hidden.address] . See also: github.com/rakudo/rakudo/wiki/rt-introduction
comborico Okay. 23:42
23:44 troys_ is now known as troys 23:49 dct left
comborico This a good title: [LTA] Semi-colon at end of header in a subroutine definition 23:49
?
geekosaur I'd include some idea of what the problem with it is 23:50
[LTA] Semi-colon at end of header in a subroutine definition provokes unit-scoped definition error
or some such
comborico [LTA] Vague error message: Semi-colon at end of header in a subroutine definition 23:51
I guess LTA handles the vagueness part.
geekosaur it's not vague, it's just meaningless if you don't know both the current implementation of rakudo sub declarations and the history behind them 23:54