»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, std:, or /msg camelia p6: ... | irclog: irc.perl6.org | UTF-8 is our friend! | feather will shut down permanently on 2015-03-31 Set by jnthn on 28 February 2015. |
|||
00:06
larion left
00:12
virtualsue left
|
|||
J-L | I'm gonna log off now. Thanks for all your help! | 00:18 | |
timotimo | you're welcome :) | ||
00:18
J-L left
00:24
laouji joined
00:39
laouji left
00:40
laouji joined
00:43
tinyblak joined
00:44
laouji left
00:46
cognominal left,
coffee` joined
00:47
dayangkun joined
00:48
laouji joined
|
|||
ugexe | is it possible for test reports to replace /home/user with ~,%home%, or something? or is that information important to have? | 00:53 | |
00:54
mrf left
|
|||
TimToady | m: my grammar G { regex foo { } } | 00:56 | |
camelia | rakudo-moar 2f7d46: OUTPUT«5===SORRY!5===Null regex not allowedat /tmp/VT0JrJKePO:1------> 3my grammar G { regex foo {7⏏5 } }Unrecognized regex metacharacter (must be quoted to match literally)at /tmp/VT0JrJKePO:1------> 3my grammar G { regex foo {7…» | ||
TimToady | somewhere there's a try that's collecting the first typed_panic and inadvertently making it continue parsing | 00:57 | |
00:58
adu left
01:04
laouji left
01:07
laouji joined
01:08
Ben_Goldberg left,
Ben_Goldberg joined
|
|||
dalek | kudo/nom: 1d21058 | TimToady++ | src/Perl6/World.nqp: only move the eject, not the actual cursor, duh |
01:12 | |
kudo/nom: c8b81a3 | TimToady++ | src/Perl6/ (3 files): [minor] fix tab damage |
|||
TimToady | that fixes the exceptions test | 01:13 | |
01:15
adu joined
01:54
dayangkun left
02:01
DrForr_ left
02:03
diana_olhovik_ left
02:15
coffee` left
02:16
Vlavv left
02:29
Vlavv joined
03:14
laouji_ joined
03:18
laouji_ left
03:20
simcop2387 left
03:29
noganex joined
03:32
noganex_ left
03:49
laouji left
03:50
laouji joined
03:54
laouji left
04:02
FROGGS__ joined
04:05
FROGGS_ left
04:16
anaeem1 joined
04:43
laouji joined
04:53
Ben_Goldberg left
05:27
diana_olhovik_ joined
05:52
KCL_ joined
|
|||
dalek | pan style="color: #395be5">perl6-examples: cefd99f | paultcochrane++ | categories/shootout/k-nucleotide.p6.pl: [shootout] convert hard tabs into spaces |
06:02 | |
perl6-examples: 06a92fc | paultcochrane++ | categories/shootout/k-nucleotide.p6.pl: | |||
perl6-examples: [shootout] add initial docs about k-nucleotide example | |||
06:02
dalek left,
dalek joined,
ChanServ sets mode: +v dalek
|
|||
dalek | ecs: 512a0b7 | TimToady++ | S02-bits.pod: typo |
06:07 | |
06:14
diana_olhovik_ left,
adu left
06:15
atweiden joined
06:28
dalek left,
dalek joined,
ChanServ sets mode: +v dalek
06:51
laouji_ joined
06:54
anaeem1 left
06:56
laouji_ left
|
|||
[Tux] | Inline::Perl5 still incredibly slow compared to two days ago | 07:07 | |
07:11
gfldex joined
07:12
telex left
07:13
tinyblak_ joined,
diana_olhovik joined
07:14
telex joined,
Rounin joined
07:16
tinyblak left
07:20
anaeem1_ joined
07:27
gfldex left
07:30
wicope joined
07:43
atweiden left
07:44
MadcapJake left
07:46
zby_home joined,
zby_home left
07:57
raiph left
07:58
[particle]1 joined,
Ven joined
08:00
Foxcool joined,
[particle] left
08:02
Ven left
08:03
prime left
08:05
prime joined,
oetiker_ joined
08:06
oetiker_ left,
oetiker left,
oetiker joined
08:08
salva left
08:11
[Sno] left
08:12
Ven joined
|
|||
Ven | o/,#perl6 | 08:12 | |
08:12
darutoko joined
08:15
eli-se joined
|
|||
eli-se | hi | 08:15 | |
moritz | \o | 08:16 | |
nwc10 | good *, * | 08:26 | |
moritz | * *, nwc10 | 08:27 | |
=== SORRY ===\nTwo stars in a row | |||
nwc10 | is that why there is a compiler release between each star release? :-) | 08:28 | |
moritz | aye :-) | ||
08:33
salva joined
08:40
eli-se left
|
|||
masak | good morning, #perl6 | 08:42 | |
Ven | \o, masak | 08:43 | |
masak | m: * * * # three stars in a row! | ||
camelia | ( no output ) | ||
08:45
zakharyas joined
|
|||
nwc10 | $ perl -le 'print ******' | 08:45 | |
1 | |||
even I'm not sure how many of the things that cause that behaviour would be considered to be special cases. | 08:46 | ||
Ven | at first this was p6 and I was wondering "what". but it's perl5 and I'm even more puzzled.. | 08:47 | |
nwc10 | it's treated as ** ** ** | ||
first and last ** pairs are typeglobs | 08:48 | ||
m: 0 ** 0 | |||
camelia | ( no output ) | ||
nwc10 | m: say 0 ** 0 | ||
camelia | rakudo-moar c8b81a: OUTPUT«1» | ||
nwc10 | and undefined typeglobs end up being treated as the number 0 | ||
$ perl -wle 'print ******' | |||
Argument "*main::*" isn't numeric in exponentiation (**) at -e line 1. | |||
1 | |||
and 0 ** 0 is 1, obviously. :-) | |||
08:50
zakharyas1 joined
08:52
kjs_ joined
|
|||
masak .oO( did you mean "0 ** 0 is 1, not-so-obviously"? ) :P | 08:53 | ||
08:53
zakharyas1 left
08:54
mohij joined
|
|||
nwc10 | I *thought* that it was special-cased in the C code, but it doesn't seem to be. | 08:54 | |
masak | well, it *is* the agreed-upon default in mathematics. | ||
at least in the cases where people don't say "it doesn't have a limit in that point" | |||
nwc10 | aye, I have learned this | ||
08:54
zakharyas1 joined
|
|||
nwc10 | (the first bit, not the second bit) | 08:54 | |
but it can mean that you need to special case your implementation to get it to behave | 08:55 | ||
much like 2**31 wasn't the *right* integer on Irix, without some cheating | |||
masak | nwc10: think of how x ** 0 and 0 ** x behave as x tends to 0. the first tends to 1, the second tends to 0. | 08:56 | |
nwc10 | maths is hard - can we write Perl 6 instead please? :-) | ||
masak | nwc10: OTOH, if you look at things like the binomial theorem, it makes sense to special-case 0 ** 0 as 1. | 08:57 | |
nwc10 | yes, I'd sort of realised that "it makes sense, oh wait, 0 * 0 * 0 is 0, 0 * 0 is 0, etc" | ||
I didn't know about the binomail theorum | |||
nor do I know *why/how* the factorial function can be well defined for all numbers other than negative integers. But IIRC I've read that it can, and failed to understand the details. | 08:58 | ||
09:02
smls joined
|
|||
smls | FROGGS++ # NativeCall documentation | 09:02 | |
yoleaux | 4 Mar 2015 17:27Z <moritz> smls: ideally on both, and ideally automatically inserted in one place | ||
09:03
kaare_ left,
kaare_ joined
|
|||
smls | FROGGS__: though half-way down the page, it suddenly starts refering to "Zavolaj" without introducing the name to users first | 09:04 | |
masak | nwc10: mostly you have to realize that the unit of multiplication is 1. so if you multiply an empty list of stuff, you get 1. | ||
smls | Should we edit out all mentions of "Zavolaj" and consistently call it "NativeCall | ||
? | |||
09:05
[Sno] joined
09:11
donaldh joined
|
|||
moritz | aye | 09:12 | |
09:16
mohij left
|
|||
dalek | c: 400e3b2 | smls++ | lib/Language/nativecall.pod: say "NativeCall" instead of "Zavolaj"; use slightly prettier ".new;" instead of ".new();" |
09:18 | |
09:19
zakharyas1 left
09:20
espadrine left
09:23
kjs_ left
09:31
rindolf joined
|
|||
jnthn | morning o/ | 09:36 | |
timotimo | heyo jnthn :) | ||
nwc10 | morning jnthn | ||
nwc10 is feeling more pleased by the state of portability. | 09:37 | ||
jnthn | :) | 09:38 | |
timotimo | i'm pretty impressed we're getting this amount of portability | ||
nwc10 | we need it | ||
timotimo | sure | ||
the hardest thing to port to is still windows, isn't it? :P | 09:39 | ||
nwc10 | well, we're blocking on at least libuv for VMS. | ||
timotimo | is VMS still alive? i think i've only ever heard VMS used as a joke | 09:40 | |
but i may have confused it with something else | |||
nwc10 | yes, VMS is still alive. | ||
timotimo | i should investigate that for a tiny bit | ||
nwc10 | sadly the VMS machines I have (or had, not checked recently) only had Java 6 | ||
09:40
virtualsue joined
|
|||
nwc10 | MVS is also alive. And frustratingly still EBCDIC | 09:40 | |
timotimo | en.wikipedia.org/wiki/OpenVMS - is this a good place to start looking at this? | 09:41 | |
nwc10 | probably | ||
I don't think that "VMS" is anything like a priority | |||
things like AIX and HP/UX, which libuv (almost) supports probably should be. If anyone wants to do them | |||
although "run on the JVM" is an option too | 09:42 | ||
timotimo | fair enough i guess? | ||
masak | nwc10: it seems that the Gamma function "extends factorial in a natural way" from positive integers to complex numbers, and that's its claim to fame. the rest is details. :) | 09:43 | |
09:44
laouji_ joined
|
|||
timotimo | once we have more of the recent moarvm optimizations ported to the jvm, i expect the jvm's jit will be able to do crazy things | 09:44 | |
09:45
fhelmberger joined,
brrt joined
|
|||
brrt | \o | 09:45 | |
timotimo | ohai brrt! | ||
nwc10 | o/ | ||
brrt | ohai timotimo | ||
nwc10, has your patch been applied yet? | 09:46 | ||
the ppc32 patch | |||
and ohai nwc10 :-) | |||
nwc10 | I believe so but I think that any local checkout you have can be used to verify this. | ||
09:46
laouji left
|
|||
nwc10 | mine might be confused because they already have it | 09:46 | |
arnsholt | masak: And it's quite useful in stats/probability | 09:48 | |
Distributions generalised from discrete to continuous tend to need something along those lines | |||
masak | arnsholt: oh, interesting. | 09:49 | |
09:53
tinyblak_ left
09:58
FROGGS__ is now known as FROGGS
|
|||
FROGGS | morning | 09:58 | |
smls++ # seems I have missed some "zavolaj"'s :o) | 09:59 | ||
brrt | yes, it can has been applied | 10:02 | |
nwc10 | ah OK good. thanks :-) | 10:03 | |
10:06
espadrine joined
10:07
DrForr joined
10:10
donaldh left
|
|||
nine_ | Where do tests for Test.pm live? | 10:15 | |
FROGGS | tests? | 10:16 | |
there are none | |||
jnthn | t/01-sanity/99-test-basic.t may count :) | ||
moritz | nine_: we don't have any, cause Test.pm isn't very testable right now | ||
10:18
pecastro joined
|
|||
FROGGS | m: my role TypedPointer[::TValue] { method ^name($obj) { 'Pointer[' ~ TValue.^name ~ ']' } }; # jnthn: didn't you fix that? | 10:20 | |
camelia | rakudo-moar c8b81a: OUTPUT«Potential difficulties: Useless declaration of a has-scoped method in multi (did you mean 'my method name'?) at /tmp/Zng4o6377F:1 ------> 3my role TypedPointer[::TValue] { method7⏏5 ^name($obj) { 'Pointer[' ~ TValue.^name» | ||
10:20
pecastro left
10:24
tinyblak joined
10:26
firefish5000 joined
10:27
Ven left
|
|||
FROGGS | m: sub foo is DEPRECATED('blarg') { 42 }; say foo | 10:31 | |
camelia | rakudo-moar c8b81a: OUTPUT«42» | ||
FROGGS | isnt that supposed to print deprecation messages? | ||
10:32
pecastro joined,
pecastro left
10:33
pecastro joined
|
|||
nine_ | Any opinions on this? github.com/rakudo/rakudo/pull/381 | 10:34 | |
dalek | kudo/nom: bd0804f | (Stefan Seifert)++ | lib/Test.pm: Better diagnostics in Test::is for strings differing only in whitespace If the expected value differs from the got value only by whitespace at the end of a line, it's very hard to find this difference. Using .perl for the diag output on the other hand makes it trivial to find whitespace differences. With this patch is("foo \nbar baz", "foo\nbar baz"); gives: expected: "foo\nbar baz" got: "foo \nbar baz" |
10:37 | |
kudo/nom: 8310181 | FROGGS++ | lib/Test.pm: Merge pull request #381 from niner/nom Better diagnostics in Test::is for strings differing only in whitespace |
|||
10:37
larion joined
|
|||
FROGGS | I've seen tester reports where expected and got looked identical | 10:37 | |
timotimo | aye | 10:38 | |
nine_ | Thanks :) | ||
FROGGS | nine_++ | ||
10:38
sqirrel_ joined
|
|||
nine_ | Now I only need to find out where my superfluous whitespace comes from ;) | 10:39 | |
dalek | c: 6bc83dd | smls++ | lib/Language/nativecall.pod: prefer lowe-case name for example sub; some minor formatting tweaks |
10:40 | |
10:42
kjs_ joined
|
|||
[Tux] | useful change indeed | 10:42 | |
10:47
rurban joined
10:52
zakharyas left
|
|||
timotimo | gist.github.com/anonymous/786c6ff3d25623d9f997 - does this seem sensible? i got fed up with my perl6-m script having "../install" in them. | 10:58 | |
jnthn | .oO( löwe-case ) |
11:01 | |
11:02
laouji_ left
|
|||
masak | Muphry's Law strikes again! | 11:04 | |
11:05
brrt left
11:08
kjs_ left
|
|||
dalek | Heuristic branch merge: pushed 173 commits to rakudo/cpp by FROGGS | 11:09 | |
11:10
zakharyas joined,
firefish5000 left
11:12
cognominal joined
|
|||
dalek | ast: c61b5ba | lizmat++ | S02-magicals/ (2 files): Unfudge now passing tests |
11:13 | |
lizmat | hmmm... seems like nine_ 's change to Test::is breaks some tests | 11:15 | |
No such method 'subst' for invocant of type 'MyMatch' | |||
in method dispatch:<hyper> at src/gen/m-CORE.setting:1397 | |||
in block at lib/Test.pm:137 | |||
No such method 'subst' for invocant of type 'Capture' | 11:16 | ||
No such method 'subst' for invocant of type 'Signature' | |||
maybe we need an Any.subst ? | 11:17 | ||
11:18
spider-mario joined
|
|||
nine_ | lizmat: sorry, would this be a fix? | 11:18 | |
- if [eq] ($got, $expected)>>.subst(/\s/, '', :g) { | |||
+ if [eq] ($got, $expected)>>.Str>>.subst(/\s/, '', :g) { | |||
lizmat | testing | ||
yeah, that seems to do the trick | 11:19 | ||
running full spectest to be sure | |||
dalek | kudo/nom: 9a95f18 | lizmat++ | lib/Test.pm: Fix tests on classes that don't do .subst, nine++ |
11:24 | |
11:28
colomon left
11:32
geekosaur left
11:35
sqirrel_ left
11:38
colomon joined
|
|||
masak | I find it odd that that fix was needed. | 11:38 | |
might be my understanding that's at fault, though. | |||
why is it needed? :) | |||
nine_ | masak: subst is a Str method, but $got and $expected are Mu? | ||
timotimo | Capture and Signature are not Cool | ||
well, subst is a Cool method | 11:39 | ||
11:39
Ven joined
|
|||
masak | right. | 11:39 | |
lizmat | and apparently any class Foo either | ||
masak | I still thing it's rather arbitrary what's Cool and what isn't. | ||
lizmat | masak: fwiw, it doesn't make much sense to me either | ||
masak | I know the original intent was to emulate p5's "forgiveness" in casting a small set of core types. | ||
but it shows up in these circumstances mostly as confusion as to what's Cool and what isn't. | 11:40 | ||
lizmat | but I guess I lack the original hysterical raisons | ||
masak .oO( Perl 6 core devs uncertain about what's Cool ) | |||
lizmat: the original hysterical raisins are what I just said. emulate p5's type forgiveness. | |||
nine_ | We clearly need more hippsters to tell us what's Cool | 11:41 | |
lizmat | (ok) | ||
I was discussing certain aspects of Perl 6 yesterday with Stevan Little | |||
masak | like, .subst is clearly a Str operation, but you can also do it on an Int, or an Array. | ||
nine_: and the coolsterst to tell us what's Hip. | |||
jnthn | Key examples: Str, Int, Num, Parcel, List (so Array), EnumMap (so Hash), and Bool | 11:42 | |
nine_ | masak: and "coolster" is actually defined in the urban dictionary... | ||
masak | nine_: and "hip" is actually defined in Grey's Anatomy. | ||
jnthn | Not to be confused with 50 Shades of Grey | 11:43 | |
lizmat | (Stevan Little) apart from the usual suspects that people trying Perl 6 run into at the moment | ||
masak .oO( 50 shades of grey's anatomy ) | |||
jnthn | :D | ||
lizmat | he mentioned on thing that I hadn't heard about before / didn't see mention before | ||
suppose we have 2 modules with the same name loaded at the same time | 11:44 | ||
but with different auth / version | |||
jnthn | For me, the guideline on Cool is something like "built in, value type, has sane ways to view it as a Int, Num, or Str" | ||
Uh, s/value type// | |||
:) | |||
masak | :) | 11:45 | |
lizmat | if both modules create an object, how can we smartmatch them apart ? | ||
masak | s/value type/type/ :P | ||
lizmat: ooh | |||
lizmat: interesting | |||
lizmat: and do we always want them to be different? | |||
jnthn | lizmat: With the full name | ||
masak | nice. | ||
jnthn | lizmat: And note that in a given scope, the short name can only ever be talking about *one* of them. | ||
lizmat | yeah, but if they produce an object that is used *outside* of the scope it was created in ? | 11:46 | |
jnthn | Then it's two different types | ||
masak | ok, so objects simply won't smartmatch across auth/versions? | 11:47 | |
lizmat | sub a { use Foo:auth<one>; Foo.new }; sub b { use Foo:auth<two>; Foo.new }; say a ~~ b # what would this say ? | ||
jnthn | masak: I don't see how they sanely can. | ||
masak | oki | ||
lizmat | jnthn: so my code example would say "false" ? | 11:48 | |
11:48
yves left
|
|||
jnthn | lizmat: Well, there you have two instances | 11:48 | |
lizmat | yup | ||
jnthn | lizmat: Remove the ".new", and we get the question you probably meant to ask? | ||
Because | |||
m: class A { }; say A.new ~~ A.new | |||
camelia | rakudo-moar 9a95f1: OUTPUT«False» | ||
jnthn | :) | ||
m: class A { }; say A ~~ A | 11:49 | ||
camelia | rakudo-moar 9a95f1: OUTPUT«True» | ||
lizmat | say a.WHAT eq b.WHAT then | ||
ok | |||
jnthn | a.WHAT ~~ b.WHAT will be False | ||
eq will give you two warnings about undefined instances, and True :) | |||
m: class A { }; say (~A).perl | 11:50 | ||
camelia | rakudo-moar 9a95f1: OUTPUT«use of uninitialized value of type A in string context in block <unit> at /tmp/lhfzZGSIOE:1""» | ||
jnthn | But yeah, I really don't think we can sanely start considering them the same type | ||
lizmat | his example was really: so, I have to versions of this module loaded, | ||
11:50
rubio joined
|
|||
jnthn | I see the use case for different versions as when you want to use two things that *depend* on a different version of it | 11:50 | |
lizmat | how can I use MMD to create subs that will match objects from one or the other | ||
sub bar(Foo... and then? | 11:51 | ||
jnthn | And provided it's a black box dependency, you're fine | ||
lizmat: One candidate that will match objects of both versions, or? | |||
lizmat | no, two candidates that will match the different versions of the modules | 11:52 | |
*module | |||
multi old(Foo for version 1.0); multi new(Foo for version 2.0) | |||
jnthn | lizmat: If you mean MMD to distinguish them then I guess multi m(Foo:ver<1.2>:auth<lizmat>) { } and multi m(Foo:ver<1.2>:auth<jnthn>) { } | ||
lizmat | ok, so that's the plan, or did we just make that up? :-) | 11:53 | |
jnthn | I thought that was the plan all along? | ||
lizmat | well, there's a catch there | ||
jnthn | That importing a versioned thing imports the full name *and* the short name. | ||
lizmat | auth and version are about *compilation units* | ||
types are about classes inside those compilation units | 11:54 | ||
ok, anything exported will be both short and long name | |||
and the long name will be taken from the compilation unit info | |||
11:55
kjs_ joined
|
|||
jnthn | I think we can quite reasonably say that if you declare an auth/version for the compilation unit then it's applied to the things inside that unit. | 11:55 | |
We may want, with short names, to take the same poisoning model we have with enum values | 11:56 | ||
lizmat | ?? | ||
timotimo | m: enum Foo < Hello Goodbye >; enum Bar < Hello Byebye >; say Hello; | 11:57 | |
camelia | rakudo-moar 9a95f1: OUTPUT«Potential difficulties: Redeclaration of symbol Hello at /tmp/Oow68RNpJT:1 ------> 3llo Goodbye >; enum Bar < Hello Byebye >7⏏5; say Hello;Cannot use poisoned alias Hello, because it was declared by several enums.Please access…» | ||
dalek | kudo/nom: 9c66311 | lizmat++ | src/core/ (3 files): Better checks for being on Win |
||
timotimo | m: enum Foo < Hello Goodbye >; enum Bar < Hello Byebye >; say Foo::Hello; | ||
camelia | rakudo-moar 9a95f1: OUTPUT«Potential difficulties: Redeclaration of symbol Hello at /tmp/PErwBXfr4z:1 ------> 3llo Goodbye >; enum Bar < Hello Byebye >7⏏5; say Foo::Hello;Hello» | ||
timotimo | lizmat: ^ | ||
lizmat | ok :-) | 11:58 | |
jnthn: of course, we may want to actually match a range of versions | |||
so maybe a "where" model might be better ? | |||
jnthn | lizmat: For 6.0.0, I think we say that type names are non-fuzzy. | ||
lizmat | ok, I can live with that :-) | 11:59 | |
jnthn | lizmat: I would like to hope that actual cases where we'll have people mixing two versions in the same compilation unit will be relatively rare. | ||
lizmat | well, it could be a module that post-processes info from another module | 12:00 | |
that needs to be able to handle API changes in that other module | |||
so it may be less rare than you think | |||
I mean, we have many modules that build on other modules ;_) | |||
dalek | Heuristic branch merge: pushed 45 commits to perl6-examples by paultcochrane | ||
timotimo | there could be a pattern of a "versioning adaptor module" that'd handle two versions of the same module and interactions between them? | 12:01 | |
like a "migration module"? | |||
[ptc] | all examples now run in perl6-examples | ||
much more cleanup required... | |||
lizmat | timotimo: yes, that is one example | ||
jnthn | lizmat: That sounds odd, in so far as the module that uses theother one could say what version it wants | ||
I also note that if you are writing programs that mash up different modules, you generally want to prefer dynamic typing | 12:02 | ||
lizmat | that feels very rigid from a toolchain point of view | ||
timotimo | [ptc]: excellent work! | ||
lizmat | my idea to fix this was a bit different, though | 12:03 | |
when a distribution is installed, all of the meta info should be available as well | |||
12:03
kjs_ left
|
|||
[ptc] | timotimo: thanks :-) | 12:03 | |
lizmat | I was more thinking along a .WHERE macro/method | 12:04 | |
that would work like .HOW, but give you access to the distribution info of the compunit | |||
and smart matching would then become something like | |||
multi a(Foo where *.WHERE.auth eq 'jnthn') | 12:05 | ||
jnthn | I don't see how that can work | ||
Foo can't be bound to two things | |||
It'd need to be something more syntactic that does a query over things starting with Foo that are in scope... | 12:06 | ||
lizmat | hmmm... | 12:07 | |
jnthn | I'd urge starting simple and discovering actual pain points when we start to play with it, though. | 12:09 | |
lizmat | agree | ||
ok, let's leave it at this for now | |||
and get back to SMOP | |||
jnthn | We might be able to find a way to use something like "Foo:ver<1.*>:auth<*>" as a type query, for example. | 12:10 | |
lizmat | that feels like inventing a new syntax while we have "where" already with all its flexibility | ||
jnthn | But I'd start with the easy, precise match, thing | ||
lizmat | agree.. :-) | 12:11 | |
jnthn | Yeah, but that supposes that we somehow arrange for every version of a type to match the type's shortname, and I don't know we can reasonably make that happen. | ||
(Not saying it's impossible, just that it's not obvious to me) | 12:12 | ||
lizmat | ok | ||
dalek | ecs: c3cee44 | lizmat++ | S99-glossary.pod: Add SMOP lemma |
12:14 | |
Heuristic branch merge: pushed 19 commits to specs/newio by lizmat | 12:15 | ||
nine_ | lizmat++ # answering my quesion before I even asked it! | 12:16 | |
12:27
skids left
|
|||
dalek | Heuristic branch merge: pushed 28 commits to rakudo/newio by lizmat | 12:29 | |
lizmat | afk for a bit& | 12:30 | |
12:31
abraxxa left
12:40
Ven left
12:50
anaeem1_ left
13:01
kjs_ joined
13:04
Ven joined
13:14
kjs_ left
|
|||
smls | What's this I hear about an "array" type (lower-case "a")? | 13:17 | |
13:17
kjs_ joined,
rubio left
|
|||
timotimo | native arrays? | 13:18 | |
masak | though I don't know that they're spelled "array". | ||
smls | seen here: irclog.perlgeek.de/perl6/2015-03-05#i_10231390 | ||
timotimo | me neither | ||
masak | (maybe they are and I haven't been paying attention. but I don't think so.) | ||
sjn | \o | ||
Question: who's manaaging the content on rka^H^Hakudo.org? | 13:19 | ||
masak | smls: ...huh. | ||
smls: so maybe yes, then. | |||
timotimo | looks like it's just a shortcut for how to refer to native arrays until something is decided on | ||
smls | Does this mean Array will not gain native-compact storage directly? | ||
masak .oO( rKAAKudo: Rakudo, but for Parrots ) | |||
smls | s/gain/gain support for/ | 13:20 | |
timotimo | no clue | ||
13:20
brrt joined
|
|||
nine_ | It would seem like native arrays and Arrays are quite different. The latter supporting lazyness for example | 13:21 | |
timotimo | i thought List does lazy, does Array do it, too? | ||
.o( what the fuck do i know about perl6? ) | |||
smls | yep, Array does it too | 13:22 | |
masak | Perl 6 is weird. | ||
13:23
geekosaur joined,
geekosaur left
|
|||
nine_ | Perl 6 just has too many features. Let's scrap it and start Perl 7. I'd suggest starting with a touring machine and removing everything non-essential. | 13:23 | |
13:24
geekosaur joined
|
|||
smls | I think TimToady once explained that he thinks Array supporting laziness is worth it because it lets us assign some lazy lists to @ variables without having to use binding | 13:24 | |
13:24
coffee` joined
|
|||
osfameron | one of these maybe? www.evanscycles.com/categories/bike...ring-bikes | 13:24 | |
timotimo | turing machine! | ||
nine_ | timotimo: see! You already removed the non-essential 'o'. The process works! | ||
smls | Though I'm not very convinced of that benefit, as it does work with all lazy lists anyway | 13:25 | |
timotimo | <3 | ||
smls | *does not | ||
brrt | there is also another way to do that | ||
which would be to replace the (eager) array with a proxy referencing the array and the lazy list | |||
smls | If native array support does get added to the Array type after all, I wonder if IntLexRef shouldn't also be merged with Scalar | 13:26 | |
sjn is at a cafe, enjoying a 4-3 minute lag on his ssh connection | 13:28 | ||
anyhoo, rakudo.org content... | 13:29 | ||
masak .oO( a universal touring machine is a machine that can give any other machine a free tour ) | |||
smls | Currently, my Foo $a makes a Scalar container which can hold objects of type Foo, and my Foo @a makes an Array container which can hold objects of type Foo. | ||
Native types seems to break that rule... | |||
moritz | yes, they avoid the container entirely | 13:31 | |
at least for scalars | |||
smls | well... | ||
IntLexRef is kinda a container | |||
also implementation wise, they all store pointers rather than the actual values, if I understand correctly | 13:32 | ||
m: my num $i = 1.0; # on a related note... | 13:33 | ||
camelia | rakudo-moar 9c6631: OUTPUT«This type cannot unbox to a native number in block <unit> at /tmp/x69TI3h4Ai:1» | ||
smls | LTA error message | ||
should probably say "floating-point number" instead of "number" | |||
moritz | or "num" | 13:35 | |
smls | yep | ||
jnthn | my int @a; # will actully bind an array[int], which is non-lazy, to @a | 13:36 | |
my Int @a; # a (potentially lazy) Array[Int] | |||
Anything behind .VAR.WHAT on natives is, for now, implementation defined. | 13:37 | ||
No, the native ref types are not getting unified with Scalar, that ruins all type-driven optimization. | |||
13:38
anaeem1_ joined
|
|||
smls | fair enough; I'll refrain from naughtily peeking behing .VAR | 13:42 | |
jnthn | Well, if you're interested in how it works, that's fine. Relying on what's behind it in your code, less fine. But it's *very* rare for code to explicitly mention Scalar by name. :) | 13:43 | |
(So by extension I very much doubt there will be used cases for mentioning the native ref types by name) | 13:44 | ||
smls | but "Scalar" is officially specced, right? | 13:46 | |
jnthn | Yes, that one is | ||
As is Proxy | |||
smls | Proxy is what array subscripts return for nonexistent elements? | 13:47 | |
jnthn | No, that's a Scalar also | ||
A Scalar, at present, can have code attached saying "run this when first assigned to" | |||
Which is how auto-viv is typically done | 13:48 | ||
jnthn wouldn't find re-visiting that detail at some point... | |||
smls | What about rw class attributes, do they use Proxy? | ||
jnthn | *mind | ||
For object attributes, no | |||
13:49
anaeem1_ left
|
|||
jnthn | They don't need to, since thre's already a container | 13:49 | |
smls | ah, it's only when u want to emulate them with a method | ||
jnthn | For native ones, it's a native ref | ||
13:49
anaeem1 joined
|
|||
jnthn | Though I expect rw accessors for native things to get inlined, and the ref taking optimized away as a result | 13:49 | |
The native refs design is a careful balance of "make them behave like first-class l-values and not be too surprising in untyped code" along with "enable a dynamic optimizer to get rid of them" | 13:50 | ||
smls | makes sense (if it works out well) | 13:51 | |
jnthn | So far I'm fairly happy with how the first part is shaping up, and need to write more code to prove the second part can work as well as intended. | 13:52 | |
btw, agree on tweaking the error wording on the num assignment thing | |||
13:53
KCL joined
13:54
anaeem1 left
13:56
KCL_ left
14:00
anaeem1 joined
14:01
diana_olhovik left,
salv0 left
14:02
anaeem1 left
|
|||
Ulti | I'm not sure why having this little slang makes me so happy since I could just use the function seq("") as easily as `` but I just like that my class has a literal in the language :) | 14:04 | |
14:04
anaeem1 joined
|
|||
moritz | Ulti: tell that literal :-) | 14:04 | |
Ulti | I got my grammar to automatically detect DNA/RNA/AminoAcids now too so it constructs the correct subclass based on just the sequence data so has deep magic | 14:05 | |
I dont think its useful as a programmer but it makes being an investigative scientist playing with data really slick | 14:06 | ||
14:06
spider-mario left
14:09
MilkmanDan left,
MilkmanDan joined,
MilkmanDan left,
MilkmanDan joined,
anaeem1 left
14:11
spider-mario joined
14:12
tardisx left
14:13
MadcapJake joined
|
|||
jnthn | Ulti++ # literally awesome :) | 14:13 | |
14:15
anaeem1 joined
14:18
kjs_ left
|
|||
smls | Too bad it's not advent time; if it was we could now pressure Ulti into writing another very interesting bio/perl6 advent post ;) | 14:23 | |
lizmat | re irclog.perlgeek.de/perl6/2015-03-05#i_10229514 : the reason I implemented "is-win" was because the same logical check was done in many different (and sometimes incorrect) ways throughout the core and the spectest | 14:24 | |
jnthn | lizmat: +1 on us having it | 14:25 | |
lizmat | I have not seen a need anywhere for an "is-unix" or anything like that | ||
14:25
kjs_ joined
|
|||
smls | maybe if you want to check if you use 'fork'? | 14:25 | |
14:26
skids joined
|
|||
lizmat | m: try fork | 14:26 | |
camelia | rakudo-moar 9c6631: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HVxywpR7jzUndeclared routine: fork used at line 1» | ||
lizmat | m: say $?TABSTOP; $?TABSTOP = 4; say $?TABSTOP # hardly a constant, is it :-) | 14:27 | |
camelia | rakudo-moar 9c6631: OUTPUT«84» | ||
lizmat | it appears Str.indent and Str.outdent are using that | ||
shouldn't that be $*TABSTOP really ? | 14:28 |
|