»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:07
dayangkun joined
00:08
replore left
00:09
Exodist left
00:10
rulker left
00:25
zby_home__ left
00:27
zby_home__ joined
00:39
soh_cah_toa joined
00:40
frhodes joined
00:44
frhodes left
00:46
frhodes joined
00:48
jerome_ joined
00:55
alvis left
01:09
alvis joined
01:15
japhb_ left
01:25
jaldhar joined
01:26
ponbiki left
01:28
uasi joined
|
|||
sorear | mberends: ping | 01:30 | |
01:31
perlygatekeeper joined
01:37
thou left
01:40
Chillance left
01:46
djanatyn left
01:47
djanatyn joined
01:51
mtk left,
mtk joined
01:54
uasi left
01:55
worr left
02:17
uasi joined
02:20
envi joined
02:21
cotto joined,
athomason left,
athomason joined
02:30
frhodes left
02:40
lue joined
03:03
shinobicl_ joined
03:04
cognominal_ joined
03:06
mkramer1 joined,
y3llow_ joined,
pothos_ joined
03:07
lue left,
perlygatekeeper left,
y3llow left,
pothos left,
cognominal left,
Vlavv_ left,
stepnem left,
awwaiid left,
kcwu left,
yves_ left,
dukeleto left,
cosimo left,
kshannon left,
PacoLinux left,
Woodi left,
takesako left,
cxreg left,
flussence left,
Lorn left,
Helios left,
y3llow_ is now known as y3llow
03:08
pothos_ is now known as pothos,
kcwu joined
03:09
stepnem joined,
Woodi joined,
Lorn joined,
Lorn left,
Lorn joined
03:10
cxreg joined,
cosimo joined,
flussence joined,
kshannon joined
03:13
frhodes joined,
Helios joined,
perlygatekeeper joined
03:16
frhodes left
03:20
Vlavv_ joined,
lue joined,
yves_ joined
03:23
dukeleto joined,
takesako joined
03:25
PacoLinux joined
03:31
packetknife joined
03:33
awwaiid joined
03:38
bluescreen10 left
03:40
lumi_ left,
lumi_ joined
03:43
packetknife left
03:57
f00li5h is now known as f00li5h-,
f00li5h- is now known as f00li5h
04:20
orafu left
04:23
perlygatekeeper left
04:26
woosley joined,
am0c joined
04:29
am0c left
04:30
am0c joined,
am0c left
04:32
kaare_ joined
04:33
am0c joined
04:35
flatwhatson left,
am0c left
05:05
REPLeffect left
05:06
ruoso left
05:13
ruoso joined
05:17
shinobicl_ left
05:18
REPLeffect joined
05:36
woosley left
05:37
woosley joined
|
|||
mberends | sorear: pong | 05:42 | |
05:44
ponbiki joined
05:48
ponbiki left
05:52
Exodist joined
|
|||
sorear | mberends: I am wondering if we should implement a stopgap solution to #56 for v10 | 05:54 | |
05:55
soh_cah_toa left
|
|||
mberends | sorear: yes, any solution would be helpful. We could still track the issue as not fully resulved, and suggest applications do so too. | 05:56 | |
sorear: what do you think is the reason interface implementations cannot be called? They are still methods. Could it be only sometimes, for example when they are implemented in a parent class? | 05:59 | ||
sorear | mberends: are you familiar with the C#/CLR concept of "explicit interface implementations"? | 06:00 | |
mberends | sorear: no, I'll read up on that. I understand explicit in some other contexts. | 06:01 | |
sorear | in the CLR, methods that implement an interface slot don't have to be public | ||
there are two ways to implement the IDisposable interface in C# | 06:02 | ||
way 1: public void Dispose() { ... } - creates public method named Dispose | 06:03 | ||
way 2: void IDisposable.Dispose() { ... } - creates private method named <gensym> | |||
the CLR doesn't rely on names for interface mapping; classes have an explicit slot/method table | |||
way 2 is very useful if two interfaces require different semantics for the same method name | 06:04 | ||
06:04
REPLeffect left
|
|||
mberends | I see, and Gtk uses way 2. | 06:04 | |
sorear | it's also nice for the API if you think "Dispose" is a bad method name for your class | ||
the .net coding standards say any functionality should be available via some public method | 06:05 | ||
the approach Niecza is currently using (reflect on the object's concrete type and bind public methods) is functionally the same as what DLR languages (IPy/IronRuby) do | 06:06 | ||
mberends | the freedom to rename .Dispose() seems like one of those dubious nice-to-haves that leads to confusion. | 06:07 | |
sorear | mberends: you have a Gtk.Gc, correct? | ||
no | 06:08 | ||
couldn't be | |||
mberends | sorear: gtk-sharp probably wraps Gtk.Gc | ||
06:09
dayangkun left
|
|||
sorear | it's a Cairo.Context | 06:10 | |
apparently, Cairo.Context has _no_ public method that calls Dispose functionality | 06:11 | ||
sorear found the source | |||
OTOH, the finalizer does call it. So the memory leak is not likely to be _destructively bad_ | 06:12 | ||
mberends | Cairo is provided through gdk-sharp instead of gtk-sharp, very similar to use. | ||
yes, the finalizer is the source of the warning message that says "the programmer" forgot to call Dispose. | 06:13 | ||
sorear: would your hack be along the lines of: "the reflection API denies that .Dispose exists, but let's call it anyway" ? | 06:17 | ||
no, if it's private, it shouldn't be callable either. | 06:18 | ||
06:18
REPLeffect joined
|
|||
sorear | mberends: my hack would be along the lines of adding a .dispose-hack method to CLR::System::Object which does the equivalent of ((IDisposable)obj).Dispose() | 06:19 | |
mberends: my real fix would be to implement $obj.Class::method() syntax in general for Perl 6 code, and reflect interfaces as roles, allowing you to do $obj.IDisposable::Dispose | 06:20 | ||
the real fix, however, cannot be commuted with /serialize | |||
mberends | sorear: I understand. Strapping the fix on to Object is very global, thus brings the risk of .Dispose() being called inappropriately, but that's caveat utilitor. | 06:23 | |
I'd argue against the hack if it implies performance degradation. | 06:24 | ||
sorear | nah | 06:25 | |
there are already a handful of Object-strapons | 06:26 | ||
of course I'd like to get rid of .dispose-hack ASAP :) | |||
mberends | sorear: the /serialize refactor is a much higher priority. Thus anything incompatible with /serialize should not even be considered. | ||
dalek | ecza/serialize: 6d3b702 | sorear++ | / (4 files): Lookup variables in new model, can now handle some very simple variable uses |
06:27 | |
ecza: f30bd36 | sorear++ | lib/NieczaCLR.cs: Add stopgap .dispose-hack method for mberends++ GTK work |
06:34 | ||
06:35
cognominal_ left
|
|||
mberends | wow, such a quick turnaround! sorear++ | 06:35 | |
but: Unable to resolve method Dispose in class CLR::Cairo::Context :-( | 06:47 | ||
sorear | mberends: .dispose-hack | 06:50 | |
mberends | sorear++: better name | ||
sorear | niecza: say { a => True }.any.perl | 06:51 | |
p6eval | niecza v9-41-gbb5a7c3: OUTPUT«any("a", )» | ||
sorear | niecza: any("a").perl | 06:52 | |
p6eval | niecza v9-41-gbb5a7c3: ( no output ) | ||
sorear | niecza: say any("a").perl | ||
p6eval | niecza v9-41-gbb5a7c3: OUTPUT«any("a", )» | ||
dalek | ecza: ed11042 | sorear++ | test.pl: Make test forgiving of Junction.perl format |
06:55 | |
07:02
woosley left
07:08
woosley joined
|
|||
mberends | sorear: another CLR Interop problem is inability to convert Num parameters to System.Double. Shall I create a Github issue for this? | 07:17 | |
07:18
drbean joined
|
|||
sorear | what? | 07:18 | |
huh. | 07:19 | ||
...oops | 07:20 | ||
the code to marshal Num objects is under a when(Integral) condition :| | |||
mberends | in niecza/examples/gtk-clock.pl:32, passing Num (fractional) parameters in SetSourceRGB(0, 1, 1) fails. Thus we have 3-bit color. | ||
sorear | I knew I implemented it! | ||
mberends | you had said so, yes! | 07:21 | |
07:21
donri joined
|
|||
mberends | sorear: ok, I can fix a when() | 07:22 | |
sorear | er, wait, not quite. | ||
mberends waits | |||
07:24
mikemol left,
ruoso left
|
|||
Woodi | hallo #perl6.ppls :) | 07:25 | |
mberends | hallo Woodi | ||
07:34
flatwhatson joined
|
|||
sorear | hello Woodi | 07:38 | |
07:38
ruoso joined,
mikemol joined
07:40
drbean left
07:41
drbean joined
|
|||
Woodi | what it can be: Can only use repr_get_attr_obj on a SixModelObject ? | 07:44 | |
i use field.hash.keys in for loop and this bumps | 07:45 | ||
sorear | That's an internal error and you should not be able to get it, unless you're doing improper things with pir:: | 07:50 | |
Somehow, an expression has evaluated to something other than a Rakudo object | 07:51 | ||
07:56
[particle] joined
|
|||
dalek | ecza: 3896bb2 | sorear++ | lib/NieczaCLR.cs: Implement marshalling for Num and Rat |
07:56 | |
sorear | I got carried away implementing exact Rat->decimal coercion | ||
mberends | ooh! sorear++ again :) | 07:57 | |
07:57
masak joined
|
|||
masak | goedemorgen, #perl6. | 07:57 | |
07:58
[particle]1 left
|
|||
sorear | niecza> 123456789123456789 / 10**20 | 07:58 | |
0.00123456789123457 | |||
niecza> CLR::System::Decimal.marshal(FatRat.new(123456789123456789, 10**20)) | |||
0.00123456789123456789 | |||
o/ masak | 07:59 | ||
mberends | god morgon masak # thanks www.howtosayin.com | 08:00 | |
masak | :) | 08:02 | |
masak conducts a structured attack on pack/unpack | 08:03 | ||
08:07
xinming_ joined
08:10
xinming left
|
|||
mberends | Gtk clock looks less 1983 without its cyan background :) | 08:11 | |
sorear | mm 1983 | 08:13 | |
masak | I was two. I didn't know the word "cyan" :) | 08:14 | |
sorear | I was -7 | ||
masak | :P | ||
mberends | the lo-res lo-color picture of the CGA display was so limited. It could barely resolve an 80x25 text screen with 16 colors. Consequently cyan and magenta represent "primitive color" in the memories of many oldies. | 08:19 | |
Woodi | perl6: class A { has $!a; method !b() { $!a = 'internal' }; method c() { say self!b() } }; my $c = A.new; $c.c() | 08:25 | |
p6eval | rakudo 09a598, niecza v9-43-ged11042: OUTPUT«internal» | 08:26 | |
..pugs: OUTPUT«***  Unexpected "{" expecting operator, ":", "," or "}" at /tmp/0HNIg2IhFX line 1, column 32» | |||
Woodi | mberends: why i must say self!method and no such restrictions for fields ? | ||
i do not mean to add restriction for field access :) | 08:27 | ||
mberends: definetly, 16 colors is enough for everyone :) and i realy like old, green 80x25 displays :) | 08:28 | ||
mberends | Woodi: as I understand it, fields are private but they can have public accessors with the . twigil or not public access with the ! twigil. | ||
sorear | Woodi: cga had 4 colors when in bitmapped mode | 08:29 | |
Woodi | grean alone + bold, lighten and underline is enought :) | ||
08:30
MayDaniel joined
|
|||
Woodi | mberends: i prefer to access methods with [.!]method inside class definition, like fields | 08:30 | |
/bold/dimish/ :) | 08:31 | ||
mberends | the only CGA colors in bitmapped mode were black, magenta, cyan and white. Red, green, blue, yellow etc were not even available. | ||
sorear | mberends: I thought you could at least change the palette (slightly) | ||
Woodi | sorear: it was hardware limitation probably | 08:32 | |
mberends | sorear: I think VGA (not even EGA) added those hardware capabilities (palette). | 08:33 | |
moritz | you could turn the display a bit brighter :-) | ||
mberends | moritz seems a bit brighter this morning :) | 08:34 | |
sorear | mberends: my recollection was: CGA = 4 out of <=16; EGA = 16 out of 64; VGA = 256 out of 64^3 | ||
mberends: the earlier models had a small fixed pallet and an even smaller variable one | 08:35 | ||
masak | mberends: no, CGA allowed you 4 colors, but there were two palettes. this went even for non-EGA-capable hardware. | ||
the unusual palette (the one you could switch to) was black, red, green, yellow. | 08:36 | ||
08:36
cognominal joined
|
|||
sorear | Do I want to fix 14/163 failing test files before v10? Most of them probably just need refudging after nom work | 08:40 | |
mberends | naah | 08:41 | |
sorear | then I guess it is time to start writing announce.v10 | ||
sorear is currently struggling to figure out some kind of failure to initialize variables | 08:42 | ||
Woodi | Google will eat us one day | 08:47 | |
08:48
mj41 joined
|
|||
Woodi | maybe goverments should regulate moving user profiles betwin 'internet entities' in some way ? :) and how much it will cost us ? :) | 08:48 | |
dalek | ecza/serialize: 7d57dc4 | sorear++ | lib/ (2 files): WIP protopad generation |
08:49 | |
sorear | I give up for now | ||
sorear sleep | |||
Woodi | gn sorear | ||
mberends | gn sorear | ||
Woodi: thinking that way is a good start to prevent it from happening. I consciously use Google very little. | 08:50 | ||
Woodi | for now i prefer google over MS :) | 08:53 | |
and there no real alternatives probably | 08:54 | ||
mberends | I prefer whoever is not the apparent monopolist | ||
monopolists become bullies. they can't help it. | 08:55 | ||
Woodi wish bookmark synchronization plugin with option to store on server of choice not plugin-developer-company... | |||
there was LDAP support in Netscape 4.x :) | |||
Woodi can donate a bit for such LDAP plugin in FF :) | 08:58 | ||
mberends can donate a byte | |||
Woodi | mberends: you understand mozilla internals ? :) | ||
mberends | Woodi: good gracious no! don't want to either! I was... joking ;) | 08:59 | |
Woodi | patches counts :) becouse it should be opensource ofc :) | 09:00 | |
09:00
daniel-s left
|
|||
mberends | Woodi: if Niecza or Rakudo can do it, I'd rather write a custom web browser in Perl 6, just for the yak shave. I wonder if Niecza CLR Interop covers networking already? | 09:02 | |
Woodi | thats remembered me something | 09:05 | |
moritz | mberends: if I were to write a web browser, I'd base it on uzbl | ||
that allows one to implement browser functionality by communicating to a process with pipes or sockets | |||
Woodi | it would be nice to have perl6 modules implementing misc standards, eg HTTP, HTML, CSS... just parsers of standard | 09:06 | |
moritz thinks that HTTP headers shouldn't be hard to parse | 09:08 | ||
mberends | moritz: thanks, more to read :) Sounds a bit like using netcat to make a webserver though, only a desperado would do that. Er. | ||
Woodi | i think monolitic CGI.pm was one of reasons ppls shitch to PHP so fast | 09:09 | |
09:09
daniel-s joined
|
|||
dalek | ecza: 9fccf74 | mberends++ | examples/gtk- (2 files): [examples] update clock and sierpinski with CLR interop improvements |
09:12 | |
huf | Woodi: what do you mean? php *is* a monolithic CGI.pm | ||
09:15
[particle] left
|
|||
Woodi | huf: probably. but development of web pages was from start different | 09:15 | |
and installation on web serwer :) | 09:16 | ||
huf | i think that was the real deal with php, the ease of deployment and config, especially for 10-minute hacks | ||
Woodi | so if CGI::Protocol module, CGI::HTML things could go another way | 09:17 | |
teknology for grandmas often wins :) | |||
on the other hand it is Java replacing COBOL - becouse of business domain 'modules'... | 09:18 | ||
business quality/warranty | 09:20 | ||
COBOL *is not* dead... | |||
so Java is new COBOL for 2080 :) | 09:21 | ||
moritz thinks that the future of webserver interaction is with Plack and similar techniques | 09:23 | ||
Woodi | ok, its all about 'developers' or screensavers-like count and variety :) | 09:24 | |
right, midleware for big installations is livesaving :) | |||
so 'a ? b : c' syntax is now 'a ?? b !! c' ? #half hour digresion :) | 09:26 | ||
masak | Woodi: aye. | 09:28 | |
Woodi | thx :) | ||
masak | Woodi: anything we could've done to bring this information to you faster? :) | ||
09:28
woosley left
|
|||
moritz | std: 1 ? 2 : 3 | 09:29 | |
p6eval | std c22b2ee: OUTPUT«===SORRY!===Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at /tmp/NqDFT2Y7eF line 1:------> 1 ?⏏ 2 : 3Parse failedFAILED 00:01 119m» | ||
moritz | rakudo: 1 ? 2 : 3 | ||
p6eval | rakudo 09a598: OUTPUT«===SORRY!===Unsupported use of ?: for the conditional operator; in Perl 6 please use ??!! at line 1, near " 2 : 3"» | ||
Woodi | masak: yes ! you can :) | ||
moritz | well, rakudo even tells you :-) | ||
09:29
packetknife joined
|
|||
Woodi | cannot find ??!! nor in S04 nor p5-to-p6 documentation :) | 09:30 | |
masak | Woodi: S03 | ||
Woodi: why were you compelled to look in S04? | 09:31 | ||
Woodi | but i program in vim not irssi yet :) | ||
becouse 'if' defined there | |||
masak | lol @ twitter.com/flyosity/status/117262301123461120 | ||
moritz | Woodi: perlgeek.de/en/article/5-to-6#post_11 | 09:32 | |
# ternary, conditional op $a == $b ?? 2 * $a !! $b - $a | |||
Woodi | ah, it's operator ! :> | 09:33 | |
moritz | it even says "operator" in the error message :-) | 09:34 | |
Woodi | ok, ok. but i was using only memories and vim... sory !!! | 09:35 | |
and domumentation about blocks :) | |||
masak | is it a coincidence that Best Practical has a logotype that is also a Perl 6 (meta)operator? bestpractical.com/images/bpslogo.png | 09:37 | |
also, I can't think of a real use for this particular operator. | |||
when would I want to any() together two lists (or deeper structures) pairwise? | |||
09:40
im2ee joined
|
|||
moritz | my $index = ('a'..'z' »|« 'A'..'Z').pairs.grep( *.value eq $char).key | 09:41 | |
just a wee bit contrieved :-) | |||
dalek | ecza: 16ef0c8 | (Paweł Murias)++ | lib/ (2 files): cleanup the perl5 interpreter in Perl5Interpreter destructor |
09:43 | |
moritz | ronja tries to eat my round tuit | ||
masak | anyway, it's a nice symbol. | ||
the »|« I mean, not the round tuit. | |||
moritz | aye :-) | 09:44 | |
masak | moritz: sounds dangerous. a baby could choke on a thing like that. :/ | ||
moritz | masak: it's too big for that | 09:45 | |
im2ee | Hi! :) | 09:47 | |
moritz | hello im2ee | ||
masak | im2ee! \o/ | ||
im2ee | Today is perl6's day :) | 09:48 | |
masak | im2ee: let's create something great today! | ||
im2ee | I going to do a lof of exercises :) | ||
moritz wonders what we should do about rakudo release | |||
im2ee | I'm* | ||
masak | moritz: I'm simultaneously hopeful and dejected about recent Rakudo progress. | 09:49 | |
im2ee | masak, i will! :) | ||
masak | moritz: we're making nice headway in a lot of areas. stalling in others. | ||
09:49
uasi left
|
|||
moritz | agreed | 09:49 | |
masak | im2ee: ok, here's a deal: you publish the experiments you do with Perl 6, and I will review and comment on them :) | ||
im2ee: I'm also a bit interested in porting GGE to nom and providing an API for the construct-all-possible-strings-from-regex thing. | 09:50 | ||
moritz | you can even run your experiments here with p6eval if you paste them to gist.github.com | 09:51 | |
masak | moritz: if pmichaud doesn't show up to un-stuck us soon, we have something like three options: (1) slip, (2) release without pmichaud's bits, or (3) collectively emulate pmichaud and do his stuff. | 09:52 | |
(3) is either very very hard or impossible. | |||
mberends votes (1) slip | 09:53 | ||
masak | (and (3) is exactly what Terry Brooks tells you not to attempt) | ||
I'm fine with slipping. | 09:54 | ||
moritz | well, I'm willing to wait until tomorrow at least | ||
masak | +1 | ||
moritz | in the medium term, we should try to increase the bus number on regex stuff though | ||
but it's very hard to do that in the current stage, since pmichaud seems to have rather detailed plans on how to move forward | 09:55 | ||
masak | I'm extremely fine with him having that. | ||
seems these things are best designed by ~1 designer. | |||
moritz | sure, my point is that we don't have that plan | 09:56 | |
masak | and pmichaud has a fine grip on regular expressions. | ||
moritz | so it's hard to help | ||
masak | moritz: right. that's my point as well. | ||
as far as I know, the intermediate result haven't been published anywhere. | |||
mberends | I'm interested in trying to port QRegex to 6model/c, for understanding too. I have no idea where or when to begin. | ||
masak | all I know is from private conversation during YAPC::EU. | 09:57 | |
09:59
wamba joined
10:07
whiteknight joined
10:26
cognominal left
10:27
MayDaniel left,
whiteknight left
10:29
baest joined,
whiteknight joined
|
|||
tadzik | good morning #perl6 | 10:34 | |
mberends | hi tadzik | ||
im2ee | masak, great! :) Thank You:) | 10:35 | |
10:37
packetknife left
|
|||
masak | tadzik! \o/ | 10:37 | |
jnthn | *yawn* | ||
tadzik | oh, masak, I finally got my head around the blackboard vs whiteboard case | 10:38 | |
and I came to a conclusion, that what I really need, is a Giant Etch-A-Sketch :) | |||
(after playing with it in my sisters' house) | |||
erm, sister's | |||
arnsholt | tadzik: OOC why is an etch-a-sketch the superior choice? | 10:45 | |
jnthn | masak, moritz: The NFA code that pmichaud was working on during YAPC::EU is at github.com/perl6/nqp/commits/nfa | ||
tadzik | arnsholt: because the pens are free, and tidying is easy | 10:46 | |
arnsholt | Excellent points. Especialy the cleaning =) | 10:47 | |
tadzik | yep :) | ||
masak | tadzik: *lol* | 10:48 | |
moritz likes whiteboards | 10:49 | ||
masak likes blackboards | |||
tadzik likes etchasketches | 10:52 | ||
10:56
espadrine joined
|
|||
masak | I don't think we'll reach a consensus anytime soon. | 10:57 | |
moritz doesn't think consensus is necessary | |||
masak | to whom it may concern: gist.github.com/1239203 (A first approach to pack/unpack in Perl 6) | 10:59 | |
moritz feels concerned :-) | |||
masak | :P | ||
moritz | masak: for A I would allow Bufs, and space-pad them by counting bytes | 11:02 | |
masak | moritz: ok, makes sense. | ||
so the only difference between a and A is the space-padding? | 11:03 | ||
moritz | yes | ||
uuencode encodes bytes iirc | 11:04 | ||
so rather a Buf | |||
masak | oki. | ||
fixed. | |||
moritz | didn't you do all that work for GSOC too? :-) | 11:06 | |
masak | I started in on it. | 11:07 | |
I don't recall making this wide an approach. was more a little at a time. | 11:08 | ||
also, I still have some vague dreams about auto-translating the 17k pack/unpack tests from Perl 5. | |||
but it kind of depends on a solid understanding of the issues brought up in the gist. | 11:09 | ||
moritz | masak: the last three days of Buf recreated about two thirds of your gsoc work on buf, with lots of hindsight and better tools/foundations :-) | ||
s/Buf/Buf work/ | 11:10 | ||
most notably it wraps ByteBuffer, which didn't exist then (or was just being created, and not as powerful) | |||
masak | it was just being created back then. | 11:11 | |
a classical case of "HLL needs something, let's build it for them". | |||
11:11
am0c joined,
SHODAN joined
|
|||
masak | I'm very happy there's now a second iteration taking advantage of that. thanks moritz for spearheading that effort. | 11:11 | |
& | |||
moritz | masak: and I'm very happy the first iteration existed | 11:12 | |
11:14
cougnut left
|
|||
mberends | masak: some of the pack rules define precisely what the packed data should be, and implementing them will probably work fine. Other rules depend on particular Perl 6 implementations and should probably be dropped from the spec. For example j, J, f, d, F, D, p, P. They would be non-portable by definition. | 11:17 | |
jnthn | mberends: I'm going to have to do the nqpclr porting of QRegex at some point in the not too distant future, so maybe that will help clarify things for your c one :) | 11:18 | |
mberends | jnthn: aye :) | 11:19 | |
11:22
mj41 left
|
|||
mberends | masak: what a Perl 6 pack spec needs in the place of Perl 5's native types (meaning C types) is a lossless serialization format for each of Perl 6's data types such as Int, Rat and Num. | 11:23 | |
moritz not sure | 11:24 | ||
afaict pack fills the niche of giving one a byte stream in a specific format | 11:25 | ||
if you want to serialize, use Storable instead | |||
mberends | masak: those Perl 6 data serialization formats need to be canonical, so that Rakudo and Niecza can read/write each other's data. | ||
moritz: ok, in that case those Perl 5 style rules should simply be dropped. | 11:26 | ||
masak | I'm all for dropping them. | 11:35 | |
that's the conservative thing to do. | |||
error message could be "contact us if you have a sensible idea of what this should do" :P | |||
moritz | +2 | ||
tadzik | :P | 11:36 | |
11:36
Psyche^ joined
|
|||
tadzik | oh, do not worry. They *will* contact us... | 11:36 | |
11:38
Patterner left,
Psyche^ is now known as Patterner
11:50
Chillance joined
|
|||
moritz | nqp: say("\c[0]") | 11:51 | |
p6eval | nqp: OUTPUT«␀» | ||
moritz | nqp: say("a" xx 2) | ||
p6eval | nqp: OUTPUT«Confused at line 1, near "say(\"a\" xx"current instr.: 'nqp;HLL;Grammar;panic' pc 23698 (src/stage2/gen/NQPHLL.pir:6757) (src/stage2/gen/NQPHLL.pm:329)» | ||
11:54
mj41 joined
|
|||
masak | siggie DSL. | 11:54 | |
no, wait. that's a capture ;) | |||
probably xx NI, then. | |||
nqp: "a" xx 2 | |||
p6eval | nqp: OUTPUT«Confused at line 1, near "\"a\" xx 2"current instr.: 'nqp;HLL;Grammar;panic' pc 23698 (src/stage2/gen/NQPHLL.pir:6757) (src/stage2/gen/NQPHLL.pm:329)» | ||
masak | yup. | ||
jnthn | NQP doesn't have xx, as far as I know. | ||
colomon | moritz: we probably should be supporting IEEE floating point format, in both little-endian and big-endian, in addition to "internal" format (which is just going to be IEEE for virtually every platform, I think) | ||
moritz | seems like :-) | ||
tadzik | I don't see why it should | ||
moritz | tadzik: because I just had an application where it would be convenient :-) | 11:55 | |
tadzik | :0 | ||
:) | |||
moritz | parrot has the 'repeat' op after all | 11:59 | |
mberends | colomon: "internal" risks creating a can of worms for future implementers to deal with | ||
tadzik | an op for _that_? Odd, imho | ||
I looked at the string pmc | |||
moritz | tadzik: very useful for initializations | 12:00 | |
tadzik | hmm, maybe | ||
moritz: what's your usecase? | |||
moritz | tadzik: an initialization :-) | ||
tadzik | :) | ||
turns out it's pretty commonly used in Parrot too | 12:01 | ||
colomon | mberends: I would think not -- at least, I'd interpret "internal" as "whatever the heck the system I'm on currently uses", ie explicitly not compatible. That should be the easiest thing for implementers to create. | 12:03 | |
12:07
wamba left
|
|||
mberends | colomon: if explicitly not compatible, I would prefer not to offer it at all, since adequate alternatives exist. That way no bad user can complain that Perl 6 caused data loss. | 12:07 | |
moritz | nqp: say(8/3) | 12:08 | |
p6eval | nqp: OUTPUT«2.66666666666667» | ||
moritz | nqp: say(nqp::div_i(8, 3)) | 12:09 | |
p6eval | nqp: OUTPUT«2» | ||
12:09
itz left
|
|||
moritz | nqp: say(nqp::ord(pir::shl__SSI("\c[1]", 3))) | 12:10 | |
p6eval | nqp: OUTPUT«error:imcc:The opcode 'shl_s_s_i' (shl<3>) was not found. Check the type and number of the arguments in file '(file unknown)' line 47977136» | ||
moritz | nqp: say(nqp::ord(pir::shl__PPI("\c[1]", 3))) | ||
p6eval | nqp: OUTPUT«error:imcc:The opcode 'shl_p_p_i' (shl<3>) was not found. Check the type and number of the arguments in file '(file unknown)' line 45707951» | ||
moritz | nqp: say(nqp::ord(pir::sh_l__PPI("\c[1]", 3))) | ||
p6eval | nqp: OUTPUT«error:imcc:syntax error, unexpected PREG, expecting '(' ('$P102') in file '(file unknown)' line 40452783» | ||
moritz | nqp: say(nqp::ord(pir::shl__PPI("\c[1]", 3))) | ||
p6eval | nqp: OUTPUT«error:imcc:The opcode 'shl_p_p_i' (shl<3>) was not found. Check the type and number of the arguments in file '(file unknown)' line 55906991» | ||
moritz | nqp: say(pir::bors__SSS("a", "c")) | 12:11 | |
p6eval | nqp: OUTPUT«error:imcc:syntax error, unexpected SREG, expecting '(' ('$S102') in file '(file unknown)' line 40» | ||
moritz | seems that nqp doesn't load str_ops | 12:12 | |
erm, bit_ops | |||
nom: say 1 +< 3 | 12:15 | ||
p6eval | nom 09a598: OUTPUT«8» | ||
moritz | nom: say(0b11) | 12:16 | |
p6eval | nom 09a598: OUTPUT«3» | ||
12:20
[Coke] left
12:21
pmurias joined
|
|||
moritz | nom: say(pir::repeat("x", -1)) | 12:21 | |
pmurias | hi | ||
p6eval | nom 09a598: OUTPUT«Cannot repeat with negative arg in <anon> at /tmp/dLwjat2TiA:1 in <anon> at /tmp/dLwjat2TiA:1» | ||
moritz | nom: say(pir::repeat("x", 0)) | 12:23 | |
p6eval | nom 09a598: OUTPUT«Method 'gist' not found for invocant of class 'String' in sub say at src/gen/CORE.setting:4859 in <anon> at /tmp/0umtdAuoYj:1 in <anon> at /tmp/0umtdAuoYj:1» | ||
moritz | nom: pir::say(pir::repeat("x", 0)) | ||
p6eval | nom 09a598: OUTPUT«» | ||
pmurias | how do i rethrow the exception from eval? | 12:24 | |
moritz | pmurias: eval is supposed not to catch the exception in the first place | 12:25 | |
(rakudo gets that wrong) | |||
colomon | mberends: not sure why you'd want to drop "internal" floating point format -- as I said, it's the easiest to implement and it has several very good uses, being the quickest format for handling data which isn't supposed to be portable, and if you're on a platform where the floating point format is actually weird, it's needed for easy compatibility with other programs on that platform. | 12:26 | |
colomon just discovered on wikipedia that IEEE has now expanded their floating point spec to handle several new types.... | 12:27 | ||
mberends | colomon: I see your point, yet remain unconvinced of its value in practice | 12:30 | |
colomon | mberends: note that (if moritz++'s page is correct, the "internal" floating point format is the only one Perl 5 currently supports. Adding support for IEEE 754 floating point format was the point of my proposal. | 12:33 | |
mberends | colomon: +1 to IEEE 754, and too bad for implementations that choose something else for their "internal" floating point. | 12:36 | |
12:38
MayDaniel joined
|
|||
colomon | mberends: it's not implementations, it's platforms | 12:39 | |
IBM mainframes, for instance. | |||
ingy | hi moritz | ||
pmurias | moritz: good | ||
colomon | cray supercomputers... | 12:40 | |
12:41
pmurias left
|
|||
ingy | is there an idiom in p6 regex to say [lcurly|lsquare] ... [rcurly|rsquare] ? | 12:41 | |
colomon has actually done significant programming on more than one platform that didn't support IEEE floating point, though admittedly, it's been over a decade now since those days... | |||
12:41
[Coke] joined
|
|||
ingy | such that you only use curly or square? | 12:41 | |
mberends | colomon: true, but then as moritz++ pointed out, pack should be about bytes in files, and Storable about serialization. | 12:42 | |
12:42
woosley joined
|
|||
ingy | also I was considering renaming pegex.receiver to pegex.action. Is there any other PEGs using the terminology "action" besides p6? | 12:42 | |
I just got the python parser port working... | 12:43 | ||
ribasushi: o/ I got your rt tickets. care to fix on github? if so I give you teh commitz... | 12:45 | ||
moritz wonders if there should be a built-in mirror rule | 12:47 | ||
so that you can say (<[({]>) ~ <.mirror($0)> <thing> | |||
snarkyboojum | ingy: yep piumarta.com/software/peg/peg.1.html | 12:53 | |
12:57
uasi joined
13:06
uasi left
13:08
mj41 left
13:09
PacoLinux left,
PacoLinux_ joined
13:15
Limbic_Region joined,
pmurias joined
|
|||
ingy | moritz: what does that ~ do again? | 13:16 | |
snarkyboojum: ta | |||
moritz | ingy: that's the parser generator for matching delimited stuff | ||
13:22
packetknife joined
|
|||
pmichaud | good morning, #perl6 | 13:23 | |
masak | pmichaud! \o/ | ||
moritz: I'm not sure there needs to be a built-in rule for mirroring. just possible to supply. | |||
moritz | good am, pm | ||
jnthn | pmichaud! \o/ | ||
pmichaud | sorry about missing the release yesterday. some of Paula's colleagues on her projects dropped a few balls, which meant that lots of stuff got pushed to me unexpectedly :-/ | 13:25 | |
13:25
packetknife left
|
|||
masak | that happens. | 13:25 | |
moritz | what's the updated plan? | ||
ingy | snarkyboojum: that uses the term 'action' as a code block that gets executed on a match. I'm thinking of the name of the 'action containing class', which I call a receiver. A receiver contains actions. Still undecided. | 13:26 | |
moritz: I get ~ now. thanks. I like the idea of a mirror token. :) | |||
pmichaud | I'm thinking I'll have time this afternoon to work a bit on regexes and release prep, then will do the release tomorrow morning (about 26 hrs from now), unless anyone has objections or other suggestions | 13:27 | |
masak | perl6: my $a = "This value will never be set" if 0; say $a.perl | ||
p6eval | rakudo 09a598, niecza v9-46-g16ef0c8: OUTPUT«Any» | ||
..pugs: OUTPUT«\undef» | |||
pmichaud | (I'm very open to other suggestions :) | ||
masak | haha, '\undef'. Pugs, you so funny. | ||
moritz | pmichaud: sounds good | 13:28 | |
masak | pmichaud: +1 | ||
jnthn | pmichaud: +1 | ||
13:28
MayDaniel left
|
|||
masak | by the way, my offer to combine resurrecting Pugs with a weekly online Haskell study group still stands. just need one or two interested people to get going. :) | 13:29 | |
ingy | I use /~<thing>~/ as short for /<ws>*<thing><ws>*/. I wonder if I should change that sigil. I don't *need* to because I can still use ~ outside //. | ||
ingy hmms | 13:30 | ||
13:30
packetknife joined
|
|||
arnsholt | I assume that means you use hidden Markov models to classify the tokens in your grammar? =) | 13:30 | |
ingy | masak: are you resurging Pugs??!! | ||
masak | ingy: no, not yet. | ||
but I want to. | 13:31 | ||
ingy | :D | ||
13:31
Limbic_Region left
|
|||
masak | it's the kind of project that needs at least two people, just to establish some kind of mutual moral support. | 13:31 | |
ingy | yeah. I got so much acmeism stuff on the fire. | 13:32 | |
still I support you | |||
masak feels supported o/ | 13:33 | ||
ingy | are there other infix operators besides ** and ~? | ||
13:33
am0c left
|
|||
moritz | now there's the new % | 13:33 | |
masak thought ** was a postfix | 13:34 | ||
ingy | yeah? | ||
probably is | |||
masak | postfix with extras :P | ||
ingy | I think moritz regrets it though ;) | ||
arnsholt | And I've sort of classified ~ as a ternary | ||
Only the second half of it is invisible | |||
masak | yeah. but infixes can be ternary. | ||
moritz | je ne regret rien | 13:35 | |
masak | arnsholt: ?? !! is an infix. | ||
arnsholt | Tru dat | ||
masak | ...as I just found out the other day :) | ||
13:35
packetknife left
|
|||
ingy | moritz: what is %? | 13:35 | |
masak | ingy: it's what ** used to be for separators. | ||
ingy | ?! | 13:36 | |
pmichaud | \w+ % ',' / # if I read correctly | ||
/ \w+ % ',' / # if I read correctly | |||
masak | ingy: see github.com/perl6/specs/commit/a455...0fa3628e3d | ||
13:38
MayDaniel joined
|
|||
ingy | seriously?! | 13:38 | |
did pegex talk spawn that? | |||
masak | yeah! | ||
ingy | thanks for clueing me in :\ | ||
now I have to change | 13:39 | ||
masak | stop by more often! :P | ||
pmichaud | Perl happily steals from many sources :) | ||
ingy | bleh | ||
jnthn | This is the risk of brining things up on #perl6. It may buy you some re-implementation work. ;-) | ||
ingy | moritz: is there any analogs to the ?** stuffs I wanted? | ||
pmichaud | yeah, I bet if we stopped discussing Perl 6 we'd all have a lot less to do :) | ||
masak | ingy: why you keep addressing moritz? :) | 13:40 | |
I'm over here... | |||
ingy | masak: moritz has been my guy for this stuff | 13:41 | |
masak | oh, ok. so it wasn't a mistab. | ||
ingy | you wanna take over ingysitting? | ||
masak | ingy: anyway, I wouldn't be surprised if most/all of your use cases can be done with % | ||
heh, I don't mind answering questions. I'm sure moritz does a good job, though. | |||
pmichaud | afk again -- bbl | 13:42 | |
ingy | 1) one or more with commas 2) zero or more 3) 2 or more 4) trailing comma allowed | ||
masak: ^ | |||
that was basically it | 13:43 | ||
masak | those can be done with a bit of repetition around the % construct. | ||
<stuff>* % <comma> <comma>? | 13:44 | ||
or, hm, <stuff>+ % <comma> <comma>? | 13:45 | ||
ingy | well to me, a % b and a [b a]* are not the same thing | ||
13:45
packetknife joined
|
|||
masak | no, it's written a+ % b | 13:45 | |
% is a quantifier modifier. | |||
pmurias | where can i lookup what features niecza implements? | 13:46 | |
ingy | one produces data of the form [a+] and the other [a, [a+]*] | ||
masak | pmurias: perl6.org/compilers/features ? | ||
ingy: oh, that's true. | |||
ingy: but % doesn't have that problem, seemsse. | 13:47 | ||
seemsme* | |||
pmurias | masak: is the matrix automatically update or manual built? | ||
ingy | I want all my use cases of % creating [a] | ||
masak | pmurias: the latter. | ||
pmurias: well, both ;) | |||
ingy | masak: how do I get trailing b? | 13:48 | |
masak | ingy: <stuff>+ % <comma> <comma>? | ||
ingy | and how do I get 2 or more? | ||
masak | ingy: (<stuff>)+ % <comma> { $0.elems >= 2 } <comma>? | 13:49 | |
ingy: (<stuff>)+ % <comma> { $0.elems >= 2 } | |||
not sure the .elems is needed. | |||
ingy | 2 or more is a real use case. like for a | b | ||
masak | wait, yes, I think it is. Match numification goes through Match stringification. | ||
ingy | um, I thought {} is an action, and actions don't affect parsing | 13:50 | |
masak | oops | ||
ingy: (<stuff>)+ % <comma> <?{ $0.elems >= 2 }> | |||
ingy | anyway I have no inline actions so I'd like a syntax | ||
masak | we have inline actions, so we don't need extra syntax ;P | 13:51 | |
pmurias | masak: it would be cool if the given spot in the table was filled in depending if a set of tests passes ;) | ||
masak | pmurias: :) | ||
ingy | I will do a+2 % b | ||
<stuff>+2 % <PIPE> | 13:52 | ||
masak is happily surprised to see how many gray boxes have been colored in on perl6.org/compilers/features | |||
ingy | inline actions are so unacmeist :P | 13:53 | |
which is why p6 rules dies with p6 | 13:54 | ||
13:54
MayDaniel left
|
|||
ingy | anymo... | 13:54 | |
thanks for the trix | |||
masak | from our perspective "dies with p6" sounds more like "work really well with p6". | 13:55 | |
but yes, it's a bit of a monopolistic practice. | 13:56 | ||
ingy | yes | ||
jnthn | masak: japhb++ encouraged me to fill in the missing Rakudo ones the other day, and I managed to do so...after busting the json file ;) | 13:57 | |
ingy | masak: maybe you have a good answer to this hand grenade... | ||
[Coke] | rakudo: rakudo: enum A <a>; say a; eval 'sub a { "O HI" }'; say a | 13:58 | |
p6eval | rakudo 09a598: OUTPUT«===SORRY!===Confused at line 1, near "rakudo: en"» | ||
ingy | masak: <hand-grenade> will there ever be a day when one does this command: 'sudo apt-get install perl6.0.0' | ||
[Coke] | masak: haskell study group? I am... intrigued. | 13:59 | |
masak | jnthn: yes, I remember. I pointed out the error to you. :P | ||
mberends | [Coke]: [Coke]: don't say rakudo: rakudo: | ||
masak | [Coke]: ooh! | ||
ingy: don't ask me, I'm just a happy end user! :P | |||
ingy: why would I care about this silly "when will it be released" circus? | 14:00 | ||
[Coke] | mberends: yes, yes. typo. | ||
rakudo: enum A <a>; say a; eval 'sub a { "O HI" }'; say a | |||
p6eval | rakudo 09a598: OUTPUT«A::aA::a» | ||
ingy | I was asked that question at the flemish perl mongers, and I said "That doesn't make sense to me. Perl6 is a spec. THere will never be an installed perl6.0.0 binary." | ||
14:01
mj41 joined
|
|||
[Coke] adds "cmasak" to his skip rule when trying to find updatable perl6 bugs. | 14:01 | ||
ingy | and the people said, "If that is true I will never give another dime to perl 6 dev" | ||
and also, "If that is true, my company will stop using perl" | 14:02 | ||
pmurias | ingy: no inline rules, you mean pegex won't allow me to write actions in my favourite acmeish dilect? ;) | ||
masak | ingy: of course the spec could be declared 6.0.0. but I don't see why it'd matter much for end users. | ||
[Coke] | masak: wow. I had already excluded some stuff, and was down to about 700 tickets to look at. exclude you, I'm down under 300. ;) | 14:03 | |
ingy | masak: I didn't think so either. but it is HUGE to rela people | ||
masak | ingy: also, I'm not too impressed by some flemish perl mongers who have probably never contributed to Perl 6 making random threats about withholing support. | ||
ingy | they all are waiting for something that will NEVER happen | ||
masak | ingy: yes. | ||
basically, yes. | |||
to a first approximation. | |||
benabik | If the spec is declared 6.0.0, then any compiler that follows it could provide perl6.0.0. Then trying to apt-get it will attempt to select one. | ||
masak | ingy: consider it a honeypot for trolls and similar-minded people. | ||
ingy | and when that becomes know, they are gonna be PISSED | ||
[Coke] | rakudo: my @a=1..5; @a >>+>> 1; @a >>->> 2 | ||
p6eval | rakudo 09a598: ( no output ) | ||
masak | [Coke]: that sounds about right to me. :) | 14:04 | |
ingy | people are giving you money under false assumptions | ||
[Coke] | rakudo: my @a=1..5; @a >>+>> 1; @a >>->> 2; say @a; | ||
p6eval | rakudo 09a598: OUTPUT«1 2 3 4 5» | ||
mberends | masak: I'm moderately interested in joining a pugs and haskell group, if it could be scheduled semi-formally during example transatlantic hours on Sundays. | ||
ingy | this needs to be put out in the open clearly, and soon | ||
masak | ingy: who is giving us money? and why do they have these assumptions? | ||
[Coke] | wait, there will never be a perl6 release? what? | 14:05 | |
I think we're talking past each other here. | |||
masak | mberends, [Coke]: ok, cool. let's schedule something. | ||
[Coke]: I didn't say that, no. | |||
pmurias | why would a rakudo 6.0.0 or niecza 6.0.0 be any different from a perl 6.0.0 release | ||
? | |||
masak | pmurias: it could coincide, but definitely wouldn't have to. | 14:06 | |
[Coke] | masak: then I would be a lot more careful about answering that sort of question. | ||
ingy | people just don't understand it at all. I was surprised but they don't | ||
and they were really upset | |||
Liz and Wendy gave $5k | |||
[Coke] | phenny: ask jnthn if we can close RT#76818 with tests. | 14:07 | |
phenny | [Coke]: I'll pass that on when jnthn is around. | ||
masak | ingy: maybe we need a document outlining all this. | ||
ingy | and if you told them that perl6 isn't coming, they would ask it back | ||
masak: YES! | |||
masak | ingy: I really don't think people would be upset if they knew how things actually are. | ||
ingy | masak: me neither | ||
masak | and not all of us here are as disillusioned about a "Perl 6 release" as I am. :) | ||
I just don't consider it that important, is all. | 14:08 | ||
ingy | another guy told me his work is waiting for perl 6 to ship on debian | ||
masak | now, a stable spec, stable/fast/complete/robust implementations, *that's* important. | ||
ingy: I thought there were already debian packages for Rakudo. | |||
ingy | and there is no way to sell the powers that be the rakudo story | 14:09 | |
they really are looking for 'perl6.deb' | |||
benabik | There's no C98.deb | ||
masak | I too have grown accustomed to the fact that outsiders will never really appreciate (or care about) the Perl6-Rakudo distinction. or even the Perl6-Parrot distinction. :/ | ||
ingy | benabik: right, but nobody outside this irc channel gets that perl6 is a spec | 14:10 | |
[Coke] | moritz: can you respond to my question from July on 63650 ? | ||
jnthn | I'm not sure they should have to. | ||
phenny | jnthn: 14:07Z <[Coke]> ask jnthn if we can close RT#76818 with tests. | ||
[Coke] | ingy: well, that's crazy. | ||
"we want perl6" "here it is" "no it isn't" "..." | |||
masak | ingy: it seems to me most of these arguments would be moot if we got to the point where we could just point to our implementations and say: here you are. Perl 6 can do this. it works great. enjoy. | ||
[Coke]: I have that conversation all the time. :/ | 14:11 | ||
jnthn | nom: my @a=1..5; @a >>+>> 1; @a >>->> 2 | ||
ingy | no it's not, because you guys don't have any clear statement that that's the case | ||
p6eval | nom 09a598: ( no output ) | ||
jnthn | nom: my @a=1..5; @a >>+>> 1; @a >>->> 2; say @a | ||
p6eval | nom 09a598: OUTPUT«1 2 3 4 5» | ||
masak | [Coke]: "when is Perl 6 going to be released?" "we release every month." "no, here's what I mean by release..." :/ | ||
jnthn | nom: my @a=1..5; @a >>+>> 1; @a >>->> 2; say @ | ||
p6eval | nom 09a598: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at line 1, near "@"» | ||
[Coke] | I certainly think a doc explaining that should exist on perl6.org... but I'd be surprised if it didn't already. | ||
jnthn | nom: my @a=1..5; say @a >>+>> 1; say @a >>->> 2; | ||
p6eval | nom 09a598: OUTPUT«2 3 4 5 6-1 0 1 2 3» | ||
jnthn | [Coke]: Closable with tests, looks like. | ||
ingy | it should be the fucking HEADLINE | ||
[Coke] | jnthn: danke. | 14:12 | |
masak hugs ingy | |||
ingy | I was going to write a blog post "perl6 will never ship" and explain the whole thing in detail | 14:13 | |
jnthn | ingy: We don't need more drama. We need to quietly get on with making awesome Perl 6 implementations that people can get their work done with. Because I do plenty of conferences and that's what excites people: seeing stuff working. | ||
masak | ingy: please consider carefully what people who don't read the blog post will take away from that title. :/ | ||
also, full ACK to what jnthn++ just said. | |||
ingy | jnthn: if you don't just explain it now and deal with the drama, you are shooting yourself in the foo\whead | 14:14 | |
masak | releasing Rakudo Star was a lot of fun. we pulled all the stops. people still just wanted more and faster. so that's what we're working on now. :) | ||
ingy | I'm just reporting what real people told me when I tried to sell them your story | 14:15 | |
[Coke] | I would prefer a title of "perl6 is already shipping", but I see what ingy's shooting for. | ||
masak | I also see what ingy is shooting for. | ||
ingy | I was advocating p6, and this is what I got | ||
masak | I've wanted to write that blog post myself sometimes. | ||
ingy | masak: please do | 14:16 | |
choose a better title | |||
masak | I just might. | ||
ingy | but please start the discussion | ||
[Coke] | rakudo: my $foo; say $foo.WHAT | ||
p6eval | rakudo 09a598: OUTPUT«Any()» | ||
pmurias | ingy: *a* perl 6.0.0 will ship, *the* perl 6.0.0 won't | ||
[Coke] | rakudo: my $foo; say $foo.WHAT.Str; | ||
p6eval | rakudo 09a598: OUTPUT«Use of uninitialized value in string context» | ||
[Coke] | jnthn: that's another one of yours: RT#76482 | 14:17 | |
"Haven't you heard? They come in six packs." | |||
masak | why do people love version numbers so much? I don't give a Rat's denominator about 6.0.0! I want an implementation that I can use in my daily life and work! | ||
ingy | I personally don't give a rats about all this. but I saw clearly that you guys were heading for a shitstorm | ||
masak | call it 0.93, I don't care! | ||
ingy | masak: if you guys don't want any money to get p6 done, then do whatever you want | 14:18 | |
masak | *sigh* | ||
[Coke] | masak: I'm trying to figure out why you're upset about this feedback. | 14:19 | |
masak | maybe we need to clearly distinguish PR and actual internal work here. | ||
[Coke] | where on perl6.org is this documented? | ||
I think it's pretty clear ingy is talking about PR here. | |||
masak | [Coke]: I'm not, really. I'm happy that ingy is stepping forward reporting a real-life PR experience. | ||
jnthn | [Coke]: Right on the top of www.perl6.org/compilers/ | ||
masak | [Coke]: I'm not sure it's grounds for panicking. | ||
[Coke] | jnthn: I think a little more text there is a good idea. | 14:20 | |
masak | specifically, the message "if sponsors only knew that a 6.0.0 is not forthcoming, they'd ask their money back" sounds extremely alarmist. | ||
I'm in this not to get a 6.0.0 release of anything, just to bring Perl 6 to fruition. | 14:21 | ||
ingy | it's what I heard | ||
masak | yes. and that's interesting. | ||
ingy | </hand-grenade> | 14:22 | |
Woodi | I personaly think that Perl 6 is implemented and not optimizet at the moment. and that more exotic features are still in scientific research. maybe there should be feature matrix partitionet like: 1. 'ALL features from C/C++' (implemented) :) 2. features from Haskel (show what work); 3) features with spec under development; 4) pure research :) | ||
to late one line :) | 14:23 | ||
ingy | Woodi: you are right. but the thing is that not only does the world not get it, the majority of the perl community does not get it | 14:25 | |
[Coke] | ingy: welcome to 10 years ago. ;) | ||
ingy | it's a pretty easy thing to set straight, in no uncertain terms. | ||
[Coke] | ingy: ORLY? how? | 14:26 | |
masak | ingy: I think that I've somehow gotten used to that no matter what we do here in the echo chamber, people will still be tapping their foot, arms akimbo outside of it. what gives me hope is that there are plenty of people who *want* Perl 6 to succeed. but there's no easy way to succeed by outsiders' criteria, except to keep implementing a huge amount of stuff well. | ||
[Coke] | masak++; but if there's something we can add to the website to help out, by all means. | 14:27 | |
masak | agreed. | ||
Woodi | ingy: i was thinking same thgings sometimes and then Perl5 development restarted :) so not so much presure on v6 | ||
and i am on debian now with two sets of Perl6 packages :) | 14:29 | ||
one was apt-get'ed :) | |||
ingy | [Coke]: On the top of your main web page say this: "The term 'Perl 6' refers to a language specification. There are many implmentations of this spec, but none of them will ever be called 'Perl 6'. The current implmentations are: ..." | ||
[Coke] | Note to bug reporters: when opening tickets and saying "this is weird", please include your expected output. Your bugadmins thank you. | ||
ingy: but they are called Perl 6. | |||
do you mean "they will not be called "perl6" " ? | 14:30 | ||
ingy | just do that, and go back to work | ||
yes, I mean perl6 | |||
[Coke] | ok. rakudo's executable is called perl6. | ||
so this is not an easy thing to sell. | |||
Woodi | ingy: on contrary you are right :) ppls want something declared beta at least | 14:31 | |
ingy | any implementation can install /usr/bin/perl6 | ||
but nobody can ship perl6.deb | |||
Woodi | -rwxr-xr-x 1 root root 15252656 Aug 7 10:07 /usr/bin/perl6 | 14:32 | |
[Coke] | how about "... will ever be *the* Perl 6. The current imp...." | ||
jnthn | [Coke]: #76482 loosk like correct by current spec. | ||
14:33
packetknife left
|
|||
ingy | there will never be a Perl 6 implementation know simply as "Perl 6". All implementations can use the generic term a "Perl 6" implementation, but the specific name will not be "Perl 6" | 14:34 | |
golf that into a concise statement | 14:35 | ||
TimToady should probably craft it | |||
then put it out front and center | |||
and let other people deal with drama while you hack :) | 14:36 | ||
masak | it should be noted that Perl 6 has been a language implementation since day 1. | 14:37 | |
14:37
masonkramer joined
|
|||
masak | this really shouldn't be a surprise to people. | 14:37 | |
14:37
replore_ joined
|
|||
masak | that, in essence is why I don't think there's really an oncoming "shitstorm". | 14:38 | |
ingy | masak: keep your head in the sand | ||
masak | *sigh* | ||
14:38
masonkramer left
|
|||
masak | I'll allow for the fact that we haven't been utterly clear PR-wise. we suck at PR. | 14:39 | |
but really, this is the way it's been, always. Perl 6 is a spec. | |||
release of Perl-the-spec 6.0.0 will have close to zero significance for people who want to use Perl 6. | |||
other things matter a lot more. | |||
ingy | masak: the world was always round | ||
masak | ingy: I agree with that but fail to close the analogy circuit. :/ | 14:40 | |
ingy | masak: you are wrong about the zero significance | ||
masak | aye, maybe I am. | ||
maybe I've been here too long. | |||
I should say, it really won't matter one ounce *to me*. | 14:41 | ||
ingy | there are real people trying to keep their companies on board with perl, and waiting for a perl6 release etc. | ||
at least just tell them the truth loudly | |||
then you are off the hook | 14:42 | ||
benabik | Point them at 5.14… Lots of good improvements happening. Perl is still moving. | ||
masak | so... the companies are waiting for a Perl 6 release... but they're unaware of the distinction between spec and implementations... and they won't consider Rakudo to be "Perl 6"...? :/ | ||
ingy | masak: correct | ||
masak | ingy: I'm not sure what to do about that. | ||
14:43
espadrine left
|
|||
masak | ingy: clearly, it sucks, but it's also the way it is. | 14:43 | |
flussence | IMO we could learn a few things from the WHATWG - just let some slow-moving W3C-like group have "6.0.*" so the people who prefer getting stuff done can carry on doing so :P | ||
ingy | masak: when I am at a computer conference i meet a lot of people who never heard of yaml | ||
which seems unrela to me | |||
unreal | |||
but it is real | |||
masak: I told you a way to start solving it immediately | 14:44 | ||
benabik | masak: For perl people, that doesn't surprise me too much. There was no difference between p5 spec and implementation. I would think that C/C++ people would get it, but Java people probably not. | ||
ingy | people are great about saying what $perl6 will be, but suck at shouting what it won't be | ||
masak | frankly, I feel neither capable of nor very interested in addressing this issue. | 14:45 | |
at least not right now. | |||
helping with nom feels more important. | |||
I'm not saying ingy is wrong in his analysis... just that there will always be people who don't see all the distinctions and shades of gray we do inside the Perl 6 community. | 14:46 | ||
flussence | speaking of nom, that Buf stuff helped a lot: github.com/flussence/specgraphs/ra...-tests.png | ||
masak | sure, put something up on the website to be even more clear. that's perfectly alright. | 14:47 | |
but let's not overreact. | |||
ingy | I just asked a geek who sat down next to me at the OSDC conference if he knew yaml | ||
nope | |||
for real just now | |||
I asked him if he knows perl 6 | |||
masak | "knows" or "knows about"? | 14:48 | |
14:48
mj41 left
|
|||
ingy | he says, joking, yeah sure coming out any day now... | 14:48 | |
*laughs* | |||
rakudo? | |||
blank | |||
flussence | I bet he knows PHP and/or Java though... | ||
benabik | yaml was a bit of a flash in the pan… json has become far more common | ||
masak | ingy: you're not asking us to change the "any day now" label? that's been with us since, like, 2001... | ||
ingy | oh so yaml is dead? | ||
really | |||
yaml is more popular than ever | 14:49 | ||
masak | ingy: the "any day now" meme will *survive* any kind of release we ever make by perhaps a decade. | ||
ingy | anyway, you guys are soaking in p6 | ||
but nobody else has a clue | |||
masak | right. | ||
ingy | even your friends at yapc | ||
masak | ingy: if you believe that we are withholding information and PR on purpose... | 14:50 | |
reaching out is *hard*. | |||
ingy | again, just real feedback from real human | ||
masak | hey, he knew about Perl 6! | ||
that's about what I'd expect from someone who isn't involved. | 14:51 | ||
ingy | he knows it as the next version of perl | ||
masak | Perl 6 has a real brand going for it. and people want us to change name. :P | ||
ingy | I don't | ||
masak | me neither. | ||
14:52
uasi joined
|
|||
ingy | I want you to tell everyone precisely what to expect | 14:52 | |
then they will say | |||
masak | the most constructive thing I've come up with to counteract the "Perl 6 will never be released" meme is to have people start saying "haha, yes. but seriously, I used it yesterday, and it rocks." for that, we need to implement it as much as possible. preferably soon. | ||
ingy | oh! that makes sense. ok | ||
done | 14:53 | ||
masak | ingy: people come in here a lot, asking a lot of questions. we tell them what to expect. they don't listen and then they go away. and they're the *interested* ones. | ||
ingy | I'm not talking about them | ||
masak | good luck informing the mildly interested or disinterested ones. | ||
ingy | I'm talking about the world that trusts the perl community to DTRT and is patiently waiting.... | 14:54 | |
for something that will NEVER come | |||
by definition | |||
masak | I think you're exaggerating. | ||
ingy | I'm not | ||
I run into this every day | |||
I travel all over the world pimping perl | 14:55 | ||
and perl 6 brings up anger | |||
jnthn | *sigh* | ||
masak | sorry to hear that. | ||
ingy | and it is almost always off track | ||
jnthn | afk, for quite a while | ||
masak | ingy: I hear a lot of misconceptions about Perl 6 too. I travel places too, although perhaps not as much as you. | 14:56 | |
ingy | they are wrong, but there's no reason they shouldn't be | ||
masak | ingy: to the best of my knowledge, I've managed to answer similar questions to people's satisfaction. | ||
maybe you just suck at answering those questions :P | |||
ingy | masak: yes | ||
masak | ok, so it's a very local shitstorm we're talking about... | 14:57 | |
ingy | masak: why are you not trying to solve this? | ||
masak | because I'm, you know, doing real stuff. | ||
ingy | it's great that you can calm a person down and set them stright | ||
straight | |||
just do it once in writing | |||
then you can just point them a a url | 14:58 | ||
masak | I hear you. | ||
will think about it a bit. | |||
ingy | and get MORE hacking done | ||
masak | that doesn't follow, but sure :P | ||
ingy | so is % an infix? | 14:59 | |
in rules | |||
masak | I think so. primarily, it's a quantifier modifier. | 15:00 | |
which could be seen as an infix with some restrictions. | |||
ingy | it's not a cast modulus? | ||
I thought someone (moritz?) said that | |||
masak | in STD, it's a token. github.com/perl6/std/commit/c22b2e...995bba50d3 | ||
15:01
cognominal joined
|
|||
sorear | good * #perl6 | 15:01 | |
colomon | o/ | 15:02 | |
sorear: got asinh working last night, but seem to have broken it since. | |||
ingy | The C<%> because it can be pronounced | ||
'modulo' and because it looks like the relationship of two things. | |||
masak | I don't know what you mean by 'cast modulus'. | 15:03 | |
sorear: * | |||
sorear | Woodi: there are two ls in Haskell. | 15:04 | |
mberends: ping | 15:05 | ||
ingy | masak: 5 % 3 | 15:07 | |
masak | ingy: yes. that is en.wikipedia.org/wiki/Modulo_operation -- I'm familiar with it. | 15:08 | |
ingy | % is modulus | ||
masak | OK. | ||
Woodi | sorear: i was aware i can mispell that name. i was active betting to use 'a' not 'e' after 'h' :) will try memoize :) | ||
ingy | and you know what a cast is | ||
masak | a type cast? | ||
sure, but what does that have to do with parsing? | |||
sorear | masak: do you think niecza deserves a +- or a + for printf? | 15:09 | |
15:09
[particle] joined
|
|||
masak | sorear: haven't used it enough. #58 doesn't seem like grounds for giving it a +- | 15:09 | |
sorear: but other things might, I dunno. | |||
mberends | sorear: pong | ||
ingy | I'm asking if % is cast to a new behaviour when given rule args | ||
masak | sorear: how much of the spectest suite does it pass? | ||
sorear | mberends: what I just asked masak. | ||
I'll give it a +- because there's no .fmt | 15:10 | ||
masak | ingy: oh! I just consider it two completely unrelated languages. | ||
ingy: the fact that it's the same character for the two operators is more of a nice symmetry/rhyme. | |||
15:10
mj41 joined
|
|||
ingy | well rules are just methods in grammars | 15:11 | |
dalek | atures: f42e110 | sorear++ | features.json: Update niecza features |
||
masak | ingy: sure, but it's still two different grammars parsing the two kinds of % | ||
ingy | which is what I was asking :) | 15:12 | |
masak | and the answer is: they're not at all the same operator. they just look alike, and they can both be called "modulo". | 15:13 | |
ingy | thx | ||
sorear | like the relationship between infix:<~> and prefix:<~> ? | ||
mberends | sorear: I agree +- because there quite a few formatting options are NYI. The coverage by tests in roast is insufficient to consider sprintf or printf to be complete. | 15:16 | |
yeah, grammar fail :/ | |||
masak | sorear: almost; but those are two different operators of different category in the same sublanguage. | 15:17 | |
sorear: the two %s are two different operators of the same category (provided it is an infix in P6Regex) in different sublanguages. | 15:18 | ||
15:18
cognominal left
|
|||
Woodi | how to say return undefined in perl6 ? | 15:20 | |
15:20
cognominal joined
|
|||
masak | Woodi: 'return' | 15:23 | |
you could say 'return Nil', but that's just a longer way of saying it. | |||
also, consider whether it's 'fail' you want. | |||
Woodi | hmm, compile error message is quite descriptive | 15:24 | |
perl5 is more scriptable :) | 15:25 | ||
masak | how do you mean? | ||
Woodi | probably one syntax just work there | ||
masak | I still don't understand what you mean. | 15:26 | |
Perl has never been about "one and only one way". | |||
Woodi | maybe here will to with some automatic conversions | ||
masak | and if the latter two ways bother you, just forget I mentioned them :P | ||
Woodi | masak: there was no types in perl so far :) | ||
benabik | Didn't even get into typed undefineds. | ||
masak | fwiw, 'return' is how I would do it in Perl 5, too. | 15:27 | |
not 'return undef'. | |||
mberends | heh, in Gtk a group of tabbed windows is called a notebook, so in Perl 6 you create one with 'sub notebook' :) | ||
colomon | sorear: okay, I've got all the hyperbolic trig functions working too, except the values at Inf and -Inf are wrong for a lot of them. | 15:29 | |
masak | heh -- twitter.com/audreyt/status/117621081526894592 | 15:36 | |
by this I have to assume that au++ is also aware of our loose Haskell study group + Pugs revival plans... | 15:37 | ||
[Coke], mberends: so, is tomorrow fine with you guys? :) | |||
what UTC? | |||
mberends | masak: yes, tomorrow. vaguely from 8:00 to 21:00 UTC, not continuously | 15:39 | |
masak | nod. agreed. | 15:41 | |
let's start just trying to get Pugs to run from source. | 15:42 | ||
mberends | +1 | ||
masak | cloning the repository and making lists of LHF can come later :) | ||
mberends | we'll need commitbits | 15:43 | |
or each hack on an own clone I spose | 15:44 | ||
sorear | haskell studygroup? | 15:45 | |
mberends | sorear: yes, will you join? this will be a beginner group. | 15:47 | |
masak | mberends: either of us forks au's repo on github, and gives the others commitbits. | ||
sorear is not a Haskell beginner ;) | |||
15:47
cognominal left
|
|||
mberends | masak: yes, it was more of a warning ;) | 15:48 | |
masak | he's still free to join the group, of course, and definitely welcome to hack on Pugs with us... | ||
but something tells me he's having enough fun with Niecza. | |||
wow! just imagine, putting Pugs on 6model! | |||
masak boggles | |||
mberends | masak: could we make a perl6/pugs repo, and so give commitbits via hugme instead? | 15:52 | |
masak | fine with me. | 15:53 | |
moritz | should I do that? | ||
masak | let's wait until tomorrow ;) | 15:54 | |
moritz has enough permission to fork into the perl6 organization | |||
masak | it's all contingent on whether we can get Pugs to compile and run. | ||
sorear | masak: pugs on 6model? | 15:55 | |
mberends: I just want to make it known, that I am willing to help | |||
masak | sorear++ # cool! | 15:56 | |
mberends | sorear: that's great :) | ||
masak discovers defunkt.io/hub/ | |||
sorear: it was just a thought. apparently it's easy to let one's ideas get ahead of oneself when planning to wake up Pugs from her beauty sleep ;) | |||
16:13
ggoebel left
|
|||
benabik can provide some assistance with Haskell. | 16:14 | ||
I don't know the pugs code, but I'm reasonably proficient with lambdastuff | |||
TimToady | 'course, by the time you replace the parser and the MOP, you mostly just have the runtime left | ||
16:16
daniel-s left
16:17
whiteknight left,
daniel-s joined
16:18
envi left
16:19
ggoebel joined
16:21
envi joined
|
|||
dalek | ecza/serialize: 0b7a754 | sorear++ | lib/ (2 files): Fix ordering bug in protopads |
16:25 | |
diakopter | niecza: " | ||
p6eval | niecza v9-46-g16ef0c8: OUTPUT«Unhandled exception: System.IndexOutOfRangeException: Array index is out of range. at Lexer.Run (System.String from, Int32 pos) [0x00000] in <filename unknown>:0  at Lexer.RunDispatch (Niecza.Frame fromf, Niecza.P6any cursor) [0x00000] in <filename unkn… | ||
16:29
gbacon joined
|
|||
diakopter | std: :16{A705E} # should parse as a Blob literal | 16:30 | |
p6eval | std c22b2ee: OUTPUT«===SORRY!===Malformed radix number at /tmp/oTG4WKBGmr line 1:------> :16⏏{A705E} # should parse as a Blob literalParse failedFAILED 00:01 117m» | ||
moritz | someone please remind me what a Blob is | 16:33 | |
diakopter | perlcabal.org/syn/S02.html#Blob_literals | ||
I don't know any more than that ;) | |||
pugs: say :16{A705E} | 16:34 | ||
p6eval | pugs: OUTPUT«526375770699927» | ||
diakopter | pugs: say :16{A705E}.WHAT | 16:36 | |
p6eval | pugs: OUTPUT«Int» | ||
moritz | ah, a blob is an immutable buf | ||
flussence | Surprise! github.com/flussence/specgraphs/ra...output.png | ||
(this one is *much* faster to fill in than the nom one :) | 16:39 | ||
TimToady | well, nothing makes progress if you look at it close enough :) | 16:40 | |
TimToady is going to chew up his entire Saturday just backlogging #perl6... | 16:41 | ||
std: my $a = "xxx" ; { say $a ; my $a; } | 16:43 | ||
p6eval | std c22b2ee: OUTPUT«===SORRY!===Lexical symbol '$a' is already bound to an outer symbol (see line 1); the implicit outer binding at line 1 must be rewritten as OUTER::<$a> before you can unambiguously declare a new '$a' in this scope at /tmp/IpnGmWphdn line 1:---… | ||
TimToady | niecza: my $a = "xxx" ; { say $a ; my $a; } | ||
p6eval | niecza v9-46-g16ef0c8: OUTPUT«===SORRY!===Lexical symbol '$a' is already bound to an outer symbol (see line 1); the implicit outer binding at line 1 must be rewritten as $a before you can unambiguously declare a new '$a' in this scope at /tmp/wBJZi682Mg line 1:-… | ||
TimToady | here's a bug . . . . . . . . . . . . . . . . . . . . . . . . . . ^^ | 16:44 | |
sorear: ^^ | |||
niecza: my $a = "xxx" ; {{{{ say $a ; my $a; }}}} | 16:45 | ||
p6eval | niecza v9-46-g16ef0c8: OUTPUT«===SORRY!===Lexical symbol '$a' is already bound to an outer symbol (see line 1); the implicit outer binding at line 1 must be rewritten as $a before you can unambiguously declare a new '$a' in this scope at /tmp/l_Hlvfiary line 1:-… | ||
diakopter | niecza startup time is so much faster on linux than on windows mono; very noticeable on p6eval vs any other machine I've tried; I dunno why | ||
TimToady | std: my $a = "xxx" ; {{{{ say $a ; my $a; }}}} | ||
p6eval | std c22b2ee: OUTPUT«===SORRY!===Lexical symbol '$a' is already bound to an outer symbol (see line 1); the implicit outer binding at line 1 must be rewritten as OUTER::OUTER::OUTER::OUTER::<$a> before you can unambiguously declare a new '$a' in this scope at /tmp/Z… | ||
diakopter | benabik: there are plenty of jvm implementations, re: your point about C/C++ vs java | 16:46 | |
TimToady | std: my $a = "xxx" ; {{{{ say OUTER::<$a> ; my $a; }}}} | 16:47 | |
p6eval | std c22b2ee: OUTPUT«===SORRY!===Variable OUTER::<$a> is not predeclared at /tmp/O7RBAWI_R9 line 1:------> my $a = "xxx" ; {{{{ say OUTER::<$a>⏏ ; my $a; }}}}Potential difficulties: $a is declared but not used at /tmp/O7RBAWI_R9 line 1:------> … | ||
TimToady | niecza: my $a = "xxx" ; {{{{ say OUTER::<$a> ; my $a; }}}} | ||
p6eval | niecza v9-46-g16ef0c8: OUTPUT«Potential difficulties: $a is declared but not used at /tmp/Q94wuMwysW line 1:------> $a = "xxx" ; {{{{ say OUTER::<$a> ; my ⏏$a; }}}}xxx» | ||
TimToady | arguably niecza is correcter, and one OUTER will be sufficient | 16:48 | |
16:48
woosley left
|
|||
TimToady | except for the fact that the error message doesn't mention OUTER | 16:48 | |
16:48
im2ee_ joined
16:49
im2ee left
16:51
packetknife joined
|
|||
sorear | cute bug | 16:51 | |
TimToady | but I don't think you need to reproduce OUTER::OUTER::OUTER::OUTER | ||
since one OUTER says where to start looking | |||
sorear | at one point niecza was generating OUTER chains like that | 16:52 | |
TimToady | well, it does have the advantage of being explicit, in case someone inserts another my $a somewhere in between | 16:53 | |
diakopter | niecza: my $a = "xxx" ; { my $a = "yyy"; {{{ say OUTER::OUTER::<$a> ; }}}} | 16:54 | |
p6eval | niecza v9-46-g16ef0c8: OUTPUT«Potential difficulties: $a is declared but not used at /tmp/Y0C_hskFvT line 1:------> my $a = "xxx" ; { my ⏏$a = "yyy"; {{{ say OUTER::OUTER::<$a> ;yyy» | ||
diakopter | why did it say yyy | ||
TimToady | because | ||
diakopter | when OUTER::<$a> also gives yyy | ||
TimToady | yyy is correct | ||
try more OUTERs | 16:55 | ||
or fewer braces | 16:56 | ||
masak | or just name the variables differently :P | ||
sheesh | |||
diakopter | niecza: my $a = "xxx" ; $a; { my $a = "yyy"; {{{ say OUTER::<$a>; say OUTER::OUTER::<$a>; say OUTER::OUTER::OUTER::<$a>; say OUTER::OUTER::OUTER::OUTER::<$a>; $a }}}} | 16:57 | |
p6eval | niecza v9-46-g16ef0c8: OUTPUT«yyyyyyyyyxxx» | ||
Woodi | if role implements method then it should be available in class doing that role ? | 16:58 | |
16:58
[Coke] left
|
|||
TimToady | Woodi: yes, assuming it doesn't collide with something | 16:59 | |
Woodi | so i do not understand why IO::Socket::INET.read is absent... | 17:00 | |
masak | Woodi: if the program compiles and the class doesn't override, then yes :) | ||
17:00
[Coke] joined
|
|||
benabik | diakopter: Yes, but "Java" means "Oracle Java" to 90% of people. Really changing due to dalvik, I suppose. | 17:01 | |
TimToady | nom: say IO::Socket::INET.^methods | ||
p6eval | nom 09a598: OUTPUT«Could not find symbol 'IO::Socket::&INET' in <anon> at /tmp/FLqCmwIDKH:1 in <anon> at /tmp/FLqCmwIDKH:1» | ||
Woodi | roles are not abstract ? | ||
TimToady | they're immutable, but of varying abstraction | ||
they may suggest an implementation | 17:02 | ||
masak | TODO passed tests 2-3 in t/spec/S19-command-line/dash-e.rakudo | ||
Woodi: roles may definitely implement methods. | |||
even if that implementation is just 'method foo { ... }' | 17:03 | ||
(three dots meant literally) | |||
Woodi | ok | ||
17:04
im2ee_ left
17:05
im2ee joined
|
|||
Woodi | nom shows 'read' on ^methods but explodes with no STORE in ANY() | 17:05 | |
diakopter | benabik: what % of people would you say "C/C++" means each of these three: msvc, gcc, clang | ||
TimToady | well, it looks to me like IO::Socket::INET isn't there at all | ||
moritz | it's disabled in evalbot | ||
for security reasons | 17:06 | ||
TimToady | it's not there locally either | ||
oh wait, it is | |||
just a 'use' doesn't work :) | |||
sorear | diakopter: what's a good jvm that will run comfortably in 384mb | ||
benabik | diakopter: Yes, it's fairly well known that the compiler isn't the definition of the language. But most people would say Oracle Java is the definition of Java. It's far more grey, but they're far more intertwined. | 17:07 | |
moritz | TimToady: how up-to-date is your copy of nom? | ||
17:07
REPLeffect left
|
|||
diakopter | sorear: I dunno | 17:07 | |
TimToady | couple days | ||
diakopter | benabik: that wasn't my point; I was just asking what you imagined the distribution was | ||
moritz | I'm pretty sure it exists :-) | ||
TimToady | it finds the methods, it just fails a 'use IO::Socket::INET' if I do that first | ||
which bamboozled me | 17:08 | ||
moritz | well, it's in core | ||
no need to 'use' it | |||
TimToady | seems like we should allow a 'use' on something that's already there... | ||
moritz | use Int; #? | ||
Woodi | seems use 'use' on core modules is user anti-case :) | 17:09 | |
TimToady | what if we decide to kick Int out of the core someday? :P | ||
17:09
simcop2387 left
|
|||
benabik | diakopter: A majority of people I deal with know that gcc is _a_ C compiler, not _the_ C compiler. From what I'm told, msvc people may be fuzzier on the distinction, but eh. | 17:09 | |
diakopter | heh | 17:10 | |
TimToady | I'd think they'd be clearer on that distinction :) | ||
sorear | heehe | ||
benabik: do you know of any alternate vms that would work for me? | |||
TimToady | VMS?!?! | ||
TimToady goes back into ptsd mode... | |||
17:11
simcop2387 joined
|
|||
diakopter | sorear: I was reading about ildjit | 17:11 | |
17:11
replore_ left
|
|||
benabik | sorear: JVMs? | 17:11 | |
sorear has been thinking about Niecza/JVM a little bit lately | |||
benabik: ye | |||
masak | perl6: =ENDsay "OH HAI" | 17:12 | |
p6eval | pugs, rakudo 09a598: ( no output ) | ||
..niecza v9-46-g16ef0c8: OUTPUT«OH HAI» | |||
17:12
Sarten-X left
|
|||
masak | perl6: say "alive";=ENDsay "OH HAI" | 17:12 | |
p6eval | niecza v9-46-g16ef0c8: OUTPUT«aliveOH HAI» | ||
..pugs, rakudo 09a598: OUTPUT«alive» | |||
masak | sorear: nieczabug. | ||
benabik | sorear: I've tended to just use Sun/Oracle's, honestly. | ||
im2ee | rakudo: multi combs(@, 0) { "" }; multi combs { combs(@^dict, $^n - 1) X~ @dict }; (.say for combs(<a b c>, $_)) for 1..4; | 17:15 | |
p6eval | rakudo 09a598: OUTPUT«abcaaabacbabbbccacbccaaaaabaacabaabbabcacaacbaccbaababbacbbabbbbbcbcabcbbcccaacabcaccbacbbcbcccaccbcccaaaaaaabaaacaabaaabbaabcaacaaacbaaccabaaabababacabbaabbbabbcabcaabcbabccacaaacabacacacbaacbbacbcacca… | ||
im2ee | masak, works here. | ||
masak | b: multi combs(@, 0) { "" }; multi combs { combs(@^dict, $^n - 1) X~ @dict }; (.say for combs(<a b c>, $_)) for 1..4; | 17:16 | |
p6eval | b 1b7dd1: OUTPUT«No applicable candidates found to dispatch to for 'combs'. Available candidates are::(Positional , Int where (0)):(;; Any $n, @dict) in <anon> at line 22:/tmp/cdcc6w5zVv in main program body at line 1:src/metamodel/RoleToInstanceApplier.nqp» | ||
masak | that's the error. | ||
im2ee | b is the latest version? | ||
of rakudo? | |||
masak | latest version of the last development branch. | ||
problem is, the current one hasn't had a release yet. | |||
when you go 'b:' you get the last one, the one you have locally. | 17:17 | ||
when you go 'rakudo:' or 'nom:', you get the new one. | |||
the one that isn't all done yet. :) | |||
but it sure seems to be handling this program better... | |||
moritz | and be was "all done"? :-) | ||
masak | moritz: sssh, I'm doing PR here :P | 17:18 | |
17:18
frhodes joined
|
|||
TimToady | if we ever do kick a core module out someday (and we probably will), it seems to me we'll end up with a class of auto-used names; and if we have that, we should at least think about making them all autousable, rather than avoiding Occam. | 17:18 | |
im2ee | masak, so.. could You help me to write this program to the latest version? | ||
masak | im2ee: I thought that's what I did. | ||
im2ee: it works on nom but not on Rakudo Star. | 17:19 | ||
oh, or you meant the latest release? | |||
ok, sure. | |||
im2ee | Yes, i mean the Rakudo Start :) | ||
17:19
daniel-s left
|
|||
masak | "star", not "start". | 17:19 | |
im2ee | Star, yes - sorry, im bit in hurry :) | 17:20 | |
17:20
REPLeffect joined
|
|||
TimToady | .oO(Warning: had to assume a 'use IO::Socket::INET' before foo line 42) |
17:20 | |
Woodi | btw, TimToady s/core/standard/ modules|distribution :) Linux-way :) | ||
im2ee | masak, do You have a time to do this? :) It's nothing important | ||
masak | b: multi combs(@d, 0) { say "base case" }; multi combs(@d, Int $n) { say "recursive case" }; combs([], 0); combs([], 5) | ||
p6eval | b 1b7dd1: OUTPUT«base caserecursive case» | ||
masak | im2ee: I think I know what's wrong. hold on. | ||
TimToady | .oO(Warning: had to 'cpanm IO::Socket::INET' before foo line 42 :) |
17:21 | |
im2ee | masak, ok. Great :) | ||
masak | b: multi combs(@, 0) { "" }; multi combs(@dict, Int $n) { combs(@dict, $n - 1) X~ @dict }; (.say for combs(<a b c>, $_)) for 1..4; | ||
p6eval | b 1b7dd1: OUTPUT«abcaaabacbabbbccacbccaaaaabaacabaabbabcacaacbaccbaababbacbbabbbbbcbcabcbbcccaacabcaccbacbbcbcccaccbcccaaaaaaabaaacaabaaabbaabcaacaaacbaaccabaaabababacabbaabbbabbcabcaabcbabccacaaacabacacacbaacbbacbcaccaaccb… | ||
masak | im2ee: there you go ;) | ||
nom: multi combs(@, 0) { "" }; multi combs(@dict, Int $n) { combs(@dict, $n - 1) X~ @dict }; (.say for combs(<a b c>, $_)) for 1..4; | |||
p6eval | nom 09a598: OUTPUT«abcaaabacbabbbccacbccaaaaabaacabaabbabcacaacbaccbaababbacbbabbbbbcbcabcbbcccaacabcaccbacbbcbcccaccbcccaaaaaaabaaacaabaaabbaabcaacaaacbaaccabaaabababacabbaabbbabbcabcaabcbabccacaaacabacacacbaacbbacbcaccaac… | ||
diakopter | std: cpanm IO::Socket::INET | ||
p6eval | std c22b2ee: OUTPUT«===SORRY!===Undeclared name: 'IO::Socket::INET' used at line 1Undeclared routine: 'cpanm' used at line 1Check failedFAILED 00:01 118m» | ||
masak | im2ee: works fine on both branches ;) | ||
17:22
daniel-s joined
|
|||
im2ee | You changed only Int $n instead of $n? :) | 17:22 | |
17:22
Sarten-X joined
|
|||
im2ee | Hm, i mean you add () to second multi combs? | 17:23 | |
17:23
masak left
|
|||
arnsholt | joshuablankenship.com/blog/2011/09/...e-purists/ made me think of Perl 6, in a way | 17:23 | |
17:24
masak joined
|
|||
masak | im2ee: yeah. I had a feeling the problem was related to signature type narrowness. | 17:24 | |
im2ee | masak, great. It's nice lesson. :) Thanks. | ||
masak | im2ee: probably the $n parameter is too loose if it's not typed as Int. | 17:25 | |
for some reason, that's not a problem in nom. | |||
pmurias | sorear: hi | 17:27 | |
diakopter: what'ls ildjit? | 17:28 | ||
* what's | |||
TimToady | arnsholt: the question is, which way did it make you think about Perl 6? :) | ||
arnsholt | Mostly the "What's wrong with Perl 5/Why aren't you working on Perl 5 instead?" crowd, I think | 17:29 | |
pmurias | sorear: re niecza/jvm what would the benefits of that be? | 17:30 | |
jlaire | sb goto -50 | 17:31 | |
oops | |||
TimToady just uses pageup/pagedown... | |||
jlaire is on a laptop with a broken keyboard :( | 17:32 | ||
the most painful bug is that up-arrow doesn't work | |||
TimToady | I've always wished that irssi would respond to spacebar or backspace at the first position and do scrolling | ||
jlaire | interesting | 17:33 | |
left/right might be nice for that, too | |||
pmurias | masak: what's the point of reviving pugs? purely fun? | 17:34 | |
TimToady | learning Haskell...again... | ||
17:34
kaare_ left
|
|||
sorear | pmurias: niecza/jvm would be useful for all the people who beleive the anti-clr patent fud :) | 17:40 | |
moritz | what about those who believe the anti-java patent fud? :-) | 17:41 | |
pmurias | they have niecza/clr ;) | 17:43 | |
diakopter | moritz: good point | 17:44 | |
17:44
bbkr1 left
|
|||
pmurias | sorear: is the anti-clr patent fud stopping people from contributing to niecza? | 17:45 | |
diakopter | pmurias: lmgtfy.com/?q=ildjit | ||
17:46
bbkr joined
|
|||
TimToady | with respect to the 40-match puzzle, haven't thought about it analytically, but it seems equivalent to me to a Galton's Quincunx that is diamond shaped rather than triangular | 17:46 | |
or maybe that *is* thinking about it analytically :) | |||
masak: ^^ | 17:47 | ||
17:48
envi left
|
|||
TimToady has a geometric brane, not an algebraic brane... | 17:49 | ||
to the extent that, when I view the Galton's Quincunx in my head, I "know" I'm facing north! | 17:50 | ||
I guess you'd call that a geographic brane | 17:51 | ||
"The spider is crawling up your west arm." | 17:52 | ||
masak | pmurias: the point, I guess, is to have a working Pugs. | 17:53 | |
masak googles "Quincunx" | |||
lucs | What's the "40-match puzzle"? | ||
TimToady | irclog.perlgeek.de/perl6/2011-09-23#i_4469618 | 17:54 | |
masak | ...and subsequent discussion. | ||
TimToady | now you know how far back I am in the backlog... :/ | ||
lucs | TimToady: Thanks. | ||
17:55
uasi left
|
|||
im2ee | How to create TCP server in p6? :) | 17:55 | |
Just open a port. | 17:56 | ||
masak | TimToady: yes. Galton's Quincunx, along with folding up in half, seems to be a way to analyze -- er, geometrize -- the problem, too. | ||
im2ee: have a look at IO::Socket::INET | 17:57 | ||
im2ee | masak, hmm, i'm trying it, and i have some problems. :) | ||
masak, but i have some ideas :) | |||
TimToady | well, I was thinking more of folding down in double | ||
moritz | my $s = IO::Socket::INET.new(:localhost<localhost>, :localport(1234), :listen); | 17:58 | |
my $connection = $s.accept | |||
TimToady | or of a quincunx that has the bottom two angles trimmed off | ||
masak | TimToady: I'm not a native English speaker, all appearances to the contrary nonwithstanding :P | ||
moritz | say $connection.read(20).decode | ||
TimToady | to constrain the distribution to 40 choices left or right | ||
masak | right. | 17:59 | |
17:59
pmurias left
|
|||
TimToady | the constraints being a form of "gambler's ruin" | 17:59 | |
im2ee | moritz, thanks :) | ||
I wrote LocalHost and LocalPort, like in p5. :) | |||
TimToady | in fact, one could pose it exactly as a symmetrical gambler's ruin problem | 18:00 | |
moritz | we CamelCase only class names in p6 | ||
masak .oO( CameliaCase ) | 18:01 | ||
TimToady | $She-Who-Must-Be-Obeyed is a possibility though :) | ||
im2ee | moritz, thanks :) | ||
TimToady | but yeah, we like our hyphens in preference to caps now | 18:03 | |
that leaves the letters free to be caps when it's natural, and not when it's not | 18:04 | ||
Mutiny-on-the-Bounty | |||
18:04
packetknife left
|
|||
diakopter | masak: golf: produce a list of random ascii words of random length < N | 18:04 | |
TimToady | much easier to read than MutinyOnTheBounty | ||
im2ee is afk | 18:05 | ||
moritz | nom: ('a'..'z').roll((1..6).pick) | ||
p6eval | nom 09a598: ( no output ) | ||
lucs | masak: "[...] as one increases N to the millions it becomes 1." There tends to be a single match left in the other box when N is very high? I find that hard to believe. | ||
moritz | nom: say ('a'..'z').roll((1..6).pick) | 18:06 | |
p6eval | nom 09a598: OUTPUT«l j» | ||
moritz | nom: say ('a'..'z').roll((2..7).pick).join for 1..8 | ||
p6eval | nom 09a598: OUTPUT«gelctgvojisgjqgjwtmbidktixxsfxnubud» | ||
diakopter | cool | ||
masak | lucs: N being the number of simulations run, not the number of matches. | ||
lucs | Oh! Not what I'd understood :) | ||
18:07
snikkers joined
|
|||
moritz | nom: say (1..8).map: {('a'..'z').roll((2..7).pick).join} | 18:07 | |
p6eval | nom 09a598: OUTPUT«cgbocu xtoo fmlg zmgcqot ud xvdipo wwz ko» | ||
masak | lucs: I've already apologised about the confusion in the backlog :P | ||
lucs | masak: Sorry, only just skimming :) | ||
TimToady | .oO(lucs makes his sanity roll) |
18:08 | |
TimToady doesn't... | |||
diakopter | mmm rolls | ||
18:08
snikkers left
|
|||
masak | nom: say ~('a'..'z').roll(2..7) for ^8 | 18:09 | |
p6eval | nom 09a598: OUTPUT«Method 'pred' not found for invocant of class 'Range' in sub postfix:<--> at src/gen/CORE.setting:1054 in sub coro at src/gen/CORE.setting:3855 in method reify at src/gen/CORE.setting:3825 in method reify at src/gen/CORE.setting:3629 in method reify at src/g… | ||
diakopter | eh | ||
TimToady | pred?!? | ||
masak | huh? | ||
this proves it. everything I touch exposes a bug. :/ | |||
nom: say ~('a'..'z').roll((2..7).pick) for ^8 | 18:10 | ||
p6eval | nom 09a598: OUTPUT«m k c r c zd f u e r m lc l h h hs k th o h c kh p cs l h f vp f r r b e» | ||
masak | hm. | ||
oh, right. | |||
18:10
pmurias joined
|
|||
moritz | I guess it just copies the argument, and -- it until it's 0 | 18:10 | |
masak | nom: say ('a'..'z').roll((2..7).pick).fmt for ^8 | ||
p6eval | nom 09a598: OUTPUT«d l l pe a f l a k xc z g k s jq i q k p g sm y w b m l af i wv c xz n p» | ||
TimToady | oah | ||
hmm, nice word | |||
moritz | nom: say ('a'..'z').roll((2..7).pick).fmt('') for ^8 | 18:11 | |
p6eval | nom 09a598: OUTPUT«        » | ||
diakopter | heh | ||
moritz | nom: say ('a'..'z').roll((2..7).pick).fmt('%s','') for ^8 | ||
p6eval | nom 09a598: OUTPUT«nmkgrqheyfvvlphoqxilxeqiveydhfivqtfy» | ||
masak | TimToady: any reason not to make .roll(2..7) mean .roll( (2..7).pick )? :) | ||
moritz | .join is still shorter | ||
masak | moritz: thanks. | ||
nom: say ('a'..'z').roll((2..7).pick).join for ^8 | |||
p6eval | nom 09a598: OUTPUT«imgqtfmdcnechxwwzkkdmqxtaiahxizfveazx» | ||
masak | moritz: and somehow more descriptive. | ||
moritz | masak: oh come on, this is about golfing :-) | 18:12 | |
masak | troo | ||
diakopter | .roll(Range) sounds cool | ||
TimToady | masak: but maybe they meant .roll(any 2..7) | ||
masak | TimToady: that's an odd use of junction... :) | ||
junctions* | |||
TimToady | nevertheless, someone might think it | 18:13 | |
I think the huffman value of it is minimal | |||
it's a pretty low-wattage dwim | |||
druther save my dwims for high-wattage locations | 18:14 | ||
diakopter | LOL .rroll for range roll | ||
TimToady | pick-and-roll(2..7) :) | ||
diakopter | I was thinking rick-roll | ||
TimToady | speaking of low-wattage... | 18:15 | |
diakopter | ... or desert you | ||
TimToady goes back to lackbogging | |||
lucs | masak: Did you come up with a reasonable answer to the matches problem? | 18:16 | |
lucs would instead ask "How many matches at most would remain in the other box, 50% (for example) of the time?" | 18:17 | ||
masak | lucs: sorear and moritz solved it to my satisfaction. | ||
lucs | masak: Will I find their solution if I keep reading the backlog? | 18:18 | |
masak | depends if you skim or not :P | ||
lucs | :) | 18:19 | |
I think I misphrased my question. What I'm trying to get at is something like: "In 100% of test runs, there will be at most 40 matches in the other box. In 98.3% (wild guess), there will be at most 39 matches left in the other box. ... . In ?% of test runs, there will be at most X matches left in the other box." | 18:24 | ||
masak | lucs: that's what a distribution describes. | 18:25 | |
lucs | Oh. Isn't it known how to solve that? Can't be that hard, can it? | 18:26 | |
masak | sorear and moritz already did, so it's certainly possible :) | 18:28 | |
Woodi was again catched by backlog :) static.themetapicture.com/media/fun...eck-me.jpg | |||
lucs | masak: Aha. Got it. Thanks. | 18:30 | |
18:37
orafu joined,
soh_cah_toa joined
18:41
buubot_backup left
|
|||
jlaire | it's very basic dynamic programming | 18:42 | |
for relatively small values of 40 :) | |||
masak | :) | 18:44 | |
I've always felt that "dynamic programming" is way too bombastic a term for the actual concept. | |||
jlaire | me too | 18:45 | |
but it's standard | |||
what confuses me even more is that many people find it difficult to understand | 18:46 | ||
and some algorithm texts treat it as an advanced concept | |||
masak | "subproblem caching" would've been fine. | ||
jlaire | that's descriptive | 18:47 | |
masak | "dynamic programming" is like deciding to call closures "extreme code objects". | 18:51 | |
jlaire | .oO( dynamic code object ) |
18:53 | |
masak | or choosing to call constants "public static final"... | 18:55 | |
TimToady | some of us are catty, and some of us are just dogged... | 19:01 | |
diakopter | some are fishy | ||
masak | or sheepish. | 19:02 | |
TimToady is bullish | |||
but occasionally just bullheaded | 19:03 | ||
moritz is CamliaCased | |||
masak | 不是 :) | ||
jlaire | niecza: sub f($n) { my @p; @p[0][$n] = @p[$n][0] = 1; for 0..40 -> $x { for 0..40 -> $y { @p[$x][$y] //= 0; @p[$x+1][$y] += @p[$x][$y]/2 if $y > 0; @p[$x][$y+1] += @p[$x][$y]/2 if $x > 0; } }; @p[40][40] }; my @dist = (0..40).map: { f($_) }; say [+] @dist; say ~@dist | 19:04 | |
p6eval | niecza v9-46-g16ef0c8: OUTPUT«10/1 0.0900535481254757 0.0900535481254757 0.0888840215264435 0.0865449683283792 0.083083169595244 0.0785921874549606 0.0732091609169496 0.0671083975072038 0.0604920766262119 0.0535786964403591 214859239356147155/4611686018427387904 0.0397386751092177 3829… | ||
Woodi | 'Whatever Wildcard (like Any, but subject to do-what-I-mean via MMD)' what is MMD ? and is it 'just DWIM' ? | 19:05 | |
moritz | MMD = Multi Method Dispatch | ||
TimToady | using the term "method" loosely | 19:06 | |
jlaire | niecza: sub f($n) { my @p; @p[0][$n] = @p[$n][0] = 1; for 0..40 -> $x { for 0..40 -> $y { @p[$x][$y] //= 0; @p[$x+1][$y] += @p[$x][$y]/2 if $y > 0; @p[$x][$y+1] += @p[$x][$y]/2 if $x > 0; } }; @p[40][40] }; say f(40) == 1/2**39 | ||
p6eval | niecza v9-46-g16ef0c8: OUTPUT«Bool::True» | ||
moritz | maybe "MD" would have been more appropriate, but Mr. Mark Dominus might have objected :-) | ||
TimToady | or thinking of function calls as method calls on a lexical scope | ||
moritz | oh wait, that'd be MJD | 19:07 | |
gbacon | you can't ... oh, nevermind | ||
TimToady | anyhoo, we aren't picky about that | ||
moritz | jlaire++ | ||
TimToady | gbacon: lemme guess, the next word is "just" | ||
masak | moritz: Multi-Junction Dispatch :P | 19:08 | |
Woodi | but should i use Whatever to undefine field containing possible error text or Any or Mu ? just '' is defined ? | ||
gbacon | TimToady: we are the dreamers of dreams | ||
Woodi | EtoManyChoises | 19:09 | |
moritz | Woodi: probably Any | ||
nom: my $x = enum A <b c d>; say $x.WHAT | |||
TimToady | probably Nil, if you're undefining something | ||
p6eval | nom 09a598: OUTPUT«A()» | ||
moritz | nom: my $x = enum A <b c d>; say $x.HOW | ||
p6eval | nom 09a598: OUTPUT«Method 'gist' not found for invocant of class 'Perl6::Metamodel::EnumHOW' in sub say at src/gen/CORE.setting:4859 in <anon> at /tmp/hKo9p7zF2k:1 in <anon> at /tmp/hKo9p7zF2k:1» | 19:10 | |
TimToady | or just undefine() it | ||
Woodi | ok, i undefine and check :) | ||
TimToady | perl6: my Int $x = Any; | ||
p6eval | niecza v9-46-g16ef0c8: OUTPUT«Potential difficulties: $x is declared but not used at /tmp/SR9l8wFV70 line 1:------> my Int ⏏$x = Any;Unhandled exception: Nominal type check failed for scalar store; got Any, needed Int or subtype at /tmp/SR9l8wFV70 line 0 (MAIN … | ||
..rakudo 09a598: OUTPUT«Type check failed in assignment to '$x'; expected 'Int' but got 'Any' in <anon> at /tmp/XfK0aa5gTm:1 in <anon> at /tmp/XfK0aa5gTm:1» | |||
..pugs: ( no output ) | |||
19:10
buubot_backup joined
|
|||
TimToady | perl6: my Int $x = Nil; | 19:10 | |
p6eval | rakudo 09a598: OUTPUT«Type check failed in assignment to '$x'; expected 'Int' but got 'Nil' in <anon> at /tmp/9KQJ39klXi:1 in <anon> at /tmp/9KQJ39klXi:1» | ||
..niecza v9-46-g16ef0c8: OUTPUT«Potential difficulties: $x is declared but not used at /tmp/sGUCQ43ITM line 1:------> my Int ⏏$x = Nil;» | |||
..pugs: OUTPUT«*** No such subroutine: "&Nil" at /tmp/QLOVkvee3y line 1, column 8-16» | |||
masak | moritz: I'll just submit that EnumHOW.gist thing as a rakudobug | 19:11 | |
moritz | nom: my $x = (enum A <b c d>).enums; say $x.WHAT | ||
p6eval | nom 09a598: OUTPUT«Hash()» | ||
TimToady | well, niecza gets it right | ||
moritz | nom: my $x = (enum A <b c d>).enums; say $x.perl | ||
p6eval | nom 09a598: OUTPUT«{"b" => 0, "c" => 1, "d" => 2}» | ||
Woodi | perl6: return undef; | 19:13 | |
p6eval | pugs: OUTPUT«*** Cannot use this control structure outside a 'routine' structure at /tmp/T2LTUM4cmV line 1, column 1-13» | ||
..rakudo 09a598: OUTPUT«===SORRY!===Unsupported use of undef as a value; in Perl 6 please use something more specific: Mu (the "most undefined" type object), an undefined type object such as Int, Nil as an empty list, !*.defined as a matcher or method, Any:U as a type constraint | |||
..or… | |||
..niecza v9-46-g16ef0c8: OUTPUT«===SORRY!===Unsupported use of undef as a value; in Perl 6 please use something more specific: Mu (the "most undefined" type object), an undefined type object such as Int, Nil as an empty list, :!defined as a matcher, Any:U as | |||
19:13
Sarten-X left
|
|||
p6eval | ..a typ… | 19:13 | |
19:15
mkramer joined,
buubot_backup left
|
|||
moritz | quick poll: should IO::Socket.recv return a Buf or a Str? | 19:16 | |
dalek | kudo/nom: a352f1b | moritz++ | src/core/Buf.pm: Buf.bytes and .chars |
||
kudo/nom: e305cff | moritz++ | src/core/IO/Socket.pm: in IO::Socket.recv, interpret $bufsize as a maximal length, not a minimal one |
|||
moritz | are enums 'our' by default? | 19:17 | |
Woodi | perl6: class A { has $!er = 'Err'; method b{ $!er.undefine } }; my $a = A.new; $a.b(); | ||
p6eval | pugs: ( no output ) | ||
..rakudo 09a598: OUTPUT«Method 'undefine' not found for invocant of class 'Str' in method b at /tmp/CrJyWSTlEl:1 in <anon> at /tmp/CrJyWSTlEl:1 in <anon> at /tmp/CrJyWSTlEl:1» | |||
..niecza v9-46-g16ef0c8: OUTPUT«Unhandled exception: Unable to resolve method undefine in class Str at /tmp/7S1lk4E5Ej line 1 (MAIN A.b @ 4)  at /tmp/7S1lk4E5Ej line 1 (MAIN mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 2066 (CORE C971_ANON @ 2)  at /home/p6eval/niec… | |||
19:18
mkramer1 left
|
|||
TimToady | moritz: yes, as are all constants | 19:18 | |
since constants are just very small types :) | |||
moritz | nom: class A { enum B <a c> }; say A::B; say A::B::c | ||
p6eval | nom 09a598: OUTPUT«B()B::c» | ||
moritz | \o/ | ||
TimToady | and that's one reason for it | ||
Woodi | $v.undef[ine]()should just work... | ||
TimToady | the word "undef" is banned in p6 | 19:19 | |
benabik | Mu | ||
TimToady | std: undef | ||
p6eval | std c22b2ee: OUTPUT«===SORRY!===Unsupported use of undef as a value; in Perl 6 please use something more specific: Mu (the "most undefined" type object), an undefined type object such as Int, Nil as an empty list, :!defined as a matcher, Any:U as a type constrain… | ||
moritz | Woodi: iirc undefine() is only specced as a function, not as a method | 19:20 | |
Woodi | so perl6 is less scripting language intentionally :) | ||
jlaire | T9Yur9puxN4, sErDJOP8PHc | ||
ww. | 19:21 | ||
TimToady | we can't be dwimmy when we don't know what the user means | ||
it's like asking the universe to create a quark without color | 19:22 | ||
Woodi | perl6: class A { has $!er = 'Err'; method b{ undefine($!er); say $!er } }; my $a = A.new; $a.b(); | ||
p6eval | niecza v9-46-g16ef0c8: OUTPUT«===SORRY!===Undeclared routine: 'undefine' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 685 (CORE die @ 2)  at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36)… | ||
..rakudo 09a598: OUTPUT«Any()» | |||
..pugs: OUTPUT«» | |||
Woodi | that work for me | ||
TimToady | P6 is actually more strongly typed than languages that mix up differently typed values as nil | 19:23 | |
undefs are "type charge" carriers in P6, like gluons | |||
Woodi | learning perl6, v5 was handy :) | 19:24 | |
19:24
Sarten-X joined
|
|||
TimToady | we still try to be handy most of the time, and even allow the user to have mushy ideas when we can figure out what they mean | 19:24 | |
but we can't always do that | |||
dalek | kudo/nom: aed9fe7 | moritz++ | t/spectest.data: track test rename |
19:25 | |
TimToady | and at that point we try to give sufficient feedback as to what kind of distinction they need to learn to make | ||
Woodi | TimToady: backward compatybility is important when it is possible... | ||
TimToady | sure, but that's the one thing we were intentionally breaking in P6 from the start | ||
moritz | TimToady: I find it odd that anonymous enums return a hash, while named enums return something where you have to call .enums to get to the hash | 19:28 | |
Woodi | understand that, but about api... some handy conventions can be unchanged (when it is not necesary | ||
moritz | that's slightly at odds with the normal convention that omitting the name just... well, means that the result doesn't have a name anymore | ||
Woodi stops complains :) | 19:29 | ||
TimToady | undef was also a syntactic problem in that it confuses the term/operator expectations, when P6 is trying to keep that as unambiguous as possible. | 19:32 | |
std: Mu $_ | |||
p6eval | std c22b2ee: OUTPUT«===SORRY!===Two terms in a row at /tmp/HlWyXUiJ7O line 1:------> Mu ⏏$_ expecting any of: bracketed infix infix or meta-infix statement modifier loopParse failedFAILED 00:01 120m» | ||
masak | TimToady: why is that a problem for 'undef', though, and not for '*'? | ||
TimToady | p6 knows that Mu is a term in a way that p5 can't know about undef | ||
* is simply a term, and never takes an argument | 19:33 | ||
masak | oh, troo | ||
TimToady | (undef) and (undef $x) are two completely different things in p5 | ||
p5 only gets away with it most of the time because few infix operators start with a sigil, and none of the ones that do make sense with undef on the left | 19:34 | ||
19:35
ZapZ_ joined
|
|||
TimToady | but we want to be more extensible, and that means we can't predict the future contents of the infix namespace, or the sigil namespace for that matter | 19:35 | |
or if we'll even have sigils in some dialects | 19:36 | ||
masak | TimToady: quietfanatic called you a "language designer designer" on Twitter. I'm starting to see how that's very accurate. :) | ||
[Coke] | masak: My sundays are ... I have no idea if I'm free. | 19:37 | |
19:37
gbacon left
|
|||
TimToady | well, that probably makes Paul Graham a language designer designer designer, at least in terms of thinking about a 100-year language | 19:37 | |
[Coke] | I just got back from a slightly unexpected 3 hour volunteering stint at the local elementary school, and am too zoned to *SQUIRREL*! | ||
masak | [Coke]: ok. sounded like mberends might have trouble any other day. but I'll field the question to him Justin Case. | ||
19:38
buubot_backup joined
|
|||
TimToady | the syntactic categories can change however they want, but TTIAR is how we keep infixes and prefixes in different namespaces, and nospace is how we keep infixes and postfixes in different namespaces. So TTIAR and nospace are more fundamental. | 19:40 | |
s/nospace/unspace/ if you prefer | |||
[Coke] | masak: I really really don't have time to learn haskell. ;) | 19:41 | |
TimToady | we probably need a separate name for that concept | ||
you can learn it lazily | |||
19:42
gbacon joined
|
|||
Woodi | i hear monads are obsolote :) | 19:42 | |
masak | [Coke]: so... you want to help with Pugs, but you'd prefer not to have to learn Haskell? :) | ||
Woodi: Monads are outside of time, and incapable of becoming obsolete :P | 19:43 | ||
TimToady | just write an emitter for STD that emits Haskell as you understand it, and then let someone else fix the bugs. :) | ||
dalek | ast: 44efcc5 | moritz++ | S (2 files): rename S02-types/enum.t to S12-enums/misc.t and delete lots of crufty tests |
19:45 | |
ast: 62d5ffd | moritz++ | S12-enums/misc.t: tests for conflicts between enums and subs (RT #63650) |
|||
TimToady wonders if the Arrow of time is necessarily outside of time... | |||
masak | I should hope so! | ||
TimToady | then why don't you? | 19:46 | |
19:46
DarthGandalf left,
buubot_backup left
|
|||
moritz | [Coke]++ # ticket triaging | 19:46 | |
masak | I accidentally dropped the remote control over the Railing of Time... | ||
TimToady | .oO(Remotes fly like an Arrow) |
||
masak | *lol* | 19:48 | |
TimToady | .oO(I shot my Remote in the air, and where it lands, I know not where...) |
19:49 | |
Woodi | anyone else gets Method 'STORE' not found for invocant of class 'Any' all today day ? | ||
moritz | nope | 19:50 | |
TimToady | nom: Any = 42; | ||
p6eval | nom 09a598: OUTPUT«Cannot assign to a non-container in <anon> at /tmp/wP8sQVjuzJ:1 in <anon> at /tmp/wP8sQVjuzJ:1» | ||
TimToady | aww | ||
moritz | nom: my $x := Any; $x = 3 | ||
p6eval | nom 09a598: OUTPUT«Cannot assign to a non-container in <anon> at /tmp/r0nOAQQMd6:1 in <anon> at /tmp/r0nOAQQMd6:1» | ||
moritz | nom: Any.STORE | ||
p6eval | nom 09a598: OUTPUT«Method 'STORE' not found for invocant of class 'Any' in <anon> at /tmp/pNE1fZetI2:1 in <anon> at /tmp/pNE1fZetI2:1» | ||
moritz | :-) | ||
TimToady | \o/ | ||
Woodi | so probably it's my modification responsible :) | ||
TimToady | this wouldn't happen in Haskell :) | 19:51 | |
19:52
DarthGandalf joined
|
|||
moritz | nom: say Mu.^can('gist') | 19:52 | |
p6eval | nom 09a598: OUTPUT«gist» | ||
moritz | nom: say ClassHOW.^can('gist') | ||
p6eval | nom 09a598: OUTPUT«Could not find sub &ClassHOW in <anon> at /tmp/qoP1b_RgWo:1 in <anon> at /tmp/qoP1b_RgWo:1» | 19:53 | |
19:57
daniel-s left
|
|||
masak | wow. so, I've started to translate the pack.t test file from Perl 5 to Perl 6. this current test *opens the perl executable*, reads 8192 bytes, then runs unpack in two different ways and checks the results against each other. | 19:57 | |
I'm... I'm not sure I want to have a spectest that does that. | 19:58 | ||
:) | |||
19:58
daniel-s joined
|
|||
masak decides to hardcode the first 8192 bytes of his perl executable into the test file instead | 19:59 | ||
moritz | nom: say ([+] *.list).([1, 2, 3]) | 20:02 | |
p6eval | nom aed9fe: OUTPUT«No applicable candidates found to dispatch to for 'Numeric'. Available candidates are::(Mu, Mu %_) in method Numeric at src/gen/CORE.setting:602 in sub infix:<+> at src/gen/CORE.setting:1924 in sub <anon> at src/gen/CORE.setting:7356 in <anon> at /tmp/TUbeM6… | ||
moritz | should that work? | ||
TimToady | Truman beat Dewey when I was -7, sigh | ||
er, no, that was when I was -6 | 20:03 | ||
I forget... | |||
moritz: no, whatevers don't do anything in lists | 20:04 | ||
dalek | ecza: 4266b44 | (Paweł Murias)++ | / (4 files): Argumentless method call on perl5 objects. |
20:05 | |
pmurias | sorear: how can i create an STable which inherits from Any? | ||
sorear | pmurias: look at NewWrapper in nieczaCLR.cs | 20:06 | |
moritz | www.perlmonks.org/?node_id=927675 # any neat Perl 6 solutions? | 20:07 | |
sorear | pmurias: chromatic has said in so many words that he ignores niecza because Microsoft. He can't be alone. | ||
TimToady | nom: (class {}).HOW | ||
p6eval | nom aed9fe: ( no output ) | ||
TimToady | nom: (class {}).HOW.say | 20:08 | |
moritz | sorear: I think chromatic ignores niecza because otherwise he'd have to admit that you don't need parrot for running Perl 6 | ||
p6eval | nom aed9fe: OUTPUT«Method 'say' not found for invocant of class 'Perl6::Metamodel::ClassHOW' in <anon> at /tmp/uG7ta6Zl9d:1 in <anon> at /tmp/uG7ta6Zl9d:1» | ||
masak | moritz: that does sound like chromatic. | ||
TimToady | nom: (class {}).HOW.Str | ||
p6eval | nom aed9fe: OUTPUT«No applicable candidates found to dispatch to for 'Str'. Available candidates are: in hash Str at src/stage2/NQPCORE.setting:57 in <anon> at /tmp/95FwJHSrhf:1 in <anon> at /tmp/95FwJHSrhf:1» | ||
TimToady | nom: (class {}).HOW.gist.say | ||
p6eval | nom aed9fe: OUTPUT«Method 'gist' not found for invocant of class 'Perl6::Metamodel::ClassHOW' in <anon> at /tmp/rQEr_D4akr:1 in <anon> at /tmp/rQEr_D4akr:1» | ||
masak | moritz: I haven't been picking up much resistance to the idea that Rakudo is free to explore other VMs from any Parrot developers aside from chromatic. | ||
TimToady | nom: say (class {}).^methods | 20:09 | |
p6eval | nom aed9fe: OUTPUT«eager elems end classify infinite flat hash list pick roll reverse sort values keys kv pairs Array grep first join map min max minmax postcircumfix:<[ ]> at_pos all any one none postcircumfix:<{ }> reduce ACCEPTS WHERE WHICH WHY Bool so defined new CREATE bless BUILDA… | ||
TimToady | nom: say (class {}).^methods(:local) # still want default to not be :all | 20:10 | |
donri | does temp $*CWD make sense? | ||
p6eval | nom aed9fe: OUTPUT«» | ||
diakopter | moritz: I wouldn't say chromatic totally ignores niecza; he mentions it in a blog post and slightly explains why he can't consider using it | ||
flussence | the only realistic reason I can come up with to avoid mono is "the people developing it sound nasty", but by that logic I may as well avoid parrot too. | ||
diakopter | mono folks are the kindest around | 20:11 | |
flussence | I've seen them say pretty nasty things to distro package maintainers; they don't look like the sort of people I'd want to deal with... | ||
masak | moritz: that meditation is a very interesting read. thank you. | 20:12 | |
diakopter | flussence: oh | ||
masak | diakopter: I think moritz meant "ignores" as in "won't use". | ||
for his own projects and so. | |||
pmurias | diakopter: where can i find chromatics blog? | ||
diakopter | modernperlbooks dot something | 20:13 | |
er | |||
sorear | 0 i.~ +./"1 arr -- works :> | ||
diakopter | modernperlbook | ||
flussence | diakopter: this sort of thing specifically - blog.flameeyes.eu/2009/07/04/the-ne...a-debugger | ||
diakopter | pmurias: www.modernperlbooks.com/mt/index.html | ||
pmurias | found it, it seems chromatic generally dislikes mono instead of the patents being the main reason | 20:15 | |
im2ee | Can i add something to new method? Without changing default action? And how if yes :) | 20:16 | |
masak | nom: my @array = [1, 1, 1, 1, 1], [0, 1, 1, 0, 0], [0, 0, 0, 0, 1], [0, 0, 0, 0, 0], [0, 1, 0, 1, 0]; say @array.pairs.first({ all(@(.value)) == 0 }).key | ||
p6eval | nom aed9fe: OUTPUT«3» | ||
masak | moritz: ^ | ||
moritz | masak: that was my first solutioin too :-) | 20:17 | |
I also have | |||
say @array.pairs.first({ 0 == [+] .value.list}).key; | |||
20:17
gbacon left
|
|||
im2ee | masak, what means "{ all(@(.value)) == 0 }" | 20:18 | |
? :) | |||
flussence | (all values of (.value in list context)) == 0 | ||
masak | moritz: well, as long as you know you don't have negative values in the array... | 20:19 | |
im2ee: what flussence said. | |||
moritz | masak: correct | ||
I also have | |||
say @array.pairs.first({ not [||] .value.list}).key; | |||
im2ee | .value == $_.value, right? :) | ||
masak | aye. | ||
TimToady | um, 0 == [+] is wrongish | ||
-1 + 1 == 0 | |||
masak | TimToady: I pointed that out above :P | ||
moritz | you can >>.abs if you allow negative numbers | 20:20 | |
TimToady | oic | ||
moritz | masak: oh, and all(..) == 0 can be simplified to none() | ||
masak | oh! | ||
of course! | |||
moritz | www.perlmonks.org/?node_id=927681 | ||
masak | I even thought that before starting, but subsequently forgot... | ||
sorear | flussence: Having read that blog post, I side with miguel and directhex. They're two of the nicest people I know outside here and I don't think their responsese were out of line at all | ||
masak | moritz++ | 20:21 | |
donri | what is the purpose of "fail", given that it seems to only/mainly do string errors? | ||
TimToady | seems to me that a lazy .[0] doesn't need .first | ||
masak | sometimes I want to write @.pairs.first(...).key as @.first(...) :key | ||
flussence | sorear: probably. It's not like gentoo's devs are saints themselves... | 20:22 | |
20:22
mishin_ joined
|
|||
masak | TimToady: .first(...) is a nice Huffmanization of .grep(...)[0] | 20:22 | |
donri | also fail seems to be fatal for me (old rakudo though) but specs say default is no fatal | ||
20:23
DarthGandalf left
|
|||
TimToady | fail can contain any unthrown exception | 20:24 | |
and it's only supposed to throw it if it isn't checked at some point | |||
or if the user has 'use fatal' in effect | |||
20:25
carlin joined
|
|||
TimToady | but most of the time, as soon as the failure gets into void context, it should throw | 20:25 | |
donri | ah, i see | ||
20:25
DarthGandalf joined
|
|||
moritz | not that the implementation of fail() in the old rakudo was quite bad | 20:25 | |
nom's is still bad, though not quite as bad | |||
donri | also, why is 'die' *not* fatal? :) | 20:26 | |
moritz | it is not? | ||
where? | |||
when? | |||
donri | well it's not exiting | ||
moritz | example? | ||
donri | or is that just the interactive shell? | ||
moritz | could be | ||
there it's a feature :-) | 20:27 | ||
TimToady | it's a game where you get multiple lives | ||
donri | but then, why is "fail" fatal in the shell? | ||
TimToady | nom: say Failure.gist | ||
p6eval | nom aed9fe: OUTPUT«Failure()» | ||
20:28
buubot_backup joined
|
|||
moritz | donri: bug | 20:28 | |
TimToady | nom: say Failure | ||
p6eval | nom aed9fe: OUTPUT«Failure()» | ||
TimToady | nom: print Failure | ||
p6eval | nom aed9fe: OUTPUT«Use of uninitialized value in string context» | ||
donri | is "nom" back, i thought that was "rakudo" now | ||
TimToady | rakudo is the generic name | ||
moritz | 'nom' and 'rakudo' are synonyms, as far as p6eval is concerned | ||
TimToady | nom is the version name | ||
donri | my local install: This is Rakudo Perl 6, version 2011.04 built on parrot 3.3.0 | ||
TimToady | the next major version will be rakudo but not nom | 20:29 | |
donri | le old | ||
masak | perl6: say "lots of different vowels".comb("o").elems | ||
p6eval | pugs: OUTPUT«3» | ||
..rakudo aed9fe: OUTPUT«No applicable candidates found to dispatch to for 'comb'. Available candidates are::(Str, Mu %_):(Str, Regex $pat, Any $limit, Any $match, Mu %_):(Cool, Mu %_):(Cool, Regex $matcher, Any $limit, Mu %_) in method comb at src/gen/CORE.setting:1559 in <anon> … | |||
..niecza v9-47-g4266b44: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Str at /home/p6eval/niecza/lib/CORE.setting line 296 (CORE Cool.comb @ 8)  at /tmp/FO7g6fm77X line 1 (MAIN mainline @ 1)  at /home/p6eval/niecza/lib/CORE.setting line 2066 (COR… | |||
masak | b: say "lots of different vowels".comb("o").elems | ||
p6eval | b 1b7dd1: OUTPUT«No applicable candidates found to dispatch to for 'comb'. Available candidates are::(Mu : Any :limit($limit);; *%_):(Mu : Regex $matcher, Any $limit = { ... }, Any :match($match);; *%_) in main program body at line 22:/tmp/vplMQUpZml» | ||
masak | oh, well. | ||
donri | so what is "b"? :) | ||
TimToady | the one b-fore | 20:30 | |
moritz | the old rakudo | ||
donri | "buggy" | ||
TimToady | beta, but don't say that! | ||
masak | "B-star" | ||
moritz | beijing # codename of last release | ||
TimToady | so this one should also be c: | 20:31 | |
masak | c as in "gamma" :) | ||
TimToady | which would confuse the heck out of DOS programmers... | ||
masak | C:\> | ||
those were the newer DOSes. | |||
the older ones were just A> | 20:32 | ||
moritz wants a new HPMoR chapter, but EY seems to be quite busy otherwise :( | |||
TimToady | spivaking won't rescue ambiguous pronouns :) | ||
masak | moritz: I've been reading a bit of his other stuff. it's generally very high quality. | 20:33 | |
20:33
buubot_backup left
|
|||
masak | TimToady: it wasn't a spivak, it's his initials :P | 20:33 | |
moritz | masak: right, but most of it isn't quite as entertaining as hpmor | ||
masak | moritz: right. | ||
TimToady | you could also use [==] 0, @list | 20:35 | |
and that is supposed to short circuit as well | 20:36 | ||
masak | ooh | ||
what's the colloquial way to compare two Buf variables for equality? | 20:37 | ||
moritz | that one is nice | ||
TimToady | that's after a DOH! moment when I wrote 0 == [==] @list | ||
moritz | masak: infix:<eqv> | ||
masak | thanks. | ||
moritz | (works both in b and in nom) | ||
masak | moritz++ | ||
moritz | nom: say $*IN.read(2) eqv $*IN.read(2) | 20:38 | |
p6eval | nom aed9fe: OUTPUT«Bool::False» | ||
TimToady | [==] also has the benefit of coercing to numeric | ||
moritz | nom: say Buf.new(1, 2) eqv Buf.new(1, 2) | ||
p6eval | nom aed9fe: OUTPUT«Bool::True» | ||
masak | I'm making good headway into the pack.t file, actually. | ||
moritz | TimToady: just how stringy is Buf? | ||
TimToady: should infix:<eq> work on bufs? what aboug gt/ge/lt... | |||
masak | automatic translation of pack.t is out of the question. at least in 2011. | 20:39 | |
TimToady | I think all those can usefully work if defined as integer comparisons, even without assuming ASCII | ||
moritz thought so | |||
masak .oO( oh right, *that's* what prefix:<~> means in Perl 5... oh dear... ) | 20:41 | ||
people, what would you say a decent translation of Perl 5's C< ~0 > would be? | 20:42 | ||
TimToady | -1 | ||
masak | ok :) | 20:43 | |
TimToady | perl6: say +^0 | ||
p6eval | pugs, rakudo aed9fe, niecza v9-47-g4266b44: OUTPUT«-1» | ||
masak | my local Perl 5 says 18446744073709551615 | ||
TimToady | wowee | ||
moritz | Inf? | ||
masak | moritz: minus one :) | 20:44 | |
TimToady | 2 ** 64 - 1 | ||
masak | nodnod | ||
20:44
bazqux joined
|
|||
masak | 2 ** 64 is the number I never memorized, remember? :/ | 20:44 | |
a girl in my class did, and recited it to me, triumphantly. | 20:45 | ||
TimToady | me either, but if it's about that long, and starts with 18, it probably is :) | ||
masak | yeah :) | ||
that's my rule of thumb too. | |||
2 ** 32 is one of my favorite numbers. | 20:46 | ||
perl6: say 2 ** 32 | |||
p6eval | pugs, rakudo aed9fe, niecza v9-47-g4266b44: OUTPUT«4294967296» | ||
TimToady | in anime you can tell all the autistic girls because they have blue-ish hair | ||
masak | TimToady: oh! I thought that was just in Soranowoto | ||
donri | rakudo website is wrong: nom is the default branch of git, so the steps are the opposite - need to git checkout to get non-nom, not to get nom | 20:50 | |
masak | ソ・ラ・ノ・ヲ・ト | ||
TimToady | ヲ, not を? | 20:51 | |
innersting | 20:52 | ||
well, consistent, anyway | |||
tadzik | one-eyed smile, :D, needle, antenna, some futhark character? | ||
20:52
pmurias left
20:53
pmurias joined
|
|||
masak | TimToady: straight from Wikipedia. | 20:53 | |
tadzik: no, no, no, no, and no :) | 20:54 | ||
tadzik | dang | ||
TimToady | it's just ヲ is usually considered somewhat archaic | ||
tadzik | ト likes a piece of futhark | ||
masak | characters have no likes or dislikes. | ||
20:55
buubot_backup joined
|
|||
tadzik | arm, right | 20:56 | |
well, nope | |||
for example, Arya doesn't like sewing | |||
she's a character with a dislike :) | |||
20:57
DarthGandalf left,
worr joined
|
|||
masak | :P | 20:57 | |
I stand corrected. | |||
or at least confused. | |||
tadzik | fair enough | ||
masak | she likes needles, though :) | ||
im2ee | how are You tadzik ? :) | ||
tadzik | some of them, yes | ||
im2ee: pretty fine, thanks :) How are things? | |||
TimToady | ウオ is the usual way to write ヲ these days | 20:58 | |
that's how my last name starts out, in fact | |||
im2ee | tadzik, good enough :) | ||
tadzik | Toady? :) | ||
TimToady | no, that's my first name | 20:59 | |
20:59
mj41 left
|
|||
sorear thinks vowels are funny | 20:59 | ||
TimToady thinks vowels is funny | 21:00 | ||
tadzik never knows which are which | |||
sorear | suprissed it's not ワ... | ||
im2ee | Hm, can i add to default "new" method of class actions some of own action? I want to save "auto-assigning" and add some own functions :) | ||
TimToady | that's wa, not uo | ||
masak | tadzik: vowels are the ones you say vocally. consonants are the ones you sound with. :P | ||
21:01
DarthGandalf joined,
bluescreen10 joined
|
|||
masak | im2ee: sounds like you want a BUILD submethod. | 21:01 | |
TimToady | vowels are the continuants in the middle of a syllable | ||
im2ee | masak, probably :) in BUILD submethod i don't have to writing all assigning stuff? :) | ||
TimToady | so anything that's not a stop or affricate can function as a vowel | ||
my favorite is the one in psst | 21:02 | ||
sorear | there seems to be a lot more consistency between languages in the consonants than in the vowels | ||
masak | im2ee: there's a way to write them in the siggie of the BUILD. | ||
TimToady | and what is the vowel in the second syllable of "didn't"? | 21:03 | |
tadzik | y | 21:04 | |
di-dynt | |||
sorear | I hear a pure consonant. d-i-dn, t | ||
tadzik | how do you say 'dn'? For me it's quite like 'dyn', in my pronounciation of 'dyn' | 21:05 | |
TimToady | I'm referring to the dialect in which your tongue never leaves your alveolar ridge between the middle d and the final t | ||
all we really do in my dialect is open up our nose to let the n out | |||
im2ee | masak, thanks. :) | ||
TimToady | and that's the vowel | ||
benabik | The vowel is ', obviously. | ||
masak | didənt | 21:06 | |
TimToady | well, to be precise, [n] is the vocoid, and /'/ is (perhaps) the vowel :) | ||
masak | the schwa. it's always the schwa. | 21:07 | |
TimToady | only there is no ə in my dialect that is not already nasalized | ||
tadzik | e sounds funny when you stand on your head I suppose | ||
masak | məh. | ||
TimToady | my tongue touches twice, not three times | ||
masak | mine once. | ||
oh wait, twice. | 21:08 | ||
TimToady | you do you pronouce the did then | ||
right | |||
masak | things get complicated once you start thinking about them :P | ||
sorear has to look up what an alveolar ridge is | |||
TimToady | indeed, lots of etic vs emic distinctions here, which is why it's the prototype for all etic/emic distinctions | ||
sorear knew ey didn't inhale eir tounge :) | 21:09 | ||
21:09
buubot_backup left
|
|||
TimToady | well, you do with clicks | 21:09 | |
kinda | |||
I'd say, don't get me starting on phonetics, but it's kinda too late... | 21:10 | ||
masak | hah, just got callbinding errors because of whitespace between function name and parentheses. the perils of translating from p5 to p6... I never make that error when writing Perl 6 from scratch. | ||
japhb | rakudo: given "a" { if /^(a)$/ { say $0 } } | 21:13 | |
p6eval | rakudo aed9fe: OUTPUT«a» | ||
japhb | rakudo: given "a" { when /^(a)$/ { say $0 } } | ||
p6eval | rakudo aed9fe: OUTPUT«Nil» | ||
japhb | ^^ known? | ||
21:14
packetknife joined
|
|||
masak | b: given "a" { when /^(a)$/ { say $0 } } | 21:15 | |
p6eval | b 1b7dd1: OUTPUT«a» | ||
masak | japhb: probably part of the whole regexes not being quite done in nom yet thing. | ||
japhb | masak, nodnod. Strange effect though. I wouldn't expect a difference between those two. | 21:16 | |
masak | indeed. | ||
masak submits rakudobug | |||
japhb | masak, thx | ||
flussence | at last, I have something interesting to show for all those weeks of CPU time... github.com/flussence/specgraphs/ra.../impls.png | 21:17 | |
masak | flussence: wow, cool! flussence++ | 21:18 | |
I swear Niecza *feels* more implemented than just 25% of Rakudo's features... | |||
tadzik | oo, that's cool | 21:19 | |
masak | but maybe there's a bias in there, given that most of the spectest suite has been built for/adaptet to Rakudo. | ||
flussence | just because the lines overlap that way doesn't mean the features do :) | ||
masak | adapted* | ||
flussence | (there's a huge grey area that nom doesn't do yet...) | ||
dalek | ecza: a20956d | (Paweł Murias)++ | / (3 files): Arguments are passed to perl 5 methods. |
21:20 | |
colomon | masak: I think a large-scale effort to get the spectest fudged for Niecza would get it to more like 75% | ||
TimToady | features probably gives a better comparison | 21:21 | |
colomon has 90% of trig working on his local copy of Niecza, just need to figure out how to elegantly integrate it to the basic build. | |||
flussence | also, the niecza numbers on my graphs are slightly more correct since it checks out t/spec at a matching date, whereas I just use make spectest on rakudo which does a git pull | 21:24 | |
(if someone wants to copy-paste the code I'm using for that to make rakudo's makefile DTRT, go ahead) | 21:25 | ||
masak | colomon: that feels reassuring. the 75% figure, I mean. | 21:26 | |
pmurias | colomon: what's the tricky part with the integration? | 21:27 | |
im2ee | b: class abc { has $.lol = 'abc'; submethod BUILD { say $.lol; }}; my $abc = abc.new(); | 21:31 | |
p6eval | b 1b7dd1: OUTPUT«Any()» | ||
im2ee | why? :) | ||
pmurias | sorear: what do the STable entries do? | ||
tadzik | im2ee: rakudobug | 21:32 | |
im2ee: thought it's fixed in nom | |||
im2ee | nom: class abc { has $.lol = 'abc'; submethod BUILD { say $.lol; }}; my $abc = abc.new(); | ||
tadzik | nom: class abc { has $.lol = 'abc'; submethod BUILD { say $.lol; }}; my $abc = abc.new(); | ||
p6eval | nom aed9fe: OUTPUT«Mu()» | 21:33 | |
im2ee | like in: | ||
rakudo: class abc { has $.lol = 'abc'; submethod BUILD { say $.lol; }}; my $abc = abc.new(); | |||
p6eval | rakudo aed9fe: OUTPUT«Mu()» | ||
tadzik | someone will now tell me it's a feature, and I'm going to whine again, and masak will join again, and we'll both be dissatisfied again :/ | ||
nom: class abc { has $.lol = 'abc'; submethod BUILD { callsame; say $.lol; }}; my $abc = abc.new(); | |||
p6eval | nom aed9fe: OUTPUT«Mu()» | ||
tadzik | b: class abc { has $.lol = 'abc'; submethod BUILD { callsame; say $.lol; }}; my $abc = abc.new(); | ||
p6eval | b 1b7dd1: OUTPUT«abc» | ||
tadzik | great, nothing works in nom now | ||
masak | tadzik: no, I actually understood last time. | 21:34 | |
im2ee | callsame? | ||
tadzik | really? | ||
im2ee | tadzik, what is callsame? :) | ||
masak | tadzik: AFAIR, what I was dissatisfied about was just a bug in Rakudo. | ||
tadzik | so what's then new easy-like-in-Moose way? | ||
masak: well, look above | |||
masak | tadzik: not sure I want to :) | ||
I might get upset ;) | 21:35 | ||
tadzik | masak: tl;dr: now it's broken even with callsame :) | ||
masak | ooh! | ||
tadzik | im2ee: call the next method with this name in the MRO chain | ||
flussence | rakudo: class A { multi method foo(Int $a) { } }; A.new.?foo('str'); say 'alive' | ||
p6eval | rakudo aed9fe: OUTPUT«No applicable candidates found to dispatch to for 'foo'. Available candidates are::(A, Int $a, Mu %_) in method foo at src/gen/CORE.setting:250 in method dispatch:<.?> at src/gen/CORE.setting:711 in <anon> at /tmp/dxrWCth0YM:1 in <anon> at /tmp/dxrWCth0YM… | ||
masak | well, that's just reality not living up to Platonic reality. I can live with that :) | ||
tadzik | im2ee: so in this case, we default to the default BUILD | ||
flussence | should that work? | ||
tadzik | flussence: I don't think so | ||
'str' in not an Int | |||
flussence | but I'm using .? to call it... | 21:36 | |
tadzik | oh, I see what you mean I think | ||
and I don't know how exactly .? should work too ;) | |||
im2ee | What is .? for? :) | ||
tadzik | I read it as $a.can('foo') && $a.foo | ||
flussence | rakudo: class A { }; A.new.?foo('str'); say 'alive' | ||
p6eval | rakudo aed9fe: OUTPUT«alive» | ||
tadzik | in which case that'd be right | ||
because A can foo() | |||
masak | what's the colloquial way in Perl 6 to leave a do-once block? | ||
flussence | im2ee: it works the same as in p5 regex | ||
im2ee | flussence, ok, thanks. :) | 21:37 | |
flussence | (?, + and * work) | ||
im2ee | Great. :) | ||
TimToady | <ingy> and how do I get 2 or more? <masak> we have inline actions, so we don't need extra syntax ;P <--- neither of you understands % yet | ||
<stuff> ** 2..* % <comma> | |||
tadzik | masak: my first thought is do { } while 0; and break inside | ||
im2ee | tadzik, what means "int the MRO chain"? :) | ||
tadzik | or however is 'break' in Perl 6 | 21:38 | |
masak | TimToady: oh! of course! | ||
TimToady: it totally subsumes all of ingy's use cases. | |||
donri | "succeed"? | ||
21:38
benabik left
|
|||
masak | TimToady: I understand it, I just don't grok it yet :) | 21:38 | |
tadzik | im2ee: MRO is Method Resolution Order. It's your class, then the parent classes, then their parents and so on, til the beginning of time | ||
masak | tadzik: that would be 'repeat { } while 0'. | ||
tadzik | masak: mebbe, yes | ||
colomon | pmurias: the trig functions are autogenerated. I mostly just need to figure out how to properly add that to the niecza build toolchain. | 21:39 | |
masak | tadzik: 'do' does something differently in Perl 6. | ||
tadzik | there are things that, for some reason, I don't use outside of C | ||
masak | donri: "succeed" is actually a nice suggestion. | ||
21:40
zby_home__ left
|
|||
masak | donri: I could do that from within a 'given' block, which "loops" once :) | 21:40 | |
pmurias | colomon: what is the autogenerator written in? | ||
im2ee | tadzik, so callsame calls "new" method? | ||
colomon | pmurias: p5 | ||
tadzik | im2ee: why "new"? | ||
im2ee: I'll write an example | |||
21:40
SHODAN left
|
|||
pmurias | colomon: is p5 already a niecza dependency? | 21:40 | |
tadzik | nom: class A { method a { say 'first!' } }; class B is A { method a { callsame; say 'second!' } }; B.new.a | 21:41 | |
p6eval | nom aed9fe: OUTPUT«first!second!» | ||
sorear | colomon: I recommend checking the autogenerated code into git; it's unlikely it will need to be run often | ||
pmurias: no | |||
colomon | pmurias: no idea | ||
sorear | (also I made a point of purging the p5 dependency back in Jan-Feb) | ||
im2ee | tadzik, so in my example what is called by callsame? :) | ||
colomon | sorear: ah. just paste it into Builtins.cs? That's how I've got it locally now | ||
sorear | colomon: I'd be more inclined to put it in lib/GeneratedTrigFunctions.cs | 21:42 | |
colomon | sorear: ah! well, then, I need to figure out how to add that file to the build process. :) | ||
tadzik | im2ee: the default BUILD that every class gets | 21:43 | |
sorear | colomon: just add it to cskernel in Makefile | ||
21:44
Exodist left
|
|||
im2ee | tadzik, ok, i had it in mind. :) | 21:44 | |
tadzik, thanks. | |||
tadzik | you're welcome | 21:45 | |
colomon | sorear: is public partial class Builtins { what I need to declare at the top? | ||
sorear | colomon: yes, also using Niecza; using System; | 21:46 | |
colomon | sorear: yes, I figured I'd just copy the usings until it worked. :) | ||
sorear: okay, it's dinnertime here, but I'll try to tackle the conversion before bedtime | |||
jnthn back | 21:50 | ||
masak | std: 'x'x16 | 21:54 | |
p6eval | std c22b2ee: OUTPUT«===SORRY!===Whitespace is required between alphanumeric tokens at /tmp/d3u6mj477c line 1:------> 'x'x⏏16Check failedFAILED 00:01 120m» | ||
masak thought so | |||
21:56
diakopte1 joined,
diakopte1 left
|
|||
diakopter | eh | 21:56 | |
jnthn | tadzik: Why do you want to callsame to BUILD? | 21:57 | |
tadzik | jnthn: that worked in b | 21:58 | |
TimToady | it's "unwarranted chumminess with the implementation" | ||
jnthn | tadzik: That doesn't answer my question at all. | ||
tadzik | jnthn: and I want to have attributes set in in BUILD | ||
TimToady | we need some other way of saying, "apply the defaults now" | ||
jnthn | tadzik: BUILD is for setting attributes | ||
Anything you don't touch in BUILD is set to the default value. | |||
tadzik | jnthn: Okay, then I want the Moose's BUILD feelalike | ||
TimToady | LISTEN TO ME!!!! | 21:59 | |
thank you | |||
I'm tired of this discussion | |||
jnthn also | |||
TimToady | we need a verb | ||
do-it-now() | |||
whatever | |||
BUILD is highly magical, and can be magicaller | 22:00 | ||
jnthn | Or people could just write submethod BUILD($!x = oh-look-my-default()) { } | ||
TimToady | whatever operation is assumed at the end of BUILD, we should be able to call sooner explicitly | ||
pmurias | what would be a good niecza p5 interop example? (i need something to determine the features i need to implent first) | ||
japhb | TimToady, I have an unrelated question re: your intent with a spec item, when you have a chance. | ||
TimToady | but the point of BUILD is to build the object, not to be a hook after it gets prebuilt | 22:01 | |
I don't care how Moose misuses the term | |||
im2ee | jnthn, i wanted to make connection via IO:Socket using .new method. | ||
TimToady | japhb: go ahead | ||
masak | TimToady: +1 | ||
im2ee | (...) using .new method in my class | 22:02 | |
tadzik | okay, I forget about Moose and BUILD then. What is the best way to have something done just after the object is good to go? | ||
jnthn | Well, back in b we had the default BUILD be the thing that applied defaults. This was terribly broken. Now BUILDALL does all those things. There's no default BUILD in nom; we only call the user-defined ones. And defaults, applying things from the init hash, etc are all done in BUILDALL - after BUILD. | ||
TimToady | use my verb | ||
pmurias | TimToady: +1 | 22:03 | |
TimToady | init-now() call-it-good() set-defaults() # I don't care | ||
write a BUILD, call the verb, and do your own stuff | |||
but it had better not depend on anything any subclass does | |||
japhb | TimToady, the spec says that command-line arguments will be passed through the val() function to attempt to convert them to non-Str classes as appropriate (integers to Int, etc.) before passing to Main. But it's not clear to me how *hard* val() tries to do this. In other words, does it try to convert strings that look like integers in radix notation? Does it change 'NaN' into a real NaN? etc. | ||
jnthn | TimToady: I can implement stuff like that. | 22:04 | |
japhb | *MAIN | ||
pmurias | TimToady: so every BUILD will have to contain the special verb? | ||
tadzik | I once implemented a method AFTERPARTY which was called just after the object was fully initialized | ||
TimToady | every BUILD does already imply it | 22:05 | |
just at the end | |||
tadzik | pmurias: I read that as "it's not BUILD we're looking for" | ||
jnthn | TimToady: Are we expect to not re-do it if it was already done? | ||
tadzik | but seems like I read it wrong | ||
jnthn | TimToady: Tracking that could be annoying. | ||
Though possible. | |||
TimToady | jnthn: yes, well, it touchs the attributes, so should just work :) | ||
sorear | TimToady: in my opinion, a method that is called after setting attributes is far more useful in most cases than what BUILD is currently specced to do | ||
TimToady: what should I call it when I implement it? | 22:06 | ||
pmurias | can the BUILD choose not to set attributes? | ||
jnthn | pmurias: Under current spec, any attribute that BUILD doesn't touch gets its defaults applied, or takes a value from those passed to bless. | ||
diakopter | done() | 22:07 | |
tadzik | sorear++ | ||
TimToady | sorear: well, I think a special verb would be more optimizable than an extra dispatch | ||
sorear is frustrated by the resistance the Perl 6 community has to back-stealing good ideas from Moose | |||
masak | sorear: operative word "good" :) | 22:08 | |
jnthn: it should be possible to tell from an attribute whether it's been initialized. | |||
TimToady | I only saw a valid use case for before and after this last summer for the first time | ||
tadzik | hell, people already workaround a lack of that | ||
even in Rakudo's settings | |||
masak | jnthn: no tracking necessary. | ||
TimToady: ooc, what was that use case? | |||
sorear | before and after: like callsame/nextsame, but better Huffmanization | 22:09 | |
jnthn | masak: Well, it's more about avoding the work of re-checking. | ||
TimToady | knowing whether a subclass hid something on accident or on purpose | ||
jnthn | masak: But come of think of it, that's quite cheap these days anyway. | ||
masak | TimToady: ah. yes, makes sense. | 22:10 | |
TimToady | japhb: yes, yes, and yes | ||
masak | japhb: think of val() as a side-effect-free eval() | 22:11 | |
22:11
buubot_backup joined
|
|||
diakopter | eval use Moose | 22:12 | |
buubot_backup | diakopter: ERROR: Can't locate Moose.pm in @INC (@INC contains:) at (eval 20) line 2. BEGIN failed--compilation aborted at (eval 20) line 2. | ||
japhb | TimToady, wow, really? That's simultaneously cool and makes me worry that people will try to write file system utilities and find out that their filenames have become Num's. I guess as long as they perfectly roundtrip as strings, that's OK ... but radix-notated integers wouldn't roundtrip, neh? | ||
TimToady | they will if you use them as strings, that's why val() is trying hard to represent allomorphic literals | 22:13 | |
sorear | japhb: values returned from &val are annotated with their original string form | ||
in a 0 but True kind of way | |||
japhb | sorear, ah, interesting. | 22:14 | |
... I had a long question, but then I think I may have figured it out, lemme see: | 22:16 | ||
So val() returns things that isa Num or Rat or what have you, but mix in roles that override stringification | 22:17 | ||
sorear | That is the idea, IIUC. | ||
japhb | interesting. | ||
Is there already a decided name for that stringification-override role? | 22:18 | ||
sorear figures it would be anonymous | 22:19 | ||
jnthn | Could just be an anonymous one | ||
masak | rakudo: my $val = 42 but role { method gist { "apfelstrudel" } }; say $val | ||
p6eval | rakudo aed9fe: OUTPUT«apfelstrudel» | ||
masak | \o/ | ||
japhb | oooh | ||
masak | rakudo: my $val = 42 but role { method gist { "apfelstrudel" } }; say +$val | ||
p6eval | rakudo aed9fe: OUTPUT«apfelstrudel» | ||
japhb | OK, which methods do I need to override? | ||
masak | eh. | ||
japhb | darn | ||
tadzik | rakudo: my $val = 42 but role { method gist { "apfelstrudel" } }; print $val | ||
p6eval | rakudo aed9fe: OUTPUT«42» | ||
jnthn | masak: hehe | ||
tadzik | hah | ||
jnthn | masak: Numeric.Numeric returns self. | ||
22:19
buubot_backup left
|
|||
jnthn | masak: It then .gists :) | 22:20 | |
Not so sure what we can do about that. It's not wrong, it is however a bit confusing. | 22:21 | ||
TimToady | rakudo: my $val = 42 but role { method Str { "apfelstrudel" } }; print $val | ||
p6eval | rakudo aed9fe: OUTPUT«apfelstrudel» | ||
TimToady | rakudo: my $val = 42 but role { method Str { "apfelstrudel" } }; print +$val | ||
donri | rakudo: my $val = 42 but "fourty two"; say $val | ||
p6eval | rakudo aed9fe: OUTPUT«apfelstrudel» | ||
rakudo aed9fe: OUTPUT«No applicable candidates found to dispatch to for 'infix:<but>'. Available candidates are::(Mu $obj, Positional @roles):(Mu $obj, Mu $role) in sub infix:<but> at src/gen/CORE.setting:7153 in <anon> at /tmp/ZC7lGe13C9:1 in <anon> at /tmp/ZC7lGe13C9:1»… | |||
TimToady | rakudo: my $val = 42 but role { method Str { "apfelstrudel" } }; print 0+$val | 22:22 | |
p6eval | rakudo aed9fe: OUTPUT«42» | ||
japhb | Ewww. Having +$val and 0+$val be different is surprising. | ||
donri | why doesn't mine work | ||
TimToady | I thought recent spec did it by subclassing a Num on top of a Str, but I could be hallucinating | 22:23 | |
jnthn | donri: Because it relies on a curious bit of S14 that didn't make it back into nom (yet). | ||
donri | oh :) | ||
b: my $val = 42 but "fourty two"; say $val | |||
p6eval | b 1b7dd1: OUTPUT«42» | ||
jnthn | TimToady: I can't understand "subclassing a num on top of a Str" | ||
s/can't/don't | |||
donri | b: my $val = 42 but "fourty two"; say ~$val | ||
p6eval | b 1b7dd1: OUTPUT«42» | ||
jnthn | ...I'm sure I'm capable of understanding it ;) | 22:24 | |
sorear | japhb: gist and Str are probably the minimal set | ||
jnthn | donri: I fear that even *if* I implement the same thing in nom as master has, it'll only give you a .Str in the role, and say looks at .gist, so it may still not work out. | ||
sorear | japhb: 0+$val eqv $val has never been true, suppose $val = [1,2] | 22:25 | |
japhb: I'd find $val+1-1 !eqv $val+0 to be a more worrisome state of affai | |||
wait I misundersood you nvm | |||
japhb | I didn't say '$val' and '0+$val'. That first one was '+$val'. That's different. | 22:26 | |
right | |||
japhb slow and distracted | |||
TimToady | jnthn: I'm just groping for a way to make Str consider itself to be epsilon looser than Num in a multi dispatch | ||
jnthn | TimToady: Hmm. | 22:27 | |
TimToady | so it'll pick the numeric methods over the string methods | ||
jnthn | TimToady: I don't have any ideas right off...I'll ponder it some. | ||
TimToady | but for anything that doesn't want numberic params, hits the Str type | ||
this might also work out well for allomorphic scalars coming in from Perl 5 | 22:29 | ||
22:32
buubot_backup joined
|
|||
TimToady | I mean, we could fake it by declaring all our Str params as Cool right now, but that's overkill, I think | 22:32 | |
jnthn | Yeah, it feels like there should be a better way | 22:34 | |
Does this work in the slightest if we flip it around somehow, and have it be a Str with something else mixed in? | |||
"42" but role :: does Numeric { method Numeric() { 42 } } | |||
TimToady | doesn't necessarily help with dispatching to an Int param | 22:35 | |
jnthn | oh wait, that may go terribly wrong... | ||
Yeah. | |||
duh. :) | |||
There's always multiple inheritance :P | 22:36 | ||
You encode the epsilon narrowness in the mro :) | |||
But...I really don't like MI solutions. | |||
Plus you can't add extra parents by mixing in. | |||
Well, you could if you wrote a repr that allowed it I guess. | 22:37 | ||
22:37
bazqux left
|
|||
jnthn | oh, there maybe is a way | 22:37 | |
TimToady | there's a sense in which Cool *means* Stringy | 22:38 | |
in the TCL everything is a string sense | 22:39 | ||
and the numeric types just optimize away the string representation when it's redundant | |||
im2ee | Good night! :) | 22:40 | |
TimToady | o/ | ||
22:40
im2ee left
|
|||
sorear ponders modifying the multiple dispatch system by the addition of cross-coercions between types | 22:42 | ||
jnthn dies a bit inside every time he sees "modifying the multiple dispatch system" :/ | 22:44 | ||
Though I wonder if something could just naturally fall out of coercion types here...somehow... | |||
TimToady | I always thought they'd just install two different entries into the list | 22:45 | |
one with the exact types, and one with the looser types | |||
jnthn | Would there be an ordering of any kind? | ||
TimToady | just according the ordering that already exists | ||
jnthn | OK | 22:46 | |
TimToady | so you could think of multi foo (Int(Cool) $x) as either Int or Cool | ||
sorear | what do coercion types look like? | ||
ah | |||
TimToady | and Int() defaults to something | 22:47 | |
jnthn | TimToady: To say we introduced coercion types because the "as" was in the wrong place, I still have fun remembering which way around these go. | ||
TimToady | maybe Cool, maybe Any | ||
jnthn | :) | ||
TimToady | same as the coercion, Int($cool) ends up with an Int | ||
jnthn | oh! | 22:48 | |
Good way to remember it. | |||
TimToady | but I'm not sure this is related to allomorphic preferences, since those aren't necessarily about coercion at all | 22:49 | |
jnthn | Ah. Dang. | ||
TimToady | except insofar as if you use a number as a string, it has to figure something out | ||
so maybe the Str params should be Str(), and that loosens them a bit | 22:50 | ||
but not under my two-different-entries approach, alas | |||
22:51
geekosaur left
|
|||
TimToady | the other way to view Foo(Bar) types is that Foo is the only type visible inside the routine, and Bar is the only type that is visible to MMD | 22:51 | |
sorear | masak: how much would we lose by allowing multi foo(Str $x) to accept a Num value? | 22:52 | |
TimToady | basically, making Str a synonym for Cool | 22:53 | |
when used in a sig | |||
seems like a hack | |||
jnthn | iiuc, it'd have to be Str() though? | ||
TimToady | well, Str() would make it official | ||
jnthn | Well, that's better than a hack. :) | 22:54 | |
Trouble is that if the default thing in the parens is any then | |||
multi x(Str() $x) { | |||
} | |||
multi x(Cool $x) { } | 22:55 | ||
The second is narrower. | |||
*Any | |||
TimToady | so I'm thinking Str defaults to Cool or narrower | 22:56 | |
Str() rather | |||
or maybe there's just some happy way to mark our coercions so they work this all out among themselves :) | |||
but I think I like the explicit coercion-allowed-here sytnax | 22:57 | ||
*nt | |||
masak | sorear: it sounds rather like Moose's type system. | ||
TimToady | otherwise you get stuck in the C++ trap of having all your semantics defined somewhere else... | ||
well, Moose has been having to deal with allomorphism for a long time now :) | 22:58 | ||
and if they've made strings a little looser than numeric types, I think that's the right direction | 22:59 | ||
for when we're stuck in such a situation | |||
which I'd only been envisioning for <1 2.3 foo> and MAIN situations, as well as input, but we can get allomorphic objects from other language, not the least of which is Perl 5 | 23:00 | ||
jnthn | It's almost like they're a conjunction type | ||
Well, or disjunction depending on how you see it. | |||
TimToady | well, it's one thing pretending to be different things according to context | 23:01 | |
jnthn | True :) | ||
TimToady | a rather tagmemic thing, actually | ||
Dogging a dog during the dog days of summer. | 23:02 | ||
or maybe we just have a way for Str to say "I defer to Numeric when tied" | 23:03 | ||
then siblings don't have to be forced into unnatural relationships | 23:04 | ||
er... | |||
23:04
geekosaur joined
|
|||
sorear | I propose to put that declaration in Numeric and spell it method coerce:<Str>() { self.Str } | 23:04 | |
Treat any coerce: method as defining a virtual superclass | |||
23:05
mishin_ left
|
|||
TimToady | which gets back into the problems we had at the beginning with derivation, it seems like | 23:06 | |
and it just feels more like a me-first solution than a you-first solution | 23:07 | ||
23:08
newsbad_com joined
|
|||
TimToady | not claiming to have thought it through, of course... | 23:09 | |
in fact, I'm gonna nap on it & | |||
masak | 'night, #perl6 | 23:15 | |
23:16
masak left
23:17
Woodi left
23:18
Exodist joined,
[Coke] left
23:20
[Coke] joined
23:24
pmurias left
|
|||
jnthn | sleep & | 23:26 | |
23:31
worr left
23:40
newsbad_com left
|
|||
japhb | nom: 42 but role {} | 23:41 | |
p6eval | nom aed9fe: ( no output ) | ||
japhb | nom: 1/2 but role {} | ||
p6eval | nom aed9fe: OUTPUT«Not enough positional parameters passed; got 1 but expected 3 in method BUILD at src/gen/CORE.setting:5304 in method BUILD_LEAST_DERIVED at src/gen/CORE.setting:573 in sub infix:<but> at src/gen/CORE.setting:7155 in <anon> at /tmp/MBijIIXbzu:1 in <anon> at /… | ||
japhb | ^^ Wheee, another bug | ||
23:42
newsbad_com joined
23:45
wolfman2000 left
|
|||
diakopter | nom: 1/(2 but role {}) | 23:53 | |
p6eval | nom aed9fe: ( no output ) | ||
23:54
benabik joined
|
|||
dalek | ecza/serialize: f1cb241 | sorear++ | / (4 files): Implement sub definitions |
23:54 | |
sorear | o/ benabik | ||
benabik | o/ sorear | ||
japhb | diakopter, I had golfed that down from something that had a variable on the left of 'but' and a real role on the right; the same error pattern occurs, based on the type of the left argument. | ||
colomon | sorear: back and ready to hack. | 23:58 | |
sorear | o/ | ||
benabik | sorear: Anything interesting happening? :-) | ||
sorear | v10 release on Monday | 23:59 | |
and we just got out of a slightly heated discussion of MAIN coercisons |