Perl 6 - the future is here, just unevenly distributed

IRC log for #6macros, 2015-10-14

| Channels | #6macros index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
01:34 vendethiel joined #6macros
06:37 FROGGS joined #6macros
07:35 masak oh?
08:02 FROGGS joined #6macros
15:51 Ven joined #6macros
16:12 Ven joined #6macros
16:33 Ven joined #6macros
16:47 Ven joined #6macros
16:48 Ven very small change though...
16:49 * Ven admits to not being a huge fan of the README, because oftentimes, he just wants to know what the project is about
17:14 FROGGS joined #6macros
18:18 vendethiel joined #6macros
18:20 vendethiel "destructors"?
18:20 masak people seem to either love or hate the README. those who hate it seem to be a smaller group, and they say something much like that: "it's not to-the-point enough"
18:20 masak at this point, I'm guessing I'm confusing "many people" with "many complaints from one person", though :P
18:21 masak vendethiel: I don't know where I picked up that term as meaning "getters" -- probably reading about algebras or something
18:21 vendethiel ETOOOVERLOADEDINPROGRAMMINGINGENERAL?
18:21 masak "deconstructors" would've been more clear, but that's not what I've seen in the literature
18:22 vendethiel .oO( what're you doing to my cons? )
18:23 masak :)
18:25 vendethiel I'm not sure I "believe" in "value"
18:25 vendethiel 'specially if you want to add types on top of it
18:25 vendethiel (there are some very nices papers about adding typing stuff *on top* of a language)
18:37 masak that sounds interesting. do you have the references handy, perchance?
18:38 masak also, I don't see the connection between value() and types. my first hypothesis is that you're confused as to what they do ;)
18:40 vendethiel I'm thinking of the "IntStr" and stuff in Perl 6
18:43 * vendethiel realizes he still hasn't read "First-class macros have types (A. Bawden)"
18:43 vendethiel aw, well, I don't know where I put that paper :[
18:49 masak I'm not suggesting anything like "IntStr", though
18:50 masak I'm just saying that it looks better if what's currently `my_int_literal.int()` instead were `my_int_literal.value()`. etc str and array
18:52 vendethiel oooh, yeah.
18:52 vendethiel :P
18:52 vendethiel yeah.
18:53 vendethiel sounds like that'd be a role for the dynamic part (OO) of the language, though?
18:57 vendethiel > class Q::Arguments: Array<Q::Expr>;
18:58 vendethiel please. no non-matching brackes :[
18:58 vendethiel s/s\b/ts/
19:00 masak "non-matching brackets"? where?
19:03 vendethiel <>
19:03 vendethiel I mean.
19:03 vendethiel sorry.
19:03 vendethiel "brackets that are already used in a non-matching fashion"
19:03 vendethiel "Tuple classes" = newtype?
19:09 masak I'm sorry, I can never learn what keywords like "newype" mean :(
19:09 masak I learn them over and over, in various Haskell tutorials, but they never stick
19:10 vendethiel it's just a wrapper "around" a type. Pure love.
19:10 vendethiel literally just creates a container so that you can't, say, add Meter and Int
19:10 masak I just saw your email about it. let me ask a follow-up here.
19:10 vendethiel newtype Meter Int
19:10 masak `newtype Arguments = (Expr, Foo)`
19:10 * vendethiel disabled github emails because he gets far too many
19:10 masak I only get emails from you :P
19:10 vendethiel that's one syntax. The other one would just be newtype Arguments (Expr, Foo) (or even without the parens)
19:11 vendethiel oh, only from 007?
19:11 vendethiel maybe I should enable it for specific repos
19:11 masak currently, yes.
19:11 * vendethiel guessed it wasn't literally "just him" ;-)
19:11 masak I like getting them, so that's fine
19:11 masak no, I mean I get 007 stuff, and you're the one who is active right now ;)
19:11 vendethiel yes, got it :)
19:12 masak `newtype Arguments = (Expr, Foo)` seems like a good solution to tuple classes. I don't see how it solves what I want for array types at all.
19:12 masak but maybe you were talking about tuple classes?
19:13 vendethiel that seems to be what you said, yes?
19:13 vendethiel I mean -- classes that just are a tiny wrapper around a few parts, right?
19:29 masak the sum total of my `class` proposal right now has three parts: "record" types (with attributes), "tuple types" (fixed tuple of heterogenously typed elements), and "array types" (array of unknown length but with same-typed elements)
19:29 masak record types would go well with attribute and method access; tuple types with the 'case' statement; array types with indexing and array operations
19:32 vendethiel tuple types with case statements?
19:33 vendethiel "newtype", I believe, could go for the 2nd/3rd part
19:45 masak I don't see how it could do the 3rd part.
19:45 masak your `newtype Arguments = (Expr, Foo)` syntax above seems to completely miss the point -- unless I completely miss how it would do arrays
19:55 vendethiel newtype Arguments = [Expr]? :P
19:56 vendethiel I don't understand  the diff. between "typed arrays" and your "array types"
20:05 masak slight difference. "array types" are a part of my suggestions in https://github.com/masak/007/issues/32 -- they are core, and there's no relation to types as such.
20:06 masak "typed arrays" would be something like `my a: Array<Q::Expr>;`
20:06 masak "array types" would be what would enable me to write `my args = Q::Arguments [...];` -- that is, an array constructor, but with a type in front of it.
20:08 masak and I see I've used "typed arrays" wrong once in the comment. retconning -- hold on.
20:08 masak done.
20:09 masak the problem with your proposed `newtype Arguments = [Expr]` is that the `[Expr]` syntax clashes with a proposed/conjectural type syntax that means "array of exactly one Expr element"
20:10 masak something like `Array where { .elems == 1 && .[0] ~~ Expr }`
20:14 vendethiel ah, I see
20:14 vendethiel that was a ml/haskell-ish "'a list" or "[] a"
20:15 masak nodnod
20:15 masak I'm not sure I'll need the array syntax just to say [Foo, Bar, Baz] -- it's a bit too much like a tuple.
20:16 masak but I also think `[Expr]` doesn't *look* like it means `Array<Expr>` -- to me, it looks more like the thing with the `where` clause above :)
20:34 vendethiel fair enough
20:34 vendethiel if [] means a tuple type
20:34 vendethiel then probably, [] a = a?
20:34 vendethiel :P
20:43 masak they're certainly isomorphic to each other, if that's what you mean ;)
20:43 masak I wouldn't call them the exact same type
20:43 masak that's Perl-think :P
21:23 masak nice -- I love the test suite.
21:24 masak I had \" and \\ in strings unescape in the parser. one test unexpectedly started failing.
21:24 masak turns out it's correct to put in the string as-is in the Q::Literal::Str
21:24 masak it gets unescaped as it gets evaluated
21:25 masak why? because the Q::Literal::Str represents what it says in the code, and in the code there's still a backslash.
21:25 masak without that test failing, I totally would've committed the wrong fix.

| Channels | #6macros index | Today | | Search | Google Search | Plain-Text | summary