Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-05-27

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:09 xragnar joined #perl6
00:20 Ben_Goldberg joined #perl6
00:24 raiph joined #perl6
00:34 Colby` joined #perl6
00:40 avuserow m: .say for "one two".comb(/\w+/)
00:40 camelia rakudo-moar 851811: OUTPUT«one␤two␤»
00:41 Ben_Goldberg r: .say for "one two".words
00:41 camelia rakudo-jvm 851811: OUTPUT«(timeout)»
00:41 camelia ..rakudo-{parrot,moar} 851811: OUTPUT«one␤two␤»
00:42 Ben_Goldberg m: .say for "one two".comb(/'o'/)
00:42 camelia rakudo-moar 851811: OUTPUT«o␤o␤»
00:42 Ben_Goldberg m: .say for "one two".comb(/[oe]/)
00:42 camelia rakudo-moar 851811: ( no output )
00:44 timotimo you may want <[oe]> there to get a character class
01:19 SamuraiJack joined #perl6
01:35 FOAD joined #perl6
01:45 Su-Shee_ joined #perl6
01:45 Sqirrel joined #perl6
02:03 klapperl joined #perl6
02:15 xenoterracide joined #perl6
02:35 hoverboard joined #perl6
02:48 bjz joined #perl6
02:50 thou joined #perl6
03:00 BenGoldberg joined #perl6
03:21 kaare_ joined #perl6
03:21 bbkr joined #perl6
04:43 BenGoldberg Is there any way, with a grep sub { .... } list, for that sub to indicate that it will return false (or true) for all future items?  It would be a cool optimization, if it were possible.
04:44 BenGoldberg OTOH, I suppose that branch prediction might take care of that... nevermind, I guess.
04:45 SevenWolf joined #perl6
04:52 kaare_ joined #perl6
05:06 rindolf joined #perl6
05:12 anaeem1 joined #perl6
05:15 SamuraiJack joined #perl6
05:20 SamuraiJack joined #perl6
05:23 anaeem1_ joined #perl6
05:33 xinming joined #perl6
05:36 anaeem1_ joined #perl6
05:58 denis_boyun_ joined #perl6
05:58 kaleem joined #perl6
06:10 jack_rabbit joined #perl6
06:24 jack_rabbit joined #perl6
06:34 bjz joined #perl6
06:42 grondilu joined #perl6
06:43 dmol joined #perl6
07:17 fhelmberger joined #perl6
07:21 zakharyas joined #perl6
07:28 [Sno] joined #perl6
07:29 darutoko joined #perl6
07:30 sergot morning! :)
07:31 moritz \o
07:34 pdcawley joined #perl6
07:54 lizmat good *, #perl6!
07:56 Timbus if i define a BUILD in a role to init some private vars, it will break the implementing class' default build if it hasn't defined that
07:57 Timbus any workarounds?
07:57 zakharyas joined #perl6
07:58 lizmat BUILD is usually a submethod in a class
07:58 Timbus yeah, i can turn the role into a class and inherit
07:58 lizmat you mean, pun the role?  yes
08:01 Timbus are you saying.. TIOOWTDI :o
08:08 tadzik Timbus: oh, it's tricky
08:08 tadzik you have to put the ones you expect to be defaultly-set in BUILD's signature
08:09 tadzik so, submethod BUILD(:$!x, :$!y) etc
08:09 tadzik then your 'has $.x = foo; has $.y = bar' will work
08:09 bowtie joined #perl6
08:15 dalek rakudo/nom: c04c790 | (Elizabeth Mattijsen)++ | src/core/Distro.pm:
08:15 dalek rakudo/nom: Must check against lowercased name
08:15 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c04c790df1
08:27 Timbus tadzik, ah no, i mean i am setting some private attributes for a role, not a class. I'm doing it in BUILD because the private vars are hashes and i need a loop, but composing a role will attach the BUILD to the class and break the classes' default BUILD
08:27 tadzik ah, yes
08:28 tadzik well, is your build a submethod?
08:28 lizmat Timbus: if a class provides a method, it should have precedence, no?
08:28 Timbus if a class does not provide a method, it doesnt work
08:28 Timbus is what the issue is
08:29 Timbus and yes, its a submethod
08:29 Timbus m: role A { submethod BUILD {} }; class B does A { has $.thing }; say B.new(thing => 5).thing
08:30 camelia rakudo-moar 851811: OUTPUT«(Any)␤»
08:31 dalek rakudo/nom: edcfe2d | (Elizabeth Mattijsen)++ | src/core/Kernel.pm:
08:31 dalek rakudo/nom: Don't need to lc what is already lc
08:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/edcfe2d2ea
08:31 lizmat afk&
08:35 Timbus eh, i guess i can use   %!stuff = Hash.new.push: ...;
08:42 masak antenoon, #perl6
08:43 moritz \o masak
08:46 masak Timbus: shorter way to spell 'Hash.new': '{}'
08:47 moritz beware, {} is an *itemized* hash
08:48 Timbus ah of course
08:48 masak moritz: good point. but the .push should cancel that out, methinks.
08:49 moritz masak: yes, probably
09:00 donaldh_ joined #perl6
09:16 virtualsue joined #perl6
09:17 virtualsue o/
09:18 moritz \o virtualsue
09:20 pecastro joined #perl6
09:40 anaeem___ joined #perl6
09:45 denis_boyun_ joined #perl6
09:47 Psyche^_ joined #perl6
10:06 [Sno] joined #perl6
10:18 masak nwc10: https://medium.com/p/2a7af4788b10 -- https://news.ycombinator.com/item?id=7801834
10:19 nwc10 oh, curious thanks
10:19 nwc10 will read aftet I've done my rain dance
10:19 nwc10 (heading outside to find a Post Office. Hopefully before it rains)
10:20 masak I'm starting to dislike the expression "[language X] is eating [language Y]'s lunch".
10:20 nwc10 while on the subject of futurology, is there anything interesting about PHP?
10:20 masak it implies that the zero-sum grabbing of mindshare is some kind of very important goal.
10:21 virtualsue i've disliked it for awhile. it was particularly galling at yapc::eu last year.
10:21 nwc10 yes. And ignores the fact that competant programmers know multiple languages, and, properly, more than one paradigm
10:22 masak virtualsue: who was (allegedly) eating whose lunch at YAPC::EU last year?
10:23 masak nwc10: that's what perhaps frustrates me the most about any kind of language turf war-ish discussions. multidimensional things get crammed into one dimension. gray areas get rounded off to black and white.
10:23 virtualsue perl6 was killing perl5, according to some people based in london who are having trouble recruiting for other reasons
10:23 masak virtualsue: oh, that.
10:23 masak virtualsue: I think many of us here were concerned about the vibes those sent off.
10:24 masak virtualsue: some of us went to their talks. (I didn't, but I watched them afterwards.) they came off as not so knowledgeable, and not so coherent.
10:25 masak whether the sharpness of their criticism had been cut off at knee height by TimToady++'s keynote, or whether they were simply not that coordinated from the beginning, I can't really tell.
10:26 virtualsue eventually they started talking to p5p and stopped whining as much
10:26 masak virtualsue: in short, I expected a major-ish confrontation at that conf. instead, I found cutely confused quarrelers with bigger problems than Perl 6.
10:27 virtualsue their problem is obvious -- a big gnarly legacy codebase
10:27 masak something that Perl 6 isn't going to swoop in and solve anyway :)
10:28 virtualsue at any rate p5 is still going strong so how p6 affects them is a big mystery :-)
10:28 masak it's an architecture problem, hopefully solvable by design and gradual asset capture
10:28 telex joined #perl6
10:28 * virtualsue is off to lunch
10:29 * masak .oO( virtualsue is eating Perl 6's lunch! )
10:30 masak "Seriously — if Python 3 had enough enticing new features, more people would migrate to it (at least for new projects), and more people would be inclined to port their Python 2 libs/projects." -- from https://medium.com/p/2a7af4788b10
10:31 masak also of note: Perl 6 does 1, 2, and 3 on the list of 5 things that would make py3 interesting.
10:31 masak arguably number 4, too.
10:31 masak we should probably consider number 5.
10:36 lizmat you could argue that jnthn's code golfer is just that  :-)
10:37 sergot masak: do you mean the REPL?
10:38 lizmat yes  :-)
10:39 tadzik that sounds like a fun task
10:39 nwc10 large legacy codebase isn't their only issue. They also have a somewhat excentric development environment. To put it mildly
10:39 nwc10 In that anyone sane runs a mile after their tech test
10:44 nwc10 masak: on ycombinator, "Ironing out the warts is good, but this was not the right time. This should have happened 7-10 years ago." -- but py3k *started* 8 years ago, and shipped 6 years ago
10:44 nwc10 I took an umbrella. This prevented it from raining. However, nearest Post Office is out to lunch from 12:00 to 14:00
10:44 nwc10 yay
10:45 kivutar joined #perl6
10:57 donaldh_ joined #perl6
10:58 nwc10 masak: original author wants "proper closures" - what is wrong with Python's current closure implementation? I thought it was only PHP that had LTA closures
10:59 tadzik no, Python's are broken too
10:59 tadzik nwc10: https://github.com/django/django/pull/2692 #6
10:59 tadzik whoops, wrong link
10:59 tadzik http://www.toptal.com/python/top-10-mistakes-that-python-programmers-make
10:59 tadzik this one
11:01 nwc10 oh gosh. So this is something that Perl 5 got right over a decade ago?
11:01 nwc10 and Python 3 didn't fix?
11:02 tadzik yep
11:02 nwc10 I assume that the current approach is consistent and Pythonic
11:02 tadzik but I've found that in Python culture FP is generally discouraged
11:02 tadzik "don't use lambdas, they're making the code confusing"
11:02 tadzik maybe they wouldn't if they got them right
11:04 chenryn joined #perl6
11:04 moritz afaict you can only get closures right if you explicitly declare lexicals
11:04 moritz everything else gives a WAT in one case or another
11:05 masak +1
11:06 masak how does the situation look in CoffeeScript?
11:07 nwc10 sigh. HOP was probably the most useful Perl book I ever read
11:07 nwc10 (or failed to review)
11:07 nwc10 placeholder review remains "Don't just buy this book, read it"
11:07 masak oh, interesting. CoffeeScript does the *other* thing compared to Python.
11:08 moritz nwc10: aye, HOP is awesome
11:08 masak (it doesn't shadow the outer declaration, but instead allows you to assign to the variable from the closure)
11:08 * nwc10 wibbles
11:09 masak it's easy to confirm at "Try CoffeeScript" over at http://coffeescript.org/
11:09 masak moritz: what WAT falls out of that configuration? I mean, apart from the usual of "any typo and you're toast" related to declaring lexicals but not specifically to closures.
11:11 moritz masak: currently I'm not aware of any
11:12 moritz masak: (I wasn't aware of coffeescript's solution so far)
11:12 masak me neither.
11:12 masak but it seems to me Python could've done that from the start and been in a better situation.
11:13 masak I can see why they're not changing the semantics *now*.
11:14 masak moritz: one slight problem even with CoffeeScript's version: if you start moving closures and inner functions around, lexical variables may be created or destroyed without you noticing.
11:15 masak moritz: not sure what practical problems that would lead to, and if the extra safety of declaring the variable is "worth it". it's probably hard to quantify.
11:17 donaldh left #perl6
11:25 moritz masak: having heavily refactored (190+ commits) a legacy codebase in the last two months, I'm incredibly thankful for every bit of compiler check that perl gives me, most notable strict variable declarations
11:31 masak *nod*
11:32 masak moritz: I'm currently toying with thoughts of what a language would look like which took refactorings and static knowledge about the code into account from the start.
11:32 masak train &
11:33 moritz masak: for one, some kind of escape analysis would be great
11:33 moritz masak: one of the questions I asked myself most often was "do modifiations of $variable ever need to escape from this scope?"
11:34 moritz masak: because that kinda determines how easy or hard it is to break out a chunk of code into a separate routine
11:39 dalek Heuristic branch merge: pushed 74 commits to rakudo/eleven by lizmat
11:43 cooper joined #perl6
11:56 lizmat FROGGS, jnthn: I'm thinking about merging eleven into nom tomorrow
11:57 lizmat so that we have some weeks to find out about problems in the ecosystem before the next release
11:57 lizmat is that a plan?
11:59 dalek roast: 63897c2 | (Elizabeth Mattijsen)++ | S17-supply/ (3 files):
11:59 dalek roast: Unfudge flapping tests
11:59 dalek roast:
11:59 dalek roast: It is either that or mark them as skip.  We need more data-points.  Marking
11:59 dalek roast: them as todo is not going to help  :-)
11:59 dalek roast: review: https://github.com/perl6/roast/commit/63897c2db2
12:02 timotimo i don't feel confident praising perl6's multithreaded capabilities as long as we're running into trouble as soon as someone uses promises :\
12:04 lizmat timotimo: I agree...  I also see too many unreproducible test failures
12:06 timotimo at least our syntax and helper classes and stuff are neat
12:07 timotimo i'm not sure what the semantics will look like in the future for things like concurrently accessing lexicals; do we get transactional memory-like behavior automatically, or locks or whatever
12:07 lizmat no, jnthn is very clear on that
12:07 lizmat no locks on variables
12:08 timotimo OK, that's good
12:08 lizmat if you need to write to something from multiple threads, you will need to serialize
12:08 timotimo because that would be hell :)
12:08 timotimo another thing i just thought of
12:08 lizmat that's where Perl 5 ithreads went
12:08 lizmat serialize the access the writes
12:08 lizmat by using on e.g.
12:08 lizmat on()
12:08 cooper joined #perl6
12:09 timotimo sometimes you use a module to share a "data cache" between multiple "users"; if we have explicit versions pulling in different instances/versions, those will not see the same data cache ... so ...
12:09 timotimo not sure where i was going with that
12:09 lizmat S17:856
12:09 synopsebot Link: http://perlcabal.org/syn/S17.html#line_856
12:10 lizmat timotimo: well that's a generic problem
12:10 timotimo i suppose so
12:10 lizmat there is no generic solution :-(
12:10 timotimo searching for "on" in S17 is not a good idea %)
12:10 timotimo 414 matches, mostly inside words %)
12:10 lizmat (hence my link)
12:11 kivutar joined #perl6
12:11 * moritz belives that over-sharing tends to be a bigger problem than under-sharing
12:11 lizmat one of the big mindset changes that Perl 5 developers will need to make when moving to Perl 6
12:11 timotimo mhh
12:12 lizmat is that multiple versions of the same module will co-exist during execution
12:12 lizmat this is great from a maintainability point of view
12:12 lizmat but it does have its issues from a development point of view
12:12 timotimo lizmat: when you held your "how the camel is de-coccooning" talk, was rakudobrew already released?
12:12 timotimo because that's an even shorter way to get started :)
12:13 lizmat timotimo: good point!
12:13 lizmat I'm not a rakudobrew user myself...  will add to the slides!
12:13 * timotimo is running around praising rakudobrew to everyone everywhere
12:13 timotimo i don't use it myself, either, but it's certainly a great tool :)
12:13 timotimo tadzik++ # rakudobrew
12:14 tadzik :}
12:15 lizmat afk for a bit&
12:16 * colomon is heavily using rakudobrew these days.
12:17 tadzik and there are not many bugs reported for it, so it must work pretty well :)
12:17 masak hello from a train! \o/
12:17 masak moritz: interesting. hadn't thought so much about escape analysis of modifications.
12:18 masak moritz: have you read http://featherweightmusings.blogspot.se/2014/05/rust-for-c-programmers-part-5-borrowed.html ? what's your opinion of it?
12:22 moritz masak: sound very interesting, but I can't tell how well it works without trying it on a big-ish project
12:29 masak moritz: same here.
12:29 masak moritz: I'm very curious about Servo, the big-ish web browser project that's driving much of the evolution of Rust.
12:30 masak moritz: in my view, what they're doing is awesome, both (a) pushing the envelope of safe, threaded browsers, and (b) using their language for something real, a "killer app" to make sure the language works.
12:31 moritz masak: aye, I'm in violent agreement
12:33 dayangkun joined #perl6
12:35 * masak .oO( agreement is asymptotically heading towards the ultraviolent )
12:40 user3 joined #perl6
12:40 user3 left #perl6
12:53 cooper joined #perl6
12:55 jnap joined #perl6
12:58 virtualsue joined #perl6
13:05 Ven joined #perl6
13:14 guru joined #perl6
13:15 sivoais joined #perl6
13:41 kaare_ joined #perl6
13:41 fhelmberger joined #perl6
13:43 lizmat commute to AmsterdamX meeting&
13:46 fhelmberger joined #perl6
13:47 colomon joined #perl6
13:54 btyler joined #perl6
13:57 fhelmberger joined #perl6
13:58 treehug88 joined #perl6
13:59 thou joined #perl6
14:06 xenoterracide joined #perl6
14:07 Ulti is there a specific baggy type that is numeric keys only?
14:08 Ulti because I was just thinking if there is it would be nice to have some basic stats functions on it like mean/media/mode/stddev
14:08 Ulti *median
14:12 masak Ulti: no, but there's nothing to prevent you from writing subs that take a Bag and assume it to have numeric keys only.
14:13 Ulti well I can make my own NumBag or something too
14:13 Ulti or StatsBag
14:14 Ulti MagicBag
14:15 Ulti its just I wrote some stats code for z-scores in Perl5 and basically used a hash in the same way bags operate in Perl6
14:15 masak it doesn't really feel like a new named type to me, for some reason.
14:15 colomon I'm with masak here
14:15 masak well, you could express it as a subset relation, I guess.
14:15 Ulti yeah I agree but you want to know for sure the keys are numeric though
14:15 masak but subset kind of implies *checking* for the condition all the time, and I'm not sure you want to do that either.
14:15 Ulti well I guess they dont need to be for mode
14:15 Ulti you can have that for categorical things
14:15 colomon More precisely, it could certainly be a new named type, but that's a lot of work for the tiny (as far as I can see) benefit of having the stats functions be methods rather than subs.
14:16 Ulti like the average animal in a bag of zoo animals is probably 'ant'
14:16 * colomon finds programming is often balancing theoretical beauty with practical simplicity.
14:17 Ulti well if there was already a numeric bag type it makes sense to add them there
14:17 anaeem1 joined #perl6
14:17 Ulti since they are general functions on that type of datastructure and actually a lot nicer than when you just have a list of observations
14:17 colomon but there isn't; there is simply a Bag type which can have numeric keys
14:18 colomon (I think, didn't lizmat++ make that work?)
14:18 Ulti yeah
14:18 masak I like how we keep raising the water level of theoretical beauty in our languages. back when I started programming in the 80s, BASIC was par for the course, but it feels terribly ad-hoc and disorganized now, syntactically and semantically.
14:19 masak these days Haskell still feels pretty theoretical, but wait a few decades and you'll see lots of languages having drifted in the Haskell direction.
14:19 moritz it felt terribly disorganized even back then :-)
14:20 masak yeah, maybe I just didn't notice :)
14:20 colomon yeah, switching to Forth from Basic back in '85 was a huge relief
14:21 Rounin Hm... With Perl 6, you can restrict the type of parameters in fairly arbitrary ways anyway, right
14:22 Rounin So you might be able to restrict the type that way
14:22 Rounin As long as it's passed to a function somewhere
14:22 jnap joined #perl6
14:22 Rounin Ah right... You thought of that already
14:23 Rounin Problem solved, then
14:23 colomon sure, something like Bag $b where { all($b.keys) ~~ Real }
14:23 * colomon is pretty sure there is a better way of writing what he just wrote
14:24 bluescreen10 joined #perl6
14:29 skids joined #perl6
14:29 Woodi hey, guys ! It's Perl ! you can be sure one day someone will write NumBags and push it to CPAN ;)
14:29 tadzik Numbahs!
14:30 Woodi AllWaysShouldBeAllowed or something like that :)
14:32 Rounin Perhaps someone will write a UniversalBag, which is a NumericBag which takes any object as a key, by taking the hash of the object...
14:34 liztormato joined #perl6
14:35 liztormato Rounin: You can already do that with Sets, Bags and Mixes
14:35 zakharyas joined #perl6
14:36 Woodi btw. how many 'read' functions are in C ? all of them are a bit different and we probably want to have access to all of them. generally: we probably want to have all low-level functions available and build some bigger, MRUs blocks out of them.
14:36 liztormato It actually uses the .WHICH as the key internally
14:37 Rounin liztormato: That was the joke.
14:38 liztormato joined #perl6
14:38 anaeem1 joined #perl6
14:39 liztormato Ah ok. ;-)
14:39 Woodi read, fread, reads via mmapped file, others ?
14:41 tadzik well, if anyone needs access to low level stuff they can always NativeCall it
14:41 liztormato sysread?  Or is that a P5ism?
14:41 tadzik I thinkit is
14:43 Woodi and async reads probably. I wonder how to put them logically into Perl6. I have impression that Parrit have them a bit scattered inside...
14:44 Woodi Parrot, of course...
14:44 liztormato Async reads in Moar come as supplies
14:44 Woodi chicken bones in the hands are not best friends of keyboard :)
14:44 FROGGS joined #perl6
14:45 Woodi ppls will wont them anyway :)
14:45 molaf joined #perl6
14:46 liztormato FROGGS: Any objections against merging eleven tomorrow?
14:47 FROGGS liztormato: did jnthn agree?
14:48 liztormato Basically yes. Just not before the Bajor release
14:49 rindolf joined #perl6
14:49 FROGGS okay... let me check one more time that nothing breaks when we do that, okay?
14:49 liztormato Ok
14:51 anaeem1 joined #perl6
14:53 liztormato Fwiw, I also checked already ;-)
14:53 colomon joined #perl6
14:53 zakharyas joined #perl6
14:55 jnthn evening, #perl6
14:55 FROGGS hi jnthn
14:56 liztormato jnthn: o/
14:56 jnthn .oO( bajor bajor bajor bajor mushroom mushroom )
14:57 FROGGS O.o
14:57 liztormato Emissary!
14:58 colomon \o
14:58 virtualsue snake!
15:05 donaldh bump https://github.com/rakudo/rakudo/pull/269
15:06 zakharyas joined #perl6
15:07 * donaldh would like to do more housekeeping but doesn't want to leave a pile of pull requests.
15:08 huf what's a bajor? (apart from a person from bavaria)
15:09 liztormato DS9
15:09 huf oh.
15:12 kivutar joined #perl6
15:12 liztormato left #perl6
15:15 guru joined #perl6
15:18 jnthn donaldh: I'm +1 to that, but it needs a manual merge by now...
15:19 donaldh jnthn: yes I saw commits to IO.pm :-/
15:19 Ulti yeah I will probably make NumBag or StatsBag :S just because a check of every value being a number is kind of expensive for dispatching
15:20 anaeem1_ joined #perl6
15:20 Ulti though I guess I only really need to check for List or Baggy
15:20 Ulti and just assume its numbers and fail as soon as it's not
15:36 pdcawley joined #perl6
15:41 zakharyas joined #perl6
15:43 spider-mario joined #perl6
15:46 * TimToady is vaguely amused that our terminology has become "wrong clone of the same closure", when it should probably be "wrong closure of the same function" or some such
15:46 TimToady since closing over the context is what the clone is all about
15:48 masak aye
15:48 jnthn Just make them work right, then we can have closure on the issue :P
15:49 masak meanwhile, Doug Crockford seems to be using "closure" as some kind of mass noun.
15:49 dayangkun joined #perl6
15:49 masak as in, "JavaScript has closure".
15:50 jnthn That sounds weird to my ears...
15:50 jnthn As if I'm listening to a non-native speaker who doesn't the plurals...
15:51 TimToady Closure is one of the properties of JavaScript.
15:51 jnthn I guess I can see it. It's just not how I'd say it.
15:51 TimToady I think it's the mathematical use of "closure", like "associativity"
15:52 masak jnthn: same.
15:52 TimToady .oO(I'll have a pint of closure, please.)
15:52 masak TimToady: yeah. it would feel less weird if not for the fact that he's the *only* one using it like that.
15:53 Ulti cognominal I was wondering where do I need to shove https://github.com/cognominal/sublime-perl6 for Sublime to see it?
15:53 Ulti I'm just adding a SublimeLinter extension for Perl6 and wanted to hook it on to an actual Syntax type that wasn't Perl
15:54 TimToady masak: perhaps the real problem is "has".  would you be happier with "JavaScript supports closure."?
15:54 FROGGS lizmat: I cannot rebootstrap panda atm, so I'd like to fix that before we merge
15:55 masak TimToady: ...not really.
15:56 masak TimToady: it's not so much about right usage or wrong usage, even.
15:56 masak TimToady: I think it's simply a matter of in which context people tend to use the word.
15:56 masak TimToady: for example, I totally agree with what you said about "wrong closure of the same function"
15:57 hoverboard joined #perl6
15:59 TimToady linguistically we often use the specific to refer to the generic, so I can see how this came about: it's really the wrong specific closure of a generic closure
16:00 TimToady so basically it's kinda like "new Closure" vs "Closure"
16:01 TimToady so maybe we need to say "It's the wrong closure:D of the closure:U" :)
16:02 masak so, it's a typical case of http://martinfowler.com/bliki/TypeInstanceHomonym.html ?
16:02 donaldh "javascript has closure" sounds a lot like "javascript has achieved closure" which makes it sound like it is complete, finished.
16:02 masak donaldh: yes, you sort of have to squint to see past that everyday meaning.
16:03 donaldh whereas I have to try really hard to see this meaning: "javascript has closures as a language feature"
16:13 molaf_ joined #perl6
16:19 fhelmberger joined #perl6
16:23 denis_boyun_ joined #perl6
16:30 Rotwang joined #perl6
16:39 slava-wr0k would it be fair to say that perl6 spec is done and over with? or are there still expected changes?
16:39 PerlJam slava-wr0k: no and yes
16:40 PerlJam slava-wr0k: (also note that the C spec is still changing.  Any language that is still "alive" will change)
16:40 slava-wr0k would it be accurate to say that vast majority of it is set in "adjustable stone"?
16:40 PerlJam slava-wr0k: that sounds reasonable to me.
16:42 FROGGS I'd expect that NFG specific stuff will chance at least slightly when it going to be implemented
16:42 FROGGS it is*
16:42 slava-wr0k PerlJam: just trying to gauge how likely it is that code from today will totally break in 3-6 months time
16:42 slava-wr0k NFG?
16:43 FROGGS normalization form grapheme
16:43 FROGGS like NFC but cool :o)
16:43 slava-wr0k what's nfc?
16:44 jnthn like NFD but cool
16:44 PerlJam slava-wr0k: unicode stuff  :)
16:44 slava-wr0k jnthn: ...
16:44 timotimo .o( and some time soon moarvm will not suck at strings any more )
16:44 * jnthn ducks to avoid getting smacked :)
16:44 jnthn slava-wr0k: It's different ways to normalize strings in Unicode.
16:44 slava-wr0k jnthn: I am bringing shears and cutting your beard off for such things :P
16:45 jnthn slava-wr0k: Well, it could use a trim... :P
16:45 PerlJam slava-wr0k: btw, I'd wager that a good bit of the code from the 2009 advent calendar still runs today.
16:45 FROGGS lizmat: panda rebootstrap does not work out of the box, because site/lib is in the first compunitrepo and I installed panda before
16:45 FROGGS lizmat: so, removing site/lib does it, as well as cleanup up site/lib before doing the rebootstrap
16:45 jnthn slava-wr0k: consider a char like "ö"
16:46 FROGGS lizmat: this is only needed once, at least it looks like it is working that way
16:46 jnthn slava-wr0k: In Unicode it can be represented by a single code point, or as on "o" + a combining character that adds the umlaut.
16:46 jnthn slava-wr0k: this happens for many chars. If you try to compare a string with one representation against a string with the other, you'll get bogus answers.
16:47 slava-wr0k jnthn: does unicode at all account for this or is it the job of the 'implementer' ?
16:47 jnthn slava-wr0k: Well, it's what normalization forms are for. NFC chooses the single-codepoint form when it's available, squashing an o + combiner into the single ö.
16:47 jnthn slava-wr0k: NFD is the opposite: if it sees a codepoint ö it will break it up into its pieces.
16:48 slava-wr0k ahh, I see
16:48 jnthn The problem is that there are many ways to form char + combining char that do not have a single codepoint.
16:48 jnthn So NFC kinda falls apart at this point.
16:49 jnthn NFG addresses this by making up imaginary codepoints to represent such cases
16:49 jnthn So that .chars can consistenlty give a "how many things a human would count" rather than somtimes giving weird answers because that's how many codepoints exist.
16:50 dalek rakudo/nom: 070e6d5 | (Donald Hunter)++ | src/core/IO.pm:
16:50 dalek rakudo/nom: Refactor readfh, seek, tell to use nqp ops on parrot. Remove backend specifics.
16:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/070e6d5c74
16:54 * masak .oO( ümläüt )
16:54 FROGGS .tell lizmat would it be okay if I change eleven to use @*INC for ordering instead of the .prio before we merge?
16:54 yoleaux FROGGS: I'll pass your message to lizmat.
16:55 timotimo do we get properly lexically scoped "use lib" from the eleven branch?
16:56 FROGGS timotimo: not yet
16:56 FROGGS (I think)
16:56 timotimo OK
17:02 slava-wr0k is there some sort of FAQ/list of all the magic vars like @*INC and $/ and others?
17:02 kaleem joined #perl6
17:03 treehug8_ joined #perl6
17:03 PerlJam slava-wr0k: S28
17:03 timotimo S28:10
17:03 synopsebot Link: http://perlcabal.org/syn/S28.html#line_10
17:05 jnap1 joined #perl6
17:05 slava-wr0k ty
17:06 jnthn dinner &
17:09 treehug88 joined #perl6
17:09 rjbs joined #perl6
17:10 hoverboard joined #perl6
17:31 markov joined #perl6
17:53 zakharyas joined #perl6
18:05 jnap joined #perl6
18:07 pdcawley joined #perl6
18:10 denis_boyun_ joined #perl6
18:11 guru joined #perl6
18:14 itz joined #perl6
18:22 grondilu Hi.  I was looking at http://rosettacode.org/wiki/Window_creation/X11#Perl_6 and I got a segmentation fault just after the window shows up.  Thought that was worth signaling.
18:22 grondilu (this used to work)
18:23 Alula joined #perl6
18:28 timotimo jnthn: what exactly is the reasoning behind the integer constants you compare against for &infix:<..> in the optimizer?
18:28 timotimo when i have ^ on either side, should i change that number by 1, too?
18:37 masak m: .say for 4 .. 8;
18:37 camelia rakudo-moar 851811: OUTPUT«4␤5␤6␤7␤8␤»
18:37 masak m: .say for 4 ^..^ 8;
18:37 camelia rakudo-moar 851811: OUTPUT«5␤6␤7␤»
18:37 masak timotimo: I must be misunderstanding your question -- surely the number changes by 2, as above?
18:38 timotimo i mean the end point number
18:38 masak ok, that answer tells me I am indeed not following. :)
18:38 masak nevermind.
18:49 pdcawley joined #perl6
18:53 beastd joined #perl6
18:53 timotimo making prefix:<^> a pure op means it'll get compile-time evaluated to a parcel before the optimization that tries to turn for + range into loops ... :\
18:57 masak tadzik: did you see the p6u thread "Is passing excess parameters while creating object legal?" -- seems like someone would be happy to know about https://github.com/tadzik/ClassX-StrictConstructor ?
18:57 tadzik oh, yes :)
19:04 tadzik done
19:11 dalek rakudo/nom: 3094a76 | (Timo Paulssen)++ | src/Perl6/Optimizer.nqp:
19:11 dalek rakudo/nom: don't trip over custom range operators
19:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3094a76cf9
19:12 masak tadzik++
19:17 timotimo tadzik: would you revert "is pure" for range operators?
19:17 timotimo or should i try to come up with something to prevent that from happening in the wrong way?
19:20 kivutar joined #perl6
19:21 xenoterracide joined #perl6
19:23 treehug8_ joined #perl6
19:24 virtualsue_ joined #perl6
19:28 SevenWolf joined #perl6
19:34 tadzik timotimo: I didn't commit them
19:35 timotimo oh!
19:40 itz n00b Question my \foo='bar' , what's the \foo called?
19:41 timotimo it's a sigil-less variable
19:43 dalek rakudo/nom: cf46d41 | (Timo Paulssen)++ | src/core/Range.pm:
19:43 dalek rakudo/nom: this prevented an optimization later on.
19:43 dalek rakudo/nom:
19:43 dalek rakudo/nom: may want to revisit this at some point.
19:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cf46d41f2f
19:43 dalek rakudo/nom: 4cfd984 | (Timo Paulssen)++ | src/Perl6/Optimizer.nqp:
19:43 dalek rakudo/nom: optimize all kinds of ranges for for loops.
19:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4cfd984a52
19:43 timotimo that "is pure" is from february last year %)
19:47 itz sig-less variables :O how is such a thing possible
19:47 itz ^ sigil-less
19:48 zakharyas joined #perl6
19:48 timotimo hehe.
19:48 vendethiel itz: it's \possible.
19:48 timotimo well, it has its use; sigils usually imply a context; @ for list, % for hash, $ for item
19:48 FROGGS joined #perl6
19:48 FROGGS o/
19:48 timotimo with a \ you can have a value that does not imply its own context
19:49 moritz timotimo: what's wrong with 'is pure' on prefix:<^>?
19:50 moritz timotimo: it *is* a pure function, no?
19:50 timotimo yes
19:50 timotimo but purity is only important for the optimizer so far
19:50 timotimo and now we have a more powerful optimization that relies on the call to infix:<^> to remain intact until it hits the analysis
19:50 moritz and "is pure" breaks that?
19:50 timotimo yes, unfortunately
19:51 moritz how? why?
19:51 timotimo well, in the "visit op" stage, the first thing it does is visit its children
19:51 timotimo after that, it checks for a .sink that contains a .map that contains an infix:<,> that contains any of the infix<..> variants
19:52 timotimo however, at that point, the infix:<^> is already turned into a WVal
20:16 jnap joined #perl6
20:20 tadzik timotimo: I still feel uneasy seeing inlining preventing optimizations
20:20 tadzik maybe an optimizer needs a different ordering of things
20:21 eMBee joined #perl6
20:22 hoverboard joined #perl6
20:23 masak as far as I know, the order in which to do optimizations is an open problem, with no real answer in sight.
20:24 pippo joined #perl6
20:24 timotimo sometimes we want to recurse first, sometimes not
20:24 timotimo any optimization that simplifies the tree before the for->loop one, for example, would be good in theory
20:25 timotimo for example, for (1 .. 100) will result in a different AST, this one has a no-op Stmts around the &infix:<..>
20:25 timotimo that's enough to trip the optimization up
20:41 * vendethiel i still reading $! as !$
20:45 masak yeah, don't do that. :)
20:57 rurban joined #perl6
20:58 dalek perl6-roast-data: a9d5a27 | coke++ | / (5 files):
20:58 dalek perl6-roast-data: today (automated commit)
20:58 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/a9d5a2734e
20:58 dalek perl6-roast-data: 27bac78 | coke++ | / (6 files):
20:58 dalek perl6-roast-data: today (automated commit)
20:58 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/27bac78843
21:14 pdcawley joined #perl6
21:22 * jnthn back
21:25 donaldh joined #perl6
21:27 pdcawley joined #perl6
21:30 aindilis joined #perl6
21:33 timotimo not exactly sure what the API of the grid should look like :\
21:34 timotimo it could just take flattened lists of widget, x, y, w, h, widget, x, y, w, h, ...?
21:34 timotimo for the constructor
21:34 timotimo it would be nice to be able to write the constructors in one bunch like with HBox and VBox
21:38 jnthn timotimo: Wonder if something involving a pair could look nice
21:38 jnthn $widget => [x,y,w,h]
21:38 jnthn Actually probably other way around
21:38 jnthn [x,y,w,h] => $widget
21:38 timotimo oh, that's not a bad idea actually
21:39 jnthn that'll line up way more neatly
21:39 timotimo yes!
21:39 jnthn And thus make editing easier.
21:40 timotimo maybe we should prefer gtk_widget_show_all over gtk_widget_show-ing everything by ourselves
21:44 treehug88 joined #perl6
21:45 jnthn Hm :)
21:45 jnthn Quite possibly
21:45 jnthn <-- hacked the module up in 4 hours on a train journey with no prior gtk experience :)
21:46 jnthn So it ain't a surprise if some things can be done better ;)
21:46 timotimo :)
21:46 * timotimo is just following the tutorial, too
21:49 bbkr joined #perl6
21:51 masak 'night, #perl6
21:59 timotimo gnite masak
22:06 cognominal joined #perl6
22:07 dalek gtk-simple: e9c5c4e | (Timo Paulssen)++ | / (2 files):
22:07 dalek gtk-simple: add GTK::Simple::Grid and an example showing it off
22:07 dalek gtk-simple: review: https://github.com/perl6/gtk-simple/commit/e9c5c4ecb7
22:11 bbkr hi. what is the easiest way to grep hash AND still have hash after the operation? what %hash.grep does is returning list of Pairs and apparently it is impossible to simply (%hash.grep: {...}).Hash
22:11 Alula joined #perl6
22:14 timotimo can you get it to work with %(...)?
22:14 timotimo it would be pretty poor if pythons dict comprehensions worked better than our builtins grep and stuff
22:15 retupmoca m: my %h = a => 1, b => 2, c => 1; (%h.grep: { .value == 1 }).hash.perl.say
22:15 camelia rakudo-moar 851811: OUTPUT«("a" => 1, "c" => 1).hash␤»
22:15 timotimo oh, it's .hash not .Hash
22:17 bbkr timotimo: thanks!
22:18 timotimo well, retupmoca figured it out :)
22:18 jnthn Also if you want to mutate, .=
22:18 panchiniak joined #perl6
22:19 timotimo just accidentally opened the .moarvm file for GTK::Simple in vim and it's got pages and pages of redundant symbols
22:19 timotimo i wonder what's up with that
22:21 jnthn dunno; string constant table is meant to be interned at bytecode writing time
22:23 timotimo that's not it
22:23 timotimo interestingly some stuff that really shouldn't be needed in there is in there
22:23 timotimo pod_string_character?
22:23 timotimo why does that end up in there?
22:31 jnthn Probably something gets modified at startup and then repossessed.
22:32 timotimo the whole Perl6 grammar perhaps? :P
22:38 jnthn That would be unfortunate :P
22:38 jnthn I suspect if we were doing that, we'd get way more collisions.
22:39 Pleiades` joined #perl6
22:39 jlaire joined #perl6
22:39 timotimo may be
22:44 * lizmat is back from AmsterdamX meeting
22:44 yoleaux 16:54Z <FROGGS> lizmat: would it be okay if I change eleven to use @*INC for ordering instead of the .prio before we merge?
22:44 jnthn lizmat: It's now an X-meeting? :P
22:44 lizmat .tell FROGGS please use @*INC for ordering, note that it now lives in src/core/Inc.pm
22:44 yoleaux lizmat: I'll pass your message to FROGGS.
22:45 lizmat hehe...  unfortunately mostly X-men  :-)
22:45 lizmat for those not in the know: Amsterdam basically has *two* PM groups with meetings: Amsterdam.pm (also NL.pm) as almost nobody actually lives in Amsterdam
22:46 lizmat and the Amsterdam X meeting, for expats actually living in Amsterdam
22:47 lizmat the former is usually Dutch spoken, the latter is mostly English spoken
22:47 lizmat although mix forms have known to occur
22:47 bbkr joined #perl6
22:47 lizmat and some people actually visit both meetings :-)
22:55 BenGoldberg joined #perl6
22:59 xenoterracide joined #perl6
23:17 skids joined #perl6
23:22 BenGoldberg joined #perl6
23:25 lizmat m: say { for ^1 {} }()
23:25 camelia rakudo-moar 851811: OUTPUT«Nil␤»
23:25 lizmat $ perl6 -e 'say { for ^1 {} }()'
23:25 lizmat 0
23:25 lizmat timotimo: seems your last patches changed this behaviour
23:26 lizmat I feel Nil would be correct, so I would consider this a regression
23:27 jnthn lizmat: that might be my opts to loops in general
23:27 jnthn lizmat: uh, for range { } loops I mean.
23:27 lizmat well, this didn't fail earlier today
23:27 jnthn lizmat: Yeah, ^1 didn't hit the opt though
23:28 jnthn star: say { for 1..2 {} }()
23:28 lizmat but isn't ^1 a one element range ?
23:28 camelia star-{m,p} 2014.04: OUTPUT«Nil␤»
23:28 jnthn m: say { for 1..2 {} }()
23:28 camelia rakudo-moar 851811: OUTPUT«0␤»
23:28 jnthn See. I broke the lot.
23:28 lizmat ok, not sure who broke it, but it's broken
23:28 jnthn Me
23:28 jnthn But really, a spectest shoulda existed to tell me this...
23:29 lizmat but on the matter of ^1   that should be equivalent to 0..0 and ergo a one element list, no?
23:29 lizmat a spectest exists!
23:29 jnthn For the 1..2 case?
23:29 jnthn Or just the ^1 case?
23:29 lizmat t/spec/S04-statements/for.rakudo.moar                       (Wstat: 0 Tests: 78 Failed: 2)
23:29 lizmat Failed tests:  63, 70
23:29 jnthn ^1 is 0..0
23:29 lizmat no, for the ^1 case
23:29 jnthn Ah, then that's why I didn't see it
23:29 jnthn But yeah, too bad timotimo missed that spectst fail.
23:29 jnthn Still, the patch to blame is my one.
23:30 timotimo whoops, my apologies
23:30 lizmat ok, should I rakudobug it ?
23:30 jnthn lizmat: Or patch the optimizer.
23:30 timotimo would the correct fix be to only do the opt if there's two or more between start and end?
23:30 jnthn No
23:30 jnthn The opt is nothing to do with that.
23:30 jnthn uh, the problem is...
23:30 lizmat isn't the problem that the for is the last statement in the block
23:30 jnthn Right
23:30 jnthn Well
23:30 lizmat and now it's returning something other than Nil ?
23:31 jnthn the real issue is the opt doesn't take care to evalute to Nil.
23:31 jnthn Was just an oversight.
23:31 timotimo oh!
23:31 jnthn So the fix is in Optimizer.nqp
23:31 * timotimo goes to sleep first
23:31 * lizmat as well  :-)
23:32 lizmat driving another ~300km makes one tired  :-)
23:33 lizmat .oO( actually closer to 400... see I'm tired :-)
23:34 jnthn untested patch:
23:34 jnthn https://gist.github.com/jnthn/e9263006684a566d6992
23:34 jnthn I need to sleep now
23:34 lizmat will test
23:35 jnthn And if you have a moment, a test for the "1..2" regression I showed above would also be great.
23:35 jnthn That woulda told me about my fail sooner.
23:35 jnthn Anyways, rest before final day of teaching for a bit :)
23:35 hoverboard joined #perl6
23:35 jnthn 'night
23:35 lizmat gnight jnthn!
23:37 rurban joined #perl6
23:41 FOAD joined #perl6
23:44 lizmat m: say { for 1..2 {} }()
23:44 camelia rakudo-moar 851811: OUTPUT«0␤»
23:45 lizmat m: say { for ^0 {} }()
23:45 camelia rakudo-moar 851811: OUTPUT«Nil␤»
23:45 lizmat m: say { for ^1 {} }()
23:45 camelia rakudo-moar 851811: OUTPUT«Nil␤»
23:45 lizmat m: say { for ^2 {} }()
23:45 camelia rakudo-moar 851811: OUTPUT«Nil␤»
23:45 lizmat m: say { for 0..2 {} }()
23:45 camelia rakudo-moar 851811: OUTPUT«0␤»
23:49 dalek rakudo/nom: e0592d7 | (Elizabeth Mattijsen)++ | src/Perl6/Optimizer.nqp:
23:49 dalek rakudo/nom: Fix { for 1..2 {} }() regression
23:49 dalek rakudo/nom:
23:49 dalek rakudo/nom: Untested patch supplied by jnthn++
23:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e0592d7f40
23:49 dalek rakudo/nom: 04fe6d7 | (Elizabeth Mattijsen)++ | t/spectest.data:
23:49 dalek rakudo/nom: Add more advent tests
23:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/04fe6d75ca
23:54 dalek roast: 42714e1 | (Elizabeth Mattijsen)++ | S04-statements/for.t:
23:54 dalek roast: Adjust some for loop tests
23:54 dalek roast: review: https://github.com/perl6/roast/commit/42714e1fe2
23:55 lizmat and on that note, /me is getting some sleep&
23:56 lowbitrate joined #perl6
23:56 lowbitrate Hello, good night.
23:57 lowbitrate What is the current status of perl 6's web development?
23:57 lowbitrate Viable or I should wait a little more?

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

Perl 6 | Reference Documentation | Rakudo