Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-08

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 timotimo i once started a bit of work that'd cut down the size of the call graph, but it gave wrong results and that kind of makes the profile itself totally useless
00:00 timotimo i have a patch that turns off the code graph completely, which makes it much faster and the result file much much smaller, but it's not as interesting as all the timing info also disappears
00:00 timotimo so it only gives you allocation info
00:01 raydiak yeah I remember you mentioning that around the time you suggested I look into it too
00:01 timotimo oh
00:01 raydiak stuff just slipping and falling off my plate all over the place :)
00:03 raydiak timotimo: have you done anything shiny lately?  work on sdl, games, whatnot?
00:04 timotimo no
00:05 timotimo i've had very, very little perl6 time for about a month
00:06 raydiak yeah it's been that time of year...I don't personally know anyone who has accomplished much of anything in the past month that I'm aware of
00:06 adu joined #perl6
00:06 cognominal joined #perl6
00:07 timotimo glad to hear it :P
00:08 raydiak glad to hear I'm a friendless recluse? ;) j/k
00:08 timotimo oh
00:08 timotimo well, that's another possible interpretation of that sentence
00:09 raydiak heh nah, I'm just bein silly in this case
00:13 adu hi all
00:14 raydiak heya adu
00:14 adu hey :)
00:14 raydiak how goes it?
00:15 adu so I think I fixed the typedefs once and for all, and I added a bit to the readme that typedefs are important
00:16 raydiak oh, I see...that makes it nice and clear
00:22 adu raydiak: are you a contributor to Inline::C?
00:23 raydiak nice, cut my failures in that zmq test from 146 to 85
00:24 raydiak adu: I don't think I've done anything to it yet, no
00:25 timotimo "that zmq test"?
00:26 adu raydiak: are you not diakopter?
00:26 raydiak adu: nope
00:26 raydiak timotimo: https://gist.github.com/raydiak/e268376b2cb6280ad7d3
00:26 adu ah n/m then
00:27 timotimo oh, i see
00:27 raydiak timotimo: it's just a specially-processed version of zmq.h that I used to find C::Parser failures
00:27 BenGoldberg joined #perl6
00:27 Woodi joined #perl6
00:27 raydiak but it hints at what I would like to use C::Parser for: auto-genning bindings
00:27 timotimo sounds good
00:29 raydiak it always kinda blew me away that using pretty much any FFI I've tried so far requires you to get intimate with the C bits...I want to just include the darn thing and use it, like I can from C
00:30 japhb adu: diakopter is off doing a startup.  I expect he probably won't be around for quite some time.
00:30 adu "doing a startup" sounds vauge and secretive
00:31 japhb adu: I know a (very) few things, but I have no idea how much I'm allowed to say, so I'm keeping it to that.  :-)
00:31 adu raydiak: ah, so from AST => Str?
00:32 adu japhb: my philosophy is that you need money to give away free software
00:32 raydiak adu: yeah, I think that describes what I'm talking about...your module will give me the ast, and I'll use it to write out a .pm6 binding for the given header
00:33 adu raydiak: or Str => CAST which can be analysed to QAST?
00:34 adu raydiak: well, I've been mulling over CAST for a while now, and I can't decide to have 1 or 2
00:34 raydiak nah not trying to build it out of qast, writing strings out to a module file will be fine for my purposes
00:34 raydiak adu: how so?
00:35 adu if there are 2 ASTs, then one will correspond to syntax, and one to semantics, if there is 1 AST, then it would be somewhere in between the two, or there would have to be a lot of processing to convert it to the semantics AST
00:36 adu raydiak: well, for example Arrays, in C, their types are represented as a sequence of DeclarationSpecifier's (which includes type) and a ArrayDeclarator (which includes name and size), but what most people want is just the name by itself, or the combination of (type and size)
00:37 adu for the syntactic AST, we would have the above, but for the semantic AST we would have (name, complete type), where the complete type for an array would have both the DeclarationSpecifiers and the array size in it
00:38 raydiak ah, I'm getting it...
00:38 adu so any help with the AST would be most appreciated
00:39 raydiak why wouldn't you want to provide all information in each node of just one ast?  is the tree structure itself different between the two?
00:39 raydiak s/ast/cast/
00:39 adu so have a coarser granularity with one object that has name, types, size?
00:42 raydiak yeah, if I'm thinking about an array, whether I want its name or its type, either way I'm not thinking about whether that's a semantic or syntactic issue, and would generally expect there to just be a method/attribute for what I'm looking for
00:43 raydiak why does that enforce coarser granularity?  I'm still not sure why its an either/or choice
00:44 adu becuase it requires that all types are complete
00:44 japhb adu: I'm not sure what your point was about 'japhb: my philosophy is that you need money to give away free software'.  Can you explain what relation that had to the startup conversation?
00:44 adu japhb: hmm, I might have missed a few steps in my logic, or I might be biased, I'm not sure
00:45 tinyblak joined #perl6
00:47 raydiak adu: even if the type is incomplete, couldn't you just not populate those properties of the cast, or clear a .type.is-complete flag, or something like that?
00:48 adu japhb: people do startups for many reasons, one of which is to make money. Money takes care of some of the "Maslow's hierarchy of needs" that is required by anyone who works on free software.
00:48 kaare__ joined #perl6
00:48 raydiak adu: you probably have far more thought into this than I, so bear with me if I'm catching on slowly :)
00:49 japhb adu: OIC.  I don't think that's why diakopter is working on this particular one.  Though I'm sure he wants/expects it to make money.  :-)
00:49 adu raydiak: there are only 2 parts to a type: left and right, the left type is composed of things like static const char, and the right type is composed of things like [3] or (double, double)
00:50 * japhb wonders how many #perl6'ers would work on Perl 6 implementation if they could get a well-compensated job doing that, and how many prefer it to be a hobby
00:50 japhb work on it full-time, I mean
00:50 raydiak semi-related to the other convo thread, has anyone here had much experience getting work on any of those freelancing sites?   if so, did it work out well for you?  any tips?  I need to make money too :P
00:51 japhb As a freelancer years ago, I found myself to be singularly awful at drumming up business, so no, unfortunately ....
00:52 raydiak me too...should see if I can find a freelancing salesperson or something heh
00:53 adu raydiak: I was thinking of representing the "right types" as functions from Type -> Type, and to make them complete you just call it with the "left type" as an argument
00:58 raydiak adu: any sane person will tell you not to take my architecture advice, but if I follow correctly, I guess I'd make Type its own little class with suitable properties and methods for handling all this variety
00:59 raydiak then use that in your casts where you need to talk about a type
01:00 adu CASTs?
01:00 raydiak thought that was what you're calling the result of your action methods
01:00 adu es
01:00 adu yes
01:01 raydiak oh, right, cast as in...type...no, CAST is what I meant :)
01:01 adu its just that "casts" means something else in C
01:01 adu :)
01:01 * raydiak is extra-lazy w/the shift key some days
01:04 adu my CAST classes are extra lazy
01:04 adu they're composed entirely of "has"s
01:06 raydiak I like those classes...they feel so beautiful and declarative before you muck it up with all that procedural junk :)
01:06 adu lol
01:07 adu raydiak: but how do you return a Type and a Name at the same time?
01:08 dayangkun joined #perl6
01:10 Mso150_y joined #perl6
01:10 adu raydiak: oooo and I added a method to cdump
01:13 Woodi joined #perl6
01:15 raydiak adu: I'm thinking you return a single instance of something along the lines of class CAST::Type { has $.name; has @.decls; has ... };
01:16 adu ok, that's wierd, but doable
01:16 adu because $type.name should be the name of the typedef, not the variable
01:16 raydiak right
01:17 raydiak that whole class was just for the cast's .type property
01:17 adu raydiak: but the information becomes available as the name of the variable first, how do I return that from the same action method that the variables "right" type comes from?
01:18 adu actually, there should be a Var class
01:23 raydiak adu: build up the types as you parse, and modify them as you go maybe?  e.g. keep an internal %!types as each parse progresses
01:24 adu ok, so how do I parse this: "const char *(*stringer)[2](const char *)[256];"
01:25 raydiak hard to say, the C part of my brain doesn't even know how to parse that :)
01:25 adu according to cdecl.org, it means "declare stringer as pointer to array 2 of function (pointer to const char) returning array 256 of pointer to const char"
01:27 raydiak oh that's a neat tool, especially for people like me who are just faking it
01:27 adu lol
01:27 adu yeah, I must admit I've used it
01:27 raydiak hm lemme see if I can break that down into a tree
01:28 adu but almost all C code uses either function or arrays, but the C spec allows both in the same declaration
01:29 raydiak tricky
01:29 adu yeah
01:29 adu hence my deliberations...
01:40 IllvilJa joined #perl6
01:43 adu what's the difference between str and Str?
01:43 raydiak still looking, but vague thoughts: var, pointer, array, and function here are nouns...I am thinking of types more like adjectives
01:44 raydiak str is native, probably like a char * or something underneath
01:44 adu adjectives? I know the English meaning, but not the Perl6 meaning of that
01:44 raydiak just using it in the english sense
01:45 raydiak that's why I say "vague thoughts", cuz they aren't tied back to the concreteness of your example yet
01:46 adu well, in my mind there are 6 kinds of types in C: direct, array, function, pointer, struct/union, enum
01:46 adu direct types are completely specified by a list of DeclarationSpecifiers
01:47 adu things like "unsigned int"
01:49 tinyblak joined #perl6
01:50 adu raydiak: well, to translate cdecl.org's response back into Perl6, it would be: PointerType[ArrayType[2, FunctionType[PointerType[Direct[Const, Char]] --> Array[256, PointerType[Direct[Const, Char]]]]]]
01:53 raydiak looks like pretty much what I got out of it...I'm just shuffling it around different ways as a tree, coming up with several half-answers I don't like
01:55 cognominal joined #perl6
01:59 adu comming up with any 90% answers?
02:00 yeahnoob joined #perl6
02:00 raydiak hm, ya know, most of those 6 types you mentioned are just arrangements of direct types
02:00 adu arrangements?
02:00 raydiak with some extra properties, like names or array lengths
02:00 yeahnoob joined #perl6
02:01 raydiak eh, I just mean structs and enums and stuff feel more like "compound" entities, built out of direct types
02:01 adu yes
02:01 yeahnoob joined #perl6
02:02 yeahnoob joined #perl6
02:03 yeahnoob joined #perl6
02:03 adu I could see struct and enum being like, a CAST::TypeOp or something
02:05 raydiak so I would start by defining a class for direct types, then the other ones making use of the direct one, then I would stop and look at what I made and see if it gave me ideas or at least better perspective, tbh :)
02:05 adu ok
02:05 adu what should I call it? OpType or TypeOp?
02:05 adu or GType?
02:06 adu or Generic?
02:08 adu or GenType?
02:08 raydiak I don't think we have any real solid Perl conventions to follow here other than CamelCase, so your C knowledge probably answers this question better than I
02:08 * raydiak runs outside for a few minutes to hide from scary naming questions :)
02:09 adu well, I think QAST is a good inspiration for the goal I should strive for
02:09 adu most other AST frameworks would have one class for every kind of expression, but QAST only has one class: QAST::Op
02:14 Ben_Goldberg joined #perl6
02:19 raydiak back
02:20 adu also, there are 2 different kinds of blocks
02:21 raydiak hm
02:21 adu one is the standard C block {a; b; c;}, (which evaluate to void), and then the other is GNU expression blocks: ({a; b; c;}), (which evaluate to c)
02:21 adu should both of these be represented with CAST::Stmts? or should they be different classes?
02:23 adu also, what's the difference between QAST::Stmts and QAST::Block?
02:23 rmgk_ joined #perl6
02:24 raydiak I don't really have any experience with QAST, but I would guess that Block has its own lexpad or something like that
02:24 raydiak or, well, lexical scope...I don't really know what 'lexpad' means specifically, just something I've seen referred to here
02:25 raydiak honestly QAST (or AST in any language) isn't smoething I have firsthand experince with
02:25 adu neither do I
02:25 adu what does "pad" stand for?
02:26 raydiak well, so answering these things has to do with how you intend to use them...what will make it easier to use them that way?
02:26 adu I'm guessing "lex" stands for lexical
02:26 raydiak yeah I assumed it was an analogy to a notepad or something
02:27 adu well, Scheme has something called "Environments"
02:27 adu which are a linked list of hash tables
02:28 adu when you enter into a lexical scope, you push a new hash-table onto the list, and when you leave a lexical scope, you pop a hash-table off the list
02:28 adu I would imagine it's something like that
02:29 raydiak it might help make some of the QAST choices easier to understand if you read about some of the behaviors of the various code-like objects as seen from p6-land
02:29 raydiak the stuff in the type graph here: http://doc.perl6.org/type/Callable.html
02:29 adu WhateverCode?
02:30 raydiak comes from using a *
02:30 raydiak m: say (* + 1).WHAT
02:30 camelia rakudo-moar c5dcdf: OUTPUT«(WhateverCode)␤»
02:30 adu interesting
02:31 raydiak lets you skip {} for simple cases, among other things
02:31 raydiak m: (^10).grep(* %% 2).say
02:31 camelia rakudo-moar c5dcdf: OUTPUT«0 2 4 6 8␤»
02:31 raydiak m: (^10).grep({ $_ %% 2 }).say # as opposed to
02:31 camelia rakudo-moar c5dcdf: OUTPUT«0 2 4 6 8␤»
02:32 adu my brain just exploded
02:32 raydiak m: (* + *)(1,2).say # also can be used for multiple args
02:32 camelia rakudo-moar c5dcdf: OUTPUT«3␤»
02:33 raydiak and yes, '* * *' is valid code :)
02:33 adu does that work with map too?
02:33 raydiak yeah anything that takes a block
02:33 adu m: say (map (* + 1), @(2, 3, 4)).perl
02:33 camelia rakudo-moar c5dcdf: OUTPUT«(3, 4, 5).list␤»
02:33 raydiak an expression with a * basically becomes a closure automagically
02:38 adu well, I think I have enough inspiration to totally rewrite CAST
02:39 chenryn joined #perl6
02:40 raydiak nice...do drop by during the busier times if you want some way, WAY more educated opinions :) a large portion of the most knowledgable and active 6ers are in europe
02:45 adu that means the "busy times" are 4am
02:45 Mouq joined #perl6
02:45 raydiak seems populated from about midnight to noon
02:45 raydiak my time, PST, that is
02:50 adu I'm in EST, so maybe 4am to 4pm for me
02:54 old joined #perl6
02:56 old_camels_frien joined #perl6
02:58 old_camels_frien what is p6 analog for perl -ne 'print if 5..10' file.txt  ?
03:01 colomon m: lines()[5..10]
03:01 camelia rakudo-moar c5dcdf: ( no output )
03:01 colomon m: say lines()[5..10]
03:01 camelia rakudo-moar c5dcdf: OUTPUT«Ag taisteal dom amach trí chnoic Ghleann Domhain ’s an Mucais ar mo chúl Ní miste dom ’ rá le brón ’s le crá gur frasach a shíl mise siúl; Go Meiriceá siar a bhí mo thriall i bhfad thar an fharraige mhór; D’fhág mé slán ar feadh seal …»
03:01 Mouq old_camels_frien: https://github.com/sillymoose/Perl6-One-Liners#selective-line-printing
03:03 tinyblak joined #perl6
03:05 colomon Mouq: nice, but slightly off
03:05 colomon perl6 -e '.say for lines[4..9]' example.txt
03:06 colomon would do the trick
03:07 colomon well, I mean the perl6 -ne '.print if (1..3).any == ++$' example.txt there would work, but seems unnecessarily baroque
03:07 colomon Mouq++ # great resource there, at any rate
03:07 adu oh, I wrote a Haskell tool to do that, https://hackage.haskell.org/package/only
03:08 adu I would imagine it would also be a one-liner if I wrote it in Perl6
03:14 * raydiak misses p5's -i...in fact perl -pi -e is about the only thing I use it for any more
03:16 * ingy is hungry for some -pi -e
03:20 adu raydiak: I don't miss anything about Perl5, since I've never used it
03:24 raydiak adu: I started with BASIC, started learning C, then picked up perl and pretty much stopped looking at other languages for the next decade
03:24 ingy perl5.18.1 -MIO::All -E 'say for @{io shift}[0..9]' example.txt
03:25 adu my programming language learning was different, although, I also started with basic
03:26 ingy I started with basic, then fortran on punchcards
03:26 raydiak adu: but "perl -pi -e s/foo/bar/ *.txt" used to be (still is?) a well-known one-liner among unix geeks of all sorts for changing the contents of a file
03:26 raydiak the mnemonic was "perl pie"
03:27 raydiak have to admit I've been cheating on perl a bit in the last few years :)
03:27 adu in the order that I learned them, I think it was GWBASIC, QBASIC, VisualBasic (at which point I switched from Win to Mac), FutureBasic, C, (at which point I switched to Linux), then Scheme, Bash, Python, Haskell, Forth, and Prolog
03:27 ingy perl -pi -e 's/\r//' file # dos2unix
03:27 adu raydiak: I use sed -i -e for that
03:28 ingy sed6
03:28 adu is there a sed6?
03:29 raydiak kinda a shame I never learned sed/awk, just for history's sake, but cool that I never felt a need I guess
03:29 adu the ONLY thing I ever do in awk is '{print $2}'
03:29 ingy I use sed in my bash programming
03:30 ingy which is substantial
03:30 raydiak ugh the syntax in bash scripting is just terrible to my brain
03:30 ingy ported test::more to bash and wrote json-bash and have some serious git commands in all modern bash
03:31 adu ingy: wow, json-bash, that is serious
03:31 raydiak wow, that's impressive
03:31 raydiak heh
03:32 ingy I did it for this: https://github.com/ingydotnet/git-hub
03:32 adu I think the most serious thing I ever wrote in bash was a getopt wrapper for something that only accepted files as inputs
03:32 adu but I've written about 5000 oneliners in bash
03:32 ingy git hub repos perl6 -r | git hub clone -   # clone all perl6 repos in one command :)
03:33 adu mostly of the form: "java -jar $SOMETHING"
03:33 ingy the main code is here. it's not perl6 but not as terrible as you might think
03:34 adu and it really pisses me off that no bash programmers seem to understand "$@"
03:34 noganex_ joined #perl6
03:34 ingy the repo commands are in the repos plugin and they are minimal and poweful code: https://github.com/ingydotnet/git-hub/blob/master/lib/git-hub.d/git-hub-repo
03:36 ingy but once you do serious bash programming you become really awesome in the shell
03:36 raydiak ingy++ # some of the cleanest shell scripting I've ever seen
03:36 raydiak I mean...I can read that...it can't be a shell script :)
03:36 ingy it has to be the most productive things i've done in 5 years. (learning the shell inside out)
03:37 ingy heh, I just wrote it all as if I were writing perl or ruby, and I googled every line :D
03:37 ingy like: "perl array append in bash"
03:38 ingy like: "perl array append in bash"
03:38 raydiak hah cool
03:38 ingy sorry
03:39 raydiak well I'd say *not* starting with existing shell scripts and learning from those, has served you quite well
03:39 ingy I'm working on this one tonight: https://github.com/ingydotnet/git-subrepo
03:39 ingy If I can get this git command working perfectly, I think it will be a game changer
03:40 ingy it's been close and usable for about a year, but get's ugly with complicated merges
03:40 ingy but I think I can fix it
03:40 adu raydiak: My recent language learning has involved Go, Rust, and Perl6
03:41 ingy adu: have you seen https://github.com/ingydotnet/pig-latin-acme yet?
03:42 ingy https://github.com/ingydotnet/pig-latin-acme#languages-supported-so-far
03:42 ingy needs rust
03:42 ingy :)
03:42 raydiak adu: the last new thing I learned was Lua, which was good for me, insofar as it's the opposite of Perl in terms of footprint, performance, and syntactic philosophy
03:43 ingy needs lua too :)
03:44 raydiak though I have to say sometihng a little less conventional is next...maybe haskell as I don't have a functional language under my belt yet, and lisp calls to me for reasons unknown
03:44 adu raydiak: Lua is pretty amazing, when I got my first Android phone, I had Lua compiled and running on it within a day!
03:44 ingy raydiak: have you learned or implemented your own forth yet?
03:44 adu raydiak: I was never able to get Ruby of Python compiled on Android, too many dependancies...
03:44 adu s/of/or/
03:45 raydiak methinks the lisp interest is mainly because of how so many older programmers talk about it like the long-lost tool of the gods or something :)
03:45 cognominal for people interested in languages, elm is a must see.  Haskell like using a reactive model, with a time travelling debugger, targeting js  http://elm-lang.org/   http://debug.elm-lang.org/
03:45 raydiak ingy: I haven't
03:45 ingy lisp is just a mindset
03:45 cognominal in many ways a polar opposite to Perl 6
03:45 ingy a way to think of programming
03:46 raydiak adu: hah cool...I saw they have a ps4 port even
03:46 adu raydiak: S-expressions are amazing, Common Lisp has every function ever invented, you just have to spend 20 years figuring out what it's called, and Scheme lets you write try/catch/return/break/continue/yield using only "continuations" which no one understands
03:46 ingy TimToady told me that Perl owes tons to Lisp
03:46 kurahaupo joined #perl6
03:47 cognominal I always thought that Perl was lisp that eventually cared about syntax.
03:47 raydiak yeah I guess part of it is I keep having these circles where I think "X is just a funny-looking Y, and Y is just a special case of Z", and people tell me I'm heading towards lisp
03:47 Ashu_ joined #perl6
03:47 cognominal so I am expecting a lot from masak macros.
03:47 adu raydiak: my point is that "Lisp" isn't all it's cracked up to be, S-expressions are what everyone is really talking about
03:48 ingy TimToady gave a speech early on in Perl days where he said that Lisp has the visual appeal of oatmeal with fingernail clippings
03:48 cognominal bon appétit
03:48 ingy and John McCarthy was in the audience, but TimToady didn't know it
03:49 cognominal G a  # G grand A petit => J'ai grand appétit  :)
03:49 ingy John was displeased
03:49 adu This is a relatively recent addition to Lisp syntax: http://srfi.schemers.org/srfi-110/srfi-110.html
03:49 ingy indent,FTW!
03:49 adu it looks like it dates back to 2013, but it's one of the first attempts (aside from age-old M-expressions) that are generic and beautiful at the same time
03:50 ingy Sweet-expressions == plain oatmeal
03:50 raydiak adu: ah, thanks for the perspective...helps me think about where to start if I sit down to learn it
03:51 ingy not Perl's David Wheeler
03:51 adu I'd like to see if it's possible to come up with an S-expression syntax for Perl6
03:53 raydiak that's something else about Lua...you can literally learn most of it in like a day...the tradeoff being that it usually requires more hand-holding (and lines of code) than perl asks of you
03:54 adu raydiak: but Scheme has the advantage that it's minimal, you can literally write anything in Scheme
03:54 adu raydiak: and JavaScript was actually written as a Scheme, with a different syntax patched on as an afterthought
03:55 raydiak why does javascript having "patched on as an afterthought" in its origin story not surprise me? :)
03:56 sirdancealot joined #perl6
03:56 adu http://www.crockford.com/javascript/little.html
03:58 raydiak reading stuff like that is neat
04:00 adu "As I’ve often said, and as others at Netscape can confirm, I was recruited to Netscape with the promise of “doing Scheme” in the browser." -- Brendan Eich
04:00 adu http://brendaneich.com/2008/04/popularity/
04:02 raydiak lemme get this straight...we coulda had lisp in the browser, but ended up with javascript instead?  maybe that's where things went wrong...
04:02 * raydiak looks at history as an explanation for why things are so screwed up in the present
04:02 adu it would have gone wrong at some point anyways, simply because of the law of large numbers
04:03 raydiak there is certainly more than no truth to that
04:05 xiaomiao raydiak: we could have had python, but then someone thought java was cooler
04:06 adu raydiak: http://paulgraham.com/95.html
04:07 raydiak having far less experience with java than javascript, I hate it far less :)
04:07 adu at least JS has closures
04:08 adu Java doesn't have closures or functions or methods, it only has classes
04:09 raydiak granted I didn't really know what I was doing, but I coulda swore I defined some stuff that looked a lot like methods in java before
04:12 IllvilJa joined #perl6
04:17 adu raydiak: what I mean is that methods are not first-class objects, you can't assign them to a variable, and you can't pass them as arguments
04:18 \o o/
04:19 Guest40626
04:19 Guest40626 ☺/
04:23 mickcy_ca joined #perl6
04:35 kaleem joined #perl6
04:39 cognominal nice link, adu
04:44 ggoebel111111118 joined #perl6
05:01 adu joined #perl6
05:03 mickcy_ca left #perl6
05:07 konsolebox joined #perl6
05:08 kst joined #perl6
05:23 chenryn joined #perl6
05:31 sqirrel_ joined #perl6
05:33 tinyblak_ joined #perl6
05:38 IllvilJa joined #perl6
05:42 tinyblak joined #perl6
05:43 tinyblak joined #perl6
05:48 yeahnoob joined #perl6
05:53 gfldex joined #perl6
05:59 konsolebox joined #perl6
06:01 tinyblak_ joined #perl6
06:01 konsolebox joined #perl6
06:11 Rounin joined #perl6
06:23 Mso150_y joined #perl6
06:25 xfix joined #perl6
06:38 CRM114 joined #perl6
06:47 kaleem joined #perl6
06:57 cognominal joined #perl6
06:57 chenryn joined #perl6
07:09 Rounin joined #perl6
07:14 cognominal joined #perl6
07:24 ggoebel111111119 joined #perl6
07:29 ggoebel111111111 joined #perl6
07:43 CRM114 left #perl6
07:43 darutoko joined #perl6
07:45 bjz joined #perl6
07:52 tinyblak joined #perl6
07:53 mattp_ joined #perl6
07:53 FROGGS joined #perl6
07:56 telex joined #perl6
07:56 zakharyas joined #perl6
07:57 [Sno] joined #perl6
07:59 abraxxa joined #perl6
08:03 tinyblak_ joined #perl6
08:05 bjz joined #perl6
08:21 TimToady http://rosettacode.org/wiki/Circle_sort#Perl_6
08:21 kst` joined #perl6
08:30 rindolf joined #perl6
08:51 ggoebel111111111 joined #perl6
08:52 brrt joined #perl6
08:56 renormalist joined #perl6
08:56 sqirrel_ joined #perl6
09:01 bjz joined #perl6
09:03 ggoebel111111112 joined #perl6
09:04 lizmat TimToady++ for circling :-)
09:04 yoleaux 7 Jan 2015 22:40Z <raydiak> lizmat: the cached precomp bug is #122896, the only difference between october and now being that it segfaults instead of giving the reported error message
09:04 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122896
09:05 abraxxa joined #perl6
09:08 dalek roast: a7bc14d | lizmat++ | S10-packages/precompilation.t:
09:08 dalek roast: Make sure tests fail for the right reason
09:08 dalek roast: review: https://github.com/perl6/roast/commit/a7bc14df67
09:11 nwc10 http://rosettacode.org/wiki/Rosetta_Code/Rank_languages_by_popularity#Perl_6
09:11 nwc10 and today, Perl 6 is 6th
09:11 nwc10 5 behind Ruby, 9 behind J
09:11 El_Che 77 rue du Ruisseau
09:11 El_Che 75018 PARIS
09:11 nwc10 Tcl is still top. So obviously Tcl is best.
09:11 El_Che crap
09:11 El_Che sorry
09:11 virtualsue joined #perl6
09:12 nwc10 apparently that's the "ibis Styles Paris"
09:13 El_Che hehee :)
09:14 yeahnoob joined #perl6
09:16 fhelmberger joined #perl6
09:20 molaf_ joined #perl6
09:21 rurban joined #perl6
09:28 dalek rakudo/newio: 0154f13 | lizmat++ | src/core/CompUnit.pm:
09:28 dalek rakudo/newio: Allow scalar values to be specified with :INC
09:28 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/0154f13aa3
09:28 dalek rakudo/newio: 4c6cfab | TimToady++ | src/Perl6/Actions.nqp:
09:28 dalek rakudo/newio: make << a b c 'x' >>[0] return 'a' not 'a b c'
09:28 lizmat sorry dalek
09:28 dalek joined #perl6
09:32 tinyblak joined #perl6
09:37 kjs_ joined #perl6
09:39 jack_rabbit joined #perl6
09:39 donaldh joined #perl6
09:46 dakkar joined #perl6
09:49 jluis joined #perl6
09:50 bjz joined #perl6
09:53 ruoso joined #perl6
09:56 timo joined #perl6
09:58 ruoso joined #perl6
10:00 donaldh joined #perl6
10:01 pecastro joined #perl6
10:10 masak good antenoon, #perl6
10:11 timotimo i hope you're having a pleasant day, masak :)
10:11 * timotimo is off
10:13 * masak starts making a pun about "a ♟ day", but realizes halfway that the piece is called "pawn", not "peasant"
10:18 kjs__ joined #perl6
10:24 bjz joined #perl6
10:26 tinyblak joined #perl6
10:28 cognominal Masak, tu est ♗? ♗ in French is "fou and means "mad person", not bishop
10:28 Psyche^ joined #perl6
10:29 cognominal I don't know why, maybe it is "fou du roi" : jester.
10:32 cognominal http://en.wikipedia.org/wiki/Bishop_(chess)   A nice explanation  http://en.wikipedia.org/wiki/Bishop_(chess)
10:33 masak cognominal++ # etymology of fools
10:34 masak ok, on with the hard questions.
10:34 masak how do we focus on and achieve stability?
10:34 masak let's say the abstract measure of stability is identified as having the biggest impact on the success of Perl 6 in 2015.
10:34 masak what can we do to increase this measure?
10:35 masak is there any literature on this? do we have any stability experts among us? do we know where they graze?
10:36 lizmat masak: get jnthn more Perl 6 time  :-)
10:37 masak I'm of two minds about that answer.
10:37 masak on the one hand, you're absolutely right.
10:37 lizmat it did have a :-)
10:37 masak yeah.
10:37 lizmat it's not the only thing
10:37 lizmat I know
10:37 masak on the other hand, burning out jnthn is a real risk. putting everything on him is one way to achieve that.
10:38 masak I'd rather we somehow empower more people to reach jnthnhood :)
10:38 brrt hmmm
10:38 lizmat that works too
10:38 brrt yeah
10:38 lizmat so maybe jnthn needs to give a MoarVM internals workshop
10:39 brrt we could do that
10:39 brrt i could help :-)
10:39 masak I was just gonna say.
10:39 lizmat and funding for that, we'll get together
10:39 masak maybe there's a course could be held to make more people able to help more.
10:39 masak lizmat++
10:39 masak I feel better already :D
10:40 lizmat I proposed this to jnthn  many months ago
10:40 cognominal to be ♘ed Jonathan, that would be an honour.
10:40 lizmat but he had too much $work
10:40 lizmat even when I tried to make a MoarVM workshop into $work, there was no room for that  :-(
10:41 lizmat need to be afk again, back in ~ half an hour&
10:42 masak I imagine 2015 will be more amenable to such a workshop.
10:43 brrt let us hope so
10:43 masak lizmat: actually, my mind didn't first reach for "MoarVM workshop", but for "tracking down and solving hard software problems workshop"
10:43 masak maybe those are two wholly distinct things. or maybe those can be combined somehow.
10:44 masak like, my idea was "you're facing a difficult software problem. normally you'd give up. but now you go, 'WWJD'? (What Would Jnthn Do)"
10:44 dj_goku_ joined #perl6
10:45 masak basically https://en.wikipedia.org/wiki/Modelling_(psychology) -- we take jnthn's methods (design, implementation, and debugging) and distil them into a course.
10:45 baest joined #perl6
10:53 denis_boyun joined #perl6
10:54 bjz joined #perl6
10:59 donaldh In addition to WWJD, I would also like to learn more about What Has Jnthn Done So Far
11:01 tinyblak_ joined #perl6
11:01 donaldh A blocker for me working on JVM backend performance is the task to remove priorInvocation and I just don't grok it yet.
11:03 moritz priori incantatem!
11:04 moritz masak: 'WWJD'? go for a long walk, and ponder the problem!
11:17 * JimmyZ would do more in MoarVM ...
11:17 Ugator joined #perl6
11:20 bjz joined #perl6
11:21 * masak .oO( WW JimmyZ D )
11:33 FROGGS WWPmD would also be most inspiring
11:33 masak oh, I'd pay to go to that.
11:44 haroldwu joined #perl6
11:45 haroldwu joined #perl6
11:48 masak last night before heading to bed, I ran into some design problems with 007. someone here on channel might be interested and/or have an idea: https://github.com/masak/007/issues/7
11:49 prime joined #perl6
11:51 vendethiel masak: that's an issue we have in coffee/xxx as well. we insert IIFEs all over the place to circumvent it
11:51 masak :(
11:51 sergot tony-o: I will take a look at this :)
11:51 sergot tony-o++
11:51 sergot hi #perl6 o/
11:51 vendethiel masak: sadly, it breaks down really fast. With generators, with return, with...
11:51 bjz joined #perl6
11:51 masak sergocie! \o
11:51 masak vendethiel: I feel I'm missing a solid approach here.
11:52 vendethiel and sometimes, something that *should* put an expression (that's actually a statement) as a statement doesn't work.(example: return inside comprehensions won't work, even though it could, because we could unwrap it enough in most cases to have the return at the right place)
11:53 vendethiel (and return really can't be used as an expression)
11:54 vendethiel so, yeah, you might need to create a new context/lexical scope "in an expression" to carry around what the macro has
11:54 masak I just added a comment to that effect.
11:55 masak it seems a viable way forward -- my only fear is that it makes the AST "non-portable" in some way.
11:55 * vendethiel resumes reading
11:55 masak but that fear may be unfounded.
11:58 sergot masaku! \o
11:58 sergot karma c
11:58 vendethiel you don't have anonymous subs in 007?
11:58 xfix joined #perl6
12:00 masak we don't.
12:00 masak for two reasons, kind of.
12:01 masak (a) more work, more special cases.
12:01 masak (b) currently, sub declarations are statements, not expressions.
12:02 jluis joined #perl6
12:04 dalek rakudo/newio: 0e92f08 | lizmat++ | src/core/IO/Local.pm:
12:05 dalek rakudo/newio: Fix wrong merge
12:05 dalek rakudo/newio: review: https://github.com/rakudo/rakudo/commit/0e92f0811b
12:19 psch .tell japhb 02-lock.t passes on jvm when $l is locked before the final condsignalone and unlocked afterwards (as per stackoverflow.com/questions/15769220)
12:19 yoleaux psch: I'll pass your message to japhb.
12:20 psch .tell japhb i don't know if that's how we want condvars to work on nqp though or if that should be abstracted away
12:20 yoleaux psch: I'll pass your message to japhb.
12:20 psch also hi #perl6
12:22 lizmat psch o/
12:22 psch lizmat \o
12:28 sqirrel_ joined #perl6
12:29 bjz joined #perl6
12:29 xfix Subroutines are expressions.
12:30 xfix Yes, even named.
12:30 xfix r: my &a = sub b { say "Subroutine!" }; a; b
12:30 camelia rakudo-{parrot,moar} c5dcdf: OUTPUT«Subroutine!␤Subroutine!␤»
12:31 xfix (although this is pointless, so it should be disallowed without `do` in my opinion)
12:32 xfix std: my &a = sub b { say "Subroutine!" }; a; b
12:32 camelia std f9b7f55: OUTPUT«ok 00:01 142m␤»
12:32 psch xfix: what makes this pointless? the sub not being anon?
12:33 xfix Well, it's more likely that code like this is a bug.
12:33 xfix But I guess it makes sense with `my` behaviour.
12:33 xfix while my $a = b() { } is completely fine.
12:34 masak xfix: with all due respect, you don't seem to know what you are saying right now.
12:34 xfix Now that I think about it (must have been using too much Python)
12:34 xfix masak, yeah, I probably don't.
12:34 xfix I agree.
12:34 masak xfix++ # taking criticism well :)
12:34 xfix I just realized the mistake while I was talking about it.
12:35 masak xfix: anyway, in 007 subroutine declarations are statements currently, not expressions.
12:36 xfix In Perl 5, my $a = sub b {} is disallowed, but I can see why code like that is allowed in Perl 6.
12:36 xfix Anyway, JavaScript has both function statement and expression.
12:36 masak with somewhat differing semantics.
12:37 xfix Even if those semantics are different, I somewhat like the behaviour of (function b() {}), which declares anonymous function that can refer to itself.
12:37 masak yes, definitely.
12:38 masak the meme "all anon functions should be given a name" reached me (and I adopted it) sometime last year.
12:38 masak (in JS)
12:38 timotimo that's mui importante
12:38 xfix I actually do that so too, because debuggers cannot recognize code like `Something.prototype.doSomething = function () {}` properly.
12:38 xfix Which is somewhat annoying.
12:39 xfix (perhaps something has changed lately)
12:40 lizmat .tell jnthn in #122896 it becomes evident that wrapping the sub in a traitmod on a Routine, segfaults on trying to run that routine in a precomped version
12:40 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122896
12:40 yoleaux lizmat: I'll pass your message to jnthn.
12:40 lizmat .tell jnthn this effectively bars things like "is cached" in the ecosystem
12:40 yoleaux lizmat: I'll pass your message to jnthn.
12:41 xfix I also think that JavaScript should allow function () {}() as statement without having to use parentheses, instead of shouting SYNTAX ERROR, WRITE BETTER CODE.
12:41 xfix Oh well, for a language designed in a week, JavaScript is not that bad.
12:42 xfix (although I understand why JavaScript doesn't do that... it would confuse two different meanings of function keyword when named function syntax is involved)
12:44 xfix Could be fixed by determining if the function statement is token by itself, or if there are extra stuff, but it introduces another issue caused by function statements not having semicolons, and function expressions having them.
12:45 xfix `function a() {}(1)` is valid JavaScript syntax, after all.
12:45 xfix Compatibility is hard. Once the language is stable, you cannot really change anything.
12:46 xfix But I guess that `let` keyword will fix the situation a bit once web browsers implement it, and there won't be that (function () {})() idiom anymore.
12:46 mst__ joined #perl6
12:47 kaleem joined #perl6
12:48 masak xfix: you might want to try `(function () { console.log("OH HAI") }())` in your Chrome console.
12:48 xfix Which is also somewhat ugly, because now there are two syntaxes to declare variables, `var` and `let`. `var` having function scope, and `let` having block scope. Compatibility is hard.
12:48 xfix masak, it prints OH HAI, doesn't it?
12:48 xfix (I don't have Chrome installed)
12:48 masak yes.
12:48 masak xfix: it's not that putting `()` directly after a function declaration is disallowed, as such. it's just that it only works for the expression form.
12:49 xfix I know.
12:49 masak then why do you expect it to work for the statement form?
12:49 masak that makes no sense.
12:49 xfix Because it's also an expression, but I guess you are right.
12:49 masak no, it is not an expression.
12:50 xfix Well, function () {} is an expression or statement depending on whether it's first token in a statement.
12:50 masak for all I care, with hindsight, JavaScript might have been better off wihtout the statement form of function declaration.
12:50 masak xfix: right. and if it's a statement, then it's not an expression. and then you can't add `()` after it.
12:51 masak (because the statement already finished, and statements also can't have an `()` after them like that)
12:51 sjn Huh, seems TimToady's talk at FOSDEM has been moved to the main track.. cool!
12:51 sjn oh, and hi, #perl6 :)
12:51 xfix Language design is interesting.
12:51 tadzik oh hai sjn
12:51 xfix Perl 6 has many syntax rules, but there are also simpler languages like Lisp.
12:53 lizmat re TimToady at FOSDEM: capacity of room is 1400  :-)
12:54 itz given the average FOSDEM talk has people queueing down the hallway to get it that's probably just as well
12:55 lizmat .tell jnthn re #122896 it feels like the original sub is not being serialized
12:55 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122896
12:55 yoleaux lizmat: I'll pass your message to jnthn.
13:04 bjz joined #perl6
13:23 bjz joined #perl6
13:49 pmurias joined #perl6
13:50 pmurias masak: why such a strong expression/statement seperation in 007
13:51 pmurias in my experience when generating code the expression/statement seperation is just an annoyance
13:52 jack_rabbit joined #perl6
13:54 bjz joined #perl6
14:08 lizmat is there a reason why we're not allowed to .print .say or .spurt to an IO::Socket ?
14:08 tadzik perhaps to encourage thinking about bytes rather than strings
14:08 lizmat and is there a reason why we cannot .slurp-rest from a socket ?
14:08 lizmat I think they're all hysterical raisens
14:09 * lizmat is trying to merge the PIO role also into IO::Socket
14:09 lizmat most of the internals already use the same nqp:: functions (except maybe on Parrot)
14:10 lizmat so from that point of view, I don't see a reason not to merge
14:16 tinyblak joined #perl6
14:24 bjz joined #perl6
14:25 donaldh lizmat: when I was implementing some of the socket stuff on the JVM backend, the differences looked hysterical.
14:27 jack_rabbit joined #perl6
14:37 lizmat donaldh: such as?
14:38 lizmat donaldh: you mean at the nqp level?
14:39 donaldh The differences you have mentioned. Lack of .print, .say or .spurt for example. As long as you can set an encoding and a linesep then I think it makes sense for IO::Socket and PIO to converge on the full set of methods
14:40 donaldh Does it still make sense to call the implementation IO::Socket? Or should there be a common role, or base class?
14:40 donaldh it's been a while since I looked at it at al.
14:41 xfix joined #perl6
14:41 lizmat in the newio spec branch, I'm trying to do just that:
14:41 lizmat all things related to paths are in a IO::Pathy role
14:41 lizmat all things that work on handles, are in a PIO role
14:42 lizmat see https://github.com/perl6/specs/blob/newio/S16-io.pod
14:42 donaldh Ah right, so some of the IO::Socket impl would be replaced by the PIO role?
14:44 lizmat just about everything, really
14:45 rindolf joined #perl6
14:45 spider-mario joined #perl6
14:47 bjz joined #perl6
14:47 dalek specs/newio: fbdc909 | lizmat++ | S16-io.pod:
14:47 dalek specs/newio: Tweaks
14:47 dalek specs/newio: review: https://github.com/perl6/specs/commit/fbdc9094c4
14:48 donaldh lizmat++
14:49 pmurias masak: or is 007 supposed to compile to javascript? that would be the most valid reason for not having do
14:50 moritz pmurias: iirc masak++ wanted to make problems obvious that Perl 6 often glosses over; the distinction between statements and expressions is just an instance of the more general problem
14:50 moritz pmurias: ... which is that you can't stick every AST everywhere
14:52 lizmat http://pixelscommander.com/en/javascript/nasa-coding-standarts-for-javascript-performance/   # applies to just about any language I guess
14:57 brrt joined #perl6
15:07 Ulti m: say .2.nude.join: '/'
15:07 camelia rakudo-moar c5dcdf: OUTPUT«1/5␤»
15:08 * Ulti just had fun playing with Rat and didn't realise how much stuff was in there CurtisOvidPoe++
15:09 lizmat #jesuischarlie&
15:09 spider-mario joined #perl6
15:11 tinyblak joined #perl6
15:13 mr-foobar joined #perl6
15:25 donaldh r: 'string' ~> 2
15:25 camelia rakudo-moar c5dcdf: OUTPUT«infix:«~>» not yet implemented. Sorry. ␤  in sub infix:<~>> at src/gen/m-CORE.setting:7510␤  in sub infix:<~>> at src/gen/m-CORE.setting:7510␤  in block <unit> at /tmp/tmpfile:1␤␤»
15:25 camelia ..rakudo-parrot c5dcdf: OUTPUT«infix:«~>» not yet implemented. Sorry. ␤  in sub infix:<~>> at gen/parrot/CORE.setting:7518␤  in sub infix:<~>> at gen/parrot/CORE.setting:7518␤  in block <unit> at /tmp/tmpfile:1␤␤»
15:28 kurahaupo joined #perl6
15:29 skids joined #perl6
15:33 bjz joined #perl6
15:34 tinyblak joined #perl6
15:52 bjz joined #perl6
15:56 donaldh Golfing the cause of NQPMatch serialization on JVM backend https://gist.github.com/donaldh/91a212b38725642131be
15:58 arnsholt donaldh: That's an odd one. From the looks of it looks like it has to be a bug in the colonpair action or its call graph, no?
15:59 arnsholt Er, no
15:59 arnsholt The fatarrow action, of course
16:00 donaldh Yes, but not everywhere.
16:00 donaldh It has to be a toplevel sub or multi sub, not a class method, for example.
16:00 treehug88 joined #perl6
16:01 arnsholt Used in a toplevel sub, you mean?
16:02 donaldh The behaviour occurs for 5 uses of X::NYI.new(...).throw in the setting.
16:02 donaldh yes, used in a toplevel sub.
16:03 arnsholt Very odd
16:04 donaldh I can 'fix' the core setting by using colonpair syntax instead, for these 5 cases.
16:04 arnsholt Yeah, but this is one of those bugs that smell like something that really should be fixed
16:04 donaldh indeed.
16:05 arnsholt I guess it has to be something funny going on with the "$<key>.Str" call in Actions.fatarrow?
16:07 donaldh Well, it happens in Actions.add_inlining_info_if_possible when it hits a QAST::Want+{QAST::SpecialArg}
16:09 donaldh Actions.add_inlining_info_if_possible tries really hard to clear out any unwanted stuff like the $qast.node but in this situation the NQPMatch is leaking through.
16:09 donaldh I can't figure out why, for the life of me.
16:09 arnsholt Odd
16:09 arnsholt But only for some cases of Want+SpecialArg, presumably
16:10 donaldh it seems like all of them.
16:11 PerlJam Is there something wrong with rakudobrew build-panda or is it just me?   It gets to '==> Reinstalling' and just sits there
16:12 moritz PerlJam: which backend?
16:12 PerlJam moar
16:13 arnsholt donaldh: Oh, if it's all of them I might actually know. I bet you "nqp::istype($node, QAST::Want)" (Actions.nqp:2742) is false, when it has the SpecialArg mixin
16:14 donaldh Yeah, 5 cases of fatarrow results in 10 Want+SpecialArg with NQPMatch serialization. Eliminate those 5 fatarrow and then no Want+SpecialArg.
16:14 donaldh arnsholt: nope that's not it. Checked that.
16:14 tinyblak_ joined #perl6
16:14 rurban joined #perl6
16:14 * skids notes PANDA_SUBMIT_TESTREPORTS is only docced in blogs.  Maybe a howto tab on the reports site and a README.md on the cpandatesters github.
16:15 bjz joined #perl6
16:16 donaldh I am checking nqp::istype($replacement, QAST::SpecialArg) inside the QAST::Want check and then dumping the $replacement, to get hints of where to find the offending fatarrow.
16:16 pyrimidine PerlJam: I had a very similar problem, same backend.  Only happened on my laptop (running Mac OS X, Mavericks)
16:16 jluis joined #perl6
16:17 pyrimidine PerlJam: Ran it off my imac (also Mavericks) and it worked fine.
16:18 PerlJam I'm running ubuntu 14.04 on a desktop fwiw
16:18 pyrimidine huh
16:19 pyrimidine I managed to trace it to IO::Socket::INET, but that's as far as I got.
16:19 pyrimidine If I changed to the old URL (feather) it worked fine, but I think that's hard-coded.
16:20 Alina-malina joined #perl6
16:24 brrt fwiw, i mentally think of sockets as byte streams rather than string streams
16:25 brrt wait a minute
16:27 brrt io is reaaaaally complicated
16:28 brrt i'll just go back to bitmangling
16:29 donaldh :D
16:34 telex joined #perl6
16:35 H2O1 joined #perl6
16:35 brrt i don't envy lizmat++ for taking up the task
16:35 brrt consider that a UDP socket is really a Supply of packets (or a Sink, if we have such a concept?)
16:36 brrt and that a TCP socket isn't really a stream but rather a Session
16:38 masak pmurias: what moritz++ said.
16:39 masak pmurias: (personally, I hope 007 never compiles to anything. that'd mean people have started taking it seriously in a way it was never meant to.)
16:39 masak pmurias: the distinction between statements and expressions seemed to me at the time to make things easier. (notably, if there's no distinction, then everything can interact with everything in some sense. O(n**2) interactions.)
16:40 masak pmurias: it *still* seems easier in that way, even as I am re-evaluating that balance à la https://github.com/masak/007/issues/7
16:40 jluis joined #perl6
16:41 masak pmurias: Lisp seems to me to pull off (very well) the trick of making everything an evaluable expression. but Perl 6 isn't and won't be a language where that's true -- therefore, exploring the distinction is a worthwhile goal of 007.
16:42 tony-o what is 007
16:42 masak fwiw, I liked the idea of "stuttering" as a mechanism, and I hope it survives the realizations about scoping.
16:42 masak tony-o: http://masak.github.io/007/
16:43 moritz my impression is that every statement in Perl 6 can be used as an expression, and the distinction is purely syntactic
16:43 masak yes, I think so.
16:43 tony-o interesting
16:44 H2O1 left #perl6
16:45 masak moritz: but the fact that that is "easier said than done" is evicenced by the fact that RT contains at least half a dozen tickets on the theme "we evaluated this thing, but it contained a next/leave/BEGIN/(other exotic control flow) and caused a Big VM fail"
16:45 masak grocery store &
16:50 Ugator left #perl6
16:54 tinyblak joined #perl6
17:04 tinyblak joined #perl6
17:07 zakharyas joined #perl6
17:10 bjz joined #perl6
17:14 rurban joined #perl6
17:16 tinyblak joined #perl6
17:33 sirdancealot joined #perl6
17:35 TimToady statements are just a monadic relationship of expressions; trying to carry the notion of statements any further into the semantic system is just adding complication, not removing it
17:36 TimToady I don't know what "part of an expression" means in the chart
17:36 dalek nqp: f05a5d7 | (Geoffrey Broadwell)++ | t/concurrency/02-lock.t:
17:36 dalek nqp: Fix 02-lock.t braino that results in a LTA Java error under nqp-j; thanks psch++ for spotting this.
17:36 dalek nqp: review: https://github.com/perl6/nqp/commit/f05a5d7264
17:36 dalek nqp: f8ba48f | (Geoffrey Broadwell)++ | t/concurrency/01-thread.t:
17:36 dalek nqp: Reduce chance of interleaved TAP output in 01-thread.t
17:36 dalek nqp: review: https://github.com/perl6/nqp/commit/f8ba48f2cb
17:37 Mouq joined #perl6
17:37 vendethiel- joined #perl6
17:37 TimToady I think both macros and quasioids should be associated with a syntax category, and those categories should be treated more like types than we do currently
17:37 kaleem joined #perl6
17:37 TimToady then your "stuttering" is simply a type conversion
17:38 TimToady and if there's no conversion provided, then an error is the natural outcome
17:39 japhb TimToady: I interpreted "part of an expression" as being in a subexpression of a larger expression, as opposed to being at the highest level of expression inside a statement.  (Being the 'foo' in 'my x = foo' instead of the 'bar' in 'my y = 2 * bar')
17:39 yoleaux 12:19Z <psch> japhb: 02-lock.t passes on jvm when $l is locked before the final condsignalone and unlocked afterwards (as per stackoverflow.com/questions/15769220)
17:39 yoleaux 12:20Z <psch> japhb: i don't know if that's how we want condvars to work on nqp though or if that should be abstracted away
17:39 TimToady on the P6 syntax level, 'do' is just an example of such a category converter; it really does nothing else
17:39 TimToady japhb: those are all just expressions
17:40 japhb TimToady: not in a language that does not treat assignment as an expression.
17:41 vendethiel joined #perl6
17:41 TimToady that sounds more like 'part of a statement' than 'part of an expression'
17:42 japhb psch: As mentioned in the commit description, thanks for the 02-lock.t catch.  My feeling is that not having the lock when you signal the condvar indicates a bug in the user code with high probability, so we shouldn't paper over it.  However, the Java error is way LTA, so that should be caught and turned into a proper NQP/Perl 6 error.
17:42 danaj joined #perl6
17:43 gfldex joined #perl6
17:43 japhb TimToady: my point was that in 'my x = foo', 'foo' is a complete expression that is part of a statement, whereas in 'my y = 2 * bar', 'bar' is part of an expression that is itself part of a statement.  (In, as I said, a language that treats assignment as a statement and not an expression.)
17:43 japhb At least, that's how I interpreted masak's writing.
17:46 TimToady that still sounds like sloppy thinking to me; both of those are still going to be parsed by something like EXPR, it's just that * will do so recursively somehow
17:46 TimToady both of them *expect* an expressoin at that point
17:46 TimToady maybe I just need more coffee
17:53 bjz joined #perl6
17:53 mvuets joined #perl6
17:56 rurban joined #perl6
17:58 TimToady Enlish is also a language that makes a syntactic distinction between statements and expressions, and then let's you mush them all back together on the samentic level, as long as the listener can "cast" the return value into an appropriate context
17:58 TimToady examples abound, but my favorite:
17:58 TimToady "I don't like your I-can-use-anything-as-an-adjective attitude."
17:59 japhb :-)
17:59 TimToady *semantic
17:59 japhb .oO( semitic )
17:59 TimToady how the heck did I get samentic?
18:00 japhb It's the same antics you always get into.
18:01 * TimToady should become more antic-warian...
18:04 dalek nqp: 6dfafac | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
18:04 dalek nqp: Un-LTA condsignalone on an unlocked condvar.
18:04 dalek nqp:
18:04 dalek nqp: According to the Javadoc for ReentrantLock signalling
18:04 dalek nqp: only ever throws IllegalMonitorStateException when
18:04 dalek nqp: the Lock is not held.
18:04 dalek nqp: review: https://github.com/perl6/nqp/commit/6dfafac1b1
18:05 psch japhb: the discrepancy between mvm and jvm still puzzles me though
18:05 TimToady lately I've been thinking of ; as just a syntactic operator that makes lists of expressions; it's the block context that turns those into the equivalent of a C comma operator; [] and () instead turn ; into a lol
18:05 japhb psch++  # Fast fix -- does condsignalall need the same treatment?
18:06 japhb psch: Agreed re: discrepency.  Maybe libuv just doesn't try to detect this case?
18:06 psch japhb: uh, yes, it does :)
18:06 psch need the fix that is
18:06 japhb nodnod
18:07 japhb TimToady: I like that way of thinking.
18:07 dalek nqp: 0713ffd | peschwa++ | src/vm/jvm/runtime/org/perl6/nqp/runtime/Ops.java:
18:07 dalek nqp: Un-LTA candsignalall on an unlocked condvar.
18:07 dalek nqp: review: https://github.com/perl6/nqp/commit/0713ffd2c6
18:08 japhb psch++ again.  :-)
18:08 TimToady of course, block syntax is also the scaffolding for lexical scoping, and I can argue that this is perfectly natural, since lists of side effects need things to affect
18:08 masak TimToady: "part of an expression" means `1 + foo()` where `foo` is the macro.
18:09 * TimToady still thinks it's meaningless
18:09 treehug88 joined #perl6
18:10 TimToady anywhere the parser expects an expression is functionally the same as any other place, to my mind
18:10 Mso150 joined #perl6
18:11 TimToady the important thing, I think, is to start regarding slot mismatches as type mismatches
18:12 psch japhb: http://logs.nodejs.org/libuv/2013-08-12#17:52:22.912
18:13 FROGGS_ joined #perl6
18:13 psch so jvm was right in throwing, and libuv is just lenient
18:15 psch s/right/simply more strict/
18:16 japhb nodnod
18:18 japhb The thing is, it makes sense from the outside in a few cases to signal without being locked, but in terms of the low-level implementation, possibly less so.
18:20 treehug88 joined #perl6
18:25 bjz joined #perl6
18:27 tinyblak joined #perl6
18:27 TimToady grammar rules already encode their slot and expected ast type as part of their name; this is why 'macro' as a keyword is kinda wimpy compared to the 'slang token' proposal
18:27 TimToady just as a well-typed grammar rule is the interface to the outer text, so too we need well-typed quasis to interface to the inner text
18:28 TimToady and that probably needs to be declarative, since it will influence what is parsed inside the quasi
18:29 TimToady once you have that, poking a typed quasi into a typed slot is a simple matter of type recognition/conversion
18:30 TimToady the thing about these typed grammatical slots is that they not only say where the parse will start, but in what state the parse will be stopped
18:30 psch bringing jvm in line with mvm on the condsignal means implementing our own ReentrantLock and Condition... i have no clue if that'd be worth it, i can't judge how common the cases for signalling from the outside are for our async primitives
18:31 dalek rakudo-star-daily: 0db39de | coke++ | log/ (10 files):
18:31 dalek rakudo-star-daily: today (automated commit)
18:31 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/0db39def4b
18:31 dalek perl6-roast-data: ca0e711 | coke++ | / (5 files):
18:31 dalek perl6-roast-data: today (automated commit)
18:31 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/ca0e7119a0
18:32 TimToady I view the current macro thinking as kind of a groping forward in the struggle against accidental genericity without compromising intentional genericity
18:34 TimToady which maps rather nicely onto type systems that provide a generic/specific continuum
18:34 masak I wish I could be a part of this backlog, but I'm preparing a somewhat late dinner.
18:34 tinyblak joined #perl6
18:34 masak best I can do is read and reply later :)
18:39 TimToady so anyway, I'm thinking we need some classes that reflect infix, prefix, statement, comment, etc. and not just operational how-to-parse info
18:45 treehug88 joined #perl6
18:48 masak yes. me too.
18:48 treehug88 joined #perl6
18:51 tinyblak_ joined #perl6
18:51 treehug88 joined #perl6
18:51 bjz joined #perl6
18:55 brrt joined #perl6
18:58 treehug88 joined #perl6
19:00 pyrimidine moritz, PerlJam: panda issue seems related to nqp::readlinefh and appear moarvm-specific.  Testing JVM now.
19:00 pyrimidine Just tried installing Parrot for the first time in a while, and it craps out on icu
19:01 FROGGS_ yes, we complain now if icu is not there
19:04 pyrimidine FROGGS_: makes sense.  Problem is, OS X 10.9 and up have a system libicu installed which the installer doesn't find (no headers, icu-config). May have to fiddle with a local icu install
19:05 FROGGS_ hmmm :/
19:05 FROGGS_ doing it right for osx is hard these days
19:06 pyrimidine FROGGS_: yep.  I also thought about using homebrew, but 'brew install icu4c' indicates possible issues if installing a separate icu.  fun :)
19:11 xfix joined #perl6
19:13 japhb OS X drives me nuts as a developer, because it doesn't even have the excuse of being not-unix.
19:14 denis_boyun_ joined #perl6
19:15 kaare__ joined #perl6
19:15 japhb TimToady: Interestingly, that type system macro thinking puts some more meat on my nebulous macro idea in which I used grammar rule names in a type-ish fashion.
19:15 b2gills m: say {(^6).roll} ...^ 0
19:15 camelia rakudo-moar c5dcdf: OUTPUT«2 1 4 3 4 1 2 4␤»
19:19 b2gills m: say join '', ({ ('A'..'Z','a'..'z',0..9,Mu).roll } ...^ !*.defined); # password generator
19:19 camelia rakudo-moar c5dcdf: OUTPUT«fYpGTdo9W7dJvNWas6ALbF9l9nZMH70w4y67SGnfQ0QdXodhRS8pqwjgeEqdtQXopf6DT1M97iCUZK␤»
19:24 bartolin hi, #perl6!
19:25 kjs_ joined #perl6
19:26 japhb o/
19:26 bartolin it looks that with commit 79e62b4 there came a 'NO-BREAK SPACE' character in a comment to src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java. since then it's sitting there in line 354 and busted my daily jvm builds :/
19:29 bartolin before that commit I was able to build jvm with LANG=''
19:31 psch bartolin: whoops.  my advent post made me get used to that, sorry
19:31 psch i can PR that, but i'd say that's a bit silly for replacing a space
19:31 bartolin psch: I thought the same :-) maybe someone else can fix it
19:32 bartolin otherwise psch++ for those commit
19:35 bartolin hmm, looking a second time that commit is a bit older. my builds started to fail three days ago only. but make dies with "src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java:354: error: unmappable character for encoding ASCII
19:35 FROGGS_ hmmm, I dont spot it
19:35 psch bartolin: the commits have only been merged a few days ago
19:36 FROGGS_ 354 is:         // Perl 6' .new creating a new CallFrame or something..?
19:36 bartolin FROGGS_: yes, between 'Perl' and '6' there is a non breaking whitespace
19:36 bartolin psch: ok, that explains it
19:36 FROGGS_ ahh, I see it :o)
19:36 * bartolin sees it very clearly
19:38 dalek rakudo/nom: ac9c85e | FROGGS++ | src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java:
19:38 dalek rakudo/nom: replace non breakable space with whitespace
19:38 dalek rakudo/nom:
19:38 dalek rakudo/nom: bartolin++
19:38 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ac9c85e698
19:38 bartolin thanks a lot, FROGGS++
19:43 jnthn evening, #perl6
19:43 yoleaux 12:40Z <lizmat> jnthn: in #122896 it becomes evident that wrapping the sub in a traitmod on a Routine, segfaults on trying to run that routine in a precomped version
19:43 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122896
19:43 yoleaux 12:40Z <lizmat> jnthn: this effectively bars things like "is cached" in the ecosystem
19:43 yoleaux 12:55Z <lizmat> jnthn: re #122896 it feels like the original sub is not being serialized
19:43 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=122896
19:45 bartolin FROGGS_: on another note: did you see that you got some wrongish test reports at testers.perl6.org from my daily smokes on freebsd? ugexe++ found them and helped me to narrow down the problem. i filed a rakudobug (RT #123563).
19:45 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=123563
19:45 jnthn lizmat: I'm not immediately sure what's going on, but will but it on my todo list for once I'm back :)
19:46 bartolin FROGGS_: I stopped to submit reports for now, but I wonder if you want to remove the unreliable reports ...
19:47 vendethiel joined #perl6
19:47 jnthn From the backlog, and on stability: while it is obviously an important goal, and also nice that we've improved performance sufficiently that it's no longer a top priority for so many folks, I don't think we've become *less* stable over the last year at the things we've long been able to do well.
19:47 jnthn Most of the instability is in concurency stuff - and thus in things that we simply didn't even have a year ago.
19:48 * vendethiel agrees
19:48 vendethiel fwiw, when I show benchmarks numbers now, people still say "slow", but it's "slow like ruby", not "slow like a snail"
19:49 tgt joined #perl6
19:49 jnthn Most other stuff we have wasn't immediately trustworthy either, it's just that it's had chance to mature, and time spent on it. Concurrency has had a lot less time invested in it than it really needs. Once it gets that attention, things will be better.
19:50 * jnthn is a bit frustrated that various things kept him from having a good amount of time on that in the latter part of 2014, but happy to report that his 2015 is looking rather better. :)
19:51 jnthn And yes, I agree with the sentiment in the backlog that we could do with finding ways I can do more knowledge-sharing to help spread the load.
19:55 raiph joined #perl6
19:57 PZt joined #perl6
19:58 bcode joined #perl6
20:02 * [Coke] fixes the rakudo-star-daily cronjob and kicks it off again.
20:02 [Coke] .ask moritz any luck with parrot hang on R*?
20:02 yoleaux [Coke]: I'll pass your message to moritz.
20:04 FROGGS_ bartolin: I have to find out in what way they are wrong first.... there was something about that in the clogs, right?
20:04 brrt joined #perl6
20:06 bartolin FROGGS_: the bug report has a link to a closed panda issues which has some more informations. apart from that there is a something in the irclogs (skid++ brought the problem up, actually): http://irclog.perlgeek.de/perl6/2015-01-07#i_9898147
20:08 bartolin FROGGS_: in short, the summary (whether for build or tests was not reliable). e.g. some failing builds and tests where marked 'PASS'
20:09 denis_boyun_ joined #perl6
20:10 panchiniak joined #perl6
20:13 japhb jnthn: I meant stability in two senses (this got lost a bit in later discussions): Stability as in "doesn't crash, hang, eat all RAM, gate in Cthulhu, incorrectly execute the code as written, etc." and stability as in "fundamentals of language, such as lists and IO ops, aren't still changing".
20:14 japhb jnthn: Lack of the latter is annoying, because it means building correct idiom habits becomes a bit of a footgun.
20:15 jnthn Yes, agree.
20:16 japhb jnthn: Lack of the former is expected while major implementation bits are changing, but not having that form of stability at any point between major upheavals makes it very difficult to use the compiler in production, because you can't pick a "golden revision" that you lock production compiles to, until the next rock-solid revision comes about.
20:17 japhb So that's part of how it became more important than performance.
20:17 japhb (for me)
20:18 Mso150 joined #perl6
20:19 japhb The other part is that the major features that I would use to work around straight-line slowness (all the various concurrency related features) are the ones that are least stable in that former sense, so I can't just go "Yeah, 1 thread runs at 10% the speed I need, but I can run a threadpool of 24 threads and be well into safety margin"
20:21 japhb Note: None of this is intended to blame anyone for the situation.  I'm just explaining why my priorities got inverted -- not because performance got fast enough for my use cases, but because it didn't improve *enough* for me to just rely on single-threaded performance by itself.
20:26 jnthn Sure; good to understand why you're being pushed to the less stable things, though.
20:34 moritz [Coke]: no progress :(
20:34 yoleaux 20:02Z <[Coke]> moritz: any luck with parrot hang on R*?
20:38 kjs_ joined #perl6
20:40 bjz joined #perl6
20:52 bjz_ joined #perl6
20:55 tinyblak joined #perl6
20:56 muraiki if instability means gating in cthulhu, I'm all for unstable
20:56 tony-o is there a 'prompt' that hides the input?
21:03 FROGGS_ tony-o: "Update io_operators.pm" is not ideal as a commit message
21:03 tony-o sorry, i got clicky
21:04 tony-o fixed
21:05 FROGGS_ tony-o: is then :hidden param specced? or is something else in that regard specced?
21:05 tony-o i couldn't find it anywhere
21:10 * colomon was looking at a repo the other day that had no commit message more useful than "Update io_operators.pm"
21:11 tony-o i updated the message but closed it
21:14 Mso150 joined #perl6
21:15 denis_boyun_ joined #perl6
21:19 timotimo good * #perl6 o/
21:19 colomon \o
21:20 psch o/ timotimo
21:42 panchiniak left #perl6
21:49 kjs_ joined #perl6
21:51 raiph joined #perl6
21:59 kjs_ joined #perl6
22:07 * psch sleep &
22:11 [Sno] joined #perl6
22:16 b2gills tony-o: I assume the point of :hidden was to stop the characters from being printed to the console as you type them
22:16 b2gills ... which is not what that commit does
22:18 dalek rakudo-star-daily: 19cb037 | coke++ | log/ (10 files):
22:18 dalek rakudo-star-daily: today (automated commit)
22:18 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/19cb037d66
22:29 * [Coke] is about to go on business travel somewhere where there is no PM. :(
22:47 Mouq joined #perl6
22:48 virtualsue joined #perl6
22:49 ssutch joined #perl6
22:52 masak TimToady: backlogging now.
22:52 masak TimToady: in the `1 + foo()` example, the main point was that things wouldn't go well (in 007) if `foo()` inserted an `if` statement.
22:52 masak (say)
22:53 masak TimToady: whereas with `foo()` at the top level of the expression statement, you'd get away with it, with some Q-node stuttering.
22:53 masak and in fact, you'd *have* to get away with it, because expressions are the only things that can call macros. so if that didn't work, there'd be no way to insert `if` statements.
22:54 masak TimToady: but now that I read your comments about type mismatches, it sounds like you're in support of some things not being insertable in some slots.
22:54 masak I like the idea about handling that through type matching. will need to think about that a bit further.
22:56 adu joined #perl6
22:56 rurban joined #perl6
23:01 masak TimToady: a very concrete example of how parser state and Q node shape interact is in the expression parser. I've written down 007's world view here: https://github.com/masak/007/blob/master/operators.md
23:01 masak it's kind of like a reduced version of Perl 6's.
23:03 masak ok, midnight. time for sleep.
23:03 masak 'night, #perl6
23:04 adu hi masak
23:04 adu gnight
23:05 adu I have a ?
23:06 adu what are the advantages of using EXPR in HLL::Grammar?
23:10 telex joined #perl6
23:12 Mouq adu: Compared to?
23:19 adu Mouq: implementing it yourself?
23:26 adu why is it that $.HOW.HOW and $x.WHAT.WHAT don't work?
23:32 cognominal joined #perl6
23:32 Mouq adu: It may or may not be faster, and is, I assume, pretty robust. cons: pretty much undocumented api, possibly hard to understand
23:33 Mouq m: say 1.HOW.HOW
23:33 camelia rakudo-moar c5dcdf: OUTPUT«No such method 'gist' for invocant of type 'NQPClassHOW'␤  in sub say at src/gen/m-CORE.setting:16653␤  in block <unit> at /tmp/aC29oAV2U_:1␤␤»
23:33 Mouq m: say 1.HOW.HOW.name
23:33 camelia rakudo-moar c5dcdf: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in any name at gen/moar/stage2/nqpmo.nqp:1201␤  in block <unit> at /tmp/ZXhseU7Ora:1␤␤»
23:33 Mouq m: say 1.HOW.HOW.^name
23:33 camelia rakudo-moar c5dcdf: OUTPUT«NQPClassHOW␤»
23:33 adu what does ".^" do?
23:35 japhb adu: You can roughly think of a.^b as syntactic sugar for a.HOW.b(a)
23:35 adu ok
23:36 adu so it's kind of like a metaclass method invokation
23:36 japhb And the reason 1.HOW.HOW fails is that you cross the border between Perl 6 and NQP implementation, and a lot of the convenience methods one comes to expect in Perl 6 objects don't exist in NQP land.  You can usually get what you want with more effort though, as Mouq++ showed.
23:36 japhb adu: Yeah, basically.
23:37 japhb *'say 1.HOW.HOW' fails
23:38 cognominal joined #perl6
23:41 adu I need to understand Rubyish
23:56 silug joined #perl6
23:58 jack_rabbit joined #perl6
23:58 Rounin joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo