»ö« 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:30
sudokode joined
00:33
mcglk left
00:34
mcglk joined
00:36
sudokode left
00:40
sudokode joined
|
|||
[Coke] | sorear, masak: yay, I could that on irclog just before boarding. ;) (+%) | 00:44 | |
00:44
sudokode left
|
|||
[Coke] | Now the last bug remaining is trying to find the "compreg" | 00:45 | |
d Partcl compiler. | |||
00:50
tokuhiro_ joined
01:00
flexibeast left
01:04
FROGGS_ joined
01:06
cjbot left
01:08
FROGGS left
|
|||
sorear | [Coke]: boarding? | 01:08 | |
01:15
spider-mario left
01:25
jeffreykegler left,
jeffreykegler joined
01:30
broquaint left
01:31
sudokode joined
01:39
am0c_ joined
01:46
mcglk left
01:47
mcglk joined
01:57
mcglk left
01:58
mcglk joined
02:07
dbr left
|
|||
[Coke] | sorear: yes, I've been talking to you from hotels and airports. | 02:17 | |
[Coke] is now at his final destination for the day. | |||
02:18
cjbot joined
02:27
tokuhiro_ left
02:31
whiteknight left
02:35
mucker joined
02:48
thelazydeveloper left
02:50
jeffreykegler left
03:02
am0c left
03:04
am0c_ left
03:15
adu joined
|
|||
[Coke] | er, not "I could that", but "I caught that" | 03:27 | |
03:30
mucker left
03:31
MikeFair_ joined
|
|||
MikeFair_ | sorear: hey ther | 03:31 | |
sorear | yo. | ||
MikeFair_ | sorear: Actually I was on #perl6 on the Perl Network | ||
sorear: no matter though, all here now :) | |||
sorear: So you were saying (and I was doing my best to keep up) :) | 03:32 | ||
sorear | mm, it that a thing? | 03:33 | |
MikeFair_ | Guess we're just a bunch of confused souls over there not realizing we belong here? | 03:35 | |
sorear | I think most of them joined so that they could tell off other people who join | ||
but in doing so they've prevented the channel from expiring | |||
MikeFair_ | Well I just left (and then there were 9) | 03:36 | |
:) | |||
There are two ways to interact with the GAC: the Global Assembly Cache Tool (gacutil.exe) and the Assembly Cache Viewer (shfusion.dll). | 03:39 | ||
sorear: Does that help? | |||
sorear | 1. it needs to be problematic | 03:40 | |
2. the mono gac layout is such that it cannot be quickly scanned on Linux, unless there's a database somewhere I'm missing | |||
s/problematic/programmatic/ | |||
MikeFair_ | 1. totally agreed, 2. Mono has to load them, how does it do it? | 03:42 | |
03:42
bubaflub left
|
|||
MikeFair_ | sorear: I guess I'm just not seeing why you have to scan? Are we building a bunch of *.pm files? | 03:42 | |
sorear | when mono or mcs wants to load an assembly from the gac, it *knows the name* | ||
oh, I thought you were recommending a scan | 03:43 | ||
Note | |||
You must have administrator privileges to use Gacutil.exe. | |||
diakopter | /o\ | ||
MikeFair_ | sorear: I wonder what shfusion.dll is like... | ||
sorear | it sounds like it's probably related to shell32.dll | 03:44 | |
anyways, i don't think a gac scan would buy much at all | |||
MikeFair_ | sorear: And one thing I've never known is whether or not the GAC is literally a Cache (like a local copy perhaps that's stored after a JIT has processed it) or is it the actual installation location | 03:45 | |
sorear | it is an installation location | ||
it does not do line-fill/eviction like most "cache"s | |||
MikeFair_ | that location is known at run-time? | 03:46 | |
sorear | huh? | 03:47 | |
MikeFair_ | sorear: Perhaps I'm missing something, you were saying that you didn't know the name of the assembly when Perl tried to load it | ||
sorear | MikeFair_: I think at this point I don't understand the problem you are trying to solve | 03:48 | |
Currently the syntax is CLR::("assembly name")::Namespace::Class | |||
MikeFair_ | You were having some crazy ideas on how to redo niecza's name binding mechanism so 'use gtk:from<clr gtk-sharp>' Just Works | 03:49 | |
And I thought, likely mistakenly, finding out what assembly to load was a problem | 03:50 | ||
sorear | MikeFair_: No, the problem is with niecza's current insane semantics for scoping of nested names | 03:51 | |
MikeFair_ | I was also saying that the System.Reflection classes could help with creating an auto-binding | ||
sorear | on the CLR side, the problem is solved | ||
sorry | 03:52 | ||
MikeFair_ | ahh ok | ||
So if i'm hearing you correctly, niezca currently needs to be told about an assembly because dynamically finding it based on the namespace is problematic due to scoping for nested names? | 03:54 | ||
sorear | no. | 04:04 | |
it is _by design_ that you need the assembly name | 04:05 | ||
04:05
colomon left
|
|||
sorear | assembly names are the mechanism by which the CLR tames type name conflicts | 04:05 | |
04:06
Telgalizer joined
|
|||
MikeFair_ | sorear: ok.... and the GAC for being able to install the same named thing multiple times for different versions | 04:07 | |
sorear | MikeFair_: the GAC is a weird pariah thing | ||
it's mostly there to hold copies of System.dll et al | 04:08 | ||
anything third-party should go into your application directory, the CLR looks there for assemblies | |||
MikeFair_ | sorear: I guess, I see it as how they can install .Net 2.0 and .Net 3.0 on the same box and have each directory holds its own version of "System" | ||
MikeFair_ nods. | |||
04:09
birdwindupbird joined
|
|||
MikeFair_ | sorear: Why isn't the namespace sufficient for taming type name conflicts? | 04:09 | |
sorear | well, where it gets interesting is transitivity | ||
say module D comes in two versions, D 1.0 and D 2.0, both of which export a type D.D | |||
module, I mean assembly, B, requires D 1.0 | 04:10 | ||
assembly C requires D 2.0 | |||
MikeFair_ | sorear: There's a few pages I was reading the other month on when and how you can nest namespaces, mask type names, etc | ||
sorear | D versions 1.0 and 2.0 are not compatible | ||
assembly A requires both B and C | |||
this works | |||
it works because of the way the CLR handles class names as subordinate to assembly full names (including version & pubkey) | 04:11 | ||
Perl 6 is actually supposed to do something very similar | |||
MikeFair_ | Right and those get embedded in at compile time in CLR land? | 04:12 | |
sorear | use Foo:auth<cpan:DCONWAY>:ver<1.0> | ||
yes | |||
MikeFair_ | sorear: But in practice I assume everyone just writes use Foo::auth making the construct nearly useless? | 04:13 | |
sorear | no. | ||
MikeFair_ | sorear: Are is it been a adopted and accepted as a best practice? | ||
s/Are/Or | |||
s/is/has/ | 04:14 | ||
sorear | because Foo::auth means nothing unless there is a "use Foo" in scope, and the use statement can define, lexically, an implicit auth/ver | ||
well, it hasn't been adopted mostly because it hasn't been implemented yet :D | |||
MikeFair_ | hehe - that could be a problem ;) | ||
Well I guess what you're now saying then is that if you replaced "cpan" with "clr" you could do something similar? | 04:15 | ||
(Or am I skipping ahead too many steps and ending up in the wrong place) | |||
sorear | subtly wrong | 04:18 | |
the idea with :auth is that it represents some kind of naming authority | |||
a URI which represents someone or something that issues names | 04:19 | ||
MikeFair_ nods. "Makes sense" | |||
sorear | if cpan:TOM and cpan:DICK decide to use the same module name, there won't be a problem because the authorities are different | ||
presumably cpan:TOM will not use the same name for unrelated modules, if he's right in the head | |||
and cpan: IDs are unique becuase they are centrally allocated | 04:20 | ||
MikeFair_ | right | ||
sorear | there is an additional name adverb :from which is more appropriate here | 04:21 | |
use Foo means use Foo:from<perl6>:auth(*):ver(*) | |||
MikeFair_ | naming conflicts are easy once that gets distributed and there isn't a central naming authority | ||
ahhh | |||
I think I see where you're going now | |||
sorear | actually there is one more, :name | 04:22 | |
when you say 'use Foo' you are importing a module Foo and you are creating an alias Foo in the lexical scope | |||
usually, you want them to have the same name | 04:23 | ||
but the lexical alias has to be a valid Perl 6 identifier, and foreign module names don't always oblige | |||
MikeFair_ | I can see that | ||
sorear | you might do use SWF:from<clr>:name<System.Windows.Forms> | 04:25 | |
MikeFair_ | Yeah, that's what I was thinking | ||
sorear | as for :auth I would ideally do pk:HASHHERE | ||
MikeFair_ | Though I'm not exactly clear on the distinction between from and auth | ||
sorear | with the usual Perl 6 convention that no auth = any auth is fine, I can't be bothered to check | 04:26 | |
moritz | \o | ||
sorear | o/ moritz | ||
MikeFair_ | auth = author? | 04:27 | |
which conceptually stands for some unique namespace? | |||
sorear | use Cecil:from<clr>:ver<0.9.4.0>:auth<pk:0738eb9f132ed756>:name<Mono.Cecil> | ||
is the most complete syntax | 04:28 | ||
auth = authority | |||
think like a certificate authority | |||
Larry's standard grammar starts with rammar STD:ver<6.0.0.alpha>:auth<perl.org>; | 04:29 | ||
s/^/g/ | |||
MikeFair_ | yeah I was thinking that "auth" might go really well with a domain name or a standards body | 04:30 | |
Something that can provide sanity to the names it hosts | |||
Can an assembly have the same version and a different public key? | 04:31 | ||
04:34
colomon joined
|
|||
MikeFair_ | auth almost seems like it would be the runtime version | 04:35 | |
and pk part of the version | |||
well maybe not auth | 04:36 | ||
use Cecil:from<clr 2.0>:ver<v:0.9.4.0,pk:0738eb9f132ed756>:auth<publisher_name>:name<Mono.Cecil> | 04:38 | ||
sorear | you can't put that into ver | 04:41 | |
MikeFair_ | bbiab | ||
sorear | ver is fixed-format | ||
also, publisher name is not part of the programmatic name of CLR modules | |||
04:46
kaare_ joined
05:07
birdwindupbird left
05:09
birdwindupbird joined
|
|||
MikeFair_ | sorear: Well ok then, that settles that :) | 05:10 | |
sorear: auth seems like a great place to put pk :) | 05:11 | ||
sorear: It's a bummer about version though, kind of prevents coming up with a better way to track versions in the future :) | 05:12 | ||
sorear: Anyway, regardless of that I can't help but remember how excited I was to read Larry's Apocolypses on what Perl6 was to become, I was thinking so many of the same things at the time I read those | 05:14 | ||
sorear: a fixed version format seems a trivial price to pay for the rest of all this goodness. :) | |||
sorear | It's linguistically defined so it falls under the language update mechanism | 05:15 | |
If Perl 6.3 changes the version syntax, you can enable the new syntax with use v6.3; | |||
we do a few things differently from the days of the apocalypses. we're much more focused on the present. | 05:16 | ||
r: my class A::B {}; { my class A::C {}; say A::B } | 05:25 | ||
p6eval | rakudo 196572: OUTPUT«A::B()» | ||
sorear | jnthn: low-priority ping | 05:27 | |
05:41
crab2313 joined
05:46
adu left
05:48
Telgalizer left
05:50
cjbot left
|
|||
MikeFair_ | sorear: There's a lot here that I'm wanting to learn | 05:55 | |
sorear | MikeFair_: in my last p6eval line or more generally? | 06:01 | |
whee, I have a built Rakudo | |||
3m26s :D | |||
MikeFair_ | sorear: that seems fast | 06:02 | |
sorear: more generally | |||
sorear | MikeFair_: I started Niecza in large part because in Q2 2010, with the computer I was using at the time, Rakudo builds were more of a 10h thing | ||
MikeFair_ | seeing the word class in Perl code without some pointer next to it will take some getting used to ;) | ||
sorear | "some pointer"? | 06:03 | |
MikeFair_ | -> | ||
or :: | |||
sorear | what's the connection between class and ::/-> in Perl code? | ||
MikeFair_ | sorear: i'm just not used to seeing "class" as a keyword, and the various evolutions in Perl5 (and earlier) have used the module stuff | 06:04 | |
sorear: It's totally a misrepresentation on my part, just a keyword that's new to me for perl. That's all I'm really saying. :) | 06:05 | ||
06:09
erkan left,
erkan joined
|
|||
Timbus | i think a more visible difference is using . instead of -> | 06:09 | |
MikeFair_ | Timbus: Yeah that too | 06:11 | |
It's going to be cool | |||
Hey question, i've actually been really impressed with what the .Net stuff has done with enumerations | |||
Anything special in Perl6 regarding enumerations? I mean a lot of it probably doesn't apply because of how strict .net is, but I thought I'd ask | 06:13 | ||
benabik | r: enum A <a b c>; say A::a | 06:15 | |
p6eval | rakudo 196572: OUTPUT«a» | ||
sorear | n: enum A <a b c>; say A::a # long name | 06:16 | |
n: enum A <a b c>; say a # short name | |||
p6eval | niecza v19-44-g55e895a: OUTPUT«(timeout)[auto-compiling setting]» | ||
sorear | ok, I broke niecza on p6eval | 06:17 | |
MikeFair_ | :) | ||
sorear | r: enum A <a b c>; say A::a # long name | ||
benabik | perlcabal.org/syn/S12.html#Enumerations | ||
p6eval | rakudo 196572: OUTPUT«a» | ||
sorear | b: enum A <a b c>; say A::a # short name | ||
p6eval | b 922500: OUTPUT«0» | ||
sorear | r: enum A <a b c>; say A::a # | ||
p6eval | rakudo 196572: OUTPUT«a» | ||
sorear | ignore b | ||
r: enum A <a b c>; say +A::c # knows its index | |||
p6eval | rakudo 196572: OUTPUT«2» | ||
sorear | r: enum A <a b c>; say A::c.WHAT() # knows its type | 06:18 | |
p6eval | rakudo 196572: OUTPUT«A()» | ||
sorear | r: enum A <a b c>; say A::c.perl # long name | ||
p6eval | rakudo 196572: OUTPUT«A::c» | ||
MikeFair_ | ok that's cool | ||
sorear | r: enum A <a b c>; say +A("c"); say +A(1); # niecza supports using enums as coercers, but niecza is broken right now, let's see if rakudo works too | 06:19 | |
p6eval | rakudo 196572: OUTPUT«use of uninitialized value of type A in numeric context in block at /tmp/9dazyzIKWV:101» | ||
MikeFair_ | ok, so there's this one other thing I've been thinking about lately about replacing the base types of int/float/string with infinite enumerables | 06:20 | |
the main reason I've been thinking about it has to do with I/O and internationalization | |||
sorear | what do you mean? why? | ||
MikeFair_ | So let's take int for a second | ||
1 2 3 | |||
sorear | int isn't infinite, anyway | 06:21 | |
MikeFair_ | Well numeric | ||
ok string | |||
it's not as easy to explain with string | 06:22 | ||
sorear | be advised that type names in Perl 6 are case sensitive and 'int' and 'Int' are entirely different things | ||
Int is a reference type which points to an integer of arbitrary size | |||
int is a CPU-level integer | |||
MikeFair_ | Ok let's talk Int then | 06:23 | |
the idea simply is that the string characters used to represent a number exist inside a character set | |||
and in different langauges even use different symbols | |||
and to some extent, the same number can be represented in different basis | 06:24 | ||
(well they most definitely can it's just not as common to speak about Int outside of base10) | 06:25 | ||
sorear | I have a bad feeling about this. | ||
MikeFair_ | The think I was considering was if there was an enumerable type to line up with the character set or locale, it could mapped back to the actual "Int" | 06:26 | |
sorear | What would be the point? | ||
MikeFair_ | The same number could be expressed by casting it through its enumerable | ||
It creates a presentation layer between the machine and the human | 06:27 | ||
but it makes it rather transparent to the programmer | |||
sorear | dear #perl6, I am having trouble coming up with a tactful reply | 06:28 | |
MikeFair_ | sounds good | ||
thanks for listening :) | |||
sorear | so I'm not going to say anything at all | ||
MikeFair_ withdraws his comments. :) | |||
benabik | I'm not following completely, but skimming it looks like "all we need is another layer of indirection". | 06:29 | |
MikeFair_ | the idea was that my application could have a locale, which would implicitly select enumerables that knew how to express the concept of that number in a locale specific way | 06:30 | |
sorear | enumerables are for things you can enumerate. | 06:31 | |
MikeFair_ | benabik: It's actually more like, We have this layer of indirection that we do poorly or not at all, and maybe there's a better way to do it | ||
sorear: You can enumerate Integers | |||
sorear | if you want to add a type coercion from Str to Num, say _that_ instead | ||
huf | is this for code or for formatting numbers in a locale-specific way in output? | ||
or do you want strange integer literals that change their meaning depending on locale? or ... i'm lost | 06:32 | ||
MikeFair_ | huf: they don't change their meaning, just their representation | 06:33 | |
huf | ? | ||
sorear | MikeFair_: did you come from [email@hidden.address] | ||
MikeFair_ | huf: it's primarily for input and output with an end user | ||
sorear: umm, no, I take it that's not a compliment. ;) | |||
huf | so this is just serialization | ||
i thought this was about internal representation or literals... | 06:34 | ||
MikeFair_ | it's something that crossed my mind when reading about enumerables in .Net that are programmaticly defined | ||
Like fibonacci | |||
Doing locale specific representation and input | 06:35 | ||
sorear | MikeFair_: I think you are making the mistake of thinking IEnumerable and System.Enum have anything whatsoever to do with each other | ||
MikeFair_ | so yeah it's more about serialization | ||
sorear: likely | |||
sorear: plus I'm talking about it in Perl6 | |||
sorear: So yeah, I'm fairly easily convincable that I should be locked up :) | 06:36 | ||
sorear | This is, I am sorry to say, not a p6-ready idea. We've been shipping compilers for several years now and there will be no modifications to the core language unless you can 1. explain why they are needed in a way convincing to the people whose production code you've just broken 2. implement it in at least one shipping compiler | ||
MikeFair_ | sorear: Totally agreed, I'm not asking for changes, god no, and this _should be_ doable in the existing language | 06:38 | |
sorear: Or not do it | |||
sorear: And it shouldn't break any existing code | |||
sorear | Then I don't think I understand you | ||
06:38
araujo left
|
|||
sorear | It seems like you want to rip out Str and replace it with a gigantic enum | 06:38 | |
MikeFair_ | sorear: More like Str->enum->Int | 06:39 | |
sorear: If code chooses to do that | |||
sorear | for a purpose having ... something ... to do with locales | ||
MikeFair_ | Yes, to create a distinction between "how we present and receive" a number as separate from the number itself | 06:40 | |
sorear | well, in an hour or so the #perl6 core folks from Germany, Poland, Norway, and Sweden will be up and we'll be able to have a proper discussion about locales | 06:41 | |
MikeFair_ | Another use case is for unit s convestion | ||
err conversions | |||
huf | so instead of (pseudocode) int parse_int(str s), you'd like int parse_int(str s, enum map) where the default map is an infinitely large enum that maps "0" => 0 and so on? | ||
but you can replace it to "balin" => 0, "dwalin" => 1, .... ? | 06:42 | ||
MikeFair_ | huf: Yeah, and "infinitely large" to me means "some code does the conversion" | ||
huf: More like "zero"=>0, "one"=>1 | 06:43 | ||
sorear | MikeFair_: What advantage would this have over just calling the correct codein the first place? | ||
MikeFair_ | And my code could receive "one hundred thousand and sixty" and the number 1,060 could end up in the Int | 06:44 | |
sorear | FOUR TWO NINER FOUR NINER SIX SEVEN TWO NINER FIVE | 06:45 | |
sorear ducks | |||
MikeFair_ | sorear: That would be another enumerable type that could be defined | 06:46 | |
sorear: hehe :) | |||
sorear | I recognize that this is not a valid form of argument, but INTERCAL has had this feature for decades. | 06:47 | |
MikeFair_ | sorear: That's interesting.... I didn't know that | ||
MikeFair_ feels less insane. | |||
Not that any of us would, but we could use a "Roman Numeral" representation | 06:51 | ||
Or someone who wanted to have a Roman Numeral calculator | |||
sorear waits for MikeFair_ to find and read a definition of INTERCAL | |||
I would prefer something like Lingua::EN::Number.parse("one") | |||
it's just a function call, no need to make it fancy | 06:52 | ||
also Lingua::EN::Number is just a module, so someone other than me can write it | |||
MikeFair_ | Create the enumeration type to do the conversion, then take any perl calculator program and set the new interface locale which uses that representation for I/O | ||
sorear: that sounds similar to what I'm talking about | 06:54 | ||
06:54
araujo joined,
araujo left,
araujo joined
|
|||
MikeFair_ | The idea is that I have no idea what the end user needs to understand the numbers on the screen | 06:54 | |
sorear | What do you mean by I/O? | 06:55 | |
What if the calculator program uses a GUI? | |||
What if the calculator program outputs to HTTP? Content-Length: MLMVII isn't going to fly. | 06:56 | ||
MikeFair_ | sorear: by I/O I mean the act of taking a character set and converting it to an Int and vice versa | ||
huf | that sounds like two steps | ||
reading in bytes, taking a charset and getting a string | |||
sorear | We don't use character sets here. | ||
huf | and _then_ figuring out what int that string might represent | 06:57 | |
MikeFair_ | huf: yes, this is more about the "figuring out what that string meant" and "outputting the meaning of the Int" | 06:59 | |
sorear | Anyways we got rid of $" outright so I can't see us _adding_ a globabl variable that controls the stringification of Int | ||
huf | but that's not I/O... | ||
MikeFair_ | sorear: The environment shell has one | ||
huf: My apologies | |||
huf: What do you call that? | 07:00 | ||
sorear | Str/Int type coercions | ||
MikeFair_ | huf: It's such a transparent single thing that rarely gets discussed (at least in the circles I travel in) | ||
sorear | anyways, I had a hell of a time getting Niecza to run on tadzik's machine | 07:01 | |
because Niecza uses a partially text-based serialization scheme | |||
and Polish versions of .NET have a different and incompatible definition of "number" from the US versions, *even when you don't use locale calls* | 07:02 | ||
I am not going to make 'print 12345' in Niecza locale-sensitive, and I am not budging on this | |||
MikeFair_ nods. | 07:03 | ||
sorear | I don't beleive in perpetuating cycles of abuse | ||
MikeFair_ | Me too, my thought is that a lot of the problem is because there's this unexamined assumption of what "print 12345" means | ||
sorear | I could budge on 'say 1234', since say is explicitly intended for human consumption as opposed to protocols | 07:04 | |
MikeFair_ | sorear: fair enough, what about on the input side | ||
sorear | print 12345 means to output the characters "12345 | ||
print 12345 means to output the characters "12345"; we define it precisely because it needs to be usable in network protocols | 07:05 | ||
Perl has no way of telling whether input comes directly from the user or from another program | |||
MikeFair_ | sorear: And those are UTF-8 characters? or Unicode | ||
sorear | There is no such thing as "UTF-8 characters". | 07:06 | |
UTF-8 is the name of a reversable function mapping sequences of Unicode code points to sequences of bytes | |||
If we err on the side of locale sensitivity, code written in the US which does input from other programs will break, often messily, when run in other locales | 07:07 | ||
MikeFair_ | ok, I always just thought of it as an encoding methodology that's different from ASCII and different from Unicode | ||
sorear | If we err on the side of consistency code will be less usable but it won't break outright | ||
Unicode is not an encoding methodology. | |||
Some people use Unicode when they mean UTF-16, but they're wrong. | 07:08 | ||
MikeFair_ | Ok, I know that when I'm dealing with character data, if I get the encoding wrong things break | 07:09 | |
sorear | Perl 6 strings are character data, not byte data, so nothing can break there | ||
Perl 6 also has a Buf type for byte data | 07:10 | ||
MikeFair_ | What is the internal representation of characters? I mean will it take japanese characters? | ||
sorear | File handles have an associated encodings which allow them to be dwimmy | ||
Unspecified and undetectable. | |||
It is required to handle all 0x10FFFE Unicode characters. | |||
MikeFair_ | sorear: So if Unicode isn't an "encoding methodology" but there are things such as Unicode characters, what do you consider Unicode? | 07:11 | |
shachaf | If a picture isn't an "encoding methodology" but you can still save it in a file, what do you consider a picture? | 07:12 | |
sorear | Unicode is a map between 21-bit code points like 0x3080 and abstract characters like | 07:13 | |
む | |||
MikeFair_ | ok, yeah, I consider "bitmap" an encoding methodology for a picture | ||
you can't put a picture in a file | |||
sorear | A character encoding, in general, is an algorithm which transforms sequences of 21-bit code points into (longer) sequences of 8-bit byte | 07:14 | |
MikeFair_ | you can only put a representation in a file | ||
sorear | You're changing definitions in the middle of the conversation. Stop it. | ||
MikeFair_ nods. | |||
Yes, clearly I don't have it as clearly delineated as you do yet | |||
sorear | 00:07 < MikeFair_> ok, I always just thought of it as an encoding methodology that's different from ASCII and different from Unicode | 07:15 | |
00:07 < sorear> Unicode is not an encoding methodology. | |||
MikeFair_ | right | ||
sorear | no. I screwed up there. | ||
I should have said first "You mean 'character encoding'" | |||
moritz | Unicode is mostly a character repertoire | 07:16 | |
sorear | yay moritz. | ||
moritz | plus some associated semantics | ||
sorear | moritz: if I understand the gist correctly, MikeFair_ wants to do something to the effect of { temp $*OUT.number-formatter = &Lingua::EN::Number::format; Some::Other::Module::prints_to_stdout; } | 07:17 | |
moritz: as someone who maybe has actual experience with l10n and numerics, what do you make of this? | 07:18 | ||
moritz | I don't really have that | 07:19 | |
the way to do it is to subclass $*OUT.WHAT and add custom print/say methods though, I'd guess | |||
07:20
SamuraiJack joined
|
|||
MikeFair_ | moritz: one of the assumptions is that the methods to do it the right way have to be assignable at runtime | 07:22 | |
moritz | MikeFair_: erm, what? | 07:23 | |
methods have to be assignable at runtime? | |||
you can just create the class at compile time, and chose at runtime which one you use | |||
bog-standard OO polymorphism | 07:24 | ||
sorear | MikeFair_: if you haven't already done so, I recommend you look up what INTERCAL is | ||
MikeFair_ | sorear: I did. I think I understand that you're saying this sounds like a really "trumped up" idea and is something to be made fun of | 07:25 | |
sorear: Obviously I haven't read everything about it yet | |||
moritz: I guess I just considered the routines to convert Str <-> Int weren't "interruptable" | 07:27 | ||
The main thing I noticed is that programs do "non-US" based thinking and interaction really badly and even the l10n stuff we have is mostly second class and "difficult" | 07:29 | ||
and yes, I've had to write some, and my conclusion is that "we haven't figured this part out yet" | 07:30 | ||
The enumerables thing was just a clue that I thought gave me some insight. One of the problems is that the string "12345" and the Int 12,345 are too closely coupled | 07:31 | ||
moritz | MikeFair_: I think the real problem with that l10n is that most code isn't clear about which conversions are user-visible, and which aren't | 07:32 | |
and l10n must only change user-visible conversions | |||
MikeFair_ | moritz: Well even our code goes into the compiler as strings. It's "user visible" to the developer | 07:33 | |
moritz | I didn't mean the developer with "user" | 07:35 | |
MikeFair_ | moritz: I was dawning on me that the concept "12,345" stored in an 'Int' could a bazillion different representations | ||
s/I/It | |||
especially if you start taking into account what the units are as a second part of the 'Int' (like meters, widgets, dollars) | 07:37 | ||
That's where the enumerated types started showing up.... Maybe they should be full blown classes | 07:38 | ||
Regardless, you guys have been great at giving me feedback on this here | 07:40 | ||
It's not a totally baked suggestion yet, and like sorear showed me, I don't have my terminology sorted out yet | 07:42 | ||
07:42
SamuraiJack left
|
|||
dalek | d: d93fffe | larry++ | / (5 files): checkpoint STD_P5 mods in case of a bus currently parsing 831 lines of viv |
07:43 | |
TimToady | the basic principle is that we don't like accidentally generic code, but you can have intentionally generic code if you declare it so | 07:44 | |
most L18n turns out to be accidentally generic | |||
07:44
SamuraiJack joined
|
|||
TimToady | so we tend to dislike locales intensely | 07:45 | |
TimToady goes to see the parade & | |||
MikeFair_ | TimToady: That's interesting... My experience was that it was maddeningly abstract because everything had to be done explicitly | 07:46 | |
TimToady: I can appreciate not wanting anything to happen by accident. | 07:47 | ||
TimToady: I haven't quite decided if I like locales yet or not. I clearly appreciate the problem they are attempting to solve and think it's a decent first attempt approach at it. | 07:49 | ||
sorear: And for what it's worth, I'm not about to ask you to rewrite anything. It's my itch to scratch if I feel so strongly about it right. :) | 07:50 | ||
Thanks guys, good night! :) | 07:51 | ||
sorear: So I couldn't resist following up on Intercal before I went to bed. :) | 08:00 | ||
sorear: It's pretty hilarious, and I clearly described almost every single one of its idiosyncrocies | 08:01 | ||
sorear: That's funny | |||
gnight | 08:04 | ||
sorear | gnight | ||
masak | I can see the use for localization. much of the time even s/use/requirement/. | 08:16 | |
(morning, #perl6) | |||
08:17
popl left
|
|||
masak | but I also think I agree about overgeneralizing it being a bad idea. | 08:17 | |
i18n libs probably become one of those things where you use <10% of the provided functionality, and the rest is dead weight. | |||
sorear | good morning masak. | 08:18 | |
08:18
Psyche^ joined
|
|||
sorear | in sweden yet? | 08:18 | |
masak | sorear: morning. yes, been in Sweden since late wednesday evening. :) | 08:19 | |
08:19
Patterner left,
Psyche^ is now known as Patterner
|
|||
masak | sorear: how was the flight back? was the jetlag going west easier to take than the one going east? | 08:20 | |
sorear | I don't think I particularly experienced it either way | 08:22 | |
I went to sleep quite early Fri night, but I think that was a function of not sleeping ~at all Thu night | 08:23 | ||
masak | oh, good to hear. | ||
sometimes jet lag can be quite bad, but it seems you didn't have any of that, then. | |||
sorear | Probably the best way to put it is that jet lag was the least of my problems | 08:26 | |
shachaf always finds GMT+2 -> GMT-8 much easier than GMT-8 -> GMT+2 | 08:27 | ||
sorear | also, when I arrived in GMT+2 I landed in an extremely regimented environment | 08:28 | |
Liz and Wendy basically planned out all of our waking hours in advance | |||
masak | shachaf: it seems to vary from person to person. I find going west slightly bothersome, because I *really* need sleep when I get there. | 08:31 | |
moritz | just limit your travel speed to what you can do by foot (or horse or ship or bycicle) | 08:32 | |
sorear wonders if you can get jet lag on foot deep in the Arctic | 08:33 | ||
jnthn or anyone else who is interested: I am toying with some ideas for changing lexical package handling in Niecza and I'd like feedback | 08:35 | ||
masak is interested | 08:42 | ||
moritz | www.pm.org/ has a new design | ||
I am also interested, but I don't think I can provide the feedback level that sorear++ seeks | 08:43 | ||
masak | oh, I don't think so either. still, I'm willing to listen. maybe I can be the teddy bear outside the sysadmin's office ;) | ||
FROGGS_ | ya, just listen and nod ;o) | 08:44 | |
masak nods | |||
08:44
FROGGS_ is now known as FROGGS
|
|||
FROGGS | I'm interested too btw, but since I started hacking perl6 just a few days ago I won't be of any help | 08:45 | |
sorear | well we have a couple of obvious use cases that simply don't work | 08:46 | |
because lexicality of package names is limited to the first level only | 08:47 | ||
if you do 'class Foo::Quux {}; { my class Foo::Bar {}; #`( code here ) }' the outer Foo::Quux cannot be seen because Foo is shadowed by the inner lexical package | 08:48 | ||
so far it seems like a DIHWIDT but it really causes problems with lexical imports | |||
use Test; use Test::More; # this doesn't look quite so contrived now does it? | 08:49 | ||
niecza & rakudo have no way to create a true lexical Test::More, so they bind the second import to 'More' in the Test:: package | |||
but Test:: isn't private to the compilation unit | |||
you've just polluted the Test module's namespace | 08:50 | ||
and anything else in your program that does 'use Test' will see Test::More because of the shared package hash | |||
so basically what I want to do is to allow lexical names like Test::More | 08:51 | ||
possibly in a preparsed format | |||
masak | rn: class Foo::Quux { our $x = "OH HAI"; }; { my class Foo::Bar {}; say $Foo::Quux::x } | ||
sorear | this would require a bit of smarts in the MY:: name resolver, but it seems doable | ||
p6eval | niecza v19-44-g55e895a: OUTPUT«(timeout)[auto-compiling setting]» | 08:52 | |
..rakudo 196572: OUTPUT«OH HAI» | |||
masak | sorear: "cannot be seen..."? it seems to work at least in Rakudo. | ||
as I would very much expect it to. | |||
sorear | masak: rakudo is breaking the other way, then | 08:53 | |
masak | could you demonstrate "breaking the other way" on p6eval? | ||
sorear | class Foo::Quux { our $x = "OH HAI"; }; { my class Foo::Bar { our $x = "In FooBar"; }; }; say $Foo::Bar::x | ||
rclass Foo::Quux { our $x = "OH HAI"; }; { my class Foo::Bar { our $x = "In FooBar"; }; }; say $Foo::Bar::x | |||
r: class Foo::Quux { our $x = "OH HAI"; }; { my class Foo::Bar { our $x = "In FooBar"; }; }; say $Foo::Bar::x | |||
p6eval | rakudo 196572: OUTPUT«In FooBar» | ||
masak | hm. | ||
yeah, that seems odd. | 08:54 | ||
sorear | I think STD did something similar to what I'm proposing | 08:55 | |
I thought it was insane in 2010 but now I'm coming around | |||
moritz doesn't see the breakage | 08:56 | ||
there's just one $Foo::Bar::x | |||
and you assign twice to it, so of course it prints the second value | 08:57 | ||
sorear | No, I only assign once to it | ||
masak | moritz: it's visible outside the lexical scope of Foo::Bar | ||
sorear | Foo::Bar is a my package, it ought not to be visible from outside the blcok | 08:58 | |
moritz | masak: sure, because you said "our" | ||
ok, so the real question is "what does 'our' mean"? | |||
masak | moritz: something *inside* a 'my' package is visible outside of that 'my' package's scope. | ||
sorear | r: class Foo::Quux {}; { my class Foo::Bar { method hi() { "OH HAI" }; }; }; say Foo::Bar.hi | ||
p6eval | rakudo 196572: OUTPUT«OH HAI» | ||
sorear | # look moritz no our in sight | ||
I used to think this is OK, but MikeFair_ made me take a step back | 08:59 | ||
masak | moritz: it'd be like the hash keys of a lexical hash variable could be declared "our" and then made visible outside of the hash's lexical scope. | ||
moritz | masak: that's totally analogous to { our $x = 3; } ; our $x; say $x | ||
masak: there you have a lexical block, and you can still see an our-variable from the outside | |||
sorear | r: my class Foo::Quux {}; { my class Foo::Bar { method hi() { "OH HAI" }; }; }; say Foo::Bar.hi | ||
p6eval | rakudo 196572: OUTPUT«OH HAI» | ||
masak | moritz: no, it's not analogous. because the package that $x is declared in there is an 'our' package. | 09:00 | |
moritz | sorear: so the problem is that namespaces with :: only work as 'our'? | ||
sorear | Yes | ||
masak finds that while he may not be very informed on these issues, he certainly is opinionated ;) | 09:01 | ||
sorear | It's clearly working as designed | ||
moritz | ok, crazy idea | ||
what if we just stored 'Foo::Bar' in a lexical scope? | 09:02 | ||
if it's my class Foo::Bar { } | |||
instead of going through the Foo/Bar hierarchy | |||
sorear | moritz: that's what I just proposed, only more concisely. moritz++ | 09:03 | |
moritz | that means I'm not totally off track then :-) | ||
sorear | the single biggest flaw I see is that it breaks the Foo::Bar - Foo.WHO<Bar> equivalence | 09:04 | |
which ISTR jnthn being fond of | |||
moritz | I haven't really thought it through | 09:05 | |
what about our-classes? | |||
if we have | |||
our class A::B { our class C::D { } } | |||
and | |||
our class A { our class B::C { } } | 09:06 | ||
etc. | |||
masak | I'm for the above idea too. in fact, I thought it worked like that already. | ||
moritz | can we make sure that lookup of A::B::C::D doesn't have to go through ridiculously many possible combinations? | ||
sorear | moritz: I was imagining that lexicality only applies to prefixes, and greedily takes the longest | 09:07 | |
I'll go look at what STD is doing | |||
moritz tries to process that | 09:08 | ||
std: A::B | |||
p6eval | std d93fffe: OUTPUT«===SORRY!===Undeclared name: 'A::B' used at line 1Check failedFAILED 00:00 40m» | ||
moritz | std: my class A::B { our class C::D { } }; C::D | ||
p6eval | std d93fffe: OUTPUT«===SORRY!===Undeclared name: 'C::D' used at line 1Check failedFAILED 00:00 41m» | ||
moritz | std: my class A::B { our class C::D { } }; A::B::C::D | ||
p6eval | std d93fffe: OUTPUT«ok 00:00 41m» | ||
sorear | is A::B::C::D in %*CURLEX? No. Is A::B::C? No. Is A::B? Yes! (alias installed by our class). Let's look for C::D under the A::B class alias | ||
masak | right. | 09:09 | |
moritz | and if not, you still have to go looking A, right? | ||
masak | so it's not "ridiculously many possible combinations", it's a linear thing. | ||
moritz | and then in A, look for B::C::D, recursively | ||
oh no | |||
masak | hm, troo. | ||
moritz | now I understand | ||
I think what sorear++ meant was that this is only done for the first level | 09:10 | ||
so no recursion | |||
sorear | right | ||
because the package entries point to packages, not lexpads | |||
recursion wouldn't make sense, typologically | |||
masak | oh good. | 09:11 | |
I don't understand why that is, but I'm releaved that it is :) | |||
moritz | masak: a use case for macros \o/ blog.racket-lang.org/2012/08/fully-...-sort.html | 09:12 | |
masak | moritz: nice. | 09:13 | |
moritz | that could be kind of a "man-or-boy" test for a macro implementation :-) | ||
masak | moritz: I think with what's in nom now, we can do that. let me try during the day :0 | ||
:) | |||
moritz++ | 09:14 | ||
felher wants to see that using perl6 macros :) | |||
sorear | o/ felher | ||
felher | o/ sorear | 09:15 | |
moritz | I don't want to discourage you, but I wonder how recursive macros can work when there's a big bug in the hygiene | 09:17 | |
masak | heh :) | ||
it's big bug, but I expect to find and fix that one quickly. | |||
09:17
birdwindupbird left
|
|||
masak | I'm more concerned about the other, more subtle bug that I know about. | 09:17 | |
sorear | What big bug? | ||
masak | sorear: seems unquotes get the macro's lexical scope, not the mainline's. | 09:18 | |
r: macro foo($x) { my $v = "inside"; quasi { {{{$v}}}() } }; my $v = "outside"; say foo sub { $v } | |||
p6eval | rakudo 196572: OUTPUT«===SORRY!===Can not get non-existent attribute '$!past' on class 'AST'» | ||
masak | :/ | 09:19 | |
ok, that's not the failure mode I wanted to demonstrate.... | |||
moritz | irclog.perlgeek.de/perl6/2012-08-25#i_5930171 | 09:20 | |
masak | r: macro call($a) { my $x = "how very"; quasi { say $x; {{{$a}}}() } }; my $x = "lexical"; call { say $x } | ||
p6eval | rakudo 196572: OUTPUT«how veryhow very» | ||
masak | r: macro foo($x) { my $v = "inside"; quasi { {{{$v}}}() } }; my $v = "outside"; say foo { say $v } | ||
p6eval | rakudo 196572: OUTPUT«===SORRY!===Can not get non-existent attribute '$!past' on class 'AST'» | ||
masak | r: macro foo($x) { my $v = "inside"; quasi { say $v; {{{$v}}}() } }; my $v = "outside"; say foo { say $v } | 09:21 | |
p6eval | rakudo 196572: OUTPUT«===SORRY!===Can not get non-existent attribute '$!past' on class 'AST'» | ||
masak | hm... what's different between 'call' and 'foo'? | ||
oh! | |||
r: macro foo($x) { my $v = "inside"; quasi { say $v; {{{$x}}}() } }; my $v = "outside"; foo { say $v } | |||
p6eval | rakudo 196572: OUTPUT«insideinside» | ||
masak | there we go. | ||
ah, and the LTA error message is because there's not AST typecheck on unquote trees. | 09:22 | ||
masak makes a note to add that ASAP | |||
ChoHag | Well that's a bit shit. Emacs thinks the contents of a heredoc is just more code and tries to indent it. | 09:23 | |
(Not perl 6, just randing) | 09:24 | ||
(ranting) | |||
sorear | to be fair multiline contextual constructs like regex blocks and heredocs and pod blocks are pretty hard on editors in general | 09:25 | |
masak | they're pretty hard on parsers, too :) | ||
sorear | I think it would be nice if we had single-line versions of the abovew | ||
ChoHag | Single-line multi line heredocs? | 09:26 | |
sorear | ChoHag: you can make a block comment editor-friendly by prefixing each line with # | ||
what if there was something you could use to prefix each line of a heredoc? | 09:27 | ||
ChoHag | Ah. | ||
sorear | masak: a code-aware editor is a parser that has to be able to parse malformed documents starting from the middle of the file :D | ||
masak | something like that. | ||
seems to me a savvy editor would save intermediate parse states in order not to have to parse the whole document each time. | 09:28 | ||
sorear | editing STD.pm6 gets very annoying when vim's highlighter decides to start in the middle of a regex and then messes up the entire screen | ||
well, you can do that, but then any edit requires a huge amount of reparsing | |||
ChoHag | If when parsing you save the state of the parse every n-hundred bytes, then a change at byte 706 doesn't have to parse the first 700 bytes. | 09:30 | |
And the rest can be ignored until it's visible. | |||
Or something like that. | |||
09:32
broquaint joined
|
|||
sorear | wait. | 09:33 | |
n: say qq:to[OUTER]; hello { qq:to[INNER] } world insidestuff INNER more stuff OUTER | 09:34 | ||
p6eval | niecza v19-44-g55e895a: OUTPUT«(timeout)[auto-compiling setting]» | ||
sorear | evalbot control restart | ||
09:34
p6eval left
09:36
p6eval joined
09:37
ChanServ sets mode: +v p6eval
|
|||
sorear | moritz, why do I get rsync error: unexplained error (code 255) at io.c(605) [sender=3.0.9] when p6eval restarts? | 09:37 | |
n: say qq:to[OUTER]; hello { qq:to[INNER] } world insidestuff INNER more stuff OUTER | |||
p6eval | niecza v19-44-g55e895a: OUTPUT«Unhandled exception: Here document used before body defined at /home/p6eval/niecza/boot/lib/CORE.setting line 1402 (die @ 5)  at /home/p6eval/niecza/src/Op.pm6 line 331 (HereStub.zyg @ 5)  at /home/p6eval/niecza/src/Op.pm6 line 23 (Op.ctxzyg @ 4)  … | ||
sorear | perl 6: might be the first language to support NESTED HERE DOCUMENTS | 09:39 | |
dalek | albot: 3bb2f7e | sorear++ | evalbot.pl: p6eval only sees the costs of installable mode, so force inplace mode for niecza |
09:40 | |
moritz | sorear: I have no clue | 09:41 | |
sorear | I found the problem | ||
I ran 'git pull' in the evalbot dir and it pulled changes to rsync handling | 09:42 | ||
which had been in the github repo but not live since Aug 2 or so | |||
09:45
p6eval left,
p6eval joined,
ChanServ sets mode: +v p6eval
|
|||
sorear | moritz: what is "ulimit -u 80" intended to accomplish? | 09:45 | |
looks like on feather3 "ulimit -u" is supported by bash but not by dash | 09:47 | ||
masak | hm, I can't really use dies_ok with macros I know are going to fail during application... | 09:48 | |
(because application is at compile time) | |||
I think I will need to use an eval() there. | |||
sorear | you need to use ... eval_dies_ok! | 09:49 | |
masak | ah! | ||
sorear | and put the macro inside the eval block, hmm | ||
mst | p3rl.org/Test::Fatal | ||
^^ this API replaces all the Test::Exception rubbish nicely | |||
simpler, more orthogonal, more pleasant to work with | |||
masak | mst: I've seen that one before. it's nice. | 09:50 | |
agree about "more orthogonal". | |||
mst | the only reason Test::Exception is useful is that it can do various bits of caller() and etc. hackery and my argument would be that that's more a "working around 5core limitations" thing than a feature | ||
09:51
JimmyZ joined
|
|||
masak | it might be too late to do a full switchover for S24 :/ | 09:51 | |
mst | what's S24 ? | ||
masak | the testing synopsis. | ||
I'm guessing it specifies eval_dies_ok et al. | |||
if people think it's a good idea to make Perl 6's Test.pm API more like Test::Fatal, I'm willing to work on that a bit. | 09:52 | ||
essentially try it out in a branch and prepare a patch that switches us over. | |||
mst | I would suggest that, instead, you add the exception { ... } construct | ||
and then wait and see which you find it easier to explain to people how to write tests using | |||
masak | nod. | ||
I like that idea. | 09:53 | ||
mst | since it occurs to me that the converse of my previous statement could be valid as well | ||
moritz | there's no reason not provide both for a while | ||
masak | right. | ||
mst | in that it may be that it's the workarounds ib T::Exception | ||
masak | mst++ # suggestion | ||
mst | that make Test::Fatal superior | ||
also, one could build the lives_ok etc. -atop- the exception { construct | |||
once they become trivial sugar | |||
I mean | |||
lives_ok = f ($block, $words) { is(!exception($block), $words); }; | 09:54 | ||
for example | |||
dalek | ast: 7e37729 | masak++ | S06-macros/macros-d2.t: [S06-macros/macros-d2.t] new test file |
||
mst | then they're hardly going to be a maint bruden | ||
masak: while I'm here I'd like to help ensure that #perl6 avoids as many perl5 mistakes as possible | 09:55 | ||
dalek | kudo/nom: d21d35d | masak++ | t/spectest.data: [spectest.data] added macros-d2.t |
||
moritz | note that either you'd need to write isa_ok exception({block}), X::Foo # with parens | ||
masak | reviews on the above file are very welcome. | ||
mst | masak: that way you can make all new mistakes that I can learn something from :D | ||
moritz | or we'd have make exception a prefix operator | 09:56 | |
masak | "Perl 5 and Perl 6: two very good sets of complementary mistakes" | ||
moritz | (because we have no function prototypes in p6) | ||
masak: reviewing | 09:57 | ||
masak: first of all, can haz better tets file name puleze? | |||
d2 makes sense from your perspective, but not from anybody elses | |||
masak | moritz: good point. I can do that. | 09:58 | |
moritz | after reading "macro podolsky" I went like "and where is rosen"? | ||
and then I scrolled down | |||
masak++ | |||
masak | :) | 09:59 | |
moritz | masak: the last test is wrong | ||
masak: 'cause eval_dies_ok evals in the context of eval_dies_ok, not in the context of your sub | |||
s/sub/code/ | 10:00 | ||
so it doesn't see macro bohm | |||
(which is why the test succeeds, even though the feature you are trying to test doesn't work | |||
masak | moritz: er. | 10:01 | |
10:01
crab2313 left
|
|||
masak | moritz: oh! | 10:01 | |
moritz: you're saying eval_dies_ok's context is inside of Test.pm? | |||
moritz | masak: correct | ||
masak | because it's a string, so it doesn't have closure semantics.... | ||
shoulda seen that, yes. | |||
moritz | I'd love to change that, it's a very common mistake | ||
but &eval doesn't have an option for evalling in a different context | 10:02 | ||
sorear | masak: what was the bug with einstein? | 10:03 | |
02:49 < sorear> and put the macro inside the eval block, hmm | |||
moritz | (&eval is probably the wrong abstractioin level to add that though. We should have a &compile function that compiles the code but doesn't run it yet, and that one can have such strings and wires attached like compiling in a different context) | ||
masak | sorear: einstein works in rakudo. | 10:04 | |
sorear: podolsky doesn't currently, even though it should be equivalent. | 10:05 | ||
& | |||
moritz | [1] 8244 | ||
now you can just type 'fg 1' to summon masak++ again :-) | 10:06 | ||
ChoHag | Free ++ with every &? | 10:07 | |
sorear | OH | ||
10:08
drejk joined,
spider-mario joined
|
|||
sorear | r: macro foo() { quasi { 2 }; }; say foo | 10:09 | |
p6eval | rakudo d21d35: OUTPUT«2» | ||
sorear | r: macro foo() { my $q = quasi { 0 }; $q = quasi { 1 + {{{$q}}} } for ^5; $q }; say foo | ||
p6eval | rakudo d21d35: OUTPUT«1» | ||
sorear | nm | 10:10 | |
& | |||
moritz | r: macro upto($a, $b) { return quasi { $a } unless $b; return upto(quasi { 1 + {{{$a}}} }, $b - 1 }; say upto(0, 5) | 10:11 | |
p6eval | rakudo d21d35: OUTPUT«===SORRY!===Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2, near "}; say upt"» | ||
moritz | r: macro upto($a, $b) { return quasi { $a } unless $b; return upto(quasi { 1 + {{{$a}}} }, $b - 1) }; say upto(0, 5) | ||
p6eval | rakudo d21d35: OUTPUT«===SORRY!===Cannot call 'Numeric'; none of these signatures match::(Mu:U \v, Mu *%_)» | ||
10:15
drejk left
|
|||
ChoHag | Does perl 6 have a DBI-like (specifically, postgres) module? | 10:18 | |
arnsholt | jnthn: Any particular reason NativeHOW.nativesize expects an argument besides the invocant, since it just returns the size? | 10:20 | |
FROGGS | ChoHag: github.com/perl6/DBIish/ | ||
since its on modules.perl6.org I can guess its in rakudo*? | |||
ChoHag | Cheers | 10:22 | |
moritz | FROGGS: the reasoning isn't valid, but it's still in R* | 10:29 | |
and yes, it supports postgresql. With prepared statements and placeholders | 10:30 | ||
. | |||
arnsholt | Mmmm. Debug printf output in my compiler ^_^ | 10:47 | |
10:48
MayDaniel joined
|
|||
moritz | are you debugging output from printf? or using printf to debug? | 10:53 | |
arnsholt | The latter, thankfully =) | 10:55 | |
Making sure I get the right numbers in my metamodel hackery (actually storing and using sizes for native types) | |||
FROGGS | arnsholt: I can pass my callback sub just like: thing_that_takes_a_cb( &subname ) | 11:28 | |
right? | |||
arnsholt | Yup | ||
FROGGS | passing a anonymous sub and passing a $subref doesnt work right now? | 11:29 | |
arnsholt | Dunno, TBH | 11:30 | |
Did you try? | |||
FROGGS | I did, no warnings, but the callback doesnt get called | 11:31 | |
arnsholt | Huh. That's a bit odd, I guess | ||
I'll try to look into it | 11:33 | ||
FROGGS | cool, great, thanks | 11:34 | |
11:35
tokuhiro_ joined
|
|||
FROGGS | passung Mu as the arg will end up as a NULL in C? | 11:35 | |
passing | |||
arnsholt | I think so | 11:36 | |
But most often you'll want to pass the type object | |||
FROGGS | I mean, it works as expected (callback get unregistered) but I want to make sure | 11:37 | |
type object? | |||
like the type identifier of a subroutine reference? | 11:38 | ||
is it "Code"? | |||
11:40
whiteknight joined,
tokuhiro_ left
|
|||
FROGGS | k, passing Code works too... its like it is some sort of bitch, no complains, just takes everything | 11:40 | |
11:46
thelazydeveloper joined
11:49
MayDaniel left
|
|||
arnsholt | FROGGS: The type object is part of the meta-object protocol | 11:57 | |
dalek | ast: 8e15845 | masak++ | S06-macros/macros-d2.t: [macros-d2.t] fix mis-context moritz++ for pointing this out: strings aren't passed as closures, and eval_dies_ok evaluates things in Test.pm's lexical context. moving the macro into the string fixes it. |
11:58 | |
arnsholt | When you say "my $x = Something.new" or "my Something $x .= new" what happens is that a method is invoked on the Something metaobject | ||
And the type object of a class is used as a typed undef value, which makes sense for NULL values | 11:59 | ||
dalek | ast: 0710d57 | masak++ | S06-macros/ (4 files): [S06-macros] gave test files more descriptive names moritz++ for suggestion. now they are not tied to the grant milestones, but to what functionality they exercise... just like the rest of the test suite. |
12:00 | |
12:00
kaare_ left
|
|||
dalek | kudo/nom: f7ec305 | masak++ | t/spectest.data: [spectest.data] chased macro test files rename |
12:02 | |
12:23
tokuhiro_ joined
12:28
tokuhiro_ left
12:29
tokuhiro_ joined
12:34
tokuhiro_ left
12:42
DrEeevil is now known as bonsaikitten
|
|||
arnsholt is starting to really like tmux | 13:02 | ||
13:08
cognominal left
13:10
cognominal joined
|
|||
JimmyZ is using byobu, which is tmux-based | 13:13 | ||
masak | ah; nice name for a screen-like application :) | 13:14 | |
arnsholt | Hmm. Looks interesting | 13:16 | |
Although, I already have much of what it prints out in my xmobar status line | 13:17 | ||
13:18
birdwindupbird joined
|
|||
FROGGS | arnsholt: is there a way to declare default argument values using NativeCall? like: our sub my_sub( int $a, int $b = -1) is native ... | 13:18 | |
when trying it and calling this sub with only one arg I get a coredump | |||
arnsholt | Don't think that'll work | ||
What you'll probably want to do if you want that functionality is create a wrapper Perl 6 function that calls the dyncall function | 13:19 | ||
FROGGS | is it on the wishlist already? :P | ||
arnsholt | Nope, hadn't really considered that one | ||
FROGGS | arnsholt: I did that too (wrapper func), but it crashes as well | ||
arnsholt | That's odd... | ||
FROGGS | ya | ||
the subs have different names btw, its no multi stuff | |||
arnsholt | What happens if you just call the C function directly? | 13:20 | |
FROGGS | when I call it with all args, it does what it should (plays music actually) | ||
arnsholt | That's odd | 13:21 | |
Could you gist the relevant bits, perhaps? | |||
FROGGS | that crashes: github.com/PerlGameDev/SDL6/blob/f...ls.pm6#L10 | ||
its not much though | 13:22 | ||
arnsholt | Huh. Odd | 13:23 | |
Not sure what's going on | 13:26 | ||
Could you try running it through gdb? | |||
See where it segfaults | |||
FROGGS | I will, gtg for a walk now, will report to you then | 13:29 | |
arnsholt | Excellent | 13:30 | |
13:33
MayDaniel joined
13:46
josp joined
13:47
josp left,
kaare_ joined
|
|||
masak | nwc10++ # nicest "how do I unsubscribe?" reply I've ever read, on p6c | 13:49 | |
I also found myself thinking "whatever this guy has a PhD in, I bet it isn't mailing lists" :) people have different backgrounds. | 13:50 | ||
13:55
daxim joined
14:12
marmay joined
|
|||
frettled | masak: yep. And looking in message headers isn't necessarily trivial in a modern GUI-based email client, they mostly hide it somewhere for experts. | 14:13 | |
14:15
simcop2387 left,
simcop2387 joined
|
|||
masak | I'm not sure I'd think to look there, actually. | 14:17 | |
frettled | One of the points of the list-headers is to make it easy for email clients to identify mailinglists _and_ to unsubscribe. Look at how well that's panning out. :( | 14:18 | |
masak likes this quote from the distant past: irclog.perlgeek.de/perl6/2005-06-28#i_-584545 | 14:21 | ||
pmichaud | good afternoon, #perl6 | 14:22 | |
ChoHag | How do you call up the pod of an installed module? | 14:23 | |
geekosaur | as for the list headers, they are indeed for clients. don't think I've seen a clientother than gmail that offers unsubscribe etc. to the actual user | ||
14:24
xinming joined
|
|||
masak | good morning, pmichaud. | 14:24 | |
ChoHag | Reality isn't all it's cracked up to be. | 14:25 | |
It can barely be said to exist, for one thing. | |||
pmichaud | ...morning? | ||
hmmmm | |||
masak | pmichaud: UGT, Universal Greeting Time. | ||
pmichaud | wfm | ||
it's morning in #perl6, the dawn of a new era | |||
or something like that. | |||
arnsholt | jnthn is at the MOP hacakthon thingy these days, right? | 14:38 | |
14:50
kst left
|
|||
pmichaud | arnsholt: yes. | 14:53 | |
14:53
Circlepuller joined
|
|||
spider-mario | I now provide arch linux builds of rakudo star. :) | 14:56 | |
14:56
Circlepuller_ left
|
|||
spider-mario | a pacman repository. | 14:56 | |
[rakudo] | 14:57 | ||
Server = spidermario.free.fr/archlinux/$repo/$arch | |||
masak | \o/ | 14:59 | |
ChoHag | Are there docs anywhere describing a simple perl6 tcp server? | 15:01 | |
Also, has anything like an http daemon been written, or even something more freaky like rest or soap? | 15:02 | ||
JimmyZ | ChoHag: github.com/tadzik/Bailador | 15:05 | |
ChoHag | That looks even better. | 15:06 | |
pmichaud | ChoHag: : github.com/mberends/http-server-simple/ | ||
I'm afk for a while -- bbl | 15:07 | ||
JimmyZ | ChoHag: and github.com/tadzik/zblog | ||
15:10
GlitchMr joined
15:13
perl5 joined
|
|||
masak | perl5: hi. I saw you on the back of lots of YAPC::Europe t-shirts. :) | 15:14 | |
15:16
perl5 left
15:24
ponbiki joined
|
|||
jnthn | ohhai o/ | 15:28 | |
arnsholt | jnthn: \o/ | 15:30 | |
I'm having some trouble extracting the nativesize stuff in the P6{int,num} REPRs | 15:32 | ||
masak | jnthn! \o/ | 15:34 | |
jnthn | arnsholt: I could tell you how, but I'm gonna change the answer pretty shortly... | ||
arnsholt | Aha. Might as well wait for the new answer then =) | 15:35 | |
jnthn | dammit, libuv builds fine as a .lib but I can't get it to build as a .dll | ||
15:36
JimmyZ left
|
|||
ingy | greetings. seeking 2 things. 1) the current perl6 grammar. 2) A succinct idiom comparison between perl5 and perl6. | 15:40 | |
masak | ingy: (1) github.com/perl6/std/blob/master/STD.pm6 | 15:42 | |
diakopter | (2) that would be lovely to me as well | 15:43 | |
masak | I've seen such documents, but it's been a while. | ||
ingy | thanks! | 15:51 | |
15:51
flussence left,
flussence joined
|
|||
arnsholt | jnthn: FROGGS gets what looks like a decontainerize of something that isn't a container in github.com/PerlGameDev/SDL6/blob/f...ls.pm6#L10 (in play_channel) | 16:04 | |
Backtrace at nopaste.info/2f9f16692a.html | |||
16:04
marmay_ joined
|
|||
arnsholt | Doesn't look like it's the literal -1 that's it. Any thoughts on what it might be? | 16:05 | |
16:05
tokuhiro_ joined
|
|||
arnsholt | FROGGS: Oh. What happens if you remove the type decorations of the args in play_channel? | 16:06 | |
FROGGS | how should I pass the args then? | ||
is there a $_ or @_? | 16:07 | ||
or is it like (shift, shift, shift)? | |||
arnsholt | Oh, you can leave the argument list, but try making it play_channel( $channel, $sample, $loops ) | 16:08 | |
FROGGS | ahh, misread | ||
will try | |||
16:08
marmay left
|
|||
FROGGS | its working | 16:08 | |
I need to recheck that I did no mistake | 16:09 | ||
16:10
tokuhiro_ left
|
|||
arnsholt | Excellent! | 16:11 | |
16:11
saran joined
|
|||
arnsholt | Looks like native typed args don't end up in containers | 16:11 | |
FROGGS | ya, it fails again if I add the "int" to the first arg | ||
16:11
saran left
|
|||
arnsholt | Which then explodes when we try to decontainerize | 16:11 | |
16:11
spider-mario left
16:16
Circlepuller_ joined
16:17
saran joined
16:19
snearch joined,
Circlepuller left
16:24
Circlepuller joined
16:27
Circlepuller_ left
16:31
saran_ joined
|
|||
arnsholt | FROGGS: I think I've figured out what the problem is. I'll prod you when it's fixed | 16:31 | |
pmichaud | back again | 16:32 | |
16:33
saran_ left
|
|||
pmichaud | reading backscroll and email | 16:34 | |
16:34
saran left
|
|||
FROGGS | arnsholt++ | 16:39 | |
thank you ;o) | |||
arnsholt | Well, I didn't fix it yet =) | 16:40 | |
FROGGS | ya, but guessing the problem is the hardest part most times | ||
16:43
birdwindupbird left
16:47
marmay_ left
17:11
am0c joined
17:15
benabik left
17:16
benabik joined
17:21
spider-mario joined
|
|||
arnsholt | jnthn: What's the best way to get access to smo_id (in sixmodelobject.c) from nqp_dyncall.ops? | 17:38 | |
dalek | c: a5c90a5 | moritz++ | / (2 files): X::Mixin::NotComposable |
17:40 | |
tadzik | 0901 sorear | anyways, I had a hell of a time getting Niecza to run on | 17:43 | |
| tadzik's machine | |||
dalek | ecs: c80acf9 | moritz++ | S32-setting-library/Exception.pod: [S32::Exception] rename an exception class, for consistency |
||
tadzik | ...when were you... oh, I remember the case now | 17:44 | |
good evening #perl6 | |||
moritz | \o tadzik | ||
arnsholt | Nm. Found it | 17:45 | |
dalek | c: 5f9c9f4 | moritz++ | lib/X/NoDispatcher.pod: X::NoDispatcher |
17:46 | |
c: 278a4cd | moritz++ | lib/X/Declaration/Scope/Multi.pod: X::Declaration::Scope::Multi |
17:48 | ||
c: 0edd594 | moritz++ | lib/X/Syntax/Variable/Twigil.pod: X::Syntax::Variable::Twigil |
17:52 | ||
c: 4bb78ba | moritz++ | lib/X/Syntax/Self/WithoutObject.pod: X::Syntax::Self::WithoutObject |
17:54 | ||
masak | good morning, tadzik. | 17:56 | |
rn: constant o = 42; \o | |||
p6eval | rakudo f7ec30, niecza v19-44-g55e895a: ( no output ) | ||
masak | rn: constant o = 42; say \o | ||
p6eval | niecza v19-44-g55e895a: OUTPUT«\(42)» | ||
..rakudo f7ec30: OUTPUT«42» | |||
colomon | rn: constant o = 42; say o | 18:04 | |
p6eval | rakudo f7ec30, niecza v19-44-g55e895a: OUTPUT«42» | ||
benabik | rn: constant o = 42; say \o/ 1 | 18:07 | |
p6eval | rakudo f7ec30: OUTPUT«1» | ||
..niecza v19-44-g55e895a: OUTPUT«Unhandled exception: Cannot use value like Capture as a number at <unknown> line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/lib/CORE.setting line 293 (Any.Numeric @ 6)  at <unknown> line 0 (ExitRunloop @ 0)  at /tmp/veIlHDuYsG line 1 (mainline @ 4… | |||
benabik | Amusing. | ||
18:07
snearch left
|
|||
moritz | nr: say Capture ~~ Cool | 18:09 | |
p6eval | rakudo f7ec30, niecza v19-44-g55e895a: OUTPUT«False» | ||
dalek | kudo/nom: bd23ad4 | moritz++ | src/core/ (2 files): rename an exception class |
18:10 | |
ast: d4fa5e8 | moritz++ | S32-exceptions/misc.t: follow exception class rename |
|||
moritz | nr: sub f(::T) { class A is T { } } | 18:24 | |
p6eval | niecza v19-44-g55e895a: OUTPUT«===SORRY!===GLOBAL::T does not name any package at /tmp/EYl_nY1i4o line 1:------> sub f(::T⏏) { class A is T { } }A type must be provided at /tmp/EYl_nY1i4o line 1:------> sub f(::T⏏) { class A is T… | ||
..rakudo f7ec30: OUTPUT«===SORRY!===Cannot type check against type variable Tat /tmp/aUJgGyqScX:1» | |||
18:28
odoacre left
|
|||
masak | how is '\o/' parsed above in benabik's evaluation? | 18:30 | |
benabik | masak: It seems to be parsed as \o / 1, given that neicza complained about capture to number. | ||
dalek | blets: 4eff6da | (Herbert Breunung)++ | docs/ (3 files): removing noneexisting book |
18:34 | |
masak | r: constant o = 42; say o/ | ||
p6eval | rakudo f7ec30: OUTPUT«===SORRY!===Confusedat /tmp/Q8b9OJmTkQ:1» | ||
masak | r: constant o = 42; say \o/ | ||
p6eval | rakudo f7ec30: OUTPUT«===SORRY!===Confusedat /tmp/ATzNEqDZUn:1» | ||
benabik | masak: I used \o/ 1 | ||
masak | oh! :) | ||
benabik | :-D | ||
masak | mystery solved :) | ||
sneaky ;) | |||
18:35
xinming left
18:36
xinming joined
18:37
daxim left
18:47
larks left
|
|||
dalek | c: 19f2c5a | moritz++ | lib/X/Syntax/P5.pod: X::Syntax::P5 |
18:47 | |
18:49
larks joined
18:51
popl joined
|
|||
masak .oO( Perl 6 is so different, Perl 5 is represented in it as an exception type ) :P | 18:51 | ||
moritz | the Pod:: classes need documentation | 18:52 | |
any takers? | 18:53 | ||
masak: oh, and the Macro class needs documentation | |||
r: macro a { }; say &a.WHAT | |||
p6eval | rakudo f7ec30: OUTPUT«Macro()» | ||
masak | noted. | ||
moritz | \o/ | ||
moritz imagines the memo percolating to the different masak clones | 18:54 | ||
masak | "A macro is a Routine whose invocation typically happens during parsing." | ||
or s/m/M/ perhaps. | |||
moritz | r: say Macro.^mro | 18:56 | |
p6eval | rakudo f7ec30: OUTPUT«Macro() Routine() Block() Code() Any() Mu()» | ||
moritz | why doesn't it inherit from Sub? | ||
masak | why should it? | 18:57 | |
why doesn't Method inherit from Sub? | |||
moritz | because it's very sub-like | ||
masak | so is Method. | ||
moritz | nonono | ||
masak | sure it is. | ||
moritz | methods are scoped differently by default | ||
and are usually called in a different way | |||
masak | so are macros. | ||
moritz | called, yes. Scoped? | 18:58 | |
I hope not :-) | |||
masak | methods are *scoped* the same too. they are registered differently. | ||
methods adhere to lexical scoping just as much as macros and subs do. | |||
but please, tell me what would be different in practice if I made Macro a subclass of Sub. that should be the determiner of this. | 18:59 | ||
not some fuzzy philosophical similarity. | |||
see, src/core/Sub.pm is empty :) | 19:00 | ||
sorear | good * #perl6 | 19:01 | |
moritz | you're right, it's probably not important | ||
just different from what I expected | |||
good morning sorear | |||
masak | moritz: I will remember your surprise and take it in consideration in case any empirical difference manifests itself. | 19:02 | |
good morning, sorear. | |||
dalek | c: 9795da9 | moritz++ | lib/Macro.pod: stub documentation for Macro |
19:03 | |
19:06
larks left,
larks joined
|
|||
masak | moritz++ | 19:06 | |
19:08
ObseLeTe joined
19:10
gongyiliao joined
|
|||
masak | gongyiliao: hi. | 19:10 | |
gongyiliao | hi | ||
masak | rn: say "Welcome to #perl{ 1 + 2 + 3 }" | 19:11 | |
p6eval | rakudo bd23ad, niecza v19-44-g55e895a: OUTPUT«Welcome to #perl6» | ||
19:12
birdwindupbird joined
|
|||
moritz | rn: say "Welcome to #perl{ [+] ^4 }" | 19:13 | |
p6eval | rakudo bd23ad, niecza v19-44-g55e895a: OUTPUT«Welcome to #perl6» | ||
sorear | haven't I seen that name before? | ||
ah, only in the sense that gongyiliao has joined #perl6 53 times since my records begin | 19:15 | ||
masak | oh :) | 19:16 | |
sorear was momentarily confused by "nwc10" | 19:18 | ||
silly internetwork name differences | |||
FROGGS | is there a pod2html or something that can handle several =for pod blocks? | 19:21 | |
19:22
GlitchMr left
|
|||
moritz | there's Pod::To::HTML | 19:23 | |
FROGGS | ohh, cool | ||
moritz | that's what we use to generate the HTML on doc.perl6.org | 19:24 | |
sirrobert | is there a special var that knows the name of the file currently being worked on? | ||
(and: hi p6 =) | 19:25 | ||
sorear | rn: say $*FILE | 19:28 | |
p6eval | rakudo bd23ad: OUTPUT«Dynamic variable name not found in method gist at src/gen/CORE.setting:9757 in sub say at src/gen/CORE.setting:7125 in block at /tmp/28zi11Lu1v:1» | ||
..niecza v19-44-g55e895a: OUTPUT«Any()» | |||
sorear | rn: say $?FILE | ||
p6eval | rakudo bd23ad: OUTPUT«/tmp/vPw47tI1pw» | ||
..niecza v19-44-g55e895a: OUTPUT«/tmp/t0BITImhAC» | |||
sirrobert | huh | ||
I haven't seen $? before | |||
sorear | rn: say callframe(0).file | ||
p6eval | niecza v19-44-g55e895a: OUTPUT«/tmp/snl5S79OLb» | ||
..rakudo bd23ad: OUTPUT«/tmp/0Se6AQrLK4» | |||
sirrobert | if $* means global, what does $? mean? | 19:29 | |
sorear | $? is for constants | ||
lexically scoped compile time values | |||
sirrobert | ahh... cool | ||
sorear | in a way it's closely related to $* | ||
felher | sirrobert: you may want to take a look at: perlcabal.org/syn/S02.html#Twigils | ||
FROGGS | so you are talking about __FILE__? | ||
moritz | nr: say $?FILE | ||
p6eval | niecza v19-44-g55e895a: OUTPUT«/tmp/FWp6A5Lqde» | ||
..rakudo bd23ad: OUTPUT«/tmp/vC7WDrAdxp» | |||
sorear | because with recursive descent parsing, lexical scopes in the program correspond to dynamic scopes in the compiler | ||
$? support is spotty | 19:30 | ||
sirrobert | sorear|felher: thanks--reading | ||
sorear: hm ok | |||
sorear | niecza has &?BLOCK, &?ROUTINE, $?FILE, $?LINE, $?POSITION, $?ORIG, and I think that's it | ||
moritz | doc.perl6.org/language/variables#Twigils # needs much more work | ||
sorear | rakudo I think has about the same number, it adds $?CLASS and friends but lacks $?LINE? | 19:31 | |
nr: say $?LINE | |||
p6eval | rakudo bd23ad, niecza v19-44-g55e895a: OUTPUT«1» | ||
sorear | nr: 11say $?LINE | ||
p6eval | niecza v19-44-g55e895a: OUTPUT«===SORRY!===Two terms in a row (previous line missing its semicolon?) at /tmp/Ug7FX83imF line 2:------> <BOL>⏏1Parse failed» | ||
..rakudo bd23ad: OUTPUT«===SORRY!===Confusedat /tmp/HoGtJg5BT4:1» | |||
sorear | nr: 1;1;say $?LINE | ||
p6eval | rakudo bd23ad, niecza v19-44-g55e895a: OUTPUT«3» | ||
sorear | mmh | ||
nr: say &?BLOCK | |||
p6eval | rakudo bd23ad: OUTPUT«Nil» | ||
..niecza v19-44-g55e895a: OUTPUT«routine mainline() { ... }» | |||
sorear | nr: say &?MOO | ||
p6eval | rakudo bd23ad: OUTPUT«Nil» | ||
..niecza v19-44-g55e895a: OUTPUT«Any()» | |||
sorear | ok, there's one niecza has | 19:32 | |
MikeFair_ | howdy #perl6 | 19:33 | |
moritz | nr: say Nil ~~ Cool | ||
p6eval | rakudo bd23ad, niecza v19-44-g55e895a: OUTPUT«True» | ||
sirrobert | hi | ||
MikeFair_ | gmorning | ||
masak | MikeFair_: morning! | ||
felher | moritz: maybe i can do a bit of work on twigils in p6doc on wednesday. Today/Mon/Tue are filled up with work ($job). | 19:34 | |
o/ MikeFair_ | |||
moritz | felher: that would be great | 19:35 | |
dalek | kudo/uncool-iterable: c7e1713 | moritz++ | src/ (3 files): Iterable should not inherit from Cool while that might be cool for core classes, it is not in the general case |
||
kudo/uncool-iterable: c6fac5b | moritz++ | src/core/Nil.pm: Nil is Cool |
|||
sirrobert | r: dir | 19:37 | |
p6eval | rakudo bd23ad: ( no output ) | ||
sirrobert | r: dir.WHAT | ||
p6eval | rakudo bd23ad: ( no output ) | ||
felher | r: dir.perl.say | ||
p6eval | rakudo bd23ad: OUTPUT«Array.new(IO::Path.new(basename => "star", directory => "."), IO::Path.new(basename => "src", directory => "."), IO::Path.new(basename => ".bashrc", directory => "."), IO::Path.new(basename => "nom-inst1", directory => "."), IO::Path.new(basename => "toqast", direc… | ||
sirrobert | r: for dir -> $f { say $f} | ||
p6eval | rakudo bd23ad: OUTPUT«===SORRY!===Missing blockat /tmp/Evirw6da_2:1» | ||
sirrobert | why is that a missing block? | 19:38 | |
moritz | r: for dir() -> $f { say $f } | ||
p6eval | rakudo bd23ad: OUTPUT«IO::Path<star>IO::Path<src>IO::Path<.bashrc>IO::Path<nom-inst1>IO::Path<toqast>IO::Path<test3.pl>IO::Path<.profile>IO::Path<t>IO::Path<nom-inst2>IO::Path<nom-inst>IO::Path<toqast-inst>IO::Path<toqast-inst2>IO::Path<examples>IO::Path<Makefile>IO::Path<… | ||
sirrobert | hm | ||
moritz | sirrobert: because the block is taken as an argument to the dir function | ||
sirrobert | ohh | ||
moritz | n: for dir -> $f { say $f } | ||
p6eval | niecza v19-44-g55e895a: OUTPUT«===SORRY!===Missing block at /tmp/GET_0Y3r4G line 1 (EOF):------> for dir -> $f { say $f }⏏<EOL>Parse failed» | ||
moritz | std: for dir -> $f { say $f } | ||
p6eval | std d93fffe: OUTPUT«===SORRY!===Function 'dir' needs parens to avoid gobbling block at /tmp/eX_uOAhYR_ line 1:------> for dir⏏ -> $f { say $f }Missing block (apparently gobbled by 'dir') at /tmp/eX_uOAhYR_ line 1:------> for dir -> $f { say … | ||
moritz | std has a better message | ||
sirrobert | yeah | ||
hey... you know what would be cool | 19:39 | ||
a separate project housed only error messages. When an error got thrown out, it has something like a code | |||
a separate github repo houses messages to make them helpful? | |||
then is fed in during compile? | |||
I would happily contribute better error messages when I came across weird stuff, but don't have time to dig into the guts | 19:40 | ||
moritz | sirrobert: the problem is not the message itself | ||
sirrobert: the hard part is detecting the error condition in the first place | |||
sirrobert | well, in this case | ||
but having a lexicon of errors could be helpful in general =) | 19:41 | ||
moritz | github.com/rakudo/rakudo/blob/nom/...ception.pm isn't too bad to hack on | ||
sirrobert: well, doc.perl6.org has a nearly complete list | |||
sirrobert | moritz: fair enough =) | ||
19:42
tokuhiro_ joined
|
|||
jnthn back from nom | 19:43 | ||
moritz | wb jnthn | 19:44 | |
std: rxs// | 19:45 | ||
p6eval | std d93fffe: OUTPUT«===SORRY!===Bogus term at /tmp/5MniyHlIb6 line 1 (EOF):------> rxs//⏏<EOL>Undeclared routine: 'rxs' used at line 1Parse failedFAILED 00:00 42m» | ||
jnthn | Method and Sub inherit from Routine. | ||
That's what factors out their commonalities. | |||
It's fine. :) | |||
moritz | jnthn: yes, that much isn't debated at all | ||
dalek | c: 3afc269 | moritz++ | lib/X/Syntax/Regex/Adverb.pod: X::Syntax::Regex::Adverb |
19:46 | |
moritz | jnthn: the question was really whether Macro should inherit from Sub, or directly from Routine | ||
jnthn | Routine. :) | ||
imho ;) | |||
19:46
kst joined,
tokuhiro_ left
|
|||
jnthn | I'd not really want a macro to ~~ Sub | 19:46 | |
That feels excessively surprising. | |||
dalek | c: d1d8a9d | moritz++ | lib/X/Syntax/Reserved.pod: X::Syntax::Reserved |
19:49 | |
p: a886a77 | (Arne Skjærholt)++ | src/ops/nqp_dyncall.ops: Properly handle non-Sixmodel objects in dyncall ops. Two issues: - decontainerize in nqp_dyncall.ops was out of sync with decontainerize in sixmodelobject.c (didn't consider possibility of non-SMO arguments) - unmarshalling code (to int/float types) need to dispatch to VTABLE_get_* in case of non-SMO arguments. FROGGS++ for uncovering the problem. |
19:51 | ||
jnthn | nemesys: Hmm...I'm curious why the second bit was needed. | 19:52 | |
grr | |||
arnsholt: ^^ | |||
arnsholt | The VTABLE stuff? | 19:53 | |
If it isn't SMO, REPR(value)->box_funcs->get_foo(...) kinda isn't there, no? | |||
dalek | c: 87275f7 | moritz++ | lib/X/Constructor/Positional.pod: X::Constructor::Positional |
19:54 | |
jnthn | arnsholt: Right. I meant...where on earth is the non-6model object coming from? | ||
arnsholt | Native types it seems | 19:55 | |
moritz | erm, what? | 19:56 | |
you mean, sub f(int) is native(...) ? | |||
dalek | volaj: d47cd3f | (Arne Skjærholt)++ | t/02-simple-args. (2 files): Add test for wrapper sub with native parameter types. Closes issue #12 in conjunction with NQP commit a886a77 |
19:58 | |
volaj: 3d6ee45 | (Arne Skjærholt)++ | lib/NativeCall.pm6: Merge branch 'master' of github.com:jnthn/zavolaj |
|||
sorear | JNTHN! | ||
jnthn | SOREAR! | ||
moritz | if those box into parrot PMCs, then they need more care on the callee side, I guess | ||
arnsholt | jnthn, moritz: See the new test in zavolaj d47cd3f up there | ||
dalek | c: b84221e | moritz++ | lib/X/Syntax/Obsolete.pod: X::Syntax::Obsolete |
20:00 | |
arnsholt | A wrapper around a native function, where the wrapper has native types on its args and passes them through to the function apparently passes the natives through | ||
sirrobert | this is cool, but syntactically, why does it work? | 20:01 | |
r: my $a = {a => 1}; my $b = {b => 2}; my %h = $a, $b; say %h; | |||
p6eval | rakudo bd23ad: OUTPUT«("a" => 1, "b" => 2).hash» | ||
sorear | jnthn: I hear you're in Norway now. Anyways, I'd like you to read irclog.perlgeek.de/perl6/2012-08-26#i_5931019 | ||
sirrobert | why is ($h1,$h2) a hash? | ||
s/$/%/ | |||
20:01
sftp left
|
|||
sorear | jnthn: 8:46 to 9:11 | 20:02 | |
moritz | sirrobert: it seems that hash assignment flattens out hashes regardless of the sigil | ||
sorear | sirrobert: it's not, it's a parcel | ||
moritz | sirrobert: which looks like a bug to me | ||
sirrobert | hm | ||
20:02
sftp joined
|
|||
moritz | n: my $a = {a => 1}; my $b = {b => 2}; my %h = $a, $b; say %h.perl | 20:02 | |
p6eval | niecza v19-44-g55e895a: OUTPUT«Unhandled exception: Unmatched key in Hash.LISTSTORE at /tmp/jAmTUPUiEk line 1 (mainline @ 16)  at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571)  at /home/p6eval/nie… | ||
sirrobert | r: say ({a => 1}, {b=>2}).WHAT | ||
p6eval | rakudo bd23ad: OUTPUT«Parcel()» | ||
sirrobert | r: %h = ({a => 1}, {b=>2}); say %h.WHAT; say %h; | 20:03 | |
p6eval | rakudo bd23ad: OUTPUT«===SORRY!===Variable %h is not declaredat /tmp/1r2mmum6ga:1» | ||
sirrobert | r: my %h = ({a => 1}, {b=>2}); say %h.WHAT; say %h; | ||
p6eval | rakudo bd23ad: OUTPUT«Hash()("a" => 1, "b" => 2).hash» | ||
moritz | sorear: is that error the same as "odd numer of elements in hash assignment"? | ||
arnsholt | moritz: I dunno. If Rakudo possibly passes around bare Parrot PMCs I think the dyncall stuff is the right place to handle the possibility | ||
sorear | moritz: yes | ||
moritz: except you can get it with even numbers too | 20:04 | ||
n: my %h = (a => 2), 'b'; | |||
p6eval | niecza v19-44-g55e895a: OUTPUT«Potential difficulties: %h is declared but not used at /tmp/tZi5QKRtaz line 1:------> my ⏏%h = (a => 2), 'b';Unhandled exception: Unmatched key in Hash.LISTSTORE at /tmp/tZi5QKRtaz line 1 (mainline @ 2)  at /home/p6eval/niecza/l… | ||
sirrobert | huh... | ||
moritz | sorear: so it specifically handles hashes iin hash assignment? | ||
sirrobert | r: my %h = {a=>1, b => 3}; %h ,= {c=>3}; say %h; | ||
p6eval | rakudo bd23ad: OUTPUT«("a" => 1, "b" => 3, "c" => 3).hash» | ||
sirrobert | that's pretty cool. | ||
sorear | moritz: yes | 20:05 | |
moritz | sorear: is that specced? (I'm not saying it's wrong, I'm just curious :-) | ||
sorear | I know I've seen real-world code that does 'my %h = $h' | ||
niecza might be wrong in allowing Hashes to be freely admixed into lists of pairs, keys, and values | 20:06 | ||
sorear looks for relevant spec | |||
The relevant spec is S02:4711, which does NOT allow passing Hash objects to Hash.LISTSTORE | 20:07 | ||
20:08
SamuraiJack left
20:09
cognominal left,
cognominal joined,
cognominal left,
cognominal joined
|
|||
moritz | let's wait for a word from TimToady though. It might be an omission, since in p5 a hash would simply flatten out | 20:11 | |
felher should teach his address bar to recognize things like S02:4711 | 20:14 | ||
20:16
gongyiliao left
|
|||
sirrobert | I love it when you get to that magic moment when your subs and modules and such turn into a perfect DSL. | 20:19 | |
masak | sirrobert: that's why I tend to start most designs by pretending I have the perfect DSL already :) kinda top-down. | 20:21 | |
sirrobert | masak: me too... super smooth =) | ||
it tends to be multi-pass for me | |||
usually 3 or 4 | 20:22 | ||
sorear | sirrobert: The Forth community has a wonderful additude to this. Every sub you define is defining an incremental new language | ||
20:22
bruges left
|
|||
sirrobert | huh | 20:22 | |
never heard of "The Forth" | |||
sorear | The (Forth community) | ||
sirrobert | ohhh | 20:23 | |
heh | |||
jnthn | sorear: Yeah, there are some issues in Rakudo around that area. | ||
sorear | Forth is a languagey thing from many years ago | ||
sirrobert | I think I've heard of but, but know nothing about it | ||
20:24
bruges joined
|
|||
sorear | Forth's niche is a local optimum very low on the expressiveness/implementation complexity curve | 20:26 | |
you can use it for fair-sized apps, it has a REPL, and it can be implemented in about 1-4k of machine code | 20:27 | ||
dalek | Heuristic branch merge: pushed 30 commits to nqp/toqast by jnthn | ||
benabik | Forth is used in RedPower. | ||
(Mod that adds a 6502 processor to minecraft) | |||
sorear | these days it gets most use in embedded systems, for the last reason | ||
masak | they totally should've called the language "The Forth", though. :D | 20:28 | |
colomon | Forth++ | ||
\ | |||
sorear | it may be a language, but it's the kind of language that has builtins for accessing a block storage device | ||
benabik | May the Forth be with you? | ||
sorear | 42 LOAD | 20:29 | |
masak | when I last studied the Forth culture, I got the same kind of vibes from it of "we hold the ultimate truth to how computing should be done" that I sometimes get from Lisp or Smalltalk people. | 20:33 | |
not putting any value judgement in that. that's how it felt. | |||
sorear | to put it bluntly, when a language loses its core niche, most of the people who remains are True Beleivers. | 20:34 | |
pmichaud | good evening, #perl6 | ||
sorear | good evening pmichaud | 20:35 | |
20:36
REPLeffect left
|
|||
colomon | masak: actually, I think there are really interesting parallels between Forth and Lisp. | 20:36 | |
20:37
fgomez left
|
|||
sirrobert | masak: Forth is Force with a lisp? | 20:37 | |
sorear | Forth is a fourth-generation language on a limited OS that had 5-character command names | 20:38 | |
same reason we have SCHEME instead of the originally intended SCHEMER. | |||
.oO( if Scheme were created today, it would obviously have been named Schemr) |
|||
masak | :P | 20:40 | |
and it would've had rounded corners and would only hire rock stars and ninjas. | |||
benabik | roundrects everywhere | 20:44 | |
20:45
birdwindupbird left
20:50
REPLeffect joined
|
|||
jnthn | Do we *need* multi-jointed lexical packages? | 20:54 | |
What happens if we kill them? | |||
ChoHag | If you were working on a project for fun, and you weren't really sure what it was, what would you call it? | 20:59 | |
20:59
kaare_ left
|
|||
pmichaud | ChoHag: pick a fun name | 20:59 | |
ChoHag | I ask here because it will feature perl 6 for a significant part of it. | ||
But what's fun about a name? | 21:00 | ||
sirrobert | ChoHag: pick a commonplace thing in the same conceptual broad swath as the project. | 21:01 | |
ChoHag | Hmm. | ||
It's a swathe of quite significant proportions. | |||
sirrobert | ChoHag: e.g. if you're working on something to do brownian motion, dfo " | ||
do "riverbed" | |||
or something | |||
ChoHag | hmm | 21:02 | |
sirrobert | what's the project (in like... 10 words or less)? | ||
ChoHag | Code that writes itself. | 21:03 | |
Not in the quine sense. | |||
9. | |||
sirrobert | back | 21:04 | |
how about something like "meta" | |||
oh, here you go | 21:05 | ||
ChoHag | I dunno. | ||
Isn't that a bit ... meta? | |||
sirrobert | Ouroboris | ||
FROGGS | or "cloud", everything is a cloud nowadays | ||
masak | jnthn: I wouldn't mind, I think. | ||
ChoHag | This has emphatically nothing to do with clouds. | ||
sirrobert | Ouroboros, I guess | 21:06 | |
(s/i/o) | |||
ChoHag | That might be a good choice. | ||
Maybe Youroboros. | |||
sirrobert | or if you want something with more popular recognition, | ||
Escher | |||
ChoHag | Because it's not really mine. | ||
sirrobert | anyway, you get the idea | ||
ChoHag | Yeah that'll do. | 21:07 | |
I'm not a big one for names. | |||
sirrobert | it's a different skill, for sure. | ||
ChoHag | My little girl's only 14 months and I've called her the cat's name on numerous occasions. | ||
sirrobert | heh | ||
FROGGS | I always swap the names of my two sons :/ | 21:08 | |
sirrobert | When my son was 5 last year, he said to his mom: Hey ... <short pause> ... you, with the glasses. | ||
FROGGS | hehe | ||
ChoHag | That wouldn't work in our house. | ||
sirrobert | it didn't work in ours either | ||
(we both wear them) | |||
ChoHag | My dad and brother have the same name too, and sound the same on the phone. | 21:09 | |
That was always fun. | |||
FROGGS | your dad, your brother and you have the same name? | ||
thats basically not the idea of names | 21:10 | ||
ChoHag | My dad and brother have the same name in addition to most of my (previous) household wearing glasses. | ||
Sorry I thought this was #perl. | |||
Weird language being the order of the day, month and indeed year. | |||
FROGGS | gnight | 21:11 | |
ChoHag | What's @INC changed to and how do I make it include . (or lib)? | 21:12 | |
(In rakudo) | |||
sirrobert | use lib? | ||
ChoHag | Are you asking me? | 21:13 | |
I'm asking you. | |||
sirrobert | I'm asking you if that didn't work | ||
FROGGS | use lib 'lib'; | ||
I use it | |||
ChoHag | Apparently it does. | 21:14 | |
Too often questions have the answer 'the same as perl 5'. | 21:15 | ||
felher | Yeah, and if you want it for a quick test/check/whatever, you may use: | 21:18 | |
export PERL6LIB=yourPathHere | |||
And then start your program :) | |||
21:21
fgomez joined
|
|||
sorear | ChoHag: pass -I. to the compiler | 21:22 | |
"use lib" is deeply problematic | |||
jnthn: What do you mean by multi-joined lexical packages? | |||
ChoHag | deeply? | 21:23 | |
21:24
grondilu joined
|
|||
sorear | yes, deeply. | 21:25 | |
it's kind of like very. | 21:26 | ||
grondilu | There has been no news for a while on rakudo.org. What's up? | ||
sorear | I just went to Rakudo.org and it has a post from last month concerning the release | 21:27 | |
sirrobert | where do I find the Test module? | ||
sorear | All Perl 6 compilers come with a Test module preinstalled | ||
jnthn | sorear: my class Foo::Bar { } | ||
sirrobert | sorear: yeah, but where do I find it in the/a github repo? | 21:28 | |
sorear: I want to look at the code | |||
sorear | sirrobert: each compiler has a different (but mostly compatible) Test module | ||
pmichaud | sirrobert: github.com/rakudo/rakudo/blob/nom/lib/Test.pm | 21:29 | |
sirrobert | pmichaud: ahh, thanks | ||
sorear | sirrobert: github.com/sorear/niecza/blob/mast...b/Test.pm6 | 21:30 | |
pmichaud | time for sleep here -- be back tomorrow for some real hacking :) | ||
sirrobert | wave | ||
sorear: thanks | |||
sorear | sirrobert: github.com/perl6/Pugs.hs/blob/mast...ib/Test.pm | 21:31 | |
github.com/fglock/Perlito/blob/mas...o6/Test.pm | 21:32 | ||
github.com/fglock/Perlito/blob/mas...o5/Test.pm | |||
are there any productiony implementations I'm missing here? | 21:33 | ||
sirrobert | dunno, but pmichaud had a dwimmier parser =) | 21:37 | |
ChoHag | Is there any automagic done on the import list of a module? | 21:38 | |
I can see _that_ you write an import sub, but can't find examples of any that take arguments. | |||
And just parsing @_ myself seems so perl 5 .. ago. | 21:39 | ||
sirrobert | ChoHag: sorry, dunno =) | 21:40 | |
21:42
Circlepuller left,
Circlepuller joined
|
|||
jnthn | ChoHag: If you mean what I think you do, see lib.pm6 in Rakudo | 21:42 | |
sirrobert | ok, clean tests | 21:43 | |
ChoHag | I don't think that was. | ||
sirrobert | heading home; later all | ||
21:43
sirrobert left
|
|||
sorear | wait, it that defining GLOBAL::<&EXPORT> ? | 21:43 | |
ChoHag | I want to know what to do about the foo bar in 'use Module <foo bar>;' | ||
sorear | our sub EXPORT(*@a) | 21:44 | |
ChoHag: sub foo is export () { } | |||
ChoHag: that's how you make it work. | |||
ChoHag | So that would call foo and bar as subs when Module is loaded? | ||
dalek | p/toqast: 9b48c83 | jonathan++ | src/QAST/Operations.nqp: Don't re-use the result register of the protected region in handle op for being the overall result. |
||
p/toqast: 442c735 | jonathan++ | src/NQPQ/ (2 files): Update try, CATCH and CONTROL for QAST. |
|||
p/toqast: c2b37e4 | jonathan++ | t/nqp/44-try-catch.t: Eliminate a bogus test, plus some other updating to the exception tests. |
|||
p/toqast: 62dddd0 | jonathan++ | src/QAST/ (2 files): Fix register allocation bug involving handlers and resumable exceptions. |
|||
21:45
ObseLeTe left
21:46
ObseLeTe joined
|
|||
sorear | ChoHag: no, it would copy them to the caller's namespace when Module is loaded | 21:46 | |
A.pm: 'module A; sub x is export { }' B.pm: 'use A;' | 21:47 | ||
erm | |||
A.pm: 'module A; sub x is export { }' B.pm: 'use A "x";' | |||
ChoHag | So does nothing replace the Module->import(LIST) from perl 5? | ||
sorear | Did you read lib.pm6 like jnthn said? | ||
ChoHag | It was 4 lines. | ||
One of them was } | 21:48 | ||
Didn't take long. | |||
sorear | Can you understand line 2? | ||
ChoHag | Unless the semantics of our are radically different, yes. | 21:49 | |
sorear | line 2 is the answer to your question | ||
ChoHag | Right. | ||
sorear | line 2 replaces the Module->import(LIST) from perl 5 | ||
if you have the answer, why are you asking? *confused* | 21:50 | ||
ChoHag | Because I only had the answer just now when you showed me. | ||
22:01
worr joined,
worr left
|
|||
sorear | jnthn: I am going to make fairly significant changes to the way niecza handles 'my class Foo::Bar' and 'use Foo::Bar'. I think that these changes are necessary for proper handling of the multiload provisions of S11. I do not expect much short-term support. | 22:10 | |
22:12
Circlepuller_ joined,
preflex_ joined
22:13
preflex left,
preflex_ is now known as preflex
22:14
Circlepuller left
22:17
Circlepuller_ left
|
|||
dalek | p/toqast: 8d4da1b | jonathan++ | src/NQPQ/Actions.pm: Fix closure interpolation. |
22:18 | |
jnthn | sorear: multiload as in, multiple versions? | 22:20 | |
sorear | jnthn: yes | 22:26 | |
jnthn | sorear: Happy hacking. If you can write up a description of what you do, I'd be interested to see it. | 22:27 | |
sleep & | 22:35 | ||
masak | 'night, #perl6 | 22:56 | |
23:05
s1n left
23:13
MayDaniel left
23:18
tokuhiro_ joined
23:23
tokuhiro_ left,
grondilu left
23:29
adu joined,
gongyiliao joined
23:40
colomon_ joined
23:42
colomon left,
colomon_ is now known as colomon
23:54
spider-mario left
|