Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-01-05

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 AlexDaniel I don't really see any reason why it cannot work with $x ~~
00:00 AlexDaniel this LTA error message is trying to say something but honestly I don't get it
00:00 AlexDaniel oh, and it's just a warning
00:03 AndyDee joined #perl6
00:04 AlexDaniel and given that I'm not the first person to try this I think that I'll just submit a bug report. Well, if I'm asking for something wrong then it can always be closed with some justification :)
00:06 Ben_Goldberg joined #perl6
00:07 timotimo it's telling you that S/o/u/ will return a string
00:07 timotimo but unless your substitution doesn't do any change at all, it won't smartmatch afterwards
00:07 timotimo if it does no change, it was useless in the first place :P
00:08 AlexDaniel oooooh
00:09 timotimo literally
00:09 timotimo the smart match with S/// can never succeed
00:09 timotimo and that's because the subsequent string match will fail
00:09 AlexDaniel hahaha
00:10 AlexDaniel timotimo: perhaps we can add little timotimo to this warning
00:10 timotimo the error message could suggest "given", though
00:10 AlexDaniel so that he can explain that to people like me…
00:10 timotimo if i get teleported to the programmer when such an error occurs, i may be able to get to know a lot of nice people at their most irritated moments ...
00:11 mcmillhj_ joined #perl6
00:11 AlexDaniel so, basically what you are saying is that “S///” is executed alone and then the result is smartmatched, right?
00:12 AlexDaniel why don'twe see the same thing happening with $x ~~ s/// ?
00:12 timotimo yeah
00:12 timotimo because s/// mutates rather than returning a copy
00:12 timotimo that way it has a direction to shove the result off to
00:12 AlexDaniel riiight
00:12 timotimo other than returning, what cat S/// do when it doesn't mutate?
00:14 AlexDaniel … can't it just shove the result through smartmatch?
00:14 timotimo "through"?
00:14 AlexDaniel yeah, so that the smartmatch returns a string
00:15 AlexDaniel as weird as it sounds, but it's not like smartmatch is limited to some datatype
00:15 timotimo that's how matches with :g return whole lists
00:15 Zoffix I had the same problem with S///. The error tells me nothing about how to use it properly and I couldn't find it in the docs
00:16 timotimo mhm
00:16 adu joined #perl6
00:16 AlexDaniel yeah, so that's who it was :)
00:16 timotimo so a suggestion for "given" like alex showed, would that help enough?
00:16 AlexDaniel well, a DWIM solution would be to make it return a string…
00:17 AlexDaniel I mean the whole smartmatch in this case
00:17 Zoffix zwu, a capture
00:17 AlexDaniel perhaps that's ugly in some other sense, but at least that's what I would expect as a user
00:17 timotimo hmpf. how do we actually do that and still make it work in other cases?
00:17 Zoffix zwu, http://doc.perl6.org/type/Capture
00:18 timotimo i mean, if it returns a Str that can also handle smart match, that'll be a weird string to keep around
00:18 AlexDaniel timotimo: are there any other cases when you do ~~ S/// ?
00:18 AlexDaniel ah
00:18 Zoffix "Smartmatch with S/// can never succeed because the string it returns on successful match will fail"
00:18 Zoffix or something like that
00:18 timotimo i wouldn't mention "successful match"
00:18 Zoffix the "subsequent" is what I have issue parsing
00:19 timotimo maybe "successful substitution"?
00:19 Zoffix sure
00:19 Zoffix m: ('hack Perl6', 'play warframe').pick
00:19 camelia rakudo-moar 49fcd5: ( no output )
00:19 Zoffix m: ('hack Perl6', 'play warframe').pick.say
00:19 camelia rakudo-moar 49fcd5: OUTPUT«hack Perl6␤»
00:19 Zoffix Dammit. Now I'll never know what the first answer was :P
00:19 timotimo cool.
00:20 timotimo i have an off-topic question ...
00:20 Zoffix Whatisit?
00:20 woodruffw joined #perl6
00:20 timotimo am i the only one who constantly gets very bad buffering in the steam shop's video widget?
00:20 Zoffix My buffering's fine
00:20 timotimo like, i haven't been able to watch a single video in the shop from start to finish without waiting at least as long as the video itself is for it to buffer
00:21 Zoffix :o
00:21 Zoffix No, definitely not like that forme
00:24 jack_rabbit joined #perl6
00:26 xdg joined #perl6
00:26 xdg what's the equivalent of "perldoc"?  Is is the "p6doc" module?
00:27 leont perl6 --doc, I think
00:27 mcmillhj_ joined #perl6
00:28 xdg `perl6 --doc say` ---> "Could not open say. Failed to stat file: no such file or directory"
00:28 timotimo perl6 --doc is how you extract the documentation out of a file
00:29 timotimo you want to run p6doc, i think that's what the script is called
00:29 timotimo but then you need to install the module that has it
00:30 dalek rakudo/nom: ac4f9f8 | timotimo++ | src/Perl6/Actions.nqp:
00:30 dalek rakudo/nom: Make ~~ S/// message a bit simpler and more helpful
00:30 dalek rakudo/nom:
00:30 dalek rakudo/nom: Zoffix++, AlexDaniel++
00:30 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ac4f9f8fe4
00:30 AlexDaniel ahhh
00:30 xdg hmm... is this a rakudobrew thing or a rakudo thing or a perl6 thing about $0?  https://www.dropbox.com/s/9q677dso9p103en/Screenshot%202016-01-04%2019.30.01.png?dl=0
00:31 xdg And "perl6 --doc" just drops me into the REPL with no error
00:31 * AlexDaniel deletes a huge text for a bug report that he has just crafted
00:31 AlexDaniel timotimo++…
00:31 AlexDaniel yeah, the fix was easier than a bug report
00:33 timotimo xdg: yeah, it'll run the repl in "doc extraction" mode for you
00:33 timotimo helpful, eh?
00:33 timotimo yeah, totally.
00:33 timotimo the filename thing is a rakudo thing
00:33 timotimo about how we install things and fail to give the pre-uniquified name
00:35 xdg timotimo, where should bugs/usage-snafus be reported?
00:36 xdg The uniquification is particularly nasty in stack traces.  E.g. https://www.dropbox.com/s/qeiz17arobp846z/Screenshot%202016-01-04%2019.35.47.png?dl=0
00:36 timotimo yeah. no need to report it, i think it happens everywhere and we know :|
00:38 AlexDaniel xdg: you mean that the stacktrace is unreadable because of the hashes instead of filenames?
00:38 timotimo yeah
00:38 AlexDaniel or the “already installed” problem
00:38 xdg AlexDaniel, (a) exception on "already installed" is surprising; (b) hashes instead of filenames is confusing
00:39 AlexDaniel xdg: b) https://rt.perl.org/Public/Bug/Display.html?id=126908
00:39 peter__ joined #perl6
00:39 xdg glad there's a ticket
00:40 AlexDaniel xdg: not that it helped much. We just need somebody to work on it, I guess
00:40 xdg lots of rough edges still, I guess
00:40 timotimo especially the new precompilation code is rather new
00:41 timotimo landed very soon before the 2015.12 release
00:41 n0tjack joined #perl6
00:41 AlexDaniel xdg: for a) there is this report which is somewhat associated: https://github.com/tadzik/panda/issues/274
00:42 AlexDaniel xdg: ah, here is the right one: https://github.com/tadzik/panda/issues/269
00:42 xdg ah, mst is on the case
00:43 mohij joined #perl6
00:43 AlexDaniel xdg: anyway, ugly stacktraces is a rakudo problem because rakudo does the precompilation
00:43 AlexDaniel xdg: and “already installed” thing is a panda problem
00:44 AlexDaniel that's to answer your question “where should bugs/usage-snafus be reported?”
00:44 xdg (sigh) `p6doc p6doc` --> "Cannot locate p6doc in any of the following paths:..."
00:44 timotimo urgh :)
00:46 xdg I'm getting the sense that I should just toss out any p5 expectations.
00:47 xdg does no one who works on p6 regularly read command line docs the way p5 people use perldoc?
00:47 laouji joined #perl6
00:48 gfldex xdg: you have answered that question yourself already
00:48 gfldex we can't read what isn't there
00:49 TimToady a lot of work has gone into the docs, but they certainly aren't complete yet, and the web interface was given priority over command-line
00:50 xdg TimToady, o/
00:50 timotimo aye, especially since you can check out the web interface version of the docs even when you didn't get yourself a rakudo yet
00:51 TimToady and vendors rarely give you the command-line docs anyway unless you do something special
00:52 TimToady and yes, it's not really Unix-think :)
00:53 TimToady it's one of those different mistakes we decided to make this time, where the definition of 'decided' doesn't have much consciousness attached to it :)
00:53 n0tjack joined #perl6
00:53 TimToady what you have currently is a summing up of what 800 people decided to work on over 15.5 years :)
00:54 bpmedley joined #perl6
00:55 TimToady the next 800 people will likely work on what they want instead :)
00:55 AlexDaniel m: say DateTime.now.earlier(years => 15.5)
00:55 camelia rakudo-moar ac4f9f: OUTPUT«2031-01-05T01:55:56.631077+01:00␤»
00:56 AlexDaniel what?
00:56 AlexDaniel hmmm WHAT?
00:56 AlexDaniel is it 2046 already?
00:57 TimToady speaking of different mistakes...
00:57 AlexDaniel m: say DateTime.now.earlier(years => 15)
00:57 camelia rakudo-moar ac4f9f: OUTPUT«2031-01-05T01:57:22.872850+01:00␤»
00:57 gfldex m: say DateTime.now.earlier(years => 1)
00:57 camelia rakudo-moar ac4f9f: OUTPUT«2017-01-05T01:57:23.861752+01:00␤»
00:57 AlexDaniel wtf :DD
00:57 TimToady sign wrong?
00:57 gfldex time arrow points the wrong way it seams
00:57 gfldex m: say DateTime.now.earlier(years => -1)
00:57 camelia rakudo-moar ac4f9f: OUTPUT«2015-01-05T01:57:42.487076+01:00␤»
00:57 AlexDaniel m: say DateTime.now.later(years => 15)
00:57 camelia rakudo-moar ac4f9f: OUTPUT«2031-01-05T01:57:47.730487+01:00␤»
00:57 llfourn joined #perl6
00:57 AlexDaniel m: say DateTime.now.earlier(years => 15)
00:57 camelia rakudo-moar ac4f9f: OUTPUT«2031-01-05T01:57:52.358746+01:00␤»
00:57 TimToady I guess we only tested later :)
00:58 gfldex m: say DateTime.now.later(years => -1)
00:58 camelia rakudo-moar ac4f9f: OUTPUT«2015-01-05T01:58:19.012859+01:00␤»
00:58 AlexDaniel ehhh… anybody going to fix it right now?
00:58 gfldex m: say DateTime.now.later(years => 1)
00:58 camelia rakudo-moar ac4f9f: OUTPUT«2017-01-05T01:58:25.178936+01:00␤»
00:58 AlexDaniel gfldex: later with negative numbers is also a very interesting thing
00:58 gfldex nagative later is a workaround it seams
00:58 * TimToady suspects this one has to get fixed "retroactively" as it were
00:59 yeahnoob joined #perl6
00:59 gfldex from the standpoint of the current earlier implementation is has been fixed already
00:59 AlexDaniel yes, it was working earlier
01:00 TimToady that one needs a big fat RT just so we can hold it up as an example to past generations
01:00 AlexDaniel sure
01:03 TimToady it would appear there is no test for earlier with a years argument
01:03 TimToady we test seconds, minutes, hours, days, and weeks though, so that's something
01:03 AlexDaniel m: say DateTime.now.earlier(days => 30)
01:03 camelia rakudo-moar ac4f9f: OUTPUT«2015-12-06T02:04:01.942518+01:00␤»
01:04 AlexDaniel haha
01:04 TimToady m: say DateTime.now.earlier(days => 365.24 * 15.5)
01:04 camelia rakudo-moar ac4f9f: OUTPUT«2000-07-06T02:04:35.300058+01:00␤»
01:04 TimToady a veritable workaround!
01:04 AlexDaniel right
01:06 zwu thanks. Capture is cool!
01:06 TimToady m: say Capture ~~ Cool
01:06 camelia rakudo-moar ac4f9f: OUTPUT«False␤»
01:06 TimToady no it ain't :P
01:07 AlexDaniel It is probably not fat enough but there you go: https://rt.perl.org/Public/Bug/Display.html?id=127160
01:07 TimToady thanks
01:07 BenGoldberg joined #perl6
01:07 dalek roast: 295f51d | skids++ | S06-multi/value-based.t:
01:07 dalek roast: Add tests for RT's 127025 127024 127129, with a couple fudges
01:07 dalek roast: review: https://github.com/perl6/roast/commit/295f51d281
01:08 kid51_ joined #perl6
01:08 peter__ joined #perl6
01:08 AlexDaniel sooo… what about negative amounts
01:09 n0tjack joined #perl6
01:10 AlexDaniel m: say DateTime('2016-03-30')
01:10 camelia rakudo-moar ac4f9f: OUTPUT«Cannot find method 'DateTime'␤  in block <unit> at /tmp/77c7cMSSsg line 1␤␤»
01:10 AlexDaniel hmm *method* 'DateTime'
01:12 AlexDaniel m: say DateTime.new(‘2016-01-31T05:00:00Z’).earlier(months => -1)
01:12 camelia rakudo-moar ac4f9f: OUTPUT«Month out of range. Is: 0, should be in 1..12␤  in block <unit> at /tmp/CfLpbWf_RV line 1␤␤»
01:13 AlexDaniel err?
01:13 AlexDaniel m: say DateTime.new(‘2016-01-31T05:00:00Z’).earlier(years => -1)
01:13 camelia rakudo-moar ac4f9f: OUTPUT«2015-01-31T05:00:00Z␤»
01:13 AlexDaniel m: say DateTime.new(‘2016-01-31T05:00:00Z’).earlier(days => -1)
01:13 camelia rakudo-moar ac4f9f: OUTPUT«2016-02-01T05:00:00Z␤»
01:13 AlexDaniel m: say DateTime.new(‘2016-01-31T05:00:00Z’).earlier(seconds => -1)
01:13 camelia rakudo-moar ac4f9f: OUTPUT«2016-01-31T05:00:01Z␤»
01:14 AlexDaniel m: say DateTime.new(‘2016-01-31T05:00:00Z’).later(seconds => -1)
01:14 camelia rakudo-moar ac4f9f: OUTPUT«2016-01-31T04:59:59Z␤»
01:14 AlexDaniel m: say DateTime.new(‘2016-01-31T05:00:00Z’).later(months => -1)
01:14 camelia rakudo-moar ac4f9f: OUTPUT«Month out of range. Is: 0, should be in 1..12␤  in block <unit> at /tmp/jdJBjXGCdA line 1␤␤»
01:14 AlexDaniel so you can't go 24 months forward?
01:16 BenGoldberg skids, You should also have a dies-ok test, for when you try to have a class which composes two different roles with conflicting constrained methods... Say, role BB { multi method f(3) { 33 } }; dies-ok { class C7 does B does BB };
01:16 peter__ joined #perl6
01:16 skids BenGoldberg: good point
01:16 TimToady m: class Foo {}; say Foo("bar")
01:16 camelia rakudo-moar ac4f9f: OUTPUT«Cannot find method 'Foo'␤  in block <unit> at /tmp/CKAbMyOuSL line 1␤␤»
01:17 TimToady that's what's going on there
01:17 TimToady it knows Foo is a type, so it figures string must have a coercion to Foo type, which is bogus
01:18 TimToady it's basically assuming that any Foo type that has no coercion from string will have monkey-typed Str, is why it's bogus
01:18 skids BenGoldberg: oh actually, there's never a conflict.
01:19 BenGoldberg Why not?
01:19 skids Because signatures cannot be asked to solve the halting problem
01:19 TimToady they can, but they might not answer...
01:20 Ch0c0late joined #perl6
01:20 BenGoldberg m: role B { multi method f(3) { 3 } }; role BB { multi method f(3) { 33 } }; class C does B does BB; say C.new.f(3);
01:20 camelia rakudo-moar ac4f9f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Fp27J6H8LE␤Too late for unit-scoped class definition;␤Please use the block form.␤at /tmp/Fp27J6H8LE:1␤------> 3d f(3) { 33 } }; class C does B does BB;7⏏5 say C.new.f(3);␤»
01:20 BenGoldberg m: role B { multi method f(3) { 3 } }; role BB { multi method f(3) { 33 } }; class C does B does BB {}; say C.new.f(3);
01:20 camelia rakudo-moar ac4f9f: OUTPUT«33␤»
01:20 BenGoldberg m: role B { multi method f(3) { 3 } }; role BB { multi method f(3) { 33 } }; class C does BB does B {}; say C.new.f(3);
01:20 camelia rakudo-moar ac4f9f: OUTPUT«3␤»
01:21 skids Though if it is later decided that using a where clause to implement the value constraint is cheating, it could be done.
01:21 skids m: sub a(3) { }; &a.signature.say
01:21 camelia rakudo-moar ac4f9f: OUTPUT«(Int $ where { ... })␤»
01:22 AndyDee joined #perl6
01:22 AlexDaniel m: say DateTime.new(‘2016-02-29T05:00:00Z’).later(years => -1)
01:22 camelia rakudo-moar ac4f9f: OUTPUT«2015-02-28T05:00:00Z␤»
01:22 AlexDaniel m: say DateTime.new(‘2016-02-29T05:00:00Z’).later(years => -1, days => 1)
01:22 camelia rakudo-moar ac4f9f: OUTPUT«More than one time unit supplied␤  in block <unit> at /tmp/FhINrn8K5I line 1␤␤»
01:22 AlexDaniel pfffffffft
01:23 TimToady that's by design
01:23 AlexDaniel well, it makes sense because order matters
01:23 TimToady you have to stack .later for that
01:23 BenGoldberg m: say DateTime.new(‘2016-02-29T05:00:00Z’).later([ years => -1, days => 1 ])
01:23 camelia rakudo-moar ac4f9f: OUTPUT«Too many positionals passed; expected 1 argument but got 2␤  in block <unit> at /tmp/J28gnKqZzU line 1␤␤»
01:24 TimToady say wot?
01:25 AlexDaniel “Instead of taking low quality medication try visiting our really trusted and popular pharmacy!”
01:26 AlexDaniel could have been a nice title for a bug report about wrong sign in DateTime.earlier(years => …)
01:26 AlexDaniel anyway: https://rt.perl.org/Public/Bug/Display.html?id=127161
01:28 AlexDaniel if anybody wants to submit one hunder bug reports then go search for bugs in DateTime. I'm sure that you can do it in a week or so
01:29 n0tjack joined #perl6
01:29 peter__ joined #perl6
01:31 AlexDaniel by the way, is there any way I can manage my bug reports myself? e.g. close them
01:31 flussence why does .later allow "year" and "years", but DateTime.new doesn't?
01:31 AlexDaniel flussence: that's one
01:33 AlexDaniel m: say DateTime.new(years => 25)
01:33 camelia rakudo-moar ac4f9f: OUTPUT«Cannot make a DateTime object using .new␤  in block <unit> at /tmp/39unjgUFR4 line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/39unjgUFR4 line 1␤␤»
01:34 AlexDaniel m: say DateTime.new(year => 2015, month => 1, day => 25);
01:34 camelia rakudo-moar ac4f9f: OUTPUT«2015-01-25T00:00:00Z␤»
01:34 AlexDaniel m: say DateTime.new(year => 2015, month => 1);
01:34 camelia rakudo-moar ac4f9f: OUTPUT«2015-01-01T00:00:00Z␤»
01:35 AlexDaniel m: say DateTime.new();
01:35 camelia rakudo-moar ac4f9f: OUTPUT«Cannot make a DateTime object using .new␤  in block <unit> at /tmp/9_WkH1deQg line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/9_WkH1deQg line 1␤␤»
01:35 AlexDaniel m: say DateTime.new(year => -9⁹);
01:35 camelia rakudo-moar ac4f9f: OUTPUT«-387420489-01-01T00:00:00Z␤»
01:35 AlexDaniel m: say DateTime.new(years => -9⁹);
01:35 camelia rakudo-moar ac4f9f: OUTPUT«Cannot make a DateTime object using .new␤  in block <unit> at /tmp/DsgP3DYMsL line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/DsgP3DYMsL line 1␤␤»
01:35 AlexDaniel m: say DateTime.new(year => -9⁹).later(years => 9⁹);
01:35 camelia rakudo-moar ac4f9f: OUTPUT«0000-01-01T00:00:00Z␤»
01:36 AlexDaniel flussence: once upon a time somebody noticed exactly the same issue. I mean, that “Xs” variant was not allowed somewhere else
01:37 AlexDaniel flussence: and then it was decided that we should remove “years” and stuff like that from everywhere
01:37 AlexDaniel at least that's how I remember it, I could be wrong
01:37 AlexDaniel I remember lizmat commits that removed some of those… I'm not sure if there was any final decision though (and if those were reverted)
01:39 AlexDaniel flussence: are you going to submit a bug report?
01:39 AndyDee joined #perl6
01:39 flussence I don't care enough about the date stuff to get involved :)
01:42 AlexDaniel flussence: well… me too. But I guess that somebody has to do it, so I think that I'll just submit it
01:45 AlexDaniel m: say DateTime.new(years => -50).later(years => 50);
01:45 camelia rakudo-moar ac4f9f: OUTPUT«Cannot make a DateTime object using .new␤  in block <unit> at /tmp/iztv4txQHa line 1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp line 3041␤  in block <unit> at /tmp/iztv4txQHa line 1␤␤»
01:47 skids AlexDaniel: if you have enough permissions on RT to login and comment on RTs through the web interface you may be able to close them while making a comment by selecting "resolved" from the dropdown.
01:48 AlexDaniel I don't think that I have such permissions
01:49 AlexDaniel anyway: https://rt.perl.org/Public/Bug/Display.html?id=127162
01:52 AlexDaniel skids: I've tried creating an account once but RT becomes unusable once you login
01:53 Juerd I've found that the only realistic way of interacting with RT is to send emails. Unfortunately that only works on threads you started.
01:53 skids AlexDaniel: yeah I have  to log in/out al the time so I can search outside my own tickets.
01:54 AlexDaniel Juerd: I figured that you can write comments by sending emails too
01:54 AlexDaniel Juerd: just include [perl #127162] in the title and boom…
01:54 Juerd Oh, that's great
01:54 AlexDaniel VERY intuitive
01:55 Juerd Well, it doesn't need to be intuitive. Anything that doesn't make me angry is better than trying to log in.
01:55 AlexDaniel it makes me angry. I'd much rather login than have to do that stuff with emails
01:55 Juerd I feel very comfortable with email
01:56 AlexDaniel I've also figured a way to see all my bug reports
01:56 AlexDaniel here's a link to bookmark: https://rt.perl.org/Public/Search/Simple.html?q=alex.jakimenko%40gmail.com+any
01:56 Juerd :)
01:56 AlexDaniel it will yell about CSRF but just click “click here to resume your request”
01:57 Juerd RT used to be great. I used to have it for my web hosting business. I don't understand what exactly is wrong with the one on rt.perl.org, but I'm quite convinced that the whole bitcard thing is part of the issue.
01:57 [Coke] jnthn: lots of stmop
01:58 xpen joined #perl6
01:58 llfourn joined #perl6
02:01 Actualeyes joined #perl6
02:01 [Coke] bitcard is for auth; that's it. If your problem isn't with auth, I'd be surprised if the problem is with bitcard.
02:04 Juerd My problem is mainly with authentication.
02:04 [Coke] there is a ticket queue for RT itself, btw; I've found the perl rt admins quite responsive when asked.
02:05 Juerd Apparently the user 'juerd' exists, but I can't reset the password for it. When you create a new user account, it needs an email address that's never been seen by the system before.
02:05 Juerd That's when I just gave up.
02:07 [Coke] For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org
02:07 [Coke] ^^ I'd email them.
02:08 japhb jnthn++  # 6guts post
02:08 molaf_ joined #perl6
02:11 Juerd [Coke]: When I find a system very frustrating, I try not to use it. In this case, using the system that annoys me to report that it annoys me seems like a good way to ruin my day :)
02:12 gfldex where is the doc for META.info?
02:12 kaare_ joined #perl6
02:12 gfldex found it
02:13 atweiden joined #perl6
02:18 Actualeyes left #perl6
02:18 japhb m: role Foo { has $.s = 42; has @.a = 7, 8, 9; }; class Bar does Foo { }; class BarDate is Date does Foo { }; dd
02:18 camelia rakudo-moar ac4f9f: OUTPUT«block <unit>␤»
02:18 japhb m: role Foo { has $.s = 42; has @.a = 7, 8, 9; }; class Bar does Foo { }; class BarDate is Date does Foo { }; dd Bar.new.a; dd BarDate.today.a;
02:18 camelia rakudo-moar ac4f9f: OUTPUT«Array @!a = [7, 8, 9]␤Array @!a = []␤»
02:19 japhb Anyone have any idea why ^^ is happening?
02:19 [particle] joined #perl6
02:20 gfldex BarDate.today returns a new object that is of the wrong type
02:20 gfldex or the right type, depends on how you see it
02:20 gfldex m: role Foo { has $.s = 42; has @.a = 7, 8, 9; }; class Bar does Foo { }; class BarDate is Date does Foo { }; dd Bar.new.a; dd Bar.today.a;
02:20 camelia rakudo-moar ac4f9f: OUTPUT«Array @!a = [7, 8, 9]␤Method 'today' not found for invocant of class 'Bar'␤  in block <unit> at /tmp/WFIIjIxEW3 line 1␤␤»
02:20 gfldex m: role Foo { has $.s = 42; has @.a = 7, 8, 9; }; class Bar does Foo { }; class BarDate is Date does Foo { }; dd Bar.new.a; dd BarDate.new.today.a;
02:20 camelia rakudo-moar ac4f9f: OUTPUT«Array @!a = [7, 8, 9]␤Cannot make a BarDate object using .new␤  in block <unit> at /tmp/afkTiZ_W4I line 1␤␤Actually thrown at:␤  in any  at gen/moar/m-Metamodel.nqp line 3041␤  in block <unit> at /tmp/afkTiZ_W4I line 1␤␤»
02:21 japhb gfldex: But clearly whatever it's returning has an (uninitialized) @!a field ....
02:23 gfldex that must mean it's calling the constructor of Date but not Foo
02:24 japhb Oh, I wonder if this is a side effect of lizmat's optimizations
02:25 Zoffix joined #perl6
02:31 Zoffix m: sub foo { 'meow' ~~ /$<foo>=(meow)/; say "(\$<foo> is now $<foo>)"}; 'foobar' ~~ /$<foo>=(foo) $<bar>=(bar)/; say $<foo bar>; foo; say $<foo bar>
02:31 camelia rakudo-moar ac4f9f: OUTPUT«(「foo」 「bar」)␤($<foo> is now meow)␤(「foo」 「bar」)␤»
02:32 Zoffix This is neat. I kinda went it with an assumption that $<whatever> would get clobbered by the next regex match, but it DWIM! :D
02:36 colomon_ joined #perl6
02:41 cdg joined #perl6
02:46 sprocket_ joined #perl6
02:47 secwang joined #perl6
02:48 Zoffix m: sub foo { ^2 }; my @facts = foo or fail 'Nada';
02:48 camelia rakudo-moar ac4f9f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/sJS_o9IZAb␤Undeclared routine:␤    or used at line 1␤␤»
02:48 Zoffix m: sub foo { ^2 }; my @facts = foo() or fail 'Nada';
02:48 camelia rakudo-moar ac4f9f: ( no output )
02:48 Zoffix Weird, eh?
02:49 gtodd hmm so if Perl6.z  is ever needed there's a holiday called "Zarathosht Diso"
02:49 Juerd Zoffix: $/ is lexical, so the sub has its own.
02:49 Zoffix Juerd, cool
02:50 Zoffix m: fail or fail;
02:50 camelia rakudo-moar ac4f9f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_93RbEmClx␤Undeclared routine:␤    or used at line 1␤␤»
02:50 sgt_baker joined #perl6
02:51 autogen Hey guys, I've been reading through rakudo source, and I must comment on how impressed I am
02:51 autogen It's extremely clear, concise, and great to learn from
02:51 Zoffix m: fail && fail;
02:51 camelia rakudo-moar ac4f9f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/U_9D2pIK_l␤Two terms in a row␤at /tmp/U_9D2pIK_l:1␤------> 3fail &&7⏏5 fail;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        state…»
02:52 diakopter which repos? rakudo, nqp, or moarvm?
02:52 [Coke] autogen: thanks.
02:52 gtodd so if roast changes occur every 10-15 years the Perl6 spec could go on for 100s of years
02:52 [Coke] nite, everyone.
02:52 Zoffix night
02:52 Juerd Good night
02:52 autogen [Coke]: is this your doing? :D
02:53 gtodd m: say "can  you do Inline::Perl5"
02:53 camelia rakudo-moar ac4f9f: OUTPUT«can  you do Inline::Perl5␤»
02:53 gtodd m: use Inline::Perl5
02:53 camelia rakudo-moar ac4f9f: OUTPUT«===SORRY!===␤Could not find Inline::Perl5 in:␤    /home/camelia/.perl6/2015.12-96-gac4f9f8␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤   …»
02:53 gtodd ok :)
02:53 Zoffix autogen, I think the release credits have about 900 people :P
02:54 autogen Zoffix: my initial thought, but hey, my gratitude is up for grabs :)
02:54 autogen All I wanted for x-mas was Perl6.
02:54 * autogen is happy.
02:56 Zoffix Filed: https://rt.perl.org/Ticket/Display.html?id=127163
02:57 Zoffix star: use Inline::Perl5;
02:57 camelia star-m 2015.09: OUTPUT«===SORRY!===␤Could not find Inline::Perl5 in any of:␤  file#/home/camelia/.perl6/2015.09/lib␤  inst#/home/camelia/.perl6/2015.09␤  file#/home/camelia/star-2015.09/share/perl6/lib␤  file#/home/camelia/star-2015.09/share/perl6/vendor/lib␤  file#/home…»
02:57 Zoffix star: use Bailador
02:57 camelia star-m 2015.09: ( no output )
02:57 Zoffix gtodd, ^ well, that's supposed to have R*, but I guess IP5 failed to install
02:58 Zoffix oh, still 2015.09 >_<
02:58 gtodd ok
02:59 gtodd awwaiid: ... that's just soo ... https://gist.github.com/awwaiid/01fe0e56e2c1220548a1
02:59 Zoffix ahaha
02:59 Zoffix awwaiid++
03:00 llfourn joined #perl6
03:00 gtodd nuts! :-)  ... should be part of standard Perl6 install ;-)
03:00 gtodd errm rakudo
03:00 vendethiel joined #perl6
03:02 adu joined #perl6
03:05 Zoffix m: class Foo { method bar { return ^0; } }; Foo.new.bar or fail
03:05 camelia rakudo-moar ac4f9f: ( no output )
03:06 Zoffix m: class Foo { method bar { return (); } }; my $x = Foo.new.bar or fail; say $x ~~ True
03:06 camelia rakudo-moar ac4f9f: OUTPUT«Failed␤  in block <unit> at /tmp/FyBShztynR line 1␤␤»
03:06 Zoffix m: class Foo { method bar { return (); } }; my $x = Foo.new.bar; say $x ~~ True
03:06 camelia rakudo-moar ac4f9f: OUTPUT«True␤»
03:06 Zoffix whatshappening?
03:06 noganex joined #perl6
03:07 Zoffix ah
03:07 Zoffix m: say False ~~ True
03:07 camelia rakudo-moar ac4f9f: OUTPUT«True␤»
03:07 Zoffix I see
03:12 timotimo "smartmatch against True always matches"
03:12 timotimo m: say "hello" ~~ True
03:12 camelia rakudo-moar ac4f9f: OUTPUT«True␤»
03:12 timotimo there's a warning in Actions.nqp, but it doesn't seem to fire
03:12 timotimo m: my int $foo; say $foo ~~ True
03:12 camelia rakudo-moar ac4f9f: OUTPUT«True␤»
03:12 Juerd Zoffix: Did you want 'so $x' instead of $x ~~ True?
03:13 Juerd Or what did you expect $x ~~ True to do?
03:14 Zoffix Juerd, I thought ~~ was thinking $x was true so I was surprised the 'or fail' was executing
03:15 Zoffix mst, I'm starting to like coding P6 without highlights... It's so much easier to notice when your code is a mess ^_^
03:17 Juerd Zoffix: The problem with testing whether something "is true", is that True and False aren't the only true and false values, respectively. To test whether some value is Bool::True, your best bet is $x =:= True, but such a test doesn't make sense in actual software you'd write...
03:18 Juerd Regarding syntax highlighting... I really miss it on IRC and in the REPL.
03:18 psy_ joined #perl6
03:18 Juerd And in Vim it's far from perfect. It doesn't even understand things like "foo { bar("baz") }"
03:19 Zoffix It's totally broken in Sublime Text 2, so right now, this is what I'm staring at: http://i.imgur.com/cX2Frjw.png
03:20 Juerd Yeah, that does look like a mess. But so does anything with lots of inline regexes.
03:21 colomon_ joined #perl6
03:21 Juerd Could the if/elsif tree on %res<what> be a given/when?
03:21 Zoffix Juerd++ ah! my Perl5-ism
03:22 Juerd That would at least get rid of the repeated %res<what>, which contributes to the visual mess.
03:22 Zoffix Add a new indent level tho :(
03:22 protium joined #perl6
03:23 cpage_ joined #perl6
03:23 Juerd Another thing that clears up code a lot is to move your database queries to functions
03:23 Zoffix Already doing it
03:24 Zoffix We need an ORM :(
03:24 Juerd Ugly things don't look as ugly if they're grouped by kind :)
03:24 Zoffix heh
03:24 Juerd Regexes with regexes, sql with sql, etc.
03:26 Juerd This is why I don't clean my desk. Clutter doesn't look out of place amidst more clutter ;)
03:27 Juerd But I do group the kinds of clutter by appearance. Sheets of paper get stacked, pens and screwdrivers are sufficiently alike that they can go together, cables are together in one corner.
03:27 Juerd I keep discovering that I use a lot of the same patterns in code and in real life.
03:29 Juerd I hate cleaning up when I'm busy doing other things because it makes me lose focus, but in general I don't mind to clean up when I'm done with the other stuff. In code, I also tend to process data in a tight loop, and clean everything up afterwards instead of in the loop body.
03:29 Zoffix :)
03:30 Juerd Another pattern is that I hate boilerplate code, and I hate tasks that require preparation.
03:31 Juerd I want my tools nearby and ready for grabbing, not in toolboxes that I first need to fetch from a neatly organized rack.
03:31 Juerd Only if the tool is very specific it gets put in a box. General purpose stuff, however, is okay to "contaminate" my main workspace. Or namespace, in code.
03:35 gtodd feeds
03:36 gtodd I used to do this:
03:36 gtodd time perl6 -e 'my @arr := "/usr/share/dict/web2".IO.slurp.lines(:eager); @arr ==> grep({m/<<zygote>>/}) ==> my $stuff; say $stuff'
03:36 gtodd to see how snappy things were :)
03:37 gtodd but not I get "Type check failed in binding; expected Positional but got Seq"
03:37 gtodd errm now
03:37 gtodd is that a change from long ago GLR  ?
03:38 Zoffix @("/usr/share" ... :eager))
03:38 gtodd ok :)
03:40 Zoffix Seems to be cleaner with given/when and subs: https://gist.github.com/zoffixznet/662d9e8c923d97746b4e
03:41 timotimo :eager is gone already :)
03:41 timotimo it's also possibly a bit faster to do .lines than to do .slurp.lines
03:41 gtodd I was wondering when it started to fail ... I don't know why I didn't notice this not working  :-)
03:42 gtodd probably GLR and Xmas rush
03:42 timotimo also, if you want the old behavior of "i want to store this iterator", you'll assign to a $-sigiled var in today's code
03:43 timotimo so my $lines = "/usr/...".IO.lines; $lines ==> ...
03:43 gtodd hmm ok
03:43 timotimo i *would* suggest you use the shiny new hyper, but alas hyper and grep don't work together right now :(
03:43 Zoffix :(
03:43 cpage_ joined #perl6
03:43 timotimo i'm now daring enough to upgrade from fedora 22 to fedora 23
03:44 timotimo wish me luck!
03:44 Zoffix Good luck
03:44 hoelzro Hals und Beinbruck =)
03:44 Zoffix Didn't even realize they still made Fedora :)
03:44 Juerd Zoffix: Instead of ~$<foo>, you could have Str() in the signature instead of Str, and it will stringify whatever you give it.
03:44 * hoelzro doesn't know if that expression applies here
03:44 Zoffix I've used it once, just when it split off Red Hat
03:44 gtodd good lukc ... and don't worry there's always freebsd :)
03:44 Zoffix Juerd++ thanks
03:44 Zoffix Hm
03:44 Juerd Zoffix: I think that in many cases, Str() is a more logical thing to use than Str
03:45 timotimo Total download size: 3.4 G
03:45 timotimo oh lord
03:45 Zoffix But then why declare the sig at all?
03:45 Zoffix s/sig/type/
03:45 Zoffix I think the way I have it now will cry when I give it a non-string.
03:45 Zoffix Which can catch some bugs
03:45 Juerd Well, there are things that can't be stringified
03:46 Juerd m: sub foo (Str() $foo) { say $foo }; foo(-> { ... })
03:46 camelia rakudo-moar ac4f9f: OUTPUT«Block object coerced to string (please use .gist or .perl to do that)  in sub foo at /tmp/hX1gx1U8f3 line 1␤␤»
03:46 Zoffix K, gonna try using Str() and see how that stuff fairs
03:47 Juerd I don't like that you can't really use :D with Str(), not sure if that's a bug or a feature.
03:47 Juerd That is, the () appear to be ignored if you use :D
03:47 gfldex m: role Foo[::T where T ~~ Str] {}
03:47 camelia rakudo-moar ac4f9f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/12EWCmOpF4␤Cannot do non-typename cases of type_constraint yet␤at /tmp/12EWCmOpF4:1␤------> 3role Foo[::T where T ~~ Str7⏏5] {}␤»
03:47 gtodd hmn just naively goofing around with feeds  (==>) got slower but I'm likely doing it wrong
03:48 Juerd Zoffix: If you build your code specifically for this use case, you could also use Str(Match), in which case it will accept Str or Match, stringifying the latter.
03:48 gfldex and how do i do typename cases of type_contraint?
03:48 gtodd time perl6 -e 'my $arr = "/usr/share/dict/web2".IO.lines; $arr ==> grep({m/<<zygote>>/}) ==> my $stuff; say $stuff'  ... 27 seconds
03:48 gtodd :-\
03:48 cognominal m: my &[==] = &[<]
03:48 camelia rakudo-moar ac4f9f: OUTPUT«Cannot modify an immutable Sub+{<anon|65623632>}+{Precedence}␤  in block <unit> at /tmp/qnnsl1lO9w line 1␤␤»
03:48 Juerd cognominal: Is this part of some evil plan?
03:49 cognominal Juerd, I am surprised I can't lexically redefined an op with that syntax
03:49 bpmedley joined #perl6
03:50 cognominal m: sub infix:<==> { $^a < $^b }; say (1 == 2 ) # I know I can do that
03:50 camelia rakudo-moar ac4f9f: OUTPUT«True␤»
03:50 Juerd cognominal: I didn't even know that syntax existed until two minutes ago :)
03:50 Juerd m: my &infix:<==> := &infix:«<»; say 2 == 4; say 4 == 2;
03:50 camelia rakudo-moar ac4f9f: OUTPUT«True␤False␤»
03:51 Juerd I'm going to bed. Good *, *
03:51 cognominal I know that redefining == as < is stupid, but that's not the point.
03:51 geekosaur isn't that &[==] just a trivial case of the reduce syntax?
03:51 cpage__ joined #perl6
03:51 geekosaur so it would not be expected to work for assignment
03:51 Zoffix m: my &infix:«==» := &infix:«<»; say so 3 == 5
03:51 camelia rakudo-moar ac4f9f: OUTPUT«True␤»
03:52 cognominal m: say( &[==] =:= &infix:<==> )
03:52 camelia rakudo-moar ac4f9f: OUTPUT«True␤»
03:52 timotimo just 1.5 hours until the download is done ...
03:53 hoelzro timotimo: time to play disgaea?
03:53 hoelzro =)
03:53 cognominal m: say  &[==] .^name
03:53 camelia rakudo-moar ac4f9f: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aVXmI3Vx8W␤Malformed postfix call (only alphabetic methods may be detached)␤at /tmp/aVXmI3Vx8W:1␤------> 3say  &[==] .7⏏5^name␤»
03:53 cognominal m: say  &[==].^name
03:53 camelia rakudo-moar ac4f9f: OUTPUT«Sub+{<anon|65623632>}+{Precedence}␤»
03:56 cpage_ joined #perl6
03:57 timotimo hoelzro: watching AGDQ right now; ori and the blind forest race between grimelios and ankamius
03:57 hoelzro oooo I need to play that game
03:58 timotimo it looks very pretty
03:58 hoelzro I started it a few weeks back, but I haven't felt the urge to boot into Windows to continue =/
03:58 hoelzro it's soooo pretty
03:58 timotimo windows only :(
03:58 hoelzro I want to play it on my TV, but my wife is deep into Fallout 4 right now
03:58 hoelzro yeah ='(
03:59 hoelzro it's a shame that Linux can't serve as a steam link host
04:00 hoelzro so even if I want to play a Linux game, if it's on the TV, I have to boot into Windows
04:00 jeek It's a shame that Chromecast can't serve as a Steam link host.
04:01 llfourn joined #perl6
04:01 hoelzro jeek: host? or client?
04:02 timotimo either would be cool, really
04:02 hoelzro yeah
04:02 timotimo just interconnect all the things
04:04 jeek Client, I guess.
04:04 jeek I have a Steam Controller, I have a pile of computers, one even running Windows.
04:04 jeek Kind of bummed that I pretty much just have to leave the Windows computer plugged into the TV.
04:05 jeek My wife is hogging it right now to play Life is Strange, so I'm setting up a VM for playing with perl 6 on my lab at the office.
04:10 secwang joined #perl6
04:10 timotimo mhm
04:11 timotimo At least 325MB more space needed on the / filesystem.
04:11 timotimo ah well ...
04:14 timotimo a-ha! i can just kick out the journal :P
04:15 hoelzro heh
04:15 hoelzro who needs it?
04:15 timotimo it'll grow back. no worries :)
04:16 hoelzro =)
04:16 hoelzro you know, it's been months since the GLR landed and I *still* haven't figured out how to flatten nested arrays
04:16 hoelzro m: my @rows = [1, 2, 3], [4, 5, 6]; say +(flat @rows);
04:16 camelia rakudo-moar ac4f9f: OUTPUT«2␤»
04:16 hoelzro the best I can do is flat @rows.map(*.list), which just feels *wrong*
04:17 timotimo my @rows = [1, 2, 3], [4, 5, 6]; my @result = gather @rows>>.take; say @result.perl
04:18 timotimo m: my @rows = [1, 2, 3], [4, 5, 6]; my @result = gather @rows>>.take; say @result.perl
04:18 camelia rakudo-moar ac4f9f: OUTPUT«[1, 2, 3, 4, 5, 6]␤»
04:18 hoelzro hmm, that works too
04:19 timotimo m: my @rows = [1, 2, 3], [4, 5, 6]; say @rows.map(*.Slip).perl
04:19 camelia rakudo-moar ac4f9f: OUTPUT«(1, 2, 3, 4, 5, 6).Seq␤»
04:19 hoelzro timotimo: there's nothing that just involves flat, though? because Arrays don't flatten, ever?
04:19 timotimo m: my @rows = [1, 2, 3], [4, [9, 9, 9], 6]; say @rows.map(*.Slip).perl
04:19 camelia rakudo-moar ac4f9f: OUTPUT«(1, 2, 3, 4, $[9, 9, 9], 6).Seq␤»
04:20 timotimo something like that
04:21 hoelzro thanks for the input timo!
04:21 timotimo YW
04:21 timotimo TT showed me the take trick some time ago
04:31 orbus is there a good writeup on thread safety in perl6 anywhere?
04:31 orbus There's a little bit in http://doc.perl6.org/language/concurrency#Safety_Concerns
04:31 orbus but not much
04:32 orbus I've read some advent calendar posts that seem to imply there's some internal locking around things like scalars and hashes, but not much detail on what is and is not safe to do
04:34 cdg joined #perl6
04:47 g4 joined #perl6
04:51 Psyche^ joined #perl6
04:53 jeek say [+] grep * < 4000000, (0, 1, *+*  ...4000000)
04:53 jeek How do I cap off the list of fibonacci numbers?
05:00 jeek Got it
05:00 jeek say [+] grep * %% 2, (0, 1, *+* ...^ * >= 4000000)
05:01 b2gills timotimo: @a>>.take is not safe, as it can get called out of order
05:02 llfourn joined #perl6
05:03 b2gills jeek: if you want to include 4000000 you want ...^ * > 4000000
05:04 jeek So, inverse match to make the lazy list generator stop?
05:11 _mg_ joined #perl6
05:13 nige1 joined #perl6
05:24 thesparta joined #perl6
05:25 sprocket_ joined #perl6
05:26 cpage_ joined #perl6
05:26 DrArch joined #perl6
05:37 secwang joined #perl6
05:41 Cabanossi joined #perl6
05:44 zengargoyle joined #perl6
05:50 telex joined #perl6
06:00 sammers hello
06:02 sammers how do I use a variable ($foo) as the key name in something like this: HTTP::Request.new($method => URI.new($uri))
06:03 llfourn joined #perl6
06:06 secwang joined #perl6
06:12 sammers ok, figured it out: HTTP::Request.new(|($method  => URI.new(uri)))
06:12 TimToady if you're intending to pass a named option, you I suspect you could say HTTP::Request.new(|($method => URI.new($uri))
06:12 TimToady yeah, that :)
06:12 sammers ha
06:13 sammers yeah, thanks... was scratching my head there for a bit. so I guess this is referred to as dynamic named arguemnt?
06:13 TimToady you're the first person to ask for it :)
06:13 sammers ha
06:13 sammers finally, I am first as something!
06:19 cdg joined #perl6
06:26 n0tjack joined #perl6
06:28 krunen joined #perl6
06:32 secwang joined #perl6
06:34 sprocket_ joined #perl6
06:36 gfldex m: multi f(:$named){ note &?ROUTINE.signature }; multi f(:$also-named){ note &?ROUTINE.signature }; for 'named', 'also-named' -> $n { f(|($n => rand))}
06:36 camelia rakudo-moar ac4f9f: OUTPUT«(:$named)␤(:$also-named)␤»
06:39 Tonik joined #perl6
06:40 sprocket_ joined #perl6
06:50 sjoshi joined #perl6
06:53 llfourn joined #perl6
06:54 dalek doc: 30c4baf | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
06:54 dalek doc: doc casting a Hash or Pair into named arguments (sammers++)
06:54 dalek doc: review: https://github.com/perl6/doc/commit/30c4baf374
06:54 dalek doc: 004c7b7 | (Wenzel P. P. Peppmeyer)++ | / (6 files):
06:54 dalek doc: Merge remote-tracking branch 'upstream/master'
06:54 dalek doc: review: https://github.com/perl6/doc/commit/004c7b7a03
06:54 dalek doc: 3d81284 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
06:54 dalek doc: better wording for casting a Pair into named arguments
06:54 dalek doc: review: https://github.com/perl6/doc/commit/3d81284a5e
06:54 dalek doc: 8e29886 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Signature.pod:
06:54 dalek doc: Merge pull request #315 from gfldex/master
06:54 dalek doc:
06:54 dalek doc: doc casting a Hash or Pair into named arguments (sammers++)
06:54 dalek doc: review: https://github.com/perl6/doc/commit/8e29886da6
06:55 CIAvash joined #perl6
06:58 peter__ joined #perl6
07:00 domidumont joined #perl6
07:06 domidumont joined #perl6
07:10 [Tux] csv-ip5xs        50000    19.544    19.429
07:10 [Tux] test             50000    24.363    24.248
07:10 [Tux] test-t           50000    13.311    13.196
07:10 [Tux] csv-parser       50000    50.393    50.279
07:10 [Tux] I get this (as I wrote that almost intuively:
07:10 [Tux] m: say [+] ^64
07:10 camelia rakudo-moar ac4f9f: OUTPUT«2016␤»
07:11 [Tux] m: say [+] (3..6).map(* **3)
07:11 camelia rakudo-moar ac4f9f: OUTPUT«432␤»
07:11 [Tux] m: say [+] (3..9).map(* **3)
07:11 camelia rakudo-moar ac4f9f: OUTPUT«2016␤»
07:11 [Tux] but why is
07:11 [Tux] m: say [+] (3..9).map(***3)
07:11 camelia rakudo-moar ac4f9f: OUTPUT«7␤»
07:11 [Tux] 7?
07:12 llfourn m: say [+] (2..8).map(***3)
07:12 camelia rakudo-moar ac4f9f: OUTPUT«7␤»
07:15 llfourn m: say (2..8).map(***3)
07:15 camelia rakudo-moar ac4f9f: OUTPUT«((6) (9) (12) (15) (18) (21) (24))␤»
07:15 llfourn I guess because it has seven elems each of which is a one elem list which ends up being 1 + 1 + 1...
07:22 gfldex that's a very fancy way of counting that is
07:23 gfldex m: say [+] (3..9).map((*)**3)
07:23 camelia rakudo-moar ac4f9f: OUTPUT«2016␤»
07:23 gfldex m: say [+] (2..9).map(***3)
07:24 camelia rakudo-moar ac4f9f: OUTPUT«8␤»
07:25 llfourn m: (2..9).map(**+0).perl.say
07:25 camelia rakudo-moar ac4f9f: OUTPUT«((2,).Seq, (3,).Seq, (4,).Seq, (5,).Seq, (6,).Seq, (7,).Seq, (8,).Seq, (9,).Seq).Seq␤»
07:26 gfldex - QAST::Op(call &HYPERWHATEVER) :BY<methodop/longname wa> :WANTED
07:27 gfldex [Tux]: the longest token matcher matches the longest token. see http://design.perl6.org/S02.html#The_HyperWhatever_Type
07:28 [Tux] thnx
07:29 gfldex --target=ast -e 'very-short-example()' can be very helpful
07:30 FROGGS joined #perl6
07:36 dalek doc: d094daf | (Wenzel P. P. Peppmeyer)++ | doc/Language/faq.pod:
07:36 dalek doc: doc --target=ast see http://irclog.perlgeek.de/perl6/search/?nick=&amp;q=--target%3Dast
07:36 dalek doc: review: https://github.com/perl6/doc/commit/d094daf874
07:36 dalek doc: 4c2cb34 | (Wenzel P. P. Peppmeyer)++ | /:
07:36 dalek doc: Merge remote-tracking branch 'upstream/master'
07:36 dalek doc: review: https://github.com/perl6/doc/commit/4c2cb34596
07:36 dalek doc: 8a88776 | (Wenzel P. P. Peppmeyer)++ | doc/Language/faq.pod:
07:36 dalek doc: Merge pull request #316 from gfldex/master
07:36 dalek doc:
07:36 dalek doc: doc --target=ast
07:36 dalek doc: review: https://github.com/perl6/doc/commit/8a887769ab
07:37 RabidGravy joined #perl6
07:40 dalek Inline-Perl5: a33ac33 | (Stefan Seifert)++ | / (2 files):
07:40 dalek Inline-Perl5: Fix possible type mismatch of NVs
07:40 dalek Inline-Perl5:
07:40 dalek Inline-Perl5: It's possible that NVs are not doubles, so better check their real size.
07:40 dalek Inline-Perl5: As Perl 5 also supports 80 bit NVs and NativeCall doesn't, we bail out
07:40 dalek Inline-Perl5: in that case with an error message pointing to this situation.
07:40 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/a33ac333de
07:40 _mg_ joined #perl6
07:42 pierre-vigier joined #perl6
07:44 FROGGS TimToady: morning, here is something to muse about :o) - https://rt.perl.org/Public/Bug/Display.html?id=127165
07:45 peter__ joined #perl6
07:48 TimToady joined #perl6
07:51 nige1 joined #perl6
07:55 stmuk_ .tell Zoffix this is an odd one :) http://par.perl.org/
07:55 yoleaux stmuk_: I'll pass your message to Zoffix.
08:03 firstdayonthejob joined #perl6
08:06 RabidGravy yawn!
08:08 zakharyas joined #perl6
08:08 pierre-vigier joined #perl6
08:16 darutoko joined #perl6
08:21 lizmat good *, #perl6!
08:21 RabidGravy MARNIN!
08:22 lizmat m: dd |( 42 => 42)
08:22 camelia rakudo-moar ac4f9f: OUTPUT«This type cannot unbox to a native string␤  in block <unit> at /tmp/uoPZkjvlxc line 1␤␤»
08:22 xdg left #perl6
08:22 pierre-vigier joined #perl6
08:23 gfldex m: (|(41 => 41)).WHAT.say
08:23 camelia rakudo-moar ac4f9f: OUTPUT«(Slip)␤»
08:30 DrForr Re: the LWP videos it's wonderful to see we've got an intro sequence, even if it feels a bit blurry :)
08:32 peter__ joined #perl6
08:36 brrt joined #perl6
08:38 pierre-vigier joined #perl6
08:40 dalek rakudo/nom: 18957e3 | lizmat++ | src/core/DateTime.pm:
08:40 dalek rakudo/nom: Fix for RT #127160
08:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/18957e3f98
08:41 virtualsue joined #perl6
08:44 luiz_lha joined #perl6
08:49 sno joined #perl6
08:57 pierre-vigier joined #perl6
09:02 n0tjack joined #perl6
09:03 _mg_ joined #perl6
09:03 AlexDaniel joined #perl6
09:04 dalek rakudo/nom: d1ff735 | lizmat++ | src/core/Setty.pm:
09:04 dalek rakudo/nom: Fix for RT #127166
09:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d1ff735ffd
09:05 veeru joined #perl6
09:05 wamba joined #perl6
09:07 abraxxa joined #perl6
09:08 stmuk_ I was very disappointed by the LWP quality
09:08 stmuk_ err LPW video quality I mean .. wasn't any better than the London Tech Meet Iphone video experiments
09:09 gfldex PR send to have Backtrace::AsHTML tests fixed
09:10 dalek roast: b774bcc | lizmat++ | S02-types/set (2 files):
09:10 dalek roast: Add tests for RT #127166
09:10 dalek roast: review: https://github.com/perl6/roast/commit/b774bcc5cb
09:20 dalek roast: afe667b | lizmat++ | S32-temporal/Date.t:
09:20 dalek roast: Add tests for #127160 and #127161
09:20 dalek roast: review: https://github.com/perl6/roast/commit/afe667b69d
09:21 AlexDaniel lizmat++
09:21 vytas joined #perl6
09:23 pierre-vigier joined #perl6
09:26 RabidGravy are there any modules in the ecosystem that bind to c++ libraries?
09:27 nine .seen flussence
09:27 yoleaux I saw flussence 01:40Z in #perl6: <flussence> I don't care enough about the date stuff to get involved :)
09:28 FROGGS RabidGravy: not is the ecosystem yet and I have lots of unpushed changes: https://github.com/FROGGS/p6-Box2D
09:29 AlexDaniel oh wow, Box2D
09:29 AlexDaniel FROGGS++
09:29 RabidGravy :)
09:30 lizmat afk for a few hours&
09:30 RabidGravy I'm going to attempt to redo (the unreleased) Audio::SoundTouch without the C wrapper
09:31 FROGGS RabidGravy++
09:44 gfldex m: role R {}; R.^add_method('foo', method (){})
09:44 camelia rakudo-moar d1ff73: OUTPUT«Method 'add_method' not found for invocant of class 'Perl6::Metamodel::ParametricRoleGroupHOW'␤  in block <unit> at /tmp/cHW4pjhJvi line 1␤␤»
09:44 gfldex that makes tests for Crust fail
09:44 secwang joined #perl6
09:45 gfldex last commit to Crust was on 2015-12-22 see https://github.com/tokuhirom/p6-Crust/commits/master
09:49 pierre-vigier joined #perl6
09:52 _mg__ joined #perl6
09:54 Peter_WR joined #perl6
09:54 nige1 joined #perl6
09:56 RabidGravy well that's a quick way to get a coredump
09:58 nine Oh how I hate packaging issues
09:58 leont joined #perl6
10:00 AlexDaniel “The default mode for C++ is now -std=gnu++14 instead of -std=gnu++98” – well, that's a big step
10:03 lnrdo joined #perl6
10:05 kailash19 joined #perl6
10:07 espadrine joined #perl6
10:08 RabidGravy FROGGS, I think to save having to put an "is symbol('soundtouch::SoundTouch::foo')" on every method there may be an "is symbol" on a class that guess_name_mangler can use
10:09 FROGGS RabidGravy: it will take the class name into account if you do it right
10:09 FROGGS if the class is a CPPStruct
10:11 RabidGravy yeah, but then you have to name your class like the C++ class and namespace and in this case it is ugly
10:12 pierre-vigier joined #perl6
10:12 gfldex are there any tests for the MOP?
10:12 RabidGravy i.e the C++ is "namespace soundtouch { class SoundTouch { ... } }"
10:14 RabidGravy so it works if I have "module soundtouch { class SoundTouch is repr('CPPStruct') { ... }}" but eugh
10:14 nine Is anyone here who managed to package rakudo and/or panda for a distribution?
10:14 Sqirrel_ joined #perl6
10:15 rindolf joined #perl6
10:17 RabidGravy so you can put "is symbol('soundtouch::SoundTouch')" on the CPPStruct and it will use that instead of  the package name
10:17 talexb__ joined #perl6
10:19 FROGGS RabidGravy: no, an 'is symbol' trait is not (yet) supported on classes
10:20 secwang_ joined #perl6
10:24 FROGGS gfldex: that might be a starting point: https://gist.github.com/FROGGS/1a5122a8db23a49d128b
10:28 virtualsue joined #perl6
10:31 lnrdo joined #perl6
10:34 gfldex can i import a symbol with an aliased name?
10:40 FROGGS gfldex: not yet implemented sadly
10:41 gfldex there goes my workaround :(
10:41 moritz nine: pre-curli, yes
10:42 moritz star is such a distribution
10:42 nine moritz: it's post-curli that gives me a headache :)
10:44 nine I fear that all distributions people have so far created packages for use some chroot trickery during package build. openSUSE doesn't.
10:45 nine But if the others don't either, I'd really like to know how people solved the problems with absolute paths in precomp .deps files
10:46 gfldex nine: some archlinux guy wrote here he uses chroot
10:47 araujo joined #perl6
10:48 araujo joined #perl6
10:48 nine I know we added RAKUDO_PREFIX for packaging and the docs say: "This is intended as an escape hatch for build-time bootstrapping issues, where Rakudo may be built as an unprivileged user without write access to the runtime paths in NQP's config."
10:48 nine But I can't figure out how this solves the problem with the absolute paths.
10:48 nine My guess is: it doesn't and the non-chroot packages built so far carry the same bug.
10:50 araujo joined #perl6
10:51 RabidGravy FROGGS, I know :) I was proposing to make it but worded in such a way that anyone who was more motivated could leap in and do so before I did :)
10:51 FROGGS aha!
10:51 FROGGS :D
10:52 araujo joined #perl6
10:52 araujo joined #perl6
10:58 gfldex m: use MONKEY-TYPING; role R {}; augment role R { method m(){} }
10:58 camelia rakudo-moar d1ff73: OUTPUT«5===SORRY!5=== Error while compiling /tmp/nNvF99UZji␤Cannot augment R because it is closed␤at /tmp/nNvF99UZji:1␤------> 3MONKEY-TYPING; role R {}; augment role R7⏏5 { method m(){} }␤    expecting any of:␤        generic role␤»
11:00 grondilu m: use MONKEY-TYPING; augment class Int { method foo { say "bar" } }; 3.foo
11:00 camelia rakudo-moar d1ff73: OUTPUT«bar␤»
11:01 grondilu m: role R {}; { use MONKEY-TYPING; augment role R { method foo { say "bar" } } }; R.foo
11:01 camelia rakudo-moar d1ff73: OUTPUT«5===SORRY!5=== Error while compiling /tmp/glz6fuhJhy␤Cannot augment R because it is closed␤at /tmp/glz6fuhJhy:1␤------> 3 {}; { use MONKEY-TYPING; augment role R7⏏5 { method foo { say "bar" } } }; R.foo␤    expecting any of:␤        gen…»
11:02 grondilu m: class C {}; { use MONKEY-TYPING; augment class C { method foo { say "bar" } } }; C.foo
11:02 camelia rakudo-moar d1ff73: OUTPUT«bar␤»
11:02 znpy joined #perl6
11:04 n0tjack joined #perl6
11:06 DrForr Are people planning to be around the day or two before FOSDEM or after?
11:09 FROGGS grondilu: I guess it is this one: https://github.com/rakudo/rakudo/commit/091f0ce6ce93ac2f68516b0fa037de68db03604e
11:10 lizmat DrForr: we'll be arriving on Fri and probably leaving late Sun
11:11 llfourn so is it META.info or META.json?
11:11 llfourn (or either)
11:11 DrForr lizmat: Good to know, especially since I want to hook up with you so I can get my game collection back :)
11:12 RabidGravy llfourn, META.info or META6.json I think
11:12 llfourn RabidGravy: thanks!
11:15 RabidGravy Oooh, applying a role which has a "public" attribute to a ClassHOW I get "Method 'declares_method' not found for invocant of class 'NQPClassHOW'" which I guess is from Attribute.compose
11:17 RabidGravy bug or PEBKAC?
11:17 dalek doc: 9a28a00 | lizmat++ | doc/Language/unicode_texas.pod:
11:17 dalek doc: Add τ and π, fix table formatting
11:17 dalek doc: review: https://github.com/perl6/doc/commit/9a28a00954
11:17 moritz m: constant t = Int.^HOW but role { };
11:17 camelia rakudo-moar d1ff73: OUTPUT«5===SORRY!5=== Error while compiling /tmp/E2wlB1spDD␤Cannot use .^ on a non-identifier method call␤at /tmp/E2wlB1spDD:1␤------> 3constant t = Int.^HOW7⏏5 but role { };␤    expecting any of:␤        method arguments␤»
11:18 moritz m: constant t = Int.HOW but role { };
11:18 camelia rakudo-moar d1ff73: OUTPUT«5===SORRY!5=== Error while compiling /tmp/p6RPcYr4wH␤An exception occurred while evaluating a constant␤at /tmp/p6RPcYr4wH:1␤Exception details:␤  5===SORRY!5=== Error while compiling ␤  Method 'package' not found for invocant of class 'NQP…»
11:18 moritz RabidGravy: seems that mixing Perl 6 roles into NQP classes doesn't work at all
11:19 moritz RabidGravy: a saner approach is to inherit from ClassHOW; or is that what you're doing alreday?
11:21 arnsholt Yeah, NQP and Perl 6 classes have completely different HOWs, so that sounds painful, yeah...
11:21 araujo joined #perl6
11:21 RabidGravy well I'm trying to do:
11:21 RabidGravy m: role Bar { has Str $.bar; }; sub trait_mod:<is> (Mu $t, Str :$bar!) { $t.HOW does Bar; $t.^native_symbol = $bar; }; class Foo is bar('goo') { }
11:21 camelia rakudo-moar d1ff73: OUTPUT«5===SORRY!5=== Error while compiling /tmp/93s31yikZ8␤Method 'declares_method' not found for invocant of class 'NQPClassHOW'␤at /tmp/93s31yikZ8:1␤»
11:22 * Zoffix pets the robot
11:22 yoleaux 07:55Z <stmuk_> Zoffix: this is an odd one :) http://par.perl.org/
11:22 Zoffix Weird
11:24 moritz RabidGravy: uhm, that sounds *very* dangerous
11:25 RabidGravy which is kind of the only way I can think of adding "is symbol" to classes for the suppport of weirdly namespaced C++ classes
11:25 molaf joined #perl6
11:25 moritz RabidGravy: the MOP is allowed to have only one meta class instance for several types (to support prototype-style OO, for example)
11:25 moritz RabidGravy: so mixing into a meta object might cause *all* types of that kind to get the new behavior
11:27 Zoffix stmuk_, seems to be an Apache mod_rewrite. A change I make on perl6.org is instantly visible on par.perl.org
11:27 moritz RabidGravy: you could either create a new HOW type (much like GrammarHOW extends ClassHOW to add some functionality), or keep a global-ish object hash from type to native symbol name
11:28 nine Zoffix: no rewrite necessary: par.perl.org is an alias for par.perlcabal.org. par.perlcabal.org has address 213.95.82.53 perl6.org has address 213.95.82.53
11:29 joydo joined #perl6
11:30 dalek perl6.org: d0be197 | (Zoffix Znet)++ | source/downloads/index.html:
11:30 dalek perl6.org: Fix markup alignment / Modules box placement
11:30 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/d0be197c8a
11:31 dalek rakudo/nom: 4b443f2 | lizmat++ | src/core/Pair.pm:
11:31 dalek rakudo/nom: Make sure we can flatten a Pair with a non-Str key
11:31 dalek rakudo/nom:
11:31 dalek rakudo/nom: Changes the output of 'say |(42 => 42)' from:
11:31 dalek rakudo/nom:   This type cannot unbox to a native string
11:31 dalek rakudo/nom: to:
11:31 dalek rakudo/nom:   Unexpected named parameter '42' passed
11:31 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/4b443f2451
11:31 Zoffix nine, that's really weird. I'd think par.perl.org was about the par project. That whole "compile your perl script"
11:32 RabidGravy Hmm.  let's have a poke around and see if there's anything else that does something similar
11:33 dalek perl6.org: 4dcf169 | (Zoffix Znet)++ | / (2 files):
11:33 dalek perl6.org: Fix markup errors
11:33 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/4dcf169e93
11:35 dalek perl6.org: f9dd2f4 | (Zoffix Znet)++ | source/downloads/index.html:
11:35 dalek perl6.org: Use consistent markup
11:35 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/f9dd2f4abc
11:35 _mg_ joined #perl6
11:35 adhoc joined #perl6
11:37 daxim Zoffix, I want to possibly reopen https://github.com/perl6/doc/issues/286     1. default key for me is RShift+RCtrl, for you AltGr+Shift - which one is correct?   2. we should provide an XCompose file with all Perl6 and their texas mnemonics for key sequences input so that each user does not need to tediously configure it for himself, and every user gets the same key sequences
11:37 daxim what do you think?
11:37 Zoffix +1
11:38 Zoffix And well-volunteered! :D
11:39 daxim okay, let's first figure out why it's AltGr for you.  do you get ™ when you type AltGr+Shift+8?
11:40 LeoNerd joined #perl6
11:40 LeoNerd I'm told here's the place to come to talk to the FOSDEM/perl organisers..?
11:40 lizmat m: my int $a = -10; say $a % 12   # wrong
11:40 camelia rakudo-moar d1ff73: OUTPUT«-10␤»
11:40 LeoNerd Ah - hi lizmat :)
11:40 lizmat m: my Int $a = -10; say $a % 12   # right
11:40 camelia rakudo-moar d1ff73: OUTPUT«2␤»
11:40 Zoffix daxim, I just put whatever nemo gave me. I redefined my compose to right Windows key
11:41 arnsholt RabidGravy: Sounds like maybe what you what it to modify the WHAT, not the HOW?
11:41 Zoffix And I get nothing for Compose+Shift+8
11:41 Zoffix oh, maybe I should be... it's broken again -_-
11:41 lizmat LeoNerd: possibly, woolfy is offline atm, but if you have a proposal, you could gist it and let me know where to find it
11:42 LeoNerd Oh, not as such. More just wondering how full the schedule is looking currently. If you're short on speakers I could submit something, but I'm not -oooverly- keen ;)
11:42 Zoffix oh, fixed.. No nothing for that sequence. I do get ⁸ with Compose+^+8 tho
11:42 LeoNerd If you've got plenty then I won't mind
11:42 lizmat LeoNerd: I think there's no shortage of proposals, afaik
11:43 LeoNerd Ah OK.. then I'll sit this one out and just listen for a change ;)
11:43 RabidGravy arnsholt, in the case of a class trait wouldn't the WHAT be the same as the type that is passed as the first argument?
11:44 RabidGravy or maybe I'm missing some subtlety
11:44 nine The results of the past 3 hours: precompilation at install time is almost impossible to combine with distribution provided module packages
11:44 daxim tell nemo: re http://m8y.org/tmp/perl6.txt   default key for me is RShift+RCtrl, for you AltGr+Shift - which one is correct?
11:45 daxim how do I use the tell bot?
11:45 arnsholt RabidGravy: Yeah, probably
11:45 moritz daxim: .tell somebody text here
11:45 daxim .tell nemo: re http://m8y.org/tmp/perl6.txt   default key for me is RShift+RCtrl, for you AltGr+Shift - which one is correct?
11:45 yoleaux daxim: What kind of a name is "nemo:"?!
11:45 arnsholt Oh, but you're trying to do an is trait on a class? I'm not sure if that's possible
11:45 daxim .tell nemo re http://m8y.org/tmp/perl6.txt   default key for me is RShift+RCtrl, for you AltGr+Shift - which one is correct?
11:45 yoleaux daxim: I'll pass your message to nemo.
11:45 arnsholt Since the is syntax is already used for inheritance
11:45 LeoNerd OK, thanks lizmat - I'll leave you to it :)
11:45 LeoNerd left #perl6
11:46 RabidGravy oh it works fine,   'is' inheritance is just a trait that does add_parent or something to the class
11:46 RabidGravy HOW that is
11:46 arnsholt Ah, cool
11:47 Zoffix m: my Int $y = 10; my int $x = -10; $x % $y == $x - floor($x / $y) * $y
11:47 camelia rakudo-moar d1ff73: OUTPUT«WARNINGS for /tmp/PUUh8TSrZ0:␤Useless use of "==" in expression "% $y == $x -" in sink context (line 1)␤»
11:47 Zoffix m: my Int $y = 10; my int $x = -10; say $x % $y == $x - floor($x / $y) * $y
11:47 camelia rakudo-moar d1ff73: OUTPUT«True␤»
11:48 Zoffix m: my Int $y = 10; my int $x = -10; say floor($x / $y) * $y
11:48 camelia rakudo-moar d1ff73: OUTPUT«-10␤»
11:51 dalek rakudo/nom: d80c728 | lizmat++ | src/core/Date.pm:
11:51 dalek rakudo/nom: At least temporary fix for RT #127161
11:51 dalek rakudo/nom:
11:51 dalek rakudo/nom: Which is really caused by RT #127168
11:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d80c728e25
11:52 nine New conclusion: precompilation is impossible to combine with distribution provided module packages
11:54 dalek roast: 233d409 | lizmat++ | S32-temporal/Date.t:
11:54 dalek roast: Unfudged now passing tests for RT #127161
11:54 dalek roast: review: https://github.com/perl6/roast/commit/233d409314
11:54 lizmat nine:  :-(
11:55 sergot m: use File::Find;
11:55 camelia rakudo-moar 4b443f: OUTPUT«===SORRY!===␤Could not find File::Find in:␤    /home/camelia/.perl6/2015.12-99-g4b443f2␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    Co…»
11:56 sergot when File::Find is installed it seems to crash p6 programs with "P6M Merging GLOBAL symbols failed: duplicate definition of symbol Find"
11:56 nine Our architecture assumes that we can write to the installation repository and can recompile modules at will while distro packages really only want to copy files.
11:56 arnsholt nine: Why is that?
11:56 arnsholt Ah, right
11:58 sergot hmm, maybe not...
11:58 nine sergot: that has been fixed in rakudo nom and current panda
12:00 nine Considering that the precompiled files in the install repository are usually never even used (because the home repository is first in the chain), I'm quite tempted to rework this architecture...again.
12:01 nine I sometimes think that doing a hackathon for this may be the best way to finally nail it.
12:02 lizmat maybe we should organize something before FOSDEM?
12:03 nine lizmat: the coming weekend is the only one before FOSDEM where I'd have time
12:03 nine And jnthn is not even back in busineess yet (will reappear presumably next week)
12:07 Skarsnik joined #perl6
12:07 Skarsnik Hello
12:09 pmurias joined #perl6
12:09 DrForr Afternoon.
12:12 sergot nine: thanks
12:12 sergot nine: I updated rakudo, but forgot about panda
12:12 vividsnow joined #perl6
12:13 pierre-vigier joined #perl6
12:19 bioexpress joined #perl6
12:20 _mg__ joined #perl6
12:21 cognominal joined #perl6
12:22 dalek doc: 35bf77f | RabidGravy++ | doc/Type/Blob.pod:
12:22 dalek doc: Mark unpack and pack as experimental
12:22 dalek doc:
12:22 dalek doc: Closes #317
12:22 dalek doc: review: https://github.com/perl6/doc/commit/35bf77fabe
12:22 lnrdo joined #perl6
12:25 dakkar joined #perl6
12:25 kid51 joined #perl6
12:25 pmurias nine: you mean it's impossible to combine precompilation in it's current form or in general?
12:26 nine pmurias: in its current form
12:27 vividsnow joined #perl6
12:27 nine The best I can think of while keeping the current architecture is splitting install and recompilation and do the recompilation in a postinstall-script.
12:27 RabidGravy I was just going to say something to that effect
12:28 nine The devil is as always in the details. And there are so many different use cases with their very own details connected to all of this
12:30 pmurias nine: is there a description of how precompilations works other than the source code?
12:31 vividsnow joined #perl6
12:33 lnrdo_ joined #perl6
12:35 skids joined #perl6
12:36 _mg__ joined #perl6
12:37 lnrdo joined #perl6
12:37 nine pmurias: docs/module_management.md
12:48 sergot is there any documentation for "special" variables, like $*CWD?
12:49 RabidGravy http://doc.perl6.org/language/variables#Special_Variables :)
12:49 sergot thanks RabidGravy++ I didn't know how to type it into the searchbox
12:49 sergot probably, just variables or so
12:50 RabidGravy I think perhaps in the fullness of time that stuff should go in its own document so they can be expanded upon
12:51 nige1 joined #perl6
12:58 pnu can someone please check this: https://github.com/tadzik/panda/pull/285
13:00 RabidGravy pnu, looks reasonable to me
13:02 nine pnu: merged it
13:02 pnu nine: ok, thanks.. I'm adding perl6 support (from my heroku-buildpack-rakudo) to the generic perl buildpack and this was blocking it.
13:03 iH2O joined #perl6
13:05 tadzik pnu++
13:05 tadzik good catch
13:07 zakharyas joined #perl6
13:09 lichtkind joined #perl6
13:11 iH2O left #perl6
13:11 Peter_WR Does anyone know if there will be any Perl 6 talks at FOSDEM?
13:11 nine There will be
13:12 El_Che Peter_WR: 100% sure there will be :)
13:12 _nadim Good day!
13:13 _nadim Is ther sometihing brewing in the IPC/serialization, distrbution side?
13:13 RabidGravy wahay! "*** Error in `/home/jonathan/.rakudobrew/moar-nom/install/bin/moar': corrupted double-linked list: 0x000000000420f020 ***"
13:14 Ulti o___O
13:14 |Tux| RabidGravy, utf8-c8?
13:16 RabidGravy not entirely sure, this was just "say" on a "const char *" returned from a C++ method
13:17 RabidGravy oh weird, on a second and subsequent run it doesn't do that
13:17 RabidGravy and actually works and everything
13:20 Skarsnik can you write doc on c++ nc support if you feel like? x)
13:21 kaare_ joined #perl6
13:21 RabidGravy oh, no it does it every once in a while
13:21 pmurias joined #perl6
13:22 pmurias nine: making recompilation integrate with npm seems like it will be a bit tricky
13:22 _mg_ joined #perl6
13:24 asie joined #perl6
13:27 _Vi joined #perl6
13:27 dalek rakudo/nom: 75c6b9e | lizmat++ | src/core/Dateish.pm:
13:27 dalek rakudo/nom: Make Date/DateTime.new(years => 10) fail less LTA
13:27 dalek rakudo/nom:
13:27 dalek rakudo/nom: Cannot call DateTime.new with these named parameters: years
13:27 dalek rakudo/nom:
13:27 dalek rakudo/nom: As a reaction to RT #127162
13:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/75c6b9e84a
13:29 zakharyas joined #perl6
13:31 pierre-vigier joined #perl6
13:33 lnrdo joined #perl6
13:34 znpy joined #perl6
13:40 xinming joined #perl6
13:43 xpen joined #perl6
13:45 woolfy joined #perl6
13:45 AlexDaniel lizmat: thanks for your work
13:46 xinming joined #perl6
13:46 lnrdo_ joined #perl6
13:49 lizmat commute to Amsterdam&
13:51 dalek perl6-roast-data: 8eff548 | coke++ | / (7 files):
13:51 dalek perl6-roast-data: today (automated commit)
13:51 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/8eff5480cc
13:53 sammers joined #perl6
13:54 sprocket_ joined #perl6
13:57 woolfy left #perl6
13:59 araujo joined #perl6
13:59 araujo joined #perl6
14:04 pmurias Rotwang: I consider build scripts simply horrible, luckily automatic compilation in the modern languages is slowly getting rid of them
14:04 profan ^ god bless progress
14:05 nine pmurias: embrace the Makefile!
14:07 [Coke] wow, turning on pygmentize slows down the doc build by a LOT.
14:08 * [Coke] looks forward to the next Perl 6 event hosted in the tri state area.
14:08 abraxxa anyone fancy looking at RT#127001?
14:08 [Coke] . o O ( where I will reveal my latest invention, the Gramminator! )
14:08 [Coke] RT#localhost
14:08 abraxxa [Coke]: yes ;)
14:09 abraxxa RT#::1
14:09 [Coke] FYI, that ticket is about nativecall types.
14:09 pmurias nine: great idea, we can just embrace the Makefiles and make precompilation manual, things will be so much easier ;)
14:11 nine Manual precompilation! A stroke of genius!
14:12 tadzik abraxxa: it sounded like a name of a conference :)
14:12 abraxxa tadzik: that's localhost in IPv6
14:12 abraxxa nine: why would you precompile a manual? :P
14:13 tadzik abraxxa: oh, I was talking about the former, and in the context of your question :)
14:16 RabidGravy Hmm so I get that MoarVM panic from even just instantiating a CPPStruct just a lot less frequently
14:17 masak "Though we continue to invest in Angular 1, we've pushed the features possible within its architecture about as far as we can.  Angular 2 represents growth in capabilities." -- the analogy ng1:ng2::p5:p6 continues
14:22 Skarsnik RabidGravy, I had the idea of having some debug trace for what was NC related. maybe it can be useful to catch bugs/weird stuff? any thought x)
14:28 RabidGravy in this case I don't think it would help as moar is getting into a tizz when it tries to Free some memory
14:28 RabidGravy but go for it
14:29 RabidGravy but I think I know what it is, the native size of my CPPStruct is 48 and sizeof(soundtouch::SoundTouch) is 64
14:29 abraxxa no precompilation; in StatementHandle.pm6 IS a workaround for RT#127001
14:29 sftf joined #perl6
14:30 abraxxa i'm using that for now so I can continue on DBDish::Oracle until it's fixed
14:30 Skarsnik Oo
14:30 sergot To module makers: I've just created a tool that generates META.info for you, also (To everyone)it can install every dependency when you work on an existing project. Here it is: https://github.com/sergot/bamboo --- feedback very appreciated, please :))
14:30 rindolf joined #perl6
14:31 sergot if you run the tool after writing some code and before publishing it to github - it generates "depends" and "provides" section for you
14:31 Skarsnik I think autarch and some people are working on an module authoring tool
14:31 Skarsnik Ah that nice :)
14:31 nine I thought panda can do the same?
14:31 sergot no way, really? :))))
14:31 sergot maybe it does, I wasn't awere of this
14:32 sergot Skarsnik: module authoring tool, what do you mean?
14:32 nine panda gen-meta and panda installdeps
14:34 Skarsnik stuff to handle work on modules, generate basic files, generate meta.. stuff like that?
14:34 sergot yeah, installdeps I know, didn't hear about gen-meta
14:36 Melezhik joined #perl6
14:36 sergot I'm not sure if gen-meta works the same tho
14:36 sergot :)
14:36 sprocket_ joined #perl6
14:38 Melezhik Hi ! Happy new year to all. A little question about perl6. If perl6 has something similar to "do 'file.pl' " in perl5 ?
14:38 Skarsnik what do 'file.pl' does?
14:38 nine Melezhik: it does: EVALFILE. But why would you need that?
14:39 DrForr Most times that people think they want "do 'file.pl'" they're after a configuration system, for which a module is usually more appropriate.
14:39 nine Especially in a language with such great parsing capabilities as Perl 6
14:40 DrForr If you want to load functions from that file, then just like in Perl 5, what you usually want to do is create your own module and export functions.
14:40 Juerd Yet most of the time when I needa configuration system, I chose Perl ubiquitous, and I don't want to install *any* configuration module because they're not quite as ubiquitous as Perl itself.
14:40 RabidGravy sergot,  I made https://github.com/jonathanstowe/META6 if you don't want to track the META spec yourself ;-)
14:40 Juerd So I've used "do FILE" a lot, for configuration.
14:40 Juerd Especially because my %config = do 'config.pl'; is nice.
14:41 Juerd No module gets such a simple syntax. And it's great that you can use things like 24 * 60 * 60 in a config file. Somewhat more self-documenting than 86400.
14:41 Melezhik Yeah, thanks, guys. My code is based  on do " /path/to/file" - http://perldoc.perl.org/functions/do.html , to unconditionally execute the same piece of code which located at file .
14:42 Juerd So I disagree that config should always be done with a module. Something (I don't know what, yet) in the core will be good enough, and I'll use that instead :)
14:42 nine Juerd: as long as you are the only users, that may be enough. As a user who had to deal with "configuration" files in Erlang and PHP, I really don't consider this friendly
14:42 Melezhik I do not need export or something like that, just to execute the same code in main process, without forking
14:43 Juerd nine: I keep them pure k/v lists.
14:43 nine Melezhik: what kind of code is in this file?
14:43 Melezhik And that is what do file in perl5 does exactly
14:43 Melezhik Perl code
14:44 Juerd Melezhik: EVALFILE does this.
14:44 Juerd 1;0 juerd@cxie:~$ echo "foo => 'bar'," > config.p6
14:44 Juerd 1;0 juerd@cxie:~$ perl6 -e'my %config = EVALFILE "config.p6"; say %config<foo>'
14:44 Juerd bar
14:44 virtualsue joined #perl6
14:44 Melezhik I mean perl5 'require' is not enough . Yeah Juerd, I got it, thanks!
14:44 nine Melezhik: I know that it's Perl code. But what does this code do?
14:45 RabidGravy Juerd, didn't that ask you for a "MONKEY-SEE-NO-EVAL" ?
14:46 Juerd RabidGravy: No, that would be weird.
14:46 Melezhik Nine, call some routines, end call some others ' do's
14:46 Juerd RabidGravy: MONKEY-SEE-NO-EVAL is for EVAL with interpolation
14:46 nine Melezhik: ok, I'll phrase it differently: why can't you move this code into a proper module?
14:46 RabidGravy but you've got even less control over what might be in a file
14:47 Juerd RabidGravy: That's not unlike 'require'.
14:47 Melezhik Nine, because this is type of code which is better to not keep as module, at least at current design
14:47 nine Melezhik: I'm really curious. I can't imagine any code that's not suitable for a module but needs to be EVALFILEd
14:48 pmurias nine: it will be interesting to try to combine precompilation with npm ;)
14:48 Juerd nine: Configuration and simple few-line plugins are my use cases
14:48 nine pmurias: does npm support post-install scripts?
14:48 Melezhik Nine, I know this sounds weird a :)))  , still it sounds weird for me too!
14:49 Juerd nine: I have some daemons that execute some code when specific events happen. I want that compiled and executed only once each time.
14:49 nine Melezhik: then probably it _is_ weird and you should re-think your architecture.
14:49 Juerd The daemons have lots of startup overhead and I want to change what happens during runtime.
14:49 RabidGravy anyway, I'm beginning to regret trying to bind this C++ library, I've found the missing 16 bytes it's in the privates of the superclass
14:49 Juerd nine: I do similar things with Irssi, to use it as an IRC bot.
14:50 Skarsnik RabidGravy, oh you get struct size issue?
14:50 Melezhik Say I have an abstract legal code, which I want to be executed upon some conditions. And this is not only functions and methods calls
14:50 nine Juerd: if you need to reduce overhead, you _have_ to do it as proper modules, so you can benefit from precompilation. And there's nothing keeping you from requireing modules at run time. Requireing a second time won't load them again.
14:50 Melezhik I mean Perl code, not legal
14:50 Juerd Okay, granted, I'm not using 'do' here: http://juerd.nl/i/f91fea75500b5766e65d8c5448a670fd.png
14:50 Melezhik It was a typo , sorry
14:51 RabidGravy well a CPPStruct, "class SoundTouch : public FIFOProcessor" the missing 16 bytes are FIFOProcessor
14:51 Juerd nine: Read what I said again.
14:51 Juerd nine: I do need them to be loaded again.
14:51 pmurias nine: it seems to
14:51 peter__ joined #perl6
14:51 RabidGravy I foresee goat sacrificing
14:52 Juerd nine: I don't see why you're not a fan of timtowtdi anymore :P
14:52 Skarsnik do a RT?
14:52 pdcawley m: sub foo {...} sub bar {...}
14:52 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/pnpUyxjFBs␤Strange text after block (missing semicolon or comma?)␤at /tmp/pnpUyxjFBs:1␤------> 3sub foo {...}7⏏5 sub bar {...}␤    expecting any of:␤        infix␤        infix stopper␤     …»
14:52 Melezhik Modules are fine if code you want to reuse is "packed" in functions and methods, but if this is just a code you need to execute repeteously upon some conditions, modules are not fine for this
14:53 pdcawley Right... More repl hackery needed then...
14:53 sftf I agree with Juerd: does not require write your own parser each time  since perl parse and create data structures for you, does not require manipulate @INC to load the module from somewhere, the freedom of action in the "configuration" file...
14:53 Juerd Melezhik: I agree completely. Sometimes even writing "sub ... { ... }" around the code is simply too ugly.
14:53 [Coke] is "C<=>>" properly rendered in html as <code>=</code>&gt; ?
14:53 nine Melezhik: why wouldn't modules be fine for this? I can execute a sub repetously upon some condition just fine.
14:54 Juerd nine: Because that requires extra code that distracts
14:54 Juerd nine: http://pastebin.com/Fjj4tPx0
14:54 [Coke] nine: I agree with you, but this is a matter of taste, I think.
14:54 Juerd nine: This irc bot has a few dozen of such small files. Could be modules but I don't want them to be.
14:55 Juerd The great upshot is that now, even unexperienced Perl programmers will write commands for this bot
14:55 pdcawley "sub foo {...}\\\nsub bar {...}\n" collapses to 'sub foo {...} sub bar {...}' which fails to parse. Need to reinstate the \n
14:55 Juerd And if one tiny file fails to compile, the rest keeps working
14:55 Juerd And it'll just be loaded again when it's needed again, so that's great for ad-hoc development
14:55 Juerd No need to reload the bot
14:56 peter__ joined #perl6
14:56 Melezhik yeas, exactly as Juerd told sometimes I do not want to force people to write code via functions or methods, I want that people just write a code, because these files are kind of public stuff, which everyone could write
14:56 sftf Where is documentation about EVALFILE on https://doc.perl6.org/ ?
14:56 Juerd This approach is great for when you have a long living daemon and want people to work on different parts of the runtime execution.
14:56 Melezhik All I I can do with them is to execute , that is it
14:57 Juerd It's completely unacceptable to have a syntax error break the long living daemon.
14:57 Juerd So it must be eval'ed
14:57 Juerd It's also slightly unwanted to have 'sub main { ... }' or something like that in every file.
14:57 Juerd This structure encourages having lots of tiny files that don't try to interact with eachother.
14:59 Juerd In any case, if I wanted a programming language that prescribed what I should and shouldn't do, I'd probably use Python :)
14:59 abraxxa Skarsnik: can you please take a look at my DBIish fork repo can the test changes I made in 99-common.t?
14:59 nine and have no proper interface at all and are written to a precise implementation
15:00 Juerd Fortunately, Perl 6 probably has everything I need, just like Perl 5.
15:00 Melezhik <Juerd> you sure on my way :))))
15:00 Juerd I'm just afraid that I'll get used to Perl 6 even more, and will get frustrated with 5 for dayjob code.
15:00 Skarsnik abraxxa, I think the is-deeply not working came form NC giving sometime str with the explicitlymanaged role
15:00 abraxxa Skarsnik: ah!
15:01 abraxxa Skarsnik: I'd change the test to explicitly test the type and value of each column
15:01 abraxxa instead of testing the whole struct
15:01 Skarsnik https://gist.github.com/Skarsnik/7f2fee97d56c5acc1587
15:01 abraxxa OR change the expected struct to match what's returned
15:02 Skarsnik expect/got is inverted x)
15:02 Melezhik Juerd, thanks lot, again will take a look at evalfile
15:02 Skarsnik but you get the idea
15:02 abraxxa Skarsnik: where does that output come from?
15:02 Skarsnik Data::Dump
15:03 Juerd Melezhik: nine suggested EVALFILE
15:03 abraxxa we should return Str instead of the NativeCall-roled ones
15:03 abraxxa nice format
15:03 Juerd Melezhik: I just checked whether it would do what you wanted
15:03 Skarsnik abraxxa, it's kind of related to that: https://github.com/perl6/DBIish/issues/44
15:05 n0tjack joined #perl6
15:05 abraxxa Skarsnik: yeah, I've read that
15:05 Skarsnik abraxxa, you can write mycroutine().Str to get a Str copy probably
15:05 abraxxa the NativeCall docs are missing what happens with the memory after you mark a Str as explicitly-managed
15:05 Skarsnik The gc does nothing with it
15:06 abraxxa how can it be freed then?
15:06 abraxxa is there a free($exp-managed-str) function?
15:07 Skarsnik I am not even sure if that could not lead to some weird leak, like the c memory is free but the perl6 part that describe the Str is not freed
15:07 Skarsnik It count on the lib offering something to free these data
15:07 * [Coke] opens a LHF doc ticket: https://github.com/perl6/doc/issues/318
15:08 Skarsnik like mysql free what it give you when you call mysql_finish
15:09 bpetering joined #perl6
15:09 Skarsnik what did you change in 99.t? aside the magic_cmp that seem weird
15:10 skids joined #perl6
15:10 abraxxa I've added two new records, one only with an integer, one only with a float
15:10 abraxxa this had an impact on all tests after that
15:10 abraxxa and I've changed the comparisons regarding types & values
15:11 bpetering .tell timotimo I don't know about keccak in Perl 6 yet, but in addition to libgit2 I'm working on bindings for libsodium, which lets you do more modern hashing
15:11 yoleaux bpetering: I'll pass your message to timotimo.
15:11 RabidGravy yep getting size of the CPPStruct right prevents the panic :)
15:11 Skarsnik RabidGravy, how did you do that? x)
15:13 RabidGravy find the superclasses definition, add a new class with their member variables and inherit from it :)
15:13 Skarsnik abraxxa, all the fetch_ returns Str value on all the other drivers
15:14 Skarsnik yes, I think the cpp part of nc handle to herit other class x)
15:14 dalek doc: 07feca7 | (Zoffix Znet)++ | doc/Language/subscripts.pod:
15:14 dalek doc: Fix incorrect C<> escaping
15:14 dalek doc:
15:14 dalek doc: Fixes #318
15:14 dalek doc: review: https://github.com/perl6/doc/commit/07feca782c
15:14 abraxxa Skarsnik: so only DBDish::Oracle returns what you've pasted?
15:15 Skarsnik there is a row and allrows method that return typed value, the fetch* are 'old' stuff to stay closed to p5 DBI
15:15 abraxxa Skarsnik: i'd also like to discuss finish because I'd like to not expose it in the API but do it internally in the required places
15:15 Skarsnik *close
15:16 RabidGravy Skarsnik, yes it does and the previous crashy methods now work over many many iterations :)
15:16 abraxxa imho that makes no sense
15:16 abraxxa Perl 6 is a new, incompatible programming language, why would it have the same API than DBI?
15:17 Skarsnik You are not forced to have them
15:18 lucasb joined #perl6
15:19 Skarsnik abraxxa, my issue with finish was like mysql free stuff on finish and if a copy of the data is not returned... it's not good x)
15:19 Ch0c0late joined #perl6
15:20 regreg joined #perl6
15:21 lucasb I came here just to bikeshed that S/// message :)
15:22 lucasb m: say 'foo' ~~ S/o+/oo/
15:22 camelia rakudo-moar 75c6b9: OUTPUT«Potential difficulties:␤    Smartmatch with S/// can never succeed because the string it returns will fail to match. You can use given instead of ~~.␤    at /tmp/sGoxTuaW_Z:1␤    ------> 3say 'foo' ~~ 7⏏5S/o+/oo/␤True␤»
15:22 TimToady or with, assuming it's defined
15:22 lucasb well, that snippet just succeed and successfully matched
15:23 abraxxa Skarsnik: I'll try to fix the types for Oracle by returning copies
15:23 geekosaur because it was a null change. but it has to be a short message, not a dissertation about how if it does succeed it's because it was a no-op
15:24 TimToady hmm, shouldn't've matched, methinks
15:24 TimToady oh, wait, it didn't change anything
15:24 lucasb yes, no change.
15:24 TimToady so yes, it can match, but rather uselessly
15:25 lucasb yes, uselessly. but sometimes I use 's/\s+/ /' to clean whitespace in files...
15:25 TimToady but if it changes anything, it won't match
15:26 TimToady smartmatch with a string is always an 'eq'
15:27 lucasb yes, agree with everything. I just thought the generalization 'can never succeed' was poor worded
15:28 TimToady but the new message is more problematic in a different way
15:28 TimToady m: given "foo" { when S/o+/o/ { say "here" } }
15:28 camelia rakudo-moar 75c6b9: OUTPUT«Potential difficulties:␤    Smartmatch with S/// can never succeed because the string it returns will fail to match. You can use given instead of ~~.␤    at /tmp/U9ppRNVMKi:1␤    ------> 3given "foo" { when 7⏏5S/o+/o/ { say "here" } }␤»
15:29 TimToady it assumes use of ~~, and smartmatch is used lots more places than that
15:29 abraxxa Skarsnik: interesting that the first Str isn't +{NativeCall::ExplicitlyManagedString}
15:29 Skarsnik I am not even sure why x)
15:30 TimToady lucasb: in that respect the old message was better
15:31 TimToady and you'll note my example *already* has a given, which is even more confusing...
15:32 user3 joined #perl6
15:32 user3 when is release 1.0 expected for the rakudo compiler?
15:33 TimToady we don't count versions that way
15:33 user3 when is perl 6 release 1.0 expected?
15:33 TimToady we don't count versions that way!
15:33 user3 O_O
15:33 abraxxa user3: Perl 6.c has already been released, look at 'rakudobrew list-available'
15:33 user3 will you ever have a release 1.0 of some kind?
15:34 TimToady we don't count versions that way!!!!!
15:34 TimToady you can think of Perl 6c as 1.0 if you like
15:34 TimToady you can think of rakudo 2015.12 as 1.0 if you like
15:34 flussence .oO( how do these people get here and completely miss the huge box at the top of the website? )
15:35 nine flussence!
15:35 abraxxa Skarsnik: I just saw that you test floats for Num, I've opted for Rat as that's what Perl 6 generates on my $foo = 4.85;
15:35 flussence nine!
15:35 lucasb yoleaux!
15:35 yoleaux lucasb!
15:35 jast flussence: to be fair, the box can still be interpreted as "this is not a really-for-real-release", since the versioning scheme can easily be taken for releases that are more ephemeral. the term "release" has been overloaded a lot by various projects, after all.
15:36 user3 ok, seriously i tend to shun color text (cuz its usually spamming)
15:36 user3 ok
15:37 Skarsnik abraxxa, write 4.85e0 but as you can see I marked this test as todo because Num make probably more sense than Rat for float value. But Rat offer more precision probably
15:37 abraxxa flussence: it's not large enough
15:37 hoelzro o/ #perl6
15:37 abraxxa seriously
15:37 Skarsnik m: say Num ~~ Rat
15:37 camelia rakudo-moar 75c6b9: OUTPUT«False␤»
15:37 nine flussence: how did you solve the problem of absolute paths in .deps files in your rakudo package?
15:37 araujo joined #perl6
15:37 abraxxa the title is way larger
15:37 bpetering user3: are there specific features you're looking for?
15:37 Skarsnik m: say Rat ~~ Num
15:37 camelia rakudo-moar 75c6b9: OUTPUT«False␤»
15:37 jast font-size: 5000em;
15:38 abraxxa m: say Num ~~ Rat;
15:38 camelia rakudo-moar 75c6b9: OUTPUT«False␤»
15:38 lnrdo joined #perl6
15:38 flussence nine: I... didn't actually do anything there beyond making all the fatal errors stop. Should I be worried?
15:39 nine flussence: does your package build process use chroot?
15:39 flussence nope, just a limited user
15:41 nine openSUSE's rpmlint notified me of BUILDROOT paths contained in installed files. They are contained in precomp files and their .deps files, so the out of date check for precomp files will not find the corresponding source files.
15:41 * abraxxa loves {} to call functions/method inside of ""
15:41 flussence ohh... yeah, that might be a problem.
15:42 lucasb related to release confusion, I'm sorry to say this again, but I really think the rakudo tag 6.c should be removed. I saw a directory like ~/.perl6/v6.c-93-g812a48b scroll by somewhere, so some tool is not giving preference for 2015.12 style git tags
15:43 nine flussence: I fear nothing short of a redesign will fix this
15:43 n0tjack joined #perl6
15:44 user3 left #perl6
15:44 lucasb m: say True ~~ True
15:44 camelia rakudo-moar 75c6b9: OUTPUT«True␤»
15:44 lucasb m: given True { when True {} }
15:44 camelia rakudo-moar 75c6b9: OUTPUT«Potential difficulties:␤    Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead␤    at /tmp/wAv0uvlIPS:1␤    ------> 3given True { when 7⏏5True {} }␤»
15:44 abraxxa Skarsnik: i don't know why but the expected is really the one that containts the Str+{NativeCall::ExplicitlyManagedString}
15:44 pwr joined #perl6
15:44 Peter_WR joined #perl6
15:45 lucasb back to the smartmatch thing, why the message triggers with given/when but not with ~~ ?
15:45 TimToady dunno
15:45 Melezhik joined #perl6
15:45 Peter_WR joined #perl6
15:45 Skarsnik abraxxa, displaying the @ref show NC stuff in it?!
15:45 abraxxa Skarsnik: i've added diag Dump(@ref-aoh); after defining the array in line 221 and it dumps that
15:45 lucasb ah, ok. because you showed that the S/// is triggering with both constructs, and it should only trigger with ~~. (right?)
15:46 TimToady no, it *should* trigger on any smartmatch
15:46 abraxxa Skarsnik: https://github.com/abraxxa/DBIish/blob/master/t/99-common.pl6#L219
15:46 abraxxa right after that statement
15:46 lucasb oh, yes. I confused myself.
15:46 TimToady m: say False ~~ False
15:46 camelia rakudo-moar 75c6b9: OUTPUT«False␤»
15:46 abraxxa haha
15:47 lucasb the issue is with suggesting given when already using given
15:47 Skarsnik abraxxa, I don't even...
15:48 nine flussence: I'm currently testing a band aid of removing the precomp files after the build, so they won't get installed at all. They are pretty useless as-is anyway, even if the paths were correct.
15:48 kubrat joined #perl6
15:48 Peter_WR m: multi fib (0) { 0 } say fib 0;
15:48 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/uNKt89ZZ5m␤Strange text after block (missing semicolon or comma?)␤at /tmp/uNKt89ZZ5m:1␤------> 3multi fib (0) { 0 }7⏏5 say fib 0;␤    expecting any of:␤        infix␤        infix stopper␤  …»
15:49 TimToady lucasb: the fundamental problem is a semipredicate problem of distinguishing certain values as success/failure but not others
15:49 Peter_WR m: multi sub fib (0) { 0 } say fib 0;
15:49 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/A0GSTwCb1Y␤Strange text after block (missing semicolon or comma?)␤at /tmp/A0GSTwCb1Y:1␤------> 3multi sub fib (0) { 0 }7⏏5 say fib 0;␤    expecting any of:␤        infix␤        infix stopper…»
15:49 khw joined #perl6
15:49 Skarsnik m: use NativeCall; my $str1 = "lol"; explictly-manage($str1); my Str $str2; my Str $str3; say $str3.^name;
15:49 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/dfLsk0GAa2␤Undeclared routine:␤    explictly-manage used at line 1. Did you mean 'explicitly-manage'?␤␤»
15:49 Skarsnik m: use NativeCall; my $str1 = "lol"; explicitly-manage($str1); my Str $str2; my Str $str3; say $str3.^name;
15:49 camelia rakudo-moar 75c6b9: OUTPUT«Str␤»
15:49 flussence nine: couldn't it just omit the full path when writing a deps file in the same directory?
15:49 TimToady lucasb: in that sense, True/False and S/// are on opposite sides of the fence
15:50 TimToady because Bool always indicates success/failure, and strings never do
15:50 xpen joined #perl6
15:50 lnrdo_ joined #perl6
15:50 Skarsnik m: use NativeCall; my $str1 = "lol"; explicitly-manage($str1); my $str2 = "bb"; my $str3 = "aa"; say $str3.^name;
15:51 camelia rakudo-moar 75c6b9: OUTPUT«Str␤»
15:51 psy_ joined #perl6
15:51 AlexDaniel Skarsnik: I have a problem with DBIish. I have a function that returns TABLE. However, when I try to fetch results from it I just get Str
15:51 AlexDaniel Skarsnik: that is, all columns are smashed into a comma-separated string
15:51 nine flussence: in the .deps file we record the precomp id of a dependency and the path to the source file, so we can quickly check if the precomp file is out of date. The dependency may come from any repository, so nothing short of a full path will be enough to unambiguously locate the source file.
15:51 dalek nqp: ff1c436 | (Pawel Murias)++ | src/vm/js/ (10 files):
15:51 dalek nqp: [js] Use a Map instead of an Object to implement the nqp hash.
15:51 dalek nqp:
15:51 dalek nqp: This fixes a bug with using hasOwnProperty as a hash key.
15:51 dalek nqp: review: https://github.com/perl6/nqp/commit/ff1c4363d1
15:52 Skarsnik abraxxa, that make no sense, why string outside NC receive this the EM role
15:52 Peter_WR m: multi sub fib(0) { 0 } say fib 0;
15:52 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RHQQJ0q9Ed␤Strange text after block (missing semicolon or comma?)␤at /tmp/RHQQJ0q9Ed:1␤------> 3multi sub fib(0) { 0 }7⏏5 say fib 0;␤    expecting any of:␤        infix␤        infix stopper…»
15:52 lnrdo_ joined #perl6
15:52 Skarsnik could it be the GC reusing a previous variable in a bad way?
15:52 Peter_WR m: multi sub fib(0) { 0 }; say fib 0;
15:52 camelia rakudo-moar 75c6b9: OUTPUT«0␤»
15:52 lucasb TimToady++ thanks for clarifying. My brain needs some minutes to think :)
15:53 nine flussence: the only other solution I could think of is record an id of the repo that contains the source file + a relative source file path and for the repo id we could use a logical name like 'site' if there is any. That way we could move the site repo later on.
15:53 Peter_WR m: multi sub fib(any(0,1)) { 0 }; say fib 0;
15:53 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/aR6lxHvWTT␤Invalid typename 'any' in parameter declaration. Did you mean 'Any'?␤at /tmp/aR6lxHvWTT:1␤------> 3multi sub fib(any7⏏5(0,1)) { 0 }; say fib 0;␤»
15:53 Skarsnik AlexDaniel, seem fine, everything fall back to Str when 'unknow'. What is the TABLE type?
15:53 nine flussence: but building packages for modules will still not work because when installing a module to an Installation repo, we need to re-compile the reverse dependencies.
15:54 * flussence should go re-read how git's internals do things like this...
15:55 abraxxa Skarsnik: NativeCall isn't even loaded in 99-common.t
15:56 Peter_WR m: multi sub fib($ where * < 2) { $_ }; say fib 0;
15:56 camelia rakudo-moar 75c6b9: OUTPUT«(Any)␤»
15:56 Peter_WR m: multi sub fib($n where * < 2) { $n }; say fib 0;
15:56 camelia rakudo-moar 75c6b9: OUTPUT«0␤»
15:56 Peter_WR m: multi sub fib($n where * < 2) { $n }; say fib 1;
15:56 camelia rakudo-moar 75c6b9: OUTPUT«1␤»
15:56 Peter_WR m: multi sub fib($n where * < 2 && * >= 0) { $n }; say fib 1;
15:56 camelia rakudo-moar 75c6b9: OUTPUT«1␤»
15:57 Peter_WR m: multi sub fib($n where * < 2 && * >= 0) { $n }; say fib 2;
15:57 camelia rakudo-moar 75c6b9: OUTPUT«2␤»
15:57 AlexDaniel Skarsnik: so I do 「.allrows(:array-of-hash)」 and I get 「my_function => "(somevalue, othervalue, etc)"」 multiple times
15:57 nine flussence: seems to work: rm -rf $RPM_BUILD_ROOT/usr/share/perl6/precomp/* ; rm -rf $RPM_BUILD_ROOT/usr/share/perl6/site/precomp/*
15:57 Peter_WR m: multi sub fib($n where * < 2 ) { $n }; say fib 2;
15:57 camelia rakudo-moar 75c6b9: OUTPUT«Cannot call fib(2); none of these signatures match:␤    ($n where { ... })␤  in block <unit> at /tmp/A3xSvOU41f line 1␤␤»
15:57 AlexDaniel Skarsnik: no it's not ok because there's no way to parse that
15:57 flussence nine: right, I'll throw that in the gentoo stuff for now
15:58 Skarsnik AlexDaniel, what was the query?
15:58 AlexDaniel Skarsnik: http://www.postgresql.org/docs/9.2/static/xfunc-sql.html#XFUNC-SQL-FUNCTIONS-RETURNING-TABLE
15:58 nine flussence: build service is rebuilding: https://build.opensuse.org/package/live_build_log/home:niner9:branches:devel:languages:parrot/rakudo/openSUSE_Factory/x86_64
15:58 ilmari m: multi sub fib ($ where * < 2) { $^a }; say fib 1
15:58 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/L8fvMCpOTi␤Placeholder variable '$^a' cannot override existing signature␤at /tmp/L8fvMCpOTi:1␤------> 3multi sub7⏏5 fib ($ where * < 2) { $^a }; say fib 1␤»
15:58 Peter_WR m: multi sub fib(1) { 1 }; multi sub fib(0) { 0 }; multi sub fib($n) { return fib($n-1) + fib($n-2) }; say fib 2;
15:58 camelia rakudo-moar 75c6b9: OUTPUT«1␤»
15:58 Peter_WR m: multi sub fib(1) { 1 }; multi sub fib(0) { 0 }; multi sub fib($n) { return fib($n-1) + fib($n-2) }; say fib 3;
15:58 camelia rakudo-moar 75c6b9: OUTPUT«2␤»
15:58 AlexDaniel Skarsnik: 「SELECT sum_n_product_with_tab(42)」
15:59 Peter_WR m: multi sub fib($n where * == any(0,1)) { return $n }; multi sub fib($n) { return fib($n-1) + fib($n-2) }; say fib 3;
15:59 camelia rakudo-moar 75c6b9: OUTPUT«2␤»
15:59 dalek ecosystem: 9f68e8e | LLFourn++ | META.list:
15:59 dalek ecosystem: Add CompUnit::Util to ecosystem
15:59 dalek ecosystem:
15:59 dalek ecosystem: https://github.com/LLFourn/p6-CompUnit-Util
15:59 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/9f68e8e8f4
15:59 gregf_ joined #perl6
16:00 Skarsnik AlexDaniel, well fill an issue on DBIish, I am not even sure if we can catch this type of thing with libpq ~~
16:00 bpmedley joined #perl6
16:00 AlexDaniel Skarsnik: perhaps the workaround is to SELECT from SELECT… Let's see…
16:00 YP-QMUL-W joined #perl6
16:01 llfourn nine: https://github.com/LLFourn/p6-CompUnit-Util may be relvant to you interests!
16:02 llfourn relevent to your*
16:02 llfourn relevant to your # urgh
16:03 Peter_WR m: multi sub fib($ where * == any(0,1)) { return $ }; multi sub fib($n) { return fib($n-1) + fib($n-2) }; say fib 3;
16:03 camelia rakudo-moar 75c6b9: OUTPUT«Use of uninitialized value of type Any in numeric context  in sub fib at /tmp/LGTvdk4Aos line 1␤Use of uninitialized value of type Any in numeric context  in sub fib at /tmp/LGTvdk4Aos line 1␤Use of uninitialized value of type Any in numeric context  i…»
16:03 Peter_WR m: multi sub fib($ where * == any(0,1)) { return $_ }; multi sub fib($n) { return fib($n-1) + fib($n-2) }; say fib 3;
16:03 camelia rakudo-moar 75c6b9: OUTPUT«Use of uninitialized value of type Any in numeric context  in sub fib at /tmp/Q_NtdSpWA6 line 1␤Use of uninitialized value of type Any in numeric context  in sub fib at /tmp/Q_NtdSpWA6 line 1␤Use of uninitialized value of type Any in numeric context  i…»
16:03 nine llfourn: looks to me like it only uses interfaces that we actually intend to support.
16:03 lucasb Peter_WR: you can also play with camelia in a private window
16:03 Peter_WR Sorry :(
16:04 lucasb it's ok :)
16:04 nine llfourn: but a warning about possible changes might be good anyway until we find a solution to the packaging mess.
16:04 llfourn nine: well it uses $*W and $*UNIT though I guess they aren't going anywhere!
16:05 llfourn yes I should probably add that I may have my hand forced to change things
16:07 cdg joined #perl6
16:08 pmurias joined #perl6
16:10 Skarsnik abraxxa, if you don't want to bother with this, mark the test as todo and fill an issue x)
16:10 adu joined #perl6
16:11 AlexDaniel Skarsnik: I figured it out. For example this is going to work: 「SELECT * FROM sum_n_product_with_tab(42)」.
16:12 TimToady $*W is possibly in the category of things that should've come in through the cursor rather than as a dynamic variable, but that's not quite as certain as it is for $*LANG or other variables involved in implementing lexically scoped languages
16:12 abraxxa Skarsnik: what exactly?
16:12 AlexDaniel Skarsnik: not that it is justified for DBIish to join data like this…
16:12 TimToady er %*LANG that is
16:12 flussence nine: wait, I don't need to rm these to workaround do I? I can just sed the buildroot out of the paths
16:12 AlexDaniel Skarsnik: but at least I have a workaround. If I manage to get some time I'll submit an issue. Thanks!
16:13 flussence oh wait, the mbc files hardcode it too. never mind...
16:13 llfourn TimToady: well I'm kinda glad it didn't I think because otherwise it's kinda hard to use it to hack things in from modules. (unless there is a $*CURSOR I don't know about)
16:14 Skarsnik abraxxa, the EM role that appear like that in the ref data
16:14 TimToady llfourn: that scares me, on some level
16:14 abraxxa Skarsnik: again a rakudo/moarvm bug that's hard to golf
16:15 YP-QMUL-W joined #perl6
16:16 nine We haz openSUSE packagez! http://download.opensuse.org/repositories/home:/niner9:/branches:/devel:/languages:/parrot/openSUSE_Leap_42.1/x86_64/
16:16 llfourn TimToady: It's mostly to do things that rakudo probably will provide an interface for in the future (I hope)
16:16 flussence okay, that's weird. I just blew away my ~/.perl6 and I somehow still have Linenoise in the repl...
16:16 TimToady if people hang their coats on something that is fundamentally the wrong peg, eventually people will start losing their coats
16:17 Hotkeys Not necessarily
16:17 Hotkeys Perhaps the wrong peg is really good at being a peg
16:17 llfourn TimToady: I agree. But we don't have a way to install a lexical symbol to CALLER at compile time yet so $*W.install_lexical_symbol will have to do for now :\
16:18 lizmat joined #perl6
16:18 llfourn (apart from sub EXPORT of course but that doesn't cover everything)
16:20 TimToady in particular, it assumes the dynamic scope is basically the same pass as the original compilation pass, not a subsequent optimization pass, say, that might be called from outside the original dynamic scope of $*W
16:20 TimToady I mean, such a pass can fake it by setting $*W again, but that's a handoff that can get dropped easily
16:21 TimToady I ran into similar problems with the @!BLOCKS attribute in World assuming a single pass
16:21 TimToady (and had to hack around it with a dynvar, oy vey!)
16:21 TimToady but that was the basis for the loop bug I fixed after 6.c came out
16:22 TimToady well, "fixed"
16:22 llfourn TimToady: yes I hope rakudo provides an interface to do set lexical symbols to the caller because whatever you just said is a bit over my head :)
16:22 TimToady the real fix will be to unify the different outer lookups
16:23 TimToady during the initial pass it does outer lookups by counting down layers in the @!BLOCKS stack
16:23 TimToady later it follows 'outer' annotations
16:24 TimToady but the whole 'wanted' pass is interleaved with the initial pass, so sometimes @!BLOCKS is not accurately representing the current lexical scope in that pass
16:25 TimToady doubtless searching @!BLOCKS is faster currently than looking up annotations, but that just means we probably shouldn't be using the annotation system for looking up outers, or we need a faster annotation system
16:26 TimToady llfourn: that's okay, it was way over my head too until I stared at it for about 4 days...
16:27 TimToady fortunately, although we've got conflicting "simplest ways that could possibly work", unifying those will probably help with compiler performance too
16:27 araujo joined #perl6
16:27 lucasb TimToady: talking about loopy list comprehensions, ({ 42 } while $condition) should return a list of Ints, not Blocks, right?
16:28 TimToady probably
16:29 TimToady in particular, -> $value { $value } while $condition should probably return $condition
16:30 llfourn I thouhgt: { 42 } while $condition should return a list of blocks, do while $condition { 42 } should return a listof ints
16:31 TimToady m: say do while ++$_ < 5 -> $parm { $parm }
16:31 camelia rakudo-moar 75c6b9: OUTPUT«Too few positionals passed; expected 1 argument but got 0␤  in code  at /tmp/kYL7GkUX7y line 1␤  in block <unit> at /tmp/kYL7GkUX7y line 1␤␤»
16:31 mst gather while $condition -> $value { take $value } ?
16:31 TimToady mst: you can do it that way too
16:31 TimToady m: say do if ++$_ < 5 -> $parm { $parm }
16:31 camelia rakudo-moar 75c6b9: OUTPUT«True␤»
16:32 TimToady looks like a bug on while's param there too
16:32 TimToady llfourn: the { 42 } there is technically a bare block, so should run immediately
16:33 TimToady m: say do { 42 } for 1..5
16:33 camelia rakudo-moar 75c6b9: OUTPUT«42␤42␤42␤42␤42␤»
16:33 TimToady there it does
16:33 TimToady but that's the while bug lucasb++ is pointing out, that while doesn't do the same
16:33 TimToady m: say do -> $parm { $parm } for 1..5
16:33 camelia rakudo-moar 75c6b9: OUTPUT«(1 2 3 4 5)␤»
16:34 TimToady m: say do -> $parm { $parm } while ++$_ < 5
16:34 camelia rakudo-moar 75c6b9: OUTPUT«(-> $parm { #`(Block|76827112) ... } -> $parm { #`(Block|76827184) ... } -> $parm { #`(Block|76827256) ... } -> $parm { #`(Block|76827328) ... })␤»
16:34 TimToady that should do the same
16:34 llfourn m: say ( { 42 } for 1..5 )
16:34 camelia rakudo-moar 75c6b9: OUTPUT«(42 42 42 42 42)␤»
16:34 TimToady well, except that would be a bunch of Trues, since < doesn't return anything terribly interesting
16:34 llfourn ok point taken bug then :)
16:35 TimToady it's all tricksiness to try to get list comprehensions to just "naturally" fall out of the looping constructs
16:35 TimToady and secondarily to demonstrate that the list comprehension syntax used by Python is bass-ackwards
16:36 TimToady the way we have it, the guard naturally goes inside the loop
16:37 TimToady m: say do -> $parm { $parm } when * %% 2 for 1..5
16:37 camelia rakudo-moar 75c6b9: OUTPUT«(-> $parm { #`(Block|55065256) ... } -> $parm { #`(Block|55065328) ... })␤»
16:37 TimToady hmm, another bug?
16:37 TimToady m: say do -> $parm { $parm } if $_ %% 2 for 1..5
16:37 camelia rakudo-moar 75c6b9: OUTPUT«(-> $parm { #`(Block|66933472) ... } -> $parm { #`(Block|66933544) ... })␤»
16:37 TimToady yeah
16:37 TimToady m: say do $_ if $_ %% 2 for 1..5
16:37 camelia rakudo-moar 75c6b9: OUTPUT«(2 4)␤»
16:38 TimToady m: say do $_ when * %% 2 for 1..5
16:38 camelia rakudo-moar 75c6b9: OUTPUT«(2 4)␤»
16:39 TimToady m: say do -> $parm { $parm if $parm %% 2 } for 1..5
16:39 camelia rakudo-moar 75c6b9: OUTPUT«(2 4)␤»
16:39 TimToady at least that works
16:39 TimToady (due to the wonders of Slip)
16:41 nemo Zoffix: heh. I see it made it into the doc typos, unlinked URLs and all ☺
16:41 yoleaux 11:45Z <daxim> nemo: re http://m8y.org/tmp/perl6.txt   default key for me is RShift+RCtrl, for you AltGr+Shift - which one is correct?
16:42 nemo yoleaux: *shrug* I remapped mine ages ago
16:42 nemo oh
16:42 nemo yoleaux is a bot?
16:42 nemo daxim:  https://en.wikipedia.org/wiki/Compose_key#GNU.2FLinux  " On Xorg the default Compose Key is ⇧ Shift+AltGr"
16:43 llfourn m: say (-> $parm { $parm } when * %% 2 for 1..5)' # this looks fine to me :S
16:43 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HzNRlMJ_Bk␤Two terms in a row␤at /tmp/HzNRlMJ_Bk:1␤------> 3-> $parm { $parm } when * %% 2 for 1..5)7⏏5' # this looks fine to me :S␤    expecting any of:␤        infix␤        infix stopper␤…»
16:43 llfourn m: say (-> $parm { $parm } when * %% 2 for 1..5) # this looks fine to me :S
16:43 camelia rakudo-moar 75c6b9: OUTPUT«(-> $parm { #`(Block|61539760) ... } -> $parm { #`(Block|61539832) ... })␤»
16:44 japhb m: role Foo { has $.s = 42; has @.a = 7, 8, 9; }; class Bar does Foo { }; class BarDate is Date does Foo { }; dd Bar.new.a; dd BarDate.today.a;
16:44 camelia rakudo-moar 75c6b9: OUTPUT«Array @!a = [7, 8, 9]␤Array @!a = []␤»
16:44 japhb Ah, still an issue.
16:46 nemo daxim: "As this is rather inconvenient (especially for keyboards without an AltGr) it is common to select a keyboard layout where another key such as the right-hand Ctrl or ⊞ Win is mapped to the Compose key"
16:46 nemo daxim: so I guess that explains yours
16:47 daxim can anyone who has not remapped compose confirm what's written in wikipedia?
16:47 nemo and with an AltGr key ☺
16:48 nemo daxim: given how often I type digraphs, a 2 key combo was just silly.  admittedly I mostly just use 'em for emoji and french, but perl6 seems likely to change that
16:48 dalek nqp: b200648 | pdcawley++ | src/HLL/Compiler.nqp:
16:48 dalek nqp: Retain newlines in continued code
16:48 dalek nqp:
16:48 dalek nqp: Say we want to define a class in our REPL, we might input:
16:48 dalek nqp:
16:48 mspo nice
16:49 dalek joined #perl6
16:49 mspo someone got the blank line stuff in from yesterday for the repl?
16:49 AlexDaniel daxim: I see no reason for this to be true universally. It is probably different in different distrubutions, DEs, whatever…
16:50 SwellJoe joined #perl6
16:50 muraiki joined #perl6
16:50 * TimToady uses the Win key
16:50 nemo TimToady: I need my win key for the mac command key ♥ synergy
16:50 daxim I don't think my /usr/share/X11/xkb/symbols/* files were modified, let me check with upstream repository
16:51 nemo TimToady: also I occasionally use the win key to actually do MATE stuff like opening the app menu
16:51 dalek doc: cc4bf1c | (Zoffix Znet)++ | doc/Language/nativecall.pod:
16:51 dalek doc: Fix grammar
16:51 dalek doc: review: https://github.com/perl6/doc/commit/cc4bf1c109
16:55 AlexDaniel I don't have a dedicate key for compose, unfortunately :( traditional keyboards have so many keys in useless positions and so few in convenient ones. That is, besides all usual stuff I also heavily rely on Super and Hyper keys, so my thumb row has no place for compose really :(
16:56 TimToady well, the silly lenovo carbon 2 put ~ and ` on the thumb row where a useful key should be instead
16:56 alpha123 TimToady: WTF
16:56 dalek doc: 282b9bd | (Zoffix Znet)++ | doc/Language/unicode_entry.pod:
16:56 dalek doc: Add formatting to XCompose section
16:56 dalek doc: review: https://github.com/perl6/doc/commit/282b9bd3e5
16:56 alpha123 who does that
16:56 TimToady and they put home/end where capslock used to be
16:56 TimToady 'course that should be a control :)
16:56 alpha123 man, lenovo keyboards used to be so good
16:57 alpha123 I'm a fan of remapping caps lock to ctrl if another key is pressed with it and escape otherwise
16:57 TimToady and the function key row is just a capacitive strip that never does what you want
16:57 alpha123 *twitch*
16:57 nemo alpha123: escape... I can see that. bit faster in vim
16:57 AlexDaniel haha capacitive strip!
16:58 AlexDaniel how convenient!
16:58 alpha123 nemo: exactly
16:58 AlexDaniel :(
16:58 TimToady when it does work, it sets off stray function codes when you fingers are on the number row
16:58 AlexDaniel TimToady: did they already make japanese version of this keyboard?
16:58 znpy joined #perl6
16:58 nemo alpha123: what do you use for Compose then?
16:59 TimToady AlexDaniel: dunno
16:59 japhb TimToady: How are you not defenestrating this laptop?
16:59 TimToady so basically I prefer to disable the function key strip entirely, which makes a bunch of things harder
17:00 alpha123 nemo: right alt
17:00 nige1 joined #perl6
17:00 RabidGravy somewhere I've got an an HP laptop that has an extra column of special function keys down the left side of the keyboard, totally messes up the touch typing
17:00 AlexDaniel well, japanese keyboards usually have a couple of extra thumb buttons, which is basically the only upgrade you can make on a laptop keyboard
17:00 nemo alpha123: oh... hm.. yeah. I guess I rarely press right alt
17:00 pi4 joined #perl6
17:00 nemo alpha123: right ctrl I need for virtualbox
17:01 alpha123 same
17:02 nemo TimToady: I'm currently using a mac aluminium keyboard my boss gifted me. It required heavy remapping to be functional
17:02 nemo TimToady: for example the idjits replaced a bunch of actually useful keys with an additional F13-F19
17:02 mspo alt/option seems to allow for utf8 input
17:02 pmurias_ joined #perl6
17:02 nemo TimToady: which is pretty crazy given every mac user I've met argues function keys are useless and that's why they should be hidden behind an alt in subservience to stuff they use way more like adjusting screen brightness
17:03 alpha123 wut, what on earth does F13-19 even do
17:03 nemo alpha123: not much, since no apps seem to exist that take advantage of it
17:03 mspo for many symbols, anyway: «Ω» √
17:03 nemo guess you could use it in gimp
17:03 nemo alpha123: that is, map common functions to 'em
17:04 nemo alpha123: and to offer those keys, they removed things like Insert and Print
17:04 TimToady with my current setup I can only change screen brightness via command line, since that's on the disabled function strip
17:04 nemo alpha123: backspace was replaced w/ an eject button - not that anything ever ejects media anymore
17:04 TimToady no F11 for full screen either
17:05 nemo mspo: alt/option on what?
17:05 mst huh. mine overloads stuff (f5/f6 are brightness up/down) but holding the fn key switches mode for those keys
17:05 AlexDaniel TimToady: you can probably map any other shortcut to do these
17:05 nemo mst: see. I get having those as options, what I don't get is making them the default. I adjust screen brightness like never.  so why not hide *that* behind the fn
17:06 dalek doc: d4c1e5f | (Zoffix Znet)++ | doc/Language/nativecall.pod:
17:06 dalek doc: Fix typo (ilmari++)
17:06 dalek doc: review: https://github.com/perl6/doc/commit/d4c1e5f303
17:06 nemo mst: but luckily the MATE/GNOME2 kbd prefs includes an option to fix that
17:06 nemo mst: actually you can fix it in OSX too if you dig around in prefs a bit
17:06 mst nemo: Fn+Esc toggles FnLk on/off so the default is pickable
17:07 * TimToady just hopes that he can use Xcompose with anthy someday...
17:07 mst also, honestly, I adjust the sound volume more than I use anything else from that row
17:07 nemo TimToady: huh. there's no xim bridge for anthy?
17:08 nemo "Anthy is commonly used with an input method framework such as ibus, fcitx or SCIM"
17:08 TimToady none of those have ever worked with .Xcompose, though I could be behind the times
17:08 mspo nemo: on a mac keyboard
17:08 nemo TimToady: ibus dæmon seems to have xim support...
17:09 AlexDaniel æ hm…
17:09 nemo TimToady: https://github.com/ibus/ibus-anthy  'Add a new /etc/xdg/autostart/ibus.desktop to invoke 'ibus-daemon --xim''
17:09 nemo TimToady: random searching
17:09 nemo AlexDaniel: habit
17:10 AlexDaniel nemo: great one, I like it :)
17:10 nemo AlexDaniel: at this point it would actually require a bit of reflex to inhibit hitting capslock first
17:10 TimToady my ibus-daemon already has --xim
17:10 nemo AlexDaniel: similar to typing ç for c,
17:10 * AlexDaniel loves more unicode in regular texts
17:10 nemo TimToady: hm. wonder if you have to toggle modes or something. dunno
17:10 nemo TimToady: my japanese was always abysmal so I abandoned input managers years ago. just didn't have time for it
17:10 TimToady well, I haven't fiddled with it for a year or so
17:12 TimToady been busy with something else, for some reason...
17:12 dalek rakudo/query_repos: 62bcf18 | (Stefan Seifert)++ | src/core/CompUnit/ (3 files):
17:12 dalek rakudo/query_repos: Centralize more precompilation code
17:12 dalek rakudo/query_repos: review: https://github.com/rakudo/rakudo/commit/62bcf18755
17:13 alpha123 Is there anything like xcompose for tmux?
17:14 AlexDaniel alpha123: why tmux when you can have it system-wide?
17:14 alpha123 AlexDaniel: well that's fine too
17:14 alpha123 i.e. Xcompose when you don't have an X session running
17:16 nemo alpha123: so... screen has digraph support
17:16 nemo alpha123: when I switched to tmux, I made some crappy scripts that try to find digraphs
17:16 nemo alpha123: it is possible someone out there has made a non-crappy script
17:16 nemo I wouldn't want to inflict these on anyone
17:17 alpha123 googling hasn't been the most productive so far
17:17 nemo bind v split -l 0 '~/bin/compose.pl && tmux pasteb -t.- -d'
17:17 nemo bind V command-prompt -p compose 'if-shell "~/bin/compose2.pl \"%%\"" "pasteb -d" '
17:17 nemo that's for ctrl-a v and ctrl-a V
17:17 nemo (yeah, I switched to ctrl-a so I wouldn't have to relearn that stuff too)
17:17 alpha123 I switched to Ctrl-a even though I started with tmux because it's easier to press :p
17:17 nemo heh
17:19 nemo alpha123: I've started needing this more as I actually use my phone as a computer
17:19 nemo although luckily inside the linux chroot I have digraphs
17:20 AlexDaniel by the way, another valuable option to input unicode characters is to use custom keyboard layout. e.g. altgr+(key) and altgr+shift+(key) basically give you another two layers of keys (most of them are free by default). This also works without X session :)
17:21 AlexDaniel this, of course, is not an alternative to xcompose. But it is a good way to input commonly used characters
17:21 alpha123 'murica keyboards don't have altgr, how do I remap right alt to that without xmodmap?
17:21 AlexDaniel 「」«»‘’“”∞–… are good candidates for that :)
17:22 AlexDaniel alpha123: well, if you are going to create your own keyboard layout then it's not a problem
17:22 AlexDaniel alpha123: because you can basically set any key as altgr
17:22 nemo AlexDaniel: I just find digraphs more intuitive
17:23 nemo AlexDaniel: like. way easier to remember that >> becomes » or -> becomes →
17:23 AlexDaniel nemo: sure, for stuff that is not common it makes sense
17:23 nemo AlexDaniel: yeah, but I use even for like c, ç - I don't think I could get used to doing that w/ like altgr c or something
17:23 AlexDaniel nemo: everything else does not have to be intuitive. e.g. your keyboard layout is not in alphabetical order (although that could have been intuitive)
17:24 nemo AlexDaniel: fair 'nuff, but after 3 decades qwerty is pretty much burned into my muscles ☺
17:24 pierre-vigier joined #perl6
17:24 AlexDaniel not that QWERTY is better than a layout that has all letters sorted…
17:24 nemo AlexDaniel: eh. mildly disagree there
17:24 nemo that is, the claim that dvorak is easier on the hands...
17:25 AlexDaniel nemo: well, qwerty IS in alphabetical order, mostly
17:25 alpha123 dvorak is probably easier on the hands but i don't think there's sufficient evidence to say that it's faster
17:26 pi4 joined #perl6
17:26 nemo http://hardware.slashdot.org/comments.pl?sid=2970657&amp;cid=40613155
17:27 nemo an old argument I recalled and ran a search for
17:28 AlexDaniel nemo: well, it does not take much to understand that it is. Basically if you move all common letters on the home row (makes sense, right?) and reduce the amount of words that you have to type with just one hand (e.g. by having vowels on one side, also makes sense?) then you are going to get a better layout. Whether that makes a significant difference – that's a whole different question, but…
17:29 * flussence uses dvorak layout on phone, just to keep things interesting
17:29 alpha123 I wonder what a layout optimized for gesture typing would be like
17:29 AlexDaniel flussence: this is actually not a bad idea due to hand alternation
17:29 AlexDaniel flussence: unless you use swipe-ish kind of input :)
17:30 AlexDaniel in which case it just makes it worse :D
17:30 flussence nope, none of that on mine :)
17:30 nemo AlexDaniel: well. depends what causes stress on the hand for me, for example, is using pinkie fingers
17:30 nemo AlexDaniel: so having stuff on home row vs top row pretty irrelevant
17:30 nemo AlexDaniel: I just want most common keys in centre of kbd
17:32 AlexDaniel nemo: yeah, in that sense the placement of letters is pretty much irrelevant. Most symbols, however, are typed with pinkies, so…
17:32 AlexDaniel nemo: here comes the question about physical design of the keyboard
17:32 alpha123 I tried dvorak for a while, couldn't type `ls` quickly, and gave up
17:33 nemo alpha123: http://hardware.slashdot.org/comments.pl?sid=2970657&amp;cid=40615469
17:33 AlexDaniel nemo: easy to solve, just get a keyboard with a bunch of thumb buttons and extra columns in the middle, but of course no such thing for laptops :(
17:33 alpha123 also vim was annoying with dvorak and I was too lazy to remap everything
17:33 [Coke] minor doc issue; having the timestamp in the page makes it very hard to compare two versions of the generated HTML to insure I haven't broken anything.
17:33 [Coke] also, it's the time -that particular page- was generated.
17:33 moritz [Coke]: feel free to add a --no-timestamp option or so
17:34 [Coke] (rather than when htmlify was kicked off)
17:34 moritz [Coke]: but in general, it's a good thing to have
17:34 nemo AlexDaniel: personally when I use my phone (galaxy note 4) as a mini laptop, I use this nifty bluetooth kbd for heavy duty typing...
17:34 nemo AlexDaniel: http://www.amazon.com/TOZO-Ultra-slim-Smartphone-Rechargeable-Li-polymer/dp/B0124TNLK0
17:34 [Coke] ideally, it'd be an app and we'd include that bit of static content rather than dupe it in every page.
17:34 nemo there's a whole ton of companies selling this model on amazon.
17:34 flussence moritz: I'm being pedantic, but that bit would be better kept in the HTTP headers...
17:35 nemo AlexDaniel: other nice thing about the note 4 is the stylus works great as a lightweight mouse - like, supports hover for easy menu navigation in a linux chroot
17:35 moritz flussence: patches welcome
17:35 mspo Last-Modified??
17:35 moritz flussence: or maybe not; it'd make it harder to find the date on the page
17:36 mspo both is probably the way to go :)
17:36 AlexDaniel nemo: here is a good example of what I mean when I speak about thumb buttons and extra middle columns: http://ergodox.org/Images/ErgoDox_001.png (that's if you want to reduce strain on your pinkies)
17:37 nemo ah. interesting
17:37 mspo the modified date should go in the html footer for humans to read, and Last-Modified: for computers to read
17:37 nemo AlexDaniel: well. the other thing to keep in mind ofc is the more esoteric a layout you train on, the more helpless you are when plunked in front of a random machine ☹
17:37 nemo or the more your coworkers hate you when they have to be at your desk for some reason
17:38 AlexDaniel nemo: after years on heavily modified dvorak I still can type on QWERTY :) This, however, is a real problem if you never really learned QWERTY…
17:38 lucasb the server do send a Last-Modified header for static html files
17:38 AlexDaniel nemo: my kids will probably hate me for this :)
17:42 AlexDaniel alpha123: by the way, I use vim-like keys in emacs. Not a big problem besides hjkl (which I wouldn't use anyway, I have altgr-ed arrow keys that work everywhere…)
17:43 alpha123 AlexDaniel: evil-mode?
17:43 AlexDaniel alpha123: yeah
17:43 alpha123 AlexDaniel: I don't actually use vim anymore though, I use the similar-but-imo-more-awesome kakoune (http://kakoune.org/) which I don't think there's an emacs mode for (*gasp*)
17:44 AlexDaniel alpha123: oh, how interesting
17:44 AlexDaniel alpha123: bookmarked, I will definitely check it out later
17:44 alpha123 AlexDaniel: It's probably one of the best designed pieces of software I've used, really fantastic editor
17:44 AlexDaniel alpha123: perl6 mode?
17:45 alpha123 AlexDaniel: primitive at best :(
17:45 AlexDaniel eh!
17:45 Skarsnik I should learn to use advanced stuff in editor x)
17:46 alpha123 AlexDaniel: its syntax highlighting for perl6 is a little hit-or-miss, basically, and there's nothing more than that
17:46 alpha123 that said, it's easy enough to write modes for ;)
17:47 virtualsue joined #perl6
17:48 nemo alpha123: https://medium.com/@mkozlows/why-atom-cant-replace-vim-433852f4b4d1  applies to emacs too IMO ☺
17:48 alpha123 lol atom
17:49 nemo eh. his main point is composability
17:49 nemo 'By contrast, Emacs and its philosophical descendants (including Sublime Text and Atom) use monolithic, special-purpose commands.'
17:50 alpha123 eh, that's only the default for emacs, you can change it (and evil-mode does). I don't really have anything against emacs, I just like regular vim more than evil-mode
17:50 alpha123 and non-modal editing is basically useless for me now
17:51 nemo alpha123: well. that's just saying "emacs has a mode to emulate vi"
17:51 alpha123 nemo: that's basically the point of emacs isn't it
17:51 nemo doesn't take away from main point about how emacs approached things natively
17:51 alpha123 "emacs has a mode to …"
17:51 nemo heh
17:52 lichtkind_ joined #perl6
17:52 abraxxa i've also switched to Atom after using Komodo Edit 9 for some month after I got annoyed of Padre deleting all files in the perlbrewed bin directory every few days
17:52 nemo heck, I'm sure "extensible vi layer" accronym was not accidental 😝
17:53 DrArch joined #perl6
17:53 FROGGS joined #perl6
17:59 [Coke] https://github.com/perl6/doc/issues/300 looks good here; Will apply that tonight if no objections. (feel free to apply it sooner if you like)
18:05 psy_ joined #perl6
18:08 adhoc joined #perl6
18:09 firstdayonthejob joined #perl6
18:09 AlexDaniel FIRST++ # useful!
18:10 [Coke] m: FIRST #'{comment}
18:10 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/mXpFyqqpAZ␤Missing block or statement␤at /tmp/mXpFyqqpAZ:1␤------> 3FIRST #'{comment}7⏏5<EOL>␤»
18:10 AlexDaniel m: FIRST { #'{comment} }
18:11 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gMRMi4R8gz␤Missing block␤at /tmp/gMRMi4R8gz:1␤------> 3FIRST { #'{comment} }7⏏5<EOL>␤»
18:11 AlexDaniel m: FIRST { #'{comment} } { }
18:11 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/6hd8jszYGH␤Missing block␤at /tmp/6hd8jszYGH:1␤------> 3FIRST { #'{comment} } { }7⏏5<EOL>␤»
18:11 AlexDaniel m: { FIRST { #'{comment} } }
18:11 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Iy6IYzE417␤Missing block␤at /tmp/Iy6IYzE417:1␤------> 3{ FIRST { #'{comment} } }7⏏5<EOL>␤»
18:11 AlexDaniel missing loop perhaps?
18:12 lizmat joined #perl6
18:12 * lizmat waves from TechInc in Amsterdam
18:13 lizmat m: dd ^10 .map(** *  5)   # WAT ?  I have *no* idea what's going on here
18:13 camelia rakudo-moar 75c6b9: OUTPUT«((0,).Seq, (5,).Seq, (10,).Seq, (15,).Seq, (20,).Seq, (25,).Seq, (30,).Seq, (35,).Seq, (40,).Seq, (45,).Seq).Seq␤»
18:14 gfldex m: (**).WHAT.say # see: https://www.youtube.com/watch?v=RHVSshgPlQs
18:15 camelia rakudo-moar 75c6b9: OUTPUT«(HyperWhatever)␤»
18:15 lizmat aahhhh
18:15 lizmat duh  :-)
18:15 AlexDaniel perhaps HyperWhatever should be *more* documented?
18:16 AlexDaniel how many times I've seen that question
18:16 lizmat yeah...  and get burned into my brain  :-)
18:16 AlexDaniel (I've even asked it once myself…)
18:16 gfldex if you tell me what it acutally does, i will be happy to doc it
18:16 moritz it's somewhere in the design docs
18:16 moritz S02 most likely
18:16 AlexDaniel gfldex: it is in S** somewhere
18:16 AlexDaniel yeah
18:16 alpha123 it's in S02, but the section is very short
18:17 alpha123 https://design.perl6.org/S02.html#The_HyperWhatever_Type
18:17 gfldex http://design.perl6.org/S02.html#The_HyperWhatever_Type
18:17 gfldex i know where it is in the design docs but still don't know what it actually does
18:17 AlexDaniel “In general a Whatever should be interpreted as maximizing the degrees of freedom in a dwimmy way, not as a nihilistic "don't care anymore--just shoot me".” – priceless
18:18 troydm don't consider it offense but I kinda like p5 more, it has it has nostalgic unix flavour
18:18 Skarsnik lol what
18:19 AlexDaniel or this “Other uses for * and ** will doubtless suggest themselves over time.” instead of explaining how is it supposed to be used.
18:19 xinming_ joined #perl6
18:19 [Coke] AlexDaniel: well, we did retroname those the speculations.
18:19 alpha123 I think I'm beginning to understand it
18:19 AlexDaniel troydm: and that's totally OK! Perl 5 was going strong for quite some time, I think that it will continue to grow for some years :)
18:19 troydm plus p6 syntax looks weird sometimes
18:19 AlexDaniel m: say (* * *)(4,2) # like when?
18:19 camelia rakudo-moar 75c6b9: OUTPUT«8␤»
18:20 alpha123 AlexDaniel: That makes sense though
18:20 alpha123 why did * get used instead of _ for whatever though
18:20 alpha123 (_ * _)(4, 2) seems nicer
18:20 alpha123 but... whatever
18:20 AlexDaniel m: say ༧༪² × ½ # weird? Like?
18:20 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ccf2R4V3nY␤Bogus postfix␤at /tmp/ccf2R4V3nY:1␤------> 3say ༧7⏏5༪² × ½ # weird? Like?␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end…»
18:21 AlexDaniel m: say ༪² × ½ # weird? Like?
18:21 camelia rakudo-moar 75c6b9: OUTPUT«0.125␤»
18:21 AlexDaniel alpha123: because _ is used for translations and other stuff
18:21 alpha123 Okay, I think HyperWhatever basically just automatically turns a regular operation involving a Whatever into a mapped Whatever
18:21 alpha123 it's like a funky list monad except not
18:22 AlexDaniel alpha123: though we should probably have some unicode version of whatever
18:22 AlexDaniel though maybe not, since you can do this:
18:22 AlexDaniel m: (* × *)(4,2).say
18:22 camelia rakudo-moar 75c6b9: OUTPUT«8␤»
18:22 troydm so after many years p6 is finally out?
18:23 hankache joined #perl6
18:23 AlexDaniel troydm: yeah
18:23 gfldex m: my &c = (** * 1); dd &c(1) # so it can listify things
18:23 camelia rakudo-moar 75c6b9: OUTPUT«(1,).Seq␤»
18:23 vendethiel joined #perl6
18:23 troydm seems like I'm in Back To The Future movie
18:24 xinming joined #perl6
18:24 alpha123 troydm: Perl6 seems weird but it's loaded with so many brilliant ideas I can't help but like it :)
18:24 troydm only in 10 years past
18:24 mspo troydm: #3?
18:24 flussence troydm: it's been out for years; some people simply refuse to accept that unless there's a big official press release telling them it is.
18:25 alpha123 AlexDaniel: Maybe double low line makes sense... kinda sorta... (‗ * ‗)(4,2)
18:25 gfldex troydm: it's 15 years. Before you complain, when you where 15 years old, where you production ready?
18:25 troydm so how much of p5 community is going to migrate to p6?
18:25 AlexDaniel alpha123: or maybe ⍰
18:25 Peter_WR Is it wrong to describe Perl and 6 on programming languages when asked why it looks the way it does by people? :P
18:26 Peter_WR *huffman encoding on programming
18:26 * gfldex .oO( Perl 6 is sweet 16 and ready to rock! )
18:26 masak troydm: if I were a heavy Perl 5 user, I would perhaps look into Perl 6, but I wouldn't abandon all my Perl 5 code overnight.
18:26 japhb troydm: That will take quite a long time.  Perl 5 is quite good at what it does, and there is a LOT of Perl 5 code out there.
18:26 alpha123 troydm: They serve different purposes, and are pretty much different languages entirely, so I'm not really sure migrating makes sense
18:26 [Coke] gfldex: not cool.
18:27 troydm alpha123: without CPAN there is not much progress in usability
18:27 gfldex [Coke]: if I failed to be funny, please accept my apology
18:27 alpha123 AlexDaniel: bother, seems either tmux, weechat, or putty is messing up the encoding for that
18:27 flussence I wonder how much of the C community migrated to C++. GCC took a quarter century.
18:27 troydm and CPAN is created by ppl's needs
18:27 masak gfldex: Perl 6 won't be 16 until July 18th this year.
18:27 mspo flussence: they should have been migrating to D
18:28 gfldex just a thought then
18:28 flussence mspo: they need a compiler for that first :D
18:28 alpha123 mspo: yuck, I wouldn't use D for most of the things I use C for
18:28 [Coke] so, troydm, if you'd like to see our previous responses to this conversation, please feel free to dig through the IRC log.
18:28 troydm if there is no needs there won't be any 15k modules for all purposes
18:28 [Coke] Or check the FAQ.
18:28 mspo I have some p5 stuff I'd like to write in 5, but there are no modules :)
18:28 AlexDaniel alpha123: █ * █ :)
18:30 wamba joined #perl6
18:30 troydm I think I'll go and watch some Warmingthon's presentations on P6, that dude is entertaining
18:30 frew I'm trying to build the latest star (from november) under alpine linux and am getting this error: https://gist.github.com/frioux/b8e055c7a71a1fabe862
18:30 frew is this something that using a checkout would fix?
18:30 moritz mspo: did you confuse 5 and 6 here at least once?
18:31 mspo moritz: yes
18:31 mspo sorry
18:31 flussence frew: that's odd... what GCC are you using?
18:31 frew 4.9.2
18:31 mspo basically I have some web stuff I'd like to be working on but mojolicious is difficult to not use
18:31 frew but muslibc, not glibc
18:32 mspo even though it would be more fun to be learning perl6 at the same time
18:32 moritz mspo: are you aware of Inline::Perl5?
18:32 troydm will there be a port of mojolicious to p6?
18:32 flussence frew: I have a feeling there's some assumption GCC5 is in use, they changed the default --std in that. You might be able to get it building with CFLAGS=--std=c99 or so
18:32 frew flussence: I'll try that
18:32 Skarsnik troydm, do it :)
18:32 frew flussence: I need to do that at configure time or make time?
18:33 troydm Skarsnik: nah, u first
18:33 flussence should work if you pass it to the make command
18:33 * alpha123 has a tendency to just edit makefiles with random GCC flags until things build
18:33 peter__ joined #perl6
18:33 frew I very rarely compile stuff like this these days
18:34 frew but I got annoyed at using python for little things and figured I'd go the opposite direction
18:34 flussence troydm: go ask #mojo that question
18:34 * alpha123 has also been spoiled by BSD ports system
18:34 frew hah
18:34 frew c99 made it fail sooner
18:34 flussence :(
18:34 alpha123 try gnu11 then!
18:34 troydm iirc there is Sinatra kinda framework for p6 eady?
18:35 troydm already*
18:35 flussence frew: oh, it's -std not --std, that might be why. my bad
18:35 frew huh
18:35 frew I wonder why it even made a difference then?
18:35 * alpha123 can't remember how he built Star on FreeBSD, but it involved messing with GCC flags for a while
18:36 troydm isn.'t FreeBSD using clang?
18:36 [Coke] (mojo) there won't be a thing called mojo, no; they want to keep that branding for their own product. There will be something mojolike, for sure.
18:36 flussence just checked the manpage, -std=gnu11 is the default for gcc5.3
18:36 hankache troydm yes it's called "Bailador"
18:36 [Coke] note that bailador was more of a translation of Dancer, as I understand it.
18:36 alpha123 troydm: some things rely on GCC extensions that clang hasn't implemented
18:36 [Coke] but "some web framework", fersure.
18:36 alpha123 troydm: but yes, the base system is compiled with clang and ships with clang by default
18:38 troydm alpha123: those things will eventually be ported?
18:38 hankache [Coke]++
18:38 alpha123 troydm: well, eventually the goal is for clang to implement all of GCC's extensions, but that doesn't really have much to do with FreeBSD
18:38 gfldex it may not be the best idea to port a Perl 5 framework to Perl 6 as none of them are very 6ish.
18:39 RabidGravy this is my view too
18:39 muraiki gfldex++
18:39 peter__ joined #perl6
18:39 hankache gfldex++
18:40 hankache none of them are very 6xy :D
18:40 frew hm
18:40 Skarsnik 6xy is a nice word :)
18:41 frew so none of those flags worked
18:41 muraiki haha, 6xy :)
18:41 frew I'll try just rakudo, not star
18:41 pierre-vigier joined #perl6
18:41 gfldex i have a few idea how to 6xify a web framework but got discracted by modules in the eco system failing tests
18:42 ZoffixW joined #perl6
18:42 ZoffixW troydm, the port of Mojolicious is currently undecided. But why do we need a "port"? Mojolicious is a toolkit, much of whose bits are provided by the Perl 6 core
18:43 muraiki good point zoffixw
18:43 mspo bottle.py is probably a good thing to port :)
18:44 ZoffixW m: 'foobar' ~~ / 'f' 'o' ~ 'a' $<foo>=(.+)/; say $<foo>
18:44 camelia rakudo-moar 75c6b9: OUTPUT«「ob」␤»
18:45 * frew gives up for now
18:45 ZoffixW I'm not entirely sure of the workings of ~ in regexes and I don't see it documented anywhere. Specifically, does the rest of the regex have to be between the stuff shown by the ~?
18:45 frew if anyone wants to work together to get perl6 building on alpine let me know.
18:46 ZoffixW Spotted it here: https://github.com/tadzik/perl6-Config-INI/blob/master/lib/Config/INI.pm#L16
18:46 timotimo mspo: isn't bottle kind of in Bailador territory?
18:46 yoleaux 15:11Z <bpetering> timotimo: I don't know about keccak in Perl 6 yet, but in addition to libgit2 I'm working on bindings for libsodium, which lets you do more modern hashing
18:46 timotimo .tell bpetering great to hear we're getting libsodium bindings :)
18:46 yoleaux timotimo: I'll pass your message to bpetering.
18:46 mspo timotimo: it's more like Mojolicious::Lite ?
18:47 mspo ideally I'd like to see something like gun + cowboy + $frameworks
18:47 ZoffixW I wanna see something higher-level. Something you write business logic in and you get the web interface for free.
18:47 peter__ joined #perl6
18:47 ZoffixW With all the websites looking the same these days, I doubt something like that is too outrageous to think about.
18:48 mspo ZoffixW: like an auto-CRUD?
18:48 domidumont joined #perl6
18:48 timotimo like the django auto-admin-interface?
18:48 ZoffixW mspo, like making websites without having to write any HTML/CSS/JS :)
18:49 alpha123 I'd like to see something higher-level also, like a sort of XSL in perl6 that specifies how you want to translate models into views
18:49 mspo ZoffixW: use CGI!
18:49 ZoffixW mspo, I don't see the connection...
18:50 mspo print b("I'm a block);
18:50 mspo etc
18:50 ZoffixW mspo, you mean CGI.pm from Perl 5? :) Way to be vague
18:50 mspo ZoffixW: 'use' is overloaded
18:50 awwaiid yeah. you'd need: use CGI:from<Perl5>
18:50 peter__ joined #perl6
18:50 awwaiid (muahahaha)
18:51 alpha123 perl6 grammars use packrat parsing right?
18:51 _sri allright, i'll bite, what makes mojolicious "not very perl6-ish"?
18:51 alpha123 was there ever any consideration to generalized parsing? like earley or gll etc
18:52 _sri are there any perl6 features that completely change how one would design a web framework?
18:52 muraiki Zoffix: you might find inspiration in Magritte: http://book.seaside.st/book/advanced/magritte
18:52 awwaiid alpha123: I believe it is recursive-descent, but I could be wrong
18:52 ZoffixW m: 'zomg [foobar] blah' ~~ /'zomg ' '[' ~ ']' 'blah'/; say $<foo>
18:52 camelia rakudo-moar 75c6b9: OUTPUT«Nil␤»
18:52 _sri and remember that mojolicious is heavily async
18:52 ZoffixW m: 'zomg [foobar] blah' ~~ /'zomg ' '[' ~ ']' 'foobar'/; say $<foo>
18:52 camelia rakudo-moar 75c6b9: OUTPUT«Nil␤»
18:52 AlexDaniel _sri: multiple dispatch perhaps, maybe not
18:52 spider-mario joined #perl6
18:52 _sri AlexDaniel: that already fits in well
18:53 muraiki ZoffixW that is. whoops
18:53 _sri the router dispatches to methods on controller objects, unpacking query parameters or whatever to take advantage of multiple dispatch is super easy
18:54 awwaiid alpha123: I think there has been some posts at http://jeffreykegler.github.io/Ocean-of-Awareness-blog/ critical of the built-in rakudo parsing (from the author of Marpa, an Earley variant). You can definitely use other parser engines from Perl 6, and I think there is even a p6-Marpa binding as an example (though maybe it isn't all sugared up)
18:54 n0tjack joined #perl6
18:55 timotimo ZoffixW: would you expect that to have a value? if so, why?
18:56 awwaiid alpha123: like you could totally either dynamically extend the rakudo grammar (macro stuff) to add some cool BNF stuff that serves as a DSL
18:56 mspo _sri: it's not very 6-ish because it's written in 5 :)
18:56 * awwaiid afk
18:56 mspo _sri: so feel free to start 6ojo; I'll use it
18:56 ZoffixW timotimo, I don't know what '~' is in the regex
18:56 _sri some folks like RabidGravy seem to think that all perl5 code is outdated legacy garbage
18:57 alpha123 awwaiid: Thanks!
18:57 mspo 6jos web framwork, use six coffee cups as a logo
18:57 ZoffixW timotimo, well, I can understand '[' ~ ']' means "from [ to ]", but what about the named capture specified AFTER the '[' ~ ']', why does it get the value from between ~ ?
18:57 * alpha123 doesn't think there's anything wrong with top-down parsing in general, but has a slight distrust of PEG
18:57 alpha123 (when PEG parsers break it's usually in mysterious ways without telling you)
18:57 lichtkind why 1 is not recognized as Num?
18:57 ZoffixW lichtkind, because it's an Int
18:57 ZoffixW lichtkind, you want 1e0
18:58 RabidGravy er, _sri I think *citation needed - I don't believe I have ever said that
18:58 mspo ☕ ☕ ☕ ☕ ☕ ☕
18:58 lichtkind ZoffixW i thought Num is like base class for all number
18:58 timotimo ZoffixW: the syntax of ~ is "a ~ b c" turns into "match a, then match c, then match b"
18:58 timotimo basically
18:58 hankache m: say 1.WHAT
18:58 camelia rakudo-moar 75c6b9: OUTPUT«(Int)␤»
18:58 arnsholt alpha123: Earley's algorithm is also (fundamentally) top-down, so I wouldn't think that's the argument against the Perl 6 formalism
18:58 lichtkind 1 is recognized as Real
18:58 ZoffixW lichtkind, I believe that's Numerical
18:58 ZoffixW m: my Real $x = 1; say $x
18:58 camelia rakudo-moar 75c6b9: OUTPUT«1␤»
18:58 ZoffixW m: my Real $x = 1; say $x.WHAT
18:58 camelia rakudo-moar 75c6b9: OUTPUT«(Int)␤»
18:59 xinming_ joined #perl6
18:59 lichtkind there is no type numerical
18:59 flussence m: say Int.^roles
18:59 camelia rakudo-moar 75c6b9: OUTPUT«((Real) (Numeric))␤»
18:59 lichtkind there its numeric
18:59 lichtkind thanks
18:59 hankache m: my $x = 1.Num; say $x.WHAT
18:59 camelia rakudo-moar 75c6b9: OUTPUT«(Num)␤»
18:59 _sri RabidGravy: allright, then maybe you could elaborate on what would make a perl5 framework more perl6-ish?
18:59 ZoffixW lichtkind, Numeric
18:59 alpha123 arnsholt: I think I'd argue that Earley is more bottom-up than top-down
19:00 ZoffixW lichtkind, looking at the type graph, I see that Int is not a descendant of Num, but is a decendant of Real: http://docs.perl6.org/type/Real
19:00 arnsholt No, it's definitely top-down. IIRC, it's usually termed top-down with bottom-up filtering, or some such
19:00 hankache m: say 1 ~~ NUm
19:00 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/onqWLZJ5Ci␤Undeclared name:␤    NUm used at line 1. Did you mean 'Num', 'num'?␤␤»
19:00 hankache m: say 1 ~~ Num
19:00 camelia rakudo-moar 75c6b9: OUTPUT«False␤»
19:00 mspo _sri: probably using the built-in HTTP types and stuff
19:00 RabidGravy _sri, I haven't said a word about Perl 5 frameworks
19:00 _sri mspo: "built-in"?
19:00 hankache m: say 1 ~~ Real
19:00 camelia rakudo-moar 75c6b9: OUTPUT«True␤»
19:01 alpha123 what is 'Numeric' anyway
19:01 alpha123 does it just include stuff closed over addition or what
19:01 arnsholt Numeric is a role for anything that can be a number
19:01 alpha123 or multiplication
19:01 arnsholt http://doc.perl6.org/type/Numeric
19:02 mspo _sri: oh sorry I thought Grammar::HTTP and HTTP::Server were built-in but they're not
19:02 _sri RabidGravy: http://irclog.perlgeek.de/perl6/2016-01-05#i_11834256
19:02 arnsholt Num OTOH is for floating point numbers
19:02 hankache _sri anyone can port whatever they want to Perl 6. I think what they meant is that they'd rather build something *New* instead of porting an existing way of doing things.
19:03 _sri gfldex: you too, what makes a web framework perl6-ish?
19:03 _sri hankache: what i hear is that you'd rather not have experienced framework developers join the community
19:04 ZoffixW _sri, I believe the comments were made because, say Mojolicious, implement their own stuff (like event loop), but in Perl 6 that's in core. So there's no point in "porting" the event loop.
19:04 hankache _sri where did you here that?
19:04 ZoffixW I think there's confusion between the meaning of word "port" here.
19:05 _sri ZoffixW: imo that's silly, of course you only port the basic ideas and concepts behind the framework, using perl6 idioms
19:05 hankache _sri because we actually want everybody to join the community experienced or not
19:05 _sri porting something line for line would be a huge waste of time
19:05 muraiki I think my ++ there was as one of the "not experienced" people. :) I think my main concern is to make sure a p6 framework takes advantage of new abstractions, like supplies, in its design
19:06 _sri hankache: every time i see RabidGravy say something i'm getting that vibe
19:06 muraiki it was certainly not meant as a dismissal of anybody's work
19:06 muraiki and I apologize if it was interpreted in that manner
19:06 gfldex _sri: type safety for a start, use introspection to deduce binding of arguments that come over the wire. see the following fairly old blog post https://gfldex.wordpress.com/2010/08/04/why-perl-6-part-1-maybe/
19:07 hankache _sri we like to joke a lot and have fun. One doesn't have to over analyze what people say
19:07 _sri guess what, when a bunch of rails core folks joined the elixir community they built a rails clone, and over tie it has grown into phoenix
19:07 _sri *time
19:08 hankache _sri if anyone decide to port anything they are more than welcomed, we actually encourage that
19:08 mspo https://github.com/msporleder/6coffees
19:08 _sri no, you really don't
19:09 _sri and you're going to regret that soon i believe
19:09 hankache _sri how so ?
19:09 FROGGS O.o
19:09 mst _sri: if you don't feel welcomed, you're welcome to leave
19:09 mst continuing to attack people for not being welcoming enough
19:09 _sri like i regretted discouraging too simple mojolicious plugins back in the days :)
19:09 FROGGS mst: kssshhh!
19:09 mst is going to make them increasingly disinterested in trying
19:09 mst and I'd rather we saved our efforts for people who want to contribute rather than make vague complaints
19:09 _sri choo choo, the mst hate train arrived
19:10 muraiki I think in the back of my mind I was thinking about Seaside. it takes advantage of some unique features of Smalltalk and does things in a Smalltalky way. I like that it does that, even if that makes it fairly unorthodox in design.
19:10 muraiki it'd be neat to see such a thing with p6, but I honestly haven't connected the dots fully :)
19:10 mst FROGGS: sri's had this same rant before already, and still won't explain what he wants people to do differently, sadly
19:10 FROGGS I see
19:11 ZoffixW _sri, so join the Perl 6 community and build the Mojolicious clone :) You're most qualified
19:11 hankache _sri I don't get it, I tell you we encourage people to port stuff, you tell me we don't. Yet here I am telling you that we do.
19:11 alpha123 arnsholt: Does anything assume that multiplication on Numerics is commutative?
19:11 FROGGS _sri: usually ppl pop in here and want to work on their projects which are often "small ports" of existing stuff... we help them getting with little thinkos and the design...
19:11 _sri for the record, i really wanted to know what the community thinks would make a web framework perl6-ish
19:12 mst I'd love to see _sri explain in concrete terms what we can do to avoid him feeling that we'd "rather not have experienced framework developers"
19:12 mst esp. since there's a fair few of us already in here, myself included
19:12 ZoffixW mst, well, I can point to these comments: http://irclog.perlgeek.de/perl6/2016-01-05#i_11834253
19:12 ZoffixW Which also rebuke hankache's comments above.
19:12 El_Che perl6 needs whatever libs it can get to get traction, new and ports (imho)
19:12 ZoffixW I can see how that can be interpreted as "we don't want P5 folks porting their stuff to P6"
19:13 _sri well, for starters, i'd feel way more welcomed if the community didn't let mst attack me with a huge wall of rants
19:13 FROGGS _sri: a nice extendable API, using the concurrency primitives etc...
19:13 psy_ joined #perl6
19:13 FROGGS _sri: I mean, it is not easy to define "sixish"
19:13 alpha123 maybe some nifty grammar stuff for routes
19:13 ZoffixW Grammars are slow
19:13 FROGGS I'd also have trouble defining P5ish
19:13 alpha123 *for defining routes
19:13 * flussence isn't interested in welcoming people who only ever show up to pick fights. *plonk*
19:13 Skarsnik FROGGS, any idea how non NC Str end with the nc:explicitmanaged role? https://gist.github.com/Skarsnik/7f2fee97d56c5acc1587 (The expected Data are not from NC call, but hard put in the code)
19:14 _sri FROGGS: right, and mojolicious for example uses concurrency very extensively
19:14 arnsholt alpha123: I have no idea! Hopefully not =)
19:14 FROGGS Skarsnik: hmmm, no, no idea... that's quite surprising
19:14 flussence you can only hug trolls so many times before it becomes obvious they have no intention of changing
19:15 peter__ joined #perl6
19:15 _sri FROGGS: the perl6 primitives don't really bring much new to the table, besides a little syntax sugar
19:15 FROGGS _sri: still that does not make it very 6ish or 5ish or so
19:15 RabidGravy FROGGS, as a complete aside, would you say that multis from C++ overloads is going to work?
19:16 Skarsnik RabidGravy, it could work, since they are mangled
19:16 FROGGS RabidGravy: I'm not sure, also because I lack a lot of C++ knowledge... but if you'd add a testcase to t/04-nativecall...
19:16 arnsholt Are C++ overloads late-bound or early-bound though?
19:16 muraiki _sri: a bit of a tangent, but have you taken a look at p6sgi/p6w? it could use some input, especially re: websocket. https://github.com/zostay/P6SGI
19:17 FROGGS arnsholt: I'd guess the latter
19:17 hankache _sri let's backtrack a bit. Do you see any advantages of Perl 6 over Perl 5?
19:17 RabidGravy yeah the mangling somehow encodes the signature, but how I don't know
19:17 nine _sri: I'm curious as I've never tried mojolicious. How can it do concurrency well, when Perl 5 doesn't have any useful threading? You mean async network handling?
19:17 alpha123 arnsholt: Just from a cursory reading of the docs, it seems to suggest Numerics consist only of Real and Complex
19:17 FROGGS RabidGravy: if we are talking about multi methods in Perl 6 that map to their overloads in C++, then I'd say they should work
19:18 arnsholt FROGGS: Then generating a multi would give semantics from the C++ side. I'd be *very* careful about that
19:18 _sri hankache: yes, i don't believe in that kind of abstraction, it's antiquated
19:18 _sri hankache: you just have to look at rails right now, they are in so much trouble because rack is holding them back
19:19 FROGGS arnsholt: I think I was thinking something else... render my sentence rubbish
19:19 muraiki _sri: did you mean those comments for me? heh
19:19 _sri nine: concurrency, not parallelism
19:20 _sri oops, i meant nine
19:20 _sri argh
19:20 masak :)
19:20 ZoffixW :D
19:20 pi4 joined #perl6
19:20 _sri let me sort through the conversations ;p
19:20 * FROGGS .oO( time for a cuppa? )
19:20 masak take your time
19:20 PerlJam _sri: the one thing you'll find lots of on #perl6 is ... forgiveness   :)
19:21 masak we ran out of permission long ago
19:21 _sri muraiki: yes, i actually did mean you there :)
19:22 muraiki _sri: hehe, thanks. I'd be really interested in knowing more about the ruby/rack situation, if you could point me in any kind of direction. I also am not fully sure about the advantages of that abstraction, but I'm just a framework consumer, not author
19:22 _sri hankache: that is a very interesting question, and actually, so far, i do not see any features in perl6 yet that would be a huge advantage for a web framework
19:22 nine _sri: ok, so concurrency as in async. What about parallelism? Wouldn't that bring interesting new possibilities to a framework?
19:22 FROGGS tadzik: ping
19:23 PerlJam nine: I don't think so (regardless of what _sri will tell you :)
19:23 PerlJam (assuming you mean "web framework" there)
19:23 _sri nine: it could make a few things easier, but it's not actually groundbreaking
19:24 hankache _sri how would one know if they never tried ?
19:24 _sri nine: like i said before, bigh performance web servers in C tend to use the "prefork a bunch of event loops" architecture
19:24 masak that makes sense
19:25 _sri hankache: because there's a lot of experience already out there from implementing web servers in all kinds of ways
19:25 FROGGS sure, you dont need any interaction between the workers
19:25 PerlJam hankache: the problem is that at the level of "web framework" the problem space has been well-expored.  You'd have to build something at a higher level of abstraction for Perl 6 to do anything ground breaking (IMHO)
19:25 PerlJam *explored
19:25 * ZoffixW nods
19:26 * PerlJam should just stop typing and let _sri speak for him  ;)
19:26 _sri and note that i specifically mention web servers, because if you don't implement your own web server, you'll prolly not be able to benefit much from your concurrency/parallelism primites anyway
19:26 ZoffixW And not at the Yet Another CMS level. Something lower than that
19:26 muraiki PerlJam: yeah, that's why I mentioned Seaside for Smalltalk. for instance, if you hit a bug in a method, you can fix that method -- whether from the smalltalk environment or even in your browser -- and then resume execution as if the error hadn't occurred
19:26 nine I would love to be able to render page content on a different thread than the surrounding layout.
19:26 hankache indeed but this is an opportunity
19:27 alpha123 nine: I feel like that causes more potential problems than it solves, plus rendering is hardly much of a bottleneck anyway
19:27 DrForr Vote for YAPC::EU keynote speakers at http://blog.cluj.pm/post/vote-your-keynote-speaker-for-yapc-europe-2016
19:27 _sri muraiki: while seaside was a breath of fresh air, it ultimately failed
19:27 nine Or even different parts of the layout on different threads and combine them later.
19:27 nine alpha123: well it is in our case
19:27 muraiki _sri: yes, a failure I lament :( I think it was bad timing... it explicitly was "heterodox" as the world moved to things like REST
19:27 sprocket_ joined #perl6
19:27 peter__ joined #perl6
19:28 alpha123 nine: Oh? What are you doing that takes so long?
19:28 PerlJam muraiki: hasn't that *always* been smalltalks problem?  ;)
19:28 _sri muraiki: naah, you want to avoid server-side state, it just doesn't fit
19:28 muraiki PerlJam: haha :) yeah, things like not being able to use your existing tools (unless smalltalk works with gnu smalltalk) are a big barrier
19:28 nine alpha123: it's...complicated and would take too long to explain, as I should be with my girlfriend right now :) Parts are explained in http://niner.name/DTML_Compiler.pdf though
19:28 muraiki _sri: yup
19:29 alpha123 nine: Alright, have fun
19:29 _sri regarding threads, how expensive is a thread in perl6 these days memory wise?
19:30 _sri these days you have to assume 10-100k concurrent sockets
19:30 * _sri is actually regularly running mojolicious benchmarks with 20k sockets
19:30 PerlJam I dunno if anyone has done a memory profile of threads yet
19:31 _sri if you throw a bunch of threads at every socket, you migth get in trouble fast
19:32 _sri worse if you sockets are http/2, then you might have a few dozen streams multiplexed on every socket, each using a bunch of threads for rendering a template or whatever ;p
19:32 muraiki is there any info on how p6 threads work? IIRC supplies use a thread pool. are these full os level threads, or something more lightweight?
19:33 lizmat afaik, the ThreadPool is a pool of OS threads
19:33 lizmat now, scheduling something to be executed asyncly, just means that: it's scheduled
19:33 yqt joined #perl6
19:33 lizmat it will be executed when a thread becomes available from the ThreadPool
19:34 _sri i'd also be interested in more information about garbage collection in perl6 and threads... historically garbage collection pauses are a big problem for web servers
19:34 nine _sri: we usually have just a couple of page requests per second. Our challange is to make individual requests faster, not handle Millions
19:34 timotimo right. additionally, you're free to build your own scheduler, or use one of the pre-made ones, like the CurrentThreadScheduler
19:34 lizmat timotimo might know the most about gc
19:34 lizmat and delays caused by it
19:34 timotimo right, i can give you an overview
19:35 timotimo don't know very much about delays; our gc is somewhat fast, in general
19:35 timotimo we don't have "proper" multi-threaded profiling yet, though
19:35 timotimo each thread has its own nursery of 4 MB (inspired by the typical size of the l3 cache)
19:35 colomon joined #perl6
19:36 timotimo when one nursery runs out, the corresponding thread will signal all other threads that a GC run is supposed to start
19:36 _sri nine: modern browsers can open 6 sockets to your web server for one page
19:36 _sri nine: not to mention websockets of course
19:36 timotimo then all threads will collect stuff in their nurseries in parallel, and there's some "work stealing" that i haven't bothered to look at yet
19:37 timotimo when one thread is currently "blocked" (for example, executing native code via NativeCall, or doing something else that makes it unable to participate in GC), it'll have its work done by another thread
19:37 lizmat are these cleanup jobs scheduled like other jobs?
19:38 timotimo it's an entirely separate system that does GC "orchestration"
19:38 timotimo it's also per-os-native-thread
19:38 lizmat ah, because it's on MoarVM level, rather than Perl6  :-)
19:39 timotimo right
19:39 _sri timotimo: does the gc algorithm have a fancy name i can google? :)
19:39 [Coke] _sri: I'm not sure people think mojolicious isn't six-ish. I just recall a conversation where you said basically, don't use the mojo name on whatever you end up working on in Perl 6, and I respect that.
19:39 [Coke] (this in relation to your first send today)
19:39 timotimo _sri: jnthn gave a presentation on GCs and says a whole lot about MoarVM's GC in that talk
19:39 _sri [Coke]: right, i was not referring to that
19:40 timotimo http://jnthn.net/papers/2013-bs-secret-life-of-gc.pdf
19:40 timotimo http://www.infoq.com/presentations/terminology-garbage-collector
19:40 [Coke] _sri: hokay. Just wanted to me sure you and I were OK.
19:41 timotimo in general, moar's GC is a "bump-the-pointer compacting" nursery with a non-moving generation two with a free-list. on top of that, it's parallel, but not concurrent
19:41 timotimo and the nurseries are separate
19:41 arnsholt _sri: Basically, it's a hemi-space copying GC for the nursery, with an older generation that is collected less frequently
19:42 nine _sri: so 6 sockets * 10 requests per second * 5 threads is still a very manageable 300 tasks per second that can be distributed to 24 threads for our 24 core server.
19:42 nine Really afk now...
19:42 vendethiel joined #perl6
19:43 timotimo oh, semi-space, i forgot that word
19:44 mspo hemi-space would be more awesome
19:44 timotimo hemi-spheres?
19:45 arnsholt Well, hemi- is Greek and semi- is Latin for the same, so not a big difference, really
19:45 mspo https://en.wikipedia.org/wiki/Hemispherical_combustion_chamber
19:45 timotimo ah, ok
19:45 timotimo what's the latin word for this kind of "space"?
19:45 arnsholt But I think timotimo is right that the actual term is semi-space, not hemi-space
19:46 _sri nine: 10 rps is very very slow, i think for a real app 600 rps is a better goal
19:46 arnsholt Latin for "space" is "spatio"
19:46 timotimo this isn't about which word is right
19:46 timotimo but which word is cool
19:46 muraiki timotimo++
19:46 El_Che locus?
19:46 timotimo so, hemi-spatio garbage collection? :P
19:46 arnsholt No, locus is place
19:46 arnsholt semi-spatio =)
19:46 timotimo demi-spatio?
19:46 El_Che place and space are synonims
19:46 arnsholt For hemi- we'd need the *Greek* word, which I have no idea what is, sadly =)
19:46 timotimo El_Che: except if one means location and the other means expanse
19:47 El_Che firmamentum is pretty cool
19:47 _sri arnsholt/timotimo: interesting, is there another language runtime that uses something similar?
19:47 timotimo arnsholt: in this case it's the same joke as "polyamorism is wrong!! you can't mix greek and latin like that!"
19:47 timotimo _sri: no idea.
19:47 El_Che (still use in spanish and french for space/universe)
19:48 arnsholt _sri: Semi-space copying is what most Lisp machines used, AIUI
19:48 arnsholt timotimo: Pretty much, yeah =)
19:49 _sri [Coke]: absolutely, i was only referring to the pattern i see repeating here every other day... someone asks for a framework port, some folks say that no framework out there is perl6-ish, so ports make no sense, and then nobody elaborates on what that actually means
19:50 _sri and what always bugs me a little is the anti-perl5-ish undertone
19:52 _sri arnsholt: wait, like cheney's algorithm?
19:52 tadzik FROGGS: pong
19:52 hankache _sri most of the time people are joking, really don't take it word for word
19:52 FROGGS tadzik: I want to add a --bin-prefix option to panda
19:53 arnsholt _sri: Skimming the Wikipedia page for that, that's it yeah
19:53 _sri arnsholt: ah!
19:55 _sri i thought that was considered antiquated now
19:55 tadzik FROGGS: what for? Please don't say "for bins" :P
19:55 FROGGS *g*
19:55 FROGGS tadzik: for rakudo star actually... we install into a common bin folder
19:55 _sri (not that i know anything about gc algorithms)
19:55 FROGGS tadzik: so the modules go into site, but the scripts dont
19:56 tadzik I see
19:56 tadzik I guess it makes sense
19:57 FROGGS I think so...
19:57 arnsholt _sri: Not too antiquated I think. Most importantly it's an improvement over stop-the-world for very little additional algorithmic complexity, I think
19:57 arnsholt Not to mention that I think jnthn has prioritized correctness over speed =)
19:57 FROGGS even when you have other repositories... you potentially want to put just a few bin directories in path
19:59 timotimo the thing is, if you don't have stop-the-world, you need to check much more often in your C code whether or not an object you've been working on has been moved in the mean time
19:59 pierre-vigier joined #perl6
20:00 gfldex is there a buildin to hexdump a Buf or Blob?
20:00 timotimo so the C code becomes more complicated and easier to do wrong
20:00 timotimo gfldex: you can .fmt("%x", "")
20:01 PerlJam gfldex: I wrote https://github.com/perlpilot/p6-HexDump-Tiny a while ago
20:01 _Dave_ joined #perl6
20:02 gfldex m: my Buf $rn .=new("\r\n".encode); say $rn.fmt("%x");
20:02 camelia rakudo-moar 75c6b9: OUTPUT«Method 'fmt' not found for invocant of class 'Buf'␤  in block <unit> at /tmp/wdBgSoOKoT line 1␤␤»
20:02 timotimo PerlJam: it doesn't look like your code would actually work on a buf or blob?
20:02 timotimo oh, sorry, it'd have to be .list.fmt("%x")
20:03 timotimo m: my Buf $rn .=new("\r\n".encode); say $rn.list.fmt("%x");
20:03 camelia rakudo-moar 75c6b9: OUTPUT«d a␤»
20:03 timotimo m: my Buf $rn .=new("\r\n".encode); say $rn.list.fmt("%2x");
20:03 camelia rakudo-moar 75c6b9: OUTPUT« d  a␤»
20:03 timotimo m: my Buf $rn .=new("\r\n".encode); say $rn.list.fmt("%02x");
20:03 camelia rakudo-moar 75c6b9: OUTPUT«0d 0a␤»
20:03 gfldex m: my Buf $rn .=new("\r\n".encode); say $rn.list.fmt("%X");
20:03 camelia rakudo-moar 75c6b9: OUTPUT«D A␤»
20:03 timotimo m: my Buf $rn .=new("\r\n".encode); say $rn.list.fmt("0x%02x");
20:03 camelia rakudo-moar 75c6b9: OUTPUT«0x0d 0x0a␤»
20:04 PerlJam timotimo: I actually don't remember, but if someone wants to *make* it work on a Buf or a Blob ...   :)
20:05 timotimo should be easy with a little bit of multi sub
20:08 gfldex i'm trying to fix HTTP::Server::Async and got 2 bugs fixed and am now stuck with the last test that fails
20:08 gfldex https://github.com/tony-o/perl6-http-server-async/blob/master/t/07_chunkedrequestecho.t is giving me troubles and i have no idea if the test is faulty or not
20:09 gfldex i don't understand how \r\n and :bin work together
20:09 gfldex hance the need for hexdump :)
20:12 CIAvash _sri: I'v been waiting for a Mojolicious port since your interview :)
20:12 CIAvash http://www.josetteorama.com/all-about-mojolicious-interview-of-sebastian-riedel-part-2/
20:13 RabidGravy gfldex, I had a look at that too,  I'm pretty certain that's what it is, but I think the chunk parser is a little fragile anyway
20:15 gfldex RabidGravy: i had to add a .trim in the chunk parser to get rid of leading newlines. That may however not be a fix at all because .write is the binary form of .print .
20:16 RabidGravy FROGGS, I think the GNU symbol mangler needs a few extra cases, as I'm seeing different param letters than there are
20:17 FROGGS RabidGravy: quite likely
20:17 RabidGravy e.g. uint32 -> 'j'
20:17 RabidGravy I'll add some new tests
20:17 Skarsnik :) NC could need some more test x)
20:18 RabidGravy is there an equivalent to 'nm' for Windows so one can see the mangled names?
20:19 timotimo it'd surprise me if gnu nm doesn't support windows executables
20:20 FROGGS RabidGravy++
20:20 _sri CIAvash: heh, is there anything specific in perl6 that you're looking forward to using?
20:21 FROGGS RabidGravy: dumpbin /exports 11-cpp.dll
20:21 FROGGS timotimo: I guess you can't use nm if the dll was compiled with MSVC
20:22 timotimo oh
20:22 FROGGS but I never tried actually
20:23 mspo _sri: it might be nice to able to use multi subs somehow in ->to()
20:24 RabidGravy I don't have windows but I am going to add some tests that will almost certainly fail on windows
20:24 _sri mspo: i think the route would maybe define how to unpack parameters into arguments
20:25 _sri mspo: and you just define your .to('foo#bar') as usual
20:25 mspo _sri: http 2 support would be nice
20:25 mspo not 6 specific, though
20:25 Twirl joined #perl6
20:26 _sri mspo: as it happens, multiple dispatch is actually used in phoenix framework
20:26 ZoffixW joined #perl6
20:26 mspo _sri: I'd like to see an erlang gun-style split for protocol picking
20:26 ZoffixW I think this conversation sprung up a few times in the past, but... is there a way to reload a module without restarting the whole program?
20:27 ZoffixW My usecase is an IRC bot that I have to restart and reconnect to just to have it crash due to a syntax error in one of the modules it uses.
20:27 mspo _sri: and since perl-ish is super flexible it could be http/1.1, http/2, and eventually zeromq etc
20:27 ZoffixW Would be nice to have something that'd let it stay connected while I develop that module.
20:28 mspo basically
20:28 flussence ZoffixW: that's kind of a rare feature in any language
20:28 _sri mspo: i'm not actually familiar with gun
20:28 mspo I want easier/better erlang :)
20:28 _sri elixir is pretty great
20:28 mspo _sri: sorry I mean ranch
20:28 flussence ZoffixW: best you could probably do is have a syntax check in the restart command
20:28 mspo _sri: http://ninenines.eu/
20:28 FROGGS RabidGravy: I can test these with MSVC and gcc on windows
20:28 ZoffixW flussence, I've seen python bots do that and I'm sure it's possible to do in Perl 5 too.
20:29 mspo to be able to connect to my web server and reload code, restart stuff, insepct things, live change configs
20:29 mspo _sri: cowboy is what phoenix is using
20:29 mspo _sri: but that's all on the network and web server side, not the framework side
20:29 flussence ZoffixW: maybe my definition of "reload a module" is too picky here :)
20:29 Skarsnik Zoffix, for the crash part a try could maybe work?
20:30 Skarsnik but with precomp I am not sure if you can for the reload of a module
20:30 mspo _sri: I'd like to see more hooks in the execution cycle and I'm also a fan of the "middleware" concept found in golang web dev :)
20:30 Skarsnik *force
20:30 ZoffixW Skarsnik, that doesn't help, since I want it to use the updated code, once I fix the error
20:30 Skarsnik Zoffix, my guess is like in perl5, remove the module from the loaded list and require the file again
20:30 awwaiid middleware all the things!
20:31 _sri mspo: ah, we are actually redesigning that part of mojolicious right now :)
20:31 mspo _sri: which part?
20:31 _sri mspo: socket/protocol stack
20:31 Skarsnik I am not sure how you can clear the symbol loaded from the file thouh
20:31 mspo _sri: is that *in* mojo or somehow split in hypnotoad/morbo?
20:32 grondilu joined #perl6
20:32 _sri mspo: the issue doesn't look very fancy, but it's just that, more pluggable protocols https://github.com/kraih/mojo/issues/876
20:32 ugexe GLOBAL::<Symbol>:delete
20:32 CIAvash _sri: That's hard to answer :) I like a lot of new features that are in Perl 6, and that Perl 6 looks much cleaner. It's like what you said: "I love Perl6 the language, it solves all the problems I have with Perl5"
20:32 mspo cool
20:32 _sri mspo: if you want to help, jberger is leading the effort atm
20:33 ZoffixW ugexe, you make it sound so easy :)
20:36 ZoffixW GLOBAL::<IRC::Client::Plugin::Factoid>:delete; require IRC::Client::Plugin::Factoid; isn't working
20:36 Skarsnik You need to remove the file from the loaded stuff
20:36 Skarsnik too
20:37 ZoffixW Skarsnik, what's "loaded stuff"? Any docs?
20:37 Skarsnik that how it work in perl5, you delete the entry in @INC
20:37 pjscott joined #perl6
20:37 Skarsnik the undocumented? $*REPO stuff maybe?
20:40 itaipu joined #perl6
20:40 gfldex RabidGravy: i think i found the problem "34 0d 0a 00 57 69 6b 69 0d 0a" that's a hexdump from inside the chunk parser and i'm quite sure those zero bytes don't belong there. Sadly I have no idea where they might come from.
20:41 ZoffixW :o whatsthis? https://github.com/rakudo/rakudo/blob/nom/src/core/CompUnit/Repository/Installation.pm#L23
20:41 ZoffixW Looks mighty scary
20:41 ugexe its the wrapper for bin files, so when the bin files get precompiled eventually there is a perl6 entry point to load it
20:43 zakharyas joined #perl6
20:43 ZoffixW Ah
20:44 dalek star/release: 27046e3 | FROGGS++ | / (5 files):
20:44 dalek star/release: first working post 6.c star
20:44 dalek star/release: review: https://github.com/rakudo/star/commit/27046e33e9
20:44 ZoffixW woooo
20:44 muraiki yay
20:44 Ch0c0late joined #perl6
20:44 FROGGS it contains two patches though, one for panda and one for rakudo
20:45 hankache FROGGS++
20:46 Skarsnik Zoffix, hm, does not look there is something public to remove an entry
20:47 ZoffixW :9
20:47 ZoffixW *:(
20:47 ZoffixW Ah well.
20:48 Skarsnik ask nine x)
20:48 RabidGravy gfldex, no I don't know where it comes from either
20:48 _sri mspo: cowboy looks pretty well designed, i'd really like to get more of that kind of abstraction into mojolicious
20:49 mspo _sri: yeah it's generally considered best of breed in that world
20:51 pjscott joined #perl6
20:52 dalek mojo6: 014fb0a | coke++ | README.md:
20:52 dalek mojo6: update status
20:52 dalek mojo6: review: https://github.com/coke/mojo6/commit/014fb0ae89
20:52 dalek rakudo-star-daily: a66c76e | coke++ | log/ (10 files):
20:52 dalek rakudo-star-daily: today (automated commit)
20:52 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/a66c76e78a
20:53 [Coke] _sri: ^^ in case anyone finds the mostly abandoned mojo6 repo.
20:54 _sri [Coke]++
20:56 geraud joined #perl6
20:59 pjscott joined #perl6
21:00 bzipitidoo joined #perl6
21:02 AlexDaniel m: for ^10 { FIRST { say ‘first!’ }; SECOND { say ‘second!’ }; .say }
21:02 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/RJf6pMd8Zs␤Undeclared name:␤    SECOND used at line 1␤␤»
21:02 AlexDaniel :)
21:07 aartist joined #perl6
21:10 [Coke] I am actually really looking forward to getting a web framework in place. My previous requirement of having to run in a j2ee container is gone (we have docker now), so I could pretty easily spin up a prototype at work using Perl 6. (My biggest concern is DB stuff, which I hope will be set by the time I get there. :)
21:10 ennio joined #perl6
21:10 [Coke] I hope after the next monthly release I'll have time to hack on Perl 6 apps and modules, not just project-y stuff.
21:10 gfldex RabidGravy: found it in 'method listen' we find '$data ~= $bytes;' that are of type (Buf) and (Buf[uint8]) resulting in \0 injected into $data. I'm not sure if string concatenation should be allowed with Buf in the first place.
21:11 Skarsnik It's weird we don't get more contribution in the 'main' modules yet
21:11 Skarsnik like DBIish
21:12 moritz but we do
21:12 moritz a year ago, DBIish was nearly dormant
21:12 leat joined #perl6
21:12 Skarsnik I mean since the release
21:12 RabidGravy FROGGS, my working hypothesis for GNU name mangling is that the unsigned foo gets the next letter from foo
21:12 gfldex m: my Buf $buff1 = "abc\r\n".encode; my Buf[uint8] $buff2 = "123\r\n".encode; $buff1 ~= $buff2; $buff1.list.fmt("%02x").say;
21:12 camelia rakudo-moar 75c6b9: OUTPUT«Type check failed in assignment to $buff1; expected Buf but got utf8␤  in block <unit> at /tmp/BXq3iF8sSZ line 1␤␤»
21:13 RabidGravy Skarsnik, I've even had issues and PRs on my modules and nobody uses them :)
21:13 gfldex i need $buff2 to be of type Buf[uint8], any idea how to cast that?
21:13 leat build failing with No writeable path found in block <unit> at tools/build/install-core-dist.pl line 12 (2015.12) https://bpaste.net/raw/df1d3069d00a
21:13 moritz gfldex: can't you type that as Blob[uint8]?
21:13 gfldex moritz: it has to be that to golf a bug
21:13 FROGGS RabidGravy: there are tables on wikipedia about name mangling
21:14 RabidGravy I've gone so far as Buf[uint8].new($buff1.list) before :)
21:14 gfldex moritz: it's comming from from a IO::Socket::Async so it may even be some vmish stuff spilling into Perl 6
21:15 Skarsnik interesting document http://www.agner.org/optimize/calling_conventions.pdf
21:15 RabidGravy FROGGS, oh right, I'm quite liking my experimental approach at the moment
21:15 RabidGravy :)
21:15 moritz gfldex: but why does it need to be a Buf and not a Blob?
21:15 FROGGS :o)
21:16 gfldex moritz: because that's the type that spills out of the socket (into the .tap callback). I can hardly golf that with the wrong type.
21:19 pjscott joined #perl6
21:19 gfldex m: my Buf $buff1 .= new("abc\r\n".encode.list); my Buf[uint8] $buff2 .= new("123\r\n".encode.list); $buff1 ~= $buff2; $buff1.list.fmt("%02x").say;
21:19 camelia rakudo-moar 75c6b9: OUTPUT«61 62 63 0d 0a 31 32 33 0d 0a␤»
21:19 gfldex ENOREPRODUCE
21:19 gfldex :-/
21:21 aenaxi joined #perl6
21:23 gfldex m: my Buf $buff1 .= new("abc\r\n".encode.list); my Buf[uint8] $buff2 .= new("123\r\n".encode.list); $buff1 ~= $buff2; $buff1.list.fmt("%02x").say; say " length of buff1: {$buff1.elems} length of buff2: {$buff2.elems} ";
21:23 camelia rakudo-moar 75c6b9: OUTPUT«61 62 63 0d 0a 31 32 33 0d 0a␤ length of buff1: 10 length of buff2: 5 ␤»
21:23 gfldex rakudo is bad at counting!
21:24 xfix joined #perl6
21:24 gfldex or does it store utf8 in Buf as uint16?
21:24 Skarsnik why? 5 and 10 seems right
21:25 gfldex nvm
21:25 aartist Is there windows installation of Perl 6 ?
21:25 Skarsnik abc\r\n is five 123\r\n is 5 too x)
21:25 Skarsnik aartist, yes but we only have old msi file, you will need to build rakudo yourself
21:26 pierre-v_ joined #perl6
21:27 gfldex aartist: windows msis tend to be released a week after a Rakudo Star release
21:27 moritz ... and we're still working on the star release for 2015.12
21:27 pierrot_ joined #perl6
21:28 aartist thanks.  Any aprox. date?
21:28 moritz "this month"
21:29 lizmat Amsterdam.pm shutting down&
21:29 RabidGravy right, unsigned long, and unsigned long long and I think we're good
21:30 aartist moritz: Thank you.
21:31 RabidGravy I assume uint32 and uint64
21:32 aartist Is perl6 a comfortable journey, if you are coming from perl5 background?
21:33 moritz aartist: on the language level, yes. The tooling still tends to be a bit on the adventurous side
21:33 gfldex aartist: that's a very subjective question
21:33 chansen_ aartist: It depends on prior experience with other languages besides Perl5
21:34 aartist chansen_: which language?
21:35 alpha123 perl6 borrowed a lot from Haskell, so maybe that
21:36 alpha123 and maybe common lisp or some other language with multimethods
21:36 moritz you don't need any Haskell knowledge to learn Perl 6
21:36 aartist More interesting question is that does Perl6  provide a good experience to an experienced programmer.
21:37 alpha123 Obviously that's a very subjective question but in my experience the answer is YES!
21:37 moritz it gives you lots of ways to express yourself (and also enough rope to hang yourself, obviously)
21:37 alpha123 moritz: No, but it might make it more comfortable
21:38 aartist alpha123: Thanks.  Hopefully  it will be an industry standard soon.
21:38 * alpha123 hopes one day Perll6 and Idris will take over the world
21:40 ugexe windows handling of %*ENV and/or run seem to be slightly off. on my installation of windows anyway %*ENV<PATH> == Any, and %*ENV<Path> contains the path info. S02-magicals has a few tests that use %*ENV<PATH>
21:40 chansen_ aartist: Haskell/lisp, knowledge about traits/roles help. The Perl6 language is large, much larger than Perl5.
21:42 alpha123 In some ways it's also smaller, if you know what things desugar to (since a lot of P6 is written in P6)
21:42 aartist chansen_: Please explain/point to "much larger" part.
21:42 alpha123 (Perl6 has a LOT of features)
21:44 Skarsnik unsigned int I ui ui Ui j j (2 last value are gnu3+)
21:44 chansen_ aartist: I don't know how to quantify it besides pointing you to the spec/design <http://design.perl6.org>
21:44 patrickz joined #perl6
21:44 aartist Thanks alpha123  Loooking at : http://www.perlfoundation.org/perl6/index.cgi?the_long_perl_6_super_feature_list
21:45 Skarsnik RabidGravy, http://www.agner.org/optimize/calling_conventions.pdf you have the mangling list x)
21:45 patrickz Hey! Anyone going to FOSDEM this year? Or even giving a talk?
21:45 yoleaux 31 Dec 2015 08:57Z <ugexe> patrickz: https://gist.github.com/ugexe/d57168ebc0ac0e6261a0
21:45 moritz aartist: Perl 6 has so much built in that Perl 5 doesn't have, or only through modules: a decent OO system, grammers, concurrency constructs, Unicode operations etc.
21:45 RabidGravy Skarsnik++ yay!
21:46 cognominal joined #perl6
21:46 aartist moritz: Nice to know, definitely a good learning curve.
21:50 aartist Is Perl6 expected to replace other langauge or discourage growth of any other languages like PHP, Pyhon, Ruby  with its superior featre list?
21:50 Zoffix aartist, jobs are always a competition :)
21:51 moritz aartist: we don't want to discourage anybody from using the languages they love
21:51 _Vi joined #perl6
21:51 moritz aartist: we just want to encourage everybody to love Perl 6 best :-)
21:51 firstdayonthejob joined #perl6
21:51 RabidGravy :)
21:52 RabidGravy Skarsnik, the actual type encodings are best described here
21:52 RabidGravy http://mentorembedded.github.io/cxx-abi/abi.html#mangling
21:52 chansen_ aartist: Perl6 is the language other dynamic languages like Ruby/Python will steal from in the future, just as they did when Perl5 was young
21:53 Skarsnik RabidGravy, put the link on the test file if you write one ^^
21:53 sno joined #perl6
21:53 * alpha123 is already stealing from Perl6 in his scripting language....
21:54 alpha123 At the very least it sets a new standard for less-broken Unicode support
21:54 lostinfog joined #perl6
21:55 PerlJam chansen++  well put :)
21:55 aartist What is the chance of an expert perl6 programmer finding a good place on the industry solely based on Pel6 knowledge?
21:55 alpha123 give or take about 0%
21:55 PerlJam aartist: right now?  pretty close to 0
21:55 chansen_ alpha123: Apple has Swift deployed on billion of devices which implements strings pretty decent!
21:55 Zoffix aartist, yes, if you forget all of your Perl 5 :) RE: <aartist> Is perl6 a comfortable journey, if you are coming from perl5 background?
21:55 PerlJam aartist: Unless your name is Jonathan Worthington  :)
21:56 alpha123 chansen_: Yeah swift also has less broken unicode, though it is at a lower level than Perl6
21:56 Zoffix aartist, the first production release of Perl 6 happened a week and a half ago :) It's too soon talking industry jobs. Give it a 1-3 years
21:56 Zoffix aartist, ...which you could use to become an expert perl6 programmer ^_^
21:57 zengargoyle joined #perl6
21:57 aartist Zoffix: THhanks:   It is an investment time.
21:57 [Coke] Someone should find... jnthn's? comparison of swift strings vs. moar strings. ISTR that swift has a runtime penalty working on long strings because of how you have to deal with your position in the string.
21:58 zengargoyle good * #perl6
21:59 * zengargoyle setting up new laptop *yay*
21:59 Skarsnik :)
22:01 chansen_ alpha123: Theoretical or practical broken? Why is Perl6's model superior the Unicode specification?
22:02 ennio Hello! is there a way to define something like shared traits? like to avoid repeating "is native(foo) is export" on every line of a module using NativeCall?
22:03 alpha123 chansen_: I didn't say it was, but Perl6 unicode is more pleasant to work with largely thanks to excellent grapheme support
22:03 PerlJam ennio: macros might do it when they are mature.
22:03 alpha123 While theoretically swift is quite sound, and I understand the choices it makes, sometimes you want some string functions that make reasonable assumptions
22:04 Zoffix alpha123, are you saying Swift has more or less broken Unicode than Perl 6?
22:04 ennio PerlJam: thx... I'll be patient then :)
22:04 PerlJam ennio: you might be able to do some "meta-programming" where, as part of the module installation, you iterate over the routines you want "is native" and "is export"
22:04 PerlJam (and make them so)
22:04 alpha123 Zoffix: I'm saying swift has less broken unicode than most languages, as does P6
22:04 Zoffix Got it.
22:06 chansen_ alpha123: What's excellent with Perl6's grapheme support?
22:06 PerlJam ennio: and I'll stress *might* in what I said above as I'm not sure when the "is native" part needs to happen.  (I think it's easy-ish for exporting though)
22:06 donaldh joined #perl6
22:07 alpha123 chansen_: Well, most languages work on characters or codepoints (and thus are broken) and dont have a notion of graphemes
22:08 alpha123 so substr(), regexes, etc
22:08 alpha123 all work properly in p6
22:10 chansen_ alpha123: Let me rephrase the question: What's spectacular with Perl6's grapheme support?
22:11 PerlJam chansen_: even for those languages that do have a notion of grapheme, they may still compare strings that a human would consider equivalent as being different because of the specific combining characters used to generate the strings.
22:11 PerlJam chansen_: NFG fixes that and does so efficiently.
22:12 alpha123 chansen_: Well, it has grapheme support, for one thing. Most string operations work on the grapheme level. It handles combining characters correctly too.
22:14 SwellJoe joined #perl6
22:15 alpha123 oh and '.' in regexes matches a grapheme by default
22:15 leont joined #perl6
22:18 Mouq chansen_: Makes it harder to accidently cut a visual character in two at the byte level
22:21 bzipitidoo rakudo: say "hi"
22:21 camelia rakudo-moar 75c6b9: OUTPUT«hi␤»
22:36 chansen_ PerlJam: I'm not familiar with NFG
22:37 gfldex m: multi sub trait_mod:<is>(Routine $r, :$foo!){}; multi sub trait_mod:<is>(Routine $r, :$bar!){}; multi sub trait_mod:<is>(Routine $r, :$combined!){ (&trait_mod:<is>)($r, :foo); (&trait_mod:<is>)($r, :bar) }; sub target () is combined {}
22:37 camelia rakudo-moar 75c6b9: ( no output )
22:37 gfldex ennio: see ^^^
22:37 gfldex traits are subs with a funny syntax
22:40 Skarsnik RabidGravy, do you want me to add c++ support on gptrixie? x)
22:41 bzipitidoo m: grammar Test {
22:41 bzipitidoo rule TOP { ^ <content>* $ }
22:41 bzipitidoo rule block { '(' ~ ')' <content>* }
22:41 bzipitidoo rule content { <-[()]>+ || <block> }
22:41 bzipitidoo }
22:41 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/G9zuFTpbSc␤Missing block␤at /tmp/G9zuFTpbSc:1␤------> 3grammar Test {7⏏5<EOL>␤»
22:41 wamba joined #perl6
22:41 bzipitidoo joined #perl6
22:42 chansen_ Mouq: I agree, I have read both Unicode and ISO 10646 and not familiar with the NFG, guess it's an invented Perl6 acronym
22:42 timotimo correct
22:42 gfldex m: https://gist.github.com/gfldex/17854500ab8050a228ed
22:42 camelia rakudo-moar 75c6b9: ( no output )
22:42 timotimo it's the normalization form grapheme
22:42 ennio gfldex: nice!
22:42 gfldex bzipitidoo: camelia speaks gist ^^^
22:42 bzipitidoo eh, suppose I'll test code some other way
22:44 Skarsnik You can use camelia with private message
22:45 Zoffix bzipitidoo, you can create a gist and execute it like this:
22:45 Zoffix m: https://gist.github.com/zoffixznet/0b5a4f27246ef235a8bc
22:45 camelia rakudo-moar 75c6b9: OUTPUT«Hallo!␤»
22:48 bzipitidoo m: https://gist.github.com/anonymous/4beb237a975e65e6e775
22:48 camelia rakudo-moar 75c6b9: OUTPUT«(a (b))(c (d))␤␤* * * * *␤␤[[a  [b]] [c  [d]]]␤»
22:48 chansen_ timotimo: Why, just why? We all know the effect of the embrace and extend syndrome!?
22:49 Zoffix bzipitidoo, and you can /notice or /msg camelia
22:50 * Zoffix wonders why /notice m: say "42"; results in an ACTION response in /msg rather than a /notice back :S
22:50 Mouq chansen_: As in https://en.wikipedia.org/wiki/Embrace%2C_extend_and_extinguish ? NFG is internal to Perl 6 programs…
22:50 bzipitidoo well, that's a little different result than parrot 6.6.0 gave:  [a  [b]] [c  [d]]    Why did camelia add more brackets?
22:51 alpha123 chansen_: Wait, what are we embracing and extending here?
22:51 flussence chansen_: we can do it the sane way, or the ICU way.
22:51 timotimo chansen_: NFG is the only normalization form that gives you string algorithms with O(1) access to individual graphemes
22:53 timotimo BBIAB, food time
22:53 nine _sri: you misunderstood: I meant that we get a couple of user requests per second. We just don't have more traffic. But we'd like to serve those users faster.
22:53 chansen_ timotimo: Only O(1)?
22:53 alpha123 ..
22:54 rjbs "We'll get it down to O(0) in the next release."
22:54 RabidGravy it's all going to be O(0) when someone gets round JITing on a black hole
22:55 alpha123 I wonder if there are any O(1/n) algorithms for anything at all
22:55 RabidGravy what larks
22:55 rjbs alpha123: http://stackoverflow.com/questions/905551/are-there-any-o1-n-algorithms
22:56 Mouq bzipitidoo: How is that even happening… ??
22:57 * alpha123 saw a dank O(√n) for everything data structure once, wish he could find that
22:57 Mouq OH!
22:58 Mouq m: https://gist.github.com/Mouq/7eb9d723d7f05a511529
22:58 camelia rakudo-moar 75c6b9: OUTPUT«(a (b))(c (d))␤␤* * * * *␤␤[a  [b]][c  [d]]␤»
22:58 Mouq m: say ("[a]","[b]")
22:58 camelia rakudo-moar 75c6b9: OUTPUT«([a] [b])␤»
22:58 Mouq m: say ["[a]","[b]"]
22:58 camelia rakudo-moar 75c6b9: OUTPUT«[[a] [b]]␤»
23:00 lucs alpha123: Some quantum algorithms allow linear search in O(N**1/2)
23:00 * alpha123 head explodes
23:01 jshy joined #perl6
23:03 RabidGravy FROGGS, https://github.com/rakudo/rakudo/pull/675 - you may want to check on Windows MSVC as I can't test that
23:03 masak 'night, #perl6
23:04 Mouq 'night masak :)
23:04 RabidGravy toodles
23:04 cpage_ joined #perl6
23:05 ennio so I played a little bit with NativeCall and libldap, and my conclusion is that it's not too hard to make them talk to each other :)
23:05 ennio https://github.com/scriplit/Native-LDAP
23:05 RabidGravy no not at all
23:05 RabidGravy a few libraries are a bit iffy but hey
23:11 SwellJoe joined #perl6
23:13 kid51 joined #perl6
23:14 Skarsnik ennio, the ldap lib does not have a version number?
23:16 Skarsnik Or put $*VM.platform-library-name('ldap'.IO).Str; in a constant. otherwise it get call for each routine x)
23:16 FROGGS RabidGravy: will do tomorrow
23:16 RabidGravy :)
23:16 pierre-vigier joined #perl6
23:17 ennio actually is uses libldap_r-2.4.so.2
23:17 n0tjack joined #perl6
23:17 _nadim hi, a silly question, what was the thinking behind the 'multi' keyword, when multiple methods/sub have the same name, 'multi' is redundant.
23:17 ennio there is a libldap symlink to that
23:17 _nadim RabidGravy: any idea about why?
23:18 alpha123 without multi don't overloads single-dispatch?
23:19 RabidGravy I guess that that it simplifies the parsing, but I have no inside insight
23:19 Mouq _nadim: redeclaration errors are generally considered a good thing where applicable
23:19 Mouq (is my guess)
23:19 Skarsnik ennio, hm that a weird lib you can put is native('ldap_r-2.4', v2) if it always a weird name like that
23:20 RabidGravy Skarsnik, ennio, yeah I have that library too
23:20 sprocket_ hello, p6
23:20 RabidGravy constant LIB = ('ldap_r-2.4', v2); and is native(LIB) to save typing
23:21 RabidGravy hello sprocket_
23:21 Skarsnik I should probably remove the Callable stuff in the doc. it's pretty bad in insight x)
23:21 sprocket_ RabidGravy: hey!  was that your RPI module that landed the other day?
23:22 RabidGravy yeah
23:22 sprocket_ great
23:22 sprocket_ how’s that project going anyways?
23:23 RabidGravy the SMBus thing works as much as I need it to, I only have the one i²c device
23:23 sprocket_ gotcha
23:23 Skarsnik ennio, and Perl 6 have enum if you want to group the ldpa define ^^
23:23 Skarsnik RabidGravy, you need to make a video or your led thing working!
23:23 Skarsnik *of
23:23 RabidGravy maybe I'll find something at Maplins that I can test it with
23:23 RabidGravy oh yeah I forgot about that
23:27 ennio Skarsnik, RabidGravy: thanks for suggestions! I'm still learnins :)
23:27 ennio * learning
23:28 gfldex m: my Buf $b = Buf.new("123".encode.list); $b=Buf.new($b[0..3]); dd $b
23:28 camelia rakudo-moar 75c6b9: OUTPUT«Buf $b = Buf.new(49, 50, 51, 0)␤»
23:29 gfldex RabidGravy: it was wrong. It's not a problem with concatenation but if off by one array subscript in https://github.com/tony-o/perl6-http-server-async/blob/master/lib/HTTP/Server/Async.pm6#L136
23:30 gfldex s/if/of/
23:30 RabidGravy I suspected that may have been the case
23:30 gfldex that took me only 4 hours to find!
23:30 Skarsnik !(
23:30 gfldex i check $data before and after that line, it kindly add a 0
23:31 Skarsnik ennio, you could give a try to https://github.com/Skarsnik/gptrixie if you want to not bother write NC stuff
23:31 Skarsnik I should add is export on sub x)
23:31 gfldex that leaves the question if [] on a Buf should fail silently like that
23:31 RabidGravy I'm thinking that we might want to split off a really good http chunked encoding parser into the ecosystem
23:32 gfldex RabidGravy: really good and fast may be a contradiction
23:33 RabidGravy indeed, the one in HTTP::UA that takuhirom contributed is pretty robust
23:36 Skarsnik Maybe http::ua should be split in HTTP::Stuff
23:36 gfldex there are other problems with that stuff
23:37 skids joined #perl6
23:37 gfldex let me finish HTTP::Server::Async (all tests are passing OK) and i will elaborate
23:37 perlawhirl joined #perl6
23:38 RabidGravy gfldex++ # fixing stuff
23:38 Skarsnik nice
23:41 leont joined #perl6
23:42 itaipu joined #perl6
23:47 perlawhirl hi perlers
23:47 perlawhirl have a question with sorting hashes in a for-loop
23:48 perlawhirl for loop on hash returns pair
23:48 perlawhirl m: for { foo => 'bar' }.sort() { say .WHAT; say .perl; }
23:48 camelia rakudo-moar 75c6b9: OUTPUT«(Pair)␤:foo("bar")␤»
23:48 perlawhirl and does the same if the hash is sorted
23:48 perlawhirl m: for { foo => 'bar' }.sort() { say .WHAT; say .perl; }
23:48 camelia rakudo-moar 75c6b9: OUTPUT«(Pair)␤:foo("bar")␤»
23:48 timotimo you accidentally pasted the same code twice
23:48 perlawhirl erm
23:48 perlawhirl m: for { foo => 'bar' }.sort().kv -> $k, $v { say "KEY: $k, VAL: $v"; }
23:48 camelia rakudo-moar 75c6b9: OUTPUT«KEY: 0, VAL: foo     bar␤»
23:49 perlawhirl calling .kv after the sort does not do what i expect
23:49 perlawhirl timo: oops
23:49 perlawhirl m:  for { foo => 'bar' } { say .WHAT; say .perl; }
23:49 camelia rakudo-moar 75c6b9: OUTPUT«(Pair)␤:foo("bar")␤»
23:49 Mouq perlawhirl: sort() returns a list of pairs — there's no 'sorted hash' type
23:49 timotimo that calls .kv on the list that .sort results in
23:50 perlawhirl so can i call .kv without nesting loops, ie for {...} -> $h { for $h.kv -> $k, $v {} }
23:50 timotimo you may be confused
23:51 perlawhirl i know i can call the .key and .value methods on the iterable after a sort... just wondering if there's another way
23:51 Mouq m: for { foo => 'bar' }.sort -> (:key($k), :value($v)) { say "KEY: $k, VAL: $v"; }
23:51 camelia rakudo-moar 75c6b9: OUTPUT«KEY: foo, VAL: bar␤»
23:51 joydo joined #perl6
23:52 perlawhirl alright that seems fine. thanks Mouq
23:52 Xor_ joined #perl6
23:52 skids m: for { foo => 'bar' }.sort -> $p (:key($k), :value($v)) { say "PAIR: $p KEY: $k, VAL: $v"; }
23:52 camelia rakudo-moar 75c6b9: OUTPUT«PAIR: foo    bar KEY: foo, VAL: bar␤»
23:52 perlawhirl timo: yes i realise the sort returns a list, by virtye of the fact that it's sorted at all ;)
23:52 Skarsnik m: %!_qdb-fields.keys.sort -> $k { my $v = %h{$k}}
23:52 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7E64IJ8m92␤Variable %!_qdb-fields used where no 'self' is available␤at /tmp/7E64IJ8m92:1␤------> 3%!_qdb-fields7⏏5.keys.sort -> $k { my $v = %h{$k}}␤»
23:53 leont ennio: I would prefer a Net::LDAP style extensible LDAP/ASN.1 framework, but having LDAP in general sounds very useful, yes
23:53 Skarsnik m: my %h = { a, 1, c, 3, b, 2 }; %h.keys.sort -> $k { say %h{$k}}
23:53 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HtgipIyZ1e␤Unexpected block in infix position (missing statement control word before the expression?)␤at /tmp/HtgipIyZ1e:1␤------> 3 %h = { a, 1, c, 3, b, 2 }; %h.keys.sort7⏏5 -> $k { say %h{$k}}␤…»
23:54 Skarsnik m: my %h = { a, 1, c, 3, b, 2 }; for %h.keys.sort -> $k { say %h{$k}}
23:54 camelia rakudo-moar 75c6b9: OUTPUT«5===SORRY!5=== Error while compiling /tmp/2tdzcvdykq␤Undeclared routines:␤    a used at line 1␤    b used at line 1␤    c used at line 1␤␤»
23:54 Skarsnik m: my %h = { a =>  1, c =>  3, b =>  2 }; for %h.keys.sort -> $k { say %h{$k}}
23:54 camelia rakudo-moar 75c6b9: OUTPUT«Potential difficulties:␤    Useless use of hash composer on right side of hash assignment; did you mean := instead?␤    at /tmp/4bwSI0262V:1␤    ------> 3my %h = { a =>  1, c =>  3, b =>  2 }7⏏5; for %h.keys.sort -> $k { say %h{$k}}␤1␤2␤3␤»
23:54 Skarsnik m: my %h = a =>  1, c =>  3, b =>  2; for %h.keys.sort -> $k { say %h{$k}}
23:54 camelia rakudo-moar 75c6b9: OUTPUT«1␤2␤3␤»
23:55 gfldex is it wise right now to tell travos to care about JVM builds?
23:57 leont Probably not yet
23:57 leont Unless something changed in the past 2 months (I doubt it)
23:58 n0tjack joined #perl6

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

Perl 6 | Reference Documentation | Rakudo