Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-07-18

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 jordman joined #perl6
00:24 jordman joined #perl6
00:36 vendethiel joined #perl6
00:58 mtj_- joined #perl6
01:01 colomon joined #perl6
01:09 BenGoldberg joined #perl6
01:11 llfourn joined #perl6
01:19 rmgk_ joined #perl6
01:22 mtj_ joined #perl6
01:34 telex joined #perl6
01:39 Ben_Goldberg joined #perl6
02:08 noganex joined #perl6
02:10 leedo joined #perl6
02:16 raiph joined #perl6
02:24 AlexDaniel how can I print to stderr? Cannot find it
02:26 geekosaur note "foo", or printing to *ERR (IIRC)
02:26 AlexDaniel note :o
02:27 geekosaur it's the level below "warn" :)
02:27 AlexDaniel geekosaur: thanks
02:30 cognominal joined #perl6
02:37 PerlJam m: note "This goes to stderr"
02:37 camelia rakudo-moar 48c0ba: OUTPUT«This goes to stderr␤»
02:37 PerlJam oh, /me needs to read faster and scroll down more
02:38 average joined #perl6
02:38 average https://github.com/jaffa4/Dependency-So​rt/blob/master/lib/Dependency/Sort.pm6
02:38 average guys...
02:38 average what happened there ?
02:39 average i looked at the source of that.. i was like "wow, I never thought topological sorting could be sooo complicated"
02:39 average am I just stupid or is that code convoluted ?
02:40 PerlJam no, you're not stupid :)
02:40 jercos well it is...
02:40 average hm
02:40 jercos m: (1+2i, 1+1i, -1+1i).sort
02:40 camelia rakudo-moar 48c0ba: ( no output )
02:40 jercos m: (1+2i, 1+1i, -1+1i).sort.say
02:40 camelia rakudo-moar 48c0ba: OUTPUT«-1+1i 1+1i 1+2i␤»
02:40 jercos sort of Complex
02:41 average https://webdocs.cs.ualberta.ca/~contest/​code/Old/Graph_Theory/topological_sort.c
02:41 average topo_dfs
02:41 average it's not big
02:41 average and it looks ok, people can understand it
02:41 average compare that to Sort.pm6 above..
02:41 average something seems wrong
02:42 PerlJam average: http://irclog.perlgeek.de/p​erl6/2015-07-17#i_10914788
02:43 average PerlJam: i see, so i'm not the first one to notice this
02:43 average "the fun part of the topo sort on p6 modules is taking into account multiple package names inside the same file"
02:44 average "otherwise you end up coloring the same module multiple times while inside a single file"
02:44 average i don't find that fun .. honestly
02:44 average ugexe: ^^
02:44 average I would be scared to work on things where people would define "fun" like this ^^
02:45 PerlJam fun == challenging == non-obvious == makes you stretch your brain
02:46 average well yes
02:46 average so my thoughts on that are
02:46 average there is sufficient complication where it can't be avoided. if you add unneeded complication, things will undoubtedly get out of hand.
02:48 llfourn joined #perl6
02:48 PerlJam average: are you going to send jaffa4 a PR for a better topo sort?  :)
02:53 raiph joined #perl6
02:57 AlexDaniel m: say 'test' loop;
02:57 camelia rakudo-moar 48c0ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nUjh0zvIDR␤Two terms in a row␤at /tmp/nUjh0zvIDR:1␤------> 3say 'test'7⏏5 loop;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        st…»
02:57 AlexDaniel hmmm
02:59 AlexDaniel it is kinda weird that you can put "for" on the right side but can't do the same thing with "loop"
02:59 AlexDaniel not too weird though
03:01 PerlJam Why is that weird?
03:01 average presumably AlexDaniel is refering to consistency of features that basically do the same thing ("for" and "loop")
03:02 AlexDaniel average: yep
03:02 aborazmeh joined #perl6
03:02 aborazmeh joined #perl6
03:02 PerlJam That would be a foolish consistency IMHO.
03:02 average PerlJam: why ?
03:02 AlexDaniel "foolish consistency" :)
03:03 AlexDaniel wasn't it "strangely consistent"
03:04 AlexDaniel average: well, that would mean that you are allowed to write stuff like: say 'test' loop (my $i = 0; $i <= 5; $i++);
03:04 geekosaur there's strangely consistent, and there's the hobgoblin of little minds... :)
03:04 PerlJam average: firstly, it doesn't read well.  secondly, there's a reason the C-style loop isn't called "for" anymore; it's because they more different than the same.
03:05 PerlJam but ... if TimToady disagrees, I'll happily accept a loop statement modifier.  :)
03:07 PerlJam average: and thirdly, it makes the logic more convoluted.
03:08 PerlJam .oO( The initializer comes *after* the body of the loop?  Crazy! )
03:08 average http://design.perl6.org/S04.ht​ml#The_general_loop_statement
03:08 average loop ($i = 0; $i < 10; $i++) { }
03:09 average loop {...}
03:09 jack_rabbit joined #perl6
03:09 average loop (;;) {...}
03:09 average these are the 3 forms of loop that I was able to find
03:09 average the 1st and 3rd are the same as the C-style loop "for"
03:09 average the 2nd one seems pretty much the same as the 3rd one
03:10 average while(1) {}  would do the same thing as 2nd and 3rd
03:10 average (in C)
03:10 PerlJam no, that would error :)
03:10 average what would the error be ?
03:11 PerlJam m: while(1) { say "hi" }
03:11 camelia rakudo-moar 48c0ba: OUTPUT«5===SORRY!5===␤Word 'while' interpreted as 'while()' function call; please use whitespace instead of parens␤at /tmp/zF33atdhaJ:1␤------> 3while7⏏5(1) { say "hi" }␤Unexpected block in infix position (two terms in a row)␤at /tmp/zF33atdha…»
03:11 AlexDaniel ...
03:11 average m: while 1 { say "hi" }
03:12 PerlJam that one is fine.
03:12 camelia rakudo-moar 48c0ba: OUTPUT«(timeout)hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi​␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi​␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi​␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi␤hi…»
03:12 AlexDaniel you can also just put a whitespace in between
03:13 average I'm still wondering what the killer-features of Perl6 are
03:13 average it's due for official release at the end of the year
03:13 AlexDaniel average: grammars and multiple dispatch?
03:14 average I'm an foolishly a 'very' polyglot programmer. I would like to use Perl6, but I'm just not sure where the advantage would be. What can I leverage it for ?
03:15 average multiple dispatch is already present in mainstream languages https://en.wikipedia.org/wiki/Multiple_dispatch
03:15 average the grammars are already covered by bison/lex/antlr/lemon/spirit
03:16 PerlJam Perl has always taken the best ideas and combined them into "one" language.
03:16 average somehow, i'm not sure how Perl6's grammars compare to the industrial-grade ANTLR
03:17 average claiming "the best ideas" is kindof demanding proof
03:18 amurf joined #perl6
03:18 AlexDaniel multi foo(Str $ where 'somestring')  { ‘is it true that mainstream languages can do this?’ }
03:18 AlexDaniel that is, subtypes
03:19 PerlJam AlexDaniel: what's a "mainstream language"?
03:19 PerlJam I mean, Haskell can do that with ease.  Is haskell mainstream?
03:19 AlexDaniel PerlJam: I don't know, I just quoted him
03:19 average PerlJam: I think Haskell is more popular than Perl6
03:19 average sorry, AlexDaniel ^^
03:19 PerlJam average: could be.
03:19 AlexDaniel average: true
03:19 average AlexDaniel: and there are other mainstream languages that can pull that off
03:20 AlexDaniel average: just wondering, which ones?
03:20 AlexDaniel average: because I've never actually seen that in some real code, maybe I'm just blind
03:20 average what does that method do ?  if the parameter has "somestring" in it, then that method is selected to be used ?
03:21 average foo("ABC somestring DEF");
03:21 average that would call the method
03:21 average but
03:21 average foo("");
03:21 average what would that call ? ^^
03:21 AlexDaniel foo('somestring') will call that, everything else wont
03:21 average would that cause an error ?
03:22 average foo("");
03:22 AlexDaniel depends on other signatures
03:23 average well, imho you can do that sort of thing easily in C++ .. and the check for 'somestring' can be part of the function body, it doesn't have to be in the declaration.
03:23 average i don't find multiple dispatch as a killer feature
03:23 average for grammars, it's very hard to beat a production & industrial-grade parser generator such as ANTLR
03:23 AlexDaniel m: multi foo(Str $ where 'somestring') { 'hi' }; multi foo(Str $) { 'hello' }; say foo 'somestring';
03:23 camelia rakudo-moar 48c0ba: OUTPUT«hi␤»
03:23 AlexDaniel m: multi foo(Str $ where 'somestring') { 'hi' }; multi foo(Str $) { 'hello' }; say foo 'somestring111';
03:23 camelia rakudo-moar 48c0ba: OUTPUT«hello␤»
03:24 AlexDaniel multi foo(Str $ where 'somestring') { 'hi' }; multi foo(Str $) { 'hello' }; say foo 25;
03:24 average not sure how much people were inspired by ANTLR when they wrote Perl6's grammars..
03:24 AlexDaniel m: multi foo(Str $ where 'somestring') { 'hi' }; multi foo(Str $) { 'hello' }; say foo 25;
03:24 camelia rakudo-moar 48c0ba: OUTPUT«Cannot call foo(25); none of these signatures match:␤    (Str $ where { ... })␤    (Str)␤  in block <unit> at /tmp/9XP9J527NL:1␤␤»
03:25 average to me, Haskell and Ocaml seem like the bleeding edge of language design
03:26 average Perl6 does not seem to be in that vein
03:26 PerlJam weird
03:26 AlexDaniel average: well, then you can use assembly and write any feature yourself, why not
03:26 PerlJam why does haskell or ocaml seem like the bleeding edge to you?
03:27 average PerlJam: Haskell has something I've always wanted
03:27 PerlJam which is?
03:27 average PerlJam: you can properly represent abstract data structures in it
03:27 average you will never be able to do that in Perl5
03:27 average I doubt(but I may be wrong) that you can do that in Perl6
03:28 average Ocaml can do it too
03:28 PerlJam I haven't thought much about it, but I'm pretty sure you're wrong about Perl 6  :)
03:29 average can you represent a group in Perl6 properly ?
03:29 average the group from group theory
03:29 average with identity element
03:29 average all the axioms
03:30 AlexDaniel I haven't thought much about it too, but is there any reason why this should be baked into the language?
03:31 average yes
03:31 average Perl6 has types, that's a great advancement from Perl5
03:31 average Perl5 is basically shit, excuse my french but.. yeah. It's great for scripts but beyond that it's just crap.
03:31 average Perl6 actually has types
03:31 PerlJam Perl 5 hs types too.  They're on CPAN and come in all sorts of shapes and sizes.  :)
03:32 average when you get types, you start thinking about type safety and "if i pass this thing there, will it break" and that sort of thing
03:32 AlexDaniel average: not that you have to use them
03:32 AlexDaniel m: multi foo($ where 'somestring') { 'hi' }; multi foo($) { 'hello' }; foo 'somestring';
03:32 camelia rakudo-moar 48c0ba: ( no output )
03:33 AlexDaniel m: multi foo($ where 'somestring') { 'hi' }; multi foo($) { 'hello' }; foo 'somestring';
03:33 camelia rakudo-moar 48c0ba: ( no output )
03:33 AlexDaniel oops
03:33 PerlJam AlexDaniel: often you *Want* to use them though.
03:33 AlexDaniel m: multi foo($ where 'somestring') { 'hi' }; multi foo($) { 'hello' }; say foo 'somestring';
03:33 camelia rakudo-moar 48c0ba: OUTPUT«hi␤»
03:34 AlexDaniel PerlJam: and often I don't. That's why I like gradual typing
03:34 PerlJam yeah. me too.
03:34 average I really think the world is converging in the direction of Haskell/Ocaml
03:35 average they're almost mainstream
03:35 average but not quite..
03:35 average the hype is there but the talent is not
03:35 average the risk and time investment for someone learning Haskell/Ocaml is high
03:35 average the reward is sketchy and hard to estimate
03:35 average in terms of money
03:36 average in terms of personal knowledge it's high
03:36 PerlJam well, like anything, you learn new concepts that you might be able to apply in other languages.
03:36 average if I knew Haskell/Ocaml really well, I would definitely use them in projects
03:38 average PerlJam: I would argue that learning certain concepts in the wrong language is extremely harmful
03:38 average for example threads. learning them in Perl5 is a huge waste of time and prone to huge misunderstandings
03:38 PerlJam yep, I'll voilently agree with you there :)
03:39 average even sockets
03:39 PerlJam of like learning OOP in C++ and then get exposure to smalltalk or java.  You'll have lots of things to unlearn.
03:39 PerlJam s/of/or/
03:42 average C++ and Java, yes there are things to unlearn, but not that many. Generally, the best decision is to stick to one.
03:42 average If you're at some interview and you're sketchy about operator precedence
03:42 average or the exact details of how polymorphism works in C++/Java(depending on the type of job)
03:43 average that's like the language foundation
03:43 average if you mess that up.. then.. yeah, your investment in that language is pretty much s**t i would say
03:43 average you've basically lost all your time for nothing
03:43 average I don't know of anyone writing smalltalk to be honest
03:44 average except for Randall Schwartz who can do whatever he wants with his prestige and charisma
03:44 average like "I'm Randal and I write in smalltalk for a living" . Yeah right, because you're Randall and you have I dunno how many books published, everyone knows you and you're really popular.
03:44 geekosaur smalltalk is mostly the domain of business applications
03:45 average the guy could write in COBOL and he'd still be fine.
03:45 geekosaur although it's being replaced by java, slowly
03:45 geekosaur IBM was heavily into smalltalk for business apps
03:45 geekosaur but people never see that side of IBM
03:45 TEttinger operator precedence: if you honestly rely on knowing every detail of this and hope someone can read your code without your gracing them with explicit grouping, you should not be hired
03:46 average TEttinger: trust me..
03:46 average tests are tests
03:46 TEttinger readability is more important than rote memorization
03:46 average you give a test, you get 3 operator precedence questions
03:46 average and there are 100 candidates
03:47 average you fail maybe 2 more questions, that you also consider to be worthless because of their low importance
03:47 average you will fail the test
03:47 average you will not get the job
03:47 average #epicfail
03:47 AlexDaniel but you will get a better job
03:47 average how do you know ?
03:48 average btw all online tests for pretty much all languages have operator precedence questions in them
03:48 average and not just online tests
03:48 average real-life job interviews have them too
03:49 AlexDaniel well, maybe not, but at least you will not be working in a group of freaks who feel that it's ok to leave parens out everywhere...
03:50 TEttinger fine, in java what will this return: 013 << 2 & 16
03:50 average i have no idea
03:50 average i would fail that test
03:50 average 013 is octal iirc
03:50 TEttinger it's a very very tricky question.  the answer is 0 but you'd expect 1
03:50 TEttinger yes
03:51 TEttinger that's why
03:51 average 013 << 2 is   013 * (2^2)
03:51 TEttinger & goes last yep
03:51 average & 16 is the last 5 bits of that number
03:51 TEttinger err yes not 0 and 1
03:51 TEttinger the answer is 0 but you'd expect 16
03:51 TEttinger and no
03:51 TEttinger not the last 5 bits
03:52 average which bits then ?
03:52 TEttinger it's only the 5th bit
03:52 average oh, you're right
03:52 average last 5 would've been & (2^5 - 1)
03:52 TEttinger and if you have to program with people who don't document that stuff you will at least wish you weren't hired
03:52 AlexDaniel TEttinger: I'd say that this code will return a new git commit
03:52 PerlJam "operator precedence" is not deep knowledge.  I wouldn't care if someone didn't get that stuff right unless they claimed to live and breathe the language.
03:53 TEttinger yeah, deep knowledge of Java is horrible stuff like design patterns
03:53 TEttinger AbstractSingletonFactoryBean
03:53 geekosaur (btw, IBM's policy of playing the Smalltalk card very close to its chest is why it's switching to Java; they finally realized that they screwed themselves, because there are no Smalltalk programmers to be had as a result...)
03:53 geekosaur s/its/their/
03:54 average geekosaur: I wonder if IBM really thinks of it as a tragedy
03:54 average i think IBM is basically making money at an inconceivable pace
03:54 ShimmerFairy This is incidentally why I'm not a fan of the "superstitious parens" idiom that floats around Perl 6; making it clear what your code does is incredibly useful, and to me more important that minimizing the number of parens you use.
03:54 average so high that they couldn't care less about what language Smalltalk dies or which one survives
03:54 geekosaur to the extent that they can't find Smalltalk programmers to maintain business apps any more, yes
03:55 PerlJam ShimmerFairy: unless the parens happen to change the meaning of the code, I agree with you :)
03:55 geekosaur no, they do care. because the companies they peddled it to are not happy to pay IBM the big bucks --- and these companies very much ARE the big bucks for IBM --- if IBM cannot maintain their code
03:55 average IBM can probably rewrite everything they have in whatever other language they want
03:55 average in comparison however
03:55 geekosaur ...
03:55 TEttinger deep knowledge of Java also may encompass really nasty stuff depending on what company you're working with, like the crypto APIs that it doesn't even ship with by default
03:55 average the risk is much higher for the programmer in relation to which technologies he learns
03:55 average the risk is extremely high actually
03:56 geekosaur you've never encountered change control in a Fortune 50, I see
03:56 ShimmerFairy PerlJam: that's what they're supposed to do :P  I just don't like when someone cries out "superstitious parens!!" in stuff like  2 + (3 * 5)  , as a simple example.
03:56 average that's why Perl5 programmers today should get paid tons of money
03:56 average because nobody wants to touch Perl5
03:56 average except there are also few Perl5 jobs
03:56 * PerlJam notes that IBM was the company touting ASCII *and* EBCDIC platforms simultaneously in the 1960s
03:56 average and if you're living where I live(Romania), Perl5 are not only scarce, but they also have very very shitty salaries
03:56 average like extremely shitty salaries
03:57 average and they're those kinds of outsource projects led by Indian managers
03:57 average *outsourced
03:57 ShimmerFairy PerlJam: IBM _still_ is very invested in EBCDIC systems, judging by their complaining at C++ removal of trigraphs (finally, geez)  :)
03:58 * geekosaur points up at remark about change control
03:58 PerlJam ShimmerFairy: that might just be because of all the legacy systems out there still using EBCDIC
03:58 geekosaur seriously, most programmers "out here" have no conception of how it works there. or how much money is involved in it
03:58 average 06:56 ( geekosaur) you've never encountered change control in a Fortune 50, I see
03:58 average geekosaur: maybe expand on the change control ?
03:59 geekosaur let me put it this way: it's why IBM still needs to worry about EBCDIC
03:59 average because it's too expensive to rewrite all the s*it in order to get rid of EBCDIC ?
03:59 geekosaur they are not going to replace existing systems just because EBCDIC is inconvenient
03:59 PerlJam ShimmerFairy: I mean ... there are tons of financial institutions and at least one big blue company that still has to worry about finding COBOL programmers too  :)
03:59 geekosaur the amount of changes and resulting downtime is, yes
04:00 ShimmerFairy PerlJam: yeah, that's what it is, legacy stuff.
04:00 geekosaur there is legacy stuff. a lot of it. and it's not going ANYWHERE
04:00 ShimmerFairy But as far as I'm concerned, if you're still running a system that can't handle basic ASCII characters, it's your own fault.
04:00 geekosaur as long as it works
04:01 * geekosaur has only been on the outermost periphery of that world, but has some understanding of how it works. and that it flat out does not care about your opinions of how the world should work
04:01 geekosaur it works its way
04:04 PerlJam There was a federal computer system that I had to login to download data from.  The only interface was via modem.  Later, that system got put on the internet.  They just hooked a serial cable from the original system to another such that you could now telnet and get the same stuff as you would via modem.
04:04 PerlJam That old system did its job and kept running.  It may still be running now for all I know.
04:05 PerlJam "If it ain't broke, don't fix it"
04:06 PerlJam (though, I had a contract with a federal agency last year to convert a mass of fortran code to java because they apparently were already having trouble finding fortran programmers to maintain it)
04:08 * average wonders how that Fortran job went
04:09 PerlJam it went well.  They want to do it again (but this time with VB code).  They're standardizing on Java I guess.
04:13 PerlJam The most frustrating thing about the fortran project was that none of the people I was in contact with were the actual users of the code, so I would ask them stuff and they would say things like "we'll have to get Bob to weigh in on that" only Bob wasn't ever around.
04:13 average sod id you automate your Fortran -> Java conversion in some way ?
04:14 average Bob was dead
04:14 average or retired
04:14 average or had died in fires
04:14 PerlJam Sure ... I had a student worker hand convert the code.  It was completely automated for me :)
04:14 average really ? interesting
04:14 average so .. what did you _do_ for that job ?
04:14 average were you a manager ?
04:15 PerlJam But I did write a little test framework so that we could make sure that the java subroutines did the same thing as the equivalent fortran subroutines.
04:16 PerlJam yeah, I was a "manager".  I wrote the test stuff, I communicated quite a bit, and I wrote a good bit of a report
04:16 average I should definitely try to get out of the whole programming thing
04:16 average sounds like nobody wants to do it these days
04:16 PerlJam actually, I'd like to do more programming and less ... non-programming.  It's fun.
04:18 coffee`_ joined #perl6
04:36 vendethiel joined #perl6
04:53 kaare_ joined #perl6
05:07 amurf joined #perl6
05:07 dalek rakudo-star-daily: 23fd793 | coke++ | log/ (8 files):
05:07 dalek rakudo-star-daily: today (automated commit)
05:07 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/23fd793618
05:07 dalek perl6-roast-data: 6002473 | coke++ | / (9 files):
05:07 dalek perl6-roast-data: today (automated commit)
05:07 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/6002473eea
05:17 atroxaper joined #perl6
05:34 Woodi hallo #perl6 :)
05:35 Woodi first: I don't think Beans counts as design patter
05:36 Woodi second: Go4 book have overmhelming (for me) amount of Smalltalk examples...
05:39 Woodi third: design patterns are not something that born with Java... rather they are "patterns" _discovered_ in real code. somewhere before 1998... it's exactly like with algoritms: Hey, I saw that sequence of actions before, hmm... Yeah, it's a pattern there!
05:40 Woodi anyone considers algos harmful ?
05:56 vendethiel joined #perl6
05:58 diana_olhovik_ joined #perl6
06:12 szabgab joined #perl6
06:13 szabgab hi
06:14 szabgab when loading a module with  "use" is perl6 calling any 'import' function implemented in the module ?
06:14 cognominal joined #perl6
06:24 FROGGS joined #perl6
06:27 lizmat timotimo++   # P6W
06:33 lizmat szabgab: if this just about exporting subs, mark the subs with the "is export" trait
06:36 vendethiel joined #perl6
06:53 nebuchadnezzar joined #perl6
06:56 dalek joined #perl6
07:04 Mhoram joined #perl6
07:12 ilogger2 joined #perl6
07:13 ilogger2 joined #perl6
07:19 rurban joined #perl6
07:41 vendethiel joined #perl6
08:04 darutoko joined #perl6
08:26 jaffa4 joined #perl6
08:27 jaffa4 hi all
08:27 jaffa4 How can I see an understandable mar assembly of a Perl6 code?
08:32 RabidGravy joined #perl6
08:35 FROGGS jaffa4: moar --dump Foo.moarvm
08:36 atroxaper joined #perl6
08:37 szabgab joined #perl6
08:38 szabgab it is about some custom code Bailador has in its import function https://github.com/tadzik/Bailado​r/blob/master/lib/Bailador.pm#L11
08:38 szabgab currently AFAIK I need to run Bailador::input() after  use Bailador   for that to run
08:41 FROGGS szabgab: yes, I think I had to call import too in my app
08:42 szabgab FROGGS: do you have a Bailador based app? Can you give the URL?
08:45 amurf joined #perl6
08:51 espadrine_ joined #perl6
08:51 FROGGS szabgab: https://github.com/perl6/cpandates​ters.perl6.org/blob/master/app.pl
08:52 FROGGS szabgab: though that is not used anymore, since we generate static html pages for performance reasons
08:55 masak good antenoon, #perl6
08:57 FROGGS o/ masak
08:57 nine PerlJam: why would we not want daemons written in Perl 6 to make life easier to their users by allowing to differentiate them in ps output? I see absolutely no reason to forbid changing $*PROGRAM-NAME while it has been used for good many times.
08:57 szabgab FROGGS: may I add it to the readme of https://github.com/tadzik/Bailador ?
09:00 spider-mario joined #perl6
09:03 masak I'm with nine on this one.
09:04 masak (which also means I did the right thing in my case, assigning to a new variable and using/changing that)
09:11 * masak reads the night's backlog with average
09:12 RabidGravy on Linux at least you could make something with pthread_setname_np without troubling the core
09:13 jaffa4 masak: what is the current direction of development?
09:13 masak jaffa4: the... direction? definitely forwards, I'd say. :)
09:14 jaffa4 What is being improved in general?
09:14 masak well, I wrote quite a lot of Perl 6 yesterday.
09:14 masak it was for a script at $work. so that got improved quite a lot.
09:14 jaffa4 Who uses Perl6 now?
09:15 masak me!
09:15 masak little known secret: they made this language so that masak can use it. other people can use it too, because masak is nice that way.
09:17 masak jaffa4: if you're asking what currently happening in Rakudo space wrt development, may I recommend https://p6weekly.wordpress.com/ ?
09:17 masak jaffa4: and https://6guts.wordpress.com/
09:18 masak jaffa4: but, in short, GLR is happening (in fits and starts), and compact arrays are happening. a lot of bugs are getting fixes.
09:19 RabidGravy I spent all day writing perl6 yesterday, a little patch here, a fix there.  I did conclude one thing - I'm going to invent a terminator and send it back in time to off the person who though chunked transfer encoding was a good idea
09:19 masak ah, chunked transfer encoding.
09:19 masak been there, done that :)
09:19 RabidGravy hopefully it works proper in HTTP::UserAgent now
09:20 bjz joined #perl6
09:21 masak is it the kind of thing where a Unicode character may end up straddling two chunks? is there a test for that?
09:23 nine For me the answer to the P6 killer feature question is definitely, that you won't find anything radically new in Perl 6, but you get all those nice features of other languages in a cohesive whole. Except maybe the builtin ability to evolve. You won't need to invent a new language for the new killer feature. You can add it to Perl 6.
09:23 jaffa4 compact arrays? How does it dffer from normal arrays?
09:23 masak jaffa4: they use natives as their representation, so they take up very little space.
09:24 nine jaffa4: compact arrays are like the ones you find in C or Pascal.
09:24 jaffa4 you mean it is an optimisation
09:24 masak a space optimization, yes. and slightly faster, too, I guess.
09:24 jaffa4 of arrays
09:24 masak jaffa4: something like my `my int @measurements[100;100]`
09:25 RabidGravy and I guess making crossing the P6 - native barrier easier without so much copying
09:25 masak jaffa4: allocates 10_000 ints for you in memory.
09:25 jaffa4 So it happends only when you specify type
09:25 masak jaffa4: yes.
09:25 masak nine: I think you are right about lack of killer feature. and I think that's OK.
09:26 masak nine: there are many things (like junctions and metaops) that pull you in and make you go "whoooooa" at the start
09:26 masak nine: but then they sort of fade into the background as you start using the language for real
09:27 masak nine: and you kind of notice that any production code is always 99% ordinary statements and conditionals and loops and subs and methods and classes, just like in other languages
09:27 RabidGravy remember it's not a proper language until someone writes a mailling list manager
09:27 jaffa4 IS this going to work for all backends?
09:27 masak nine: and that's not, mind you, because you're *doing it wrong* and should put more metaops and junctions in your production code
09:28 masak nine: it's because you're responsible and using the right tool for the job
09:28 masak nine: (also, in the remaining 1%, you're very happy to have those junctions and metaops)
09:28 masak jaffa4: if by "all backends" you mean MoarVM and the JVM, then yes.
09:28 domidumont joined #perl6
09:29 masak RabidGravy: I wonder how the MVP for a mailing list manager would look.
09:29 RabidGravy 'orrible - they always look 'orrible ;-)
09:30 virtualsue joined #perl6
09:30 masak :)
09:30 RabidGravy maybe I'll knock one up next week, not that many yaks to shave
09:32 * masak .oO( no, don't knock up a yak! )
09:32 jaffa4 what about parrot?
09:33 masak jaffa4: what about it?
09:33 masak jaffa4: it doesn't have any developers.
09:35 domidumont joined #perl6
09:38 RabidGravy I think I made some patches to parrot in like 2002-3
09:39 masak the last commit on the Parrot repo was the release last month. June 15.
09:42 masak jaffa4: pmichaud explains it better than I can: http://pmthium.com/2015/02​/suspending-rakudo-parrot/
09:42 RabidGravy does someone with commit on panda want to take a look at https://github.com/tadzik/panda/pull/184
09:42 RabidGravy right now gen-meta no worky
09:44 masak reading through the git log of Parrot, I realize that I made an unfair exaggeration saying the project doesn't have any developers.
09:44 masak it has one.
09:46 RabidGravy :)
09:47 masak or did, back in January.
09:48 RabidGravy is it every likely to catch up again?
09:49 masak anything's possible, I guess.
09:49 masak likely? not for me to say.
09:53 vendethiel joined #perl6
09:56 masak ShimmerFairy: please don't take the "superstitious parens" thing as a put-down. the point is exactly that it isn't wrong to put them in, just... slightly redundant.
09:56 ShimmerFairy masak: I've always read it as a pejorative sort of thing, though.
09:57 masak ShimmerFairy: so the comment is less meant as "you're doing it wrong!" and more as "hey, you could've saved yourself some trouble there, because the language already does that for you"
09:57 masak ShimmerFairy: I would probably suggest the same if someone injected, say, redundant statements or redundant class declarations into their code.
09:57 masak so it's less about parens and more about redundancy.
09:59 ShimmerFairy I think it's the use of the word "superstitious" that makes it sound very negative to me.
10:02 masak well, superstitions are patterns of behavior that people have picked up that don't have any measurable effect on the world.
10:02 masak that's what those parentheses do, too.
10:06 ShimmerFairy masak: well, 1) when they help with readability that's not exactly "don't have any measurable effect", and 2) you can't make me see the word "superstition" differently :P . If I had been the one to coin the term, I would've gone with "unnecessary parens" or something.
10:06 masak Woodi: [backlog] of course Bean counts as a design pattern. it's just not a very good one :P
10:14 nine masak: yes, most code really is just boring and that's a good thing :) Most of the magical possibilities of Perl have historically been used by module authors to provide neat interfaces for their specific domains. Those are then just used by mortal programmers.
10:16 xinming joined #perl6
10:16 nine masak: a bit of it I've already used in Inline::Perl5. My users don't even have to know what magic I used. But I for sure am very glad that it's there when I need it :)
10:17 RabidGravy yeah, if you're forced to do "magic" in a script someone has done something wrong
10:19 masak nine: that's a nice way to view it. power features are double-edged swords. in the long run, they should be encapsulated, contained. their destructive power is too great.
10:20 masak kind of like the Infinity Stones in Guardians of the Galaxy.
10:20 RabidGravy :)
10:22 llfourn joined #perl6
10:22 RabidGravy it's like the thing about people wanting feature X in the language where in fact for the most part with a sufficiently cunning implementation it could be just in the ecosystem
10:25 RabidGravy I often find myself thinking when I'm doing something particularly black art-ish whether it has more general applicability and be released seperately
10:25 RabidGravy which is how e.g. AccessorFacade failed
10:26 masak AccessorFacade?
10:26 RabidGravy er s/failed/came about/
10:26 RabidGravy https://github.com/jonathanstowe/AccessorFacade
10:27 masak aha.
10:29 RabidGravy rule of three innit ;-)
10:30 masak heh.
10:30 masak I had a piece of code I was working on where I went, "hm, this feels like maybe it could be generalized into a template system and packaged up as a module..."
10:30 masak *looks at code*
10:30 masak "...no." :)
10:30 RabidGravy (or in this case rule of thirty)
10:31 Ulti ShimmerFairy what about parens which dont make sense mathematically regardless of precedence like 1 + ((2 - 3) + 5) I see that all the time and if it's variables rather than constants it just makes me wonder wtf is in the variable and if the operators are overloaded, like in JS (blah + foo) - 2 could be string concatenation then -2 off of the interp number
10:31 masak RabidGravy: with goodenuf macros, I could see how you could just name the subs consistently, and the macro would hook them up on its own.
10:33 RabidGravy my brane rebels against magic naming thingies - for myself I actually prefer the explicitness (in this case) of the traits
10:33 Ulti ooc with those parens would the Perl 6 compiled code be the same with and without?
10:39 timotimo i thought you'd usually only get told "superstitious parens!" when you do something like if ($condition) { ... } in perl6
10:42 nine timotimo: #perl6 sometimes gives more strict warnings ;)
10:42 itz I want to experiment with evaling rakudo in a browser (probably server-side rather than a JS VM).  Is anyone aware of a more recent attempt than http://www-stud.rbi.informatik.uni-​frankfurt.de/~cgaertne/try-rakudo/ ?
10:43 masak itz: pmurias++' work
10:44 itz that uses a JS backend doesn't it?
10:44 Ulti itz https://github.com/moritz/try.rakudo.org ?
10:45 itz ah
10:46 Ulti I tried to get the wheels turning on that a year ago but gave up without really trying very hard
10:47 itz ok I'll fork and try booting the engine
10:48 diana_olhovik joined #perl6
10:49 jaffa4 Is there a way to see generated jit code?
10:49 timotimo the last attempt i did at this thing was when proc::async was still pretty shaky
10:49 virtualsue joined #perl6
10:49 timotimo jaffa4: yes, check out moar --help for environment variables you can set for that purpose
10:50 Ulti itz there is also Farabi6 which is an editor but it does have a repl server
10:51 itz ah
10:56 timotimo right, farabi6 is a good target for some love from additional developers :)
11:00 Woodi RabidGravy: thing like AccessorFacade could be used to construct native objects when CPointer is a *struct :)
11:04 jaffa4 Current Rakudo start windows does not work for me
11:04 jaffa4 I cannot install anything
11:07 RabidGravy left #perl6
11:07 RabidGravy joined #perl6
11:09 RabidGravy Woodi, indeed
11:16 itz wow farabi is rather impressive
11:16 camelia joined #perl6
11:18 itz azawawi++
11:30 jaffa4 WHat is sync context?
11:34 masak jaffa4: a made-up term?
11:36 jaffa4 sink context
11:36 masak jaffa4: sink context is when the value of an expression is not used.
11:37 masak jaffa4: like, `my $x = foo();` -- here `foo()` is *not* in sink context.
11:37 masak jaffa4: but in `foo(); 1`, it is.
11:37 jaffa4 so why do you keep track of sinc context if it is not used?
11:37 masak you mean "zink context".
11:38 masak jaffa4: well, things have different behavior in or out of sink context.
11:38 masak jaffa4: also, an optimizer could sometimes avoid doing a extra work (creating objects, etc) that then just gets thrown away.
11:39 jaffa4 it does not happen often
11:39 masak oftener than you'd think.
11:39 masak `for` loops tend to be in sink context, for example.
11:39 jaffa4 SO can you give me a typical example?
11:40 masak I thought I just did above?
11:40 masak what specifically do you want?
11:40 jaffa4 for for, where is the sink?
11:41 RabidGravy I think what is meant that "for" is a statement that has a return value, but it rarely gets used
11:42 RabidGravy anyway off out
11:42 masak jaffa4: for more information, read "Loops at the statementlist level vs the statement level" in S04.
11:42 jaffa4 you mean last statements in blocks and loops
11:44 masak m: do { say "A"; last; say "B" }
11:44 camelia rakudo-moar 48c0ba: OUTPUT«A␤last without loop construct␤  in block <unit> at /tmp/aBngaOgIG7:1␤␤»
11:44 masak TimToady: S04 says "C<do> is considered a one-time loop" -- is that a fossil? that's not how I think of `do` these days.
11:45 masak TimToady: S04:703
11:45 synbot6 Link: http://design.perl6.org/S04.html#line_703
11:47 flussence m: { say "A"; last &?BLOCK; say "B" }
11:47 camelia rakudo-moar 48c0ba: OUTPUT«A␤Cannot call last(Block); none of these signatures match:␤    ()␤    (Label:D \x)␤  in block <unit> at /tmp/TksmCUYIa1:1␤␤»
11:47 flussence m: do { say "A"; last &?BLOCK; say "B" }
11:47 camelia rakudo-moar 48c0ba: OUTPUT«A␤Cannot call last(Block); none of these signatures match:␤    ()␤    (Label:D \x)␤  in block <unit> at /tmp/p0hY84PljB:1␤␤»
11:47 flussence -ETRYINGTOBETOOCLEVER
11:48 masak it wants a label, not a block.
11:48 masak m: FOO: do { say "A"; last FOO; say "B" }
11:48 camelia rakudo-moar 48c0ba: OUTPUT«A␤No exception handler located for last_label␤␤»
11:48 masak m: FOO: do { say "A"; leave FOO; say "B" }
11:48 camelia rakudo-moar 48c0ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/fshKCdCh1Z␤Undeclared routine:␤    leave used at line 1␤␤»
11:48 masak oh... I thought we had leave now. still in a branch?
11:49 flussence .oO( perl6 is one of the very rare languages where I have a decent success rate trying crazy things like that )
11:49 masak flussence: well, it does make some sense what you tried to do.
11:49 masak flussence: but even if it worked with the block/label confusion, it would still fail (IMO) because `do` is not a loop.
11:50 flussence "leave" is closer to what I meant, thinking about it...
11:50 masak aye.
11:50 flussence m: do { say "A"; &?BLOCK.leave; say "B" } # I wonder if this form's implemented?
11:50 camelia rakudo-moar 48c0ba: OUTPUT«A␤Method 'leave' not found for invocant of class 'Block'␤  in block <unit> at /tmp/DgCOsJ6fOb:1␤␤»
11:50 flussence aww.
11:51 kaare__ joined #perl6
11:52 jaffa4 m: goto b; b: say "hello"l
11:52 camelia rakudo-moar 48c0ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/1NlwHE6_Ua␤Two terms in a row␤at /tmp/1NlwHE6_Ua:1␤------> 3goto b; b: say "hello"7⏏5l␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤   …»
11:52 jaffa4 m: goto b; b: say "hello"
11:52 camelia rakudo-moar 48c0ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XIeVzSXcdu␤Variable '&b' is not declared␤at /tmp/XIeVzSXcdu:1␤------> 3goto 7⏏5b; b: say "hello"␤»
11:53 tadzik oh gawd
11:53 tadzik seen skids?
11:53 tadzik hrm
11:54 bjz joined #perl6
11:54 jnthn After much thinking and pondering over O(months), I've got a bunch of things (mostly additions) for S17 that I think take us to a better place. It's not a very short read; feedback is welcome, but please try and focus on semantics rather than bikeshedding naming. https://gist.github.com/jnthn/a56fd4a22e7c43080078
11:54 flussence m: do once { say 'A'; } # good way to confuse the unwary :)
11:54 camelia rakudo-moar 48c0ba: ( no output )
11:55 tadzik I think rakudobrew is slowly becoming the new neutro
11:55 tadzik a quick hack that everyone adopted as The Thing, and becoming the monstrosity that needs to be Properized somewhat
11:57 masak tadzik: that was an endemic problem with proto, too.
11:57 flussence last night I was thinking we ought to have Something Better for modules too. panda is great when it works, but it doesn't look fun to hack on.
11:57 masak jnthn: asking people not to focus on bikeshedding naming? you optimist, you! :P
11:57 * masak gives it a read
11:58 jaffa4 m: goto b; b: ; say "hello"l
11:58 camelia rakudo-moar 48c0ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/iW9nbZjOmF␤Two terms in a row␤at /tmp/iW9nbZjOmF:1␤------> 3goto b; b: ; say "hello"7⏏5l␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤ …»
11:58 jaffa4 m: goto b; b: ; say "hello";
11:58 camelia rakudo-moar 48c0ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/keUfxpNWaf␤Variable '&b' is not declared␤at /tmp/keUfxpNWaf:1␤------> 3goto 7⏏5b; b: ; say "hello";␤»
11:58 masak that one could use a better error message.
11:58 masak std: goto B; B: say "hello"
11:58 camelia std 28329a7: OUTPUT«5===SORRY!5===␤Illegally post-declared type:␤   'B' used at line 1␤Check failed␤FAILED 00:00 135m␤»
11:58 masak right.
11:58 * masak submits LTA rakudobug
12:03 itz_ joined #perl6
12:04 tadzik flussence: I think part of it is the fact that modules are very complicated :)
12:05 tadzik I think the main thing about panda failing to do what it's doing most of the time is because it's trying to be a module manager *and* a precompilation manager, as masak pointed out
12:05 tadzik the latter being very, very complex, very error prone and horrendously not fun to hack on
12:06 tadzik panda has been through a phase of "I ain't touching none of that, therein lies madness!", but has since returned to its roots simply because it's necessary to the users
12:06 tadzik even if done correctly only half the time :)
12:11 masak tadzik: what would happen if you just ripped the precompilation parts out of panda, saying "recent studies show that this belongs in a different project" ?
12:11 masak tadzik: would that increase the reliability of panda?
12:11 tadzik masak: oh, definitely
12:12 tadzik I mean, the consensus for the last few years has been 'precompiled bytecode is a cache and should be managed by rakudo itself'
12:12 masak I think you should do it.
12:12 masak maybe also lay out some plans for a precompilation manager, based on the experiences gained from panda.
12:13 timotimo jnthn: "asycnrhonous" is a peculiar word :)
12:13 tadzik cuncorrency
12:13 masak hey, no bikeshedding on jnthn's spelling! :P
12:13 tadzik masak: the downside is that we leave all panda users with slow code
12:14 timotimo sorry, i forgot about that rule! ;)
12:14 masak tadzik: naming suggestion for the precompilation manager: redpanda :)
12:14 tadzik panda doing precompilation is not doing what's right, it's doing what's needed :/
12:14 tadzik masak: well volunteered :P
12:14 masak tadzik: at the expense of breaking all the time, and making users unhappy.
12:14 tadzik true
12:14 masak tadzik: I think I would use panda more if it *didn't* do precompilation, actually.
12:15 masak tadzik: I'm sick of having to re-install all my modules after rebuilding rakudo (which I do a lot).
12:15 masak it has made me conclude that I'm not in the target group for panda, most of the time.
12:15 masak sometimes I just give up and *copy* the (un-precompiled) module into a temporary lib/ directory somewhere, so I can keep coding.
12:16 tadzik yes, historically panda has not been a tool of choice for rakudo developers themselves
12:17 brrt joined #perl6
12:18 ShimmerFairy +∞ panda is why I don't update my rakudo repo all that often; I want my modules to not be broken every update.
12:18 gfldex joined #perl6
12:18 ShimmerFairy I'd be willing to sacrifice (alleged) speed for a better panda :)
12:19 tadzik amazing what a little chat with the community can do :)
12:19 sjn bleedpanda
12:19 masak tadzik: other naming suggestion: polarbear
12:19 tadzik if it bleeds we can refactor it!
12:20 tadzik masak: because it hibernates? :)
12:20 masak yes!
12:20 tadzik like the bytecode, leave it for too long and it becomes useless :P
12:20 timotimo jnthn: on my first read-through, i like what you wrote
12:21 sjn å
12:21 masak also, precompiled code is "frozen"
12:21 ShimmerFairy panda (modules) + bear (precomp) = pandabear!
12:22 tadzik oooo
12:22 masak ShimmerFairy: I like how you think
12:22 masak panda (modules) + express (precomp) = panda express! :D
12:22 sjn precomp = prepared modules for actual use, right?
12:22 amurf joined #perl6
12:22 masak sjn: you can use them either way.
12:22 tadzik sped up
12:22 sjn it's like making stew
12:22 timotimo sjn: modules will also work when not precompiled
12:22 sjn pandastew
12:23 masak sjn: but precomp takes away the compilation cost when you run things.
12:23 tadzik you may just not live long enough to see it :D
12:23 ShimmerFairy masak: I think a long time ago I imagined a GUI frontend for panda named "bear" for the same reason, but it's clear I'm never going to actually do it, so I don't mind "giving up" that name :P
12:23 masak tadzik: is that... a threat? :P
12:23 timotimo but you could have a BEGIN block in your module that you want to only run once during installation; if you don't pre-comp, you'll run it every time a script runs that uses the module
12:23 tadzik it was a bit too grim :)
12:23 tadzik pre-comp should happen once
12:23 masak tadzik: "it's a nice module you got there. would be a shame if something were to... happen to it."
12:24 tadzik hmm
12:24 tadzik to explain myself I need to make an image macro
12:24 masak this happens a lot with you ;)
12:25 tadzik http://memegenerator.net/instance2/807348
12:25 timotimo yup, tadzik is like that
12:25 tadzik no, still grim
12:25 masak :P
12:26 masak tadzik: I sense some bitterness.
12:26 masak tadzik: maybe another good question to ask: how should we best position the ecosystem so that Rakudo, once it's time, can take over the task of precompiling modules?
12:27 masak like, assuming the world is just and that making architecturally good long-term decisions is actually possible.
12:27 tadzik it could do that any day, I guess
12:28 tadzik I think I might preserve a precompiler as a plugin
12:28 masak sounds about right.
12:28 tadzik I'm tempted to also abandon it and specifically say that I'm not a maintainer of it
12:28 tadzik but that never works
12:28 tadzik I tried
12:28 masak maybe have the plugin default to "off"?
12:29 tadzik yeah
12:29 tadzik I mean, not install it by default
12:29 masak could *install* it by default, but maybe not use it by default.
12:32 JimmyZ jnthn: the new S17 looks much better
12:33 jnthn JimmyZ: It's not a whole new S17, just some additions and suggestions of some removal/change :)
12:34 jnthn The largest part of which is much better syntactic relief for async programming. :)
12:36 JimmyZ I was hoping we have something like akka.io :P
12:36 timotimo the bad thing about having most cool stuff in core is that we can't get a bunch of hip sounding .io domains to advocate our "features"
12:37 JimmyZ or subset of it ;)
12:38 tadzik . o O ( wth is Panda::DepTracker :o )
12:38 jnthn JimmyZ: That much certainly belongs in module space
12:38 tadzik this animal has grown beyond my comprehension :)
12:39 jnthn JimmyZ: What we can provide is really nice things to build it out of. OO::Actors shows part of the way there too :)
12:40 JimmyZ I would not mind it is a module haha, only if it exists :P
12:42 masak jnthn: first time I see a "make a for loop and then immediately die in it" pattern. I like.
12:42 JimmyZ though it is much more like another perl 6 big projects
12:43 tadzik /home/tadzik/.rakudobrew/bin/perl6: line 2: /home/tadzik/.rakudobrew/bin/perl6: Argument list too long
12:43 tadzik well that's new :o
12:44 masak `my class DepTracker is CompUnitRepo` -- that sounds like a type error reified as code... :)
12:45 jnthn masak: It's not so useful in the synchronous world :P
12:48 aborazmeh joined #perl6
12:48 vendethiel jnthn: the supply block in your gist reminds me of our "gather" (but finite), and of generators in other languages
12:49 aborazmeh joined #perl6
12:49 domidumont joined #perl6
12:49 jnthn vendethiel: Oh, it's very much like a gather in a sense, it's just that it produces a supply (observable) rather than a list (enumerable)
12:49 jnthn But it's essentially an async gather
12:49 jnthn Also, it needn't be finite
12:50 FROGGS joined #perl6
12:50 jnthn (Of course the initial run through the supply block may be, but the supply it produces can go on forever
12:50 jnthn )
12:51 masak jnthn: no, it could be. I'm referring to the (pseudo) implementation of `sub await`
12:51 masak jnthn: of course, only the first `die` would ever run.
12:52 masak jnthn: but the point is that of there are no offending elements, no `die` runs.
12:52 masak jnthn: so it's basically a pretty neat way to say "die on the first element"
12:52 masak "(if any)"
12:52 jnthn masak: ah, true :)
12:52 masak I really like the `supply` block. that feels right.
12:53 masak kind of analogous to a `gather` block.
12:53 ohb I was surprised when i find out that I can't just update a pm6 to debug it, because it was precompiled. I don't mind the precompilation per se, but it seems cumbersome when it's panda doing it upfront, instead of rakudo "jit" (and checking if the pm6 is changed)
12:53 masak jnthn: "same rules as gather and take" -- so it's dynamically scoped, too?
12:54 jnthn masak: I forgot about that bit and thought you were talking about another thing :)
12:54 jnthn masak: Um...I'd say so ;)
12:54 masak jnthn: which means that `emit`, `done`, and `quit` can occur anywhere in code, as long as there's a `supply` dynamically in the call stack?
12:54 masak just checking. I think it's a good idea.
12:55 vendethiel jnthn: what's the return type of supply? "Supply"?
12:55 jnthn masak: The supply block itself maybe won't be, but *something* will be
12:55 jnthn vendethiel: Yes
12:55 masak `supply`/`emit` really feels like the reactive version of `gather`/`take`
12:56 jnthn Where the something represents the target supply
12:58 masak oh, a `QUIT` phaser?
12:58 masak is there also a `DONE` phaser?
12:59 jnthn masak: That's just LAST, 'cus whenever is a loop :)
12:59 vendethiel jnthn: so, "next" skips the current "whenever" iteration?
12:59 vendethiel also means that "whenever" couldn't be user-implemented, right? it has to be "magical"?
12:59 masak whenever is a *loop*!?
13:00 masak snakes are *sentient*!?
13:00 vendethiel (I guess the TTIAR makes it a special construct by definition)
13:00 timotimo "whenever" is more like a subscription to a supply; tapping it, so to speak
13:00 jnthn masak: It's right there when I introduce it. "For consuming supplies, there is an asynchronous looping construct, known as whenever."
13:00 timotimo so yeah, it's loop-like
13:01 masak jnthn: then why isn't QUIT simply CATCH or something?
13:01 masak it's kind of a reactive loop.
13:01 vendethiel m: do sub f { say 1 }
13:01 camelia rakudo-moar 48c0ba: ( no output )
13:02 jnthn masak: Interesting question. I wanted to keep CATCH about synchronous exceptions, I guess. So a CATCH in your whenever is all about what you are doing to process the value.
13:02 vendethiel .oO( Perl 5 called, they want their do back :P )
13:02 masak jnthn: I'll have to mull over that. but that might make sense.
13:04 jnthn masak: It was one of the things I spent a while pondering over. I may be missing something nice that's possible and still unconfusing.
13:05 jnthn vendethiel: Well, you can catch control exceptions in user-land too
13:05 vendethiel jnthn: right, but I mean -- implementing whenever
13:05 masak well, I think this still counts as bikeshedding over semantics, not syntax :)
13:05 masak jnthn: I really dig the name `whenever`, by the way. definitely the right one.
13:07 * vendethiel thinks he might like that S17 stuff be under a "use"
13:07 masak jnthn: would a `last` in a `whenever` mean `done`, or `quit`?
13:07 masak or neither?
13:08 jnthn masak: Neither, it means "unsubscribe from (or in Perl 6 terms, close the tap on) the supply we are reacting to"
13:08 masak I see now that this is addressed further down.
13:08 jnthn nod
13:08 masak I should finish reading :)
13:08 jnthn ;)
13:08 * jnthn goes to nom lunch, now it's done cooking :)
13:08 jnthn bbl
13:09 masak it looks like a really powerful construct.
13:09 masak I can't recall seeing syntax for this in any other language.
13:09 masak I keep reading the examples and going "oh, so this is what reactive programming in native syntax looks like"
13:14 vendethiel the whenever Promise.in looks really powerful :D
13:15 vendethiel it somewhat looks like a EDSL on top of our current S17
13:18 masak yes, exactly.
13:18 masak generalizing, this is probably how languages ought to evolve.
13:18 masak first you get the types, the methods, and the relationships.
13:19 masak then, later, you come up with better syntax.
13:21 zakharyas joined #perl6
13:36 AlexDaniel joined #perl6
13:38 lucasb joined #perl6
13:40 masak walk &
13:42 RabidGravy joined #perl6
13:52 telex joined #perl6
14:00 FROGGS joined #perl6
14:02 araujo joined #perl6
14:06 yqt joined #perl6
14:08 newbie joined #perl6
14:10 araujo joined #perl6
14:10 araujo joined #perl6
14:12 yqt joined #perl6
14:13 raiph joined #perl6
14:13 skids joined #perl6
14:15 llfourn joined #perl6
14:26 dalek rakudo/nom: ca6cdb4 | jnthn++ | src/Perl6/Actions.nqp:
14:26 dalek rakudo/nom: Fix error for useless accessor generation.
14:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ca6cdb4c42
14:27 dalek roast: f0dcafa | jnthn++ | S12-attributes/class.t:
14:27 dalek roast: Tests for RT #125625.
14:27 dalek roast: review: https://github.com/perl6/roast/commit/f0dcafa21e
14:27 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125625
14:30 domidumont joined #perl6
14:45 yqt joined #perl6
14:46 nys joined #perl6
14:47 lucasb jnthn: you repeated 'our $.a' in both tests
14:47 jnthn oh?
14:47 jnthn d'oh
14:47 lucasb :)
14:48 dalek roast: 03d13c1 | jnthn++ | S12-attributes/class.t:
14:48 dalek roast: Fix copy-pasta in test; lucasb++.
14:48 dalek roast: review: https://github.com/perl6/roast/commit/03d13c1421
14:49 dalek rakudo/nom: a9136d2 | jnthn++ | src/core/Exception.pm:
14:49 dalek rakudo/nom: Fix Exception.gist when there's no message.
14:49 dalek rakudo/nom:
14:49 dalek rakudo/nom: If the VM-level exception was missing a message, then Exception.gist
14:49 dalek rakudo/nom: would crash. Refactored a little to avoid a duplicate isconcrete check
14:49 dalek rakudo/nom: to make the code little tidier.
14:49 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a9136d297e
14:50 AlexDaniel m: our $.a = 5;
14:50 camelia rakudo-moar 48c0ba: OUTPUT«Potential difficulties:␤    Useless declaration of a has-scoped method in mainline (did you mean 'my  a'?)␤    at /tmp/LHCmeHZC9E:1␤    ------> 3our 7⏏5$.a = 5;␤»
14:50 dalek roast: 0853325 | jnthn++ | S32-exceptions/misc.t:
14:50 dalek roast: Test covering RT #125620.
14:50 dalek roast: review: https://github.com/perl6/roast/commit/0853325b5f
14:50 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125620
14:52 AlexDaniel jnthn: hm, shouldn't this error be similar to the one that you see when doing $!a?
14:52 AlexDaniel "Cannot use ! twigil on our variable"
14:53 AlexDaniel oh, probably not
14:53 AlexDaniel right
14:54 jnthn You're allow to use . on a my or our, it's just sometimes useless
14:54 szabgab joined #perl6
14:57 jaffa4 jnthn: How can I see the jiteed code of Perl program? Does jitting happen always?
14:58 jaffa4 Does it it depend on the sze of code?
14:59 jnthn jaffa4: Happens on x64 and depends on many factors, of which code size is one
14:59 jnthn jaffa4: There's an environment variable that you can set that will dump the generated machine code, iirc, which you can disassemble
15:00 jaffa4 but it is not always generated, right?
15:00 jnthn No, that'd be a waste of time.
15:00 jnthn We only generate it for hot code
15:00 jaffa4 I mean even if I set, it may be emptyu
15:01 jnthn May be, but unlikely
15:01 jnthn Because some parts of the compiler even for a trivial program get hot enough to JIT
15:01 jaffa4 hot code = cycle is needed
15:01 khw joined #perl6
15:02 AlexDaniel jnthn: so jit is x64 only?
15:03 jnthn AlexDaniel: yes
15:03 jnthn jaffa4: Yeah, or recursion
15:03 jnthn AlexDaniel: On other platforms you still get a bunch of optimization done, but then it interprets the optimized bytecode
15:04 jaffa4 jnthn:  Do you optimise floating point operations?
15:05 jnthn In what sense?
15:05 jnthn The JIT compiler knows how to turn them into machine code.
15:06 jaffa4 Does the type need to be given at declaration?
15:07 jnthn If you write code using native nums, you can avoid a lot of boxing etc, but you need to do it consistently
15:08 jnthn And we'll produce better code statically
15:08 jnthn If you don't give type info, you can still get a bunch of optimization done on MoarVM
15:09 jnthn Since it looks at what types actually show up at runtime and produces optimized versions of the code assuming those types
15:10 jnthn It's capable of speculatively running an optimized version also; if it finds out it shouldn't be, it falls back to the interpreted version
15:10 jnthn Possible re-writing the call stack to undo any inlining it's now discovered invalid.
15:11 jnthn *Possibly
15:11 jaffa4 I wonder if it i is so, why nbody problem ran very slowly for me
15:11 ShimmerFairy This should be closed, but unfortunately I can't do it: https://rt.perl.org/Ticket/Display.html?id=71356
15:12 AlexDaniel is there any difference between ... and !!! ?
15:13 TimToady joined #perl6
15:13 PerlJam AlexDaniel: ... returns a failure, but !!! dies
15:13 jnthn ShimmerFairy: Um...but the test in question seems to fail?
15:14 ShimmerFairy Oh, it does? Hm.
15:14 ShimmerFairy m: class A { has $!b is readonly = "foo" }; A.new
15:14 camelia rakudo-moar ca6cdb: OUTPUT«Potential difficulties:␤    useless use of 'is readonly' on $!b␤    at /tmp/Y4i1jI_sT3:1␤    ------> 3class A { has $!b is readonly7⏏5 = "foo" }; A.new␤»
15:14 ShimmerFairy ^ warning but no error, which made me think it's resolved
15:15 jnthn https://rt.perl.org/Ticket/Display.html?id=124121 is interesting
15:15 jnthn S14 says "$fido does (Sentry, Tricks, TailChasing, Scratch);"
15:15 AlexDaniel PerlJam: why would somebody want to return a failure?
15:15 AlexDaniel just wondering
15:16 AlexDaniel or maybe the question should be other way round. I'm just a bit confused, don't know which one I want
15:16 skids Ergh.  Have to figure out now how to deal with a merge conflict on PR#470 with that last change.  And I'm not much of a git pro.
15:17 skids (nevermind git + github)
15:18 PerlJam AlexDaniel: so the caller can decide what to do about it.
15:19 ShimmerFairy jnthn: is "is readonly" supposed to be the opposite of "is rw", i.e. "no, you can't do $instance.attr = 42", or is it supposed to prevent the class from changing the attribute too?
15:19 jnthn ShimmerFairy: I'm not sure off hadn
15:19 jnthn *hand
15:20 ShimmerFairy jnthn: the "useless use" would suggest to me it's supposed to be the opposite (because then the "useless use" is telling you that affecting outside usage on a private attribute is useless). If not, then I'd suggest constants instead of variables :)
15:21 ShimmerFairy m: class A { has $!b is rw }; A.new;
15:21 camelia rakudo-moar ca6cdb: OUTPUT«Potential difficulties:␤    useless use of 'is rw' on $!b␤    at /tmp/iVj9bCLPRA:1␤    ------> 3class A { has $!b is rw 7⏏5}; A.new;␤»
15:23 skids jnthn: or are you looking at PR#470 and that's why you did that change and I should not worry about it?
15:23 vendethiel m:  sub long-computation() { 5 + 5 };say $_ if long-computation() -> $_;
15:23 camelia rakudo-moar a9136d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_JwmfdyqrH␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/_JwmfdyqrH:1␤------> 3) { 5 + 5 };say $_ if long-computation()7⏏5 -> $_;␤    expecting…»
15:23 jnthn skids: Which change? But now, not looking at it...should I? :)
15:23 vendethiel m:  sub long-computation() { 5 + 5 }; -> $_ { say $_ } if long-computation();
15:23 camelia rakudo-moar a9136d: ( no output )
15:23 skids The Exception.gist fix.
15:24 jnthn Oh...
15:24 skids I thik it might already have been fixed differently in there.
15:25 AlexDaniel m: my @a = 5, 9, 2, 8; for @a <- 25, 30 { say "$^a $^b" } say @a;
15:25 camelia rakudo-moar a9136d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4u6sFlNpYv␤Strange text after block (missing semicolon or comma?)␤at /tmp/4u6sFlNpYv:1␤------> 2, 8; for @a <- 25, 30 { say "$^a $^b" }7⏏5 say @a;␤»
15:25 AlexDaniel m: my @a = 5, 9, 2, 8; for @a <- 25, 30 { say "$^a $^b" }; say @a;
15:25 camelia rakudo-moar a9136d: OUTPUT«False 30␤5 9 2 8␤»
15:25 skids Yeah actually if you could give it a look and advise, that would be much appreciated.  I could make a new PR, or cherrypick some things out of it first before I do or whatnot.
15:25 ShimmerFairy looks like 'readonly' is used in parameter lists (and is apparently the default), and keeps the sub itself from modifying that parameter. I'm not sure if that should be the case for class attributes, though...
15:26 oetiker joined #perl6
15:26 AlexDaniel what is this "<-" thing?
15:26 dalek rakudo/nom: b3ba1b3 | (Lucas Buchala)++ | src/RESTRICTED.setting:
15:26 dalek rakudo/nom: Add Proc to RESTRICTED setting
15:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b3ba1b3c36
15:26 dalek rakudo/nom: 2cb9230 | jnthn++ | src/RESTRICTED.setting:
15:26 dalek rakudo/nom: Merge pull request #474 from lucasbuchala/temp2
15:26 dalek rakudo/nom:
15:26 dalek rakudo/nom: Add Proc to RESTRICTED setting
15:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2cb9230892
15:27 skids jnthn: but I was on my way out the door, so I'll check irc log later.
15:27 * jnthn is a native speaker and never heard the word "Inchoate" :P
15:28 geekosaur it's not the most common word
15:29 ShimmerFairy m: say 5 <- 10
15:29 camelia rakudo-moar a9136d: OUTPUT«False␤»
15:29 vendethiel m: say 5 < -10;
15:29 camelia rakudo-moar a9136d: OUTPUT«False␤»
15:29 vendethiel ShimmerFairy: ;-)
15:29 jnthn m: say - 10
15:29 camelia rakudo-moar a9136d: OUTPUT«-10␤»
15:30 jnthn :)
15:30 ShimmerFairy AlexDaniel: <- isn't anything, your thing was interpreted as  for  (@a < -25), 30 { ... }
15:30 vendethiel "@a < -25" checks that @a.elems is < -25
15:30 lizmat joined #perl6
15:30 AlexDaniel oohh, well
15:30 * jnthn sees a Perl 6 secret operators talking coming :P
15:30 vendethiel hehehe
15:30 RabidGravy jnthn, rest easy I did a degree in English Literature and I don't think I've ever actually using
15:30 RabidGravy er used it
15:30 AlexDaniel Well, the thing is that -> is a valid operator, <-> is as well
15:30 ShimmerFairy jnthn: for that talking, consider:  +^@a  (not to be confused with  ^+@a)
15:30 AlexDaniel so I thought, why don't I try <-
15:31 vendethiel AlexDaniel: right, but neither -> nor <-> are ambiguous with < and -
15:31 ShimmerFairy If <- were anything, it would be "write-only", which would be... interesting, but likely useless :)
15:31 AlexDaniel vendethiel: yea
15:31 vendethiel ShimmerFairy: write-only can be interesting, but certainly in limited contexts...
15:32 ShimmerFairy vendethiel: I can't help but wonder how often you could emulate the write-only support you want by just ignoring the part where you can read it too :P
15:32 RabidGravy I did have a use for write only the other day funnily enough
15:33 RabidGravy I went for always returning a type object on read
15:33 vendethiel m: my $backing; my $a := Proxy.new(FETCH => { ... }, STORE => { $backing = $_ }); $a = 5; say $backing; say $a;
15:33 camelia rakudo-moar a9136d: OUTPUT«Too many positionals passed; expected 0 or 1 arguments but got 2␤  in block <unit> at /tmp/woCyZUFDm8:1␤␤»
15:36 RabidGravy coo, first live playout failure on the radio station this year
15:36 beastd joined #perl6
15:36 mr-foobar joined #perl6
15:39 petercommand joined #perl6
15:52 rurban joined #perl6
16:00 amurf joined #perl6
16:02 zakharyas joined #perl6
16:05 llfourn hey guys, FYI with the help I was given here a few weeks ago I made: https://github.com/LLFourn/perl6-slang-dotty
16:05 llfourn so thanks!
16:06 dalek rakudo/nom: 75c5e17 | jnthn++ | src/ (2 files):
16:06 dalek rakudo/nom: Fix does/but confusion/issues with many-roles form.
16:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/75c5e17cfd
16:06 dalek roast: 0cee736 | jnthn++ | S14-roles/mixin.t:
16:06 dalek roast: Tests for RT #124121.
16:06 dalek roast: review: https://github.com/perl6/roast/commit/0cee736d4a
16:06 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=124121
16:08 masak llfourn: nice!
16:09 masak llfourn: first time I see someone overriding dotty.
16:09 llfourn I actually started out trying to do it in perl5 but it was too hard : http://stackoverflow.com/questions/30414411/ho​w-to-use-bhooks-to-manipulate-the-perl-parser
16:10 ShimmerFairy how do I use a Signature object as the signature for a block of code? Ideally something like:
16:10 ShimmerFairy m: my &foo = -> :(Int) { say "made it!" }; &foo(1)
16:10 camelia rakudo-moar 2cb923: OUTPUT«Too few positionals passed; expected 1 argument but got 0 in sub-signature␤  in block <unit> at /tmp/ZjOucE1l6g:1␤␤»
16:10 ShimmerFairy (the example given in S02 for Signature objects doesn't work, and isn't quite what I want anyway)
16:10 llfourn masak: Wasn't too bad :). There were a few gotchas but got there in the end.
16:11 kaare__ joined #perl6
16:11 jnthn ShimmerFairy: -> |c where :(Int) { } # maybe :)
16:11 jnthn Though -> |c (Int) { } works too
16:12 jnthn I hope... :)
16:12 jnthn Whee, down to 1031 tickets
16:12 ShimmerFairy It doesn't, but :() form appears to work
16:13 jnthn m: my $x = -> |c (Int) { 'ok' }; say $x(1); say $x(4.5)
16:13 camelia rakudo-moar 2cb923: OUTPUT«ok␤cannot stringify this␤  in block <unit> at /tmp/MAfke12UDv:1␤␤»
16:13 jnthn Innerestin' failure mode, but... )
16:13 ShimmerFairy m: my $a = :(Int, Int); my &foo = -> |c where $a { say c.perl }; &foo(1, 2)
16:13 camelia rakudo-moar 2cb923: OUTPUT«\(1, 2)␤»
16:14 ShimmerFairy Now I just need to figure out how to generate that Signature, and then I can maybe actually fix a ticket :)  (this one: https://rt.perl.org/Ticket/Display.html?id=71544 )
16:17 ShimmerFairy m: say (1,2,3,4,5).map(-> *@a { @a.perl })  # I have to say, I wasn't expecting this outcome
16:17 camelia rakudo-moar 2cb923: OUTPUT«[1]<> [2]<> [3]<> [4]<> [5]<>␤»
16:18 jnthn Oh, a non-literal signature.
16:19 jnthn ShimmerFairy: ah, hmm...not sure that's going to be the best way to do it.
16:19 ShimmerFairy jnthn: yeah, the solution that first came to me feels weirdly tricky.
16:20 jnthn well, maybe we can do it like
16:20 ShimmerFairy the grep method currently just uses 'map' with a single $_ parameter in the block. Messing with Signatures was how I figured you could get the right number of args to pass on, instead of just one.
16:20 dalek rakudo/nom: 4337b2a | (Stefan Seifert)++ | src/core/control.pm:
16:20 dalek rakudo/nom: Use 'Perl5' as consistent name for EVAL and use :from
16:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4337b2a986
16:20 dalek rakudo/nom: 0bed6c5 | lizmat++ | src/core/control.pm:
16:20 dalek rakudo/nom: Merge pull request #473 from niner/nom
16:20 dalek rakudo/nom:
16:20 dalek rakudo/nom: Use 'Perl5' as consistent name for EVAL and use :from
16:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0bed6c54de
16:21 jnthn ShimmerFairy: Well, or we could just take a generic block like -> |c { $filter($c) } and mix a role into it with the count/arity :)
16:21 jnthn uh |c on the $filter(...) call too
16:22 jnthn Since that's what MapIter pays attention to
16:22 jnthn o/ lizmat :)
16:22 lizmat o/ jnthn
16:23 lizmat only barely awake enough to click "merge"  :)
16:26 llfourn that reminds me: If you make  slang by applying a role to your %*LANG, how do you EVAL using your slangified land rather than vanilla p6?
16:27 jnthn llfourn: I made it a while ago so you can override EVAL to match on a different :lang(...)
16:27 jnthn llfourn: So if you do it that way it should just be exporting a multi EVAL
16:27 jnthn That...does whatever's needed )
16:28 llfourn jnthn: so I call EVAL :lang(%*Lang) 'some code'?
16:29 ShimmerFairy jnthn: your idea to mix in a role seems to work out, at least in testing. I'll start working on making sure there are tests and the fix itself :)
16:29 ShimmerFairy m: sub foo($a, $b) { $a + $b }; my &bar = -> |c { foo(|c) }; my @a = 1,2,3,4; say @a.map(&bar but role { method count(Code:D:) { 2 } })
16:29 camelia rakudo-moar 75c5e1: OUTPUT«3 7␤»
16:30 jnthn ShimmerFairy: OK. I'd make it a role CheatArity { has $.arity; has $.count; }, and then mix that in, and then set them
16:30 jnthn ShimmerFairy: Then we hit the multi-cache nicely :)
16:30 jnthn llfourn: No, more that you'd need to implement an EVAL that knows what to do with code in your lanuage
16:30 jnthn *language
16:31 jnthn llfourn: Simplest case, that's just prepending a "use Your::Slang" I guess
16:31 llfourn jnthn: Ah so I should export an EVAL from my slang?
16:31 ShimmerFairy jnthn: OK, I was just considering that, since the Code class has a method count(Code:D:), it'd be nice to replicate that. Should that role be defined within the grep method, or outside of any other class?
16:31 jnthn llfourn: Yeah
16:31 llfourn jnthn: kk thanks
16:31 ShimmerFairy Oh, and if you want to set them after mixin, shouldn't they have  is rw  on them? :)
16:31 jnthn ShimmerFairy: Define it as a lexical (my) role inside the grep method for now, we can widen it if we see a need.
16:32 jnthn ShimmerFairy: Hm, true :)
16:32 JimmyZ_ joined #perl6
16:32 ShimmerFairy or, a sneaky  method set-cheat($arity, $count) { ... }  in the role too, if you'd rather not give MapIter rewritable attributes :)
16:37 jnthn True ;)
16:39 ShimmerFairy I think I'll prefer the safe route and not let MapIter easily change those attributes (so if it does try to, it'll fail with and without the mixin)
16:44 rindolf joined #perl6
16:46 lizmat m: say ("a" x *)(42)   # is this intended behaviour ?
16:46 camelia rakudo-moar 75c5e1: OUTPUT«aaaaaaaaaaaaaaaaaaa​aaaaaaaaaaaaaaaaaaaaaaa␤»
16:47 lizmat jnthn: shouldn't that, in time, create a Cat object ?
16:47 ShimmerFairy Depends on if "a" x *  is supposed to generate a WhateverCode object :)
16:47 lizmat the, "a" x * bit, I mean
16:48 lizmat well, it does create a WhateverCode object now, which bypassed a <x>($s, Whatever) candidate I just made
16:48 lizmat to fix #125628
16:48 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125628
16:48 jnthn lizmat: Dunno, the whatever code variant is quite useful, but it's odd to have it on x but not xx
16:49 lizmat jnthn: where would it be useful?  In a substr or so ?
16:49 jnthn lizmat: Generally the direction has been to add whatever-thunking more than to remove it (e.g. * ~~ Foo)
16:49 jnthn But it's a lang design question so wants running by TimToady++ really
16:49 lizmat m: say "a" x *   # not what I expect
16:49 camelia rakudo-moar 75c5e1: OUTPUT«WhateverCode.new␤»
16:50 jnthn m: say "a" ~ *  # and this?
16:50 camelia rakudo-moar 75c5e1: OUTPUT«WhateverCode.new␤»
16:50 lizmat ok, I'll just push the fix and we'll discuss later
16:50 ShimmerFairy The current behavior feels like a very Haskell-y thing to me (and that is purely because I've been reading a Haskell tutorial lately :P)
16:50 jnthn lizmat: What is "the fix" ooc?
16:50 lizmat m: say ("a" ~ *)("foo")
16:50 camelia rakudo-moar 75c5e1: OUTPUT«afoo␤»
16:50 lizmat multi sub infix:<x>($s, Whatever)  { fail X::NYI.new(:feature('Cat object')) }
16:51 jnthn But...do we ever hit that?
16:51 jnthn m: say ('a' x *)(3)
16:51 camelia rakudo-moar 75c5e1: OUTPUT«aaa␤»
16:51 lizmat no, we don't
16:51 jnthn Then it's adding dead code? :)
16:51 jnthn Well
16:51 jnthn It's reachable late-bound I guess
16:52 lizmat m: say "a" xx *
16:52 camelia rakudo-moar 0bed6c: OUTPUT«a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a ...␤»
16:52 lizmat m: say "a" x *
16:52 camelia rakudo-moar 0bed6c: OUTPUT«WhateverCode.new␤»
16:52 TimToady arguably, that's just another reason for distinguishing xx from x
16:53 ShimmerFairy Hm. I'm not sure if I want xx * to be WhateverCode too, or want x * to do the string equivalent of an infinite/lazy list (i.e. Cat)
16:54 TimToady I suspect it's fine to make people work harder to create an infinite string, if we ever find a use for one
16:54 * ShimmerFairy leans towards WhateverCode in both cases, since there's always x Inf and xx Inf ...
16:54 lizmat ok, I'll just fix the "a" x Inf case
16:55 TimToady people do want an infinite list a lot more often than they want to curry xx
16:56 lucasb What is the unicode char for the infinity sign? That horizontal "8". I wish that char was in ASCII, then the issue would have been solved :)
16:56 jnthn hm, point :)
16:56 dalek rakudo/nom: 059dac9 | lizmat++ | src/core/ (2 files):
16:56 dalek rakudo/nom: Partially fix #125628
16:56 dalek rakudo/nom:
16:56 dalek rakudo/nom: Did not fix the '"a" x *' case, as per discussion at:
16:56 dalek rakudo/nom:   http://irclog.perlgeek.de/p​erl6/2015-07-18#i_10918034
16:56 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=125628
16:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/059dac9f0b
16:56 ShimmerFairy m: say "∞".uniname
16:56 camelia rakudo-moar 0bed6c: OUTPUT«INFINITY␤»
16:56 ShimmerFairy unexpectedly simple :)
16:56 lucasb ShimmerFairy: yeah :D
16:57 lucasb I had to see it in the browser, because my terminal is not configured
16:57 TimToady so just add a .ASCII and you'll have the char you want :P
16:58 ShimmerFairy TimToady: fair enough, I just think it'd be nice/cool for * to generate a curryable thing in that case, esp. since we already have a handy term for "infinite", namely Inf :)
17:00 dalek rakudo/nom: 9eb336f | jnthn++ | src/core/Variable.pm:
17:00 dalek rakudo/nom: Implement does trait on variables.
17:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9eb336f87c
17:00 TimToady we should add some more * characters to ASCII while we're at it
17:00 dalek Inline-Perl5: 077b844 | (Stefan Seifert)++ | / (3 files):
17:00 dalek Inline-Perl5: Use 'Perl5' as consistent name for EVAL and use :from
17:00 dalek Inline-Perl5:
17:00 dalek Inline-Perl5: Fixes GH #28
17:00 dalek Inline-Perl5:
17:00 dalek Inline-Perl5: Thanks to hoelzro++ for reporting!
17:00 dalek Inline-Perl5: review: https://github.com/niner/Inl​ine-Perl5/commit/077b8442be
17:00 dalek roast: 4f22909 | jnthn++ | S14-roles/mixin.t:
17:00 dalek roast: Unfudge test for does trait on variables.
17:00 dalek roast: review: https://github.com/perl6/roast/commit/4f229091f6
17:01 jnthn That was the last fudged tset in S14-roles/mixin.t :)
17:01 ShimmerFairy We'll have to add more bits to ASCII first :)
17:02 jnthn And back down to 1030 RTs. Guess I'm allowed dinner now :)
17:02 TimToady we could steal some of those control chars that nobody ever uses
17:03 ShimmerFairy What was that one control sequence that introduced an "alternate" thing?
17:03 geekosaur SO / SI?
17:04 geekosaur (welcome back to BAUDOT >.> )
17:06 TimToady m: say &[x].assuming("a")(42)
17:06 camelia rakudo-moar 0bed6c: OUTPUT«aaaaaaaaaaaaaaaaaaa​aaaaaaaaaaaaaaaaaaaaaaa␤»
17:07 TimToady and it's not like it's all that hard to do partial application without *
17:08 ShimmerFairy sure, that's why I said "would be nice/cool" instead of "is really important" :)
17:09 TimToady we could, I dunno, make \* always autoprime, or some such
17:10 jnthn lizmat: Dunno if you backlog, but if not: I posted an S17 thingy earlier today
17:11 * jnthn goes to find the bankomat 'cus he decided to order takeout to avoid going out in the hot weather only to realize he needs money to pay for it...
17:11 jnthn bbiab
17:11 ShimmerFairy Oh, TimToady, does  is readonly  on a class attribute mean not even the class can modify it (like when used on parameters in subs/methods), or is it simply the opposite of  is rw  (i.e. the default for public attributes)
17:12 ShimmerFairy Right now, it behaves as if it's the opposite of  is rw  , but a test in roast expects the other thing.
17:12 * TimToady has no clue what 'is readonly' would do, never having wanted it
17:13 ShimmerFairy TimToady: me neither; when I saw the (quite old) ticket, my first thought was "oh, was this before  is rw  and default-ro attributes or something?"
17:14 ShimmerFairy The ticket: https://rt.perl.org/Ticket/Display.html?id=71356
17:14 TimToady having such an attribute implies to me that a class has got way too big, if parts of it don't trust the other parts of it...
17:14 TimToady otoh it could be a message to maintainers, I suppose
17:14 TimToady otgh, we tried to get rid of 'is readonly' by defining ::= instead
17:15 ShimmerFairy It seems to me it should be the opposite of rw (and currently warns with 'useless use' on private attrs, just like rw)
17:15 ShimmerFairy Yeah, I can't help but think why you couldn't use constants and/or not use  is rw  :)
17:15 TimToady m: my $x ::= 42; say $x++
17:15 camelia rakudo-moar 0bed6c: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/NQO95OqGW1:1␤␤»
17:15 TimToady m: my $x ::= 42.item; say $x++
17:15 camelia rakudo-moar 0bed6c: OUTPUT«Cannot assign to an immutable value␤  in block <unit> at /tmp/ThUxP29elD:1␤␤»
17:15 TimToady m: my $x ::= Scalar(42); say $x++
17:15 camelia rakudo-moar 0bed6c: OUTPUT«Cannot find method 'Scalar'␤  in block <unit> at /tmp/nCDbWPmF4n:1␤␤»
17:16 * TimToady not awake enough yet
17:17 ShimmerFairy I hope you had a good test at the doctor's yesterday, btw. (Though I'm guessing the results will take some time.)
17:18 TimToady well, they did find a constriction, and ballooned it, but yeah, gotta wait for biopsy results, so I'm kinda feeling my mortality today
17:19 ShimmerFairy Sorry to hear that. I hope it ends up being nothing serious, of course.
17:23 lizmat jnthn: "$*AWAITER environment variable"   environment ??
17:23 yqt joined #perl6
17:27 lizmat jnthn: whenever Supply.interal(1) {   # I guess "interval" ?
17:29 domidumont joined #perl6
17:31 timotimo nope, intercal
17:31 nine jnthn: I cannot help but think of an async database interface reading about whenever.
17:38 dalek roast: 256d6a9 | PerlJam++ | / (4 files):
17:38 dalek roast: Update tests to reflect empty leading and trailing elements
17:38 dalek roast:
17:38 dalek roast: See RT#112868
17:38 dalek roast: review: https://github.com/perl6/roast/commit/256d6a924b
17:38 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=112868
17:40 konsolebox joined #perl6
17:40 dalek rakudo/nom: 4b5e196 | PerlJam++ | src/core/Str.pm:
17:40 dalek rakudo/nom: Fix for RT#112868
17:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4b5e19606d
17:40 synbot6 Link:  https://rt.perl.org/rt3/Publi​c/Bug/Display.html?id=112868
17:41 dalek roast: a8ce6fb | (Stefan Seifert)++ | S01-perl-5-integration/ (13 files):
17:41 dalek roast: Use 'Perl5' as consistent name for EVAL and use :from
17:41 dalek roast: review: https://github.com/perl6/roast/commit/a8ce6fb62c
17:41 dalek roast: 564b3b6 | (Stefan Seifert)++ | / (7 files):
17:41 dalek roast: Merge branch 'master' of github.com:perl6/roast
17:41 dalek roast: review: https://github.com/perl6/roast/commit/564b3b61d1
17:43 jnthn lizmat: I meant dynamic, not environment. And fixed the other typo; thanks :)
17:45 lizmat "for @awaitables.grep(* !~~ Awaitable) {"   I would probably would have done a if @awaitables.first(...) { die... }
17:46 jnthn lizmat: Dangerous :)
17:46 jnthn lizmat: Remember Promise.Bool :)
17:47 lizmat ah, hmmm...
17:47 lizmat then "for @awaitables.first(...) { die }" ?
17:48 jnthn You could if defined @awaitables.first(...) if you want, but it's longer :P
17:48 lizmat I mean, no need to look for further failures when you found the first one
17:48 lizmat afk for a bit&
17:48 flussence .oO( slightly worrying: Supply.intercal doesn't sound like *that* much of a typo... )
17:48 spider-mario joined #perl6
17:49 jnthn lizmat: It's lazy anyway ;)
17:50 amurf joined #perl6
17:53 * jnthn bbl
17:57 jaffa4 What is happening to Pugs?
17:57 jaffa4 Why is it not here http://perl6.org/compilers/features?
17:58 geekosaur pugs hasn't been maintained in years
17:59 geekosaur basically, only au++ understands it well enough to do anything with the code (some of us with Haskell experience have tried...) and au is busy
17:59 timotimo every few months someone brings it up to buildability again when something breaks
18:03 jaffa4 What about niecza?
18:04 timotimo hasn't been worked on for a long while, sadly
18:05 TimToady it bit-rotted wrt mono
18:05 timotimo :(
18:05 timotimo isn't .net very backwards compatible or something?
18:14 japhb .ask flussence Did you manage to find the cause of that segfault in the Text-Tabs-Wrap tests?
18:14 yoleaux japhb: I'll pass your message to flussence.
18:15 flussence japhb: something to do with threads, so it's way out of my league. The only workaround I know of is forcing 1 thread max, but then it takes forever to run tests :(
18:15 yoleaux 18:14Z <japhb> flussence: Did you manage to find the cause of that segfault in the Text-Tabs-Wrap tests?
18:16 japhb flussence: Oh, eww.
18:16 yqt joined #perl6
18:17 flussence (and the whole reason it tries to be parallel in the first place is... because those tests take forever. *sigh*)
18:30 jaffa4 does any have the latest niecza.zip?
18:31 jaffa4 any = anyone
18:33 RabidGravy dunno, I was a big mono fan ten years ago haven't really tracked it recently]
18:44 domidumont joined #perl6
18:57 TimToady it wasn't just bitrot, there were some design corners that got themselves painted into; these days it probably makes more sense to target an nqp backend to the clr
18:58 vendethiel TimToady: I've heard that several times, but no one has been able to tell me more than "it got caught cheating". do you happen to know which part cheated, say?
18:58 jaffa4 bitrot?
18:59 TimToady vendethiel: I'm mostly quoting sorear++ on that
19:00 TimToady it didn't really support multi dispatch, for one
19:01 TimToady and there were some type issues that may or may not have been helped by the GLR
19:01 TimToady but we weren't ready for that
19:01 masak TimToady, ShimmerFairy: I can see a use case for `has $!attr is readonly = init-val();` for having a kind of "constant attribute", initialized once at construction and then never changing. I don't think "big class" and "mistrust" are the only causes.
19:01 flussence istr niecza did some things *very* well compared to rakudo... but some others not at all
19:02 TimToady there was certainly a lot of good art there
19:02 TimToady m: class Indiana { has $.pi ::= 3 }; say Indiana.new.pi
19:03 camelia rakudo-moar 4b5e19: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FXWlrnIrT7␤Cannot use ::= to initialize an attribute␤at /tmp/FXWlrnIrT7:1␤------> 3class Indiana { has $.pi ::= 3 7⏏5}; say Indiana.new.pi␤»
19:03 ShimmerFairy I still personally think "is readonly" should be the opposite of "is rw", if it even stays around.
19:03 TimToady that oughta be made to work
19:03 jaffa4 timbunce:  unsolvable?
19:03 * masak submits NYI rakudobug
19:04 TimToady tab completion is unsolvable, yes :P
19:04 jaffa4 TimToady: no, niecza problems?
19:04 TimToady where there's a will, there's a way
19:05 TimToady but so far, there's no will
19:05 jaffa4 agree
19:06 TimToady there's plenty of "will" here, but it's mostly aimed at getting something out by Christmas
19:07 TimToady and MoarVM is the only one we've promised to target by then
19:08 jaffa4 Sorry not September?
19:08 TimToady September is beta
19:08 TimToady or "birthday" :)
19:08 jaffa4 Is it now beta now?
19:08 TimToady it's "advent", er, alpha now
19:09 TimToady beta implies we pretty much have the language nailed down, and we can't say that till after the GLR
19:09 TimToady errands &
19:41 AlexDaniel there is not much time till September though
19:42 ShimmerFairy While I'm thinking about it, I'm curious as to why people here tend to use Markdown instead of Pod6 (or even POD); I wonder if any of said reasons are things that can be improved upon for Pod6.
19:42 AlexDaniel ShimmerFairy: does github support pod6?
19:42 ShimmerFairy nope
19:43 AlexDaniel isn't it the reason?
19:43 vendethiel ShimmerFairy: I don't need something complicated :)
19:44 ShimmerFairy AlexDaniel: that could certainly be one of the reasons, but it's too easy to come up with :P
19:45 vendethiel ref regarde le talk ;D
19:46 masak ShimmerFairy: if you ask me, the best thing that could happen to Pod6 would be if it became Markdown. :)
19:46 ShimmerFairy masak: I'm actually not a fan of Markdown though; not enough power to it :)
19:50 b2gills I have grown accustomed to Markdown from all of the answers I wrote on StackOverflow ( I know of quite a few tricks to get it to format the way I want it too )
19:50 mst ingy's KWIM is interesting
19:51 mst since it's basically the result of him using markdown for a while and then getting angry at the missing features
19:52 b2gills Actually [I][] really like that [you][I] can do this with Markdown, and be able to update all of the links at once.␤[I]: http://example.com "tooltip"
19:52 b2gills Which you can't in POD
19:55 bin_005 joined #perl6
19:56 b2gills I also tend to write it in emails, and if you paid attention you would note that I even do some of that here with `code blocks`
19:58 kaare__ joined #perl6
19:58 flussence I've tried using AsciiDoc and ReStructuredText too, but there's too many weird minor details to take in
19:59 flussence (sometimes I'd rather give up and write abbreviated HTML)
20:00 b2gills Really for quick throw some text up with some minor formatting Markdown is quite usable. ( It also supports a subset of HTML, which I have had to use for some MetaStackExchange posts )
20:01 * nebuchadnezzar like org-mode o/
20:02 b2gills I would like to see POD6 be well supported as well of course.
20:07 DrForr Shrug, I'm still old-school enough that I'd like to see LP revived :)
20:08 timotimo LP? when i read that i either think vinyl or Let's Play
20:11 Sqirrel joined #perl6
20:26 * masak looks up kwim
20:26 masak "Due to a certain unfortunate homonym, Kwim has been replaced by (renamed to) Swim."
20:26 masak I... see.
20:27 * masak looks up Swim
20:32 masak I don't immediately see what in Swim is supposed to make me like it better than Markdown.
20:32 masak it converts to many formats. well, thanks to pandoc++, so does Markdown.
20:39 inokenty joined #perl6
20:43 rurban joined #perl6
20:44 japhb .tell tadzik I think you broke Panda.pm with commit 0e2cda5ae9723920dd93103511a98419dd53e800  ($p is now undeclared in that method)
20:44 yoleaux japhb: I'll pass your message to tadzik.
20:50 llfourn joined #perl6
20:54 masak .tell tadzik PR'd you with a fix: https://github.com/tadzik/panda/pull/187
20:54 yoleaux masak: I'll pass your message to tadzik.
20:54 masak (pls check that it's right -- I just did the obvious thing)
21:13 atroxaper joined #perl6
21:27 amurf joined #perl6
21:31 tadzik ooops
21:31 yoleaux 20:44Z <japhb> tadzik: I think you broke Panda.pm with commit 0e2cda5ae9723920dd93103511a98419dd53e800  ($p is now undeclared in that method)
21:31 yoleaux 20:54Z <masak> tadzik: PR'd you with a fix: https://github.com/tadzik/panda/pull/187
21:32 tadzik I think it is
21:33 masak yeah, it looked right.
21:37 RabidGravy boom
21:54 lucasb tadzik, masak: Two more mentions of the $p variable remained
21:59 tadzik argh
22:01 tadzik grrr
22:02 flussence .oO( note to self: remove ungreppable variable names from own code )
22:02 hoelzro tadzik: I fixed those in #188
22:02 hoelzro I can reopen, if you'd like
22:02 AlexDaniel "Modules interact with each other through named entities called symbols. The operation that makes symbols from a module available to another module is called import while the operation of using such a name is called import."
22:03 AlexDaniel copy-pasta?
22:03 AlexDaniel "is called import" twice, it seems like the first one should be "export" ?
22:10 masak AlexDaniel: looks like.
22:12 japhb .tell jnthn Happened to see the link to your S17 supply/whenever proposal.  I like it in general -- which is to say, I'd probably need to code a bit with it to find the holes if any.
22:12 yoleaux japhb: I'll pass your message to jnthn.
22:13 japhb Any other big proposals this week?  I was mostly-to-completely AFK for several days.
22:13 japhb *proposals/changes
22:13 Sqirrel joined #perl6
22:13 * masak proposed to japhb several times during the week, but took the complete silence as a big snub :P
22:15 khw joined #perl6
22:17 masak but yes, https://gist.github.com/jnthn/a56fd4a22e7c43080078 looks very exciting.
22:26 * masak also loves how `race` and `hyper` fit into the `whenever` picture
22:29 sivoais joined #perl6
22:32 tadzik hoelzro: wihc those?
22:33 tadzik er
22:33 tadzik which 188?
22:33 masak this is why we url
22:35 TEttinger joined #perl6
22:45 timotimo let's all url
22:48 timotimo what were we talking about?
22:50 Ben_Goldberg joined #perl6
22:52 tadzik this is how we url
22:57 yqt joined #perl6
23:00 telex joined #perl6
23:00 hoelzro tadzik: https://github.com/tadzik/panda/pull/188
23:00 hoelzro just reopened
23:01 atroxaper joined #perl6
23:02 xiaomiao joined #perl6
23:14 jo_ joined #perl6
23:18 xiaomiao joined #perl6
23:36 tadzik thanks! :)
23:50 hoelzro no problem!
23:51 llfourn joined #perl6
23:55 mattp_ joined #perl6
23:58 hoelzro tadzik: another PR for you: https://github.com/tadzik/panda/pull/189

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

Perl 6 | Reference Documentation | Rakudo