»ö« 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.
comborico1611 Are you around? 01:53
Herby_ always 01:58
comborico1611 Heh. 02:02
Herby_ well, maybe not always. gotta go back to work tomorrow after 2 weeks off
ugh
comborico1611 I hate vacations for this very reason.
It's always such a drag to get back into the routine. 02:03
The same went for summer vacations, back in the day.
Herby_ only good thing is that I taught myself some basic SQL while off, so I get to try and apply it when I get back
comborico1611 It's so annoying and anxious to start the school year.
I started the MySQL chapter this week. I got stuck at old PHP 5 working with newer stuff. 02:04
Something about mysql_connect( ) not being use anymore. Now its some DOP weird acroynym. 02:05
Some crap. It was frustrating.
comborico1611 Is a operator-rich programming language like the counter to languages with frameworks? 02:10
comborico1611 I must get to bed now. Night! 02:17
AlexDaniel ah, ha. Somebody got a better score on code golf by using the newest rakudo features. Awesome :D 02:33
AlexDaniel responds by doing even better 02:36
lizmat clickbaits p6weekly.wordpress.com/2018/01/01/...-6-alerts/ 08:07
Geth doc: gfldex++ created pull request #1727:
show how to use Empty
08:50
Zoffix Looks like someone accidentally forked a repo as `perl6` user instead of their own: github.com/perl6/awesome-speakers 10:45
scimon Oooops
DrForr Proof that we have some awesome speakers about Perl 6? :) 10:52
Zoffix github.com/eiro did 10:53
Zoffix nukes it; just wanted to ping the author to ensure they get the fork they wanted
ah crap. It saw a commit while I was brushing my teeth 10:54
And I nuked it.
Well. I've done enough damage for the day. 10:55
Zoffix goes back to bed :)
El_Che maybe you sleep-commit? 10:55
too late :)
piojo does .WHICH correspond to data addresses in memory? 11:27
I mean, real memory addresses? 11:28
jnthn No 11:31
Well, it may, sometimes
.WHERE is what you're after if you want that
lizmat piojo: note that the .WHERE of an object is *not* immutable
s/immutable/constant 11:32
piojo thanks
jnthn That also, objects move during their lifetime
piojo and I bet they move when types are merged
jnthn It's all a matter of when GC runs 11:33
DrForr Re: the nuking it accidentaly broke a tweet of @marcchantreux's: "most of the inspiring talks I saw was from the #perl community..." Just saying if you wanted to prod someone about the accidental nuking. 11:36
dakkar hm. Should the results of IO::Path.dir have the same $CWD of the object the come from? 11:47
IO::Path.new('foo/',:CWD('/bar/')).child('x') is the same as IO::Path.new('foo/x',:CWD('/bar/')) 11:50
but IO::Path.new('foo/',:CWD('/bar/')).dir produces things like IO::Path.new('foo/x') *without* the CWD 11:51
that feels sub-optimal
dakkar aargh. IO::Path method dir(… :$CWD=$*CWD …) 11:59
shouldn't that be :$CWD=$!CWD ?
dakkar rakudobug 12:01
lizmat new years resolution found on HN: news.ycombinator.com/item?id=16048290 12:07
DrForr 2048x1920? 12:08
ilmari 3200x1800, same as last year :) 12:12
DrForr: that's a very square ratio... 12:13
lizmat fwiw, 2880 x 1800 + 2560 x 1080
ilmari wife's new laptop is 1920x1080 12:14
DrForr Yeah, but 1920x1280 or something like that seemed too boring and I don't know the new numbers with the advent of 4K and whatnot.
jast mine is tricky... it's a partial 3000 x 1920 12:22
DrForr besides, someone had to haul out the old joke.
wbiker Hi @here 13:13
I have got a module that uses "run" to get all processes. To unit test this module, I want to inject the dependencies. What is the best way to inject something that can be used instead of "run ps aux" for example. I think I can use the class Proc. 13:16
scimon Proc::Async ? 13:30
wbiker @scimon I am not interested in running the command in parallel. I want to use run in production code and a mock in the unit tests. I do not think Proc::Async does help me here. 13:35
jnthn Is the module sub-based or OO-based? 13:36
If the former, perhaps have the subs take an optional parameter like `:&run = CORE::<&run>`, then test cases can pass in an alternative run sub to use 13:37
If OO-based, similar but as a property and allow it to be passed in the constructor
Alternatively, can allow the Proc type to use to be injected
scimon (I think jnthn got way more sleep than me, best listen to him) 13:38
wbiker OO-based. Its a class and I was thinking to use Proc in the constructor somehow.
@scimon :-)
jnthn Yeah, that would be a good way to go :)
Though you can just write something like 13:39
has $.proc-class = Proc;
And then it's automatically available to pass as proc-class => MyProcMock
lizmat has Proc $.proc-class ?
jnthn No
lizmat ah, indeed, I see now
yup, sorry 13:40
jnthn That forces the mock to be a subclass of Proc
Which Test::Mock actually will make happen, mind :)
lizmat yup
wbiker Ahh I see
Cool thanks for the help
jnthn I did something just like this with Proc::Async and a mock set up with Test::Mock in a $dayjob project a while back, and it worked out nicely
wbiker Will try it. thanks 13:42
jnthn (and Proc.run should be eaiser to mock than Proc::Async...)
wbiker I thought so too 13:43
Geth doc: 209e5c3ff0 | (Will "Coke" Coleda)++ | xt/words.pws
add words
14:27
Geth doc: 9c970f84e6 | (Wenzel P. P. Peppmeyer)++ (committed using GitHub Web editor) | doc/Type/Slip.pod6
show how to use Empty
14:47
doc: 0c5ab8551a | (Alex Chen)++ (committed using GitHub Web editor) | doc/Type/Slip.pod6
Merge pull request #1727 from gfldex/patch-4

