Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-05-05

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:03 skink So then that begs the question of why the travis build isn't finding the lib
00:03 Xliff_ skink, Last I checked, the Travis tests were passing. All nativelib calls will have API versions in v0.0.2
00:04 * Xliff_ checks again.
00:04 ZoffixWin m: my @posts = %(date => 'April 4, 2016'), %(date => 'April 2, 2016'), %(date => 'April 25, 2016'); say @posts.sort: *<date>
00:04 camelia rakudo-moar c40374: OUTPUT«({date => April 2, 2016} {date => April 25, 2016} {date => April 4, 2016})␤»
00:04 Xliff_ WTF?
00:04 Xliff_ Why is it building v0.0.2?
00:04 ZoffixWin What am I doing wrong?
00:05 ZoffixWin Ahhh
00:05 ZoffixWin never mind :P (cmp for numerics
00:05 ZoffixWin )
00:06 Xliff_ Is there a way to turn OFF Travis-CI builds for branches? I only want it to focus on master.
00:06 skink Should be in the travis settings
00:06 timotimo yeah, there's some filter thingie
00:07 Xliff_ Found it.
00:08 vytas joined #perl6
00:11 Xliff_ GRRR
00:12 Xliff_ I can't merge recent changes on master in my v0.0.2 branch.
00:12 Xliff_ I've used "git pull origin/master" and "git rebase master" and my changes to .travis.yml are still not reflected in v0.0.2 branch
00:12 Xliff_ Usually these things work.
00:22 ZoffixWin w00t! My first ever Perl 6 Web App! http://perl6.party/post/20160502-Perl-6-There-Are-Traitors-In-Our-Midst--Part-1
00:22 ZoffixWin With in-browser-runnable code snippets!
00:23 ZoffixWin Now, I just need to start using self-contained, runnable examples in my blog posts :P
00:24 Xliff_ git conflict and branch resolution sucks.
00:25 ZoffixWin :/ This one doesn't work... I guess JS needs "special magic" to make unicode work :/ http://perl6.party/post/20160425-Perl6-Comb-It#limits
00:25 ZoffixWin Ah, Perl 6 spoils me
00:26 timotimo how do you run the code?
00:26 jdv79 try doing that in svn
00:26 timotimo with glot.io?
00:27 hotel m: my constant ( ͡° ͜ʖ ͡°) = 'booty'; say ( ͡° ͜ʖ ͡°);
00:27 camelia rakudo-moar c40374: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9I8LXCDSgg␤Missing initializer on constant declaration␤at /tmp/9I8LXCDSgg:1␤------> 3my constant7⏏5 ( ͡° ͜ʖ ͡°) = 'booty'; say ( ͡° ͜ʖ ͡°);␤»
00:27 yoleaux 3 May 2016 03:42Z <AlexDaniel> hotel: try this for swapping values: my @arr = <a b c>; @arr[0,2] = @arr[2,0]; say @arr
00:27 Xliff_ Now I have to push a dummy change to master so I can get rid of the "failing" status... wheee
00:28 hotel missing initialiser?
00:28 hotel m: my $( ͡° ͜ʖ ͡°) = 'booty'; say $( ͡° ͜ʖ ͡°);
00:28 camelia rakudo-moar c40374: OUTPUT«5===SORRY!5=== Error while compiling /tmp/f9qhlD5xS_␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/f9qhlD5xS_:1␤------> 3my $(7⏏5 ͡° ͜ʖ ͡°) = 'booty'; say $( ͡° ͜ʖ ͡°);␤    expecting any of:␤ …»
00:28 hotel oh gg
00:29 ZoffixWin timotimo, yup: https://github.com/zoffixznet/perl6.party/blob/master/bin/app.p6#L40
00:30 pierre_ joined #perl6
00:31 timotimo neat.
00:31 timotimo hotel: you can of course make it a term
00:31 hotel a term?
00:32 ZoffixWin You can't :P It got spaces in it
00:32 timotimo m: sub term:<( ͡° ͜ʖ ͡°)> { say "booty" }; ( ͡° ͜ʖ ͡°);
00:32 camelia rakudo-moar c40374: OUTPUT«5===SORRY!5=== Error while compiling /tmp/TQbZceIXgo␤Too many symbols provided for categorical of type term; needs only 1␤at /tmp/TQbZceIXgo:1␤------> 3sub term:<( ͡° ͜ʖ ͡°)>7⏏5 { say "booty" }; ( ͡° ͜ʖ ͡°);␤»
00:32 timotimo it does? damn.
00:32 hotel it does? didn't think it did
00:32 timotimo ZoffixWin: now that you have a /run there, you should really invest in using a multi-threaded/asynchronous web server backend :)
00:33 ZoffixWin hm, maybe not... Or maybe my HexChat is glitching... If I remove what looks like a space, the eyebrows go away :/
00:33 timotimo m: "( ͡° ͜ʖ ͡°)".comb>>.uniname
00:33 camelia rakudo-moar c40374: ( no output )
00:33 timotimo m: "( ͡° ͜ʖ ͡°)".comb>>.uniname.say
00:33 camelia rakudo-moar c40374: OUTPUT«(LEFT PARENTHESIS SPACE DEGREE SIGN SPACE LATIN LETTER INVERTED GLOTTAL STOP SPACE DEGREE SIGN RIGHT PARENTHESIS)␤»
00:33 hotel oh damn
00:33 timotimo m: "( ͡° ͜ʖ ͡°)".comb>>.uniname.perl.say
00:33 camelia rakudo-moar c40374: OUTPUT«("LEFT PARENTHESIS", "SPACE", "DEGREE SIGN", "SPACE", "LATIN LETTER INVERTED GLOTTAL STOP", "SPACE", "DEGREE SIGN", "RIGHT PARENTHESIS")␤»
00:33 timotimo so many psaces in there
00:33 timotimo psaces? wow.
00:34 ZoffixWin m: "( ͡° ͜ʖ ͡°)".comb.grep({$_ ne ' '}).join.say
00:34 camelia rakudo-moar c40374: OUTPUT«5===SORRY!5=== Error while compiling /tmp/y6cq9Qg2TI␤Bogus postfix␤at /tmp/y6cq9Qg2TI:1␤------> 3 ͡° ͜ʖ ͡°)".comb.grep({$_ ne ' '}).join.say7⏏5␤    expecting any of:␤        infix␤        infix stopper␤        statement end…»
00:34 hotel m: sub term:<(°ʖ°)> { say "booty?"; }; (°ʖ°);
00:34 camelia rakudo-moar c40374: OUTPUT«booty?␤»
00:34 ZoffixWin m: "( ͡° ͜ʖ ͡°)".comb.grep({$_ ne ' '}).join.say
00:34 camelia rakudo-moar c40374: OUTPUT«( ͡° ͜ʖ ͡°)␤»
00:34 ZoffixWin The two look the same to me :/
00:34 hotel just doesn't have the same impact
00:35 ZoffixWin m: '( ͡° ͜ʖ ͡°)'.comb>>.uniname.perl.say
00:35 camelia rakudo-moar c40374: OUTPUT«("LEFT PARENTHESIS", "SPACE", "DEGREE SIGN", "SPACE", "LATIN LETTER INVERTED GLOTTAL STOP", "SPACE", "DEGREE SIGN", "RIGHT PARENTHESIS")␤»
00:35 ZoffixWin :/ dafuq
00:35 hotel (°ʖ°) <- without spaces
00:35 Xliff_ That's what I am saying about Travis-CI right about now.
00:35 hotel lol
00:35 hotel cool about the terms though
00:36 hotel like #define
00:36 Xliff_ I think I have it slapped into shape, but when you have 3-5 commits across 2 branches where the lines start with "- TRAVIS: "... you know something is wrong.
00:36 timotimo er, no :)
00:36 hotel well
00:36 * ZoffixWin sees this http://i.imgur.com/RPMZntI.png
00:36 * hotel shrugs
00:36 hotel #define true false
00:37 ZoffixWin m: sub term:<¯\_(ツ)_/¯> { say 'hotel shrugs' }; ¯\_(ツ)_/¯
00:37 camelia rakudo-moar c40374: OUTPUT«hotel shrugs␤»
00:37 timotimo so that's what that's supposed to look like !!!!
00:37 timotimo no wonder i never understood why people use that emoticon
00:37 ZoffixWin loool
00:37 Xliff_ ROFL!
00:37 hotel lol
00:37 timotimo i'll make a screenshot with what ( ͡° ͜ʖ ͡°) looks like to me, a sec.
00:37 timotimo https://i.imgur.com/AyDtfKv.png
00:38 Xliff_ Probably a lot of boxy shapes.
00:38 timotimo nah
00:38 ZoffixWin hahaha
00:38 Xliff_ Wooow!
00:38 timotimo i see all those spaces
00:38 Xliff_ Trippy
00:38 timotimo thanks so much for enlightening me
00:38 ZoffixWin :)
00:39 hotel whoa that's one weird looking booty
00:39 timotimo if your butt has eyes, a nose and a mouth like that, i'm really worrying about your health
00:40 skink I assume he's referring to this: https://www.youtube.com/watch?v=wGlBwW7f5HA
00:41 timotimo Unfortunately, this video is not available in your country because it could contain music from UMG, for which we could not agree on conditions of use with GEMA.
00:41 timotimo hooray
00:42 timotimo i see a video filmed off of a projected screen, though
00:42 timotimo yeah, i know that song, it's a fun song
00:43 pierre_ joined #perl6
00:44 cpage__ joined #perl6
00:47 wbill joined #perl6
00:57 Sgeo How do react {} and similar help avoid callback hell?
00:58 Sgeo I would think generators would be a better tool?
00:59 kid51 joined #perl6
00:59 ZoffixWin Sgeo, whenever inside a react {} can hook up to a Supply. And supply can emit() whenever it wants
00:59 ZoffixWin I think it's somewhat similar to generators, really
01:00 timotimo and inside the blocks you can write your "callbacks" as if they were just loops over the incoming values
01:00 timotimo which can look pretty nice i suppose
01:00 ZoffixWin I think the only difference is with generators you *ask* for the next item and react {} you'd react whenever the next item is emitted()
01:02 Sgeo Isn't "asking" more flexible? Maybe I need to see an example
01:02 timotimo well, you can just coerce any Channel or Supply into a lazy list, too
01:02 timotimo that'll give you a generator access pattern for free
01:02 Sgeo With a monadic approach, I could get one item from a Supply, then use that item to determine which Supply to get from next. Is there an equivalent for react/supply?
01:02 ZoffixWin There's probably a way to make it ask...
01:03 kid511 joined #perl6
01:04 timotimo supplies run whenever their data arrives, you can't start/stop a normal supply, but you can go via coercers and combinators and such
01:05 timotimo we do have a big amount of combinators for supplies
01:06 ZoffixWin I think Supply + Channel can be an equivalent of a genarator... Though I'm wasted at the moment and can't think well :P
01:06 timotimo your "what supply to get the next value from" thing can be done with a zip, for example
01:06 timotimo yeah, calling .Channel on a Supply will give you something where you ask for the next value, whereas .List on a Supply will give you something that'll handle like a lazy list
01:06 ZoffixWin We need a Generator module :P It's not the first time someone asks about generators :P
01:07 ZoffixWin module or good docs
01:07 timotimo generators are just gather/take, dood
01:09 ZoffixWin \o/
01:09 * ZoffixWin mentally marks it as a TODO article to write
01:10 hotel what are these logistical-sounding constructs? supplies? generators? ??
01:11 hotel I know java has like factories that make factories that make things...
01:12 ZoffixWin hotel, generators are things you ask for values and they given them to you (like https://wiki.python.org/moin/Generators). Supplies are Perl 6 async constructs http://docs.perl6.org/type/Supply
01:12 ZoffixWin This may be a better link for P6 async/concur stuff: http://docs.perl6.org/language/concurrency
01:12 hotel like getters/setters?
01:12 * ZoffixWin has no idea what Java factories are
01:12 finanalyst joined #perl6
01:12 ZoffixWin hotel, getters/setters... like in OO? No.
01:13 hotel ZoffixWin, java factories: http://discuss.joelonsoftware.com/?joel.3.219431.12
01:13 * ZoffixWin is too drunk to read anything :P
01:13 hotel it's funny though :P
01:14 Sgeo Ridiculously elaborate mechanism to work around the fact that Java doesn't have closures that can return new objects
01:14 Sgeo iiuc
01:14 hotel ^
01:14 hotel oh right generators are those things
01:14 hotel yield
01:14 hotel it's all coming back
01:14 timotimo it's coming for you
01:14 timotimo be very afraid
01:16 * skink wishes he had more opportunities to use OCaml
01:16 skink Bunch of the fancier Perl6 reminds me of it
01:16 Sgeo I have so much difficult looking at non-Rust languages these days, I think I really like inherited mutability
01:19 * hotel wonders if rust works on ubuntu on windows...
01:19 molaf joined #perl6
01:19 skink It... should... I think?
01:20 hotel nope! forgot there's curl ssl issues lmao
01:20 timotimo nobody needs ssl
01:20 hotel u right
01:21 * Xliff_ hi5's ZoffixWin
01:21 Xliff_ I am not... yet... wasted. I am getting there, though.
01:22 * geekosaur reminded to look for ppa for a recentish rust
01:22 Xliff_ Rust?
01:23 * hotel broke vi
01:23 Xliff_ o_O
01:23 Xliff_ hotel, How in the world did u do that?
01:23 hotel I right-clicked a few too many times
01:24 rindolf joined #perl6
01:24 timotimo does that put you in a strange mode?
01:24 hotel with something big in my clipboard
01:24 hotel windows shell pastes on right-click
01:24 Xliff_ Ooo... that might do it.
01:24 timotimo haha, if you're good you can paste it so that vi interprets it as commands
01:24 Xliff_ :P
01:24 Xliff_ Working Ubuntu under Windows is still not enough to make me install Windows X
01:25 Xliff_ I mean... look at the name. It already has a strike in it.
01:25 hotel well I would be using nano but nano is just plain broken on uow
01:25 geekosaur that should be a warning :)
01:25 hotel yep lol
01:25 Xliff_ geekosaur++
01:25 skink geekosaur, I think the installer script will always overwrite your current install with the latest stable Rust
01:25 skink Don't quote me on that though
01:26 Xliff_ What is rust? I would google it, but .... common term.
01:26 hotel rustlang
01:26 hotel google that ^
01:26 Xliff_ Thankee
01:26 timotimo we should SEO the F out of "perl6lang"
01:26 hotel generally when looking for new programming languages I find it useful to add 'lang' to my search term
01:26 timotimo C#lang?
01:26 hotel golang
01:27 timotimo well, "clang" surely gives you the wrong idea :)
01:27 ZoffixWin hotel, heh, you were right, it was pretty funny :)
01:27 geekosaur rust-lang.org
01:27 geekosaur looks like a cross between OCaml and C
01:27 hotel I have a universal tool factory factory factory here, need to make a hammer
01:27 skink Unfortunately, when searching for perl6 stuff, DuckDuckGo still returns mostly perl(5) stuff
01:28 ZoffixWin That's because DuckDuckGo sucks :)
01:28 skink geekosaur, Mozilla basically plastered OCaml features on top of C++ with lifetime-based memory management
01:28 * hotel has had no problems on google
01:28 skink Creating a useful yet unholy abomination
01:28 Xliff_ LOL
01:29 Xliff_ I will need to gain several levels before Rust becomes useful to me.
01:29 Xliff_ Mainly coz... I have no use cases for it that aren't satisfied by languages I am more familiar with.
01:30 hotel my main interest right now is finding languages I've never heard of before, compiling them on UoW, then attempting to make an http server with them
01:30 hotel learning is fun
01:30 * geekosaur does not wait for a use case to learn new stuff
01:30 skink geekosaur, Yeah just checked, the rustup script handles upgrading fairly cleanly it seems
01:30 skink PPA not really needed
01:30 Xliff_ Although how you can say "efficient C bindings" and "prevents segfaults" on the same page is kinda silly.
01:30 geekosaur for one thing, I expect others to be using it and being able to understand them, and it, is useful
01:31 Xliff_ When I find that a language does something useful, I learn it.
01:31 Xliff_ Or for the cool factor.
01:31 timotimo we could make it impossible to cause segfaults by inspecting the memory maps our program has and only allowing Pointer to be created/boxed with valid addresses
01:31 Xliff_ Or for... legacy interest.
01:31 timotimo what could possibly go wrong
01:31 hotel one day I'll learn brainfuck
01:32 Xliff_ Perl 6 satisfied all 3.
01:32 * Xliff_ googles "brainfuck lang"
01:32 * geekosaur does enough sysadmin at work, is happy to let more automated stuff deal for home >.>
01:32 timotimo so lang, suckers :D
01:33 * timotimo goes to bed
01:33 skink Xliff_, Rust in and of itself does exactly what is described in that top bit. Binding to C code is usually explicitly marked with #[unsafe] so you know exactly where to be careful
01:33 hotel haha
01:33 Sgeo I think I was thinking more async/await, which isn't generators but could be built on top maybe
01:33 skink Also the libraries which do bind to C tend to be extremely cautious and have saner, safer return values
01:34 Xliff_ skink, OK. But that's cheating! ;)
01:34 skink Xliff_, http://kamalmarhubi.com/blog/2016/04/13/rust-nix-easier-unix-systems-programming-3/
01:34 hotel interesting, rust thinks uow is 'unknown-linux'
01:34 skink Good example, imo
01:34 Xliff_ And when the source to "Hello World" contains neither "Hello" nor "World", you know to run... quickly.
01:34 Xliff_ ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
01:35 hotel Xliff_++
01:35 hotel it makes perfect sense
01:35 Xliff_ LOL!
01:35 Xliff_ The previous line noise was "Hello World" in brainfuck.
01:35 Xliff_ Now you can see that the language was aptly named.
01:36 hotel people always talk about simplicity but they can never follow through
01:36 skink Xliff_, If you wanna see something really sick, someone wrote a VB->BF->ASM compiler that outputs entirely MOV
01:36 Sgeo Perl6's Failure makes me think of a cross between Rust's Result and the billion dollar mistake called null
01:36 Sgeo Like it's a null except it has useful information that someone who sees it might be able to understand and debug
01:36 skink 99 bottles is something like 5,000 lines of asm with it :)
01:36 Xliff_ skink, o_O -- I did not grok. Repeat that using single syllables. With hyperlinks!
01:36 hotel MOV-- as in, the format?
01:36 Xliff_ MOVie?
01:36 hotel or the asm instruction
01:37 mspo whitespace lang is more BF than BF
01:37 hotel https://github.com/jfeng41/greentext
01:37 mspo there should obviously be a BF in perl6
01:38 hotel tabs and spaces lmao
01:38 skink The asm instruction
01:38 skink https://github.com/xoreaxeaxeax/movfuscator
01:38 skink This compiles C code - any C code - to entirely mov instructions
01:38 Xliff_ O_O
01:39 Xliff_ The practical coder in me is like "EWW! WTF?"
01:39 skink The dude also has a presentation where, iirc, he can compile Visual Basic to Brainfuck and then run it through a similar compiler
01:39 Xliff_ The wimsical coder in me is like "COOOL!"
01:39 skink I read that as COBOL and was frightened.
01:39 hotel what's "practical coding"? ;-)
01:40 Xliff_ Coding where I don't have to really work to write or understand it.
01:40 hotel ;-)
01:41 Xliff_ hotel, what can I say? I like to be lazy!
01:41 skink Go to Haskell for that
01:41 Xliff_ :p
01:41 hotel s/ask//
01:41 Xliff_ ROFL!
01:46 hotel if this isn't irony idk what is: https://gist.github.com/HotelCalifornia/811c14b6d0ad30432257290f32048a0d
01:50 skink You did something wrong :)
01:50 skink Also try using cargo new + cargo build
01:50 skink for project dirs
01:51 skink oh new --bin, right
01:53 hotel I ran the install script like the site told me :(
01:53 Xliff_ hotel, ROFLMAO!
01:54 Xliff_ Now post the code to main.rs
01:54 hotel fn main() { println!("hello world!"); }
01:55 huggable joined #perl6
01:57 skink Works for me™
01:57 hotel Some examples:
01:57 hotel Pi, which maps brainfuck into errors in individual digits of Pi.
02:04 itaipu joined #perl6
02:13 cpage_ joined #perl6
02:13 yqt joined #perl6
02:13 Sgeo Blah, start { ... } is allowed to mutate stuff in the surrounding scope
02:13 Sgeo That seems fragile and a bad idea to allow
02:15 mr-foobar joined #perl6
02:16 hotel elegant http://puu.sh/oGFw1/9fba34b6c9.png
02:17 noganex joined #perl6
02:22 sortiz joined #perl6
02:28 sortiz \o #perl6
02:28 mr-foobar joined #perl6
02:33 pierre_ joined #perl6
02:34 mr-foobar joined #perl6
02:42 grondilu m: say &[+], ().Seq;
02:42 camelia rakudo-moar c40374: OUTPUT«sub infix:<+> (Mu $?, Mu $?) { #`(Sub+{<anon|51509600>}+{Precedence}|66435040) ... }()␤»
02:42 grondilu m: say reduce &[+], ().Seq;
02:42 camelia rakudo-moar c40374: OUTPUT«0␤»
02:43 cibs joined #perl6
02:43 grondilu m: say reduce * + *, ().Seq;
02:43 camelia rakudo-moar c40374: OUTPUT«Too few positionals passed; expected 2 arguments but got 0␤  in block <unit> at /tmp/tys1CJ6WOJ line 1␤␤»
02:44 grondilu I guess that makes sense.  reduce can not guess the degenerate case from a generic two-parametered sub.
02:47 zostay .seen ufobat
02:47 yoleaux I saw ufobat 4 May 2016 19:37Z in #perl6: <ufobat> sena_kun, if you have questions or suggestions don't hesitate to talk to me :)
02:47 Sgeo Is http://design.perl6.org/S07.html the canonical way lists work in Perl6?
02:48 zostay .tell ufobat thx, i hope the MoarVM problem blocking progress on P6SGI can get resolved sometime so I can have fun on it again... i'm no language or VM hacker
02:48 yoleaux zostay: I'll pass your message to ufobat.
02:48 MadcapJake Sgeo: surely this is more up-to-date:http://doc.perl6.org/language/list
02:49 BenGoldberg m: say reduce * + *, 1..3
02:49 camelia rakudo-moar c40374: OUTPUT«6␤»
02:49 mr-foobar joined #perl6
02:49 zostay m: say [+] 1..3
02:49 camelia rakudo-moar c40374: OUTPUT«6␤»
02:50 BenGoldberg m: say [+] slip;
02:50 camelia rakudo-moar c40374: OUTPUT«0␤»
02:50 BenGoldberg m: say [*] slip;
02:50 camelia rakudo-moar c40374: OUTPUT«1␤»
02:50 BenGoldberg m: say [/] slip;
02:50 camelia rakudo-moar c40374: OUTPUT«No zero-arg meaning for infix:</>␤  in block <unit> at /tmp/ALYC5s5wlr line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/ALYC5s5wlr line 1␤␤»
02:50 BenGoldberg m: say [**] slip;
02:50 camelia rakudo-moar c40374: OUTPUT«1␤»
02:52 BenGoldberg If I had my own custom operator, how would I indicate what it should return for degenerate reduction?
02:52 Sgeo MadcapJake, hmm, ty
02:55 rindolf Hi all! Sup?
02:57 Sgeo Wait, is start/await like C#'s async/await?
02:57 Sgeo Except it starts a thread?
02:57 MadcapJake I believe so
02:58 Sgeo Seems a bit blocking instructiony though?
02:58 vike joined #perl6
02:58 mr-foobar joined #perl6
02:58 MadcapJake it's not a true thread though I believe, it's handled by a scheduler
02:59 MadcapJake Sgeo: http://doc.perl6.org/type/ThreadPoolScheduler
03:00 zostay m: multi infix:<foo>() { say 'degenerate' }; [foo] slip;
03:00 camelia rakudo-moar c40374: OUTPUT«degenerate␤»
03:00 zostay BenGoldberg: declare a multi sub with a () signature
03:00 grondilu could be a trait imho  sub infix:<§> does degenerate(0) {...}
03:01 grondilu oh yeah a multi with no param would do indeed
03:02 grondilu m: multi infix:<§>() { 0 }; multi infix:<§>($) { 1 }; say [§] slip; say [§] rand;
03:02 camelia rakudo-moar c40374: OUTPUT«0␤0.748557235613763␤»
03:02 zostay in fact, at least some catch all is necessary or you get an error like: Too few positionals passed; expected 2 arguments but got 0 or Cannot call infix:<foo>(...); none of these signatures match:
03:02 grondilu m: multi infix:<§>() { 0 }; multi infix:<§>($) { 1 }; say [§] slip; say [§] ().Seq;
03:02 camelia rakudo-moar c40374: OUTPUT«0␤0␤»
03:02 zostay if a degenerate case is bad, you should define one that dies with a better error message
03:04 grondilu how would I do with an anonymous sub though?
03:04 grondilu because initially I had:  reduce { $^a.stuff($^b) }, ().Seq;
03:06 grondilu maybe reduce could get a $degenerate named parameter?
03:06 grondilu reduce &mysub, :degenerate(0), @stuff
03:08 grondilu in any case what I did as a work-around was: !@stuff ?? 0 !! reduce &my-binary-op, @stuff;
03:09 grondilu which is ok just not totally awesome.
03:12 grondilu though I guess I could also do reduce &my-op, $degenerate-case, |@things
03:16 BenGoldberg joined #perl6
03:23 mr-foobar joined #perl6
03:29 mr-foobar joined #perl6
03:40 mr-foobar joined #perl6
03:56 pierre_ joined #perl6
04:03 mr-foobar joined #perl6
04:10 BenGoldberg m: say &reduce
04:10 camelia rakudo-moar c40374: OUTPUT«sub reduce (| is raw) { #`(Sub|71886920) ... }␤»
04:13 BenGoldberg joined #perl6
04:14 MadcapJake m: (gather { for 'a', 'b' ... * { say 'foo'; take $_ } })[0]
04:14 camelia rakudo-moar c40374: OUTPUT«foo␤»
04:14 MadcapJake m: (gather { for 'a', 'b' ... * { say 'foo'; take $_ } })[1]
04:14 camelia rakudo-moar c40374: OUTPUT«foo␤foo␤»
04:15 MadcapJake m: (gather { for 'a', 'b' ... * { say 'before'; take $_; say 'after' } })[1]
04:15 camelia rakudo-moar c40374: OUTPUT«before␤after␤before␤»
04:15 BenGoldberg m: (gather { for 'a', 'b' ... * { say 'foo'; take $_ } })[slip]
04:15 camelia rakudo-moar c40374: ( no output )
04:15 MadcapJake m: (gather { for 'a', 'b' ... * { say 'before'; take $_; say 'after' } })[2]
04:15 camelia rakudo-moar c40374: OUTPUT«before␤after␤before␤after␤before␤»
04:16 Sgeo Is Perl6's equivalent of 'yield from' something like `take for @foo`?
04:16 MadcapJake Sgeo: yep! :) I'm writing an article about generators right now
04:16 Sgeo MadcapJake, :D
04:16 Sgeo take can't give back a value though, can it?
04:16 MadcapJake m: (gather { for 'a', 'b' ... * { say 'before'; take $_; say 'after' } })[2].say
04:16 camelia rakudo-moar c40374: OUTPUT«before␤after␤before␤after␤before␤c␤»
04:17 MadcapJake m: (gather { for 'a', 'b' ... * { say 'before'; take $_; say 'after' } }).say
04:17 camelia rakudo-moar c40374: OUTPUT«before␤after␤before␤after␤before␤after␤before␤after␤before␤after␤before␤after␤before␤after␤before␤after␤before␤after␤before␤after␤before␤after␤before␤after␤before␤after␤before␤after␤before␤after␤b…»
04:17 MadcapJake m: (gather { for 'a', 'b' ... * { take $_; } })[0..10].say
04:17 camelia rakudo-moar c40374: OUTPUT«(a b c d e f g h i j k)␤»
04:17 MadcapJake m: (gather { for 'a', 'b' ... * { take $_; } })[10..20].say
04:17 camelia rakudo-moar c40374: OUTPUT«(k l m n o p q r s t u)␤»
04:19 MadcapJake m: (gather { for 'a', 'b' ... * { take $_; take $_.ord } })[10..20].say
04:19 camelia rakudo-moar c40374: OUTPUT«(f 102 g 103 h 104 i 105 j 106 k)␤»
04:24 luser1 joined #perl6
04:24 luser1 mmh
04:32 sortiz MadcapJake++ # A much needed article
04:32 mr-foobar joined #perl6
04:35 MadcapJake m: my @breaks = gather { for 'a', 'b' ... * { take $_; take $_.ord } }; @breaks[0..5].say # why does this not work?
04:36 camelia rakudo-moar c40374: OUTPUT«(timeout)»
04:36 MadcapJake sortiz: any idea ^^ ?
04:40 sortiz MadcapJake, when you assign an Iterable to an array, the inner for iterator tries to resolve. A 'while' should work.
04:42 sortiz Nested Iterables try to flat unless explicitly lazy.
04:46 MadcapJake ahhh I see, thanks!
04:47 sortiz m:  my \Itr =  (gather { my $i=0; while $i < Inf { take $i; $i++ }}); Itr[0..5].say
04:47 camelia rakudo-moar c40374: OUTPUT«(0 1 2 3 4 5)␤»
04:51 MadcapJake m:  my \Itr =  (gather { my $i=0; while $i < Inf { take $i; $i++ }}); Itr.shift.say
04:51 camelia rakudo-moar c40374: OUTPUT«Method 'shift' not found for invocant of class 'Seq'␤  in block <unit> at /tmp/6FjWDNw7Bm line 1␤␤»
04:54 telex joined #perl6
04:54 verzit joined #perl6
05:01 Cabanossi joined #perl6
05:04 sortiz m: my @a := Array.from-iterator((lazy gather { my $i=0; while $i < Inf { take $i; $i++ }}).iterator); say @a[10..20];
05:04 camelia rakudo-moar c40374: OUTPUT«(10 11 12 13 14 15 16 17 18 19 20)␤»
05:04 sortiz MadcapJake, ^^
05:05 MadcapJake neat! will `shift` work?
05:05 MadcapJake m: my @a := Array.from-iterator((lazy gather { my $i=0; while $i < Inf { take $i; $i++ }}).iterator); say @a.shift.say; @a.shift.say;
05:05 camelia rakudo-moar c40374: OUTPUT«0␤True␤1␤»
05:05 sortiz :-)
05:06 MadcapJake awesome! There it is ladies and gentlemen, generators in Perl 6! :)
05:06 sortiz And using in a for will be on demand.
05:08 sortiz The problem with array assignment is that you should use bind, otherwise the compiler try to copy.
05:11 sortiz Other important detail is that if you are using an Array, the memory will be expanding, until fully reified, so an Scalar or sigilless var works better.
05:12 sortiz YMMV, eat fruits and vegetables. ;-)
05:12 MadcapJake Interesting, I'll mention this stuff in the article. Thanks!
05:18 sortiz m: my @a := Array.from-iterator((lazy gather { my $i=0; while $i < Inf { take $i; $i++ }}).iterator); for @a { state $i = 10; say $_; last unless --$i }; # A guarded for
05:18 camelia rakudo-moar c40374: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤»
05:19 rurban joined #perl6
05:22 sortiz Ah, and don't ask for .elems ;-)
05:26 hotel joined #perl6
05:35 Actualeyes joined #perl6
05:41 pierre_ joined #perl6
05:55 huggable joined #perl6
05:56 atweiden joined #perl6
05:56 atweiden m: multi sub is-valid-array(Str @) { True }; multi sub is-valid-array(Int @) { True }; multi sub is-valid-array(Real @) { True }; multi sub is-valid-array(Bool @) { True }; multi sub is-valid-array(Dateish @) { True }; multi sub is-valid-array(List @) { True }; multi sub is-valid-array(Associative @) { True }; multi sub is-valid-array(@) { False }; my @a = 1, 2, 3; say is-valid-array(@a)
05:56 camelia rakudo-moar c40374: OUTPUT«False␤»
05:58 mr-foobar joined #perl6
05:58 atweiden anyone know why `is-valid-array(Int @)` signature isn't being selected?
05:59 sortiz atweiden, 'cus my @a = ... is a simply Array, no matter what you put in the RHS
05:59 atweiden oh, right
06:00 sortiz multi sub is-valid-array(Str @) { True }; multi sub is-valid-array(Int @) { True }; multi sub is-valid-array(Real @) { True }; multi sub is-valid-array(Bool @) { True }; multi sub is-valid-array(Dateish @) { True }; multi sub is-valid-array(List @) { True }; multi sub is-valid-array(Associative @) { True }; multi sub is-valid-array(@) { False }; my Int @a = 1, 2, 3; say is-valid-array(@a); # See Int in the declaration.
06:00 Sgeo Perl6 doesn't have statically typed type families/associated types, does it?
06:00 sortiz m: multi sub is-valid-array(Str @) { True }; multi sub is-valid-array(Int @) { True }; multi sub is-valid-array(Real @) { True }; multi sub is-valid-array(Bool @) { True }; multi sub is-valid-array(Dateish @) { True }; multi sub is-valid-array(List @) { True }; multi sub is-valid-array(Associative @) { True }; multi sub is-valid-array(@) { False }; my Int @a = 1, 2, 3; say is-valid-array(@a); # See Int in the declaration.
06:00 camelia rakudo-moar c40374: OUTPUT«True␤»
06:01 Sgeo And/or functions that take and return types that are then statically checked?
06:02 atweiden m: multi sub is-valid-array(@ where {.grep(Str).elems == .elems}) { True }; multi sub is-valid-array(@ where {.grep(Int).elems == .elems}) { True }; multi sub is-valid-array(@ where {.grep(Real).elems == .elems}) { True }; multi sub is-valid-array(@ where {.grep(Bool).elems == .elems}) { True }; multi sub is-valid-array(@ where {.grep(Dateish).elems == .elems}) { True }; multi sub is-valid-array(@ where {.grep(List).elems == .elems}) { True }; mu
06:02 atweiden lti sub is-valid-array(@ where {.grep(Associative).elems == .elems}) { True }; multi sub is-valid-array(@) { False }; my @a = 1, 2, 3; say is-valid-array(@a)
06:02 camelia rakudo-moar c40374: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AbwqGl5M4l␤Undeclared routine:␤    mu used at line 1␤␤»
06:04 CIAvash joined #perl6
06:04 hotel_california joined #perl6
06:05 pierre_ joined #perl6
06:13 stmuk ZoffixWin++ # perl6.party although I miss the DJing cats
06:15 domidumont joined #perl6
06:21 nadim joined #perl6
06:21 telex joined #perl6
06:22 domidumont joined #perl6
06:25 wamba joined #perl6
06:26 firstdayonthejob joined #perl6
06:40 Ven joined #perl6
06:44 jeek joined #perl6
06:50 go|dfish joined #perl6
06:51 zakharyas joined #perl6
07:18 dolmen joined #perl6
07:23 jjido joined #perl6
07:32 nadim joined #perl6
07:37 darutoko joined #perl6
08:09 RabidGravy joined #perl6
08:10 dakkar joined #perl6
08:11 sjoshi joined #perl6
08:26 CIAvash joined #perl6
08:29 Actualeyes joined #perl6
08:39 jjido joined #perl6
08:55 jjido joined #perl6
08:58 Roamer` hmm, am I right to assume that there's no way to 'use v6.c' on the perl6 command line?  perl5 -M5.010 -e 'say "meow"' works, perl6 "cannot find" either v6.c or 6.c as a module
08:59 Roamer` (thinking about making an alias / shell wrapper for perl6 -e 'use v6.c; ...', but it seems it can't really be done... not that my fingers aren't trained already :)
09:11 RabidGravy arguably an infelicity as that would imply that the -M is using a different path to get the module
09:14 jjido joined #perl6
09:17 RabidGravy however having given it a moments thought , because the -M argument is a string whereas "v6.c" in the code is a Version it's tricky
09:19 jnthn Yeah, version is parsed as a distinct code-path from module names: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L1519
09:19 RabidGravy boom
09:20 RabidGravy on a completely different topic, there's no way of dealing with varargs in NC without a wrapper
09:26 RabidGravy I so want to do "sub lo_send(Address $a, Str $path, Str $type, CArray *@args) is native...."
09:31 sortiz RabidGravy, dyncall is capable of do varargs marshaling but NYI in MoarVM.
09:33 RabidGravy it's not something that comes up very often but liblo is just one of those places
09:34 cpage_ joined #perl6
09:35 sortiz Are you actually using wrappers in your GDMB module. right?
09:35 Relsak joined #perl6
09:36 sortiz s/GDMB/GDBM/
09:37 RabidGravy well I've tried that, but I stopped working on it because it kept failing in different and unusual way
09:38 sortiz Umm, Can I give a try?
09:39 RabidGravy sure, what I have so far is at https://github.com/jonathanstowe/p6-GDBM
09:40 RabidGravy if you get it working you can have it, I only started it because someone asked
09:40 sortiz My p6-LDMB is working, but that library is much less common.
09:41 sortiz And only supports 64bits machines.
09:41 RabidGravy :-\
09:43 sortiz otoh, is API is saner 'cus its datum is passed by ref, not by value as in GDBM.
09:43 sortiz *its API
09:43 * sortiz need more coffee.
09:55 cpage_ joined #perl6
09:55 huggable joined #perl6
09:56 ZoffixWin is finanalyst in here?
09:56 finanalyst yes
09:56 finanalyst ZoffixWin: good evening (for me)
09:57 pierre_ joined #perl6
09:57 ZoffixWin finanalyst, RE https://github.com/finanalyst/ModuleCitation/issues/1  I meant a link to repo so people could send fixes. Like on this site there's a "Fork me on github" ribbon at top right corner: http://xtatik.org/
09:58 ZoffixWin It doesn't have to be a ribbon, but, for example, I see a markup error that makes a link unclickable right now. To submit a PR, I have to manually change https://finanalyst.github.io/ModuleCitation/ to https://github.com/finanalyst/ModuleCitation/ just to get to the repo... and if a user doesn't know this they won't be able to submit anything
09:59 ZoffixWin Something like <a href="https://github.com/finanalyst/ModuleCitation/">GitHub Repo</a> in the footer should do.
09:59 ZoffixWin Unless you like ribbons :P
09:59 finanalyst Zoffix: just seen the site you refered to
09:59 finanalyst Quite nice - ribbons.
10:00 finanalyst I'll put in a link to the github.
10:00 finanalyst I thought it was sufficient to put in an email.
10:00 ZoffixWin There's a whole bunch of them: https://github.com/blog/273-github-ribbons
10:01 ZoffixWin Yeah, but an email doesn't let me send a PR :P  https://github.com/finanalyst/ModuleCitation/pull/3
10:02 finanalyst Ok. Like I said in my email, I am not used to pull requests.
10:02 _28_ria joined #perl6
10:03 cpage_ joined #perl6
10:08 sjoshi joined #perl6
10:11 dolmen joined #perl6
10:12 Ven joined #perl6
10:19 finanalyst ZoffixWin: Just update with data for today and a ribbon. I'd prefer the ribbon to be in the <div> for the definition, but it ain't. Not sure yet why.
10:21 kid51 joined #perl6
10:24 ZoffixWin Unsure what you mean. It looks fine to me.
10:25 ZoffixWin Do you mean you want it in the footer and not the corner of the page? Just add position: relative to the container
10:42 brrt joined #perl6
10:50 spider-mario joined #perl6
11:02 AlexDaniel joined #perl6
11:03 AlexDaniel ZoffixWin: why .comb».uniname when you can do .uninames ? :)
11:04 AlexDaniel m: "( ͡° ͜ʖ ͡°)".comb>>.uniname.say
11:04 camelia rakudo-moar c40374: OUTPUT«(LEFT PARENTHESIS SPACE DEGREE SIGN SPACE LATIN LETTER INVERTED GLOTTAL STOP SPACE DEGREE SIGN RIGHT PARENTHESIS)␤»
11:04 AlexDaniel m: "( ͡° ͜ʖ ͡°)".uninames.say
11:04 camelia rakudo-moar c40374: OUTPUT«(LEFT PARENTHESIS SPACE COMBINING DOUBLE INVERTED BREVE DEGREE SIGN SPACE COMBINING DOUBLE BREVE BELOW LATIN LETTER INVERTED GLOTTAL STOP SPACE COMBINING DOUBLE INVERTED BREVE DEGREE SIGN RIGHT PARENTHESIS)␤»
11:04 AlexDaniel hmmmm
11:04 jnthn They're not equivalent :)
11:05 jnthn The second is likely what's wanted most of the time, which is why it's there :)
11:05 jnthn The first takes each grapheme and gets the uniname of its first codepoint
11:05 ZoffixWin AlexDaniel, I just copy-pasted the previous person's eval
11:05 jnthn The second gets all the graphemes.
11:08 AlexDaniel m: "( ͡° ͜ʖ ͡°)".comb>>.uniprop.say
11:08 camelia rakudo-moar c40374: OUTPUT«(Ps Zs So Zs Ll Zs So Pe)␤»
11:08 ilmari m: "( ͡° ͜ʖ ͡°)".comb>>.uninames.say
11:08 camelia rakudo-moar c40374: OUTPUT«((LEFT PARENTHESIS) (SPACE COMBINING DOUBLE INVERTED BREVE) (DEGREE SIGN) (SPACE COMBINING DOUBLE BREVE BELOW) (LATIN LETTER INVERTED GLOTTAL STOP) (SPACE COMBINING DOUBLE INVERTED BREVE) (DEGREE SIGN) (RIGHT PARENTHESIS))␤»
11:09 AlexDaniel jnthn: this reminds me that we don't have .uniprops
11:09 ilmari m: "( ͡° ͜ʖ ͡°)".ords>>.uniprop.say
11:09 camelia rakudo-moar c40374: OUTPUT«(Ps Zs Mn So Zs Mn Ll Zs Mn So Pe)␤»
11:10 AlexDaniel ooooh
11:11 AlexDaniel m: "( ͡° ͜ʖ ͡°)".ords>>.uniname.say
11:11 camelia rakudo-moar c40374: OUTPUT«(LEFT PARENTHESIS SPACE COMBINING DOUBLE INVERTED BREVE DEGREE SIGN SPACE COMBINING DOUBLE BREVE BELOW LATIN LETTER INVERTED GLOTTAL STOP SPACE COMBINING DOUBLE INVERTED BREVE DEGREE SIGN RIGHT PARENTHESIS)␤»
11:15 sjn_phone joined #perl6
11:15 sjn_phone left #perl6
11:19 itaipu joined #perl6
11:21 boegel joined #perl6
11:37 itaipu joined #perl6
11:44 dalek perl6-most-wanted: 50da954 | (Michael Vu)++ | most-wanted/modules.md:
11:44 dalek perl6-most-wanted: Update modules.md
11:44 dalek perl6-most-wanted:
11:44 dalek perl6-most-wanted: Some like Pinto in house cpan for perl6
11:44 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/50da954206
11:44 dalek perl6-most-wanted: 8c394da | titsuki++ | most-wanted/modules.md:
11:44 dalek perl6-most-wanted: Merge pull request #29 from mvu8912/patch-1
11:44 dalek perl6-most-wanted:
11:44 dalek perl6-most-wanted: Update modules.md
11:44 dalek perl6-most-wanted: review: https://github.com/perl6/perl6-most-wanted/commit/8c394dab0b
11:51 jjido joined #perl6
12:07 Ven joined #perl6
12:15 domidumont joined #perl6
12:30 huggable joined #perl6
12:33 pierre_ joined #perl6
12:37 AlexDaniel huggable: poor creature :(
12:37 huggable AlexDaniel, nothing found
12:38 perlawhirl joined #perl6
12:42 ZoffixW joined #perl6
12:42 ZoffixW AlexDaniel, why poor?
12:42 AlexDaniel ZoffixW: quit, join, quit, join… :)
12:43 ZoffixW heh
12:43 ZoffixW Yeah. I have her restarting every 4 hours.
12:43 awwaiid I have my quit/join notifications turned off :)
12:43 ZoffixW Except for right now... I restarted the wrong server by mistake and forgot to start her again :P
12:43 awwaiid every now and then I talk to someone who isn't there (though tab-complete usually helps), but otherwise cuts out tons of noise
12:47 * ZoffixW tries to imagine an async response with Bailador
12:48 ZoffixW Right now it's surprisingly easy to DoS perl6.party just ask it to run sleep 30; in one of the code samples :P
12:48 ZoffixW a start { render ..whatever.. } and return Nil, I'm guessing... Whatever "Return Nothing" in the docs means :S
12:49 masak hi #perl6
12:49 masak I have a discussion topic for today
12:49 ZoffixW For the whole day? :D
12:49 masak or, you know, parts of it
12:49 ZoffixW :)
12:50 ZoffixW What's the topic?
12:51 masak when I switched from Bailador to HTTP::Server::Tiny, I forwent the nice one-route-one-sub structure
12:51 masak instead everything got crammed into a single `sub app(%env)`
12:51 ZoffixW Sounds horrible :)
12:51 masak in retrospect I don't know why I accepted that
12:52 ZoffixW What's the discussion topic for today that you have?
12:52 masak I'm getting to it :)
12:52 masak commit https://github.com/masak/nex/commit/85340b70db718628a430c88c1c3094e93a01ed30 fixes the problem -- re-instating one sub per route
12:53 masak so the insight in the specific is that just because I change to HTTP::Server::Tiny, I don't have to forego the nice structure of my app
12:53 masak the insight more generally is that we as developers have both the opportunity and the responsibility to Have Nice Things
12:53 itcharlie joined #perl6
12:53 masak by structuring our programs/systems to expose what's important
12:54 masak I find it hard to express this in a good way
12:54 masak but we have a strong tendency to, um, cargo-cult or appropriate someone else's structure
12:55 masak rather than building the structure we need for the job at hand
12:55 ZoffixW I find a lot of content type and HTTP codes in that snippet. I wouldn't call those bits important in a web app.
12:55 verzit joined #perl6
12:55 masak yeah; there's still a bit of repetition there
12:55 ZoffixW As in, I don't care about that and don't wanna see it. I care about content my app generates, not HTTP protocol
12:56 masak I could probably hide those bits away in a sub, too
12:56 ZoffixW But I see what you mean. I do feel like there should be some better way to structure web apps than a bunch of subs for route definitions :)
12:56 masak that wasn't my point, but OK :)
12:56 ZoffixW lol, OK :)
12:57 masak my point was that I just blindly accepted that I'd have to put everything directly inside `sub app(%env)` (just like all the examples), even though I really preferred the way Bailador structures it, with individual subs
12:58 ZoffixW Ah
12:58 masak this commit gives me back my individual subs, with minimal overhead (just a small switch statement left in `sub app(%env)`
12:58 ZoffixW But why did you go away from Bailador?
12:58 masak because I wanted SSE
12:58 masak and HTTP::Server::Tiny has it, and Bailador doesn't, and it is't trivial to add to Bailador
12:58 masak isn't*
12:59 moritz what's SSE?
12:59 masak Server-Sent Events
12:59 masak in this particular case, the server going "hey, $client! $opponent made a move!"
12:59 MadcapJake I think what masak is saying is that we have a tendency to think that a given module's structure comes from some underlying magic but often times, the general layout that a particular model supports is really just a design choice that we can easily replicate. Is that close, masak? :)
12:59 moritz how does that work technically? through websockets?
12:59 masak MadcapJake: very.
12:59 masak MadcapJake: I'd say "easily replicate or even improve upon"
13:00 masak moritz: no, it's a separate protocol.
13:00 ZoffixW *sigh* and IE is being the slow kid on SSE too: https://en.wikipedia.org/wiki/Server-sent_events#Web_browsers
13:00 masak moritz: websockets are bidirectional, SSE is just from server to client
13:00 * ZoffixW spots Mojolicious on the list of supported frameworks
13:00 masak ZoffixW: since my user base is basically me and another guy, I can afford not to worry about IE
13:01 masak ZoffixW: but isn't there some polyfill or something one can use for IE?
13:01 ZoffixW masak, no idea. I didn't know what SSE was until you mentioned them :)
13:01 masak http://html5please.com/ seems to say there is
13:03 moritz the wiki page is very light on technical details
13:04 moritz "Event streams are always decoded as UTF-8. There is no way to specify another character encoding." I love it
13:04 moritz from https://www.w3.org/TR/eventsource/
13:07 finanalyst joined #perl6
13:07 arnsholt Praise the encoding gods!
13:07 Emeric joined #perl6
13:10 masak moritz: http://html5doctor.com/server-sent-events/ is probably a more thorough introduction
13:10 masak in many ways it seems to be a simpler, more streamlined version of web sockets
13:11 RabidGravy and really, really simple to implement with HTTP::Server::Tiny
13:12 masak yeah -- wow
13:12 masak such a nice mapping between supplies and SSE! o.O
13:13 RabidGravy I really ought to get round to making a client thing for it
13:15 RabidGravy the hack I made for the couchdb changes feed is sufficiently appalling that I may take it out before I release Sofa
13:16 masak the quote in http://www.thebigquestions.com/2014/11/13/the-rising-sea/, starting with "Most mathematicians take refuge within a specific conceptual framework...", captures what I wanted to say about programming
13:16 masak that is, we often forget just how malleable our medium is
13:16 masak and what we really are, or should be, like Grothendieck, are builders of mansions
13:16 jnthn masak: Anything about SSE that makes it even more supply-nice than web sockets? :)
13:17 * jnthn didn't look at SSE at all...
13:18 zostay grondilu: answering your question from last night, i would do something like this: -> |c { if c.elems == 0 { 'degen' } else { 'op' ~ c[0] ~ c[1] } }
13:18 masak jnthn: dunno enough about web sockets to answer that.
13:18 masak jnthn: I just find it Verra Nice that someone++ actually mapped supplies to SSE, so that it's really effortless to use SSE that way
13:20 skids joined #perl6
13:20 jnthn masak: Yeah, it's exactly the kind of case I'd imagined supplies being really nice for :)
13:20 RabidGravy web sockets work nicely with supplies too
13:21 jnthn RabidGravy: Cool...what should I look at if I want to play with that, ooc?
13:21 masak "play with" as in use, or as in implement?
13:22 RabidGravy start at https://github.com/jonathanstowe/Lumberjack-Application/blob/master/lib/Lumberjack/Application/WebSocket.pm#L74 and work backward ;-)
13:22 masak to a first approximation, it seems to me SSE are preferable in both cases ;)
13:22 masak (though of course we'll probably want ecosystem support for both)
13:22 RabidGravy the WebSocket module works nicely
13:22 jnthn masak: use
13:23 jnthn masak: I'd always thought it'd be cool to do a supplies demo involving web sockets in a talk some day, and I'm plenty happy not to have to implement it to show it off ;)
13:23 masak jnthn: I don't know why the average app would need something bidi like WebSockets, when ordinary HTTP requests already go one of the ways
13:24 masak jnthn: and so SSE seems like the sane kind of simplification that always seems to succeed a first slightly over-engineered solution, IMHO
13:24 jnthn masak: hmm, interesting :)
13:25 sena_kun joined #perl6
13:25 masak also, SSE feels much more aligned with HTTP/web in general
13:26 masak when you get down to it, the only difference to an ordinary HTTP response is `Content-Type => 'text/plain; charset=utf-8, text/event-stream'`
13:26 masak (and then the server doesn't hang up, but keeps sending lines)
13:26 RabidGravy I'm not entirely sure, SSE is really good for things like the CouchDB changes feed but not so convenient when you want to implement a sort of "inner protocol" that is bi-directional
13:27 RabidGravy websockets are more like a glimpse of HTTP/2
13:27 prammer joined #perl6
13:27 AlexDaniel RabidGravy: yea
13:28 masak that's an interesting counterpoint. haven't thought of it that way.
13:29 * geekosaur knows at least one program that needs websockets
13:29 DarthGandalf joined #perl6
13:29 geekosaur (it's an online game so needs to be able to send player actions back to the server, and with lower overhead than POST)
13:31 masak sounds legit, yes
13:31 wamba joined #perl6
13:32 * RabidGravy tries to find the streaming source client that is made with ws
13:35 RabidGravy oh yeah https://github.com/savonet/liquidsoap/pull/90
13:36 RabidGravy I forgot that it got it in 1.20
13:36 pmurias joined #perl6
13:38 awwaiid looks like there is a polyfill for SSE on IE, https://github.com/remy/polyfills/blob/master/EventSource.js
13:39 pmurias jnthn: my $foo;nqp::takedispatcher('$foo') gets broken by the NQP::Optimizer? should I stop the optimizer from turning it into a local?
13:41 jnthn pmurias: I think takedispatcher is only relevant to Rakudo, and its optimizer knows about it.
13:42 jnthn pmurias: Which is why we'd have gotten away with that. :)
13:42 jnthn Guess you discovered it while writing a test? :)
13:45 mr-foobar joined #perl6
13:45 pmurias jnthn: yes
13:52 nebg joined #perl6
13:52 nebg hello everyone... is perl6 based on JVM ?
13:53 tadzik no
13:53 MadcapJake Perl 6 as implemented in Rakudo has a JVM backend, but it's not entirely stable yet
13:53 tadzik perl6 is a language, not bound to any particular implementation
13:53 tadzik rakudo, the major perl6 compiler can run on jvm, but doesn't have to
13:53 RabidGravy magic pixies
13:55 perlpilot Rakudo has a magic pixie backend too?
13:55 * masak .oO( Perl 6 is a language, and not bound by puny human whims )
13:56 timotimo puny human jvm
13:57 jnthn pmurias: I guess teaching the NQP optimizer about it to easy testing is OK enough :)
13:59 masak ZoffixWin: I made a commit, just for you: https://github.com/masak/nex/commit/62aaf422ba1c6643b4ea6df547bbb0d23788b339
13:59 masak wow, but the diff is confusing
14:00 masak sometimes it feels as if diffs could be a lot more clever if they just paid attention to block boundaries
14:00 perlpilot masak: that's why I think someone should make a "human diff" that chunks things as a human would
14:01 perlpilot of course, it would need to be much smarter about some things and require "knowing" what it's diffing.
14:01 perlpilot (I bet someone has already done something like this, I just don't know about it)
14:01 masak yes, I've seen that at times
14:01 masak I don't know how those work, though
14:02 masak it might help to diff with respect to the parse tree somehow, for example
14:02 timotimo there's the "patience diff" algorithm
14:02 timotimo that has some heuristic that makes diffs better for humans to read
14:03 tony-o is there a mechanism in perl6 to run code in the main thread and force the rest of the processing to occur in another?
14:03 tony-o IE, if i wanted to continue to read from $*IN while the rest of the process does its thing
14:05 timotimo i'm still convinced we shouldn't give the "socket from non-originating thread" warning for regular file descriptors
14:05 timotimo but i got no back-up for that opinion
14:05 tony-o i'll back you up
14:06 jnthn Removing the warning wouldn't suddenly make $*IN readable from another thread.
14:06 tony-o er, is that because we should be able to read those?
14:06 timotimo i shouldn't call it "warning", as it's a error actually
14:06 timotimo jnthn: i *think* the problem doesn't actually happen with file descriptors
14:06 jnthn $*IN isn't a file descriptor though
14:06 jnthn It's a tty, handled as a uv_stream
14:06 jnthn So pretty sure it's vulnerable
14:07 timotimo well ... crap :(
14:07 jnthn And yes, it wants fixing.
14:07 jnthn But that's harder than "rip out the error" :)
14:07 tony-o there were side effects when you tried copying the $*IN context into the new thread, no?
14:07 tony-o s/context/handle/
14:10 nebg tadzik, ok so what's the advantage in runnning rakudo in JVM ? why should i do that ?
14:11 timotimo you can expect it to be less buggy than whatever we made :P
14:11 timotimo its GC is good, its optimizer is frighteningly good
14:11 Roamer` Well this is fun... Is this known? chdir "some/path"; "subdir".IO.dir; works fine, but if I chdir "some/path/" with the trailing slash, then .IO.dir removes the first letter of the subdir's name :)
14:12 Roamer` not sure if I can golf it here, I wouldn't want to get the bot in trouble for doing filesystem ops :)
14:12 Roamer` but perl6 -e 'use v6.c; chdir "foo/"; "conf".IO.dir.perl.say;'  if you have foo/conf/
14:13 awwaiid Has anyone submitted a Perl6/Rakudo talk to StrangeLoop yet? I'm going to submit one.
14:14 perlpilot Roamer`: Confirmed.  Can you rakudobug that?
14:14 Roamer` perlpilot, sure, coming up
14:15 Roamer` perlpilot, thanks
14:15 perlpilot Roamer`: no, thank you!  :)
14:15 tharkun joined #perl6
14:17 AlexDaniel Roamer`: that's a good one :D
14:17 [Coke] nebg: If you require interop with jvm jars, or if, e.g., you're in a corporate environment that is java only. Basically, if you need the jvm for some reason. (maybe the jvm works on your obscure platform, and MoarVM does not)
14:17 [Coke] but if you don't know if you care? use the default, MoarVM.
14:18 perlpilot Roamer`: it's worse.   if you chdir "foo/////";  it'll change the the foo directory, but "conf".IO.dir.say will remove one letter for each /
14:19 awwaiid man oh man. Strange Loop is a conference that was practically MADE for perl6, and yet I think nobody here knows/cares about it. What's the deal?
14:20 tadzik nebg: mostly if you want to interact with Java libraries
14:20 AlexDaniel m: chdir ‘/temp/’; ‘.’.IO.dir.say
14:20 camelia rakudo-moar 810788: OUTPUT«Failed to change the working directory to '/temp/': does not exist␤  in block <unit> at /tmp/FbwH37txlH line 1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp line 3055␤  in block <unit> at /tmp/FbwH37txlH line 1␤␤»
14:20 AlexDaniel m: chdir ‘/tmp/’; ‘.’.IO.dir.say
14:20 camelia rakudo-moar 810788: OUTPUT«("/tmp/2yamldata-M2wvA1".IO "/tmp/X11-unix".IO "/tmp/ICE-unix".IO "/tmp/XIM-unix".IO "/tmp/font-unix".IO "/tmp/Test-unix".IO "/tmp/rat9uqe4F".IO "/tmp/XajBf20V7".IO "/tmp/_kUNwvxo8".IO "/tmp/zUJ6dIrZV".IO "/tmp/MgpnqBzo8".IO "/tmp/sperfdata_camelia".IO "/t…»
14:20 tadzik I heard those speed rumours, but I haven't seen any data to back it up in a while :)
14:20 AlexDaniel well, that's not what I meant
14:21 AlexDaniel m: chdir ‘/tmp/////////////’; ‘.’.IO.dir.say
14:21 camelia rakudo-moar 810788: OUTPUT«Start argument to substr out of range. Is: 18, should be in 0..14; use *-18 if you want to index relative to the end␤  in block <unit> at /tmp/a0I_JgRH2f line 1␤␤Actually thrown at:␤␤»
14:21 perlpilot Roamer`: and apparently, you get "Start argument to substr out of range." if you've got more / than your subdir has characters
14:21 AlexDaniel m: chdir ‘/tmp/////’; ‘.’.IO.dir.say
14:21 camelia rakudo-moar 810788: OUTPUT«("/tmp/ldata-M2wvA1".IO "/tmp/unix".IO "/tmp/unix".IO "/tmp/unix".IO "".IO "".IO "/tmp/uqe4F".IO "/tmp/f20V7".IO "/tmp/wvxo8".IO "/tmp/dIrZV".IO "/tmp/qBzo8".IO "/tmp/fdata_camelia".IO "/tmp/UnG1w".IO "/tmp/smwll".IO "/tmp/OWR8X".IO "/tmp/uYXcM".IO "/tmp/a…»
14:21 AlexDaniel there you go
14:23 AlexDaniel ok, the problem is not only with the trailing slash
14:23 perlpilot Hmm.  and it looks like it depends on whether or not your path starts with a / or not too
14:23 AlexDaniel perl6 'chdir ‘foo////conf’; ‘.’.IO.dir.say'
14:23 AlexDaniel it does not
14:24 perlpilot no, I mean it still breaks, but you get different behavior
14:24 AlexDaniel oh
14:24 * perlpilot meeting &
14:24 AlexDaniel Roamer`: perhaps consider mentioning that it is not just about a trailing slash
14:24 AlexDaniel Roamer`: ah, you already rakudobugged
14:24 AlexDaniel Roamer`++
14:25 tharkun joined #perl6
14:29 Actualeyes joined #perl6
14:30 khw joined #perl6
14:33 MadcapJake awwaiid: location-wise I'd totally go to Strange Loop, if I have some (a lot of) spare cash by the time registration opens, I might do it! That's a big "if" though :)
14:35 tbrowder help: executing 'perl6 --help' says to consult the 'perl6(1)' man page but I can't find it, any hints?
14:37 timotimo oh, yeah, do we even have a perl6 manpage anywhere?
14:37 timotimo like, do we actually have a source file that'd end up as a man page?
14:37 tbrowder I have been looking for the perl6 source but haven't found it so far...
14:39 awwaiid MadcapJake: submit a talk and maybe they'll pay for you to go :)
14:39 tbrowder maybe the docs (Language) should have a new section on perl6 the executable, and maybe Perl 6 pod, too...
14:39 awwaiid tbrowder: github.com/rakudo/rakudo
14:40 MadcapJake I am not worthy! :) Have you seen some of their videos!? Strange Loop talks are for angel-invested startups and PhDs :P
14:40 MadcapJake tbrowder: I don't see any manpage files in rakudo: https://github.com/rakudo/rakudo/search?utf8=✓&q=extension%3A1&type=Code
14:41 awwaiid MadcapJake: can't win if you don't play :)
14:42 awwaiid tbrowder: for the documentation source, github.com/perl6/doc
14:42 MadcapJake Maybe someday I'll do something cool enough for StrangeLoop but that day isn't any day in the near future :P
14:43 cdg joined #perl6
14:43 awwaiid hehe
14:43 tbrowder the perl6 executable is a bash script executing 'rakudo/install/bin/moar'
14:43 awwaiid Well I'm submitting a Perl6/Rakudo talk, so being cool by-proxy :)
14:43 MadcapJake sweet! I look forward to (at least) watching it on YouTube! :)
14:45 awwaiid There are several Perl6 topics that are worthy -- you can basically take any one of the major language features and do a 40 minute talk on it. Type system, Concurrency system, Metaprogramming system, Implementation of Rakudo, Using Cross-Language Libraries... basically any of jnthn talks
14:46 awwaiid So, IMO, we should collectively be submitting 7 or so talks
14:46 tony-o timotimo: i take that to mean there is no mechanism for me to kind of hijack the main loop and continue processing in another thread?
14:46 MadcapJake awwaiid: flood the conference with Perl 6! :)
14:46 timotimo we don't implement the kansas city shuffle yet
14:46 awwaiid I am only allows to submit 2. So everyone HERE needs to submit some
14:48 awwaiid And I'd totally pitch in to sponsor TimToady giving a talk there. I hereby pledge $100 if there is interest.
14:49 tony-o lol
14:49 MadcapJake this article I'm writing about generators is quickly turning into an exegesis on coroutines, I could see it being a presentation...
14:50 awwaiid DO IT
14:50 awwaiid The thing is when you submit you only need the abstract. Talks due May 9th. Conference is Sept something ... that's a LONG time to procrastinate making slides!
14:51 awwaiid And if nothing else if there are several p6 talks maybe one of them will get in :)
14:53 kurahaupo joined #perl6
14:55 jjido joined #perl6
14:59 rindolf joined #perl6
15:02 dj_goku timotimo: what is the kansas city shuffle? I am in KC and haven't heard that before.
15:02 timotimo just a random quote from one of the best movies ever made :)
15:02 timotimo (lucky number slevin)
15:03 DrForr I would ask "where is this?" but I've already booked quite a few conferenes...
15:03 DrForr *conferences
15:03 azawawi joined #perl6
15:03 dj_goku timotimo: lol
15:03 azawawi hi :)
15:04 azawawi arnsholt: ping
15:04 azawawi .seen arnsholt
15:04 yoleaux I saw arnsholt 13:07Z in #perl6: <arnsholt> Praise the encoding gods!
15:05 kaare_ joined #perl6
15:05 timotimo it really is a pretty damn good movie
15:05 zakharyas joined #perl6
15:05 azawawi timotimo: which one?
15:06 timotimo lucky number slevin
15:06 azawawi yup
15:06 MadcapJake This is wrong: https://en.wikipedia.org/wiki/Coroutine#Implementations_for_Perl
15:07 azawawi so i have the zeromq book on my reading list for this weekend :)
15:07 azawawi what's the status of https://github.com/arnsholt/Net-ZMQ?
15:07 MadcapJake Yes Perl 6 has coroutines but no, the RFC linked is for generators and isn't even in the current Perl 6 spec :P
15:08 timotimo urgh
15:09 tbrowder the perl6 man page pod seems to be "rakudo/rakudo/docs/running.pod"
15:09 tbrowder it needs to be made to install with rakudobrew somehow...
15:11 MadcapJake and converted to manpage format
15:13 timotimo the latter part is easy
15:15 azawawi .tell arnsholt is Net::ZMQ still being maintained?
15:15 yoleaux azawawi: I'll pass your message to arnsholt.
15:16 tbrowder timotimo: this doesn't work: perl6 --doc=man (or MAN or Man) running.pod; so how to do it (with perl 5?)
15:16 timotimo yeah, with perl5 i'd expect
15:17 tbrowder sounds kind of lame, but I guess that's the state of Perl 6 pod at the moment
15:19 timotimo nothing (except a whole lot of pain) stops anybody from building Pod::To::Roff
15:19 ggoebel114 joined #perl6
15:20 nebuchadnezzar joined #perl6
15:22 jameslenz joined #perl6
15:28 M-matthew joined #perl6
15:30 tony-o ZoffixWin: data-dump should be corrected and ready for your dumping
15:31 aindilis joined #perl6
15:38 Woodi hi #perl6 :)
15:41 Woodi do s/return/tail/ could be proper TCO in moust cases ? just clear current frame and setup new... probably not compatible with captures.
15:43 uruwi How to reinstall a module with panda?
15:43 jdv79 use --force?
15:44 RabidGravy anyone fancy porting moarvm to a quantuum computer? https://developer.ibm.com/bluemix/2016/05/04/quantum-experience-on-bluemix/
15:44 uruwi That didn't help
15:45 jdv79 what's the problem?
15:45 uruwi It's exactly the same as if I didn't use --force
15:46 RabidGravy which is?
15:46 uruwi It refuses to install a module because it's already there
15:46 jdv79 what is the cmd line you used?
15:46 RabidGravy er
15:47 jdv79 i think the --force has to be first, right?
15:47 uruwi panda --notests Compress::Zlib --force
15:47 uruwi putting --force first just prints a usage message
15:48 Woodi as for subject of a day: http://www.posteriorscience.net/?p=206  so, academia give up in 1997 :)  but things realy are like that - programmers moustly use libraries and not construct things from ground up. even on that channel "algorithm" is not frequent thing (generally: probably it's effect of using OO); and "domain" thingies are moust scared domains - WHAT THAT USERS REALY EXPECT???! ;)
15:49 RabidGravy panda --notests --force install <module> # works for me
15:49 uruwi Nope, I might have an outdated version.
15:49 jdv79 update all the things
15:50 uruwi I just updated Rakudo to 2016.04 using the msi installer
15:51 uruwi Might not have updated Panda as well
15:51 jdv79 yeah, panda --notests --force install JSON::Tiny worked for me
15:52 uruwi Is there some way to see the panda version?
15:53 jdv79 panda info Panda ?
15:54 uruwi Well got the info but no version.
15:54 uruwi Trying to install Panda from source produces an error message.
15:55 jdv79 idk about windows
15:55 uruwi (while testing)
15:55 uruwi Yeah, but thanks anyway
15:55 sufrostico joined #perl6
16:01 dakkar I'm looking at NativeCall on MoarVM; if I have a «class Foo is repr('CStruct')», it looks to me that, when the GC decides to free it, MoarVM will just do MVM_free (which is the libc's "free") on it
16:01 pmichaud good morning, #perl6
16:02 dakkar so… what happens if I need to call a C library function to free the resources associated with that CStruct? like, maybe I have an opaque CPointer in there that must be freed by some special call
16:02 dakkar I don't see a way to do it, but I suspect I'm missing some piece. help?
16:06 RabidGravy method DESTROY gets called when the GC takes the object
16:06 JimmyZ pmichaud: \o
16:07 JimmyZ pmichaud: long time no see :)
16:08 dakkar RabidGravy: ah, so that call happens before the GC invokes the "gc free" slot in the repr structure
16:08 RabidGravy I believe so
16:08 dakkar ok, now a harder problem: the C function I have deallocates *the entire struct*, not a piece of it
16:08 dakkar so after my DESTROY, the pointer is no longer valid
16:09 timotimo you mean it follows pointers and deallocates those objects, too?
16:09 dakkar timotimo: that too
16:09 dakkar for reference, I'm looking at xmlFree from libxml2
16:09 RabidGravy yeah the chromaprint thingy does that too
16:09 dakkar which has lots of *interesting* logic, that does not seem to play well with a GC
16:10 dakkar I'd love to be able to tell MoarVM "I have taken care of all these objects, consider them freed"
16:10 timotimo are you sure moar calls free on the struct itself?
16:11 dakkar timotimo: well, it wants to; it's currently commented out because «For some reason, this causes crashes at the moment»
16:12 timotimo yeah
16:12 timotimo it should care about whether it owns the blob or not
16:12 timotimo like, when you nativecast, it wouldn't own the blob
16:13 timotimo or for that matter if a function returns the struct for you
16:13 dakkar oh gods, I hoped to be able to forget about pointer ownership
16:14 timotimo impossible when you're dealing with C
16:14 dakkar at the moment, my hunch is that, if I want a working libxml in perl6, I need to have P6Opaque objects that have a CPointer, track ownership on the p6 side, and call the C destructors from the p6 destructors
16:15 masak dakkar: pointer ownership might not be worth forgetting about. oftentimes it feels quite related to the design itself; getting the ownership wrong can mean getting the design wrong...
16:16 dakkar masak: brings back bad memories of when I was working with C++ 😕
16:16 dakkar and when the design is someone else's… bah
16:17 dakkar I liked the idea of just declaring structs and relying on NativeCall, but I was probably dreaming of too much magic
16:17 dakkar any library that manages memory in non-trivial ways (e.g. libxml, glib/gtk) needs careful proxying, probably
16:19 dakkar also: how do I test the interaction between destructors and GC?
16:20 RabidGravy there is a way of forcing the gc to run,  can't remember what it is though
16:20 dakkar nqp::gc() or somesuch
16:21 dakkar I should probably start writing some code and see what happens…
16:21 dakkar (then try it on the JVM and see what *else* happens)
16:30 Actualeyes joined #perl6
16:35 RabidGravy dakkar, a brute force test here seems to suggest that nothing bad happens if you free something that is being GCd
16:35 RabidGravy https://gist.github.com/jonathanstowe/73dc661bbb1822441f31247784c0a345
16:36 dakkar CPointer does not have a gc_free slot callback
16:36 dakkar CStruct does :)
16:36 timotimo that's right
16:36 RabidGravy ah
16:36 dakkar on the other hand, I can't seem to get DESTROY called
16:36 timotimo when you .new a CStruct, we'll allocate stuff for you
16:36 pmurias does MoarVM really free pointers it received from a C library?
16:36 timotimo dakkar: it's not guaranteed to run
16:37 nadim joined #perl6
16:37 timotimo pmurias: not CPointers, but if you cast a CPointer to a CStruct ... who the hell knows :)
16:37 dakkar timotimo: not at all, or "not timely"?
16:37 RabidGravy well that one ^ starts calling the DESTROY after ~ 3000 iterations
16:38 dakkar oh, it was being called, I was just not looking in the right place
16:39 dakkar still nearly untestable, though: *some* objects get DESTROYed, even if I call nqp::force_gc()
16:40 rurban joined #perl6
16:40 RabidGravy well, changing the CPointer to a CStruct there and still nothing bad happens
16:43 domidumont joined #perl6
16:43 dakkar RabidGravy: because MoarVM is not really calling free() https://github.com/MoarVM/MoarVM/blob/master/src/6model/reprs/CStruct.c#L668
16:43 itcharlie left #perl6
16:44 dakkar memory management is hard!
16:44 dakkar anyway, hometime here, I'll look again sometime in the (near?) future
16:45 Xliff_ Oh damn. I missed this discussion.
16:45 ZoffixW joined #perl6
16:46 Xliff_ dakkar: Does libxml2 return structs or are you allocating them?
16:46 timotimo dakkar: definitely not timely, but potentially not at all, as we won't call DESTROY when the process exits.
16:46 dakkar Xliff_: returns *trees* of structs, and xmlFree frees entrie trees :(
16:47 dakkar timotimo: ok, process exit is a special case I can live with
16:47 Xliff_ dakkar: Are you getting SEGVs when you use xmlFree?
16:47 dakkar Xliff_: I haven't even started writing the code
16:47 Xliff_ Coz if C-lib returns struct, you are on your own.
16:47 Xliff_ P6 won't do anything, that I've seen.
16:47 dakkar I want to understand what to expect, and have some testing strategies
16:48 ZoffixW tony-o, thanks. I'll test it out and will respond on the issues in about 7 hours.
16:48 * dakkar goes home for real
16:48 pmurias joined #perl6
16:48 dakkar thanks all for the pointers (pun intended)
16:50 jjido joined #perl6
16:51 timotimo :)
16:53 azawawi joined #perl6
16:54 azawawi .
16:54 azawawi .seen RabidGravy
16:54 yoleaux I saw RabidGravy 16:40Z in #perl6: <RabidGravy> well, changing the CPointer to a CStruct there and still nothing bad happens
16:58 RabidGravy harr!
16:58 RabidGravy was just outside in the garden
17:00 m0ltar joined #perl6
17:04 azawawi RabidGravy: im here eating sunflower seeds and pondering what my next project will be :)
17:07 rindolf azawawi: ah, you like subflower seeds too?
17:07 rindolf sunflower.
17:07 azawawi rindolf: time flies when you're eating them :)
17:08 rindolf azawawi: yes.
17:08 RabidGravy I think you want to make http::useragent able to feed a supply with chunked data
17:08 azawawi RabidGravy: or build a proper Net::ZMQ :)
17:09 RabidGravy I actually have a half fixed fork somewhere
17:09 RabidGravy 'ang on
17:09 azawawi http://zguide.zeromq.org/pl:_start   # Perl
17:10 timotimo do sunflower seeds have some psychoactive substance in them that i'm not aware of?
17:11 grondilu salt, maybe
17:11 azawawi timotimo: not that im aware of... also non-salty :)
17:13 grondilu I tried some lately.  Very salty and tough to get to the actual edible part.  Maybe I don't know how to consume these things.
17:13 azawawi grondilu: get the non-salty version :)
17:14 azawawi RabidGravy: so did you find it? :)
17:15 perigrin w/ 37
17:15 sufrostico joined #perl6
17:17 RabidGravy https://github.com/jonathanstowe/Net-ZMQ - still fails tests but they run :)
17:17 azawawi RabidGravy: great.
17:18 azawawi RabidGravy++
17:18 timotimo cool
17:19 firstdayonthejob joined #perl6
17:19 azawawi RabidGravy: are you using Net::ZMQ in other projects?
17:20 RabidGravy no
17:20 azawawi i remember it was used for a perl6 ikernel (ipython)
17:20 azawawi https://github.com/timo/iperl6kernel
17:24 MadcapJake how can you use a class method as a map block?
17:27 RabidGravy well the easiest way would be to close over the instance in the block
17:29 MadcapJake is there any to to directly access it? something like Foo::<&new> ? (though that doesn't work)
17:30 ugexe m: class Foo {  method bar { -> $a { say $a; }; }; }; (1..4).map(Foo.new.bar)
17:30 camelia rakudo-moar 810788: OUTPUT«1␤2␤3␤4␤»
17:31 m0ltar joined #perl6
17:32 pmurias MadcapJake: is something like -> $arg {Foo.new($arg)} not good enough?
17:33 MadcapJake no that'll be fine just was curious if there was a way to treat a method like a &routine
17:33 RabidGravy m: class Foo { method bar(*@ggh) { say @ggh } }; my $f = Foo.new;  my &foo = $f.can("bar")[0]; my &bar = &foo.assuming($f); &bar(1,2)
17:33 camelia rakudo-moar 810788: OUTPUT«[1 2]␤»
17:33 MadcapJake seems to work for ugexe there but with new, I can't get it to work
17:36 RabidGravy or more specific to your request
17:36 RabidGravy m: class Foo { method bar(*@ggh) { say @ggh } }; my $f = Foo.new;  my &foo = $f.can("bar")[0]; my &bar = &foo.assuming($f); <a b c>.map(&bar)
17:36 camelia rakudo-moar 810788: OUTPUT«[a]␤[b]␤[c]␤»
17:37 MadcapJake neat! just too verbose :)
17:38 RabidGravy scared of typing or something?
17:39 MadcapJake lol no it's just I can save myself the trouble of doing that by just doing this the normal way, I was looking for a shorthand notation for instantiating several classes in a single statement
17:39 MadcapJake my ($a, $b, $c) = map Foo::<&new>, <name1 name2 name3>;
17:41 timotimo the thing is you have to bind the invocant somehow, unless you want to call the method with the things in the list-mapped-over as the invocant
17:42 MadcapJake I thought maybe it would work for undefined classes
17:42 RabidGravy you can "assuming" with the type object if it's a constructor
17:42 MadcapJake ahh!
17:43 pmichaud why not simply:    my ($a, $b, $c) = map *.new, Foo, Bar, Baz;
17:43 pmichaud which creates an instance of Foo, Bar, and Baz
17:44 MadcapJake that's nifty! but I want to iterate over a list of constructor arguments not classes
17:44 pmichaud ah, I saw "instantiating several classes in a single statement".
17:45 pmichaud so:  my ($a, $b, $c) = map Foo.new($_), <arg1 arg2 arg3>;
17:45 pmichaud er
17:45 pmichaud so:  my ($a, $b, $c) = map {Foo.new($_)}, <arg1 arg2 arg3>;
17:46 MadcapJake ok yeah! that's really the best option. Thanks pmichaud!
17:46 RabidGravy m: class Foo { has $.name; multi method new($name) { samewith(:$name) } };  my &foo = Foo.can("new")[0]; my &bar = &foo.assuming(Foo);say <a b c>.map(&bar)
17:46 camelia rakudo-moar 810788: OUTPUT«(Foo.new(name => "a") Foo.new(name => "b") Foo.new(name => "c"))␤»
17:48 MadcapJake nice! I've never used samewith (is it in the docs?)
17:48 timotimo m: my ($a, $b, $c) = (Array.new($_) for <foo bar baz>)
17:48 camelia rakudo-moar 810788: ( no output )
17:48 timotimo ^- a bit shorter still
17:48 timotimo hm. not actually shorter. but it feels shorter
17:49 timotimo well, it does get rid of curlies and a comma
17:50 RabidGravy I'm not actually sure that any of the  (same|call|next)(same|with) are documented
17:51 rodarmor joined #perl6
17:51 RabidGravy and there should be a samesame for completeness ;-)
17:52 MadcapJake some of them are in http://doc.perl6.org/language/functions#Re-dispatching
17:52 timotimo "how are you doing?" "samesame"
17:52 jjido_ joined #perl6
17:54 RabidGravy but samewith, if it isn't documented, calls a multi candidate with the appropriate arguments
17:57 bdmatatu joined #perl6
17:57 RabidGravy well it does that if it is documented as well
17:58 ugexe s12 under calling sets of methods
17:59 perlpilot timotimo: would samesame be for calling the same method with the same args, but without introducing another call frame?
17:59 perlpilot er, RabidGravy
17:59 RabidGravy :)
18:01 perlpilot Sometimes I think there should be an alternate version of the synopses where the universe is just slightly askew and all of the almost-crazy ideas are in there.
18:01 MadcapJake that'd be sweet! :)
18:02 RabidGravy I thought that *was* the synopses ;-)
18:02 MadcapJake a world where programmers are scorned for including too much whimsy in everything they do :)
18:03 perlpilot RabidGravy: right, the current synopses are askew relative to the normal universe, we need some that are twisted just a little bit more. ;)
18:06 MadcapJake INTERPERL
18:06 pmichaud one could certainly create a "rfc" repository or an "rfc" tag in a ticket system to hold the crazy ideas
18:07 timotimo more like "rfl" - request for laughs
18:07 pmichaud request for crazy
18:07 geekosaur [Acme]
18:08 MadcapJake wrote a program to count vowels/consonants in complete shakespeare texts and naive version is looking like it will take quite a long time...
18:09 RabidGravy so when IBM sends you an email to reset your password, the link in the message results in a 502
18:10 RabidGravy un-good
18:11 RabidGravy so you can't have an Informix driver for DBIish cause I can't download the SDK
18:11 timotimo that's your new password
18:11 timotimo MadcapJake: did you try parallelizing yet ... :)
18:12 MadcapJake I will, I just wanted to get a comparison, but this is taking ages! :P
18:14 perlpilot MadcapJake: show the code
18:15 perlpilot (I'd like to see your naive version)
18:17 MadcapJake (Context: I'm following a presentation on python generators for some reference when writing an article about generators/coroutines, and this is meant to mimic the python code) https://gist.github.com/MadcapJake/c29b76d7eccf5af86e973c5da7c7f7a3
18:18 perlpilot interesting
18:19 timotimo MadcapJake: it could very well be that you're generating a Set for vowels every single time you get a character
18:19 MadcapJake yeah was thinking that, I'll move it outside of the loop
18:20 timotimo i'd personally use a native int for the $!count, to
18:21 timotimo too
18:21 timotimo and did you not like my "Counter.new($_) for <... ... ...>" suggestion? :(
18:21 timotimo and i'm surprised you'd use 'vowel','consonant' rather than <vowel consonant foo>
18:23 MadcapJake I liked it! I just had already written that bit :) But if it bothers you that much, I'll change it :P
18:24 firstdayonthejob joined #perl6
18:24 MadcapJake You have to enclose it in parentheses though, that's a little unfortunate
18:28 timotimo right
18:28 timotimo maybe a "do" after the = replaces the parens
18:29 MadcapJake 221 seconds! not bad :)
18:30 MadcapJake yeah that works timotimo thanks!
18:30 buharin joined #perl6
18:33 perlpilot pmichaud: Are you going to YAPC this year?
18:34 pmichaud perlpilot: that's the current plan :)
18:34 timotimo MadcapJake: the previous attempt ran for how long?
18:34 perlpilot Cool.  Looks like I'll be there too (barring anything strange happening)
18:34 MadcapJake timotimo: unknown, didn't want to wait long enough to find out :P
18:35 MadcapJake the only change was not creating a set after loop, so I'm guessing that's fairly expensive and not really what I'm looking to measure
18:35 MadcapJake s/after/every/
18:36 timotimo well, how long did it run for before you killed it
18:38 MadcapJake here, I'll set one up in a terminal and see
18:41 MadcapJake timotimo: on a tiny 4 stanza file it takes 0.4s outside the loop and 2.5s inside the loop
18:43 buharin hiho
18:43 buharin :)
18:49 MadcapJake 'ello!
18:59 buharin weechat is greate ;D
19:10 maybekoo2 joined #perl6
19:14 brrt joined #perl6
19:16 ufobat joined #perl6
19:18 ufobat hello perl6
19:18 yoleaux 02:48Z <zostay> ufobat: thx, i hope the MoarVM problem blocking progress on P6SGI can get resolved sometime so I can have fun on it again... i'm no language or VM hacker
19:19 macsnowball joined #perl6
19:22 jjido joined #perl6
19:23 MadcapJake timotimo: it's been almost a half hour, still hasn't finished :)
19:25 MadcapJake it's at least 6 times slower (though at 600% it should've completed in approx 22 minutes)
19:26 timotimo OK
19:26 timotimo what changes are there between these versions you're comparing?
19:28 MadcapJake Set generated inside while loop versus prior to while loop
19:28 timotimo wow.
19:41 MadcapJake timotimo: I tried a channel approach but it appears to be quite slow, anything I could do to improve it? https://gist.github.com/MadcapJake/c29b76d7eccf5af86e973c5da7c7f7a3
19:42 Ulti ZoffixWin: I think if you look at some of the other languages they setup env in the docker instance
19:43 timotimo MadcapJake: i don't see it actually spawn more than one worker
19:43 Ulti ZoffixWin: also I think Rakudo perhaps needs to have some flexibility on the format of errors, I've mentioned before it would be good if it could do JSON following some error standards
19:44 timotimo ideally, our hyper and race implementations would be good enough to do this for you mostly
19:44 [Coke] (rfc) there are [RFC] tagged tickets in RT.
19:44 MadcapJake timotimo: I think I might be doing it wrong though :P
19:44 timotimo oh, and also: shaped native arrays are CRAZY SLOW
19:45 MadcapJake oh yeah! I thought they were faster :P
19:45 timotimo no, definitely not at the moment
19:45 Ulti RAKUDO_ERROR_HUMAN=0 or something gives more machine readable output
19:45 zakharyas joined #perl6
19:46 MadcapJake how would I make it spawn more than one worker?
19:46 MadcapJake bbl
19:46 timotimo call start more than once, collect the Promises in a list, await the list to get the results, add up the results with a zip
19:46 Ulti how easy would it be to hook in SSE operations on shaped native arrays from a user module?
19:47 SquireOfGothos joined #perl6
19:47 timotimo Ulti: since you can just invoke a pointer into a buffer you've written yourself via nativecall, it's possible
19:47 Ulti cool
19:48 jjido_ joined #perl6
19:48 Ulti though is that the CArray stuff rather than int8 @array[10]
19:48 nebuchadnezzar joined #perl6
19:50 timotimo i'm not sure if we support nativecast from int8 @array into CArray
19:51 Ulti a Perl6 binding for https://github.com/jfalcou/nt2 might be a fun one
19:51 Ulti I assume its all template based though :(
19:51 Ulti which means we cant
19:51 Ulti but thats full of nice SSE optimised code
19:55 dwarring joined #perl6
20:04 rindolf joined #perl6
20:04 RabidGravy goats!
20:12 cdg joined #perl6
20:30 huggable joined #perl6
20:32 sena_kun joined #perl6
20:39 yqt joined #perl6
20:46 buharin joined #perl6
20:47 timotimo congoatulation!
20:48 RabidGravy having a bit of a Candi Statton moment
20:48 timotimo hm?
20:49 RabidGravy https://www.youtube.com/watch?v=P_-9J9QQBoA
20:50 ufobat good night :)
20:58 timotimo RabidGravy: i don't understand the reference :)
20:59 timotimo but it's a nice track
21:00 cdg joined #perl6
21:04 MadcapJake timotimo: 1 hour and 23 minutes :P
21:07 TEttinger joined #perl6
21:08 timotimo oh wow
21:08 timotimo but it does seem like my initial hunch was right on the money
21:09 timotimo m: say 221 / (60 * 23 + 60 * 60)
21:09 camelia rakudo-moar b05593: OUTPUT«0.044378␤»
21:09 timotimo less than 5% of the "final" time to run it
21:09 timotimo i expect you'll gain another one bajillion speed by replacing the regex with a uniprop invocation
21:09 timotimo m: say uniprop("O")
21:09 camelia rakudo-moar b05593: OUTPUT«Lu␤»
21:10 timotimo i'm not sure, but :Letter likely maps to uniprop($_).starts-with("L") ?
21:11 MadcapJake ok i'll give that a try
21:12 MadcapJake my channel approach is still really slow :(
21:12 timotimo right
21:12 timotimo maybe the overhead of one send per line is too great
21:12 perlpilot timotimo: for a second there I though you were implying that "vowel" was a unicode property
21:12 timotimo perlpilot:  :) :)
21:13 timotimo not even close :D
21:14 MadcapJake timotimo: would you take a look and see if I improved the design: https://gist.github.com/MadcapJake/c29b76d7eccf5af86e973c5da7c7f7a3
21:17 avar joined #perl6
21:18 timotimo i don't think you have to CATCH and break the vow
21:18 timotimo throwing an exception inside a start block already breaks that promise
21:18 timotimo oh, you have a wrapper around that for some reason ?!?
21:18 timotimo oh!
21:18 MadcapJake just was going off an old advent on channels/promises
21:19 MadcapJake (lots is wrong in here) https://perl6advent.wordpress.com/2013/12/14/asynchronous-programming-promises-and-channels/
21:19 timotimo you're creating a task per line to be counted
21:19 timotimo that seems rather wasteful
21:19 timotimo and makes "count-worker" a misnomer
21:20 timotimo i'd've made like four or six workers that fight to receive values from the channel and count them
21:20 timotimo and at the very end, when the channel gets closed, they would return their result values and those would then be added up
21:21 masak 'night, #perl6
21:21 MadcapJake how do you mean fight? Like round-robin?
21:21 avar joined #perl6
21:22 lizmat night masak
21:22 timotimo no, each would try to .receive
21:22 timotimo gnite masak
21:23 Ven joined #perl6
21:37 pmurias joined #perl6
21:37 pmurias atom editor has the most Perl 6 support?
21:38 timotimo maybe not the most, but it does have a lot
21:39 mst all features of http://ex-vi.sf.net/ function as well for perl6 as for any other language I've used it with
21:39 timotimo some people expect more things from an editor than editing text :)
21:39 timotimo i, for example, like my code syntax-highlighted
21:40 pmurias having stuff in different colors helps tokenizing ;)
21:41 pmurias mst: are there any significant benefits of ex-vi over vim? ;)
21:41 cpage_ joined #perl6
21:42 timotimo i expect he's just recommending it because it's minimal-ish?
21:42 mst pmurias: for me, "because typos result in a beep, rather than activating some random four letter command I was unaware of and thereby completely breaking me out of flow while I figure out wtf just happened"
21:43 timotimo :D
21:44 timotimo thunderbird is super guilty of having keyboard shortcuts that activate without a modifier pressed and doing stuff that you have to undo if you even notice anything happened
21:44 timotimo i recently kicked those shortcuts out using some extension from 10 years ago
21:45 mst and having realised that I didn't actually use any features that weren't in the original ex-vi, it seemed a no-brainer to go that route
21:46 timotimo :)
21:46 pmurias mst: seems resonable
21:47 * pmurias would love to someday have all the fancy java-ide-like autocompletion/variable renaming/error autocorrection for Perl6
21:48 arnsholt Speaking of editors, syntax highlighting is an interesting case. Experiments testing similar effects on natural language have actually shown them to be harmful to understanding in that case
21:48 yoleaux 15:15Z <azawawi> arnsholt: is Net::ZMQ still being maintained?
21:49 pmurias arnsholt: the natural languages have really diferent syntaxes then the computer ones
21:50 hotel harmful to understanding how?
21:50 arnsholt .tell azawawi It's maintained in the sense that I'll accept patches and such, and help out to the extent that I have time. But I'm super-duper busy ATM, sadly, so I'm not actively hacking on it ATM
21:50 yoleaux arnsholt: I'll pass your message to azawawi.
21:50 hotel I could see highlighting being useful for like identifying different parts of a sentence, for example
21:50 arnsholt pmurias: Yeah, so it's not directly mappable, but it's not inconceivable that it's not very helpful for programming languages either
21:51 * hotel doesn't get it
21:51 arnsholt I think that kind of thing is generally tested by measuring text comprehension after reading a text
21:51 tony-o did it test beginners or vim users?
21:51 hotel do you mean native speakers reading texts that have been highlighted?
21:52 arnsholt Yeah, native speakers reading texts where various parts of speech were highlighted in different colours
21:52 hotel well okay i can see how that's unhelpful
21:52 hotel I was thinking about it in terms of learning a new language
21:52 timotimo i don't think the PoS gives you that much information in common sentences
21:53 timotimo in a garden path sentence, however, or buffalo buffalo buffalo buffalo buffalo buffalo ...
21:53 pmurias I could imagine a lot of possible ways to syntax highlight natural text.
21:54 pmurias like just highlighting the punctuation, or having every word in a different color
21:54 hotel imagine using highlighting to learn japanese
21:55 hotel or a language with declension
21:55 pmurias I don't have any comprehension of japanese so no coloring would help that ;)
21:56 MadcapJake timotimo: I tried to refactor to create chunks in the reader, but I'm noticing something strange, the end result changes dependent on the chunk size
21:56 timotimo well, that's clearly bad :)
21:56 timotimo is that in the paste you already gave me?
21:56 MadcapJake yeah
21:56 hotel https://en.wikipedia.org/wiki/Grammatical_particle
21:57 timotimo i ... think that code would benefit from being scrapped and rewritten :P
21:57 MadcapJake lol
21:59 Skarsnik joined #perl6
21:59 MadcapJake what is it that you aren't liking? new tasks are created now for each chunk rather than each line
21:59 timotimo yeah, i'd've just made like 4 tasks instead
22:01 MadcapJake but why?
22:01 timotimo because that's less churn
22:02 timotimo ideally, the threads/workers would just go about their business and not be interrupted by being replaced with a different task, or by sending the summary off to the next channel or something
22:03 timotimo your chunk code looks like it could immediately be replaced by a call to rotor
22:04 timotimo it makes 0 sense to me to have a vow inside combiner
22:05 cpage_ joined #perl6
22:05 MadcapJake yeah I was wondering that, remember that is from 3 year old advent post.  I'm assuming they intended it to be the indicator that the work was completed?
22:06 timotimo when you have a start block, there's no need to have promise + vow
22:06 timotimo if you don't have a start block, however, you will need that
22:07 timotimo the start block itself will already return a promise that has the vow handled by returning successfully or exceptioning out of the start block
22:07 MadcapJake ok cool, so that all of that was just doubling up on the needed promises
22:07 timotimo yes
22:08 timotimo that turns your combiner into just three lines instead of 9
22:08 timotimo maybe four lines
22:08 MadcapJake timotimo: is rotor lazy?
22:08 timotimo i believe so
22:08 timotimo do we still have the big performance difference between IO.slurp.lines and IO.lines?
22:11 MadcapJake printing the shakespear file: IO.slurp.lines.say => 0.28s, IO.lines.say => 0.18s
22:13 Sgeo joined #perl6
22:20 aries_liuxueyang joined #perl6
22:21 ZoffixWin joined #perl6
22:21 ZoffixWin joined #perl6
22:22 kid51 joined #perl6
22:29 MadcapJake timotimo: from 1 hour and 23 minutes with naive to 8 minutes with my ugly channel code :)
22:34 lichtkind_ joined #perl6
22:37 bosscar joined #perl6
22:38 grondilu joined #perl6
22:38 bosscar Is it possible to create windows executables from perl 6 scripts?
22:39 grondilu sure, at least .bat files
22:40 bosscar Thanks Grondilu... well i was looking for compiling all the dependenices into on .exe
22:41 grondilu well Perl 6 itself runs on Windows and it's compiled by Perl 6.  So yeah, it's possible.
22:42 BenGoldberg joined #perl6
22:42 grondilu prodided you know all your compiling chain tools, you can script it.
22:43 bosscar i see thanks
22:45 tharkun joined #perl6
22:48 jeffrey joined #perl6
22:56 Ben_Goldberg joined #perl6
23:01 timotimo that sounds a bit misleading ...
23:01 MadcapJake how so?
23:02 timotimo i don't think anyone has succeeded in making a single .exe for a perl6 script yet
23:10 MadcapJake modules are compiled, so how come regular scripts can't be?
23:15 BenGoldberg I'm sure they can be.  But remember, compilation is only from perl6 to bytecode.
23:19 itcharlie joined #perl6
23:20 BenGoldberg The ideal solution would be to find a way to include the compiled bytecode of the script and all of it's dependencies, and a perl6 runtime, in one single .exe file.
23:27 timotimo MadcapJake: they can already, but if you want to run them you have to -MYourScript -e ''
23:27 timotimo and we don't yet have something good to locate/load the bytecode files directly from the executable
23:29 BenGoldberg joined #perl6
23:30 ZoffixWin Has anyone built a Bailador app using the Class-based API? Mine doesn't seem to be working :/
23:30 ZoffixWin self. in submethod BUILD() {} refers to the instance, right?
23:31 timotimo i didn't know bailador has anything class-y
23:31 timotimo yeah, in submethod build, you have self available
23:31 BenGoldberg joined #perl6
23:33 itcharlie left #perl6
23:33 Ben_Goldberg joined #perl6
23:33 ZoffixWin This is annoying.
23:33 * ZoffixWin files an Issue and moves on to something less frustrating
23:34 RabidGravy On windows, you could build a PE executable that does similar to what a .NET executable does and invoke the runtime and read the bytecode from the .text of the file
23:35 Ben_Goldberg joined #perl6
23:35 ZoffixWin And yeah, there's class-y example, but my copy-pasta of it doesn't seem to be working. Although, I had to figure out how to start it by copying sub baile {...} code: https://github.com/zoffixznet/Bailador/blob/b564be5615a63f3993b6619064adaf5a807a1bad/README.md#web-applications-via-inheriting-from-bailadorapp
23:37 timotimo RabidGravy: or you could just concatenate a zip file with your .exe
23:37 timotimo because an exe's header is in the front, and a zip file's header is in the back (and all values are relative)
23:38 timotimo that's how python does it. i believe python.exe will automatically look for a zip file at its end and for modules contained therein
23:39 RabidGravy yeah, the self extracting zips do that
23:39 timotimo they, too, do that
23:41 MadcapJake is there a way to get how many CPU cores someone has?
23:43 RabidGravy on linux it's easy
23:44 RabidGravy grep '^processor' /proc/cpuinfo | wc
23:45 RabidGravy there's an MMC thingy on windows
23:47 MadcapJake I see three numbers (6 18 84) what do they mean?
23:47 MadcapJake (I'm guessing the first is how many cores)
23:47 RabidGravy yes
23:48 RabidGravy lines words characters
23:48 MadcapJake ohhh that's wc's output
23:49 grondilu I usually run top or htop for that
23:49 RabidGravy if you were just targetting linux then you could just use Linux::Cpuinfo
23:49 RabidGravy which just has num-cpus
23:50 vike joined #perl6
23:52 * grondilu wonders if one day we'll have thousands of core in a consummer PC and if so, when.
23:52 grondilu *cores
23:53 RabidGravy you already do if you have a reasonably high-end graphics card ;-)
23:56 grondilu kind of, but not quite though.
23:58 timotimo yeah, they all execute in lock-step for everything
23:58 timotimo so an if-else will occupy the sum of all its branches rather than "between the longest and the shortest time of its branches"

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

Perl 6 | Reference Documentation | Rakudo