»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:04 bearman joined 00:07 benabik left 00:17 cooper joined, cooper left, cooper joined 00:18 benabik joined 00:20 sidus left 00:29 grondilu left 00:36 fridim_ joined 00:46 zwut00 left 01:12 FROGGS_ joined 01:16 FROGGS left 01:22 xenoterracide left 01:28 xenoterracide joined 01:31 bearman left 01:39 ggoebel left 02:13 btyler joined 02:49 xenoterracide left 02:53 fridim_ left 03:08 xenoterracide joined 03:25 preflex_ joined, ChanServ sets mode: +v preflex_ 03:27 preflex left, preflex_ is now known as preflex 03:45 crab2313 joined 03:57 crab2313 left 03:59 crab2313 joined 04:02 btyler left
moritz \o 04:03
04:06 pupoque_ left 04:07 pupoque_ joined 04:12 fridim_ joined 04:19 btyler joined 04:20 BenGoldberg left 04:26 xilo left 04:32 hanekomu_ joined 04:33 Khisanth joined 04:43 btyler left 04:45 birdwindupbird joined
lizmat good *, #perl6! 05:43
05:43 fridim_ left 05:49 SamuraiJack_ joined 05:52 fgomez joined, dmol joined 06:15 iSlug joined 06:20 ssutch joined 06:23 crab2313 left 06:31 kaleem joined
Woodi hallo :) 06:56
I just discovered what that MoarVM is :) however google was trying to distract a little: search for moarvm resulted in search for moar with <small> link to moarvm... looks google starts to be language procesing engine and not precise searching engine... 06:59
bonsaikitten Woodi: we now watt u wand! 07:00
Woodi watt ? :)
bonsaikitten google is now interpreting so much that I have no idea how to search for some specific terms
Woodi yea, they do to much services for CIA and Co :) first proces words, check "correctness" then, eventually, delegate to searching subsystem ;) 07:02
but on the topic: ~13 years after Perl6 announcement we have threads, promises and othere goodies :) still, for me, one more thing left for Perl family: good GUI construction set... 07:04
about 'killer app' from backlog: I think CGI was efficient such app for Perl :) 07:06
labster Yeah, maybe I should port it. Anyone else here looking forward to CGI.pm6? 07:12
Woodi labster: I do not think API porting is needed, especially as one big module... 07:13
but would be nice to have something interaction with FCGI, maybe even with that forgotten multiplexing feature... 07:15
07:15 rindolf left
labster I think if I ever did port CGI, the description would have to be "don't use this module, please don't. okay, you asked for it..." 07:16
JimmyZ or port dancer 07:19
:P
or mojo
labster we have that, it's called Bailador.
07:20 FROGGS_ left
JimmyZ or give some loves to Bailador 07:20
labster Well yeah, that could be done.
Actually, that might be a good Perl 6 project for me, I have a toy website that could afford to be ported to Perl 6. 07:22
Woodi any new work on NativeCalls ? I was trying to wrap OpenLDAP API few months ago but something was exploding constantly... 07:23
07:25 sqirrel joined, FROGGS[mobile] joined
moritz Woodi: arnsholt did some stability improvements a month or two ago 07:31
Woodi: but sadly new rakudo changes broke some nativecall stuff again :/
Woodi thanx moritz++ and arnsholt++ :) I use Star distros so I need to wait anyway :) 07:32
labster Ah, I remember those days of only using Rakudo *. They were what, 4 months ago? 07:36
07:42 FROGGS joined 07:44 FROGGS[mobile] left
dalek kudo/nom: b159716 | (Elizabeth Mattijsen)++ | src/core/HashIter.pm:
Start of work to give HashIter its own file
07:44
Woodi anyway, any idea how to do modern website with static pages ? :) I think dynamic content should be integrated into that not the other way... "*/contacts.html" is a valid url for me, I do not want to call '/' always any fire any code doing route processing... 07:45
lizmat grrrr, why didn't git see that I made a copy of EnumMap ???
Woodi s/any/and/ 07:46
dalek kudo/nom: 847fb55 | (Elizabeth Mattijsen)++ | src/core/HashIter.pm:
I don't want to be the git blame of this file :-)
07:47
07:47 sidus joined
moritz lizmat: git log and blame have options for detecting copies and moves, iirc 07:51
lizmat I'm pretty sure when I used git at $work, it was smart enough to see I made a copy of a file 07:52
and keep its history
07:53 Rix joined
lizmat pretty sure it was some environment variable or setting 07:53
masak mornin', #perl6 07:54
moritz \o masak 07:56
lizmat masak, moritz o/
dalek kudo/nom: 5d66563 | (Elizabeth Mattijsen)++ | src/core/HashIter.pm:
Second try, if this doesn't work, I guess I *will* be its git blame
07:57
FROGGS gmorning @all 07:58
lizmat morning FROGGS! 07:59
masak lue: it was your iPad X. you're allowed to bring it up the space elevator, as long as you keep it in "space elevator mode" and only use it to drink coffee. 08:00
lizmat: detect renames: -M50% -- detect copies: -C50% 08:03
lizmat: the long options are called --find-renames and --find-copies, respectively. 08:04
lizmat: the percentages are a similarity cutoff at which point Git no longer considers the files "similar".
dalek kudo/nom: 32e055e | (Elizabeth Mattijsen)++ | src/core/HashIter.pm:
There we go again
08:06
lizmat masak: is that with git commit ? 08:07
or with git add ?
masak git-diff and git-log
it's a visualization thing, not a storage thing.
in its object model, git doesn't give a flying care about moves and copies. :)
oh, and git-blame, according to #git. 08:08
lizmat I must be going crazy: at $work I have seen commit messages where git automagically knew a file was copied
masak I don't see those flags on git-status. 08:09
lizmat ok, then I give up
masak but it would at least be theoretically possible to detect that in the staging area, I guess.
I see moves quite often (by default).
08:11 fhelmberger joined
Grrrr lizmat: I dunno, really :) 08:11
08:14 dmol left
moritz lizmat: 'git show --stat' does the same rename detection 08:14
08:14 dmol joined
masak (but not copy detection) 08:15
lizmat ok, too bad then, I must have been delusional at $work :-) 08:18
masak nice! worrydream.com/dbx/ 08:22
moritz masak: also read the first comment on news.ycombinator.com/item?id=6129148
08:23 dmol left
moritz the critisms might be a bit over the top too, but it captures some of my worries with the worrydream articles and talks which I haven't really been able to put into words before 08:25
that said, it's nice to have some really-advanced vision of how programming could look like 08:28
even if it doesn't end up looking like it, it's still very healthy to look at other ideas at all
08:29 labster joined 08:31 dakkar joined
dalek kudo/nom: b52153a | (Elizabeth Mattijsen)++ | src/core/HashIter.pm:
Copy of EnumMap, to give HashIter its own file, as per jnthn++ request
08:32
kudo/nom: 92a2b85 | (Elizabeth Mattijsen)++ | / (4 files):
Give the HashIter class its own file
lizmat oo, wow: bitsavers.informatik.uni-stuttgart....ana/plato/ 08:35
masak moritz: aye, I read it. I think the core of the important thing is this: "we're not at the pinnacle yet. far from it." 08:37
Alan Kay has a talk "The Computer Revolution Hasn't Happened Yet"
lizmat: I thought you might like that :)
lizmat bitsavers.informatik.uni-stuttgart...._May72.pdf describing how to feed data to up to 32 terminals using an analog TV signal :-) 08:38
those were the days :-) 08:39
arnsholt Another good Alan Kay talk is "'Normal' considered harmful"
masak lizmat: github.com/perl6/specs/commit/2acb...a10466cee3 shows good will, but I still don't understand. :/ could you maybe explain to me directly? I'm missing something here. 08:40
lizmat masak: first of all, this describes of what is currently already implemented 08:41
08:42 dmol joined
lizmat when I implemented classify / categorize (or was it re-implemented?) 08:42
I found it made more sense to make them methods on Hashes, rather than lists. Because they return a Hash
masak *nod*
lizmat also, in my experience, these types of actions sometimes need to be done more than once on a given Hash 08:43
masak I usually pick up fairly rapidly on statements of the form "A basically works like B".
lizmat e.g. by a daily run on a Hash that is deserialized and serialized again after
masak but in this case -- what does it *mean* for Hash.classify to "basically work the same as" List.classify!?
moritz so Hash.classify doesn't classify the hash, it classes the arguments and adds the information to the invocant
masak lizmat: your latest spec commit doesn't clarify that. 08:44
moritz correct?
masak lizmat: and my experiments with camelia didn't clarify *anything*. :/
arnsholt Oh, so it's like "multi classify ( %mapper, *@values --> Hash )"?
masak lizmat: could you or someone else show me, *really* simply, with camelia, what the thing actually does? I'm so curious.
lizmat cooking up a simple example 08:45
masak will at some point create a course called "Semantics: what does stuff actually *do*?"
moritz r: my %h = (a => 2, b => 5); say %h.classify(*.key, (a => 3, b => 4, c => 5)).perl 08:46
camelia rakudo 32e055: OUTPUT«Can not get attribute '$!items' declared in class 'List' with this object␤ in method classify at src/gen/CORE.setting:8195␤ in method classify at src/gen/CORE.setting:8175␤ in block at /tmp/XRGydi7XIG:1␤␤»
moritz whatever that means, I don't think I should get that here.
FROGGS I'd love to attend a course called: What are some of my colleagues actually doing? 08:47
lizmat r: my %h; %h.classify( { m/^(.)/ }, 1..100 ); say %h
camelia rakudo 32e055: OUTPUT«("1" => [1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 100], "2" => [2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "3" => [3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], "4" => [4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], "5" => [5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59],…
masak lizmat: thirdly or fourthly, "but called as a method on the Hash that is also returned". are you saying that the input Hash is also the output Hash? the fact that it gets put in the same sentence as "basically has the same functionality as L<List>'s C<classify>" confuses me greatly. 08:48
lizmat: what. WHAT.
lizmat r: my %h; %h.classify( { m/^(.)/ }, 1..100 ); say %h; %h.classify( m/^(.)/, 101 .. 200 ); say %h
camelia rakudo 32e055: OUTPUT«("1" => [1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 100], "2" => [2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "3" => [3, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39], "4" => [4, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49], "5" => [5, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59],…
masak lizmat: since when is .classify a *mutating* method!?
that does not make sense at all. 08:49
arnsholt I'm confused now, too
lizmat and I'm confused at your confusion :-(
masak lizmat: before your example, I was curious and thought I was missing something. now I'm a bit peeved and think that *you're* missing something.
lizmat well, that could all well be true 08:50
masak lizmat: are you aware of Perl 6's tendency to have non-mutating methods?
lizmat so what am I missing? are mutating methods not allowed?
ah
masak like .subst and .rotate and stuff.
.classify is one of those.
lizmat .classify on list is non-mutating
masak you do mutation through .=classify
lizmat .classify and .categorize on List return a new hash 08:51
masak ...yes...
a *new* Hash. 08:52
lizmat method classify ($test) { {}.classify( $test, @.list ) }
by consequence of that, you can call .classify on an existing hash 08:53
masak I see.
if that's how it's implemented internally, then that internal .classify shouldn't be exposed.
conversely, if we want to expose .classify on Hash, it shouldn't work like that.
lizmat ok 08:54
masak sorry for being a bit harsh. :/ it's just very very wrong.
I'm glad I persisted in seeking clarity to my confusion.
lizmat ok, fixing now
masak lizmat++ 08:55
dalek ecs: 48def95 | (Elizabeth Mattijsen)++ | S32-setting-library/Containers.pod:
Remove confusing spec, until we know what we want to do here
08:56
09:03 rindolf joined
dalek ast: 5c6aee2 | (Elizabeth Mattijsen)++ | S32-list/c (2 files):
Remove tests for Hash.classify and Hash.categorize
09:04
masak lizmat: fwiw, I envisioned a .classify on hashes that did some "second-order" classifying, a bit like a stable .sort can do second-order sorting. but I couldn't quite fit it together in my mind. 09:15
dalek kudo/nom: 4a608a7 | (Elizabeth Mattijsen)++ | src/core/ (3 files):
Remove Hash.(classify|categorize), as it is no longer specced
09:16
ast: 9a9e72e | (Elizabeth Mattijsen)++ | S32-list/c (2 files):
Further fixes for Hash.(classify|categorize) departure
moritz lizmat: would a List.classify(:into(%existing_hash), $classifier, @list) work for your use case? 09:17
lizmat I've renamed Hash.(classify|categorize) to Hash.(classify_list|cateforize_list) 09:18
and adjusted references accordingly, removed tests as these are now internal methods
I am told that adding named parameters is smelly, so I don't think that is a good idea, but it would serve my purpose, yes 09:19
masak moritz: why is there both a List. and a @list ?
lizmat it would feel unnatural to me
moritz masak: uhm, my error
should be just List.classify(&classifier, :%into) 09:20
masak moritz: it seems to me that if you want to .classify "into" a hash, you just .classify and then .push
moritz: no need to re-invent .push as a named parameter in .classify
lizmat cycling& 09:21
masak hm, I had heard of "waterfall" and "whirlpool" before, but www.techopedia.com/definition/26121...-stabilize was new to me. 09:24
moritz "The synchronize and stabilize life cycle model defines an approach helping to balance flexibility and structure in software product development." 09:27
so, what's the approach?
masak I read it as "do things separately in smaller teams, then deal with the inevitable fallout when the software needs to integrate". 09:31
09:34 daxim joined 09:45 crab2313 joined
mathw morning o/ 09:46
masak mathw! \o/ 09:48
mathw hi masak 09:49
that was enthusiastic
masak yes :)
happy to see you :)
mathw aaaw 09:50
masak happy #perl6 exists, after all these years, and is still the best place to learn and grow, and still pulls in all these awesome people. 09:51
09:51 rindolf left
mathw It is a good place 09:52
and although I don't really do Perl 6 stuff these days, I still like being here, because Perl 6 is still awesome
thinking of going to LPW this year 09:53
masak ooh 09:54
would be great to finally meet in R**3.
mathw yes that's what I was thinking 09:55
I might even be using Perl professionally again by then
masak cool.
mathw might
it relies on me yelling at people about money though 09:56
masak tries to picture that and fails 09:57
mathw heh
okay I don't really mean yelling 09:58
salary has to be negotiated
masak ah, yes.
mathw so I might just stay put, but we'll see 09:59
out of interest, what would you write a high-performance web service in?
masak define "high-performance". 10:01
arnsholt If the performance needs are truly ridiculous, probably something like Erlang with a web frontend in whatever suits the rest of the circumstances =) 10:02
mathw masak: good reply :) 10:03
masak I was thinking Erlang, too. 10:04
mathw Erlang certainly goes further than I actually need
masak and if we're talking high-performance as in "real-time trading", I'd reccomend looking into the state of the art, which is impressive in what it does. 10:05
mathw might be a hard sell too, the guy I have to run this by is wary of using Perl because he doesn't think there are any Perl programmers, so I'm sure he's never heard of Erlang
and no, it's not a real-time trading system
It's basically somewhere to put msot of the business logic so that disparate interfaces to it don't have to implement it all three or four times, slightly differently. 10:07
I think you'd agree that would be bad.
10:09 xinming left 10:11 xinming joined
masak sounds like something approaching "creating a service" thinking. 10:13
tadzik Go? :) 10:18
10:18 yoleaux left, crab2313 left
mathw I looked at Go a few weeks ago 10:21
something about it feels a bit wrong to me
like, it's got some good stuff
but it's so resolutely... normal 10:22
masak heh.
hoelzro I know what you mean
masak probably a good thing for the systems programming niche.
hoelzro it just seems...boring?
mathw yes, boring
I'd actually rather use C++11
masak it's what you get when you start with "let's make things really easy for the compiler so it can be fast!"
mathw yeah and there's always a place for that I guess maybe 10:23
I'll admit to seriously considering Haskell 10:24
that can go pretty scarily quick if you're careful
certainly quick enough, and I am a fan of strong type systems :) 10:25
again might be hard to run it past the 'who can look after it if I leave' test...
oh and then there's the part of my brain that whispers "do it in Lisp, you know you want to" 10:27
masak if you want FP and performance, maybe look into Ocaml? 10:29
mathw good point 10:30
and from there one could go to F# if I get stuck on a Microsoft server platform, but I have no intention of doing that. 10:31
10:32 sqirrel left 10:34 crab2313 joined 10:40 pmurias joined 10:42 sqirrel joined
pmurias 2hi 10:44
* hi
what's the difference between using nqp::getlexdyn('$*FOO') and $*FOO (in nqp) 10:45
Ulti arnsholt: have you seen this erlang video? www.youtube.com/watch?v=xrIjfIjssLE 10:48
11:00 yoleaux joined, ChanServ sets mode: +v yoleaux 11:27 rindolf joined, sqirrel_ joined 11:43 sqirrel left 11:56 crab2313 left 12:05 sqirrel joined, benabik left 12:06 benabik joined 12:34 rindolf left 12:39 sqirrel_ left 12:40 btyler joined 12:50 shinobicl joined 12:57 stevan__ left 12:59 btyler left 13:04 konundra joined 13:06 SamuraiJack_ left 13:10 sqirrel_ joined 13:13 ggoebel joined 13:14 kaare_ joined 13:15 PacoAir joined, sqirrel left
masak looks for a .classify equivalent in Python, but finds none 13:17
arnsholt It's probably one of those things that's just a bit too small to end up in a library somewhere 13:19
masak well, an obvious candidate was itertools, which contains lots of stuff like that: docs.python.org/2/library/itertools.html 13:20
moritz /w 15 13:23
sorry
masak hugs moritz
good irssi user! :)
13:27 mu joined, mu is now known as Guest75569
Guest75569 what ? why i cant take name "Mu" ? 13:28
you failed to identify ?
13:28 Guest75569 left
FROGGS no u 13:29
masak Guest75569: come back so we can explain it to you! 13:30
[Coke] short version: irc sucks. :P
masak heh, Python adopted Perl 6's 0o123 syntax :)
[Coke] r: say 0o123;
camelia rakudo 4a608a: OUTPUT«83␤»
FROGGS Python: \o/ improve with us! 13:31
this syntax really is like sane**sane 13:32
mathw much better than C's, that's for sure
masak that's Python 3, to be exact.
Python 2 does 0123.
str: 0123
std: 0123
camelia std c2215f0: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o123 if you mean that at /tmp/05psoupjia line 1:␤------> 0123⏏<EOL>␤ok 00:00 41m␤»
masak std: 0123 #ok
camelia std c2215f0: OUTPUT«Potential difficulties:␤ Leading 0 does not indicate octal in Perl 6; please use 0o123 if you mean that at /tmp/abmVSsmClC line 1:␤------> 0123⏏ #ok␤ok 00:00 41m␤»
corecatcher short q: What are these dba() calls? e.g. dba('horizontal whitespace'), looked them up in nqp, but didnt really got it
masak std: 0123 #OK
camelia std c2215f0: OUTPUT«ok 00:00 41m␤»
masak corecatcher: they set a context for better error messages. 13:33
FROGGS they are used in error messages instead of the method name
masak corecatcher: the TLA expands to "doing business as".
13:33 bluescreen10 joined
corecatcher ah, so the error msg is generated for the given "context" ? 13:33
FROGGS r: 1 1 13:34
camelia rakudo 4a608a: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/RLs46RQ3bu:1␤------> 1 ⏏1␤ expecting any of:␤ postfix␤ infix stopper␤ infix or meta-infix␤ statement end␤ statement modifier␤ statement modifie…
13:35 kaleem left 13:36 sqirrel_ left
corecatcher so where shall I look into to see what errormsg is given for "horizontal whitespace"? or is the errormsg a bit more complex, like analysing lots of contexts and printing sth human-readeable for it? 13:36
FROGGS corecatcher: the list of "expecting any of" you see above is generated from the dba's of the tokens that are valid at that parsing point 13:37
corecatcher: I don't understand your last question
corecatcher FROGGS: nvm got it - my thought was that one can pin down the error to a specific one by analsying lots of contexts which were set or unset 13:39
13:39 btyler joined
corecatcher just like a lookup table: "oh a b and c were set and d not, so it must be error: foo" 13:39
13:40 bluescreen10 left
FROGGS well no, it really is just the human readable form of the method name, that will be put in a backtrace 13:40
corecatcher hmkay :) thx 13:41
masak heh, I implemented classify as an 8-line function in Python ;)
FROGGS 8-)
masak gist.github.com/masak/6122083 13:43
lizmat fwiw, that is only 1 of the MMD candidates, and does not do multi-level classification 13:44
masak troo.
moritz r: say (0, 1, 2).classify(* %% 2).perl 13:45
camelia rakudo 4a608a: OUTPUT«("True" => [0, 2], "False" => [1]).hash␤»
masak I tellya, the instinct to end everything with a semicolon is intense.
mathw free yourself from the tyrrany of the semicolon
lizmat masak: also I wished you had chimed in on irclog.perlgeek.de/perl6/2013-06-14#i_7197911 13:46
mathw bask in the sanity of a syntax that pays attention to newlines
mathw might not like Python, but does like its syntax
lizmat masak: or here www.pmichaud.com/2010/pres/yapcna-p...de24c.html
masak lizmat: first time I see either. 13:47
lizmat: but at first glance, neither of them intimates that we're dealing with a mutating method.
lizmat neither of them disallow it either 13:48
anyways, you're made your point clear
masak yes, pmichaud's slide if I read it correctly.
lizmat no mutating methods
masak "returns a list of pairs where..."
well, very few mutating methods.
we still have .push and .pop and similar :)
but .classify is decidedly not a mutating method. to the extent that Perl 6 carries the FP banner, .classify being mutating goes straight against that. 13:49
lizmat r: my %h; %h.push( 1, (a => 2), 3 ); say %h # rakudobug ?
camelia rakudo 4a608a: OUTPUT«Trailing item in Hash.push in block at /tmp/Nlbd2p_W4f:1␤␤("1" => "a" => 2).hash␤»
arnsholt masak: You can end your statements with a ; in Python, but it's not really useful =) 13:50
masak n: my %h; %h.push( 1, (a => 2), 3 ); say %h
camelia niecza v24-88-g1f87209: OUTPUT«{"1" => "a" => 2}␤»
masak lizmat: I don't like Niecza's behavior better :(
arnsholt: oh gosh you're right!
lizmat basically because they are both implemented right
masak oh, Rakudo also outputs that, but only after complaining. 13:51
lizmat r: my %h; %h.push( 1, (a => 2) ); say %h # doesn't complain, but is wrong as well
camelia rakudo 4a608a: OUTPUT«("1" => "a" => 2).hash␤»
masak lizmat: wrong according to some bit of spec or other, I guess? 13:52
lizmat: usually putting () around a pair in a siggie means "yeah, I really want that pair".
(and so it looks right to me at first blush)
meh, it's humbling to be a newcomer in some channel. the #python people aren't interacting with me at all. 13:53
arnsholt Yeah, I've noticed that a few times myself 13:54
13:54 crab2313 joined
PerlJam masak: Are they interacting with others? 13:55
masak PerlJam: yes, a few conversations ongoing, as far as I can see.
13:55 shinobicl left
corecatcher is there anything that can parse the S26 specs pod? :P 13:56
AND give me a nice output?
jercos Your mind?
PerlJam corecatcher: Rakudo can parse most (if not all) of it with the --doc option
masak doubts it can parse it all
that said, it'd be interesting to see a list of what it doesn't parse
corecatcher okay, so pod is a niche to work on *check* 13:57
PerlJam yeah, that would be good to add to the POD feature matrix
13:57 xinming left
moritz and --doc=html uses Pod::To::html to generate HTML from it 13:59
not perfect, but much better than nothing 14:00
14:01 xinming joined
moritz nwc10++ # news.perlfoundation.org/2013/07/imp...rt-18.html longest grant report I've ever skimmed 14:08
14:09 bluescreen10 joined
nwc10 got chewed by the site's blog formater (again) 14:12
masak ok, I've broken through the isolation barrier in #python ;) 14:13
they gave me a 5-line classify: gist.github.com/epsy/6122272 14:14
14:14 xilo joined
benabik masak: defaultdict? 14:14
flussence still feels like a newcomer in this channel most of the time... 14:15
tadzik ah, defaultdict. I used that recently too :)
googling for "python dict autovivication" 14:16
benabik Oh, a dict that returns a list for something that isn't there?
mathw that is neat
tadzik yeah 14:17
before that, I tried using .get() as an lvalue :)
masak yeah.
tadzik funny enough, I had a similar problem with Go recently 14:18
if you have a map[string]struct{ ... }, it doesn't auto-allocate struct when you access map["x"]
(which is fair enough)_ 14:19
masak heh, Go signatures still look to me like "this is the standard way to write things... now mess it all up and backwards and stuff!" 14:20
tadzik heh, it's not that bad :) 14:22
see also: scala
one of the excuses is "it's now sane to write a function type" 14:23
in C it was, well, quirky
masak RT #38812 is the lowest RT number I've seen fixed. nwc10++
tadzik: granted. 14:24
nwc10++ # news.perlfoundation.org/2013/07/imp...rt-18.html
benabik #38812 created 7yrs ago. 14:25
PerlJam man have I been out of touch! 14:26
PerlJam just read the commentson diakopter's hague grant app
masak notes that reini can't spell 'blizkost' 14:31
FROGGS masak: that is just germish :o)
frettled blokschnitzel? 14:32
FROGGS >.<
*g*
masak FROGGS: I realize that. 14:33
FROGGS 'course
masak in fact, my instinct is to spell it with 'tz' as well.
the only reason I don't is I know how it's actually spelled ;) 14:34
though the clogs say I've misspelled it twice, so...
FROGGS HA! 14:35
masak (against spelling it right 28 times)
FROGGS *g*
tadzik *tz*
masak .oO( tazik ) 14:36
FROGGS I don't wanna know how often I missspel something
masak FROGGS: :P
FROGGS that is clearly not my strength :o)
14:37 Psyche^_ joined 14:39 wtw left 14:41 Psyche^ left 14:42 _jaldhar left 14:44 daxim_ joined, daxim left, lowpro30 joined 14:45 Bzek joined 14:46 rindolf joined
masak wow. not only does my Mint install have python3 installed, it also has the 2to3 tool. I had no idea. :) 14:50
nwc10 pypy's Python 3 support has reached beta: morepypy.blogspot.co.uk/2013/07/pyp...eta-1.html 14:52
masak whoa. Python has the ternary operator infix:<?? !!>, but they spell it infix:<if else>. 14:55
that's not just Python 3, that's 2 as well.
and of course, the first and second operands are reversed compared to infix:<?? !!>
>>> x = 7 if 2 + 2 == 5 else 9 14:56
>>> x
9
14:56 konundra left
masak since 2.5, according to StackOverflow. 14:57
14:58 lowpro30 left
FROGGS that's not so bad 14:58
masak well, whatever happened to "one-- and preferably only one --obvious way to do it"?
this is clearly a second way, after the ordinary 'if'. 14:59
tadzik 'tis just marketing bullshit ;)
masak clearly! 15:00
arnsholt masak: There's also an idiom involving the short-circuiting behaviour of || and &&
nwc10 surely it's still true, as infix:<if else> is not obvious :-) 15:01
arnsholt "cond && iftrue || iffalse" IIRC
masak nwc10: haha!
benabik arnsholt: only works if `iftrue` is true. ;_0 15:02
masak explanations from #python: Guido doesn't like infix:<if else>, but he added it because the things people made as workarounds were much, much worse!
[Coke] r: True && say 3, False || say 4
masak that's wonderful. :>
camelia rakudo 4a608a: OUTPUT«4␤3True␤»
benabik hm, My nose appears to have relocated to the side of my face. Should get that looked at.
masak arnsholt: yes, that.
[Coke] mutters something about parens
masak arnsholt: the "and-or" trick.
tadzik masak: there should be more Perlists programming in Python, doing the Much Much Worse things so Python may end up being civilized ;) 15:04
arnsholt Yeah. As someone used to Perl and Lisp it only made me wrinkle my nose a bit, not recoil in horror as it seems some Pythonistas do =)
masak tadzik: challenge accepted!
15:05 jeff_s1 joined
arnsholt I wonder what hilarious things mst would do to Python. Also how the Python community would react ^_^ 15:05
masak right. not "do with", "do to" :P 15:07
tadzik I've seen slides "Don't do that in Python" recently. I was like "phew, amateurs" 15:08
although the q module is something I might steal for Perl
arnsholt masak: I find that a bit of anthropomorphisation improves the turn of phrase every now and then =) 15:09
15:11 sqirrel joined
masak tadzik: the q module transcends space and time and likes to play tricks on puny humans? 15:13
ssutch good $timeofday 15:15
tadzik masak: no, and it's a huge disappointment :P
FROGGS hi ssutch 15:22
arnsholt tadzik: Ooooh, that q module sounds pretty darn clever! 15:23
masak jnthn++ # www.josetteorama.com/all-about-perl...rt-3-of-3/
tadzik arnsholt: yep :) 15:24
I mean, it's quite simple and all
but it's _so_ useful
masak tadzik: do you have a url for the q module?
arnsholt masak: pypi.python.org/pypi/q 15:25
tadzik arnsholt clearly has faster internets :)
arnsholt I was reading the docs, to see what kind of module it was 15:26
So I just had to go over to the browser workspace and copy the URL =)
tadzik pip install --user q; pydoc q :)
masak oh, cute.
arnsholt I know, right? 15:28
I think it even uses operator overloading 15:29
masak "Don’t try this at home, kids!" -- docs.python.org/3.3/faq/programming...-in-python -- why not? it looks like great fun! 15:32
15:33 kaleem joined
arnsholt Yeah, sometimes Python makes me want to go "Why so serious?" =) 15:34
15:34 kaleem left
masak .oO( and Python goes "I'm Batman" ) 15:35
15:35 daxim_ left
[Coke] No, Mr. Keaton. No you're not. 15:36
masak idly wonders if that's Keaton 2.7 or Keaton 3.3 15:39
geekosaur this is more bemusing if you misread Keaton as kitten 15:44
15:46 ssutch left
timotimo corecatcher: hey, you still there? i can talk to you about Pod6 :) 15:48
15:49 fhelmberger left
timotimo perlcabal.org/syn/S26.html - this is the current "state of the art" parsing + Pod::To::HTML which i added a bunch of fixes to recently, but there's still lots missing 15:49
i was considering a half-rewrite of the pod parsing to make some stuff work properly, but that may not be needed after all
i think i have *some* idea how to rewrite the table parser to honor formatting codes 15:51
15:52 grondilu joined
timotimo is there a clever way to say "the cursor inside this here group may not proceed more than $maxnum characters forwards" and have the backtracker aware of that properly? 15:52
15:52 vmspb joined
timotimo a way that would also work recursively? 15:52
arnsholt The and operator perhaps? 15:53
masak timotimo: I don't think so. 15:54
arnsholt <subrule> & [.**100] # Or however many characters you want
timotimo ... that works?
masak oh, that would do it, I guess.
timotimo r: say "foo" ~~ / [...] & ["f"..] / 15:55
camelia rakudo 4a608a: OUTPUT«「foo」␤␤»
timotimo r: say "boo" ~~ / [...] & ["f"..] /
camelia rakudo 4a608a: OUTPUT«Nil␤»
masak r: "foooooooooo" ~~ / [foo] & [.*3] /
camelia rakudo 4a608a: ( no output )
timotimo oh wow, that is glorious!
15:55 grondilu left
timotimo one more * 15:55
masak r: say "foooooooooo" ~~ / [fo*] & [.*3] /
camelia rakudo 4a608a: OUTPUT«Nil␤»
timotimo also, why did i quote the f? well ...
masak hrm.
timotimo r: say "foooooooooo" ~~ / [fo*] & [.**3] / 15:56
camelia rakudo 4a608a: OUTPUT«「foo」␤␤»
arnsholt I'm not 100% sure it'll work, mind
masak argh, tes,
timotimo++
timotimo :)
that's absolutely amazing
arnsholt But the & operator is a really nice addition in Perl 6
It really should be in normal regexes as well, IMO
masak by the way, the & operator makes so much more sense if you're a Thompson engine. come to my YAPC::EU talk for more.
timotimo i'll have some balconytime now and think about things.
arnsholt FSAs are closed under intersection, and it's not always trivial to express using the other regex primitives 15:57
masak arnsholt: if you're not a Thompson engine, the & operator is "quadratic" in the sense that it multiplies together all the backtracking alternatives of both sides.
arnsholt I guess, but that potential is in the intersection operator anyways, isn't it? 15:58
masak has a category theory moment when he realizes that & and | are just *another* example of products and coproducts
arnsholt: well, the point is that it's not quadratic under Thompson-engine semantics.
arnsholt Oh, that's interesting 15:59
masak (because there's no backtracking)
arnsholt I'm not really familiar with how the Thompson engine works, unfortunately
masak arnsholt: swtch.com/~rsc/regexp/regexp1.html has some sweet diagrams and nice, clear code. 16:00
alternatively, cometomytalk. :P
timotimo ah dang, thinking about it some more tells me: since we can't interpolate numbers on the right side of ** yet, it won't be of terribly much help; although i can be cleverer about it.
arnsholt Not going to Kiev, sadly =)
masak arnsholt: aaaaw
arnsholt Going to an academic conference next week (in Bulgaria, even), so Kiev two weeks after is a bit inconvenient 16:01
masak arnsholt: we'll miss you!
arnsholt I'll miss you too =) 16:02
16:04 ssutch joined
timotimo if there'll be another GPW in the future that's comfortable for me to reach, i'll try to attend and maybe i'll even meet a sufficiently big subset of <masak moritz jnthn tadzik lizmat>.assume-missing() 16:10
16:13 sqirrel_ joined
moritz timotimo: next year is in Hannover 16:16
timotimo that's only barely closer to me than berlin is ... 16:19
but if i go spend a few days with my parents in my old home, it won't be quite as far i think
timotimo mumbles something about google maps and lack of built-in measurement tools
do we already know what month, or even calendarweek, it'll happen on? 16:20
arnsholt ACT says 26 to 28 March 16:21
act.yapc.eu/gpw2014/
timotimo during exam time, eh? 16:22
masak Python got a MOP in 2001, with Python 2.1. 16:27
sorry, 2.2. 16:28
16:29 xabbu42 joined, xabbu42 left 16:30 xabbu42 joined, xabbu42 left 16:32 fgomez left
moritz the rubyists sometimes also claim to have a MOP, but so far I haven't see the evidence for that 16:32
16:32 sqirrel_ left
masak moritz: eigenclasses! 16:34
benabik I think Object and Class provide basic methods that can be used to create new classes.
timotimo masak: eigenclasses means "do it yourself"? ;)
16:35 FROGGS left 16:37 colomon left
masak timotimo: "eigenclass" was _why's name for "class metaobject", IIUC. 16:40
moritz wie eigentümlich. 16:42
masak :)
moritz masak: so you're learning python these days? 16:43
16:43 vk_ joined
masak moritz: yes. I've always been watching Python from a distance, sometimes reading lots of it, sometimes writing smaller things in it. but I've never dug into Python before. 16:46
moritz: now I'm writing a Python course, for the simple reason that I want to deliver more courses that are similar to the Perl course we have, because there does not seem to be a very high demand for the Perl course. :) 16:47
16:47 kaleem joined
masak (there is a demand, it's just not very high. the demand for the JavaScript course is just ridiculous, for example.) 16:47
moritz could use a js course too 16:48
16:49 crab2313 left
PerlJam does the JS course include jQuery, underscore, coffeescript, or other such things? 16:49
masak PerlJam: aye. 16:50
arnsholt From what I've been able to make out, the most unusual thing about JS is the prototype based OO
Most of the rest of it seems to be relatively manageable from a Perl programmer's perspective
moritz arnsholt: and typically when you need JS, you also need the DOM
PerlJam arnsholt: that's only unusual if you come from class-based object systems.
:)
arnsholt What can I say, I come from a class-based background =) 16:51
Perl and Java, mostly, with bits of Python and C# thrown in
masak we already have a request for this Python course. it's some clever people I taught JavaScript this spring. so I have a very concrete audience to write for. I like that. 16:56
timotimo is thinking about type inference on QAST trees
there's a way to return a random value from a caller if you're called from it, right? CALLER::return('my value') or something? 16:58
16:59 dakkar left
timotimo r: sub evil() { CALLER::return(42); say "what" }; sub benign() { evil(); 99; }; say benign; 16:59
camelia rakudo 4a608a: OUTPUT«No such method 'Any' for invocant of type 'Int'␤ in sub evil at /tmp/UHtO_F8VDh:1␤ in sub benign at /tmp/UHtO_F8VDh:1␤ in block at /tmp/UHtO_F8VDh:1␤␤»
timotimo r: sub evil() { CALLER::return; say "what" }; sub benign() { evil(); 99; }; say benign;
camelia rakudo 4a608a: OUTPUT«what␤99␤»
masak timotimo: seems like a weird feature to want. :) 17:00
timotimo if it isn't in there, i'll be happy
masak timotimo: but with the cooperation of &benign, it can at least be emulated.
timotimo because otherwise every last bit of type inference-ability goes down the drain
masak oh, ok. 17:01
then "no, you can't do that. that's crazy!" :P
17:01 Bzek left, xinming left
timotimo good 17:02
i'm thinking if i start annotating returns Foo for subs that clearly only have one return point, i could get quite a bit of the setting annotated with returns values automatically 17:03
17:03 xinming joined
timotimo and then if benign assignments between containers carry on that information through the optimizer, further subs could get return type annotations etc etc 17:03
and at some point, if $var ~~ Type could eliminate type check necessity down the tree and so on and so forth 17:05
i think qast is a nice format to try these kinds of transformations on 17:06
17:07 konundra joined 17:12 sqirrel left 17:16 rindolf left, rindolf joined, birdwindupbird left
timotimo is not sure what point (actually range) between "real possibility" and "pipe dream" all this inhabits 17:18
benabik Data-flow Analysis 17:19
timotimo i was vaguely aware of that 17:21
17:27 rindolf left, spider-mario joined
timotimo thanks, benabik :) 17:31
benabik timotimo: It is a bit more complicated than simply traversing trees, but if you set up a good framework for it (ref: Hoopl, if you don't mind Haskell) you can get a _lot_ of optimization that way. 17:33
timotimo: Dataflow will get you a lot more of the "I assigned things so I know its type", especially across conditionals. 17:34
Propigating up/down trees does get you a lot, but traversing across Stmts nodes is probably more valuable. The tricky part is conditionals and the _really_ tricky part are loops. 17:35
timotimo yeah, for now i wasn't even going to touch loops ;)
and lists of things for that matter. 17:36
17:36 kaleem left
timotimo i think there's some things to be done before actually setting up a proper framework, like a sub that is defined to return Foo would get a type check and when you assign the return value to a my Foo $foo, you'll get another typecheck; those redundancies shouldn't be terribly hard to remove and will probably speed up code that makes heavy use of type annotations quite a bit. 17:37
17:37 sqirrel joined, aindilis joined
benabik Using annotations like that is a good idea. I mention it due to "annotating return types automatically". Gets complex for any non-trivial code. 17:40
timotimo one target i think would be worthwhile is box_n, box_i and box_s; they take the type to box it in as a parameter and the optimizer could get special knowlegde of that and a piece of the setting may get faster 17:42
diakopter thinks optimizing effort should saved for a full-blown comprehensive optimizer 17:43
timotimo diakopter: could you elaborate a little bit?
17:43 census joined 17:44 btyler left
timotimo diakopter: do you mean you'd prefer starting directly with a proper flow analysis framework? 17:45
diakopter well, just tons and tons more thought/planning/analysis/research, yes
timotimo i read the wikipedia page on data flow analysis and reaching definition, that ought to be enough to turn me into an expert! 17:47
;)
masak I dunno, I appreciate planning and research, but I'm not against short-term benefits, either. 17:48
timotimo i see the situation thusly: i'm not getting paid to do this and i've got a bit of curiosity for the subject. if i do implement a few optimisations, they'll most probably be really, really easy to rip out again once someone comes along to plug in a proper framework
benabik Really good analysis needs things like SSA, so.... yeah.
timotimo this is a bit like the "zero sum game" argument for "perl6 is destroying perl!"; it's not like i have the patience to read through fifty papers, become an expert and then write a proper optimization framework on the first try
i know i lose interest in such things too quickly much of the time 17:49
benabik: single static assignment, yes?
benabik timotimo: Yes.
17:50 vmspb left
timotimo a friend of mine is doing his bachelor's thesis on something regarding SSA, i've talked to him about it a bit 17:50
benabik Trees are nice for AST, but I've always disliked that trees persisted for so long in HLLcompiler. Even without SSA, most optimizations deal with blocks not trees. 17:51
moritz stackoverflow.com/questions/805107/...2#15558082 # crosspost from p5p 17:52
benabik "Wow. That's, uh, creative. :)"
diakopter 50 papers? I was thinking 500 or so 17:53
benabik I think just two books would be enough. Dragon covers some basic optimization stuff, and.... shoot, forgot the name of the optimization one. 17:54
masak moritz: I like that one. not sure I'd use it in production code, as it relies on the serialization details of functions, but... 17:55
timotimo diakopter: that does not change the point, at least in my case
diakopter oops, I left a ;) out of that 17:56
timotimo me, too ;)
clkao 40
17:56 census left
timotimo if somebody wants to go ahead and become an expert, or if someone who's already sufficiently experted in that, wants to go ahead and implement the stuff for our optimizer.nqp, sure, i'd love that person to bits, but i don't see that happen soon enough for my tastes ;) 17:56
[Coke] moritz++ That is awesome.
17:57 SamuraiJack_ joined
timotimo i have yet to measure it, but i fear we're diminishing the speed benefits we're getting from being able to compile-time dispatch subs by doing far too many type checks at run time when we're playing with typed containers 17:57
diakopter timotimo: that's what I was hoping to devote the next NN years to.. 17:58
masak moritz: it would be a bit safer if it didn't hard-code the indices, but used regexes to trim away function and comment markers.
benabik would love to do it, but would need to convince his advisor it's valuable research.
timotimo r: sub rec(Int $n) returns Int { return $n <= 0 ?? 1 !! rec($n-1) + 1 }; rec(50) + rec(50); # i don't really want to know how much time is wasted on return-type-checking here! 17:59
camelia rakudo 4a608a: ( no output )
frettled masak: the response from Jan Dvorak links to a higher rated response to the question, where this (and a minifier issue) is addressed: stackoverflow.com/questions/805107/...69#5571069
timotimo (but i can measure it!)
timotimo fails to come up with a big difference 18:01
pmurias benabik: re SSA seems to be aimed at doing a resonably good job quickly, a fix point data flow style of doing things like ghc does (in it's hoopl library) seems like something that would give better quality 18:02
frettled Also, slightly off-topic (but on-topic for modern programming), and I suspect very much of interest to geeks such as masak++: vimeo.com/71278954 (A talk from Dropbox's DBX conference, as if it was made in 1973)
18:02 cibs joined
benabik pmurias: Would probably still be easier to deal with blocks, even if you don't go full SSA. 18:02
frettled … that link will take 32 minutes out of your lives ;)
pmurias benabik: by block you mean turning things like loops into primitive jumps? 18:03
masak frettled: I linked to accompanying worrydream.com/dbx page earlier today ;)
frettled masak: ah!
benabik pmurias: Flat blocks of operations instead of nested trees. Loops are connections to a block. 18:04
masak but yes, I probably should watch the video as well.
benabik pmurias: Basically a connected string of non-branching operations.
18:04 xinming left
masak benabik: um... would that form a graph in the general case? 18:04
pmurias yes
benabik masak: Yes.
masak benabik: the links between blocks, I mean.
pmurias a basic block graph
masak ok. 18:05
diakopter .. which is the 32 min link?
masak diakopter: vimeo.com/71278954
frettled timotimo: that was a naugty example, BTW :)
timotimo naughty in what way?
pmurias and with everything potentially throwing an exception all of our blocks would contain one operation each ;)
benabik masak: But it's easier to convey data flow information along graph edges than via arbitrarily complex rules on various tree types.
masak sounds like the basic block graph is pretty much what you need to do a CPS transform.
18:05 grondilu joined
frettled timotimo: evil recursive code :) 18:05
timotimo i was hoping i could get the return value checks to increase run time sufficiently to be measurable, but apparently it's quite fast either way.
benabik pmurias: exceptions are... exceptional. ;-) 18:06
frettled timotimo: I suspect you might need to concoct a different example, perhaps with a more complex return type than Int.
pmurias masak: the basic block graph is basically converting structured control flow into goto/conditional goto
18:06 xinming joined
timotimo frettled: that may very well be the case, but i fear object creation costs will dominate or something 18:07
anyway, afk for a bit.
frettled timotimo: I think you're right.
moritz calls used to be quite expensive
I think they still are
timotimo =time ./perl6 -e 'sub rec(Int $n) returns Int { return $n <= 0 ?? 1 !! rec($n-1) + 1 }; my Int $foo = rec(9999) + rec(9999) * rec(9999) - rec(9999) + rec(9999); say $foo' - this only takes 1.48 seconds. 18:08
that should be 50000 calls 18:09
3e-5 seconds per call apparently
frettled So if this is changed to something that does something with strings … hmm …
diakopter hm, maybe I would understand this video better if I had audio
frettled diakopter: yep, somewhat :D
pmurias benabik: re hoopl, I played a bit with writing a hoopl optimiser for niecza, and I'm planning to do something like that in the future for rakudo
18:10 btyler joined
pmurias benabik: so I can infer enough info to emit efficient code in my javascript backend ;) 18:10
frettled timotimo: I can't quite wrap my head around how to distinguish call and return costs by looking at the command line. I think you'd need to use a process tracer or something.
benabik pmurias: I had planned to do something similar for Parrot, but now it looks like grad school will not leave me enough time.
frettled There is a fairly decent one built-in to OS X, but, eugh. 18:11
pmurias benabik: is it worth doing anything for Parrot nowdays? 18:12
18:13 cibs left 18:14 cibs joined
pmurias benabik: at least untill they do their grand change of focus 18:16
benabik pmurias: Well, when I was making those plans there were still several active developers.
18:18 sqirrel_ joined 18:21 FROGGS joined 18:24 sqirrel left, SamuraiJack_ left
pmurias benabik: what I'm not sure if having a haskell part in the compiler is a good idea 18:28
s/if/is if/
benabik pmurias: Don't use Hoopl, use it a basis for design. 18:29
pmurias yes that would be propably what should be done as it would avoid having to convert the QAST between haskell/Perl6 18:32
18:34 dmol left
diakopter pmurias: I thought it was C-- 18:39
benabik diakopter: Hoopl is a data-flow analysis library in Haskell, not used by Haskell (that I know of)
diakopter oh 18:40
18:47 dmol joined
masak wow, Python 2.2 seems to have been a big improvement in many senses. not just the new object model, but also real closures. 18:52
[Coke] time taken to build rakudo-jvm and run the spectests: 79m50.815s 18:56
arnsholt Backscrolling a bit, but regarding CPS and SSA, aren't they a bit similar?
I seem to remember something about that
[Coke] I really need to time a version from a few weeks ago, that seems much slower to me.
timotimo i forget what CPS refers to, arnsholt 18:57
arnsholt Continuation Passing Style
diakopter 2.2?
timotimo ah. i don't know why you think they're similar; i don't really see it
arnsholt I can't remember what it was. It's a dim memory 18:58
Anyways, optimisation experimentation gets a +1 from me =) 18:59
18:59 sqirrel joined
dalek rl6-roast-data: 18f59cb | coke++ | / (5 files):
today (automated commit)
18:59
kudo-star-daily: b4aafce | coke++ | log/ (4 files):
today (automated commit)
19:00
[Coke] no change on rakudo-star-daily. hey, tadzik? 19:05
.to tadzik github.com/tadzik/perl6-File-Tools/issues/14 19:06
yoleaux [Coke]: I'll pass your message to tadzik.
preflex yoleaux: you have 1 new message. '/msg preflex messages' to read it.
[Coke] preflex: help?
preflex: help
preflex try 'help help' or see 'list' for available commands
[Coke] preflex: list
preflex Botsnack: [botsnack]; Cdecl: [cdecl]; 8ball: [8ball]; excuses: [excuse]; Factoid: [+, -, ., ?, delete, get, store]; Help: [help, list]; Karma: [++, --, karma, karmabot, karmatop]; Nickometer: [nickometer]; Nickr: [nickr]; PlokiRE: [re]; Seen: [seen]; Sixst: [6st, ordinal]; Tell: [ask, clear-messages, messages, tell]; Rot13: [rot13]; Quote: [be, quote, remember]; WCalc: [calc, wcalc]; Version:
[version]; XSeen: [xseen]; ZCode: [zdec, zenc]
masak arnsholt: CPS and SSA seems like two almost completely different things.
[Coke] who owns preflex and can we clear that message? 19:07
19:07 telex left
masak arnsholt: CPS is the idea that there is no 'return' and no call stack as such. only going from one block to another. SSA is the idea that every variable is only assigned to once in each block, and if they're assigned more times, you re-arrange things behind the scenes so they're assigned only once. 19:07
19:10 fgomez joined
nwc10 CPS is fun because it effectively means that your control flow within a non-leaf function is completely screwball 19:10
at least, any optimiser has to be aware that any function might return 0, 1, or many times
19:10 telex joined
nwc10 and any function it calls into might return from any other function 19:11
actually, that's not CPS. That's just continuations
arnsholt Yeah, continuations are more than a little weird 19:12
hoelzro is a new NQP/Rakudo * release going out anytime soon?
frettled [Coke]: unaffiliated/mauke/bot/preflex – maybe it's mauke's?
arnsholt But I loved how they made it super simple to implement the core bits of a Prolog
nwc10 hoelzro: I think thath rought answer is "well volunteered", or alternatively "no-one has had enough time to fix all the bugs in bundled distros" 19:13
arnsholt [Coke]: You're the
Stu: Any other comments or observations on the experience?
Malcolm: Has it given me sleepless nights, yes. Has it nearly driven me insane, yes. Would I do it again... in an instant!
Blarg. Fat fingers >.<
hoelzro nwc10: I'm just wondering if I should build a new Arch package against Parrot 5.6 right now or if I should wait a few day s=) 19:14
19:14 btyler_ joined
arnsholt [Coke]: Do you store the commit IDs for Rakudo/NQP you use to generate the reports in rakudo-star-daily somewhere? 19:16
19:17 btyler left
masak I used to really want continuations natively in Perl 6. now I find I am content with being able to write an interpreter (in Perl 6) that can emulate them when I need them. :) 19:23
19:23 jeffreykegler joined 19:25 Guest1337 joined 19:26 jeffreykegler left
arnsholt Heehee =) 19:29
I wonder if I could implement my Prolog purely in NQP, just pushing closures onto the stack...
masak: Incidentally, that's very lispy I think. "$language doesn't have the feature I want? I'll just DSL my way around it!" 19:30
19:30 vk_ left
masak aye. 19:30
arnsholt Incidentally, I read Steve Yegge's "Lisp is not an acceptable Lisp" today. Couldn't help thinking that I hope Perl 6 will be an acceptable Lisp 19:31
masak .oO( Perl 6 is not an acceptable Perl 6! ) 19:32
arnsholt =D
[Coke] arnsholt: no, right now it's just "whatever the latest was when the run started." 19:33
should be pretty easy to throw them in a log somewhere, though. 19:34
arnsholt: 19:35
whoops.
arnsholt 'k. It'd be great if you put that in somewhere 19:36
I sort of wanted it to pre-prune the Rakudo bisect it looks like I can't avoid =)
pmurias benabik: hoopl is used by ghc 19:41
[Coke] ok. I'm just doing it going forward.
it'll end up in log/version.log
pmurias masak: rakudo-on-jvm has support for continuations (at least on the nqp level) 19:42
arnsholt [Coke]: Spiffy! 19:45
masak pmurias: ooh -- would be a nice module to expose that... :) 19:48
19:49 kaare_ left 19:52 not_gerd joined
not_gerd o/ 19:52
mail.mozilla.org/pipermail/rust-de...05042.html # everyone wants the colon
19:52 kaare_ joined, sqirrel_ left
not_gerd masak: CPS can be used as an intermediate representation in compilers, similar to SSA 19:53
wikipedia links to dl.acm.org/citation.cfm?doid=202530.202532
19:55 preflex left
pmurias masak: the ops are well documented so there should be nothing besides tuits stopping you 19:56
19:57 preflex joined, ChanServ sets mode: +v preflex
pmurias masak: github.com/perl6/nqp/blob/master/d...ations.pod 19:57
masak pmurias: neat. 20:03
not_gerd: yes, this seems to be what benabik and pmurias said above, about the block graph thing.
20:06 grondilu left
masak not_gerd: I hadn't thought of Miranda, Hope, Clean, Haskell, ML, Ocaml, F# as "the ISWIM languages" before. that's very cute. 20:06
'night, #perl6 20:07
pmurias masak: 'night 20:09
20:09 kaare_ left 20:12 colomon joined
dalek kudo-js: 141cc9c | (Pawel Murias)++ | nqp:
Update nqp submodule.
20:14
kudo-js: 1d5f616 | (Pawel Murias)++ | runtime (2 files):
Fix nqp::isinvokable.
kudo-js: ba2d738 | (Pawel Murias)++ | runtime.js:
nqp::iscclass handles matching alphanumeric characters. Implement getlexdyn.
kudo-js: 18ad8b7 | (Pawel Murias)++ | run_tests:
Add passing test 61 to run_tests.
20:14 not_gerd left, sqirrel left 20:19 zwut00 joined, FROGGS left 20:20 FROGGS joined 20:22 Timbus left 20:23 Timbus joined 20:30 raiph joined 20:39 benabik left
timotimo r: say "foo barf bazump a" ~~ /[$<foo>=[\w+] { say $<foo>.from } \h+]+/ 20:40
camelia rakudo 4a608a: OUTPUT«No such method 'from' for invocant of type 'Parcel'␤ in block at /tmp/skKtldcx9d:1␤␤»
timotimo r: say "foo barf bazump a" ~~ /[$<foo>=[\w+] { say $<foo>[*-1].from } \h+]+/
camelia rakudo 4a608a: OUTPUT«0␤4␤9␤16␤「foo barf bazump 」␤ foo => 「foo」␤ foo => 「barf」␤ foo => 「bazump」␤␤»
timotimo not bad.
20:41 lowpro30 joined 20:42 benabik joined
timotimo r: say "foo bar foo" ~~ /$<foo>=[\w+] .* $<foo>/ 20:43
camelia rakudo 4a608a: OUTPUT«「foo bar foo」␤ foo => 「foo」␤␤»
20:45 benabik left 20:48 benabik joined 20:53 dmol left 20:58 konundra left 21:06 dmol joined 21:13 spider-mario left 21:20 konundra joined 21:30 sqirrel joined
timotimo how do i splice stuff into lists in perl6 and in nqp? is "nqp::splice" a thing? 21:34
nqp: my @a; nqp::splice(@a, 1, 1, 1);
camelia nqp: OUTPUT«elements() not implemented in class 'Integer'␤current instr.: '' pc 49 ((file unknown):43) (/tmp/krZa98dp2o:1)␤»
timotimo .o(don't know how that works)
nqp::splice(@params, [%param_info], $insert_at, 0); - i guess that says it all 21:37
r: say [1, 2, 3].splice([99], 2)
camelia rakudo 4a608a: OUTPUT«␤»
timotimo r: my @a = [1, 2, 3]; @a.splice([99], 2); say @a;
camelia rakudo 4a608a: OUTPUT«1 2 3␤»
timotimo r: my @a = [1, 2, 3]; @a.splice([99], 1); say @a;
camelia rakudo 4a608a: OUTPUT«1 2 3␤»
timotimo er, huh? hm. 21:38
21:39 lowpro30 left
timotimo r: my @a = [1, 2, 3]; @a.splice(1, 0, [99]); say @a; 21:41
camelia rakudo 4a608a: OUTPUT«1 2 3 99␤»
timotimo r: my @a = 1, 2, 3; @a.splice(1, 0, [99]); say @a; 21:42
camelia rakudo 4a608a: OUTPUT«1 99 2 3␤»
timotimo now it makes sense.
21:45 grondilu joined 21:48 PacoAir left 21:49 BenGoldberg joined 21:52 Guest1337 left 21:58 zwut00 left, benabik left 21:59 raiph left
timotimo great, now i may try to make code that gives me the current column, not position-in-all-of-the-string ... 22:00
22:01 sqirrel left 22:02 konundra left 22:05 grondilu left 22:07 dmol left
timotimo r: "foo bar baz\nbaz baz baz\nquux uuu quux" ~~ / [ \N*? \h { say $/.CURSOR.pos } ... { say $/.CURSOR.pos } \N*? ]+ / 22:09
camelia rakudo 4a608a: OUTPUT«4␤7␤8␤11␤»
timotimo hmm
ooooh, facepalm-time ...
22:09 bluescreen10 left 22:11 benabik joined 22:14 raiph joined
BenGoldberg r: "a".ord.say 22:23
camelia rakudo 4a608a: OUTPUT«97␤»
BenGoldberg r: "ab".ord.say
camelia rakudo 4a608a: OUTPUT«97␤»
timotimo r: "ab".ords.say
camelia rakudo 4a608a: OUTPUT«97 98␤»
BenGoldberg Ahh. 22:24
timotimo r: "foo bar baz" ~~ /^ [\S [\S|\h\S]*]+ % [\h\h+] $/
camelia rakudo 4a608a: ( no output )
timotimo r: say "foo bar baz" ~~ /^ [\S [\S|\h\S]*]+ % [\h\h+] $/
camelia rakudo 4a608a: OUTPUT«「foo bar baz」␤␤»
timotimo r: say "foo bar baz" ~~ /^ (\S [\S|\h\S]*)+ % [\h\h+] $/
camelia rakudo 4a608a: OUTPUT«「foo bar baz」␤ 0 => 「foo」␤ 0 => 「bar」␤ 0 => 「baz」␤␤»
timotimo whhyyyyyyy
22:27 Guest7049 joined 22:30 Seganku joined 22:31 grondilu joined 22:32 Guest7049 left
grondilu has colors when I type 'git log' now. Cool. 22:32
BenGoldberg r: say $_ for "foo bar baz" ~~ /^ (\S [\S|\h\S]*)+ % [\h\h+] $/
camelia rakudo 4a608a: OUTPUT«「foo bar baz」␤ 0 => 「foo」␤ 0 => 「bar」␤ 0 => 「baz」␤␤»
BenGoldberg r: say "$_" for "foo bar baz" ~~ /^ (\S [\S|\h\S]*)+ % [\h\h+] $/
camelia rakudo 4a608a: OUTPUT«foo bar baz␤»
BenGoldberg blinks 22:33
grondilu BenGoldberg: what are you trying to do? 22:34
BenGoldberg Why does the return value of ~~ gets stringified one way with "" and another way without?
And I've no idea what the regex is supposed to do, I'm just copying what timotimo wrote 22:35
grondilu r: say $_ given foo => "bar"
camelia rakudo 4a608a: OUTPUT«"foo" => "bar"␤»
grondilu r: say "$_" given foo => "bar"
camelia rakudo 4a608a: OUTPUT«foo bar␤»
grondilu hum
[Coke] BenGoldberg: difference between .Str & .gist
timotimo is making progress on table parsing 22:36
grondilu BenGoldberg: [Coke] nailed it
BenGoldberg r: say $_.gist given foo => "bar"
camelia rakudo 4a608a: OUTPUT«"foo" => "bar"␤»
BenGoldberg r: say $_.Str given foo => "bar"
camelia rakudo 4a608a: OUTPUT«foo bar␤»
colomon .gist versus .Str, I thuink 22:37
BenGoldberg ++[Coke]
colomon doh, beat to the punch!
[Coke] say $foo - calls .gist ; "$foo" - .Str-ifies. the .gist of a .Str is the .Str 22:38
BenGoldberg r: .perl.say for "foo bar baz" ~~ /^ (\S [\S|\h\S]*)+ % [\h\h+] $/ 22:40
camelia rakudo 4a608a: OUTPUT«Match.new(orig => "foo bar baz", from => 0, to => 19, ast => Any, list => ((Match.new(orig => "foo bar baz", from => 0, to => 3, ast => Any, list => ().list, hash => EnumMap.new()), Match.new(orig => "foo bar baz", from => 8, to => 11, ast =…
BenGoldberg [Coke]++ colomon++ (preflex only sees NICK++, not ++NICK) 22:43
corecatcher :q 22:44
hugme hugs corecatcher, good vi(m) user!
diakopter ++BenGoldberg++
corecatcher :(
diakopter what? :D 22:45
22:48 fridim__ joined 22:51 konundra joined
grondilu rn: say my Buf $ .= new: ^10; 22:55
camelia rakudo 4a608a: OUTPUT«Cannot modify an immutable value␤ in method dispatch:<.=> at src/gen/CORE.setting:1145␤ in any at src/gen/Metamodel.nqp:1461␤ in block at /tmp/3t7SjCBEi8:1␤␤»
..niecza v24-88-g1f87209: OUTPUT«Unhandled exception: Cannot call new; none of these signatures match:␤ Mu, *%_␤ at /tmp/gBFI1ogRYl line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4580 (module-CORE @…
grondilu wasn't that the proper syntax for initializing a Buffer?
r: class Foo { my $.name }; my Foo $x .= new: "foooo"; say $x; 22:56
camelia rakudo 4a608a: OUTPUT«Default constructor for 'Foo' only takes named arguments␤ in method new at src/gen/CORE.setting:816␤ in method new at src/gen/CORE.setting:811␤ in method dispatch:<.=> at src/gen/CORE.setting:1145␤ in block at /tmp/IKKvb9BPF_:1␤␤»
grondilu r: class Foo { my $.name }; my Foo $x .= new: name => "foooo"; say $x; 22:57
camelia rakudo 4a608a: OUTPUT«Foo.new()␤»
tadzik yoleaux: any messages for me?
yoleaux 19:06Z <[Coke]> tadzik: github.com/tadzik/perl6-File-Tools/issues/14
grondilu guys? no comment on why 'my Buf $x .= new: @integers' does not work anymore? 23:00
r: say Buf.new: ^10 23:01
camelia rakudo 4a608a: OUTPUT«Buf:0x<00 01 02 03 04 05 06 07 08 09>␤»
grondilu r: say my $ = Buf.new: ^10
camelia rakudo 4a608a: OUTPUT«Buf:0x<00 01 02 03 04 05 06 07 08 09>␤»
grondilu r: say my Buf $ = Buf.new: ^10
camelia rakudo 4a608a: OUTPUT«Buf:0x<00 01 02 03 04 05 06 07 08 09>␤»
grondilu r: say my Buf $ .= new: ^10
camelia rakudo 4a608a: OUTPUT«Cannot modify an immutable value␤ in method dispatch:<.=> at src/gen/CORE.setting:1145␤ in any at src/gen/Metamodel.nqp:1461␤ in block at /tmp/8pKg1hhg8q:1␤␤»
grondilu suspects this is a regression 23:02
benabik r: say my Buf $ .= new(^10)
camelia rakudo 4a608a: OUTPUT«Cannot modify an immutable value␤ in method dispatch:<.=> at src/gen/CORE.setting:1145␤ in any at src/gen/Metamodel.nqp:1461␤ in block at /tmp/k85QiZUVGw:1␤␤»
benabik r: say my Buf $a .= new(^10)
camelia rakudo 4a608a: OUTPUT«Cannot modify an immutable value␤ in method dispatch:<.=> at src/gen/CORE.setting:1145␤ in any at src/gen/Metamodel.nqp:1461␤ in block at /tmp/p8WSlIX9BC:1␤␤»
grondilu I've been using this idiom quite a lot. I guess most of my code is broken now. 23:03
r: class Foo { my @.a; method new(@a) { self.new: a => @a } }; say my Foo $x .= new: ^10; 23:07
camelia rakudo 4a608a: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in method new at /tmp/4s2M9l8kFX:1␤ in method new at /tmp/4s2M9l8kFX:1␤ in method dispatch:<.=> at src/gen/CORE.setting:1145␤ in block at /tmp/4s2M9l8kFX:1␤␤»
grondilu r: class Foo { my @.a; method new(@a) { self.new: :@a } }; say my Foo $x .= new: ^10; 23:08
camelia rakudo 4a608a: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in method new at /tmp/2LkjHpOxnk:1␤ in method new at /tmp/2LkjHpOxnk:1␤ in method dispatch:<.=> at src/gen/CORE.setting:1145␤ in block at /tmp/2LkjHpOxnk:1␤␤»
grondilu :/
why doesn't this work? 23:09
r: class Foo { my @.name; method new($name) { self.new: :$name } }; say my Foo $x .= new: "john";
camelia rakudo 4a608a: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in method new at /tmp/kpuDjCttOX:1␤ in method new at /tmp/kpuDjCttOX:1␤ in method dispatch:<.=> at src/gen/CORE.setting:1145␤ in block at /tmp/kpuDjCttOX:1␤␤»
grondilu r: class Foo { my @.name; method new($name) { self.new: :$name } }; say Foo.new: "john";
camelia rakudo 4a608a: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in method new at /tmp/LnIRRn9e4Z:1␤ in method new at /tmp/LnIRRn9e4Z:1␤ in block at /tmp/LnIRRn9e4Z:1␤␤»
grondilu r: class Foo { my $.name; method new($name) { self.new: :$name } }; say Foo.new: "john"; 23:10
camelia rakudo 4a608a: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in method new at /tmp/mNXNEQvumC:1␤ in method new at /tmp/mNXNEQvumC:1␤ in block at /tmp/mNXNEQvumC:1␤␤»
grondilu damn it
23:11 benabik left
grondilu r: class Foo { my $.name; method new($name) { self.new: name => $name } }; say Foo.new: "john"; 23:11
camelia rakudo 4a608a: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in method new at /tmp/cTo136oWk0:1␤ in method new at /tmp/cTo136oWk0:1␤ in block at /tmp/cTo136oWk0:1␤␤»
grondilu :-(
oh
r: class Foo { has $.name; method new($name) { self.new: name => $name } }; say Foo.new: "john";
camelia rakudo 4a608a: OUTPUT«Not enough positional parameters passed; got 1 but expected 2␤ in method new at /tmp/fSiu69mwTp:1␤ in method new at /tmp/fSiu69mwTp:1␤ in block at /tmp/fSiu69mwTp:1␤␤»
grondilu I guess I need to reread S12 23:12
23:13 benabik joined
grondilu n: class Foo { has $.name; method new($name) { self.new: name => $name } }; say Foo.new: "john"; 23:14
camelia niecza v24-88-g1f87209: OUTPUT«(timeout)»
grondilu n: class Foo { has $.name; multi method new($name) { self.new: name => $name } }; say Foo.new: "john";
camelia niecza v24-88-g1f87209: OUTPUT«Unhandled exception: Cannot call new; none of these signatures match:␤ Foo, Any␤ at /tmp/XfJ6_asQQq line 1 (Foo.new @ 4) ␤ at /tmp/XfJ6_asQQq line 1 (mainline @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4579 (ANON @ 3) ␤ at /home/p6eval/niec…
grondilu r: class Foo { has $.name; multi method new($name) { self.new: name => $name } }; say Foo.new: "john";
camelia rakudo 4a608a: OUTPUT«Foo.new(name => "john")␤» 23:15
grondilu here we go
r: class Foo { has $.name; multi method new($name) { self.new: name => $name } }; say my Foo $ .= new: "john";
camelia rakudo 4a608a: OUTPUT«Foo.new(name => "john")␤»
grondilu r: class Foo { has $.name; multi method new($name) { self.new: :$name } }; say my Foo $ .= new: "john";
camelia rakudo 4a608a: OUTPUT«Foo.new(name => "john")␤»
23:16 sidus left
timotimo r: my @things; push @things[1], 10; say @things; 23:25
camelia rakudo 4a608a: OUTPUT«(Any) 10␤»
timotimo r: my @things; push @things[1], 10; say @things.perl;
camelia rakudo 4a608a: OUTPUT«Array.new(Any, [10])␤»
timotimo r: my @a = 1, 2, 3; say @a.perl; @a = Nil; say @a.perl; 23:26
camelia rakudo 4a608a: OUTPUT«Array.new(1, 2, 3)␤Array.new()␤»
FROGGS github.com/parrot/parrot/issues/889 # comments welcome 23:27
grondilu 'my Buf $ .= new: @a' does not work anymore, is it because Buf is now a role? 23:32
FROGGS I think so 23:33
you can try 'utf8' instead
[Coke] I need something more reliable than "git describe". 23:36
(no names found, cannot describe anything) 23:37
timotimo table parsing is driving me insane :)
[Coke] goes with "git log HEAD^..HEAD"
grondilu r: say my $ = Buf.new: ^10 23:41
camelia rakudo 4a608a: OUTPUT«Buf:0x<00 01 02 03 04 05 06 07 08 09>␤»
grondilu ^so I guess this is the new correct syntax?
why making it a role anyway? 23:46
23:50 lowpro joined
grondilu notices that in t/spec/S32-io/spurt.t there is a 'my Buf $buf = Buf.new(...' and he doesn't like the fact that we have to repeat the word Buf in such an initialization. 23:51
I very much preferred 'my Buf $ .= new: ...'