»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend! Set by sorear on 25 June 2013. |
|||
00:01
pmichaud left
00:03
pmichaud joined
|
|||
timotimo | i'm slightly surprised the mu repo refers to the article swtch.com/~rsc/regexp/regexp1.html "Regular Expression Matching Can Be Simple And Fast", yet in rakudo the pathological regex is still pathological | 00:17 | |
timotimo disappears | 00:18 | ||
[Coke] | ... gist finally updated after a family tech support incident. | 00:19 | |
00:26
btyler joined
01:10
FROGGS_ joined
01:13
FROGGS left
01:18
Patterner left
01:42
btyler left
01:50
btyler joined
02:14
SamuraiJack_ joined
02:43
BenGoldberg left
|
|||
colomon is wondering how long he should give his latest awesome line of p6 code before he gives up on it... | 02:49 | ||
oh, that wasn't so bad... | 02:52 | ||
diakopter | . | 02:56 | |
colomon | my %by-name = lines.map(*.path).categorize(*.bas...ep(*.value > 1); | 03:01 | |
pass it a list of filenames, and it will find all the base names that are duplicates and build a hash from the base name to an array of duplicate paths. :) | 03:03 | ||
03:04
kingbeast left
|
|||
colomon | takes 3.5 minutes to process 15,000 filenames under parrakudo | 03:08 | |
03:11
atroxaper joined
03:16
benabik joined
03:36
fgomez left
|
|||
lee_ | doe this look like a bug? gist.github.com/leedo/5906625 | 03:38 | |
er, nevermind | 03:39 | ||
benabik | r: &infix:<+> !=== &infix:<+> | 03:42 | |
camelia | rakudo d67185: ( no output ) | ||
benabik | r: say &infix:<+> !=== &infix:<+> | ||
camelia | rakudo d67185: OUTPUT«False» | ||
lee_ | is === the proper way to compare operators? or should I be using =:=? | 03:44 | |
TimToady | === should work | 03:50 | |
03:50
preflex_ joined,
ChanServ sets mode: +v preflex_,
preflex left,
preflex_ is now known as preflex
03:58
FROGGS_ left
04:00
FROGGS_ joined,
chayin_ joined
04:01
chayin left
04:02
Chillance left
04:03
btyler left
04:22
FROGGS_ left
|
|||
sorear | good * #perl6 | 04:33 | |
lee_ | r: all(1,2) ~~ Int | 04:34 | |
camelia | rakudo d67185: ( no output ) | ||
lee_ | r: say all(1,2) ~~ Int | ||
camelia | rakudo d67185: OUTPUT«False» | ||
sorear | whee, more backlog than fits in my buffer | 04:35 | |
how's the jvm port? | |||
04:49
xinming left
|
|||
JimmyZ | sorear: 90% passed | 04:49 | |
04:51
xinming joined
04:55
toddr joined
|
|||
sorear | JimmyZ: sweeeet | 04:56 | |
05:01
birdwindupbird joined
|
|||
JimmyZ | sorear: 90% passed | 05:03 | |
05:03
xilo left
|
|||
JimmyZ | irssi-- | 05:03 | |
lee_ | does this look curious to anyone else? gist.github.com/leedo/5906863 | 05:07 | |
JimmyZ | lee_: nope | 05:08 | |
lee_: why need two (( ? | 05:09 | ||
lee_ | why does the *@flat signature work on n and not m? | ||
sorear | because (Any) is more specific than a slurpy | 05:10 | |
JimmyZ | lee_: try m(1,2,3); | ||
sorear | subsignatures are a kind of postconstraint; they apply after the multidispatcher is done | ||
lee_ | JimmyZ: the section of code i am working on gets passed a parcel | ||
sorear: ok thanks, i think that makes sense | 05:11 | ||
sorear | although.. | 05:13 | |
r: gist.github.com/leedo/5906863 | |||
camelia | rakudo d67185: OUTPUT«flattened 3got Rangeflattened 3» | ||
sorear | n: gist.github.com/leedo/5906863 | ||
camelia | niecza v24-86-g39ab531: OUTPUT«Potential difficulties: $range is declared but not used at /tmp/ik76Y12fzw line 9:------> multi sub m ((Range ⏏$range)) {flattened 3got Rangeflattened 3» | ||
lee_ | hmm, i am running on jvm-rakudo | ||
sorear | D: | 05:14 | |
regresssssion | |||
do we have a test for that? | |||
lee_ | i can poke around for one tomorrow | ||
sorear | so jvm-rakudo is now being used in the wild? :) | ||
lee_ | sorear: if me being bored is in the wild, yes :P | ||
05:19
toddr left,
konundra left
05:28
ecocode joined
|
|||
lee_ | sorear: it looks like some related tests are failing in S06-multi/unpackability.t | 05:28 | |
(on jvm) | 05:29 | ||
05:39
Psyche^ joined,
Psyche^ is now known as Patterner
05:43
Patterner left
05:47
Psyche^ joined,
Psyche^ is now known as Patterner
05:48
zby_home joined
05:51
raiph left
05:52
Patterner left
05:54
Psyche^ joined,
Psyche^ is now known as Patterner
06:01
Patterner left
06:09
Psyche^ joined,
Psyche^ is now known as Patterner
06:12
Patterner left
06:18
dmol joined
06:24
FROGGS[mobile] joined
|
|||
FROGGS[mobile] | o/ | 06:24 | |
sorear | o/ | 06:25 | |
06:25
berekuk left
|
|||
JimmyZ | lee_: try m(1,2,3); | 06:26 | |
irssi-- again | |||
:( | |||
sorear | why is your irssi randomly repeating lines | 06:27 | |
06:28
berekuk joined
06:35
FROGGS[mobile] left
06:37
FROGGS joined
|
|||
sorear | hmm, if I go ahead with this 9-to-5 thing it'll really hurt my overlap with jnthn :| | 06:40 | |
06:40
raiph joined
|
|||
JimmyZ | because I press up arrow to look for '/window next', when I see it, I press enter, but It suddenly switch to another msg | 06:41 | |
JimmyZ cant't find another way, i.e: ctrl+r or ctrl+1 | |||
sorear | alt-right arrow | 06:43 | |
JimmyZ | It doesn't work in Xshell4 | ||
sorear | alt-1..alt-o | 06:44 | |
try esc, meta | |||
JimmyZ | I can only use ctrl+x to switch irc server | ||
sorear++, esc + 1/2/3 works | 06:46 | ||
06:50
kaleem joined,
pmurias joined
|
|||
pmurias | when pushing multiple commits to nqp are some of them allowed to break tests if the last one passes? | 06:51 | |
FROGGS | if you push all at once, I'd say yes | 06:53 | |
because sometimes it is nicer to split things to have smaller commits | |||
sorear | I think not, because I think the point is bisectability | 06:54 | |
FROGGS | hmmm, good point | ||
pmurias | sorear: so I should squash them into a single commit? | 06:57 | |
moritz | either that, or make it a branch and merge | ||
otoh we aren't very strict about such rules in nqp land | 06:58 | ||
FROGGS | bisecting is hard these days anyway, at least for rakudo when you have to rebuild nqp | ||
06:59
domidumont joined
|
|||
dalek | ast: 9c64dd0 | (Tobias Leich)++ | S32-num/rshift_pos_amount.t: added test for right shifting by a positive amount |
07:12 | |
07:15
domidumont left
07:16
domidumont joined
07:20
bbkr joined
07:36
daxim joined
|
|||
lizmat | good *, #perl6! | 07:43 | |
labster | good * lizmat! | ||
woosley | hello world | 07:44 | |
lizmat | woosley! labster! | ||
nwc10 | FROGGS: script it! | 07:45 | |
given that in 5 years time, Rakudo will still need NQP (re)building to bisect problems, the sooner that someone automates the bisection dance, the sooner it stops being hard | 07:46 | ||
this isn't work that is going to be thrown away | |||
(yes, it *is* work) | |||
woosley | hello #perl6, how can I do "get start with nqp and rakudo and Perl6 and even MoraVM" ? | ||
FROGGS | nwc10: nice idea | ||
07:47
ztt joined
|
|||
lizmat | .oO{ A virtual machine for snacks } | 07:47 | |
sorear | o/ labster, lizmat, woosley (ETOOCLOSE2WOOLFY), nwc10 | ||
FROGGS | virtual snacks? | ||
lizmat | Mora is a world renowned brand of snacks in the Netherlands | 07:48 | |
sorear | world renowned, but only in the Netherlands? | ||
labster | most world-renowned things are only renowned by a subset of the world. | 07:49 | |
lizmat | :-) | 07:50 | |
DrEeevil | lizmat: ... and belgium! | ||
"if we sell it you can fry it", right? | |||
lizmat | yup | ||
07:53
labster left
07:54
labster joined
|
|||
lizmat | .tell jnthn I think the problem is that the default default is not set in the ContainerDescription | 07:54 | |
yoleaux | lizmat: I'll pass your message to jnthn. | ||
labster | woosley: is that a "how do I learn Perl 6" or "how to I help out" question? | ||
lizmat | .tell jnthn in Actions.nqp, between lines 1943 and 1951 we need to add a default_value key to %cont_info, but I have no idea where to get that from :-( | 07:55 | |
yoleaux | lizmat: I'll pass your message to jnthn. | ||
woosley | labster: Maybe how do I help out? | ||
FROGGS | tools/build/bisect.pl --good-is-when="ok 12 - Some crazy test" - or - tools/build/bisect.pl --bad-is-when="nok 12 - Some crazy test" | 07:56 | |
nwc10: would that be what you think? | 07:57 | ||
labster | woosley: well, that's easy: You should just try to have fun with P6. There are simple things, like writing tests, or just making a module and adding it to the ecosystem. There are more difficult things like diving into the guts of the compilers, and writing C/Java/NQP. | 07:58 | |
FROGGS | I guess it should ingore (?) checkouts somehow that cant be build | ||
sorear | ignore | ||
lizmat | .tell jnthn scratch that last one: container_type_info is doing that already | 07:59 | |
yoleaux | lizmat: I'll pass your message to jnthn. | ||
07:59
bbkr left
|
|||
labster | woosley: Do whatever you're comfortable with for now -- even using the language helps us out. And ask here if you have any specific questions/problems. | 07:59 | |
woosley | labster: Aha, all right, I suppose I can start write some little programs using Perl6 | 08:03 | |
08:03
xinming left
|
|||
sorear | I guess I just need to get up realllly early and schedule overlap time before $dayjob time | 08:05 | |
08:05
xinming joined
|
|||
sorear | on that thought, sleep& | 08:06 | |
08:06
zby_home left
|
|||
labster | I get the sense that sorear's sense of "really early" is "about the time normal people wake up" | 08:06 | |
sorear | labster: thinking more like 5 | 08:07 | |
labster | oh well, that is really early :) | ||
pmurias | a parrot code ref is a PMC*? | 08:11 | |
lizmat | Parrot Magic Cookie, could be anything, afaik | 08:13 | |
tadzik | good morrning | 08:15 | |
pmurias | morning | 08:19 | |
08:19
Stygia joined
|
|||
lizmat | tadzik! pmurias! | 08:22 | |
.g thinko | |||
yoleaux | www.urbandictionary.com/define.php?term=thinko | 08:23 | |
lizmat | .g PMC | 08:29 | |
yoleaux | www.ncbi.nlm.nih.gov/pmc/ | ||
lizmat | that's completely out of context for #perl6 | 08:30 | |
.j | |||
.j thinko | |||
maybe .j should take the lemma's of S99 ? | |||
08:41
dakkar joined
|
|||
lizmat | fitness& | 08:43 | |
raiph | .tell jnthn fperrad has confirmed that "My future goal is to add a TvmJIT backend to github.com/perl6/nqp/" | 08:48 | |
yoleaux | raiph: I'll pass your message to jnthn. | ||
08:51
SamuraiJack_ left
08:52
SamuraiJack_ joined
|
|||
raiph | .tell jnthn TvmJIT being more or less LuaJIT (but with s-expression syntax) | 08:54 | |
yoleaux | raiph: I'll pass your message to jnthn. | ||
08:56
fhelmberger joined
|
|||
JimmyZ | \o/ another backend | 09:01 | |
dalek | p: afa84b8 | (Pawel Murias)++ | / (9 files): Wrap subs in a NQPRoutine code object when NQPRoutine is in scope. We need capturelex to get that to work properly. I's a port of p6capturelex that takes the code objects type as an argument rather than assuming it's a Rakudo Code. We also add a test that ensures subs are wrapped in codeobjects. |
09:03 | |
nwc10 | And Unladen Swallow will make Python 5 times faster and remove the GIL | ||
ie, it's only "another backend" when it's done | 09:04 | ||
but it *is* good news that people are working on things like this | |||
masak | good antenoon, #perl6 | 09:05 | |
man, it's hard to focus on anything with new HPMoR episodes out... | 09:06 | ||
pmurias | hi | 09:07 | |
pmurias goes off to read the newest HPMoR chapter while his latest nqp commit is tested on both backends ;) | 09:08 | ||
FROGGS | $another_backend means too that NQP has a great acceptance... and I like that :o) | ||
moritz | masak: not so hard to focus on reading HPMoR :-) | ||
09:08
Stygia left
09:11
xinming left
09:12
xinming joined
|
|||
nwc10 | masak: how long will it take you to read them all? | 09:12 | |
jnthn yawns | |||
yoleaux | 07:54Z <lizmat> jnthn: I think the problem is that the default default is not set in the ContainerDescription | ||
07:55Z <lizmat> jnthn: in Actions.nqp, between lines 1943 and 1951 we need to add a default_value key to %cont_info, but I have no idea where to get that from :-( | |||
07:58Z <lizmat> jnthn: scratch that last one: container_type_info is doing that already | |||
08:48Z <raiph> jnthn: fperrad has confirmed that "My future goal is to add a TvmJIT backend to github.com/perl6/nqp/" | |||
08:54Z <raiph> jnthn: TvmJIT being more or less LuaJIT (but with s-expression syntax) | |||
FROGGS .oO( rm -rf INBOX ) | 09:21 | ||
09:22
xinming left
09:23
xinming joined
|
|||
dalek | p: 5942262 | (Pawel Murias)++ | / (2 files): Fix BEGIN blocks, they get outer lexicals and can return a value. Add a test. |
09:23 | |
pmurias | jnthn: BEGIN blocks are fixed and subs wrapped in code objects on both backends | 09:25 | |
FROGGS | dont we have four backends atm? | ||
(and a fifth in the queue?) | 09:26 | ||
pmurias | FROGGS: jvm,parrot,moarvm,js | ||
nwc10 | no, we have one working backend | ||
FROGGS | true | 09:27 | |
nwc10 | one more nearly working | ||
FROGGS | nwc10: I said nothing about their state :o) | ||
nwc10 | and I don't think that any of the others can even self-host NQP yet | ||
09:27
raiph left
|
|||
nwc10 | if you *don't* qualify it, people will assume that it's useful and working | 09:28 | |
FROGGS | I think pmurias knows what is going on | ||
and others can ask, it is a chat | 09:29 | ||
09:29
xinming left
|
|||
nwc10 | it's also logged for posterity, and can be taken out of context | 09:29 | |
09:29
Stygia joined
|
|||
nwc10 | I wasn't aware of it in context | 09:29 | |
FROGGS | so, I am thinking it would be nice to smoke *all* in-dev-and-future-backends, if possible | ||
nwc10 | but I likely will still be upset by inexact use of terms | ||
a reputation for "vapourware" is a big problem | 09:30 | ||
FROGGS | then I will try to be more exact in future | ||
nwc10 | thanks | ||
09:30
xinming joined
|
|||
nwc10 | and I'll try not to be so jumpy | 09:30 | |
FROGGS | *g* | ||
09:33
pecastro left
|
|||
jnthn | On backends, I think it's worth remembering that JVM has taken ~8 months to get to 90% spectest coverage. | 09:39 | |
09:39
pecastro joined
|
|||
jnthn | Now yes, a lot of that was designing portability abstractions, etc. | 09:39 | |
But still, it's a non-small piece of work. | |||
FROGGS | well, I had expected a few months more to get to this point fwiw | 09:42 | |
jnthn | :) | ||
FROGGS | jnthn: so I can read a nice blog post on my couch tonight? :P | 09:43 | |
jnthn | FROGGS: Once the numbers in roast-data look good :) | 09:48 | |
09:48
bbkr joined
|
|||
FROGGS | I'll buy beer to be on the safe side... | 09:49 | |
09:50
bbkr left
|
|||
FROGGS .oO( because we all now, "blog" means "beer + lying on gouch" ) | 09:50 | ||
09:51
rindolf joined
|
|||
nwc10 | mmm, roast. To eat with the beer | 09:51 | |
jnthn | Hmm...$dayjob of Perl 6... :) | 09:54 | |
*or | |||
Guess I can try and knock out a few more passes :) | 09:55 | ||
10:01
rindolf left
10:09
dmol1 joined,
dmol left
10:13
dmol1 left
10:14
dmol joined
|
|||
FROGGS | jnthn++ | 10:27 | |
:o) | |||
dalek | kudo/nom: 54b7dd5 | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/ (2 files): Enforce scalar container type constraints. Fixes various tests that relied on them being enforced. |
10:31 | |
jnthn | Down to 166 test files with failures by now. | 10:35 | |
FROGGS | jnthn: if you have time, can you run t/spec/S32-num/rshift_pos_amount.t and see if it passes/fails on jakudo? | 10:37 | |
I added it but it is not in spectest.data yet | 10:38 | ||
jnthn | pmurias: Your changes broke the Rakudo JVM build :( | 10:39 | |
lizmat | r: my $a; say $a; $a=Nil; say $a # incorrect, untested bahviour | ||
camelia | rakudo d67185: OUTPUT«(Any)Nil» | ||
jnthn | Hm, probably Rakudo Parrot on latest NQP too. | 10:40 | |
FROGGS | will test | ||
lizmat | fwiw, I broke the Nil behaviour! | ||
jnthn | FROGGS: Can't try that until I unbust the build... :( | ||
FROGGS | jnthn: of course | 10:41 | |
lizmat | .tell TimToady if we're going to put Nil outside of Any, things like this will break, as they now break with Mu: my $a; say $a === Mu | 10:46 | |
yoleaux | lizmat: I'll pass your message to TimToady. | ||
lizmat | r: my $a; say $a === Mu | ||
camelia | rakudo d67185: OUTPUT«Nominal type check failed for parameter ''; expected Any but got Mu instead in sub infix:<===> at src/gen/CORE.setting:2041 in block at /tmp/viS4a7jFuG:1» | 10:47 | |
lizmat | r: say Mu === Mu | ||
camelia | rakudo d67185: OUTPUT«Nominal type check failed for parameter ''; expected Any but got Mu instead in sub infix:<===> at src/gen/CORE.setting:2041 in block at /tmp/qywc7ybuFt:1» | ||
lizmat | r: say Mu =:= Mu # works! :-) | 10:48 | |
camelia | rakudo d67185: OUTPUT«True» | ||
jnthn | Bother. The thing I thought would fix it didn't. :( | ||
FROGGS | jnthn: yes, pakudo doent like it: Method 'get_lexinfo' not found for invocant of class 'NQPRoutine' | ||
jnthn | :( | 10:49 | |
Yes, making substantial NQP changes and not testing them against Rakudo is a very good way to get me to revert stuff.... | |||
Especially when you change the semantics of BEGIN, which was only put in NQP for the sake of Rakduo's BOOTSTRAP. | 10:51 | ||
10:51
cognominal left
|
|||
tadzik | hmm. Why do Perl 6 modules like Actions.nqp, Pod.nqp etc end up being jars, and not just classes? | 10:52 | |
jnthn | tadzik: Because we can more easily package the serialization stuff into the JAR | ||
tadzik: Rather than having to shove it in the class file constant pool, which has quite strict limits and required encoding. | 10:53 | ||
tadzik | I see | ||
also, shouldn't make clean remove blib? :) | 10:54 | ||
but then I have to manually create blib/Perl6 | 10:55 | ||
jnthn | yes, we have a .gitignore in there to make sure it exists. :) | 10:56 | |
nwc10 | I'd never thought of the idea of using .gitignore as a hack to avoid needing an '.exists' file or other directory-dropping | ||
dalek | p: 8ca10b2 | jnthn++ | / (2 files): Revert BEGIN work, as it breaks Rakudo. It now lives in a branch begin-lexicals. |
10:59 | |
p: f40a989 | jnthn++ | / (9 files): Revert routine wrapping; breaks Rakudo build. This commit can also be found in begin-lexicals branch now. |
|||
11:00
atroxaper left
|
|||
jnthn | pmurias: The patches caused serious breakage to Rakudo's BOOTSTRAP. It may even *rely* on BEGIN not being fully implemented in NQP. The only reason NQP got BEGIN was for the bootstrap in Rakudo... The work is now in a branch that I've pushed. | 11:01 | |
pmurias: I don't actually much care that BEGIN is only half-implemented in NQP; NQP is, after all, just a subset. I guess you want it for something, though? | 11:02 | ||
pmurias | yes | ||
I wanted that to test deserializing closures | 11:04 | ||
I planned to create them a compile time with BEGIN | |||
jnthn: routine wrapping breaks Rakudo or just BEGIN? | 11:05 | ||
FROGGS | pmurias: I'll be around if you want me to test commits of a given branch (other than master/nom) of parrot/nqp/rakudo | ||
jnthn | pmurias: Wrapping. I did this, gist.github.com/jnthn/5908412 , but it was then broken with another error. | 11:11 | |
So maybe the BEGIN stuff is to blame for the secondary breakage. | 11:12 | ||
pmurias: Aren't there already some closure serialization tests? | 11:15 | ||
11:16
mstefanko left
|
|||
jnthn | t/serialization/03-closures.t | 11:16 | |
? | |||
jnthn uses those when porting the JVM stuff... | |||
*to | 11:17 | ||
pmurias | jnthn: I don't have serialization yet, only deserialization so I wanted the compiler to serialize stuff for me | 11:19 | |
jnthn: if I want to create a pull request to rakudo, how should I check that it still passes all the tests? | 11:20 | ||
jnthn | pmurias: On Parrot, make spectest should come out pretty clean. On JVM, make sure it at least passes sanity tests and runs spectest... | 11:22 | |
11:25
mstefanko joined
|
|||
tadzik | duh. act.yapc.eu/ye2013/talk/4943 | 11:26 | |
"Perl6 is dead, long live Perl5" | |||
FROGGS | hehe | 11:28 | |
tadzik: I gues he isnt that serious when looking at the tags | |||
+s | |||
tadzik | heh | 11:29 | |
I'd have trouble treating that serious anyway :P | |||
jnthn | It's funny, I'm fairly sure Perl 5 actually is much better resourced than Perl 6 :P | 11:30 | |
nwc10 | I believe that it is | ||
and many people doing the ranting aren't contributing resources | |||
tadzik | there are plenty of "let's jump on the perl 7 bandwagon" talks submitted | ||
I wonder how many will get through | 11:31 | ||
11:33
Timbus left
11:35
grondilu joined,
Timbus joined
|
|||
grondilu | Hello. Not really perl6 related, but here's an article about a new language for general purpose GPU programming: www.wired.com/wiredenterprise/2013/...-language/ | 11:35 | |
tadzik | TIL: I've been always using "duh" wrong. | 11:36 | |
nwc10 | does anyone who wants to *talk* about Perl "7" have any ability to code? | ||
er, to *deliver* code | 11:37 | ||
lizmat | actually, I don't think so | ||
jnthn | Or, difficulter, to deliver language design? | 11:39 | |
nwc10 | or difficultest, to deliver language redesign | ||
everyone forgets that there is already a design. | |||
jnthn | *nod* | ||
lizmat | language design? What? you need to design? a language? that just develops itself, no? like php, right? | 11:40 | |
nwc10 | and the more of that design you think you can throw away, the more you throw away of the ecosystem you were actually relying on | ||
lizmat | thought of the day: is there a difference between Mu and Nil ? | 11:41 | |
nwc10 | I will be surprised if there is anyone *talking* who has actually run `git clone git://perl5.git.perl.org/perl.git` | ||
let alone tweaked anything | |||
lizmat | nwc10: you're going to be at YAPC::EU ? | ||
jnthn | FROGGS: Um, well rshift_pos_amount.t seems to give a stack overflow error | 11:42 | |
nwc10 | ACT thinks that I am | ||
jnthn | (on JVM) | ||
lizmat | cool! | ||
do you? | |||
FROGGS | jnthn: uhh | ||
I'll build jakudo later and do some testing | 11:43 | ||
masak | lizmat: there's definitely a difference between Mu and Nil. even considering that Nil has meant a number of things lately. | 11:46 | |
dalek | ecs: a120d5a | (Elizabeth Mattijsen)++ | S99-glossary.pod: Add parakudo|jakudo |
11:47 | |
hoelzro | hehe | ||
lizmat | masak: I came to the thought of asking it, as TimToady seemed to play with the idea to place Nil outside of Any | ||
hoelzro | can Rakudo on MoarVM be called Mokudo? | ||
mo' kudo, mo' problems. | |||
tadzik | Marudo | ||
.tr pl en marudo | 11:48 | ||
yoleaux | pl in marudo (eo → en) | ||
tadzik | que? | ||
lizmat | hoelzro/tadzik: we'll see which vernacular will stick | ||
nwc10 | lizmat: I've paid for it and bought a plane ticket. I think it's likely | ||
hoelzro | Mokudo! | ||
lizmat | and if Nil is outside of any, what makes it different from Mu then? | ||
if we understand the difference, we know that we need two terms | 11:49 | ||
if we don't, why don't we stick with Mu then? | |||
playing advocate of the devil here, yes | |||
masak | "Mu" is just a really wonky name for "Object". it's a blank slate, representing something entirely without features. | ||
"Nil" has more information than that. | 11:50 | ||
it means "you looked for something, but it is not here". | |||
11:50
ecocode` joined
|
|||
masak | it's a built-in sentinel. | 11:50 | |
11:50
ecocode left
|
|||
lizmat | not seeing much of a difference yet, I mean Nil is also a blank slate, something without features | 11:51 | |
even so, that if you assign it to something, it reverts back to its original state | |||
JimmyZ | what? not pakudo? | ||
so rakudo is akudo on Ruby? | 11:52 | ||
lizmat | lakudo, rakudo on Lua | ||
back in 15min& | |||
FROGGS | damnit! I wanna use Perl6 now for $work, I dont wanna do if( anymore, and I dont wanna pass args like date => $date anymore >:o[ | 11:53 | |
JimmyZ | parakudo is not like jakudo? | ||
masak | FROGGS: that's the spirit! | 11:56 | |
FROGGS: use that frustration to further Perl 6 in various ways :) | 11:57 | ||
FROGGS | masak: I do | ||
like 6 hours a day | |||
masak | lizmat: 'Mu' is the primordial stateless goo out of which the universe is built, the seed of being and nothingness, but not yet either of them. 'Nil' is that goo specialized into nothingness. | 11:58 | |
'Any' is that goo specialized into being. | |||
'Junction' is that goo specialized into parallel being. | |||
or superposed being. | 11:59 | ||
12:13
grondilu left
12:15
konundra joined
|
|||
lizmat | masak++ | 12:23 | |
masak | well, 老子++, really. :) | 12:25 | |
JimmyZ | :D | 12:26 | |
ztt | 哈哈哈哈 | 12:28 | |
JimmyZ | Claiming 老子 means I'm arrogant | 12:29 | |
timotimo | "Development of Perl6 is sucking in huge amounts of community creativity, attention and effort." wait what. | 12:30 | |
hoelzro | timotimo: source? | ||
12:31
konundra left
|
|||
timotimo | act.yapc.eu/ye2013/talk/4943 | 12:31 | |
masak | JimmyZ: in what way? he said lots of good things. | 12:32 | |
timotimo: I'm just so tired of that zero-sum bullshit. | 12:33 | ||
12:33
atroxaper joined,
atroxaper left
|
|||
timotimo | yeah, i can understand it | 12:33 | |
but that's even *worse* | |||
JimmyZ | masak: I can't follow you ... | ||
timotimo | that's blowing the work that's going into perl6 so ridiculously out of perspective | ||
JimmyZ | masak: oh I know | 12:34 | |
timotimo | "damnit, if those two hundred perl6 hackers would just come back to perl5!", wat? | ||
JimmyZ | I know what you mean | ||
lizmat | otoh, I do think the Perl community as a whole, has lost a lot of good people in the past 10 years | 12:35 | |
JimmyZ | masak: we say the different things | ||
lizmat | getting *them* back is one of *my* long term goals :-) | ||
BinGOs | "We know where you live" | 12:36 | |
lizmat | actually, I wish we did, only the NSA knows :-( | 12:37 | |
ztt | that act smells like a joke | 12:38 | |
lizmat | on the way to the NLPM meeting& | 12:39 | |
aka Amsterdam.PM meeting | 12:40 | ||
jnthn | Grr. I fixed two things, won a bunch of tests...but lost another load | ||
o/ lizmat | |||
12:40
lizmat left
12:41
ajr joined,
ajr is now known as Guest93975
12:42
Guest93975 is now known as ajr_
|
|||
timotimo | jnthn: hopefully these other tests have been injustly passing before you fixed a bug that would bring the injustice to light .... or something | 12:43 | |
12:43
konundra joined
|
|||
jnthn | timotimo: Yeah, am hunting down what's going on now :) | 12:44 | |
I did manage to win us the transliteration tests. :) | |||
[Coke] | I can sympathize with the p5 people that think p6 is pulling cycles away from p5. (see moarvm vs. parrot, as a smaller example of a very similar thing) | 12:49 | |
s/p5:first/perl/, maybe. | |||
masak | I can sympathize, too. | 12:51 | |
I just don't think it's true in, you know, a factual sense. | 12:52 | ||
colomon | [Coke]: I've never understood that logic. I mean, it's not like the p6 developers (TimToady excepted) are established p5 hackers who were lured away by something shiny. | ||
moritz | colomon: I think that was different in the beginning | ||
colomon | moritz: sure, a decade ago | 12:53 | |
12:58
rindolf joined,
jaldhar joined
|
|||
[Coke] | colomon: I'm not saying they are right, of course. | 12:59 | |
12:59
mtk left
|
|||
[Coke] | jnthn++ # more jvm tests | 12:59 | |
jnthn, sorear: soon we'll have to fix actual failing tests instead of exploding ones. | 13:00 | ||
13:00
mtk joined
|
|||
jnthn | [Coke]: Well, doing a bit of that now too | 13:00 | |
nwc10 | [Coke]: "p5 people" - I'm not aware of much overlap between the people blowing off about Perl 6 and the people contributing code to Perl 5 (either the core, or (show me to be wrong) important things on CPAN) | 13:01 | |
[Coke] | not porters. | 13:03 | |
13:04
woosley1 joined
|
|||
nwc10 | so people who think it's more useful to contribute by talking. But don't actually contribute in any way to the thing that they say matters to them. | 13:04 | |
13:09
daniel-s_ joined
13:10
PacoAir joined
|
|||
Ulti | I think there is a mismatch in perl-land between people who are employed to program in perl, and those that just like it as a go to language for fun things as well as bits of work | 13:10 | |
the people who only program in perl5 every day at work and not in the evening are the ones most bitter as far as I can see... its where all the production ready cries come from | |||
because until its the mythical production ready release they aren't even going to start learning the language or writing a single line | 13:11 | ||
nwc10 | not thought of it that way (work vs play). Interesting | ||
Ulti | so basically for them its been a decade of nothing | ||
nwc10 | but those people *also* don't contribute to Perl 5 | ||
Ulti | rather than a decade of play and hopeful steady improvements | 13:12 | |
nwc10: well probably not core, but they likely have that once CPAN module only they use :) | |||
*one | |||
nwc10 | use? or wrote? | 13:13 | |
Ulti | both | ||
jnthn | ah, think I found why I busted stuff :) | 13:14 | |
Ulti | I groan when I read the standard perlmonks perl6 troll about production readyness and waiting a decade *blah* *blah*... I'm in academia you just use whatever is a good tool for the job, I've used perl6 in "production" just to parse an especially nasty custom text format into something usable by my perl5 scripts | ||
jnthn | *and* another bug :) | ||
13:15
jaldhar left
|
|||
[Coke] | jnthn: as long as the net # of passing tests increases! | 13:17 | |
13:17
jaldhar joined
|
|||
jnthn | [Coke]: yeah, I managed to lose some, but think I've saved them again :) | 13:18 | |
13:19
mtk left
|
|||
masak | Ulti: the "work vs play" notion is brilliant. thank you. Ulti++ | 13:19 | |
nwc10 | I also see a bunch of other, um, factual inaccuracies such as grumbling that for PHP there's now Hip-Hop, which is a drop-in faster replacement. Which, well, means that the author hasn't read github.com/facebook/hiphop-php/blo...sistencies | ||
jnthn | Indeed | 13:22 | |
"HipHop VM currently does not support PHP namespaces." | |||
That feels like a fairly sizable missing thing...though maybe namespaces ain't used much in PHP. :) | 13:23 | ||
13:23
mtk joined
|
|||
nwc10 | well, they are new, and they use the most awesome character ever as the namespace separator | 13:23 | |
jnthn | Yeah! | ||
Nice for Windows users. ;) | 13:24 | ||
"oh, so it's like a directory" :) | |||
tadzik | :D | ||
nwc10 | oh, so it's part of a meta-character in double-quoted strings | 13:25 | |
dalek | p: fa3d25f | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: Invoke accepts_type on correct meta-object. |
13:28 | |
kudo/nom: dceb13c | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/Binder.java: Implement checking post constraints. |
13:30 | ||
kudo/nom: faa0f9e | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/Ops.java: Implement nqp::p6isbindable. Fixes various of the remaining multi-dispatch issues, and other things that relied on multi-dispatch, such as transliteration. |
|||
kudo/nom: 7dfcd66 | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/RakudoContainerSpec.java: Fix error reporting. |
|||
colomon | what's the file op for creation date? | ||
moritz | nqp::stat maybe? | 13:32 | |
colomon | in p6, I mean | ||
moritz | r: say 'README'.path.created | 13:33 | |
camelia | rakudo 54b7dd: OUTPUT«No such method 'created' for invocant of type 'IO::Path' in block at /tmp/LLLUUTZdkF:1» | ||
colomon | hmm.... changed or modified? (probably either is close enough, but what's the difference?) | ||
timotimo | i think one is for data and the other is for metadata | ||
moritz | one is about content, one is for meta data | ||
oh, and POSIX doesn't track the 'created' date of a file | 13:34 | ||
colomon is pretty certain these files have never been changed... | |||
moritz++ timotimo++ | |||
colomon needs to blog on this project. :) | 13:37 | ||
timotimo | now i'm interested to know what it is | 13:38 | |
colomon | ;) | ||
I'm coding up a p6 script to figure out which photo files on my hard drives are duplicates that can be safely deleted | 13:39 | ||
timotimo | ah | ||
while that's not useful to me in particular, that does sound nice :) | |||
colomon | it's got lots of fun bits, like sort(*.changed) | ||
to get the oldest file first | 13:40 | ||
tadzik | colomon: install fdupes :) | ||
or fdups | |||
I did the same thing a while ao | |||
colomon | and categorize(*.basename) to find which files have the same filename but different paths | 13:42 | |
masak | why 'categorize' and not (the simpler) 'classify'? | 13:43 | |
I'm asking because I don't think I see the point of 'categorize' yet. I've never used it, only 'classify'. | |||
colomon | .... good point, I think | ||
think-o | 13:44 | ||
masak | yes. S32/Containers seems to suggest 'classify' is what to use here. | ||
colomon | funny, in that I did use classify a couple of lines later... | ||
classify({ MD5($_) } | |||
masak | :) | ||
colomon | I had a great use for categorize a few days ago, let me see if I can dig it up | 13:45 | |
timotimo | colomon: wouldn't classify: *.&MD5 also work? | 13:47 | |
colomon | timotimo: calling a sub as a method? | ||
masak | classify: &MD5 | ||
timotimo | oh, even better still | ||
masak | yes, it's the only one that removes a level of invocation. | 13:48 | |
colomon | masak++ | ||
timotimo | r: sub do-something($a) { say "someone think of the $a!" }; "children".&do-something | ||
camelia | rakudo 54b7dd: OUTPUT«someone think of the children!» | ||
colomon | I used categorize to invert a hash | ||
I'm now trying to figure out if invert would have worked as well. It seems like it's not quite the same thing? | 13:49 | ||
timotimo | well, invert gives you a list of pairs, if you push that into an empty hash, you'll get a hash with once-values-now-keys and list of once-keys-now-values | ||
colomon | actually, it was a bit more than inverting the hash. but it's an interesting fine line. | 13:53 | |
most ponder | |||
*must | 13:56 | ||
13:57
daniel-s_ left
|
|||
masak | sounds interesting. please share if the pondering yields something. :) | 13:58 | |
13:59
daniel-s- joined
14:05
FROGGS left
14:06
lizmat joined,
kaleem left
14:09
daniel-s- left
14:10
notjack joined
|
|||
lizmat is in the car, on the way to Amsterdam | 14:12 | ||
and not driving | |||
masak | :) | ||
14:20
ztt left
14:21
xilo joined
|
|||
jnthn | grr...working out this given.t fail is a bit tricky | 14:24 | |
14:26
FROGGS[mobile] joined
14:33
skids left
14:41
ecocode` left
|
|||
dalek | ecs: c4f1fe8 | (Elizabeth Mattijsen)++ | S11-modules.pod: Some preliminary work on CompUnitRepo's interface |
14:42 | |
14:43
lizmat left
|
|||
jnthn | aha.... | 14:44 | |
yay. given.t passes in full now. | 14:46 | ||
masak | yay | ||
timotimo | hooray! | ||
jnthn | Gets us another 45. | 14:47 | |
notjack | perl6: my $t = 'pass'; given $t {when 'pass' {say 'yay'} when 'fail' {say 'boo'}} | 14:48 | |
camelia | rakudo 7dfcd6: OUTPUT«===SORRY!===Confusedat /tmp/s2B0BGUsuv:1------> ass'; given $t {when 'pass' {say 'yay'} ⏏when 'fail' {say 'boo'}} expecting any of: postfix statement end statement modifier statement modifi… | ||
..niecza v24-86-g39ab531: OUTPUT«===SORRY!===Strange text after block (missing comma, semicolon, comment marker?) at /tmp/Sb0zHQGy15 line 1:------> pass'; given $t {when 'pass' {say 'yay'}⏏ when 'fail' {say 'boo'}}Parse failed» | |||
timotimo | semicolon | ||
.o(rakudo could totally steal that error message, no? | |||
) | |||
maybe i'll look into that later today | |||
jnthn | I thought I tried that once and ran into something, but I totally forget what. Maybe it was nothing big. | 14:49 | |
notjack | confused at 'ass' | 14:50 | |
I've been there, camelia. | |||
jnthn | ;) | ||
14:52
raiph joined
|
|||
timotimo runs away scared instead | 14:52 | ||
jnthn | timotimo: nah, give it a try! | 14:53 | |
dalek | p: 800df5e | jnthn++ | src/vm/jvm/QAST/Compiler.nqp: Be sure to keep tc.curFrame in sync. |
14:55 | |
TimToady always wonders whether LuaJIT can possibly have the type finesse to handle Perl 6 when the type system of Lua is so impoverished^Wsimple | |||
yoleaux | 10:46Z <lizmat> TimToady: if we're going to put Nil outside of Any, things like this will break, as they now break with Mu: my $a; say $a === Mu | ||
hoelzro | hmm | ||
I've thought about a Lua backend for NQP; I wonder how much work that would take? | 14:56 | ||
bonus: really easy-to-write C extensions =) | |||
jnthn | hoelzro: The answer, whether or not you s/Lua//, is "lots" :) | ||
TimToady | tell lizmat If we put Nil outside of Any, we probably need a .is-nill primitive, or some way of training people to use =:= when they try to use === | ||
.tell lizmat If we put Nil outside of Any, we probably need a .is-nill primitive, or some way of training people to use =:= when they try to use === | |||
yoleaux | TimToady: I'll pass your message to lizmat. | ||
14:57
Chillance joined
|
|||
hoelzro | heh | 14:57 | |
TimToady | much like we currently do with smartmatching | ||
std: 42 when Nil | |||
camelia | std d4cc5ab: OUTPUT«Potential difficulties: Smartmatch against Nil always fails; perhaps you should use * === Nil or :!defined instead at /tmp/ZaNr1otX5x line 1:------> 42 when ⏏Nilok 00:00 42m» | ||
jnthn | oh...the loop code-gen doesn't know how to handle arity 1 loop blocks... | ||
TimToady | of course, now that message is wrong, unless we fix === Nil :) | 14:58 | |
as I mentioned yesterday, we can do something similar to junctions to force === to work on Nil, though perhaps aliasing to none() is overkill | 14:59 | ||
TimToady is actually a bit surprised that =:= Nil works, which probably means he is thinking of =:= wrongishly... | 15:00 | ||
15:00
snoopy left
|
|||
jnthn | Or implementations are thinking of =:= wrongishly... ;) | 15:00 | |
I think it means at the momnet something like "are the things on each side at the same memory address" | 15:01 | ||
TimToady doesn't think of those things as containers, but it's really just a more primitive container notion | |||
and thus perhaps the right thing here | |||
nr: constant Mu2 = Mu; say Mu2 =:= Mu | 15:03 | ||
camelia | rakudo 7dfcd6, niecza v24-86-g39ab531: OUTPUT«True» | ||
TimToady | \o/ | ||
TimToady notest that the only instance of '=== Nil' in either niecza or rakudo are actually down in roast | 15:07 | ||
*instances | |||
all in the pick and roll tests | |||
raiph | does anyone know if any gather/take implementation does batching yet? | 15:12 | |
is sorear's work on continuations relevant to laziness being useful/performant? | 15:13 | ||
dalek | p: 98a7d2e | jnthn++ | src/vm/jvm/QAST/Compiler.nqp: Handle arity-1 loop constructs. |
||
raiph | (for gather/take) | ||
jnthn | The continuation work on JVM was done for gather/take. | 15:14 | |
(Without that, we wouldn't have been able to support it at all on JVM.) | |||
raiph | jnthn: thanks | 15:16 | |
jnthn: does the rakudo gather/take do batching? | |||
15:17
rindolf left,
woosley1 left
|
|||
raiph | jnthn: is/was batching a tricky thing to implement? | 15:18 | |
TimToady | raiph: it's unlikely to do that before we figure out how to optimize some gather/takes to use interthread queues | ||
but once there's a queue, there's a natural buffer for batching | |||
it might be worth batching some in the continuation model as well, if there's a place to put the results, and if taking a continuation is expensive | 15:19 | ||
jnthn | raiph: I believe it doesn't do batching. | ||
I think it'll be a worthwhile optimization. | |||
TimToady | and if we can detect where strict laziness isn't required | ||
jnthn | Yeah. | 15:20 | |
I think pmichaud++, when he gets tuits for it, is planning on some work on letting us know such things. | |||
Or at least, know more... :) | |||
TimToady | recursive constant definitions will tend to want strict laziness, for instance, but maybe this falls out of recognizing we're asking for something that hasn't been computed yet | ||
15:21
domidumont left
|
|||
dalek | p: 65a2aef | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java: nqp::decont shouldn't explode on nulls. |
15:21 | |
TimToady would still like to be able to define Hamming numbers recursively: | 15:23 | ||
constant @hamming = 1, dedup (@hamming X* 2) M (@hamming X* 3) M (@hamming X* 5); | |||
I guess that'd be s/dedup/squish/ these days, now that it's a builtin | 15:24 | ||
15:24
raiph left
|
|||
TimToady | (and assuming M is defined somehow to be a lazy n-way merge) | 15:24 | |
nr: say squish 1,2,2,3 | 15:31 | ||
15:31
raiph joined
|
|||
camelia | niecza v24-86-g39ab531: OUTPUT«===SORRY!===Undeclared routine: 'squish' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 36)  at /h… | 15:31 | |
..rakudo 7dfcd6: OUTPUT«===SORRY!===Undeclared routine: squish used at line 1» | |||
TimToady | NYI I guess | ||
is LHF though | 15:32 | ||
timotimo | the sun is so lovely out, but even with a light terminal and full backlight i can hardly use my editor or irc client :| | 15:33 | |
also the keyboard gets pretty darn hot | |||
TimToady | you need to find a cave | 15:34 | |
timotimo | just 5 meters to my right is a hackspace ;) | ||
but it's warm in there. it's direltcy under a roof and the roof isn't insulated properly | |||
TimToady | that's what IR clogs are for | 15:35 | |
maybe it would help to turn the hackspace over so that the floor is radiating instead of the ceiling... | 15:36 | ||
timotimo | hehe | 15:37 | |
lee_ | does this look like a useful optimization for [+] 1..10000? gist.github.com/leedo/735a5f09350bd2d50d33 | ||
it seems to cut the time down quite a bit | 15:38 | ||
timotimo | screed heating? :) | ||
imgur.com/a/BLsoE <- my spot right now | 15:40 | ||
lee_: watch out, that may blow up if someone defines their own infix:<+> | |||
at least i always had to make sure that didn't happen when i worked with the optimizer | 15:41 | ||
oh, i'm talking crap, since it's lexical, you'll always compare with the "correct" infix:<+> | |||
15:42
crab2313 joined
|
|||
lee_ | i wasn't sure what the best way to test that min and max are both Ints | 15:43 | |
colomon | I'd say $values.min ~~ Int && $values.max ~~ Int | 15:44 | |
15:50
crab2313 left
15:57
FROGGS joined
|
|||
colomon just erased 24 gigs worth of duplicated photos | 15:59 | ||
15:59
domidumont joined
|
|||
FROGGS | ohh, I read "duplicated p*rnos" for a moment | 16:00 | |
16:00
PacoAir left
|
|||
TimToady | lee_: there's something a little wrong with it in regards to flattening, since a range in list context flattens, but you're kinda bypassing the flattening, such that [+] $range would "flatten" $range when it shouldn't, seems to me | 16:00 | |
jnthn | Pro tip: an epoch in milliseconds is quite different from an epoc in seconds. | 16:01 | |
TimToady | epochs shouldn't be integers at all, in P6-think... | ||
TimToady realizes that this is a minority view in the world today :) | 16:02 | ||
jnthn | Well, we gotta get what we want in terms of what platforms think ;) | ||
TimToady | that's part of the world I was referrin' to | ||
pmurias | jnthn: the way I'm solving the lack of BEGIN to generate a convenient example of a serialized closure is it insert vim folds into generated code so that I can view more complex stuff | ||
jnthn | bah, all that and the test that wants $*TZ explodes 'cus we don't have sprintf that works yet... | 16:04 | |
dalek | kudo/nom: 284a76f | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/Ops.java: Implement nqp::p6decodelocaltime. |
||
kudo/nom: 5b1775f | jnthn++ | src/core/Temporal.pm: Enable $*TZ on JVM. |
|||
TimToady | lee_: also, I'm not sure the form you have it would be amenable to constant folding--you'd like [+] 1..10000 to fold at compile time | 16:05 | |
16:05
konundra left
|
|||
TimToady | nr: my $range = 1..10000; say [+] $range | 16:06 | |
camelia | niecza v24-86-g39ab531: OUTPUT«1..10000» | ||
..rakudo 7dfcd6: OUTPUT«10000» | |||
TimToady | rakudo++ | ||
nr: my $range = 1..10000; say [+] @$range | |||
camelia | rakudo 7dfcd6, niecza v24-86-g39ab531: OUTPUT«50005000» | ||
TimToady | lee_: I don't think your optimization distinguishes those as it ought | 16:07 | |
lee_ | hmm yeah, i see your point | ||
TimToady | probably need something slightly more ASTy | 16:08 | |
16:10
kaleem joined
|
|||
TimToady | nr: sub foo (*@args) { say +@args }; sub bar (**@args) { say +@args }; foo 1..100, 1..100; bar 1..100, 1..100 | 16:10 | |
camelia | niecza v24-86-g39ab531: OUTPUT«===SORRY!===Slice parameters NYI at /tmp/5rPlwdIOLf line 1:------> *@args) { say +@args }; sub bar (**@args⏏) { say +@args }; foo 1..100, 1..100; baUnhandled exception: Check failed at /home/p6eval/niecza/boot/l… | ||
..rakudo 7dfcd6: OUTPUT«2002» | |||
TimToady | r: sub bar (**@args) { say @args[0].WHAT }; bar 1..100 | 16:12 | |
camelia | rakudo 7dfcd6: OUTPUT«(Range)» | ||
TimToady | r: sub bar (**@args) { say @args[0].WHAT }; my $range = 1..100; bar $range | ||
camelia | rakudo 7dfcd6: OUTPUT«(Range)» | ||
TimToady | rakudobug | ||
(I suspect) | 16:13 | ||
r: sub bar (|args) { say args[0].WHAT }; my $range = 1..100; bar $range | |||
camelia | rakudo 7dfcd6: OUTPUT«(Range)» | ||
lee_ looks up *@args vs **args, i'm new! | |||
16:13
kaleem_ joined
|
|||
TimToady | r: sub bar (|args) { say args[0].WHAT }; my $range = 1..100; bar |$range | 16:13 | |
camelia | rakudo 5b1775: OUTPUT«(Int)» | 16:14 | |
TimToady | r: sub bar (|args) { say args[0].WHAT }; my $range = 1..100; bar @$range | ||
camelia | rakudo 5b1775: OUTPUT«(List)» | ||
jnthn | timotimo: Just did the Makefile re-ordering we discussed last night. :) | ||
timotimo: Gets rid of some errors :) | |||
[Coke] | jnthn: almost time for the daily run. should I wait 10m? | 16:15 | |
jnthn | [Coke]: Yes ;) | ||
Will push in a moment | |||
(within 10) | |||
TimToady | r: sub bar (|args) { say args[0].WHAT }; my @range := 1..100; bar @range | ||
camelia | rakudo 5b1775: OUTPUT«(Range)» | ||
TimToady | r: sub bar (|args) { say args[0].WHAT }; my $range := 1..100; bar $range | ||
camelia | rakudo 5b1775: OUTPUT«(Range)» | ||
16:15
Stygia left
|
|||
TimToady | so where's the $ vs @ difference? | 16:16 | |
16:16
kaleem left
|
|||
TimToady | such that one could emulate normal slurpy by examining |args? | 16:17 | |
jnthn | .oO( in the mind of whoever wants binding not to be a low level operation... :S ) |
||
16:17
jlaire left
|
|||
TimToady | n: sub bar (|args) { say args[0].WHAT }; my @range := 1..100; bar @range | 16:17 | |
camelia | niecza v24-86-g39ab531: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object at Builtins.InvokeSub (Niecza.P6any obj, Niecza.Variable[] pos) [0x00000] in <filename unknown>:0  at Niecza.Kernel.ToComposable (Niecza.STable arg… | ||
jnthn | r: say Range ~~ Positional | 16:18 | |
camelia | rakudo 5b1775: OUTPUT«True» | ||
TimToady | |args should be very raw | ||
jnthn | That's why it's allowed to be bound directly to := | ||
It is. And @a and $a are just names of storage locations. | |||
16:19
SamuraiJack_ left
|
|||
TimToady | and how does normal binding distinguish $ from @ then? | 16:19 | |
jnthn | As in, why is it an error to do: | ||
r: my @a := 'foo' | |||
camelia | rakudo 5b1775: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Str' in block at /tmp/O4nHjGxa_F:1» | ||
jnthn | ? | ||
TimToady | as in, how does *@args know to flatten @ but not $ | 16:20 | |
jnthn *thought* it was a combination of type and "not in a scalar container" | |||
jnthn has no idea how much Pm expects the current details to change in this regard... | 16:21 | ||
TimToady | n: sub bar (|args) { say args[0].WHAT }; my $range = 1..100; bar $range | 16:22 | |
camelia | niecza v24-86-g39ab531: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object at Builtins.InvokeSub (Niecza.P6any obj, Niecza.Variable[] pos) [0x00000] in <filename unknown>:0  at Niecza.Kernel.ToComposable (Niecza.STable arg… | ||
TimToady | r: sub bar (|args) { say args[0].WHAT }; my $range = 1..100; bar $range | ||
camelia | rakudo 5b1775: OUTPUT«(Range)» | ||
TimToady | no scalar container there... | ||
jnthn | Um, they're invisible, though, no? | ||
r: my $x = 1..100; say $x.WHAT | |||
camelia | rakudo 5b1775: OUTPUT«(Range)» | ||
16:22
jlaire joined
|
|||
jnthn | r: my $x := 1..100; say $x.WHAT | 16:22 | |
camelia | rakudo 5b1775: OUTPUT«(Range)» | ||
FROGGS | ohh, Stage parse : 59,851 for jakudo... I should have tried it earlier :o) | ||
dalek | kudo/nom: f2b0f89 | jnthn++ | tools/build/Makefile-JVM.in: Sync CORE.setting ordering with Parrot Makefile. No reason for them to be different. timotimo++ for noticing. |
16:23 | |
jnthn | FROGGS: How much is it for you on Parrot? :) | ||
[Coke]: Fire! | |||
TimToady | r: my $x = 1..100; my @a = $x; say +@a | ||
camelia | rakudo 5b1775: OUTPUT«1» | ||
TimToady | r: my $x = 1..100; my $a = $x; say +$a | ||
camelia | rakudo 5b1775: OUTPUT«100» | ||
FROGGS | jnthn: 130s | 16:24 | |
jnthn | FROGGS: Hm, difference is a bit more pronounced than that for me. | ||
FROGGS | damn it, I forgot to buy beer :/ | ||
jnthn | :( | 16:25 | |
TimToady | r: sub bar (|args) { say VAR(args[0]).WHAT }; my $range = 1..100; bar $range | ||
camelia | rakudo 5b1775: OUTPUT«===SORRY!===Undeclared name: VAR used at line 1» | ||
jnthn | .VAR works | ||
TimToady | r: sub bar (|args) { say args[0].VAR.WHAT }; my $range = 1..100; bar $range | ||
camelia | rakudo 5b1775: OUTPUT«(Scalar)» | ||
TimToady | there we go | ||
r: sub bar (|args) { say args[0].VAR.WHAT }; my @range := 1..100; bar @range | |||
jnthn | ah, that's what you were after... | ||
camelia | rakudo 5b1775: OUTPUT«(Range)» | 16:26 | |
16:26
arnsholt joined
|
|||
TimToady | what lee_++ would need to emulate flattening to do the optimization correctly by that method | 16:26 | |
arnsholt | o/ | ||
jnthn | o/ arnsholt | 16:27 | |
TimToady | r: sub bar (|args) { say args[0].VAR }; my @range := 1..100; bar @range | ||
camelia | rakudo 5b1775: OUTPUT«1..100» | ||
arnsholt | jnthn: From a cursory look at JNA, it looks like it passes pointers around in Java longs, so I think I'll try to mirror the Parrot approach to NativeCall on JVM as a first whack | 16:28 | |
TimToady | r: sub bar (|args) { say args[0].VAR }; my $range = 1..100; bar $range | ||
camelia | rakudo 5b1775: OUTPUT«1..100» | ||
TimToady | I guess .gist loses the distinction | ||
16:28
fgomez joined,
pmurias left
|
|||
TimToady | r: sub bar (|args) { say args[0].VAR.Str }; my $range = 1..100; bar $range | 16:29 | |
camelia | rakudo 5b1775: OUTPUT«Range<-109147205>» | ||
TimToady | heh | ||
jnthn | arnsholt: ok | ||
arnsholt: Good luck! :) | 16:30 | ||
arnsholt | Thanks =) | ||
TimToady | r: sub bar (|args) { my $which = say args[0].VAR; say $which.WHAT }; my $range = 1..100; bar $range | 16:31 | |
arnsholt | Passing pointers around in integers is kind of horrible, but I think it'll work | ||
camelia | rakudo 5b1775: OUTPUT«1..100(Bool)» | ||
FROGGS | I think I'm trying j5 today... | ||
jnthn | arnsholt: It's only cheating if you get caught ;) | ||
TimToady | r: sub bar (|args) { my \which = say args[0].VAR; say which.WHAT }; my $range = 1..100; bar $range | ||
camelia | rakudo 5b1775: OUTPUT«1..100(Bool)» | ||
TimToady | jnthn: why Bool? | ||
duh | 16:32 | ||
moritz | say | ||
TimToady | r: sub bar (|args) { my \which = args[0].VAR; say which.WHAT }; my $range = 1..100; bar $range | ||
camelia | rakudo 5b1775: OUTPUT«(Scalar)» | ||
arnsholt | jnthn: I'll hide it as well as I can, in that case =D | ||
djanatyn | is there something equivalent to template::toolkit or jinja2 or mustache for perl6 | ||
moritz | maybe we should spec say() return "you are looking at the return value from &say" | ||
[Coke] | jnthn: fired. | 16:33 | |
TimToady | well, that would work as a True value, but not as a False value :) | ||
16:33
kaleem joined
16:34
kaleem_ left
|
|||
TimToady | "you are looking at the return value from &say" but False, obviously... :) | 16:34 | |
jnthn | [Coke]: yay. Hopefully we make the 90% :) | ||
Especially since I seem to have spent the day patching Rakudo rather than doing $dayjob :) | |||
[Coke] | jnthn: oh, that's a given. unless you screwed something up! | 16:35 | |
jnthn | Yes, there is that potential ;) | ||
TimToady | .tell lizmat A STD.pm6 commit message of "Same change as in rakudo" is not very informative when I do 'git log' :P | 16:39 | |
yoleaux | TimToady: I'll pass your message to lizmat. | ||
dalek | d: 102c740 | larry++ | STD.pm6: Recommend =:= Nil rather than === |
16:40 | |
sorear | good * #perl6 | 16:42 | |
jnthn | o/ sorear | ||
pmichaud | yes, when I get tuits I want to review the whole list model, especially in light of what I learned from preparing the parallelism talk | 16:44 | |
so can clean up Nil and stuff then as needed. | |||
sorear | o/ pmichaud | ||
pmichaud | sorear: btw, your CLA arrived. | 16:45 | |
colomon | \o | ||
\o/ | |||
sorear | pmichaud: \o/ \o/ | ||
colomon | he's official! | ||
TimToady | now he just needs to learn to be officious like me :) | ||
sorear | .oO( any idea how many cities it went through 'cus USPS can't read my atrocious handwriting? ) |
16:46 | |
TimToady: :p | |||
16:48
PacoAir joined
|
|||
pmichaud | sorear: no, don't know that, sorry. :) | 16:49 | |
sorear | did it at least get recorded under the correct name? | 16:50 | |
pmichaud | looking | ||
16:51
mstefanko left
|
|||
TimToady | and that would be Murgatroyd McGillacudy? | 16:51 | |
16:53
kaleem left
|
|||
pmichaud | sorear: I think it's recorded under the correct name, since I just now recorded it :) | 16:53 | |
16:54
Lorn_ is now known as Lorn,
Lorn left,
Lorn joined
|
|||
TimToady | been thinking about the list context thing, and if we're not to pass context down to listops saying how eager we are, then the listop has to return an uncommitted list back up, and have lazy/eager/hyper/race select the algorithm lazily after the return somehow | 16:55 | |
16:55
dakkar left
|
|||
TimToady | lazy and eager can just be signaled by how you pull args off the list, but hyper and race have to have some other means of telling the algorithm to behave differently | 16:55 | |
16:56
mstefanko joined
|
|||
TimToady | and it would be nice if sink could do that too, rather than just being eager and throwing stuff away | 16:56 | |
it would also be nice if the mechanism we choose is sufficiently amenable to static analysis that we can pass context down the calls at compile time where the decision doesn't have to be deferred to run time | 16:58 | ||
pmichaud | I think the iterators can signal hyperness downward, though. | ||
at least, that's the model I've been playing with a bit | |||
(mentally) | |||
TimToady | what I'm saying is that the compile-time aspects of context could be considered an optimization, and the general solution does not have to involve having passing the context to each thing that might return a list, but merely to the interator object that is returned, as you say | 16:59 | |
pmichaud | right | 17:00 | |
moritz | so that means we're getting rid of inward-propagated sink context? | ||
TimToady | by that view, thinking of special calls that pass context downward can be viewed as a premature optimization | ||
pmichaud | I'm thinking inward-propagated sink is just a form of hyper/race | 17:01 | |
TimToady | moritz: it means we could | ||
I'm saying it only has to propagate into the iterator, not into the map/grep/whatever | |||
pmichaud | well, map/grep/whatever *is* an iterator at the underlying level. | ||
it's just an iterator wrapped inside of a List | |||
anyway, I've been thinking that I have the List/ListIter boundary slightly off in Rakudo | 17:02 | ||
TimToady | otoh, it might mean that map/grep/whatever have to provide different algorithms that this "inversion of control" could select | ||
pmichaud | and that fixing that will clean up a lot of the hyper/sink/eager/other stuff. | ||
anyway, I don't know when tuits will arrive again. | 17:04 | ||
all of our predictions about my tuit availability have been way off thus far. | |||
TimToady | or we need to find the primitives that we can implement map in a context-ignorant way and have it Just Work as a hyper map or race map | 17:05 | |
pmichaud | TimToady: that's what I've been thinking will work. | ||
well, not exactly. | |||
MapIter becomes hyper and race aware, at any rate. | |||
indeed, all of the *Iters do | |||
TimToady | and where the language accidentally enforces ordering, we need to address that | ||
pmichaud | (there aren't that many... ListIter, MapIter, GatherIter, Range) | ||
timotimo | jnthn: i tried to do the reordering of the makefile myself and couldn't get it to compile properly :( | 17:06 | |
jnthn | timotimo: oh...weird. | ||
timotimo: Well, it's done now | |||
timotimo | but if you were successful, i'm glad :) | 17:07 | |
jnthn | And helped :) | ||
yeah, IO spec tests are in better shape now | |||
TimToady | (which, btw, probably means I'm gonna stick to my guns on the non-eagerness of for loops) | ||
but we'll see | |||
17:07
ajr_ left
|
|||
jnthn | uh, IO::Spec spectests, that is :) | 17:07 | |
TimToady | does anyone foresee a difficulty with changing all the === Nil spectests to =:= Nil? | 17:08 | |
moritz | |||
=:= is meant to test containers, not identity | 17:09 | ||
r: my $x = Nil; say $x =:= Nil; | |||
camelia | rakudo f2b0f8: OUTPUT«False» | ||
TimToady | that's supposed to put Any into $x | ||
r: my $x := Nil; say $x =:= Nil | 17:10 | ||
camelia | rakudo f2b0f8: OUTPUT«True» | ||
TimToady | so it turns out that =:= is using a more primitive notion of "container" than somoe of us have been thinking, but that seems fine | 17:11 | |
17:12
konundra joined
|
|||
TimToady | r: my $x := Mu; say $x =:= Mu | 17:12 | |
pmichaud | I'm afk again | ||
camelia | rakudo f2b0f8: OUTPUT«True» | ||
TimToady | r: my $x = Mu; say $x =:= Mu | ||
camelia | rakudo f2b0f8: OUTPUT«False» | ||
TimToady | hmm | ||
r: my $x = Mu; say |$x =:= Mu | 17:13 | ||
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&prefix:<|>' called (lines 1, 1)» | ||
17:13
birdwindupbird left
|
|||
TimToady | how to deref a $x containing Mu (or Nil)... | 17:13 | |
masak | r: my $x = Mu; say $x.WHICH; say Mu.WHICH | ||
camelia | rakudo f2b0f8: OUTPUT«MuMu» | ||
masak | hm. | ||
TimToady | r: my \x = Mu; say x =:= Mu | ||
camelia | rakudo f2b0f8: OUTPUT«True» | ||
TimToady | I guess don't put it into $x in the first place | 17:14 | |
r: my $x = Mu; my \x = $x; say x =:= Mu | |||
camelia | rakudo f2b0f8: OUTPUT«False» | ||
TimToady | hard to strip off that (Scalar) object... | 17:15 | |
r: my $x = Mu; my \x = |$x; say x =:= Mu | |||
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&prefix:<|>' called (line 1)» | ||
TimToady | we seem to be missing a primitive | ||
moritz | r: my $x = Mu; say nqp::decont($x) =:= Mu | 17:16 | |
camelia | rakudo f2b0f8: OUTPUT«True» | ||
moritz | r: say Mu =:= Any | ||
camelia | rakudo f2b0f8: OUTPUT«False» | ||
TimToady | maybe we should expose decont? | 17:17 | |
17:17
raiph left
|
|||
moritz | what's the use case? | 17:17 | |
(besides using =:= for stuf it wasn't intended to do) | 17:18 | ||
17:18
fhelmberger left
|
|||
TimToady | looking at a user-supplied value in $foo to see if it's Nil? | 17:18 | |
well, =:= was intended to compare two pointers, really, and that's still what it's doing | |||
we just don't have a language-level way to name the pointer in $x yet | 17:19 | ||
17:19
raiph joined
17:22
xilo left
|
|||
TimToady | otoh, there might be a way of getting === to work even if Nil is outside of Any, if Nil is just a pseudo-junction of some sort | 17:23 | |
17:23
spider-mario joined
|
|||
TimToady | or more generally, if the failover to Junction can be generalized to other conceptual types outside of Any | 17:24 | |
diakopter | "Ranges from S02 and S03 which are nearly frozen" | 17:25 | |
labster: ... | |||
TimToady | diakopter!! \o/ | ||
colomon | \o/ | 17:26 | |
diakopter | .seen diakopter | 17:27 | |
yoleaux | You're right there. | ||
17:29
xilo_ left
|
|||
masak | .seen yoleaux | 17:30 | |
yoleaux | I'm right here. | ||
masak | wherever you go, there you are. | ||
[Coke]: by the way, thank you for the tip about Buckaroo Banzai ;) | |||
17:32
rindolf joined
17:35
ajr joined,
ajr is now known as Guest50674
17:36
Guest50674 is now known as ajr_
17:37
daxim left
17:41
xilo joined
|
|||
notjack | perl6: sub f(*%args) { say %args;} f(1,2,'three', four=>'five'); | 17:43 | |
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===Two terms in a rowat /tmp/PuSqco7PSV:1------> sub f(*%args) { say %args;} ⏏f(1,2,'three', four=>'five'); expecting any of: postfix statement end statement modifier statement mod… | ||
..niecza v24-86-g39ab531: OUTPUT«===SORRY!===Strange text after block (missing comma, semicolon, comment marker?) at /tmp/fzhjxMEy4R line 1:------> sub f(*%args) { say %args;}⏏ f(1,2,'three', four=>'five');Parse failed» | |||
TimToady | masak: we used to live a couple miles away from that dam they use in the end credits :) | ||
masak | ooh | 17:44 | |
masak .oO( we used to live dam close ) | |||
TimToady | one of those dams that gets water behind it every twenty years or so, but in so doing prevents downtown LA from washing away, which could be construed as either good or bad | ||
masak | :) | 17:45 | |
TimToady | r: sub decont($var) { $var }; my $x = Mu; say decont($x) =:= Mu | 17:48 | |
camelia | rakudo f2b0f8: OUTPUT«Nominal type check failed for parameter '$var'; expected Any but got Mu instead in sub decont at /tmp/kHY49emIC3:1 in block at /tmp/kHY49emIC3:1» | ||
TimToady | r: sub decont(Mu $var) { $var }; my $x = Mu; say decont($x) =:= Mu | ||
camelia | rakudo f2b0f8: OUTPUT«False» | ||
TimToady | r: sub decont(\var) { var }; my $x = Mu; say decont($x) =:= Mu | 17:49 | |
camelia | rakudo f2b0f8: OUTPUT«Nominal type check failed for parameter 'var'; expected Any but got Mu instead in sub decont at /tmp/FCAYkOSda8:1 in block at /tmp/FCAYkOSda8:1» | ||
TimToady | r: sub decont(Mu \var) { var }; my $x = Mu; say decont($x) =:= Mu | ||
camelia | rakudo f2b0f8: OUTPUT«False» | ||
TimToady | rats | ||
r: sub decont(Mu \var) { var }; my $x = Mu; say decont($x).WHAT | 17:50 | ||
camelia | rakudo f2b0f8: OUTPUT«(Mu)» | ||
TimToady | r: sub decont(Mu $var) { $var }; my $x = Mu; say decont($x).WHAT | 17:51 | |
camelia | rakudo f2b0f8: OUTPUT«(Mu)» | ||
TimToady | r: sub decont(Mu $var) { $var }; my $x = Mu; say $x.WHICH; say decont($x).WHICH; say Mu.WHICH | 17:55 | |
camelia | rakudo f2b0f8: OUTPUT«MuMuMu» | ||
17:55
xilo left
|
|||
TimToady chews his cud | 17:55 | ||
r: sub decont(Mu $var) { $var }; my $x = Mu; say $x.WHERE; say decont($x).WHERE; say Mu.WHERE | |||
camelia | rakudo f2b0f8: OUTPUT«459420040459420040459420040» | ||
jnthn | Um. | 17:56 | |
.WHERE decontainerizes? | |||
TimToady | r: sub decont(Mu \var) { var }; my $x = Mu; say decont($x) =:= Mu; # why doesn't work? | ||
camelia | rakudo f2b0f8: OUTPUT«False» | ||
TimToady | r: sub decont(Mu $var) { $var }; my $x = Mu; say decont($x) =:= Mu; # why doesn't work? | 17:57 | |
camelia | rakudo f2b0f8: OUTPUT«False» | ||
TimToady | r: sub decont(Mu $var) { $var }; my $x = Mu; say nqp::decont($x) =:= Mu; # why doesn't work? | ||
camelia | rakudo f2b0f8: OUTPUT«True» | ||
jnthn | r: sub decont(Mu $var) { $var }; say decont(Mu).VAR | ||
camelia | rakudo f2b0f8: OUTPUT«(Mu)» | ||
jnthn | r: sub decont(Mu $var) { $var }; say decont(Mu) =:= Mu | 17:58 | |
camelia | rakudo f2b0f8: OUTPUT«True» | ||
jnthn | r: sub decont(Mu $var) { $var }; my $x := Mu; say decont($x) =:= Mu | ||
camelia | rakudo f2b0f8: OUTPUT«True» | ||
jnthn | r: sub decont(Mu $var) { $var }; my $x = Mu; say decont($x) =:= Mu | ||
camelia | rakudo f2b0f8: OUTPUT«False» | ||
17:58
domidumont left
|
|||
jnthn | Um. That's surprising... | 17:58 | |
TimToady | me2 | ||
jnthn | r: sub decont(Mu $var) { $var }; my $x = Mu; say decont($x).VAR | ||
camelia | rakudo f2b0f8: OUTPUT«Mu» | 17:59 | |
jnthn | r: sub decont(Mu $var) { $var }; my $x = Mu; say nqp::iscont(decont($x)) | ||
camelia | rakudo f2b0f8: OUTPUT«1» | ||
jnthn | I wonder if this is something to do with the "don't flatten" thing... | ||
17:59
skids joined
|
|||
TimToady | then why doesn't \var work? | 17:59 | |
r: sub decont(Mu \var) { var }; my $x = Mu; say nqp::iscont(decont($x)) | 18:00 | ||
camelia | rakudo f2b0f8: OUTPUT«1» | ||
jnthn | r: sub decont(Mu \var) { say nqp::iscont($var); $var }; my $x = Mu; say nqp::iscont(decont($x)) | ||
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===Variable '$var' is not declaredat /tmp/9X3e9QuPxR:1------> b decont(Mu \var) { say nqp::iscont($var⏏); $var }; my $x = Mu; say nqp::iscont(d expecting any of: postfix» | ||
jnthn | r: sub decont(Mu \var) { say nqp::iscont(var); var }; my $x = Mu; say nqp::iscont(decont($x)) | ||
camelia | rakudo f2b0f8: OUTPUT«11» | ||
jnthn | \var doesn't mean decontainerize, it means "take whatever was passed" | 18:01 | |
TimToady | but returning var should decont? | ||
r: sub decont(Mu \var) { return var }; my $x = Mu; say nqp::iscont(decont($x)) | |||
camelia | rakudo f2b0f8: OUTPUT«1» | ||
TimToady | r: sub decont(Mu \var) { |var }; my $x = Mu; say nqp::iscont(decont($x)) | 18:02 | |
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&prefix:<|>' called (lines 1, 1)» | ||
jnthn | TimToady: I think it reconts. | ||
TimToady: To not lose the scalar nature of it, but to make sure it's ro, it re-wraps it in a read-only container. | 18:03 | ||
TimToady | r: my &decont := &nqp::decont; my $x = Mu; say nqp::iscont(decont($x)) | 18:04 | |
camelia | rakudo f2b0f8: OUTPUT«Type check failed in binding; expected 'Callable' but got 'Any' in block at /tmp/In723T7kNf:1» | ||
TimToady | r: my &decont = &nqp::decont; my $x = Mu; say nqp::iscont(decont($x)) | ||
camelia | rakudo f2b0f8: OUTPUT«Type check failed in assignment to '&decont'; expected 'Callable' but got 'Any' in block at /tmp/NLN214_Q6X:1» | ||
TimToady | r: my \decont = &nqp::decont; my $x = Mu; say nqp::iscont(decont($x)) | 18:05 | |
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&decont' called (lines 1, 1)» | ||
FROGGS | timotimo: an if is allowed | ||
TimToady | r: my \decont = &nqp::decont; my $x = Mu; say nqp::iscont(decont.($x)) | ||
camelia | rakudo f2b0f8: OUTPUT«No such method 'Any' for invocant of type 'Mu' in block at /tmp/RXIMdwFzt_:1» | ||
TimToady | r: my $decont = &nqp::decont; my $x = Mu; say nqp::iscont($decont.($x)) | ||
camelia | rakudo f2b0f8: OUTPUT«No such method 'Any' for invocant of type 'Mu' in block at /tmp/TGWKSyNgqq:1» | ||
TimToady | .oO(...) |
18:06 | |
r: say &nqp::decont ~~ Callable | 18:07 | ||
camelia | rakudo f2b0f8: OUTPUT«False» | ||
timotimo | oh, of course it is. good catch. | ||
but is the basic approach sensible? | |||
FROGGS | timotimo: same for when | ||
jnthn | TimToady: nqp:: things a macro-ish, not sub-ish | ||
timotimo | hmm | ||
FROGGS | timotimo: but yes, I think it is useful, for say, routine_decl after block | ||
timotimo | so you think i should parse a full thingie after a block and if it succeeds i should explode? | 18:08 | |
TimToady | jnthn: but then there's the paragraph at S06:3149 | 18:09 | |
dalek | rl6-roast-data: b3c45da | coke++ | / (5 files): today (automated commit) |
||
[Coke] | # 07/02/2013 9c64dd0 rakudo++ (26088); niecza (81.73%); pugs (36.42%); rakudo.jvm (92.34%) | 18:10 | |
FROGGS | timotimo: yes because I would think that these are the usual mistakes | ||
yay | |||
\o/ | |||
colomon | \o/ | 18:11 | |
[Coke] | masak: (BB) glad you liked it! | ||
r: say 26088*.95-24092 | 18:12 | ||
camelia | rakudo f2b0f8: OUTPUT«691.6» | ||
masak | labster: re github.com/perl6/specs/commit/71e9...382a2bd92d -- the descriptions of floor and ceiling don't make sense. the description of round partially doesn't make sense. | 18:13 | |
labster: if you just say "the highest integer", it sounds like you mean "real integer". | |||
labster: and complex numbers aren't ordered. | |||
timotimo | big ups, everyone \o/ | 18:14 | |
jnthn | Wow, that's some way past 90%! | 18:19 | |
colomon is thinking he is going to install OS X 10.8.X as soon as his current Time Machine backup is finished.... JVM 1.7 here we come! | 18:21 | ||
jnthn | TimToady: The -ish was quite a big -ish ;) | ||
FROGGS | jnthn: about that stack overflow from rshift.t, on my machine 0xx3700 blows up while 0xx3500 does not | ||
jnthn: is that a limitation of my machine? | |||
jnthn | FROGGS: Wait, is there actually some recursion expected to be going on here? | 18:22 | |
jnthn thought it was a test for bit-shifting... | |||
FROGGS | jnthn: dunno, does the X+> a recursion? | 18:23 | |
yes, but it is just the size of the list | |||
even the hardcoded list blows up | |||
(6010 elements) | |||
jnthn | X is implemented iteratively, iirc | ||
FROGGS | that is why I tested 0 xx 3700 | ||
to find out what the max list size is | 18:24 | ||
and it is somewhere arround 3500 .. 3700 here | |||
wonder if that is about memory limits or something VM-ish | |||
jnthn | yeah, $i looks iterative to me | 18:25 | |
oops | |||
X looks iterative tome | |||
the meta-op form | 18:26 | ||
jnthn wonders if there's something weird going on with the gather/take | |||
notjack | is it possible to implement a function composition operator such that it takes two functions as input (foo, bar) and returns a function which, when called, applies foo to the result of bar, then the inverse-of-bar (if it exists) to the result of foo? | 18:27 | |
FROGGS | if RANGE X+> RANGE and 0 xx NUMBER show the same limit, does this still point to gather/take? | ||
moritz | notjack: yes, if you can find a way to find the inverse of bar | ||
jnthn | Well, I'm only wondering about gather/take 'cus X meta-op is implemented in terms of it | 18:28 | |
notjack | I was under the impression that functions can define their own inverses | ||
18:28
lizmat joined
|
|||
notjack | like they can declare that they're associative, etc, I thought they could also declare themselves invertible | 18:28 | |
moritz | not out of the box | ||
notjack | (and provide the inverse definition) | ||
moritz | Perl 6 is not a computer algebra system | 18:29 | |
notjack | hmm, ok, my misapprehension | ||
moritz | (though you could certainly build on top of it, and I've been tempted before :-) | ||
*build one | |||
notjack | I didn' tmean P6 should "figure out" the inverse, only allow subs to declare themselves invertible, and provide and inverse | ||
moritz | you can certainy do that with traits | ||
notjack | like sub exp is invertible {...} inverse is log {...} | ||
[Coke] | gist.github.com/coke/5879701 updated. | ||
timotimo | std: given "1" { when Str { say "yup" } when Int { say "oh what?" } } | 18:30 | |
camelia | std 102c740: OUTPUT«===SORRY!===Strange text after block (missing comma, semicolon, comment marker?) at /tmp/okQWqFuRj0 line 1:------> given "1" { when Str { say "yup" }⏏ when Int { say "oh what?" } } expecting horizontal whitespaceParse faile… | ||
TimToady | we never did invertable, but we did at one point consider 'is commutative' | ||
timotimo | yeah, i can port that possibly | 18:31 | |
but not right now | |||
notjack | yeah, commutitivity would be helpful for optimizing reductions | ||
if you knew + was commutitive then you could optimize the operation [+] | 18:32 | ||
moritz | r: multi sub trait_mod:<is>(&r, :$inverse!) { &r does role { method inverse() { $inverse } } }; sub f($x) is inverse({$_ - 2}) { $x + 2 } | ||
camelia | rakudo f2b0f8: ( no output ) | ||
moritz | r: multi sub trait_mod:<is>(&r, :$inverse!) { &r does role { method inverse() { $inverse } } }; sub f($x) is inverse({$_ - 2}) { $x + 2 }; say &f.inverse.(f(42)) | ||
camelia | rakudo f2b0f8: OUTPUT«42» | ||
moritz | there you go | ||
notjack | here's a test case: define an invertible function log, whose inverse is exp, then an composition operator "under" and say mult = sum under log such that mult (3,4) is the same as 3*4 | 18:33 | |
oh, that's cool | 18:34 | ||
TimToady | precision suffers... | ||
notjack | traits are neat | ||
TimToady | unless you get to real symbolic algebra | ||
[Coke] | ah. someone added a reference to nqp::chdir() in the jvm, but never actually implemented it. | ||
notjack | TimToady: the goal is more code clarity in certain contexts | ||
TimToady | but this is partly why we are trying to keep the typespace outside of Any so that we can do conceptual types | 18:35 | |
notjack | where it's easier to think of transforming the problem to a new domain, expressing a calculation that's simple (in the new domain), and projecting back to the original domain | ||
moritz | like schwartz' transform | ||
TimToady | sure, I think of that as a kind of strength reduction optimization | ||
notjack | think of FFT, e.g. | ||
right | |||
then of course you have to start thinking of identity functions, left- vs right-inverses, etc | 18:37 | ||
but even a coarse implementation is a boon for the user | |||
raiph | .ask sorear is niecza's gather/take lazy? | ||
yoleaux | raiph: I'll pass your message to sorear. | ||
TimToady | raiph: yes, it is | ||
raiph | TimToady: thx | ||
moritz | n: my @a := gather { for ^5 { take $_; .say } }; my $ = @a[2] | 18:38 | |
camelia | niecza v24-86-g39ab531: OUTPUT«01» | ||
TimToady | ooh, In-n-Out magically happened, yum & | ||
[Coke] | ugh. chdir on the jvm is not straightforward. | ||
FROGGS | jnthn: if the things I posted are connected, it is more about memory limits or so rather that a fixed maximum list size... 0..54 X+ 0..54 works while 0..55 X+ 0..55 blows up | 18:39 | |
(according to my 6guts :P) | |||
FROGGS .oO( a straightbackward chbackdir ) | 18:40 | ||
18:41
ilbot_nextgen joined
|
|||
notjack | another sugar-y question | 18:41 | |
moritz | or maybe a curly chdir? | ||
notjack | is it possible to define a function that, given a seq of function names, produces a function which is a chain of those subs? | 18:42 | |
moritz | yes. | ||
notjack | like chain(qw<sqroot sum square>) ? | ||
(sorry, I'm still speaking pidgin perl5) | 18:43 | ||
FROGGS | sub chainy( *@subs ) { ::($_) for @subs } | ||
sub chainy( *@subs ) { ::($_)() for @subs } # invoke them | |||
moritz | not quite | ||
arnsholt | jnthn: On JVM, should a non-serializable type throw an exception in deserialize_stub, or is something else preferred? | 18:44 | |
moritz | well, if you do it that way, you have to pass the names with & | ||
18:44
Rotwang joined
|
|||
moritz | so chainy <&sqrt &sin> or so | 18:44 | |
jnthn | arnsholt: There is fine | ||
FROGGS | r: sub test { say 42 }; ::('test')() | ||
camelia | rakudo f2b0f8: OUTPUT«No such symbol 'test' in method <anon> at src/gen/CORE.setting:10482 in any at src/gen/Metamodel.nqp:2580 in any find_method_fallback at src/gen/Metamodel.nqp:2568 in any find_method at src/gen/Metamodel.nqp:939 in block at /tmp/awrTvwhJoM:1»… | ||
FROGGS | r: sub test { say 42 }; ::('&test')() | ||
camelia | rakudo f2b0f8: OUTPUT«42» | ||
FROGGS | moritz++ | ||
arnsholt | jnthn: Throw, you mean? | 18:45 | |
jnthn | arnsholt: It's fine to do it there; maybe it's better to use ExceptionHandling.dieInternal(...) than a plain throw | ||
timotimo | bleeeeh, contentEditable="true" is dumb :( | ||
FROGGS | r: sub chainy( :$args, *@subs ) { ::("&$_")($args) for @subs }; chainy( qw<say print>, args => 42 ) | 18:46 | |
camelia | rakudo f2b0f8: OUTPUT«4242» | ||
notjack | r: sqrt(15); | ||
camelia | rakudo f2b0f8: ( no output ) | ||
notjack | r: say sqrt(15); | ||
camelia | rakudo f2b0f8: OUTPUT«3.87298334620742» | ||
arnsholt | Right. dieInternal sounds promising | ||
notjack | r: sub sum {[+] @_;} say sum(1,2,3); | 18:47 | |
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===Two terms in a rowat /tmp/iDF1MkkiMC:1------> sub sum {[+] @_;} ⏏say sum(1,2,3); expecting any of: postfix statement end statement modifier statement modifier loop horiz… | ||
moritz | notjack: the ; should go after the } | ||
notjack | r: sub sum {[+] @_}; say sum(1,2,3); | 18:48 | |
camelia | rakudo f2b0f8: OUTPUT«6» | ||
notjack | r: sub sum {[+] @_}; sub prod {[*] @_}; sub chainy( *@subs ) { ::($_)() for @subs }; say chainy(&sqrt &sum &prod)(3,4); | 18:49 | |
camelia | rakudo f2b0f8: OUTPUT«Cannot call 'Numeric'; none of these signatures match::(Mu:U \v: Mu *%_) in method Numeric at src/gen/CORE.setting:885 in sub infix:<+> at src/gen/CORE.setting:3263 in sub infix:<+> at src/gen/CORE.setting:3262 in sub at src/gen/CORE.setting:14408 in su… | ||
notjack | r: sub sum {[+] @_}; sub prod {[*] @_}; sub chainy( *@subs ) { ::($_)() for @subs }; say (chainy(&sqrt &sum &prod))(3,4); | 18:50 | |
camelia | rakudo f2b0f8: OUTPUT«Cannot call 'Numeric'; none of these signatures match::(Mu:U \v: Mu *%_) in method Numeric at src/gen/CORE.setting:885 in sub infix:<+> at src/gen/CORE.setting:3263 in sub infix:<+> at src/gen/CORE.setting:3262 in sub at src/gen/CORE.setting:14408 in su… | ||
notjack | oh, it's backwards! | 18:51 | |
I defined prod wrong | |||
18:52
arnsholt_ joined
18:53
xilo joined
18:55
arnsholt left
18:59
dmol left
19:00
cc joined
19:02
cc left
|
|||
dalek | ast: 1bafd26 | (Elizabeth Mattijsen)++ | S02-types/nil.t: Fix nil regression |
19:04 | |
19:07
ggoebel2 left
|
|||
FROGGS | wow, fetching $beer is equal to ten lines of irc | 19:16 | |
moritz wants 10 commits | 19:17 | ||
FROGGS | I could push something, but that lowers jakudo's percentage... | 19:20 | |
btw moritz, can you confirm that a rshift operation by a negative amount is correct when you see one? | 19:21 | ||
I really dont know what to expect... | |||
n: say -10 +> -1 | |||
camelia | niecza v24-86-g39ab531: OUTPUT«-1» | ||
FROGGS | n: say -10 +> -9999999 | ||
camelia | niecza v24-86-g39ab531: OUTPUT«-5» | 19:22 | |
moritz | isn't that just a left-shift with the neg? | ||
FROGGS | ? | ||
moritz | p: say -16 +> -1 | ||
camelia | pugs: OUTPUT«-32» | ||
moritz | p: say -16 +> 1 | ||
camelia | pugs: OUTPUT«-8» | ||
moritz | that's kinda what I'd expect, intuitively | ||
r: say 16 +> 1 | |||
camelia | rakudo f2b0f8: OUTPUT«8» | ||
FROGGS | yeah, that was my first guess | ||
pnr: say -10 +> -1 | |||
camelia | pugs: OUTPUT«-20» | 19:23 | |
..rakudo f2b0f8: OUTPUT«-10» | |||
..niecza v24-86-g39ab531: OUTPUT«-1» | |||
FROGGS | pnr: say -10 +< 1 | ||
camelia | rakudo f2b0f8, niecza v24-86-g39ab531, pugs: OUTPUT«-20» | ||
notjack | what's the general pattern for applying a unary function foo to each value of an @array? | ||
FROGGS | I can implement it that way... | ||
colomon has the 4 GB OS X 10.8 installer downloaded... | |||
FROGGS | any objections? anybody? | ||
notjack | I tried gather take foo($_) for @array but p6 yelled at me | ||
FROGGS | good. | ||
:P | |||
notjack | and >>foo<< @array gave me a weird error | 19:24 | |
moritz | notjack: @array.map: &foo; | ||
FROGGS | >>foo<< needs a LHS too, no? | ||
notjack | foo is unary | ||
FROGGS | brb | ||
moritz | notjack: or gather { take foo($_) for @array } | ||
notjack | moritz: ah, thanks | ||
I was missing the { } around gather | 19:25 | ||
moritz | >>foo<< would only work with an infix foo | ||
19:25
xilo left
|
|||
skids | FROGGS: beware rshift and a few bitops broken at the BigInt/native int border currently. | 19:26 | |
moritz | that's what FROGGS is trying to fix, no? | ||
notjack | oh, I know why I skipped the {} after gather: if I put them in, then the block can't see @_ inside a sub | ||
dalek | ecs: adbf8b0 | (Brent Laabs)++ | S32-setting-library/Numeric.pod: clarify Complex rounders |
||
moritz | just give your sub a proper signature :-) | ||
notjack | sub baz { gather { take sqrt $_ for @_ } } # :( doesn't work | 19:27 | |
masak | useless use of gather. | ||
skids | Fix is already in rt. | ||
moritz | sub baz(*@v) { @v>>.sqrt } | ||
masak | r: sub baz { sqrt $_ for @_ }; say baz 1 4 9 | ||
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===Two terms in a rowat /tmp/18eL0jX7rc:1------> sub baz { sqrt $_ for @_ }; say baz 1 ⏏4 9 expecting any of: postfix infix stopper infix or meta-infix statement end statem… | ||
masak | hrm :) | ||
r: sub baz { sqrt $_ for @_ }; say baz <1 4 9> | 19:28 | ||
camelia | rakudo f2b0f8: OUTPUT«1 2 3» | ||
huf | wait wait wait, for really *is* map? | ||
19:28
colomon left
|
|||
notjack | hmm, I imagined that would only return the last value | 19:28 | |
moritz | huf: yes :( | ||
anyway, map or >> is fine | |||
notjack | hence gather | ||
huf | i should read some docs eventually, instead of asking basic questions one by one... :( | ||
moritz | if you want to do it with gather, you can day | ||
masak | huf: I don't mind it so much for statement_mod 'for'. | ||
huf: because that's how Perl 6 does list comprehensions. | 19:29 | ||
moritz | r: sub baz(*@v) { gather { take sqrt($_) for @v } }; say baz 1, 4, 9, 25 | ||
camelia | rakudo f2b0f8: OUTPUT«1 2 3 5» | ||
moritz | but yes, gather is overkill | ||
skids | RT #115958 and... | ||
huf | masak: i dont think i mind, since in p5 map made "sense" in void context (and yet, no sensible person ever used it like that) | ||
segomos | moritz: is it a bug that DBIish fails to release a prepared SELECT in a way that i can insert afterwards (Commands out of sync error)? If it is then i'll debug a little more and send a pull request with a fix | ||
huf | the way a thing works is no license to use it like that :D | ||
segomos | i can't insert^ (if i don't request rows from the SELECT) | 19:30 | |
skids | ... #115966 | ||
moritz | segomos: yes, it's a bug | ||
labster | masak: hopefully my clarifications on the rounders spec is better. I suspect that was the result of me trying to spec something too late at night. | 19:31 | |
notjack | I'm still having trouble with the "chained functions" thing | 19:43 | |
r: sub sqar {@_ »*« @_}; sub sum { [+] @_}; sub sqrtt {@_>>.sqrt}; sub chainy( :$args, *@subs ) { ::("&$_")($args) for reverse @subs }; say chainy(qw<sqrtt sum sqar>, args => (3,4) ) | |||
camelia | rakudo f2b0f8: OUTPUT«4 2 1.4142135623731» | ||
notjack | what I want is "5" | 19:44 | |
(sqrt of sum of squares) (3,4) #pythogorean triple is 3 4 5 | |||
dalek | p: 88892f7 | jnthn++ | src/vm/jvm/runtime/org/perl6/nqp/sixmodel/reprs/CallCaptureInstance.java: Make CallCapture REPR clonable. |
19:45 | |
notjack | whereas this works: | ||
moritz | notjack: $args is a scalar, yet you try to treat it as a list | ||
notjack | I stole "chainy" from FROGGS | 19:46 | |
it should be passed as an opaque argument list to the first funcion in the chain | |||
moritz | ... indendently of who wrote the function :-) | ||
notjack | maybe that's |*args? | ||
moritz | I don't think you can have an argument that is both named and without context | 19:47 | |
jnthn | std: sub foo(:\bar) { } | ||
camelia | std 102c740: OUTPUT«ok 00:00 43m» | ||
jnthn | r: sub foo(:\bar) { } | ||
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===Malformed parameterat /tmp/IYwqZYTlhh:1------> sub foo(⏏:\bar) { } expecting any of: statement list prefix or term prefix or meta-prefix new name to be defined»… | ||
jnthn | Hm. :) | ||
moritz | not in rakudo, at least :-) | ||
notjack | this works: | ||
r: sub sqar {@_ »*« @_}; sub sum { [+] @_}; sub sqrtt {@_>>.sqrt}; say sqrtt(sum(sqar(3,4))); | |||
camelia | rakudo f2b0f8: OUTPUT«5» | ||
19:47
rindolf left
|
|||
notjack | what I want is a chainy such that chainy(qw<sqrtt sum sqar), ...whatever...) is sqrtt(sum(squar(...whatever...))); | 19:48 | |
or, ideally,chainy simply constructs and returns the function (sqrtt of sum of sqar) such that I can assign it to a name and use it later | 19:49 | ||
moritz | then do that :-) | ||
notjack | ok, how? :) | ||
moritz | do you know how currying works? | 19:50 | |
notjack | not in p6 | ||
jnthn | walk, bbiab | ||
moritz | you can do it just like in perl 5 | ||
return an anonymous function | |||
notjack | but how do I get chainy to compose the function? | 19:51 | |
given that it returns a (novel, anonymous) function derived from the functions named in its arguments? | |||
and the argument list can name any number of functions, from 1 to N | 19:52 | ||
moritz | do you know how to do it with just one function? | ||
notjack | In p5 I'd evoke it with & | ||
moritz | or let me rephrase | 19:53 | |
do you know how to compose/chain two functions? | |||
notjack | only by stringing them out | ||
moritz | r: sub compose(&a, &b) { return sub (\args) { b(a(args)) } } | 19:54 | |
camelia | rakudo f2b0f8: ( no output ) | ||
moritz | r: sub compose(&a, &b) { return sub (\args) { b(a(args)) } }; my &f = compose(&sqrt, &cos); f(0) | ||
camelia | rakudo f2b0f8: ( no output ) | ||
moritz | r: sub compose(&a, &b) { return sub (\args) { b(a(args)) } }; my &f = compose(&sqrt, &cos); say f(0) | ||
camelia | rakudo f2b0f8: OUTPUT«1» | ||
moritz | now you just have to do it in a loop, and with the lookup by name | ||
notjack | given that b(a(...)) is syntax, it's not clear to me hwo to make that a loop | 19:55 | |
19:55
btyler joined
|
|||
notjack | I can see that's amenable to recursion | 19:55 | |
moritz | recursion and loops are just the same, really | 19:56 | |
notjack | I mean, an easy way is to literally compose a string and execute it | 19:57 | |
> r: sub compose(&a, &b) { return sub (\args) { b(a(args)) } }; my &f = [compose] (&sqrt, &cos, &cos); say f(0); | 19:59 | ||
FROGGS | skids: yes, I'm working on that... your patch btw breaks compiling. but I think #i can supply a fix till tomorrow for rshift | ||
notjack | r: sub compose(&a, &b) { return sub (\args) { b(a(args)) } }; my &f = [compose] (&sqrt, &cos, &cos); say f(0); | ||
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===Two terms in a rowat /tmp/vMHWDpmbBk:1------> gs) { b(a(args)) } }; my &f = [compose] ⏏(&sqrt, &cos, &cos); say f(0); expecting any of: postfix infix stopper infix or meta-infix … | ||
dalek | Iish: 1d48c17 | segomos++ | lib (2 files): Bug work-around where a prepared SELECT w/o .fetch causes the result set to not be released and subsequent prepared statements fail |
||
notjack | to me, that indicates there's a difference between loops and recursion in this context | 20:00 | |
because functions aren't quite values in the same way that (for example) numbers are, in p6 | 20:01 | ||
moritz | well, syntactic differences, yes | ||
but what you can do with recursion, you can also do with loops | |||
or vice versa | |||
notjack | yes, in general, recursion can be implemented with a loop and a stack | ||
moritz | r: sub compose(&a, &b) { return sub (\args) { b(a(args)) } }; my &composed = reduce &compose, &sqrt, &cos, &cos; say composed(0) | 20:02 | |
camelia | rakudo f2b0f8: OUTPUT«0.54030230586814» | ||
notjack | but I thought the topic of discussion was exactly those syntactic differences | ||
segomos | moritz: thanks dude | ||
TimToady | .tell lizmat The biggest practical difference between Mu and Nil is that Mu.ACCEPTS($x) is always true, and Nil.ACCEPTS($x) is always false | ||
yoleaux | TimToady: I'll pass your message to lizmat. | ||
moritz | segomos: thank you for your fix | ||
notjack | ok, i'm going to have to study reduce | 20:03 | |
I thought [] should suffice for reduction | |||
s/should/would/ | |||
moritz | [] is for infixes | ||
notjack | ah... | ||
thank you. | |||
moritz | nr: sub a($a, $b) { $a + $b }; say [&a] 1, 2, 3 | 20:04 | |
camelia | niecza v24-86-g39ab531: OUTPUT«===SORRY!===Two terms in a row (preceding is not a valid reduce operator) at /tmp/N0OLrjfRwq line 1:------> sub a($a, $b) { $a + $b }; say [&a] ⏏1, 2, 3Parse failed» | ||
..rakudo f2b0f8: OUTPUT«===SORRY!===Two terms in a rowat /tmp/5G6u4mz3yM:1------> sub a($a, $b) { $a + $b }; say [&a] ⏏1, 2, 3 expecting any of: postfix infix stopper infix or meta-infix statement end stat… | |||
TimToady | try [[&a]] | ||
moritz | nr: sub a($a, $b) { $a + $b }; say [[&a]] 1, 2, 3 | ||
camelia | niecza v24-86-g39ab531: OUTPUT«6» | ||
..rakudo f2b0f8: OUTPUT«===SORRY!===Unable to parse expression in bracketed infix; couldn't find final ']'at /tmp/MXHCOrJWEd:1------> sub a($a, $b) { $a + $b }; say [[&⏏a]] 1, 2, 3» | |||
moritz | NYI in rakudo | ||
[Coke] wonders why the spec list was backed up | |||
moritz | notjack: [] is basically syntactic sugar for &reduce, plus it pays attention to associativity | ||
Ayiko | r: sub infix:<compose>(&a, &b) { return sub (\args) { b(a(args)) } }; my &f = [compose] (&sqrt, &cos, &cos); say f(0); | 20:06 | |
camelia | rakudo f2b0f8: OUTPUT«0.54030230586814» | ||
TimToady | none of those parens are necessary :) | 20:07 | |
except around the signature | |||
r: sub infix:<compose>(&a, &b) { return sub (\args) { b a args } }; my &f = [compose] &sqrt, &cos, &cos; say f 0 | |||
camelia | rakudo f2b0f8: OUTPUT«0.54030230586814» | ||
moritz | Ayiko++ | 20:08 | |
TimToady | lessee, we can do better | ||
r: sub infix:<compose>(&a, &b) { return -> \args { b a args } }; my &f = [compose] &sqrt, &cos, &cos; say f 0 | 20:09 | ||
camelia | rakudo f2b0f8: OUTPUT«0.54030230586814» | ||
TimToady | r: my &infix:<compose> = -> &a, &b { return -> \args { b a args } }; my &f = [compose] &sqrt, &cos, &cos; say f 0 | ||
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===Undeclared routine: compose used at line 1» | ||
20:09
ilbot_nextgen left
|
|||
TimToady | n: my &infix:<compose> = -> &a, &b { return -> \args { b a args } }; my &f = [compose] &sqrt, &cos, &cos; say f 0 | 20:10 | |
camelia | niecza v24-86-g39ab531: OUTPUT«1» | ||
TimToady | hmm | ||
oh, return... | |||
r: my &infix:<compose> = -> &a, &b { -> \args { b a args } }; my &f = [compose] &sqrt, &cos, &cos; say f 0 | |||
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===Undeclared routine: compose used at line 1» | ||
TimToady | still seems like a bug | ||
r: my &infix:<compose> = -> &a, &b { -> \args { b a args } }; my &f = &sqrt compose &cos compose &cos; say f 0 | 20:11 | ||
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===Two terms in a rowat /tmp/EuhikrJ5oB:1------> -> \args { b a args } }; my &f = &sqrt ⏏compose &cos compose &cos; say f 0 expecting any of: postfix infix stopper infix or meta-infix … | ||
TimToady | my &infix<> isn't working right | ||
r: constant infix:<compose> = -> &a, &b { -> \args { b a args } }; my &f = &sqrt compose &cos compose &cos; say f 0 | 20:12 | ||
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===invoke() not implemented in class 'QAST::Want'at /tmp/hwpxxON05L:1------> » | ||
TimToady | n: constant infix:<compose> = -> &a, &b { -> \args { b a args } }; my &f = &sqrt compose &cos compose &cos; say f 0 | ||
camelia | niecza v24-86-g39ab531: OUTPUT«Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object at Niecza.StashCursor.Core (System.String key, Boolean final, Niecza.StashCursor& sc, Niecza.Variable& v, Niecza.Variable bind_to) [0x00000] in <file… | ||
TimToady | cool! | ||
n: my &infix:<compose> = -> &a, &b { -> \args { b a args } }; my &f = &sqrt compose &cos compose &cos; say f 0 | 20:13 | ||
camelia | niecza v24-86-g39ab531: OUTPUT«0.54030230586813977» | ||
TimToady | n: my &infix:<compose> = -> &a, &b { -> \args { b a args } }; my &f = [compose] &sqrt, &cos, &cos; say f 0 | 20:14 | |
camelia | niecza v24-86-g39ab531: OUTPUT«0.54030230586813977» | ||
notjack | cool! | ||
TimToady | no parens at all :) | ||
notjack | can you skip the assignment to &f and call the output of [compose] anonymously, withoug using parens? | ||
TimToady | um, not that I know of | 20:15 | |
wait, maybe | |||
moritz | with reducde | ||
*reduce | 20:16 | ||
erm, never mind | |||
notjack | this is cool | ||
n: my &infix:<compose> = -> &a, &b { -> \args { b a args } }; my &f = | |||
[compose] &sqrt, &cos, &cos; say f 0 | |||
camelia | niecza v24-86-g39ab531: OUTPUT«===SORRY!===Malformed initializer at /tmp/I4FW_obhiC line 1:------> &a, &b { -> \args { b a args } }; my &f ⏏=Parse failed» | ||
20:17
colomon_chrome joined
|
|||
notjack | n: my &infix:<compose> = -> &a, &b { -> \args { b a args } }; my &f = [compose] &sqrt, &cos, &cos; say f 0 | 20:17 | |
camelia | niecza v24-86-g39ab531: OUTPUT«0.54030230586813977» | ||
notjack | r: my &infix:<compose> = -> &a, &b { -> \args { b a args } }; my &f = [compose] &sqrt, &cos, &cos; say f 0 | ||
camelia | rakudo f2b0f8: OUTPUT«===SORRY!===Undeclared routine: compose used at line 1» | ||
colomon_chrome | o/ | ||
went looking for LHF on JVM. Discovered indent.t's fatal error 80% through was this line: - warn sprintf('Asked to remove %d spaces, ' ~ - 'but the shortest indent is %d spaces', - $outdent, $common-prefix) if $outdent > $common-prefix; | 20:18 | ||
notjack | n: my &infix:<compose> = -> &a, &b { -> \args { b a args } }; sub chain { [compose] @_; } my &f = chain &cos, &sqrt, &cos; say f(0); | ||
camelia | niecza v24-86-g39ab531: OUTPUT«===SORRY!===Strange text after block (missing comma, semicolon, comment marker?) at /tmp/I6XwEu5p6j line 1:------> a args } }; sub chain { [compose] @_; }⏏ my &f = chain &cos, &sqrt, &cos; say f(Parse failed»… | ||
colomon_chrome | is there any real reason to use sprintf instead of normal p6 variable interpolation there? | ||
TimToady | n: my &infix:<compose> = -> &a, &b { -> \args { b a args } }; 0.$&({ [compose] &sqrt, &cos, &cos }) # almost | 20:19 | |
camelia | niecza v24-86-g39ab531: ( no output ) | ||
[Coke] | colomon_chrome: not based on that example, no. | ||
TimToady | n: my &infix:<compose> = -> &a, &b { -> \args { b a args } }; say 0.$&({ [compose] &sqrt, &cos, &cos }) # almost | ||
camelia | niecza v24-86-g39ab531: OUTPUT«{ ... }» | ||
[Coke] | seems reasonable to not drag in stuff not directly related to the test. | 20:20 | |
TimToady | n: my &infix:<compose> = -> &a, &b { -> \args { b a args } }; say 0.&({ [compose] &sqrt, &cos, &cos }) # almost | ||
camelia | niecza v24-86-g39ab531: OUTPUT«{ ... }» | ||
colomon_chrome | [Coke]: that code is in the indent method | ||
TimToady | hmm, oughta work | ||
notjack | n: my &infix:<compose> = -> &a, &b { -> \args { b a args } }; my &f = [compose] qw<&sqrt &cos &cos>; say f 0 | ||
camelia | niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Nominal type check failed in binding '&a' in 'ANON'; got Str, needed Callable at /tmp/xjDVXvkq6W line 0 (ANON @ 1)  at /home/p6eval/niecza/lib/CORE.setting line 2773 (reduceop @ 59)  at /tmp/xjDVXvkq6W line 1 (mainline @ 4)  at… | ||
20:21
lizmat left
|
|||
notjack | n: my &infix:<compose> = -> &a, &b { -> \args { b a args } }; my &f = [compose] qw<sqrt cos cos>; say f 0 | 20:21 | |
[Coke] | colomon_chrome: oh. yah, if there's no formatter with the %d, I'd say just use interpolation. | ||
camelia | niecza v24-86-g39ab531: OUTPUT«Unhandled exception: Nominal type check failed in binding '&a' in 'ANON'; got Str, needed Callable at /tmp/Ri_hXArZM1 line 0 (ANON @ 1)  at /home/p6eval/niecza/lib/CORE.setting line 2773 (reduceop @ 59)  at /tmp/Ri_hXArZM1 line 1 (mainline @ 4)  at… | ||
colomon_chrome | [Coke]: so the next thing is, of course I tried it myself before coming here. And here's the crazy thing: it actually breaks the build | 20:23 | |
TimToady | n: say <sqrt cos cos>».map: { &::($_) } | ||
camelia | niecza v24-86-g39ab531: OUTPUT«sub sqrt(Any $x) { ... } sub cos(Any $x) { ... } sub cos(Any $x) { ... }» | ||
TimToady | notjack: ^^ | ||
::() is symbolic lookup syntax | |||
colomon_chrome | ooooo, my normal computer is booting up in 10.8.4! | ||
colomon_chrome crosses his fingers.... | 20:24 | ||
dalek | Iish: 0429089 | segomos++ | lib34 (2 files): Correcting a typo I made in the last bug workaround |
||
20:27
snoopy joined
20:30
colomon joined
20:31
colomon left,
colomon joined
|
|||
colomon | o/ | 20:32 | |
javap -version | |||
1.7.0_04 | |||
20:32
vk joined
|
|||
jnthn | uh-oh :) | 20:33 | |
I hope that isn't too early to have the indy fixes... | |||
FROGGS | jnthn: do you have any objections that -8 +> -1 acts like -8 +< 1 ? | ||
20:34
colomon_chrome left
|
|||
colomon | jnthn: I'm pretty sure the latest JVM I was able to find online would have been very happy to install on OS X 10.8.4 | 20:35 | |
jnthn | FROGGS: On JVM they come out the same...I dunno if that identity holds up generally? | 20:36 | |
skids | In C negative rshift is lshift. However newer C compilers will warn if they see this done with literals. | 20:38 | |
20:38
konundra left
|
|||
jnthn | k | 20:39 | |
colomon fixes the scrolling on his machine | |||
FROGGS | k, that is all I wanted to know :o) | ||
thank you all | |||
20:40
fgomez left
|
|||
colomon | BTW, should have mentioned this earlier: JSON::RPC, LWP::Simple, and Sitemap::XML::Parser started failing their tests overnight | 20:40 | |
FROGGS | colomon: this might be fixed already | 20:41 | |
ohh, hmm, nvm | |||
masak | labster++ # Complex rounding spec fixes | ||
colomon | FROGGS: what were you thinking? I can always trying running the smoke test again... | ||
FROGGS | colomon: I was thinking about a bad commit from yesterday, which got fixed by jnthn++ this morning (eu timezone) | 20:42 | |
but this bad commit broke building of rakudo | |||
20:42
pmurias joined
|
|||
FROGGS | so, it cant affect just a few modules :o) | 20:42 | |
skids | Correcting myself, actually it looks like that behavior is compiler-specific. gcc lshifts, but ISO 9899:1999 6.5.7 Bit-wise shift operators §3 says the behavior is undefined. | 20:43 | |
FROGGS | well, undef is okay too | ||
so we can do something, and spec it | |||
skids | I think it could come in handy. | 20:44 | |
FROGGS | the best thing to do is what the user expects | ||
[Coke] | github.com/blog/1547-release-your-software | ||
FROGGS | github++ | 20:45 | |
dalek | kudo/nom: 86975e1 | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/Binder.java: Finish post-constraints trnaslation. |
20:51 | |
kudo/nom: 0ab12f3 | jnthn++ | src/Perl6/Metamodel/BOOTSTRAP.nqp: Fix over-sharing bug in bind-check multi dispatch |
|||
kudo/nom: a026db1 | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/Ops.java: Remove debugging code. |
|||
kudo/nom: c96b216 | jnthn++ | src/vm/jvm/runtime/org/perl6/rakudo/Binder.java: Generic instantiation in signature binding. Handles constructs like (::T, T). |
|||
20:52
lue left
|
|||
nwc10 | jnthn: if there's a prize for figuring out what that bundle of awesome actually enables, I'm not going to win it :-( | 20:52 | |
[Coke] | jnthn: let me know if I should rerun the aborted files gist tonight. | 20:53 | |
timotimo | thank you for finishing the trnaslation. that really messed me up! | ||
:þ | |||
[Coke] | ah. Generic type parameter binding NYI! that will fix something, I'm sure of it. :) | ||
jnthn | nwc10: Most notably, unbusts some parametric roles stuff. | ||
[Coke]: Yes, there was a test failing wiht that error that now passes fully also. | 20:54 | ||
FROGGS | (fully also)++ | ||
20:55
vk left
|
|||
dalek | p: ec5448d | (Tobias Leich)++ | src/vm/parrot/ops/nqp_bigint.ops: special-case negative values in rshift ... and treat rshifting by an negative amount like an lshift by positive amount. |
20:58 | |
colomon | I read c96b216 as "Genetic instantiation in signature binding." -- exciting yet worrying | ||
jnthn | :P | 20:59 | |
20:59
vk joined
|
|||
FROGGS | nr: say -10 +> 1 | 21:00 | |
camelia | rakudo f2b0f8, niecza v24-86-g39ab531: OUTPUT«-5» | ||
colomon | jnthn: any clue why using string interpolation instead of sprintf in Str.indent would break the Rakudo (jam) build? | ||
FROGGS | nr: say -11 +> 1 # this should be equal in a mo' | ||
camelia | niecza v24-86-g39ab531: OUTPUT«-6» | ||
..rakudo f2b0f8: OUTPUT«-5» | |||
jnthn | colomon: no | 21:01 | |
FROGGS | ohh no, I didnt update nqp_head yet... | ||
colomon | jnthn: I've temporarily gotten sidetracked by the issue of getting my MBP back to doing what I need now that I've got OS X 10.8.4 on it. | ||
jnthn | :) | 21:02 | |
FROGGS | is there an nqp of for list repetition like there is nqp::x for strings? | 21:05 | |
21:05
lue joined
21:06
skids left,
arnsholt_ left
21:07
BenGoldberg joined
|
|||
jnthn | No | 21:07 | |
FROGGS | k | ||
thx | |||
jnthn will have 3 talks at YAPC::EU o.O | 21:08 | ||
tadzik | woosh | ||
masak | nice! | ||
FROGGS | and I won't be there ó.ò | 21:09 | |
jnthn | Aww | ||
And...it's in Kiev \o/ | |||
FROGGS | yeah, it is a bit like family +^ yapc for me | ||
jnthn | *nod* | 21:10 | |
nwc10 | the hackathon is not yet very popular: act.yapc.eu/ye2013/talk/4904 | ||
jnthn marks himself as going | |||
21:10
Rotwang left
|
|||
jnthn | I'm guessing that moritz++ and masak++ might attend it too ;) | 21:10 | |
nwc10 | they haven't starred it yet | ||
jnthn | Well, maybe people haven't really got starrted with doing that yet... :) | 21:11 | |
FROGGS | hehe, then I never met moritz when we are living in the same country >.< | ||
masak | starring it now. | 21:12 | |
21:12
spider-mario left
|
|||
jnthn | You're a star! | 21:14 | |
masak ★ | 21:15 | ||
nwc10 is starrtled by how many puns can be made with just one word | |||
masak | ★.★ | 21:16 | |
nwc10 | what's the point of trying with anything else? :-) | ||
masak | just doing one word might lead to pun starrvation... | ||
TimToady | we're only just starring | ||
21:16
lue left
|
|||
perigrin is a Perl hipster, already registered to attend YAPC::NA 2014. | 21:17 | ||
nwc10 | masak: neighbody is going to starrve on this channel. Plenty of meat :-) | 21:18 | |
TimToady is a Perl hipstar | |||
masak | nwc10: are you really going to keep beating that d... oh dang. | 21:19 | |
jnthn | That joke isn't "stable" yet? :P | 21:22 | |
21:23
frdmn left
|
|||
timotimo | starbl? | 21:23 | |
masak | oh here we go again, another lap around the old familiar course. | ||
TimToady | That beat has the Ringo truth. | ||
masak | just jockeying around. | ||
21:23
frdmn joined
|
|||
masak | frdmn: your quit message makes it look like you're a Python programmer. | 21:24 | |
or a parselmouth. | |||
TimToady | maybe just a leaky tire | ||
perigrin | or a star hooked up to a geiger counter. | 21:25 | |
masak | or maybe he's just a little horse right now. | 21:26 | |
TimToady thinks we should welcome someone from Mongolia... | |||
21:26
raiph left,
vk left
21:27
PacoAir left
|
|||
masak .oO( I don't think we khan do that... ) | 21:28 | ||
21:28
lue joined
|
|||
TimToady | you are an incorrigible punstar | 21:28 | |
masak | no, Gengh is. | 21:29 | |
TimToady | 'cuz Kub is too laconic | 21:30 | |
diakopter | *groan* | 21:31 | |
masak | I think we just ran out of famous Khans. | 21:32 | |
no-one knows about Ögedei. | |||
huf | batu much punning can be bad for you | ||
frdmn | masek: whats my quit message again? :P | ||
masak | 23:23 -!- frdmn [~frdmn@irc.frd.mn] has quit [Quit: ssssSSSSssss] | ||
frdmn | ah. | 21:33 | |
i just like minecraft | |||
TimToady | are you really in Mongolia? I hear they like horses there... | ||
labster | Ulan is betaar | ||
masak | haha | ||
huf | mondavi and mongolia? | ||
frdmn | i aint. i still like horses | ||
masak | Huhot is too hot. | ||
diakopter | TimToady: yes, especially starlings | 21:34 | |
lue wants to get in on the pun action, but doesn't know where to start. Whatever. | |||
perigrin | our huhot closed :/ | ||
21:35
raiph joined,
raiph left
21:39
vk joined
|
|||
masak | perigrin: oh, I was thinking of the capital of Inner Mongolia -- but it seems it's translitted "Hohhot". | 21:39 | |
dalek | ast: fa26638 | (Brent Laabs)++ | S32-num/rounders.t: testing fix for RT #118545, round with scale argument |
21:41 | |
ast: eb460a3 | (Brent Laabs)++ | S (4 files): Merge branch 'master' of github.com:perl6/roast |
|||
huf | jesus christ that city is huge. | ||
TimToady | it's a space startion | 21:42 | |
21:42
raiph joined
|
|||
masak | it's a trap! | 21:43 | |
diakopter | it was a dark and starmy night, the starving dog typed starkly | 21:45 | |
labster | can someone give me access to close tickets on RT? | ||
21:45
iSlug joined
|
|||
labster | .oO (it was a dark and swarthy night) | 21:46 | |
diakopter | TimToady: I thought .mn was Minnesota | 21:48 | |
21:48
pmurias left
|
|||
diakopter stares at Van Gogh's Night | 21:50 | ||
21:50
ajr_ left
|
|||
jnthn blug: 6guts.wordpress.com/2013/07/02/raku...ss-update/ | 21:51 | ||
masak | jnthn++ | ||
timotimo | yay | ||
masak | who has access to give labster more RT privs? | ||
diakopter | afaik, [Coke] | ||
masak | pmichaud? | ||
oh, ok. | |||
ooh, two blog posts for the price of one! :D | 21:54 | ||
jnthn | ;) | 21:58 | |
labster | jnthn++ for both | ||
TimToady | nr: class NewNil is Mu { }; multi infix:<===>(Mu \a, NewNil \b) { a.WHAT =:= NewNil }; say 42 === NewNil; say NewNil === NewNil; my $x = NewNil; say $x === NewNil; | 22:02 | |
camelia | niecza v24-86-g39ab531: OUTPUT«FalseTrueTrue» | ||
..rakudo c96b21: OUTPUT«Nominal type check failed for parameter ''; expected Any but got NewNil instead in sub infix:<===> at src/gen/CORE.setting:2041 in block at /tmp/PnvhBvO7YI:1» | |||
TimToady | seems like we might be able to define === for some things outside of Any | 22:03 | |
not sure what is bothering rakudo there though... | |||
jnthn | Maybe the proto is restrictiver than you want for that. | 22:04 | |
TimToady | hmm | ||
jnthn | proto sub infix:<eqv>(Any $?, Any $?) { * } | ||
22:04
vk left
|
|||
jnthn | So, not a bug in the dispatcher. Phew. :) | 22:04 | |
TimToady | huh, I don't even see a proto in niecza for ===, so maybe that's how it's getting Mu,Mu | 22:06 | |
jnthn | I guess the default proto is (|) :) | 22:07 | |
oh, but that doesn't work for arity things... | |||
So, no idea... :) | |||
n: say &infix:<===>.arity | |||
camelia | niecza v24-86-g39ab531: OUTPUT«2» | ||
jnthn | n: say &infix:<===>.count | ||
camelia | niecza v24-86-g39ab531: OUTPUT«2» | ||
jnthn | Hm. :) | ||
Must have one somewhere... | |||
TimToady | anyway, as long as Mu doesn't have a multi candidate, it should behave the same, triggering junctional logic | 22:09 | |
colomon has working gcc again! o/ | |||
jnthn | Yes, true. | ||
TimToady | so Any,Any is probably overspecified | ||
jnthn | We can relax it. | ||
TimToady | and preventing us from writing === Nil with Nil outside Any | ||
jnthn | It just means it'll auto-thread over a failed multi-dispatch rather than a failed proto-dispatch. | 22:10 | |
22:10
iSlug left
|
|||
jnthn | (where a proto-dispatch is really just a single dispatch, nothing special) | 22:10 | |
22:10
lue left
|
|||
TimToady | well, you have to handle that anyway if you're gonna inline the proto, seems | 22:11 | |
jnthn | The optimizer considers the proto before considering the candidates, iirc | 22:12 | |
r: proto foo($) { * }; multi foo($a) { }; multi foo($a, $b) { }; foo(1, 2) | |||
camelia | rakudo c96b21: OUTPUT«===SORRY!===CHECK FAILED:Calling proto of 'foo' will never work with argument types (Int, Int) (lines 1, 1) Expected: :()» | ||
jnthn | um, that expected is a bit off :S | ||
But it does say the proto is the problem. :) | 22:13 | ||
Todo: whine at compile time about multi candidates that could never be reached thanks to the proto. :) | |||
TimToady | nr: class NewNil is Mu { }; multi infix:<===>(Mu \a, NewNil \b) { a.WHAT =:= NewNil }; say so 42 === 41 | NewNil | 42; say so NewNil = 41 | NewNil | 42; | 22:15 | |
camelia | rakudo c96b21: OUTPUT«Nominal type check failed for parameter ''; expected Any but got NewNil instead in sub infix:<===> at src/gen/CORE.setting:2041 in block at /tmp/LSxR2m10yb:1» | ||
..niecza v24-86-g39ab531: OUTPUT«TrueUnhandled exception: Writing to readonly scalar at /tmp/DDyAHFdRax line 1 (mainline @ 10)  at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4580 (module-CORE @ 576)  at /home/p6eval/nie… | |||
TimToady | hmm | ||
n: class NewNil is Mu { }; multi infix:<===>(Mu \a, NewNil \b) { a.WHAT =:= NewNil }; say so NewNil == 41 | NewNil | 42; | 22:16 | ||
camelia | niecza v24-86-g39ab531: OUTPUT«Potential difficulties: &infix:<===> is declared but not used at /tmp/nGqhQB0JyI line 1:------> lass NewNil is Mu { }; multi infix:<===>⏏(Mu \a, NewNil \b) { a.WHAT =:= NewNil }Unhandled exception: Nominal type check failed for #0 n… | ||
TimToady | n: class NewNil is Mu { }; multi infix:<===>(Mu \a, NewNil \b) { a.WHAT =:= NewNil }; say so NewNil === 41 | NewNil | 42; | ||
camelia | niecza v24-86-g39ab531: OUTPUT«True» | ||
TimToady | there we go | ||
22:17
notjack left
|
|||
TimToady | I think we can make === Nil work | 22:17 | |
jnthn | Same | 22:18 | |
TimToady | === Mu is still a bit problematic, unless the junction failover can be triggered by Mu,Mu calling nextsame | 22:20 | |
well, I suppose the Mu,Mu case could call directly into the autothreader if it wanted to | 22:21 | ||
raiph | .ask sorear is niecza's gather/take batched, or 100% lazy? | 22:23 | |
yoleaux | raiph: I'll pass your message to sorear. | ||
22:24
lue joined,
Timbus left
|
|||
raiph | hi TimToady. Do you know the answer to what I just asked sorear? | 22:24 | |
22:26
Timbus joined
|
|||
TimToady | I suspect it's all lazy, but have no proof | 22:27 | |
otoh, if it were completely lazy, I'd expect recursive constant definitions to work, and they don't, at least not good enough for hamming numbers | 22:29 | ||
masak .oO( hamming with faint praise ) | 22:30 | ||
raiph | I see batching as a pragmatic enhancement of P6's laziness capabilities, not a compromise or reflection of some problem in P6's laziness design. Any comments? | 22:31 | |
TimToady | n: constant @a = 1,2,3, @a.map(*+4); say @a[10] | ||
camelia | niecza v24-86-g39ab531: OUTPUT«(Any)» | ||
TimToady | should be 11, not Any | ||
masak | raiph: I sometimes perceive it as a problem. | ||
raiph: mostly when I want the guarantee of laziness. | |||
that is, a batching number of 0. | |||
TimToady | well, 1, depending on how you count | 22:32 | |
masak | yeah. | ||
TimToady | n: constant @a = 1,2,3, @a.map(*+4); say @a[^10] | 22:33 | |
camelia | niecza v24-86-g39ab531: OUTPUT«1 2 3 (Any) (Any) (Any) (Any) (Any) (Any)» | ||
TimToady | somehow it loses track of @a as a concept, and gets stuck on @a the concrete array we have so far | 22:34 | |
masak | maybe too little binding, too much assignment? | ||
TimToady | the = on constant is binding | ||
or defining, anyway | |||
r: my @a; @a.plan: 1,2,3, @a.map(*+4); say @a[^10] | 22:35 | ||
camelia | rakudo c96b21: OUTPUT«No such method 'plan' for invocant of type 'Array' in block at /tmp/Vt5VeuZknb:1» | ||
TimToady | hmm, I though rakudo had .plan already | ||
masak | I thought so too. | 22:36 | |
yes, I know the '=' on constant is binding. just thinking maybe Niecza gets it wrong there. | 22:37 | ||
TimToady | anyhoo, not sure that's evidence against strict laziness | 22:38 | |
22:38
lizmat joined
|
|||
TimToady | The hard part of knowing when you know comes down to knowing when you don't know. | 22:39 | |
lizmat | back from Amsterdam.pm meeting | 22:40 | |
yoleaux | 14:56Z <TimToady> lizmat: If we put Nil outside of Any, we probably need a .is-nill primitive, or some way of training people to use =:= when they try to use === | ||
16:39Z <TimToady> lizmat: A STD.pm6 commit message of "Same change as in rakudo" is not very informative when I do 'git log' :P | |||
20:02Z <TimToady> lizmat: The biggest practical difference between Mu and Nil is that Mu.ACCEPTS($x) is always true, and Nil.ACCEPTS($x) is always false | |||
lizmat | TimToady: good point, seemed like something sensible at the time, clearly lacking in content looking at it now | 22:41 | |
TimToady | turns out === Nil can probably be made to work anyway | 22:42 | |
masak | 'night, #perl6 | 22:44 | |
TimToady | I made a prototype NewNil work in niecza, and we probably just need to generalize the proto infix:<===> in rakudo from Any,Any to Mu,Mu to allow definitions of === from outside of Any | ||
lizmat | so, Nil in combination with "is default", should this work" sub n { Nil }; my $a is default(fail "No go"); $a=n | ||
I guess === falling out of Junction, would not be a problem ? | 22:45 | ||
TimToady | doesn't need to be in Junction either | ||
we have not defined the ability to pass a thunk or closure as default, so that would fail at compile time currently | 22:46 | ||
since a trait's arg is evaluated at BEGIN time, basically | |||
not sure what it would mean to supply a closure as a default; when would we call it? | 22:47 | ||
lizmat | but the idea, of putting a Failure object as a default for a scalar, would that make sense? | 22:48 | |
TimToady | but anyway, yes, a returned Nil is still a Nil, and would still set the default when assigned | ||
lizmat | Specifically when receiving a value from a sub, or from a regex | ||
TimToady | note though that --> Any would preclude returning Nil if we put it outside of Any | 22:49 | |
lizmat | true | ||
well | |||
hmmm... | |||
TimToady | so --> Int:D becomes a strong guarantee of a real value being returned | 22:50 | |
is the latest thinking | |||
lizmat | and so BOOM if Nil is returned | ||
22:50
konundra joined
|
|||
TimToady | which means the only way such a routine can signal error is by throwing an exception | 22:50 | |
22:50
dmol joined
|
|||
TimToady | and fail would through an exception, presuming Failure is outside of Int | 22:50 | |
*throw | |||
lizmat | so either it throws an exception itself, or it gets thrown an exception upon return | 22:51 | |
TimToady | we might end up putting Failure outside of Any, alongside Nil | ||
(this was in the original OKness proposal, btw) | |||
lizmat | this is lacking from my memory, can I look that up somewhere? | ||
TimToady | as soon as it typechecks against Int, it'd throw | 22:52 | |
lizmat | indeed | ||
my Int $a is default(42)=Nil | |||
would still set $a to 42 or not? | 22:53 | ||
raiph | masak, TimToady: do you think it likely that rakudo will one day support both strictly lazy (batch=1) and mostly lazy? | ||
TimToady | well, it would already be set to 42 by the 'is default', so the = Nil is kinda redundant | ||
lizmat | true, I guess the example is contrived | 22:54 | |
TimToady | my Int $a is default(42); already implies setting to Nil, in a sense | ||
lizmat | my Int $a is default(42); $a=23; $a=Nil | ||
TimToady | yes, that'd set it to 42 | ||
it actually helps to have Nil outside of most types, so you can just check on the type failure of ordinary assignment | 22:55 | ||
but you and jnthn were discussing that earlier already | |||
22:55
dmol left
|
|||
lizmat | indeed, because currently | 22:55 | |
my $a is default(42); $a=23; $a=Nil | |||
would *not* fire up the typecheck | 22:56 | ||
TimToady | because the default constraint is Mu currently | ||
the .of type, I mean | |||
lizmat | yup | ||
TimToady | there was always some feeling that we should make that Any as well, so that you couldn't accidentally store junctions | 22:57 | |
maybe this is an additional argument for that | |||
lizmat | r: my Any $a=Nil; say $a # no typecheck, so Nil just gets stored | 22:58 | |
camelia | rakudo c96b21: OUTPUT«Nil» | ||
lizmat | r: my Cool $a=Nil; say $a # typecheck, so Nil just gets (wrongly) replaced by default | ||
camelia | rakudo c96b21: OUTPUT«Nil» | ||
TimToady | beause Nil is currently in Any | ||
lizmat | r: my Int $a=Nil; say $a # typecheck, so Nil just gets (wrongly) replaced by default | ||
camelia | rakudo c96b21: OUTPUT«No such method 'gist' for invocant of type 'NQPMu' in sub say at src/gen/CORE.setting:11365 in block at /tmp/QwnYfjAwbt:1» | ||
TimToady | r: class NewNil is Mu {}; my Any $x = NewNil; | 22:59 | |
camelia | rakudo c96b21: OUTPUT«Nominal type check failed for parameter '$got'; expected Any but got NewNil instead in block at /tmp/WLku4zjaqe:1» | ||
TimToady | it would work more like that | ||
lizmat | yup | ||
when I'm awake tomorrow, I'll just do that with Nil and see what happens | 23:00 | ||
TimToady | well, the default default of my Int $a would be Int as well, I presume | ||
lizmat | yes, the type Int | ||
TimToady | see earlier discussion about how to add an === operator outside of Any | ||
proto infix:<===>(Any,Any) also needs to change to (Mu,Mu) | 23:01 | ||
lizmat | will look at backlog later… pretty tired now… 2 hour drive, not a lot, but enough to stop the brane functions | ||
TimToady understands perfectly :) | |||
lizmat | any thoughts on S11 ? | 23:02 | |
TimToady | not yet | ||
lizmat runs away :-) | |||
23:02
Radvendii joined
|
|||
lizmat | let me know if I should clarify things more | 23:02 | |
I guess the basic questions are: | 23:03 | ||
1. is the compunit the base of use, or is a package? | |||
2. if 1 is compunit, is it a good idea to get meat-info from pos | |||
pod | |||
meta | 23:04 | ||
I'm tried, I should stop | |||
tired | |||
:-) sleep& | |||
jnthn | meat-info! :D | 23:05 | |
'night lizmat | |||
labster | good work, good night lizmat | ||
flussence | github's added binary downloads back, if anyone cares. The only catch is they now have to be associated with a tag | 23:08 | |
23:08
skids joined
|
|||
raiph | jnthn: thx for previous answers. my last two: is rakudo's gather/take lazy? and do you think it likely batching will be implemented this year on at least one backend? | 23:11 | |
timotimo | rakudo's gather/take is totally lazy | 23:13 | |
jnthn | raiph: It's lazy, don't know about batching. I'm not personally likely to work on it, since gather/take isn't an area I've been much involved with so far, and others know/understand it better. :) | 23:14 | |
And I don't like making time estimates on behalf of others :P | 23:15 | ||
btyler | jnthn: I really enjoyed reading the first part of the interview, looking forward to the rest! | 23:16 | |
timotimo | did y'all see "github releases"? that seems neat | 23:17 | |
jnthn | btyler: Happy it was interesting :) | 23:18 | |
timotimo | i agree about the interestingity | ||
raiph | jnthn++ # answeringity | 23:20 | |
jnthn | unconciousity & | 23:23 | |
23:31
Radvendii left
23:43
Radvendii joined
|