Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-05-03

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:04 timotimo Could not find Bailador::Template::Mojo::Extended at line 4 in:
00:04 Xliff_ ZoffixLappy, that cat GIF trips me out every time I load it.
00:05 timotimo Could not find Bailador::Plugin::AssetPack::SASS at line 5 in:
00:05 timotimo all the missing dependencies
00:06 cpage_ joined #perl6
00:07 timotimo LoadError: cannot load such file -- rb-inotify
00:08 timotimo NoMethodError: undefined method `join' for nil:NilClass
00:08 timotimo >_>
00:09 ZoffixLappy joined #perl6
00:09 ZoffixLappy :/ stupid Freenode
00:09 hotel .seen
00:09 yoleaux Ask me when I last saw a user speaking
00:09 hotel oh
00:09 ZoffixLappy <ZoffixLappy> 2 posts (2 markdown files). 3.33 seconds per request from local host :( https://gist.github.com/zoffixznet​/af44d9ada315b2642e511c68422f0792
00:09 ZoffixLappy <ZoffixLappy> 3 posts = 4.288s per request :)
00:09 ZoffixLappy <ZoffixLappy> Time to switch for a DB based system with pre-parsed posts methinks :P
00:09 ZoffixLappy
00:09 ZoffixLappy oops
00:10 ZoffixLappy timotimo, you need to run panda update or zef update for those missing deps.
00:10 timotimo ah
00:10 ZoffixLappy Unsure what the rb-notify stuff is all about tho
00:10 timotimo had to install a rubygem-rb-inotify from dnf
00:11 plugh22 joined #perl6
00:11 timotimo it seems like you've put a bunch of blah.foo~ files into your git repo
00:12 ZoffixLappy Um... yeah.. KDevelop--
00:13 plugh22 m: class A { submethod BUILD ($a?, :$b) {} }; A.new( 'A' );
00:13 camelia rakudo-moar d065ba: OUTPUT«Default constructor for 'A' only takes named arguments␤  in block <unit> at /tmp/wgmkKQKkZP line 1␤␤»
00:13 timotimo rendering the template is the slowest part by far, it seems like
00:14 timotimo plugh22: you're getting a method "new" from Any, which will not pass $a as a positional parameter for you
00:14 kid51 joined #perl6
00:14 timotimo you probably want your own method new instead that takes a positional parameter and a named one and passes them as two named parameters to sumbethod BUILD; and you'll want to declare those attributes so that they'll be assigned by the default submethod BUILD you'll get
00:14 ZoffixLappy timotimo, how do you figure that? Did --profile work for you?
00:15 timotimo no
00:15 timotimo note statements
00:15 plugh22 timotimo: ok, thanks.
00:15 ZoffixLappy Ah
00:15 timotimo could it be you're re-parsing the template on every page serve?
00:15 ZoffixLappy I am, yes
00:15 timotimo bad idea :)
00:15 ZoffixLappy TWO templates, really. The "layout" and the "page" :/
00:16 pierre__ joined #perl6
00:16 ZoffixLappy Basically every page load involves like 6 file slurps
00:16 timotimo there's probably some performance gains to be found in Mojo
00:16 timotimo slurp isn't expensive, i don't think
00:18 timotimo do i look at Template::Mojo, or do i look at Mojo::Extended to find the code that's likely slow?
00:19 ZoffixLappy I'd say Template::Mojo. All ::Extended really does is process two Template::Mojo templates.
00:19 timotimo OK
00:19 timotimo anyone want to write a readme for Template::Mojo that has a "how do i invoke this?!?" section?
00:20 mspo oh did you guys port ep?
00:20 ZoffixLappy I think it has decent docs in POD: https://github.com/tadzik/Template-M​ojo/blob/master/lib/Template/Mojo.pm
00:20 ZoffixLappy mspo, far from it.
00:20 timotimo OK
00:20 timotimo the synopsis doesn't use the from-file method
00:21 timotimo which template should i use for profiling purposes? index.tt? post.tt?
00:23 ZoffixLappy timotimo, umm... index.tt, I guess. ::Extended actually takes index.tt and plugs it into layouts/default.tt (the TWO templates I mentioned).
00:24 timotimo ah
00:24 timotimo well, index.tt won't work with just Template::Mojo
00:24 teatime I've seen attribute syntax like "has $.bar does SomeRole", but I haven't happened across the description of how it behaves yet.  any pointers?
00:24 timotimo and default.tt also doesn't work with just Template::Mojo
00:25 timotimo teatime: i don't think we actually have "does" for attributes. we do have "is", however
00:25 timotimo "is default", "is rw", "is required", ...
00:25 ZoffixLappy It's kinda weird: index.tt looks up $posts.all and renders them in the main box and the side box. post.tt still looks up $posts.all, but only renders them in the side box, while also looking up a given post and rendering it in the main box... YET, post.tt takes 1.2s, while index.tt takes 3.4s on my lappy :/
00:26 ZoffixLappy You can just copy paste index.tt into default.tt, while moving the %% lines at the top to the top of default.tt
00:26 teatime this was definitely 'does'... but perhaps it is another idea that didn't get implemented but continues to haunt dark corners of docs/specs :)
00:26 ZoffixLappy If you're feeling adventurous, that is. I don't expect you to be figuring out why my code is slow :P
00:28 timotimo by kicking out the sass thing, profile no longer segfaults
00:28 timotimo but now i don't have a way to shut down the server, so it ends up never outputting the profile code
00:28 ZoffixLappy Oh. It may be due to Proc::Async
00:29 ZoffixLappy Just shove start { sleep 3; exit } at the end of get '/' => sub {... } ?
00:30 timotimo oh crap
00:30 ZoffixLappy ?
00:30 timotimo i added a /exit handler and it caused "invalid gc status observed"
00:30 * ZoffixLappy has no idea what that means :)
00:30 timotimo memory corruption of some kind
00:31 ZoffixLappy :o
00:31 mst it means "you're hosed"
00:31 timotimo yup
00:31 timotimo basically
00:32 timotimo and with perl6-gdb-m i get Detaching after fork from child process 27570. and nothing happens after that
00:32 ZoffixLappy With start{ sleep } I get "Invalid GC status observed; aborting" :)
00:33 timotimo oof
00:33 timotimo now how do you golf that ...
00:34 timotimo i'm out of energy for today; the flu is taking its toll
00:34 teatime ohhh... timotimo: maybe it was 'handles' not 'does.
00:34 timotimo ah, that could be, yeah
00:34 timotimo that'll install methods that redirect to method calls on your attributes' values for you
00:34 ZoffixLappy Ohh... adding that actually made the request take 6.7s, so it exited before the request finished. I made it sleep for 10 seconds and it wrote a profile
00:34 teatime and I found the docs for it.  yar.
00:35 timotimo oh, huh
00:35 timotimo gimme that profile? :)
00:35 tardisx joined #perl6
00:36 ZoffixLappy http://xtatik.org/temp/profile.html
00:37 timotimo the routines tab there is pretty much completely useless
00:37 timotimo the whole profile is, really
00:37 timotimo because multi-threading :P
00:37 timotimo our output routine doesn't know how to handle it yet
00:37 ZoffixLappy Yeah. It looks like it's just showing the thread where I slept for 10 seconds
00:37 timotimo yeah :)
00:38 timotimo i wonder why. i always thought it'd only output the first thread
00:38 timotimo bailador could get a quit-switch
00:43 timotimo it'd be neat if you could do that locally
00:44 timotimo hm, HTTP::PSGI::Easy doesn't do any concurrency, right?
00:46 [Coke] github question with PRs. If I have a fork where I've done some PRs and had them accepted upstream already, and I merge those upstream commits back to my master... on my next pull request, I see that there are multiple commits, including the upstream merges. Do I need to do something to clean this up? or will those merge commits be ignored if that next pull request is used?
00:46 ZoffixLappy Well, crap... This debugging change of hardcoding what I'd normally get from parsing posts is now resulting in random crash with the "Invalid GC ..." stuff, after a couple of requests: https://github.com/zoffixznet/perl6.party​/blob/master/lib/Perl6/Party/Posts.pm6#L7 :/
00:47 ZoffixLappy And it's still slow as hell, suggesting switching to a PG backend won't help :(
00:47 ZoffixLappy I guess back to P5's Mojolicious for me for this project :'(
00:47 [Coke] smls: [CONC] if we have more than one ticket, sure. it's just a way to group things for (basically) jnthn to find.
00:47 timotimo well ... profile can very strongly impact your performance depending on what kind of stuff your program is doing
00:48 Herby__ joined #perl6
00:48 Herby__ o/
00:49 ZoffixLappy \o
00:49 ZoffixLappy Craaap
00:49 teatime [Coke]: maybe you want to pull --rebase ?
00:50 teatime [Coke]: those actual commits won't usually be a problem, but I'm unclear on when/if they can be
00:51 ZoffixLappy Oh, never mind. I still had the start { sleep 10; } in my code :P
00:51 * ZoffixLappy blushes
00:51 Herby__ what you sleepin
00:51 teatime I usually make every PR a branch (could really be a tag, I guess), so I end up pulling upstream/master into my local master not back into the branch where the PR work was done, but I don't think this is generally necessary.
00:52 teatime heh would be easier to draw.
00:52 timotimo [Coke]: your own fork's master shouldn't contain the changes that you've pull-requested; at least that's how i do it
00:53 timotimo [Coke]: then you can just fast-forward your own forks' master branch to the origin's master branch
00:53 teatime [Coke]: at any rate, you can make the attempt and see what happens, and rollback if it blows up
00:53 [Coke] teatime;i did a merge from upstreamm, not a pull. i'll try that, should be cleaner.
00:53 teatime but yeah, generally I do exactly what timotimo describes
00:53 timotimo well, pull is just fetch + merge
00:53 teatime [Coke]: was it a fast-forward merge, or are you mid-merge as we speak?
00:53 [Coke] I'll try a pull --rebase, then.
00:54 [Coke] the merge is long done, I have a new branch already that I tried to make a new pr for.
00:54 timotimo with a pull --rebase, you'll end up with any commits that aren't in the origin "in front", as in "newer", compared to what the upstream has
00:54 teatime pull --rebase is for when you have local commits that are logically 'on top of'/'forked from' the upstream, and you want them to stay on-top-of after you bring in the newest changes from upstream
00:56 [Coke] yup, I just did that on my forked master and my pr'd branch, all fine now, thanks!
00:56 [Coke] first time using a forked repo for anything other than a single one off PR
00:57 teatime I also find it helps keep me straight to delete unused branches from my fork-repo and local dev repo.  like, I'll have master and upstream/master but I usually have no use for origin/master so I delete it.
00:57 teatime probably 'cause I'm a n00b though.
00:59 * teatime remembers he really needs to script github-clone + checkout + setup origin/upstream remotes, w/ correct git vs. ssh vs. https protocols etc., for quicker turnaround on random PRs
01:00 mst teatime: or install ingy's 'git hub'
01:00 mst teatime: https://github.com/ingydotnet/git-hub/
01:00 teatime that looks very handy, thanks.
01:02 AlexDaniel mst: what's the difference between that and this https://github.com/sociomantic-tsunami/git-hub
01:04 AlexDaniel there's also git-spindle
01:04 ugexe (removed)
01:05 mst ugexe: dude!
01:05 ugexe uh, oops
01:05 mst sorry, wasn't quite quick enough to kick you
01:05 mst AlexDaniel: ingy's doesn't require python, and seems more complete
01:06 teatime ouch
01:07 ZoffixLappy Well, if we ever have trouble with bikeshedding, ugexe is our person to break it up :P
01:08 AlexDaniel huggable: no bikeshedding please
01:08 huggable AlexDaniel, 🚳
01:08 teatime huggable is going to leave me hanging.
01:09 mst capital punishment for bikeshedding seems completely reasonable
01:09 geekosaur .u 🚳
01:09 yoleaux U+1F6B3 NO BICYCLES [So] (🚳)
01:11 ugexe i havent cringed that hard since middle school
01:11 mst I think you'll find that in here, 'epic failure to care' is going to be the response to your accidental disclosure
01:12 mst you might, however, want to suggest to moritz that he tweaks that part of the publically googlable logs
01:12 ugexe good idea
01:13 * AlexDaniel wonders if it is possible to turn off clipboard on his system completely
01:13 ZoffixLappy Clipboard?
01:13 AlexDaniel that's how it is called?
01:14 * ZoffixLappy is on his nth beer... never mind me\\\\\\\o/
01:14 AlexDaniel ZoffixLappy: how did you call it then?
01:15 ZoffixLappy Not. Sure.
01:15 sufrostico joined #perl6
01:16 ZoffixLappy I guess clipboard... but it sounds so weird to me now, because clipboards are those wooden things with metal clips at the top lol :D
01:17 teatime X11 calls it selection or selection buffers or something
01:17 teatime but one of them is CLIPBOARD.
01:17 TreyHarris joined #perl6
01:18 AlexDaniel archwiki says “Despite the naming, all three are basically "clipboards"”
01:19 AlexDaniel I am actually using PRIMARY more than CLIPBOARD, it is pretty cool
01:19 teatime apparently PRIMARY and CLIPBOARD are selections, per-app, and cease to exist along with their app.  and CUT_BUFFER* are global.  I don't think SECONDARY is still implemented.
01:20 mst ZoffixLappy: which of course was the original metaphor
01:20 mst but, yeah
01:20 teatime yes, I love X-style copy/paste... sorely miss it if I get stuck on windows.
01:20 AlexDaniel it also makes sure that I have some kind of trash in it and not some private email that I copied
01:20 ugexe oddly enough weechat asked me if i wanted to really paste 3 lines after having already sent them
01:21 [Coke] also "pasteboard"
01:22 teatime AlexDaniel: you're right, I think, to consider the clipboard/whatever as a serious security concern.  you could have something over-write them regularly, I guess... I don't think you can hide them from specific apps etc.  you may want to make sure your terminal emulator doesn't answer to the "what's on your clipboard?" escape code
01:22 teatime urxvt has defaulted to not for a long time, xterm recently changed to default to not; I don't know about others.
01:23 ZoffixLappy FWIW, here's the Template::Mojo profile on a small template that takes 1.3s to render: http://xtatik.org/temp/profile.html
01:24 grondilu m: use MONKEY-SEE-NO-EVAL; say EVAL '-> $ { }';
01:24 camelia rakudo-moar d065ba: OUTPUT«-> $ { #`(Block|79840320) ... }␤»
01:24 AlexDaniel does anybody remember the times when IE was happily giving away the contents of the clipboard?
01:24 grondilu ^the debugger shows me an exception when I try that.
01:25 tardisx joined #perl6
01:25 AlexDaniel IT STILL DOES?
01:26 AlexDaniel it asks the user for confirmation, but…
01:26 teatime vaguely related, I was surprised the other week to learn that now X has a local-user xauth method so root or my user on a serial terminal can launch X apps w/ just $DISPLAY, no having to mess w/ magic-cookies/.Xauthority/whatever.  and apparently it's been like that for a long time.
01:27 hotel "giving away"?
01:28 ZoffixLappy Heh... It's technological survival of the fittest.... Those still using IE for web browsing deserve to get screwed.
01:28 AlexDaniel hotel: as a site owner, you could have been collecting the clipboard contents of all of your visitors
01:28 SalamiTactics joined #perl6
01:28 hotel oh
01:28 hotel r00d
01:29 grondilu yes xauth is a very old command
01:29 hotel ZoffixLappy++
01:29 hotel although sometimes windows randomly opens IE instead of edge
01:29 AlexDaniel ZoffixLappy: they're still pushing their “Edge” thingy though
01:29 teatime grondilu: it's not quite the same thing.
01:30 hotel some programs just don't use environment variables
01:30 ZoffixLappy I don't even know why Microsoft is even trying to push their own browser nowadays.
01:30 ZoffixLappy We have good opensource alternatives. Waste your cash on something else.
01:30 hotel it's a nice enough browser
01:30 AlexDaniel huggable: dunno :is: ¯\_(ツ)_/¯
01:30 huggable AlexDaniel, Added dunno as ¯\_(ツ)_/¯
01:31 hotel just too young atm
01:31 AlexDaniel what do you mean by “young”? Isn't it the same old IE?
01:31 hotel edge?
01:31 AlexDaniel yeah
01:31 hotel not at all
01:31 teatime what would be a good prefix to begin compose sequences for big emoticons and similar strings
01:32 hotel emo
01:32 teatime hrm... perhaps ;    as in <Compose> ; s h r u g    etc.
01:32 adu joined #perl6
01:32 teatime or that would work too; can do both.
01:32 diakopter______ joined #perl6
01:32 hotel :D
01:32 * hotel has no idea what's going on
01:32 ZoffixLappy \o/ \o\ /o/
01:32 diakopter______ [Coke]: I merged your rakudobrew shite
01:32 ZoffixLappy :o
01:33 teatime isn't there mainly one guy that did/does most of the REPL stuff?  if so, who
01:33 AlexDaniel hoelzro?
01:33 [Coke] diakopter______: thanks
01:35 teatime heh, I knew I should have looked as soon as I'd asked; every single commit to REPL.pm has been by rob@hoelz.ro
01:35 teatime AlexDaniel: thx
01:35 hoelzro teatime: do you have questions about the REPL?
01:38 hotel is there an online repl by chance?
01:38 AlexDaniel hotel: I'm still trying to find any facts to be sure that Edge is not IE
01:39 hotel AlexDaniel, well for one it's being actively maintained and updated, iirc it uses a new engine, and extension support is coming soon/is now available
01:39 AlexDaniel hotel: you can try https://glot.io/new/perl6
01:39 huggable joined #perl6
01:39 hotel danke
01:39 AlexDaniel hotel: you can also write private messages to camelia
01:39 geekosaur its own documentation claims that it si a completely new engine
01:39 hotel oh yeah I could
01:40 AlexDaniel hotel: there's also http://ideone.com/ but it is full of ads
01:40 AlexDaniel geekosaur: sure, but claiming is one thing…
01:40 tardisx joined #perl6
01:41 AlexDaniel hotel: well these are all cool things but I see no reasons why these cannot be built on top of existing IE
01:41 AlexDaniel with perhaps some refactored code or something
01:42 hotel edge is, well, edgy
01:42 AlexDaniel I've noticed many times on caniuse that some features there were broken in very weird ways in IE are also broken in Edge
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:48 BenGoldberg joined #perl6
01:49 AlexDaniel like, you're not going to say that in 2014, for the new browser, they implemented a feature according to the 2011 spec
01:49 geekosaur except that iirc that was when they started work, or at least announced so, on a replacement for the spyglass engine
01:50 AlexDaniel spyglass?
01:50 BenGoldberg joined #perl6
01:50 geekosaur spyglass is the browser they bought and turned into IE
01:51 geekosaur (iirc)
01:53 geekosaur yep
01:53 geekosaur https://en.wikipedia.org/wiki/History_of_Inte​rnet_Explorer#Beginnings_and_Spyglass_Mosaic_.281995-1997.29
01:54 sortiz .tell lizmat I found the culprit of my 'Cannot invoke this object'!, 'PROCESS::' is null in the deserialized closure, this workaround survives precompilation "BEGIN { temp PROCESS::; -> { note } }();"
01:54 yoleaux sortiz: I'll pass your message to lizmat.
01:55 hotel learning time -> is Str.chop destructive?
01:56 timotimo m: my $a = "hello"; $a.chop; say $a
01:56 camelia rakudo-moar d065ba: OUTPUT«hello␤»
01:56 timotimo usually methods like that aren't
01:56 timotimo like, only very few methods are mutative
01:56 hotel ah that's the word I was looking for
01:56 hotel and thanks
01:57 * hotel realises he can just use substr
01:57 timotimo :)
01:58 timotimo chop is shorter if you want every char except the last
01:59 plugh22 is there some way I could get behavior of a chunk of code explained to me? about 30 lines.
02:00 hotel I just wanted all the chars in the string separate
02:00 timotimo sure, plugh22, we can try
02:00 ZoffixWin plugh22, only one way to find out :) Pastebin it and give us a link :)
02:00 timotimo hotel: that sounds exactly like what comb does
02:00 AlexDaniel m: say ‘hello’.comb
02:00 camelia rakudo-moar d065ba: OUTPUT«(h e l l o)␤»
02:00 hotel darn
02:00 hotel I knew there was an easier way
02:00 ZoffixWin http://blogs.perl.org/users/zoffix​_znet/2016/04/perl-6-comb-it.html
02:00 timotimo perl6 is like that sometimes
02:01 plugh22 you'd rather I don't paste it here then?
02:01 timotimo yes, very rather
02:01 hotel ?code
02:01 plugh22 ok, i'll get that figured out.  thanks.
02:01 hotel oh you don't have that here?
02:01 ZoffixWin plugh22, no, it's hard to follow the code in a constantly-scrolling IRC window. Try https://gist.github.com/
02:01 hotel ^^
02:01 geekosaur use a pastebin; generally pasting code directly into irc (more than 1-2 lines) makes life difficult for everyone in channel. especially since either your cloent throttles to 1 line per second or freenode kicks you for flooding
02:01 plugh22 ok, thanks.
02:01 AlexDaniel camelia supports github gists, bitbucket snippets and gitlab snippets. Choose any
02:02 ZoffixWin Or http://paste.scsys.co.uk/, if gist. needs a passsword
02:02 pierre__ joined #perl6
02:02 timotimo gist doesn't need a password if you paste anonymously
02:02 ZoffixWin k
02:02 AlexDaniel does not support no paste yet
02:02 hotel I used to be on a channel where the bot would tell people most of that with a command, lol
02:02 timotimo and if you try to copy-paste it to a file or terminal to look at or execute locally, you have to edit out timestamps and nicknames and get extra linebreaks
02:03 geekosaur I'm in several channe;s whose bots can do that. I don't think either yoleaux or camelia has that though
02:03 timotimo huggable could do it
02:04 hotel I've been away from irc for too long
02:05 TreyHarris joined #perl6
02:05 timotimo we do also have a slack. it's been quite quiet for a while now, though
02:07 AlexDaniel huggable: paste :is: Please do not paste large pieces of code here. camelia supports https://gist.github.com/ , https://gitlab.com/snippets and https://bitbucket.org/snippets
02:07 huggable AlexDaniel, Added paste as Please do not paste large pieces of code here. camelia supports https://gist.github.com/ , https://gitlab.com/snippets and https://bitbucket.org/snippets
02:07 teatime hoelzro+=20 for linking me to S99
02:07 plugh22 hmm, is pasting in the URL all you need?  <script src="https://gist.github.com/anonymous/6​4b89fd93ac083d7c51b1f7e41ec10d8.js"></script>
02:08 AlexDaniel m: https://gist.github.com/anonymous​/64b89fd93ac083d7c51b1f7e41ec10d8
02:08 camelia rakudo-moar d065ba: OUTPUT«A: (1, 2, 5, 6).Seq␤B: (1, 2, 5, 6).Seq␤␤C: (1, 2, 5, 6).Seq␤D: 1␤D: 2␤D: 5␤D: 6␤»
02:08 timotimo why is it a .js file?
02:08 AlexDaniel plugh22: ↑ like that
02:08 plugh22 ah, I see, thanks.
02:08 AlexDaniel plugh22: so what's the question?
02:08 plugh22 timo: that's the copy link from the website
02:08 timotimo oh, that's for embedding
02:08 plugh22 you can see the source code too?
02:09 timotimo usually, you'd just copy-paste the URL from the url bar of your browser
02:09 AlexDaniel sure
02:09 AlexDaniel hotel: by the way, if you want things to mutate…
02:09 plugh22 ok.  lines 7-10 are almost same as 27-30, but don't produce same output.
02:09 geekosaur most of us can just click on the url and it'll load in a browser
02:09 AlexDaniel m: my $x = ‘hello’; $x .= chop; say $x
02:09 camelia rakudo-moar d065ba: OUTPUT«hell␤»
02:10 hotel oh cool
02:10 plugh22 line 8 produces a Seq, line 29 is individual elements (which is what I expect)
02:11 Actualeyes joined #perl6
02:15 * timotimo isn't sure why it won't handle that as one-arg and iterate it
02:15 hotel "Can not convert 0+1i to Int: imaginary part not zero" what
02:15 timotimo exactly what it says
02:15 hotel wait really?
02:15 timotimo Int can't store a complex number
02:15 hotel I'm doing something else
02:15 plugh22 yah, that's what I expect.  and it does outside the 'a' object.
02:16 hotel (generating a lazy list from 0 to length of array?)
02:16 geekosaur hotel, what's the code?
02:16 timotimo so, like @foo.list?
02:16 hotel no, because that would just make sense
02:16 timotimo perhaps @foo.Seq actually?
02:16 AlexDaniel m: https://gist.github.com/AlexDaniel​/0876e6e4b27af71c7d7048f9b05be590
02:16 camelia rakudo-moar d065ba: OUTPUT«A: (Seq)␤B: (1, 2, 5, 6).Seq␤␤C: (Str)␤D: 1␤D: 2␤D: 5␤D: 6␤»
02:16 hotel .-.
02:17 AlexDaniel oops
02:17 AlexDaniel m: https://gist.github.com/AlexDaniel​/0876e6e4b27af71c7d7048f9b05be590
02:17 camelia rakudo-moar d065ba: OUTPUT«A: (Seq)␤B: (1, 2, 5, 6).Seq␤␤C: (Seq)␤D: 1␤D: 2␤D: 5␤D: 6␤»
02:17 timotimo hah, what $foo.per :)
02:17 timotimo it's potentially about containerness?
02:17 timotimo which WHAT will not tell you about
02:17 plugh22 the "say 'B: ', $c.perl" seems to print "B: (1, 2, 5, 6).Seq"
02:18 AlexDaniel what will tell me that then?
02:18 timotimo you can use nqp and then nqp::iscont, i'd think
02:18 AlexDaniel umm…
02:18 hotel m: my @letters = thread.comb; say @letters.Seq;
02:18 camelia rakudo-moar d065ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xD9jLiXyFo␤Undeclared routine:␤    thread used at line 1␤␤»
02:18 geekosaur hotel, I'm wondering if you have something you intended to be $i and accidentally just wrote i
02:18 hotel oops
02:18 hotel oh you right
02:19 hotel m: my @letters = 'thread'.comb; say @letters.Seq;
02:19 camelia rakudo-moar d065ba: OUTPUT«(t h r e a d)␤»
02:19 hotel well yeah but I need indices
02:19 timotimo so just .kv?
02:19 hotel .-.
02:19 timotimo m: say 'thread'comb.kv
02:19 camelia rakudo-moar d065ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/oSgQJ6mo28␤Two terms in a row␤at /tmp/oSgQJ6mo28:1␤------> 3say 'thread'7⏏5comb.kv␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤       …»
02:19 timotimo sorry
02:19 timotimo m: say 'thread'.comb.kv
02:19 camelia rakudo-moar d065ba: OUTPUT«(0 t 1 h 2 r 3 e 4 a 5 d)␤»
02:19 timotimo m: say 'thread'.comb.pairs
02:19 camelia rakudo-moar d065ba: OUTPUT«(0 => t 1 => h 2 => r 3 => e 4 => a 5 => d)␤»
02:20 noganex joined #perl6
02:20 hotel ah
02:20 hotel again, no because that would make sense
02:20 AlexDaniel m: say ‘hello’.kv
02:20 camelia rakudo-moar d065ba: OUTPUT«(0 hello)␤»
02:20 sortiz plugh22, in line 7 try 'self.get_flat() -> $c {'
02:20 timotimo to make the $ go away?
02:21 sortiz Yep.
02:21 SHODAN joined #perl6
02:21 timotimo that makes some sense
02:21 timotimo even through my flu
02:21 AlexDaniel m: https://gist.github.com/AlexDaniel​/0876e6e4b27af71c7d7048f9b05be590
02:21 camelia rakudo-moar d065ba: OUTPUT«A: (Seq)␤Method 'get-flat' not found for invocant of class 'Any'␤  in method p at /tmp/VuFbNkflof line 7␤  in block <unit> at /tmp/VuFbNkflof line 24␤␤»
02:21 plugh22 yes, that works, sortiz.
02:21 AlexDaniel m: https://gist.github.com/AlexDaniel​/0876e6e4b27af71c7d7048f9b05be590
02:21 camelia rakudo-moar d065ba: OUTPUT«A: (Seq)␤B: 1␤B: 2␤B: 5␤B: 6␤␤C: (Seq)␤D: 1␤D: 2␤D: 5␤D: 6␤»
02:22 Ben_Goldberg joined #perl6
02:22 plugh22 why is that necessary?
02:22 AlexDaniel timotimo: I declare myself blind
02:22 timotimo it'll give you a scalar container interface when you use $.foo instead of self.foo
02:22 sortiz or the alternative: " for @($.get-flat()) -> $c { "
02:23 timotimo shouldn't @$.get-flat also do it?
02:23 timotimo actually ... @.get-flat should also work :)
02:23 plugh22 so 'self' makes it explicitly like line 28
02:23 AlexDaniel m: $42
02:23 camelia rakudo-moar d065ba: ( no output )
02:23 sortiz timotimo, your right. :)
02:24 plugh22 correct, timo, it does!
02:24 timotimo what's to my right? :P
02:24 sortiz *you are
02:24 plugh22 OK, that gives me a bit more insight.  thanks very much.
02:24 AlexDaniel your right, my left
02:24 timotimo i am to my right? i feel like that, yeah
02:24 sortiz :P
02:25 AlexDaniel hotel: any other interesting questions before I fall asleep? :)
02:25 plugh22 OK, OK, "you're right".  better? :-)
02:25 timotimo :D
02:25 hotel lol, is there an easy way to check if something is the last index of a list?
02:25 timotimo but yeah, i'm kind of sick :(
02:25 timotimo you can == @foo.end
02:26 plugh22 been playing with p6 about a month now.  gotta say, I think it's great!
02:26 sortiz Keep my code, forget my English, ok? :-)
02:26 timotimo it's kinda good, yeah
02:26 hotel I was gonna say something ~.~
02:26 AlexDaniel plugh22: well, you can also think about using ’ instead of '
02:27 plugh22 thanks to you all who put so much effort into it.
02:27 AlexDaniel plugh22: “you’re”
02:28 hotel thanks timotimo
02:28 timotimo YW
02:28 colomon joined #perl6
02:28 teatime m: my @lst = (1..5); my $idx = 4; say "It is." if $idx == @lst.elems-1
02:28 camelia rakudo-moar d065ba: OUTPUT«It is.␤»
02:28 teatime m: my @lst = (1..5); my $val = 5; say "It is." if $val == @lst[*]
02:28 camelia rakudo-moar d065ba: OUTPUT«It is.␤»
02:29 AlexDaniel teatime: IMO .end is more readable
02:29 teatime aha, yeah I was just looking at Array methods
02:30 teatime "Returns the index of the last element." perfection.
02:31 teatime and I guess there's .tail too instead of @lst[*]
02:32 AlexDaniel oh, there's a cool way to do it
02:33 hotel why is this? http://puu.sh/oElmT/bed0da7b6b.png
02:33 teatime beware of value types and comparing identity to see if you've reached the end of the list
02:33 teatime but I dunno where that'd ever come up, as many slick ways as there are to iterate
02:33 AlexDaniel hotel: use {} instead of <>
02:34 hotel oh
02:34 AlexDaniel hotel: <> is there so that you don't have to write {'foo'}
02:34 hotel hm, it didn't like that
02:35 AlexDaniel m: my @abc = <a b c>; say ‘It is.’ if @abc.keys ~~ (**, 2)
02:35 camelia rakudo-moar d065ba: OUTPUT«It is.␤»
02:35 AlexDaniel m: my @abc = <a b c>; say ‘It is.’ if @abc.keys ~~ (**, 3)
02:35 camelia rakudo-moar d065ba: ( no output )
02:36 AlexDaniel timotimo: ↑ :D
02:36 timotimo fantastic
02:38 teatime hotel: also why (%hash = $str.comb.pairs) instead of (@arr = $str.comb)
02:38 hotel good question
02:38 AlexDaniel hotel: are you trying to compare letters in alphabetical order?
02:38 hotel I'm experimenting?
02:38 AlexDaniel I mean, to test
02:38 AlexDaniel m: my $s = ‘THREAD’; say [<] $s.comb».ord
02:38 camelia rakudo-moar d065ba: OUTPUT«False␤»
02:38 AlexDaniel m: my $s = ‘ABC’; say [<] $s.comb».ord
02:38 camelia rakudo-moar d065ba: OUTPUT«True␤»
02:39 timotimo wouldn't lt work better here?
02:39 AlexDaniel ah right
02:39 AlexDaniel m: my $s = ‘ABC’; say [lt] $s.comb
02:39 camelia rakudo-moar d065ba: OUTPUT«True␤»
02:39 AlexDaniel m: my $s = ‘CABC’; say [lt] $s.comb
02:39 camelia rakudo-moar d065ba: OUTPUT«False␤»
02:39 hotel more like I'm implementing a permutation algorithm while trying to wrap my head around basic perl6 grammar
02:39 timotimo OK :)
02:39 hotel :)
02:40 timotimo we do have permutations and combinations built-in, btw
02:40 timotimo if you want to verify or something
02:40 hotel not at code-golf tier
02:40 hotel >I knew it<
02:40 AlexDaniel m: say ‘abc’.comb.permutations».join
02:40 camelia rakudo-moar d065ba: OUTPUT«(abc acb bac bca cab cba)␤»
02:40 timotimo do you already know of these >>.foo and ».foo things, btw?
02:41 hotel hyper operators?
02:41 hotel oh that's a good idea
02:41 timotimo yeah, hyper operators are cool
02:41 AlexDaniel m: say ‘abc’.comb.combinations».join
02:41 camelia rakudo-moar d065ba: OUTPUT«( a b c ab ac bc abc)␤»
02:41 AlexDaniel m: say ‘eelps’.comb.combinations».join
02:41 camelia rakudo-moar d065ba: OUTPUT«( e e l p s ee el ep es el ep es lp ls ps eel eep ees elp els eps elp els eps lps eelp eels eeps elps elps eelps)␤»
02:42 hotel still a learning experience
02:42 timotimo such is life :)
02:43 teatime I think this does what you were trying to do:  m: for 'THREAD'.comb.rotor(2) -> ($a, $b) { say $a lt $b }
02:43 teatime probably way late :)
02:43 hotel oh yeah, I was using pairs to get indices
02:43 hotel no matter, you can't stop me >:)
02:43 AlexDaniel Is there any golfier way to do .comb ?
02:43 AlexDaniel 5 characters is a bit too much
02:44 timotimo
02:44 AlexDaniel timotimo: you mean ‘a’…‘c’ ?
02:44 timotimo well, if you're going in with something like "abc", then yeah
02:44 AlexDaniel m: say ‘a’…‘c’; say ‘abc’.comb
02:44 camelia rakudo-moar d065ba: OUTPUT«(a b c)␤(a b c)␤»
02:45 zcage joined #perl6
02:45 AlexDaniel nah, that's not gonna help most of the times, I guess
02:45 timotimo :)
02:47 pierre__ joined #perl6
02:49 mcsnolte joined #perl6
02:49 AlexDaniel timotimo: well, .NFC is one character shorter than .ords
02:50 timotimo ah, good point
02:50 timotimo however, it acts differently with regards to multi-composed characters
02:51 timotimo like, comb -> ords will drop modifiers, i think
02:51 timotimo er, why am i suggesting comb + ords
02:52 AlexDaniel huggable: dunno
02:52 huggable AlexDaniel, ¯\_(ツ)_/¯
02:52 teatime timotimo: you like to be asciibetical?  :)
02:53 * hotel is using ords to sort lexicographically
02:53 timotimo so basically like .sort( * leg * ) ?
02:53 teatime afaik that doesn't work.  in general, anyway.  within ascii alnum chars, lexographically = asciibetically.
02:53 teatime lexico, whatever
02:54 hotel well not sort per se
02:55 AlexDaniel m: ‘foobar’.comb.sort({$^a leg $^b}).say # such perl 5 :)
02:55 camelia rakudo-moar d065ba: OUTPUT«(a b f o o r)␤»
02:56 AlexDaniel ah, by the way
02:56 AlexDaniel m: ‘foobar’.comb.sort(*leg*).say
02:56 camelia rakudo-moar d065ba: OUTPUT«(a b f o o r)␤»
02:56 AlexDaniel no whitespace required
02:56 timotimo m: 'foobar'.comb.sort(&[leg]).say
02:56 camelia rakudo-moar d065ba: OUTPUT«(a b f o o r)␤»
02:56 timotimo no * needed either
02:57 AlexDaniel timotimo: but yours is 1 character longer
02:57 timotimo right
02:57 AlexDaniel :D
02:57 AlexDaniel timotimo: it is a good point, I like it
02:58 timotimo m: say <a b f o o r>
02:58 camelia rakudo-moar d065ba: OUTPUT«(a b f o o r)␤»
02:58 timotimo ^- even shorter
02:58 AlexDaniel I mean, &[leg]
02:58 timotimo ya
02:58 timotimo one less level of indirection
02:58 timotimo ought to be a tiny bit faster
02:59 timotimo i really ought to sleep and get better
02:59 AlexDaniel m: say leg ‘a’, ‘b’
02:59 camelia rakudo-moar d065ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/I6966TuLix␤Undeclared routine:␤    leg used at line 1. Did you mean 'log'?␤␤»
02:59 hotel can default arguments reference other arguments?
02:59 geekosaur operator syntax
03:00 teatime I don't get it, why not 'String'.comb.sort  ?
03:00 timotimo yes, but only to their left, hotel
03:00 AlexDaniel m: say &[le](‘a’, ‘b’)
03:00 camelia rakudo-moar d065ba: OUTPUT«True␤»
03:00 hotel nice!
03:01 AlexDaniel teatime: well… um…
03:01 teatime I mean why 'String'.comb.sort(*leg*)
03:01 AlexDaniel teatime: because… well… look how cool it is!
03:01 teatime hehe
03:02 * timotimo legs
03:02 AlexDaniel m: .&[le]
03:02 camelia rakudo-moar d065ba: ( no output )
03:02 AlexDaniel m: say .&[le]
03:02 camelia rakudo-moar d065ba: OUTPUT«True␤»
03:03 BenGoldberg m: [leg] <a b>
03:03 BenGoldberg m: say [leg] <<a b>>
03:03 camelia rakudo-moar d065ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7KmK0yhBo9␤Cannot reduce with leg because structural infix operators are diffy and not chaining␤at /tmp/7KmK0yhBo9:1␤------> 3[7⏏5leg] <a b>␤    expecting any of:␤        infix␤        infix s…»
03:03 camelia rakudo-moar d065ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/5ltHhWpjVL␤Cannot reduce with leg because structural infix operators are diffy and not chaining␤at /tmp/5ltHhWpjVL:1␤------> 3say [7⏏5leg] <<a b>>␤    expecting any of:␤        argument list␤ …»
03:04 AlexDaniel m: say ‘a’.&[leg](‘b’)
03:04 camelia rakudo-moar d065ba: OUTPUT«Less␤»
03:04 AlexDaniel m: say ‘c’.&[leg](‘b’)
03:04 camelia rakudo-moar d065ba: OUTPUT«More␤»
03:04 AlexDaniel look, you can use it like an infix! Who would've thought!
03:04 timotimo thank the lord
03:05 AlexDaniel I wonder why this does not work
03:05 AlexDaniel m: say &[leg] ‘a’: ‘b’
03:05 camelia rakudo-moar d065ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/d3uw_hi07d␤Confused␤at /tmp/d3uw_hi07d:1␤------> 3say &[leg]7⏏5 ‘a’: ‘b’␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        s…»
03:05 timotimo maybe it only accepts literal names, instead of our magical anything-can-be-method-like
03:06 timotimo like, it also won't let you do .^ or .* or .? or something
03:06 AlexDaniel awwww, such a pity
03:07 timotimo it could be implemented to work, i assume
03:07 timotimo i'd want that to go via the toady first :)
03:07 BenGoldberg m: say &[leg]
03:07 camelia rakudo-moar d065ba: OUTPUT«sub infix:<leg> (Mu $?, Mu $?) { #`(Sub+{<anon|60139888>}+{Precedence}|40460208) ... }␤»
03:07 AlexDaniel you know what, I'll open a ticket for that
03:07 timotimo 'k
03:08 hotel m: my $str = 'string; my $sub = $str.substr(2, 4).flip.list; for 2 ... 4 -> $i { $str.list[$i] .= $sub[$i - 2]; } say $str.list;
03:08 camelia rakudo-moar d065ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/b4j3F4jrcE␤Unable to parse expression in single quotes; couldn't find final "'" ␤at /tmp/b4j3F4jrcE:1␤------> 3st[$i] .= $sub[$i - 2]; } say $str.list;7⏏5<EOL>␤    expecting any of:␤        sing…»
03:08 hotel darn
03:08 hotel m: my $str = 'string'; my $sub = $str.substr(2, 4).flip.list; for 2 ... 4 -> $i { $str.list[$i] .= $sub[$i - 2]; } say $str.list;
03:09 camelia rakudo-moar d065ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/f6gC579BL0␤Missing infix inside []␤at /tmp/f6gC579BL0:1␤------> 3r 2 ... 4 -> $i { $str.list[$i] .= $sub[7⏏5$i - 2]; } say $str.list;␤    expecting any of:␤        bracketed infix␤        infi…»
03:09 timotimo what do you mean by .= ?
03:09 hotel mutative assignment (?)
03:09 timotimo .= is only for method calls
03:10 timotimo m: my $a = "foo"; $a .= uc; say $a
03:10 camelia rakudo-moar d065ba: OUTPUT«FOO␤»
03:10 hotel oh
03:10 timotimo m: my $a = "foo"; $a = $a.uc; say $a
03:10 camelia rakudo-moar d065ba: OUTPUT«FOO␤»
03:10 timotimo those two are the same
03:10 hotel huh
03:10 timotimo just like $a += 5 is the same as $a = $a + 5
03:11 BenGoldberg Maybe he meant ~= ?
03:11 BenGoldberg m: 'abcd'.list.say
03:11 camelia rakudo-moar d065ba: OUTPUT«(abcd)␤»
03:11 hotel <AlexDaniel> m: my $x = ‘hello’; $x .= chop; say $x
03:11 hotel <camelia> rakudo-moar d065ba: OUTPUT«hell␤»
03:11 timotimo no, i think hotel meant = instead
03:11 hotel oh though I guess that is a method call too
03:11 AlexDaniel sure
03:11 timotimo yeah, that's a method call
03:11 hotel gatcha
03:11 timotimo assignment itself is already mutative :P
03:11 BenGoldberg m: my $str = 'abc'; $str.list[1] = 'd'; say $str;
03:11 camelia rakudo-moar d065ba: OUTPUT«Cannot modify an immutable Nil␤  in block <unit> at /tmp/5jq8K6iLCK line 1␤␤»
03:11 hotel m: my $str = 'string'; my $sub = $str.substr(2, 4).flip.list; for 2 ... 4 -> $i { $str.list[$i] = $sub[$i - 2]; } say $str.list;
03:12 camelia rakudo-moar d065ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lcRXWufKSR␤Strange text after block (missing semicolon or comma?)␤at /tmp/lcRXWufKSR:1␤------> 3 -> $i { $str.list[$i] = $sub[$i - 2]; }7⏏5 say $str.list;␤»
03:12 AlexDaniel timotimo: how was that smth $a: $b thing c
03:12 AlexDaniel timotimo: called?
03:12 timotimo indirect object notation?
03:12 AlexDaniel yea, that
03:12 hotel m: my $str = 'string'; my $sub = $str.substr(2, 4).flip.list; for 2 ... 4 -> $i { $str.list[$i] = $sub[$i - 2]; }; say $str.list;
03:12 camelia rakudo-moar d065ba: OUTPUT«Cannot modify an immutable Nil␤  in block <unit> at /tmp/4bCFhkV9Sn line 1␤␤»
03:12 timotimo ah the rush of endorphin when you remember a thing someone wanted to know about
03:12 timotimo do you know about the incredible thing that is substr-rw?
03:13 hotel I skipped over that one
03:13 timotimo it gives you a variable that initially contains the substr at the position you asked for, but when you assign to that, it'll change teh variable you originally called .substr-rw on
03:13 timotimo m: my $text = "hello how are you"; my $chunk = $text.substr-rw(5, 10); say $chunk; $chunk = "lalalala"; say $text
03:13 camelia rakudo-moar d065ba: OUTPUT« how are y␤hello how are you␤»
03:14 timotimo um, or not?
03:14 timotimo m: my $text = "hello how are you"; my $chunk := $text.substr-rw(5, 10); say $chunk; $chunk = "lalalala"; say $text
03:14 camelia rakudo-moar d065ba: OUTPUT« how are y␤hellolalalalaou␤»
03:14 timotimo have to bind it, otherwise it'll just read the contents of the substr-rw chunk and put that into $chunk
03:14 timotimo whereas you're interested in the container, not the contents
03:14 hotel I want to reverse a substring in place
03:15 timotimo m: my $text = "hello how are you"; my $chunk := $text.substr-rw(5, 10); say $chunk; $chunk .= flip; say $text
03:15 camelia rakudo-moar d065ba: OUTPUT« how are y␤helloy era woh ou␤»
03:15 timotimo ^- like this? :)
03:15 AlexDaniel RT #128059 :)
03:15 hotel maybe?
03:16 hotel trying to make sense of the output there kek
03:16 hotel oh I see
03:16 timotimo m: my $text = "abcdefghijklmnopqrstuvwxyz"; my $chunk := $text.substr-rw(5, 10); say $chunk; $chunk .= flip; say $text
03:16 camelia rakudo-moar d065ba: OUTPUT«fghijklmno␤abcdeonmlkjihgfpqrstuvwxyz␤»
03:16 timotimo the first bit is just the substr
03:17 hotel yeah
03:17 cognominal joined #perl6
03:17 AlexDaniel I was going to explain why it hurts Perl 6 adoption but then thought that it is obvious anyway
03:17 hotel lol
03:17 hotel thanks guysh
03:17 hotel s/ks/ksh/
03:17 timotimo the what now?
03:18 AlexDaniel timotimo: I'm actually wondering if anybody besides me is using indirect object notation in real code
03:18 synopsebot6 joined #perl6
03:18 hotel what it do?
03:19 timotimo it lets you write "new Foobar: :blah(1), :bar<foo>;" instead of "Foobar.new(:blah(1), :bar<foo>)"
03:19 timotimo i.e. it reverses the thing you call the method on and the method name, then forces you to put a : after the thing you call the method on
03:19 AlexDaniel m: say substr ‘abc’, 2
03:19 camelia rakudo-moar d065ba: OUTPUT«c␤»
03:19 AlexDaniel m: say substr ‘abc’: 2
03:19 camelia rakudo-moar d065ba: OUTPUT«c␤»
03:20 AlexDaniel m: say ‘abc’.substr: 2
03:20 camelia rakudo-moar d065ba: OUTPUT«c␤»
03:20 timotimo that's just calling the substr sub instead of the .substr method
03:20 hotel so it makes perl6 like other languages
03:20 AlexDaniel the first one, yes
03:20 hotel or rather it turns methods into keywords?
03:20 AlexDaniel timotimo: but it is interesting that sometimes you can change , to : :)
03:21 timotimo hotel: other languages usually only allow that for "new"
03:21 hotel ^^keywords
03:21 hotel like python 2
03:21 timotimo and it's still not keywords, because in other contexts they are meaningless
03:21 hotel oh right
03:23 hotel "cannot assign to a readonly variable or value" http://puu.sh/oEo1t/e2db9d46da.png
03:24 AlexDaniel makes sense
03:24 hotel what have I done?
03:25 timotimo you didn't "is rw" the parameter
03:25 hotel oh
03:26 hotel so like sub foo($string is rw) {...}?
03:27 hotel it worked /o/
03:27 AlexDaniel m: sub f($string) { my $sub := $string.substr-rw(0,3); $sub.flip }; say f(‘hello’)
03:27 camelia rakudo-moar d065ba: OUTPUT«leh␤»
03:27 AlexDaniel m: sub f($string) { $string.substr-rw(0,3).flip }; say f(‘hello’)
03:27 camelia rakudo-moar d065ba: OUTPUT«leh␤»
03:28 timotimo the default for arguments is "is ro", another option is "is copy"
03:28 hotel that's cool, so you can specify pass-by-value or pass-by-reference
03:28 timotimo i'll go to bed now. for reals.
03:29 timotimo o/
03:29 hotel night
03:29 AlexDaniel night
03:29 AlexDaniel m: sub f { $^a.substr-rw($^b, $^c).flip }; say f(‘hello’, 1, 3)
03:29 camelia rakudo-moar d065ba: OUTPUT«lle␤»
03:29 AlexDaniel you can't have a default parameter this way though :(
03:29 AlexDaniel well, you can
03:30 hotel but that doesn't flip the substring in place
03:30 AlexDaniel oh
03:31 hotel though apparently neither does mine
03:31 BenGoldberg joined #perl6
03:31 AlexDaniel m: multi f {$^a.substr-rw($^b).flip }; multi f { $^a.substr-rw($^b, $^c).flip }; say f(‘hello’, 1)
03:31 camelia rakudo-moar d065ba: OUTPUT«olle␤»
03:31 AlexDaniel m: multi f {$^a.substr-rw($^b).flip }; multi f { $^a.substr-rw($^b, $^c).flip }; say f(‘hello’, 1, 3)
03:31 camelia rakudo-moar d065ba: OUTPUT«lle␤»
03:31 hotel are double-quoted strings 'str values' as opposed to 'writable containers'?
03:32 tardisx joined #perl6
03:33 cpage_ joined #perl6
03:33 BenGoldberg joined #perl6
03:34 cpage_ joined #perl6
03:35 hotel interesting, it flips what it's supposed to, but leaves off most of the rest of the string
03:36 AlexDaniel m: my $x = ‘hello’; sub f($string is rw) { $string.substr-rw(0,3) = ‘abc’ }; f($x); say $x
03:36 camelia rakudo-moar d065ba: OUTPUT«abclo␤»
03:36 AlexDaniel hotel: Str itself is immutable
03:36 AlexDaniel how .substr-rw works is beyond me
03:36 hotel "magic"
03:37 hotel unless it acts on the underlying list of characters (though I guess that doesn't exist in p6?)
03:38 AlexDaniel hotel: well, if you need a writable Str then consider Buf
03:39 hotel hm
03:40 AlexDaniel anyway, I'm going to bed now :)
03:40 AlexDaniel see you
03:40 hotel http://puu.sh/oEoYK/36856f8ef4.png
03:41 hotel same
03:41 hotel night
03:42 AlexDaniel .tell hotel try this for swapping values: my @arr = <a b c>; @arr[0,2] = @arr[2,0]; say @arr
03:42 yoleaux AlexDaniel: I'll pass your message to hotel.
03:43 hotel|netteiru thanks
03:43 hotel|netteiru :P
03:45 tardisx joined #perl6
03:46 teatime there's no current way to get the string '"̃' (U+0022, U+0303) to match /../ is there ?
03:50 teatime blargh, i thought maybe if I broke it up w/ a ZWNJ, but nope
04:04 tardisx joined #perl6
04:15 petercommand joined #perl6
04:15 petercommand joined #perl6
04:16 petercommand joined #perl6
04:16 petercommand joined #perl6
04:19 zostay joined #perl6
04:20 geekosaur joined #perl6
04:20 simcop2387 joined #perl6
04:34 molaf joined #perl6
04:35 hotel joined #perl6
04:45 adu joined #perl6
04:45 obfusk joined #perl6
04:57 MadcapJake m: $_ = 'Awesome::Module'; say m/<.ident>+ % '::'/
04:57 camelia rakudo-moar d065ba: OUTPUT«「Awesome::Module」␤»
04:57 MadcapJake m: $_ = 'Awesome::Module'; say m/$<type>=[ <.ident>+ % '::' ]/
04:57 camelia rakudo-moar d065ba: OUTPUT«「Awesome::Module」␤ type => 「Awesome::Module」␤»
04:58 teatime hi MadcapJake
04:58 MadcapJake hello!
04:59 MadcapJake just trying to lively up the channel with some camelia chatter :)
05:04 Cabanossi joined #perl6
05:17 _mg_ joined #perl6
05:35 pierre__ joined #perl6
05:39 huggable joined #perl6
05:40 domidumont joined #perl6
05:42 domidumont joined #perl6
05:45 domidumont joined #perl6
05:52 sno joined #perl6
06:02 ufobat joined #perl6
06:02 wamba joined #perl6
06:04 ufobat good morning everyone :)
06:06 teatime when p6 wants to coerce “A $a” to “B” such as if you called “sub foo ( B(A) $b ) {…}” like “foo($a)”, does it try anything besides “$a.B” ...
06:07 teatime making “sub ( Int(MyType) $x )” work is easy, but I'm trying to figure out if you can reasonably do “sub ( MyType(Int) $y )”
06:10 domidumont joined #perl6
06:10 DrForr 7 slides, 20 minutes of text, and I've only got to qq[} interpolation. I'm doing something wrong.
06:11 teatime oo, are you making a presentation?
06:12 DrForr Rewriting my OSCON tutorial. Assuming nothing other than C programming
06:12 CIAvash joined #perl6
06:12 DrForr Grr. Assuming nothing other than C programming skills is limiting.
06:15 teatime yeah, I think the awesomesauce of perl6 is you can reach for whichever paradigm/feature is most applicable to the problem, etc.  but even if someone had only ever done C, I think they'd still understand lots of totally non-c-like syntax, if the examples were chosen well (to make clear whatever relations/transformations)
06:16 teatime oh, you said tutorial too, though.. that does require a bit more rigor, I guess
06:18 DrForr Yeah. If it were in front of a YAPC crowd I'd be already into REs.
06:20 DrForr I did ask for basic scripting knowledge, but again that's not a guarantee. I'm just trying to pick out what makes Perl different in the first few slides, then accelerate. I've also got to keep in mind that we need interactive examples to try out so people don't fall asleep on me.
06:21 teatime it'll be in a lab?  and you'll be able to install p6 on the lab ahead of time?
06:23 DrForr If it were a lab I'd be happier. I imagine the first 20 minutes will be getting the latest installs going :/
06:23 firstdayonthejob joined #perl6
06:23 teatime argh
06:27 DrForr Mmhmm. Work calling, catch y'all later.
06:29 pierre__ joined #perl6
06:33 boegel joined #perl6
06:47 jjido joined #perl6
06:50 rindolf joined #perl6
07:03 rurban joined #perl6
07:04 zakharyas joined #perl6
07:12 Relsak joined #perl6
07:21 rurban left #perl6
07:24 mr-foobar joined #perl6
07:32 Amnez777 joined #perl6
07:39 Amnez777 joined #perl6
07:44 g4 joined #perl6
07:44 g4 joined #perl6
07:46 domidumont joined #perl6
07:56 * teatime tries to find Leon Timmermans's test/TAP stuff, learn what it's about
07:58 lizmat t/harness6
07:58 yoleaux 01:54Z <sortiz> lizmat: I found the culprit of my 'Cannot invoke this object'!, 'PROCESS::' is null in the deserialized closure, this workaround survives precompilation "BEGIN { temp PROCESS::; -> { note } }();"
07:58 lizmat lib/TAP.pm6
07:58 PotatoGim joined #perl6
07:58 dalek joined #perl6
07:58 PotatoGim joined #perl6
07:58 llfourn joined #perl6
07:59 Amnez777 joined #perl6
07:59 geekosaur joined #perl6
07:59 remmie joined #perl6
07:59 retup__ joined #perl6
07:59 hoelzro joined #perl6
07:59 zacts joined #perl6
07:59 Juerd joined #perl6
07:59 zostay joined #perl6
08:00 dustinm` joined #perl6
08:00 simcop2387 joined #perl6
08:00 tomboy64 joined #perl6
08:00 teatime thx
08:00 _nadim morning
08:00 TeamBlast joined #perl6
08:00 lizmat _nadim o/
08:01 chris2 joined #perl6
08:01 Amnez777 joined #perl6
08:01 ribasushi joined #perl6
08:03 inokenty joined #perl6
08:03 winger__ joined #perl6
08:03 RabidGravy joined #perl6
08:03 RabidGravy Boom
08:03 boegel joined #perl6
08:03 winger_ joined #perl6
08:05 sortiz \o
08:06 dakkar joined #perl6
08:07 lizmat sortiz: did you add your PROCESS:: finding to the ticket ?
08:08 mrsolo joined #perl6
08:08 pnu_ joined #perl6
08:09 winger__ joined #perl6
08:11 caasih joined #perl6
08:11 darutoko joined #perl6
08:11 sortiz lizmat, I hasn't a particular ticket. There are some similar in RT.
08:12 lizmat ah, ok: but it seems pretty essential to keep that finding around, as it its probably the ground cause of these (similar) issues, no ?
08:12 RabidGravy might be work making a round up one and merge or link the rest
08:13 khagan joined #perl6
08:14 sortiz Yes, I suppose that, in all paths that use some dynamic variable, the results are the same.
08:15 sortiz I'll add the case to llfourn's RT #127034
08:15 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=127034
08:15 vaisian_ joined #perl6
08:15 cpage_ joined #perl6
08:16 pierre__ joined #perl6
08:17 RabidGravy ah, that old "closures going away" after precomp thing
08:18 RabidGravy I think you would find (if you could search the bodies) that nearly all the "cannot Invoke this object" tickets are some variant of the same thing
08:19 sortiz RabidGravy, Yep, I found that inside them, when unserialized, PROCESS:: is null. So no dynamics.
08:19 Sgeo joined #perl6
08:20 winger__ joined #perl6
08:20 pierre___ joined #perl6
08:21 RabidGravy yeah that's not so good
08:22 RabidGravy actually yes, that would prevent two of my modules being used in some way that I would expect to be common
08:23 RabidGravy at least two
08:23 RabidGravy I already know that Staticish doesn't work when pre-comped
08:24 RabidGravy or rather used by a module that is precomped
08:25 pierre__ joined #perl6
08:26 tardisx joined #perl6
08:28 sortiz Well, annotated in the cited ticket, lizmat.
08:28 lizmat sortiz++
08:28 teatime woah, I didn't realize you could use half of <( )>
08:28 RabidGravy also OO::Monitors doesn't work when pprecomped (because wrap doesn't work because the candidates goes away)
08:30 sortiz I hope that the PROCESS fact rings the bell to someone. :-)
08:31 uruwi joined #perl6
08:31 _nadim masak: going to Cluj?
08:35 lizmat afk&
08:39 winger_ joined #perl6
08:44 winger__ joined #perl6
08:53 winger__ joined #perl6
08:53 boegel joined #perl6
08:58 winger_ joined #perl6
09:04 boegel joined #perl6
09:09 _nadim joined #perl6
09:39 huggable joined #perl6
09:54 avenj joined #perl6
10:25 ZoffixWin psch, hm, a Channel won't solve the race condition on patch switches: https://github.com/Perl6-Noise-Ga​ng/perl6-Audio-MIDI-Note/issues/1
10:26 ZoffixWin I was planning to solve this using OO::Monitor/OO::Actor, but had trouble using those modules.
10:26 ZoffixWin So I left it for another day
10:27 psch ZoffixWin: fwiw, i've actually realized that the channel solution could be made to work inside Audio::PortMIDI itself
10:27 psch ZoffixWin: which would mean that libs using that don't have to care whether they treat it thread-safely or not
10:28 ZoffixWin cool
10:28 psch ...i just kinda got hung up on hacking that together and didn't note it in the ticket yet :)
10:32 zakharyas joined #perl6
10:39 Actualeyes joined #perl6
10:44 psch m: class B {...}; class A { trusts B; method !foo { say "bar" } }; class B { method baz { A!foo } }; B.baz # what am i doing wrong here..?
10:44 camelia rakudo-moar 8fb78d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/gCforHBR1h␤No such private method 'foo' for invocant of type 'B'␤at /tmp/gCforHBR1h:1␤------> 3say "bar" } }; class B { method baz { A!7⏏5foo } }; B.baz # what am i doing wrong h␤»
10:45 psch m: class B {...}; class A { trusts B; method !foo { say "bar" } }; class B { has $.a; method baz { $!a!foo } }; B.new(:a(A.new)).baz # closer to what i'm actually doing
10:45 camelia rakudo-moar 8fb78d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/hEND6jNYxs␤No such private method 'foo' for invocant of type 'B'␤at /tmp/hEND6jNYxs:1␤------> 3 }; class B { has $.a; method baz { $!a!7⏏5foo } }; B.new(:a(A.new)).baz # closer t␤»
10:46 psch ah, found it in S12
10:47 psch m: class B {...}; class A { trusts B; method !foo { say "bar" } }; class B { has $.a; method baz { $!a!A::foo } }; B.new(:a(A.new)).baz
10:47 camelia rakudo-moar 8fb78d: OUTPUT«bar␤»
11:07 * lizmat clickbats https://p6weekly.wordpress.com/2016/​05/02/2016-18-long-awaited-landings/
11:16 rindolf joined #perl6
11:18 moritz lizmat++
11:19 huf joined #perl6
11:21 RabidGravy moritz, is it you that has the big repository of all the ecosystem?
11:21 adu joined #perl6
11:22 moritz RabidGravy: yes
11:22 moritz moritz/perl6-all-modules or so
11:23 RabidGravy cool, I'm just interested in finding (and testing) all the modules that use .wrap() in some way
11:24 RabidGravy (at some point, up to my eye-balls with todo items at the moment)
11:25 CIAvash lizmat++
11:27 TimToady joined #perl6
11:34 telex joined #perl6
11:37 kid51 joined #perl6
11:53 kaare_ joined #perl6
11:56 pierre_ joined #perl6
12:03 AlexDaniel joined #perl6
12:04 AlexDaniel m: say 25.8.base(2, 10)
12:04 camelia rakudo-moar 495e03: OUTPUT«11001.1100110011␤»
12:05 AlexDaniel m: say 25.8.base(2, NaN)
12:05 camelia rakudo-moar 495e03: OUTPUT«Cannot coerce NaN to an Int␤  in block <unit> at /tmp/hgqZlfiinX line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/hgqZlfiinX line 1␤␤»
12:05 AlexDaniel m: say 25.8.base(2, Inf)
12:05 camelia rakudo-moar 495e03: OUTPUT«Cannot coerce Inf to an Int␤  in block <unit> at /tmp/TtargALnfn line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/TtargALnfn line 1␤␤»
12:05 AlexDaniel m: say 25.8.base(2, -10)
12:05 camelia rakudo-moar 495e03: OUTPUT«digits argument to base out of range. Is: -10, should be in 0..*␤  in block <unit> at /tmp/bKthY2bPvb line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/bKthY2bPvb line 1␤␤»
12:06 * teatime waves
12:07 psch o/ teatime
12:11 psch ZoffixWin: can you check if https://github.com/peschwa/Au​dio-PortMIDI/tree/async-safe solves your instrument race issue?
12:14 sjn joined #perl6
12:14 sjn \o
12:15 sjn hello, #perl6
12:15 * [Coke] needs more coffee.
12:15 sue joined #perl6
12:20 pierre_ joined #perl6
12:22 ZoffixW joined #perl6
12:26 ZoffixW psch, can't try right now, but I'm all but certain it doesn't. The issue is the instrument change and the sounding notes are different commands. So the race is where one thread changes instrument and another thread plays the note (that plays using the wrong instrument). Basically, I need to ensure only one thread at a time is inside this sub: https://github.com/Perl6-Noise-Gang/perl6-Audio-M​IDI-Note/blob/master/lib/Audio/MIDI/Note.pm6#L35
12:26 ZoffixW I don't see any way to fix that from within Audio::MIDI
12:28 psch ZoffixW: but the MIDI protocol itself guarantees that an instrument change during a played note cannot change the instrument for that note
12:28 psch ZoffixW: oh, but yeah, i see what you mean
12:29 psch as in, if it fixes it it's only because nothing changes instruments often enough
12:30 ZoffixW Thread 1: | Instrument | Play note |
12:30 ZoffixW Thread 2:              | Instrument | Play Note |
12:31 ZoffixW The race is in the middle, where the second instrument change command in Thread 2 changes the instrument for note in THread 1, before my code had a chance to ask ::MIDI to play that note
12:32 psch ...as a side note, can we agree on Cs/Db instead of C#/Db?  'cause i'm using the (lhs of / of the) former for an enum, and enums can't have # obviously :)
12:33 ZoffixW But why are you using enums?
12:33 psch in Music::Helpers::Note, for relative scale value
12:34 psch for every Cs => $octave % 12 == 1
12:34 psch err, s/octave/midi/
12:34 ZoffixW No, I mean, they're uncomfortable to use, IMO
12:34 AlexDaniel m: say ‘♯’.uniprop
12:34 camelia rakudo-moar e4a1b5: OUTPUT«Sm␤»
12:34 AlexDaniel awww
12:34 psch AlexDaniel: yeah, i tried that :)
12:35 psch ZoffixW: well, i suppose i could turn that into hash lookups instead...
12:35 ZoffixW m: sub term:<C♯> { 'C shaaarp' }; say C♯
12:35 camelia rakudo-moar e4a1b5: OUTPUT«C shaaarp␤»
12:35 psch oh, or that, yeah
12:35 psch didn't think of term:<>
12:35 ZoffixW I think that has a hefty overhead tho
12:36 ZoffixW At least custom operators do; unsure if that applies to terms too
12:36 psch adding them to the grammar does, yeah
12:36 AlexDaniel not much overhead, but a significant startup delay
12:36 psch every term clones %*LANG iirc
12:36 psch well, and adds itself :)
12:37 psch ...i really can't tell the organ and guitar apart reliably in this soundfont
12:39 domidumont joined #perl6
12:39 psch hm, in any case, Audio::PortMIDI itself is now a lot thread safer, but that doesn't completely preclude users of making sure they don't do race-y things themselves
12:40 psch we only guarantee that it probably won't run amok inside C code
12:40 ZoffixW psch++
12:40 psch and yeah, i think i see why a Channel doesn't solve the race.  it just moves it from Pm_Write to Channel.send
12:41 psch (well, "now" there also means "as soon as the patches in async-safe land in master" :P )
12:41 domidumont1 joined #perl6
12:44 dalek ecosystem: 511e396 | RabidGravy++ | META.list:
12:44 dalek ecosystem: Move the Audio::PortMIDI to noise gang
12:44 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/511e396f64
12:44 psch locking would help, but the two OO:: helpers are probably the less fiddly approach
12:47 dalek ecosystem: 919950f | peschwa++ | META.list:
12:47 dalek ecosystem: Move Music::Helpers to noise gang
12:47 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/919950ffbb
12:47 psch RabidGravy++
12:47 psch that redirect from github probably goes away eventually...
12:49 ZoffixW Still works for a thing I transfered 9 months ago
12:49 RabidGravy there
12:51 teatime thx to the bloggers; as I browse through perl6 blogs the names are mostly users here :)
12:51 * teatime tips hat toward ZoffixW
12:52 ribasushi joined #perl6
12:53 ZoffixW 🎩
13:09 dalek ecosystem: 1207bc8 | RabidGravy++ | META.list:
13:09 dalek ecosystem: Move the Audio::PortMIDI to noise gang
13:09 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/1207bc8bc1
13:09 dalek ecosystem: 2e0b1b6 | peschwa++ | META.list:
13:09 dalek ecosystem: Move Music::Helpers to noise gang
13:09 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/2e0b1b6d38
13:09 dalek ecosystem: 7a0cf1e | RabidGravy++ | META.list:
13:09 dalek ecosystem: Move Audio::PortAudio to noise gang
13:09 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/7a0cf1e85f
13:09 dalek ecosystem: c9aa28f | RabidGravy++ | /:
13:09 dalek ecosystem: Merge branch 'master' of github.com:perl6/ecosystem
13:09 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/c9aa28fa51
13:09 RabidGravy booh
13:11 lizmat commute to Amsterdam.PM meeting&
13:13 pmurias joined #perl6
13:23 pmurias hmmm, is there a way in nqp to get a unique identifier for a WVal?
13:24 pmurias I want to turn $!attr into this.some_unique_identifier_$!attr
13:25 jnthn Well, it's not the WVal but rather the object it references?
13:25 pmurias yes
13:26 jnthn nqp::objectid won't do it 'cus those identifiers don't survive pre-comp
13:26 rurban1 joined #perl6
13:26 jnthn Any reason not to go with the hint index?
13:27 * pmurias looks that up
13:27 * grondilu gladly notice that his Clifford module could solve http://rosettacode.org/wiki/​Polynomial_regression#Perl_6 in about five minutes on a VirtualBox machine :)
13:27 jnthn nqp::hintfor iirc
13:30 ZoffixW joined #perl6
13:31 rurban joined #perl6
13:32 llfourn m: .{;} # make rakudo go crazy in four characters
13:32 camelia rakudo-moar ec6c3b: OUTPUT«Non-QAST node visited BOOTInt␤Weird node visited: BOOTInt␤===SORRY!===␤Unknown QAST node type BOOTInt␤»
13:33 pmurias jnthn: it's nqp::hintfor on the MoarVM and nqp::attrhintfor on the jvm
13:34 llfourn does anyone know why postcircumfix:sym<{ }> is like "'{' ~ '}' [ <.ws> <semilist> ]". Why is it a semilist rather than a EXPR?
13:35 pmurias jnthn: it seems to be exactly what I need
13:35 jnthn Slicing
13:35 llfourn jnthn: ah.
13:35 jnthn Though not sure it works out too well on hashes just yet
13:36 llfourn yep makes sense now. I've never used it before but have seen it :)
13:41 ZoffixW ... and there goes the first casualty of my installing both perls on my linode box :P
13:41 ZoffixW re-
13:43 pmurias ZoffixW: what happened?
13:44 ZoffixW Bot dead :) I'm just updating Perl 6 and then I realized I need to recompile Perl 5. So I did that and now I'm installing a gazillion of modules :)
13:48 rurban1 joined #perl6
13:48 rurban2 joined #perl6
13:49 rurban3 joined #perl6
13:52 timotimo ZoffixW: you didn't even mention in your blog post about traits that you can "is rw" the invocant of a method :)
13:52 rurban joined #perl6
13:52 rurban left #perl6
13:52 vaisian joined #perl6
13:52 huggable joined #perl6
13:53 cdg joined #perl6
13:54 ZoffixW That sounds like Bad Idea™
13:54 ZoffixW huggable, int
13:54 huggable ZoffixW, class int [Integer (native storage; machine precision)]: http://doc.perl6.org/type/nativeInt
13:55 timotimo it's not a bad idea
13:55 llfourn what does is rw the invocant of a method mean?
13:55 huggable joined #perl6
13:55 timotimo you can only call the method if the object is stored in a container
13:55 timotimo in a writable container
13:55 timotimo and inside the method you can assign to "self" or whatever you've called the invocant
13:55 timotimo substr-rw works that way
13:55 llfourn oh right. Cool didn't know that. timotimo++
13:56 ZoffixW timotimo, you should comment that on the post :)
14:01 ZoffixW My hope of my web app speed improving when running on Linode instead of my ancient 32bin laptop has dashed :(
14:01 ZoffixW time curl -s http://perl6.party:3000/;     real0m10.180s
14:02 timotimo well, do you cache parsed templates now?
14:02 timotimo or do you still slurp, parse, eval every time something needs to get rendered?
14:02 timotimo at least we have the eval memory leak figured out by now
14:02 ZoffixW No, I didn't do any changes since last night... Wouldn't the that just slowly eat up all my RAM?
14:03 timotimo what?
14:03 domidumont joined #perl6
14:03 ZoffixW If I cache everything, wouldn't that use more and more memory, the more articles I write
14:03 timotimo no, just cache the code object that's the result of parsing the template itself
14:03 timotimo don't cache the result of rendering the template
14:03 timotimo there's http caches for that
14:04 timotimo like varnish or something
14:04 ZoffixW Can't do that because of layouts
14:04 ZoffixW Every blog post is a new "code object" really
14:04 timotimo why? just make the layout that's used a parameter for teh cache
14:06 timotimo the .tt file doesn't change, after all
14:06 firstdayonthejob joined #perl6
14:07 ZoffixW OK, I see what you mean. I'll try that. Thanks, timotimo++
14:08 timotimo you can't expect it to be very fast if you EVAL two or three times for every http request :)
14:08 ZoffixW Well. Don't think it'll work with current ::Extended because the template to parse is constructed on each request: https://github.com/zoffixznet/perl6-Baila​dor-Template-Mojo-Extended/blob/master/li​b/Bailador/Template/Mojo/Extended.pm6#L42
14:08 timotimo quite frankly, that's terrible :) :)
14:09 ZoffixW I need to get rid of the variables and use a sub, like stash('whatever') instead
14:09 moritz or parse $foo into stash('foo')
14:10 moritz or
14:10 moritz parse it into a sub (:$foo) { return "bla bla $foo" }
14:10 moritz s/parse/compile/
14:10 moritz then you can cache the sub
14:10 moritz and call it for each request
14:11 khw joined #perl6
14:14 * RabidGravy wonders why his laptop has php installled on it
14:15 llfourn in case you need access to it when you've forgotten your password
14:15 stmuk llfourn++
14:16 ZoffixW haha llfourn++
14:16 tharkun joined #perl6
14:17 RabidGravy :)
14:18 skids joined #perl6
14:18 ZoffixW time curl -s http://perl6.party:3000/; real0m0.379s
14:18 ZoffixW :D
14:19 ZoffixW Loading it in the browser is still slow though. Looks like my ::Static plugin with all the slurping is slow as hell too :/
14:19 ZoffixW I guess that's due to no asynchrony
14:19 llfourn it's pretty fast for me :)
14:20 RabidGravy Hmm opam is weird, it has separate update and upgrade steps
14:21 ZoffixW ROFL. Funniest HTTP header I've seen: X-Hello-Human: You should work for us! Email: jdorfman+theheader@maxcdn.com or @MaxCDNDeveloper on Twitter
14:21 moritz ZoffixW: expose it through an Apache or nginx reverse proxy, and use that to serve static files
14:21 ZoffixW That's one way to do it, yeah
14:30 RabidGravy okay opam is definitely weird
14:30 stmuk is there a single line perl 6 web server yet?
14:31 RabidGravy if it fails in an upgrade then it just leaves the things it removed removed
14:31 stmuk that's the only thing I use python for :)
14:31 RabidGravy stmuk, depends on how wide your terminal is
14:32 stmuk 80 columns like $deity intended :P
14:34 cosimo ZoffixW: then you haven't seen vg.no
14:36 sortiz joined #perl6
14:39 ZoffixW m: say q|perl6 -e 'react {whenever IO::Socket::Async.listen("localhost",3333) -> $c { whenever $c.Supply(:bin) -> $b {await $c.write: "404 Not Found".encode}}}'|.chars
14:39 camelia rakudo-moar ec6c3b: OUTPUT«151␤»
14:39 ZoffixW dammit
14:43 RabidGravy it's alright, I can fit 175 columns on this screen ;-)  We're all about putting the smack down on tradition around here
14:46 ZoffixW m: "uggc://jjj.it.ab/ynxfrgngg.ugzy".comb.map({ my $ord = .ord; say .ord; (not $ord > "a".ord and $ord < "z".ord) ?? $_ !! $ord - 13 > "a".ord ?? ($ord - 13).chr !! ($ord + 13).chr}).join.say
14:46 camelia rakudo-moar ec6c3b: OUTPUT«117␤103␤103␤99␤58␤47␤47␤106␤106␤10​6␤46␤105␤116␤46␤97␤98␤47␤121␤110␤120␤102␤​114␤103␤110␤103␤103␤46␤117␤103␤122␤121␤http://www.vg.ao/l{kset{tt.html␤»
14:46 ZoffixW huh
14:46 ZoffixW Way to look a l33t haxor, Zoffix, but copy-pasting the wrong variant and losing the right noe
14:47 ZoffixW Oh, nm, there's a buglet
14:50 moritz m: "uggc://jjj.it.ab/ynxfrgngg.ugzy".trans('a-z', 'n-za-m')
14:50 camelia rakudo-moar ec6c3b: OUTPUT«Only Pair objects are allowed as arguments to Str.trans, got Str␤  in block <unit> at /tmp/uH3QpWPECr line 1␤␤»
14:50 moritz m: "uggc://jjj.it.ab/ynxfrgngg.ugzy".trans('a-z' => 'n-za-m')
14:50 camelia rakudo-moar ec6c3b: ( no output )
14:50 moritz m: say "uggc://jjj.it.ab/ynxfrgngg.ugzy".trans('a-z' => 'n-za-m')
14:50 camelia rakudo-moar ec6c3b: OUTPUT«uggc://jjj.it.nb/ynxfrgngg.ugzy␤»
14:51 moritz m: say "uggc://jjj.it.ab/ynxfrgngg.ugzy".trans('a..z' => 'n..za..m')
14:51 camelia rakudo-moar ec6c3b: OUTPUT«http://www.vg.no/laksetatt.html␤»
14:51 ZoffixW :o
14:51 ZoffixW Yeah, mine had an off-by-one. > and < instead of >= and <=
14:51 ZoffixW cosimo, that page is blank tho.. does the puzzle continue elsewhere? :)
14:51 cosimo ZoffixW: look harder
14:52 ZoffixW K, I will :D
14:52 ZoffixW Found it :D This is fun! \o/
14:53 ptolemarch joined #perl6
14:54 ZoffixW Heh, well, I got to here, but I guess this is a test for whether you can speak Danish :P http://www.vg.no/opswork/
14:54 sufrostico joined #perl6
14:55 moritz "Heisann du, har du lyst til å jobbe i VG?"
14:55 moritz ZoffixW: Norwegian, actually :-)
14:55 psch ...also the ticket on the right of course
14:55 moritz "Hey there, would you like to work for VG?"
14:56 psch err, ticker :)
14:56 ZoffixW Did I just get rickrolled by an HTTP header? :o
14:57 psch and it even made you *work* for it :P
14:57 ZoffixW :P
14:58 mohae joined #perl6
15:01 moritz .oO( ricktrolled )
15:02 jnthn .oO( more like rickcruited, no? :) )
15:02 moritz rickcruited.no
15:05 marcusramberg joined #perl6
15:06 prammer joined #perl6
15:08 cosimo :)
15:18 lichtkind__ joined #perl6
15:24 stmuk http://pl6anet.org/drop/rakudo-st​ar-2016.04-x86_64%20(JIT)-RC0.msi
15:29 prammer joined #perl6
15:29 skids joined #perl6
15:32 masak good prevening, #perl6
15:34 teatime masak: I have been reading your blog for hours
15:34 teatime ... I think this is yours
15:34 diakopter____ joined #perl6
15:34 teatime ah, yup, definitely.
15:35 diakopter____ ... when the National Science Foundation uses an xkcd cartoon to estimate the storage capacity of Google's data center
15:36 diakopter____ http://www.nap.edu/download.php?record_id=21886
15:36 diakopter____ Anyway
15:38 masak teatime: for hours? maybe you should take a short break... ;)
15:39 dupek joined #perl6
15:39 dupek hi
15:39 teatime masak: lol.  it's been quite intermittant.
15:40 teatime it's very interesting, you really know your stuf
15:40 teatime s/$/f/
15:40 masak I really don't... :P
15:40 masak but thanks
15:42 * RabidGravy wonders why Audio::Libshout intermittently fails 1 test on attempting to connect
15:45 RabidGravy wonder if icecast takes time to "warm up" if it get swapped out
15:47 vaisian joined #perl6
15:55 dupek hi
15:55 dupek ?
15:56 psch hi dupek :)
15:57 dupek how can I help your Linux
15:58 dupek I want to be involved
15:58 rurban joined #perl6
15:59 pmurias joined #perl6
15:59 psch dupek: http://rakudo.org/how-to-help/ is an overview how you can help
16:00 dupek thank you my friend
16:00 molaf joined #perl6
16:04 tharkun joined #perl6
16:11 rurban1 joined #perl6
16:12 rurban2 joined #perl6
16:12 milwaukee joined #perl6
16:13 wamba joined #perl6
16:17 Xliff_ diakopter____, What xkcd cartoon was that?
16:22 sue joined #perl6
16:31 masak dupek: welcome!
16:37 CIAvash joined #perl6
16:39 RabidGravy somebody be a love and make an ssh client library
16:41 ZoffixW joined #perl6
16:41 ZoffixW stmuk, panda install is broken
16:41 sortiz RabidGravy, What is the status of openssl bindings?
16:42 ilmari NativeCall + libssh2?
16:42 ZoffixW Umm. wtf is it using M:/ drive for install -_-
16:42 lostinfog joined #perl6
16:43 ZoffixW stmuk, full error. M: drive is a network mount; it should never have even touched that drive in the first place. https://gist.github.com/zoffixznet​/0ee7e9009efb37755720a1420dec3ecf
16:43 RabidGravy ilmari, so you can have that done by the time I've done this other thing?
16:43 ilmari RabidGravy: hawhahaaa
16:44 RabidGravy sortiz, well it works for https :)
16:45 prammer joined #perl6
16:45 sortiz RabidGravy, thanks.
16:47 ZoffixW stmuk, don't know if it's possible, but the installer should probably check whether paths are already in PATH before adding them. I have C:\rakudo\bin listed thrice.
16:48 ZoffixW Actually, looks like whole bunch of unrelated dirs in my PATH have been duplicated. I've no idea how long it's been like that.
16:49 prammer joined #perl6
16:49 psch maybe %PATH%=%PATH%;C:\new\addition a few times?
16:49 ZoffixW Perhaps. I don't recall doing that myself though. But I have a ton of stuff that could've done that on this box :/
16:50 ZoffixW And FWIW, the M: drive also got .cpan and .cpanm on it somehow... I guess this is a computer equivalent of flies and manure...
16:50 ZoffixW Maybe that's why it's called M:
16:52 prammer joined #perl6
16:53 ZoffixW Ah, I see "HOMEDRIVE => M" in settings...  Better not mess with it then
16:55 ZoffixW But... can't use panda. "Failed to delete" error, even though I can go in and manually delete the file.
16:55 * ZoffixW stops the monologue :P
16:56 stmuk ZoffixW: its probably because the wix installer doesnt seem to have a proper uninstaller
16:56 RabidGravy think of it more as a soliloquy
16:56 stmuk ZoffixW: did it work for basic perl6 commands
16:57 ZoffixW Yup. I can run perl6 -v and get correct version.
16:57 RabidGravy I'm bored with bootstrap, I think I'm going to try Foundation for a while
16:58 stmuk ZoffixW: hmm I'll going to spin up a clean VM to double check I think
16:58 atweiden joined #perl6
16:58 ZoffixW I love that Foundation's website is pretty broken in my browser :)
17:00 RabidGravy :)
17:00 stmuk not sure why it uses M:/ I'd assumed it was hard coded to C:\
17:00 dalek specs: 5ce9cab | titsuki++ | html/index.html:
17:00 dalek specs: Fix a site search function
17:00 dalek specs: review: https://github.com/perl6/specs/commit/5ce9cab30d
17:00 dalek specs: 1c7f86e | titsuki++ | html/index.html:
17:00 dalek specs: Merge pull request #109 from titsuki/fix-sitesearch-function
17:00 dalek specs:
17:00 dalek specs: Fix a site search function
17:00 dalek specs: review: https://github.com/perl6/specs/commit/1c7f86efdd
17:01 stmuk ZoffixW: so panda was broken
17:03 ZoffixW Well, I wouldn't exactly say that. It makes sense that it should use the OS's "HOMEDRIVE", but why it can't delete from it is a puzzle
17:05 domidumont joined #perl6
17:06 grondilu m: my $i = 0; given -> { $i } { say .(); $i = 1; say .() }
17:06 camelia rakudo-moar ec6c3b: OUTPUT«0␤1␤»
17:06 grondilu m: my $i = 0; given -> { +$i } { say .(); $i = 1; say .() }
17:06 camelia rakudo-moar ec6c3b: OUTPUT«0␤1␤»
17:06 atweiden does anyone know of an alternative to the `my @.entries` aspect of `class TXN::Parser::Actions { my @.entries }` ?
17:06 grondilu m: my $i = 0; given -> { 0+$i } { say .(); $i = 1; say .() }
17:06 camelia rakudo-moar ec6c3b: OUTPUT«0␤1␤»
17:06 atweiden my @.entries works, but it mucks things up when you want to instantiate multiple independent Actions classes
17:06 ugexe try running the command from M:\ itself
17:06 ugexe it may be using a relative path somewhere and your current volume gets tacked on
17:06 grondilu how do I "unclose" a variable in a closure?
17:06 lizmat joined #perl6
17:07 grondilu m: my $i = 0; given -> { $i**1 } { say .(); $i = 1; say .() }
17:07 camelia rakudo-moar ec6c3b: OUTPUT«0␤1␤»
17:07 grondilu m: my $i = 0; given EVAL '-> { $i }' { say .(); $i = 1; say .() }
17:07 camelia rakudo-moar ec6c3b: OUTPUT«0␤1␤»
17:08 ZoffixW atweiden, mucks up how?
17:08 grondilu m: my $i = 0; given EVAL '-> {'~$i~' }' { say .(); $i = 1; say .() }
17:08 camelia rakudo-moar ec6c3b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/eH9vi17iuS␤EVAL is a very dangerous function!!! (use MONKEY-SEE-NO-EVAL to override,␤but only if you're VERY sure your data contains no injection attacks)␤at /tmp/eH9vi17iuS:1␤------> 3my $i = 0; given…»
17:08 ZoffixW atweiden, just $.entires will probably work too
17:08 psch atweiden: "has" vs "my"
17:08 grondilu m: use MONKEY-SEE-NO-EVAL; my $i = 0; given EVAL '-> {'~$i~' }' { say .(); $i = 1; say .() }
17:08 camelia rakudo-moar ec6c3b: OUTPUT«0␤0␤»
17:08 ZoffixW Ah right
17:08 grondilu ^can I do that without a EVAL?
17:08 rurban joined #perl6
17:08 mcsnolte joined #perl6
17:09 sue left #perl6
17:09 atweiden ZoffixW: inside a *.t test file, it prevents me from parsing different files. i would have to separate them out
17:09 atweiden for users it could get aggravating
17:09 ZoffixW atweiden, you should use `has` not `my` for attributes
17:10 atweiden ZoffixW: tried that. trouble is i'm recursively instantiating the Actions class from within the Actions class
17:10 atweiden this is the first way i've found to extract all the data
17:10 grondilu m: my $i = 0; given -> $i { -> { $i } }($i) { say .(); $i = 1; say .() }
17:10 camelia rakudo-moar ec6c3b: OUTPUT«0␤0␤»
17:12 ZoffixW Fails the same if I run on M: drive too
17:12 atweiden e.g. this line: `push TXN::Parser::Actions.entries, %(:id(%entry-id), :header($<header>.made), :@postings)`
17:13 ZoffixW m: class Foo { my @.actions }; say Foo.new(:actions<foo bar ber>).actions
17:13 camelia rakudo-moar ec6c3b: OUTPUT«[]␤»
17:14 ZoffixW What does that construct even do? Create an attribute that can't be initialized via .new?
17:14 psch ZoffixW: it's a class variable
17:14 atweiden the only other grammar i've seen do something similar is =https://github.com/dnmfarrell/Pod-PerlTricks
17:14 psch ZoffixW: local to the scope of the class, not any given object
17:14 atweiden (for the include block)
17:15 ugexe m: role Foo { my @.bar = 1; }; class XXX does Foo { }; say Foo.new.bar
17:15 camelia rakudo-moar ec6c3b: OUTPUT«[1]␤»
17:15 ZoffixW m: class Foo { has @.actions }; my $f = Foo.new; my $z = Foo.new; $f.actions = <foo bar ber>; say $z.actions;
17:15 camelia rakudo-moar ec6c3b: OUTPUT«[]␤»
17:15 ZoffixW m: class Foo { has @.actions }; my $f = Foo.new; my $z = Foo.new; $f.actions = <foo bar ber>; say $f.actions;
17:15 camelia rakudo-moar ec6c3b: OUTPUT«[foo bar ber]␤»
17:16 ZoffixW psch, but what's with the twigil? And the above tells me it's per-instance.
17:16 _mg_ joined #perl6
17:16 psch ZoffixW: that above is 'has' :)
17:16 psch m: class Foo { my @.actions;  }; my $f = Foo.new; my $z = Foo.new; $f.actions = <foo bar ber>; say $z.actions;
17:16 camelia rakudo-moar ec6c3b: OUTPUT«[foo bar ber]␤»
17:16 ZoffixW >_<
17:16 ZoffixW I need to take a break lol
17:17 psch the .-twigil just means "generate an accessor"
17:17 ZoffixW K, so my with a twigil makes a class variable and.... yeah that :)
17:17 psch m: class Foo { my @.actions; method actions is rw { @!actions } };
17:17 camelia rakudo-moar ec6c3b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/A0xcxMw52o␤Package 'Foo' already has a method 'actions' (did you mean to declare a multi-method?)␤at /tmp/A0xcxMw52o:1␤»
17:17 psch ^^^ :)
17:17 ZoffixW m: class Foo { has @.actions; method actions is rw { @!actions } };
17:17 camelia rakudo-moar ec6c3b: ( no output )
17:17 ZoffixW Why doesn't this give an error?
17:18 masak because sometimes you want to override the default accessor
17:18 masak it's quite common
17:18 ZoffixW Why does it give an error for my @.actions? :)
17:18 grondilu m: multi infix:<+>(&f, &g) { -> |c { f(|c) + g(|c) } }; say (&abs + &sqrt)(pi);  # I wonder if that is efficient
17:18 camelia rakudo-moar ec6c3b: OUTPUT«4.91404650449531␤»
17:18 ugexe i never thought to do it like that, i always used a method
17:18 sufrostico joined #perl6
17:18 masak ZoffixW: because the only reason to put the dot there would be to actually want the default accessor
17:19 ZoffixW masak++ makes sense. Thanks.
17:19 masak also, for the record, moritz++ doesn't like the `my $.attr;` form of declaration :)
17:20 atweiden there's also `our $.attr`
17:20 ZoffixW m: class Foo { has @actions; method actions is rw { @actions } }; my $f = Foo.new; my $z = Foo.new; $f.actions = <foo bar ber>;  say $z.actions;
17:20 camelia rakudo-moar ec6c3b: OUTPUT«[]␤»
17:20 atweiden couldn't tell the difference
17:20 jnthn lexical vs package scope
17:21 ZoffixW Seems the same argument can be made for `has`, no? Only put a dot, if you need a default accessor then?
17:21 masak m: class C { our $.foo = 42 }; say C.new.foo; say C::foo
17:21 camelia rakudo-moar ec6c3b: OUTPUT«42␤Could not find symbol '&foo'␤  in block <unit> at /tmp/_Pabb7eu0K line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/_Pabb7eu0K line 1␤␤»
17:21 masak m: class C { our $.foo = 42 }; say C.new.foo; say $C::foo
17:21 camelia rakudo-moar ec6c3b: OUTPUT«42␤(Any)␤»
17:22 masak hm. didn't expect that :)
17:22 masak ZoffixW: I would advise never using the `has @actions` form.
17:22 masak ZoffixW: it's confusing. better to be explicit and write `has @!actions`
17:22 masak if that's what you mean
17:23 grondilu what would you think about making things like &f + &g work?  I mean about doing it in the core?
17:23 ZoffixW k
17:23 masak ZoffixW: according to TimToady++ the `has @actions` form is a sop to people who don't like twigils. but you're OK with twigils :)
17:23 jnthn ZoffixW: Well, except that the `.` in `has $.foo` also implies being able to have it auto-set in the constructor, and show up in the .perl
17:23 masak grondilu: I would be very much against it
17:24 psch if anything o could be a meta op
17:24 grondilu we have o already
17:24 psch well, except that's semantically a bit away
17:24 jnthn Whereas for the my/our case it does nothing but create the method
17:24 psch grondilu: right, but i'm thinking e.g. &f o[+] &g
17:25 grondilu I'm not sure what that means
17:25 psch but as mentioned, it's semantically not quite the same
17:25 grondilu m: say &abs o[+] &sqrt
17:25 camelia rakudo-moar ec6c3b: OUTPUT«Cannot call Numeric(Sub+{<anon|46945008>}: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/mlAFHrWKlx line 1␤␤»
17:25 sftp joined #perl6
17:25 psch m: say (1,2) Z+ (3,4)
17:25 camelia rakudo-moar ec6c3b: OUTPUT«(4 6)␤»
17:25 psch in that sense
17:25 psch Z is a metaop to + there
17:25 psch and o would be a metaop to + in my previous example
17:26 psch ...but still, it's probably not close enough to the actual meaning of o
17:26 masak psch: I also don't know what that'd mean
17:27 grondilu now if I wanted to make a module about multi candidates of algebraic operations for functions, how could I call it?
17:27 psch well, the original question was about (&f + &g)($x) meaning &f($x) + &g($x), no?
17:27 ZoffixW m: my &abs-sqrt = &sqrt ∘ &abs; say abs-sqrt -4
17:27 camelia rakudo-moar ec6c3b: OUTPUT«2␤»
17:27 ZoffixW Neat \o/
17:28 psch and i had (not) thought (enough about it and thus) proposed o as metaop to do that
17:28 prammer joined #perl6
17:28 psch err
17:28 psch (1) i had thought o as metaop could do that
17:28 grondilu multi infix:<+>(&f, &g) { -> |c { f(c) + g(c) } }  # is what I'm thinking of
17:28 psch (2) i thought more about it and realized it doesn't mean the same as o
17:28 masak grondilu: completely fine outside of core, in someone's lexical scope
17:28 psch and, really, isn't even close enough to could be allowed to mean that... :)
17:29 grondilu what about "AlgebraicSubs" as a name?
17:29 grondilu (sounds dumb)
17:29 masak grondilu: FunctionAddition :)
17:30 grondilu it would not just be for addition
17:30 grondilu but all arithmetics
17:30 grondilu "FunctionArithmetics" I guess
17:30 grondilu what a mouthful though
17:30 rurban left #perl6
17:31 psch m: say [+] .abs, .sqrt given pi
17:31 camelia rakudo-moar ec6c3b: OUTPUT«4.91404650449531␤»
17:32 grondilu that's why I which so many things were in the core, so I would not have to type "use 'silly-and-hard-to-remember-name';"
17:32 ZoffixW m: say [+] [(pi)] &abs, &sqrt
17:32 camelia rakudo-moar ec6c3b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/T9FvfE1GSl␤Unsupported use of bare "abs"; in Perl 6 please use .abs if you meant $_, or use an explicit invocant or argument, or use &abs to refer to the function as a noun␤at /tmp/T9FvfE1GSl:1␤------> 3…»
17:32 psch ...
17:32 ZoffixW psch++
17:32 grondilu maybe:  use ExtraArithmetics :functions;
17:36 grondilu FYI I'm considering something like that for my Clifford module in order to generate code without using EVAL
17:37 peteretep joined #perl6
17:37 * RabidGravy concludes that all "web front end frameworks" are a bunch of poo
17:38 psch m: say [+] (&abs, &sqrt)>>.(pi)
17:38 camelia rakudo-moar ec6c3b: OUTPUT«4.91404650449531␤»
17:38 Spot__ joined #perl6
17:39 notbenh_ joined #perl6
17:39 masak RabidGravy: I wouldn't go that far.
17:40 ggherdov joined #perl6
17:40 RabidGravy it's a working generalization until I find one that I can use
17:41 grondilu .oO( use SubArithmetics; )
17:42 grondilu .oO( that would exclude Blocks though )
17:42 grondilu .oO( use CodeArithmetics; )
17:45 grondilu m: multi infix:<+>(Code $f, Code $g) { -> |c { $f(|c) + $g(|c) } }; say (&abs + &sqrt)(pi);
17:45 camelia rakudo-moar ec6c3b: OUTPUT«4.91404650449531␤»
17:46 masak I found the other day that `leave` is still unimplemented in Rakudo. can't say I miss `leave` at all.
17:46 masak I guess what I'm saying is that if someone were to un-spec `leave`, then I wouldn't be bothered ;)
17:47 masak (though I've always liked the "bequeath to successor" line)
17:48 perlpilot masak:  just the sub form is NYI?  or both the method and sub forms?
17:49 masak m: my &b = { &b.leave }; b()
17:49 camelia rakudo-moar ec6c3b: OUTPUT«Method 'leave' not found for invocant of class 'Block'␤  in block <unit> at /tmp/vk9rL9S2F0 line 1␤␤»
17:50 masak um. is that how you'd use the method form? :)
17:53 psch ...i'm not sure i even understand what leave does o.O
17:53 psch it return from somewhere higher in the callstack?
17:53 psch *returns
17:53 timotimo that's what, yeah
17:53 masak in its simplest form, it returns from the block you're in
17:54 masak like `if 1 { leave; say "A" }; say "B"` would print just "B\n"
17:54 perlpilot psch: S04:1177
17:54 synopsebot6 Link: http://design.perl6.org/S04.html#line_1177
17:54 dalek doc: 1817f26 | titsuki++ | doc/Language/faq.pod:
17:54 dalek doc: Add an OpaquePointer section to the FAQ page
17:54 dalek doc: review: https://github.com/perl6/doc/commit/1817f26973
17:54 dalek doc: 927baef | titsuki++ | doc/Language/faq.pod:
17:54 dalek doc: Merge pull request #490 from titsuki/add-opaquepointer-faq
17:54 dalek doc:
17:54 dalek doc: Add an OpaquePointer section to the FAQ page
17:54 dalek doc: review: https://github.com/perl6/doc/commit/927baefab0
17:54 prammer joined #perl6
17:55 psch perlpilot: yeah, that's where i went
17:55 psch probably mostly hard to think of a use-case which stumped me there for a moment
17:55 psch ...i think i'm having a bad grammar day :P
17:56 perlpilot masak: if leave stays, your 2 lines above should be in the documentation somewhere :)
17:56 masak `leave` is the `return` for blocks
17:57 timotimo right, return will be transparent to blocks, but leave won't be
17:57 masak though I personally think it's more interesting that it's not a feature anyone seems to miss :>
17:57 masak I don't know of a real-world use case for it
17:58 psch it feels like a end-of-block scoped goto to me
17:58 perlpilot As soon as someone needs to exit a block early and has to restructure their code because there is no leave ... someone will want it.
17:58 timotimo aye
17:58 timotimo or they'll end up turning it into a sub instead
17:58 psch as in, has similar application as goto for e.g. error handling
17:59 timotimo we also don't have a lot of goto yet
17:59 psch in C that is
17:59 perlpilot masak: there may even be people right now that are just structuring their code differently because there is no leave implemented
17:59 masak I remain unconvinced that that's a bad thing ;)
17:59 * psch wonders if that translates to macros
17:59 masak ...no
17:59 timotimo masacros are a good feature to have
18:00 perlpilot masak: yeah, it's weak argument for keeping leave
18:01 perlpilot no one is clamoring for goto either, are they?
18:01 prammer joined #perl6
18:01 psch i remember one person coming in here a few times and asking about goto, maybe a year ago..?
18:01 psch so, pretty much "no, they aren't"
18:01 timotimo i've gotten used to not having goto, but it's annoying sometimes
18:01 grondilu m: multi infix:<+>(Code $f, Code $g) { -> |c { $f(|c) + $g(|c) } }; multi infix:<*>(Numeric $z, Block $f) { -> |c { $z*$f(|c) } }; say (&cos + 1i*&sin)(pi);
18:01 camelia rakudo-moar ec6c3b: OUTPUT«-1+1.22464679914735e-16i␤»
18:02 * grondilu internally roll eyes at Complex behing stuck to floating points
18:02 ZoffixW joined #perl6
18:03 ZoffixW I would love to have leave. Returning from code blocks is good
18:03 * grondilu agrees
18:03 ZoffixW Does it return the value? If yes, then even a few hours ago I could've used it in a map {} block
18:04 timotimo yeah, it returns the value
18:05 ZoffixW m: say ^10 .map: { $_ %% 2 and leave; .sqrt }
18:05 camelia rakudo-moar ec6c3b: OUTPUT«leave not yet implemented. Sorry. ␤  in block <unit> at /tmp/R7qnwEfdas line 1␤␤»
18:05 ZoffixW m: say ^10 .map: sub { $^a %% 2 and return $^a; $^a.sqrt }
18:05 camelia rakudo-moar ec6c3b: OUTPUT«(0 1 2 1.73205080756888 4 2.23606797749979 6 2.64575131106459 8 3)␤»
18:06 ZoffixW m: sub { $_ = 42; .return }().say
18:06 camelia rakudo-moar ec6c3b: OUTPUT«42␤»
18:06 skids I'm sure I've tried to use leave and had to do ugly things to work around it not being there, but cannot remember where.
18:06 ZoffixW :o
18:06 masak grondilu: if we could parameterize Complex, we could have Complex[Complex], and we'd get hypercomplex numbers for free! :P
18:06 ZoffixW .return is not documented
18:07 atweiden m: class ABC { has $.a; class DEF { method set-a() { $!a = 2 } } }
18:07 camelia rakudo-moar ec6c3b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/CUEFcjabZ2␤Attribute $!a not declared in class ABC::DEF␤at /tmp/CUEFcjabZ2:1␤------> 3class DEF { method set-a() { $!a = 2 } }7⏏5 }␤    expecting any of:␤        horizontal whitespace␤        …»
18:07 atweiden is it possible to access ABC.a from DEF?
18:07 skids I chafe more about $loop-return-value.last being missing TBH.
18:07 _mg_ joined #perl6
18:08 perlpilot atweiden: not without an instance
18:08 ZoffixW Oh, heh, none of the returns documented :P
18:08 grondilu masak: don't tempt me into suggesting getting rid of Complex alltogether and put a Clifford algebra instead.
18:08 perlpilot ZoffixW: at least they're implemented! :)
18:08 ZoffixW :)
18:09 prammer joined #perl6
18:10 grondilu If I ever manage to make my Clifford module performant I'll totally harass you guys to put it in the core.
18:12 grondilu - do your language support complex numbers?  - complex numbers?  Pff.  We have full Clifford algebra support in the core.
18:13 grondilu (that'd be pretty cool)
18:13 * ZoffixW has no idea wtf Clifford algebra is :P
18:13 timotimo was clifford the name of the dood who found the 4-part number arithmetic?
18:14 grondilu oh I thought you guys all knew about it since I've learnt about it with a HN post you were discussing here.  Few months ago (maybe a year)
18:14 * psch misread "dood" as "dog" and got confused
18:14 timotimo not arithmetic, algebra
18:14 timotimo sorry
18:14 ZoffixW m: goto end; end (); end: say end( end () )
18:14 camelia rakudo-moar ec6c3b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/noQEdmt4AN␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/noQEdmt4AN:1␤------> 3goto end; end (); end: say end( end7⏏5 () )␤    expecting any of:␤        infix␤ …»
18:14 ZoffixW weird error, no?
18:14 masak timotimo: no, that was William Hamilton
18:15 masak timotimo: he carved it into a bridge.
18:15 [Coke] ZoffixW: there is already a ticket about goto, labels, and names.
18:15 ZoffixW Cool.
18:17 ZoffixW m: say end ( ) and end end end ( ) and end end + end ( )
18:17 camelia rakudo-moar ec6c3b: OUTPUT«-1␤»
18:17 Actualeyes left #perl6
18:17 ZoffixW ^_^
18:18 [Coke] m: say and and and or and.
18:18 camelia rakudo-moar ec6c3b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/NM62oR8lvJ␤Malformed postfix call␤at /tmp/NM62oR8lvJ:1␤------> 3say and and and or and.7⏏5<EOL>␤»
18:18 [Coke] m: say and and and or and
18:18 camelia rakudo-moar ec6c3b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/c6aEZgfhYg␤Undeclared routines:␤    and used at line 1. Did you mean 'rand', 'any', 'end'?␤    or used at line 1␤␤»
18:18 * [Coke] stops before he goes off the rails. :)
18:19 * masak .oO( Did you mean 'Ayn Rand'? )
18:19 moritz she should have been called "rant", really :-)
18:19 El_Che ahaha
18:19 grondilu m: use Test; is-approx 2+1e-16, 2;
18:19 camelia rakudo-moar ec6c3b: OUTPUT«Absolute tolerance must be a positive number greater than zero␤  in sub is-approx at /home/camelia/rakudo-m-inst-1/share/perl6/sou​rces/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 251␤  in block <unit> at /tmp/GdYM4lm9FH line 1␤␤»
18:19 grondilu ^shouldn't that work?
18:20 grondilu m: use Test; is-approx 2+1e-16, 2, "about two";
18:20 camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - about two␤»
18:20 ZoffixW grondilu, desc is not optional because it also takes tolerance IIRC
18:20 ZoffixW m: use Test; is-approx 2, 4, "about two", 10
18:20 camelia rakudo-moar ec6c3b: OUTPUT«Cannot call is-approx(Int, Int, Str, Int); none of these signatures match:␤    (Numeric $got, Numeric $expected, $desc = "")␤    (Numeric $got, Numeric $expected, Numeric $tol, $desc = "")␤    (Numeric $got, Numeric $expected, Numeric :$rel_tol = 1e-…»
18:21 ZoffixW Oh
18:21 perlpilot yeah, is-approx is a little wonky
18:21 perlpilot it needs some love
18:22 pomJ joined #perl6
18:22 perlpilot m: use Test;  ok 2+1e-16 ≅ 2;
18:22 camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - ␤»
18:22 perlpilot m: use Test;  ok 2+1e-16 =~= 2;  # Texas
18:22 camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - ␤»
18:23 grondilu here we go, new module:  https://github.com/grondilu/block-algebra
18:23 ZoffixW m: use Test; is-approx 2+1e-16, 2, 1e-6, "about two";
18:23 camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - about two␤»
18:23 ZoffixW That's so weird. That's literally the call for is approx $given, $wanted;
18:23 ZoffixW Well, almost literally :P
18:24 psch m: use Test; is-approx 2+1e-16, 2, :abs_tol(1e-10)
18:24 camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - ␤»
18:24 psch m: use Test; say &is-approx.candidates>>.signature[1,2]
18:24 camelia rakudo-moar ec6c3b: OUTPUT«((Numeric $got, Numeric $expected, Numeric $tol, $desc = "") (Numeric $got, Numeric $expected, Numeric :$rel_tol = 1e-06, Numeric :$abs_tol = 0, :$desc = ""))␤»
18:24 psch m: use Test; is-approx 2+1e-16, 2, :0abs_tl
18:24 camelia rakudo-moar ec6c3b: OUTPUT«Unexpected named parameter 'abs_tl' passed␤  in sub is-approx at /home/camelia/rakudo-m-inst-1/share/perl6/sou​rces/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 226␤  in block <unit> at /tmp/oOiE12Ul8t line 1␤␤»
18:24 psch m: use Test; is-approx 2+1e-16, 2, :0abs_tol
18:24 camelia rakudo-moar ec6c3b: OUTPUT«Absolute tolerance must be a positive number greater than zero␤  in sub is-approx at /home/camelia/rakudo-m-inst-1/share/perl6/sou​rces/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 251␤  in block <unit> at /tmp/rt9JRsfow5 line 1␤␤»
18:25 ZoffixW I see the issue
18:26 ZoffixW This multi is never called: https://github.com/rakudo/raku​do/blob/nom/lib/Test.pm6#L226
18:26 ZoffixW You get the one with all the named args, with them set to default.
18:27 rindolf joined #perl6
18:27 psch m: use Test; is-approx 2+1e-16, 2, ''
18:27 camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - ␤»
18:28 AlexDaniel TimToady: I did not expect such serious answer for that bug report. Thank you
18:28 TimToady :)
18:29 TimToady I was sitting in my writing group, so I got carried away... :)
18:29 ZoffixW Where can I read it? :)
18:29 AlexDaniel ZoffixW: https://rt.perl.org/Ticket/Display.html?id=128059
18:31 ZoffixW is-approx rakudobug: https://rt.perl.org/Ticket/Display.html?id=128063
18:33 [Coke] TimToady, if you could just reject another 50 tickets or so while you're in there... :)
18:33 macsnowball joined #perl6
18:33 ZoffixW :)
18:34 jjido joined #perl6
18:34 AlexDaniel [Coke]: what tickets exactly ಠ_ಠ
18:34 AlexDaniel :D
18:35 AlexDaniel actually I don't remember when was the last time I went through my tickets… there are probably some that I'd close myself
18:35 [Coke] any of the NYI/RFC/TODO/SPEC/STD might be up for review.
18:36 [Coke] AlexDaniel: I can give you a list of RTs of your open tickets if you like. :)
18:36 AlexDaniel [Coke]: I have it
18:38 AlexDaniel [Coke]: I actually managed to configure my RT account so that I have a list of my bug reports on my home page
18:38 dupek hey
18:38 dupek could you help me
18:38 [Coke] dupek: possibly. What's up?
18:39 AlexDaniel [Coke]: by the way, another way to do it is to use simple search
18:39 AlexDaniel [Coke]: like this: https://rt.perl.org/Search/Simple.ht​ml?q=alex.jakimenko%40gmail.com+any
18:40 dupek [Coke], I know C++ quiet well but I looking a way to find a perl job
18:40 perlpilot dupek: jobs.perl.org
18:40 [Coke] AlexDaniel: I am now dedicated to using the CLI.
18:40 dupek that's crazy shit I don't know there some junior jobs
18:40 dupek and how should I start
18:41 AlexDaniel [Coke]: there is a CLI for RT?
18:41 perlpilot dupek: also, this is for the Perl 6 language and you likely want Perl 5
18:41 [Coke] jobs.perl.org, there's a FB group, there's a linkedin group.
18:41 dupek no I want Perl6
18:41 dupek job
18:41 moritz we all want that :-)
18:41 AlexDaniel I don't think that there are many Perl 6 jobs right now
18:41 [Coke] dupek: There is no community or site dedicated to perl 6 jobs yet.
18:41 dupek mmm
18:42 dupek Perl5 sucks
18:42 dupek I think
18:42 dupek why just don't use the Perl6
18:42 dupek as Python2 and Python3
18:43 perlpilot dupek: Python2 and Python3 are largely the same.  This is not the case between Perl 5 and Perl 6.
18:44 perlpilot dupek: There is tons of legacy Perl 5 code out there that needs support.  Also, Perl 5 has built up lots of infrastructure and tools for doing useful things that Perl 6 hasn't quite built or co-opted yet
18:44 dupek ok but see
18:44 dupek thats a lot of legacy Objective C code
18:44 dupek and now all are going rewritten to Swift
18:45 dupek perlpilot, thats sucks argument
18:45 RabidGravy well, make code that people use
18:45 [Coke] dupek: we'd be happy if you went out and made some Perl 6 jobs. We're just telling you how things are right now.
18:46 [Coke] Anyway, sorry we can't help at the moment. Keep using Perl 6, thanks.
18:46 dupek :(
18:46 masak dupek: kudos for inner motivation! keep it up!
18:46 dupek are you all working Perl5?
18:46 dupek for everyday
18:47 masak nope
18:47 dupek and Perl6 is just hobby
18:47 dupek ohh ok
18:47 dalek doc: 81e5898 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/faq.pod:
18:47 dalek doc: “has replaced with” → “has been replaced with”
18:47 dalek doc: review: https://github.com/perl6/doc/commit/81e5898e60
18:47 RabidGravy I've written Perl 6 code every day for the last 115 days
18:47 masak dupek: I wouldn't call me $job a Perl 6 job yet, but it's definitely influenced what I do in a number of nontrivial ways
18:48 masak dupek: I currently have two Perl 6 web things online on the web, serving content
18:48 dupek how nice
18:48 dupek masak, so you are going to slow switch
18:49 masak dupek: keep in mind it's not a zero sum game.
18:49 * perlpilot has been writing P5 today wishing he could do P6 things
18:49 masak dupek: just because I really like Perl 6 doesn't meant I want to nuke Perl 5 from orbit
18:49 grondilu m: { -> $x { $^y } }
18:49 camelia rakudo-moar ec6c3b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/IOFapy4skI␤Placeholder variable '$^y' cannot override existing signature␤at /tmp/IOFapy4skI:1␤------> 3{ 7⏏5-> $x { $^y } }␤»
18:49 masak dupek: as a Perl 6 programmer, I can still proudly say, sometimes Perl 5 is (still) the right tool for the job
18:50 dupek masak, ok so you advice to learn Perl5
18:50 dupek and take job in it
18:50 dupek and do Perl6 beside
18:50 masak dupek: you could do worse, yes
18:50 dupek aside
18:50 AlexDaniel by the way, some time ago I was writing some perl 5 multithreaded code, and it wasn't as bad as I expected!
18:50 dupek how about Perl5 jobs
18:50 dupek do you think I can switch to it quick?
18:51 AlexDaniel depends!
18:51 perlpilot dupek: we don't know anything about you really.  It all depends on you.
18:51 dupek ok
18:51 masak dupek: are you able to get ahold of a recent edition of the Camel book?
18:51 RabidGravy well I've written Perl 5 code professionally on and off for twenty years
18:52 DrEeevil perl jobs still exist, but they are not as easy to find as others
18:52 dupek masak, sure
18:52 dupek masak, do you mean Perl Modern Approach?
18:53 perlpilot DrEeevil: I dunno grant street group and booking are always hiring perl devs.
18:53 masak dupek: no, I mean "Programming Perl"
18:53 DrEeevil perlpilot: yes, but would you want to work there? ;)
18:53 mst or start with chromatic's 'Modern Perl'
18:53 masak or that
18:54 mst also perl5 with Moo/Moose (which involved a bunch of stealing from perl6 and perl6 syealing from us) has better OO than ruby/python/javascript and is a lovely language
18:54 RabidGravy or join a weird religious cult or something
18:54 perlpilot DrEeevil: the question was about how hard it was to find a perl job, not about the quality of the company  :)
18:54 mst if you're going to claim it sucks you're basically insulting most of the people who could help you, and insulting perl6 as well
18:54 DrEeevil perlpilot: so why not php? ;)
18:54 dupek masak, Modern Perl is Better than Programming Perl
18:55 masak dupek: different axes, I'd say
18:55 RabidGravy no, different
18:55 dupek cause I found one by 2012
18:55 dupek it is pretty old
18:55 masak dupek: just make sure to pick a recent edition of Programming Perl
18:55 masak then you're good
18:56 jdv79 lizmat: what are the biggest p6 related pause/cpan issues?
18:56 masak dupek: what mst said -- regardless of what you read, check out Moose. it'll blow your noodle ;)
18:56 RabidGravy I've got a programming perl from 1991
18:56 lucs The pink one!
18:56 RabidGravy yeah
18:56 perlpilot RabidGravy: is it falling apart like mine?
18:57 RabidGravy yeah
18:57 El_Che o'reilly safari made my book collection age
18:57 RabidGravy with pizza on it
18:57 * masak .oO( you're supposed to read it, not eat pizza on it! )
18:58 pmichaud joined #perl6
18:58 pmichaud good afternoon, #perl6
18:58 perlpilot pmichaud!
18:58 masak pmichaud! \o/
18:58 RabidGravy (I actually have three PPs)
18:59 perlpilot pmichaud: is robot season over?
18:59 pmichaud robot season is finally over.  :)
18:59 dupek ok so
19:00 sno joined #perl6
19:00 dupek Programming Perl 2012 + Moose
19:00 dupek I should learn it and come back here
19:00 perlpilot dupek: more like go to #perl
19:00 masak on irc.perl.org
19:00 [TuxCM] joined #perl6
19:00 masak (but feel free to stay here too) :)
19:00 dupek :D
19:01 dupek masak, are you staying there too?
19:01 masak dupek: oh, definitely!
19:01 timotimo oh, 2012 is new enough?
19:01 masak dupek: I've been here a _long_ time
19:01 dupek masak, what about CSS and HTML
19:01 perlpilot timotimo: it's the most recent PP I believe
19:01 dupek javascript
19:01 masak dupek: oh, staying *there*? no, just here, sorry ;)
19:01 dupek are you expert?
19:01 moritz dupek: please stop that.
19:01 timotimo OK
19:01 moritz throwing languages in here without any context
19:02 dupek moritz, I am asking cause Perl is more popular in web technologies
19:02 dupek so I suppose I need to know this
19:02 dupek to get Perl job
19:02 masak dupek: I do web, yes. HTML/CSS/JavaScript are indispensible if you do web.
19:02 masak dupek: you can do Perl without them, though.
19:02 masak sysadmin, for example
19:03 dupek ok
19:03 dwarring joined #perl6
19:03 perlpilot dupek: um ... I write Perl code for $job and I don't touch "web technologies" if I don't want to.
19:03 masak or bioinformatics
19:03 dupek ok
19:04 masak fair warning about the web technologies: I've been doing them for well near 20 years. I don't think I will ever feel I master them.
19:04 dupek what Perl IDE is best?
19:04 masak vim :)
19:04 perlpilot dupek: linux  ;)
19:04 dupek :D
19:04 masak perlpilot++
19:04 timotimo padre? atom?
19:04 timotimo emacs?
19:04 dupek I can't use linux :/
19:04 dupek I use atom right now and vim
19:05 masak dupek: do try Linux, if only in a VM
19:05 perlpilot dupek: I like Padre (but I haven't used it in a while) and sublime (haven't used that one in several months either)
19:06 dupek ok, I am going to learn a bit ;-) new tool
19:06 stmuk vim or maybe emacs/evil
19:07 timotimo if you do perl on linux many things make more sense than they would on windows
19:07 masak I remember really liking the cperl mode in emacs
19:07 masak yes, I really recommend learning Linux
19:07 timotimo at the beginning it'll hardly make sense, though
19:08 timotimo like, how do you even start "with linux"?
19:08 timotimo make a few directories and cd through them?
19:08 timotimo is that how to learn linux?
19:08 masak yes!
19:08 timotimo maybe touch a file or two
19:08 dupek I use Linux in my job and I am big fun of it
19:08 moritz timotimo: don't forget to mount and fsck :-)
19:08 stmuk I think one of the BSDs is probably better for beginners and then migrate to Linux
19:08 stmuk since the man pages are better
19:08 dupek but suddenly I get a Mac as gift
19:08 dupek ;D
19:09 dupek and I hate VMs
19:09 perlpilot dupek: OSX is good too, very unixy  ;)
19:09 dupek it is better than M$
19:09 perlpilot indeed
19:10 [Coke] pmichaud: HIO!
19:10 mst for perl5 you wanted #perl
19:10 mspo vim is also a great presentation tool if you're TimToady
19:10 mst mspo: or ingy
19:10 timotimo oh! pmichaud is here, cool
19:10 masak we're saved! :)
19:11 jdv79 from what?
19:11 mst me
19:11 moritz from the evils of the world
19:11 masak an acute pmichaud deficit
19:11 jdv79 oh ok
19:11 timotimo yeah, which is basically mst
19:11 pmichaud o/
19:11 RabidGravy poor mst
19:12 * grondilu managed to do code generation without EVAL.  Functional programming FTW  :)  Look at the end of this file:  https://github.com/grondilu/clifford/blob/mas​ter/lib/MultiVector/BitEncoded/Optimized.pm6
19:12 perlpilot pmichaud: If you want something to work on to get back into Rakudo, masak was just complaining about "leave" not being implemented   :-)
19:13 pmichaud I can leave, if that helps.  :)
19:13 [Coke] oh, I have a whole list of tickets, just name your poison. :)
19:13 masak I wasn't complaining about `leave` not being implemented :P
19:13 pmichaud rather than jump into dev I'm just going to follow conversations and see what intrigues me.
19:13 masak I said I wasn't missing it much!
19:14 timotimo glad you're hanging out, pmichaud
19:14 perlpilot masak: close enough.  ;)
19:14 timotimo did you follow all the nice changes we have made in the mean time
19:14 timotimo well, not necessarily all of them
19:14 pmichaud right now I'm also upgrading all of my systems and generally cleaning up my house/computers/life
19:14 masak pmichaud: you've been away for a long time. we're on Perl 8 now.
19:14 pmichaud masak: I have a sekrit Perl 9 started.
19:14 timotimo but there have been highlights, like NFG and such
19:14 masak I *knew* it!
19:14 lucs From Outer Space?
19:15 zakharyas joined #perl6
19:15 RabidGravy so speaking of web technologies who wants to tosh up the noise gang page a bit
19:15 timotimo what does it need?
19:15 RabidGravy de=uglying
19:16 jnthn Bootstrap.
19:17 timotimo hehehe
19:17 jnthn (No, I didn't volunteer. :P)
19:17 timotimo what are the other ones called?
19:17 jevin joined #perl6
19:18 mst step 1) bootstrap, step 2) pocketgrid (bootstrap's grid is terrible), step 3) point stakeholder at bootswatch site, yell 'pick a theme fucko', 4) watch people say 'jesus that's pretty', 5) ergo prophet
19:18 RabidGravy I actually looked at foundation which is even more of a tokyo stomping moster
19:18 RabidGravy and I've tried skeleton on a trial basis elsewhere
19:18 [Coke] ooh, my mac just black-screen-of-death'd.
19:18 timotimo ah, foundation is one i remember
19:18 jdv79 what's a noise gang?
19:19 RabidGravy http://perl6.noisegang.com/
19:19 RabidGravy super sekrit cabal
19:19 timotimo we are quite exclusive and exquisite
19:19 timotimo and our skin is oh-so soft
19:19 masak mst: I especially like the part where you called the stakeholder a fucko
19:20 timotimo in my imagination, being a stakeholder is rather dangerous
19:20 timotimo like, you have to hold the stake while it gets burned?
19:20 ZoffixW joined #perl6
19:20 masak timotimo: it's actually supposed to be "steakholder"
19:20 timotimo or does the stakeholder have to hold the person that's supposed to be burned at the stake?
19:20 RabidGravy if you're a vampire it is
19:21 masak timotimo: it's for a barbecue after the software's been shipped
19:21 timotimo ah
19:21 timotimo i've never experienced that situation :P
19:21 timotimo i'm a terrible software engineer
19:22 masak timotimo: we prefer the term "job security"
19:22 timotimo :D
19:22 stmuk its the people who think they are good software engineers you want to avoid
19:23 timotimo i'm a hazard to myself ~  don't let me get me ~
19:23 mspo I think you mean software artisans
19:23 masak right, the bigger the island of knowledge, the longer the shoreline of wonder
19:23 timotimo i'm my own worst software engineer ~
19:23 masak unless you're on a sphere, then the shoreline actually starts to shrink after a while
19:23 timotimo that's what "word smart" means?
19:25 masak dunno, I'm kinda word dumb
19:25 ZoffixW Is anyone else using Perl 6 on multiple boxes, regularly nuke + reinstall perl 6 on them and then trying to remember what modules to install?
19:25 timotimo "brain the size of a planet and they're asking me to ..." :)
19:25 bitmap joined #perl6
19:25 timotimo ZoffixW: over the last few months i've only actually nuked once
19:25 tadzik ZoffixW: Sounds like you need a Task::BeLike::ZoffixW
19:26 masak I guess if you're on a hyperbolic plane, the shoreline of wonder grows exponentially instead of proportionally
19:26 ZoffixW I use perl 6 on 5-7 boxes and this is getting on my nerves already. The easiest solution is to just push Task::Zoffix to the ecosystem and have it listed, but I'm thinking of making a webservice people can use to setup a login and configure what module mix they use. The ecosystem generator will fetch a list from that service and append to the list a list of "fake" dists that'll install a bunch of prereqs
19:26 perlpilot hyperbolic planes fly higher than *anything*
19:26 RabidGravy ZoffixW, this is why I made App::ModuleSnap
19:27 * ZoffixW looks
19:27 stmuk RabidGravy: does that snapshot the git version?
19:27 ZoffixW No good. Then I'll find myself trying to keep in sync the snapshot directory on 6 different boxes.
19:28 perlpilot People can build a "fake dist" on github fairly easily and point panda/zef at it for installation, can't they?
19:28 ZoffixW Oh, right. perlpilot++
19:28 ZoffixW That'll do
19:29 timotimo don't even need to build a fake dist on github
19:29 timotimo locally should work fine, too, no?
19:29 perlpilot yeah
19:29 ZoffixW My whole point is this can't be local :P
19:29 timotimo oh
19:29 timotimo 'k
19:30 perlpilot but if you're not going to share, a local fake dist would be just fine :)
19:30 ZoffixW Yeah :)
19:30 RabidGravy well that is the sub-text of the module, create the meta dist stick it somewhere install it
19:31 RabidGravy it takes the "trying to remember what modules to install" part away
19:31 timotimo if you don't actually nuke, you keep your modules, don't you?
19:31 RabidGravy I nuke frequently
19:32 grondilu ouch:
19:32 grondilu 988*** glibc detected *** /home/travis/.rakudobrew/m​oar-nom/install/bin/moar: double free or corruption (!prev):
19:33 timotimo uh oh :)
19:34 hoelzro joined #perl6
19:35 cpage_ joined #perl6
19:43 ZoffixW joined #perl6
19:43 spider-mario joined #perl6
19:43 RabidGravy boom
19:43 ZoffixW Dam splits
19:43 ZoffixW <ZoffixW> Any idea why I'm having this issue with zef? https://github.com/ugexe/zef/issues/86
19:43 ZoffixW <ZoffixW> What's strange is I updated my linode box this morning (I think) and this issue did not appear :\
19:43 ZoffixW Right now I'm connected to Freenode twice... using ZoffixW in both connects :P
19:51 prammer joined #perl6
19:51 lizmat joined #perl6
19:51 skids joined #perl6
19:51 winger_ joined #perl6
19:51 uruwi joined #perl6
19:51 petercommand joined #perl6
19:51 colomon joined #perl6
19:51 TreyHarris joined #perl6
19:51 breinbaas joined #perl6
19:51 pecastro joined #perl6
19:51 Timbus joined #perl6
19:51 JimmyZ joined #perl6
19:51 nightfrog joined #perl6
19:51 ZoffixWin joined #perl6
19:51 stmuk joined #perl6
19:51 mspo joined #perl6
19:51 jamesnek1 joined #perl6
19:51 masak joined #perl6
19:51 richi235 joined #perl6
19:51 pRiVi joined #perl6
19:51 vendethiel joined #perl6
19:51 psch joined #perl6
19:51 [particle] joined #perl6
19:51 ChoHag joined #perl6
19:51 mattp_ joined #perl6
19:51 tadzik joined #perl6
19:51 sunnavy_ joined #perl6
19:51 skaji joined #perl6
19:51 andrewalker joined #perl6
19:51 luis joined #perl6
19:51 sufrostico joined #perl6
19:51 sno joined #perl6
19:51 jjido joined #perl6
19:51 atweiden joined #perl6
19:51 kaare_ joined #perl6
19:51 _nadim joined #perl6
19:51 cognominal joined #perl6
19:51 au_ joined #perl6
19:51 mindos joined #perl6
19:51 Xliff_ joined #perl6
19:51 k-man joined #perl6
19:51 Brock joined #perl6
19:51 yasnothil joined #perl6
19:51 infina joined #perl6
19:51 captain-adequate joined #perl6
19:51 El_Che joined #perl6
19:51 agentzh joined #perl6
19:51 mtj_ joined #perl6
19:51 maddingue joined #perl6
19:51 jercos joined #perl6
19:51 ruoso joined #perl6
19:52 RabidGravy woo
19:52 M-Illandan joined #perl6
19:53 RabidGravy un-splitters!
19:56 El_Che I was at a "daytime-yard-party" this weekend. One of the people also "working with computers" asked me If I've heard of those "chat networks for hackers". He meant irc :)
19:57 stmuk ZoffixWin: did you try the msi on windows 7 or 10?
20:00 erdic joined #perl6
20:04 timotimo that's adorable, El_Che
20:06 mst El_Che: *d'awwwwwwwwwwwwwwwwwwwwww*
20:10 masak 'night, #perl6
20:11 lizmat gnight masak
20:11 lizmat and gnight #perl6!
20:18 ZoffixMobile joined #perl6
20:18 ZoffixMobile stmuck, Win7
20:18 ZoffixMobile stmuk even
20:19 stmuk ah good tested on "both platforms" then :)
20:19 ZoffixMobile stmuk++
20:20 stmuk both sorts of music Country *and* Western, both platforms Windows 7 and 10 :)
20:21 mspo El_Che: slack advertises on tv now
20:24 El_Che mspo: one of the sign of the apocalypse :)
20:26 mspo El_Che: slackpocalypse
20:26 rurban joined #perl6
20:26 El_Che mspo: The Revolution will be streamed live through slack
20:27 mspo El_Che: my job just switched to it
20:27 mspo El_Che: no one talks anymore they just /giphy
20:31 dolmen joined #perl6
20:37 dalek doc: 780e0ac | (Jan-Olof Hendig)++ | doc/Type/IO/Handle.pod:
20:37 dalek doc: Documented the 't' method
20:37 dalek doc: review: https://github.com/perl6/doc/commit/780e0ac7e7
20:41 AlexDaniel t?
20:43 rurban left #perl6
20:43 dogbert2 indeed
20:44 dogbert2 was a bit surprised when I saw it
20:45 AlexDaniel “Returns L<Bool::True> if the handle is opened to a tty.”
20:45 AlexDaniel why not call it .tty ?
20:45 dogbert2 good question, tty sounds better to me :)
20:45 jjido joined #perl6
20:45 geekosaur because they started out as the perl 1-letter tests, which in turn come from the unix shell "test" command
20:46 geekosaur perl5's -t became :t became .t
20:46 dogbert2 interesting
20:46 geekosaur (which means yes, by all means change to somehting else, and consider reviewing the whole set for sane names)
21:06 ugexe ZoffixWin: ah, i fixed it. p6c/projects.json mangles git@ to git:// which my mirror does not (and the only way to change mirrors atm is to manually switch them in the config). i left that alone and instead have zef internally access it as a valid uri ala ssh://git@
21:06 ugexe however there is a flaw in App::ModuleSnap test that requires you to install META6 before attempting to install it
21:07 ugexe as it assumes it can find META6 is a specific CUR, when instead zef passes in the lib as a path to -I (so CUR::FileSystem)
21:07 stmuk http://rakudo.org/2016/05/03/announce-window​s-64-bit-installer-for-rakudo-star-2016-04/
21:09 ugexe it would likely work on panda as panda does will install each dependency completely before moving on, whereas zef does everything in batches by building the requested environment (allowing dry installs)
21:11 ugexe i would imagine the `get-dists` method should also search file#/path (or just '/path') based $*REPOs and not just those with the CUR::Installation format
21:12 geekosaur btw something to consider about those methods is that one expectation is you can use them with smartmatching (which is where the original p6 -t and :t forms, later dropped, came from). if you smartmatch against a Code, it invokes the Code with $_ set to the thing you're smartmatching
21:13 geekosaur not sure that's actually worthwhile now that you need (I think) a foo.IO though..
21:18 lnrdo joined #perl6
21:18 ugexe RabidGravy: issue opened
21:21 RabidGravy sorry I'm not quite sure what the fix is then
21:22 RabidGravy the module has a dependency
21:22 ugexe the dependency is supplied
21:22 ugexe you are trying to imply it has a dependency that must reside in CUR::Installation
21:22 RabidGravy am I?
21:22 ugexe with that test, yes
21:23 RabidGravy oh I see
21:23 hotel_california joined #perl6
21:25 RabidGravy yes panda installs all the dependencies before it performs the tests
21:25 ugexe you should be able to just check each prefix for .child('META6.json')
21:26 ugexe or maybe .parent.child('META6.json')
21:28 bazzaar joined #perl6
21:28 bazzaar \o
21:29 atweiden nom has been failing to build on linux 64 for a few days now, anyone else seeing this?
21:29 atweiden `Cannot call method 'prefix' on a null object in block <unit> at tools/build/install-core-dist.pl line 15`
21:29 bazzaar m: column_length => ~$<column_length> || 'default'
21:29 camelia rakudo-moar ec6c3b: OUTPUT«WARNINGS for /tmp/56KwGFsIgt:␤Useless use of "column_length => ~$<column_length> || 'default'" in sink context (line 1)␤Use of Nil in string context  in block <unit> at /tmp/56KwGFsIgt line 1␤»
21:30 RabidGravy it built for me this very morning
21:30 ZoffixWin wooo stmuk++ Thanks!
21:30 ZoffixWin And ugexe++ thanks :D
21:31 atweiden RabidGravy it's the `make install` that fails in my case
21:31 bartolin atweiden: I see this error with rakudo-j (on FreeBSD)
21:32 bazzaar anyone know where I can find documentation to avoid 'Use of Nil in string context' warning message
21:33 bartolin atweiden: it first happened monday morning -- i suspect the merged precomp branch (most precomp tests are failing and spectest is slooow)
21:33 RabidGravy bazzaar, it's the
21:34 RabidGravy m: say ~$<column_length>
21:34 camelia rakudo-moar ec6c3b: OUTPUT«Use of Nil in string context  in block <unit> at /tmp/SIpGhDKACh line 1␤␤»
21:34 patrickz joined #perl6
21:34 RabidGravy m: say  ~($<column_length> // '')
21:34 camelia rakudo-moar ec6c3b: OUTPUT«␤»
21:36 bazzaar RabidGravy: thankyou for that perl6 of wisdom :-)
21:37 RabidGravy it's the '~' stringifying the undefined value
21:38 brrt joined #perl6
21:38 ZoffixWin bazzaar, another perl6 wisom is you can use quietly
21:39 TEttinger joined #perl6
21:39 ZoffixWin m: say quietly ~$<column_length>
21:39 camelia rakudo-moar ec6c3b: OUTPUT«␤»
21:39 lucs m: say $<column_length> // ''  # Suffices, but maybe I'm missing the point.
21:39 camelia rakudo-moar ec6c3b: OUTPUT«␤»
21:40 ZoffixWin m: class Foo{ method Str {'Str'}; method gist { 'gist' } }; say Foo.new // ''; say ~(Foo.new // '')
21:40 camelia rakudo-moar ec6c3b: OUTPUT«gist␤Str␤»
21:40 ZoffixWin lucs, just that ^. Depends on what you got in your var
21:40 bazzaar RabidGravy: wow, even more wisdom, committing that to memory, and to my perl6 notes file
21:41 lucs ZoffixWin: Useful, thanks.
21:41 bazzaar lucs: data values read from file with grammar, sometimes values absent, so var is empty
21:41 RabidGravy yeah I was assuming it was the result of some match
21:43 ZoffixWin m: my $column_length is default(42); $column_length = Nil; say $column_length
21:43 camelia rakudo-moar ec6c3b: OUTPUT«42␤»
21:43 ZoffixWin :)
21:43 yasnothil joined #perl6
21:46 itaipu joined #perl6
21:49 bazzaar ZoffixWin: that there be a trait, don't it me hearty's :-) I'll have to give 'is default' a try
21:50 ZoffixWin Basically it modifies what your variable is when its value is a Nil
21:50 prammer joined #perl6
21:51 MadcapJake ZoffixWin: is it just a Proxy underneath?
21:51 bazzaar ZoffixWin: thankyou for your wisdom too
21:55 huggable joined #perl6
21:56 ZoffixWin MadcapJake, no idea. I don't even see it defined in https://github.com/rakudo/raku​do/blob/nom/src/core/traits.pm
21:56 ZoffixWin Unless variables match some type other than Variable
21:56 MadcapJake oh just seems like it, STORE would return the default value if it is set to Nil, or something like that.
21:57 cpage_ joined #perl6
21:57 yqt joined #perl6
21:59 prammer joined #perl6
22:00 kid51 joined #perl6
22:02 prammer joined #perl6
22:12 skids joined #perl6
22:14 cdg joined #perl6
22:14 Bucciarati joined #perl6
22:16 ZoffixWin m: sub asc ($key) { sub { $^a{$key} <=> $^b{$key} } }; ^10 .map({ %( foo => $_ ) }).sort( asc('foo') ).map(*.value).say
22:16 camelia rakudo-moar ec6c3b: OUTPUT«Cannot find method 'map': no method cache and no .^find_method␤  in block <unit> at /tmp/aQ1J7zV8lQ line 1␤␤»
22:16 ZoffixWin :/
22:18 ZoffixWin m: ^10 .sort({ $^a <=> $^b }).say
22:18 camelia rakudo-moar ec6c3b: OUTPUT«Cannot find method 'say': no method cache and no .^find_method␤  in block <unit> at /tmp/g9vnrIgEbX line 1␤␤»
22:18 ZoffixWin dafuq
22:19 ZoffixWin m: (^10).sort({ $^a <=> $^b }).say
22:19 camelia rakudo-moar ec6c3b: OUTPUT«(0 1 2 3 4 5 6 7 8 9)␤»
22:19 MadcapJake that isn't applying to the upto range
22:19 ZoffixWin Probably related to the bug where we can't hyper after .sort
22:19 MadcapJake m: .sort({ $^a <=> $^b })
22:19 camelia rakudo-moar ec6c3b: ( no output )
22:19 MadcapJake apparently unit is sortable :P
22:20 MadcapJake m: .sort({ $^a.WHAT.say; True })
22:20 camelia rakudo-moar ec6c3b: OUTPUT«(Any)␤»
22:20 MadcapJake m: Any.say
22:20 camelia rakudo-moar ec6c3b: OUTPUT«(Any)␤»
22:20 MadcapJake ZoffixWin: (is default) https://github.com/rakudo/rakudo/​blob/nom/src/core/Variable.pm#L47
22:21 ZoffixWin MadcapJake++ thanks
22:27 cpage_ joined #perl6
22:46 Sgeo joined #perl6
22:53 khw joined #perl6
23:21 teatime m: "Hello, World!" ~~ rx:Perl5/^H[d-z]l{2}/
23:21 camelia rakudo-moar ec6c3b: ( no output )
23:22 teatime m: say so "Hello, World!" ~~ rx:Perl5/^H[d-z]l{2}/
23:22 camelia rakudo-moar ec6c3b: OUTPUT«True␤»
23:22 teatime m: say so '"̃' ~~ rx:Perl5/../
23:22 camelia rakudo-moar ec6c3b: OUTPUT«False␤»
23:27 BenGoldberg joined #perl6
23:30 timotimo what's your use case for this?
23:30 timotimo what even is this thing?
23:30 timotimo .u "̃
23:30 yoleaux U+0022 QUOTATION MARK [Po] (")
23:30 yoleaux U+0303 COMBINING TILDE [Mn] (◌̃)
23:32 BenGoldberg joined #perl6
23:35 teatime I want to parse a file that has a "<unichar>" syntax element, and sometimes they are combining chars
23:37 timotimo . is certainly the wrong approach to this, as it's defined to match "a grapheme"
23:38 timotimo you can potentially wiggle your way around the problem with a custom code block or method that operates directly with Cursor objects
23:44 geekosaur they're looking for p5's \X, right?
23:44 timotimo no clue
23:45 timotimo i don't do that much p5 regex, tbh
23:45 timotimo only relatively tame things go int my regexes
23:45 geekosaur iirc \X matches a character + 0 or more combining chars
23:46 geekosaur oh, no, tjey want combiners to be different (re <unichar>)? I think there's a way to do that but you need to match on a different normal form
23:46 geekosaur that is, str.NFC or some such
23:46 geekosaur ..except I think that;s a Buf so you can't regex it...
23:47 rangerprice joined #perl6
23:50 teatime timotimo: I know.  I thought perl5 had a 'single codepoint' escape in regexes, which p6 doesn't seem to
23:50 teatime but I can't find it right now in perlre
23:51 teatime geekosaur: there's supposed to be :chars, :codes, etc. modifiers for p6 regex but it's to-do
23:55 luser1 joined #perl6
23:56 teatime m: say so '"̃"' ~~ rx:Perl5/\C+"/
23:56 camelia rakudo-moar ec6c3b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/bWyXaeQfIC␤Unrecognized Perl 5 regex backslash sequence␤at /tmp/bWyXaeQfIC:1␤------> 3say so '"̃"' ~~ rx:Perl5/\7⏏5C+"/␤»
23:57 geekosaur \p{Any}
23:57 geekosaur \C matches exactly a byte when Unicode is enabled
23:58 teatime yes
23:58 teatime don't think \p{Any} will hel
23:58 teatime m: say so '"̃"' ~~ rx:Perl5/"\p{Any}"/
23:58 camelia rakudo-moar ec6c3b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/453buzn4Kk␤Unrecognized Perl 5 regex backslash sequence␤at /tmp/453buzn4Kk:1␤------> 3say so '"̃"' ~~ rx:Perl5/"\7⏏5p{Any}"/␤»
23:58 flaviusb left #perl6
23:59 geekosaur you wanted a single codepoint, that's it
23:59 geekosaur [03 23:50] <teatime> timotimo: I know.  I thought perl5 had a 'single codepoint' escape in regexes, which p6 doesn't seem to
23:59 teatime it is?
23:59 geekosaur remnember that p5 doesn't do graphemes, though; p5's \X is equivalent to p6's .

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

Perl 6 | Reference Documentation | Rakudo