»ö« 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).SeqB: (1, 2, 5, 6).SeqC: (1, 2, 5, 6).SeqD: 1D: 2D: 5D: 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).SeqC: (Str)D: 1D: 2D: 5D: 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).SeqC: (Seq)D: 1D: 2D: 5D: 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/xD9jLiXyFoUndeclared 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/oSgQJ6mo28Two terms in a rowat /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: 1B: 2B: 5B: 6C: (Seq)D: 1D: 2D: 5D: 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 |