»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by masak on 12 May 2015. |
|||
TimToady | someone needs to bump NQP if jnthn's fix is to get in | 00:06 | |
00:07
telex left
00:08
telex joined
|
|||
dalek | kudo/nom: 01bba75 | TimToady++ | tools/build/NQP_REVISION: bump NQP revision |
00:10 | |
TimToady | I'll bump it, please revert if that screws up rakudo release | ||
00:17
telex left
00:18
telex joined
00:25
araujo joined
00:26
laouji joined,
telex left
00:28
telex joined
00:34
telex left,
telex joined,
telex left
00:36
telex joined,
BenGoldberg joined
00:38
laouji left
00:39
laouji joined
00:41
laouji left,
laouji joined
00:42
telex left
00:44
telex joined
00:47
aborazmeh joined,
aborazmeh left,
aborazmeh joined
00:51
telex left
00:52
telex joined
00:53
vendethiel left
00:55
tokuhiro_ joined
|
|||
[Coke] | I have to rerelease nqp and retag things anyway. :| | 00:57 | |
TimToady | okay | ||
[Coke]++ | 00:58 | ||
00:59
xinming_ joined
01:01
xinming left
01:18
adu joined
01:23
mprelude left
01:26
telex left,
telex joined
|
|||
dalek | p: 64f4dae | coke++ | VERSION: bump VERSION to 2015.09.1 |
01:40 | |
01:42
telex left
01:43
travis-ci joined
|
|||
travis-ci | NQP build passed. Will "Coke" Coleda 'bump VERSION to 2015.09.1' | 01:43 | |
travis-ci.org/perl6/nqp/builds/80944296 github.com/perl6/nqp/compare/8fd2e...f4dae96d88 | |||
01:43
travis-ci left
01:44
telex joined
|
|||
[Coke] | nqp release 2015.09.1 uploaded. | 01:45 | |
01:45
larion left
|
|||
dalek | kudo/nom: 06d132a | coke++ | docs/announce/2015.09.md: add contributors for 2 months |
02:05 | |
kudo/nom: 258f54c | coke++ | docs/release_guide.pod: mark release as released in docs |
|||
kudo/nom: aee232e | coke++ | docs/announce/2015.09.md: use moar unicode. add changelog info |
|||
kudo/nom: d22b3b9 | coke++ | tools/build/NQP_REVISION: [release] bump NQP revision |
02:07 | ||
kudo/nom: cdc2981 | coke++ | VERSION: [release] bump VERSION |
|||
02:11
telex left
02:12
telex joined
|
|||
[Coke] ponders trying to run the Inline::Perl5 tests as part of the release process. :( | 02:24 | ||
02:25
kid51 left
|
|||
[Coke] is thinking that the I:P5 tests shouldn't be in roast if I:P5 is not in core. | 02:25 | ||
02:26
uvtc joined
|
|||
[Coke] | does panda know how to deal with perl6-m vs. perl6-j ? | 02:26 | |
uvtc | How can I create `['a', 'b', 'c', 'd', '1', '2', '3', '4']`? This doesn't work: | 02:33 | |
m: my @a = 'a' .. 'd', '1' .. '4'; say @a; | |||
camelia | rakudo-moar cdc298: OUTPUT«["a".."d" "1".."4"]» | ||
TimToady | m: my @a = flat 'a' .. 'd', '1' .. '4'; say @a; | ||
camelia | rakudo-moar cdc298: OUTPUT«[a b c d 1 2 3 4]» | ||
uvtc | Ooh. Thanks. | 02:34 | |
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:36 | ||
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:37 | |
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 :) | ||
ShimmerFairy afk | |||
dalek | ast: b0f743e | coke++ | / (2 files): capture test reality during 2015.09 release |
02:41 | |
[Coke] | ShimmerFairy: If it's optional, the tests probably shouldn't be in roast. | 02:43 | |
02:43
telex left
02:44
telex joined
|
|||
[Coke] | so many jvm failures. :| | 02:47 | |
02:49
noganex_ joined
02:52
noganex left
02:53
telex left
02:54
telex joined
03:01
kaare_ joined
|
|||
adu | serialization is a beast | 03:07 | |
[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:10 | |
adu | I like JVM, it's how I plan to deploy Perl6 in a few years, but for development I always use Moar | 03:14 | |
03:18
skids joined
03:19
dj_goku joined,
thou left
|
|||
dalek | kudo/nom: c0e0c97 | coke++ | docs/announce/2015.09.md: Too many JVM failures to fix or fudge before rel |
03:24 | |
flussence | [Coke]: IMO that's perfectly fine for this month, it's supposed to be a beta after all :) | ||
[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 | |
We can fudge or fix a few a day, hopefully. | |||
TimToady | JVM is allowed to play catchup between now and Christmas | ||
[Coke] | is the phrasing in that last commit acceptable? | 03:26 | |
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 left,
telex joined,
telex left
03:30
telex joined
|
|||
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:33 | |
[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. :) | ||
ShimmerFairy | [Coke]: true, but that should be an R* concern more than a just-the-compiler concern, no? | 03:35 | |
03:42
_28_ria joined
03:45
samb1 joined
|
|||
[Coke] | if you only run your tests once every N months, that's not awesome. | 03:46 | |
anyway, I think the crux is: "are they core or not". | 03:47 | ||
03:50
vendethiel joined
03:54
perlawhirl joined
|
|||
perlawhirl | hi all | 03:55 | |
can i get a little help/clarification on regexes | |||
[Coke] | Perl 5 or Perl 6? | 03:56 | |
We're mostly about Perl 6 here. | |||
perlawhirl | 6 | ||
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 :) | ||
perlawhirl | i'll explain more... but here's my prob laid out: pastebin.com/7M8Z1Nqj | ||
[Coke] | perlawhirl: ok. | ||
perlawhirl | it seems that even compiling a regex is rx:s//, i still can't use it in a regex match | ||
unlike perl5's qr, which could have a non /x compiled regex inside a /x match and it would still work | 03:58 | ||
03:58
aborazmeh left
|
|||
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:58 | |
by "compiling" i mean... "creating regex object" | 03:59 | ||
03:59
nucp6 joined
|
|||
[Coke] | OOC, why are you starting with strings and not... regexes? | 04:00 | |
nucp6 | Good morning perl6 ! | ||
[Coke] | ah. because it's a user input. | ||
perlawhirl | yes D | ||
:D | |||
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" | ||
flussence | m: say anon regex { ^ match this\s+please$ } | ||
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…» | ||
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...» | ||
ShimmerFairy | perlawhirl: also, try it without the m// around $re, since $re already has a regex object in it | ||
flussence | m: say " match this please" ~~ rule { ^ match this\s+please$ } | ||
camelia | rakudo-moar c0e0c9: OUTPUT«「 match this please」» | ||
flussence | m: say " matchthis please" ~~ rule { ^ match this\s+please$ } | ||
camelia | rakudo-moar c0e0c9: OUTPUT«Nil» | ||
flussence | does that help? | ||
perlawhirl | hmmm... didn't know about the 'rule' wrapper... will try that | 04:03 | |
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 | ||
which are now disabled | |||
[Coke] | jvm got worse in the tarball test. j-test failing with: | 04:05 | |
===( 119;31 0/? 0/? )=============================================ld: warning: object file (12-sizeof.o) was built for newer OSX version (10.10) than being linked (10.4) | |||
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 | ||
there you go :) | |||
perlawhirl | thanks | ||
flussence | m: say " matchthis please" ~~ rx:ss { ^ match this\s+please$ } # this might work too | ||
camelia | rakudo-moar c0e0c9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Y7s7AZyArIAdverb ss not allowed on rxat /tmp/Y7s7AZyArI:1------> 3ase" ~~ rx:ss { ^ match this\s+please$ }7⏏5 # this might work too» | ||
[Coke] | sorry, not failing. warning. | ||
flussence | bah, never mind | ||
ShimmerFairy | flussence: :ss is for subst (samespace) | ||
flussence | I know a rule is just syntactic sugar for *something* you can tack on a plain regex... | 04:06 | |
(and it works for that purpose, cause I can remember it :) | |||
perlawhirl | also... just a suggestion, the error msg advises that it failed "at EVAL_0:1", which is LTA | ||
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 | ||
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 :) | ||
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:10 | ||
well I guess it'd have to, to know to interpolate the string as regex code... | 04:11 | ||
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:12 | |
04:14
vendethiel left
04:17
telex left
04:18
telex joined,
khw left
|
|||
nucp6 | racudo: say ( ( 5 * 8 + 2 ) ) ~~ 42; | 04:18 | |
[Coke] | rakudo tagged, signed uploaded. | 04:19 | |
flussence | m: say 'a' ~~ rx{ { note &?CALLER::ROUTINE ~~ Regex } . }; | ||
camelia | rakudo-moar c0e0c9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8IOOTnSZjGUndeclared routine: &?ROUTINE used at line 1» | ||
flussence | m: say 'a' ~~ regex { { note &?CALLER::ROUTINE ~~ Regex } . }; | ||
camelia | rakudo-moar c0e0c9: OUTPUT«True「a」» | ||
[Coke] | rakudo.org/downloads/rakudo/rakudo-....09.tar.gz | 04:20 | |
email away. | |||
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. | ||
That is, assuming you're expressions are simple and youre not trying to bring P6 regex syntax into the cli. | 04:21 | ||
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:23 | |
[Coke] | the possum on my deck seemed awful friendly. :P | 04:24 | |
sorry, "opossum". | |||
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... | ||
TEttinger | sorry, "virginia opossum" | ||
[Coke] | My concern is that he and my cat seemed chummy. | ||
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,
rmgk left,
rmgk_ is now known as rmgk
|
|||
TEttinger | haha | 04:26 | |
[Coke] | good thing the release is done. | ||
skids | perlawhirl: are you actually doing an IOS emu, or was that just an example, out of interest? | ||
04:27
BenGoldberg left
|
|||
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 | |
rather than searching the text file manually | |||
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 | ||
i built it in perl5... already... trying it out in perl6 as a way to learn the syntax | |||
[Coke] | TEttinger: australia had to get -one- nice animal. | ||
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 | ||
[Coke] heads offline. | |||
skids | .oO(oh good /S32-num/power isn't my local patch... cuz that would have been bizarre) |
04:30 | |
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:31 | |
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:33 | ||
skids | The command completion is something I've had trouble finding a good solution for, even with perl6 rx. | 04:34 | |
04:34
uvtc left
|
|||
skids | (there are solutions, but none of them are very clean) | 04:34 | |
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:35 | |
04:36
tokuhiro_ left
|
|||
perlawhirl | but even so... Term::Readline allows you to write a completion function. | 04:36 | |
the function receives the ($line, $word, $lineindex) and then you build a list of completions from that and return it. | 04:37 | ||
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:40 | ||
04:52
telex left
04:54
telex joined
04:55
skids left
05:03
perlawhirl left
05:11
rurban joined
|
|||
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:15 | |
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:16 | |
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:18 | |
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. | ||
"let's rewrite these perfectly working Perl 5 build scripts in Perl 6 just because" ? | |||
nine | So I'm not pushing too much. | ||
ShimmerFairy: just so they are written in Perl 6 instead of Perl 5. | 05:20 | ||
The "this is a completely separate language, let's forget we ever had something to do with Perl 5" mindset | |||
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 :) | ||
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. | ||
(And besides, wasn't backwards-compatibility something we specifically avoided in designing P6? :P) | |||
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. | ||
nine | It's simply a waste of time when there's still so much else to do. | ||
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 | |
Again, so what if someone "wastes" their time to rewrite their code? | |||
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 | ||
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. | |||
(In other words, I don't think P5 deserves to be treated more specially than any other foreign language is in Perl 6) | 05:27 | ||
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 | |
but since we're being asked to treat you specially, I think quid pro quo applies | |||
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,
aborazmeh left,
aborazmeh joined
|
|||
mst | personally, I'm totally happy with this | 05:29 | |
I like the fact that the two perl communities have decided to co-operate like this | 05:30 | ||
I think it's going to be really good fun | |||
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. | ||
mst | well, what about making rakduo default to loading Inline::X for from<X> ? | ||
anyway, any time you say 'should', there's an implied expectation other people will do the work | 05:32 | ||
figure out which you like best and write the patches, and then we can discuss it | |||
otherwise you're basically just urinating into the gale | |||
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) | ||
mst | and sapping other people's time and motivation via futile arguments | ||
then you're welcome to implement it | |||
if you do it well, I'll help convince people wiser than me to review and consider it | |||
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) | ||
mst | then less arguing with people trying to make things better and more making things bettere | 05:34 | |
if it won't be that hard, I hope to see your patch soon :) | |||
05:35
telex left
|
|||
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:35 | |
05:36
telex joined
|
|||
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 ☺) | ||
mst | I suggest instead that you just -do- the thing you want to see | ||
rather than being mean to the people doing other things | |||
your constant negativity isn't achieving anybody's goals, yours included | 05:37 | ||
05:37
adu left
|
|||
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:37 | |
mst | well, you pretty much always sound like that | 05:38 | |
hence why I've taken over so nine can go back to doing something useful | |||
rather than listen to you tell him how to spend his free time | |||
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. | ||
mst | yes, and if you wrote patches to fix that, I would absolutely support it | 05:39 | |
in spite of being a perl5 person with fairly minimal direct interest in perl6 | |||
but attacking people for making interop better doesn't help fix that at all | |||
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. | ||
mst | it just makes them feel sad and you look like the rear end of a horse | ||
yopu did come across that way | 05:40 | ||
every time I see you talking in here you come across that way | |||
let me rephrase: to me, every time I've seen you speak on this topic, you've sounded like that | |||
less tellingg other people what they 'should' do, more doing, and you'll end up with a better result | |||
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:42 | |
mst | given the combativeness of the rest of your tone, that isn't how it comes across | 05:43 | |
05:44
telex left
|
|||
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 | |
05:46
telex joined
|
|||
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 | |
and I'd like you to stop doing that, and instead contribute something | |||
05:46
Alina-malina left
|
|||
mst | driving people who care about interop away from perl6 won't help anybody achieve anything | 05:47 | |
your original motivation doesn't make your words any less cutting | |||
I don't really care whether it's actual malice or just terrible social skills, I just want you to not do it anymore :) | |||
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 | ||
but that wasn't the problem | |||
and doesn't actually help anything | |||
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:49 | |
mst | funny, you remind me of the OpenBSD community | 05:50 | |
that's rather why I was annoyed | |||
TimToady | you guys are repeating yourselves... | ||
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 | |
but, yeah, we're going in circles now | |||
on the upside, nine's now gone to do something more useful than having this conversation | |||
mst stops | |||
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 | ||
oh! | |||
ShimmerFairy: actually, I have a blog post I wrote when I realised I'd done exactly the same thing somewhere else | 05:54 | ||
ShimmerFairy: shadow.cat/blog/matt-s-trout/passion-anguish/ | |||
please don't take that as an attack, you'll find I'm actually one of the examples of the failure mode :) | |||
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:56 | |
05:57
rurban left
|
|||
mst | yes, I understood that | 05:57 | |
05:57
tping left
|
|||
mst | that's why I gave you an alternative metaphor | 05:57 | |
05:58
domidumont joined
|
|||
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:58 | |
mst | I appreciate your wanting certain colours of candle lit | 05:59 | |
but as the passion/anguish thing mentions | |||
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 | |||
or at least having them feel like you did, even if you weren't wanting to go that way | |||
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 | ||
if you see what I mean | |||
(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 ;) | |||
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:01 | |
06:02
domidumont left
|
|||
ShimmerFairy should probably do something towards that spec modernization soon, so it's not something she can complain about anymore :P | 06:02 | ||
06:03
domidumont joined,
telex left
06:04
telex joined
|
|||
mst | ShimmerFairy: on the other hand, it's a grand historical tradition | 06:05 | |
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" ;) | |||
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. | ||
flussence: really? When was this decided? | |||
mst | I dunno, I get really annoyed by those bits of the perl5 docs too | ||
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
|
|||
arnsholt | pmichaud has been wanting to make the test suite the authoritative source for a while, if memory serves | 06:08 | |
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 | ||
flussence | oh yeah, that was it. pmichaud announced the "specs" repo was going to be renamed at some point without warning :) | ||
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:10 | |
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 | ||
also, from the p5 side of aisle, removing 'direct successor' sounding stuff will make us happy too | |||
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 | ||
and I think every community cat herder on either project is real bored of that now :D | |||
06:14
telex left
|
|||
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:14 | |
06:15
telex joined,
telex left
06:16
telex joined
|
|||
mst | yeah, well, it's only since ... | 06:18 | |
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 | |||
(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 :) | ||
mst | yeah, so, basically, it required masak to write strangelyconsistent.org/blog/how-pe...ill-us-all and me to write shadow.cat/blog/matt-s-trout/f_ck-perl-6/ | 06:20 | |
06:20
cdc left
|
|||
mst | and then a bunch of running around glaring at people who still weren't on message | 06:20 | |
and then it all started to calm down somewhat | |||
but it was all exceedingly silly | |||
people's front of judea versus people's judean front grade silly ;) | 06:21 | ||
ShimmerFairy | mst: I'm sure the Judean People's Front had the best ideas, though :P | 06:22 | |
mst | ShimmerFairy: split()er! | ||
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:23 | ||
(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:27
laouji left
|
|||
flussence | I went the insane route and added more swap until my netbook would build it... usually overnight | 06:28 | |
(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:30 | ||
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:36
_28_ria left
06:37
telex left
|
|||
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:37 | |
06:38
telex joined
|
|||
flussence tried a few different browsers last month, so got to enjoy compiling webkit. over and over and over. | 06:40 | ||
06:41
laouji joined,
zacts left
|
|||
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:42 | |
dalek | osystem: 3751672 | (Tokuhiro Matsuno)++ | META.list: Added Raw::Socket |
06:45 | |
osystem: 4a3d940 | moritz++ | META.list: Merge pull request #58 from tokuhirom/master Added Raw::Socket |
|||
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 | ||
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 :) | |||
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:48 | |
06:50
perlawhirl joined
|
|||
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:50 | |
I think stronger diplomatic relations as sister communities than with other communities is still a good thing | 06:51 | ||
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
|
|||
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:54 | |
06:55
telex left
|
|||
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:55 | |
moritz | perlawhirl: huh, I expected !/pattern/ to work | 06:56 | |
06:56
telex joined,
telex left
|
|||
moritz | perlawhirl: does it work with ! m/../? | 06:56 | |
perlawhirl | hrm... maybe... one sec | ||
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 | ||
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 | ||
Method 'match' not found for invocant of class 'Any' | |||
flussence | m: say (^10).grep(!m/<[12345]>/) # same error locally | ||
camelia | rakudo-moar c0e0c9: OUTPUT«Method 'match' not found for invocant of class 'Any' in block <unit> at /tmp/mSEOJm0k04:1» | ||
moritz | perlawhirl: example? | ||
flussence: needs to be inside a closure | 06:58 | ||
m: say (^10).grep({ !/<[12345]>/}) | |||
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
|
|||
moritz | m: say (^10).grep({ !m/<[12345]>/}) | 06:58 | |
camelia | rakudo-moar c0e0c9: OUTPUT«(0 6 7 8 9)» | ||
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" | ||
perlawhirl | i'm trying to inverse grep a list, ie. @arr.grep($_ !~~ /$pattern/) | ||
moritz | perlawhirl: see above; needs a closure | ||
or maybe | |||
m: say (^10).grep(none(/<[12345]>/)) | 06:59 | ||
camelia | rakudo-moar c0e0c9: OUTPUT«(0 6 7 8 9)» | ||
perlawhirl | ok, cool | ||
ShimmerFairy | fwiw, I would've been quite surprised if !/rx/ did what you expected :) | ||
moritz | ShimmerFairy: me too. But I'm surprised that { !/<[12345]>/} doesn't work | ||
perlawhirl | moritz: closure works as expected... thanks! | ||
mst | ShimmerFairy: so, -> for nested hash derefs etc. was where I firsst used that | 07:00 | |
ShimmerFairy: then had hashes of subrefs, so $thing{foo}->(...) | |||
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
|
|||
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 | |
ShimmerFairy: if I'd known OO -first- I'd probably've hated it too | |||
... must remember that progression for teaching perl5, actually | 07:01 | ||
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:02 | |
mst | heh | 07:03 | |
moritz | ShimmerFairy: and now you're stuck here, patching the compiler :-) | ||
mst | that sounds like a completely reasonable train of thought, at least given my choice of calibration for 'reasonable' ;) | ||
ShimmerFairy | moritz: yep, can't say I'm disappointed in how things turned out :) | ||
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:05 | ||
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 | |
I am really looking forward to playing with ES6, I think javascript and I will be much better friends with 'let' | |||
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 | ||
mst | moritz: that basically goes away. this makes me happy. | ||
babeljs is well worth a look | 07:12 | ||
perlawhirl | ShimmerFairy: have you used powershell... it's dynamic scoping is intolerable | ||
ShimmerFairy | I have not. I've been using bash for years now :) | ||
mst | dynamic scoping is the one true scoping, that's why everybody loves elisp unconditionally | ||
07:12
abraxxa joined
|
|||
perlawhirl | ha! | 07:12 | |
moritz | and perl < 5 | ||
ShimmerFairy | mst: unless you turn on the fancy new lexical scoping in elisp :P | ||
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» | ||
mst | damnit, somebody spilled reality over my joke :( | ||
TimToady | bug ^^^ | ||
moritz | TimToady: I tend to agree :-) | ||
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. | ||
TimToady | \o/ | ||
mst | ShimmerFairy: I have no idea at all, I maintain my own personal fork of ex-vi | 07:15 | |
it goes well with the lawn defence cannon | |||
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 | |||
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 | ||
ShimmerFairy | see'ya later :) o/ | ||
mst | may all your candles be appropriately dribbly, whatever, their colour, and in the meantime, good night | ||
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:17 | |
07:18
FROGGS joined
07:22
perlawhirl left,
laouji left
07:23
laouji joined
07:29
darutoko joined
07:33
Alina-malina joined,
Alina-malina left,
Alina-malina joined
07:34
telex left
|
|||
mathw | (interesting backlog) wait Python doesn't have case??? | 07:34 | |
07:35
cognominal joined
07:36
telex joined
|
|||
ShimmerFairy | mathw: it didn't back in '09 or so, at least. | 07:37 | |
mathw | wow | ||
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 | ||
I can't recall doing so | |||
But I might have got too lost amidst the copious misuse of XPath :) | |||
07:38
brrt joined
|
|||
mathw | Fortunately I'm not expected to do Python regularly | 07:40 | |
I shall now return to my regularly scheduled attempts to convince anybody else at work that F# is possibly worth considering | |||
ShimmerFairy | a quick scan shows that I correctly didn't find it, and perhaps it's still not there O_o | ||
[Tux] | test 50000 37.837 37.753 | 07:42 | |
test-t 50000 41.997 41.913 | |||
07:45
telex left
|
|||
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 | |
and that switch/case is hard to debug | |||
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 | ||
07:46
aborazmeh left
|
|||
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 | |
07:46
telex joined
|
|||
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:46 | |
mathw | yeah | 07:47 | |
well at least over here we've got given/when :D | |||
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 =) | ||
ShimmerFairy | www.pydanny.com/static/aliens.png | 07:48 | |
07:55
telex left
07:56
espadrine joined,
telex joined
08:14
telex left
08:16
telex joined
08:20
vendethiel joined
08:24
telex left
08:26
telex joined
|
|||
brrt | mathw: i actually use fallthrough a lot in C :-) | 08:28 | |
FROGGS | brrt: compiler writer do that, yes :o) | 08:30 | |
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 | |
although hate of switch/case is pretty pervasive | |||
i knew one guy who rewrote a 10-case switch statement into if/elses | |||
FROGGS | :/ | 08:32 | |
08:32
advwp joined,
woolfy joined
|
|||
FROGGS | to me switch statements are way more readable | 08:32 | |
08:32
woolfy left
|
|||
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 | |
but personally i skim | |||
FROGGS | though, my mind "expects" then to not fall through I think, so I like Perl 6's default here | ||
it is easy to miss a n 'if' though when it follows an 'if/elsif/elsif/ directly | 08:34 | ||
that's where I like it when the body of a switch statement is indented... | 08:35 | ||
fells more block like | |||
feels* | |||
brrt | yeah, i agree | ||
ok, in that sense, fallthrough is probably evil | 08:36 | ||
although *i* know a guy who uses goto within the switch statements | |||
and fallthrough | |||
psch | moin #perl6 o/ | 08:38 | |
r: for <0 1 2> { .say when 0; .say when 1; .say when 2 } # allomorphs! *shakes fist* | |||
camelia | rakudo-moar c0e0c9: OUTPUT«012» | ||
( no output ) | |||
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:39 | |
brrt | uhuh | 08:40 | |
that's kind of true still | 08:41 | ||
compilers are still pretty dumb | |||
08:42
telex left
08:44
telex joined
|
|||
ShimmerFairy | brrt: surely not Perl 6 compilers though! :) | 08:45 | |
brrt | hmm. i can't speak for that :-) | ||
what i do think is that 'sufficiently smart' usually means 'very expensive algorithms' and that's not pretty rarely a good choice | 08:46 | ||
euh | |||
08:46
pflanze left
|
|||
brrt | s/not// | 08:46 | |
lizmat | good *, #perl6! | 08:47 | |
psch | hi lizmat o/ | 08:48 | |
lizmat | psch o/ | ||
brrt | hi lizmat | 08:49 | |
lizmat | brrt o/ | ||
08:52
telex left
|
|||
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:52 | |
08:54
telex joined
09:01
laouji left
|
|||
ShimmerFairy | psch: IIRC bigints in java aren't that great in general | 09:03 | |
09:05
laouji joined
|
|||
vendethiel | well, the API is a bit... tiring to use | 09:06 | |
FROGGS | that's quite Javaish, no? | ||
lizmat | m: say (-1) ** 4553535345364535345634543534 | 09:08 | |
camelia | rakudo-moar c0e0c9: OUTPUT«0» | ||
lizmat | there's a spectest expecting 1 there | ||
psch | $ ./perl6-j -e'for <0 1 2> { .print when 0; .print when 1; .print when 2 }' | ||
012 | |||
fixed it anyway :P | |||
lizmat | m: say -1 ** 4553535345364535345634543534 | ||
camelia | rakudo-moar c0e0c9: OUTPUT«-1» | ||
lizmat | hmmm... | ||
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 | ||
ShimmerFairy | ah | 09:09 | |
lizmat | $ git describe | ||
warning: tag 'Zürich' is really 'ZuxCCx88rich' here | |||
Zürich | |||
huh? | |||
ShimmerFairy | lizmat: the second quoted Zürich has a decomposed umlaut after the u | ||
(and my irc client puts it over the wrong letter. nice.) | |||
lizmat | aha! | 09:10 | |
welcome to the world of unicode :-) | |||
dalek | p: cdd57fe | FROGGS++ | tools/build/MOAR_REVISION: bump moar for fix for RT #125408 |
||
ShimmerFairy | I'm familiar with it, it's just that a frightening number of programs get the placement of diacritics wrong :/ | ||
dalek | kudo/nom: 5ddb978 | FROGGS++ | t (2 files): bump nqp/moar for fix for RT #125408 |
09:11 | |
p: 9a53b94 | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: Correct getBI hack. Apparently we can't rely on get_attribute_native to only get BigIntegers, so we actually look for one. |
|||
psch | FROGGS: bump again! :P | ||
psch can do that too, though | 09:12 | ||
FROGGS | psch: ohh, then I'll let you doing it :o) | ||
09:12
yakudza left
|
|||
dalek | kudo/nom: d2d975e | peschwa++ | tools/build/NQP_REVISION: Bump NQP_REVISION (again). Get proper IntStr handling on jvm. |
09:14 | |
09:23
jack_rabbit_ joined
09:26
telex left
09:28
telex joined
09:32
TEttinger left,
andreoss joined,
laouji left
09:36
vendethiel left
09:40
yakudza joined
|
|||
lizmat is still seeing a new spectest error in t/spec/S32-num/power.t | 09:41 | ||
09:47
telex left
09:48
telex joined
09:49
pdcawley joined
09:54
mprelude joined
10:02
araujo_ joined
10:05
araujo left
10:06
telex left
10:08
telex joined
10:18
[Sno] left
10:20
telex left
10:22
telex joined
|
|||
psch | gist.github.com/peschwa/90c8dcc516ea934a17be # updated j-spectest summary | 10:27 | |
down to 43 files mentioned, with 2 being only mentioned as TODO PASS | 10:28 | ||
actually that's 3, from the looks of it | |||
moritz | r: say (-1) ** -i | ||
camelia | rakudo-moar d2d975: OUTPUT«NaN+NaN\i» | ||
( no output ) | |||
psch | r: say (-1) ** -i # jvm just sleepy | 10:29 | |
camelia | rakudo-{moar,jvm} d2d975: OUTPUT«NaN+NaN\i» | ||
moritz | ah, that one is TODOed | ||
the ones that fails is | |||
m: say (-1) ** 4553535345364535345634543534 | 10:30 | ||
camelia | rakudo-moar d2d975: OUTPUT«0» | ||
psch | m: say <3> ~~ Int | 10:31 | |
camelia | rakudo-moar d2d975: OUTPUT«True» | ||
10:31
telex left
|
|||
psch | m: use Test; isa-ok <3>, Int | 10:31 | |
camelia | rakudo-moar d2d975: OUTPUT«ok 1 - The object is-a 'Int'» | ||
psch | r: use Test; isa-ok <3>, Int | ||
camelia | rakudo-moar d2d975: OUTPUT«ok 1 - The object is-a 'Int'» | ||
..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
|
|||
psch | r: use Test; isa-ok <3>, Str | 10:32 | |
camelia | rakudo-{moar,jvm} d2d975: OUTPUT«ok 1 - The object is-a 'Str'» | ||
psch | r: say IntStr.isa(Str) | 10:33 | |
camelia | rakudo-{moar,jvm} d2d975: OUTPUT«True» | ||
psch | r: say IntStr.isa(Int) | ||
camelia | rakudo-{moar,jvm} d2d975: OUTPUT«True» | ||
psch guesses Binder :P | |||
ilmari | m: say 1 << 73 | ||
camelia | rakudo-moar d2d975: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_pfCDbRbAXUnsupported use of << to do left shift; in Perl 6 please use +< or ~<at /tmp/_pfCDbRbAX:1------> 3say 1 <<7⏏5 73» | ||
ilmari | m: say 1 +< 73 | ||
camelia | rakudo-moar d2d975: OUTPUT«9444732965739290427392» | ||
psch | i'll fix hash ordering tests first suppose | 10:34 | |
'cause that also helps moar :) | |||
10:37
[Sno] joined
10:41
telex left
10:42
telex joined
10:43
brrt left
|
|||
psch | hm, not sure about S02-types/baghash.t:134 | 10:45 | |
where exactly is it that we're testing flattening there..? | |||
isn't that test actually just conflating the two tests below | 10:46 | ||
lizmat | psch: that might well be the case, as these tests predate GLR and were quickly fudged | 10:47 | |
10:48
telex left,
telex joined,
telex left
10:50
telex joined,
vendethiel joined
|
|||
dalek | ast: 66f9a46 | peschwa++ | S02-types/bag.t: Make a test hash-elem-ordering proof. |
10:52 | |
ast: 7a58cad | peschwa++ | S02-types/ (3 files): Remove a duplicate/conflated test. |
|||
10:52
colomon left
|
|||
psch | s/ a / a few / | 10:52 | |
oh | 10:53 | ||
i should probably have checked if bag.t has something like &showkv :/ | |||
hm, maybe not. i don't immediately see how i can utilize it there | 10:54 | ||
10:56
colomon joined
|
|||
psch | eh, but that test doesn't feel particularly good in any case :/ | 10:56 | |
i mean, neither with nor without my changes | |||
the fact that the glr changed the semantics is part of the reason i guess | 11:01 | ||
m: my Bag $bag .= new: <foo foo bar>; for $bag.keys X $bag.keys -> $a, $b { say $a, $b } | |||
camelia | rakudo-moar d2d975: OUTPUT«(foo foo)(foo bar)(bar foo)(bar bar)» | ||
psch | ...or did they | ||
they didn't i must've done something weird locally :) | 11:02 | ||
anyway, that's another 4 files clean on j-spectest | |||
11:02
araujo_ left
|
|||
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» | ||
..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» | |||
psch | oh ffs, getBI still wonky? | 11:05 | |
r: say $_.WHAT for <0 1 2 3 4 5 6 7 8 9> | |||
camelia | rakudo-jvm d2d975: OUTPUT«(Str)(Str)(Str)(Str)(Str)(Str)(Str)(Str)(Str)(Str)» | ||
..rakudo-moar d2d975: OUTPUT«(IntStr)(IntStr)(IntStr)(IntStr)(IntStr)(IntStr)(IntStr)(IntStr)(IntStr)(IntStr)» | |||
psch | agh | 11:06 | |
allomorphic.t probably should be in spectest.data... | 11:07 | ||
dalek | kudo/nom: aa34562 | peschwa++ | t/spectest.data: Test S02-literals/allomorphic.t |
11:08 | |
11:17
brrt joined
11:18
domidumont left
|
|||
masak | hi, #perl6 | 11:20 | |
lizmat | masak o/ | 11:21 | |
11:23
araujo joined,
araujo left,
araujo joined
11:24
domidumont joined
11:25
[Sno] left
11:26
telex left
11:27
skids joined
11:28
telex joined
11:29
brrt left
|
|||
[ptc] | masak: o/ | 11:30 | |
masak | lizmat, [ptc]: \o | 11:31 | |
11:34
xinming joined
11:36
jack_rabbit_ left
11:38
xinming_ left
11:39
kid51 joined
11:40
abraxxa left,
telex left
11:42
telex joined
11:48
Skarsnik joined,
jack_rabbit_ joined
11:51
FROGGS left
11:52
FROGGS joined
11:53
[Sno] joined
11:58
kid51 left,
skids left
12:01
brrt joined,
telex left
12:02
telex joined,
telex left
12:04
telex joined
12:17
g4 left
|
|||
dalek | pan style="color: #395be5">perl6-examples: 2d4b164 | (Steve Mynott)++ | t/categories/99-problems.t: [99probs] reorder expected output for P91-edpratomo and strip <> so it passes |
12:18 | |
[Coke] | psch: yay, I hoped I'd come back to jvm hacking. :) stresstest was very sad last night. | 12:25 | |
lizmat | psch: did you actually try to run bag.t after doing 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? | ||
Ulti notices self-upgrade did a lot | 12:30 | ||
psch | lizmat: i... think so? which means, probably not... :/ | ||
lizmat | it has a compile error in it | 12:31 | |
moritz | Ulti: if you wiped everything, how can you do a self-upgrade? | ||
lizmat | parings vs pairings | ||
psch | ugh ._. | ||
Ulti | moritz everything but the rakudobrew script :P | ||
still fails in the same place I'll gist it | 12:32 | ||
psch | ...i did have this commit hook for roast once | ||
maybe i should revisit it, ensure that i don't commit bogus tests :/ | |||
psch waits until jvm finished building and *runs* S02-types/bag.t before pushing... | 12:33 | ||
dalek | kudo/nom: 96c65bf | lizmat++ | src/core/IO/Handle.pm: Make "words".IO.lines.elems much faster For the chomp case, 20%, for the !chomp case, 40%. Basically, the nqp::eoffh op is useless as it stands now, so just don't use it. If nqp::readlinefh returns 0 chars, we've reached EOF. Also, don't bother updating $!ins if we're about to close the file handle at the end anyway. |
||
12:34
telex left
|
|||
psch | [Coke]: yeah, there's still quite a few pretty bad failure modes around... lowlevel Exceptions without a msg, StackOverflows... | 12:34 | |
Ulti | gist.github.com/MattOates/6f8c4139a51956bff728 | ||
psch | the former FROGGS (i think) says is leaking control exceptions from label stuff iirc, the latter is nigh impossible to debug... | 12:35 | |
12:35
rurban joined
|
|||
_itz | Ulti: did you run a mac update .. I had to "sudo gcc" (actually clang) and accept an agreement? | 12:35 | |
Ulti | orly | 12:36 | |
I'll try that thanks _itz | |||
12:36
telex joined
|
|||
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 | ||
jees | |||
masak | JEZU | ||
lizmat | masak: well, this is really about the case where the handle is hidden | ||
masak | aha. | ||
Ulti | sure love this opaque OSX updates where they tell you nothing | ||
lizmat | "words".IO.lines | ||
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 | ||
lizmat | and if you're doing $handle.lines(:close) yourself, you get what you indicate | ||
psch | hrm, the getBI/IntStr stuff breaks bag.t..? i can't get *to* the test that i wanted to verify as working... :S | ||
on the plus, allomorphic.t runs about half the tests (and fails about half of that...) | 12:39 | ||
geekosaur seeing email indicating that apple pushed xcode 7 | 12:41 | ||
12:43
telex left
12:44
telex joined
|
|||
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:46 | |
FROGGS | geekosaur: sounds fun | 12:47 | |
geekosaur | pretty much par for apple :/ | ||
FROGGS | yeah, heard that already | ||
12:50
sufrostico joined
|
|||
[Coke] | I did the xcode upgrade but haven't lost anything in macports yet, thankfully. | 12:52 | |
12:53
abaugher joined
|
|||
psch | well, i have a getBI implementation that works with &val | 12:57 | |
it doesn't work quite right with angle-quoted lists, though... | |||
[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 | ||
[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. | ||
maybe on moar, I would expect that to kill jvm stuff. | |||
rindolf | Hi all! Running «perl6 prob329-shlomif.p6» gives me these warnings - why? www.shlomifish.org/Files/files/text...rnings.txt | ||
I've recently updated my rakudobrew and then the trouble started. | 13:00 | ||
[Coke] | relink to the script? | ||
psch | $ ./perl6-j -e'for "0", "1", "2" { print val($_).Int ~ " " }; print "\t"; for <0 1 2> { print .Int ~ " " }; say()' | 13:04 | |
0 1 2 1 1 1 | |||
that's just weird :/ | |||
rindolf | [Coke]: here - github.com/perl6/perl6-examples/bl...shlomif.p6 | ||
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>? | ||
Or just <0>, even | |||
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 » | ||
arnsholt | It's a JVM bug | ||
FROGGS | m: say my @init_probab = (0, (map { FatRat.new(1, 500) }, 1 .. 500) , 0); | ||
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 …» | ||
FROGGS | m: say my @init_probab = flat (0, (map { FatRat.new(1, 500) }, 1 .. 500) , 0); | ||
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…» | ||
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. | ||
FROGGS | rindolf: do that ^^ | ||
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 | ||
FROGGS | add a 'flat' after the assignment op to line 9, 11, 12 and 30 | ||
rindolf | FROGGS: is this the correct behaviour? | ||
FROGGS | rindolf: yes | ||
rindolf | FROGGS: oh. | ||
psch | arnsholt: $ ./perl6-j -e'for <0>, <1>, <2> { print .Int ~ " " }; say()' | 13:08 | |
1 1 1 | |||
rindolf | FROGGS: didn't it break the code of all the world and his mother? | ||
FROGGS | rindolf: yes | ||
[Coke] | rindolf: @p_letter only has 4 elements in it. | ||
psch | ShimmerFairy: well, yeah, it's vm-level, but it's apparently not in the ops impl | ||
13:08
telex left
|
|||
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 | |
13:10
rarara joined
|
|||
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. | |||
ShimmerFairy | psch: I assume the weird "1 1 1" thing doesn't happen with RatStrs or anything? | ||
13:10
telex joined
|
|||
dalek | kudo/nom: 328a03a | lizmat++ | src/core/IO/Handle.pm: Make 'for "words".IO.lines' about 25% faster Basically the same opt done for '"words".IO.lines.elems' |
13:10 | |
psch | $ ./perl6-j -e'print <0>.WHAT.gist, " ", val("0").WHAT.gist, " "; say <0>.WHAT =:= val("0").WHAT' | 13:11 | |
(IntStr) (IntStr) True | |||
arnsholt: ^^^ | |||
arnsholt | Very, very weird | 13:12 | |
FROGGS | j: for "0", "1", "2" { print val($_).Int ~ " " }; print "\t"; for <0 1 2> { print .Int ~ " " }; say() | ||
camelia | rakudo-jvm 96c65b: OUTPUT«java.lang.NullPointerException in block <unit> at /tmp/J6cm3OijYG:1» | ||
psch | FROGGS: i can push what i have, but... | ||
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 | |
13:13
Peter_R left,
Peter__R joined
|
|||
psch | FROGGS: 0 1 2 1 1 1 | 13:14 | |
FROGGS | ohh, print was stupid there... | ||
psch: would be interesting to know what $_ is the second loop... | |||
psch | oh | ||
miscopied | |||
FROGGS | its type and its .WHICH | ||
no, .WHERE | |||
psch | $ ./perl6-j -e'for "0", "1", "2" { print val($_).Int ~ " " }; print "\t"; for <0 1 2> { print .^name, " ", .WHERE, " ", .Int ~ " " }; say()' | 13:16 | |
0 1 2 IntStr 1367725438 1 IntStr 696478978 1 IntStr 1936307096 1 | |||
that good? :S | |||
ShimmerFairy | psch: Here's a silly idea: <1 2 3>.map: { val(~$_) } :) | ||
psch | ShimmerFairy: well, that works - <>-quoting gives the right .Str but the wrong .Int here | 13:17 | |
$ ./perl6 -e'<1 2 3>.map: { print val(~$_).Int, " " }; say()' | 13:18 | ||
1 2 3 | |||
$ ./perl6 -e'<1 2 3>.map: { print val(~($_.Int)).Int, " " }; say()' | |||
1 1 1 | |||
13:18
larion joined
|
|||
psch | ^^^ as seen there :l | 13:18 | |
lizmat | cycling& | 13:19 | |
ShimmerFairy | psch: oh! try something like my ($a, $b, $c) = (1, 2, 3); for «$a $b $c» { print .Int ~ " " }; say() | ||
FROGGS | hmmm | 13:21 | |
psch | ShimmerFairy: 1 1 1 | ||
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:22 | |
13:26
telex left,
khw joined,
telex joined,
telex left
13:27
colomon left
|
|||
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%_» | ||
FROGGS | j: use nqp; my $a = 42; say $a.WHERE; say nqp::add_I(nqp::decont($a), 0, IntStr).Int | ||
camelia | rakudo-jvm 96c65b: OUTPUT«72803454642» | ||
FROGGS | ahh | ||
13:28
telex joined
|
|||
FROGGS | phew | 13:28 | |
j: use nqp; my $a = 42; say $a.WHERE; say nqp::add_I(nqp::decont($a), 0, IntStr).Int.WHERE | |||
camelia | rakudo-jvm 96c65b: OUTPUT«4559792651826478070» | ||
13:29
colomon joined,
rarara left
|
|||
dalek | pan style="color: #395be5">perl6-examples: 07cf4eb | (Shlomi Fish)++ | categories/euler/prob329-shlomif.p6: Fix the code on recent versions of Rakudo. |
13:34 | |
13:35
nucp6 left
|
|||
timotimo | o/ everyone | 13:37 | |
13:37
FROGGS left
13:40
mspo joined
|
|||
psch | hi timotimo o/ | 13:40 | |
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 | |
13:43
thou joined
|
|||
mspo | is it possible to pre-fetch everything outside of the build steps? | 13:43 | |
Ulti | /win/win 2 | 13:46 | |
:( | |||
13:46
simcop2387 left,
zostay joined
13:47
brrt left
|
|||
masak | Ulti: it's one of those /win/win situations... :P | 13:49 | |
13:49
telex left
13:50
telex joined
|
|||
[Coke] | mspo: star already prefetches most things. | 13:51 | |
the .tar file should have everything needed to install. | |||
13:51
simcop2387 joined,
muraiki joined
|
|||
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 | ||
mspo | [Coke]: this is not great for pkg systems :) | ||
[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 | ||
[Coke] | or are you building from rakudo-star.2015.mumb... | ||
13:55
thou left
|
|||
mspo | let me do a fresh build and clarify what I"m asking; sorry for the noise so far | 13:55 | |
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:57 | |
jnthn | EVAL | 13:58 | |
14:01
Loren joined
|
|||
Loren | m: sprintf("In my perl6, sprintf not work ."); | 14:01 | |
camelia | ( no output ) | ||
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 | ||
pink_mist | sprintf "%o", $num; | 14:02 | |
muraiki | hah, duh. thanks! | ||
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 | ||
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 | ||
mspo | [Coke]: I'm talking about this: | 14:05 | |
--gen-moar[=branch] | |||
Download and build a copy of MoarVM | |||
--gen-nqp[=branch] | |||
Download and build a copy of NQP | |||
[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 ."); | ||
camelia | rakudo-moar 328a03: OUTPUT«In my perl6, sprintf not work .» | ||
pink_mist | Loren: you forgot to print | ||
Loren | ... | 14:07 | |
OH ,my bad... | |||
psch | m: "50".base(8).say | ||
camelia | rakudo-moar 328a03: OUTPUT«Method 'base' not found for invocant of class 'Str' in block <unit> at /tmp/mteoQKwHva:1» | ||
psch | m: 50.base(8).say | ||
camelia | rakudo-moar 328a03: OUTPUT«62» | ||
pink_mist | psch: nice | 14:08 | |
psch | m: :8("0777").Int.base(8).say # round-trip Str -> Str | ||
camelia | rakudo-moar 328a03: OUTPUT«777» | ||
14:08
rindolf left
|
|||
psch | oh the .Int is superfluous too i think | 14:09 | |
m: :8("0777").base(8).say # round-trip Str -> Str | |||
camelia | rakudo-moar 328a03: OUTPUT«777» | ||
Loren | I just saw the sample, forgot it was 'sprintf'! | ||
14:09
perl6_newbee joined
14:10
telex left
|
|||
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 | ||
psch | jnthn++ # for the reason *why* you want to pay attention :) | 14:11 | |
14:12
FROGGS joined,
telex joined,
Peter__R left
14:14
Sqirrel left
|
|||
FROGGS | o/ | 14:15 | |
Loren | ~_~ | 14:19 | |
14:23
lolisa joined
14:25
lolisa left
|
|||
psch | gist.github.com/peschwa/09f512e0a3f95a90dc81 | 14:26 | |
i'm out of ideas | |||
14:26
telex left
14:27
vendethiel left
|
|||
moritz | psch: what does .Str.say give you? | 14:27 | |
psch | moritz: the right values, i.e. "0 1 2" in this case | 14:28 | |
14:28
telex joined
|
|||
moritz | psch: so that means the Int component is wrong? | 14:28 | |
also IMHO it would be better to still emit a QAST::Want | |||
psch | moritz: well, that's the thing. it's only wrong through <> | ||
moritz: call &val directly works | 14:29 | ||
+ing | |||
moritz | QAST::Want($IntStr, 'i', $int_value, 's', $str_value) | ||
psch | moritz: there's a bit more in the backlog, about an hour ago | ||
moritz | ah yes | 14:30 | |
14:30
skids joined
14:32
jack_rabbit_ left
14:35
telex left
14:36
telex joined,
telex left
14:38
telex joined
|
|||
erxeto | moritz: by any chance are you the author of DBIish ? | 14:40 | |
moritz | erxeto: one of the maintainers, yes | ||
the original author was mberends, back when it was called MiniDBI | |||
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 | |
Just wanted to know if this is mantained (meaning eventually fixed) or not. | |||
I'm just trying to start with perl6, so is not really an issue. | 14:42 | ||
moritz | erxeto: yes, it's maintained | ||
erxeto | this is the issue I'm talking about (just FYI): github.com/perl6/DBIish/issues/19 | 14:43 | |
moritz | erxeto: which version of rakudo are you using? | 14:46 | |
erxeto | $ perl6 -v | 14:47 | |
This is perl6 version 2015.09 built on MoarVM version 2015.09 | |||
14:47
lichtkind joined
|
|||
moritz | erxeto: excellent | 14:48 | |
erxeto | excellent ? | ||
moritz | erxeto: you rakudo isn't too old | ||
14:48
g6 left
|
|||
moritz | erxeto: and it's the rakudo I'll test with | 14:48 | |
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 | ||
psch | heh, at least allomorphs.t doesn't look that much better on moar :S | ||
Failed tests: 37-38, 40, 42-45 | |||
Parse errors: Bad plan. You planned 93 tests but ran 45. | |||
still... | |||
moritz | FROGGS: has 'require' stopped working? | 14:50 | |
FROGGS | moritz: dont think so | 14:51 | |
moritz: we have working tests for it | |||
moritz | FROGGS: perlpunks.de/paste/show/55fc2506.7e9c.2e3 | ||
FROGGS | huh | 14:52 | |
ohh, I think I know... | |||
_itz | I thought panda without args used to do --help | 14:53 | |
FROGGS | moritz: this might be to blame: github.com/rakudo/rakudo/commit/a9...6fd805b59f | ||
_itz: install is the default no | |||
now* | |||
14:54
Sqirrel joined,
telex left
|
|||
_itz | I mean if I type "panda" it doesn't do anything which isn't helpful for a new user | 14:54 | |
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 | ||
FROGGS | _itz: easily fixable though | ||
moritz: :S | |||
14:55
telex joined
|
|||
FROGGS | moritz: but yeah, makes sense | 14:55 | |
14:55
telex left
|
|||
erxeto | huh, I was thinking in say nothing. Just thought it was my mistake hehehe. | 14:56 | |
14:56
telex joined
|
|||
moritz | I'll rakudobug it. | 14:56 | |
RT #126096 | 14:58 | ||
[Coke] | mspo: again, are you building from a .tar.gz release of star, or from star in the github repo? | 15:01 | |
psch: I'm sure you have something already, but here's my current jvm failures: gist.github.com/coke/e590a53cc4c3e2a75cfd | |||
S17-supply/syntax.t never exited, had to kill it, but passed 50 tests regardless. | 15:02 | ||
15:03
telex left
|
|||
[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 | |
15:04
telex joined,
telex left
|
|||
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:05 | |
15:06
telex joined
|
|||
psch | i'm fairly confident that <>-handling of Ints is behind quite a lot of failures outside of S02-types/allomorphs.t | 15:06 | |
15:08
synbot6 joined
15:09
diana_olhovik left
|
|||
[Coke] is hoping that stress test will be clear once spectest is. | 15:09 | ||
15:09
rurban left
|
|||
[Coke] | mspo: you can absolutely check out things in advance instead of letting Configure.pl do it for you - for example: | 15:10 | |
github.com/coke/perl6-roast-data/b...oar-jit.sh | |||
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:11 | ||
(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:12 | ||
15:14
telex left,
telex joined
|
|||
mspo | [Coke]: from the tar.gz, maybe it does actually have everything already | 15:14 | |
[Coke]: I'm not noticing any downloads despite the messages | 15:15 | ||
15:15
DrForr joined
|
|||
Skarsnik | hm, what is the proper method to test if a Str contain only number? | 15:16 | |
PerlJam | Skarsnik: depends on what you mean by "number" | 15:17 | |
DrForr waves weakly. | |||
[Coke] | psch: with a java build, does this work for you: | ||
_itz | DrForr++ | ||
[Coke] | prove -v -e t/fudgeandrun t/spec/S05-substitution/subst.t | ||
15:17
Loren left
|
|||
Skarsnik | only digit (no stuff like 3.000) | 15:17 | |
moritz | Skarsnik: is "0xFF" a valid number for you? | 15:18 | |
15:18
Loren joined
|
|||
moritz | if not, probably $str ~~ / ^ <[0..9]>+ $ / | 15:18 | |
Skarsnik | Not in this case, but I get the prob with this question ~~ | ||
moritz | if yes, defined $str.Int | ||
[Coke] | ahh, need to make install first. bah. | 15:19 | |
PerlJam | Skarsnik: I might've used $str !~~ / \D /; | ||
ugexe | what about 0002 | ||
[Coke] | psch: doing a verbose run on the tests with failures. | ||
15:21
mr_ron joined,
rurban joined,
rurban left
|
|||
Skarsnik | $str.Int crash if $str has no number ~~ | 15:21 | |
TimToady | Morning has broken; anyone have some glue? | ||
mr_ron | m: 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)» | ||
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) | ||
DrForr | No glue, but I can offer a few titanium screws. | ||
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? | ||
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 | ||
PerlJam | mr_ron: I don't think reserved2 is breakage. | ||
TimToady | DrForr!!! You can keep your screws!!! Did you make it home? | ||
DrForr | Sitting up in bed as I type. | 15:25 | |
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> / | ||
should we allow kebab case in character classes for grammars? | 15:27 | ||
ugexe | mr_ron: ive had that problem as well | ||
psch | phew | ||
found the culprit for the IntStr breakage. Ops.java:5995 silently binds into a native_str slot | 15:28 | ||
[Coke]: any specific file you'd prefer me to run? | |||
PerlJam | mr_ron: Also read S05:1413 | ||
synbot6 | Link: design.perl6.org/S05.html#line_1413 | ||
[Coke] | psch: no, I figured out my damage with the prove line. | 15:29 | |
TimToady | mr_ron: I think kebab case should be allowed, and we can just require space for disambiguation, as in normal code | 15:31 | |
15:31
rurban1 joined
|
|||
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? | ||
DrForr | blogs.perl.org. | 15:33 | |
jdv79 | is it broke? | ||
PerlJam | mr_ron: Actually, I don't think your gist is elucidating any problems with regex, but rather with your code. | ||
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 | ||
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
15:37
telex left
15:38
telex joined
|
|||
mr_ron | m: 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» | ||
PerlJam | aye, that's clearly a bug | ||
15:39
rurban1 left
|
|||
mr_ron | So we do kebab case for simple scenario but combined seems to break. Correct? | 15:40 | |
[Coke] | psch: gist.github.com/coke/e590a53cc4c3e...erbose-out | 15:41 | |
grondilu still gets 'JIT isn't supported on arm-linux-gnueabihf-thread-multi-64int yet. | 15:42 | ||
' on his Raspberry Pi 2 | |||
timotimo | hm, would you have to --no-jit for moarvm? | ||
we should probably just warn and build the jitless version regardlesss | 15:43 | ||
psch | [Coke]: what am i looking for..? | ||
[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 ~~ | ||
_itz | jit is amd64 only? I guess Configure.pl should know this | ||
timotimo | Skarsnik: perhaps it prefers ipv6 and your ipv6 connectivity isn't awesome? | ||
psch | [Coke]: oh, thanks. i'm getting closer to fixing IntStr though, so i guess that'll change a bit anyway... :) | ||
geekosaur | Skarsnik, that delay makes me think something wonky with DNS | 15:45 | |
FROGGS | moritz: I think I've got a fix | 15:46 | |
Skarsnik | well, if I replace with wget call, there is no issue ~~ | 15:48 | |
15:49
domidumont left
|
|||
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? | ||
it uses a grammar for cookies i think... might be some backtracking going on | 15:51 | ||
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:52 | |
_itz | Ulti: it should work | 15:53 | |
Skarsnik | ugexe, there should be none. I just get on a page that return some json | 15:54 | |
ugexe | is it an https proxy? | 15:55 | |
_itz | no | 15:56 | |
grondilu | just to be clear : it's just a warning message. The builds goes through. Only without JIT. | ||
mr_ron | m: grammar G { token TOP { <+ kebab-case> }; token kebab-case { <[a]> } }; G.parse('aaa'); | ||
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» | ||
mr_ron | PerlJam: a simplified version of the bug - yes? | 15:57 | |
skids | mr_ron: well golfed. | 15:58 | |
PerlJam | mr_ron: indeed | ||
16:00
Peter_R joined,
Peter_R left
16:01
telex left
16:02
telex joined
|
|||
TimToady | m: grammar G { token TOP { <+ :kebab-case> }; token kebab-case { <[a]> } }; G.parse('aaa'); | 16:03 | |
camelia | ( no output ) | ||
16:03
mullagainn left
|
|||
TimToady | m: grammar G { token TOP { <+ :kebab-case> }; token kebab-case { <[a]> } }; say G.parse('aaa'); | 16:04 | |
camelia | rakudo-moar 328a03: OUTPUT«(Any)» | ||
Skarsnik | ugexe, if you are curious pastebin.com/GY9M25Vp | 16:05 | |
16:05
captain-adequate joined
|
|||
timotimo | FROGGS: oh, i thought grondilu said his build wasn't working; okay | 16:06 | |
grondilu: feel free to try to build an arm-based jit :) | 16:07 | ||
16:09
telex left,
telex joined
16:10
telex left,
araujo left
|
|||
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>» | ||
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
16:13
araujo joined,
araujo left
|
|||
dalek | p: 5848638 | TimToady++ | src/QRegex/P6Regex/Grammar.nqp: allow <+ mr_ron> to be <+ mr-ron> too |
16:14 | |
16:17
travis-ci joined
|
|||
travis-ci | NQP build failed. TimToady 'allow <+ mr_ron> to be <+ mr-ron> too' | 16:17 | |
travis-ci.org/perl6/nqp/builds/81043051 github.com/perl6/nqp/compare/9a53b...48638c16ca | |||
16:17
travis-ci left
|
|||
DrForr | I need to get travis running on my builds too... | 16:18 | |
16:18
araujo joined,
araujo left,
araujo joined
16:19
araujo left
16:20
pdcawley left,
telex left
16:22
telex joined
16:24
vendethiel joined
16:25
cognominal left
|
|||
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«()» | ||
TimToady | >> would work only on positionals? | 16:26 | |
16:28
Peter_R joined
|
|||
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]» | ||
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,
araujo left
16:33
domidumont joined,
Loren left,
telex left
16:34
telex joined,
telex left,
domidumont left
16:35
domidumont joined
16:36
telex joined,
araujo joined
16:37
araujo left
16:40
larion left
|
|||
andreoss | >> breaks the order of elements | 16:41 | |
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)» | ||
andreoss | hm | 16:43 | |
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; | ||
camelia | rakudo-moar 328a03: OUTPUT«(1, 2, 3, 4, "a", "b", "c", "d")» | ||
16:45
telex left
|
|||
TimToady | .perl sorts | 16:45 | |
16:46
telex joined,
telex left
16:48
telex joined
16:50
Peter_R left
|
|||
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
|
|||
uvtc | Is anyone keeping a running log of ecosystem's `wc -l META.list`? | 16:51 | |
timotimo | huh, what happened to the nqp build? | 16:52 | |
TimToady | I thought I proved it wasn't my patch, but let me doublecheck | 16:53 | |
timotimo | oh, ok | ||
andreoss | can it be done without extra token? | ||
PerlJam | uvtc: git has a log of it if you know how to ask | ||
TimToady | yeah, was already failing before my patch | 16:54 | |
well, make test was failing, it was building fine | 16:55 | ||
timotimo tries | |||
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). | ||
TimToady | does travis run make test? | ||
timotimo | ah, yes | 16:56 | |
ooooh | 16:57 | ||
nqp builds with MVM_SPESH_NODELAY=1 by now! | |||
16:57
uvtc left
17:02
cognominal joined
17:04
nwc10 joined
|
|||
dalek | ast: 838b9c1 | TimToady++ | S05-metasyntax/charset.t: check kebab-case in character classes |
17:06 | |
17:07
larion joined
17:08
araujo joined
17:09
telex left
17:10
telex joined
17:12
Peter_R joined
|
|||
dalek | rl6-roast-data: 7dfda69 | coke++ | / (9 files): today (automated commit) |
17:13 | |
nwc10 | TimToady: for me, commit 5848638c16cabe9d2e4ae288bd23796b103ea9ea breaks the NQP build. | 17:14 | |
the compile of gen/moar/stage2/NQPP5QRegex.nqp explodes with a backtrace | |||
Cannot find method 'quote_escape-stopper-starter' at <unknown>:1 (./NQPHLL.moarvm:quote_atom:127) | |||
... | 17:15 | ||
moritz | travis-ci said as much | 17:18 | |
17:18
Sqirrel left
17:22
Peter_R left
17:23
espadrine left
|
|||
TimToady | okay, that'll need whitespace now; dunno why it didn't blow up here | 17:27 | |
17:28
telex left,
telex joined
17:31
Peter_R joined
17:33
Peter_R left
|
|||
dalek | p: a2c0550 | TimToady++ | src/HLL/Grammar.nqp: remove accidental kebab from cclass |
17:34 | |
japhb | *yawn* | 17:35 | |
So what remains of the GLR fallout? Just JVM needing work? | 17:36 | ||
Anyone have a rough idea of how the ecosystem is doing? | 17:37 | ||
17:37
rindolf joined,
telex left
|
|||
japhb | Oh, I guess ++jnthn has more he wanted to add to S07. | 17:37 | |
TimToady | we're still auditing various listops to see which ones should be more one-arg-y | 17:38 | |
17:38
telex joined,
travis-ci joined
|
|||
travis-ci | NQP build passed. TimToady 'remove accidental kebab from cclass' | 17:38 | |
travis-ci.org/perl6/nqp/builds/81055798 github.com/perl6/nqp/compare/58486...c05500a1f0 | |||
17:38
travis-ci left,
Peter_R joined
|
|||
timotimo | accident all the kebab! | 17:40 | |
nwc10 | TimToady: yes, that fixes it for me. | ||
TimToady | travis said as much :P | 17:41 | |
17:41
Sqirrel joined
17:44
Peter_R left,
andreoss left
|
|||
dalek | kudo/nom: 74420e5 | TimToady++ | tools/build/NQP_REVISION: bump NQP to get <+ mr-ron> fix |
17:45 | |
kudo/nom: 38846d9 | TimToady++ | tools/build/NQP_REVISION: Revert "bump NQP to get <+ mr-ron> fix" This reverts commit ad27f74e734ed7bf0e6d89c8b4f335ae035393db. |
|||
kudo/nom: ff9c09f | TimToady++ | tools/build/NQP_REVISION: bump NQP to get kebab-related fixes |
|||
[Tux] | test 50000 36.936 36.856 | ||
test-t 50000 39.453 39.373 | |||
TimToady | mr_ron++ | ||
skids | (or + mr-ron as the case may be) | 17:48 | |
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:49 | |
17:49
telex left
17:50
telex joined
17:54
Peter_R joined
17:58
Peter_R left
17:59
telex left
18:00
Peter_R joined,
telex joined
18:02
raiph left
18:14
Gruber is now known as Grrrr,
Sqirrel_ joined,
Sqirrel left
|
|||
mr_ron | m: 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» | ||
mr_ron | worked on my system at home ... | ||
[Coke] | j: use Test; is-deeply(<a>, 'a') | ||
camelia | ( no output ) | ||
[Coke] | m: use Test; is-deeply(<a>, 'a') | 18:17 | |
camelia | rakudo-moar 328a03: OUTPUT«ok 1 - » | ||
18:17
telex left
18:18
perl6_newbee left,
telex joined
18:19
leont joined
|
|||
PerlJam | mr_ron: you should make a little parser that translates from the notation used in RFC3986 to Perl 6 regex | 18:19 | |
mr_ron: oh, and it mayn't have worked here because camelia hasn't updated yet. | 18:22 | ||
[Coke] | p6: say nqp::p6box_n(nqp::time_n); | 18:24 | |
camelia | rakudo-moar ff9c09: OUTPUT«1442600680.11175» | ||
[Coke] | j: say nqp::p6box_n(nqp::time_n) | ||
camelia | rakudo-jvm ff9c09: OUTPUT«===SORRY!===java.lang.NullPointerException» | ||
[Coke] | j: say nqp::time_n | 18:25 | |
camelia | rakudo-jvm ff9c09: OUTPUT«===SORRY!===java.lang.NullPointerException» | ||
[Coke] | j: nqp::time_n | ||
camelia | rakudo-jvm ff9c09: OUTPUT«===SORRY!===java.lang.NullPointerException» | ||
[Coke] | "welp, there's yer problem." | ||
dalek | ast: 13af7d6 | lizmat++ | S02-types/bag.t: Make S02-types/bag.t at least compile |
18:26 | |
[Coke] | m: nqp::barf; | 18:27 | |
camelia | rakudo-moar ff9c09: OUTPUT«===SORRY!===No registered operation handler for 'barf'» | ||
[Coke] | j: nqp::barf; | ||
camelia | rakudo-jvm ff9c09: OUTPUT«===SORRY!===java.lang.NullPointerException» | ||
18:30
telex left
|
|||
_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 | ast: 95a921a | TimToady++ | S02-types/bag.t: don't need both flat and subsig |
||
18:32
telex joined
18:33
larion left
18:34
rurban left
|
|||
japhb | _itz: *@a where * > 0 | 18:37 | |
(Can be shorter, but that's one of the clearer methods) | |||
_itz | ah yes thanks | 18:39 | |
dalek | kudo/nom: 72f58f7 | FROGGS++ | src/core/CompUnitRepo (2 files): let CURLF respect :file, fixes RT #126096 |
18:43 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126096 | ||
moritz | where ?* # shorter, less clear | ||
FROGGS | umm | 18:45 | |
18:47
telex left
|
|||
PerlJam | can't you just make the slurpy a required parameter? | 18:47 | |
TimToady | where @a | ||
er, where +@a | |||
er, nevermind | |||
where ?@a is slightly clearer than ?* | 18:48 | ||
18:48
telex_ joined
|
|||
TimToady misses his coffee sometimes... | 18:48 | ||
PerlJam | _itz: why do you want "at least one" anyway? | ||
18:49
telex_ is now known as telex
|
|||
lizmat | TimToady: can't handle coffee anymore either, found tea to be a good substitute :-) | 18:49 | |
FROGGS | m: my $module = "Test"; require ::($module) | ||
camelia | ( no output ) | ||
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:1Actually thrown at: in block <unit> at /tmp/5fceaqZy0W:1» | ||
FROGGS | m: my $module = "Test"; require ::($module); import ::($module); ::("&ok")(1, "...") | ||
camelia | rakudo-moar ff9c09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mQrangPm3SCould not find module ::($module) to import symbols fromat /tmp/mQrangPm3S:1------> 3 require ::($module); import ::($module)7⏏5; ::("&ok")(1, "...")» | ||
FROGGS | m: my $module = "Test"; require ::($module); import $module; ::("&ok")(1, "...") | ||
camelia | rakudo-moar ff9c09: OUTPUT«5===SORRY!5=== Error while compiling /tmp/8NR1vyaT15Undeclared routine: import used at line 1» | ||
FROGGS | moritz: that code here is invalid: github.com/perl6/DBIish/blob/maste...sh.pm6#L14 | 18:51 | |
moritz: it just happened to work by accident | |||
moritz | FROGGS: how so? | ||
FROGGS | require $foo, or require "foo" is always about a path | ||
require ::($foo) is about a symbol | 18:52 | ||
18:52
larion joined
|
|||
moritz | FROGGS: since when? | 18:52 | |
FROGGS: also, it makes no sense at all to me | |||
FROGGS | 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
telex left
|
|||
dalek | kudo/nom: aed3f93 | lizmat++ | src/core/IO/Handle.pm: We don't need no nqp::not_i By rearranging the code, we made lines again a few percent faster. |
18:53 | |
ast: 76adbe5 | usev6++ | S32-list/minmax.t: Add tests for RT #112250 |
18:54 | ||
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=112250 | ||
FROGGS | moritz: ::($foo) compiles to longname, like Foo::Bar does... | ||
it is not only for looking up existing symbols | |||
_itz | PerlJam: because I want usage with no args and the slurpy matches that case | 18:55 | |
18:55
telex joined,
telex left
|
|||
lizmat | _itz: merged | 18:55 | |
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
|
|||
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 | |
or with unicode package names and another representation on disk | |||
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 | |
FROGGS: I expect to be in a flow again by next week | |||
FROGGS | lizmat: just wanted to tell somebody, in case I forget :o) | 19:00 | |
19:00
sufrostico left
|
|||
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; | ||
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. | ||
moritz | PerlJam: you mean "different operations should have different operators" | 19:03 | |
PerlJam | moritz: ding! | ||
moritz | where "loading by file name" and "loading by symbol" are different operations | ||
I always hated that require behavior in p5 | |||
FROGGS | well... the symbols boils down to a file also | ||
moritz | everything boils down to bits and bytes | ||
FROGGS | hehe | 19:04 | |
moritz | and yet we still distinguish Int and Str | ||
FROGGS | IntStr /o/ | ||
psch grumbls | |||
FROGGS | :D | ||
19:04
domidumont1 joined
|
|||
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:05 | |
19:06
telex left
|
|||
FROGGS | hmmm, I still think that these operations are too similar to not be split into several names | 19:07 | |
19:07
domidumont left
|
|||
moritz | I still find it surprising that "require Symbol" and "require $thing" treat their arguments quite differently | 19:08 | |
19:08
telex joined
|
|||
moritz | ah well | 19:08 | |
moritz lets it rest | |||
[Coke] | psch: not being able to run nqp::time_n is part of the problem, did you see that? | ||
FROGGS | that is just there to allow 'require "foo/bar.pm"', which might be the common case | 19:09 | |
moritz | FROGGS: it might? really? | ||
FROGGS | I think so | ||
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 | ||
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 | ||
camelia | rakudo-jvm ff9c09: OUTPUT«===SORRY!===java.lang.NullPointerException» | ||
[Coke] | ^^ that opcode is used in is-deeply. | ||
so every call to is-deeply is probably dying. | |||
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()' | ||
1.44260353391E9 | |||
psch seems to accidentally have fixed that | |||
i'm runnig spectest right now, for a hopefully-actually-finally-correct getBI (and makeBI) implementation | |||
FROGGS | psch: also works on my box... that jamelia here is a bit picky | 19:13 | |
psch++ | |||
psch | FROGGS: well, it's running a pretty wonky getBI implementation right now :/ | ||
FROGGS | moritz: I have no strong feelings about 'require STRING' btw, I just a feeling about changing things at this time | ||
:S | 19:14 | ||
[Coke] | psch - if you leave off the use nqp;, you get a LTA failure. | ||
... 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... | ||
FROGGS | [Coke]: still works here | ||
19:20
colomon left,
Possum joined
19:24
rurban joined
19:27
sufrostico joined,
telex left,
zakharyas joined
|
|||
dalek | ast: f5a77ba | usev6++ | S06-other/main-usage.t: Add test for RT #119001 |
19:27 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=119001 | ||
19:28
telex joined
19:35
Andrie joined
|
|||
bartolin | m: say 0.9999999999999999999999.perl # from RT #126016; haven't seen this one before | 19:38 | |
synbot6 | Link: rt.perl.org/rt3/Public/Bug/Display...?id=126016 | ||
camelia | rakudo-moar aed3f9: OUTPUT«0.A» | ||
pink_mist | 0_o A? | 19:39 | |
19:39
rurban left
|
|||
geekosaur | hex? | 19:39 | |
and o.O indeed | |||
bartolin | star-m: say 0.9999999999999999999999.perl | 19:40 | |
camelia | star-m 2015.03: OUTPUT«0.10» | ||
19:40
telex left
19:41
FROGGS left,
Andrie left,
FROGGS joined
19:42
telex joined
|
|||
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? | ||
psch | hrm, spectest started hanging somewhere | 19:44 | |
FROGGS | ugexe: dunno, different files need different treatments... thinking of bin/ lib/ and resoures | ||
ugexe: how would that work with .content? | |||
psch | S02-literals/allomorphics.t also dies at the second test... | ||
ugexe | yea i ran into that last night as well | ||
psch | apparently <0> and val("0") are somehow very different..? | ||
i'm gonna let this sit for the night o/ | |||
ugexe | although anything in lib/ that was in `provides` would be accessable | 19:45 | |
FROGGS | sleep val, psch++ | ||
19:45
oskie joined
|
|||
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? | ||
dalek | Iish: 08d218e | moritz++ | lib/DBIish.pm6: Fix "require" syntax. FROGGS++. Closes #19 |
19:46 | |
flussence | there aren't intermediate files, at least currently | ||
moritz | oskie: just in memory, unless you you explicitly precompile | ||
PerlJam | oskie: why do you ask? | ||
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...) | ||
oskie | i ask only to try to learn stuff. it's confusing, compilers, intermediate formats, VMs, etc | ||
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 | ||
flussence | (it used to precompile, but that was removed for a rewrite and hasn't been put back) | ||
ugexe | bin/ and hooks/ were the 2 i could not determine how to handle | ||
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 | |
19:49
nwc10 left
19:50
zakharyas left
|
|||
flussence | that's easy, same as p5. -I and "use lib" work exactly the same way if you need to run unpackaged modules | 19:50 | |
[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:51
telex left
19:52
telex joined
|
|||
jdv79 | so is the release coke did the beta? | 19:52 | |
dalek | kudo/nom: 719a90f | FROGGS++ | src/core/CompUnitRepo/Local/File.pm: handle META6.json files in CURLF That means we finally can have full unicode package names put into the META6.json in the provides section, but let that entry point to a file containing e.g. ASCII characters only. If one does -I/directory where the META6.json is in there, the mapping of package names to file paths will work out. This does not affect the current way of including -I/directory/lib directly, as this will not know about a META6.json. |
||
PerlJam | Why is is_approx() still in Test.pm? I would have thought it deprecated in favor of is-approx(). | ||
[Coke] | probably missed. | 19:53 | |
FROGGS | ugexe: we need to install the wrappers of the stuff in bin/ as we currently do in CURLI | ||
[Coke] | everything else was kebab'd. | ||
flussence | FROGGS: that commit... does that mean I can prove -e perl6 instead of prove -e 'perl6 -Ilib' now? | ||
PerlJam | There is an is-approx too, but there's also is_approx (with no deprecation notice) | 19:54 | |
jdv79 | [Coke]: ? | ||
FROGGS | flussence: if there is an implicit -I. | ||
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 | ||
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" | ||
flussence | I'll try it now, just to see what happens :) | ||
FROGGS | ugexe: what if you want to shell out to the scripts of your dist? then you'd need its actual path | ||
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 | ||
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™ | ||
though, both go kinda hand in hand | |||
mst: he said, "2015, most likely, maybe", or some such :o) | 19:58 | ||
unless, you know, stuff like buses happen | |||
mst | FROGGS: that was about perl6 | ||
FROGGS: it's TimToady's birthday I'm talking about :) | |||
(helps if you read the line I'm replying to) | |||
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 | ||
mst | FROGGS: suuure, people keep saying that, but until he confirms it I don't believe you | ||
FROGGS | mst: and I still think it can only be about both, you can't release a language without an implementation and vice versa | ||
mst | what? | ||
larry's birthday is neither a language nor an implementation | 20:00 | ||
I don't understand what you're trying to tell me | |||
20:00
domidumont1 left
|
|||
jdv79 | anyway... thanks. | 20:00 | |
bartolin | PerlJam: (is-approx) I don't know about details, but I vaguely remembered this commit: 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 | ||
FROGGS | mst: ohh, both meant 'compiler and language spec' | ||
mst | FROGGS: yeah, but I wasn't addressing either of those :D | ||
FROGGS | mst: ahh :o) | 20:01 | |
PerlJam | FROGGS: Perl 5 was released without a language spec many many many times :) | ||
[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. | ||
mst | FROGGS: all I was doing was making a joke in response to < jdv79> its near TimToady's bday is it not? | ||
[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 | |
20:02
telex left
|
|||
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
|
|||
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:02 | |
20:02
telex left
|
|||
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) | ||
[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. | ||
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
|
|||
masak | oh, I agree there are unanswered questions and that this hasn't been discussed/planned enough. | 20:04 | |
[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 | ||
[Coke]: yes | |||
[Coke]: test by test at leastrr | |||
-rr | |||
[Coke]: github.com/perl6/roast/blob/master/fudge#L86 | 20:06 | ||
20:08
araujo_ joined
|
|||
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:08 | |
FROGGS | PerlJam: let's just not add features that can ever break existing code :o) | 20:09 | |
20:09
darutoko left
|
|||
PerlJam mumbles something about history and doom | 20:09 | ||
[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
araujo left
|
|||
[Coke] | well, plan A: Make larry do it, it's his language. | 20:11 | |
... that won't fly, so let's add jnthn, since he's clever. | |||
after that my plan kind of peters out. What's the 3rd approximation? ;) | |||
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 | ||
roast* | |||
Ulti | I cant tell if its real or not but panda feels a *lot* faster than it used to be | ||
FROGGS | Ulti: also feels faster to me, fwiw | 20:12 | |
Ulti | tadzik++ and everyone doing the GLR and IO optimisations I guess | ||
flussence | it got a faster JSON thing, that probably helped a bit | ||
PerlJam & | |||
FROGGS | Ulti: ohh, maybe that also because it does not precompile anymore? | ||
Ulti | ahhh yeah JSON::Fast | ||
hah so actually its just a big cheater | 20:13 | ||
doing less | |||
FROGGS | aye | ||
:o) | |||
that's how you do it | |||
my wife won't let me though :o( | |||
20:13
telex left
|
|||
Ulti | what cheat or do less :P | 20:14 | |
20:14
telex joined,
rurban joined
|
|||
Ulti | either way its nice to be able to suck down some modules quickly | 20:14 | |
Linenoise is definately doing some compiling though and that was still a lot faster | 20:15 | ||
20:15
rurban left
|
|||
Ulti | like the compiling bit was the slow part for a change | 20:15 | |
FROGGS | Ulti: doing less :o) | ||
[Coke] ponders pursuing a CS/IT related masters, and wonders how to tie that to p6. | 20:17 | ||
Ulti | [Coke] do you mean into language dev or just using P6? | 20:19 | |
jdv79 | [Coke]: why? | 20:20 | |
20:24
telex left,
telex joined
20:25
telex left,
sufrostico left
20:26
telex joined
|
|||
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:30 | |
timotimo | oh hey Ulti | 20:31 | |
were you the one who recently-ish built some code to find prime numbers? | |||
20:32
lea joined
|
|||
prammer | Hello all | 20:33 | |
20:33
sufrostico joined
|
|||
prammer | I'm reading S07, about the single argument rule | 20:33 | |
and how "for @a, { }" is a single iteration | |||
Part me wants the next line to say that "for @a {}" is @a.elems iterations | |||
masak | m: my @a = 1, 2, 3; for @a, { .say } | ||
camelia | rakudo-moar 719a90: OUTPUT«5===SORRY!5===Expression needs parens to avoid gobbling blockat /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 …» | ||
masak | prammer: that seems to need parens | 20:34 | |
m: my @a = 1, 2, 3; for (@a,) { .say } | |||
camelia | rakudo-moar 719a90: OUTPUT«[1 2 3]» | ||
masak | m: my @a = 1, 2, 3; for @a { .say } | ||
camelia | rakudo-moar 719a90: OUTPUT«123» | ||
prammer | masak: so it does. it's in S07 though | ||
20:35
telex left
|
|||
prammer | perhaps S07 should say for (@a,) and right after that show for (@a) and/or for @a | 20:36 | |
20:36
telex joined,
eternaleye joined
|
|||
prammer | just what came to mind when reading it | 20:36 | |
masak | yes, if that's in S07, then it should be changed. | 20:39 | |
flussence | oh and fwiw, "prove -e perl6" in a properly packaged module's dir without -Ilib does indeed work now | 20:41 | |
masak | wow, cool | 20:43 | |
what does the "properly packaged module" expand to in terms of individual steps? | |||
pink_mist | presumably a properly populated META6.json? | 20:44 | |
flussence | yep, just that. | ||
(mv'ing it makes the command stop working right away) | |||
(editing it to have wrong paths does the same too, so it's definitely being read) | 20:45 | ||
20:45
telex left
20:46
telex joined
|
|||
TimToady | rosettacode.org/wiki/Mad_Libs#Perl_6 is kind of amazingly short | 20:47 | |
20:50
timbunce joined
|
|||
[Coke] | jdv79: why what? | 20:50 | |
20:52
telex left,
telex joined,
telex left
|
|||
jdv79 | just curious why do you want to do a masters. | 20:53 | |
_itz | www.youtube.com/watch?v=07KHwjebf7k | ||
20:54
telex joined
|
|||
[Coke] wants to learn, which he can do on his own, but also wants to further his career. | 20:54 | ||
masak | [Coke]: I'm pretty sure there is some masters topic that would benefit both you, academia, and Perl 6 | 20:55 | |
[Coke]: Perl 6's particular brand of grammars comes to mind | 20:56 | ||
vendethiel | TimToady: why %. (the dot)? | ||
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? | ||
dalek | ast: 1cd6d48 | skids++ | S06- (3 files): Add tests for anonymous capture with subsig and/or post-constraint |
||
vendethiel | m: class A { has $.a; };say A.^attributes; | ||
camelia | rakudo-moar 719a90: OUTPUT«(Mu $!a)» | ||
timotimo | you could do a great contribution to macadamia! | 20:57 | |
vendethiel | Skarsnik: ^^ ? | ||
20:57
skids left
|
|||
timotimo | Skarsnik: perl 6 has a pretty interesting thing called "the type object" | 20:57 | |
Skarsnik | Oooh thanks | ||
timotimo | where the type itself is an object that stands in for the type | ||
vendethiel | m: say %{5} | ||
camelia | rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/AJvlsilohqUnsupported use of %{5}; in Perl 6 please use %4at /tmp/AJvlsilohq:1------> 3say %{5}7⏏5<EOL>» | ||
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. | ||
vendethiel | m: say %.{5} | ||
camelia | rakudo-moar 719a90: OUTPUT«(Any)» | ||
vendethiel | ok, I see why now. TimToady++ | 20:58 | |
masak | m: say %{$0} | ||
camelia | rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/idb1uR0MAVUnsupported use of %{$0}; in Perl 6 please use %($0)at /tmp/idb1uR0MAV:1------> 3say %{$0}7⏏5<EOL>» | ||
masak | vendethiel: there's basically an over-eager warning in the way :) | ||
vendethiel doesn't like those that much, as a non-fiver | |||
masak | s/warning/parse error/ | ||
vendethiel | but that solution is *really* cute | 20:59 | |
TimToady | especially compared to all the others | ||
vendethiel | TimToady: just a question, why doesn't the Perl5 version use <>? | ||
TimToady | don't ask me | 21:00 | |
21:00
telex left
|
|||
vendethiel | ..but it could, right? I'm just trying to figure that out | 21:00 | |
21:01
telex joined,
telex left
21:02
telex joined
|
|||
vendethiel | TimToady: I'm now using this one-liner so scare people in :D | 21:11 | |
Skarsnik | ok, another probably dumb question, how I get the type of an attribute? (when defined) | 21:14 | |
vendethiel | m: class A { has $.a; };say A.^attributes[0].WHAT; | 21:17 | |
camelia | rakudo-moar 719a90: OUTPUT«(Attribute)» | ||
vendethiel | Skarsnik: when I see that, I go look at github.com/rakudo/rakudo/blob/nom/...tribute.pm | ||
and see there's a $!type | |||
Skarsnik | Oh, there is a WHAT method. I was looking at doc.perl6.org/type/Attribute | 21:18 | |
ugexe | and .^name, but i forget what the slight difference is between that and .WHAT | ||
Skarsnik | Oh yeah, could have use ^name on it ~~ | 21:19 | |
21:21
muraiki left,
telex left
21:22
telex joined
|
|||
dalek | ast: d375959 | usev6++ | S32-array/ (2 files): Replace eval-dies-ok with throws-like (EVAL form) for some tests |
21:26 | |
21:27
CurtisPoe joined
|
|||
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» | ||
CurtisPoe | Can someone remind me why Ints aren't automatically promoted to Rats here? | ||
TimToady | m: my Rat() $foo = 3 | 21:30 | |
camelia | rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aI7lcTiuMTCoercion Rat(Any) is insufficiently type-like to qualify a variableat /tmp/aI7lcTiuMT:1------> 3my Rat() $foo7⏏5 = 3 expecting any of: constraint» | ||
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) | ||
pink_mist | you mean ... an ORM? | ||
bartolin | m: my @pop = 1 .. 5; @pop.pop = 7; say "alive" # should this die? S32-array/pop.t assumes that | 21:31 | |
camelia | rakudo-moar 719a90: OUTPUT«alive» | ||
21:32
mr_ron left
21:33
mr_ron joined
21:35
telex left
21:36
telex joined
|
|||
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:37 | |
a Rat is not a kind of Int in any meaningful way. | 21:38 | ||
CurtisPoe | masak: 3/1 is a Rat. | ||
masak | right. and 3 isn't. | ||
m: my Rat $foo = 3/1; say "alive" | 21:39 | ||
camelia | rakudo-moar 719a90: OUTPUT«alive» | ||
CurtisPoe | p6: say 3 == 3/1 | ||
camelia | rakudo-moar 719a90: OUTPUT«True» | ||
masak | numeric equality has little to do with types. | ||
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 | ||
masak | m: say 3 eq "3" | 21:40 | |
camelia | rakudo-moar 719a90: OUTPUT«True» | ||
masak | you wouldn't expect `my Int $foo = "3"` to work.... | ||
Skarsnik | is there a pragma to force this to fail? | 21:41 | |
bartolin | m: my Rat $foo = 3.Rat; say $foo.nude | ||
camelia | rakudo-moar 719a90: OUTPUT«(3 1)» | ||
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. | ||
masak | CurtisPoe: it fails because you promised to give it one type, and gave it another. | ||
CurtisPoe: what's funny is that I argued your side about 6 years ago :) | |||
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? | ||
masak | CurtisPoe: and moritz++ argued my side. he eventually convinced me. | 21:42 | |
CurtisPoe: if you don't want the strict typechecking, why are you declaring the strict type? | |||
you're being inconsistent, and blaming Perl 6 for a stricture you *asked for*. | |||
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/ | ||
s/intergers/integers/ | |||
It's an embarrassment. | 21:43 | ||
masak | it's not an embarrassment to have a consistent type system. | ||
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. | ||
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. | ||
masak | you asked for a Rat, and gave yourself an Int. Perl 6 complained. now you're unsatisfied with that. | ||
lizmat | m: my Int $foo = "3"; say $foo | ||
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
telex left
|
|||
lizmat | m: my Int $foo = <3>; say $foo | 21:44 | |
camelia | rakudo-moar 719a90: OUTPUT«3» | ||
masak | we've been down the road of implicit coercion, and rejected it every time. | 21:45 | |
it sounds like a great idea, but it's a bad idea. | |||
CurtisPoe | Why? | ||
Here we | |||
masak | it introduces laxity which directly or indirectly causes logical errors in the code. | ||
lizmat | m: my Rat $a = <3> | ||
camelia | rakudo-moar 719a90: OUTPUT«Type check failed in assignment to '$a'; expected 'Rat' but got 'IntStr' in block <unit> at /tmp/Suokno2cOD:1» | ||
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 ... | ||
Skarsnik | IntStr fun type x) | 21:46 | |
21:46
telex joined
|
|||
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:46 | |
21:46
sufrostico left
|
|||
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. | ||
masak | I don't call it a compiler limitation. I call it a consistent type system. | ||
vendethiel | m: say Int ~~ Rat; # *g* | 21:48 | |
camelia | rakudo-moar 719a90: OUTPUT«False» | ||
masak | you're asking to make the type system guess more, thus making it less good at its job: catching type errors. | ||
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. | ||
it really does come down to having the right expecations of the type system. | |||
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. | ||
Int/1 == Int (every time). | |||
masak | you're arguing from mathematical intuition, which is fine. | 21:51 | |
but in Perl 6, for better or worse, Int !~~ Rat | |||
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" | ||
vendethiel | I just noticed how much c# is cheating there: rosettacode.org/wiki/Mad_Libs#C.23 | ||
masak | first off, I don't speak for #perl6 :) | ||
vendethiel | on another news, recent chrome update broke # -_-"" | ||
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) | ||
masak | second, am I understaing you correct that you are asking for a special case of Int literal -> Rat type promotion in Rakudo? | ||
Skarsnik | m: my Int a = 2; my Str b = "5"; say $a +$b; | ||
camelia | rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bbpYxr53StMalformed 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;» | ||
Skarsnik | m: my Int a = 2; my Str $b = "5"; say $a +$b; | ||
camelia | rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CtXaQU6T76Malformed 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;» | ||
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? | ||
pink_mist | Skarsnik: $a, not a | ||
Skarsnik | I sucks | ||
m: my Int $a = 2; my Str $b = "5"; say $a +$b; | |||
camelia | rakudo-moar 719a90: OUTPUT«7» | ||
CurtisPoe | I'm not going to argue that strings and numbers should share operators. | ||
Skarsnik | why does that work? | ||
masak | CurtisPoe: that was a bit of a non sequitur answer, but OK. | ||
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. | ||
vendethiel | does it? | ||
m: my Int $a = "123"; | |||
camelia | rakudo-moar 719a90: OUTPUT«Type check failed in assignment to '$a'; expected 'Int' but got 'Str' in block <unit> at /tmp/24KrD7ej1E:1» | ||
vendethiel | doesn't seem like it does.. | ||
masak | of course infix:<+> coerces to numeric. | 21:55 | |
CurtisPoe | vendethial: look at Skarnik's example. | ||
Skarsnik | why of course? | ||
masak | but it's safe, in that it *dies* if the string is not a number. | ||
Skarsnik: because Perl. | |||
Skarsnik: that's how Perl operators work. always did. | |||
vendethiel | CurtisPoe: you know, it's that much easier with <tab>, and it removes the possibility of mistakes :P | ||
(i'm talking about name completion | |||
21:55
telex left
|
|||
vendethiel | ) | 21:55 | |
masak | Skarsnik: there's infix:<+> for numeric addition, and infix:<~> for string concat. | ||
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. | ||
masak | Skarsnik: Perl operators are defined by working on a particular type, or range of types. | 21:56 | |
CurtisPoe: there's a crucial difference. | |||
21:56
telex joined
|
|||
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 | |||
masak | CurtisPoe: assignment isn't magical in the way infix:<+> is magical. assignment just tries to assign. | ||
CurtisPoe: one reason assignment wants/needs to be very non-magical is performance. | |||
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. | ||
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.) | ||
expert* | |||
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. | ||
I'm only asking for the one, obvious change that is going to byte (sic) developers: the common case where Int/1 == Int. | |||
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 | |
CurtisPoe: but I do think it sets a bad precedent. | |||
vendethiel | also, Perl6 cheats WRT its type system in a few places already :) | ||
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. | ||
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. | ||
vendethiel | and int vs Int or num vs Num is very hard to argue about when you value "mathematical purity" | ||
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 | |
CurtisPoe: but I could also imagine jnthn popping in and saying "that would *kill* performance" | |||
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. | ||
First make it right, then make it fast :) | |||
masak | CurtisPoe: I think it's a bad precedent to introduce exceptions in the type system. | ||
leont | CurtisPoe: my real question would be: why declare types explicitly there? | 22:00 | |
masak | CurtisPoe: the fact remains that Int !~~ Rat. | ||
leont | IME, it's rarely (though occasionally) useful for lexicals to be types, but not that often | ||
vendethiel | masak: the type system already has exceptions | ||
that'd not be a precedent | |||
leont | s/types/typed/ | ||
lizmat | I wonder if the typecheck exception couldn't be catchable, and allow for ad-hoc coercion on the fly | ||
masak | vendethiel: and, IIRC, jnthn has argued against most of them. | ||
CurtisPoe | Int !~~ Rat only in the case of how the type system is defined. In reality, Int/1 always equals Int. | ||
vendethiel | m: my int $a = 1; my Int $a = 1; # that's the kind of thing that Just Works, expectedly | ||
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 JCannot assign to an immutable value in block <unit> at /tmp/uzcuXa3nmX:1» | ||
vendethiel | masak: then he must've argued against Failure, etc, right? | 22:01 | |
(I honestly don't know) | |||
masak | vendethiel: yes, I think so. | ||
leont | CurtisPoe: you could define your own subtype that DWIMs, I think | ||
vendethiel | nice. I'm happy to know I'm not the only one :-) | ||
masak | m: my Rat() $foo = 3 # CurtisPoe: why don't you like this solution? | ||
camelia | rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/LaopcHHRydCoercion Rat(Any) is insufficiently type-like to qualify a variableat /tmp/LaopcHHRyd:1------> 3my Rat() $foo7⏏5 = 3 # CurtisPoe: why don't you like thi expecting any of: …» | ||
masak | er. | ||
CurtisPoe | leont: not a solution when I'm trying to tell non-Perl devs about how easy and natural Perl 6 is :) | ||
masak | what...? | ||
vendethiel also had to introduce () in his talk about MAIN, and felt somewhat "dirty" (er..) about it | 22:02 | ||
feels like it's a feature you shouldn't be introduced to there, for that | |||
CurtisPoe | masak: even if that worked, that would be a special case of gradual typing that would look just weird. | ||
Skarsnik | For me it's really sad to have type when most of the time it feel like it something pointless ~~ | ||
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 | |
CurtisPoe: which is *exactly* what you're asking for here, but explicitly in code instead of magic in the implementation. | |||
CurtisPoe | I'm trying to show people that Perl 6 is *easy* and my Rat $foo = 3 defeats my argument. | ||
vendethiel | Skarsnik: it doesn't to some of us :) | ||
leont | xABmy Rat $foo = 3xBB still doesn't look like sensible code to me | 22:04 | |
22:04
synbot6 left
|
|||
vendethiel | m: say 3.Rat.perl | 22:04 | |
camelia | rakudo-moar 719a90: OUTPUT«3.0» | ||
leont | I mean, what does that type give you? | ||
vendethiel | m: my Rat $a = 3.0; # o// | ||
camelia | ( no output ) | ||
vendethiel | CurtisPoe: apparently, you can just add .0 as a workaround =P | ||
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 | ||
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? | ||
masak | CurtisPoe: the more you argue your position, the more I want to *protect* the Perl 6 type system from random tampering. | ||
vendethiel | well, if the solution were to be "integer {pre,suf}fix", I'd take auto-promotion anyday | ||
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. | ||
CurtisPoe | Especially since Int/1 is guaranteed to be correct. | 22:07 | |
lizmat | my $a Rat() = 3 # CurtisPoe: would that work for you ? | ||
CurtisPoe | How is that weakening the type system? | ||
masak | you're wanting to introduce an exception to the strict type error you're getting. | ||
an error which is *correct*. | |||
CurtisPoe | Again, I'm willing to accept ANY counter-example of why that would be bad. | ||
masak | because it would set a bad precedent to weakening the type system. | ||
22:08
telex left
|
|||
lizmat | CurtisPoe: type checking is done at a *very* low level, it is actually written in C for each backend | 22:08 | |
22:08
telex joined
|
|||
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
telex left
|
|||
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. | ||
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 | ||
camelia | rakudo-moar 719a90: OUTPUT«TrueFalse» | ||
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 | ||
(at least for now) | |||
masak | no problem. I'm happy to have this discussion again, six years later, from the other side ;) | ||
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 | |
22:10
telex joined
|
|||
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. | ||
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«01» | ||
masak | lizmat++ # arguing from hot paths and low-level implementation | ||
vendethiel: you're right, of course. | |||
vendethiel: still, it makes sense to not worsen the damage and introduce more exceptions and corner cases. | |||
lizmat | FWIW, I agree with CurtisPoe that it is a WAT | ||
masak | oh, me too | ||
it is. | 22:12 | ||
but it's at least an instructive one. | |||
vendethiel | masak: that's all I was arguing about! maybe I'm gonna argue about removing Failure one day :P | ||
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?" | ||
lizmat | m: my Rat() $a = 42 # why doesn't this work, is this an LTA error for a NYI feature ? | ||
camelia | rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/yhDNrNuVULCoercion Rat(Any) is insufficiently type-like to qualify a variableat /tmp/yhDNrNuVUL:1------> 3my Rat() $a7⏏5 = 42 # why doesn't this work, is this expecting any of: …» | ||
masak | lizmat: I hope it's an NYI | 22:13 | |
flussence | m: my $a is Rat = 42; # this is one! | ||
camelia | rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vUXS7P2WxqVariable trait 'is TypeObject' not yet implemented. Sorry. at /tmp/vUXS7P2Wxq:1------> 3my $a is Rat7⏏5 = 42; # this is one! expecting any of: constraint» | ||
masak | lizmat: unfortunately, implementing it will not be sufficient for CurtisPoe's needs. | ||
lichtkind | hej there will be big article here on christmas :) | ||
vendethiel | .oO( Failure is to Either what Effects are to Monad Transforms ) |
||
ers* | |||
masak | lichtkind: yay | 22:14 | |
lichtkind | yes | ||
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/nzXV5FoGzLCan'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…» | ||
lichtkind | and granada article will be published tomorrow | ||
lizmat | m: sub a(Rat() $a) { say $a.nude }; a 42 # so why does this work then ? | ||
camelia | rakudo-moar 719a90: OUTPUT«(42 1)» | ||
flussence | (doesn't show up in evalbot) | ||
lichtkind | celebrating whenever in third last paragraph | ||
becuase i felt it was a thing in granada | |||
so i will be askeing more questions :) | 22:17 | ||
good night | |||
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!" | ||
lizmat | masak: why wouldn't my Rat() $a = 42 work for CurtisPoe? | ||
22:18
TEttinger joined
|
|||
masak | lizmat: because he thinks that `()` is unintuitive and not easy. | 22:18 | |
lizmat: he thinks it should Just Work without the `()`. | |||
22:18
araujo_ left
|
|||
masak | basically, because mathematical intuition tells him that 3/1 == 1, he is disappointed that `my Rat $foo = 3` doesn't DTRT. | 22:20 | |
and that's the WAT to him. | |||
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 | ||
in a way, the `Int !~~ Rat` part is where Perl 6 diverges from mathematical intuition. | |||
they're both Real, but Int is not a kind of Rat in Perl 6. | |||
(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 | ||
22:22
TEttinger left
|
|||
sjn | is that something worth "fixing", if for no other reason than to follow the principle of least astonishmen? | 22:22 | |
masak | sjn: that's exactly what we were discussing. | 22:23 | |
and disagreeing on. | |||
22:23
lichtkind left
|
|||
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? | ||
masak | which option would ruin the type system less? that's also worth asking. | 22:24 | |
sjn | mm | ||
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 | ||
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. | ||
TimToady | or a Num, which Rat can mutate into | 22:26 | |
masak | TimToady: come again? | ||
TimToady | if you exceed 64 bits in the denom, you get a Num, not a FatRat | ||
masak | ah, yes. | ||
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 | ||
masak | maybe the real question here is "do people benefit from the type distinction between Int, Num, and Rat?" | ||
I kind of think they do. | |||
cognominal | And it does not dwim. | ||
* detect/know/declare | |||
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) | ||
masak | saying "I want this to actually be a rational, not an integer or a floating-point number" is *useful*. | ||
which is why the strict type checking is ultimately worth defending. | |||
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 | ||
masak | cognominal: yes, I was a little worried about that aspect, too. | ||
cognominal: but I didn't want to say "slippery slope" to CurtisPoe. | |||
leont | Sounds to me like we should have answered "you want to use Real there" | ||
masak | leont: we did tell him that. | 22:30 | |
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? | |||
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... | ||
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) | ||
masak | leont: yes, that's another common one. :) | 22:31 | |
leont | To my mind, Num and Real should have swapped names | ||
lizmat | m: say Num ~~ Rat # isn't this a problem if the denom exceeds 64bit ??? TimToady | ||
camelia | rakudo-moar 719a90: OUTPUT«False» | ||
22:31
skids joined
|
|||
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. | ||
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 :-( | ||
leont | It's probably because real has floating point connotations to me | ||
masak | leont: and Num I cannot really provide a rationale for, except that I like it better than Float :) | ||
lizmat: and then the user goes "awrgh, I shoulda typed it as Real!" | 22:33 | ||
lizmat: and hopefully learns a lesson | |||
leont | Num is awfully generic, which is perfect for "this covers everything", which is what Real currently does | ||
masak | leont: no, you're thinking of Numeric :P | ||
lizmat | masak: this could be in a library :-( | ||
masak | m: say Real ~~ Numeric; say Complex ~~ Numeric | 22:34 | |
camelia | rakudo-moar 719a90: OUTPUT«TrueTrue» | ||
masak | lizmat: we need to teach people how to use the numeric types right. | ||
lizmat: there's just no way around that. | |||
sjn would be very happy if we don't scare away math geeks (or Mathematicians) because of Perl 6 having "our kind of" types | |||
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. | ||
masak | intuition only goes so far. | ||
sjn: nod | |||
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 | ||
22:35
captain-adequate left
|
|||
masak | sjn: which would essentially grant CurtisPoe his wish | 22:35 | |
but another point: I think it would wreak havoc with people's expectations in *signature* matching if we made Int ~~ Rat | |||
or given/when matching, for that matter | 22:36 | ||
users are inconsistent as hell | |||
"I passed it an Int, and it matched on Rat" -- "well, you shoulda known that" -- "this sucks!" | |||
22:37
telex left
|
|||
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. | ||
sjn: we could even try it out safely in a module/pragma. | |||
sjn: people could opt into it if they wanted that semantics. | |||
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
|
|||
masak | lizmat: no, seems 100% legit to me. | 22:38 | |
lizmat: (because the coercion is explicitly asked for) | |||
sjn | well, basic mathematic concepts isn't really something that is ok to just make up as you go (even considering user's whims) | ||
lizmat | ok | ||
masak | sjn: I... agree...? :P | 22:39 | |
"don't make up math as you go!" -- probably most mathematicians | |||
TimToady | isn't that what mathematicians are for? | ||
sjn | and quite a lot of things out there that might provoke a "you should have know that" response | 22:40 | |
masak: sure, but the basics are the same :) | |||
an integer in India is the same as an integer in Greece :) | |||
or a Rat | |||
mst | sjn: that generally depends whether they open the till | 22:41 | |
22:41
rindolf left
|
|||
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 | |
but it doesn't in Perl 6, and we kinda consider that a feature, even though it goes clearly against mathematical intuition | |||
and so we're keeping that WAT as a chance to tell you about how Ints are not Rats | |||
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. | ||
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. | ||
whereas the data of a rational is literally just a sign and two non-negative integers. | |||
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/ | ||
sjn | ok, so this can be "solved" with documentation and sane warnings | ||
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 | |
sjn: and `my Rat $foo = 3` not working fails his "it's easy" lithmus test. | |||
sjn | mm | ||
well, it does | |||
masak | yes. | 22:48 | |
ShimmerFairy | masak: I'm sure this is the same problem behind our persistent Inf issue, fwiw :) | ||
masak | ShimmerFairy: I don't think so... | ||
well, they both have to do with the type system. | |||
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 | ||
.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. | ||
and Perl 6 choses not to, for whatever reasons. | |||
and the WATs occur because of that. | |||
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:51 | |
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 :) | ||
masak | ShimmerFairy: 'Int', 'Rat', and 'Num' all cover the "same space". and you could throw 'Complex' in there, too. | ||
sjn | 'Imaginary' :) | 22:53 | |
ShimmerFairy | masak: sure, but I wasn't counting proper subsets :P | ||
(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) | ||
masak | I think it could. | ||
but I would call it `use Math::Typing::Lax` :) | |||
ShimmerFairy | Mathematicians wouldn't call it "lax mode" though :P | 22:55 | |
masak | or `use Math::Typing::Sloppy` | ||
well, the point is, it kind of *is* "lax mode" from Perl 6's point of view | |||
sjn | yeah, better name it so it goes well with mathematician's expecations | ||
22:55
Peter_R left
|
|||
masak | it gave you this nice distinction between Int/Rat/Num, which you can actually use for things | 22:55 | |
and then you go "nah, I don't want that" | 22:56 | ||
sjn | 'use Proper::Math::Types' :) | ||
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) | ||
leont | ShimmerFairy: thing is, sometimes they're not | ||
masak | ShimmerFairy: yes, cognominal was thinking about the same earlier. (and warned about becoming Idris.) | ||
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 | ||
you may lose properties that were true of the subset | |||
22:57
Peter_R joined
|
|||
masak | (because you're zooming out and becoming more general, so specific properties may no longer hold) | 22:58 | |
if you zoom out further to the quaternions, you lose commutativity of multiplication | |||
if you zoom out even further to the octonions, you lose associativity of multiplication | |||
and after that, everything nice breaks down, so there isn't really a "hexadeconion" algebraic system | 22:59 | ||
ShimmerFairy | masak: nope, just sedenions :) | 23:00 | |
masak | ShimmerFairy: oh, you're right | 23:02 | |
they lose yet another property, of being "alternative", whatever that is | |||
ShimmerFairy | apparently, that's x*(x*y) = (x*x)*y | ||
masak | we're following the same trail here :) | ||
yeah, that sounds like... something I'd generally want to be true :) | 23:03 | ||
ok, and it's weaker than associativity's x(yz) = (xy)z, which requires all three to vary | |||
here, two are the same | 23:04 | ||
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. | ||
masak | but no-one seems to pay any interest past 16. | ||
leont: that's my impression too. | 23:06 | ||
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 | ||
masak | ShimmerFairy: well, it forces you to put in the parentheses in basically every multiplication. | 23:08 | |
(something I'd do just in case after the loss of associativity) | |||
leont: complex numbers seem to have found their place in various branches of physics and engineering. | 23:09 | ||
basically, I think of complex numbers as being almost as nice as the reals. (unexpectedly) | 23:10 | ||
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:10
telex left
23:12
telex joined
|
|||
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:13 | |
I think perhaps having assignment require a Rat() instead of Rat (or Rat(Numeric), or whatever) might work out better | 23:15 | ||
(should assignment be coercive in general? I'd be surprised if such a change didn't cause problems) | 23:18 | ||
23:19
telex left
|
|||
skids | Personally I think we have to diversify our vocabulary around "coerce" | 23:19 | |
dalek | kudo/nom: 6252fc4 | lizmat++ | src/core/IO/Handle.pm: Make "words".IO.lines($limit) lazy when needed Basically, remove the old pre-GLR candidate and replace it with a class that does the right magic. In the process, also allow for Ranges to be specified as a limit. |
23:20 | |
23:20
telex joined
|
|||
lizmat | which concludes my commits for today | 23:20 | |
sleep& | |||
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:25 | |
23:27
mr_ron left
23:28
cognominal left
|
|||
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:28 | |
23:28
telex left
23:30
telex joined
23:39
telex left
23:40
telex joined,
telex left
23:42
telex joined
|
|||
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:44 | |
m: my Rat() $a = 4 # aw :P | 23:45 | ||
camelia | rakudo-moar 719a90: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ste2iwsGPfCoercion Rat(Any) is insufficiently type-like to qualify a variableat /tmp/Ste2iwsGPf:1------> 3my Rat() $a7⏏5 = 4 # aw :P expecting any of: constraint» | ||
TimToady | basically NYI | ||
ShimmerFairy | TimToady: the coercive assignment thing or the my Rat() $a thing? | 23:46 | |
TimToady | or? they're much the same thing | ||
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 ? | ||
TimToady | that's the plan | 23:48 | |
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 | ||
.oO(Computation is hard, lets go mathing...) |
23:50 | ||
23:50
leont left
|
|||
masak | ok, good. I'm gonna go out on a limb and take that as a Ruling. | 23:51 | |
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?" | ||
TimToady | 'course, that's the same number of chars... | ||
ShimmerFairy wonders what mathematician came up with -1 ** 2 == -1 , and if that counts as a mathematical concession in P6 :P | |||
masak | TimToady: I think it's just as elegant, or more so, to teach people the general thing with `()` | ||
TimToady | all of our types are implementation types, just some are closer to the metal than others | 23:53 | |
ShimmerFairy: yes, that's one of 'em | |||
masak | ShimmerFairy: that one doesn't even register as wrong or weird to me. | ||
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² | ||
masak | that's how I read the infix:<**> version too, basically | ||
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. | ||
masak | ShimmerFairy: indeed. | ||
23:54
TEttinger joined
|
|||
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. | ||
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/s5ZQYbhi1PMissing blockat /tmp/s5ZQYbhi1P:1------> 3multi foo(1) { say "one" }; multi foo(7⏏5-1) { say "minus one" }; foo(-1)» | ||
masak | that's the most bothersome one, IMO. | ||
23:55
mr_ron joined
|
|||
ShimmerFairy | maybe we should have <-1> literal Ints :) | 23:55 | |
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 | ||
masak | it's a place where I'd prefer the implementors to be tormented a wee bit more than they currently are. | ||
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 | ||
masak | I don't have a corresponding wish with either prefix:<!> or prefix:<~> | ||
TimToady | ShimmerFairy: it's all tradeoffs, and there's no perfect | ||
masak | what TimToady said. | 23:57 | |
I have no sympathy for people who don't want to learn about precedence :) | |||
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 | ||
ShimmerFairy afk | |||
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 | ||
but we might cheat this one | 23:59 | ||
masak | ...in a roundabout way, it would, yes. | ||
but I'm strangely not worried at all about that discontinuity. | |||
for the purposes of a siggie, a "-1" is a single integer literal. |