»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
Xliff m: "/path/to/myfile".IO.extension('pm6').say 00:08
evalable6 "/path/to/myfile".IO
Xliff ?!?
^^ Why not end in .pm6?
m: "/path/to/myfile".IO.extension('pm6', joiner => '.').say
evalable6 "/path/to/myfile".IO
Xliff m: "/path/to/myfile".IO.extension('pm6', joiner => '.').dirname.say 00:09
evalable6 /path/to
Xliff m: "/path/to/myfile/".IO.extension('pm6', joiner => '.').say
evalable6 "/path/to/myfile".IO
Xliff m: "/path/to/myfile.".IO.extension('pm6', joiner => '.').say
evalable6 "/path/to/myfile.pm6".IO
SmokeMachine fco.github.io/Red/API 00:53
vrurg SmokeMachine++!! 00:59
cpan-p6 New module released to CPAN! FindBin (0.4.5) by 03LEMBARK 01:06
Xliff I helped with that! 01:09
SmokeMachine: You could do with less gutter space on the horizontal. It looks nice but it really curbs ones ability to see your code examples. Especially for Red.pm6 01:10
Still. Very sharp! :) 01:11
SmokeMachine Xliff: Yes... I'm planning on removing the comments on Red.pm... 01:12
Xliff OK. Still, those examples are good.
I would suggest breaking that long bit into discrete blocks, so that users can have a visible horizontal scroll bar.
The SYNOPSIS section in particular. 01:13
If you want, I can see if I can do that and submit a PR...
Also.... hit 280Kloc in p6-GtkPlus related code, today! :> 01:14
SmokeMachine Xliff: yes, please! 01:20
Xliff: 280K?!very big, isn't it?! 01:21
Xliff: is it better now? fco.github.io/Red/api/Red the comments still are on README.md... 01:25
Xliff SmokeMachine: Better? Yes, and no. The comments were helpful. 01:41
I will have to update and go back to a point where I can modify and show you what I mean. 01:42
I may have to install Markdown and a reverse proxy and poke holes in my firewall..
Or....
Are the style sheets and stuff available in the repo? If so, then that's something I could work on. 01:43
And yes... 280K is very big.
See: drive.google.com/file/d/12j1Dy6zIc...sp=sharing
cpan-p6 New module released to CPAN! Tomty (0.0.5) by 03MELEZHIK 02:13
Elronnd s/ 02:17
Xliff SmokeMachine: PR submitted. Please check to insure I didn't overwrite anything important. 02:18
BBL 02:19
Xliff . 03:53
Elronnd .. 03:55
Xliff ... 04:04
Elronnd .... 04:26
m: ....
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/IWGIY1yFVn
Malformed postfix call
at /tmp/IWGIY1yFVn:1
------> 03....08⏏04<EOL>
Xliff Elronnd: No.. you were SUPPOSED to respond with '.....'. I will leave it to you to figure out why! ;P 04:27
Although there is an argument for me to respond with '........'
Actually... no... there isn't. I responded with '...'! 04:28
Elronnd fibonacci? 04:36
Geth doc: a4cabe4f62 | (JJ Merelo)++ | doc/Language/about.pod6
Fixes meta, refs #3024
10:11
doc: 3825edbeb7 | (JJ Merelo)++ | doc/Language/classtut.pod6
Joins meta, refs #3024
synopsebot Link: doc.perl6.org/language/about
Link: doc.perl6.org/language/classtut
doc: b65abb0e26 | (JJ Merelo)++ | doc/Language/faq.pod6
Fixs meta, refs #3024
synopsebot Link: doc.perl6.org/language/faq
sena_kun anyone around to asnwer my Red questions? SmokeMachine? 11:37
SmokeMachine sena_kun: how can I help you? 11:44
sena_kun SmokeMachine, in `model Foo is rw {}` what does rw trait do? I assumed it turns all columns into rw, but that doesn't work. 11:45
SmokeMachine sena_kun: it should... but I think that’s a bug... 11:45
sena_kun: it should work just as `class Foo is rw {}` but if it isn’t, it’s a bug... 11:46
sena_kun I see, thank you. I think github.com/FCO/Red/issues/364 reports it, but the documentation-side 11:47
I'll avoid it for now 11:48
SmokeMachine sena_kun: when I wrote the synopsis it was working... something I’ve changed may has broken that... 11:52
sena_kun: (I should have more tests...)
MasterDuke are there dates established for the 2020 amsterdam conference? 12:57
SmokeMachine Xliff: I've made a few changes... but what do you think? fco.github.io/Red/api/Red 13:20
tellable6 SmokeMachine, I'll pass your message to Xliff
cpan-p6 New module released to CPAN! BDD::Behave (0.0.3) by 03GDONALD 13:28
discord6 <RaycatWhoDat> Quick question 13:46
discord6 <RaycatWhoDat> Is there a PasteBin or CodePen-esque page for Perl 6? 13:47
<RaycatWhoDat> One that y'all specifically use?
sena_kun I don't think there is anything that everyone use. I usually use github gists. 13:50
tbrowder hi, all! 14:10
tellable6 2019-09-03T06:12:06Z #perl6 <jmerelo> tbrowder what seems to be the problem? installing it or setting it up? Can we maybe talk this afternoon to get it going?
tbrowder the docs page is still broken. there should be six language sections but only five are showing. 14:12
.tell jmerelo i've been afk for a while. i am available most of today. 14:14
tellable6 tbrowder, I'll pass your message to jmerelo
sena_kun SmokeMachine, `id`, for example in `so $attr.column.id` checks only if it is PRIMARY KEY or e.g. UNIQUE columns too? What does `id` mean (precisely) in sql? 14:56
sena_kun `self.columns(type).grep(*.column.id).list` <- does it support composite primary keys? because I wonder why is it not a `self.columns(type).first(*.column.id)`. 14:59
github.com/FCO/Red/blob/master/lib...DB.pm6#L28 <- is this correct? I might be wrong, but it looks like it should use `set_value` to me. ping SmokeMachine 15:09
SmokeMachine sena_kun: Id mean primary key... 15:54
yes, it accepts composite pas... 15:55
SmokeMachine s/pas/pks/ 15:58
number6` hey everyone. is it possible to open a buffer in emacs from perl6? i want to generate files with boilerplate (not necessarily code) and have them be opened in an emacs buffer. for code i do this with autoinsert and yasnippet but i was wondering if i could do it through perl6. thanks! 16:03
SmokeMachine sena_kun: I don't think so... it's using the attribute stored inside to the attribute... 16:04
SmokeMachine sena_kun: github.com/FCO/Red/issues/364 fixed! 16:52
sena_kun number6`, you can create a file in temp location ($*TMPDIR) and run `emacs filename.foo`, then await it and then grab the content && process it 17:13
SmokeMachine sena_kun: thank you very much!
I've added 2 comments on that PR, but I'm begging it now...
sena_kun: ^^
sena_kun SmokeMachine, great, also you can create a regression test with just gist.github.com/Altai-man/fd7583e7...b96195c71f to prevent breaking it in the future 17:15
SmokeMachine, thanks for a review! Please, next time wait a bit with merging if there are things to fix... I'll write a patch now... 17:17
SmokeMachine sena_kun: github.com/FCO/Red/blob/master/t/26-is-rw.t
sena_kun SmokeMachine, you are great. 17:18
number6` sena_kun: thanks! 17:34
MasterDuke .ask samcv are there dates established for the 2020 amsterdam conference? 17:40
tellable6 MasterDuke, I'll pass your message to samcv
lizmat MasterDuke: no, there aren't any dates fixed yet, but hopefully soon 17:50
weekly: news.perlfoundation.org/2019/09/fin...vm-ji.html 17:51
notable6 lizmat, Noted! (weekly)
MasterDuke lizmat: ah, thanks. but am i imagining that it would be in may?
lizmat MasterDuke: I can't really say whether you are or aren't 17:53
MasterDuke heh, i guess i'll find out eventually
lizmat sorry I couldn't be more informative, maybe samcv will be able / willing to say more 17:55
samcv MasterDuke, well. there are dates but unannounced 18:32
tellable6 2019-09-14T17:40:38Z #perl6 <MasterDuke> samcv are there dates established for the 2020 amsterdam conference?
samcv pm me if you want to know the tentative dates. will be announced when all paperwork signed etc 18:33
SmokeMachine sena_kun: the grep’s block receive just one argument... that’s why a block generated by 2 whatever star will not work... 18:34
El_Che samcv: same place of the the last time in Amsterdam? 18:37
samcv El_Che, nope 18:41
Here are my slides for more info cry.nu/TPC-2020-proposal/
if you want a teaser
El_Che wow 18:44
DrForr samcv: I used to live about 4 blocks from The Jewel :) 18:56
El_Che DrForr: where are you based nowadays? 18:57
DrForr Seattle, sadly.
El_Che Oh, I see
hopefully you'll find your way back soon 18:58
DrForr Right now I just need to find my way. I'm doing fine monetarily, it's just ... life. 18:59
. o ( "Don't talk to me about life." )
I lived on Postjeskade, little place with a canal view.
El_Che Good luck on that front, it can be difficult at times
DrForr Nod. 19:00
OTOH after Prague and I parted ways I ended up in 12 countries in less than 3 months. I've found another way to do that, but I need to take a few test trips before that. 19:01
El_Che it sounds tiring 19:02
DrForr No question, but fun nonetheless.
El_Che I spent 2 years of my life travelling non-stop with all my belongings in a backpack, while it was a life experienced, we were tired at the end 19:03
DrForr Nicely done. I was working most of the time throughout that, so I'm looking at a change for this year's vacation. I've done the cruise thing once in my life, and it was pretty much ruined because I was with my entire team and we were working 10-hour days on the ship. 19:07
El_Che yeah, sounds more like a management trick than vacation
DrForr Pretty much a threat. Shortly afterwards, after putting in several 12-hour days and 10-hour weekends trying to repair a f*ckup someone *else* had done by restarting a server out of sequence, I was let go for "not working hard enough." 19:09
El_Che what the hell
DrForr My boss sucked at communicating what his workers did to *his* boss. 19:10
El_Che incredible 19:13
DrForr He was new at it, I can't blame him... too much.
DrForr installs browserify in the hopes that it does a better job than webpack... anyone that complains about the perl[56] ecosystems and holds Javascript up as a paragon of virtue needs to look at their own tools. 19:15
(the cro demo w/ websockets uses webpack for JS, and I'm pretty sure it's been broken for several months - looking at SO and other places just lands me in a hell of dependencies.) 19:18
DrForr Working on an article about this, hopefully I'll have something this afternoon. 19:21
El_Che DrForr: if you think devs hate dependencies, think of the poor admins 19:23
DrForr Oh, I know, having been on both sides... 19:24
El_Che same
DrForr Well, bundling by hand seems to work... 19:31
sena_kun >webpack is broken in cro examples
can I just quit this job?
DrForr It's not cro's fault, and if I put that in there it was only as a note. 19:32
And that's why I'm playing with browserify. It seems to be able to bundle up one file's worth of JS, which is better than what webpack was doing.
sena_kun DrForr, no problem, and thanks a lot for writing it, because we have to fix it anyway, even if it's not ours fault
DrForr I think if you can get it to load '@babel/core' rather than 'babel-core' you'll be able to load v7.0 which gets around the brokenness. 19:33
sena_kun: 'npm run build' runs with no errors using browserify, although I'll want to do something more sophisticated than what I'm doing. 19:38
number6` what is the perl 6 equivalent of "while (<>) {...}" ? or is that functionality something that is discouraged in p6? 20:12
sena_kun for $*IN.lines ? 20:15
MasterDuke number6`: something like `for $*IN.lines {}`
El_Che docs.perl6.org/language/5to6-nutsh...hile_until 20:16
number6` sena_kun: will that accept multiple files sent from the command line and return all lines inside each file? 20:17
El_Che: thanks
El_Che although the form for $*In.lines -> $line { } is nicer
AlexDaniel shrugs
El_Che if you have a file: for 'huge-csv'.IO.lines -> $line { }
AlexDaniel lately I've been optimizing my code for word count :D 20:18
El_Che AlexDaniel: how perlish of you 20:18
AlexDaniel I dunno, there's just something about looking at a short piece of code and thinking “oh, that's pretty short, it'll be easy to understand it”
El_Che AlexDaniel: implicite stuff is often more difficult to understand, or easier to misunderstand 20:19
MasterDuke number6`: for that you want 'for $*ARGFILES.lines {}'
AlexDaniel I know, but it's not techical, more like psychological
number6` El_Che: so there's no way to automatically retrieve multiple files sent from the command line and process them inside a for loop? 20:20
AlexDaniel helps staying in flow too
m: for $*IN.lines.rotor(3) -> ($line1, $line2, $line3) { say $line1 }
evalable6 ♥🦋 ꒛㎲₊⼦🂴⧿⌟ⓜ≹℻ 😦⦀🌵 🖰㌲⎢➸ 🐍💔 🗭…
AlexDaniel, Full output: gist.github.com/1fdd0fe3be8f55c303...3f3fcb73ee
AlexDaniel number6`: ↑ 20:21
oh sorry
multiple files, not lines, I misread
El_Che psychological, you said
AlexDaniel $*ARGFILES something?
m: for $*ARGFILES { .say } 20:22
evalable6 (exit code 1) say not yet implemented. Sorry.
in block <unit> at /tmp/iiqsW5QIGJ line 1
AlexDaniel m: for $*ARGFILES.lines { .say }
evalable6 ♥🦋 ꒛㎲₊⼦🂴⧿⌟ⓜ≹℻ 😦⦀🌵 🖰㌲⎢➸ 🐍💔 🗭…
AlexDaniel, Full output: gist.github.com/10caf044f4de3166b0...45ec317811
AlexDaniel this stdin is a bit too unicodey :D 20:23
number6` AlexDaniel: so in that output each line is the contents of a single file? 20:24
AlexDaniel number6`: hmm not sure I understand the question, but if you run your script with multiple files in args like `./foo.p6 file1 file2 file3` then $*ARGFILES.lines will go over all files 20:25
number6`: is it what you wanted or am I still misunderstanding your question? :)
number6` AlexDaniel: yes, that's what I was asking, to be able to process the contents of multiple files sent from the command (as filenames) one at a time. thanks! 20:27
AlexDaniel number6`: oh… so as filenames, not as lines?
so for each file? 20:28
separately?
Voldenet > for lines().map(*.IO.lines) { .say }
not sure if I understood the question correctly 20:29
AlexDaniel if so, then maybe using `sub MAIN(*@files) {}` is better? There's also $*ARGFILES.handles…
number6` AlexDaniel: yeah, like if file1 has 10 lines, file2 has 5 lines, file3 has some number of lines, then "perl6 my_script file1 file2 file3" would be able to process all the lines in file1, then the lines in file2, then the lines in file3. just like "while (<>) {...}" does in perl 20:31
AlexDaniel number6`: oh, then $*ARGFILES.lines it is. Sorry I haven't touched perl5 in a while :)
number6`: one thing to keep in mind is how it's going to handle \r\n 20:32
number6`: if you're building unix tools that is
iirc it'll split on \r\n too, which is not exactly what you want for command line tools
number6` AlexDaniel: so the code would be "for $*ARGFILES.lines {...}"? 20:33
what would the topic variable represent in that code? the current file? 20:34
Voldenet: thank you 20:35
AlexDaniel number6`: each line
number6`: as in `for $*ARGFILES.lines -> $_ {...}` or so
m: spurt ‘sandbox/file1’, “hello\nworld\n” 20:36
evalable6
AlexDaniel m: spurt ‘sandbox/file2’, “foo\nbar\nbaz\n”
evalable6
AlexDaniel m: run <perl6 -e>, 「for $*ARGFILES.lines { .say }」, <sandbox/file1 sandbox/file2> 20:37
evalable6 hello
world
foo
bar
baz
AlexDaniel m: run <perl6 -e>, 「for $*ARGFILES.lines -> $_ { .say }」, <sandbox/file1 sandbox/file2>
evalable6 hello
world
foo
bar
baz
AlexDaniel number6`: it's a good question btw, if you have more please don't hesitate :) 20:38
number6` AlexDaniel: i tried for $*ARGFILES.lines and it did what i wanted. thanks for your help! 20:40
AlexDaniel you're welcome :) 20:41
number6` AlexDaniel: btw, i notice folks here typing "m: ..." which i assume invokes some sort of evaluator. what is the etiquette on that? 20:43
AlexDaniel number6`: “don't try to break it”, and that's about it :)
number6` AlexDaniel: haha ok cool. what does the 'm' stand for? 20:44
AlexDaniel number6`: moarvm, there used to be a bot that was able to run stuff on rakudo-jvm too 20:45
p6: say ‘this works too’
evalable6 this works too
AlexDaniel say ‘proper code even runs fine without m: !’
say ‘proper code even runs fine without m: !’ # ok, maybe not always…
evalable6 proper code even runs fine without m: !
AlexDaniel :) 20:46
number6` m: for 1..2 {say "Thanks!";}
evalable6 Thanks!
Thanks!
number6` haha, neat 20:47
DrForr And of course babel is actually required for react, or something like that. Scrapping article, rewriting. 21:50
DrForr Hrm, react seems to have installed w/o requiring babel, maybe progress is being made... 21:53
Voldenet DrForr: react doesn't need anything but react and react-dom 22:07
DrForr Voldenet: Okay, so it's down to my packaging then. If webpack didn't require babel... looking at that now... 22:12
It'd also be a simple edit to make in the cro single-page docs.
Voldenet you don't also need webpack for react 22:16
Voldenet You do need babel for jsx, but it's not strictly required 22:16
DrForr Ah. It's mentioned in the cro single-page docs, which is why I've been trying to figure out how to work around it. I wasn't keeping close enough tabs on the install process, I suppose. 22:19
DrForr Installing React and adding the code, w/o any Babel references... 22:38
And the JS works if you rewrite it to not use Babel, Go figure :) 22:51
DrForr Of course fixing Babel or giving the right instructions to install the thing would be TRT. I'm still a bit amazed that it seems to be broken; Reactjs.org writes their tutorials in JSX. 22:53
Demos[m] is there a function/operator that will bind a a parameter in a block 23:26
Demos[m] sent a long message: < matrix.org/_matrix/media/v1/downlo...BdhyCrEnRH >
where some.method takes a parameter, and $p is passed to that parameter 23:27