Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-06-27

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:08 kurahaupo_ joined #perl6
00:14 lambd0x joined #perl6
00:18 lambd0x left #perl6
00:23 freezerburnV joined #perl6
00:38 jameslenz joined #perl6
00:46 cyphase joined #perl6
01:12 Actualeyes joined #perl6
01:13 dalek Heuristic branch merge: pushed 826 commits to doc/rb-nutshell by awwaiid
01:18 araujo_ joined #perl6
01:19 kalkin-_ joined #perl6
01:32 dalek doc: d55ec68 | (Brock Wilcox)++ | doc/Language/rb-nutshell.pod:
01:32 dalek doc: Initial rb-nutshell, WIP
01:32 dalek doc: review: https://github.com/perl6/doc/commit/d55ec68017
01:32 dalek doc: 84aa6a0 | (Brock Wilcox)++ | doc/Language/rb-nutshell.pod:
01:32 dalek doc: Document basic object orientation
01:33 dalek joined #perl6
02:07 lizmat joined #perl6
02:07 Actualeyes joined #perl6
02:14 noganex_ joined #perl6
02:15 woolfy joined #perl6
02:27 Bodger1234 left #perl6
02:27 sufrostico joined #perl6
02:49 cyphase joined #perl6
02:58 Zoffix joined #perl6
02:59 Zoffix What exactly is WHO for? I'm trying to understand what this line does: $cur_GLOBALish.WHO.merge-symbols($comp_unit.handle.globalish-package.WHO);
02:59 Zoffix The docs just say "Package supporting blah blah" but I don't get it...
03:01 Zoffix The $cur_GLOBALish.WHO gives GLOBAL... I don't see a GLOBAL file anywhere in rakudo. How would I find where .merge-symbols is defined?
03:01 Zoffix And why use WHO instead of just calling $cur_GLOBALish.merge-symbols($comp_unit.handle.globalish-package);
03:02 * Zoffix said WHO too much and now it became a meaningless word :o
03:04 Zoffix Hm, I think I know where to get that info: https://github.com/edumentab/rakudo-and-nqp-internals-course/search?utf8=%E2%9C%93&q=global
03:22 cyphase joined #perl6
03:22 [Sno] joined #perl6
03:24 tadzik joined #perl6
03:27 erdic joined #perl6
03:28 jdv79 what is this cow method?
03:31 Zoffix Copy on Write
03:31 jdv79 i know what cow is in general but isn't that the wrong layer to do that at?
03:35 lizmat jdv79: on what layer should that be done then?
03:36 geekosaur no, because it has to be done at the layer that knows what parts must be CoW and what parts must remain private. (for example, in a hash, you would CoW the keys and values, but CoW-ing the hash table itself or its buckets will generally cost you more than any benefit)
03:37 geekosaur ...that example assumes a perl 5-style hash, I don't know the implementation details offhand for perl6
03:39 huggable joined #perl6
03:45 jdv79 i would have thought the vm level would be better apt to do that sort of thing cause cow is a mem mgmt technique
03:45 geekosaur similarly, copy on write is common in filesystems, but it's only done with data blocks, not metadata (on unix this is indirect blocks, the inode, ACLs, etc.) because the overhead isn't worth it. some RAID configurations "push this down a layer" but changing the metadata is a well known source of performance bottlenecks
03:45 geekosaur even though "in theory" it's best done at that lower layer
03:52 geekosaur (this is massive oversimplification, esp. since RAID is not used for COW, just duplication; many of the issues are the same though)
03:55 perl6472 joined #perl6
03:57 lizmat whether it should be called .cow or not, it is a intermediate form between binding and assigning
03:57 lizmat which can be useful when doing functional programming
03:57 lizmat specifically if you don't really want to copy large chunks of data
03:59 geekosaur right. in the FP context, if you treat *all* data values as pure then you can push CoW down to the memory management layer; mutability introduces complications, which are a PITA to deal with at that layer. since the upper layer in perl 6 is OO, it makes sense to deal with mutability at that layer instead
04:02 geekosaur for example, mutable arrays get special treatment so they don't cause extra copying (instead of handling either the whole array or individual values, each of which has different pathological overhead, CoW is done in segments --- and now the lower layer has to know about mutable arrays and track that extra information for them)
04:05 geekosaur uh, I'm using ghc (Haskell) as the example for that example, not trying to say what p6 does.
04:07 ssotka joined #perl6
04:09 geekosaur actually I got that wrong, it's the immutable arrays that have the most pathological behavior if you treat them the same as other immutable data
04:09 mohae joined #perl6
04:14 mohae joined #perl6
05:04 Cabanossi joined #perl6
05:06 cyphase_eviltwin joined #perl6
05:47 araujo joined #perl6
05:53 CIAvash joined #perl6
06:08 cyphase joined #perl6
06:08 mr-foobar joined #perl6
06:14 _mg_ joined #perl6
06:23 nine Zoffix: GLOBAL is a Stash. There you will find merge-symbols
06:26 sno joined #perl6
06:27 nine Zoffix: "git grep merge-symbols" could have answered your question
06:33 domidumont joined #perl6
06:34 darutoko joined #perl6
06:36 abraxxa joined #perl6
06:37 cyphase joined #perl6
06:42 abraxxa joined #perl6
06:50 domidumont joined #perl6
06:50 brrt joined #perl6
06:54 domidumont joined #perl6
07:09 sammers good afternoon from Japan
07:13 moritz good morning sammers :-)
07:13 sammers morning moritz
07:14 sammers I've been watching the new YAPC NA talks
07:15 sammers everytime I see one of these p6 talks I think about how clunky my p6 code is.
07:15 brrt joined #perl6
07:16 moritz sammers: that happens to me too
07:17 sammers ha, really liking p6 though
07:17 moritz speakers tend to polish their code a lot before putting it on the slides
07:17 moritz not just to show off, and to make it easier for the audience, but also because it just sucks to present a wall of code
07:18 zakharyas joined #perl6
07:19 sammers yeah, I am glad they do it too. do you know if anyone is working on a "style guide" for p6 that focuses on one paradigm or another? I know there are many ways to do different things, but I would like to read more about preferences of some of the people who have worked closest to p6.
07:21 moritz sammers: not really. masak++ and I have started collecting some practises, but it's not much yet, and more PBP-style than style guide: https://github.com/moritz/perl6-wtop
07:21 sammers ooh, this is cool..
07:22 sammers I will keep it bookmarked
07:23 moritz also, the question has come up at least once before in the past week
07:23 moritz maybe it's time to add some more stuff
07:23 sammers I think it would really help in drawing more people to p6
07:26 cyphase joined #perl6
07:29 RabidGravy joined #perl6
07:32 domidumont joined #perl6
07:36 Actualeyes joined #perl6
07:38 cyphase joined #perl6
07:39 huggable joined #perl6
07:54 lizmat joined #perl6
07:54 sammers anyone here familiar with Proc::Async?
07:56 moritz a bit
07:57 dakkar joined #perl6
07:58 sammers ok, is it safe to do something like:  Proc::Async $p .= new: $?FILE;
07:58 sammers what I am trying to do is spawn a new process of the same script
07:59 moritz well, you have to take care that you don't run into infinite recursion
07:59 moritz and it needs to be executable, have a shebang etc.
07:59 moritz otherwise, I don't see a problem
08:00 sammers yeah, got that part taken care of... it is spawning a Bailador app
08:02 sammers are there better/other ways to spawn another process/thread of the same script / module?
08:03 sammers maybe without loading everything in a completely separate process
08:04 nine sammers: I wonder what you actually need that process for?
08:05 sammers ok, so I am working on a simple static site generator, part of it uses a Supply to watch directories for changes, and another part loads a web server to watch the static build directory.
08:05 sammers when the files change I reload the Bailador process
08:08 sammers so the process is like: watch directory for changed, detect changes, re-render static files from mustache templates, restart static web server
08:08 sammers anyway, it works using Proc::Async just fine.
08:09 sammers bailador's baile blocks so I can use it inside of my Supply / react
08:09 sammers so I just created a simple module that wraps / creates a bailador app and starts baile
08:11 sammers it would be nice if bailador had a way to tell it to refresh its files without restarting the process
08:12 sammers or some async way to restart it
08:13 moritz I don't think we have a way to reload modules inside the process
08:13 sammers is there anyway to initialize a module as a separate thread?
08:14 gfldex sammers: yes, but expect segfaults (for now)
08:14 gfldex let me find you a link
08:15 gfldex sammers: https://github.com/gfldex/pod-to-bigpage/blob/master/pod2onepage.p6#L51
08:15 sammers thanks
08:16 gfldex sammers: and that's a much an implementation detail as they get
08:17 rindolf joined #perl6
08:19 tadzik so I have a code that seems to have broken overnight
08:20 tadzik https://gist.github.com/tadzik/1f0d9ac127f96ad5ed06fa8fa0cd7d56
08:20 tadzik m: https://gist.github.com/tadzik/1f0d9ac127f96ad5ed06fa8fa0cd7d56
08:20 camelia rakudo-moar 4b257a: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in method new at <tmp> line 5␤  in block <unit> at <tmp> line 10␤␤»
08:20 tadzik any ideas?
08:20 tadzik (overnight being: about 2-3 weeks)
08:21 moritz bisectable: class User { has $.username is required; method new(*%args) { my $obj = self.bless(*, |%args); return $obj; } }; User.new(username => 'foo');
08:21 tadzik \o/
08:21 moritz bisect: class User { has $.username is required; method new(*%args) { my $obj = self.bless(*, |%args); return $obj; } }; User.new(username => 'foo');
08:21 tadzik moritz++
08:21 bisectable moritz: (2016-06-12) https://github.com/rakudo/rakudo/commit/4179bdc
08:21 tadzik //o\
08:22 tadzik I even guesstimated the date correctly
08:22 tadzik so, I assume my code is perfectly fine, and perhaps we need a spectest for this so it doesn't get broken by accident?
08:22 sammers gfldex: ok, thanks. I will play around with it.
08:22 sno joined #perl6
08:23 moritz still works on 2016.05-6-g2c45068
08:23 moritz m: class User { has $.username is required; method new(*%args) { my $obj = self.bless(*, |%args); return $obj; } }; User.new(username => 'foo');
08:23 moritz where have all the botlets gone, long time pahahasing...
08:23 camelia rakudo-moar 4b257a: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in method new at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
08:24 tadzik after all this years, I finally found a proper use for my own tool: I need a "production" rakudo installation in rakudobrew that won't break my stuff :)
08:25 moritz tadzik: just remove the *, from the bless call
08:25 tadzik moritz: that gave me a segfault,iirc
08:25 moritz tadzik: that wasn't necessary for about two years now, and only continued working by accident
08:25 moritz m: class User { has $.username is required; method new(*%args) { my $obj = self.bless(|%args); return $obj; } }; User.new(username => 'foo');
08:25 tadzik ah
08:25 camelia rakudo-moar 4b257a: ( no output )
08:26 Actualeyes joined #perl6
08:26 tadzik hrm
08:27 tadzik my segfault must be somewhere else, the isolated case works indeed
08:28 tadzik no, it's in that bless() call
08:31 moritz that's weird.
08:31 moritz (I guess you know that if it doesn't contain more logic, the new method is useless)
08:31 tadzik I'll see if I can debug further
08:33 tadzik yes, yes
08:33 tadzik it does contain in the real-world example :)
08:33 mrf joined #perl6
08:33 tadzik https://gist.github.com/tadzik/6eaf3d7181fd95a47f33ef9d41736d64 here's the properly segfaulting example
08:36 zxd joined #perl6
08:41 cognominal joined #perl6
08:44 araujo_ joined #perl6
08:47 araujo_ joined #perl6
08:48 zxd perl 6 is not written in C ? I am confused about https://perl6.org/compilers/ that says 'Perl 6 is a language specification'
08:49 araujo_ joined #perl6
08:49 nine zxd: Rakudo Perl 6 is mostly written in Perl 6. Partly also in a subset of Perl 6 called NQP and tiny bits of C code.
08:50 DrForr_ zxd: You're confusing the map for the terrain. Perl 6 is a language spec, perl6 is the compiler. Yes, having a spec before implementation is a departure from Perl 5.
08:50 cognominal There is also the MoarVM backend which is written in C
08:54 zxd why does it run on a virtual machine?
08:54 moritz it needs something that manages its memory, for example
08:55 moritz it's a "virtual machine" in the same sense that JVM is one, not in the VMWare/Virtualbox/KVM-Sense
08:56 zxd like erlang?
08:56 nine zxd: there are actually only few languages in use that don't run on a virtual machine. Perl 5, Python, Javascript, Java, C#, Haskell and many more run on VMs. You notice it when the compiler's output is not an executable.
08:56 moritz yes
08:56 zxd but from java experience running on virtual machines is always slower
08:57 zxd than C interpreter compiled into machine code directly
08:57 zxd no?
08:57 moritz no
08:57 moritz if you compiled Perl 6 code to C, it'd still have to do all the things that the VM does now
08:58 moritz like garbage collection
08:58 moritz compiling to C doesn't make the problems go away that the VM solves
08:59 nine zxd: also even Java can be very fast. It's just that most Java code is written in a way that makes it hard for the VM to optimize.
09:00 konobi even the machine code will tend to be ganerated from JIT
09:01 moritz another factor that contributes to Java's perceived slowness is the startup time
09:01 moritz which MoarVM doesn't suffer from
09:02 moritz for example NQP is a very simplistic Perl 6 implementation used for bootstrapping, and it also uses MoarVM. It starts in 35ms on my machine
09:02 konobi well that and setting up the JVM is a secret black art in itself
09:03 moritz and calling moar directly with no argument takes about 2ms
09:03 moritz (though that only produces an error message, so dunno how interesting that case is)
09:03 konobi moritz: oh! https://queue.acm.org/detail.cfm?id=2927301
09:05 konobi support on other platforms is improving a lot
09:42 pmurias joined #perl6
09:43 pmurias moritz: isn't Java actually really fast but it's just the startup time (and AFAIR slow UI libraries in the past) that makes a bad impression?
09:50 jast in my experience, startup time and memory usage (which, sometimes, implies significant GC overhead)
09:52 jast side note, one advantage of a VM-based language implementation is that the VM, in theory, can optimize the code at runtime using information that would not be available at compile time, e.g. call tree statistics
09:58 pmurias jast: VM-based as opposed to directly-to-native code one?
10:00 g4 joined #perl6
10:06 andreoss joined #perl6
10:08 iH2O joined #perl6
10:09 iH2O left #perl6
10:15 mr-foobar joined #perl6
10:18 jast pmurias: yes. it's one of the arguments I've seen a lot for why VMs have potential of actually being better than direct-to-native
10:19 jast I'm not sure there's a real understanding of where the limits of each approach are, but it's a decent argument at the very least
10:28 kid51 joined #perl6
10:31 pmurias jast: being (significantly) better for C++/C is the thing that's in the future, they are already better for JavaScript
10:32 jast javascript doesn't lend itself to too much knowledge at "compile time", I guess
10:37 bjz joined #perl6
10:37 Zoffix nine, yeah, that was my original strategy. Actually now I think I confused myself with looking at merge_globals (that merge-symbols calls) and wondering how .WHO can return two values.
10:38 Zoffix I guess debugging at midnight isn't such a good idea. Regretting staying up that late now for sure :( (6:30AM and I gotta go to work)
10:41 andreoss is there a way to make rakudo configure stripts honor variables like CC, AR, MAKE etc.?
10:42 nine Zoffix: I've learned that lesson the hard way, too :(
10:44 melezhik joined #perl6
10:45 melezhik Hi folks!
10:45 melezhik A question concering https://modules.perl6.org/ updates
10:45 melezhik I have a perl6 module get listed here, and wonder how often it's update from gthub source code
10:45 kaare_ joined #perl6
10:46 melezhik I have made some commits today into https://github.com/melezhik/sparrowdo
10:46 llfourn melezhik: I think our module system pulls directly from GH
10:46 moritz that's correct
10:46 gfldex it does, in fact there is no other place to store them right now
10:46 melezhik Ahh , I see!
10:46 Zoffix melezhik, IIRC panda fetches from the repo directly and zef has its own copy, tho not sure of often it's updated. ugexe would know
10:46 timotimo correct, modules.perl6.org only updates based on the META.list
10:46 melezhik now it is ok
10:46 melezhik thanks
10:47 jnthn jast: Optimizing code based on information available at runtime is exactly how MoarVM's optimization works, fwiw. :-) See http://jnthn.net/papers/2014-yapceu-performance.pdf from slide 37 on
10:47 jast good to hear :}
10:48 bjz_ joined #perl6
10:52 Zoffix And modules.perl6.org website data itself updates about every ~2 hours You can see build progress at https://modules.perl6.org/update.log
10:52 Zoffix With cron set to run at 20m and 40m (aborting if the previous job is still running)
10:53 abruanese joined #perl6
10:53 melezhik Zoffix: - thanks!
10:55 llfourn melezhik: sparrow looks cool.
10:55 llfourn I am actually developing something similar in p6
10:56 melezhik llfourn: thanks , interesting, want to cooperate? ;))
10:56 llfourn melezhik: I will certainly let you know when I have something demo-able :)
10:57 melezhik llforun: here is some exmaples - just to take it for a spin - https://github.com/melezhik/sparrowdo-test
10:57 melezhik llfourn: sure
10:57 melezhik ;)
10:57 llfourn I will do thant. Cheers.
10:59 dvinciguerra_ joined #perl6
11:02 daxim joined #perl6
11:10 darutoko joined #perl6
11:12 tlvb| joined #perl6
11:12 telex joined #perl6
11:13 Roamer` jnthn, I guess you may've had this already, but just out of curiosity: why did you write an /etc/passwd and /etc/group parser, when you knew that they might not be authoritative / full? :) (you even mention that in the Unix::Groups docs :))
11:13 Roamer` was there some kind of performance problem with getpwent()/getgrent()?
11:20 yqt joined #perl6
11:32 abruanese joined #perl6
11:39 huggable joined #perl6
11:41 jnthn Roamer`: Um, I've written plenty of parsers but I don't recall writing one fo rthat...
11:42 jnthn Roamer`: Maybe you're confusing me the author of https://github.com/jonathanstowe/Unix-Groups ? :)
11:42 jnthn *with the
11:42 jnthn (Who goes as RabidGravy on this channel)
11:42 RabidGravy wah
11:44 RabidGravy sorry a bit sidetracked by poltical events for the last two days
11:44 moritz do you live in the UK?
11:45 RabidGravy yeah
11:45 moritz my condolences
11:46 RabidGravy well you know that old saying "may you live in interesting times"
11:46 gfldex for the next 2 years not much will happen
11:46 _mg_ joined #perl6
11:46 moritz I'm not so sure
11:46 moritz already the MP has resigned
11:47 moritz there will be a new one
11:47 gfldex in 3 months
11:47 moritz Scotland will act on its own
11:47 gfldex the Scots believe their parliament got a veto right on the leave vote
11:48 moritz and if English politians don't want to leave, and want to save their face, they could use that veto as a pretence
11:48 KillBill joined #perl6
11:48 gfldex indeed
11:49 andreoss `gld: ./libmoar.so: dlopen: invalid version 3 (max 0)`
11:49 gfldex RabidGravy: besides, there is still time to smuggly you out. see: https://i.chzbgr.com/full/8810837760/hCC5CFAE1/
11:49 bjz joined #perl6
11:49 andreoss it almost compiled
11:49 RabidGravy Roamer, the reason I made that like that was because I wanted something really quite quickly as a PoC for Object::Permissions and I reviewed the getgrent stuff across POSIX/Linux/BSD and concluded that it would require a C wrapper to make it useful and anticipated that someone would do that sooner than they have :)
11:51 gfldex moritz: what Enlglish polititians don't want does matter. The City of London doesn't want to UK to leave, so it's not gonna happen.
11:51 RabidGravy gfldex, if I wasn't personally quite upset by the result, this would be an entertaining political and social drama
11:53 moritz gfldex: I'm curious how it'll play out. I don't know eough about the power structure to trust that statement either way
11:54 andreoss i see MoarVM has solaris option for --os, does it mean that MoarVM should build on solaris?
11:54 RabidGravy what with the opposition party completely imploding in internal fighting that has been going on for years, the tory party still divided along the europe axis, third actors outside partliament
11:54 hahainternet so, picking the last element of a long but finite sequence seems to result in the full sequence being iterated
11:54 RabidGravy truly gripping stuff if one enjoys watching politics
11:54 hahainternet but for all of these sequences, the generation could easily be reversed
11:54 hahainternet and the final elements picked off efficiently
11:55 hahainternet am i wrong here? or should i try and make my first pull request (in about 8 months when i find time!)
11:57 psch hahainternet: i'm not sure every sequence is generatable in reverse
11:58 psch i mean, maybe it works for arithmetic and geometric ones, but even for those i'm not really confident in my math to say it does
11:59 psch add to that the fact that the end point might well a be a thunk, which means you don't even have an actual end point value to start from...
11:59 psch m: my @a = 1, 2, { $^a + ($a.is-prime ?? 1 !! $^b) } ... * > 100; say @a
11:59 camelia rakudo-moar 4b257a: OUTPUT«[1 2 3 3 4 4 8 12 20 32 52 84 136]␤»
11:59 Roamer` jnthn, RabidGravy, yeah, really sorry for the names confusion!
12:00 hahainternet psch: even without the endpoint, you have a bound you can begin from and i think the ones i looked at were doable
12:00 hahainternet i'll double check :)
12:01 psch m: my @a = 1, 2, { $^a + ($a.is-prime ?? 1 !! $^b ** 100) } ... * > 100; say @a
12:01 camelia rakudo-moar 4b257a: OUTPUT«[1 2 1267650600228229401496703205377]␤»
12:01 psch what's the bound..? :S
12:01 hahainternet psch: i was talking about block-less sequences, sorry i didn't make that clear
12:02 psch hahainternet: maybe Ranges?  i.e. infix:<..>, not infix:<...>?
12:02 hahainternet psch: nah geometric sequences for example
12:02 Roamer` RabidGravy, yeah, I guess I'm so used to the idea that getgr* and getpw* are in the POSIX module that I didn't bother to check whether they were there when you wrote that
12:02 hahainternet ranges are already a solved problem i believe
12:02 psch hahainternet: alright, yeah.  as i said, my math doesn't lend itself to a confident statement about geometric and arithmetic sequences
12:03 Roamer` RabidGravy, but then I have a really deep, pervasive, and stubborn background as a POSIX C programmer that I'm used, nay, addicted, to the low-level stuff that most people find awkward :)
12:03 psch hahainternet: although that narrow an optimization makes me kind of wary, i.e. "why is infix:<...> so slow when i tell it what exactly to do?"
12:03 Roamer` RabidGravy, and, yeah, I know that this is a problem :)
12:03 hahainternet psch: it's already slow under the same cases though, this is just an optimisation for a specific case
12:04 psch hahainternet: right.  i'm not generally opposed :)
12:04 hahainternet it's nothing of any major importance, but maybe i can actually be helpful for once
12:07 vike1 joined #perl6
12:07 andreoss left #perl6
12:28 skids joined #perl6
12:28 Bodger1234 joined #perl6
12:34 RabidGravy Roamer, sorry I was just composing a diatribe about the collapse of the parliamentary opposition in the UK.  Yeah, please feel free to implement a Unix::Groups::POSIX or something (or add this to the POSIX module or something :)
12:34 perlpilot joined #perl6
12:39 zxd_ joined #perl6
12:41 rgrinberg joined #perl6
12:45 awwaiid yay! The nutshell guide for Rubyists->Perl6istas is online! https://doc.perl6.org/language/rb-nutshell . I like how now that I see it IRL there are a ton of changes to make.
12:48 colomon joined #perl6
12:54 sufrostico joined #perl6
12:59 pmurias joined #perl6
13:09 pierrot joined #perl6
13:09 hahainternet awwaiid: looks good, i've passed it around a little
13:16 tlvb| is this installation method outdated?: http://rakudo.org/how-to-get-rakudo/#Installing-Rakudo-Star-Source-Rakudobrew ...at first (when panda install Task::Star) got an error regarding ssl, which I got past by manually installing IO::Socket::SSL, however now I get an error about panda not finding Mast::Frame
13:17 tlvb joined #perl6
13:18 timotimo can you paste your log? Mast::Frame isn't something you should be able to get errors about
13:18 timotimo and by paste i mean onto a pasting website, of course
13:20 g4 joined #perl6
13:22 tlvb| timotimo: console output: http://pastebin.com/raw/mkKx6Knv
13:23 timotimo this isn't the jvm backend for rakudo, is it?
13:24 timotimo the "expected MAST::Frame, but didn't get one" error comes from inside the compiler
13:24 abraxxa joined #perl6
13:25 timotimo as in, something's triggering a bug in the compiler
13:26 jmark joined #perl6
13:27 tlvb| I haven't consciously configured anything to choose anything specific, just git-cloned https://github.com/tadzik/rakudobrew...rakudobrew build moar...rakudobrew build panda
13:28 timotimo OK, that's not jvm, then
13:28 timotimo i can't reproduce the error locally, sadly
13:29 ZoffixMobile joined #perl6
13:31 ZoffixMobile tlvb|, just to be clear: Task::Star is simply a collection of modules (and in my personal opinion a horrible one). You don't need its successfull instalation to "get perl 6". Simply install individual modules as you need them.
13:31 timotimo that's right
13:31 Sgeo_ joined #perl6
13:33 abraxxa joined #perl6
13:36 tlvb| huh, I got the impression that there would be some good-to-have-tools as well
13:37 tlvb| allright, thanks for the help
13:37 masak awwaiid: "If you leave out the quotes, then Perl 6 expects $methodname to contain a `Routine` object, rather than the simple string name of the method."
13:38 ZoffixMobile tlvb|, you can install whatever you need individually. Here're the Task::Star contents: https://github.com/tadzik/Task-Star/blob/master/META.info
13:38 masak awwaiid: says "Method", should be "Routine"
13:38 ZoffixMobile just run panda install one-of-the-dist-names-from-depends-section
13:39 masak m: my $say-negative = sub($n) { say -$n }; 42.$say-negative()
13:39 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$n' is not declared␤at <tmp>:1␤------> 3my $say-negative = sub(7⏏5$n) { say -$n }; 42.$say-negative()␤»
13:39 masak m: my $say-negative = sub ($n) { say -$n }; 42.$say-negative()
13:39 camelia rakudo-moar 4b257a: OUTPUT«-42␤»
13:39 masak awwaiid: ^
13:40 psch masak: isn't that what the text says?  $say-negative is a Routine, but if you put "" around it has to be the name of a method
13:40 timotimo it thinks you're calling "sub" there
13:40 psch masak: ooh, what you pasted is the correction, isn't it
13:40 masak yes
13:40 masak sorry, that was confusing :)
13:40 masak I'm a bit tired
13:41 Actualeyes joined #perl6
13:41 ZoffixMobile m: 42.(0 - *)().say
13:41 camelia rakudo-moar 4b257a: OUTPUT«No such method 'CALL-ME' for invocant of type 'Int'␤  in block <unit> at <tmp> line 1␤␤»
13:41 ZoffixMobile :(
13:42 psch m: 42.&(0 - *).say
13:42 camelia rakudo-moar 4b257a: OUTPUT«-42␤»
13:42 timotimo m: 42.&(0 - *)().say
13:42 camelia rakudo-moar 4b257a: OUTPUT«-42␤»
13:42 timotimo yeah
13:42 timotimo psch is fast! :)
13:42 ZoffixMobile :)
13:43 psch m: (&(0 - *) 42:).say # :S
13:43 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3(&(0 - *)7⏏5 42:).say # :S␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤        stat…»
13:43 psch can't have the colon everywhere!
13:43 mcmillhj joined #perl6
13:46 domidumont joined #perl6
13:46 BrokenRobot joined #perl6
13:48 tbrowder re docs/p6 site: I found a copy of Camelia.svg AlexDaniel wants but where should it be placed?  I can't find the html generator code in doc for using it.
13:50 dalek doc: e5a3ea2 | (Zoffix Znet)++ | doc/Type/Match.pod:
13:50 dalek doc: Document sub form of make()
13:50 dalek doc: review: https://github.com/perl6/doc/commit/e5a3ea2c07
13:50 andreoss joined #perl6
13:51 andreoss left #perl6
13:51 andreoss joined #perl6
13:51 andreoss m: for 'a'..'z' { .say if /c/ ff /f/ }
13:51 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3for 'a'..'z' { .say if /c/7⏏5 ff /f/ }␤    expecting any of:␤        infix␤        infix stopper␤»
13:51 psch m: say uniname "ff"
13:51 camelia rakudo-moar 4b257a: OUTPUT«LATIN SMALL LIGATURE FF␤»
13:52 ZoffixMobile2 joined #perl6
13:53 ZoffixMobile2 tbrowder, it's in template/header.html
13:55 BrokenRobot https://github.com/perl6/doc/blob/master/template/header.html#L3
13:57 tbrowder roger--thanks
13:58 * BrokenRobot is reminded that the SVG Camelia has annoying holes in the wings
13:58 jluis joined #perl6
14:01 BrokenRobot FWIW, I updated the copy in marketing repo to be without holes just now: https://github.com/perl6/marketing/tree/master/LOGOs
14:02 BrokenRobot If you already used the with-holes version, it's probably fine for the site. I only noticed them when I poped it open in Illustrator.
14:07 BrokenRobot We need a definitive guide on how to use X<> in the docs pods :)
14:10 colomon joined #perl6
14:12 tharkun joined #perl6
14:16 BrokenRobot Does anyone know the default value of ws token?
14:17 BrokenRobot m: grammar Foo {}; say Foo.^methods
14:17 camelia rakudo-moar 4b257a: OUTPUT«Method 'gist' not found for invocant of class 'NQPRoutine'␤  in block <unit> at <tmp> line 1␤␤»
14:18 profan lol/win 15
14:18 profan err, woops
14:18 tbrowder please consider PR https://github.com/perl6/doc/pull/647
14:19 psch BrokenRobot: https://github.com/rakudo/rakudo/blob/nom/src/Perl6/Grammar.nqp#L581
14:19 psch BrokenRobot: note that's a bit tricky with the marking, _ws is what it matches - if it hasn't matched before
14:19 psch BrokenRobot: luckily that's right below :)
14:20 dalek doc: 6c54d2c | (Tom Browder)++ | html/images/Camelia.svg:
14:20 dalek doc: add svg version of Camelia
14:20 dalek doc: review: https://github.com/perl6/doc/commit/6c54d2c089
14:20 dalek doc: 938bc3f | (Tom Browder)++ | template/header.html:
14:20 dalek doc: use svg version
14:20 dalek doc: review: https://github.com/perl6/doc/commit/938bc3fc7a
14:20 dalek doc: 9ea03d7 | (Zoffix Znet)++ | / (2 files):
14:20 dalek doc: Merge pull request #647 from tbrowder/camelia-svg
14:20 dalek doc:
14:20 dalek doc: use Camelia svg instead of png
14:20 dalek doc: review: https://github.com/perl6/doc/commit/9ea03d70cf
14:21 BrokenRobot Thanks. That looks pretty scarry :|
14:22 psch well, in essence it's just LTM between linebreak, horizontal whitespace, unspace
14:22 psch plus some bookkeeping so we don't get stuck
14:23 BrokenRobot And heredocs?
14:23 BrokenRobot I see "| [\r\n || \v] <.heredoc>"
14:23 psch right
14:24 psch well, heredoc is "if @heredoc_queue { ... } else { self }"
14:24 psch *herestub_queue
14:25 psch so <.heredoc> always matches nothing iff we don't have an outstanding heredoc
14:25 psch if we do have one we do the switch-to-qlang-cursor dance there
14:25 mcsnolte joined #perl6
14:35 dalek doc: d215859 | (Zoffix Znet)++ | doc/Language/grammars.pod:
14:35 dalek doc: Document special grammar tokens
14:35 dalek doc: review: https://github.com/perl6/doc/commit/d215859829
14:36 psch m: grammar G { regex TOP { .+ } }; say G.parse("foo")
14:36 camelia rakudo-moar 4b257a: OUTPUT«「foo」␤»
14:37 dalek doc: fe0de16 | (Zoffix Znet)++ | doc/Language/grammars.pod:
14:37 dalek doc: Mention unspaces in default ws
14:37 dalek doc: review: https://github.com/perl6/doc/commit/fe0de16569
14:37 dalek doc: e10161c | (Zoffix Znet)++ | doc/Language/grammars.pod:
14:37 dalek doc: Mention regex TOP too psch++
14:37 dalek doc: review: https://github.com/perl6/doc/commit/e10161c61f
14:39 dalek doc: 11c956e | (Zoffix Znet)++ | doc/Language/grammars.pod:
14:39 dalek doc: Remove explicit anchors, since we are calling .parse in the example
14:39 dalek doc: review: https://github.com/perl6/doc/commit/11c956e950
14:42 dalek doc: 532fcad | (Zoffix Znet)++ | template/header.html:
14:42 dalek doc: Remove 'px': per spec, attribute values are integers.
14:42 dalek doc: review: https://github.com/perl6/doc/commit/532fcad9e7
14:48 jkramer joined #perl6
14:49 jkramer Ahoy!
14:49 BrokenRobot \o\
14:50 timotimo greetings
14:50 rindolf joined #perl6
14:52 jkramer I have a method with an optional parameter, however if it's given it should be > 0. Is there a way to check this? Something like "Int :$foo where * > 0 or Int:U"?
14:52 ptolemarch joined #perl6
14:52 tbrowder Zoffix: ref yr latest blog, I assume can P6 be made safer, any plans to do so?
14:53 timotimo m: sub blubb(Int :$foo where any(* > 0, !*.defined)) { say "is it foo? $foo" }; blubb(10); blubb(); blubb(-99)
14:53 camelia rakudo-moar 4b257a: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub blubb at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:53 timotimo m: sub blubb(Int :$foo where any(* > 0, !*.defined)) { say "is it foo? $foo" }; blubb(:10foo); blubb(); blubb(:foo(-99))
14:53 camelia rakudo-moar 4b257a: OUTPUT«is it foo? 10␤Invocant requires an instance of type Int, but a type object was passed.  Did you forget a .new?␤  in sub blubb at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:54 timotimo huh, that's strange
14:54 BrokenRobot tbrowder: none the I'm aware of. Note the article is really "How to add sideeffects to code outside your module" with a sensational clickbaity title attached to it. Based on the premise of the article, nothing stops me from shipping the entire drive to somewhere online
14:54 Xliff_ joined #perl6
14:54 psch where blocks always do their thing, no?
14:55 BrokenRobot tbrowder: and it's not just Perl 6 but many other langs, JS/node, Perl 5, Ruby (many more, I'm sure, I've just not used them to know for 100%)
14:55 BrokenRobot Yes, they do
14:55 BrokenRobot jkramer: take a look at http://modules.perl6.org/repo/Subset::Helper either use it itself or see how it avoids the issue of where on optional params
14:56 tbrowder well, I was thinking of something like restricting the types of mods you mentioned unless the importing code uses some kind of fancy adverb
14:56 psch m: class A { multi method m { "no i" }; multi method m(:$i! where * > 0) { "$i" } }; say A.m; say A.m: :1i; say A.m: :i(-1)
14:56 camelia rakudo-moar 4b257a: OUTPUT«no i␤1␤no i␤»
14:56 psch jkramer: i'd do that via MMD, tbh ^^^
14:57 psch jkramer: note that it also dispatches to the i-less candidate with a non-matching value, but you can introduce a candidate that dies for that case
14:57 jkramer timotimo: Yours seems to work when you turn the checks around. any(!*.defined, * > 0)
14:57 timotimo ooooh
14:57 timotimo of course it would
14:57 BrokenRobot tbrowder: I think there's little point in doing that.
14:57 timotimo but i'm not sure junctions will guarantee execution order
14:58 BrokenRobot tbrowder: or at least, not programmatically. I'd expect some sort of a Trusted Modules repository or something
14:59 psch m: class A { proto method m(|c) { if c<i>:exists && c<i> < 1 { die } else { {*} } }; multi method m() { "no i" }; multi method m(:$i!) { "$i" } }; say A.m; say A.m: :1i; say A.m: :i(-1) # or die in the proto vOv
14:59 camelia rakudo-moar 4b257a: OUTPUT«no i␤1␤Died␤  in method m at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
14:59 jkramer Ah, actually I just found out I can just use a default value in this particular case, no need to check for definedness :)
14:59 timotimo good
14:59 BrokenRobot :)
14:59 jkramer Thanks though!
15:00 FROGGS joined #perl6
15:00 tbrowder well I hope some security-smart folks are looking at the p6 modules
15:01 timotimo in as few words as possible, our security is currently kind of weak
15:02 psch maybe we need a module that at BEGIN time checks if anyone has been mucking around with mixins
15:02 psch so we can all trust that one module
15:03 timotimo what if anyone then goes ahead and mucks around with mixins after compile time?
15:04 psch then you probably already noticed that something isn't precompiling and checked it out already..?
15:04 psch honestly, i got nothing :S
15:09 john51 joined #perl6
15:16 tony-o m: sub r($x where * > 0) { $x.say; }; r($_) for (-1..1).reverse; #jkramer
15:16 camelia rakudo-moar 4b257a: OUTPUT«1␤Constraint type check failed for parameter '$x'␤  in sub r at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:16 pmurias joined #perl6
15:17 tony-o m: sub r($x? where * > 0) { $x.say; }; r($_) for (-1..1).reverse; #jkramer - works with optional params too
15:17 camelia rakudo-moar 4b257a: OUTPUT«1␤Constraint type check failed for parameter '$x'␤  in sub r at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:17 dogbert17 o/ #perl6
15:17 hoelzro o/ dogbert17
15:17 dogbert17 hello hoelzro :)
15:18 dogbert17 does anyone have a moment to look at a documentation gist for Range.minmax? https://gist.github.com/dogbert17/f3ebc0f42320f2998eff513466f12bc6
15:22 tony-o dogbert17: what about it?
15:24 ssotka joined #perl6
15:24 tony-o anyone here use a CLI email client?
15:25 dogbert17 tony-o: just wanted to know if it is ok for inclusion in the docs?
15:26 dogbert17 tony-o: any obvious bugs etc
15:26 tony-o without double checking accuracy of the statements, it reads well
15:26 perlpilot dogbert17: Looks good to me.  Having links for is-int, excludes-min, excludes-max are a must.
15:27 woolfy left #perl6
15:27 dogbert17 thanks both of you, will commit after a run through htmlify.p6
15:28 perlpilot dogbert17: something I just thought of ... you might add the appropriate excludes-min/excludes-max to the comment on the examples.
15:29 perlpilot dogbert17: just to indicate a little more when they apply
15:30 dogbert17 perlpilot: will do
15:30 perlpilot maybe is-int too since you mention it in the text
15:43 jkramer What exactly happens when I do this: my ('foo') = self!some-method-that-returns-some-strings;
15:43 pmurias_ joined #perl6
15:43 lizmat and yet another quick one from Orlando: https://p6weekly.wordpress.com/2016/06/27/2016-26-another-quick-one-from-orlando/
15:43 jkramer Does it pattern match and crash if the first string is not 'foo'?
15:43 lizmat (aka the Perl 6 Weekly)
15:44 timotimo i don't actually think it'll work with =, but it could with := maybe?
15:44 psch m: my ('foo') = -> { "bar" }();
15:44 camelia rakudo-moar 4b257a: ( no output )
15:44 jkramer Well it compiles and runs, I just don't know what it does :)
15:44 psch i don't even know what that lhs means
15:44 timotimo hehe.
15:45 perlpilot I don't get it either.
15:45 jnthn You'd need := to get it to pattern match
15:46 nine m: my ("foo") := -> { ("bar",) }();
15:46 camelia rakudo-moar 4b257a: OUTPUT«Constraint type check failed for parameter '<anon>'␤  in block <unit> at <tmp> line 1␤␤»
15:46 jkramer So what it does with only = is some kind of undefined behavior? :)
15:46 nine m: my ("foo") := -> { ("foo",) }();
15:46 camelia rakudo-moar 4b257a: ( no output )
15:47 timotimo m: say (my ('foo')).WHAT
15:47 camelia rakudo-moar 4b257a: OUTPUT«(List)␤»
15:47 timotimo m: say (my ('foo')).DUMP
15:47 camelia rakudo-moar 4b257a: OUTPUT«MVMArray: Can't shift from an empty array␤  in block <unit> at <tmp> line 1␤␤»
15:47 timotimo m: say (my ('foo')).perl
15:47 camelia rakudo-moar 4b257a: OUTPUT«(Any,)␤»
15:47 jkramer m: sub foo { ('foo', 'bar') }; my ('asd') = foo;
15:47 camelia rakudo-moar 4b257a: ( no output )
15:48 timotimo m: say (my ('foo'))[0].VAR.WHAT
15:48 camelia rakudo-moar 4b257a: OUTPUT«(Scalar)␤»
15:48 jkramer In my console perl6 this gives me '(foo)'
15:48 timotimo it seems like the my is doing nothing at all here
15:48 timotimo well, it does add a scalar container
15:48 timotimo but it doesn't seem to declare a variable
15:49 timotimo so you end up with a list that has a scalar container in it, and you assign the list of strings into that list that has the one scalar container
15:49 timotimo that's how i interpret the behavior
15:50 psch oh that parses as fakesig doesn't it
15:50 dalek doc: 518aadc | (Jan-Olof Hendig)++ | doc/Type/Range.pod:
15:50 dalek doc: Added docs fro Range.minmax. tony-o++ & perlpilot++
15:50 dalek doc: review: https://github.com/perl6/doc/commit/518aadcdfd
15:51 * dogbert17 hopes I didn't overdo the examples
15:52 tony-o dogbert17: looks good, examples like that are really helpful for beginners
15:52 tbrowder dogbert17: I have rarely seen too many examples (e.g., many *nix man pages have none!)
15:53 tony-o xargs could use a few
15:54 tbrowder ZoffixNet: is yr pod partial fix a branch in the rakudo repo?
16:01 gfldex m: class A { multi method f(Int $i) { dd $i } }; class B is A { only method f(Str $s) { dd $s} }; B.new.f(42);
16:01 camelia rakudo-moar 4b257a: OUTPUT«Type check failed in binding $s; expected Str but got Int (42)␤  in method f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
16:02 gfldex m: class A { multi method f(Int $i) { dd $i } }; class B is A { method f(Str $s) { dd $s} }; B.new.f(42);
16:02 camelia rakudo-moar 4b257a: OUTPUT«Type check failed in binding $s; expected Str but got Int (42)␤  in method f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
16:03 Actualeyes joined #perl6
16:03 BrokenRobot tbrowder: no, and I may have deleted it too. I think pmichaud was gonna work on the fix when they find time.
16:03 kurahaupo joined #perl6
16:04 tbrowder T'anks
16:10 BrokenRobot (the full diff is in that comment where I commented tho)
16:14 dogbert17 m: say (1^..5).in-range(1.4) # is this correct?
16:14 camelia rakudo-moar 4b257a: OUTPUT«True␤»
16:15 BrokenRobot Sure, the range is 1..5, excluding 1
16:16 dogbert17 BrokenRobot: it's the excluding 1 part that interests me
16:17 mohae joined #perl6
16:17 dogbert17 BrokenRobot: but I think I get it after having looked at it for a while
16:17 dogbert17 m: say (1^..5).in-range(1..000001)
16:17 camelia rakudo-moar 4b257a: OUTPUT«Potential difficulties:␤    Leading 0 does not indicate octal in Perl 6.␤    Please use 0o00001 if you mean that.␤    at <tmp>:1␤    ------> 3say (1^..5).in-range(1..0000017⏏5)␤Value out of range. Is: 1, should be in 1^..5␤  in block <uni…»
16:18 dogbert17 m: say (1^..5).in-range(1.000001)
16:18 camelia rakudo-moar 4b257a: OUTPUT«True␤»
16:18 BrokenRobot m: say (1^..5).min
16:18 camelia rakudo-moar 4b257a: OUTPUT«1␤»
16:18 perlpilot Where it starts to look really strange is when you use ~~
16:18 perlpilot m: say so 1.4 ~~ 1^..5
16:18 camelia rakudo-moar 4b257a: OUTPUT«True␤»
16:18 BrokenRobot in-range uses ACCEPTS :) so it's the same thing :)
16:19 cdg joined #perl6
16:21 BrokenRobot dogbert17: it really is 1 < $what < 5 and $what != 1 in that case
16:23 jevin joined #perl6
16:23 BrokenRobot m: say (-∞..∞).in-range: τ
16:23 camelia rakudo-moar 4b257a: OUTPUT«True␤»
16:23 BrokenRobot m: say (-∞..∞).in-range: τ+2i
16:23 camelia rakudo-moar 4b257a: OUTPUT«True␤»
16:23 BrokenRobot m: say (-∞^..^∞).in-range: τ+2i
16:23 camelia rakudo-moar 4b257a: OUTPUT«True␤»
16:23 BrokenRobot Perl6++
16:23 mr-foobar joined #perl6
16:24 BrokenRobot m: say (-∞^..^∞).in-range: 0/0
16:24 camelia rakudo-moar 4b257a: OUTPUT«True␤»
16:24 BrokenRobot :D
16:24 llfourn m: (0..10).in-range(τ+2i).say
16:24 camelia rakudo-moar 4b257a: OUTPUT«True␤»
16:24 * llfourn doesn't know enough about complex numbers to know if that's correct
16:25 * BrokenRobot thinks it is :)
16:25 BrokenRobot Not that I know anything about them either :)
16:25 BrokenRobot m: (0+3i..10+3i).in-range(τ+2i).say
16:25 camelia rakudo-moar 4b257a: OUTPUT«Complex objects are not valid endpoints for Ranges␤  in block <unit> at <tmp> line 1␤␤»
16:25 BrokenRobot :(
16:25 llfourn m: say 1+∞i
16:25 camelia rakudo-moar 4b257a: OUTPUT«1+Inf\i␤»
16:26 BrokenRobot You'd think doing a range for real part combined with range for imaginary part would make sense
16:26 llfourn m: say (0..10).in-range(1+∞i).say
16:26 camelia rakudo-moar 4b257a: OUTPUT«True␤True␤»
16:26 llfourn o.o
16:26 llfourn oh two says
16:26 kurahaupo BrokenRobot: or a circle centered on the median
16:35 lizmat joined #perl6
16:36 skids joined #perl6
16:46 dha joined #perl6
16:48 molaf joined #perl6
16:51 moritz a range in the complex plane is fundementally two-dimensional
16:52 moritz but Range is a one-dimensional data type
16:52 moritz what would iterating over a complex range even yield?
16:53 moritz also, there's more than the Cartesian view on the complex plane
16:54 dha I'm going to guess that iterating over a complex range would rip a hole in the spacetime continuum.
16:54 timotimo it's hard to iterate over things that are real-values :)
16:55 BrokenRobot Make it a two-dimentional range? ¯\_(ツ)_/¯
16:55 BrokenRobot .oO( it's easy to offer suggestions when you've no clue what you're talking about )
16:56 timotimo you can iterate over all coordinates that have no fractional part in the real nor imaginary part, and then you can iterate over all those in a spiral
16:56 timotimo that's very possible
16:56 BrokenRobot spiral?
16:56 timotimo sure
16:56 timotimo or in a diamond shape
16:57 timotimo not diamond, er ...
16:57 timotimo <>  <- like this
16:57 BrokenRobot I kinda see this range as a 4-corner shape
16:59 BrokenRobot Like the shaded region here is a range from 1+5i to 6+2i: http://i.imgur.com/hVLFWaT.png
17:00 timotimo oh, hmm
17:00 llfourn Zoffix: isn't the damian conway talk on today?
17:00 timotimo that's kind of weird to me :)
17:00 BrokenRobot So, given a complex number, you just check if the real part is in range, then calculate if the imaginary part is in range at that point
17:00 ramillies joined #perl6
17:01 BrokenRobot timotimo: it's worth noting that I have zero knowledge of the complex numbers :)
17:01 BrokenRobot llfourn: yes, at 7PM EST
17:01 BrokenRobot Are you gonna be there?
17:01 llfourn no but I heard that there will be a livestream
17:01 BrokenRobot Yeah
17:01 dha Damian's doing a talk?
17:02 llfourn in toronto
17:02 BrokenRobot Two, today and tomorrow.
17:02 * dha just spent a good deal of time watching damian talk *last* week, but...
17:02 BrokenRobot Toda's: https://www.meetup.com/Toronto-Perl-Mongers/events/231418224/
17:02 dha ah.
17:02 BrokenRobot Tomorro'ws (this one happened on the TPC too, I think): https://www.meetup.com/Toronto-Perl-Mongers/events/231418278/
17:03 dha yeah, saw that one.
17:03 BrokenRobot And the live feed will be posted in the comments on those pages, usually. If not, DM https://twitter.com/meraxes he's the organizer
17:03 llfourn BrokenRobot: cheers
17:08 setty2 joined #perl6
17:10 rgrinberg joined #perl6
17:12 Woodi so, .cow isn't in v6c, how to use it in 2016.07 ? experimental(cow); ?
17:12 ramillies Hello everybody. Could you please help me with using hyper-operation on method calls, like this?:
17:13 ramillies m: ((1,2,3) >>.Str).perl.say
17:13 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing << or >>␤at <tmp>:1␤------> 3((1,2,3) >>.7⏏5Str).perl.say␤»
17:13 lizmat Woodi: .cow is just out there as a concept...
17:13 psch m: ((1,2,3)>>.Str).perl.say
17:13 camelia rakudo-moar 4b257a: OUTPUT«("1", "2", "3")␤»
17:13 psch ramillies: can't space there without unspace
17:13 psch m: ((1,2,3)\   >>.Str).perl.say
17:13 camelia rakudo-moar 4b257a: OUTPUT«("1", "2", "3")␤»
17:13 Woodi lizmat: so module ?
17:13 ramillies Okay, thank you.
17:13 lizmat I'd really like to see TimToady's opinion about it before pursuing it further ?
17:14 lizmat well, it *could* be a module, but then it would be a module with nqp in it
17:14 lizmat and personally, I'd rather not put modules out there that have nqp in it if I can help it
17:14 lizmat my experiences with Data::Alias (and others with Coro) spring to mind  :-)
17:15 BrokenRobot m: ((1,2,3).   >>.Str).perl.say
17:15 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at <tmp>:1␤------> 3((1,2,3).   7⏏5>>.Str).perl.say␤»
17:15 BrokenRobot LTA error IMO
17:15 ramillies psch: By the way, is there any easy rule as to where to put the spaces with the hyper-operators?
17:15 tbrowder ref docs: "Types" and "Routines": was it decided to rearrange the first two columns or not?
17:15 BrokenRobot m: ((1,2,3).   &Str).perl.say
17:15 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at <tmp>:1␤------> 3((1,2,3).7⏏5   &Str).perl.say␤»
17:16 ramillies For example, this fails because of confusion with hash indexing.
17:16 ramillies m: (1,2,3)<<+>>(1,2,3)
17:16 camelia rakudo-moar 4b257a: OUTPUT«Type List does not support associative indexing.␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
17:16 psch ramillies: well, if it's a methodop, don't put spaces.  if it's a metaop, but spaces between the operator and operands
17:16 BrokenRobot oh, nm.. I thought it'd say "can't detach blah blah"
17:16 psch ramillies: same as with other methodops and infixes, really
17:16 BrokenRobot ramillies: those ones you can use spaces and looks like should
17:16 psch s/but/pu/
17:16 psch ...put
17:16 firstdayonthejob joined #perl6
17:16 timotimo well, we allow methods with spaces in front of the . nowadays
17:17 psch well, except someone had to go and allow spaces before the . methodop some time ago
17:17 ramillies Thanks for the explanation.
17:17 BrokenRobot timotimo: only alphabetic.
17:17 BrokenRobot m: 42 .^methods
17:17 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call (only alphabetic methods may be detached)␤at <tmp>:1␤------> 42 .7⏏5^methods␤»
17:17 psch m: "foo" .&say
17:17 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call (only alphabetic methods may be detached)␤at <tmp>:1␤------> 3"foo" .7⏏5&say␤»
17:17 timotimo ah, that's a good hint!
17:17 psch m: "foo" .*say
17:17 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call (only alphabetic methods may be detached)␤at <tmp>:1␤------> 3"foo" .7⏏5*say␤»
17:18 psch that's also somewhat LTA imo
17:18 psch "only the basic method invocation dot may be detached"..?
17:18 psch m: "foo".*say
17:18 camelia rakudo-moar 4b257a: OUTPUT«foo␤»
17:18 psch 'cause that's not a non-alpha method
17:22 dalek ecosystem: 0c8af2c | (Peter Pentchev)++ | META.list:
17:22 dalek ecosystem: Add Shell::Capture to the ecosystem.
17:22 dalek ecosystem:
17:22 dalek ecosystem: Execute a command and capture its exit code and output.
17:22 dalek ecosystem:
17:22 dalek ecosystem: See https://github.com/ppentchev/Shell-Capture
17:22 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/0c8af2c539
17:22 dalek ecosystem: b4d92f2 | Altai-man++ | META.list:
17:22 dalek ecosystem: Merge pull request #221 from ppentchev/ppentchev-add-shell-capture
17:23 dalek ecosystem:
17:23 dalek ecosystem: Add Shell::Capture to the ecosystem.
17:23 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/b4d92f2544
17:24 jdv79 not using nqp in moduleland is a real thing?
17:25 lizmat jdv79: I was just saying that *I* don't want to do that
17:26 jdv79 oh cool
17:26 Bodger1234 joined #perl6
17:30 espadrine joined #perl6
17:33 fhorck joined #perl6
17:33 sno joined #perl6
17:35 acrussell joined #perl6
17:46 domidumont joined #perl6
17:48 grondilu joined #perl6
17:49 tharkun joined #perl6
17:51 grondilu How can I simply test if an Int is a power of 2?
17:52 grondilu m: say .base(2).comb.one == 1 given 6
17:52 camelia rakudo-moar 4b257a: OUTPUT«one(True, True, False)␤»
17:52 grondilu m: say so .base(2).comb.one == 1 given 6
17:52 camelia rakudo-moar 4b257a: OUTPUT«False␤»
17:52 grondilu m: say so .base(2).comb.one == 1 given 1024
17:52 camelia rakudo-moar 4b257a: OUTPUT«True␤»
17:52 grondilu I guess that will do
17:52 timotimo why not .starts-with("1")?
17:53 grondilu oh yeay
17:53 psch m: say so "101".starts-with("1")
17:53 camelia rakudo-moar 4b257a: OUTPUT«True␤»
17:53 timotimo ah!
17:53 timotimo hehe.
17:53 timotimo BBIAB
17:53 grondilu lol that's a thing?
17:53 grondilu m: say so .base(2) ~~ /^^1/ given 1024
17:53 camelia rakudo-moar 4b257a: OUTPUT«True␤»
17:53 grondilu m: say so .base(2) ~~ /^^1/ given 1025
17:53 camelia rakudo-moar 4b257a: OUTPUT«True␤»
17:54 psch m: say so [+] .base(2).comb == 1 given 6
17:54 camelia rakudo-moar 4b257a: OUTPUT«False␤»
17:54 grondilu duh
17:54 grondilu silly me
17:54 grondilu starts-with("1") can't work
17:54 yqt joined #perl6
17:54 psch /1 0 ** * / probably, but the junction looks a bit cuter
17:54 psch well, + anchor
17:55 grondilu m: say so .polymod(2 xx *).one == 1 given 1025
17:55 camelia rakudo-moar 4b257a: OUTPUT«False␤»
17:55 grondilu m: say so .polymod(2 xx *).one == 1 given 1024
17:55 camelia rakudo-moar 4b257a: OUTPUT«True␤»
17:55 psch m: say .polymod(2 xx *) given 1024
17:55 camelia rakudo-moar 4b257a: OUTPUT«(0 0 0 0 0 0 0 0 0 0 1)␤»
17:55 nine m: log(1024)/log(2) %% 1
17:55 camelia rakudo-moar 4b257a: OUTPUT«WARNINGS for <tmp>:␤Useless use of "%%" in expression "/log(2) %% 1" in sink context (line 1)␤»
17:55 nine m: say log(1024)/log(2) %% 1
17:55 camelia rakudo-moar 4b257a: OUTPUT«True␤»
17:55 nine m: say log(1023)/log(2) %% 1
17:55 camelia rakudo-moar 4b257a: OUTPUT«False␤»
17:55 nine Math FTW
17:55 BrokenRobot :)
17:55 psch /o\
17:55 dha I believe C<$x == 1 || $x %% 2;>  would tell you if something is a power of 2. :-)
17:56 BrokenRobot m: 2.log(2) ~~ Int
17:56 camelia rakudo-moar 4b257a: ( no output )
17:56 BrokenRobot m: say 2.log(2) ~~ Int
17:56 camelia rakudo-moar 4b257a: OUTPUT«False␤»
17:56 dha Granted, that doesn't generalize...
17:56 psch m: say $_ == 1 | $_ %% 2 given 6
17:56 camelia rakudo-moar 4b257a: OUTPUT«any(False, False)␤»
17:56 * BrokenRobot runs away
17:56 psch m: say $_ == 1 || $_ %% 2 given 6
17:56 grondilu hang on.  You can use %% 1 to test integerness?
17:56 camelia rakudo-moar 4b257a: OUTPUT«True␤»
17:56 Bodger1234 joined #perl6
17:56 gfldex m: constant pot = (2, 4, 8 ... 2**64).any; say 6 ~~ pot;
17:56 camelia rakudo-moar 4b257a: OUTPUT«False␤»
17:56 grondilu m: say pi %% 1
17:56 camelia rakudo-moar 4b257a: OUTPUT«False␤»
17:56 dha m: say $_
17:56 camelia rakudo-moar 4b257a: OUTPUT«(Any)␤»
17:56 dha yeah, Any isn't a power of 2. :-)
17:57 BrokenRobot m: say 2.log(2) %% 1
17:57 camelia rakudo-moar 4b257a: OUTPUT«True␤»
17:57 BrokenRobot m: say 1024.log(2) %% 1
17:57 camelia rakudo-moar 4b257a: OUTPUT«True␤»
17:57 BrokenRobot m: say 1023.log(2) %% 1
17:57 camelia rakudo-moar 4b257a: OUTPUT«False␤»
17:57 grondilu m: say tau %% pi
17:57 camelia rakudo-moar 4b257a: OUTPUT«True␤»
17:57 BrokenRobot Neat. nine++
17:57 grondilu m: say tau %% sqrt(2)
17:57 camelia rakudo-moar 4b257a: OUTPUT«False␤»
17:57 grondilu that's a neat use of %%
17:59 BrokenRobot m: say 1024.lsb == 0
17:59 camelia rakudo-moar 4b257a: OUTPUT«False␤»
17:59 gfldex m: constant pot = (2, 4, 8 ... 2**64).one; say 6 +& pot;
17:59 camelia rakudo-moar 4b257a: OUTPUT«one(2, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)␤»
17:59 gfldex m: constant pot = (2, 4, 8 ... 2**64).one; say 8 +& pot;
17:59 camelia rakudo-moar 4b257a: OUTPUT«one(0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)␤»
17:59 BrokenRobot m: say 1024.msb == 0
17:59 camelia rakudo-moar 4b257a: OUTPUT«False␤»
17:59 BrokenRobot :(
17:59 grondilu m: subet Dyadic or Rational where *.denominator.log(2) %% 1; say $_ ~~ Dyadic for 1/3, 5/8
17:59 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3subet Dyadic or Rational7⏏5 where *.denominator.log(2) %% 1; say $_␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤      …»
17:59 grondilu m: subset Dyadic or Rational where *.denominator.log(2) %% 1; say $_ ~~ Dyadic for 1/3, 5/8
17:59 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3subset Dyadic or Rational7⏏5 where *.denominator.log(2) %% 1; say $_␤    expecting any of:␤        infix␤        infix stopper␤        statement end…»
17:59 psch grondilu: "of", not "or"
17:59 grondilu m: subset Dyadic of Rational where *.denominator.log(2) %% 1; say $_ ~~ Dyadic for 1/3, 5/8
17:59 camelia rakudo-moar 4b257a: OUTPUT«False␤True␤»
17:59 grondilu nice
18:00 * grondilu was looking at the HN entry about surreal numbers
18:03 gfldex m: constant pot = (2, 4, 8 ... 2**64).one; my $i; ($i = 8 +& pot) for 1..500000; say $i; say now - BEGIN now;
18:03 camelia rakudo-moar 4b257a: OUTPUT«one(0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)␤0.1229766␤»
18:03 gfldex m: constant pot = (2, 4, 8 ... 2**64).one; my $i; ($i = 2**32 +& pot) for 1..500000; say $i; say now - BEGIN now;
18:03 camelia rakudo-moar 4b257a: OUTPUT«one(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4294967296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)␤0.1205328␤»
18:03 nine ugexe: finally I'm able to install panda and Inline::Perl5 with this fix: https://github.com/rakudo/rakudo/commit/0a1b86a769c71ebb22c95a2df2b3afdc58ce0304
18:04 psch m: constant pot = set(2, 4, 8 ... 2**64); my $i; ($i = 8 (elem) pot) for 1..500000; say $i; say now - BEGIN now;
18:04 camelia rakudo-moar 4b257a: OUTPUT«True␤0.1180567␤»
18:05 grondilu can we do recursive subsets?  I mean using a subset as a way to define a recursive data type?
18:06 psch subsets are compile time i think?
18:06 psch i'm not completely sure that excludes that possibility, but i have a hunch it does... :)
18:07 BrokenRobot I don't think they're compile time
18:07 BrokenRobot m: my $x = 42; subset Foo where * == $x; my Foo $y = 42
18:07 camelia rakudo-moar 4b257a: ( no output )
18:07 BrokenRobot m: my $x = 42; subset Foo where * == $x; my Foo $y = 43
18:07 camelia rakudo-moar 4b257a: OUTPUT«Type check failed in assignment to $y; expected Foo but got Int (43)␤  in block <unit> at <tmp> line 1␤␤»
18:07 grondilu subset Foo of Rat where *.numerator %% 2 or *.denominator ~~ Foo;
18:07 grondilu m: subset Foo of Rat where *.numerator %% 2 or *.denominator ~~ Foo;
18:07 camelia rakudo-moar 4b257a: ( no output )
18:07 grondilu m: subset Foo of Rat where *.numerator %% 2 or *.denominator ~~ Foo; say 1/2 %% Foo;
18:07 camelia rakudo-moar 4b257a: OUTPUT«Attempt to divide 0.5 by zero using infix:<%%>␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
18:07 BrokenRobot grondilu: you can't do that. The second star is the second arg
18:08 BrokenRobot Use the { $_ ... } form
18:08 grondilu m: subset Foo of Rat where { .numerator %% 2 or .denominator ~~ Foo }; say 1/2 %% Foo;
18:08 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Illegally post-declared type:␤    Foo used at line 1␤␤»
18:08 grondilu here you go, can't do it.
18:08 grondilu m: subset Foo of Rat where { .numerator %% 2 or .denominator/1 ~~ Foo }; say 1/2 %% Foo;
18:08 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Illegally post-declared type:␤    Foo used at line 1␤␤»
18:09 BrokenRobot Probably can do it with a recursing sub, won't you?
18:09 BrokenRobot Like, you don't need to actually refer to Foo in there
18:10 BrokenRobot m: subset Foo of Rat where sub meow { .numerator %% 2 or meow .denominator };
18:10 camelia rakudo-moar 4b257a: ( no output )
18:10 grondilu not in that example but it was just an attempt at recursion.
18:10 BrokenRobot m: subset Foo of Rat where sub meow { .numerator %% 2 or meow .denominator }; say 1/2 ~~ Foo
18:10 camelia rakudo-moar 4b257a: OUTPUT«Method 'numerator' not found for invocant of class 'Any'␤  in sub meow at <tmp> line 1␤  in any accepts_type at gen/moar/m-Metamodel.nqp line 3431␤  in block <unit> at <tmp> line 1␤␤»
18:10 BrokenRobot .oO( Any?? )
18:10 BrokenRobot Oh
18:11 psch m: subset Foo of Rat where sub meow { $^a.numerator %% 2 or meow $a.denominator }; say 1/2 ~~ Foo
18:11 camelia rakudo-moar 4b257a: OUTPUT«Method 'numerator' not found for invocant of class 'Int'␤  in sub meow at <tmp> line 1␤  in sub meow at <tmp> line 1␤  in any accepts_type at gen/moar/m-Metamodel.nqp line 3431␤  in block <unit> at <tmp> line 1␤␤»
18:11 BrokenRobot m: subset Foo of Rat where sub meow ( (Rat) $v) { $v.numerator %% 2 or meow $v.denominator }; say 1/2 ~~ Foo
18:11 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3subset Foo of Rat where sub meow ( (Rat)7⏏5 $v) { $v.numerator %% 2 or meow $v.deno␤    expecting any of:␤        constraint␤»
18:11 psch m: subset Foo of Rat where sub meow { $^a.say; $a.numerator %% 2 or meow $a.denominator }; say 1/2 ~~ Foo
18:11 camelia rakudo-moar 4b257a: OUTPUT«0.5␤2␤Method 'numerator' not found for invocant of class 'Int'␤  in sub meow at <tmp> line 1␤  in sub meow at <tmp> line 1␤  in any accepts_type at gen/moar/m-Metamodel.nqp line 3431␤  in block <unit> at <tmp> line 1␤␤»
18:11 grondilu you need to divide by 1
18:11 psch m: subset Foo of Rat where sub meow { $^a.numerator %% 2 or meow ($a/1).denominator }; say 1/2 ~~ Foo
18:11 camelia rakudo-moar 4b257a: OUTPUT«Method 'numerator' not found for invocant of class 'Int'␤  in sub meow at <tmp> line 1␤  in sub meow at <tmp> line 1␤  in any accepts_type at gen/moar/m-Metamodel.nqp line 3431␤  in block <unit> at <tmp> line 1␤␤»
18:12 BrokenRobot Just coerce to Rat :/ More obvious
18:12 psch too hard math /o\
18:12 grondilu m: subset Foo of Rat where sub meow ( (Rat) $v) { $v.numerator %% 2 or meow $v.denominator/1 }; say 1/2 ~~ Foo
18:12 camelia rakudo-moar 4b257a: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed parameter␤at <tmp>:1␤------> 3subset Foo of Rat where sub meow ( (Rat)7⏏5 $v) { $v.numerator %% 2 or meow $v.deno␤    expecting any of:␤        constraint␤»
18:12 grondilu m: subset Foo of Rat where sub meow ( $v) { $v.numerator %% 2 or meow $v.denominator/1 }; say 1/2 ~~ Foo
18:12 camelia rakudo-moar 4b257a: OUTPUT«True␤»
18:12 psch Rat(Cool) probably
18:12 firstdayonthejob joined #perl6
18:13 psch well, Rat(Numeric) maybe, actually
18:13 BrokenRobot m: subset Foo of Rat where sub meow { .Rat.numerator %% 2 or meow .Rat.denominator }; say 1/2 ~~ Foo
18:13 camelia rakudo-moar 4b257a: OUTPUT«Method 'Rat' not found for invocant of class 'Any'␤  in sub meow at <tmp> line 1␤  in any accepts_type at gen/moar/m-Metamodel.nqp line 3431␤  in block <unit> at <tmp> line 1␤␤»
18:13 BrokenRobot /o\
18:13 BrokenRobot I don't get where that Any is coming from.
18:13 grondilu m: sub (Rat(Numeric)) {}(1)
18:13 camelia rakudo-moar 4b257a: ( no output )
18:13 BrokenRobot m: say 2.Rat.denominator
18:13 camelia rakudo-moar 4b257a: OUTPUT«1␤»
18:13 grondilu m: sub (Rat(Int)) {}(1)
18:13 camelia rakudo-moar 4b257a: ( no output )
18:14 jevin_ joined #perl6
18:14 cpage_ joined #perl6
18:17 BrokenRobot Oh, duh, it's not the $_
18:17 psch m: (sub f { .say })(1)
18:17 camelia rakudo-moar 4b257a: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
18:18 BrokenRobot m: subset Foo of Rat where sub meow { $^a.Rat.numerator %% 2 or meow $^a.Rat.denominator }; say $_ ~~ Foo for 1/2, 1/4, 1/3
18:18 BrokenRobot Infinite loop weeek
18:18 tony-o lol what
18:18 camelia rakudo-moar 4b257a: OUTPUT«(timeout)True␤True␤»
18:19 BrokenRobot grondilu: ^ well, there you go. Recursive types :)
18:19 grondilu that's cheating ;)
18:19 BrokenRobot :)
18:20 rgrinberg joined #perl6
18:20 grondilu or maybe not
18:20 grondilu I guess you can always define a subset in the form subset Foo of Bar where sub ($ --> Bool) {...}
18:20 grondilu and you then define a recursive subset with a recursive sub
18:21 grondilu so there's some kind of equivalence I guess
18:23 fhorck joined #perl6
18:24 addison joined #perl6
18:24 BrokenRobot What was the syntax to name a sub but for that name to be only available within that sub?
18:26 grondilu I'm not sure that's really what you're looking for.  Rather use &?BLOCK
18:27 grondilu or &?SUBROUTINE or some like that
18:27 BrokenRobot No, not that.
18:27 BrokenRobot It was specific name given by the coder.
18:27 BrokenRobot Saw it in the docs a day or two ago
18:28 woolfy joined #perl6
18:30 BrokenRobot Unless I'm confusing this with Rust, but I don't see that listed in Rust docs either
18:30 BrokenRobot ETOOMUCHLEARNING
18:30 BrokenRobot m: subset Power2 of Int where sub meow { $^a == 0 or $^a div 2 and meow $^a mod 2 }; say $_ ~~ Power2 for 2, 4, 8, 1023, 1024
18:30 camelia rakudo-moar 4b257a: OUTPUT«True␤True␤True␤False␤True␤»
18:30 BrokenRobot \o/
18:31 grondilu I vaguely recall something like that but I think it was in an other language indeed.  Maybe javascript.
18:32 BrokenRobot Jesus, 37 people going to Damian's talk. Just 1 female.
18:32 BrokenRobot m: say 1/38 * 100
18:32 camelia rakudo-moar 4b257a: OUTPUT«2.631579␤»
18:32 * BrokenRobot shakes head
18:32 grondilu which talk are you refering to?
18:32 BrokenRobot https://www.meetup.com/Toronto-Perl-Mongers/events/231418224/
18:33 dha Sadly, not surprising.
18:34 BrokenRobot There were none the last two times I gave talks there :|
18:34 grondilu programming is mostly a young white man thing, isn't it?
18:35 BrokenRobot grondilu: that's the most represented demographic, sure, but I doubt it's that demographic's "thing"
18:36 BrokenRobot I wouldn't be surprised if the under-represented groups wouldn't want to join a group of 37 dudes.
18:37 BrokenRobot Just weird.
18:37 dha I'm certainly not "young"...
18:37 TEttinger joined #perl6
18:37 * BrokenRobot is always young :P
18:37 dha lucky you. :-)
18:38 gfldex what is the biggest age group?
18:39 BrokenRobot Based on titles of pages in a google results page: "The Average Programmer: 28.9 Years Old, Male And Writes Javascript"
18:39 gfldex with time the demographics will change
18:40 BrokenRobot 25-29 based on SO: http://stackoverflow.com/research/developer-survey-2015
18:40 woolfy left #perl6
18:41 BrokenRobot 30.3 in Canada. I'm 1 month away from being the most average Canadian developer :P
18:41 gfldex if you gift your daughters with dolls, you shall burn in hell ofc :)
18:41 dha Why? What's wrong with dolls?
18:42 gfldex boys get mechano, girls get dolls. What profession will they pick?
18:42 mspo girls like dolls
18:43 BrokenRobot That's too simplistic a view IMO.
18:43 mspo okay
18:43 mspo my daughter likes dolls
18:43 dha why can't boys and girls have dolls and mechano? And other things as well?
18:43 gfldex it's simplified for sure, but social conditioning starts at a very early age
18:43 BrokenRobot mspo: I meant the give a doll and the girl won't turn up a mechanic
18:43 DrForr_ Some girls like Meccano too, but you'd never know that if they weren't offered it.
18:44 gfldex and if girls don't get computers and a role model, they are much less likely to become programmers
18:44 * timotimo has never heard of meccano
18:44 timotimo or mechano
18:44 mspo from my observations of one girl: she *really* likes dolls and just kind of likes other stuff
18:44 mspo timotimo: I am inferring a meaning ;)
18:44 dha The actual problem is that we have that division between "boy's toys" and "girl's toys" at all which is foolish.
18:44 timotimo me, too
18:44 DrForr_ timotimo: Erector but doesn't suck.
18:44 mspo I thought it was foolish until I had kids
18:45 BrokenRobot The only reason I got into computers is because I was too late to sign up for a cooking college :)
18:45 mspo and see that they like different stuff even as babies
18:45 gfldex meccano is a british thing (mostly)
18:45 mspo my son, as a tiny baby, *loves* things with wheels and cares very little for dolls of any sort
18:45 timotimo https://asset-9.soupcdn.com/asset/16067/2427_957c.jpeg
18:45 BrokenRobot Erector....
18:46 * BrokenRobot giggles
18:46 dha timotimo++
18:46 timotimo i haven't heard of Erector yet either
18:46 timotimo i know lego and k'nex
18:47 DrForr_ BrokenRobot: Yes, I know, but it's an apt comparison. You can make wireframe'ish models with some internal gearing using Erector, Meccano lets you build working 5-speed slip-differential transmissions.
18:47 gfldex you may be a tad to young for the old fashion metal stuff
18:48 timotimo that's probably the problem
18:48 dha I have actually heard of most of these. since Uri's lightning talk last week, I've even heard of k'nex now.
18:48 tony-o *suddenly wants whatever meccano is*
18:48 tony-o i used to play with the erector stuff until my fingernails would bleed
18:49 mspo https://en.wikipedia.org/wiki/Meccano
18:49 BrokenRobot Are you sure you don't want some internal gearing with Erector? XD
18:49 tony-o meccano looks like the erector sets i had a kid
18:49 perlpilot tony-o: you mean you only played with them for a few seconds before the sharp metal edges cut your fingers? ;)
18:50 tony-o perlpilot: haha
18:50 Woodi that girl from Residence Evil was *realy* educated in typical boys ways... and, IMO, it failed miserably... :>
18:50 timotimo i know there's some metal-based children's toy kit thingie that i remembermust have been a thing before my childhood
18:50 DrForr_ https://www.youtube.com/watch?v=KL_wy-CxBP8 # Go ahead, do that with Erector.
18:51 timotimo but for the life of me i can't remember what it was called
18:51 brrt joined #perl6
18:51 mspo milla jovovich?
18:51 ramillies left #perl6
18:52 Woodi yes, her words
18:52 mspo "multipass"
18:53 timotimo she has all the words. she has the best words.
18:54 Actualeyes left #perl6
18:54 * perlpilot might buy some meccano for his kids now
18:54 DrForr_ https://www.youtube.com/watch?v=r3t3iohwYxc
18:56 Roamer` hmm, now I feel bad for interrupting a conversation that IMHO serves a purpose... but is it, well, guaranteed that   gather { take 1; say "oof"; take 2; }[0] shall *not* say "oof"?
18:56 tbrowder DrForr: I did get an Erector set in 3rd grade that did have a motor, a gear box, and could make some neat stuff. Could have done lots more with lots more parts but big set and extra parts were pricey in 1952, and I was lucky to have the starter set.
18:57 Roamer` that is, is it guaranteed that the VM shall take heed of the [0] and stop execution after the first value is produced?
18:57 BrokenRobot m: gather { take 1; say "oof"; take 2; }[0]
18:57 camelia rakudo-moar 5a4963: ( no output )
18:57 Roamer` (yes, I know the docs say that the execution is lazy, so my question is whether the [0] is enough)
18:57 BrokenRobot m: say gather { take 1; say "oof"; take 2; }[0]
18:57 camelia rakudo-moar 5a4963: OUTPUT«1␤»
18:58 BrokenRobot m: say (eager gather { take 1; say "oof"; take 2; })[0]
18:58 camelia rakudo-moar 5a4963: OUTPUT«oof␤1␤»
18:58 Roamer` BrokenRobot, yep, I know it works for me, the question is dare I really use it :)
18:58 BrokenRobot Roamer`: yeah
18:58 Roamer` BrokenRobot, thanks!
18:59 BrokenRobot m: Inf .grep(*.is-prime).map(*+2)[1..3].say
18:59 camelia rakudo-moar 5a4963: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing infix inside []␤at <tmp>:1␤------> 3Inf .grep(*.is-prime).map(*+2)[7⏏1..3].say␤    expecting any of:␤        bracketed infix␤        infix␤        infix stopper␤»
18:59 BrokenRobot m: ^Inf .grep(*.is-prime).map(*+2)[1..3].say
18:59 camelia rakudo-moar 5a4963: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing infix inside []␤at <tmp>:1␤------> 3^Inf .grep(*.is-prime).map(*+2)[7⏏1..3].say␤    expecting any of:␤        bracketed infix␤        infix␤        infix stopper␤»
18:59 BrokenRobot well, if you type that right it'll work and not take infinite amount of time :)
18:59 Roamer` :)
19:00 BrokenRobot m: (^∞).grep(*.is-prime).map(*+2)[1..3].say
19:00 camelia rakudo-moar 5a4963: OUTPUT«(5 7 9)␤»
19:00 BrokenRobot the detached chain didn't like the [1..3] on it... very LTA erro message :/
19:01 DrForr_ https://www.youtube.com/watch?v=7t6P4ezNGT0 # Meccano powered by live steam.
19:01 timotimo oh, interesting find
19:01 timotimo but with a .[1..3] it does work?
19:01 BrokenRobot Nope
19:02 BrokenRobot Gives "Malformed postfix call"
19:02 timotimo huh!
19:02 * DrForr_ has som p6 code he could be asking about as well :)
19:05 girafe joined #perl6
19:06 jjido joined #perl6
19:11 Roamer` ok, style question... gather { ... take False; ... take True }[0]  or gather { ...; take False; ... }[0] // True;  ?   1.. 2... 3... Fight! :)
19:11 * Roamer` leans towards the explicit take True at the end
19:12 adu joined #perl6
19:12 grondilu how do I defined a Set of things with a given type?
19:12 grondilu *define
19:13 grondilu I mean I can define say an Hash with Int keys and string values like that: my Str %h{Int};  how do I do something similar with sets?
19:13 grondilu m: my Set $ of Str;
19:13 camelia rakudo-moar 5a4963: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Str not allowed here; variable list already declared with type Set␤at <tmp>:1␤------> 3my Set $ of Str7⏏5;␤    expecting any of:␤        constraint␤»
19:14 Roamer` grondilu, hmm, I think that there are some things that may not be typed (but I guess you figured that out already)... I stumbled upon the fact that I can't do List[Str] some time ago
19:20 fhorck_ joined #perl6
19:25 DrForr_ In order to make amends for sidetracking things, I have access to a Perl6::Actions object. Is it too late at this stage to subclass it, or create a proxy object that lets me "listen in" on what it's doing? I.E. if I wanted to intercept and monitor a method call that was being made?
19:27 BrokenRobot m: class IntSet is Set { method new (+@args) { all(@args) ~~ Int or die "All must be ints!"; nextsame } }; my IntSet $x .= new: 2, 3, 4; say $x ~~ Set
19:27 camelia rakudo-moar 5a4963: OUTPUT«True␤»
19:27 BrokenRobot m: class IntSet is Set { method new (+@args) { all(@args) ~~ Int or die "All must be ints!"; nextsame } }; my IntSet $x .= new: 2, 3, 5.5; say $x ~~ Set
19:27 camelia rakudo-moar 5a4963: OUTPUT«All must be ints!␤  in method new at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
19:30 Roamer` hmm, for the past 20 minutes I've been trying to come up with a syntax for a subset of Set that only accepts ints
19:30 Roamer` ok, well, 15 minutes, obviously, since grondilu's question
19:30 Roamer` the closest I got was this:
19:30 Roamer` m: use v6.c; subset Moo of Set where (* »~~» Int).all; my Moo $foo = Set(1, 2, 3);
19:30 camelia rakudo-moar 5a4963: OUTPUT«Cannot modify an immutable Set␤  in whatevercode  at <tmp> line 1␤  in any accepts_type at gen/moar/m-Metamodel.nqp line 3431␤  in block <unit> at <tmp> line 1␤␤»
19:31 Roamer` and I really don't understand the error message :)
19:31 Roamer` is ~~ considered modification of the left-hand value?
19:31 kerframil joined #perl6
19:32 BrokenRobot m: my $x = "foo"; $x.^can("uc")[0].wrap: method ($x:) { say "Someone is trying to `$x`"; nextsame }; $x.uc.say
19:32 camelia rakudo-moar 5a4963: OUTPUT«Someone is trying to `foo`␤FOO␤»
19:32 BrokenRobot DrForr_: ^ maybe something like that?
19:33 Roamer` yeah, even without the whatevercode:
19:33 Roamer` m: use v6.c; my Set $whee = Set(1, 2, 3); say so ($whee »~~» Int).all
19:33 camelia rakudo-moar 5a4963: OUTPUT«Cannot modify an immutable Set␤  in block <unit> at <tmp> line 1␤␤»
19:33 DrForr_ BrokenRobot: That's roughly the idea, the problem is it's a nqp object.
19:33 BrokenRobot *shrug*
19:33 Roamer` m: use v6.c; my List $whee = (1, 2, 3); say so ($whee »~~» Int).all
19:33 camelia rakudo-moar 5a4963: OUTPUT«True␤»
19:33 grondilu can't remember.  What's correct:  for @a X @b -> ($a, $b) {...} or for @a X @b -> $a, $b {...}  ?
19:34 * Xliff kicks NickServ
19:34 BrokenRobot The former, but it's easy to try :P
19:34 DrForr_ BrokenRobot: Thanks though. I'll keep playing.
19:35 Xliff m: $s = <a b c d>; say so ($s »~~» Str).all
19:35 camelia rakudo-moar 5a4963: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$s' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5$s = <a b c d>; say so ($s »~~» Str).all␤»
19:35 Xliff m: my $s = <a b c d>; say so ($s »~~» Str).all
19:35 camelia rakudo-moar 5a4963: OUTPUT«True␤»
19:35 Xliff m: my $s = (1, 2, 3, 'a'); say so ($s »~~» Str).all
19:35 camelia rakudo-moar 5a4963: OUTPUT«False␤»
19:35 BrokenRobot m: subset Moo of Set where { .all ~~ Int }; my Moo $foo = set(1, 2, 3);
19:35 camelia rakudo-moar 5a4963: OUTPUT«Type check failed in assignment to $foo; expected Moo but got Set (set(3,1,2))␤  in block <unit> at <tmp> line 1␤␤»
19:35 Xliff Ooh! I like that syntax
19:35 DrForr_ Really I'm just glad that it's re\"entrant.
19:36 Xliff is '»~~»' new?
19:36 BrokenRobot No
19:36 BrokenRobot It's a hyperop
19:36 BrokenRobot https://docs.perl6.org/language/operators#Hyper_Operators
19:36 Xliff Yeah. I'm just getting familiar with single ». How does that double » work?
19:37 BrokenRobot Applies the given op to items in the two lists with the direction of the arrow indicating what to do when list is exhausted
19:37 BrokenRobot In this case, it's using ~~ as the op
19:38 BrokenRobot m: subset Moo of Set where { all(.keys) ~~ Int }; my Moo $foo = set(1, 2, 3);
19:38 camelia rakudo-moar 5a4963: ( no output )
19:38 BrokenRobot m: subset Moo of Set where { all(.keys) ~~ Int }; my Moo $foo = set(1, 2, 3.5);
19:38 camelia rakudo-moar 5a4963: OUTPUT«Type check failed in assignment to $foo; expected Moo but got Set (set(1,2,3.5))␤  in block <unit> at <tmp> line 1␤␤»
19:39 BrokenRobot Roamer`: the .all (or >>~~>>) iterates over Pairs there.
19:39 Xliff m: Class We { }; my $say = (We.new xx 3); put so ($say »~~» We).all
19:39 camelia rakudo-moar 5a4963: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared names:␤    Class used at line 1␤    We used at line 1␤␤»
19:39 BrokenRobot m: class We { }; my $say = (We.new xx 3); put so ($say »~~» We).all
19:39 camelia rakudo-moar 5a4963: OUTPUT«True␤»
19:39 huggable joined #perl6
19:40 Xliff BrokenRobot++
19:40 cpage_ joined #perl6
19:40 Xliff I had to get my sci-fi geek in.
19:41 Xliff I must remember that idiom for the future.
19:41 Roamer` BrokenRobot, ahhhhh!  I forgot that a Set is actually a key/value store... thanks!
19:43 Roamer` now even my next try: my subset IntSet of Set where (*.keys».isa(Int)).all; - even that works
19:44 addison joined #perl6
19:45 acrussell joined #perl6
19:49 jdv79 DrForr_: have you done anything with prancer?
19:49 jdv79 "for real" i mean
19:50 * dogbert17 watches interesting football game
19:50 Xliff dogbert: s/football/soccer/ ?
19:50 dha If so, I question the "interesting" part
19:51 Xliff heh
19:51 DrForr_ jdv79: Work keeps intervening, but I'm going to finish up the wiki.
19:51 dogbert17 :), yes soccer
19:51 jdv79 nice
19:51 Xliff meh. If you want interesting... s/football/rugby/
19:52 jdv79 wasn't the name soccer created by the british?
19:52 dogbert17 halftime, England 1, Iceland 2
19:52 hoelzro do we have any tools for figuring out why a program using S17 stuff might be locking up? integration/advent2013-day14.t locks up on my machine at home and I spent a good chunk of time last night trying to figure out why
19:53 jdv79 what did you try?
19:53 hoelzro jdv79: I've tried a bit of printf-debugging
19:54 hoelzro it seems to me that the problem is in Channel.Supply
19:54 jdv79 i think i've tried strace and gdb before but i'm not very good but i think i found the issue at the time.
19:54 hoelzro but I can't quite figure out how to fix it
19:54 TEttinger dogbert17: shocker!
19:55 hoelzro since Channel.Supply relies on supplies, I have to basically trust that it's not occurring at a lower layer =/
19:55 rindolf jdv79: hi, sup?
19:55 rindolf hoelzro: hi.
19:55 jdv79 rindolf: i'm ok.  think i damaged my shoulder recently but besides that i'm good.  you?
19:55 hoelzro hello rindolf
19:55 dogbert17 TEttinger: I had not expected that tbh
19:56 rindolf jdv79: I'm fine - recently applied some optimisations to Freecell Solver that made it about 9.5 percent faster - so pretty significant.
19:56 jdv79 very nice
19:56 rindolf jdv79: and I went on two walks today - in the sun.
19:56 rindolf hoelzro: sup?
19:57 jdv79 rindolf: the sun has been pretty intense here lately.  i'm been hiding.
19:57 hoelzro rindolf: nothing much, just working
19:57 tony-o where about?
19:57 rindolf jdv79: ah.
19:57 tony-o it got down to almost 80º here last night
19:57 jdv79 F?
19:57 jdv79 i would hope
19:58 jdv79 nyc area.  the temp is ok - mid to upper 80s.  but the sun just kills me.
19:58 jdv79 not to mention the humidity.  anyway.
19:59 dha I've been inside for a few hours, but it didn't seem *that* humid earlier.
19:59 jdv79 hoelzro: good luck with that:)  is it at least repro'able?
20:00 rindolf jdv79: I hope your shoulder will feel better soon.
20:00 hoelzro jdv79: yes, thankfully
20:03 jdv79 rindolf: thanks.  besides that...i attempted to fix a couple bugs in moarvm and got some way there so that was nice since i'm terrible at C.
20:03 rindolf hoelzro: what is your work about?
20:03 rindolf jdv79: ah.
20:04 hoelzro rindolf: oh, just my day job
20:05 rindolf hoelzro: ah.
20:18 _mg_ joined #perl6
20:28 frobisher joined #perl6
20:35 konobi mst: here's a fun little service that might come in useful... https://mktmp.io/
20:35 dalek doc: 7a6db6c | (Jan-Olof Hendig)++ | doc/Type/Thread.pod:
20:35 dalek doc: Added docs for Thread.name
20:35 dalek doc: review: https://github.com/perl6/doc/commit/7a6db6c5c9
20:36 bbkr joined #perl6
20:42 bbkr method foo ( Str:D $in ) returns Int $out { }     - what do you think about allowing to declare returned variable in signature and return it at the end of the block automatically? this will save a lot of error prone typing such as "method foo () returns Int { my Int $x; ...; return $x}". and will be symmetrical to input params declaration.
20:43 pmurias joined #perl6
20:43 hoelzro bbkr: that's actually a spec'd (but NYI) feature
20:44 hoelzro http://design.perl6.org/S06.html#Signatures
20:45 bbkr damn :)
20:45 moritz aka "patches welcome" :-)
20:45 hoelzro more specifically: http://design.perl6.org/S06.html#line_699
20:45 hoelzro I think I started a test for it in roast
20:47 hoelzro yup, S06-signature/definite-return.t
20:50 * dogbert17 Iceland wins 2-1, England is out
20:51 tony-o of the EU?
20:52 dogbert17 tony-o: (EU)ropean Championship
20:52 TEttinger is this iceland's first time in the final 16, 8, and now 4 of UEFA?
20:52 geekosaur they liked brexit so much they did it again :p
20:53 Xliff Precomiling for medium to large sized projects is slow.
20:53 cognominal French papers loudly hope they will pull what the French government which sitted on the result of the 2005 referendum
20:54 dha Oops, I Brexit Again.
20:54 Xliff dha++ # LOL
20:54 Xliff Has precompilation been optimized at all, yet?
20:55 spider-mario joined #perl6
20:56 timotimo what parts of it?
20:56 Xliff LOL! That shows how much I know. I am speaking of it like a monolithic thing.
20:57 timotimo a month or so ago diakopter pushed an optimization that makes serialization a wee bit faster by caching a particular often-needed value for ... things
20:57 Xliff timotimo: Well, I know that if I change a module, when I run a script that depends on that module takes a long time for that script to run.
20:57 Xliff Ala, longer than it takes to precompile and run the script if no module changes were made.
20:57 Xliff But, I guess that is to be expected.
20:58 Xliff If a module is precompiled, does that trigger recompilation of an modules that depend on it?
20:58 timotimo yes
20:58 timotimo has to
20:59 jnthn I wonder if England is going for the record of how many European things they can leave in the space of a week... :P
20:59 TEttinger next up: the hague
20:59 TEttinger the queen is going to eat some endangered animals
20:59 TEttinger and then children
21:00 TEttinger and with no membership in the international court, who can stop her?
21:00 lizmat joined #perl6
21:03 Xliff timotimo: OK. That explains things.
21:05 * stmuk is 25% Welch :P
21:06 stmuk errr Welsh
21:06 dha After the last couple of weeks, I may be 25% bbq.
21:07 Zoffix Xliff, are you using bleed or 2016.04? I noticed 30% speed increase in parsing between those two
21:09 timotimo right, loading dependencies happens during stage parse
21:10 Xliff Zoffix, bleed
21:10 Zoffix :(
21:11 Xliff :/
21:11 Xliff 'tis what it tis.
21:11 timotimo sorry about it :(
21:11 Xliff No worries. I knew what I was getting into when I started.
21:12 Xliff Hopefully things get better.
21:12 Xliff Just out of curiosity, why doesn't precompilation have a method for indirect resolution so that precompilation cascades aren't necessary?
21:13 Xliff (if sensitive subject, please ignore. I want not step on mines)
21:13 Zoffix What do you mean indirect resolution?
21:13 Zoffix Module X, used by Y, can affect how Y is parsed.
21:13 Zoffix So if X needs to be recompiled, Y needs to be too
21:13 Xliff Ah! True! I forgot Grammars and Slang.
21:14 Zoffix Also custom terms and ops
21:14 Xliff Right.
21:14 * Zoffix points at Pretty::Topic
21:14 * Xliff forgets how meta Perl6 can get.
21:14 Zoffix :)
21:15 jnthn It's also simpler things. Suppose module X has a role, and module Y has a class that composes the role. Composition is at compile time, so a change in the role will affect the compilation of the class (which may, for example, lead to an error should the role change introduce a conflict)
21:15 Xliff Right
21:15 Xliff So the meta part of perl6 is awesome, but we pay for it at precompilation time.
21:16 jnthn Sure, though there's still a lot of room for improvement in our parse/compile times.
21:16 Zoffix Well, with 22-core CPUs already on the market, I hope soon this won't be a problem :)
21:16 * Zoffix dreams of a 1000-core CPU under the desk
21:17 Zoffix Perl 6 made me realize just how weak our computers are :)
21:17 * Zoffix departs to Toronto
21:17 sdo joined #perl6
21:18 jnthn Happy travels :)
21:19 timotimo we can still get moar and others to become faster
21:20 dha Do we have six million dollars?
21:22 sdo hello
21:22 timotimo that might be our six million dollars right there
21:22 dha Oh, apparently now we need $33,391,764.71
21:22 sdo I would like to join the group Perl6 on github how do I do.
21:22 sdo hello
21:22 Xliff ....annnd.... now a SEGV
21:23 Xliff But it happens in libxml2 so...
21:23 timotimo what do we need that for?
21:23 timotimo oh, the 1000 core machine?
21:23 Xliff I read about that.
21:24 Xliff http://bgr.com/2016/06/21/most-powerful-processor-uc-davis-kilo-core/
21:25 Xliff I disagree with the author's baseless assertion about how "[I] don't need a 1000-core processor"
21:25 Xliff That's like saying... "640kb should be enough for everyone"
21:25 timotimo people did good things using the big amount of "cores" you can find on a GPU
21:26 jjido joined #perl6
21:26 woolfy joined #perl6
21:29 timotimo and that's with the strong limitation of having to run the same code on all those "cores"
21:29 sdo masak I would like to join Perl 6 group on github
21:30 sdo hello masak: I would like to join Perl 6 group on github
21:31 timotimo what's your github username? have you gotten some pull requests in yet? :)
21:33 raiph joined #perl6
21:33 sdo github username: doreys
21:33 sdo I did once but I think press once the wrong button
21:33 timotimo god damn it, i cannot handle this terribly laggy and inconsistent internet access ;(
21:35 raiph joined #perl6
21:36 timotimo github doesn't show anything for you, potentially not registered the email address you used with your git commits in the past or something like that
21:37 sdo my email is shark.b@laposte.net my id on github is doreys
21:37 timotimo i bet masak'll know what you've done and make you a member :)
21:39 sdo I put shark.b@laposte.net as primary is it ok with you?
21:39 timotimo i don't get to decide if that's ok or not :D
21:39 sdo ok
21:43 [particle] joined #perl6
21:44 cyphase joined #perl6
21:50 raiph joined #perl6
21:53 grondilu well, defining those surreal numbers was actually straightforward:
21:54 grondilu https://github.com/grondilu/surreal/blob/master/lib/Surreal.pm6
21:54 grondilu I'll see later how hard defining arithmetics is.
21:57 Roamer` wow... Zoffix mentioned Pretty::Topic earlier, its implementation is... unexpectedly straightforward :)
21:58 kid51 joined #perl6
22:00 [particle] joined #perl6
22:10 jjido joined #perl6
22:15 rgrinberg joined #perl6
22:20 rgrinberg joined #perl6
22:22 tony-o overwatch works, now, with 6c if anyone was using it and it broke -
22:22 tony-o http://modules.zef.pm/modules/github:tony-o/Overwatch
22:25 jjido joined #perl6
22:31 [Coke] hurm. my naive attemp to pod6 everything in the perl6 doc repo is causing precomp to geenerate warnings.
22:32 * [Coke] is probably using an old p6.
22:33 dvinciguerra_ joined #perl6
22:35 jjido joined #perl6
22:36 Xliff What's the best way to determine SEGV problems with a NativeCall aware P6 script?
22:37 [Coke] yup, that fixed it
22:37 Xliff [Coke]++
22:38 timotimo i think the only good way to do that is to run gdb or lldb
22:38 timotimo and using "print MVM_dump_stacktrace(tc)" and such
22:38 cyphase joined #perl6
22:39 Xliff Thanks
22:41 ZoffixLappy joined #perl6
22:41 * ZoffixLappy waves from Toronto Perl Mongers
22:41 Xliff "no MVM_dump_stacktrace in current context"
22:41 ZoffixLappy Damian Conway shook my hand and said he enjoys my blogs :D
22:41 timotimo the name might be wrong
22:41 timotimo maybe it's _print_
22:41 Xliff I "up"'d until I was in an MVM frame
22:42 Xliff Nope
22:42 Xliff Not _print_
22:43 Xliff And I get another SEGV when calling MVM_dump_backtrace(tc)
22:43 Xliff /o\
22:44 Xliff ┬─┬ ︵ /(.□. \)
22:45 ZoffixLappy Oh, shit. I lied. These talks won't be broadcasted: "We will not be broadcasting these talks as Damian's Talks belong to Damian, not us. :)"
22:45 Xliff "The revolution will not be televised"
22:45 ZoffixLappy :)
22:45 Xliff =)
22:45 Xliff Glad someone got that.
22:47 [Coke] would damian consider putting them up somewhere where we could pay to see them?
22:47 [Coke] barring that, I'll try to catch him the next time he's the NE of the US.
22:47 timotimo it's MVM_dump_backtrace
22:47 ZoffixLappy [Coke], well, one of them I think is already up. It's the "On the shoulder of giants"
22:48 ZoffixLappy The concurrency one... I'll try to ask when it's questions time.
22:48 timotimo i didn't realize you'd have to be inside a stack frame belonging to libmoar.so to use it
22:48 timotimo but you'll need to be in a frame that has a tc anyway, which is really only mvm-related frames
22:48 ZoffixLappy God. These meetings make me realize just how weird I am lol... They're all talking about stuff and laughing :)
22:48 ZoffixLappy (it's still 12m till start)
22:49 [particle] joined #perl6
22:50 * [Coke] is down to 3%, later, sixes.
22:52 ZoffixLappy bye
22:56 timotimo 3% is half a six percent
22:57 ZoffixLappy And Damian said tomorrow's talk On The Shoulder's of Giants will be the extended version of the YAPC/YouTube version of it.
22:57 Xliff timotimo: I got a SEGV when doing "call MVM_dump_backtrace(tc)"
22:57 timotimo OK, but it won't show you where exactly that crashes?
22:57 timotimo does print tc give sensible results?
22:57 Xliff $1 = 1.4616321449683623412809166386416848
22:58 Xliff Is that sensible?
22:59 timotimo wat.
22:59 timotimo are you sure that tc is actually an MVMThreadContext * ?
23:05 cdg joined #perl6
23:13 raiph joined #perl6
23:15 ZoffixLappy jnthn++ you got major props from Damian here :)
23:18 jjido joined #perl6
23:19 [particle] joined #perl6
23:30 jjido joined #perl6
23:33 cdg joined #perl6
23:38 kid511 joined #perl6
23:39 lizmat joined #perl6
23:39 woolfy left #perl6
23:39 cpage_ joined #perl6
23:39 huggable joined #perl6
23:47 tbrowder jnthn: I'm looking at yr NQP course and you mention NQP doesn't have flattening and then later you say it does.
23:48 dalek specs: 6c58595 | util++ | S03-operators.pod:
23:48 dalek specs: Change nbsp to space in "Perl Hacker".
23:48 dalek specs: review: https://github.com/perl6/specs/commit/6c58595446
23:49 timotimo can you point me at the particular place that happens?
23:51 [particle] joined #perl6
23:52 tbrowder slide 21 vs. slide 29
23:53 jjido joined #perl6
23:53 Xliff timotimo: How can I check that tc is the right type in gdb?
23:54 Xliff I was assuming that tc would be proper when I got into an MVM_* frame
23:54 timotimo when i print tc, i just get (MVMThreadContext *) 0x...
23:55 Xliff Yeah. So looks like something in the rakudo internals got corrupted.
23:55 Xliff I'm using perl6-gdb-m BTW
23:55 timotimo oh
23:56 timotimo tbrowder: that was from a time before the GLR, where lists tended to flatten "on their own"
23:56 timotimo that kind of flattening doesn't happen in nqp
23:56 timotimo the | for "flattening" argument lists could also be called "interpolating"
23:56 timotimo that's probably less confusing terminology-wise
23:57 Xliff timotimo: I can go up as far as I can and I still get the same thing I got earlier for tc
23:57 Xliff :(
23:57 timotimo do you have no debug symbols? o_O
23:57 Xliff Prolly not.
23:57 timotimo well, that makes it difficult :)
23:57 Xliff I will need to recompile rakudo and libxml2 with -g
23:57 Xliff *sigh*
23:58 timotimo that probably also means you can't just print (MVMThreadContext *) tc
23:58 timotimo no, not rakudo with -g
23:58 timotimo just moarvm
23:58 Xliff OK.
23:58 timotimo and libxml2 doesn't have to be recompiled; you can just install the -dbg or whatever it's called
23:58 timotimo on fedora it's done using the "debuginfo-install" or something tool

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

Perl 6 | Reference Documentation | Rakudo