show how to use Empty
synopsebot Link: doc.perl6.org/type/Slip
mspo who's going to add type/Ppp ? 15:12
AlexDaniel squashable6: next 18:10
squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in 2 days and ≈15 hours (2018-01-06 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
Perl6 Is it possible to have a hash with the value being an integer, and then add to the value? 19:46
Perl6 Never mind, I found a better way to do this thing 19:49
sena_kun m: my %a; %a<foo> = 5; %a<foo>++; say %a<foo>;
camelia 6
sena_kun dunno why not.
or I misunderstood something.
neoncontrails Greetings #perl6. I'm following a reference from an academic paper to a 'tokenizer.perl' script in a repository called mosesdecoder. Unfortunately I'm not proficient with Perl and there doesn't appear to be a man page/other documentation to suggest how to use it. Does the repository itself give you experienced Perl programmers a hint w/r/t demo usage? github.com/moses-smt/mosesdecoder/tree/master 20:44
/scripts/tokenizer
* github.com/moses-smt/mosesdecoder/.../tokenizer (since that got chopped up :)
lizmat neoncontrails: this looks like Perl 5 code to me. This channel is about supporting Perl 6 20:45
neoncontrails: you will probably get more / better answer on #perl-help on irc.perl.org 20:46
neoncontrails lizmat: I'll try there. Thanks for the suggestion!
mspo # avoid general madness 20:47
s/[\000-\037]//g;
s/\s+/ /g;
lizmat you're welcome
mspo lol
neoncontrails mspo: heh, the second regex I'm familiar with. (Quite useful!) What is the effect of the first? 20:49
timotimo is that all control characters perhaps?
geekosaur yes
neoncontrails Interesting. Is "\\\d{3}" a general Perl pattern for selecting specific ascii characters/ranges? 20:51
I haven't seen that syntax in Python
geekosaur that's overly escaped \d{3} = 3 x \d
(or matching backslash followed by 3 digits)
...also that's perl 5 syntax, it's a bit different in p6 20:52
neoncontrails geekosaur: gotcha. I could see that being useful for ranges
damnlie Hi guys, anyone has any documentation how to do dba stuff with perl6? I like to make my life difficult :) 21:04
buggable New CPAN upload: Sparky-Plugin-Notify-Telegram-0.0.1.tar.gz by SPIGELL cpan.metacpan.org/authors/id/S/SP/...0.1.tar.gz 21:18
mspo damnlie: can you be more specific?
timotimo database administration tasks? i'd assume you'd be doing most of that directly in your db's shell, but i've never done any dba-ing 21:19
damnlie Yup. Well we have like 2-300 line mysql what we would 21:28
Like to replace
timotimo depends entirely on what it does, of course. could be a good decision to write something with DBIish 21:29
like, you'll get nice commandline argument parsing with "multi sub MAIN" 21:30
parallelism is a thing you get with perl6 that doesn't work terribly well with other languages in the "scripting" niche
timotimo if i knew what your script has to do and how you interact with it, i could perhaps make better estimations 21:32
mspo parallelize massive IN(..) statements? :) 21:45
timotimo well, that kind of thing is for the database server to do, perl6 can hardly do that from the outside 21:48
comborico1611 I've been fighting mysql ALL day. 22:59
gfldex Who won?
comborico1611 Haha. It did.
gfldex :) 23:00
comborico1611 I like your humor.
gfldex you may give prostgres a shot. Much nicer docs.
comborico1611 Apparently, they replaced mysql_connect with mysqli_connect
I need books to text l teach me, and i just ordered another one on mysql. 23:01
I'll keep it in mind, though.
Thanks! 23:02
gfldex if you use postgres you can use perl5 as stored procederes (not sure if that is an advantage tho)
comborico1611 I'm trying to build-up my web developer skills as a new job. SQL is too popular to ignore 23:04
gfldex SQL is a nice language indeed
you just need to think like a book keeper :)
comborico1611 Heh 23:09
MasterDuke i had a minor revelation when i read an article years ago (which i wish i'd kept) about the relationship between SQL and set theory 23:10
i'm not particularly great at math
but i'd had some set theory in a required discrete math class
comborico1611 I miss the Douy Decimal System. Well, really the card catalogue.
MasterDuke and it seemed almost entirely useless for anything practical
comborico1611 The Card Catalogue was a beautiful piece of furniture. 23:11
MasterDuke but that article really helped me understand SQL
comborico1611 But Set Theory is a prerequisite. So not very helpful for me m 23:12
M=.
You remember the card catalogue? 23:13
MasterDuke i wouldn't say it's required. but it's helpful to learn the two subjects (set theory and sql) in conjunction
like calculus and physics. i was first forced to learn them completely isolated
but then later on found out how related they are, and it made uderstanding each one easier 23:14
comborico1611 Hmm.
I still haven't learned calculus.
MasterDuke i'm not sure i have a very concrete point/suggestion to make. but at least for me, a non-mathematician who didn't get great grades in math after highschool, a little bit of set theory helped with understanding sql (and vice versa, though that direction wasn't all that practically useful for me) 23:17