»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:01 kurahaupo left 00:04 ZoffixLappy left
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.
timotimo Could not find Bailador::Plugin::AssetPack::SASS at line 5 in: 00:05
all the missing dependencies
00:06 cpage_ joined
timotimo LoadError: cannot load such file -- rb-inotify 00:07
NoMethodError: undefined method `join' for nil:NilClass 00:08
>_>
00:09 ZoffixLappy joined
ZoffixLappy :/ stupid Freenode 00:09
hotel .seen
yoleaux Ask me when I last saw a user speaking
hotel oh
ZoffixLappy <ZoffixLappy> 2 posts (2 markdown files). 3.33 seconds per request from local host :( gist.github.com/zoffixznet/af44d9a...68422f0792
<ZoffixLappy> 3 posts = 4.288s per request :)
<ZoffixLappy> Time to switch for a DB based system with pre-parsed posts methinks :P
oops
timotimo, you need to run panda update or zef update for those missing deps. 00:10
timotimo ah
ZoffixLappy Unsure what the rb-notify stuff is all about tho
timotimo had to install a rubygem-rb-inotify from dnf
00:11 plugh22 joined
timotimo it seems like you've put a bunch of blah.foo~ files into your git repo 00:11
ZoffixLappy Um... yeah.. KDevelop-- 00:12
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␤␤»
timotimo rendering the template is the slowest part by far, it seems like
plugh22: you're getting a method "new" from Any, which will not pass $a as a positional parameter for you 00:14
00:14 kid51 joined
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?
timotimo no 00:15
note statements
plugh22 timotimo: ok, thanks.
ZoffixLappy Ah
timotimo could it be you're re-parsing the template on every page serve?
ZoffixLappy I am, yes
timotimo bad idea :)
ZoffixLappy TWO templates, really. The "layout" and the "page" :/
00:16 pierre__ joined
ZoffixLappy Basically every page load involves like 6 file slurps 00:16
timotimo there's probably some performance gains to be found in Mojo
slurp isn't expensive, i don't think
do i look at Template::Mojo, or do i look at Mojo::Extended to find the code that's likely slow? 00:18
ZoffixLappy I'd say Template::Mojo. All ::Extended really does is process two Template::Mojo templates. 00:19
timotimo OK
anyone want to write a readme for Template::Mojo that has a "how do i invoke this?!?" section?
mspo oh did you guys port ep? 00:20
ZoffixLappy I think it has decent docs in POD: github.com/tadzik/Template-Mojo/bl...te/Mojo.pm
mspo, far from it.
timotimo OK
the synopsis doesn't use the from-file method
which template should i use for profiling purposes? index.tt? post.tt? 00:21
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:23
timotimo ah 00:24
well, index.tt won't work with just Template::Mojo
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 tardisx left
timotimo and default.tt also doesn't work with just Template::Mojo 00:24
teatime: i don't think we actually have "does" for attributes. we do have "is", however 00:25
"is default", "is rw", "is required", ...
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 :/
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 :)
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 smls left
timotimo by kicking out the sass thing, profile no longer segfaults 00:28
but now i don't have a way to shut down the server, so it ends up never outputting the profile code
ZoffixLappy Oh. It may be due to Proc::Async
Just shove start { sleep 3; exit } at the end of get '/' => sub {... } ? 00:29
timotimo oh crap 00:30
ZoffixLappy ?
timotimo i added a /exit handler and it caused "invalid gc status observed"
ZoffixLappy has no idea what that means :)
timotimo memory corruption of some kind 00:31
ZoffixLappy :o
mst it means "you're hosed"
timotimo yup
basically
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" :)
timotimo oof 00:33
now how do you golf that ... 00:34
i'm out of energy for today; the flu is taking its toll
teatime ohhh... timotimo: maybe it was 'handles' not 'does.
timotimo ah, that could be, yeah
that'll install methods that redirect to method calls on your attributes' values for you
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
teatime and I found the docs for it. yar.
timotimo oh, huh 00:35
gimme that profile? :)
00:35 tardisx joined
ZoffixLappy xtatik.org/temp/profile.html 00:36
timotimo the routines tab there is pretty much completely useless 00:37
the whole profile is, really
because multi-threading :P
our output routine doesn't know how to handle it yet
ZoffixLappy Yeah. It looks like it's just showing the thread where I slept for 10 seconds
timotimo yeah :)
i wonder why. i always thought it'd only output the first thread 00:38
bailador could get a quit-switch
it'd be neat if you could do that locally 00:43
hm, HTTP::PSGI::Easy doesn't do any concurrency, right? 00:44
[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: github.com/zoffixznet/perl6.party/...sts.pm6#L7 :/
And it's still slow as hell, suggesting switching to a PG backend won't help :( 00:47
I guess back to P5's Mojolicious for me for this project :'(
[Coke] smls: [CONC] if we have more than one ticket, sure. it's just a way to group things for (basically) jnthn to find.
timotimo well ... profile can very strongly impact your performance depending on what kind of stuff your program is doing
00:48 Herby__ joined
Herby__ o/ 00:48
ZoffixLappy \o 00:49
Craaap
teatime [Coke]: maybe you want to pull --rebase ?
[Coke]: those actual commits won't usually be a problem, but I'm unclear on when/if they can be 00:50
ZoffixLappy Oh, never mind. I still had the start { sleep 10; } in my code :P 00:51
ZoffixLappy blushes
Herby__ what you sleepin
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.
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
[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
[Coke] teatime;i did a merge from upstreamm, not a pull. i'll try that, should be cleaner.
teatime but yeah, generally I do exactly what timotimo describes
timotimo well, pull is just fetch + merge
teatime [Coke]: was it a fast-forward merge, or are you mid-merge as we speak?
[Coke] I'll try a pull --rebase, then.
00:54 TreyHarris left
[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
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
[Coke] yup, I just did that on my forked master and my pr'd branch, all fine now, thanks! 00:56
first time using a forked repo for anything other than a single one off PR
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
probably 'cause I'm a n00b though.
00:58 sufrostico left
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 00:59
mst teatime: or install ingy's 'git hub' 01:00
01:00 Herby__ left
mst teatime: github.com/ingydotnet/git-hub/ 01:00
teatime that looks very handy, thanks.
AlexDaniel mst: what's the difference between that and this github.com/sociomantic-tsunami/git-hub 01:02
01:04 boegel left
AlexDaniel there's also git-spindle 01:04
ugexe Hey Mark
I talked to the consulting firm I'd need to go through today and he is going to get the ball rolling on whatever stuff he needs to do. At this point it's probably best to disclose I have conviction from breaking into a shed 10 years ago. For such a large company I realize policy may already dictate my disqualification; It should be noted however that this conviction did not involve bodily injury, dishonesty,
or a breach of trust. In my defense I was a stupid bored kid then (a sucker to peer pressure), and my open source work and background since have proven exemplary. No hard feelings if this is unacceptable... qx and your stack piqued my interest the most, but I admittedly have other offers. 01:05
mst ugexe: dude!
ugexe uh, oops
mst sorry, wasn't quite quick enough to kick you
AlexDaniel: ingy's doesn't require python, and seems more complete
01:05 cdg left
teatime ouch 01:06
ZoffixLappy Well, if we ever have trouble with bikeshedding, ugexe is our person to break it up :P 01:07
AlexDaniel huggable: no bikeshedding please 01:08
huggable AlexDaniel, 🚳
teatime huggable is going to leave me hanging.
mst capital punishment for bikeshedding seems completely reasonable 01:09
geekosaur .u 🚳
yoleaux U+1F6B3 NO BICYCLES [So] (🚳)
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
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
ZoffixLappy Clipboard?
AlexDaniel that's how it is called?
ZoffixLappy is on his nth beer... never mind me\\\\\\\o/ 01:14
AlexDaniel ZoffixLappy: how did you call it then?
ZoffixLappy Not. Sure. 01:15
01:15 sufrostico joined
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:16
teatime X11 calls it selection or selection buffers or something 01:17
but one of them is CLIPBOARD.
01:17 TreyHarris joined
AlexDaniel archwiki says “Despite the naming, all three are basically "clipboards"” 01:18
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.
mst ZoffixLappy: which of course was the original metaphor 01:20
but, yeah
teatime yes, I love X-style copy/paste... sorely miss it if I get stuck on windows.
AlexDaniel it also makes sure that I have some kind of trash in it and not some private email that I copied
ugexe oddly enough weechat asked me if i wanted to really paste 3 lines after having already sent them
[Coke] also "pasteboard" 01:21
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
urxvt has defaulted to not for a long time, xterm recently changed to default to not; I don't know about others.
01:22 tardisx left
ZoffixLappy FWIW, here's the Template::Mojo profile on a small template that takes 1.3s to render: xtatik.org/temp/profile.html 01:23
grondilu m: use MONKEY-SEE-NO-EVAL; say EVAL '-> $ { }'; 01:24
camelia rakudo-moar d065ba: OUTPUT«-> $ { #`(Block|79840320) ... }␤»
AlexDaniel does anybody remember the times when IE was happily giving away the contents of the clipboard?
grondilu ^the debugger shows me an exception when I try that.
01:25 tardisx joined
AlexDaniel IT STILL DOES? 01:25
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.
hotel "giving away"? 01:27
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
hotel oh 01:28
r00d
grondilu yes xauth is a very old command 01:29
hotel ZoffixLappy++
although sometimes windows randomly opens IE instead of edge
AlexDaniel ZoffixLappy: they're still pushing their “Edge” thingy though
teatime grondilu: it's not quite the same thing.
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.
We have good opensource alternatives. Waste your cash on something else.
hotel it's a nice enough browser
AlexDaniel huggable: dunno :is: ¯\_(ツ)_/¯
huggable AlexDaniel, Added dunno as ¯\_(ツ)_/¯
hotel just too young atm 01:31
AlexDaniel what do you mean by “young”? Isn't it the same old IE?
hotel edge?
AlexDaniel yeah
hotel not at all
teatime what would be a good prefix to begin compose sequences for big emoticons and similar strings
hotel emo 01:32
teatime hrm... perhaps ; as in <Compose> ; s h r u g etc.
01:32 adu joined
teatime or that would work too; can do both. 01:32
01:32 diakopter______ joined
hotel :D 01:32
hotel has no idea what's going on
ZoffixLappy \o/ \o\ /o/
diakopter______ [Coke]: I merged your rakudobrew shite
ZoffixLappy :o 01:33
teatime isn't there mainly one guy that did/does most of the REPL stuff? if so, who
AlexDaniel hoelzro?
[Coke] diakopter______: thanks
01:35 tardisx left
teatime heh, I knew I should have looked as soon as I'd asked; every single commit to REPL.pm has been by [email@hidden.address] 01:35
AlexDaniel: thx
hoelzro teatime: do you have questions about the REPL?
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 huggable left
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 glot.io/new/perl6
01:39 huggable joined
hotel danke 01:39
AlexDaniel hotel: you can also write private messages to camelia
geekosaur its own documentation claims that it si a completely new engine
hotel oh yeah I could
AlexDaniel hotel: there's also ideone.com/ but it is full of ads 01:40
geekosaur: sure, but claiming is one thing…
01:40 tardisx joined 01:41 sufrostico left
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
with perhaps some refactored code or something
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:45 ilbot3 left 01:47 ZoffixLappy left
AlexDaniel like caniuse.com/#feat=css-grid 01:47
01:47 ilbot3 joined 01:48 BenGoldberg joined
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
01:49 BenGoldberg left
geekosaur except that iirc that was when they started work, or at least announced so, on a replacement for the spyglass engine 01:49
AlexDaniel spyglass? 01:50
01:50 BenGoldberg joined
geekosaur spyglass is the browser they bought and turned into IE 01:50
(iirc) 01:51
yep 01:53
en.wikipedia.org/wiki/History_of_I...95-1997.29
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:54 pierre__ left
hotel learning time -> is Str.chop destructive? 01:55
timotimo m: my $a = "hello"; $a.chop; say $a 01:56
camelia rakudo-moar d065ba: OUTPUT«hello␤»
timotimo usually methods like that aren't
like, only very few methods are mutative
hotel ah that's the word I was looking for
and thanks
hotel realises he can just use substr 01:57
01:57 adu left
timotimo :) 01:57
chop is shorter if you want every char except the last 01:58
plugh22 is there some way I could get behavior of a chunk of code explained to me? about 30 lines. 01:59
hotel I just wanted all the chars in the string separate 02:00
timotimo sure, plugh22, we can try
ZoffixWin plugh22, only one way to find out :) Pastebin it and give us a link :)
timotimo hotel: that sounds exactly like what comb does
AlexDaniel m: say ‘hello’.comb
camelia rakudo-moar d065ba: OUTPUT«(h e l l o)␤»
hotel darn
I knew there was an easier way
ZoffixWin blogs.perl.org/users/zoffix_znet/20...mb-it.html
timotimo perl6 is like that sometimes
plugh22 you'd rather I don't paste it here then? 02:01
timotimo yes, very rather
hotel ?code
plugh22 ok, i'll get that figured out. thanks.
hotel oh you don't have that here?
ZoffixWin plugh22, no, it's hard to follow the code in a constantly-scrolling IRC window. Try gist.github.com/
hotel ^^
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
plugh22 ok, thanks.
AlexDaniel camelia supports github gists, bitbucket snippets and gitlab snippets. Choose any 02:02
ZoffixWin Or paste.scsys.co.uk/, if gist. needs a passsword
02:02 pierre__ joined
timotimo gist doesn't need a password if you paste anonymously 02:02
ZoffixWin k
AlexDaniel does not support no paste yet
hotel I used to be on a channel where the bot would tell people most of that with a command, lol
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
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
02:03 TreyHarris left
timotimo huggable could do it 02:03
hotel I've been away from irc for too long 02:04
02:04 kid51 left 02:05 TreyHarris joined
timotimo we do also have a slack. it's been quite quiet for a while now, though 02:05
AlexDaniel huggable: paste :is: Please do not paste large pieces of code here. camelia supports gist.github.com/ , gitlab.com/snippets and bitbucket.org/snippets 02:07
huggable AlexDaniel, Added paste as Please do not paste large pieces of code here. camelia supports gist.github.com/ , gitlab.com/snippets and bitbucket.org/snippets
teatime hoelzro+=20 for linking me to S99
plugh22 hmm, is pasting in the URL all you need? <script src="gist.github.com/anonymous/64b89fd9...script>
AlexDaniel m: gist.github.com/anonymous/64b89fd9...7e41ec10d8 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␤»
timotimo why is it a .js file?
AlexDaniel plugh22: ↑ like that
plugh22 ah, I see, thanks.
AlexDaniel plugh22: so what's the question?
plugh22 timo: that's the copy link from the website
timotimo oh, that's for embedding
plugh22 you can see the source code too?
timotimo usually, you'd just copy-paste the URL from the url bar of your browser 02:09
AlexDaniel sure
hotel: by the way, if you want things to mutate…
plugh22 ok. lines 7-10 are almost same as 27-30, but don't produce same output.
geekosaur most of us can just click on the url and it'll load in a browser
AlexDaniel m: my $x = ‘hello’; $x .= chop; say $x
camelia rakudo-moar d065ba: OUTPUT«hell␤»
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
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
timotimo exactly what it says
hotel wait really?
timotimo Int can't store a complex number
hotel I'm doing something else
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?)
geekosaur hotel, what's the code?
timotimo so, like @foo.list?
hotel no, because that would just make sense
timotimo perhaps @foo.Seq actually?
AlexDaniel m: gist.github.com/AlexDaniel/0876e6e...f9b05be590
camelia rakudo-moar d065ba: OUTPUT«A: (Seq)␤B: (1, 2, 5, 6).Seq␤␤C: (Str)␤D: 1␤D: 2␤D: 5␤D: 6␤»
hotel .-.
AlexDaniel oops 02:17
m: gist.github.com/AlexDaniel/0876e6e...f9b05be590
camelia rakudo-moar d065ba: OUTPUT«A: (Seq)␤B: (1, 2, 5, 6).Seq␤␤C: (Seq)␤D: 1␤D: 2␤D: 5␤D: 6␤»
timotimo hah, what $foo.per :)
it's potentially about containerness?
which WHAT will not tell you about
plugh22 the "say 'B: ', $c.perl" seems to print "B: (1, 2, 5, 6).Seq"
AlexDaniel what will tell me that then? 02:18
timotimo you can use nqp and then nqp::iscont, i'd think
AlexDaniel umm…
hotel m: my @letters = thread.comb; say @letters.Seq;
camelia rakudo-moar d065ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xD9jLiXyFo␤Undeclared routine:␤ thread used at line 1␤␤»
geekosaur hotel, I'm wondering if you have something you intended to be $i and accidentally just wrote i
hotel oops
oh you right
02:19 SHODAN left
hotel m: my @letters = 'thread'.comb; say @letters.Seq; 02:19
camelia rakudo-moar d065ba: OUTPUT«(t h r e a d)␤»
hotel well yeah but I need indices
timotimo so just .kv?
hotel .-.
timotimo m: say 'thread'comb.kv
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␤ …»
timotimo sorry
m: say 'thread'.comb.kv
camelia rakudo-moar d065ba: OUTPUT«(0 t 1 h 2 r 3 e 4 a 5 d)␤»
timotimo m: say 'thread'.comb.pairs
camelia rakudo-moar d065ba: OUTPUT«(0 => t 1 => h 2 => r 3 => e 4 => a 5 => d)␤»
02:20 noganex joined
hotel ah 02:20
again, no because that would make sense
AlexDaniel m: say ‘hello’.kv
camelia rakudo-moar d065ba: OUTPUT«(0 hello)␤»
sortiz plugh22, in line 7 try 'self.get_flat() -> $c {'
timotimo to make the $ go away?
sortiz Yep. 02:21
02:21 SHODAN joined
timotimo that makes some sense 02:21
even through my flu
AlexDaniel m: gist.github.com/AlexDaniel/0876e6e...f9b05be590
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␤␤»
plugh22 yes, that works, sortiz.
AlexDaniel m: gist.github.com/AlexDaniel/0876e6e...f9b05be590
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, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
plugh22 why is that necessary? 02:22
AlexDaniel timotimo: I declare myself blind
timotimo it'll give you a scalar container interface when you use $.foo instead of self.foo
sortiz or the alternative: " for @($.get-flat()) -> $c { "
timotimo shouldn't @$.get-flat also do it? 02:23
02:23 noganex_ left
timotimo actually ... @.get-flat should also work :) 02:23
plugh22 so 'self' makes it explicitly like line 28
AlexDaniel m: $42
camelia ( no output )
sortiz timotimo, your right. :)
plugh22 correct, timo, it does! 02:24
timotimo what's to my right? :P
sortiz *you are
plugh22 OK, that gives me a bit more insight. thanks very much.
AlexDaniel your right, my left
timotimo i am to my right? i feel like that, yeah
sortiz :P
AlexDaniel hotel: any other interesting questions before I fall asleep? :) 02:25
plugh22 OK, OK, "you're right". better? :-)
timotimo :D
hotel lol, is there an easy way to check if something is the last index of a list?
timotimo but yeah, i'm kind of sick :(
you can == @foo.end
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? :-)
timotimo it's kinda good, yeah
hotel I was gonna say something ~.~
AlexDaniel plugh22: well, you can also think about using ’ instead of '
plugh22 thanks to you all who put so much effort into it. 02:27
AlexDaniel plugh22: “you’re”
hotel thanks timotimo 02:28
02:28 colomon left
timotimo YW 02:28
02:28 colomon joined
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.␤»
teatime m: my @lst = (1..5); my $val = 5; say "It is." if $val == @lst[*]
camelia rakudo-moar d065ba: OUTPUT«It is.␤»
AlexDaniel teatime: IMO .end is more readable 02:29
teatime aha, yeah I was just looking at Array methods
"Returns the index of the last element." perfection. 02:30
and I guess there's .tail too instead of @lst[*] 02:31
02:31 diakopter______ left
AlexDaniel oh, there's a cool way to do it 02:32
hotel why is this? 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
but I dunno where that'd ever come up, as many slick ways as there are to iterate
AlexDaniel hotel: use {} instead of <>
hotel oh 02:34
AlexDaniel hotel: <> is there so that you don't have to write {'foo'}
hotel hm, it didn't like that
02:35 pierre__ left
AlexDaniel m: my @abc = <a b c>; say ‘It is.’ if @abc.keys ~~ (**, 2) 02:35
camelia rakudo-moar d065ba: OUTPUT«It is.␤»
AlexDaniel m: my @abc = <a b c>; say ‘It is.’ if @abc.keys ~~ (**, 3)
camelia ( no output )
AlexDaniel timotimo: ↑ :D 02:36
timotimo fantastic
teatime hotel: also why (%hash = $str.comb.pairs) instead of (@arr = $str.comb) 02:38
hotel good question
AlexDaniel hotel: are you trying to compare letters in alphabetical order?
hotel I'm experimenting?
AlexDaniel I mean, to test
m: my $s = ‘THREAD’; say [<] $s.comb».ord
camelia rakudo-moar d065ba: OUTPUT«False␤»
AlexDaniel m: my $s = ‘ABC’; say [<] $s.comb».ord
camelia rakudo-moar d065ba: OUTPUT«True␤»
timotimo wouldn't lt work better here? 02:39
AlexDaniel ah right
m: my $s = ‘ABC’; say [lt] $s.comb
camelia rakudo-moar d065ba: OUTPUT«True␤»
AlexDaniel m: my $s = ‘CABC’; say [lt] $s.comb
camelia rakudo-moar d065ba: OUTPUT«False␤»
hotel more like I'm implementing a permutation algorithm while trying to wrap my head around basic perl6 grammar
timotimo OK :)
hotel :) 02:40
timotimo we do have permutations and combinations built-in, btw
if you want to verify or something
hotel not at code-golf tier
>I knew it<
AlexDaniel m: say ‘abc’.comb.permutations».join
camelia rakudo-moar d065ba: OUTPUT«(abc acb bac bca cab cba)␤»
timotimo do you already know of these >>.foo and ».foo things, btw?
hotel hyper operators? 02:41
oh that's a good idea
timotimo yeah, hyper operators are cool
AlexDaniel m: say ‘abc’.comb.combinations».join
camelia rakudo-moar d065ba: OUTPUT«( a b c ab ac bc abc)␤»
AlexDaniel m: say ‘eelps’.comb.combinations».join
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)␤»
hotel still a learning experience 02:42
timotimo such is life :)
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
probably way late :)
hotel oh yeah, I was using pairs to get indices
no matter, you can't stop me >:)
AlexDaniel Is there any golfier way to do .comb ?
5 characters is a bit too much
timotimo 02:44
AlexDaniel timotimo: you mean ‘a’…‘c’ ?
timotimo well, if you're going in with something like "abc", then yeah
AlexDaniel m: say ‘a’…‘c’; say ‘abc’.comb
camelia rakudo-moar d065ba: OUTPUT«(a b c)␤(a b c)␤»
02:45 zcage joined
AlexDaniel nah, that's not gonna help most of the times, I guess 02:45
timotimo :)
02:47 pierre__ joined 02:49 mcsnolte joined
AlexDaniel timotimo: well, .NFC is one character shorter than .ords 02:50
timotimo ah, good point
however, it acts differently with regards to multi-composed characters
02:51 cpage_ left
timotimo like, comb -> ords will drop modifiers, i think 02:51
er, why am i suggesting comb + ords
AlexDaniel huggable: dunno 02:52
huggable AlexDaniel, ¯\_(ツ)_/¯
teatime timotimo: you like to be asciibetical? :)
hotel is using ords to sort lexicographically 02:53
timotimo so basically like .sort( * leg * ) ?
teatime afaik that doesn't work. in general, anyway. within ascii alnum chars, lexographically = asciibetically.
lexico, whatever
hotel well not sort per se 02:54
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)␤»
AlexDaniel ah, by the way 02:56
m: ‘foobar’.comb.sort(*leg*).say
camelia rakudo-moar d065ba: OUTPUT«(a b f o o r)␤»
AlexDaniel no whitespace required
timotimo m: 'foobar'.comb.sort(&[leg]).say
camelia rakudo-moar d065ba: OUTPUT«(a b f o o r)␤»
timotimo no * needed either
AlexDaniel timotimo: but yours is 1 character longer 02:57
timotimo right
AlexDaniel :D
timotimo: it is a good point, I like it
timotimo m: say <a b f o o r> 02:58
camelia rakudo-moar d065ba: OUTPUT«(a b f o o r)␤»
timotimo ^- even shorter
AlexDaniel I mean, &[leg]
timotimo ya
one less level of indirection
ought to be a tiny bit faster
02:59 zcage left
timotimo i really ought to sleep and get better 02:59
AlexDaniel m: say leg ‘a’, ‘b’
camelia rakudo-moar d065ba: OUTPUT«5===SORRY!5=== Error while compiling /tmp/I6966TuLix␤Undeclared routine:␤ leg used at line 1. Did you mean 'log'?␤␤»
hotel can default arguments reference other arguments?
geekosaur operator syntax
teatime I don't get it, why not 'String'.comb.sort ? 03:00
03:00 yqt left
timotimo yes, but only to their left, hotel 03:00
AlexDaniel m: say &[le](‘a’, ‘b’)
camelia rakudo-moar d065ba: OUTPUT«True␤»
hotel nice!
AlexDaniel teatime: well… um… 03:01
teatime I mean why 'String'.comb.sort(*leg*)
AlexDaniel teatime: because… well… look how cool it is!
teatime hehe
timotimo legs 03:02
AlexDaniel m: .&[le]
camelia ( no output )
AlexDaniel m: say .&[le]
camelia rakudo-moar d065ba: OUTPUT«True␤»
BenGoldberg m: [leg] <a b> 03:03
m: say [leg] <<a b>>
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…»
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␤ …»
AlexDaniel m: say ‘a’.&[leg](‘b’) 03:04
camelia rakudo-moar d065ba: OUTPUT«Less␤»
AlexDaniel m: say ‘c’.&[leg](‘b’)
camelia rakudo-moar d065ba: OUTPUT«More␤»
AlexDaniel look, you can use it like an infix! Who would've thought!
timotimo thank the lord
AlexDaniel I wonder why this does not work 03:05
m: say &[leg] ‘a’: ‘b’
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…»
timotimo maybe it only accepts literal names, instead of our magical anything-can-be-method-like
like, it also won't let you do .^ or .* or .? or something 03:06
AlexDaniel awwww, such a pity
timotimo it could be implemented to work, i assume 03:07
i'd want that to go via the toady first :)
BenGoldberg m: say &[leg]
camelia rakudo-moar d065ba: OUTPUT«sub infix:<leg> (Mu $?, Mu $?) { #`(Sub+{<anon|60139888>}+{Precedence}|40460208) ... }␤»
AlexDaniel you know what, I'll open a ticket for that
timotimo 'k
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…»
hotel darn
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…»
timotimo what do you mean by .= ?
hotel mutative assignment (?)
timotimo .= is only for method calls
m: my $a = "foo"; $a .= uc; say $a 03:10
camelia rakudo-moar d065ba: OUTPUT«FOO␤»
hotel oh
timotimo m: my $a = "foo"; $a = $a.uc; say $a
camelia rakudo-moar d065ba: OUTPUT«FOO␤»
timotimo those two are the same
hotel huh
timotimo just like $a += 5 is the same as $a = $a + 5
BenGoldberg Maybe he meant ~= ? 03:11
m: 'abcd'.list.say
camelia rakudo-moar d065ba: OUTPUT«(abcd)␤»
hotel <AlexDaniel> m: my $x = ‘hello’; $x .= chop; say $x
<camelia> rakudo-moar d065ba: OUTPUT«hell␤»
timotimo no, i think hotel meant = instead
hotel oh though I guess that is a method call too
AlexDaniel sure
timotimo yeah, that's a method call
hotel gatcha
timotimo assignment itself is already mutative :P
BenGoldberg m: my $str = 'abc'; $str.list[1] = 'd'; say $str;
camelia rakudo-moar d065ba: OUTPUT«Cannot modify an immutable Nil␤ in block <unit> at /tmp/5jq8K6iLCK line 1␤␤»
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;␤»
AlexDaniel timotimo: how was that smth $a: $b thing c
timotimo: called?
timotimo indirect object notation?
AlexDaniel yea, that
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;
camelia rakudo-moar d065ba: OUTPUT«Cannot modify an immutable Nil␤ in block <unit> at /tmp/4bCFhkV9Sn line 1␤␤»
timotimo ah the rush of endorphin when you remember a thing someone wanted to know about
do you know about the incredible thing that is substr-rw?
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
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␤hello how are you␤»
timotimo um, or not?
m: my $text = "hello how are you"; my $chunk := $text.substr-rw(5, 10); say $chunk; $chunk = "lalalala"; say $text
camelia rakudo-moar d065ba: OUTPUT« how are y␤hellolalalalaou␤»
timotimo have to bind it, otherwise it'll just read the contents of the substr-rw chunk and put that into $chunk
whereas you're interested in the container, not the contents
hotel I want to reverse a substring in place
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␤»
timotimo ^- like this? :)
AlexDaniel RT #128059 :)
hotel maybe?
trying to make sense of the output there kek 03:16
oh I see
timotimo m: my $text = "abcdefghijklmnopqrstuvwxyz"; my $chunk := $text.substr-rw(5, 10); say $chunk; $chunk .= flip; say $text
camelia rakudo-moar d065ba: OUTPUT«fghijklmno␤abcdeonmlkjihgfpqrstuvwxyz␤»
03:16 cognominal left
timotimo the first bit is just the substr 03:17
hotel yeah
03:17 cognominal joined
AlexDaniel I was going to explain why it hurts Perl 6 adoption but then thought that it is obvious anyway 03:17
hotel lol
thanks guysh
s/ks/ksh/
timotimo the what now?
AlexDaniel timotimo: I'm actually wondering if anybody besides me is using indirect object notation in real code 03:18
03:18 synopsebot6 joined
hotel what it do? 03:18
timotimo it lets you write "new Foobar: :blah(1), :bar<foo>;" instead of "Foobar.new(:blah(1), :bar<foo>)" 03:19
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
AlexDaniel m: say substr ‘abc’, 2
camelia rakudo-moar d065ba: OUTPUT«c␤»
AlexDaniel m: say substr ‘abc’: 2
camelia rakudo-moar d065ba: OUTPUT«c␤»
AlexDaniel m: say ‘abc’.substr: 2 03:20
camelia rakudo-moar d065ba: OUTPUT«c␤»
timotimo that's just calling the substr sub instead of the .substr method
hotel so it makes perl6 like other languages
AlexDaniel the first one, yes
hotel or rather it turns methods into keywords?
AlexDaniel timotimo: but it is interesting that sometimes you can change , to : :) 03:21
03:21 tardisx left
timotimo hotel: other languages usually only allow that for "new" 03:21
hotel ^^keywords
like python 2
timotimo and it's still not keywords, because in other contexts they are meaningless
hotel oh right
"cannot assign to a readonly variable or value" puu.sh/oEo1t/e2db9d46da.png 03:23
AlexDaniel makes sense 03:24
hotel what have I done?
timotimo you didn't "is rw" the parameter 03:25
hotel oh
so like sub foo($string is rw) {...}? 03:26
it worked /o/ 03:27
AlexDaniel m: sub f($string) { my $sub := $string.substr-rw(0,3); $sub.flip }; say f(‘hello’)
camelia rakudo-moar d065ba: OUTPUT«leh␤»
AlexDaniel m: sub f($string) { $string.substr-rw(0,3).flip }; say f(‘hello’)
camelia rakudo-moar d065ba: OUTPUT«leh␤»
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
timotimo i'll go to bed now. for reals. 03:29
o/
hotel night
AlexDaniel night
m: sub f { $^a.substr-rw($^b, $^c).flip }; say f(‘hello’, 1, 3)
camelia rakudo-moar d065ba: OUTPUT«lle␤»
AlexDaniel you can't have a default parameter this way though :(
well, you can
03:30 BenGoldberg left
hotel but that doesn't flip the substring in place 03:30
AlexDaniel oh
hotel though apparently neither does mine 03:31
03:31 BenGoldberg joined
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␤»
AlexDaniel m: multi f {$^a.substr-rw($^b).flip }; multi f { $^a.substr-rw($^b, $^c).flip }; say f(‘hello’, 1, 3)
camelia rakudo-moar d065ba: OUTPUT«lle␤»
hotel are double-quoted strings 'str values' as opposed to 'writable containers'?
03:32 tardisx joined, BenGoldberg left 03:33 cpage_ joined, cpage_ left, BenGoldberg joined, tardisx left 03:34 cpage_ joined
hotel interesting, it flips what it's supposed to, but leaves off most of the rest of the string 03:35
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␤»
AlexDaniel hotel: Str itself is immutable
how .substr-rw works is beyond me
hotel "magic"
unless it acts on the underlying list of characters (though I guess that doesn't exist in p6?) 03:37
AlexDaniel hotel: well, if you need a writable Str then consider Buf 03:38
hotel hm 03:39
AlexDaniel anyway, I'm going to bed now :) 03:40
see you
hotel puu.sh/oEoYK/36856f8ef4.png
same 03:41
night
03:41 hotel is now known as hotel|netteiru
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.
hotel|netteiru thanks 03:43
:P
03:45 tardisx joined, cpage_ left
teatime there's no current way to get the string '"̃' (U+0022, U+0303) to match /../ is there ? 03:46
03:47 AlexDaniel left
teatime blargh, i thought maybe if I broke it up w/ a ZWNJ, but nope 03:50
03:57 tardisx left 04:04 tardisx joined 04:14 geekosaur left 04:15 petercommand joined, petercommand left, petercommand joined 04:16 petercommand left, petercommand joined, petercommand left, petercommand joined 04:17 zostay left 04:19 zostay joined 04:20 geekosaur joined, simcop2387 joined 04:21 pierre__ left 04:28 BenGoldberg left 04:32 khw left 04:34 molaf joined 04:35 hotel joined 04:36 hotel|netteiru left 04:45 adu joined, obfusk joined 04:46 sno left 04:49 adu left
MadcapJake m: $_ = 'Awesome::Module'; say m/<.ident>+ % '::'/ 04:57
camelia rakudo-moar d065ba: OUTPUT«「Awesome::Module」␤»
MadcapJake m: $_ = 'Awesome::Module'; say m/$<type>=[ <.ident>+ % '::' ]/
camelia rakudo-moar d065ba: OUTPUT«「Awesome::Module」␤ type => 「Awesome::Module」␤»
teatime hi MadcapJake 04:58
MadcapJake hello!
just trying to lively up the channel with some camelia chatter :) 04:59
04:59 mohae left 05:01 Cabanossi left 05:04 Cabanossi joined 05:10 molaf left 05:17 _mg_ joined 05:35 pierre__ joined 05:39 huggable left, huggable joined 05:40 domidumont joined 05:41 domidumont left 05:42 plugh22 left, domidumont joined 05:44 domidumont left 05:45 domidumont joined 05:51 domidumont left 05:52 sno joined 05:54 SalamiTactics left 06:02 ufobat joined, wamba joined
ufobat good morning everyone :) 06:04
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:06
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:07
06:10 domidumont joined
DrForr 7 slides, 20 minutes of text, and I've only got to qq[} interpolation. I'm doing something wrong. 06:10
teatime oo, are you making a presentation? 06:11
DrForr Rewriting my OSCON tutorial. Assuming nothing other than C programming 06:12
06:12 CIAvash joined
DrForr Grr. Assuming nothing other than C programming skills is limiting. 06:12
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:15
oh, you said tutorial too, though.. that does require a bit more rigor, I guess 06:16
DrForr Yeah. If it were in front of a YAPC crowd I'd be already into REs. 06:18
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:20
teatime it'll be in a lab? and you'll be able to install p6 on the lab ahead of time? 06:21
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
06:23 firstdayonthejob joined
teatime argh 06:23
06:25 pierre__ left
DrForr Mmhmm. Work calling, catch y'all later. 06:27
06:29 pierre__ joined 06:33 boegel joined 06:41 mcsnolte left, firstdayonthejob left 06:47 jjido joined 06:50 rindolf joined 07:00 jjido left 07:03 rurban joined 07:04 zakharyas joined 07:10 lizmat_ is now known as lizmat 07:12 Relsak joined 07:21 rurban left 07:24 mr-foobar joined 07:31 tardisx left 07:32 Amnez777 joined 07:39 Amnez777 left, Amnez777 joined 07:44 g4 joined, g4 left, g4 joined 07:45 domidumont left 07:46 domidumont joined 07:49 pierre__ left
teatime tries to find Leon Timmermans's test/TAP stuff, learn what it's about 07:56
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 } }();"
lizmat lib/TAP.pm6
07:58 caasih left, mrsolo left, PotatoGim left, ribasushi left, llfourn left, pnu_ left, avenj left, chris2 left, PotatoGim joined, dalek left, boegel left, dalek joined, ChanServ sets mode: +v dalek, PotatoGim left, PotatoGim joined, llfourn joined, Amnez777 left, geekosaur left, simcop2387 left, zostay left, Juerd left, zacts left, TeamBlast left, hoelzro left, remmie2 left, tomboy64 left 07:59 Amnez777 joined, geekosaur joined, remmie joined, retup__ joined, hoelzro joined, zacts joined, Juerd joined, zostay joined 08:00 dustinm` joined, simcop2387 joined, tomboy64 joined
teatime thx 08:00
_nadim morning
08:00 TeamBlast joined
lizmat _nadim o/ 08:00
08:01 chris2 joined, Amnez777 left, Amnez777 joined 08:02 ribasushi joined, winger__ left 08:03 inokenty joined, winger__ joined, RabidGravy joined
RabidGravy Boom 08:03
08:03 boegel joined, winger_ joined
sortiz \o 08:05
08:06 boegel left, dakkar joined
lizmat sortiz: did you add your PROCESS:: finding to the ticket ? 08:07
08:08 mrsolo joined, winger__ left, pnu_ joined 08:09 winger__ joined, winger_ left 08:11 caasih joined, darutoko joined
sortiz lizmat, I hasn't a particular ticket. There are some similar in RT. 08:11
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
sortiz Yes, I suppose that, in all paths that use some dynamic variable, the results are the same. 08:14
I'll add the case to llfourn's RT #127034 08:15
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=127034
08:15 vaisian_ joined, cpage_ joined 08:16 pierre__ joined
RabidGravy ah, that old "closures going away" after precomp thing 08:17
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:18
sortiz RabidGravy, Yep, I found that inside them, when unserialized, PROCESS:: is null. So no dynamics. 08:19
08:19 Sgeo joined, winger__ left 08:20 winger__ joined, pierre___ joined 08:21 pierre__ left
RabidGravy yeah that's not so good 08:21
08:21 Sgeo_ left
RabidGravy actually yes, that would prevent two of my modules being used in some way that I would expect to be common 08:22
08:23 pierre___ left
RabidGravy at least two 08:23
I already know that Staticish doesn't work when pre-comped
or rather used by a module that is precomped 08:24
08:25 pierre__ joined 08:26 tardisx joined
sortiz Well, annotated in the cited ticket, lizmat. 08:28
lizmat sortiz++
teatime woah, I didn't realize you could use half of <( )>
RabidGravy also OO::Monitors doesn't work when pprecomped (because wrap doesn't work because the candidates goes away)
sortiz I hope that the PROCESS fact rings the bell to someone. :-) 08:30
08:30 uruwi left 08:31 uruwi joined
_nadim masak: going to Cluj? 08:32
lizmat afk& 08:35
08:39 winger_ joined 08:40 sortiz left 08:43 winger__ left 08:45 winger__ joined 08:49 winger_ left 08:52 winger__ left 08:53 winger__ joined, boegel joined 08:58 winger_ joined 09:01 winger__ left 09:03 boegel left 09:04 boegel joined 09:07 tardisx left 09:09 _nadim left, _nadim joined 09:24 cpage_ left 09:34 pierre__ left 09:37 domidumont left 09:38 Relsak left 09:39 huggable left, huggable joined 09:46 mr-foobar left 09:54 avenj joined, rindolf left 10:12 Actualeyes left
ZoffixWin psch, hm, a Channel won't solve the race condition on patch switches: github.com/Perl6-Noise-Gang/perl6-...e/issues/1 10:25
I was planning to solve this using OO::Monitor/OO::Actor, but had trouble using those modules. 10:26
So I left it for another day
psch ZoffixWin: fwiw, i've actually realized that the channel solution could be made to work inside Audio::PortMIDI itself 10:27
ZoffixWin: which would mean that libs using that don't have to care whether they treat it thread-safely or not
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:31 zakharyas left 10:32 zakharyas joined 10:39 Actualeyes joined
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␤»
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␤»
psch ah, found it in S12 10:46
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␤»
lizmat clickbats p6weekly.wordpress.com/2016/05/02/...-landings/ 11:08
11:15 huf_ left 11:16 rindolf joined
moritz lizmat++ 11:18
11:19 huf joined
RabidGravy moritz, is it you that has the big repository of all the ecosystem? 11:21
11:21 adu joined
moritz RabidGravy: yes 11:22
moritz/perl6-all-modules or so
RabidGravy cool, I'm just interested in finding (and testing) all the modules that use .wrap() in some way 11:23
(at some point, up to my eye-balls with todo items at the moment) 11:24
CIAvash lizmat++ 11:25
11:27 TimToady joined 11:32 telex left 11:34 telex joined 11:37 kid51 joined 11:38 sjn left 11:44 adu left 11:53 kaare_ joined 11:56 pierre_ joined 11:58 kid51 left 12:03 AlexDaniel joined
AlexDaniel m: say 25.8.base(2, 10) 12:04
camelia rakudo-moar 495e03: OUTPUT«11001.1100110011␤»
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␤␤»
AlexDaniel m: say 25.8.base(2, Inf)
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␤␤»
AlexDaniel m: say 25.8.base(2, -10)
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␤␤»
teatime waves 12:06
psch o/ teatime 12:07
ZoffixWin: can you check if github.com/peschwa/Audio-PortMIDI/...async-safe solves your instrument race issue? 12:11
12:12 pierre_ left, TEttinger left 12:14 sjn joined
sjn \o 12:14
hello, #perl6 12:15
[Coke] needs more coffee.
12:15 sue joined 12:20 pierre_ joined 12:22 ZoffixW joined
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: github.com/Perl6-Noise-Gang/perl6-...te.pm6#L35 12:26
I don't see any way to fix that from within Audio::MIDI
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
ZoffixW: oh, but yeah, i see what you mean
as in, if it fixes it it's only because nothing changes instruments often enough 12:29
ZoffixW Thread 1: | Instrument | Play note | 12:30
Thread 2: | Instrument | Play Note |
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:31
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:32
ZoffixW But why are you using enums? 12:33
psch in Music::Helpers::Note, for relative scale value
for every Cs => $octave % 12 == 1 12:34
err, s/octave/midi/
ZoffixW No, I mean, they're uncomfortable to use, IMO
AlexDaniel m: say ‘♯’.uniprop
camelia rakudo-moar e4a1b5: OUTPUT«Sm␤»
AlexDaniel awww
psch AlexDaniel: yeah, i tried that :)
ZoffixW: well, i suppose i could turn that into hash lookups instead... 12:35
ZoffixW m: sub term:<C♯> { 'C shaaarp' }; say C♯
camelia rakudo-moar e4a1b5: OUTPUT«C shaaarp␤»
psch oh, or that, yeah
didn't think of term:<>
ZoffixW I think that has a hefty overhead tho
At least custom operators do; unsure if that applies to terms too 12:36
psch adding them to the grammar does, yeah
AlexDaniel not much overhead, but a significant startup delay
psch every term clones %*LANG iirc
well, and adds itself :)
...i really can't tell the organ and guitar apart reliably in this soundfont 12:37
12:39 domidumont joined
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:39
we only guarantee that it probably won't run amok inside C code 12:40
ZoffixW psch++
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
(well, "now" there also means "as soon as the patches in async-safe land in master" :P ) 12:41
12:41 domidumont1 joined 12:42 domidumont left
dalek osystem: 511e396 | RabidGravy++ | META.list:
Move the Audio::PortMIDI to noise gang
12:44
psch locking would help, but the two OO:: helpers are probably the less fiddly approach
12:47 ribasushi left
dalek osystem: 919950f | peschwa++ | META.list:
Move Music::Helpers to noise gang
12:47
psch RabidGravy++
that redirect from github probably goes away eventually...
ZoffixW Still works for a thing I transfered 9 months ago 12:49
RabidGravy there
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
ZoffixW 🎩 12:53
13:08 pierre_ left
dalek osystem: 1207bc8 | RabidGravy++ | META.list:
Move the Audio::PortMIDI to noise gang
13:09
osystem: 2e0b1b6 | peschwa++ | META.list:
Move Music::Helpers to noise gang
osystem: 7a0cf1e | RabidGravy++ | META.list:
Move Audio::PortAudio to noise gang
osystem: c9aa28f | RabidGravy++ | /:
Merge branch 'master' of github.com:perl6/ecosystem
RabidGravy booh
13:10 ZoffixW left
lizmat commute to Amsterdam.PM meeting& 13:11
13:11 lizmat left 13:13 pmurias joined
pmurias hmmm, is there a way in nqp to get a unique identifier for a WVal? 13:23
I want to turn $!attr into this.some_unique_identifier_$!attr 13:24
jnthn Well, it's not the WVal but rather the object it references? 13:25
pmurias yes
jnthn nqp::objectid won't do it 'cus those identifiers don't survive pre-comp 13:26
13:26 rurban1 joined
jnthn Any reason not to go with the hint index? 13:26
pmurias looks that up 13:27
grondilu gladly notice that his Clifford module could solve rosettacode.org/wiki/Polynomial_reg...ion#Perl_6 in about five minutes on a VirtualBox machine :)
jnthn nqp::hintfor iirc
13:28 vaisian_ left 13:31 ZoffixW joined, rurban joined
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␤»
pmurias jnthn: it's nqp::hintfor on the MoarVM and nqp::attrhintfor on the jvm 13:33
llfourn does anyone know why postcircumfix:sym<{ }> is like "'{' ~ '}' [ <.ws> <semilist> ]". Why is it a semilist rather than a EXPR? 13:34
pmurias jnthn: it seems to be exactly what I need 13:35
jnthn Slicing
llfourn jnthn: ah.
jnthn Though not sure it works out too well on hashes just yet
13:35 rurban1 left
llfourn yep makes sense now. I've never used it before but have seen it :) 13:36
13:39 huggable left
ZoffixW ... and there goes the first casualty of my installing both perls on my linode box :P 13:41
re-
pmurias ZoffixW: what happened? 13:43
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:44
13:45 Sgeo left 13:48 rurban1 joined, rurban2 joined 13:49 rurban3 joined 13:51 rurban3 left 13:52 rurban left
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
13:52 rurban joined, rurban left, vaisian joined, huggable joined, rurban1 left 13:53 cdg joined, rurban2 left
ZoffixW That sounds like Bad Idea™ 13:54
huggable, int
huggable ZoffixW, class int [Integer (native storage; machine precision)]: doc.perl6.org/type/nativeInt
13:54 huggable left
timotimo it's not a bad idea 13:55
llfourn what does is rw the invocant of a method mean?
13:55 huggable joined
timotimo you can only call the method if the object is stored in a container 13:55
in a writable container
and inside the method you can assign to "self" or whatever you've called the invocant
substr-rw works that way
llfourn oh right. Cool didn't know that. timotimo++
ZoffixW timotimo, you should comment that on the post :) 13:56
14:01 domidumont1 left
ZoffixW My hope of my web app speed improving when running on Linode instead of my ancient 32bin laptop has dashed :( 14:01
time curl -s perl6.party:3000/; real0m10.180s
timotimo well, do you cache parsed templates now? 14:02
or do you still slurp, parse, eval every time something needs to get rendered?
at least we have the eval memory leak figured out by now
ZoffixW No, I didn't do any changes since last night... Wouldn't the that just slowly eat up all my RAM?
timotimo what? 14:03
14:03 domidumont joined
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
don't cache the result of rendering the template
there's http caches for that
like varnish or something 14:04
ZoffixW Can't do that because of layouts
Every blog post is a new "code object" really
timotimo why? just make the layout that's used a parameter for teh cache 14:05
the .tt file doesn't change, after all 14:06
14:06 firstdayonthejob joined
ZoffixW OK, I see what you mean. I'll try that. Thanks, timotimo++ 14:07
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: github.com/zoffixznet/perl6-Bailad...ed.pm6#L42
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
moritz or parse $foo into stash('foo')
or 14:10
parse it into a sub (:$foo) { return "bla bla $foo" }
s/parse/compile/
then you can cache the sub
and call it for each request
14:11 khw joined
RabidGravy wonders why his laptop has php installled on it 14:14
14:14 tharkun left
llfourn in case you need access to it when you've forgotten your password 14:15
stmuk llfourn++
ZoffixW haha llfourn++ 14:16
14:16 tharkun joined
RabidGravy :) 14:17
14:18 skids joined
ZoffixW time curl -s perl6.party:3000/; real0m0.379s 14:18
:D
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
14:19 skids left
ZoffixW I guess that's due to no asynchrony 14:19
llfourn it's pretty fast for me :)
RabidGravy Hmm opam is weird, it has separate update and upgrade steps 14:20
ZoffixW ROFL. Funniest HTTP header I've seen: X-Hello-Human: You should work for us! Email: [email@hidden.address] or @MaxCDNDeveloper on Twitter 14:21
moritz ZoffixW: expose it through an Apache or nginx reverse proxy, and use that to serve static files
ZoffixW That's one way to do it, yeah
RabidGravy okay opam is definitely weird 14:30
stmuk is there a single line perl 6 web server yet?
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 :)
RabidGravy stmuk, depends on how wide your terminal is
stmuk 80 columns like $deity intended :P 14:32
cosimo ZoffixW: then you haven't seen vg.no 14:34
14:36 sortiz joined 14:38 xiaomiao is now known as DrEeevil
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␤»
ZoffixW dammit
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:43
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␤106␤46␤105␤116␤46␤97␤98␤47␤121␤110␤120␤102␤114␤103␤110␤103␤103␤46␤117␤103␤122␤121␤www.vg.ao/l{kset{tt.html␤»
ZoffixW huh
Way to look a l33t haxor, Zoffix, but copy-pasting the wrong variant and losing the right noe
Oh, nm, there's a buglet 14:47
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␤␤»
moritz m: "uggc://jjj.it.ab/ynxfrgngg.ugzy".trans('a-z' => 'n-za-m')
camelia ( no output )
moritz m: say "uggc://jjj.it.ab/ynxfrgngg.ugzy".trans('a-z' => 'n-za-m')
camelia rakudo-moar ec6c3b: OUTPUT«uggc://jjj.it.nb/ynxfrgngg.ugzy␤»
moritz m: say "uggc://jjj.it.ab/ynxfrgngg.ugzy".trans('a..z' => 'n..za..m') 14:51
camelia rakudo-moar ec6c3b: OUTPUT«www.vg.no/laksetatt.html␤»
ZoffixW :o
14:51 vaisian left
ZoffixW Yeah, mine had an off-by-one. > and < instead of >= and <= 14:51
cosimo, that page is blank tho.. does the puzzle continue elsewhere? :)
cosimo ZoffixW: look harder 14:52
ZoffixW K, I will :D
Found it :D This is fun! \o/
14:52 prammer left 14:53 ptolemarch joined
ZoffixW Heh, well, I got to here, but I guess this is a test for whether you can speak Danish :P www.vg.no/opswork/ 14:54
14:54 sufrostico joined
moritz "Heisann du, har du lyst til å jobbe i VG?" 14:55
ZoffixW: Norwegian, actually :-)
psch ...also the ticket on the right of course
moritz "Hey there, would you like to work for VG?"
psch err, ticker :) 14:56
ZoffixW Did I just get rickrolled by an HTTP header? :o
psch and it even made you *work* for it :P 14:57
14:57 g4 left
ZoffixW :P 14:57
14:58 mohae joined
moritz
.oO( ricktrolled )
15:01
jnthn
.oO( more like rickcruited, no? :) )
15:02
moritz rickcruited.no
15:05 marcusramberg joined 15:07 prammer joined
cosimo :) 15:08
15:18 lichtkind__ joined 15:22 lichtkind_ left
stmuk pl6anet.org/drop/rakudo-star-2016.0...T)-RC0.msi 15:24
15:27 prammer left 15:29 prammer joined, skids joined 15:32 ZoffixW left
masak good prevening, #perl6 15:32
15:34 _mg_ left
teatime masak: I have been reading your blog for hours 15:34
... I think this is yours
15:34 diakopter____ joined
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
www.nap.edu/download.php?record_id=21886 15:36
Anyway
15:36 wamba left
masak teatime: for hours? maybe you should take a short break... ;) 15:38
15:39 dupek joined
dupek hi 15:39
teatime masak: lol. it's been quite intermittant.
it's very interesting, you really know your stuf 15:40
s/$/f/
masak I really don't... :P
but thanks
RabidGravy wonders why Audio::Libshout intermittently fails 1 test on attempting to connect 15:42
wonder if icecast takes time to "warm up" if it get swapped out 15:45
15:47 vaisian joined
dupek hi 15:55
?
psch hi dupek :) 15:56
15:57 pmurias left
dupek how can I help your Linux 15:57
I want to be involved 15:58
15:58 rurban joined 15:59 pmurias joined
psch dupek: rakudo.org/how-to-help/ is an overview how you can help 16:00
dupek thank you my friend
16:00 molaf joined 16:04 tharkun left, tharkun joined 16:09 prammer left 16:11 rurban1 joined 16:12 rurban2 joined, milwaukee joined 16:13 wamba joined 16:15 rurban left 16:16 rurban1 left
Xliff_ diakopter____, What xkcd cartoon was that? 16:17
16:17 sue left, domidumont left 16:18 dwarring left 16:22 sue joined
masak dupek: welcome! 16:31
16:36 CIAvash left 16:37 CIAvash joined
RabidGravy somebody be a love and make an ssh client library 16:39
16:41 ZoffixW joined
ZoffixW stmuk, panda install is broken 16:41
sortiz RabidGravy, What is the status of openssl bindings?
ilmari NativeCall + libssh2? 16:42
16:42 sno left
ZoffixW Umm. wtf is it using M:/ drive for install -_- 16:42
16:42 lostinfog joined
ZoffixW stmuk, full error. M: drive is a network mount; it should never have even touched that drive in the first place. gist.github.com/zoffixznet/0ee7e90...420dec3ecf 16:43
RabidGravy ilmari, so you can have that done by the time I've done this other thing?
ilmari RabidGravy: hawhahaaa 16:44
RabidGravy sortiz, well it works for https :)
16:45 prammer joined
sortiz RabidGravy, thanks. 16:45
16:45 rindolf left, dakkar left 16:46 rurban2 left
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:47
16:47 prammer left
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:48
16:49 prammer joined
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 :/
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
Maybe that's why it's called M:
16:51 prammer left 16:52 prammer joined
ZoffixW Ah, I see "HOMEDRIVE => M" in settings... Better not mess with it then 16:53
16:54 zakharyas left
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
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
stmuk ZoffixW: did it work for basic perl6 commands
16:57 abraxxa left
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
stmuk ZoffixW: hmm I'll going to spin up a clean VM to double check I think 16:58
16:58 atweiden joined
ZoffixW I love that Foundation's website is pretty broken in my browser :) 16:59
RabidGravy :) 17:00
stmuk not sure why it uses M:/ I'd assumed it was hard coded to C:\
dalek ecs: 5ce9cab | titsuki++ | html/index.html:
Fix a site search function
ecs: 1c7f86e | titsuki++ | html/index.html:
Merge pull request #109 from titsuki/fix-sitesearch-function

Fix a site search function
stmuk ZoffixW: so panda was broken 17:01
17:01 sufrostico left
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:03
17:05 domidumont joined
grondilu m: my $i = 0; given -> { $i } { say .(); $i = 1; say .() } 17:06
camelia rakudo-moar ec6c3b: OUTPUT«0␤1␤»
grondilu m: my $i = 0; given -> { +$i } { say .(); $i = 1; say .() }
camelia rakudo-moar ec6c3b: OUTPUT«0␤1␤»
atweiden does anyone know of an alternative to the `my @.entries` aspect of `class TXN::Parser::Actions { my @.entries }` ?
grondilu m: my $i = 0; given -> { 0+$i } { say .(); $i = 1; say .() }
camelia rakudo-moar ec6c3b: OUTPUT«0␤1␤»
atweiden my @.entries works, but it mucks things up when you want to instantiate multiple independent Actions classes
ugexe try running the command from M:\ itself
it may be using a relative path somewhere and your current volume gets tacked on
grondilu how do I "unclose" a variable in a closure?
17:06 lizmat joined
grondilu m: my $i = 0; given -> { $i**1 } { say .(); $i = 1; say .() } 17:07
camelia rakudo-moar ec6c3b: OUTPUT«0␤1␤»
17:07 ambs_ is now known as ambs
grondilu m: my $i = 0; given EVAL '-> { $i }' { say .(); $i = 1; say .() } 17:07
camelia rakudo-moar ec6c3b: OUTPUT«0␤1␤»
ZoffixW atweiden, mucks up how? 17:08
grondilu m: my $i = 0; given EVAL '-> {'~$i~' }' { say .(); $i = 1; say .() }
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…»
ZoffixW atweiden, just $.entires will probably work too
psch atweiden: "has" vs "my"
grondilu m: use MONKEY-SEE-NO-EVAL; my $i = 0; given EVAL '-> {'~$i~' }' { say .(); $i = 1; say .() }
camelia rakudo-moar ec6c3b: OUTPUT«0␤0␤»
ZoffixW Ah right
grondilu ^can I do that without a EVAL?
17:08 rurban joined, mcsnolte joined 17:09 sue left
atweiden ZoffixW: inside a *.t test file, it prevents me from parsing different files. i would have to separate them out 17:09
for users it could get aggravating
ZoffixW atweiden, you should use `has` not `my` for attributes
atweiden ZoffixW: tried that. trouble is i'm recursively instantiating the Actions class from within the Actions class 17:10
this is the first way i've found to extract all the data
grondilu m: my $i = 0; given -> $i { -> { $i } }($i) { say .(); $i = 1; say .() }
camelia rakudo-moar ec6c3b: OUTPUT«0␤0␤»
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)`
ZoffixW m: class Foo { my @.actions }; say Foo.new(:actions<foo bar ber>).actions 17:13
camelia rakudo-moar ec6c3b: OUTPUT«[]␤»
17:13 domidumont left
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
atweiden the only other grammar i've seen do something similar is =github.com/dnmfarrell/Pod-PerlTricks
psch ZoffixW: local to the scope of the class, not any given object
atweiden (for the include block) 17:15
ugexe m: role Foo { my @.bar = 1; }; class XXX does Foo { }; say Foo.new.bar
camelia rakudo-moar ec6c3b: OUTPUT«[1]␤»
ZoffixW m: class Foo { has @.actions }; my $f = Foo.new; my $z = Foo.new; $f.actions = <foo bar ber>; say $z.actions;
camelia rakudo-moar ec6c3b: OUTPUT«[]␤»
ZoffixW m: class Foo { has @.actions }; my $f = Foo.new; my $z = Foo.new; $f.actions = <foo bar ber>; say $f.actions;
camelia rakudo-moar ec6c3b: OUTPUT«[foo bar ber]␤»
ZoffixW psch, but what's with the twigil? And the above tells me it's per-instance. 17:16
17:16 _mg_ joined
psch ZoffixW: that above is 'has' :) 17:16
m: class Foo { my @.actions; }; my $f = Foo.new; my $z = Foo.new; $f.actions = <foo bar ber>; say $z.actions;
camelia rakudo-moar ec6c3b: OUTPUT«[foo bar ber]␤»
ZoffixW >_<
I need to take a break lol
psch the .-twigil just means "generate an accessor" 17:17
ZoffixW K, so my with a twigil makes a class variable and.... yeah that :)
psch m: class Foo { my @.actions; method actions is rw { @!actions } };
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␤»
psch ^^^ :)
ZoffixW m: class Foo { has @.actions; method actions is rw { @!actions } };
camelia ( no output )
ZoffixW Why doesn't this give an error? 17:18
masak because sometimes you want to override the default accessor
it's quite common
ZoffixW Why does it give an error for my @.actions? :)
grondilu m: multi infix:<+>(&f, &g) { -> |c { f(|c) + g(|c) } }; say (&abs + &sqrt)(pi); # I wonder if that is efficient
camelia rakudo-moar ec6c3b: OUTPUT«4.91404650449531␤»
ugexe i never thought to do it like that, i always used a method
17:18 sufrostico joined
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.
masak also, for the record, moritz++ doesn't like the `my $.attr;` form of declaration :) 17:20
atweiden there's also `our $.attr`
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;
camelia rakudo-moar ec6c3b: OUTPUT«[]␤»
atweiden couldn't tell the difference
jnthn lexical vs package scope
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
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␤␤»
masak m: class C { our $.foo = 42 }; say C.new.foo; say $C::foo
camelia rakudo-moar ec6c3b: OUTPUT«42␤(Any)␤»
masak hm. didn't expect that :) 17:22
17:22 diakopter____ left
masak ZoffixW: I would advise never using the `has @actions` form. 17:22
ZoffixW: it's confusing. better to be explicit and write `has @!actions`
if that's what you mean
grondilu what would you think about making things like &f + &g work? I mean about doing it in the core? 17:23
ZoffixW k
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 :)
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
masak grondilu: I would be very much against it
17:23 sftp left
psch if anything o could be a meta op 17:24
grondilu we have o already
psch well, except that's semantically a bit away
jnthn Whereas for the my/our case it does nothing but create the method
psch grondilu: right, but i'm thinking e.g. &f o[+] &g
grondilu I'm not sure what that means 17:25
psch but as mentioned, it's semantically not quite the same
grondilu m: say &abs o[+] &sqrt
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
psch m: say (1,2) Z+ (3,4) 17:25
camelia rakudo-moar ec6c3b: OUTPUT«(4 6)␤»
psch in that sense
Z is a metaop to + there
and o would be a metaop to + in my previous example 17:26
...but still, it's probably not close enough to the actual meaning of o
17:26 prammer left
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?
psch well, the original question was about (&f + &g)($x) meaning &f($x) + &g($x), no?
ZoffixW m: my &abs-sqrt = &sqrt ∘ &abs; say abs-sqrt -4
camelia rakudo-moar ec6c3b: OUTPUT«2␤»
ZoffixW Neat \o/
psch and i had (not) thought (enough about it and thus) proposed o as metaop to do that 17:28
17:28 prammer joined
psch err 17:28
(1) i had thought o as metaop could do that
grondilu multi infix:<+>(&f, &g) { -> |c { f(c) + g(c) } } # is what I'm thinking of
psch (2) i thought more about it and realized it doesn't mean the same as o
masak grondilu: completely fine outside of core, in someone's lexical scope
psch and, really, isn't even close enough to could be allowed to mean that... :)
grondilu what about "AlgebraicSubs" as a name? 17:29
(sounds dumb)
masak grondilu: FunctionAddition :)
grondilu it would not just be for addition 17:30
but all arithmetics
"FunctionArithmetics" I guess
what a mouthful though
17:30 rurban left
psch m: say [+] .abs, .sqrt given pi 17:31
camelia rakudo-moar ec6c3b: OUTPUT«4.91404650449531␤»
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
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…»
psch ...
ZoffixW psch++
grondilu maybe: use ExtraArithmetics :functions;
17:33 ZoffixW left 17:35 Spot__ left, ggherdov left
grondilu FYI I'm considering something like that for my Clifford module in order to generate code without using EVAL 17:36
17:37 _notbenh is now known as notbenh, peteretep joined
RabidGravy concludes that all "web front end frameworks" are a bunch of poo 17:37
psch m: say [+] (&abs, &sqrt)>>.(pi) 17:38
camelia rakudo-moar ec6c3b: OUTPUT«4.91404650449531␤»
17:38 Spot__ joined 17:39 notbenh_ joined
masak RabidGravy: I wouldn't go that far. 17:39
17:40 ggherdov joined
RabidGravy it's a working generalization until I find one that I can use 17:40
grondilu
.oO( use SubArithmetics; )
17:41
.oO( that would exclude Blocks though )
17:42
.oO( use CodeArithmetics; )
17:45 pmurias left
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.
I guess what I'm saying is that if someone were to un-spec `leave`, then I wouldn't be bothered ;)
(though I've always liked the "bequeath to successor" line) 17:47
17:47 _mg_ left
perlpilot masak: just the sub form is NYI? or both the method and sub forms? 17:48
masak m: my &b = { &b.leave }; b() 17:50
camelia rakudo-moar ec6c3b: OUTPUT«Method 'leave' not found for invocant of class 'Block'␤ in block <unit> at /tmp/vk9rL9S2F0 line 1␤␤»
masak um. is that how you'd use the method form? :)
psch ...i'm not sure i even understand what leave does o.O 17:53
it return from somewhere higher in the callstack?
*returns
timotimo that's what, yeah
17:53 prammer left
masak in its simplest form, it returns from the block you're in 17:53
like `if 1 { leave; say "A" }; say "B"` would print just "B\n" 17:54
perlpilot psch: S04:1177
synopsebot6 Link: design.perl6.org/S04.html#line_1177
dalek c: 1817f26 | titsuki++ | doc/Language/faq.pod:
Add an OpaquePointer section to the FAQ page
c: 927baef | titsuki++ | doc/Language/faq.pod:
Merge pull request #490 from titsuki/add-opaquepointer-faq

Add an OpaquePointer section to the FAQ page
17:54 prammer joined 17:55 huggable left
psch perlpilot: yeah, that's where i went 17:55
probably mostly hard to think of a use-case which stumped me there for a moment
...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 :)
masak `leave` is the `return` for blocks
17:56 prammer left
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 :>
I don't know of a real-world use case for it
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.
timotimo aye
or they'll end up turning it into a sub instead
psch as in, has similar application as goto for e.g. error handling
timotimo we also don't have a lot of goto yet 17:59
psch in C that is
perlpilot masak: there may even be people right now that are just structuring their code differently because there is no leave implemented
masak I remain unconvinced that that's a bad thing ;)
psch wonders if that translates to macros
masak ...no
timotimo masacros are a good feature to have 18:00
perlpilot masak: yeah, it's weak argument for keeping leave
no one is clamoring for goto either, are they? 18:01
18:01 prammer joined
psch i remember one person coming in here a few times and asking about goto, maybe a year ago..? 18:01
so, pretty much "no, they aren't"
timotimo i've gotten used to not having goto, but it's annoying sometimes
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:02
camelia rakudo-moar ec6c3b: OUTPUT«-1+1.22464679914735e-16i␤»
grondilu internally roll eyes at Complex behing stuck to floating points
18:02 ZoffixW joined
ZoffixW I would love to have leave. Returning from code blocks is good 18:03
grondilu agrees
ZoffixW Does it return the value? If yes, then even a few hours ago I could've used it in a map {} block
timotimo yeah, it returns the value 18:04
18:04 prammer left
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␤␤»
ZoffixW m: say ^10 .map: sub { $^a %% 2 and return $^a; $^a.sqrt }
camelia rakudo-moar ec6c3b: OUTPUT«(0 1 2 1.73205080756888 4 2.23606797749979 6 2.64575131106459 8 3)␤»
ZoffixW m: sub { $_ = 42; .return }().say 18:06
camelia rakudo-moar ec6c3b: OUTPUT«42␤»
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.
ZoffixW :o
masak grondilu: if we could parameterize Complex, we could have Complex[Complex], and we'd get hypercomplex numbers for free! :P
ZoffixW .return is not documented
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␤ …»
atweiden is it possible to access ABC.a from DEF?
skids I chafe more about $loop-return-value.last being missing TBH.
18:07 _mg_ joined
perlpilot atweiden: not without an instance 18:08
18:08 cdg left
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.
perlpilot ZoffixW: at least they're implemented! :)
ZoffixW :)
18:09 prammer joined
grondilu If I ever manage to make my Clifford module performant I'll totally harass you guys to put it in the core. 18:10
- do your language support complex numbers? - complex numbers? Pff. We have full Clifford algebra support in the core. 18:12
(that'd be pretty cool) 18:13
ZoffixW has no idea wtf Clifford algebra is :P
timotimo was clifford the name of the dood who found the 4-part number arithmetic?
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
timotimo not arithmetic, algebra
sorry
ZoffixW m: goto end; end (); end: say end( end () )
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␤ …»
ZoffixW weird error, no?
masak timotimo: no, that was William Hamilton 18:15
timotimo: he carved it into a bridge.
[Coke] ZoffixW: there is already a ticket about goto, labels, and names.
ZoffixW Cool.
m: say end ( ) and end end end ( ) and end end + end ( ) 18:17
camelia rakudo-moar ec6c3b: OUTPUT«-1␤»
18:17 Actualeyes left
ZoffixW ^_^ 18:17
[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>␤»
[Coke] m: say and and and or and
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␤␤»
[Coke] stops before he goes off the rails. :)
masak .oO( Did you mean 'Ayn Rand'? ) 18:19
moritz she should have been called "rant", really :-)
El_Che ahaha
grondilu m: use Test; is-approx 2+1e-16, 2;
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/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 251␤ in block <unit> at /tmp/GdYM4lm9FH line 1␤␤»
grondilu ^shouldn't that work?
m: use Test; is-approx 2+1e-16, 2, "about two"; 18:20
camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - about two␤»
ZoffixW grondilu, desc is not optional because it also takes tolerance IIRC
m: use Test; is-approx 2, 4, "about two", 10 18:21
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-…»
ZoffixW Oh
perlpilot yeah, is-approx is a little wonky
it needs some love
18:22 pomJ joined
perlpilot m: use Test; ok 2+1e-16 ≅ 2; 18:22
camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - ␤»
perlpilot m: use Test; ok 2+1e-16 =~= 2; # Texas
camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - ␤» 18:23
grondilu here we go, new module: github.com/grondilu/block-algebra
ZoffixW m: use Test; is-approx 2+1e-16, 2, 1e-6, "about two";
camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - about two␤»
ZoffixW That's so weird. That's literally the call for is approx $given, $wanted;
Well, almost literally :P
psch m: use Test; is-approx 2+1e-16, 2, :abs_tol(1e-10) 18:24
camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - ␤»
psch m: use Test; say &is-approx.candidates>>.signature[1,2]
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 = ""))␤»
psch m: use Test; is-approx 2+1e-16, 2, :0abs_tl
camelia rakudo-moar ec6c3b: OUTPUT«Unexpected named parameter 'abs_tl' passed␤ in sub is-approx at /home/camelia/rakudo-m-inst-1/share/perl6/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 226␤ in block <unit> at /tmp/oOiE12Ul8t line 1␤␤»
psch m: use Test; is-approx 2+1e-16, 2, :0abs_tol 18:25
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/sources/C712FE6969F786C9380D643DF17E85D06868219E (Test) line 251␤ in block <unit> at /tmp/rt9JRsfow5 line 1␤␤»
ZoffixW I see the issue
This multi is never called: github.com/rakudo/rakudo/blob/nom/...t.pm6#L226 18:26
You get the one with all the named args, with them set to default.
18:27 rindolf joined
psch m: use Test; is-approx 2+1e-16, 2, '' 18:27
camelia rakudo-moar ec6c3b: OUTPUT«ok 1 - ␤»
AlexDaniel TimToady: I did not expect such serious answer for that bug report. Thank you 18:28
TimToady :)
I was sitting in my writing group, so I got carried away... :) 18:29
ZoffixW Where can I read it? :)
AlexDaniel ZoffixW: rt.perl.org/Ticket/Display.html?id=128059
ZoffixW is-approx rakudobug: rt.perl.org/Ticket/Display.html?id=128063 18:31
[Coke] TimToady, if you could just reject another 50 tickets or so while you're in there... :) 18:33
18:33 macsnowball joined
ZoffixW :) 18:33
18:34 jjido joined
AlexDaniel [Coke]: what tickets exactly ಠ_ಠ 18:34
:D 18:35
actually I don't remember when was the last time I went through my tickets… there are probably some that I'd close myself
[Coke] any of the NYI/RFC/TODO/SPEC/STD might be up for review. 18:36
AlexDaniel: I can give you a list of RTs of your open tickets if you like. :)
AlexDaniel [Coke]: I have it
18:38 ZoffixW left
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
could you help me
[Coke] dupek: possibly. What's up?
AlexDaniel [Coke]: by the way, another way to do it is to use simple search 18:39
[Coke]: like this: rt.perl.org/Search/Simple.html?q=a...il.com+any
dupek [Coke], I know C++ quiet well but I looking a way to find a perl job 18:40
perlpilot dupek: jobs.perl.org
[Coke] AlexDaniel: I am now dedicated to using the CLI.
dupek that's crazy shit I don't know there some junior jobs
and how should I start 18:41
AlexDaniel [Coke]: there is a CLI for RT?
perlpilot dupek: also, this is for the Perl 6 language and you likely want Perl 5
[Coke] jobs.perl.org, there's a FB group, there's a linkedin group.
dupek no I want Perl6
job
moritz we all want that :-)
AlexDaniel I don't think that there are many Perl 6 jobs right now
[Coke] dupek: There is no community or site dedicated to perl 6 jobs yet.
dupek mmm
Perl5 sucks 18:42
I think
why just don't use the Perl6
as Python2 and Python3
perlpilot dupek: Python2 and Python3 are largely the same. This is not the case between Perl 5 and Perl 6. 18:43
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
thats a lot of legacy Objective C code
and now all are going rewritten to Swift
perlpilot, thats sucks argument 18:45
RabidGravy well, make code that people use
[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.
Anyway, sorry we can't help at the moment. Keep using Perl 6, thanks. 18:46
dupek :(
masak dupek: kudos for inner motivation! keep it up!
dupek are you all working Perl5?
for everyday
masak nope 18:47
dupek and Perl6 is just hobby
ohh ok
dalek c: 81e5898 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/faq.pod:
“has replaced with” → “has been replaced with”
RabidGravy I've written Perl 6 code every day for the last 115 days
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
dupek: I currently have two Perl 6 web things online on the web, serving content 18:48
dupek how nice
18:48 CIAvash left
dupek masak, so you are going to slow switch 18:48
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
masak dupek: just because I really like Perl 6 doesn't meant I want to nuke Perl 5 from orbit
grondilu m: { -> $x { $^y } }
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 } }␤»
masak dupek: as a Perl 6 programmer, I can still proudly say, sometimes Perl 5 is (still) the right tool for the job
dupek masak, ok so you advice to learn Perl5 18:50
and take job in it
and do Perl6 beside
masak dupek: you could do worse, yes
dupek aside
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 sufrostico left
dupek how about Perl5 jobs 18:50
do you think I can switch to it quick? 18:51
AlexDaniel depends!
perlpilot dupek: we don't know anything about you really. It all depends on you.
dupek ok
masak dupek: are you able to get ahold of a recent edition of the Camel book?
RabidGravy well I've written Perl 5 code professionally on and off for twenty years
DrEeevil perl jobs still exist, but they are not as easy to find as others 18:52
dupek masak, sure
masak, do you mean Perl Modern Approach?
perlpilot DrEeevil: I dunno grant street group and booking are always hiring perl devs. 18:53
masak dupek: no, I mean "Programming Perl"
DrEeevil perlpilot: yes, but would you want to work there? ;)
mst or start with chromatic's 'Modern Perl'
masak or that
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
perlpilot DrEeevil: the question was about how hard it was to find a perl job, not about the quality of the company :)
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
DrEeevil perlpilot: so why not php? ;)
dupek masak, Modern Perl is Better than Programming Perl 18:55
masak dupek: different axes, I'd say
RabidGravy no, different
dupek cause I found one by 2012
it is pretty old
masak dupek: just make sure to pick a recent edition of Programming Perl
then you're good
18:55 pomJ left
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 ;)
RabidGravy I've got a programming perl from 1991
lucs The pink one!
RabidGravy yeah
perlpilot RabidGravy: is it falling apart like mine?
RabidGravy yeah 18:57
El_Che o'reilly safari made my book collection age
RabidGravy with pizza on it
masak .oO( you're supposed to read it, not eat pizza on it! )
18:58 pmichaud joined
pmichaud good afternoon, #perl6 18:58
perlpilot pmichaud!
masak pmichaud! \o/
RabidGravy (I actually have three PPs)
perlpilot pmichaud: is robot season over? 18:59
pmichaud robot season is finally over. :)
dupek ok so
19:00 sno joined
dupek Programming Perl 2012 + Moose 19:00
I should learn it and come back here
perlpilot dupek: more like go to #perl
masak on irc.perl.org
19:00 [TuxCM] joined
masak (but feel free to stay here too) :) 19:00
dupek :D
masak, are you staying there too? 19:01
masak dupek: oh, definitely!
timotimo oh, 2012 is new enough?
masak dupek: I've been here a _long_ time
dupek masak, what about CSS and HTML
perlpilot timotimo: it's the most recent PP I believe
dupek javascript
masak dupek: oh, staying *there*? no, just here, sorry ;)
dupek are you expert?
moritz dupek: please stop that.
timotimo OK
moritz throwing languages in here without any context
dupek moritz, I am asking cause Perl is more popular in web technologies 19:02
so I suppose I need to know this
to get Perl job
masak dupek: I do web, yes. HTML/CSS/JavaScript are indispensible if you do web.
dupek: you can do Perl without them, though.
sysadmin, for example
dupek ok 19:03
19:03 dwarring joined
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
dupek ok
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?
masak vim :)
perlpilot dupek: linux ;)
dupek :D
masak perlpilot++
timotimo padre? atom?
emacs?
dupek I can't use linux :/
I use atom right now and vim
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)
dupek ok, I am going to learn a bit ;-) new tool 19:06
stmuk vim or maybe emacs/evil
timotimo if you do perl on linux many things make more sense than they would on windows 19:07
19:07 bitmap left
masak I remember really liking the cperl mode in emacs 19:07
yes, I really recommend learning Linux
timotimo at the beginning it'll hardly make sense, though
like, how do you even start "with linux"? 19:08
make a few directories and cd through them?
is that how to learn linux?
masak yes!
timotimo maybe touch a file or two
dupek I use Linux in my job and I am big fun of it
moritz timotimo: don't forget to mount and fsck :-)
stmuk I think one of the BSDs is probably better for beginners and then migrate to Linux
since the man pages are better
dupek but suddenly I get a Mac as gift
;D
and I hate VMs 19:09
perlpilot dupek: OSX is good too, very unixy ;)
dupek it is better than M$
perlpilot indeed
[Coke] pmichaud: HIO! 19:10
mst for perl5 you wanted #perl
mspo vim is also a great presentation tool if you're TimToady
mst mspo: or ingy
timotimo oh! pmichaud is here, cool
masak we're saved! :)
19:10 lichtkind__ is now known as lichtkind
jdv79 from what? 19:11
mst me
moritz from the evils of the world
masak an acute pmichaud deficit
jdv79 oh ok
timotimo yeah, which is basically mst
pmichaud o/
RabidGravy poor mst
grondilu managed to do code generation without EVAL. Functional programming FTW :) Look at the end of this file: github.com/grondilu/clifford/blob/...imized.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 :-)
pmichaud I can leave, if that helps. :) 19:13
[Coke] oh, I have a whole list of tickets, just name your poison. :)
masak I wasn't complaining about `leave` not being implemented :P
pmichaud rather than jump into dev I'm just going to follow conversations and see what intrigues me.
masak I said I wasn't missing it much!
timotimo glad you're hanging out, pmichaud 19:14
perlpilot masak: close enough. ;)
timotimo did you follow all the nice changes we have made in the mean time
well, not necessarily all of them
pmichaud right now I'm also upgrading all of my systems and generally cleaning up my house/computers/life
masak pmichaud: you've been away for a long time. we're on Perl 8 now.
pmichaud masak: I have a sekrit Perl 9 started.
timotimo but there have been highlights, like NFG and such
masak I *knew* it!
lucs From Outer Space? 19:15
19:15 zakharyas joined
RabidGravy so speaking of web technologies who wants to tosh up the noise gang page a bit 19:15
timotimo what does it need?
RabidGravy de=uglying
jnthn Bootstrap. 19:16
timotimo hehehe 19:17
jnthn (No, I didn't volunteer. :P)
timotimo what are the other ones called?
19:17 jevin joined
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
and I've tried skeleton on a trial basis elsewhere
[Coke] ooh, my mac just black-screen-of-death'd.
timotimo ah, foundation is one i remember
jdv79 what's a noise gang?
RabidGravy perl6.noisegang.com/ 19:19
super sekrit cabal
timotimo we are quite exclusive and exquisite
and our skin is oh-so soft
masak mst: I especially like the part where you called the stakeholder a fucko
timotimo in my imagination, being a stakeholder is rather dangerous 19:20
like, you have to hold the stake while it gets burned?
19:20 ZoffixW joined
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?
RabidGravy if you're a vampire it is
masak timotimo: it's for a barbecue after the software's been shipped 19:21
timotimo ah
i've never experienced that situation :P
i'm a terrible software engineer
masak timotimo: we prefer the term "job security" 19:22
timotimo :D
stmuk its the people who think they are good software engineers you want to avoid
timotimo i'm a hazard to myself ~ don't let me get me ~ 19:23
mspo I think you mean software artisans
masak right, the bigger the island of knowledge, the longer the shoreline of wonder
timotimo i'm my own worst software engineer ~
masak unless you're on a sphere, then the shoreline actually starts to shrink after a while
timotimo that's what "word smart" means?
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?
timotimo "brain the size of a planet and they're asking me to ..." :)
19:25 bitmap joined
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
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
perlpilot hyperbolic planes fly higher than *anything*
RabidGravy ZoffixW, this is why I made App::ModuleSnap 19:27
ZoffixW looks
stmuk RabidGravy: does that snapshot the git version?
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?
ZoffixW Oh, right. perlpilot++
That'll do
timotimo don't even need to build a fake dist on github 19:29
locally should work fine, too, no?
perlpilot yeah
ZoffixW My whole point is this can't be local :P
timotimo oh
'k
perlpilot but if you're not going to share, a local fake dist would be just fine :) 19:30
ZoffixW Yeah :)
RabidGravy well that is the sub-text of the module, create the meta dist stick it somewhere install it
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?
RabidGravy I nuke frequently
grondilu ouch: 19:32
988*** glibc detected *** /home/travis/.rakudobrew/moar-nom/install/bin/moar: double free or corruption (!prev):
timotimo uh oh :) 19:33
19:34 hoelzro left, hoelzro joined 19:35 cpage_ joined 19:37 _mg_ left 19:40 rindolf left 19:42 sno left, jjido left, atweiden left, kaare_ left, _nadim left, cognominal left, au_ left, mindos left, Xliff_ left, k-man left, Brock left, yasnothil left, infina left, ZoffixW left, prammer left, lizmat left, skids left, winger_ left, uruwi left, darutoko left, petercommand left, colomon left, TreyHarris left, breinbaas left, pecastro left, Timbus left, JimmyZ left, nightfrog left, ZoffixWin left, stmuk left, mspo left, jamesnek1 left, masak left, richi235 left, pRiVi left, vendethiel left, psch left 19:43 ZoffixW joined, spider-mario joined
RabidGravy boom 19:43
ZoffixW Dam splits
<ZoffixW> Any idea why I'm having this issue with zef? github.com/ugexe/zef/issues/86
<ZoffixW> What's strange is I updated my linode box this morning (I think) and this issue did not appear :\
Right now I'm connected to Freenode twice... using ZoffixW in both connects :P
19:45 nchambers is now known as mute, mute is now known as nchambers 19:46 M-Illandan1 left 19:50 ZoffixW left 19:51 prammer joined, lizmat joined, skids joined, winger_ joined, uruwi joined, petercommand joined, colomon joined, TreyHarris joined, breinbaas joined, pecastro joined, Timbus joined, JimmyZ joined, nightfrog joined, ZoffixWin joined, stmuk joined, mspo joined, jamesnek1 joined, masak joined, richi235 joined, pRiVi joined, vendethiel joined, psch joined, [particle] joined, ChoHag joined, mattp_ joined, tadzik joined, sunnavy_ joined, skaji joined, andrewalker joined, luis joined, sufrostico joined, sno joined, jjido joined, atweiden joined, kaare_ joined, _nadim joined, cognominal joined, au_ joined, mindos joined, Xliff_ joined, k-man joined, Brock joined, yasnothil joined, infina joined, captain-adequate joined, El_Che joined, agentzh joined, mtj_ joined, maddingue joined, jercos joined, ruoso joined
RabidGravy woo 19:52
19:52 M-Illandan joined 19:53 yasnothil left
RabidGravy un-splitters! 19:53
19:53 kaare_ left
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:56
stmuk ZoffixWin: did you try the msi on windows 7 or 10? 19:57
20:00 erdic joined 20:02 [TuxCM] left
timotimo that's adorable, El_Che 20:04
mst El_Che: *d'awwwwwwwwwwwwwwwwwwwwww* 20:06
masak 'night, #perl6 20:10
lizmat gnight masak 20:11
and gnight #perl6!
20:11 lizmat left 20:17 jjido left 20:18 ZoffixMobile joined
ZoffixMobile stmuck, Win7 20:18
stmuk even
stmuk ah good tested on "both platforms" then :) 20:19
ZoffixMobile stmuk++
stmuk both sorts of music Country *and* Western, both platforms Windows 7 and 10 :) 20:20
mspo El_Che: slack advertises on tv now 20:21
20:24 ZoffixMobile left
El_Che mspo: one of the sign of the apocalypse :) 20:24
mspo El_Che: slackpocalypse 20:26
20:26 rurban joined
El_Che mspo: The Revolution will be streamed live through slack 20:26
mspo El_Che: my job just switched to it 20:27
El_Che: no one talks anymore they just /giphy
20:31 dolmen joined 20:37 wamba left
dalek c: 780e0ac | (Jan-Olof Hendig)++ | doc/Type/IO/Handle.pod:
Documented the 't' method
20:37
20:41 khw left
AlexDaniel t? 20:41
20:43 rurban left
dogbert2 indeed 20:43
was a bit surprised when I saw it 20:44
AlexDaniel “Returns L<Bool::True> if the handle is opened to a tty.” 20:45
why not call it .tty ?
dogbert2 good question, tty sounds better to me :)
20:45 jjido joined
geekosaur because they started out as the perl 1-letter tests, which in turn come from the unix shell "test" command 20:45
perl5's -t became :t became .t 20:46
dogbert2 interesting
geekosaur (which means yes, by all means change to somehting else, and consider reviewing the whole set for sane names)
20:49 dupek left 20:59 milwaukee left 21:00 skids left
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
however there is a flaw in App::ModuleSnap test that requires you to install META6 before attempting to install it
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 rakudo.org/2016/05/03/announce-wind...r-2016-04/
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:09
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:11
21:12 jjido left
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:12
not sure that's actually worthwhile now that you need (I think) a foo.IO though.. 21:13
21:18 lnrdo joined
ugexe RabidGravy: issue opened 21:18
21:21 zakharyas left
RabidGravy sorry I'm not quite sure what the fix is then 21:21
the module has a dependency 21:22
ugexe the dependency is supplied
you are trying to imply it has a dependency that must reside in CUR::Installation
RabidGravy am I?
ugexe with that test, yes
RabidGravy oh I see 21:23
21:23 hotel_california joined 21:24 hotel left
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')
or maybe .parent.child('META6.json') 21:26
21:28 bazzaar joined
bazzaar \o 21:28
atweiden nom has been failing to build on linux 64 for a few days now, anyone else seeing this? 21:29
`Cannot call method 'prefix' on a null object in block <unit> at tools/build/install-core-dist.pl line 15`
bazzaar m: column_length => ~$<column_length> || 'default'
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␤»
RabidGravy it built for me this very morning 21:30
ZoffixWin wooo stmuk++ Thanks!
And ugexe++ thanks :D
atweiden RabidGravy it's the `make install` that fails in my case 21:31
21:31 lostinfog left
bartolin atweiden: I see this error with rakudo-j (on FreeBSD) 21:31
bazzaar anyone know where I can find documentation to avoid 'Use of Nil in string context' warning message 21:32
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
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
RabidGravy m: say ~($<column_length> // '') 21:34
camelia rakudo-moar ec6c3b: OUTPUT«␤»
bazzaar RabidGravy: thankyou for that perl6 of wisdom :-) 21:36
RabidGravy it's the '~' stringifying the undefined value 21:37
21:37 mohae left 21:38 brrt joined
ZoffixWin bazzaar, another perl6 wisom is you can use quietly 21:38
21:39 TEttinger joined
ZoffixWin m: say quietly ~$<column_length> 21:39
camelia rakudo-moar ec6c3b: OUTPUT«␤»
lucs m: say $<column_length> // '' # Suffices, but maybe I'm missing the point.
camelia rakudo-moar ec6c3b: OUTPUT«␤»
21:39 patrickz left
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␤»
ZoffixWin lucs, just that ^. Depends on what you got in your var
bazzaar RabidGravy: wow, even more wisdom, committing that to memory, and to my perl6 notes file
lucs ZoffixWin: Useful, thanks. 21:41
bazzaar lucs: data values read from file with grammar, sometimes values absent, so var is empty
RabidGravy yeah I was assuming it was the result of some match
ZoffixWin m: my $column_length is default(42); $column_length = Nil; say $column_length 21:43
camelia rakudo-moar ec6c3b: OUTPUT«42␤»
ZoffixWin :)
21:43 yasnothil joined 21:44 cpage_ left 21:46 itaipu joined
bazzaar ZoffixWin: that there be a trait, don't it me hearty's :-) I'll have to give 'is default' a try 21:49
21:49 prammer left
ZoffixWin Basically it modifies what your variable is when its value is a Nil 21:50
21:50 prammer joined
MadcapJake ZoffixWin: is it just a Proxy underneath? 21:51
bazzaar ZoffixWin: thankyou for your wisdom too
21:53 brrt left 21:55 huggable joined
ZoffixWin MadcapJake, no idea. I don't even see it defined in github.com/rakudo/rakudo/blob/nom/.../traits.pm 21:56
Unless variables match some type other than Variable
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, yqt joined, prammer left 21:58 cpage_ left 21:59 prammer joined 22:00 kid51 joined 22:01 prammer left 22:02 prammer joined 22:09 ptolemarch left 22:12 skids joined 22:14 cdg joined, Bucciarati joined 22:16 bazzaar left
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␤␤»
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␤␤»
ZoffixWin dafuq
m: (^10).sort({ $^a <=> $^b }).say 22:19
camelia rakudo-moar ec6c3b: OUTPUT«(0 1 2 3 4 5 6 7 8 9)␤»
MadcapJake that isn't applying to the upto range
ZoffixWin Probably related to the bug where we can't hyper after .sort
MadcapJake m: .sort({ $^a <=> $^b })
camelia ( no output )
22:19 RabidGravy left
MadcapJake apparently unit is sortable :P 22:19
m: .sort({ $^a.WHAT.say; True }) 22:20
camelia rakudo-moar ec6c3b: OUTPUT«(Any)␤»
MadcapJake m: Any.say
camelia rakudo-moar ec6c3b: OUTPUT«(Any)␤»
MadcapJake ZoffixWin: (is default) github.com/rakudo/rakudo/blob/nom/...ble.pm#L47
ZoffixWin MadcapJake++ thanks 22:21
22:23 araujo left 22:27 cpage_ joined 22:43 firstdayonthejob left 22:46 Sgeo joined 22:53 khw joined 23:04 AlexDaniel left 23:11 mcsnolte left 23:12 ZoffixWin left
teatime m: "Hello, World!" ~~ rx:Perl5/^H[d-z]l{2}/ 23:21
camelia ( no output )
teatime m: say so "Hello, World!" ~~ rx:Perl5/^H[d-z]l{2}/ 23:22
camelia rakudo-moar ec6c3b: OUTPUT«True␤»
teatime m: say so '"̃' ~~ rx:Perl5/../
camelia rakudo-moar ec6c3b: OUTPUT«False␤»
23:24 vaisian left 23:27 BenGoldberg joined
timotimo what's your use case for this? 23:30
23:30 BenGoldberg left
timotimo what even is this thing? 23:30
.u "̃
yoleaux U+0022 QUOTATION MARK [Po] (")
U+0303 COMBINING TILDE [Mn] (◌̃)
23:32 BenGoldberg joined 23:33 itaipu left
teatime I want to parse a file that has a "<unichar>" syntax element, and sometimes they are combining chars 23:35
timotimo . is certainly the wrong approach to this, as it's defined to match "a grapheme" 23:37
you can potentially wiggle your way around the problem with a custom code block or method that operates directly with Cursor objects 23:38
geekosaur they're looking for p5's \X, right? 23:44
timotimo no clue
i don't do that much p5 regex, tbh 23:45
only relatively tame things go int my regexes
geekosaur iirc \X matches a character + 0 or more combining chars
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
that is, str.NFC or some such
..except I think that;s a Buf so you can't regex it...
23:47 rangerprice joined
teatime timotimo: I know. I thought perl5 had a 'single codepoint' escape in regexes, which p6 doesn't seem to 23:50
but I can't find it right now in perlre
geekosaur: there's supposed to be :chars, :codes, etc. modifiers for p6 regex but it's to-do 23:51
23:52 rangerprice left 23:55 luser1 joined
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}
\C matches exactly a byte when Unicode is enabled
teatime yes 23:58
don't think \p{Any} will hel
m: say so '"̃"' ~~ rx:Perl5/"\p{Any}"/
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
geekosaur you wanted a single codepoint, that's it 23:59
[03 23:50] <teatime> timotimo: I know. I thought perl5 had a 'single codepoint' escape in regexes, which p6 doesn't seem to
teatime it is?
geekosaur remnember that p5 doesn't do graphemes, though; p5's \X is equivalent to p6's .