Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-09-18

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:06 TimToady someone needs to bump NQP if jnthn's fix is to get in
00:08 telex joined #perl6
00:10 dalek rakudo/nom: 01bba75 | TimToady++ | tools/build/NQP_REVISION:
00:10 dalek rakudo/nom: bump NQP revision
00:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/01bba75ee7
00:10 TimToady I'll bump it, please revert if that screws up rakudo release
00:18 telex joined #perl6
00:25 araujo joined #perl6
00:26 laouji joined #perl6
00:28 telex joined #perl6
00:34 telex joined #perl6
00:36 telex joined #perl6
00:36 BenGoldberg joined #perl6
00:39 laouji joined #perl6
00:41 laouji joined #perl6
00:44 telex joined #perl6
00:47 aborazmeh joined #perl6
00:47 aborazmeh joined #perl6
00:52 telex joined #perl6
00:55 tokuhiro_ joined #perl6
00:57 [Coke] I have to rerelease nqp and retag things anyway. :|
00:57 TimToady okay
00:58 TimToady [Coke]++
00:59 xinming_ joined #perl6
01:18 adu joined #perl6
01:26 telex joined #perl6
01:40 dalek nqp: 64f4dae | coke++ | VERSION:
01:40 dalek nqp: bump VERSION to 2015.09.1
01:40 dalek nqp: review: https://github.com/perl6/nqp/commit/64f4dae96d
01:45 travis-ci joined #perl6
01:45 travis-ci NQP build passed. Will "Coke" Coleda 'bump VERSION to 2015.09.1'
01:45 travis-ci https://travis-ci.org/perl6/nqp/builds/80944296 https://github.com/perl6/nqp/compare/8fd2e96edc66...64f4dae96d88
01:45 travis-ci left #perl6
01:45 telex joined #perl6
01:45 [Coke] nqp release 2015.09.1 uploaded.
02:05 dalek rakudo/nom: 06d132a | coke++ | docs/announce/2015.09.md:
02:05 dalek rakudo/nom: add contributors for 2 months
02:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/06d132a8d1
02:05 dalek rakudo/nom: 258f54c | coke++ | docs/release_guide.pod:
02:05 dalek rakudo/nom: mark release as released in docs
02:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/258f54c285
02:05 dalek rakudo/nom: aee232e | coke++ | docs/announce/2015.09.md:
02:05 dalek rakudo/nom: use moar unicode. add changelog info
02:05 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aee232ee88
02:07 dalek rakudo/nom: d22b3b9 | coke++ | tools/build/NQP_REVISION:
02:07 dalek rakudo/nom: [release] bump NQP revision
02:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d22b3b909f
02:07 dalek rakudo/nom: cdc2981 | coke++ | VERSION:
02:07 dalek rakudo/nom: [release] bump VERSION
02:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cdc2981c26
02:12 telex joined #perl6
02:24 * [Coke] ponders trying to run the Inline::Perl5 tests as part of the release process. :(
02:25 * [Coke] is thinking that the I:P5 tests shouldn't be in roast if I:P5 is not in core.
02:26 uvtc joined #perl6
02:26 [Coke] does panda know how to deal with perl6-m vs. perl6-j ?
02:33 uvtc How can I create `['a', 'b', 'c', 'd', '1', '2', '3', '4']`? This doesn't work:
02:33 uvtc m: my @a = 'a' .. 'd', '1' .. '4'; say @a;
02:33 camelia rakudo-moar cdc298: OUTPUT«["a".."d" "1".."4"]␤»
02:33 TimToady m: my @a = flat 'a' .. 'd', '1' .. '4'; say @a;
02:33 camelia rakudo-moar cdc298: OUTPUT«[a b c d 1 2 3 4]␤»
02:34 uvtc Ooh. Thanks.
02:36 uvtc I like that the repl shows me what expressions evaluate to. But why do I have to type `say @a.WHAT` instead of just `@a.WHAT`?
02:37 ShimmerFairy [Coke]: I personally think rakudo is too happy to have required P6 modules for functionality: I::P5, Linenoise so the REPL is functional, and the default interface for the debugger come to mind.
02:38 uvtc ShimmerFairy, not sure if you're replying to me, but I do indeed have Linenoise installed.
02:38 ShimmerFairy uvtc: not you, just mentioning it in general :)
02:38 * ShimmerFairy afk
02:41 dalek roast: b0f743e | coke++ | / (2 files):
02:41 dalek roast: capture test reality during 2015.09 release
02:41 dalek roast: review: https://github.com/perl6/roast/commit/b0f743e59e
02:43 [Coke] ShimmerFairy: If it's optional, the tests probably shouldn't be in roast.
02:44 telex joined #perl6
02:47 [Coke] so many jvm failures. :|
02:49 noganex_ joined #perl6
02:54 telex joined #perl6
03:01 kaare_ joined #perl6
03:07 adu serialization is a beast
03:10 [Coke] I am tempted to put in a note in the release that says "Sorry, there are some failures in the JVM backend this month, please bear with us."
03:14 adu I like JVM, it's how I plan to deploy Perl6 in a few years, but for development I always use Moar
03:18 skids joined #perl6
03:19 dj_goku joined #perl6
03:24 dalek rakudo/nom: c0e0c97 | coke++ | docs/announce/2015.09.md:
03:24 dalek rakudo/nom: Too many JVM failures to fix or fudge before rel
03:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c0e0c97484
03:24 flussence [Coke]: IMO that's perfectly fine for this month, it's supposed to be a beta after all :)
03:25 [Coke] Yup, we can only do so much. if it were a smaller number of failures, I would try harder, but running stresstest on JVM is already crazy.
03:25 [Coke] We can fudge or fix a few a day, hopefully.
03:25 TimToady JVM is allowed to play catchup between now and Christmas
03:26 [Coke] is the phrasing in that last commit acceptable?
03:26 [Coke] I feel like we should hang a lampshade on it, but I don't want to apologize too much or promise too much in terms of fixing it, either.
03:29 telex joined #perl6
03:30 telex joined #perl6
03:33 ShimmerFairy [Coke]: I have to say, it's always weird to see "You don't have Inline::Perl5" in the stresstest run. Since I don't plan on working with P5 (much less working on 5/6 interop), I'm not sure when I'd ever need to run I::P5 tests.
03:34 ShimmerFairy [Coke]: If I::P5 represents something that's supposed to be part of core in the future (that is, the ol' "use v5" emulation thingy mentioned in S01), then perhaps it should be core-ified soon :)
03:34 [Coke] ShimmerFairy: as someone who commits to the core and wants us to deliver a working product each month, that's when. :)
03:35 ShimmerFairy [Coke]: true, but that should be an R* concern more than a just-the-compiler concern, no?
03:42 _28_ria joined #perl6
03:45 samb1 joined #perl6
03:46 [Coke] if you only run your tests once every N months, that's not awesome.
03:47 [Coke] anyway, I think the crux is: "are they core or not".
03:50 vendethiel joined #perl6
03:54 perlawhirl joined #perl6
03:54 perlawhirl hi all
03:55 perlawhirl can i get a little help/clarification on regexes
03:56 [Coke] Perl 5 or Perl 6?
03:56 [Coke] We're mostly about Perl 6 here.
03:56 perlawhirl 6
03:57 perlawhirl i've made a cli tool that accepts user input... some of which is converted to regex... so building a regex from a string
03:57 ShimmerFairy [Coke]: The way I see it, if Inline::Perl5 is meant to become 'use v5' eventually, then keep it. Otherwise, its tests should get its own repo :)
03:57 perlawhirl i'll explain more... but here's my prob laid out: http://pastebin.com/7M8Z1Nqj
03:57 [Coke] perlawhirl: ok.
03:57 perlawhirl it seems that even compiling a regex is rx:s//, i still can't use it in  a regex match
03:58 perlawhirl unlike perl5's qr, which could have a non /x compiled regex inside a /x match and it would still work
03:58 perlawhirl so as a workaround i have to subst all spaces with \s before compiling. am i doing something wrong or is that a bug?
03:59 perlawhirl by "compiling" i mean... "creating regex object"
03:59 nucp6 joined #perl6
04:00 [Coke] OOC, why are you starting with strings and not... regexes?
04:00 nucp6 Good morning perl6 !
04:00 [Coke] ah. because it's a user input.
04:00 perlawhirl yes D
04:00 perlawhirl :D
04:01 ShimmerFairy perlawhirl: have you tried just an :s (that is, remove the :i and see what happens). Also try switching around the :s and :i
04:01 perlawhirl fyi... it emulates a Cisco IOS cli, if you are familiar... "show run | i pattern"
04:01 flussence m: say anon regex { ^ match this\s+please$ }
04:01 camelia rakudo-moar c0e0c9: OUTPUT«Potential difficulties:␤    Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)␤    at /tmp/zCp1Vtbe7s:1␤    ------> 3say anon regex { ^ match7…»
04:02 flussence m: say anon rule { ^ match this\s+please$ } # this might work...
04:02 camelia rakudo-moar c0e0c9: OUTPUT«rule { ^ match this\s+please$ } # this might work...␤»
04:02 ShimmerFairy perlawhirl: also, try it without the m// around $re, since $re already has a regex object in it
04:02 flussence m: say " match this please" ~~ rule { ^ match this\s+please$ }
04:02 camelia rakudo-moar c0e0c9: OUTPUT«「 match this please」␤»
04:02 flussence m: say " matchthis please" ~~ rule { ^ match this\s+please$ }
04:02 camelia rakudo-moar c0e0c9: OUTPUT«Nil␤»
04:02 flussence does that help?
04:03 perlawhirl hmmm... didn't know about the 'rule' wrapper... will try that
04:04 flussence rule is basically regex with more "floaty" whitespace rules; anything literal that matches \s+ in input will match \s+ in output too
04:04 perlawhirl ShimmerFairy: can you please repeat your first suggestion, my client converted some of your text to emoticons
04:04 perlawhirl which are now disabled
04:05 [Coke] jvm got worse in the tarball test. j-test failing with:
04:05 [Coke] ===(     119;31  0/?  0/? )=============================================ld: warning: object file (12-sizeof.o) was built for newer OSX version (10.10) than being linked (10.4)
04:05 ShimmerFairy perlawhirl: have you tried just an :s (that is, remove the :i and see what happens). Also try switching around the :s and :i
04:05 ShimmerFairy there you go :)
04:05 perlawhirl thanks
04:05 flussence m: say " matchthis please" ~~ rx:ss { ^ match this\s+please$ } # this might work too
04:05 camelia rakudo-moar c0e0c9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Y7s7AZyArI␤Adverb ss not allowed on rx␤at /tmp/Y7s7AZyArI:1␤------> 3ase" ~~ rx:ss { ^ match this\s+please$ }7⏏5 # this might work too␤»
04:05 [Coke] sorry, not failing. warning.
04:05 flussence bah, never mind
04:05 ShimmerFairy flussence: :ss is for subst (samespace)
04:06 flussence I know a rule is just syntactic sugar for *something* you can tack on a plain regex...
04:06 flussence (and it works for that purpose, cause I can remember it :)
04:06 perlawhirl also... just a suggestion, the error msg advises that it failed "at EVAL_0:1", which is LTA
04:07 flussence I'm guessing EVAL_0 would be the <$pattern> thing... agreed that that could be better.
04:07 ShimmerFairy must be because EVAL is used somewhere internally
04:09 ShimmerFairy flussence: token is regex with implied :r (:ratchet, disable backtracking), rule is regex with implied :r and :s (:sigspace)
04:09 flussence ShimmerFairy++ # thanks for reminding me :)
04:10 flussence that EVAL looks like it comes from src/core/control.pm:211, I wonder if there's enough information there to say “oh btw, this is a regex”
04:11 flussence well I guess it'd have to, to know to interpolate the string as regex code...
04:12 perlawhirl none of the suggestions seem to work. I'm ok with using subst as a work around, but it could trip others up as it doesn't quite behave like qr//.
04:18 telex joined #perl6
04:18 nucp6 racudo: say ( ( 5 * 8 + 2 ) ) ~~ 42;
04:19 [Coke] rakudo tagged, signed uploaded.
04:19 flussence m: say 'a' ~~ rx{ { note &?CALLER::ROUTINE ~~ Regex } . };
04:19 camelia rakudo-moar c0e0c9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8IOOTnSZjG␤Undeclared routine:␤    &?ROUTINE used at line 1␤␤»
04:19 flussence m: say 'a' ~~ regex { { note &?CALLER::ROUTINE ~~ Regex } . };
04:19 camelia rakudo-moar c0e0c9: OUTPUT«True␤「a」␤»
04:20 [Coke] http://rakudo.org/downloads/rakudo/rakudo-2015.09.tar.gz
04:20 [Coke] email away.
04:20 skids perlawhirl: it's probably best not to just throw user input into a pattern, anyway.  The Grammar::BNF package is a bit hard to understand but shows how to build up a grammar from input using the metamodel.
04:21 skids That is, assuming you're expressions are simple and youre not trying to bring P6 regex syntax into the cli.
04:23 perlawhirl yes just basic patterns, no p6 syntax... hmmm, i wonder if it would work differently if i make the patterns P5? what is the suffix again? is it just :P5 ?
04:24 [Coke] the possum on my deck seemed awful friendly. :P
04:24 [Coke] sorry, "opossum".
04:25 TEttinger [Coke]: they don't fear people because they know they wouldn't eat them. a possum's defense of playing possum also involves smelling like a dead rotting carcass
04:25 flussence perlawhirl: yeah, that'll work. You'll still be eval'ing user input in either case though...
04:25 TEttinger sorry, "virginia opossum"
04:25 [Coke] My concern is that he and my cat seemed chummy.
04:26 TEttinger they have a nasty bite but they don't know how to use it
04:26 [Coke] GAH and my other cat just snuck in and rubbed up on my leg, scaring the crap out of me. :)
04:26 rmgk_ joined #perl6
04:26 TEttinger haha
04:26 [Coke] good thing the release is done.
04:26 skids perlawhirl: are you actually doing an IOS emu, or was that just an example, out of interest?
04:27 perlawhirl i am actually doing one... it's not exactly an "emulator"... we do weekly captures of our managed devices of a whole bunch of "show" commands... about 20-30 commands
04:27 perlawhirl rather than searching the text file manually
04:28 TEttinger [Coke]: what sucks is that australia gets stuff like brush possums, which pollinate flowers and would never hurt a fly, and we get... opossums. which are nasty and proud of it.
04:28 perlawhirl i build a tool that loads the logged file and responds to cli command, and spits out the relevant output
04:28 perlawhirl i built it in perl5... already... trying it out in perl6 as a way to learn the syntax
04:28 [Coke] TEttinger: australia had to get -one- nice animal.
04:29 skids perlawhirl: ah, that sounds like an interesting way to do things.
04:29 perlawhirl i built a pipeline and everything... splits at the rindex of ' | ' and then calls recursively calls the subroutine again
04:29 * [Coke] heads offline.
04:30 skids .oO(oh good /S32-num/power isn't my local patch... cuz that would have been bizarre)
04:31 perlawhirl skids: yeah it's a lot easier... if i want to check the output of "show ip route" from 8 weeks ago, can load it into my tool and just run the command... can filter output with include, exclude, begin or section
04:33 perlawhirl skids: resolves partial commands (eg, 'sh int desc'), has command completion... i purposely colour the prompt so people don't confuse it for a live device, lol
04:34 skids The command completion is something I've had trouble finding a good solution for, even with perl6 rx.
04:34 uvtc left #perl6
04:34 skids (there are solutions, but none of them are very clean)
04:35 perlawhirl yeah... tell me about it... i tried a few of the readline modules (perl5) and they work well enough... but i wanted MORE control... so i wrote a (sortof) readline using Term::ReadKey... that way i can control what every key does
04:36 perlawhirl but even so... Term::Readline allows you to write a completion function.
04:37 perlawhirl the function receives the ($line, $word, $lineindex) and then you build a list of completions from that and return it.
04:40 perlawhirl well... this is on linux... so once you also install Term::Readline::GNU things work well enough... but from what i've read, getting a decent readline on windows is a bit harder
04:54 telex joined #perl6
05:03 perlawhirl left #perl6
05:11 rurban joined #perl6
05:15 nine ShimmerFairy: Inline::Perl5 is already Rakudo's handler for use Foo:from<Perl5>; and EVAL "say 'hello'", :lang<Perl5>; The user doesn't even have to explicitly load it.
05:16 ShimmerFairy nine: hm. I think that serves as evidence for my "rakudo too happy to require modules" position :P . Are there plans for I::P5 to be integrated as a part of CORE eventually?
05:18 nine ShimmerFairy: the question is: should backwards compatiblity with Perl 5 be part of the Perl 6 specification (i.e. roast)? And I'd strongly argue for it. A Perl 6 compiler has to be backwards compatible and indeed, they all can be, as they have to support NativeCall already. And Inline::Perl5 is not Rakudo specific at all.
05:19 nine ShimmerFairy: I'd be all for including Inline::Perl5 in CORE. It's just years of moving away from Perl 5 attachment ("let's rewrite these perfectly working Perl 5 build scripts in Perl 6 just because") that I have to work against.
05:19 ShimmerFairy nine: of course it's not rakudo specific, I mean that the rakudo compiler shouldn't require you install certain modules beyond the compiler itself. (Linenoise is another example of what I mean.) If it's meant to be a core part of P6, include it in the damn compiler.
05:19 ShimmerFairy "let's rewrite these perfectly working Perl 5 build scripts in Perl 6 just because" ?
05:19 nine So I'm not pushing too much.
05:20 nine ShimmerFairy: just so they are written in Perl 6 instead of Perl 5.
05:20 nine The "this is a completely separate language, let's forget we ever had something to do with Perl 5" mindset
05:20 ShimmerFairy nine: any specific examples? And why not? I'd write a P6 version of something in a heartbeat over using P5, since I don't use P5 :)
05:21 nine ShimmerFairy: of course writing new things in Perl 6 is perfectly sane. I'm talking about rewriting perfectly working code that doesn't need changing.
05:21 ShimmerFairy nine: That's close to why I'd argue against P5 interop being core. P6 is no longer the direct successor to P5, there's no reason why it has to provide P5 support standard. It made more sense in the beginning, but not so much anymore.
05:21 ShimmerFairy (And besides, wasn't backwards-compatibility something we specifically avoided in designing P6? :P)
05:22 nine It's still required by S01 and tested in the S01 spec tests.
05:22 ShimmerFairy Also, so what if someone rewrites their code in a new language? I don't see how that's a problem.
05:22 nine It's simply a waste of time when there's still so much else to do.
05:23 ShimmerFairy nine: and so I'd argue that it shouldn't be mentioned in S01 anymore. Nobody's going to accidentally use P6 when expect P5, not with how history has turned out now.
05:23 ShimmerFairy Again, so what if someone "wastes" their time to rewrite their code?
05:26 ShimmerFairy nine: to be clear, I don't mind seeing P5 and P6 work a bit more closely together; I won't mind efforts towards that. From my viewpoint, however, I'm not familiar with P5, I entered into P6 long since the old "this will succeed P5" days, so I'm usually against preserving vestiges of that older mindset :)
05:26 ShimmerFairy That whole "Acts like Perl 5 _until_" list that is (or at least was) in S01 is an example of the vestiges I'm referring to.
05:27 ShimmerFairy (In other words, I don't think P5 deserves to be treated more specially than any other foreign language is in Perl 6)
05:28 mst ShimmerFairy: as soon as you convince everybody to stop trying to share CPAN because perl5 shouldn't treat perl6 specially, I'll consider that argument
05:28 mst but since we're being asked to treat you specially, I think quid pro quo applies
05:29 ShimmerFairy ? "we're being asked to treat you specially" ?
05:29 mst we are. lots of perl5 infrastructure is being patched to make perl6 a first class citizen
05:29 aborazmeh joined #perl6
05:29 aborazmeh joined #perl6
05:29 mst personally, I'm totally happy with this
05:30 mst I like the fact that the two perl communities have decided to co-operate like this
05:30 mst I think it's going to be really good fun
05:31 mst you don't have to care, but I don't see why you should actively oppose volunteers doing things they think is fun in the name of working together
05:31 ShimmerFairy mst: sure, like I said I won't get the way of working more on interop. I think in the case of Inline::Perl5, it either should be a part of CORE, or not be referenced by rakudo at all. This inbetween is quite a design smell to me.
05:31 mst well, what about making rakduo default to loading Inline::X for from<X> ?
05:32 mst anyway, any time you say 'should', there's an implied expectation other people will do the work
05:32 mst figure out which you like best and write the patches, and then we can discuss it
05:32 mst otherwise you're basically just urinating into the gale
05:32 ShimmerFairy mst: hmm... I think a generic system like that would be nicer than special-casing Perl 5 currently. (We do the same thing with the --doc CLI argument, at least)
05:32 mst and sapping other people's time and motivation via futile arguments
05:32 mst then you're welcome to implement it
05:32 mst if you do it well, I'll help convince people wiser than me to review and consider it
05:33 mst but otherwise, gale, urination, WOFTAM, etc.
05:33 ShimmerFairy I don't think it'd be that hard, if Inline::* had a standardized API (Don't know if it does already). You'd just have to construct the module name (which, again, is already done with --doc=HTML -> Pod::To::HTML)
05:34 mst then less arguing with people trying to make things better and more making things bettere
05:34 mst if it won't be that hard, I hope to see your patch soon :)
05:35 ShimmerFairy mst: I think the reason why I tend to argue hard against P5-related stuff is simply because I've no interest in it, and I don't like when the old "direct sequel" thing creeps back up. I've been very annoyed every time the design docs left something unexplained, because it was implied to be just like P5.
05:36 telex joined #perl6
05:36 mst it comes across as "I don't like what you're doing in your free time, please do what I want instead"
05:36 ShimmerFairy (Modernizing the specs is something I've thought about doing, btw. Not to abruptly remove any mention of P5 or anything like that, but just to make it read less like it was written in the early 2000s ☺)
05:36 mst I suggest instead that you just -do- the thing you want to see
05:36 mst rather than being mean to the people doing other things
05:37 mst your constant negativity isn't achieving anybody's goals, yours included
05:37 ShimmerFairy mst: I _never_ mean it like that, though I will admit that voicing my opinions strongly is not something I'm well practiced in, so I'm likely making a lot of mis-implications in doing so.
05:38 mst well, you pretty much always sound like that
05:38 mst hence why I've taken over so nine can go back to doing something useful
05:38 mst rather than listen to you tell him how to spend his free time
05:38 ShimmerFairy And I think stuff like "If not mentioned, it's just like it was in P5" is what kinda burned me on Perl 6 stuff being unavoidably linked in various cases.
05:39 mst yes, and if you wrote patches to fix that, I would absolutely support it
05:39 mst in spite of being a perl5 person with fairly minimal direct interest in perl6
05:39 mst but attacking people for making interop better doesn't help fix that at all
05:39 ShimmerFairy mst: I'm sorry, but I have to disagree that I "always sound like that". I was never putting down nine++'s excellent work on Inline::Perl5, and Inline::Perl6 IIRC, though if I came across as that way then I apologize.
05:39 mst it just makes them feel sad and you look like the rear end of a horse
05:40 mst yopu did come across that way
05:40 mst every time I see you talking in here you come across that way
05:40 mst let me rephrase: to me, every time I've seen you speak on this topic, you've sounded like that
05:40 mst less tellingg other people what they 'should' do, more doing, and you'll end up with a better result
05:42 ShimmerFairy Yes, I'm aware that on the subject of interop I've tended to state my opinions quite strongly. And as a note, when I use the word 'should', I'm not using that word to tell other people what to do. I see that word as a not-hypothetical "would" or "could", or a not-requiring "must"
05:43 mst given the combativeness of the rest of your tone, that isn't how it comes across
05:46 ShimmerFairy mst: I don't argue how it came across to others, I'm just saying that since I didn't use the word "should" in reference to anyone in particular (the only place I can see above is "the rakudo compiler shouldn't"), I don't quite see how that would turn into a "you should"
05:46 telex joined #perl6
05:46 mst and I'm just saying I don't care what you're nitpicking your meaning to after the fact, I care that you're saying things that will demotivate people who're contributing
05:46 mst and I'd like you to stop doing that, and instead contribute something
05:47 mst driving people who care about interop away from perl6 won't help anybody achieve anything
05:47 mst your original motivation doesn't make your words any less cutting
05:47 mst I don't really care whether it's actual malice or just terrible social skills, I just want you to not do it anymore :)
05:48 ShimmerFairy mst: Like I said, I won't argue how it comes across, I'm just hoping to explain what I meant better, to further understanding :)
05:48 mst I already guessed what you thought you meant
05:48 mst but that wasn't the problem
05:48 mst and doesn't actually help anything
05:49 ShimmerFairy And just so you know, I do contribute, and regardless I'm not a fan of this kind of "if you won't light a candle, then you better not make a peep about how dark it is" thinking. (That's why, from what I've heard of OpenBSD, I'm not inclined to ever be involved in that community.)
05:50 mst funny, you remind me of the OpenBSD community
05:50 mst that's rather why I was annoyed
05:50 TimToady you guys are repeating yourselves...
05:52 mst ShimmerFairy: that's ... not what I was saying. I'm saying "don't complain about other people lighting candles just because you don't like the colour of the light"
05:52 mst but, yeah, we're going in circles now
05:52 mst on the upside, nine's now gone to do something more useful than having this conversation
05:52 * mst stops
05:53 ShimmerFairy In any case, sorry nine if I upset you. I never meant to attack your work (which as I understand has been impressive so far), I was voicing my perspectives on P5 interop (being someone who doesn't really need it) too strongly there.
05:53 mst ShimmerFairy++ # that's all I was trying to point out
05:53 mst oh!
05:54 mst ShimmerFairy: actually, I have a blog post I wrote when I realised I'd done exactly the same thing somewhere else
05:54 mst ShimmerFairy: http://shadow.cat/blog/matt-s-trout/passion-anguish/
05:54 mst please don't take that as an attack, you'll find I'm actually one of the examples of the failure mode :)
05:56 ShimmerFairy mst: and with my candle metaphor earlier, I was trying to mention that your "write a patch" suggestions remind me of how some people tend to be "well then, why don't YOU go do it?" to every suggestion (which is what I heard OpenBSD's programmers were like, from elsewhere)
05:57 rurban left #perl6
05:57 mst yes, I understood that
05:57 mst that's why I gave you an alternative metaphor
05:58 domidumont joined #perl6
05:58 ShimmerFairy I think that's a nice alternative, and you could describe the clashing of opinions as people constantly changing the colors back and forth. (For advanced candles, naturally.)
05:59 mst I appreciate your wanting certain colours of candle lit
05:59 mst but as the passion/anguish thing mentions
05:59 mst it's really easy to slip from there into accidentally criticising people for lighting their own candle of a colour you're not as fond of
05:59 mst or at least having them feel like you did, even if you weren't wanting to go that way
06:00 mst I would like you to retain all of that passion, but put it into encouraging people to write more candles of the colours you like
06:00 mst if you see what I mean
06:00 mst (I still get this wrong often enough, if I'm good at spotting this failure mode, it's because I've provided myself with lots of practice ;)
06:01 ShimmerFairy Yes, and I can definitely agree that P5 interop is (for whatever reason) a weak spot in my usually calmer self :) . I can't even recall _why_ it's like that for me, perhaps that "implied to be like in P5" got me more than I think?
06:02 * ShimmerFairy should probably do something towards that spec modernization soon, so it's not something she can complain about anymore :P
06:03 domidumont joined #perl6
06:04 telex joined #perl6
06:05 mst ShimmerFairy: on the other hand, it's a grand historical tradition
06:05 mst I'm pretty sure I could find you bits of the perl5 docs that say "and the rest of the behaviour is obvious because it works just like awk" ;)
06:07 flussence don't worry too much about the authority of the specs, those got semi-demoted to design docs a few months ago. P6's official definition is the test suite now (...like P5, oh the irony!)
06:07 ShimmerFairy mst: sure, the modernization I have in mind isn't to wipe traces of Perl 5, it's just to make things sound less like a perl future-changelog written in 2003 ("X [from P5] is now Y [in P6]", for instance), and to explain things that were left unexplained before.
06:07 ShimmerFairy flussence: really? When was this decided?
06:07 mst I dunno, I get really annoyed by those bits of the perl5 docs too
06:08 mst but I always get distracted by something else before I get round to tweaking them
06:08 flussence I think it was one of the earlier YAPCs...
06:08 diana_olhovik joined #perl6
06:08 arnsholt pmichaud has been wanting to make the test suite the authoritative source for a while, if memory serves
06:09 ShimmerFairy mst: basically, I'd like to make explicit stuff that's left out with just a tiny little "if not mentioned, like P5" note in S01, and to make comparsions between P5 and P6 not so temporal, or "direct successor" sounding :)
06:09 mst OTOH fixing the synopses would be good anyway since they're likely to form more of a basis for documentation going forwards
06:09 flussence oh yeah, that was it. pmichaud announced the "specs" repo was going to be renamed at some point without warning :)
06:10 ShimmerFairy (e.g. "X is now Y" -> "Perl 6's version of X is called Y", or "X is gone" -> "", since stuff that doesn't exist in P6 don't need to be mentioned in the P6 design docs, right? :P)
06:11 ShimmerFairy I think the design docs, even if demoted, are worth updating. And it's easier to read documentation for how P6 works than source code :)
06:11 mst exactly
06:11 mst also, from the p5 side of aisle, removing 'direct successor' sounding stuff will make us happy too
06:12 mst and from the "I have lots of friends working on both" 'side', removing 'direct successor' stuff means significantly less likelihood of having to stamp down silly misunderstanding fueled drama yet again
06:12 mst and I think every community cat herder on either project is real bored of that now :D
06:14 ShimmerFairy It's still worth explaining stuff in comparison to P5, it would just sound less crufty if the comparison wasn't so temporal, as if Perl 6 is still the direct successor :)
06:15 telex joined #perl6
06:16 telex joined #perl6
06:18 mst yeah, well, it's only since ...
06:18 mst yeah, well, it's only since ... '09, IIRC, that we finally got general consensus to stop pretending it was the direct successor and instead start collaborating again rather than having a bunch of unproductive fights
06:19 mst (which is one of the reasons I'm highly in favour of the interop stuff, just because I think human factor wise it's going to be really important to avoiding a bunch of silly drama, again)
06:19 ShimmerFairy Heh, I think 2009 or 2010 is when I joined Perl 6, so apparently I just missed the end of that way of thinking :)
06:20 mst yeah, so, basically, it required masak to write http://strangelyconsistent.org/blog/how-perl-6-could-kill-us-all and me to write http://shadow.cat/blog/matt-s-trout/f_ck-perl-6/
06:20 mst and then a bunch of running around glaring at people who still weren't on message
06:20 mst and then it all started to calm down somewhat
06:20 mst but it was all exceedingly silly
06:21 mst people's front of judea versus people's judean front grade silly ;)
06:22 ShimmerFairy mst: I'm sure the Judean People's Front had the best ideas, though :P
06:22 mst ShimmerFairy: split()er!
06:23 * flussence has "fond memories" of hacking on Pod::To::HTML around 2010ish, and the half hour or so it took to spit out S26.html...
06:24 flussence (I'm glad that didn't put me off :)
06:25 ShimmerFairy I remember when I couldn't compile rakudo on my old Powerbook anymore, Parrot was so bad. Had to work with it remotely 'til I finally got a better computer :)
06:28 flussence I went the insane route and added more swap until my netbook would build it... usually overnight
06:30 flussence (I also flipped between rakudo and niecza a lot back then... p6 felt a lot like the web dev landscape from 10 years before)
06:34 * mst remembers taking a little over 24h to build KDE base on his first thinkpad
06:35 flussence pretty sure I got on people's bad side with some *terrible* web browser analogies back then too... :)
06:37 ShimmerFairy mst: wow, I'm glad I don't have it that bad anymore. (there's only webkit, which has a horrendous build time, and until I cleared out as much webkit-using stuff I could I needed four(!) different versions of it too)
06:38 telex joined #perl6
06:39 * flussence tried a few different browsers last month, so got to enjoy compiling webkit. over and over and over.
06:41 laouji joined #perl6
06:42 ShimmerFairy flussence: thanks to its horrific memory usage, it's one of the few things in portage I've demoted to less than the usual -j3 . And I wish I could replace qtwebkit with some sort of webkit-dummy, but AFAIK that's NYI :)
06:45 dalek ecosystem: 3751672 | (Tokuhiro Matsuno)++ | META.list:
06:45 dalek ecosystem: Added Raw::Socket
06:45 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/3751672fa2
06:45 dalek ecosystem: 4a3d940 | moritz++ | META.list:
06:45 dalek ecosystem: Merge pull request #58 from tokuhirom/master
06:45 dalek ecosystem:
06:45 dalek ecosystem: Added Raw::Socket
06:45 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/4a3d940929
06:46 moritz \o
06:46 mst ShimmerFairy: note that if you read those two, and imagine what things must've been like to make those two posts seem sensible to write, you can probably get a fair insight into why "give each other special treatment because we're friends and we want to" is a meme I'm going to defend to the death, because the alternative situation as I saw it was definitely not an improvement
06:46 mst ShimmerFairy: I'm not saying that to make a particular argument, only to give you a clearer picture of where -my- particular foibles here come from, since you were kind enough to make an effort to unpack yours :)
06:48 ShimmerFairy mst: thanks :) . And if I understand correctly, I'm guessing I perhaps took "P6 doesn't succeed P5" a bit too much to heart, and came to the opposite of the old way of thinking ("P6 and P5 have nothing to do with each other")
06:50 perlawhirl joined #perl6
06:50 mst yes. which, though I was mostly trying to get us to leave each other alone at that point, because oh my did we all need a time out and nice cold class of calm the heck down at the time
06:51 mst I think stronger diplomatic relations as sister communities than with other communities is still a good thing
06:52 perlawhirl hi all... and hi again to those who were here 3 hours ago when i was asking questions
06:52 mst and will give us a much better position to avoid friction from than taking it quite so far as you seem to, though that doesn't mean you should change, I'm sure there are still far more people on the other end of the spectrum and they worry me a lot more
06:53 erxeto joined #perl6
06:54 perlawhirl i have another quick regex questions... inverse matching / not matching... is there a more idiomatic way to do it other than { $_ !~~ /$pattern/ } ? doing { ! /$pattern/ } does not work
06:55 mst ShimmerFairy: anyway. maybe I was falling a bit into the passion/anguish error in the process of diagnosing you as doing the same thing; I think that probably fits, and, y'know, I did say I was a past master at that particular failure mode ;)
06:56 moritz perlawhirl: huh, I expected !/pattern/ to work
06:56 telex joined #perl6
06:56 moritz perlawhirl: does it work with ! m/../?
06:56 perlawhirl hrm... maybe... one sec
06:56 ShimmerFairy mst: I think my opinions are also because I came to this language a few years ago (non-P5-knowing newcomers today will probably end up more familiar with P5 than me), and because I came here after trying P5 for two seconds and failing at that weird -> thing
06:56 ShimmerFairy mst: Basically, I ended up going "well, Perl 6 may not have the libraries I want to use yet, but at the syntax makes sense" :P
06:57 perlawhirl moritz: doesn't seem to
06:57 perlawhirl Method 'match' not found for invocant of class 'Any'
06:57 flussence m: say (^10).grep(!m/<[12345]>/) # same error locally
06:57 camelia rakudo-moar c0e0c9: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in block <unit> at /tmp/mSEOJm0k04:1␤␤»
06:57 moritz perlawhirl: example?
06:58 moritz flussence: needs to be inside a closure
06:58 moritz m: say (^10).grep({ !/<[12345]>/})
06:58 camelia rakudo-moar c0e0c9: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in block <unit> at /tmp/2MJcbJvlAq:1␤␤»
06:58 telex joined #perl6
06:58 moritz m: say (^10).grep({ !m/<[12345]>/})
06:58 camelia rakudo-moar c0e0c9: OUTPUT«(0 6 7 8 9)␤»
06:58 ShimmerFairy perlawhirl: I don't think it's so easy to negate a regex generally. You'd either have to manually negate it, or use !~~ to check for "didn't match"
06:58 perlawhirl i'm trying to inverse grep a list, ie. @arr.grep($_ !~~ /$pattern/)
06:58 moritz perlawhirl: see above; needs a closure
06:58 moritz or maybe
06:59 moritz m: say (^10).grep(none(/<[12345]>/))
06:59 camelia rakudo-moar c0e0c9: OUTPUT«(0 6 7 8 9)␤»
06:59 perlawhirl ok, cool
06:59 ShimmerFairy fwiw, I would've been quite surprised if !/rx/ did what you expected :)
06:59 moritz ShimmerFairy: me too. But I'm surprised that { !/<[12345]>/} doesn't work
06:59 perlawhirl moritz: closure works as expected... thanks!
07:00 mst ShimmerFairy: so, -> for nested hash derefs etc. was where I firsst used that
07:00 mst ShimmerFairy: then had hashes of subrefs, so $thing{foo}->(...)
07:00 ShimmerFairy moritz: not me, but then again I always use bare regexes with ~~ , since that's in one sense the "regex match" operator to me :)
07:00 rindolf joined #perl6
07:00 mst ShimmerFairy: so then I finally grokked OO as 'wait a class is jhust a special sort of hash of subrefs', so $thing->foo(...) as ref($thing)->{foo}($thing. ...) didn't seem that odd
07:00 mst ShimmerFairy: if I'd known OO -first- I'd probably've hated it too
07:01 mst ... must remember that progression for teaching perl5, actually
07:02 ShimmerFairy mst: to clarify a bit, I was a teenager, wanted to write an emulator in a scripting language (long story), and when I gave up on Python 3, I tried deciding between the two Perls. I found a P5 Qt tutorial, couldn't make what I wanted to do work (those -> were to blame), and impatiently switched to P6.
07:03 mst heh
07:03 moritz ShimmerFairy: and now you're stuck here, patching the compiler :-)
07:03 mst that sounds like a completely reasonable train of thought, at least given my choice of calibration for 'reasonable' ;)
07:03 ShimmerFairy moritz: yep, can't say I'm disappointed in how things turned out :)
07:05 ShimmerFairy mst: about Py3, it didn't have @a[0] := @a[5] (for simulating shadow memory), which I got around, but it was when I got to working on opcodes and discovered that Py3 didn't have case statements that I gave up on it :P
07:08 mst what happens to me in python is I get ten minutes in and then I want lexical scope and lambdas and then I go WHAT IS THIS TOYTOWN BULLCRAP and then I throw a chair and use something else
07:08 mst I am really looking forward to playing with ES6, I think javascript and I will be much better friends with 'let'
07:11 moritz if it reduces the amount of (function () { ... })(), I'm all for it.
07:11 ShimmerFairy I haven't touched python since, but nowadays I like TIMTOWTDI and not having an entire language with :sigspace forcibly on :P
07:11 mst moritz: that basically goes away. this makes me happy.
07:12 mst babeljs is well worth a look
07:12 perlawhirl ShimmerFairy: have you used powershell... it's dynamic scoping is intolerable
07:12 ShimmerFairy I have not. I've been using bash for years now :)
07:12 mst dynamic scoping is the one true scoping, that's why everybody loves elisp unconditionally
07:12 abraxxa joined #perl6
07:12 perlawhirl ha!
07:12 moritz and perl < 5
07:12 ShimmerFairy mst: unless you turn on the fancy new lexical scoping in elisp :P
07:13 TimToady m: for (1,2,3).pairs X (4,5,6).pairs -> ($x,$y) { say "$x $y" }
07:13 camelia rakudo-moar c0e0c9: OUTPUT«This type cannot unbox to a native string␤  in block <unit> at /tmp/YnA_LhZbRO:1␤␤»
07:13 mst damnit, somebody spilled reality over my joke :(
07:13 TimToady bug ^^^
07:13 moritz TimToady: I tend to agree :-)
07:14 mst TimToady: on the upside, while you were away we stopped going round in circles and started tracing mandelbrot sets :D
07:14 ShimmerFairy mst: it's a 24.??? feature, and it only really applies to (let) and things like that, things like (defvar) now guarantee a dynamic var.
07:14 TimToady \o/
07:15 mst ShimmerFairy: I have no idea at all, I maintain my own personal fork of ex-vi
07:15 mst it goes well with the lawn defence cannon
07:15 mst however, it's now half an hour since I said I was going to be in 20 minutes, so I'm going to vanish at this point
07:16 ShimmerFairy mst: personally, I would love a Perl6-y form of emacs ("Like emacs, but s:g/elisp/perl6/"), if for no other reason than emacs regexps are awful, awful, awful
07:16 mst that was fun once we untangled the confusion, though
07:16 ShimmerFairy see'ya later :) o/
07:16 mst may all your candles be appropriately dribbly, whatever, their colour, and in the meantime, good night
07:17 flussence .oO( those arrow functions in JS are a bit *too* nice, I got carried away and accidentally wrote a userscript in pseudo-haskell... )
07:18 FROGGS joined #perl6
07:23 laouji joined #perl6
07:29 darutoko joined #perl6
07:33 Alina-malina joined #perl6
07:33 Alina-malina joined #perl6
07:34 mathw (interesting backlog) wait Python doesn't have case???
07:35 cognominal joined #perl6
07:36 telex joined #perl6
07:37 ShimmerFairy mathw: it didn't back in '09 or so, at least.
07:37 mathw wow
07:38 ShimmerFairy (and it's entirely possible that I was too much of a dumb teenager to properly find it :P)
07:38 mathw I'm trying to remember if I saw any in the Python codebase I was recently spelunking through at work
07:38 mathw I can't recall doing so
07:38 mathw But I might have got too lost amidst the copious misuse of XPath :)
07:38 brrt joined #perl6
07:40 mathw Fortunately I'm not expected to do Python regularly
07:40 mathw I shall now return to my regularly scheduled attempts to convince anybody else at work that F# is possibly worth considering
07:40 ShimmerFairy a quick scan shows that I correctly didn't find it, and perhaps it's still not there O_o
07:42 [Tux] test             50000    37.837    37.753
07:42 [Tux] test-t           50000    41.997    41.913
07:45 mathw ShimmerFairy: I just did some hunting and found that apparently the official reason it doesn't have anything like switch/case is that you can simulate it using either if... elif... or a dictionary
07:45 mathw and that switch/case is hard to debug
07:46 mathw that argument seems to come from the idea that all forms of switch/case use fallthrough-by-default like C's bad choices.
07:46 mathw So I don't really buy that. But I don't really buy a lot of Python's arguments. Really the only thing I like about it is the syntax.
07:46 telex joined #perl6
07:46 ShimmerFairy mathw: that's what I find too. Which is silly, since at the simplest case you could at least say "well, people are using associative types to do this, lets make the syntax do something like that"
07:47 mathw yeah
07:47 mathw well at least over here we've got given/when :D
07:47 arnsholt Speaking of Python, it does have lexical scoping (and closures, if not proper lambdas). What's completely bananas is the declaration rules, not the scoping =)
07:48 ShimmerFairy http://www.pydanny.com/static/aliens.png
07:56 espadrine joined #perl6
07:56 telex joined #perl6
08:16 telex joined #perl6
08:20 vendethiel joined #perl6
08:26 telex joined #perl6
08:28 brrt mathw: i actually use fallthrough a lot in C :-)
08:30 FROGGS brrt: compiler writer do that, yes :o)
08:31 brrt i feel like i've suddenly developed a reputation for being a mad evil person just for mucking around with bits :-P
08:31 brrt although hate of switch/case is pretty pervasive
08:31 brrt i knew one guy who rewrote a 10-case switch statement into if/elses
08:32 FROGGS :/
08:32 advwp joined #perl6
08:32 woolfy joined #perl6
08:32 FROGGS to me switch statements are way more readable
08:32 woolfy left #perl6
08:33 brrt dunno. i suppose if you read it in a fully literal left-to-right top-to-bottom order, if/else is ok
08:33 brrt but personally i skim
08:33 FROGGS though, my mind "expects" then to not fall through I think, so I like Perl 6's default here
08:34 FROGGS it is easy to miss a n 'if' though when it follows an 'if/elsif/elsif/ directly
08:35 FROGGS that's where I like it when the body of a switch statement is indented...
08:35 FROGGS fells more block like
08:35 FROGGS feels*
08:35 brrt yeah, i agree
08:36 brrt ok, in that sense, fallthrough is probably evil
08:36 brrt although *i* know a guy who uses goto within the switch statements
08:36 brrt and fallthrough
08:38 psch moin #perl6 o/
08:38 psch r: for <0 1 2> { .say when 0; .say when 1; .say when 2 } # allomorphs! *shakes fist*
08:38 camelia rakudo-moar c0e0c9: OUTPUT«0␤1␤2␤»
08:38 camelia ..rakudo-jvm c0e0c9: ( no output )
08:39 mathw brrt: I love switch-like constructs. Fallthrough is useful, but I think there are better options. The trouble with C's is that it's designed to compile down to something super-efficient and it comes from an era when your compiler wasn't smart enough to do that when it can but also give you something fancier when it can't
08:40 brrt uhuh
08:41 brrt that's kind of true still
08:41 brrt compilers are still pretty dumb
08:44 telex joined #perl6
08:45 ShimmerFairy brrt: surely not Perl 6 compilers though! :)
08:45 brrt hmm. i can't speak for that :-)
08:46 brrt what i do think is that 'sufficiently smart' usually means 'very expensive algorithms' and that's not pretty rarely a good choice
08:46 brrt euh
08:46 brrt s/not//
08:47 lizmat good *, #perl6!
08:48 psch hi lizmat o/
08:48 lizmat psch o/
08:49 brrt hi lizmat
08:49 lizmat brrt o/
08:52 psch of course it's not actually the allomorphs that are to blame, my getBI hack just didn't quite work as expected in some cases.. :/
08:54 telex joined #perl6
09:03 ShimmerFairy psch: IIRC bigints in java aren't that great in general
09:05 laouji joined #perl6
09:06 vendethiel well, the API is a bit... tiring to use
09:06 FROGGS that's quite Javaish, no?
09:08 lizmat m: say (-1) ** 4553535345364535345634543534
09:08 camelia rakudo-moar c0e0c9: OUTPUT«0␤»
09:08 lizmat there's a spectest expecting 1 there
09:08 psch $ ./perl6-j -e'for <0 1 2> { .print when 0; .print when 1; .print when 2 }'
09:08 psch 012
09:08 psch fixed it anyway :P
09:08 lizmat m: say -1 ** 4553535345364535345634543534
09:08 camelia rakudo-moar c0e0c9: OUTPUT«-1␤»
09:08 lizmat hmmm...
09:08 psch ShimmerFairy: the problem was just that i didn't actually check for the right field type, but relied on get_attribute_native to throw if it didn't find the right one
09:09 ShimmerFairy ah
09:09 lizmat $ git describe
09:09 lizmat warning: tag 'Zürich' is really 'Zürich' here
09:09 lizmat Zürich
09:09 lizmat huh?
09:09 ShimmerFairy lizmat: the second quoted Zürich has a decomposed umlaut after the u
09:09 ShimmerFairy (and my irc client puts it over the wrong letter. nice.)
09:10 lizmat aha!
09:10 lizmat welcome to the world of unicode  :-)
09:10 dalek nqp: cdd57fe | FROGGS++ | tools/build/MOAR_REVISION:
09:10 dalek nqp: bump moar for fix for RT #125408
09:10 dalek nqp: review: https://github.com/perl6/nqp/commit/cdd57fef0c
09:10 ShimmerFairy I'm familiar with it, it's just that a frightening number of programs get the placement of diacritics wrong :/
09:11 dalek rakudo/nom: 5ddb978 | FROGGS++ | t (2 files):
09:11 dalek rakudo/nom: bump nqp/moar for fix for RT #125408
09:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5ddb978f3f
09:11 dalek nqp: 9a53b94 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
09:11 dalek nqp: Correct getBI hack.
09:11 dalek nqp:
09:11 dalek nqp: Apparently we can't rely on get_attribute_native to only get BigIntegers, so we
09:11 dalek nqp: actually look for one.
09:11 dalek nqp: review: https://github.com/perl6/nqp/commit/9a53b94fb4
09:11 psch FROGGS: bump again! :P
09:12 * psch can do that too, though
09:12 FROGGS psch: ohh, then I'll let you doing it :o)
09:14 dalek rakudo/nom: d2d975e | peschwa++ | tools/build/NQP_REVISION:
09:14 dalek rakudo/nom: Bump NQP_REVISION (again).
09:14 dalek rakudo/nom:
09:14 dalek rakudo/nom: Get proper IntStr handling on jvm.
09:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d2d975e3c3
09:23 jack_rabbit_ joined #perl6
09:28 telex joined #perl6
09:32 andreoss joined #perl6
09:40 yakudza joined #perl6
09:41 * lizmat is still seeing a new spectest error in t/spec/S32-num/power.t
09:48 telex joined #perl6
09:48 pdcawley joined #perl6
09:54 mprelude joined #perl6
10:02 araujo_ joined #perl6
10:08 telex joined #perl6
10:22 telex joined #perl6
10:27 psch https://gist.github.com/peschwa/90c8dcc516ea934a17be # updated j-spectest summary
10:27 psch down to 43 files mentioned, with 2 being only mentioned as TODO PASS
10:28 psch actually that's 3, from the looks of it
10:28 moritz r: say (-1) ** -i
10:28 camelia rakudo-moar d2d975: OUTPUT«NaN+NaN\i␤»
10:28 camelia ..rakudo-jvm d2d975: ( no output )
10:29 psch r: say (-1) ** -i # jvm just sleepy
10:29 camelia rakudo-{moar,jvm} d2d975: OUTPUT«NaN+NaN\i␤»
10:29 moritz ah, that one is TODOed
10:29 moritz the ones that fails is
10:29 moritz m: say  (-1) ** 4553535345364535345634543534
10:29 camelia rakudo-moar d2d975: OUTPUT«0␤»
10:31 psch m: say <3> ~~ Int
10:31 camelia rakudo-moar d2d975: OUTPUT«True␤»
10:31 psch m: use Test; isa-ok <3>, Int
10:31 camelia rakudo-moar d2d975: OUTPUT«ok 1 - The object is-a 'Int'␤»
10:31 psch r: use Test; isa-ok <3>, Int
10:31 camelia rakudo-moar d2d975: OUTPUT«ok 1 - The object is-a 'Int'␤»
10:31 camelia ..rakudo-jvm d2d975: OUTPUT«not ok 1 - The object is-a 'Int'␤␤# Failed test 'The object is-a 'Int''␤# at /tmp/tmpfile line 1␤# Actual type: Str␤»
10:32 telex joined #perl6
10:32 psch r: use Test; isa-ok <3>, Str
10:32 camelia rakudo-{moar,jvm} d2d975: OUTPUT«ok 1 - The object is-a 'Str'␤»
10:33 psch r: say IntStr.isa(Str)
10:33 camelia rakudo-{moar,jvm} d2d975: OUTPUT«True␤»
10:33 psch r: say IntStr.isa(Int)
10:33 camelia rakudo-{moar,jvm} d2d975: OUTPUT«True␤»
10:33 * psch guesses Binder :P
10:33 ilmari m: say 1 << 73
10:33 camelia rakudo-moar d2d975: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_pfCDbRbAX␤Unsupported use of << to do left shift; in Perl 6 please use +< or ~<␤at /tmp/_pfCDbRbAX:1␤------> 3say 1 <<7⏏5 73␤»
10:33 ilmari m: say 1 +< 73
10:33 camelia rakudo-moar d2d975: OUTPUT«9444732965739290427392␤»
10:34 psch i'll fix hash ordering tests first suppose
10:34 psch 'cause that also helps moar :)
10:37 [Sno] joined #perl6
10:42 telex joined #perl6
10:45 psch hm, not sure about S02-types/baghash.t:134
10:45 psch where exactly is it that we're testing flattening there..?
10:46 psch isn't that test actually just conflating the two tests below
10:47 lizmat psch: that might well be the case, as these tests predate GLR and were quickly fudged
10:48 telex joined #perl6
10:50 telex joined #perl6
10:50 vendethiel joined #perl6
10:52 dalek roast: 66f9a46 | peschwa++ | S02-types/bag.t:
10:52 dalek roast: Make a test hash-elem-ordering proof.
10:52 dalek roast: review: https://github.com/perl6/roast/commit/66f9a46816
10:52 dalek roast: 7a58cad | peschwa++ | S02-types/ (3 files):
10:52 dalek roast: Remove a duplicate/conflated test.
10:52 dalek roast: review: https://github.com/perl6/roast/commit/7a58cad6c2
10:52 psch s/ a / a few /
10:53 psch oh
10:53 psch i should probably have checked if bag.t has something like &showkv :/
10:54 psch hm, maybe not.  i don't immediately see how i can utilize it there
10:55 colomon joined #perl6
10:56 psch eh, but that test doesn't feel particularly good in any case :/
10:56 psch i mean, neither with nor without my changes
11:01 psch the fact that the glr changed the semantics is part of the reason i guess
11:01 psch m: my Bag $bag .= new: <foo foo bar>; for $bag.keys X $bag.keys -> $a, $b { say $a, $b }
11:01 camelia rakudo-moar d2d975: OUTPUT«(foo foo)(foo bar)␤(bar foo)(bar bar)␤»
11:01 psch ...or did they
11:02 psch they didn't i must've done something weird locally :)
11:02 psch anyway, that's another 4 files clean on j-spectest
11:04 psch r: use Test; my @a = <foo 3 4.5 5.60 1.2e1 -2+3i>; isa-ok @a[1], Int, '< ... 3 ...> is an Int';
11:04 camelia rakudo-moar d2d975: OUTPUT«ok 1 - < ... 3 ...> is an Int␤»
11:04 camelia ..rakudo-jvm d2d975: OUTPUT«not ok 1 - < ... 3 ...> is an Int␤␤# Failed test '< ... 3 ...> is an Int'␤# at /tmp/tmpfile line 1␤# Actual type: Str␤»
11:05 psch oh ffs, getBI still wonky?
11:05 psch r: say $_.WHAT for <0 1 2 3 4 5 6 7 8 9>
11:05 camelia rakudo-jvm d2d975: OUTPUT«(Str)␤(Str)␤(Str)␤(Str)␤(Str)␤(Str)␤(Str)␤(Str)␤(Str)␤(Str)␤»
11:05 camelia ..rakudo-moar d2d975: OUTPUT«(IntStr)␤(IntStr)␤(IntStr)␤(IntStr)␤(IntStr)␤(IntStr)␤(IntStr)␤(IntStr)␤(IntStr)␤(IntStr)␤»
11:06 psch agh
11:07 psch allomorphic.t probably should be in spectest.data...
11:08 dalek rakudo/nom: aa34562 | peschwa++ | t/spectest.data:
11:08 dalek rakudo/nom: Test S02-literals/allomorphic.t
11:08 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aa34562391
11:17 brrt joined #perl6
11:20 masak hi, #perl6
11:21 lizmat masak o/
11:23 araujo joined #perl6
11:23 araujo joined #perl6
11:24 domidumont joined #perl6
11:27 skids joined #perl6
11:28 telex joined #perl6
11:30 [ptc] masak: o/
11:31 masak lizmat, [ptc]: \o
11:34 xinming joined #perl6
11:39 kid51 joined #perl6
11:42 telex joined #perl6
11:48 Skarsnik joined #perl6
11:48 jack_rabbit_ joined #perl6
11:52 FROGGS joined #perl6
11:53 [Sno] joined #perl6
12:01 brrt joined #perl6
12:01 telex joined #perl6
12:04 telex joined #perl6
12:18 dalek perl6-examples: 2d4b164 | (Steve Mynott)++ | t/categories/99-problems.t:
12:18 dalek perl6-examples: [99probs] reorder expected output for P91-edpratomo and strip <> so it passes
12:18 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/2d4b164cc2
12:25 [Coke] psch: yay, I hoped I'd come back to jvm hacking. :) stresstest was very sad last night.
12:29 lizmat psch: did you actually try to run bag.t after doing https://github.com/perl6/roast/commit/66f9a46816 ?   :-)
12:29 Ulti my rakudobrew build is failing on Mac at the moment even after I completely wipe everything... is this a known issue?
12:30 * Ulti notices self-upgrade did a lot
12:30 psch lizmat: i... think so?  which means, probably not... :/
12:31 lizmat it has a compile error in it
12:31 moritz Ulti: if you wiped everything, how can you do a self-upgrade?
12:31 lizmat parings vs pairings
12:31 psch ugh ._.
12:31 Ulti moritz everything but the rakudobrew script :P
12:32 Ulti still fails in the same place I'll gist it
12:32 psch ...i did have this commit hook for roast once
12:32 psch maybe i should revisit it, ensure that i don't commit bogus tests :/
12:33 * psch waits until jvm finished building and *runs* S02-types/bag.t before pushing...
12:33 dalek rakudo/nom: 96c65bf | lizmat++ | src/core/IO/Handle.pm:
12:33 dalek rakudo/nom: Make "words".IO.lines.elems much faster
12:33 dalek rakudo/nom:
12:33 dalek rakudo/nom: For the chomp case, 20%, for the !chomp case, 40%.
12:33 dalek rakudo/nom:
12:33 dalek rakudo/nom: Basically, the nqp::eoffh op is useless as it stands now, so just don't use
12:33 dalek rakudo/nom: it.  If nqp::readlinefh returns 0 chars, we've reached EOF.  Also, don't
12:33 dalek rakudo/nom: bother updating $!ins if we're about to close the file handle at the end
12:33 dalek rakudo/nom: anyway.
12:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/96c65bf223
12:34 psch [Coke]: yeah, there's still quite a few pretty bad failure modes around... lowlevel Exceptions without a msg, StackOverflows...
12:34 Ulti https://gist.github.com/MattOates/6f8c4139a51956bff728
12:35 psch the former FROGGS (i think) says is leaking control exceptions from label stuff iirc, the latter is nigh impossible to debug...
12:35 rurban joined #perl6
12:35 _itz Ulti: did you run a mac update .. I had to "sudo gcc" (actually clang) and accept an agreement?
12:36 Ulti orly
12:36 Ulti I'll try that thanks _itz
12:36 telex joined #perl6
12:36 Ulti wow.... just wow
12:36 masak lizmat: what about checking $!ins on a closed handle?
12:37 Ulti thanks _itz looks to really be building now
12:37 Ulti jees
12:37 masak JEZU
12:37 lizmat masak: well, this is really about the case where the handle is hidden
12:37 masak aha.
12:37 Ulti sure love this opaque OSX updates where they tell you nothing
12:37 lizmat "words".IO.lines
12:38 lizmat in that case, the handle is never visible
12:38 _itz I was a bit annoyed by that one myself .. although Apple seem to be improving clang on the upside
12:38 lizmat and if you're doing $handle.lines(:close) yourself, you get what you indicate
12:38 psch hrm, the getBI/IntStr stuff breaks bag.t..?  i can't get *to* the test that i wanted to verify as working... :S
12:39 psch on the plus, allomorphic.t runs about half the tests (and fails about half of that...)
12:41 * geekosaur seeing email indicating that apple pushed xcode 7
12:44 telex joined #perl6
12:46 geekosaur ...and apparently it breaks macports toolchains because it uses a whole new linker mechanism. workaround: sudo port upgrade --enforce-variants ld64 +ld64_xcode (if it complains about incompatible variants, add the variant it complains about with leading - instead of +, e.g.port upgrade --enforce-variants ld64 -ld64_236 +ld64_xcode)
12:47 FROGGS geekosaur: sounds fun
12:47 geekosaur pretty much par for apple :/
12:47 FROGGS yeah, heard that already
12:50 sufrostico joined #perl6
12:52 [Coke] I did the xcode upgrade but haven't lost anything in macports yet, thankfully.
12:53 abaugher joined #perl6
12:57 psch well, i have a getBI implementation that works with &val
12:57 psch it doesn't work quite right with angle-quoted lists, though...
12:58 [Coke] psch: if you have an N core machine, how high can you push TEST_JOBS on a jvm spectest? N-1?
12:58 psch [Coke]: i'm running TEST_JOBS=4 on hack, usually
12:59 psch [Coke]: so that's a "yes", i suppose, although ISTR that someone suggested 2*N here some (probably "a long") time ago
12:59 [Coke] ok.
12:59 [Coke] maybe on moar, I would expect that to kill jvm stuff.
12:59 rindolf Hi all! Running «perl6 prob329-shlomif.p6» gives me these warnings - why? http://www.shlomifish.org/Files/files/text/perl6--prob329-shlomif.p6--warnings.txt
13:00 rindolf I've recently updated my rakudobrew and then the trouble started.
13:00 [Coke] relink to the script?
13:04 psch $ ./perl6-j -e'for "0", "1", "2" { print val($_).Int ~ " " }; print "\t"; for <0 1 2> { print .Int ~ " " }; say()'
13:04 psch 0 1 2   1 1 1
13:04 psch that's just weird :/
13:04 rindolf [Coke]: here - https://github.com/perl6/perl6-examples/blob/master/categories/euler/prob329-shlomif.p6
13:05 psch ShimmerFairy: ^^^ any idea where i should look?  it seems to be somewhere above nqp-level...
13:05 arnsholt psch: What's the AST for <0 1 2>?
13:05 arnsholt Or just <0>, even
13:06 rindolf m: for "0", "1", "2" { print val($_).Int ~ " " }; print "\t"; for <0 1 2> { print .Int ~ " " }; say()
13:06 camelia rakudo-moar 96c65b: OUTPUT«0 1 2        0 1 2 ␤»
13:06 arnsholt It's a JVM bug
13:06 FROGGS m: say my @init_probab = (0, (map { FatRat.new(1, 500) }, 1 .. 500) , 0);
13:06 camelia rakudo-moar 96c65b: OUTPUT«[0 (0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 …»
13:06 FROGGS m: say my @init_probab = flat (0, (map { FatRat.new(1, 500) }, 1 .. 500) , 0);
13:06 camelia rakudo-moar 96c65b: OUTPUT«[0 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0…»
13:06 ShimmerFairy psch: only thing I can think is that I had to change some of the Q lang to support multiple post-processing adverbs (since <> is just q:w:v, for example). But as has been mentioned, it's a VM-level issue.
13:06 FROGGS rindolf: do that ^^
13:07 arnsholt psch: Also, does the same thing happen when you do "for <0>, <1>, <2>"?
13:07 psch arnsholt: - QAST::Stmts <0>␤- QAST::Stmt <0>␤- QAST::WVal(IntStr) 0
13:07 FROGGS add a 'flat' after the assignment op to line 9, 11, 12 and 30
13:07 rindolf FROGGS: is this the correct behaviour?
13:07 FROGGS rindolf: yes
13:07 rindolf FROGGS: oh.
13:08 psch arnsholt: $ ./perl6-j -e'for <0>, <1>, <2> { print .Int ~ " " }; say()'
13:08 psch 1 1 1
13:08 rindolf FROGGS: didn't it break the code of all the world and his mother?
13:08 FROGGS rindolf: yes
13:08 [Coke] rindolf: @p_letter only has 4 elements in it.
13:08 psch ShimmerFairy: well, yeah, it's vm-level, but it's apparently not in the ops impl
13:09 ShimmerFairy psch: since I never had to do anything obviously VM-specific ("obvious" according to one who's not familiar with what VM-differentiated code looks like), I couldn't tell you where the issue could be :/
13:09 rarara joined #perl6
13:10 arnsholt psch: Weird. Is the .WHAT of the val($_) the same as the .WHAT in the <...> case?
13:10 * [Coke] sees FROGGS is already on the case and gets more coffee.
13:10 ShimmerFairy psch: I assume the weird "1 1 1" thing doesn't happen with RatStrs or anything?
13:10 telex joined #perl6
13:10 dalek rakudo/nom: 328a03a | lizmat++ | src/core/IO/Handle.pm:
13:10 dalek rakudo/nom: Make 'for "words".IO.lines' about 25% faster
13:10 dalek rakudo/nom:
13:10 dalek rakudo/nom: Basically the same opt done for '"words".IO.lines.elems'
13:10 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/328a03aa73
13:11 psch $ ./perl6-j -e'print <0>.WHAT.gist, " ", val("0").WHAT.gist, " "; say <0>.WHAT =:= val("0").WHAT'
13:11 psch (IntStr) (IntStr) True
13:11 psch arnsholt: ^^^
13:12 arnsholt Very, very weird
13:12 FROGGS j: for "0", "1", "2" { print val($_).Int ~ " " }; print "\t"; for <0 1 2> { print .Int ~ " " }; say()
13:12 camelia rakudo-jvm 96c65b: OUTPUT«java.lang.NullPointerException␤  in block <unit> at /tmp/J6cm3OijYG:1␤␤»
13:12 psch FROGGS: i can push what i have, but...
13:13 FROGGS psch: what does this give?  for "0", "1", "2" { print val($_).Int ~ " " }; print "\t"; for <0 1 2> { print .WHAT; print .Int ~ " " }; say()
13:13 Peter__R joined #perl6
13:13 psch FROGGS: 0 1 2   1 1 1
13:14 FROGGS ohh, print was stupid there...
13:14 FROGGS psch: would be interesting to know what $_ is the second loop...
13:14 psch oh
13:14 psch miscopied
13:14 FROGGS its type and its .WHICH
13:14 FROGGS no, .WHERE
13:16 psch $ ./perl6-j -e'for "0", "1", "2" { print val($_).Int ~ " " }; print "\t"; for <0 1 2> { print .^name, " ", .WHERE, " ", .Int ~ " " }; say()'
13:16 psch 0 1 2   IntStr 1367725438 1 IntStr 696478978 1 IntStr 1936307096 1
13:16 psch that good? :S
13:16 ShimmerFairy psch: Here's a silly idea: <1 2 3>.map: { val(~$_) }    :)
13:17 psch ShimmerFairy: well, that works - <>-quoting gives the right .Str but the wrong .Int here
13:18 psch $ ./perl6 -e'<1 2 3>.map: { print val(~$_).Int, " " }; say()'
13:18 psch 1 2 3
13:18 psch $ ./perl6 -e'<1 2 3>.map: { print val(~($_.Int)).Int, " " }; say()'
13:18 psch 1 1 1
13:18 larion joined #perl6
13:18 psch ^^^ as seen there :l
13:19 lizmat cycling&
13:19 ShimmerFairy psch: oh! try something like    my ($a, $b, $c) = (1, 2, 3); for «$a $b $c» { print .Int ~ " " }; say()
13:21 FROGGS hmmm
13:21 psch ShimmerFairy: 1 1 1
13:22 ShimmerFairy psch: darn, I was hoping the calling of &val at compile-time was perhaps the issue. («$a» isn't counted as being a compile_time_value for me at least)
13:26 khw joined #perl6
13:26 telex joined #perl6
13:27 FROGGS j: use nqp; my $a = 42; say $a.WHERE; say nqp::add_I(nqp::decont($a), 0, IntStr) # ???
13:28 camelia rakudo-jvm 96c65b: OUTPUT«1008783893␤%_␤»
13:28 FROGGS j: use nqp; my $a = 42; say $a.WHERE; say nqp::add_I(nqp::decont($a), 0, IntStr).Int
13:28 camelia rakudo-jvm 96c65b: OUTPUT«728034546␤42␤»
13:28 FROGGS ahh
13:28 telex joined #perl6
13:28 FROGGS phew
13:28 FROGGS j: use nqp; my $a = 42; say $a.WHERE; say nqp::add_I(nqp::decont($a), 0, IntStr).Int.WHERE
13:28 camelia rakudo-jvm 96c65b: OUTPUT«455979265␤1826478070␤»
13:29 colomon joined #perl6
13:34 dalek perl6-examples: 07cf4eb | (Shlomi Fish)++ | categories/euler/prob329-shlomif.p6:
13:34 dalek perl6-examples: Fix the code on recent versions of Rakudo.
13:34 dalek perl6-examples: review: https://github.com/perl6/perl6-examples/commit/07cf4ebcb1
13:37 timotimo o/ everyone
13:39 mspo joined #perl6
13:40 psch hi timotimo o/
13:43 mspo I'm trying to get the pkgsrc rakudo-star package up to date and change it into the "official" perl6 pkgsrc lang/perl6
13:43 thou joined #perl6
13:43 mspo is it possible to pre-fetch everything outside of the build steps?
13:46 Ulti /win/win 2
13:46 Ulti :(
13:46 zostay joined #perl6
13:49 masak Ulti: it's one of those /win/win situations... :P
13:50 telex joined #perl6
13:51 [Coke] mspo: star already prefetches most things.
13:51 [Coke] the .tar file should have everything needed to install.
13:51 simcop2387 joined #perl6
13:51 muraiki joined #perl6
13:52 mspo [Coke]: when I build it manually it seemed to do a bit of downloading
13:52 muraiki morning all. is there a stat() function somewhere in perl6? I looked in IO and couldn't find it... some old docs referenced File::stat but that doesn't seem to exist either
13:52 mspo [Coke]: this is not great for pkg systems :)
13:53 [Coke] mspo: "build it manually" ... are you building what's in the github repo?
13:53 mspo [Coke]: alternatively I could package nqp, moarvm, and (other) seperately I suppose
13:53 [Coke] or are you building from rakudo-star.2015.mumb...
13:55 mspo let me do a fresh build and clarify what I"m asking; sorry for the noise so far
13:57 Skarsnik Hi, what is the opposite of the .perl method? I have a $str holding a object.perl result and I want to put it back in a object.
13:58 jnthn EVAL
14:01 Loren joined #perl6
14:01 Loren m: sprintf("In my perl6, sprintf not work .");
14:01 camelia rakudo-moar 328a03: ( no output )
14:01 muraiki is there a way to convert a decimal to octal? I know that if I my $foo = 0o776 that is turned into an Int; there doesn't seem to be an Octal type
14:02 pink_mist sprintf "%o", $num;
14:02 muraiki hah, duh. thanks!
14:03 Loren Is 'sprintf' not implement or  my code is wrong
14:03 Skarsnik jnthn, oh thx, why EVAL (in caps)? or does $var.eval exist?
14:04 muraiki it worked for me
14:04 pink_mist heh, I thought this was #perl when I gave the answer ... so I didn't even check if it was available in perl6 :P
14:05 mspo [Coke]: I'm talking about this:
14:05 mspo --gen-moar[=branch]
14:05 mspo Download and build a copy of MoarVM
14:05 mspo --gen-nqp[=branch]
14:05 mspo Download and build a copy of NQP
14:06 mspo [Coke]: how do I pre-download those (or give my own paths) so I can validate checksums etc
14:06 pink_mist m: print sprintf("In my perl6, sprintf not work .");
14:06 camelia rakudo-moar 328a03: OUTPUT«In my perl6, sprintf not work .»
14:06 pink_mist Loren: you forgot to print
14:07 Loren ...
14:07 Loren OH ,my bad...
14:07 psch m: "50".base(8).say
14:07 camelia rakudo-moar 328a03: OUTPUT«Method 'base' not found for invocant of class 'Str'␤  in block <unit> at /tmp/mteoQKwHva:1␤␤»
14:07 psch m: 50.base(8).say
14:07 camelia rakudo-moar 328a03: OUTPUT«62␤»
14:08 pink_mist psch: nice
14:08 psch m: :8("0777").Int.base(8).say # round-trip Str -> Str
14:08 camelia rakudo-moar 328a03: OUTPUT«777␤»
14:08 psch oh the .Int is superfluous too i think
14:09 psch m: :8("0777").base(8).say # round-trip Str -> Str
14:09 camelia rakudo-moar 328a03: OUTPUT«777␤»
14:09 Loren I just saw the sample, forgot it was 'sprintf'!
14:09 perl6_newbee joined #perl6
14:10 psch Skarsnik: EVAL is caps to stand out - it's usually a sign of code doing something the reader probably wants to pay attention to
14:10 jnthn Skarsnik: We user uppercase for most of the time-shifty things (like BEGIN); also because it's macro-y rather than function-y
14:11 psch jnthn++ # for the reason *why* you want to pay attention :)
14:12 FROGGS joined #perl6
14:12 telex joined #perl6
14:15 FROGGS o/
14:19 Loren ~_~
14:23 lolisa joined #perl6
14:26 psch https://gist.github.com/peschwa/09f512e0a3f95a90dc81
14:26 psch i'm out of ideas
14:27 moritz psch: what does .Str.say give you?
14:28 psch moritz: the right values, i.e. "0 1 2" in this case
14:28 telex joined #perl6
14:28 moritz psch: so that means the Int component is wrong?
14:28 moritz also IMHO it would be better to still emit a QAST::Want
14:28 psch moritz: well, that's the thing.  it's only wrong through <>
14:29 psch moritz: call &val directly works
14:29 psch +ing
14:29 moritz QAST::Want($IntStr, 'i', $int_value, 's', $str_value)
14:29 psch moritz: there's a bit more in the backlog, about an hour ago
14:30 moritz ah yes
14:30 skids joined #perl6
14:36 telex joined #perl6
14:38 telex joined #perl6
14:40 erxeto moritz: by any chance are you the author of DBIish ?
14:40 moritz erxeto: one of the maintainers, yes
14:40 moritz the original author was mberends, back when it was called MiniDBI
14:41 erxeto I'm trying to install Task::Star via panda and and I have an error. I've seen that you already have a Issue at github for this
14:41 erxeto Just wanted to know if this is mantained (meaning eventually fixed) or not.
14:42 erxeto I'm just trying to start with perl6, so is not really an issue.
14:42 moritz erxeto: yes, it's maintained
14:43 erxeto this is the issue I'm talking about (just FYI): https://github.com/perl6/DBIish/issues/19
14:46 moritz erxeto: which version of rakudo are you using?
14:46 erxeto $ perl6 -v
14:46 erxeto This is perl6 version 2015.09 built on MoarVM version 2015.09
14:47 lichtkind joined #perl6
14:48 moritz erxeto: excellent
14:48 erxeto excellent ?
14:48 moritz erxeto: you rakudo isn't too old
14:48 moritz erxeto: and it's the rakudo I'll test with
14:49 moritz the part that's not excellent is that I fear it's a rakudo bug
14:49 erxeto moritz: I installed it a couple of hours ago with rakudobrew ... hehehe
14:49 psch heh, at least allomorphs.t doesn't look that much better on moar :S
14:49 psch Failed tests:  37-38, 40, 42-45
14:49 psch Parse errors: Bad plan.  You planned 93 tests but ran 45.
14:49 psch still...
14:50 moritz FROGGS: has 'require' stopped working?
14:51 FROGGS moritz: dont think so
14:51 FROGGS moritz: we have working tests for it
14:51 moritz FROGGS: http://perlpunks.de/paste/show/55fc2506.7e9c.2e3
14:52 FROGGS huh
14:52 FROGGS ohh, I think I know...
14:53 _itz I thought panda without args used to do --help
14:53 FROGGS moritz: this might be to blame: https://github.com/rakudo/rakudo/commit/a9407efa535f63b68033972fb83abb6fd805b59f
14:53 FROGGS _itz: install is the default no
14:53 FROGGS now*
14:54 Sqirrel joined #perl6
14:54 _itz I mean if I type "panda" it doesn't do anything which isn't helpful for a new user
14:55 FROGGS true
14:55 moritz FROGGS: I'm pretty sure this warents a bugfix release; we can't make a working star release on top of 2015.09
14:55 FROGGS _itz: easily fixable though
14:55 FROGGS moritz: :S
14:55 telex joined #perl6
14:55 FROGGS moritz: but yeah, makes sense
14:56 erxeto huh, I was thinking in say nothing. Just thought it was my mistake hehehe.
14:56 telex joined #perl6
14:56 moritz I'll rakudobug it.
14:58 moritz RT #126096
15:01 [Coke] mspo: again, are you building from a .tar.gz release of star, or from star in the github repo?
15:01 [Coke] psch: I'm sure you have something already, but here's my current jvm failures: https://gist.github.com/coke/e590a53cc4c3e2a75cfd
15:02 [Coke] S17-supply/syntax.t never exited, had to kill it, but passed 50 tests regardless.
15:04 [Coke] star in github is intended ONLY to generate the release files - it's not something anyone else should be using, even package managers. If you're doing that, you might as well bundle it yourself and not use any of the star infrastructure (which may be what you're ultimately asking here)
15:04 telex joined #perl6
15:05 psch [Coke]: your results look a bit worse, but that could just be because of a "somewhat working but often wrong" instead of "not really working at all" IntStr...
15:06 telex joined #perl6
15:06 psch i'm fairly confident that <>-handling of Ints is behind quite a lot of failures outside of S02-types/allomorphs.t
15:08 synbot6 joined #perl6
15:09 * [Coke] is hoping that stress test will be clear once spectest is.
15:10 [Coke] mspo: you can absolutely check out things in advance instead of letting Configure.pl do it for you - for example:
15:10 [Coke] https://github.com/coke/perl6-roast-data/blob/master/bin/rakudo.moar-jit.sh
15:11 [Coke] that does all the git clones -first- and then does the configure.pl so that git doesn't make a network connection during build. But again, star releases should already have this covered.
15:12 [Coke] (the repos/ dir mentioned there is a local bare checkout since I'm building a lot of things that are shared many times and only wanted to do the network fetch once)
15:14 telex joined #perl6
15:14 mspo [Coke]: from the tar.gz, maybe it does actually have everything already
15:15 mspo [Coke]: I'm not noticing any downloads despite the messages
15:15 DrForr joined #perl6
15:16 Skarsnik hm, what is the proper method to test if a Str contain only number?
15:17 PerlJam Skarsnik: depends on what you mean by "number"
15:17 * DrForr waves weakly.
15:17 [Coke] psch: with a java build, does this work for you:
15:17 _itz DrForr++
15:17 [Coke] prove -v -e t/fudgeandrun t/spec/S05-substitution/subst.t
15:17 Skarsnik only digit (no stuff like 3.000)
15:18 moritz Skarsnik: is "0xFF" a valid number for you?
15:18 Loren joined #perl6
15:18 moritz if not, probably $str ~~ / ^ <[0..9]>+ $ /
15:18 Skarsnik Not in this case, but I get the prob with this question ~~
15:18 moritz if yes, defined $str.Int
15:19 [Coke] ahh, need to make install first. bah.
15:19 PerlJam Skarsnik: I might've used $str !~~ / \D /;
15:19 ugexe what about 0002
15:19 [Coke] psch: doing a verbose run on the tests with failures.
15:21 mr_ron joined #perl6
15:21 rurban joined #perl6
15:21 rurban left #perl6
15:21 Skarsnik $str.Int crash if $str has no number ~~
15:21 TimToady Morning has broken; anyone have some glue?
15:22 mr_ron m: https://gist.github.com/ronaldxs/2ced79b6b334009af9db
15:22 camelia rakudo-moar 328a03: OUTPUT«Any case that results in a type of (Any) is broken␤(Match)␤(Any)␤(Match)␤(Any)␤(Match)␤(Any)␤»
15:22 PerlJam Skarsnik: mine returns true as long as the string does not contain any non-digits.  This will also return true for the empty string (I dunno if that's a problem for you)
15:22 DrForr No glue, but I can offer a few titanium screws.
15:23 ugexe friends dont let friends huff glue first thing in the morning
15:23 mr_ron I was trying to kebab case the URI.pm grammar and ran into trouble with character classes.  Could someone take a look at my gist?
15:24 Skarsnik for a 'if ($key.Int) {stuff} I get Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏bsname' (indicated by ⏏)
15:24 mr_ron the rfc for URI bnf is kebab case
15:24 PerlJam mr_ron: I don't think reserved2 is breakage.
15:24 TimToady DrForr!!!  You can keep your screws!!!  Did you make it home?
15:25 DrForr Sitting up in bed as I type.
15:26 TimToady at least we can offer you a sedentary occupation...
15:26 mr_ron from the synopsis "Character classes can be combined (additively or subtractively) within a single set of angle brackets. Whitespace is ignored. For example: / <[a..z] - [aeiou] + xdigit> /
15:27 mr_ron should we allow kebab case in character classes for grammars?
15:27 ugexe mr_ron: ive had that problem as well
15:27 psch phew
15:28 psch found the culprit for the IntStr breakage.  Ops.java:5995 silently binds into a native_str slot
15:28 psch [Coke]: any specific file you'd prefer me to run?
15:28 PerlJam mr_ron: Also read S05:1413
15:28 synbot6 Link: http://design.perl6.org/S05.html#line_1413
15:29 [Coke] psch: no, I figured out my damage with the prove line.
15:31 TimToady mr_ron: I think kebab case should be allowed, and we can just require space for disambiguation, as in normal code
15:31 rurban1 joined #perl6
15:32 DrForr Indeed, Amalia's rather anxious for me to get back to work, for reasons made obvious by Ovid's keynote.
15:32 jdv79 huh?
15:33 DrForr blogs.perl.org.
15:33 jdv79 is it broke?
15:33 PerlJam mr_ron: Actually, I don't think your gist is elucidating any problems with regex, but rather with your code.
15:34 DrForr Somewhat, yes. If you've been able to log in and use it over the last 6 months without several password resets, you're lucky.
15:34 PerlJam mr_ron: reserved3 matches "d" characters but you're trying to match against "ccc" and reserved suffers the same problem as reserved2
15:35 mr_ron working on fixing the example to focus on kebab case ...
15:35 pink_mist ... now I'm getting hungry
15:36 rurban joined #perl6
15:38 telex joined #perl6
15:39 mr_ron m: https://gist.github.com/ronaldxs/227c871493478ce5224e
15:39 camelia rakudo-moar 328a03: OUTPUT«(Match)␤(Match)␤(Match)␤(Match)␤Method 'delims' not found for invocant of class 'TestGrammar'␤  in regex reserved at /tmp/O46UAy0Q0q:17␤  in block <unit> at /tmp/O46UAy0Q0q:40␤␤»
15:39 PerlJam aye, that's clearly a bug
15:40 mr_ron So we do kebab case for simple scenario but combined seems to break.  Correct?
15:41 [Coke] psch: https://gist.github.com/coke/e590a53cc4c3e2a75cfd#file-verbose-out
15:42 * grondilu still gets 'JIT isn't supported on arm-linux-gnueabihf-thread-multi-64int yet.
15:42 grondilu ' on his Raspberry Pi 2
15:42 timotimo hm, would you have to --no-jit for moarvm?
15:43 timotimo we should probably just warn and build the jitless version regardlesss
15:43 psch [Coke]: what am i looking for..?
15:44 [Coke] It's just a list of specific failures, you said I had more than you did, just trying to provide more data.
15:44 Skarsnik why http::ua took me etheir 0-1 to do a http request (a simple get) or 46-47 sec ~~
15:44 _itz jit is amd64 only? I guess Configure.pl should know this
15:44 timotimo Skarsnik: perhaps it prefers ipv6 and your ipv6 connectivity isn't awesome?
15:44 psch [Coke]: oh, thanks.  i'm getting closer to fixing IntStr though, so i guess that'll change a bit anyway... :)
15:45 geekosaur Skarsnik, that delay makes me think something wonky with DNS
15:46 FROGGS moritz: I think I've got a fix
15:48 Skarsnik well, if I replace with wget call, there is no issue ~~
15:50 FROGGS timotimo: we *do* warn an keep building without jit
15:50 ugexe how big is the cookie the site you are fetching trying to get?
15:51 ugexe it uses a grammar for cookies i think... might be some backtracking going on
15:52 Ulti is there some special magic I need to do to get panda to use a web proxy? other than have the enivronment variables set
15:53 _itz Ulti: it should work
15:54 Skarsnik ugexe, there should be none. I just get on a page that return some json
15:55 ugexe is it an https proxy?
15:56 _itz no
15:56 grondilu just to be clear : it's just a warning message.  The builds goes through.  Only without JIT.
15:56 mr_ron m: grammar G { token TOP { <+ kebab-case> }; token kebab-case { <[a]> } }; G.parse('aaa');
15:56 camelia rakudo-moar 328a03: OUTPUT«Method 'case' not found for invocant of class 'G'␤  in regex TOP at /tmp/nO8n9KP_TK:1␤  in block <unit> at /tmp/nO8n9KP_TK:1␤␤»
15:57 mr_ron PerlJam: a simplified version of the bug - yes?
15:58 skids mr_ron: well golfed.
15:58 PerlJam mr_ron: indeed
16:00 Peter_R joined #perl6
16:02 telex joined #perl6
16:03 TimToady m: grammar G { token TOP { <+ :kebab-case> }; token kebab-case { <[a]> } }; G.parse('aaa');
16:03 camelia rakudo-moar 328a03: ( no output )
16:04 TimToady m: grammar G { token TOP { <+ :kebab-case> }; token kebab-case { <[a]> } }; say G.parse('aaa');
16:04 camelia rakudo-moar 328a03: OUTPUT«(Any)␤»
16:05 Skarsnik ugexe, if you are curious http://pastebin.com/GY9M25Vp
16:05 captain-adequate joined #perl6
16:06 timotimo FROGGS: oh, i thought grondilu said his build wasn't working; okay
16:07 timotimo grondilu: feel free to try to build an arm-based jit :)
16:09 telex joined #perl6
16:10 TimToady m: grammar G { token TOP { <+ :kebab-case> }; token kebab-case { <[a]> } }; say G.subparse('aaa');
16:10 camelia rakudo-moar 328a03: OUTPUT«#<failed match>␤»
16:11 TimToady m: grammar G { token TOP { <+ :kebab-case> }; token kebab-case { 'a' } }; say G.subparse('aaa');
16:11 camelia rakudo-moar 328a03: OUTPUT«#<failed match>␤»
16:12 telex joined #perl6
16:13 araujo joined #perl6
16:14 dalek nqp: 5848638 | TimToady++ | src/QRegex/P6Regex/Grammar.nqp:
16:14 dalek nqp: allow <+ mr_ron> to be <+ mr-ron> too
16:14 dalek nqp: review: https://github.com/perl6/nqp/commit/5848638c16
16:17 travis-ci joined #perl6
16:17 travis-ci NQP build failed. TimToady 'allow <+ mr_ron> to be <+ mr-ron> too'
16:17 travis-ci https://travis-ci.org/perl6/nqp/builds/81043051 https://github.com/perl6/nqp/compare/9a53b94fb4ab...5848638c16ca
16:17 travis-ci left #perl6
16:18 DrForr I need to get travis running on my builds too...
16:18 araujo joined #perl6
16:18 araujo joined #perl6
16:22 telex joined #perl6
16:24 vendethiel joined #perl6
16:25 andreoss m: grammar Y { token TOP { <num>+ % ' '  { make $/>>.made } } ; token num { \d+ { make $/.Int.sqrt } } } ; Y.parse("1 2 3").ast.perl.say;
16:25 camelia rakudo-moar 328a03: OUTPUT«()␤»
16:26 TimToady >> would work only on positionals?
16:28 Peter_R joined #perl6
16:28 TimToady m: grammar Y { token TOP { <num>+ % ' '  { make $<num>>>.made } } ; token num { \d+ { make $/.Int.sqrt } } } ; Y.parse("1 2 3").ast.perl.say;
16:28 camelia rakudo-moar 328a03: OUTPUT«[1e0, 1.4142135623731e0, 1.73205080756888e0]␤»
16:29 TimToady m: grammar Y { token TOP { <num>+ % ' '  { make $<num>».made } } ; token num { \d+ { make $/.Int.sqrt } } } ; Y.parse("1 2 3").ast.perl.say;
16:29 camelia rakudo-moar 328a03: OUTPUT«[1e0, 1.4142135623731e0, 1.73205080756888e0]␤»
16:32 araujo joined #perl6
16:33 domidumont joined #perl6
16:34 telex joined #perl6
16:35 domidumont joined #perl6
16:36 telex joined #perl6
16:36 araujo joined #perl6
16:41 andreoss >> breaks the order of elements
16:42 andreoss m: grammar Y { token TOP { <num>+ % ' '  { make $/.values>>.made } } ; token num { \d+ { make $/.Int } } } ; Y.parse("1 2 3 4 5 6").ast.perl.say;
16:42 camelia rakudo-moar 328a03: OUTPUT«(1, 2, 3, 4, 5, 6)␤»
16:43 andreoss hm
16:44 TimToady why are you using $/.values instead of just $<num>?
16:44 andreoss m: grammar Y { token TOP { [ <n> | <l> ]+ % ' '  { make $/.values>>.made } } ; token n { \d { make +$/ } } ; token l { \w { make ~$/ } }} ; Y.parse("1 a 2 b 3 c 4 d").ast.perl.say;
16:44 camelia rakudo-moar 328a03: OUTPUT«(1, 2, 3, 4, "a", "b", "c", "d")␤»
16:45 TimToady .perl sorts
16:46 telex joined #perl6
16:48 telex joined #perl6
16:50 andreoss m: grammar Y { token TOP { <norl>+ % \s  { make $/.values>>.made } } ; token norl { [ <n> | <l> ] { make ($<n>//$<l>).made } } ; token n { \d { make +$/ } } ; token l { \w { make ~$/ } }} ; Y.parse("1 a 2 b 3 c 4 d").ast.gist.say;
16:50 camelia rakudo-moar 328a03: OUTPUT«(1 a 2 b 3 c 4 d)␤»
16:50 uvtc joined #perl6
16:51 uvtc Is anyone keeping a running log of ecosystem's `wc -l META.list`?
16:52 timotimo huh, what happened to the nqp build?
16:53 TimToady I thought I proved it wasn't my patch, but let me doublecheck
16:53 timotimo oh, ok
16:53 andreoss can it be done without extra token?
16:53 PerlJam uvtc: git has a log of it if you know how to ask
16:54 TimToady yeah, was already failing before my patch
16:55 TimToady well, make test was failing, it was building fine
16:55 * timotimo tries
16:55 uvtc PerlJam: Ok, thanks. Was thinking it might be nice to have a plot of it over time (especially in time for the Christmas rush).
16:55 TimToady does travis run make test?
16:56 timotimo ah, yes
16:57 timotimo ooooh
16:57 timotimo nqp builds with MVM_SPESH_NODELAY=1 by now!
16:57 uvtc left #perl6
17:02 cognominal joined #perl6
17:04 nwc10 joined #perl6
17:06 dalek roast: 838b9c1 | TimToady++ | S05-metasyntax/charset.t:
17:06 dalek roast: check kebab-case in character classes
17:06 dalek roast: review: https://github.com/perl6/roast/commit/838b9c11ce
17:07 larion joined #perl6
17:08 araujo joined #perl6
17:10 telex joined #perl6
17:12 Peter_R joined #perl6
17:13 dalek perl6-roast-data: 7dfda69 | coke++ | / (9 files):
17:13 dalek perl6-roast-data: today (automated commit)
17:13 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/7dfda69c81
17:14 nwc10 TimToady: for me, commit 5848638c16cabe9d2e4ae288bd23796b103ea9ea breaks the NQP build.
17:14 nwc10 the compile of gen/moar/stage2/NQPP5QRegex.nqp explodes with a backtrace
17:14 nwc10 Cannot find method 'quote_escape-stopper-starter' at <unknown>:1  (./NQPHLL.moarvm:quote_atom:127)
17:15 nwc10 ...
17:18 moritz travis-ci said as much
17:27 TimToady okay, that'll need whitespace now; dunno why it didn't blow up here
17:28 telex joined #perl6
17:31 Peter_R joined #perl6
17:34 dalek nqp: a2c0550 | TimToady++ | src/HLL/Grammar.nqp:
17:34 dalek nqp: remove accidental kebab from cclass
17:34 dalek nqp: review: https://github.com/perl6/nqp/commit/a2c05500a1
17:35 japhb *yawn*
17:36 japhb So what remains of the GLR fallout?  Just JVM needing work?
17:37 japhb Anyone have a rough idea of how the ecosystem is doing?
17:37 rindolf joined #perl6
17:37 japhb Oh, I guess ++jnthn has more he wanted to add to S07.
17:38 TimToady we're still auditing various listops to see which ones should be more one-arg-y
17:38 telex joined #perl6
17:38 travis-ci joined #perl6
17:38 travis-ci NQP build passed. TimToady 'remove accidental kebab from cclass'
17:38 travis-ci https://travis-ci.org/perl6/nqp/builds/81055798 https://github.com/perl6/nqp/compare/5848638c16ca...a2c05500a1f0
17:38 travis-ci left #perl6
17:38 Peter_R joined #perl6
17:40 timotimo accident all the kebab!
17:40 nwc10 TimToady: yes, that fixes it for me.
17:41 TimToady travis said as much :P
17:41 Sqirrel joined #perl6
17:45 dalek rakudo/nom: 74420e5 | TimToady++ | tools/build/NQP_REVISION:
17:45 dalek rakudo/nom: bump NQP to get <+ mr-ron> fix
17:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/74420e5669
17:45 dalek rakudo/nom: 38846d9 | TimToady++ | tools/build/NQP_REVISION:
17:45 dalek rakudo/nom: Revert "bump NQP to get <+ mr-ron> fix"
17:45 dalek rakudo/nom:
17:45 dalek rakudo/nom: This reverts commit ad27f74e734ed7bf0e6d89c8b4f335ae035393db.
17:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/38846d93dd
17:45 dalek rakudo/nom: ff9c09f | TimToady++ | tools/build/NQP_REVISION:
17:45 dalek rakudo/nom: bump NQP to get kebab-related fixes
17:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ff9c09fa1f
17:45 [Tux] test             50000    36.936    36.856
17:45 [Tux] test-t           50000    39.453    39.373
17:45 TimToady mr_ron++
17:48 skids (or + mr-ron as the case may be)
17:49 mr_ron Thank you. rfc3986 for URI's has BNF that is all kebab case but with inexperience I coded the URI grammar with underscores.  The fix will hopefully let me fix that problem and make the grammar more like the rfc.  Hopefully coming soon.
17:50 telex joined #perl6
17:54 Peter_R joined #perl6
18:00 Peter_R joined #perl6
18:00 telex joined #perl6
18:14 Sqirrel_ joined #perl6
18:16 mr_ron m: https://gist.github.com/ronaldxs/df389180dffb7c216131
18:16 camelia rakudo-moar 328a03: OUTPUT«Method 'delims' not found for invocant of class 'TestGrammar'␤  in regex reserved at /tmp/KCUFwvw2Lx:14␤  in regex TOP at /tmp/KCUFwvw2Lx:13␤  in block <unit> at /tmp/KCUFwvw2Lx:20␤␤»
18:16 mr_ron worked on my system  at home ...
18:16 [Coke] j: use Test; is-deeply(<a>, 'a')
18:16 camelia rakudo-jvm 328a03: ( no output )
18:17 [Coke] m: use Test; is-deeply(<a>, 'a')
18:17 camelia rakudo-moar 328a03: OUTPUT«ok 1 - ␤»
18:18 telex joined #perl6
18:19 leont joined #perl6
18:19 PerlJam mr_ron: you should make a little parser that translates from the notation used in RFC3986 to Perl 6 regex
18:22 PerlJam mr_ron: oh, and it mayn't have worked here because camelia hasn't updated yet.
18:24 [Coke] p6: say nqp::p6box_n(nqp::time_n);
18:24 camelia rakudo-moar ff9c09: OUTPUT«1442600680.11175␤»
18:24 [Coke] j: say nqp::p6box_n(nqp::time_n)
18:24 camelia rakudo-jvm ff9c09: OUTPUT«===SORRY!===␤java.lang.NullPointerException␤»
18:25 [Coke] j: say nqp::time_n
18:25 camelia rakudo-jvm ff9c09: OUTPUT«===SORRY!===␤java.lang.NullPointerException␤»
18:25 [Coke] j: nqp::time_n
18:25 camelia rakudo-jvm ff9c09: OUTPUT«===SORRY!===␤java.lang.NullPointerException␤»
18:25 [Coke] "welp, there's yer problem."
18:26 dalek roast: 13af7d6 | lizmat++ | S02-types/bag.t:
18:26 dalek roast: Make S02-types/bag.t at least compile
18:26 dalek roast: review: https://github.com/perl6/roast/commit/13af7d63e5
18:26 [Coke] m: nqp::barf;
18:26 camelia rakudo-moar ff9c09: OUTPUT«===SORRY!===␤No registered operation handler for 'barf'␤»
18:27 [Coke] j: nqp::barf;
18:27 camelia rakudo-jvm ff9c09: OUTPUT«===SORRY!===␤java.lang.NullPointerException␤»
18:31 _itz is there anyway of putting constraints on slurpy parms *@a since I can't use types and ideally would like to specify "at least one" slurpy parm
18:31 dalek roast: 95a921a | TimToady++ | S02-types/bag.t:
18:31 dalek roast: don't need both flat and subsig
18:31 dalek roast: review: https://github.com/perl6/roast/commit/95a921a550
18:32 telex joined #perl6
18:37 japhb _itz: *@a where * > 0
18:37 japhb (Can be shorter, but that's one of the clearer methods)
18:39 _itz ah yes thanks
18:43 dalek rakudo/nom: 72f58f7 | FROGGS++ | src/core/CompUnitRepo (2 files):
18:43 dalek rakudo/nom: let CURLF respect :file, fixes RT #126096
18:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/72f58f764b
18:43 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126096
18:43 moritz where ?* # shorter, less clear
18:45 FROGGS umm
18:47 PerlJam can't you just make the slurpy a required parameter?
18:47 TimToady where @a
18:47 TimToady er, where +@a
18:47 TimToady er, nevermind
18:48 TimToady where ?@a is slightly clearer than ?*
18:48 telex_ joined #perl6
18:48 * TimToady misses his coffee sometimes...
18:48 PerlJam _itz: why do you want "at least one" anyway?
18:49 lizmat TimToady: can't handle coffee anymore either, found tea to be a good substitute  :-)
18:49 FROGGS m: my $module = "Test"; require ::($module)
18:49 camelia rakudo-moar ff9c09: ( no output )
18:50 FROGGS m: my $module = "Test"; require ::($module); ::("&ok")(1, "...")
18:50 camelia rakudo-moar ff9c09: OUTPUT«No such symbol '&ok'␤  in block <unit> at /tmp/5fceaqZy0W:1␤␤Actually thrown at:␤  in block <unit> at /tmp/5fceaqZy0W:1␤␤»
18:50 FROGGS m: my $module = "Test"; require ::($module); import ::($module); ::("&ok")(1, "...")
18:50 camelia rakudo-moar ff9c09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mQrangPm3S␤Could not find module ::($module) to import symbols from␤at /tmp/mQrangPm3S:1␤------> 3 require ::($module); import ::($module)7⏏5; ::("&ok")(1, "...")␤»
18:50 FROGGS m: my $module = "Test"; require ::($module); import $module; ::("&ok")(1, "...")
18:50 camelia rakudo-moar ff9c09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8NR1vyaT15␤Undeclared routine:␤    import used at line 1␤␤»
18:51 FROGGS moritz: that code here is invalid: https://github.com/perl6/DBIish/blob/master/lib/DBIish.pm6#L14
18:51 FROGGS moritz: it just happened to work by accident
18:51 moritz FROGGS: how so?
18:51 FROGGS require $foo, or require "foo" is always about a path
18:52 FROGGS require ::($foo) is about a symbol
18:52 larion joined #perl6
18:52 moritz FROGGS: since when?
18:52 moritz FROGGS: also, it makes no sense at all to me
18:53 FROGGS http://design.perl6.org/S11.html#line_345
18:53 moritz FROGGS: ::($thing) looks up a symbol; but how can we look up a symbol that hasn't been loaded yet?
18:53 dalek rakudo/nom: aed3f93 | lizmat++ | src/core/IO/Handle.pm:
18:53 dalek rakudo/nom: We don't need no nqp::not_i
18:53 dalek rakudo/nom:
18:53 dalek rakudo/nom: By rearranging the code, we made lines again a few percent faster.
18:53 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/aed3f93d5d
18:54 dalek roast: 76adbe5 | usev6++ | S32-list/minmax.t:
18:54 dalek roast: Add tests for RT #112250
18:54 dalek roast: review: https://github.com/perl6/roast/commit/76adbe5915
18:54 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=112250
18:54 FROGGS moritz: ::($foo) compiles to longname, like Foo::Bar does...
18:54 FROGGS it is not only for looking up existing symbols
18:55 _itz PerlJam: because I want usage with no args and the slurpy matches that case
18:55 telex joined #perl6
18:55 lizmat _itz: merged
18:56 FROGGS moritz: so, seems the correct code also works with the rakudo release version... my patch just makes 'require Foo:file<bar>' work
18:56 _itz lizmat: ty
18:56 telex joined #perl6
18:58 FROGGS lizmat: btw, when looking at CURLF.candidates we should consider checking for a META6.json, this would allow us to handle distribution directories with non-standard CU file paths
18:58 FROGGS or with unicode package names and another representation on disk
18:59 lizmat probably: atm I'm trying to get into a programming flow again in an area that's not as complicated as loading compunits
18:59 lizmat FROGGS: I expect to be in a flow again by next week
19:00 FROGGS lizmat: just wanted to tell somebody, in case I forget :o)
19:01 FROGGS lizmat: I'm doing it now...
19:01 PerlJam It seems weird to me that require would have a :file colonpair where in other parts of the language we would have split require into 2 parts: require Symbol;  require-path $filename;
19:02 FROGGS PerlJam: you can also do: require Symbol:file($filename)
19:02 PerlJam er, that didn't quite come out right, but I hope you know what I mean.
19:03 moritz PerlJam: you mean "different operations should have different operators"
19:03 PerlJam moritz: ding!
19:03 moritz where "loading by file name" and "loading by symbol" are different operations
19:03 moritz I always hated that require behavior in p5
19:03 FROGGS well... the symbols boils down to a file also
19:03 moritz everything boils down to bits and bytes
19:04 FROGGS hehe
19:04 moritz and yet we still distinguish Int and Str
19:04 FROGGS IntStr /o/
19:04 * psch grumbls
19:04 FROGGS :D
19:04 domidumont1 joined #perl6
19:05 PerlJam FROGGS: if we had the require/require-path of my imagination, require would just be a wrapper around require-path that knew how to translate symbols into paths.
19:07 FROGGS hmmm, I still think that these operations are too similar to not be split into several names
19:08 moritz I still find it surprising that "require Symbol" and "require $thing" treat their arguments quite differently
19:08 telex joined #perl6
19:08 moritz ah well
19:08 * moritz lets it rest
19:08 [Coke] psch: not being able to run nqp::time_n is part of the problem, did you see that?
19:09 FROGGS that is just there to allow 'require "foo/bar.pm"', which might be the common case
19:09 moritz FROGGS: it might? really?
19:09 FROGGS I think so
19:10 psch [Coke]: part of which problem?
19:10 moritz FROGGS: in p5, everytime I've used the string form of require, I had to translate to the foo/bar.pm form first
19:11 FROGGS moritz: we could change it of course, which would mean that "my" common case would either be 'require SomeSymbol:file<...>' or 'require-path ...' or so
19:11 [Coke] j: nqp::time_n
19:11 camelia rakudo-jvm ff9c09: OUTPUT«===SORRY!===␤java.lang.NullPointerException␤»
19:11 [Coke] ^^ that opcode is used in is-deeply.
19:11 [Coke] so every call to is-deeply is probably dying.
19:12 [Coke] unfortunately, that NPE is happening in such a way I can't get a p6 backtrace.
19:12 psch $ ./perl6-j -e'use nqp; say nqp::time_n()'
19:12 psch 1.44260353391E9
19:12 * psch seems to accidentally have fixed that
19:12 psch i'm runnig spectest right now, for a hopefully-actually-finally-correct getBI (and makeBI) implementation
19:13 FROGGS psch: also works on my box... that jamelia here is a bit picky
19:13 FROGGS psch++
19:13 psch FROGGS: well, it's running a pretty wonky getBI implementation right now :/
19:13 FROGGS moritz: I have no strong feelings about 'require STRING' btw, I just a feeling about changing things at this time
19:14 FROGGS :S
19:14 [Coke] psch - if you leave off the use nqp;, you get a LTA failure.
19:15 [Coke] ... so probably not the problem. golfed it too much.
19:15 psch [Coke]: i don't, i just get the deprecation message and correct say output...
19:15 FROGGS [Coke]: still works here
19:20 Possum joined #perl6
19:24 rurban joined #perl6
19:26 sufrostico joined #perl6
19:27 zakharyas joined #perl6
19:27 dalek roast: f5a77ba | usev6++ | S06-other/main-usage.t:
19:27 dalek roast: Add test for RT #119001
19:27 dalek roast: review: https://github.com/perl6/roast/commit/f5a77ba56d
19:27 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=119001
19:28 telex joined #perl6
19:35 Andrie joined #perl6
19:38 bartolin m: say 0.9999999999999999999999.perl # from RT #126016; haven't seen this one before
19:38 synbot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=126016
19:38 camelia rakudo-moar aed3f9: OUTPUT«0.A␤»
19:39 pink_mist 0_o A?
19:39 geekosaur hex?
19:39 geekosaur and o.O indeed
19:40 bartolin star-m: say 0.9999999999999999999999.perl
19:40 camelia star-m 2015.03: OUTPUT«0.10␤»
19:41 Andrie left #perl6
19:41 FROGGS joined #perl6
19:42 telex joined #perl6
19:42 ugexe FROGGS: assuming Distribution.content was implemented, it would seem this would be a CUR::* universal way to copy the data to its new location. To me it seems like a nicer way of handling it, but at the same time CURLI and CURLF would probably remain much faster just copying the files. So would a new CURLI use Distribution.content?
19:42 pink_mist is it a specific number of 9s? does it do the same with one more or one less?
19:44 psch hrm, spectest started hanging somewhere
19:44 FROGGS ugexe: dunno, different files need different treatments... thinking of bin/ lib/ and resoures
19:44 FROGGS ugexe: how would that work with .content?
19:44 psch S02-literals/allomorphics.t also dies at the second test...
19:44 ugexe yea i ran into that last night as well
19:44 psch apparently <0> and val("0") are somehow very different..?
19:44 psch i'm gonna let this sit for the night o/
19:45 ugexe although anything in lib/ that was in `provides` would be accessable
19:45 FROGGS sleep val, psch++
19:45 oskie joined #perl6
19:45 * FROGGS hides
19:45 oskie when using rakudo, are "intermediate" files stored on disk somewhere? or just in memory when you "run" a perl6 program?
19:46 dalek DBIish: 08d218e | moritz++ | lib/DBIish.pm6:
19:46 dalek DBIish: Fix "require" syntax.
19:46 dalek DBIish:
19:46 dalek DBIish: FROGGS++.
19:46 dalek DBIish: Closes #19
19:46 dalek DBIish: review: https://github.com/perl6/DBIish/commit/08d218e36d
19:46 flussence there aren't intermediate files, at least currently
19:46 moritz oskie: just in memory, unless you you explicitly precompile
19:46 PerlJam oskie: why do you ask?
19:47 bartolin pink_mist: looks like rounding starts with twenty 9's after decimal dot.
19:47 flussence (if it generated disk files on the fly, the first place I'd look is in $XDG_CACHE_DIR...)
19:47 oskie i ask only to try to learn stuff. it's confusing, compilers, intermediate formats, VMs, etc
19:48 flussence you can ignore all that stuff for the time being, the stuff you can view in a text editor is WYSIWYG
19:48 ugexe also RESOURCES would be available to Distribution.content as they are supposed to be in the meta
19:48 flussence (it used to precompile, but that was removed for a rewrite and hasn't been put back)
19:48 ugexe bin/ and hooks/ were the 2 i could not determine how to handle
19:49 oskie ok. also i'm curious what it takes to distribute and run perl6 programs to a set of servers (at the moment all my server admin code at work is written in perl5 or bash)
19:49 nwc10 left #perl6
19:50 flussence that's easy, same as p5. -I and "use lib" work exactly the same way if you need to run unpackaged modules
19:51 [Coke] depending on your server OS, there might be a packaged version. more likely for that to happen after christmas.
19:51 oskie sounds good, and the only prerequisitve will be 'apt-get install rakudo' i guess (debian or ubuntu)
19:52 telex joined #perl6
19:52 jdv79 so is the release coke did the beta?
19:52 dalek rakudo/nom: 719a90f | FROGGS++ | src/core/CompUnitRepo/Local/File.pm:
19:52 dalek rakudo/nom: handle META6.json files in CURLF
19:52 dalek rakudo/nom:
19:52 dalek rakudo/nom: That means we finally can have full unicode package names put into the META6.json
19:52 dalek rakudo/nom: in the provides section, but let that entry point to a file containing e.g. ASCII
19:52 dalek rakudo/nom: characters only. If one does -I/directory where the META6.json is in there, the
19:52 dalek rakudo/nom: mapping of package names to file paths will work out.
19:52 dalek rakudo/nom: This does not affect the current way of including -I/directory/lib directly, as
19:52 dalek rakudo/nom: this will not know about a META6.json.
19:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/719a90f3f6
19:52 PerlJam Why is is_approx() still in Test.pm?  I would have thought it deprecated in favor of is-approx().
19:53 [Coke] probably missed.
19:53 FROGGS ugexe: we need to install the wrappers of the stuff in bin/ as we currently do in CURLI
19:53 [Coke] everything else was kebab'd.
19:53 flussence FROGGS: that commit... does that mean I can prove -e perl6 instead of prove -e 'perl6 -Ilib' now?
19:54 PerlJam There is an is-approx too, but there's also is_approx (with no deprecation notice)
19:54 jdv79 [Coke]: ?
19:54 FROGGS flussence: if there is an implicit -I.
19:55 FROGGS flussence: but there is not, is there?
19:55 ugexe FROGGS: yea but the origin bin/ scripts are not required to be mapped in the meta file is what i mean, so .content would not be able to access those
19:55 PerlJam jdv79: The release Coke did is just another monthly release but with the GLR done.  I don't know what you mean by "beta"
19:55 flussence I'll try it now, just to see what happens :)
19:55 FROGGS ugexe: what if you want to shell out to the scripts of your dist? then you'd need its actual path
19:56 jdv79 its near TimToady's bday is it not?
19:56 FROGGS jdv79: the RC0 you are talking about is about Perl 6 the language... not rakudo the compiler
19:56 mst jdv79: hard to tell - we know what date it is but unlike perl6 he hasn't yet announced which year
19:57 FROGGS jdv79: so if you see a release of roast, then that's The Release™
19:57 FROGGS though, both go kinda hand in hand
19:58 FROGGS mst: he said, "2015, most likely, maybe", or some such :o)
19:58 FROGGS unless, you know, stuff like buses happen
19:58 mst FROGGS: that was about perl6
19:58 mst FROGGS: it's TimToady's birthday I'm talking about :)
19:58 mst (helps if you read the line I'm replying to)
19:59 FROGGS mst: well, I know as much as that his birthay will also happen this year :o)
19:59 ugexe i mean for installation. right now it copies the files, but .content would let you steam it to a new file (but the end result is the same). So some cloud based CUR that can't use copy() could still access the files of bin/ or whatever
19:59 mst FROGGS: suuure, people keep saying that, but until he confirms it I don't believe you
19:59 FROGGS mst: and I still think it can only be about both, you can't release a language without an implementation and vice versa
19:59 mst what?
20:00 mst larry's birthday is neither a language nor an implementation
20:00 mst I don't understand what you're trying to tell me
20:00 jdv79 anyway...  thanks.
20:00 bartolin PerlJam: (is-approx) I don't know about details, but I vaguely remembered this commit: https://github.com/rakudo/rakudo/commit/e83b6020ca One day ago lizmat++ made a note about a better version of is_approx: irclog.perlgeek.de/perl6/2015-06-10#i_10731692
20:00 FROGGS mst: ohh, both meant 'compiler and language spec'
20:00 mst FROGGS: yeah, but I wasn't addressing either of those :D
20:01 FROGGS mst: ahh :o)
20:01 PerlJam FROGGS: Perl 5 was released without a language spec many many many times  :)
20:01 [Coke] so, this compiler release might be considered as 1/2 of that. I don't think we've chatted about how we're going to "cut" a spec.
20:01 mst FROGGS: all I was doing was making a joke in response to < jdv79> its near TimToady's bday is it not?
20:02 [Coke] not taking the spec into account, we hopefully will just be improving and not making any huge incompatible changes for the remainder of the year.
20:02 mst FROGGS: that's why I suggested you went back and read the line I was replying to :D
20:02 PerlJam mst: confusion is hard to excise once it digs in.
20:02 telex joined #perl6
20:02 masak way I understand it, "releasing" the spec would mean making a snapshot of the spectests we believe are solid enough to deserve to specify the language.
20:03 mst PerlJam: I'm probably going to need to take off and nuke the joke from orbit
20:03 FROGGS the way I understand it, mst is just joking about TimToady's bday :o)
20:03 [Coke] masak: the problem with that is that there are on the order of 100K individual tests, and we have no plan on how we're going to mark them.
20:04 PerlJam [Coke]++ I was just typing something like that
20:04 [Coke] (well, there's some syntax for that. but then do we do a prune based on that... in repo? out of repo? still unanswered questions there.)
20:04 telex joined #perl6
20:04 masak oh, I agree there are unanswered questions and that this hasn't been discussed/planned enough.
20:05 [Coke] can we just say "this whole file as of right now is 6.Acme"? test by test...
20:05 FROGGS [Coke]: we already can add fudge markers telling that tests meet a certain Perl 6 version or are conjectural
20:05 FROGGS [Coke]: yes
20:05 FROGGS [Coke]: test by test at leastrr
20:05 FROGGS -rr
20:06 FROGGS [Coke]: https://github.com/perl6/roast/blob/master/fudge#L86
20:08 araujo_ joined #perl6
20:08 PerlJam There's still a piece missing where we can link features to Perl6 langauge versions in the compiler for those inevitable future "use v6.christmas;"
20:09 FROGGS PerlJam: let's just not add features that can ever break existing code :o)
20:09 * PerlJam mumbles something about history and doom
20:10 [Coke] FROGGS: right, we have the syntax and can mark things... but no plan around it, is what i'm saying.
20:10 FROGGS [Coke]: and no attempt at developing a plan, sadly
20:10 [Coke] well, plan A: Make larry do it, it's his language.
20:11 [Coke] ... that won't fly, so let's add jnthn, since he's clever.
20:11 [Coke] after that my plan kind of peters out. What's the 3rd approximation? ;)
20:11 FROGGS [Coke]: I was hoping that either pmichaud or TimToady would give a statement about these markers, or like, play with it in a roest file
20:11 FROGGS roast*
20:11 Ulti I cant tell if its real or not but panda feels a *lot* faster than it used to be
20:12 FROGGS Ulti: also feels faster to me, fwiw
20:12 Ulti tadzik++ and everyone doing the GLR and IO optimisations I guess
20:12 flussence it got a faster JSON thing, that probably helped a bit
20:12 * PerlJam &
20:12 FROGGS Ulti: ohh, maybe that also because it does not precompile anymore?
20:12 Ulti ahhh yeah JSON::Fast
20:13 Ulti hah so actually its just a big cheater
20:13 Ulti doing less
20:13 FROGGS aye
20:13 FROGGS :o)
20:13 FROGGS that's how you do it
20:13 FROGGS my wife won't let me though :o(
20:14 Ulti what cheat or do less :P
20:14 telex joined #perl6
20:14 rurban joined #perl6
20:14 Ulti either way its nice to be able to suck down some modules quickly
20:15 Ulti Linenoise is definately doing some compiling though and that was still a lot faster
20:15 Ulti like the compiling bit was the slow part for a change
20:15 FROGGS Ulti: doing less :o)
20:17 * [Coke] ponders pursuing a CS/IT related masters, and wonders how to tie that to p6.
20:19 Ulti [Coke] do you mean into language dev or just using P6?
20:20 jdv79 [Coke]: why?
20:24 telex joined #perl6
20:26 telex joined #perl6
20:30 flussence does anyone know the correct procedure to manually precomp installed modules? I tried `perl6 --target=mbc --output=Linenoise.moarvm Linenoise.pm` and get a 1.5MB file from it, but the repl still takes 4 seconds to start up.
20:31 timotimo oh hey Ulti
20:31 timotimo were you the one who recently-ish built some code to find prime numbers?
20:32 lea joined #perl6
20:33 prammer Hello all
20:33 sufrostico joined #perl6
20:33 prammer I'm reading S07, about the single argument rule
20:33 prammer and how "for @a, { }" is a single iteration
20:33 prammer Part me wants the next line to say that "for @a {}" is @a.elems iterations
20:33 masak m: my @a = 1, 2, 3; for @a, { .say }
20:33 camelia rakudo-moar 719a90: OUTPUT«5===SORRY!5===␤Expression needs parens to avoid gobbling block␤at /tmp/VZkh18RdPj:1␤------> 3my @a = 1, 2, 3; for @a, { .say }7⏏5<EOL>␤Missing block (apparently taken by expression)␤at /tmp/VZkh18RdPj:1␤------> 3my @a = 1, 2, 3; for …»
20:34 masak prammer: that seems to need parens
20:34 masak m: my @a = 1, 2, 3; for (@a,) { .say }
20:34 camelia rakudo-moar 719a90: OUTPUT«[1 2 3]␤»
20:34 masak m: my @a = 1, 2, 3; for @a { .say }
20:34 camelia rakudo-moar 719a90: OUTPUT«1␤2␤3␤»
20:34 prammer masak: so it does.  it's in S07 though
20:36 prammer perhaps S07 should say for (@a,) and right after that show for (@a) and/or for @a
20:36 telex joined #perl6
20:36 eternaleye joined #perl6
20:36 prammer just what came to mind when reading it
20:39 masak yes, if that's in S07, then it should be changed.
20:41 flussence oh and fwiw, "prove -e perl6" in a properly packaged module's dir without -Ilib does indeed work now
20:43 masak wow, cool
20:43 masak what does the "properly packaged module" expand to in terms of individual steps?
20:44 pink_mist presumably a properly populated META6.json?
20:44 flussence yep, just that.
20:44 flussence (mv'ing it makes the command stop working right away)
20:45 flussence (editing it to have wrong paths does the same too, so it's definitely being read)
20:46 telex joined #perl6
20:47 TimToady http://rosettacode.org/wiki/Mad_Libs#Perl_6 is kind of amazingly short
20:50 timbunce joined #perl6
20:50 [Coke] jdv79: why what?
20:52 telex joined #perl6
20:53 jdv79 just curious why do you want to do a masters.
20:53 _itz https://www.youtube.com/watch?v=07KHwjebf7k
20:54 telex joined #perl6
20:54 * [Coke] wants to learn, which he can do on his own, but also wants to further his career.
20:55 masak [Coke]: I'm pretty sure there is some masters topic that would benefit both you, academia, and Perl 6
20:56 masak [Coke]: Perl 6's particular brand of grammars comes to mind
20:56 vendethiel TimToady: why %. (the dot)?
20:56 Skarsnik Hm, I try to get the attribute list of a class. How I can do that without creating an object of the class? Metamodel::className::attributes?
20:56 dalek roast: 1cd6d48 | skids++ | S06- (3 files):
20:56 dalek roast: Add tests for anonymous capture with subsig and/or post-constraint
20:56 dalek roast: review: https://github.com/perl6/roast/commit/1cd6d48401
20:56 vendethiel m: class A { has $.a; };say A.^attributes;
20:56 camelia rakudo-moar 719a90: OUTPUT«(Mu $!a)␤»
20:56 timotimo you could do a great contribution to macadamia!
20:56 vendethiel Skarsnik: ^^ ?
20:57 timotimo Skarsnik: perl 6 has a pretty interesting thing called "the type object"
20:57 Skarsnik Oooh thanks
20:57 timotimo where the type itself is an object that stands in for the type
20:57 vendethiel m: say %{5}
20:57 camelia rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AJvlsilohq␤Unsupported use of %{5}; in Perl 6 please use %4␤at /tmp/AJvlsilohq:1␤------> 3say %{5}7⏏5<EOL>␤»
20:57 jdv79 i was looking for some gem of a reason that might help motivate me to finish a bachelors;)  as time goes on it seems less intetesting.  mostly.
20:57 vendethiel m: say %.{5}
20:57 camelia rakudo-moar 719a90: OUTPUT«(Any)␤»
20:58 vendethiel ok, I see why now. TimToady++
20:58 masak m: say %{$0}
20:58 camelia rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/idb1uR0MAV␤Unsupported use of %{$0}; in Perl 6 please use %($0)␤at /tmp/idb1uR0MAV:1␤------> 3say %{$0}7⏏5<EOL>␤»
20:58 masak vendethiel: there's basically an over-eager warning in the way :)
20:58 * vendethiel doesn't like those that much, as a non-fiver
20:58 masak s/warning/parse error/
20:59 vendethiel but that solution is *really* cute
20:59 TimToady especially compared to all the others
20:59 vendethiel TimToady: just a question, why doesn't the Perl5 version use <>?
21:00 TimToady don't ask me
21:00 vendethiel ..but it could, right? I'm just trying to figure that out
21:01 telex joined #perl6
21:02 telex joined #perl6
21:11 vendethiel TimToady: I'm now using this one-liner so scare people in :D
21:14 Skarsnik ok, another probably dumb question, how I get the type of an attribute? (when defined)
21:16 vendethiel m: class A { has $.a; };say A.^attributes[0].WHAT;
21:16 camelia rakudo-moar 719a90: OUTPUT«(Attribute)␤»
21:17 vendethiel Skarsnik: when I see that, I go look at https://github.com/rakudo/rakudo/blob/nom/src/core/Attribute.pm
21:17 vendethiel and see there's a $!type
21:18 Skarsnik Oh, there is a WHAT method. I was looking at http://doc.perl6.org/type/Attribute
21:18 ugexe and .^name, but i forget what the slight difference is between that and .WHAT
21:19 Skarsnik Oh yeah, could have use ^name on it ~~
21:22 telex joined #perl6
21:26 dalek roast: d375959 | usev6++ | S32-array/ (2 files):
21:26 dalek roast: Replace eval-dies-ok with throws-like (EVAL form) for some tests
21:26 dalek roast: review: https://github.com/perl6/roast/commit/d375959038
21:27 CurtisPoe joined #perl6
21:28 CurtisPoe p6: my Rat $foo = 3
21:28 camelia rakudo-moar 719a90: OUTPUT«Type check failed in assignment to '$foo'; expected 'Rat' but got 'Int'␤  in block <unit> at /tmp/tmpfile:1␤␤»
21:28 CurtisPoe Can someone remind me why Ints aren't automatically promoted to Rats here?
21:30 TimToady m: my Rat() $foo = 3
21:30 camelia rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aI7lcTiuMT␤Coercion Rat(Any) is insufficiently type-like to qualify a variable␤at /tmp/aI7lcTiuMT:1␤------> 3my Rat() $foo7⏏5 = 3␤    expecting any of:␤        constraint␤»
21:30 Skarsnik I wonder if there is already a module that do what I am writing (creating a table in a sqlthing from the class definition)
21:30 pink_mist you mean ... an ORM?
21:30 bartolin m: my @pop = 1 .. 5; @pop.pop = 7; say "alive" # should this die? S32-array/pop.t assumes that
21:30 camelia rakudo-moar 719a90: OUTPUT«alive␤»
21:33 mr_ron joined #perl6
21:36 telex joined #perl6
21:37 masak CurtisPoe: because when you opt into typechecking, that means something. if you don't want that, you don't want to declare a type.
21:38 masak a Rat is not a kind of Int in any meaningful way.
21:38 CurtisPoe masak: 3/1 is a Rat.
21:38 masak right. and 3 isn't.
21:39 masak m: my Rat $foo = 3/1; say "alive"
21:39 camelia rakudo-moar 719a90: OUTPUT«alive␤»
21:39 CurtisPoe p6: say 3 == 3/1
21:39 camelia rakudo-moar 719a90: OUTPUT«True␤»
21:39 masak numeric equality has little to do with types.
21:39 Skarsnik pink_mist, yes, well I am just writing the thing to create the db. but a quick look on the modules list did not give something like a orm
21:40 masak m: say 3 eq "3"
21:40 camelia rakudo-moar 719a90: OUTPUT«True␤»
21:40 masak you wouldn't expect `my Int $foo = "3"` to work....
21:41 Skarsnik is there a pragma to force this to fail?
21:41 bartolin m: my Rat $foo = 3.Rat; say $foo.nude
21:41 camelia rakudo-moar 719a90: OUTPUT«(3 1)␤»
21:41 CurtisPoe masak: mathematically, all of us know that .1 + .2 - .3 equals 0 and Perl 6 agrees that it is. Mathematically, all of us know that 3 equals 3/1, and perl 6 agrees that it is. Perl 6 tries hard to do the right thing by the developer, but here it fails hard.
21:41 masak CurtisPoe: it fails because you promised to give it one type, and gave it another.
21:41 masak CurtisPoe: what's funny is that I argued your side about 6 years ago :)
21:41 CurtisPoe Since we *know* that 3/1 and 3 are the same thing, why can't Perl 6 apply this evenly? What's the downside?
21:42 masak CurtisPoe: and moritz++ argued my side. he eventually convinced me.
21:42 masak CurtisPoe: if you don't want the strict typechecking, why are you declaring the strict type?
21:42 masak you're being inconsistent, and blaming Perl 6 for a stricture you *asked for*.
21:42 CurtisPoe I'm hitting cases in my new Perl 6 for Mere Mortals talk where I tell people how wonderful Rats are and then fall back to Reals in my slides because otherwise I have to keep telling people "the computer doesn't understand intergers here/
21:42 CurtisPoe s/intergers/integers/
21:43 CurtisPoe It's an embarrassment.
21:43 masak it's not an embarrassment to have a consistent type system.
21:43 CurtisPoe Actually, like in many languages when programmers argue that 7/2 must equal 3 because integer/op/integer must give an integer when we clearly know that's not true.
21:44 masak this feels like the opposite of that.
21:44 CurtisPoe Please tell me the downside of saying "my Rat $foo = 3" so I can explain it to a skeptical audience of people who aren't Perl devs.
21:44 masak you asked for a Rat, and gave yourself an Int. Perl 6 complained. now you're unsatisfied with that.
21:44 lizmat m: my Int $foo = "3"; say $foo
21:44 camelia rakudo-moar 719a90: OUTPUT«Type check failed in assignment to '$foo'; expected 'Int' but got 'Str'␤  in block <unit> at /tmp/9B0CbFg0_p:1␤␤»
21:44 lizmat m: my Int $foo = <3>; say $foo
21:44 camelia rakudo-moar 719a90: OUTPUT«3␤»
21:45 masak we've been down the road of implicit coercion, and rejected it every time.
21:45 masak it sounds like a great idea, but it's a bad idea.
21:45 CurtisPoe Why?
21:45 CurtisPoe Here we
21:45 masak it introduces laxity which directly or indirectly causes logical errors in the code.
21:45 lizmat m: my Rat $a = <3>
21:45 camelia rakudo-moar 719a90: OUTPUT«Type check failed in assignment to '$a'; expected 'Rat' but got 'IntStr'␤  in block <unit> at /tmp/Suokno2cOD:1␤␤»
21:45 CurtisPoe Here we're now exposing computer/compiler limitations when much of the talk is about how Perl 6 solves human problems, not computer ones. And then there's this ...
21:46 Skarsnik IntStr fun type x)
21:46 telex joined #perl6
21:46 masak CurtisPoe: 3 is an Int. Int !~~ Rat. you're getting the type error because you're trying to feed the 3 value to the Rat type.
21:47 masak CurtisPoe: if you don't want the type error, you need to either (a) coerce, or (b) fix the value to be a Rat, like 3/1.
21:47 CurtisPoe You're exposing a compiler limitation? You keep saying this is good, but you haven't explained why.
21:47 masak I don't call it a compiler limitation. I call it a consistent type system.
21:48 vendethiel m: say Int ~~ Rat; # *g*
21:48 camelia rakudo-moar 719a90: OUTPUT«False␤»
21:48 masak you're asking to make the type system guess more, thus making it less good at its job: catching type errors.
21:49 CurtisPoe It's counter-intuitive. You said yourself that you argued against it. In this case, we know mathematically that every Int in existence is equivalent to the Rat $int/1. There is no problem with promoting the type.
21:49 masak from a design perspective, yes, I've raged against the way things are factored just as you do now. but I'm basically not unhappy about it anymore.
21:49 masak it really does come down to having the right expecations of the type system.
21:50 masak if you don't want it to give you an error there, you should take a step back and think about what it is you want to check for.
21:50 CurtisPoe Again, please explain how promoting something to a GUARANTEED equivalent value is a problem.
21:50 CurtisPoe Int/1 == Int (every time).
21:51 masak you're arguing from mathematical intuition, which is fine.
21:51 masak but in Perl 6, for better or worse, Int !~~ Rat
21:51 CurtisPoe At OSCON, I'm going to be dealing with an already skeptical (possibly hostile) audience and I don't want to say "because #perl6 said type theory"
21:51 vendethiel I just noticed how much c# is cheating there: http://rosettacode.org/wiki/Mad_Libs#C.23
21:51 masak first off, I don't speak for #perl6 :)
21:51 vendethiel on another news, recent chrome update broke # -_-""
21:52 CurtisPoe That's fair enough, but Perl 6 seems to be very deeply wrong on this one :)
21:52 vendethiel (i mean, i'm sure it's only for my french keyboard and alt gre, but seriously, grrrr)
21:52 masak second, am I understaing you correct that you are asking for a special case of Int literal -> Rat type promotion in Rakudo?
21:52 Skarsnik m: my Int a = 2; my Str b = "5"; say $a +$b;
21:52 camelia rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bbpYxr53St␤Malformed my (did you mean to declare a sigilless \a or $a?)␤at /tmp/bbpYxr53St:1␤------> 3my Int a7⏏5 = 2; my Str b = "5"; say $a +$b;␤»
21:52 Skarsnik m: my Int a = 2; my Str $b = "5"; say $a +$b;
21:52 camelia rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CtXaQU6T76␤Malformed my (did you mean to declare a sigilless \a or $a?)␤at /tmp/CtXaQU6T76:1␤------> 3my Int a7⏏5 = 2; my Str $b = "5"; say $a +$b;␤»
21:53 * vendethiel has not much against implicit conversions that are totally guaranteed to be non-lossy, and that'd require stuff like "integer suffixes/prefixes", etc
21:53 masak CurtisPoe: what about Int variable -> Rat type promotion?
21:53 pink_mist Skarsnik: $a, not a
21:53 Skarsnik I sucks
21:53 Skarsnik m: my Int $a = 2; my Str $b = "5"; say $a +$b;
21:53 camelia rakudo-moar 719a90: OUTPUT«7␤»
21:53 CurtisPoe I'm not going to argue that strings and numbers should share operators.
21:53 Skarsnik why does that work?
21:53 masak CurtisPoe: that was a bit of a non sequitur answer, but OK.
21:54 masak CurtisPoe: I'm trying to map out the structure of your feature request here.
21:54 CurtisPoe Skarsnik: well, that's awkward. It looks like Perl 6 is coercing a Str to an Int, which isn't safe, but won't promote an Int to a Rat, which is.
21:54 vendethiel does it?
21:54 vendethiel m: my Int $a = "123";
21:54 camelia rakudo-moar 719a90: OUTPUT«Type check failed in assignment to '$a'; expected 'Int' but got 'Str'␤  in block <unit> at /tmp/24KrD7ej1E:1␤␤»
21:54 vendethiel doesn't seem like it does..
21:55 masak of course infix:<+> coerces to numeric.
21:55 CurtisPoe vendethial: look at Skarnik's example.
21:55 Skarsnik why of course?
21:55 masak but it's safe, in that it *dies* if the string is not a number.
21:55 masak Skarsnik: because Perl.
21:55 masak Skarsnik: that's how Perl operators work. always did.
21:55 vendethiel CurtisPoe: you know, it's that much easier with <tab>, and it removes the possibility of mistakes :P
21:55 vendethiel (i'm talking about name completion
21:55 vendethiel )
21:55 masak Skarsnik: there's infix:<+> for numeric addition, and infix:<~> for string concat.
21:55 CurtisPoe masak: Ah, I see. That still appears troublesome to me. So Perl 6 is trying to DWIM on a possibly unsafe operations, but not on the safe ones.
21:56 masak Skarsnik: Perl operators are defined by working on a particular type, or range of types.
21:56 masak CurtisPoe: there's a crucial difference.
21:56 telex joined #perl6
21:56 Skarsnik yes, but how to force perl6 to not allow to write this?
21:56 * vendethiel doesn't believe that much in DWIM, and thinks "$a == @b" will surprise and bite a lot of people, but at least when you read it, you know it smells weird
21:56 masak CurtisPoe: assignment isn't magical in the way infix:<+> is magical. assignment just tries to assign.
21:56 masak CurtisPoe: one reason assignment wants/needs to be very non-magical is performance.
21:57 Skarsnik for me the type system is pretty pointless if you have to know where there is so 'magic' that occur at run time
21:57 flussence it's a lot easier to add typecasts where needed than to parse user input.
21:57 masak CurtisPoe: if we overload it with all kinds of coercing magic, then that might affect the performance of all of Perl 6. (maybe. I'm no expect.)
21:57 masak expert*
21:57 CurtisPoe masak: ok, I won't argue that. I'm just asking for ANY counter-example which shows why assuming the known mathematical fact that Int/1 == Int would be a problem.
21:57 CurtisPoe I'm only asking for the one, obvious change that is going to byte (sic) developers: the common case where Int/1 == Int.
21:58 masak CurtisPoe: I could see it happening. unlikely but possible. that's why I started asking about what exactly it is you're expecting.
21:58 masak CurtisPoe: but I do think it sets a bad precedent.
21:58 vendethiel also, Perl6 cheats WRT its type system in a few places already :)
21:58 masak CurtisPoe: the problem is still that you have an expectation about the relation between Rat and Int which doesn't hold in Perl 6.
21:58 CurtisPoe And then I could avoid a very awkward line of questioning in my talk, or start rewriting my slides to (dishonestly) avoid awkward questions.
21:58 vendethiel and int vs Int or num vs Num is very hard to argue about when you value "mathematical purity"
21:59 masak CurtisPoe: I could imagine TimToady popping in at any moment and saying "sure, we could give you that kind of magic, no prob!"
21:59 masak CurtisPoe: but I could also imagine jnthn popping in and saying "that would *kill* performance"
21:59 CurtisPoe masak: I realize my expectation is different, I'm merely asking for ANY counter-example, anywhere, for anything, which would show why a known mathematical fact is problematic.
21:59 CurtisPoe First make it right, then make it fast :)
21:59 masak CurtisPoe: I think it's a bad precedent to introduce exceptions in the type system.
22:00 leont CurtisPoe: my real question would be: why declare types explicitly there?
22:00 masak CurtisPoe: the fact remains that Int !~~ Rat.
22:00 leont IME, it's rarely (though occasionally) useful for lexicals to be types, but not that often
22:00 vendethiel masak: the type system already has exceptions
22:00 vendethiel that'd not be a precedent
22:00 leont s/types/typed/
22:00 lizmat I wonder if the typecheck exception couldn't be catchable, and allow for ad-hoc coercion on the fly
22:00 masak vendethiel: and, IIRC, jnthn has argued against most of them.
22:00 CurtisPoe Int !~~ Rat only in the case of how the type system is defined. In reality, Int/1 always equals Int.
22:00 vendethiel m: my int $a = 1; my Int $a = 1;  # that's the kind of thing that Just Works, expectedly
22:00 camelia rakudo-moar 719a90: OUTPUT«Potential difficulties:␤    Redeclaration of symbol $a␤    at /tmp/uzcuXa3nmX:1␤    ------> 3my int $a = 1; my Int $a7⏏5 = 1;  # that's the kind of thing that J␤Cannot assign to an immutable value␤  in block <unit> at /tmp/uzcuXa3nmX:1␤␤»
22:01 vendethiel masak: then he must've argued against Failure, etc, right?
22:01 vendethiel (I honestly don't know)
22:01 masak vendethiel: yes, I think so.
22:01 leont CurtisPoe: you could define your own subtype that DWIMs, I think
22:01 vendethiel nice. I'm happy to know I'm not the only one :-)
22:01 masak m: my Rat() $foo = 3 # CurtisPoe: why don't you like this solution?
22:01 camelia rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LaopcHHRyd␤Coercion Rat(Any) is insufficiently type-like to qualify a variable␤at /tmp/LaopcHHRyd:1␤------> 3my Rat() $foo7⏏5 = 3 # CurtisPoe: why don't you like thi␤    expecting any of:␤      …»
22:01 masak er.
22:01 CurtisPoe leont: not a solution when I'm trying to tell non-Perl devs about how easy and natural Perl 6 is :)
22:01 masak what...?
22:02 * vendethiel also had to introduce () in his talk about MAIN, and felt somewhat "dirty" (er..) about it
22:02 vendethiel feels like it's a feature you shouldn't be introduced to there, for that
22:02 CurtisPoe masak: even if that worked, that would be a special case of gradual typing that would look just weird.
22:02 Skarsnik For me it's really sad to have type when most of the time it feel like it something pointless ~~
22:03 masak CurtisPoe: it's saying "I know this isn't a Rat, but please do the last step of coercing it to one for me"
22:03 masak CurtisPoe: which is *exactly* what you're asking for here, but explicitly in code instead of magic in the implementation.
22:03 CurtisPoe I'm trying to show people that Perl 6 is *easy* and my Rat $foo = 3 defeats my argument.
22:03 vendethiel Skarsnik: it doesn't to some of us :)
22:04 leont «my Rat $foo = 3» still doesn't look like sensible code to me
22:04 vendethiel m: say 3.Rat.perl
22:04 camelia rakudo-moar 719a90: OUTPUT«3.0␤»
22:04 leont I mean, what does that type give you?
22:04 vendethiel m: my Rat $a = 3.0; # o//
22:04 camelia rakudo-moar 719a90: ( no output )
22:04 vendethiel CurtisPoe: apparently, you can just add .0 as a workaround =P
22:05 CurtisPoe vendethiel: that's the problem. I don't want a workaround. I want it to work :)
22:05 masak CurtisPoe: "I'm trying to show people that Perl 6 is *easy* and <misunderstanding of the type system> defeats my argument" is not convincing from my point of view
22:06 vendethiel CurtisPoe: sorry, they actually managed to convince me that 3 is an Int, not a Rat
22:06 CurtisPoe Again, can anyone point to ANY counter-example, ANY, which shows why that's a problem?
22:06 masak CurtisPoe: the more you argue your position, the more I want to *protect* the Perl 6 type system from random tampering.
22:06 vendethiel well, if the solution were to be "integer {pre,suf}fix", I'd take auto-promotion anyday
22:06 masak CurtisPoe: you have an itch to scratch, and you want to go so far as to weaken the type system for it, not accepting any compromise along the way.
22:07 CurtisPoe Especially since Int/1 is guaranteed to be correct.
22:07 lizmat my $a Rat() = 3   # CurtisPoe: would that work for you ?
22:07 CurtisPoe How is that weakening the type system?
22:07 masak you're wanting to introduce an exception to the strict type error you're getting.
22:07 masak an error which is *correct*.
22:07 CurtisPoe Again, I'm willing to accept ANY counter-example of why that would be bad.
22:07 masak because it would set a bad precedent to weakening the type system.
22:08 lizmat CurtisPoe: type checking is done at a *very* low level, it is actually written in C for each backend
22:08 telex joined #perl6
22:08 lizmat because it is a very hot path
22:08 CurtisPoe It's not weakening it. 3/1 == 3 mathematically. There are no exceptions.
22:08 lizmat this is why at least jnthn would be against fixing it at *that* level
22:08 CurtisPoe If it's a performance hack, I could maybe present that, but that opens up another can of worms.
22:09 CurtisPoe OK, I have to hit the hay. Sorry for being a pain :)
22:09 lizmat m: say Int ~~ Real; say Int ~~ Rat   # the latter shows the problem
22:09 camelia rakudo-moar 719a90: OUTPUT«True␤False␤»
22:09 vendethiel masak: I strongly disagree with "precedent" though. How isn't Failure the precedent of weakened type system? The question isn't about whether it's good or not, it's just there
22:09 vendethiel (at least for now)
22:09 masak no problem. I'm happy to have this discussion again, six years later, from the other side ;)
22:10 flussence I'm not sure what one could usefully do with an Int/1 that can't also be done with an Int.
22:10 telex joined #perl6
22:10 flussence += ?
22:10 masak I think the failure mode/surprise with that would be when people did `my Int $foo = 3/1` and *that* failed.
22:11 lizmat m: use nqp; say nqp::istype(Int,Rat); say nqp::istype(Int,Real)  # the lower level version
22:11 camelia rakudo-moar 719a90: OUTPUT«0␤1␤»
22:11 masak lizmat++ # arguing from hot paths and low-level implementation
22:11 masak vendethiel: you're right, of course.
22:11 masak vendethiel: still, it makes sense to not worsen the damage and introduce more exceptions and corner cases.
22:11 lizmat FWIW, I agree with CurtisPoe that it is a WAT
22:11 masak oh, me too
22:12 masak it is.
22:12 masak but it's at least an instructive one.
22:12 vendethiel masak: that's all I was arguing about! maybe I'm gonna argue about removing Failure one day :P
22:12 masak "you said you wanted a Rat there, but then you provided an Int. what's up with that? do you want types or not?"
22:12 lizmat m: my Rat() $a = 42   # why doesn't this work, is this an LTA error for a NYI feature ?
22:12 camelia rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yhDNrNuVUL␤Coercion Rat(Any) is insufficiently type-like to qualify a variable␤at /tmp/yhDNrNuVUL:1␤------> 3my Rat() $a7⏏5 = 42   # why doesn't this work, is this␤    expecting any of:␤        …»
22:13 masak lizmat: I hope it's an NYI
22:13 flussence m: my $a is Rat = 42; # this is one!
22:13 camelia rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vUXS7P2Wxq␤Variable trait 'is TypeObject' not yet implemented. Sorry. ␤at /tmp/vUXS7P2Wxq:1␤------> 3my $a is Rat7⏏5 = 42; # this is one!␤    expecting any of:␤        constraint␤»
22:13 masak lizmat: unfortunately, implementing it will not be sufficient for CurtisPoe's needs.
22:13 lichtkind hej there will be big article here on christmas :)
22:13 vendethiel .oO( Failure is to Either what Effects are to Monad Transforms )
22:13 vendethiel ers*
22:14 masak lichtkind: yay
22:14 lichtkind yes
22:15 flussence m: my $a is Rat() = 3; # this causes a bizarre error on my repl
22:15 camelia rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nzXV5FoGzL␤Can't use unknown trait 'is ' in a variable declaration.␤at /tmp/nzXV5FoGzL:1␤------> 3my $a is Rat()7⏏5 = 3; # this causes a bizarre error on m␤    expecting any of:␤        TypeObje…»
22:15 lichtkind and granada article will be published tomorrow
22:15 lizmat m: sub a(Rat() $a) { say $a.nude }; a 42   # so why does this work then ?
22:15 camelia rakudo-moar 719a90: OUTPUT«(42 1)␤»
22:15 flussence (doesn't show up in evalbot)
22:15 lichtkind celebrating whenever in third last paragraph
22:15 lichtkind becuase i felt it was a thing in granada
22:17 lichtkind so i will be askeing more questions :)
22:17 lichtkind good night
22:17 masak I do think it's an interesting discussion with Int !~~ Rat. but the whole argument above, which went in circles a few times, can be summed up as "why doesn't it typecheck?" -- "because you gave it the wrong type" -- "oh, don't give me that type theory crap!"
22:17 lizmat masak: why wouldn't my Rat() $a = 42 work for CurtisPoe?
22:18 TEttinger joined #perl6
22:18 masak lizmat: because he thinks that `()` is unintuitive and not easy.
22:18 masak lizmat: he thinks it should Just Work without the `()`.
22:20 masak basically, because mathematical intuition tells him that 3/1 == 1, he is disappointed that `my Rat $foo = 3` doesn't DTRT.
22:20 masak and that's the WAT to him.
22:21 masak to me, it's a case of "you promised you'd do Rat, and then you did Int, and Int !~~ Rat, so you broke that promise"
22:21 masak in a way, the `Int !~~ Rat` part is where Perl 6 diverges from mathematical intuition.
22:21 masak they're both Real, but Int is not a kind of Rat in Perl 6.
22:22 masak (which it kind of is in mathematical intuition, although mathematicians seem to properly talk about "embeddings", which is a bit more careful than just equating things)
22:22 sjn is that something worth "fixing", if for no other reason than to follow the principle of least astonishmen?
22:23 masak sjn: that's exactly what we were discussing.
22:23 masak and disagreeing on.
22:23 masak sjn: the thing is, Least Astonishment is up here against "do you want a proper type system or not?"
22:23 sjn well, I'm a fan of the WTF/min metric. which option would give fewer?
22:24 masak which option would ruin the type system less? that's also worth asking.
22:24 sjn mm
22:25 masak because in the long run, having a predictable/simple/consistent type system will also provide benefits.
22:25 geekosaur I'm not convinced that numeric literals shouldn't be polymorphic though
22:25 masak there's the Real type, which subsumes both Int and Rat. if you declare things as `Real`, you're essentially saying that you don't care if you get a Rat or an Int back.
22:26 TimToady or a Num, which Rat can mutate into
22:26 masak TimToady: come again?
22:26 TimToady if you exceed 64 bits in the denom, you get a Num, not a FatRat
22:26 masak ah, yes.
22:27 TimToady which is also "anti-mathematical"
22:27 cognominal If we go that way and stay consistent, one should be able to detect/know when a type is a subset (or. more exactly equivalent of to the subset of another). If we go to that path, we get something like idris, not Perl 6
22:27 masak maybe the real question here is "do people benefit from the type distinction between Int, Num, and Rat?"
22:27 masak I kind of think they do.
22:27 cognominal And it does not dwim.
22:27 cognominal * detect/know/declare
22:28 masak because real type modeling is usually concerned with the exact type of things. sometimes those types are numeric types.
22:28 flussence well it does map neatly to non-programming maths (natural numbers, fractions, abstract symbolic things)
22:28 masak saying "I want this to actually be a rational, not an integer or a floating-point number" is *useful*.
22:28 masak which is why the strict type checking is ultimately worth defending.
22:29 masak and people who want looser type checking because they don't really care can do `Real`.
22:29 Skarsnik If you need to distinct them, you probably want something strict behind. otherwise you will just use like Int/Float
22:29 masak cognominal: yes, I was a little worried about that aspect, too.
22:29 masak cognominal: but I didn't want to say "slippery slope" to CurtisPoe.
22:29 leont Sounds to me like we should have answered "you want to use Real there"
22:30 masak leont: we did tell him that.
22:30 masak cognominal: if we give in to people's expectation of auto-coercing Int to Rat, then what about when two user-defined types don't behave like that?
22:30 sjn well, fwiw, I'm a fan of "easy to understand" > "correct" > "efficient", but I'm not sure how that translates from the implementation sphere into the usage sphare.. Haven't really thought about it much, since I usually assume that questions of usage (WTF/h or PoLA) usually are more focused on expectations and conventions than on implementation...
22:30 leont Vaguely, but not really why (or at least I'm only now understanding why, I was expecting Real to mean something closer to Num)
22:31 masak leont: yes, that's another common one. :)
22:31 leont To my mind, Num and Real should have swapped names
22:31 lizmat m: say Num ~~ Rat   # isn't this a problem if the denom exceeds 64bit ???   TimToady
22:31 camelia rakudo-moar 719a90: OUTPUT«False␤»
22:31 skids joined #perl6
22:31 masak lizmat: only if you typed the variable as Rat and assumed it would stay that way forever.
22:31 cognominal masak: yea, slippery slope indeed.
22:32 masak leont: well, Real gets its name because these things are all on the real line.
22:32 lizmat masak: feels like a WAT that would typically occur after a *long* run of computations  :-(
22:32 leont It's probably because real has floating point connotations to me
22:32 masak leont: and Num I cannot really provide a rationale for, except that I like it better than Float :)
22:33 masak lizmat: and then the user goes "awrgh, I shoulda typed it as Real!"
22:33 masak lizmat: and hopefully learns a lesson
22:33 leont Num is awfully generic, which is perfect for "this covers everything", which is what Real currently does
22:33 masak leont: no, you're thinking of Numeric :P
22:33 lizmat masak: this could be in a library  :-(
22:34 masak m: say Real ~~ Numeric; say Complex ~~ Numeric
22:34 camelia rakudo-moar 719a90: OUTPUT«True␤True␤»
22:34 masak lizmat: we need to teach people how to use the numeric types right.
22:34 masak lizmat: there's just no way around that.
22:34 * sjn would be very happy if we don't scare away math geeks (or Mathematicians) because of Perl 6 having "our kind of" types
22:34 cognominal When we see the underlying complexity of the conversion to boolean, we can imagine what it would be to play a similar game with numeric types.
22:34 masak intuition only goes so far.
22:34 masak sjn: nod
22:35 masak sjn: I think the thing that bothered me the most was that Perl 6 opted out of any kind of "numeric tower" business
22:35 masak sjn: which would essentially grant CurtisPoe his wish
22:35 masak but another point: I think it would wreak havoc with people's expectations in *signature* matching if we made Int ~~ Rat
22:36 masak or given/when matching, for that matter
22:36 masak users are inconsistent as hell
22:36 masak "I passed it an Int, and it matched on Rat" -- "well, you shoulda known that" -- "this sucks!"
22:37 sjn if a "numeric tower" would be implemented later at some time, what would break when compared with the current system?
22:37 masak sjn: some things that failed at compile time would start working. no big deal.
22:37 masak sjn: we could even try it out safely in a module/pragma.
22:37 masak sjn: people could opt into it if they wanted that semantics.
22:38 lizmat m: sub a(Rat() $a) { say $a.nude }; a 42   # masak: should this break ??
22:38 camelia rakudo-moar 719a90: OUTPUT«(42 1)␤»
22:38 telex joined #perl6
22:38 masak lizmat: no, seems 100% legit to me.
22:38 masak lizmat: (because the coercion is explicitly asked for)
22:38 sjn well, basic mathematic concepts isn't really something that is ok to just make up as you go (even considering user's whims)
22:38 lizmat ok
22:39 masak sjn: I... agree...? :P
22:39 masak "don't make up math as you go!" -- probably most mathematicians
22:39 TimToady isn't that what mathematicians are for?
22:39 sjn and quite a lot of things out there that might provoke a "you should have know that" response
22:40 sjn masak: sure, but the basics are the same :)
22:40 sjn an integer in India is the same as an integer in Greece :)
22:40 sjn or a Rat
22:41 mst sjn: that generally depends whether they open the till
22:42 masak to be clear, the surprise here is exactly that people expect `my Rat $foo = 3` to work from a *mathematical intuition* perspective (just like CurtisPoe did), because we know from math that Int can be embedded in Rat, and thus "ought to" smartmatch as Int ~~ Rat
22:42 masak but it doesn't in Perl 6, and we kinda consider that a feature, even though it goes clearly against mathematical intuition
22:42 masak and so we're keeping that WAT as a chance to tell you about how Ints are not Rats
22:44 cognominal Just like people must learn that (often doubtful) intuitions about reals don't match the behavior of floating point.
22:44 masak I was thinking about that earlier today.
22:45 sjn will this tradeoff make life harder for mathematicians considering using Perl 6?
22:45 masak the reason the reals are uncountable is that when we get to the point of defining them, we have to go all the way to *relations* with the rationals to do so. that's a heavy dependency.
22:45 masak whereas the data of a rational is literally just a sign and two non-negative integers.
22:46 masak sjn: no, I think it's all about habit. and getting the right answers after the WAT happens to you.
22:46 cognominal s/doubtful/dubious/
22:46 sjn ok, so this can be "solved" with documentation and sane warnings
22:47 masak sjn: what's interesting is that CurtisPoe didn't buy the "no, you have the wrong expectations" argument. basically because he's a very picky shopper who writes presentations that are meant to be easy for neophytes.
22:47 masak sjn: and `my Rat $foo = 3` not working fails his "it's easy" lithmus test.
22:47 sjn mm
22:47 sjn well, it does
22:48 masak yes.
22:48 ShimmerFairy masak: I'm sure this is the same problem behind our persistent Inf issue, fwiw :)
22:48 masak ShimmerFairy: I don't think so...
22:48 masak well, they both have to do with the type system.
22:49 masak if you remove the type system, both of the problems go away :P
22:49 ShimmerFairy masak: Yeah, not quite the same, but it's still that same problem of wanting "type transcendence" in numerics
22:50 ShimmerFairy .oO(not to be confused with mathematical transcendentals :P)
22:50 masak I guess it's a bit annoying for people arguing the "mathematical intuition" side that a number of languages out there *do* effortlessly implement the numeric tower, and then get on with life.
22:50 masak and Perl 6 choses not to, for whatever reasons.
22:50 masak and the WATs occur because of that.
22:51 ShimmerFairy I would ask what rearranging our type system would impact, but we have 'Num' and 'Rat' covering the same space, for example, so we have a bit of snag in cleanly mathematical organization there.
22:52 masak ShimmerFairy: I still see them as different things. CurtisPoe wants a thing to basically "upgrade" itself to a more derived type when it's completely safe to do so. Inf kind of wants to "blend in" as a closed set ({Int, Num, Str}) of types, and pass for either of them.
22:52 ShimmerFairy Perhaps other langs can organize things mathematically because they only have Nums, not Rats :)
22:52 masak ShimmerFairy: 'Int', 'Rat', and 'Num' all cover the "same space". and you could throw 'Complex' in there, too.
22:53 sjn 'Imaginary' :)
22:53 ShimmerFairy masak: sure, but I wasn't counting proper subsets :P
22:54 ShimmerFairy (FatRat and Num are better coupled as covering the same exact space, btw)
22:54 sjn Well, maybe this could be solved with a module? (use Mathematical::Types)
22:54 masak I think it could.
22:54 masak but I would call it `use Math::Typing::Lax` :)
22:55 ShimmerFairy Mathematicians wouldn't call it "lax mode" though :P
22:55 masak or `use Math::Typing::Sloppy`
22:55 masak well, the point is, it kind of *is* "lax mode" from Perl 6's point of view
22:55 sjn yeah, better name it so it goes well with mathematician's expecations
22:55 masak it gave you this nice distinction between Int/Rat/Num, which you can actually use for things
22:56 masak and then you go "nah, I don't want that"
22:56 sjn 'use Proper::Math::Types' :)
22:56 ShimmerFairy masak: maybe if the numerics had some sort of "pseudo-C<subset>" feature, where Ints are considered a subset of Rats for example (even though they aren't really, in a P6 sense)
22:56 leont ShimmerFairy: thing is, sometimes they're not
22:56 masak ShimmerFairy: yes, cognominal was thinking about the same earlier. (and warned about becoming Idris.)
22:57 leont E.g. Complex is a superset of Int, except you can't order the former like you can with the latter
22:57 masak that's fine with supersets, though
22:57 masak you may lose properties that were true of the subset
22:57 Peter_R joined #perl6
22:58 masak (because you're zooming out and becoming more general, so specific properties may no longer hold)
22:58 masak if you zoom out further to the quaternions, you lose commutativity of multiplication
22:58 masak if you zoom out even further to the octonions, you lose associativity of multiplication
22:59 masak and after that, everything nice breaks down, so there isn't really a "hexadeconion" algebraic system
23:00 ShimmerFairy masak: nope, just sedenions :)
23:02 masak ShimmerFairy: oh, you're right
23:02 masak they lose yet another property, of being "alternative", whatever that is
23:02 ShimmerFairy apparently, that's x*(x*y) = (x*x)*y
23:02 masak we're following the same trail here :)
23:03 masak yeah, that sounds like... something I'd generally want to be true :)
23:03 masak ok, and it's weaker than associativity's x(yz) = (xy)z, which requires all three to vary
23:04 masak here, two are the same
23:05 masak apparently, the Cayley-Dickson construction goes as far up 2**N as you care to follow it.
23:05 leont quaternions at least are used in the non-academic world, I don't think octonions are, let alone sedenions.
23:05 masak but no-one seems to pay any interest past 16.
23:06 masak leont: that's my impression too.
23:07 leont Though even complex numbers aren't used all that often, IME
23:07 ShimmerFairy Without getting too lost in the math, it sounds like sedenions end up destroying what little faith you had left in order of operations (for multiplication at least), by making the direction you evaluate important :P
23:08 masak ShimmerFairy: well, it forces you to put in the parentheses in basically every multiplication.
23:08 masak (something I'd do just in case after the loss of associativity)
23:09 masak leont: complex numbers seem to have found their place in various branches of physics and engineering.
23:10 masak basically, I think of complex numbers as being almost as nice as the reals. (unexpectedly)
23:10 masak sure, you can't order them, but if that's not a problem, then they can basically be expected to behave as nicely as the reals.
23:12 telex joined #perl6
23:13 ShimmerFairy Anyway, I think that  my Rat $a = 4  should either "promote" the literal there, or at least warn about assigning an Int to a Rat variable.
23:15 ShimmerFairy I think perhaps having assignment require a Rat() instead of Rat (or Rat(Numeric), or whatever) might work out better
23:18 ShimmerFairy (should assignment be coercive in general? I'd be surprised if such a change didn't cause problems)
23:19 skids Personally I think we have to diversify our vocabulary around "coerce"
23:20 dalek rakudo/nom: 6252fc4 | lizmat++ | src/core/IO/Handle.pm:
23:20 dalek rakudo/nom: Make "words".IO.lines($limit) lazy when needed
23:20 dalek rakudo/nom:
23:20 dalek rakudo/nom: Basically, remove the old pre-GLR candidate and replace it with a class
23:20 dalek rakudo/nom: that does the right magic.  In the process, also allow for Ranges to be
23:20 dalek rakudo/nom: specified as a limit.
23:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6252fc45b9
23:20 telex joined #perl6
23:20 lizmat which concludes my commits for today
23:20 lizmat sleep&
23:25 ShimmerFairy skids: I personally would prefer having better words for describing it. FWIW I don't use "convert" because to me that's something the 'owner' of the data does (i.e.    my $a = $b.Rat  is "conversion" to me, and  foo($a)  with an arg of Rat() is "coercion" to me)
23:28 masak ShimmerFairy: if you think `my Rat $a = 4` should promote, what about `my Rat $a = $x`, where $x happens to be a Rat?
23:30 telex joined #perl6
23:40 telex joined #perl6
23:42 telex joined #perl6
23:44 ShimmerFairy masak: I thought about that too, and I'm not sure. (That "Rat() assignment" thing would solve it, but like I said probably cause more problems than solves)
23:45 ShimmerFairy m: my Rat() $a = 4    # aw :P
23:45 camelia rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ste2iwsGPf␤Coercion Rat(Any) is insufficiently type-like to qualify a variable␤at /tmp/Ste2iwsGPf:1␤------> 3my Rat() $a7⏏5 = 4    # aw :P␤    expecting any of:␤        constraint␤»
23:45 TimToady basically NYI
23:46 ShimmerFairy TimToady: the coercive assignment thing or the  my Rat() $a  thing?
23:46 TimToady or?  they're much the same thing
23:47 TimToady there's no coercive assignment yet because there's no way to declare a coercive lvalue
23:47 ShimmerFairy oh, so  my Rat $a = 4  wouldn't work, you'd have to do Rat() as the type decl ?
23:48 TimToady that's the plan
23:49 ShimmerFairy Sounds like the perfect solution to those silly mathematical perspectives on numeric types :)
23:49 TimToady we make a lot of concessions to mathematic intuition, but at some point mathematics must give way to computation
23:50 TimToady .oO(Computation is hard, lets go mathing...)
23:51 masak ok, good. I'm gonna go out on a limb and take that as a Ruling.
23:52 TimToady maybe we'll let people say: subset Ratty of Rat();
23:52 masak then the question becomes "how do we best explain to people how best to deal with math, numeric (non-)tower, types, and (non-)coercion?"
23:52 TimToady 'course, that's the same number of chars...
23:52 * ShimmerFairy wonders what mathematician came up with  -1 ** 2 == -1  , and if that counts as a mathematical concession in P6 :P
23:52 masak TimToady: I think it's just as elegant, or more so, to teach people the general thing with `()`
23:53 TimToady all of our types are implementation types, just some are closer to the metal than others
23:53 TimToady ShimmerFairy: yes, that's one of 'em
23:53 masak ShimmerFairy: that one doesn't even register as wrong or weird to me.
23:54 masak ShimmerFairy: but that's probably because I'm damaged by too much knowledge of precedence.
23:54 TimToady well, looks a lot better if you write it -1²
23:54 masak that's how I read the infix:<**> version too, basically
23:54 ShimmerFairy masak: whenever a language treats prefix:<-> as anything but part of a number literal (or more generally, part of the closest term), it feels like something's off.
23:54 masak ShimmerFairy: indeed.
23:54 TEttinger joined #perl6
23:54 ShimmerFairy (This counts when I read an introductory thing on Haskell, and it mentioned the weirdness on negation)
23:54 masak ShimmerFairy: there are parts of Perl 6 where it bothers me a lot more, though.
23:55 masak m: multi foo(1) { say "one" }; multi foo(-1) { say "minus one" }; foo(-1)
23:55 camelia rakudo-moar 6252fc: OUTPUT«5===SORRY!5=== Error while compiling /tmp/s5ZQYbhi1P␤Missing block␤at /tmp/s5ZQYbhi1P:1␤------> 3multi foo(1) { say "one" }; multi foo(7⏏5-1) { say "minus one" }; foo(-1)␤»
23:55 masak that's the most bothersome one, IMO.
23:55 mr_ron joined #perl6
23:55 ShimmerFairy maybe we should have <-1> literal Ints :)
23:56 masak no, I'd just like -1 to Just Work in that case. no questions asked.
23:56 TimToady we haven't used - in siggies yet
23:56 masak it's a place where I'd prefer the implementors to be tormented a wee bit more than they currently are.
23:56 ShimmerFairy masak: sure. While it's Cool™ that P6 does the right mathy thing with -1 ** 2 , I'd prefer if it was more aligned to how it looks
23:56 masak I don't have a corresponding wish with either prefix:<!> or prefix:<~>
23:56 TimToady ShimmerFairy: it's all tradeoffs, and there's no perfect
23:57 masak what TimToady said.
23:57 masak I have no sympathy for people who don't want to learn about precedence :)
23:57 ShimmerFairy TimToady: but of course :)  That's why I thought of <-1> as a compromise of sorts, so that people who really want that behavior can get it
23:57 * ShimmerFairy afk
23:58 masak I don't want a compromise. I want -1 to Just Work.
23:58 TimToady yes, well, the same instinct would make -1 ** 2 wrong
23:59 TimToady but we might cheat this one
23:59 masak ...in a roundabout way, it would, yes.
23:59 masak but I'm strangely not worried at all about that discontinuity.
23:59 masak for the purposes of a siggie, a "-1" is a single integer literal.

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

Perl 6 | Reference Documentation | Rakudo