Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-02-16

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:00 pmurias joined #perl6
00:15 BenGoldberg joined #perl6
00:26 Ben_Goldberg joined #perl6
00:27 itcharlie2 joined #perl6
00:28 beginner_guy #kernelnewbies
00:28 beginner_guy oops
00:34 BenGoldberg joined #perl6
00:36 llfourn joined #perl6
00:38 aborazmeh joined #perl6
00:38 aborazmeh joined #perl6
00:40 BenGoldberg_ joined #perl6
00:43 itcharlie1 joined #perl6
00:47 AlexDaniel joined #perl6
00:54 itcharlie1 left #perl6
01:03 Ben_Goldberg joined #perl6
01:15 zacts joined #perl6
01:20 avalenn joined #perl6
01:20 timotimo tbrowder: did you see my comments on the "probs with when" commit?
01:21 tbrowder no, looking now...thanks
01:29 jeffythedragonsl joined #perl6
01:35 Geth ¦ doc: e9f4bb1037 | (Tom Browder)++ | doc/Language/control.pod6
01:35 Geth ¦ doc: use correct name for the block under discussion!
01:35 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e9f4bb1037
01:38 llfourn joined #perl6
01:40 timotimo the comment below it, too?
01:40 timotimo ah, 4 comments now
01:43 timotimo i'm confused as to why you'd put that specific example there
01:43 timotimo for one, it's got nothing to do with a when block by itself
01:45 Geth ¦ doc: d5f23aeae9 | (Tom Browder)++ | doc/Language/control.pod6
01:45 Geth ¦ doc: add more info to explain the context
01:45 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d5f23aeae9
01:48 timotimo maybe it's just me *shrug*
01:50 tbrowder timotimo: i didn't say that did i?  i referred to the source text in sub calls in signatures.  my only original reason for the pr was to document the problem i've been having with when blocks, then i realized the when block is not treated as a separate object even though i think it should be found as such in a search. please modify anything you want, but at
01:50 tbrowder least let me have something to find to refresh my memory better than what we had.
01:51 timotimo oh, you just wanted "when" to show up when searched
01:52 timotimo what do you mean by the reference to signature literals?
01:52 tbrowder yes, and then get some more info on tricky parts that aren't well described elsewhere IMHO, at least for my pea brain.  sometimes the docs leap into depth first before less esoteric uses
01:53 timotimo mhm
01:53 tbrowder ref is to the only place i could find about valid sub calls
01:53 timotimo excuse me, "valid sub calls"?
01:53 tbrowder pleas find a better reference, or do whatever it takes...look at the error versions in my example
01:54 timotimo m: for <a b c> { when / :i h / { &say } }
01:54 camelia rakudo-moar a62882: ( no output )
01:54 timotimo m: for <a b c> { when / :i h / { &say; } }
01:54 camelia rakudo-moar a62882: ( no output )
01:54 timotimo what error did you actually get?
01:55 tbrowder i first try the old p5 trick of calling a sub with &foo and got bit...
01:55 timotimo yeah, that's just the function as a noun rather than as a verb
01:56 tbrowder look at the example earlier today
01:56 timotimo in irc here?
01:57 timotimo oh!
01:57 timotimo that's something different :D
01:57 timotimo m: if say { 1 }
01:57 camelia rakudo-moar a62882: OUTPUT«5===SORRY!5===␤Function 'say' needs parens to avoid gobbling block␤at <tmp>:1␤------> 3if say { 1 }7⏏5<EOL>␤Missing block (apparently claimed by 'say')␤at <tmp>:1␤------> 3if say { 1 }7⏏5<EOL>␤␤»
01:57 timotimo not related to when
01:58 tbrowder well, explain it better then...
01:58 timotimo hm
01:59 timotimo m: for say { "meep" }
01:59 camelia rakudo-moar a62882: OUTPUT«5===SORRY!5===␤Function 'say' needs parens to avoid gobbling block␤at <tmp>:1␤------> 3for say { "meep" }7⏏5<EOL>␤Missing block (apparently claimed by 'say')␤at <tmp>:1␤------> 3for say { "meep" }7⏏5<EOL>␤␤»
01:59 tbrowder look at https://irclog.perlgeek.de/perl6/2017-02-15#i_14109385
02:00 timotimo it's a good question where this should go, but i'm pretty sure it shouldn't go here
02:01 timotimo though the control flow page might be the right page at least
02:01 timotimo since putting a sub without arguments before a { } like that is a temptation mostly in those contexts
02:02 timotimo because you have keyword, term, block immediately in a row there
02:03 Ben_Goldberg joined #perl6
02:08 tbrowder it would help to illustrate that exact point item by item in at least one of the error entres! i'm going to sleep on it...will check in tomorrow
02:09 timotimo well, the error is trying to
02:10 timotimo just if you have "f" three times in a row it's hard to tell which f it means
02:10 timotimo it puts the marker after f { ... }^here^
02:10 timotimo and says "lacks a block" "the block was apparently taken by f" and "f needs to have parens in order to avoid gobbling the block"
02:11 kurahaupo__ joined #perl6
02:13 Actualeyes joined #perl6
02:13 samcv is there a way to do rakudobrew with moar blead when using Travis?
02:13 samcv looks like my travis MoarVM panic: Internal error: invalid thread ID 1302783360 in GC work pass, and that's been fixd in moar
02:15 jraglin joined #perl6
02:16 khw joined #perl6
02:20 timotimo yeah, you can get "rakudobrew triple nom master master"
02:24 samcv what
02:24 samcv so if i put nom in the .travis.yml it'll build nom?
02:37 cdg joined #perl6
02:39 llfourn joined #perl6
02:42 Ben_Goldberg joined #perl6
02:46 timotimo no, the command is "rakudobrew triple nom master master"
02:46 alphah joined #perl6
02:51 agentzh joined #perl6
02:52 BenGoldberg . o O (coffebrew triple size nom nom nom)
02:55 grondilu joined #perl6
02:56 snowkiss21 joined #perl6
02:59 AlexDaniel joined #perl6
02:59 skids bisect: use NativeCall; use nqp; my $anchor; my $c = nativecast(Pointer[uint8], Buf.new(1,2,3,4,5,6)); class f is repr("CStruct") { has uint16 $.a; has uint32 $.b }; my $d = nativecast(f,$c); my $f = $d.a; nqp::force_gc; $d = nativecast(f,$c); say $f == $d.a
02:59 bisectable6 skids, On both starting points (old=2015.12 new=a628826) the exit code is 0 and the output is identical as well
02:59 bisectable6 skids, Output on both points: False
03:00 skids OK, so that's not a new thing.
03:02 raiph joined #perl6
03:06 cdg joined #perl6
03:07 Ben_Goldberg joined #perl6
03:09 AlexDaniel commit: all use NativeCall; use nqp; my $anchor; my $c = nativecast(Pointer[uint8], Buf.new(1,2,3,4,5,6)); class f is repr("CStruct") { has uint16 $.a; has uint32 $.b }; my $d = nativecast(f,$c); my $f = $d.a; nqp::force_gc; $d = nativecast(f,$c); say $f == $d.a
03:09 committable6 AlexDaniel, https://gist.github.com/1832349c258408fad07bc6270ab92e1b
03:10 xtreak joined #perl6
03:27 cale2 joined #perl6
03:27 cale2 how do you do the .tell command here? to send people messages later?
03:28 grondilu .tell cale2 just like that, no?
03:28 yoleaux grondilu: I'll pass your message to cale2.
03:28 ssotka joined #perl6
03:28 grondilu say something and yoleaux will relay
03:29 cale2 hi
03:29 yoleaux 03:28Z <grondilu> cale2: just like that, no?
03:29 cale2 is timotimo here?
03:29 grondilu .seen timotimo
03:29 yoleaux I saw timotimo 02:43Z in #perl6: <timotimo> no, the command is "rakudobrew triple nom master master"
03:34 skids bisect: my $p = Promise.new; my $b = 0; my $w = start { await($p); CATCH { default { $b = 1; .resume } } }; $p.break; await($w); $b.say
03:34 bisectable6 skids, Bisecting by exit code (old=2015.12 new=a628826). Old exit code: 0
03:34 bisectable6 skids, bisect log: https://gist.github.com/c56451864b792d91a5a6aa0ed967e6a3
03:34 bisectable6 skids, (2016-11-02) https://github.com/rakudo/rakudo/commit/abf6caf06eb7e48674d4e22a4ad6b580e5efecbf
03:35 cale2 .tell timotimo: it might be worthwhile to add a "help wanted" section to perl6weekly. People could send you a little classified about something they need help with and how a person can get involved :)
03:35 yoleaux cale2: What kind of a name is "timotimo:"?!
03:35 cale2 .tell timotimo it might be worthwhile to add a "help wanted" section to perl6weekly. People could send you a little classified about something they need help with and how a person can get involved :)
03:35 yoleaux cale2: I'll pass your message to timotimo.
03:35 cale2 lol
03:35 kurahaupo_ joined #perl6
03:35 noganex joined #perl6
03:36 skids bisect: my $p = Promise.new; my $b = 0; my $w = start { await($p); CATCH { default { $b = 1; } } }; $p.break; await($w); $b.say
03:36 bisectable6 skids, On both starting points (old=2015.12 new=a628826) the exit code is 0 and the output is identical as well
03:36 bisectable6 skids, Output on both points: 1
03:38 skids Hrm, well, finding why I had to put that .resume in there in the first place might require some digging.
03:38 MasterDuke bisect: old=abf6caf06eb7e48674d4e22a4ad6b580e5efecbf my $p = Promise.new; my $b = 0; my $w = start { await($p); CATCH { default { $b = 1; .resume } } }; $p.break; await($w); $b.say
03:38 bisectable6 MasterDuke, Bisecting by output (old=abf6caf new=a628826) because on both starting points the exit code is 1
03:38 bisectable6 MasterDuke, bisect log: https://gist.github.com/48a46201d3a30c5ccb150b721dc85b4c
03:38 bisectable6 MasterDuke, (2016-12-20) https://github.com/rakudo/rakudo/commit/b8df3a613125f17e9cbc59488326187bcfed8e2c
03:40 MasterDuke bisect: old=b8df3a613125f17e9cbc59488326187bcfed8e2c my $p = Promise.new; my $b = 0; my $w = start { await($p); CATCH { default { $b = 1; .resume } } }; $p.break; await($w); $b.say
03:40 bisectable6 MasterDuke, On both starting points (old=b8df3a6 new=a628826) the exit code is 1 and the output is identical as well
03:40 bisectable6 MasterDuke, Output on both points: Tried to get the result of a broken Promise␤  in block <unit> at /tmp/vKFkDC23_N line 1␤␤Original exception:␤    This exception is not resumable␤      in block  at /tmp/vKFkDC23_N line 1␤      in block  at /tmp/vKFkDC23_N line 1␤
03:40 AlexDaniel c: all my $p = Promise.new; my $b = 0; my $w = start { await($p); CATCH { default { $b = 1; .resume } } }; $p.break; await($w); $b.say
03:40 committable6 AlexDaniel, https://gist.github.com/f10650909b08ee2fade3301391f8bae0
03:40 AlexDaniel the thing with Bisectable is that you have to know what you're looking for
03:41 llfourn joined #perl6
03:41 skids Falling off a stanza inside a CATCH is technically considered a "resume" or not?
03:42 skids c: all my $p = Promise.new; my $b = 0; my $w = start { await($p); CATCH { default { $b = 1; } } }; $p.break; await($w); $b.say
03:42 committable6 skids, https://gist.github.com/b05de1815ecb5608522e0ece483adee9
03:59 Geth ¦ whateverable: a44467ea4f | (Daniel Green)++ | Benchable.p6
03:59 Geth ¦ whateverable: Also use slightly faster pzstd for Benchable
03:59 Geth ¦ whateverable: review: https://github.com/perl6/whateverable/commit/a44467ea4f
04:01 Ben_Goldberg joined #perl6
04:31 Cabanoss- joined #perl6
04:32 skids Anyone worked up CompUnit incantations to get a multi-module test on one line for the bots?
04:36 Ben_Goldberg joined #perl6
04:41 xtreak joined #perl6
04:45 llfourn joined #perl6
05:05 kurahaupo__ joined #perl6
05:21 wamba joined #perl6
05:40 curan joined #perl6
05:46 llfourn joined #perl6
05:59 Cabanossi joined #perl6
06:03 llfourn joined #perl6
06:04 snowkiss21 joined #perl6
06:07 CIAvash joined #perl6
06:28 yan4138 joined #perl6
06:29 xtreak joined #perl6
06:52 mr_ron joined #perl6
06:54 RabidGravy joined #perl6
07:02 Actualeyes joined #perl6
07:03 darutoko joined #perl6
07:26 wamba joined #perl6
07:33 eroux joined #perl6
07:37 mr_ron joined #perl6
07:48 Tonik joined #perl6
07:50 eroux joined #perl6
08:13 ufobat joined #perl6
08:27 cpage_ joined #perl6
08:29 kurahaupo__ joined #perl6
08:29 xtreak joined #perl6
08:31 abraxxa joined #perl6
08:32 dakkar joined #perl6
08:33 abraxxa joined #perl6
08:34 agentzh joined #perl6
08:42 abraxxa joined #perl6
08:44 cpage_ joined #perl6
08:45 kst joined #perl6
08:54 xtreak joined #perl6
08:56 bjz joined #perl6
09:01 astj_ joined #perl6
09:04 jonas2 joined #perl6
09:14 cpage_ joined #perl6
09:28 bolangi joined #perl6
09:31 curan joined #perl6
09:42 dakkar joined #perl6
09:46 xtreak joined #perl6
09:54 lukaramu joined #perl6
10:04 user10 joined #perl6
10:08 user10 joined #perl6
10:17 user9 joined #perl6
10:19 sena_kun joined #perl6
10:27 faraco joined #perl6
10:41 espadrine joined #perl6
10:42 bjz joined #perl6
10:49 tbrowder morning #perl6 ... sleepless night worrying over when block
10:49 bjz_ joined #perl6
10:50 curan joined #perl6
10:51 sena_kun tbrowder, 0/
10:52 jnthn I once had a sleepless flight implementing whenever blocks...does that count? :)
10:53 tbrowder .tell timotimo i'm all wrong about the words i used in the new doc chunk. i think the fundamental point is the when and if are similar but the if doesn't implicitly give control back to the enclosing block while the when does. i'll reword in a bit.
10:53 yoleaux tbrowder: I'll pass your message to timotimo.
10:54 tbrowder sena_kun: hi, jnthn: i think that counts for sure!
10:54 jnthn tbrowder: If it helps, `when X { Y }` compiles into the same thing as `if X.ACCEPTS($_) { Y; succeed; }`
10:55 jnthn Or something very close/equivalent
10:55 jnthn Though it also forces the surrounding block to have a succeed handler
10:56 timotimo o/
10:56 yoleaux 03:35Z <cale2> timotimo: it might be worthwhile to add a "help wanted" section to perl6weekly. People could send you a little classified about something they need help with and how a person can get involved :)
10:56 yoleaux 10:53Z <tbrowder> timotimo: i'm all wrong about the words i used in the new doc chunk. i think the fundamental point is the when and if are similar but the if doesn't implicitly give control back to the enclosing block while the when does. i'll reword in a bit.
10:56 timotimo tbrowder: oh, okay! that's a whole different topic than i thought we were talking about! :)
10:56 tbrowder jnthn: i would appreciate your perusal of my reword when i get it done, and that helps (i think!)
10:58 tbrowder timotimo: yes, i was muddling two different issues of my p6 !understanding
11:02 tbrowder jnthn: i'll try to put yr wrds in layman's language
11:02 wamba joined #perl6
11:26 eliasr joined #perl6
11:41 _Vasyl joined #perl6
11:53 faraco Hi guys, just want to know from you guys opinion, what makes a written program a "good code" to you? Just want to expand my skills on writing better program and the ease the development for myself and everyone else (if somebody did look at it, you'll never know!)
11:59 sena_kun faraco, here can be different answers, but I guess it is too complex topic to express shortly. You can search for different books like "Perfect Code" and alike, but remember that it is just a bunch of examples and opinions, not The Single Truth Of This World As It Is.
12:00 IOninja hehe, too long to explain.
12:00 timotimo good code is easy to understand when read, makes its intentions clear, has comments that say why a given piece of code is the way it is, and is reasonably easy to modify when circumstances change
12:01 timotimo that's ... extremely fuzzy :)
12:01 IOninja faraco: a good program is like art; and perfection in art not is achieved no when there is nothing left to add, but when there is nothing left to take away ;)
12:01 timotimo m:
12:01 rindolf joined #perl6
12:01 timotimo m: for $( ) { }
12:01 camelia rakudo-moar a62882: ( no output )
12:03 IOninja Now you just need to frame it and sell it for millions of dollars.
12:03 IOninja For tips, see https://en.wikipedia.org/wiki/Black_Square_(painting) :)
12:11 faraco sena_kun, timotimo, IOninja: Thank you for your input. I usually write code that is structured enough, but I always felt them being too verbose that it's supposed to, without any documentation on why the specific implementations of code were needed for the program.
12:12 faraco s/that/than
12:13 arnsholt I'm only in partial agreement with the "nothing left to take away" quote
12:14 arnsholt It's a nice quote, but in practice there has to be a balance between "minimal set of features" and "useful"
12:14 faraco I always think that when I write them, it will be me and only me who read them afterward. I guess I was wrong when someone commented my code :P
12:15 timotimo keep in mind that "me" from the future can be a whole 'nother person :D
12:17 sena_kun faraco, try to be understandable, comment all "How I wrote it? I don't remember" parts, try to avoid creation of "I'm scared to look into this file" parts, use general guidelines and have fun.
12:17 faraco thank you :D
12:21 faraco timotimo: while you're online, I want to say that Raw::SDL2 is nice! However, I can see some of the examples (shooter.pl) were lagging. Is this because of the moarvm? (mine is rakudo, fyi)
12:22 timotimo yeah, there's a bunch of inefficiencies that it has to work against
12:22 timotimo what does your raw timing look like when graphed?
12:23 timotimo i.e. gnuplot -p -e "plot 'raw_timings.txt' with lines"
12:23 timotimo i think i need to take care to remove the first few results as they tend to be crazy outliers
12:24 IOninja arnsholt: the quote doesn't advocate minimalism :)
12:25 faraco Right now, I'm not on my home workspace, I cannot install Perl 6 to try. I tried your examples like 3 days ago if I'm not mistaken, but I will try to report what you requested when I got to my PC.
12:26 timotimo actually, it'd potentially be enough to post the output it does at the end
12:28 faraco If I still remember, I can only the star particles and spaceship moving just fine (with some lags, some sort of 14 FPS)
12:28 faraco but that's it
12:28 faraco see*
12:30 timotimo can you give me your specs?
12:30 timotimo it's most likely CPU bound
12:30 timotimo the SDL calls it does are super cheap in comparison to the overhead from not-so-optimized perl6 code
12:31 faraco I think my PC is to blame, 1GB ram and 1.50+ Ghz if I'm not mistaken.
12:32 faraco maybe it's due to moarvm eating a lot of rams that cause the lagging when trying your examples.
12:32 timotimo well, if it's pressed for RAM that'll certainly slow it down a whole lot
12:32 timotimo but more like 1fps or 0.01fps, not 14fps
12:33 faraco I think you are right.
12:34 timotimo you can figure out how much ram it maxes out on with "time"
12:34 timotimo it'll give you the "maxresident" k
12:34 faraco sure, when I'm back home, I'll try what I can do
12:36 timotimo ah, OK!
12:36 agentzh joined #perl6
12:36 timotimo the numbers that shooter.pl outputs at the end are a bunch of percentiles from frame timings and the inverse of the frame timings (i.e. theoretical FPS)
12:37 timotimo it only uses 150 megs of ram on my machine
12:37 timotimo and i hardly get framerates below 56
12:40 faraco That is very weird. I once before installed the Libgdx example (jumper?) on the same PC I tested shooter.pl. It's shockingly fast (maybe because the claimed well written API).
12:40 timotimo libgdx?
12:40 faraco yes, Java (I know, I know)
12:40 timotimo it's really rakudo's fault that shooter is so slow
12:42 faraco timotimo: that is my first thought too, since running a hello world script took like a java hello world compilation total time on my machine. but I see this can be addressed later (idk actually).
12:43 timotimo rakudo could be much faster in theory
12:43 timotimo it's just a lot of work to make it better :)
12:44 faraco Indeed.
12:44 timotimo hah, when i profile it, it says it spends 81% of its time in SDL_RenderPresent
12:44 timotimo that's VSync sleeping until the next frame can be pushed to the screen
12:46 timotimo funny thing, when you have more FPS, more enemies will spawn
12:47 faraco sounds like the game is user machine tolerant :P
12:48 timotimo anyway, with PRESENTVSYNC turned off i get between 131 and 746 FPS
12:48 timotimo but the 746 seems to be a rather radical outlier; it's the 95th percentile after all
12:49 timotimo 75th percentile is still 221 FPS
12:50 wamba joined #perl6
12:52 pmurias joined #perl6
12:53 pmurias IOninja: The "Nothing more to add" approach sometimes works too, just look at Perl ;)
12:56 timotimo oh
12:56 timotimo that was with profiling running
12:56 timotimo without profiling the 95th percentile goes up to 1379fps and the 75th is 428 fps
12:56 faraco holy...
12:57 timotimo so ... maybe rakudo is fast enough after all?
12:58 timotimo it differs strongly by how many enemies are on screen, of course
12:58 bjz joined #perl6
13:00 timotimo of course if the game were written in C, it'd have >3000 fps even with 200 enemies on screen, i'd imagine
13:00 faraco but I have lags in *all* of the examples.
13:01 faraco even the whitenoise.pl and snake.pl
13:02 timotimo maybe GC is making things very bad for you?
13:02 faraco like I said, I think my old PC is to blame, not suited to play games.
13:02 timotimo on my machine it spends 8% of its time in GC
13:03 faraco Maybe you are right, I'm just curious why, like Perl 5 frozen-bubble and Jumper libgdx on Java is like playing on 64 bit PC. I didn't noticed any significant lags in them.
13:04 timotimo mhm
13:04 timotimo hard to say without measuring things
13:04 pmurias joined #perl6
13:08 andrzejku joined #perl6
13:09 andrzejku hi
13:10 andrzejku guys what do you know about this project? Perlix?
13:10 andrzejku status?
13:13 timotimo i haven't heard of perlix
13:14 andrzejku https://www.foo.be/docs/tpj/issues/vol5_2/tpj0502-0009.html
13:14 DrForr Oh, good god. Short answer: it's a joke.
13:15 andrzejku no, it is not?
13:15 timotimo when was that doc written?
13:15 andrzejku 2000
13:16 DrForr Notice the URL references ftp:// - That should be a good indication of how long it's "been around".
13:16 El_Che Simon Cozens. He was las year at fosdem
13:16 DrForr yeah, and the bastard didn't even say hi :)
13:17 andrzejku Simon is still live http://www.simon-cozens.org/
13:17 DrForr Yes. That doesn't mean anything though.
13:17 El_Che DrForr: he did to me :)
13:17 andrzejku He also write Perl book
13:18 andrzejku what is he doing right now?
13:18 DrForr Yes, he did. perlix is still a joke that was funny for a few months back in 2000. That's about it.
13:18 El_Che looking at his git repo: glyphs
13:20 andrzejku doesnt mean that there no existing sources of Perlix?
13:20 DrForr Typography, yes. Font design, last time I checked. I doubt he's thought about that page in at least a decade, yet it still remains on the Web.
13:20 aborazmeh joined #perl6
13:20 aborazmeh joined #perl6
13:21 DrForr andrzejku: Yes, the page is there. No, to my knowledge very little work if any was ever done on the project. As it says, Perl Power Tools is the closest we've come.
13:22 DrForr There is very little point to writing a kernel in anything other than C, or possibly C++ if you're a masochist, due to performance constraints.
13:22 andrzejku DrForr, sad I got big hope that's really exist
13:23 El_Che DrForr: D, Rust?
13:23 andrzejku and Go
13:23 El_Che And there is a Java OS out there
13:23 El_Che andrzejku: Go <-- GV
13:23 El_Che GC
13:23 andrzejku yeah that's a point
13:23 andrzejku if there exist Java OS
13:23 andrzejku why we cann't have Perlix?
13:24 El_Che I am a Perl guy, but I wouldn't run it :)
13:24 DrForr Because nobody's written it?
13:24 andrzejku El_Che, you can run it on embedde device
13:24 andrzejku to speed programming out there
13:25 El_Che andrzejku: Perl as the OS of an embedded device <-- you like pain, don't you?
13:25 El_Che the slow type :)
13:25 DrForr andrzejku: Perl 6 compiles to the JVM, ergo you can write Perl6-OS targeted to the JVM.
13:25 El_Che https://en.wikipedia.org/wiki/JavaOS
13:26 andrzejku I just need somehow compile Perl JVM on embedde device and write the rest in Perl
13:26 El_Che discontinued closed source
13:26 DrForr No need, compile Perl 6 to the JVM - There is no "Perl JVM" - There's the Java Virtual Machine and MoarVM.
13:26 jraglin joined #perl6
13:26 IOninja Perl6-OS? Call it Slowos :P
13:27 andrzejku MoarVM
13:27 DrForr Nobody's stopping you.
13:27 faraco The Sixth-Sense.
13:27 andrzejku ya I know I just wanted to look for friends
13:28 El_Che https://en.wikipedia.org/wiki/JX_(operating_system)
13:29 faraco If Perl 6 somehow got a native compiler, then does OS development with Perl 6 still relevant? (well, reduced pain of course)
13:30 faraco with some extensions maybe?
13:30 faraco you know, like chicken scheme to C compiler.
13:31 El_Che faraco: do you mean a ->C compiler of a compiler completely in Perl6?
13:31 lukiramu joined #perl6
13:31 faraco Both, if we can?
13:32 faraco Although, I'm not transpiling to C will give you full control of the native result.
13:32 faraco I'm not sure*
13:33 faraco since the generated C code maybe do something than you expect to, although can be easily edited, just to make sure where the depends calls happens.
13:34 faraco my grammar is messed up...
13:34 faraco including that
13:34 DrForr If you've got the time, now that the grammar is stable, feel free to write a LLVM or GCC frontend for Perl 6 :)
13:36 sena_kun does it have iterators now?
13:37 DrForr Does what have iterators? C++ yes, LLVM/GCC - no idea.
13:37 astj joined #perl6
13:38 sena_kun DrForr, Perl6::Parser.
13:38 sena_kun I'm not so hardcore to know anything about LLVM/GCC. :)
13:39 DrForr Oh. No, I had some personal issues come up before FOSDEM, haven't really gotten back to the code.
13:39 sena_kun ah, nevermind me then.
13:39 DrForr No worries, it just came in without context.
13:40 sena_kun I want to rewrite Texas::To::Uni(and name it properly *this time*), but it is likely to be super-tricky and buggy without a proper parser.
13:41 mr_ron joined #perl6
13:43 lizmat joined #perl6
13:43 wamba joined #perl6
13:47 DrForr sena_kun: Well, let me look at that over the weekend. I found some other things slipping through the cracks that I'll probably have to take care of first but I'll at least give it a splice() method or something that can be used for modification. I also want to be able to braid in ->walk, ->walk-no-whitespace, ->walk-no-structural and ->walk-no-documentation.
13:49 Geth ¦ doc: 4416cdb167 | (Will "Coke" Coleda)++ | 2 files
13:49 Geth ¦ doc: fix typos, learn word, avoid short form
13:49 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4416cdb167
13:49 timotimo does anybody want to work on making panda's reporting work with cpandatesters again?
13:50 timotimo it seems to no longer send the build stage output
13:50 timotimo so every report gets N/A as the grade
13:50 sena_kun DrForr, you don't need to hurry, since it is unlikely that one of my modules is *heavy* needed by someone, and I have plenty of other things to take care for now. You have many tasks to do too, I suppose, so don't worry and have fun. :)
13:51 DrForr Eeh, it'd be a change of pace.
13:51 perlpilot DrForr: btw, a minor thing ... Perl6::Parser doesn't show up in the project list when you type exactly that in the search bar.  (because it's Perl6-Parser)
13:51 IOninja timotimo: wouldn't it make more sense to make a zef reporting plugin?
13:51 perlpilot (on modules.perl6.org that is)
13:51 timotimo yeah, could do that, too
13:52 IOninja perlpilot: huh. Seems we do have auto-searching for :: when - is typed, but not in reverse :S
13:53 perlpilot I was thinking maybe a "-" was ignored so it was if you'd typed "Perl6 Parser" and that "::" was not ignored
13:54 DrForr Well, the git project name is 'perl6-Perl6-Parser'... What needs to change?
13:55 IOninja DrForr: modules.perl6.org needs a fix
13:55 perlpilot DrForr: the "name" in META.info
13:55 perlpilot and what IOninja said!
13:55 perlpilot :)
13:55 DrForr Thanks.
13:56 IOninja This Issue wasn't fully resolved basically: https://github.com/perl6/modules.perl6.org/issues/57
13:56 DrForr Done, will push when I get home.
14:09 imcsk8 joined #perl6
14:09 kurahaupo__ joined #perl6
14:20 cibs joined #perl6
14:25 sammers joined #perl6
14:30 Geth ¦ doc: daa2950944 | (Will "Coke" Coleda)++ | 2 files
14:30 Geth ¦ doc: Unify example skips.
14:30 Geth ¦ doc:
14:30 Geth ¦ doc: Instead of skipping some files when extracting examples,
14:30 Geth ¦ doc: and some when running the tests, move all the exclusions
14:30 Geth ¦ doc: to the test; as of this commit, extract-examples now
14:30 Geth ¦ doc: passes 100% - the goal should be to remove all these skips
14:30 Geth ¦ doc: and still have the test file pass.
14:30 Geth ¦ doc: review: https://github.com/perl6/doc/commit/daa2950944
14:32 Cabanossi joined #perl6
14:38 Geth ¦ doc: 8ad0c63645 | (Zoffix Znet)++ | doc/Type/Array.pod6
14:38 Geth ¦ doc: Document Array.clone
14:38 Geth ¦ doc:
14:38 Geth ¦ doc: Implemented in Rakudo today in https://github.com/rakudo/rakudo/commit/dc69dafc42
14:38 Geth ¦ doc: review: https://github.com/perl6/doc/commit/8ad0c63645
14:39 IOninja ^ that could use a link to explanation of reification but I don't know where/if that's explained
14:39 llfourn joined #perl6
14:41 eroux joined #perl6
14:42 skids joined #perl6
14:43 IOninja I don't get it. Why does it complain about attributes in a type object? https://gist.github.com/zoffixznet/ecdb9f893faff9580da5055ab64f5760
14:43 IOninja And just for Array :S
14:43 IOninja m: Rat.clone
14:43 camelia rakudo-moar dc69da: OUTPUT«Cannot look up attributes in a Rat type object␤  in block <unit> at <tmp> line 1␤␤»
14:43 IOninja oh
14:43 IOninja OK. Never mind then, I guess
14:45 jfuller joined #perl6
14:48 lizmat perhaps we should have a Mu:U: clone ?
14:48 yoleaux 5 Feb 2017 21:28Z <nine> lizmat: https://github.com/niner/Inline-Perl5/commit/f461fabb67 is the solution :)
14:48 yoleaux 6 Feb 2017 09:27Z <gfldex> lizmat: you may want to link the following tonight http://video.fosdem.org/2017/K.4.201/
14:48 yoleaux 14 Feb 2017 19:28Z <samcv> lizmat: thanks for " Make Int.WHICH about 1.7x faster" :)
14:48 IOninja lizmat: way ahead of you :)
14:49 lizmat :-)
14:49 IOninja Also, welcome back!
14:49 araraloren joined #perl6
14:50 faraco .tell nobody I'm bored.
14:50 yoleaux faraco: I'll pass your message to nobody.
14:51 wamba joined #perl6
14:51 IOninja .tell IOninja meows
14:51 yoleaux IOninja: Talking to yourself is the first sign of madness.
14:58 wamba joined #perl6
15:04 zakharyas joined #perl6
15:08 Ven joined #perl6
15:10 cale2 joined #perl6
15:10 cale2 hi
15:11 IOninja ahoy
15:12 cale2 m: my @array.push(0) for [].elems; say @array.elems; say @array;
15:12 camelia rakudo-moar dc69da: OUTPUT«1␤[0]␤»
15:12 cale2 So apparently [].elems is pushing an (Any) onto @array
15:12 mst joined #perl6
15:12 cale2 m: say [].elems; say ().elems;
15:12 camelia rakudo-moar dc69da: OUTPUT«0␤0␤»
15:13 IOninja cale2: no, you're iterating for one iteration.
15:13 IOninja m: "meows".say for 0
15:13 camelia rakudo-moar dc69da: OUTPUT«meows␤»
15:13 timotimo m: say "hello cale" for 1
15:13 camelia rakudo-moar dc69da: OUTPUT«hello cale␤»
15:13 cale2 ah... So how do I actually do what I want there?
15:13 timotimo i think you've had this same misunderstanding before with masak
15:13 cale2 m: say "hello cale" for 0
15:13 camelia rakudo-moar dc69da: OUTPUT«hello cale␤»
15:14 IOninja m: my @array.push(0) for ^[].elems; say @array.elems; say @array;
15:14 camelia rakudo-moar dc69da: OUTPUT«0␤[]␤»
15:14 snowkiss21 joined #perl6
15:14 cale2 m: say "hello cale" for ^0
15:14 camelia rakudo-moar dc69da: ( no output )
15:14 cale2 m: say "hello cale" for ^([].elems)
15:14 camelia rakudo-moar dc69da: ( no output )
15:14 IOninja m: my @array.push(0) for ^[]; say @array.elems; say @array;
15:14 camelia rakudo-moar dc69da: OUTPUT«0␤[]␤»
15:14 cale2 m: say "hello cale" for ^([].elems * 3)
15:14 camelia rakudo-moar dc69da: ( no output )
15:14 IOninja (no need for .elems even)
15:14 IOninja heh
15:14 IOninja 0*3 is still 0 :)
15:14 cale2 I don't get it though
15:14 timotimo m: say ^5
15:14 camelia rakudo-moar dc69da: OUTPUT«^5␤»
15:15 timotimo yeah
15:15 timotimo m: say ^5.List
15:15 camelia rakudo-moar dc69da: OUTPUT«Potential difficulties:␤    Precedence of ^ is looser than method call; please parenthesize␤    at <tmp>:1␤    ------> 3say ^57⏏5.List␤^1␤»
15:15 timotimo m: say ^5 .List
15:15 camelia rakudo-moar dc69da: OUTPUT«(0 1 2 3 4)␤»
15:15 timotimo ^5 is short for 0..^5
15:15 IOninja cale2: ^ is the range operator that makes 0..^$x; The $x used is your elemes
15:15 lizmat m: .say for 0
15:15 camelia rakudo-moar dc69da: OUTPUT«0␤»
15:15 lizmat m: .say for [].elems
15:15 camelia rakudo-moar dc69da: OUTPUT«0␤»
15:15 cale2 m: say "hi" for ^0; say "hi" for ^[];
15:15 camelia rakudo-moar dc69da: ( no output )
15:15 cale2 m: say "hi" for ^0; say "hi" for ^[];
15:15 camelia rakudo-moar dc69da: ( no output )
15:16 cale2 m: say "hi" for 0
15:16 camelia rakudo-moar dc69da: OUTPUT«hi␤»
15:16 IOninja cale2: `for 0` iterates over a 1-item list: the number 0; `for ^0` iterates over nothing because `^0` range is an empty list
15:16 timotimo for iterates over a list, individual objects in perl6 behave like a list with only that object in it
15:17 IOninja m: say [0]
15:17 camelia rakudo-moar dc69da: OUTPUT«[0]␤»
15:18 IOninja m: say [^0]
15:18 camelia rakudo-moar dc69da: OUTPUT«[]␤»
15:18 cale2 m: say [0].classify: { $_ > 0 ?? 'adults' !! 'babies' };     say "%classified[]"; say "%classified<adults>";
15:18 camelia rakudo-moar dc69da: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '%classified' is not declared. Did you mean '&classify'?␤at <tmp>:1␤------> 3> 0 ?? 'adults' !! 'babies' };     say "7⏏5%classified[]"; say "%classified<adults>␤»
15:18 cale2 m: my %classified = [0].classify: { $_ > 0 ?? 'adults' !! 'babies' };     say "%classified[]"; say "%classified<adults>";
15:18 camelia rakudo-moar dc69da: OUTPUT«babies       0␤Use of uninitialized value %classified of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤␤»
15:19 cale2 ah... the problem is that classified IS inserting a value for the adults
15:19 IOninja ? no it doesn;'t
15:19 IOninja m: my %classified = [0].classify: { $_ > 0 ?? 'adults' !! 'babies' }; dd %classified
15:19 camelia rakudo-moar dc69da: OUTPUT«Hash %classified = {:babies($[0])}␤»
15:20 cale2 m: my %classified = [0].classify: { $_ > 0 ?? 'adults' !! 'babies' }; say "%classified<adults>.elems";
15:20 camelia rakudo-moar dc69da: OUTPUT«Use of uninitialized value %classified of type Any in string context.␤Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.␤  in block <unit> at <tmp> line 1␤.elems␤»
15:20 cale2 m: my %classified = [0].classify: { $_ > 0 ?? 'adults' !! 'babies' }; say %classified<adults>.elems;
15:20 camelia rakudo-moar dc69da: OUTPUT«1␤»
15:20 cale2 yeah it is ^
15:20 timotimo it's kind of confusing that it's saying "value %classified" even though it is about the elem in it
15:20 IOninja hehe
15:20 IOninja cale2: it autovivifies
15:20 cale2 %classified<adults>.elems should be 0
15:21 timotimo IOninja: careful with that word. in that code there's no change to the hash yet
15:21 IOninja to an Any and you call Any.elems and get 1
15:21 cale2 I need it to "do what I mean" haha
15:21 timotimo m: my %foo; dd %foo<nope>
15:21 camelia rakudo-moar dc69da: OUTPUT«Any %foo = Any␤»
15:21 timotimo well, thanks for the name
15:21 timotimo m: my %foo; say %foo<nope>:exists
15:21 camelia rakudo-moar dc69da: OUTPUT«False␤»
15:21 cale2 m: my %classified = [0].classify: { $_ > 0 ?? 'adults' !! 'babies' }; say %classified<adults>.elems == 0;
15:21 camelia rakudo-moar dc69da: OUTPUT«False␤»
15:22 timotimo you want to either check for exists, or use a definedness check (like "with" instead of "if")
15:22 espadrine_ joined #perl6
15:22 IOninja Right, it don't autoviviy, it gives you an Any and you call .elems on it
15:22 IOninja m: my %classified = [0].classify: { $_ > 0 ?? 'adults' !! 'babies' }; %classified<adults> andthen .elems.say
15:22 camelia rakudo-moar dc69da: ( no output )
15:23 IOninja m: my %classified = [0].classify: { $_ <= 0 ?? 'adults' !! 'babies' }; %classified<adults> andthen .elems.say
15:23 camelia rakudo-moar dc69da: OUTPUT«1␤»
15:23 IOninja m: my %classified = [0].classify: { $_ <= 0 ?? 'adults' !! 'babies' }; .elems.say with %classified<adults>
15:23 camelia rakudo-moar dc69da: OUTPUT«1␤»
15:23 IOninja m: my %classified = [0].classify: { $_ > 0 ?? 'adults' !! 'babies' }; .elems.say with %classified<adults>
15:23 camelia rakudo-moar dc69da: ( no output )
15:23 IOninja More than one way to skin a cat.
15:23 IOninja MTOWTSAC
15:24 cale2 This is the actual code I have now:       my @newborns.push(0) for ^(%classified<adults>.elems * $growth-rate);
15:24 lizmat actually, it returns a container that may vivify the element in the hash
15:24 cale2 I should change it to: my @newborns.push(0) for ^(%classified<adults>.elems // 0 * $growth-rate);
15:24 IOninja :o
15:25 lizmat m: my %h; my $a := %h<foo>; dd %h; $a = 42; dd %h
15:25 camelia rakudo-moar dc69da: OUTPUT«Hash %h = {}␤Hash %h = {:foo(42)}␤»
15:25 IOninja TIL
15:25 IOninja m: my %h; my $a := %h<foo>; dd %h; $a = Any; dd %h
15:25 camelia rakudo-moar dc69da: OUTPUT«Hash %h = {}␤Hash %h = {:foo(Any)}␤»
15:25 timotimo the most natural thing to be inside a hash isn't a list, it's a single object
15:25 IOninja how does it know
15:26 timotimo the magic of WHENCE
15:26 IOninja s: &postcircumfix:<{ }>, \(%, 'foo')
15:26 cale2 the defined-or // didn't work
15:26 SourceBaby IOninja, Sauce is at https://github.com/rakudo/rakudo/blob/4b85db6/src/core/hash_slice.pm#L6
15:26 timotimo well, where did you place it?
15:26 timotimo m: Any.elems // 0
15:26 camelia rakudo-moar dc69da: ( no output )
15:26 lizmat IOninja: Array, line 366
15:26 timotimo this won't do it
15:27 timotimo m: say Any.elems // 0
15:27 camelia rakudo-moar dc69da: OUTPUT«1␤»
15:27 timotimo because 1 is defined
15:27 cale2 fugg
15:27 timotimo you need something like this:
15:27 timotimo m: say (Any // []).elems
15:27 camelia rakudo-moar dc69da: OUTPUT«0␤»
15:28 cale2 it still iterates at least once
15:28 IOninja So when $!whence is a codeblock it gets called on first assignment or something?
15:28 timotimo are you still using for blah.elems? you need to put a ^ in front of the number
15:28 timotimo or else you'll always be doing one iteration, no matter what number it is
15:30 IOninja m: use nqp; nqp::p6bindattrinvres((my $special-something), Scalar, q|$!whence|, -> { say "meows" }); $special-something = 42; $special-something = 72
15:30 camelia rakudo-moar dc69da: OUTPUT«meows␤»
15:30 IOninja ehehe, neat.
15:31 IOninja Is there a way to get the value being assigned?
15:31 IOninja m: use nqp; nqp::p6bindattrinvres((my $special-something), Scalar, q|$!whence|, { say "meows" x $special-something }); $special-something = 3;
15:31 camelia rakudo-moar 4b85db: OUTPUT«meowsmeowsmeows␤»
15:31 IOninja haha, awesome
15:32 [Coke] IOninja: meowsome.
15:32 cale2 I'm using ^
15:33 timotimo ok, can you show your code again?
15:33 cale2 my @newborns.push(0) for ^(%classified<adults>.elems // [] * $growth-rate);
15:33 timotimo yeah, you've got a precedence problem
15:33 cale2 I wrapped it in parens and still didn't work
15:33 timotimo and your // [] is in the wrong spot
15:34 timotimo i told you you need to put (the thing // []).elems
15:34 timotimo not the thing.elems // []
15:34 cale2 ah
15:34 timotimo we may want to host a golly server on p6c :)
15:34 cale2 WORKS
15:34 IOninja What's a golly?
15:34 timotimo gobby*
15:34 timotimo golly is the cellular automaton program
15:34 timotimo gobby is the multi-user simultaneous text editor
15:35 IOninja Ah :)
15:35 timotimo i bet we can gte camelia or committable in there as a chatbot as well
15:35 timotimo and give it special commands like "camelia: line 10-15" or "camelia: run"
15:35 timotimo BBL
15:36 IOninja star: use LWP::Simple; use nqp; nqp::bindattr((my $title), Scalar, q|$!whence|, { LWP::Simple.get($title).match: /"<title>" (.+?) "</title>"/; $title = ~$/[0]}); $title = "http://perl6.party"; say $title
15:36 camelia star-m 2016.10: OUTPUT«Welcome - Perl 6 Party␤»
15:36 IOninja :}
15:37 IOninja Hm, you can rebind the whence... Cheaper Proxy?
15:40 jnthn Please do not encourage use of this outside of CORE.setting. We will quite likely want to kill it off at some point
15:40 araraloren What is *whence* ?
15:40 jnthn And replace it with something the various optimizers can reason about
15:40 llfourn joined #perl6
15:40 IOninja star: use LWP::Simple; use nqp; nqp::bindattr((my $title), Scalar, q|$!whence|, { LWP::Simple.get($title).match: /"<title>" (.+?) "</title>"/; $title = ~$/[0]; nqp::bindattr($title, Scalar, q|$!whence|, &?BLOCK) }); say $title; $title = "http://perl6.party"; say $title; $title = "http://brrt-to-the-future.blogspot.com/2017/02/register-allocator-update.html"; say $title
15:40 camelia star-m 2016.10: OUTPUT«(Any)␤Welcome - Perl 6 Party␤brrt to the future: Register Allocator Update␤»
15:41 araraloren It's not recommend to do that.
15:41 IOninja Haha
15:41 IOninja araraloren: whence is a professional secret :)
15:41 jnthn m: my %h; my $a := %h<b>; say %h.keys; $a = 42; say %h.keys
15:41 camelia rakudo-moar 4b85db: OUTPUT«()␤(b)␤»
15:42 jnthn It's the mechanism we currently use to make things like that work.
15:43 jnthn (Which will, of course, continue to work, but the current mechanism is costly.)
15:43 kjk joined #perl6
15:43 [Coke] IOninja: sharing the reifier is an intended consequence of clone, or a side effect of rakudo's implementation?
15:45 Geth ¦ doc: 02c0ff3782 | (Will "Coke" Coleda)++ | util/extract-examples.p6
15:45 Geth ¦ doc: fix typo
15:45 Geth ¦ doc: review: https://github.com/perl6/doc/commit/02c0ff3782
15:45 Geth ¦ doc: 4f640536f9 | (Will "Coke" Coleda)++ | 2 files
15:45 Geth ¦ doc: test examples in doc/Type/IO/ArgFiles.pod6
15:45 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4f640536f9
15:45 Geth ¦ doc: 10106249be | (Will "Coke" Coleda)++ | xt/words.pws
15:45 Geth ¦ doc: learn new words
15:45 Geth ¦ doc: review: https://github.com/perl6/doc/commit/10106249be
15:46 IOninja [Coke]: mmm.. side-effect that we're aware of, I guess.
15:47 IOninja I don't think they should share anything, but timotimo pointed out that they're then not really clones.
15:47 timotimo well, when you $a = [@b], you're not explicitly saying "i want a copy, please"
15:47 timotimo i think @b[] would definitely express that
15:48 IOninja timotimo: oh, well, that was just the example of .clone implementation 'cause llfourn proposed it and all the discussion I said was about the behaviour of .clone
15:49 timotimo oh
15:50 IOninja m: my @a = 1, {rand} ... $++ < 10; my @b = @a.clone; say @a[^3]; say @b[^3]
15:50 camelia rakudo-moar 4b85db: OUTPUT«(1 (Any) (Any))␤(1 (Any) (Any))␤»
15:51 araraloren It's a shadow copy.
15:52 timotimo copy on black instead of copy on white?
15:53 IOninja Sorry, got distracted here....
15:54 IOninja (by someone :) I don't have ADHD)
15:54 IOninja m: my @a = lazy 1, {rand} ... $++ > 10; my @b = @a.clone; say @a[^3]; say @b[^3]
15:54 camelia rakudo-moar 4b85db: OUTPUT«(1 0.471505249405541 0.984319991320413)␤(1 0.471505249405541 0.984319991320413)␤»
15:54 IOninja so what I was gonna say ^ here you get the same values in the clone. If reifier is not shared then you'll either get the same values OR different values depending on whether the array was already reified berfore the clone
15:55 IOninja So the shareage makes sense to me. It's the race coditions that are a bit LTA.
15:55 Geth ¦ doc: a634443cad | (Tom Browder)++ | doc/Language/regexes.pod6
15:55 Geth ¦ doc: tweak comments
15:55 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a634443cad
15:56 IOninja [Coke]: so... maybe more discussion of this is needed. But how? :)
15:56 IOninja FWIW I did add an explict test for shareage
15:56 [Coke] IOninja: was just curious. seems to be a reasonable thing for clone to do.
15:56 IOninja https://github.com/perl6/roast/blob/master/S32-array/create.t#L37-L39
15:57 IOninja OK
15:58 Geth ¦ doc: 116c879972 | (Will "Coke" Coleda)++ | doc/Language/regexes.pod6
15:58 Geth ¦ doc: remove trailing whitespace;
15:58 Geth ¦ doc: review: https://github.com/perl6/doc/commit/116c879972
16:00 ChoHag joined #perl6
16:00 [Coke] (docs) regarding our example testing; we cheat by wrapping everything in a class - some things cannot be run inside a class (like use lib) - should we force the examples to include a class {} around them in the docs?
16:00 eroux joined #perl6
16:00 [Coke] (the one that need it)
16:00 [Coke] *ones
16:02 cdg joined #perl6
16:04 Geth ¦ doc: 274c6d6d5f | (Will "Coke" Coleda)++ | 2 files
16:04 Geth ¦ doc: test examples in doc/Programs/00-running.pod6
16:04 Geth ¦ doc:
16:04 Geth ¦ doc: (... which are for now all skipped)
16:04 Geth ¦ doc: review: https://github.com/perl6/doc/commit/274c6d6d5f
16:05 llfourn joined #perl6
16:06 gfldex [Coke]: the example extractor was never meant to provide complete testing, however sena_kun is working on that problem
16:06 sena_kun [Coke], https://github.com/perl6/doc/blob/274c6d6d5f66f34da2e2a87353369a9f755cba5c/doc/Programs/00-running.pod6#L18-L49 - shouldn't it be a table, not a code?
16:07 Geth ¦ doc: 93a4b37b70 | (Will "Coke" Coleda)++ | 2 files
16:07 Geth ¦ doc: test examples in doc/Programs/01-debugging.pod6
16:07 Geth ¦ doc: review: https://github.com/perl6/doc/commit/93a4b37b70
16:07 mspo TimToady: https://www.infoq.com/presentations/Simple-Made-Easy isn't this intro more your style? :)
16:08 kigai joined #perl6
16:08 mspo anyway that video + slides format is pretty nice
16:08 [Coke] gfldex: I am also working on the problem.
16:08 gfldex brilliant, we may end up with two solutions that way \o/
16:08 [Coke] sena_kun: it wasn't a table before, was it? (I mean it looks like one, but it's not tagged as one.)
16:08 gfldex [Coke]: there will always be some examples we have to skip tho, so I would not spend too much time on that problem
16:10 [Coke] sena_kun: I only explicitly makred it as code so I could add :skip-test
16:10 [Coke] so if you can table-ify it, that would be great.
16:10 kigai [Coke], it wasn't, but I'm sure it should be. I've met valid tables that was marked as code for some reasons(most likely by mistake or a bit of ignorance) before.
16:10 kigai [Coke], I'll do now.
16:10 kigai Ah, hexchat changed my nick. :/
16:11 [Coke] whoever you are, thank you. :)
16:12 kjk m:  my @a = [1, 2, [3, 4], 5]; say flat @a; say @a.List; say flat @a.List;
16:12 camelia rakudo-moar 4b85db: OUTPUT«(1 2 [3 4] 5)␤(1 2 [3 4] 5)␤(1 2 3 4 5)␤»
16:12 timotimo arrays put all their contents into scalar containers, which don't flatten
16:13 timotimo but also, you may want to "dd" instead of "say" so that you see structure better
16:13 kjk m:  my @a = [1, 2, [3, 4], 5]; dd flat @a; dd @a.List; dd flat @a.List;
16:13 camelia rakudo-moar 4b85db: OUTPUT«(1, 2, $[3, 4], 5).Seq␤(1, 2, [3, 4], 5)␤(1, 2, 3, 4, 5).Seq␤»
16:13 timotimo m:  my @a = [1, 2, [3, 4], 5]; say (flat @a).perl; say @a.List.perl; say (flat @a.List).perl;
16:13 camelia rakudo-moar 4b85db: OUTPUT«(1, 2, $[3, 4], 5).Seq␤(1, 2, [3, 4], 5)␤(1, 2, 3, 4, 5).Seq␤»
16:13 timotimo yeah
16:14 kigai joined #perl6
16:14 SmokeMachine m: my $a = "bla"; $a = $a but False; dd $a; dd $a.Str; $a = $a.Str; dd $a; my $b = $a.Str; dd $b # shouldn't the last $a and $b be only Str?
16:14 camelia rakudo-moar 4b85db: OUTPUT«Str+{<anon|34954624>} $a = "bla"␤"bla"␤Str+{<anon|34954624>} $a = "bla"␤Str+{<anon|34954624>} $b = "bla"␤»
16:14 kjk timotimo: i see..., you are way ahead of me :) guess this comes up a lot, huh? thank you
16:14 timotimo flattening lists of lists and arrays of arrays and such is a topic that comes up at least once a month
16:15 kigai joined #perl6
16:16 gfldex kjk: yes it does :) https://gfldex.wordpress.com/2016/08/01/walk-on-the-flats/
16:16 SmokeMachine shouldn't .Str() or Str() return Str?
16:17 SmokeMachine m: ("bla" but role {}).Str.^name.say
16:17 camelia rakudo-moar 4b85db: OUTPUT«Str+{<anon|34109712>}␤»
16:17 SmokeMachine m: ("bla" but role {}).gist.^name.say
16:17 camelia rakudo-moar 4b85db: OUTPUT«Str+{<anon|49428752>}␤»
16:17 timotimo but that is a Str
16:18 IOninja hehe :)
16:18 SmokeMachine timotimo: not only Str...
16:18 kjk gfldex: thanks, will read it
16:18 timotimo but Str + anon ~~ Str
16:18 SmokeMachine m: S/(.*)/$1/g .^name.say given ("bla" but role {})
16:18 camelia rakudo-moar 4b85db: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of /g; in Perl 6 please use :g␤at <tmp>:1␤------> 3S/(.*)/$1/g7⏏5 .^name.say given ("bla" but role {})␤»
16:19 SmokeMachine m: S:g/(.*)/$1/ .^name.say given ("bla" but role {})
16:19 camelia rakudo-moar 4b85db: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call (only alphabetic methods may be detached)␤at <tmp>:1␤------> 3S:g/(.*)/$1/ .7⏏5^name.say given ("bla" but role {})␤»
16:19 gfldex SmokeMachine: Perl 6 doesn't really got a concept of a singular type. Even if it only got one type object, that just happens to be a list with one element.
16:19 IOninja m: S:g/(.*)/$1/.^name.say given ("bla" but role {})
16:19 camelia rakudo-moar 4b85db: OUTPUT«Use of Nil in string context␤  in code  at <tmp> line 1␤Use of Nil in string context␤  in code  at <tmp> line 1␤Str␤»
16:20 IOninja m: S:g/(.*)/$0/.^name.say given ("bla" but role {})
16:20 camelia rakudo-moar 4b85db: OUTPUT«Str␤»
16:20 IOninja looks good to me
16:20 ssotka joined #perl6
16:20 IOninja m: S:g/jghgjhgjhgjhghjjgh/$0/.^name.say given ("bla" but role {})
16:20 camelia rakudo-moar 4b85db: OUTPUT«Str+{<anon|53439680>}␤»
16:20 IOninja yup
16:21 SmokeMachine gfldex: but how do I get a string from a Str? i mean if I do 42.Str I get a Str...
16:21 IOninja SmokeMachine: ~ ''
16:21 SmokeMachine m: (42 but role{}).Str.^name.say
16:21 camelia rakudo-moar 4b85db: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Whitespace required after keyword 'role'␤at <tmp>:1␤------> 3(42 but role7⏏5{}).Str.^name.say␤»
16:21 IOninja SmokeMachine: for your but case. But Str is already a Str.
16:21 SmokeMachine m: (42 but role {}).Str.^name.say
16:21 camelia rakudo-moar 4b85db: OUTPUT«Str␤»
16:22 SmokeMachine m: (~("bla" but role {})).^name.say
16:22 camelia rakudo-moar 4b85db: OUTPUT«Str+{<anon|57760016>}␤»
16:22 IOninja m: say (~("bla" but role {})) ~~ Str
16:22 camelia rakudo-moar 4b85db: OUTPUT«True␤»
16:23 gfldex SmokeMachine: you can't handle raw objects, you always talk to some interface. The typiness is lost when the VM crosses the boundary to native libs
16:23 IOninja m: (''~("bla" but role {})).^name.say
16:23 camelia rakudo-moar 4b85db: OUTPUT«Str␤»
16:23 SmokeMachine m: ("bla" but role {}).Str === "bla"
16:23 camelia rakudo-moar 4b85db: OUTPUT«WARNINGS for <tmp>:␤Useless use of "===" in expression ".Str === \"bla\"" in sink context (line 1)␤»
16:23 SmokeMachine m: say ("bla" but role {}).Str === "bla"
16:23 camelia rakudo-moar 4b85db: OUTPUT«False␤»
16:23 SmokeMachine m: say "bla" === "bla"
16:23 camelia rakudo-moar 4b85db: OUTPUT«True␤»
16:24 IOninja SmokeMachine: what actual problem are you trying to solve?
16:26 SmokeMachine IOninja: I'm doing for @funcs -> &func { $word = fund($word) }; and fund may return $word but False; and Im getting:
16:26 SmokeMachine Str+{<anon|140262140200064>}+{<anon|140262140200336>}+{<anon|140262140200608>}+{<anon|140262140200880>}+{<anon|140262140201152>}+{<anon|140262140201424>}+{<anon|140262140201696>}+{<anon|140262140201968>}+{<anon|140262140202240>}+{<anon|140262140202512>}+{<anon|140262140202784>} $a = "bla"
16:27 IOninja hehe
16:27 SmokeMachine this: https://glot.io/snippets/en62c3a2jh
16:27 IOninja Well, that's the output of a non-Perl6 debug functions isn't it?
16:28 SmokeMachine yes... dd...
16:28 Actualeyes joined #perl6
16:28 * IOninja doesn't see a problem
16:28 IOninja Stop mixing it a ton of roles for no reason :)
16:29 SmokeMachine :(
16:29 Geth ¦ doc: 6e59f1d728 | (Tom Browder)++ | doc/Language/control.pod6
16:29 Geth ¦ doc: another stab at describing "when"
16:29 Geth ¦ doc: review: https://github.com/perl6/doc/commit/6e59f1d728
16:29 devmikey joined #perl6
16:30 IOninja SmokeMachine: but as I showed, use ~ '' if you want to get rid of all the mixins
16:30 IOninja m: (''~("bla" but role {})).^name.say
16:30 camelia rakudo-moar 4b85db: OUTPUT«Str␤»
16:30 pierrot joined #perl6
16:30 tbrowder .tell timotimo please look at "when" doc commit
16:30 yoleaux tbrowder: I'll pass your message to timotimo.
16:30 IOninja .Str does return a Str type. I don't see a problem with current behaviour.
16:32 SmokeMachine IOninja: thanks... (IMHO it should return a "only" Str... but its only my opinion...)
16:33 jnthn Coercion methods returning a subtype is fine
16:33 IOninja It's not even a subtype, just the type with a role mixed in.
16:33 gfldex tbrowder: while you are on it `when`  defaults to `$_ ~~` while `if` doesnt.
16:34 jnthn IOninja: That's how mixins work: they create a subtype, compose the role into it, and then turn the object into the subtype :)
16:34 IOninja Ah
16:34 IOninja Cool.
16:35 sena-kun [Coke], don't forget that =begin/=for code directives should be on the same indendation level as the actual code, otherwise you'll get unnecessary indentation.
16:36 sena-kun I don't know is it bug or feature.
16:36 gfldex sena-kun: that's a bug
16:37 itcharlie joined #perl6
16:37 hoelzro joined #perl6
16:37 sena-kun gfldex, is it a known bug?
16:37 gfldex yes
16:37 sena-kun ah, okay than.
16:38 SmokeMachine does any one know why Im getting the error "Use of uninitialized value <element> of type Any in string context\nAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed.  in block  at /tmp/330122387/lib/RSLP/Rule.pm6 (RSLP::Rule) line 18" here? https://glot.io/snippets/en62c3a2jh
16:39 IOninja It's a warning not an error.
16:40 SmokeMachine yes, sorry, I mean warning...
16:40 perlpilot SmokeMachine: because not all of your rules have exception set
16:41 SmokeMachine hum! exceptions!!!
16:41 SmokeMachine I was looking at line 18!
16:41 SmokeMachine perlpilot: thanks!
16:42 jnthn Line numbers are added at statement level at the moment, so multi-line statements can sometimes be a bit confusing
16:42 jnthn Sometime to try and fix at some point :)
16:42 jnthn *something
16:42 perlpilot SmokeMachine: also, it looks like you're using both "exception" and "exceptions"
16:42 snowkiss21 joined #perl6
16:43 sena-kun btw, I'll merge https://github.com/perl6/doc/pull/1192 as, it seems, nobody is against and we planned it for a while. After the merge https://github.com/perl6/doc/issues/776 will be closed.
16:43 SmokeMachine the one on the plural form is to receive a array and than I transform that array into a Junction on the not plural form...
16:43 perlpilot ok.  I wasn't sure as I didn't look at the code in detail.
16:46 gregf_ joined #perl6
16:56 benjibenji joined #perl6
16:57 IOninja huh "The RT System itself - Status changed from 'rejected' to 'open'": https://rt.perl.org/Ticket/Display.html?id=130636#ticket-history
16:57 IOninja wonder what happened
16:58 IOninja Getting sentient and trolly...
16:58 IOninja But I showed that RT System who's boss
16:58 Geth ¦ doc: f68df26403 | (Tom Browder)++ | doc/Language/control.pod6
16:58 Geth ¦ doc: tweak wording, correct format errors
16:58 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f68df26403
17:05 Geth ¦ doc: 43756336e7 | (Tom Browder)++ | doc/Language/control.pod6
17:05 Geth ¦ doc: add default use of $_ to "when"
17:05 Geth ¦ doc: review: https://github.com/perl6/doc/commit/43756336e7
17:05 tbrowder gfldex:  okay...
17:14 Geth ¦ doc: 46ffe0d035 | Altai-man++ | CONTRIBUTING.md
17:14 Geth ¦ doc: Explain examples output style
17:14 Geth ¦ doc: review: https://github.com/perl6/doc/commit/46ffe0d035
17:14 Geth ¦ doc: a7f74fe9f9 | Altai-man++ | CONTRIBUTING.md
17:14 Geth ¦ doc: Merge pull request #1192 from perl6/contributing-examples-style
17:14 Geth ¦ doc:
17:14 Geth ¦ doc: Contributing examples output style explanation
17:14 Geth ¦ doc: review: https://github.com/perl6/doc/commit/a7f74fe9f9
17:14 zakharyas joined #perl6
17:16 TimToady m: my @a = <one two three>; my $b = [@a,]; @a.push("four"); say $b;  # [@a] copies by one-arg rule
17:16 camelia rakudo-moar 4b85db: OUTPUT«[[one two three four]]␤»
17:17 TimToady oops, mischan
17:21 llfourn joined #perl6
17:22 khw joined #perl6
17:40 IOninja m: my @a = <one two three>; my @b = @a,; @a = @b,; @a.push("four"); say @b; say @a
17:40 camelia rakudo-moar 4b85db: OUTPUT«(\Array_66586808 = [[Array_66586808 four]])␤(\Array_66586920 = [[Array_66586920] four])␤»
17:40 IOninja hehe
17:40 IOninja m: my @a = <one two three>; my @b = @a,; @a = @b,; @a.push("four"); say @b.perl; say @a.perl
17:40 camelia rakudo-moar 4b85db: OUTPUT«(my \Array_61540616 = [[Array_61540616, "four"],])␤(my \Array_61541120 = [[Array_61541120,], "four"])␤»
17:41 IOninja m: my @a = <one two three>; @a = @a,; @a.perl.EVAL.say
17:41 camelia rakudo-moar 4b85db: OUTPUT«[(Mu)]␤»
17:41 IOninja .oO( close 'nuf... )
17:43 agentzh joined #perl6
17:44 IOninja m: q|(my \Array_60715336 = [{Array_60715336}(),])|.EVAL.say
17:44 camelia rakudo-moar 4b85db: OUTPUT«[(Mu)]␤»
17:44 IOninja m: q|(my @Array_60715336 = [{@Array_60715336}(),])|.EVAL.say
17:44 camelia rakudo-moar 4b85db: OUTPUT«(\Array_38592536 = [Array_38592536])␤»
17:45 IOninja How come @foo works but \foo doesn't above?
17:45 IOninja Or... how come there's an error about trying to initialize itself with the @foo but not with \foo
17:47 IOninja m: q|(my @Array_60715336 = [42, {@Array_60715336}()[0],])|.EVAL.say
17:47 camelia rakudo-moar 4b85db: OUTPUT«[42 (Any)]␤»
17:47 IOninja Ahhh. 'cause the @foo already got a container
17:52 IOninja m: q|((my @Array_62604976) = 42, @Array_62604976,)|.EVAL[1][1][1][0].say
17:52 camelia rakudo-moar 4b85db: OUTPUT«42␤»
17:52 IOninja \o/
17:57 ChoHag joined #perl6
18:01 lizmat_ joined #perl6
18:02 sufrostico joined #perl6
18:04 girafe joined #perl6
18:12 IOninja hm, what other thing can you make circular that isn't an Array or a Hash?
18:15 gfldex IOninja: maybe a Pair?
18:16 ugexe m: my \a = \a; say a
18:16 camelia rakudo-moar 4b85db: OUTPUT«Cannot call method 'perl' on a null object␤  in block <unit> at <tmp> line 1␤␤»
18:16 IOninja hah
18:17 IOninja m: my $p = :42a; $p.value = $p; say 4p
18:17 camelia rakudo-moar 4b85db: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3my $p = :42a; $p.value = $p; say 47⏏5p␤»
18:17 IOninja m: my $p = :42a; $p.value = $p; say $p
18:17 camelia rakudo-moar 4b85db: OUTPUT«Cannot modify an immutable Int␤  in block <unit> at <tmp> line 1␤␤»
18:17 IOninja m: my $p = :42a; $p.value := $p; say $p
18:17 camelia rakudo-moar 4b85db: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use bind operator with this left-hand side␤at <tmp>:1␤------> 3my $p = :42a; $p.value := $p7⏏5; say $p␤»
18:17 IOninja gfldex: how can it be done?
18:17 IOninja oh
18:17 IOninja m: my $p; $p = :a($p); say $p
18:17 camelia rakudo-moar 4b85db: OUTPUT«(\Pair_57833856 = a => Pair_57833856)␤»
18:17 IOninja cool
18:17 IOninja m: my $p; $p = :a($p); say $p.perl.EVAL<a>
18:17 camelia rakudo-moar 4b85db: OUTPUT«(Mu)␤»
18:18 gfldex m: class C { has $.c is rw }; my $c = C.new; $c.c = $c; dd $c;
18:18 camelia rakudo-moar 4b85db: OUTPUT«C $c = (my \C_31805024 = C.new(c => C_31805024))␤»
18:18 IOninja hmmm
18:18 gfldex enum may work too using the MOP
18:18 gfldex in fact, pretty much anything might work using the MOP
18:19 IOninja m: q|((my $Pair_57833856) = a => $Pair_57833856)|.EVAL<a>
18:19 camelia rakudo-moar 4b85db: ( no output )
18:19 IOninja m: q|((my $Pair_57833856) = a => $Pair_57833856)|.EVAL<a>.say
18:19 camelia rakudo-moar 4b85db: OUTPUT«(\Pair_50370960 = a => Pair_50370960)␤»
18:19 IOninja m: q|((my $Pair_57833856) = a => $Pair_57833856)|.EVAL<a><a><a>.say
18:19 camelia rakudo-moar 4b85db: OUTPUT«(\Pair_36893024 = a => Pair_36893024)␤»
18:19 gfldex it's recursions all the way down
18:20 IOninja Well, I have a fix for Array and Hash. Not sure about the rest though 'cause of the container stuff
18:20 IOninja you can't (my \foo) = [foo,];
18:20 IOninja oohh
18:20 IOninja m: q|((my $Pair_57833856) = a => $Pair_57833856<>)|.EVAL<a><a><a>.say
18:20 camelia rakudo-moar 4b85db: OUTPUT«(Any)␤»
18:20 IOninja hm nevermind. I thought <> thing deconted
18:22 llfourn joined #perl6
18:23 _kristian joined #perl6
19:01 moritz joined #perl6
19:04 Geth ¦ doc: 30380fd806 | (Will "Coke" Coleda)++ | doc/Language/control.pod6
19:04 Geth ¦ doc: remove trailing whitespace
19:04 Geth ¦ doc: review: https://github.com/perl6/doc/commit/30380fd806
19:09 AlexDaniel joined #perl6
19:16 itcharlie left #perl6
19:17 cdg joined #perl6
19:21 llfourn joined #perl6
19:30 espadrine joined #perl6
19:44 agentzh joined #perl6
19:45 AlexDaniel IOninja: re “what other thing can you make circular that isn't an Array or a Hash?”
19:45 AlexDaniel m: my $x := (my $y := $x); say $x.WHAT
19:45 camelia rakudo-moar 67aeef: OUTPUT«(Mu)␤»
19:46 AlexDaniel (RT #127254)
19:46 synopsebot6 Link:  https://rt.perl.org/rt3//Public/Bug/Display.html?id=127254
19:46 AlexDaniel bisect: my $x := (my $y := $x); say $x.WHAT
19:46 bisectable6 AlexDaniel, Bisecting by exit signal (old=2015.12 new=67aeefa). Old exit signal: 11 (SIGSEGV)
19:46 bisectable6 AlexDaniel, bisect log: https://gist.github.com/fefb62ce77d582687e23e0c0df188465
19:46 bisectable6 AlexDaniel, (2016-04-13) https://github.com/rakudo/rakudo/commit/ae2ae92330e5b861b47500de0d8b0855297757a3
19:52 IOninja AlexDaniel: I don't get what's circular about it. You're just replacing the container with it's self are you not?
19:53 IOninja itself
19:53 timotimo <> on a scalar will decont, won't it?
19:53 yoleaux 16:30Z <tbrowder> timotimo: please look at "when" doc commit
19:53 IOninja m: my $x := (my $y := $x); $y = 42; say $x
19:53 camelia rakudo-moar 67aeef: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at <tmp> line 1␤␤»
19:54 IOninja timotimo: yeah, it does.
19:54 IOninja AlexDaniel: actually, you're binding a Mu to it even, innit?
19:55 AlexDaniel IOninja: well, as I read it, $y should be bound to $x while $x is bound to $y…
19:55 IOninja m: ((my $P) = a => $P<>); say $P
19:55 camelia rakudo-moar 67aeef: OUTPUT«a => (Any)␤»
19:55 AlexDaniel m: my $x := (my $y = 5); $y = 42; say $x; say $y
19:55 camelia rakudo-moar 67aeef: OUTPUT«42␤42␤»
19:55 AlexDaniel m: my $x := (my $y = 5); $x = 42; say $x; say $y
19:55 camelia rakudo-moar 67aeef: OUTPUT«42␤42␤»
19:55 IOninja timotimo: ^ but in this case it's done before $P got any real value, so you get an Any there
19:55 IOninja That's what I meant back when I first thought <> was broke above
19:56 AlexDaniel IOninja: and no, that's not Mu. That's null
19:57 AlexDaniel m: my $x := (my $y := $x); say $x.^name
19:57 camelia rakudo-moar 67aeef: OUTPUT«VMNull␤»
19:57 AlexDaniel m: Mu.^name
19:57 camelia rakudo-moar 67aeef: ( no output )
19:57 AlexDaniel m: say Mu.^name
19:57 camelia rakudo-moar 67aeef: OUTPUT«Mu␤»
19:57 IOninja m: my $x; $x := (my $y := $x); $y = 42; say $x; $x = 72; say $x
19:57 camelia rakudo-moar 67aeef: OUTPUT«42␤72␤»
19:57 IOninja Ah, OK.
19:58 IOninja AlexDaniel: I think that should really complain about using the variable to initialize itself
19:58 IOninja m: my @a = @a; # like this one does
19:58 camelia rakudo-moar 67aeef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use variable @a in declaration to initialize itself␤at <tmp>:1␤------> 3my @a = @7⏏5a; # like this one does␤    expecting any of:␤        term␤»
19:58 IOninja And then you don't get any VMNulls
19:58 IOninja m: my \x := (my $y := x); say x.^name
19:58 camelia rakudo-moar 67aeef: OUTPUT«VMNull␤»
19:58 AlexDaniel IOninja: yes, it should probably be disallowed
19:58 IOninja Same here
19:58 andrzejku_ joined #perl6
19:59 AlexDaniel since when it started giving a warning by the way…
19:59 andrzejku_ hey
19:59 AlexDaniel not even a warning though
19:59 andrzejku_ what do you know about Perl6 and IoT?
19:59 AlexDaniel bisect: my @a = @a
19:59 bisectable6 AlexDaniel, On both starting points (old=2015.12 new=67aeefa) the exit code is 1 and the output is identical as well
19:59 bisectable6 AlexDaniel, Output on both points: ===SORRY!=== Error while compiling /tmp/wax1dYBxM9␤Cannot use variable @a in declaration to initialize itself␤at /tmp/wax1dYBxM9:1␤------> my @a = @⏏a␤    expecting any of:␤        term
19:59 AlexDaniel c: all my @a = @a
19:59 committable6 AlexDaniel, https://gist.github.com/d57b425c2542275aab1340dd8461b4e5
20:00 IOninja andrzejku_: are you hunting for the vaugest of questions? :)
20:00 AlexDaniel bisect: old=2015.07 my @a = @a
20:00 bisectable6 AlexDaniel, Bisecting by exit code (old=2015.07 new=67aeefa). Old exit code: 0
20:00 bisectable6 AlexDaniel, bisect log: https://gist.github.com/05a3d1105ed35d4624b055815876f48d
20:00 bisectable6 AlexDaniel, (2015-08-17) https://github.com/rakudo/rakudo/commit/3754356d8e4401c2e567f20462adb2ecd97dc7d5
20:00 IOninja vaguest even\
20:00 andrzejku_ IOninja, no
20:01 andrzejku_ look here https://www.linux.com/news/event/elcna/2017/2/using-scripting-languages-iot-challenges-and-approaches
20:02 IOninja tl;dr
20:03 bjz joined #perl6
20:03 AlexDaniel m: my @a = @::a, 25; say @a
20:03 camelia rakudo-moar 67aeef: OUTPUT«(\Array_53743872 = [Array_53743872 25])␤»
20:03 AlexDaniel um, why was it disallowed, by the way?
20:04 DrForr Perl 6 has been compiled to Android and ARM, at the very least. What are you asking about specifically, andrzejku?
20:04 IOninja m: my @a = @::a, 25; say @a.perl.EVAL[0][0][0][1]
20:04 camelia rakudo-moar 67aeef: OUTPUT«25␤»
20:04 andrzejku_ I am asking if someone started to play with it
20:04 IOninja andrzejku_: why?
20:05 AlexDaniel m: my $a := $::a; say $a
20:05 camelia rakudo-moar 67aeef: OUTPUT«(Mu)␤»
20:05 andrzejku_ IOninja, because IoT every language got its own support for IoT?
20:05 AlexDaniel m: my $a := $::a; say $a.^name
20:05 camelia rakudo-moar 67aeef: OUTPUT«VMNull␤»
20:05 AlexDaniel so nothing has changed
20:05 AlexDaniel c: 3754356d8e my $a := $::a; say $a.^name
20:05 committable6 AlexDaniel, ¦«3754356»:  «exit signal = SIGSEGV (11)»
20:05 andrzejku_ IOninja, http://artoo.io/
20:05 AlexDaniel yes, the fix didn't fix anything
20:05 andrzejku_ even ruby
20:05 AlexDaniel it's jnthn's work that resolved the underlying segv problem
20:05 IOninja andrzejku_: but why are you asking about it?
20:06 andrzejku_ IOninja, I am curious
20:06 AlexDaniel and the patch actually broke a feature?
20:06 AlexDaniel :S
20:06 IOninja AlexDaniel: hm, you're right, seems at least @ and % can be used to init selfs
20:06 jraglin joined #perl6
20:06 IOninja m: my %h = :b(
20:06 camelia rakudo-moar 67aeef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at <tmp>:1␤------> 3my %h = :b(7⏏5<EOL>␤»
20:06 AlexDaniel I see no reason why I cannot have a self-referential array
20:07 IOninja m: my %h = :b(%::h), :42a; say %h<b><b><a>
20:07 camelia rakudo-moar 67aeef: OUTPUT«42␤»
20:07 AlexDaniel m: my @a = 25, @a
20:07 camelia rakudo-moar 67aeef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use variable @a in declaration to initialize itself␤at <tmp>:1␤------> 3my @a = 25, @7⏏5a␤    expecting any of:␤        term␤»
20:07 DrForr andrzejku_: Support for IoT doesn't magically come into existence for any language. It needs people interested in it and working on it.
20:07 AlexDaniel like wtf, why not
20:07 IOninja AlexDaniel: so... you're submitting a patch then :)
20:07 AlexDaniel sure
20:07 IOninja m: my $x = $x
20:07 camelia rakudo-moar 67aeef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use variable $x in declaration to initialize itself␤at <tmp>:1␤------> 3my $x = $7⏏5x␤    expecting any of:␤        term␤»
20:07 AlexDaniel I can do that
20:07 AlexDaniel m: my $x = $::x
20:07 camelia rakudo-moar 67aeef: ( no output )
20:07 IOninja AlexDaniel++
20:07 andrzejku_ ok
20:07 IOninja m: my $x = $::x; say $x.^name
20:07 camelia rakudo-moar 67aeef: OUTPUT«Any␤»
20:08 andrzejku_ but do you think if for example I would start creating IoT
20:08 andrzejku_ and after a few month
20:08 IOninja AlexDaniel: Well, with $x I guess it don't make sense, eh? And with \foo
20:08 andrzejku_ people start to use it
20:08 andrzejku_ that's a question if Perl6 is only for scripts and web
20:08 AlexDaniel the revert might open some other ways to create VMNulls, but you can do it anyway if you really try
20:08 andrzejku_ I don't know
20:08 AlexDaniel so it falls under DIHWIDT
20:08 DrForr andrzejku_: You're more than welcome to put your modules up on GitHub and we'll add them to modules.perl6.org.
20:09 andrzejku_ okay
20:09 AlexDaniel IOninja: yeah, for scalars maybe not
20:09 andrzejku_ probably the best solution should be to use Perlix as embedded for IoT
20:09 AlexDaniel IOninja: actually forget what I've just said
20:09 DrForr andrzejku_: Perl6 is not just for "scripting and web." There are GUI libraries, I was just seeing talk about people optimizing games using SDL.
20:09 AlexDaniel m: my $a = ($::a, 25)
20:09 camelia rakudo-moar 67aeef: ( no output )
20:09 AlexDaniel m: my $a = ($::a, 25); say $a
20:09 camelia rakudo-moar 67aeef: OUTPUT«(\List_73050816 = (List_73050816 25))␤»
20:09 IOninja hehe cool
20:09 AlexDaniel IOninja: scalars are alright
20:09 andrzejku_ okay
20:10 IOninja m: my \a = (a, 25); say a
20:10 camelia rakudo-moar 67aeef: OUTPUT«((Mu) 25)␤»
20:10 IOninja Funny that for the case that actually doesn't work it doesn'
20:10 IOninja t complain :")
20:10 andrzejku_ DrForr, I am just afraid that many good Perl developers will die soon
20:10 andrzejku_ and we need to code more
20:11 DrForr andrzejku_: Perlix was a joke that someone may have carried a bit far. If you want IoT support for Perl 6, whatever that means, it's not going to happen unless somoene builds it.
20:11 andrzejku_ to keep Perl alive
20:11 DrForr andrzejku_: I work in an office with 40+ Perl hackers, all roughly 22-25 years old.
20:11 * IOninja is only 30
20:12 andrzejku_ DrForr, huh so they are pretty young
20:12 DrForr Why are you afraid of Perl developers dying? Where did you get this evidence?
20:12 IOninja I meant 17
20:13 El_Che IOT is not the spot you want to go right now with a new language. The contraints are very... contraining
20:13 * IOninja would prefer the depressing self-fullfilling profecies about "Perl Dying" and people whining about it would stay in Perl 5 land
20:13 andrzejku_ DrForr, what about people which were at the Perl creation? if Perl was started at 87' so they guy who was a new developer got in 87' 20years + 20years because we got now 2017 so they got 40years +
20:13 andrzejku_ old good perl developers are 40+
20:13 IOninja andrzejku_: so?
20:14 andrzejku_ this is the age when programmers going die
20:14 El_Che andrzejku_: non dynamic languages are clearly in the advantage there
20:14 IOninja andrzejku_: what does that have to do with anything?
20:14 andrzejku_ I watch once the Netscape programmers they look unhealthy as fuck
20:15 IOninja andrzejku_: what does that have to do with a language... and Perl 6 especially?
20:15 andrzejku_ IOninja, old perlers will die and there no many young
20:15 andrzejku_ though
20:16 IOninja andrzejku_: what do you base this data on?
20:16 DrForr andrzejku_: Perl really started to get adopted around version 5 in the late 90s, actually.
20:16 pmurias joined #perl6
20:16 IOninja andrzejku_: what's your proof?
20:16 andrzejku_ IOninja, I just calculated this above
20:17 perlpilot andrzejku_: your "calculation" is anecdote, not proof
20:17 andrzejku_ there no proof I just calculated and I am worried a bit
20:17 IOninja andrzejku_: the obvious flaw in your calculation is assuming Perl developers = Perl 6 developers = People who were programmers in '87 and no new programmers were birthed ever since
20:17 DrForr andrzejku_: And based it on the completly fallacious notion that you have to start with perl 1. LIke I said, most poeple starteed using it around verison 5.
20:17 IOninja andrzejku_: it's asinine
20:17 DrForr *version
20:17 IOninja andrzejku_: Here. 16 year olds presenting about Perl 6: https://medium.com/hypetonic/perl-6-the-music-less-musical-530bb1aeeff2#.utv4acifm
20:17 IOninja Your argument is invalid.
20:20 andrzejku_ ya I don't say that I am right
20:20 andrzejku_ but I am worried
20:20 DrForr You're making up data and then presenting it as a strawman.
20:21 andrzejku_ DrForr, :)
20:21 DrForr Why be worried if you don't even know if your data is right? Confirm it first.
20:21 andrzejku_ okay okay nevermind
20:21 perlpilot Unless being worried motivates you to do something to help the Perl community ...  ;)
20:22 andrzejku_ perlpilot, yes that's true
20:22 andrzejku_ perlpilot, that's my motivation though
20:22 llfourn joined #perl6
20:22 IOninja I'd suggest you pick a different one.
20:23 DrForr At least one that's not so easy to drive holes through :)
20:24 IOninja Write stuff you enjoy writing. So you'd be interested in maintaining it and provide support for it.
20:24 IOninja Writing stuff under the delusion that if you just write X modules somehow users will happen will just leave piles of bitrot.
20:24 andrzejku_ IOninja, sure okay
20:24 IOninja Exhibit A: https://metacpan.org/release/WebService-Cryptsy
20:25 IOninja Note the note: https://metacpan.org/pod/WebService::Cryptsy#MAINTENANCE-NOTE
20:25 perlpilot andrzejku_: For play, http://adventofcode.com is nice.  I've been off and on using Perl 6 to solve those problems.
20:27 perlpilot andrzejku_: the only ones (that I remember) that give Perl 6 problems are the ones where you need to compute many MD5 hashes.  Rakudo is a bit slow at that.
20:27 andrzejku_ perlpilot, I prefer exercism
20:28 IOninja perlpilot: but... use moar coares \o/
20:29 IOninja Perl 6 is 2,000% faster by adding two words of code: http://tpm2016-2.zoffix.com/#/16
20:29 IOninja http://tpm2016-2.zoffix.com/#/15
20:30 perlpilot yeah, my next bit of play with that might be doing that.
20:30 IOninja :)
20:30 perlpilot and/or using NativeCall to hack in a C version of MD5
20:31 El_Che IOninja: are the words "Abra Cadabra"? :)
20:31 DrForr I thought it was Avada ...
20:32 IOninja El_Che: no. start and await. I'm not even making the numbers up. Though I did use a 32-core box :)
20:32 TEttinger joined #perl6
20:32 DrForr I thought it was Avada Kadavra or something like that.
20:33 agentzh joined #perl6
20:33 IOninja https://en.wikipedia.org/wiki/Abracadabra
20:33 El_Che DrForr: "I create as I speak". Transliterated from Aramic -> Hebrew, so it will have many spellings :)
20:34 El_Che and you're suppose to read it with a Spanish accent
20:34 El_Che :)
20:35 El_Che ah, tha avada thing is a harry potter thing?
20:35 DrForr I gave up around the Gobbledy of Gook :)
20:37 AlexDaniel joined #perl6
20:38 AlexDaniel “I am just afraid that many good Perl developers will die soon” well, heh… There are many young developers, don't worry
20:38 El_Che “I am just afraid that many good Perl developers will die soon" <-- sounds like a threat :)
20:39 DrForr "Nice language, shame if something were to *happen* to it."
20:39 IOninja :)
20:39 tony-o haha
20:39 El_Che "Make it faster or else"
20:40 AlexDaniel I also loved this: “old good perl developers are 40+, this is the age when programmers going die”
20:41 AlexDaniel that's a very optimistic view on the life expectancy
20:41 IOninja m: my $p = :a($::p); say $p
20:41 camelia rakudo-moar 67aeef: OUTPUT«(\Pair_66335072 = a => Pair_66335072)␤»
20:41 DrForr Based on a sample size of seeing a few people in the 90s.
20:41 IOninja AlexDaniel: ^ another one that don't need the using-to-init-self error
20:42 perlpilot Have Perl programmers in their 40s been dying off and I just didn't notice?  ;-)
20:42 AlexDaniel IOninja: yea, the error has to go
20:42 [Coke] (potter) https://imgur.com/gallery/rgskT
20:46 * geekosaur didn't notice dying within the last 10ish years...
20:47 DrForr I know of 2 at least, but I'm not feeding the fire.
20:47 IOninja m: my @a; my $p = :a(@a); @a = @a, $p; $p.perl.EVAL.perl.say
20:47 camelia rakudo-moar 67aeef: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Term definition requires an initializer␤at /home/camelia/EVAL_0:1␤------> 3((my \Pair_495672327⏏5) = :a(((my @Array_49216448) = [@Array_4␤»
20:47 IOninja whoooops
20:47 IOninja I broke it
20:47 AlexDaniel geekosaur: well, heh, then you're not a *good* Perl developer :P
20:48 IOninja m: my $p = :a($::p); $p.perl.EVAL.say
20:48 camelia rakudo-moar 67aeef: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0␤Term definition requires an initializer␤at /home/camelia/EVAL_0:1␤------> 3((my \Pair_689514087⏏5) = :a(\Pair_68951408))␤»
20:48 IOninja star: my $p = :a($::p); $p.perl.EVAL.say
20:48 camelia star-m 2016.10: OUTPUT«a => (Mu)␤»
20:48 IOninja Well.. it's not like it worked in the past :}
20:48 AlexDaniel c: all my $p = :a($::p); $p.perl.EVAL.say
20:48 AlexDaniel who knows? :)
20:48 committable6 AlexDaniel, https://gist.github.com/acc9544ae2d355809ccf01e8530d85a8
20:49 AlexDaniel wait what…
20:49 AlexDaniel ah, right!
20:50 cpage__ joined #perl6
20:50 * IOninja relocates
20:53 eliasr joined #perl6
20:53 Rogbro joined #perl6
20:54 Actualeyes joined #perl6
20:57 Rogbro p6: say "ok" if " (" ~~ rx{'(´ <!after \s>}
20:57 camelia rakudo-moar 67aeef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in single quotes; couldn't find final "'" ␤at <tmp>:1␤------> 3say "ok" if " (" ~~ rx{'(´ <!after \s>}7⏏5<EOL>␤    expecting any of:␤        single quotes␤»
20:58 [Coke] Rogbro: can't mix those types of single quotes.
20:58 AlexDaniel u: `
20:58 unicodable6 AlexDaniel, U+0060 GRAVE ACCENT [Sk] (`)
20:58 AlexDaniel well, that's not quite a quote…
21:00 Rogbro p6: say "ok" if " (" ~~ rx{"(" <!after \s>}
21:00 camelia rakudo-moar 67aeef: OUTPUT«ok␤»
21:00 jraglin joined #perl6
21:06 Rogbro p6: say "ok" if " (" ~~ rx{<!after \s> "("}
21:06 camelia rakudo-moar 67aeef: ( no output )
21:07 cdg joined #perl6
21:11 IOninja p6: say "ok" if " (" ~~ rx{<![\s]> "("}
21:11 camelia rakudo-moar 67aeef: OUTPUT«ok␤»
21:11 IOninja :(
21:12 sufrostico joined #perl6
21:13 IOninja Ah, that's for look ahead o.ly
21:14 IOninja p6: say "ok" if " (" ~~ rx{<![\s]> . "("}
21:14 camelia rakudo-moar 67aeef: ( no output )
21:14 IOninja \o/
21:15 cdg_ joined #perl6
21:17 jjido joined #perl6
21:24 llfourn joined #perl6
21:26 mr-foobar joined #perl6
21:27 cale2 If a "help wanted" section gets added to perl6weekly, I was going to mention Exercism.io and Perl6Koans. Both would be great for exposure and education
21:37 perlpilot cale2: you know what's a great way to get that section added?  Start doing perl6weekly  ;)
21:41 gfldex cale2: blog about it and lizmat will link to it
21:43 bjz joined #perl6
21:49 jraglin joined #perl6
21:56 cdg joined #perl6
21:57 kurahaupo__ joined #perl6
22:10 cale2 Blogging is a scary thing... never tried it before. What's the best way to do it without building a whole website?
22:11 cale2 perlpilot: I could probably help with that, but I'm very out of the loop on actual development work.
22:11 gfldex cale2: I write it in markdown then convert it to html and paste it on WP
22:11 IOninja One of available ways is to write it in markdown and submit a PR: https://github.com/zoffixznet/perl6.party/blob/master/CONTRIBUTING.md
22:12 IOninja If you want to post it on perl6.party. Though I imagine it's trivial to setup your own WP blog
22:12 pyrimidine joined #perl6
22:14 IOninja And WP's prolly preferable: no PRs, edit all you want, no one mistakenly thinks I wrote the post, and I don't have to implement the multi-author bits :P
22:25 llfourn joined #perl6
22:28 samcv good * perl*
22:29 samcv NeuralAnomaly, status
22:29 NeuralAnomaly samcv, [✘] Next release will be in 1 day and 7 hours. Since last release, there are 45 new still-open tickets (0 unreviewed and 0 blockers) and 10 unreviewed commits. See http://perl6.fail/release/stats for details
22:30 samcv tell me about Perl6Koans cale2
22:30 IOninja \o
22:31 cale2 samcv: https://github.com/WildYorkies/Perl6Koans I found the PerlKoans repo and it works great. It uses Test::More which is super easy to translate to Perl6. The main thing I need help with is how to translate the Perl5 packaging and command line stuff to Perl6
22:32 cale2 I know next to nothing about Perl5, you see
22:33 IOninja It's pretty easy. Ignore all the line noise and look up the remaining bits via `perldoc -f function-name` and `perldoc -v '$^X'` for weird variables
22:33 IOninja ...and read perldoc perlreftut and perldoc perlretut
22:33 cale2 step one is to get the PerlKoans thing to simply run with rakudo. The next step is writing content that is specifically for Perl6 language (which I can do if no one wants to help with that portion)
22:35 cale2 IOninja: https://github.com/WildYorkies/Perl6Koans/blob/master/lib/Perl/Koans.pm6#L33 here to line 51 is an example of stuff I don't understand
22:35 IOninja cale2: same as in Perl6; that loads a module
22:35 IOninja go to https://metacpan.org/pod/MODULE-NAME to view its docs
22:37 AlexDaniel I hate when you want to revert something but there are conflicts :S
22:37 cale2 but the import is the same? what about those ! operators? $CLASS == $PACKAGE, $tb->level(2) etc etc
22:38 IOninja -> is a method call, foo->bar is foo.bar in Perl 6
22:38 IOninja Oh, and also dereferencing op
22:38 IOninja cale2: which ! operators? which line?
22:39 IOninja m: $*DISTRO.is-win.say
22:39 camelia rakudo-moar 67aeef: OUTPUT«False␤»
22:39 IOninja ^ that's replacement for this line https://github.com/WildYorkies/Perl6Koans/blob/master/lib/Perl/Koans.pm6#L50
22:40 IOninja https://github.com/WildYorkies/Perl6Koans/blob/master/lib/Perl/Koans.pm6#L34 this? A while guess would be that's asking to import everything BUT those routines, but check the module's docs
22:42 IOninja $# thing is the last index of the array
22:42 aindilis` joined #perl6
22:43 cdg_ joined #perl6
22:43 IOninja kinda sad GitHub fails to highlight those correctly..
22:45 IOninja cale2: this entire thing is useless: https://github.com/WildYorkies/Perl6Koans/blob/master/lib/Perl/Koans.pm6#L52-L102
22:45 IOninja %*ENV<PERL6_TEST_DIE_ON_FAIL> = 1; will have the same effect
22:45 cale2 IOninja: but the bail sub also displays the zen messages :)
22:46 IOninja Oh right.
22:47 IOninja Now I remember what Koans are...
22:47 cale2 I don't get what `our $CLASS = __PACKAGE__;` or `$tb` do
22:48 samcv what is a Koan
22:48 IOninja cale2: __PACKAGE__ is current package but I don't see $CLASS used anywhere
22:49 IOninja Well, other than this line that's commented out and $tb is declared in it? https://github.com/WildYorkies/Perl6Koans/blob/master/lib/Perl/Koans.pm6#L38
22:50 pyrimidine joined #perl6
22:50 IOninja You can ignore it, I'd think. It's to do with Test::Builder::Module stuff
22:50 cale2 samcv: try this -> http://elixirkoans.io/
22:50 cale2 prob the most baller koans I've done
22:51 samcv oh so it's like testing things
22:51 IOninja Koan is Zen stuff https://en.wikipedia.org/wiki/K%C5%8Dan
22:51 samcv a paradoxical anecdote or riddle, used in Zen Buddhism to demonstrate the inadequacy of logical reasoning and to provoke enlightenmen
22:51 samcv hmm
22:52 cale2 samcv: it's a popular way for learning a language. Make the tests pass. ruby made it popular with koans and katas, naturally
22:52 samcv m: use Test; is True, True;
22:52 camelia rakudo-moar 67aeef: OUTPUT«ok 1 - ␤»
22:52 samcv test passed \o/
22:52 telex joined #perl6
22:52 samcv that sounds fun though cale2
22:52 cale2 IOninja: https://github.com/WildYorkies/Perl6Koans/blob/master/lib/Perl/Koans.pm6#L37 this line. Is the Perl6 version something like `unit Class`
22:52 IOninja cale2: looking at that file, I'd start Perl 6 version from scratch and just use a few datapoints from that file. Like bail sayings and progress max length stuff and the lightbulb
22:53 samcv what is this =pod6 tag
22:53 samcv and perl 6 doesn't have cut
22:53 IOninja cale2: no. the P6 version would be my $foo = $?CLASS; $foo.some-method
22:53 samcv i am confused now
22:53 cale2 guys, I don't know Perl5. I'm purely guessing haha
22:53 timotimo well, =pod6 is just an acceptable tag name, just like =bananas
22:53 samcv i guess
22:54 samcv but
22:54 IOninja cale2: stop guessing and write in Perl 6 from scratch :)
22:54 samcv it doesn't compile
22:54 IOninja samcv: it's Perl 5 code.
22:54 cale2 m: use Test; is (1,2,3,4,5), (1,2,3).push: (4,5);
22:54 camelia rakudo-moar 67aeef: OUTPUT«Cannot call 'push' on an immutable 'List'␤  in block <unit> at <tmp> line 1␤␤»
22:55 cale2 m: use Test; is [1,2,3,4,5], [1,2,3].push: (4,5);
22:55 camelia rakudo-moar 67aeef: OUTPUT«ok 1 - ␤»
22:55 cale2 m: use Test; is [1,2,3,4,5], [1,2,3].push: |(4,5);
22:55 camelia rakudo-moar 67aeef: OUTPUT«ok 1 - ␤»
22:55 samcv i save all my perl 5 files with .pm6 too :P
22:56 IOninja m: use Test; &is.wrap: -> | { callsame() or say "you suck at koans, bruh" }; is 42, 5, "waaat"
22:56 camelia rakudo-moar 67aeef: OUTPUT«not ok 1 - waaat␤␤# Failed test 'waaat'␤# at gen/moar/Metamodel.nqp line 3907␤# expected: '5'␤#      got: '42'␤you suck at koans, bruh␤»
22:56 IOninja That's something like what I'd do
22:56 IOninja .... the at...Metamodel.nqp sucks
22:56 samcv lol
22:57 cale2 is there a native test harness for perl6? instead of prove
22:57 IOninja m: use Test; &is.wrap: -> | { 'callsame()'.EVAL(:context(::OUTER) or say "you suck at koans, bruh" }; is 42, 5, "waaat"
22:57 camelia rakudo-moar 67aeef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3 | { 'callsame()'.EVAL(:context(::OUTER)7⏏5 or say "you suck at koans, bruh" }; is ␤    expecting any of:…»
22:57 IOninja bah
22:57 IOninja I think :context is internal anyway, so nevermind
22:57 IOninja cale2: up, it's a bit buggy tho
22:58 IOninja And there aren't any docs
22:58 cale2 up? I thought I read about one that you can use with zef test
22:58 AlexDaniel 1;
22:58 AlexDaniel :)
22:58 IOninja cale2: I mean yup :)
22:58 IOninja m: use TAP::Harness
22:58 camelia rakudo-moar 67aeef: OUTPUT«===SORRY!===␤Could not find TAP::Harness at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUnit::…»
22:58 IOninja umm
22:58 AlexDaniel star: use TAP::Harness
22:58 camelia star-m 2016.10: OUTPUT«===SORRY!===␤Could not find TAP::Harness at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/star-2016.10/share/perl6/site␤    /home/camelia/star-2016.10/share/perl6/vendor␤    /home/camelia/star-2016.10/share/perl6␤    CompUnit::Repository::A…»
22:58 IOninja m: use TAP; say TAP::Harness
22:58 camelia rakudo-moar 67aeef: OUTPUT«(Harness)␤»
22:58 AlexDaniel :o
22:59 IOninja cale2: though we haven't yet agreed that it should be shipped with Perl 6 :)
22:59 IOninja with Rakudo I mean
22:59 IOninja (but I'm sure we can stuff it into Star)
22:59 cale2 IOninja: I think it's fine if you don't ship it, but that'll be good to add to state of the ecosystem, etc
23:00 IOninja cale2: you can look (or copy?) this prove6 file: https://github.com/Leont/tap-harness6/blob/master/bin/prove6
23:00 cale2 what is TAP::Harness exactly? An alternative to prove/yup?
23:00 IOninja Yes
23:00 llfourn joined #perl6
23:01 IOninja It captures output from tests and interprets TAP and gives you all the info from it
23:01 cale2 this is getting mirky. All of them use the TAP style of testing. So there are 3 options you can use, though.
23:01 IOninja Which three options?
23:01 IOninja All of them who?
23:01 cale2 prove6, yup, TAP::Harness
23:02 IOninja Never heard of yup
23:02 cale2 oh, I thought that was the name of a harness xD lmao
23:02 IOninja Or did you misinterpret my "yup" above? I meant "yup" as in "yes"
23:02 cale2 hahaha
23:02 IOninja :)
23:02 cale2 Yup would be a great name for one though
23:02 IOninja heh
23:04 cale2 So with TAP::Harness, you would download that module via zef. Then you could configure zef to always run your tests through that harness
23:04 IOninja IIRC zef defaults to that module
23:05 cale2 with a simple `zef test mymodule`
23:05 cale2 ah
23:05 IOninja And currently it unofficially ships with Rakudo, but likely won't in the future (but will instead ship with Rakudo Star, so as far as proper end users are concerned the difference shouldn't matter).
23:06 IOninja Oh yeah, you don't need prove6. You can just use zef test whatever
23:07 * IOninja is done for the day
23:07 IOninja \o
23:07 cpage_ joined #perl6
23:08 cdg joined #perl6
23:08 erdic joined #perl6
23:15 skids joined #perl6
23:20 samcv wait i thought we didn't have prove6
23:20 samcv i asked about this before >:(
23:24 cale2 samcv: If I understand correctly, if you use prove on a perl6 .t file, you're using a modified version of the Perl5 prove. If you use `zef test`, you're using prove6
23:24 jjido joined #perl6
23:24 samcv no i know that!
23:24 mr_ron joined #perl6
23:25 samcv well you can do `prove -e perl6` and it'll use perl6 to run the files but
23:25 samcv i want actual prove6
23:32 lep_ joined #perl6
23:35 leah2 joined #perl6
23:39 cale2 samcv: You could have prove6 if you just use TAP::Harness as it's own executable separate from zef
23:39 samcv yes i would like that
23:40 cale2 samcv: https://github.com/Leont/tap-harness6/blob/master/bin/prove6

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

Perl 6 | Reference Documentation | Rakudo