🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
[Coke] timotimo: I want *diag* output. I don't want the extra stuff that comes with the 'not ok' 00:44
so diag? yes. ok(false) telling me the test failed when I already have the 'not ok'? that can go
doesn't look like there's an option in rakudo's lib/Test - both ok and diag use _diag 00:57
Skarsnik having the line of failure is still good, because you don't special number your test in your code 01:03
but good night ! 01:04
[Coke] if you don't have loops of tests, it helps, sure 01:07
if you have a nested loop with a ok that reports the failure on the same line, it's useless.
[Coke] (i'd be fine with an env var that you had to set to disable it.) 01:30
Xliff Rakudo build failing using Windows Visual Studio Community 2019 and build instructions here: github.com/rakudo/rakudo/blob/mast...windows.md 01:49
github.com/rakudo/rakudo/blob/mast...windows.md
Build log here: gist.github.com/Xliff/525a931eecdc...a9ae212e1c
[Coke] .ask xliff are you memory constrained on that win build? 01:59
tellable6 [Coke], I'll pass your message to Xliff
sxmx Does anyone here build rakudo star under OpenBSD? I'm trying to build the latest release 03:31
OpenBSD 6.8 btw
moon-child sxmx: works fine for me on freebsd. Are you encountering any specific difficulties? 03:33
sxmx hold on I'll post a paste 03:37
pastebin.com/RqpYeuVY 03:39
The raku in the ports for OpenBSD is from 2018, so it may not have worked for a while
ape666 I installed raku on OpenBSD 6.8, it was really easy 03:42
I installed bash, and downloaded the rakudo start bundle 03:44
uncompress the file, then basically you just have to cd into the directory and ./bin/rstart install 03:46
sxmx I'll give it another shot. I was using zsh as my shell before, but I'll start up a bash shell and see if that changes anything 03:47
ape666 it works just by installing it, I'm still using ksh as my default shell 03:48
Xliff [Coke]: No. I have 64 gigs on this box 03:54
ape666 ah yeah, something that I forgot to mention is that I added my user to the staff login group, and increased datasize-cur to be more than 2 gigs of ram 03:56
of memory* 03:57
sxmx hmm, I'm still getting the same parse error as before 03:58
SmokeMachine is there already a way to do a private module repo? 08:40
kawaii SmokeMachine: not if you want it to be part of the ecosystem afaik 09:17
SmokeMachine no, I want to create a private ecosystem to the company 09:19
but use zen to install it
kawaii: ^^
kawaii ah I think there was some discussion about how to do that recently 09:20
but I can't find the github issue right now >:(
SmokeMachine kawaii: I saw you wrote your simple memory session for your project. My memory is terrible, so I'm not sure if I've already showed you this, but in case I haven't: have you seen this? github.com/FCO/Cro-HTTP-Session-Red 10:09
kawaii SmokeMachine: ah wow no, I didn't see this before, but it looks like it might be very useful to me :D 10:11
kawaii thanks! 10:11
SmokeMachine I've used that only on 1 project (that's dead), so, I don't know if it's useful for every Cro/Red project, but that could, maybe, help
SmokeMachine kawaii: please, let me know if any problem/question/suggestion 10:12
Doc_Holliwould wasnt there a sugar with wich you can pass down all arguments of a sub within the sub body? 10:19
tadzik callwith? 10:21
SmokeMachine m: sub a(|c) { b |c }; sub b($a) { say $a }; a 42 # Doc_Holliwould: you mean something like this?
camelia 42
tadzik or callsame, or something like that
I think there's like 4 variants of it
Doc_Holliwould SmokeMachine, yes but with multiple args 10:23
SmokeMachine m: sub a(|c) { b |c }; sub b(|d) { say d }; a 42, 13, 3.14, :a, :111b 10:24
camelia \(42, 13, 3.14, :a, :b(111))
SmokeMachine Doc_Holliwould: ^^
Doc_Holliwould right but then you can't use the arguments in a
SmokeMachine m: sub a(|c ($a, $b, $c, *%pars)) { say $a; b |c }; sub b(|d) { say d }; a 42, 13, 3.14, :a, :111b 10:27
camelia 42
\(42, 13, 3.14, :a, :b(111))
SmokeMachine Doc_Holliwould: ^^
Doc_Holliwould right, that was it 10:28
ty 10:29
SmokeMachine np 10:30
kawaii SmokeMachine: is `^load` not the correct method for me to use in Red when selecting a row based on email address? `my $subject = User.^load($form.email);` gives me... `message => "invalid input syntax for type integer:...` 10:37
SmokeMachine kawaii: .^load works only for ids. and if you have more than one id/unique you need to name it. Have you tried something like: `my $subject = User.^load(email => $form.email);`? 10:40
kawaii SmokeMachine: so in my schema I also need `has Str $.email is column;` changed to be `is unique`? :) 10:41
SmokeMachine kawaii: if the email should be unique, yes 10:42
kawaii: if email is not unique, there is no way `.^load` to know what row you want 10:43
kawaii `one of the following keys aren't ids: email`
ah
SmokeMachine, this is my User model at the moment www.irccloud.com/pastebin/FpeHULdC/ 10:44
SmokeMachine kawaii: if you want to get any row with that email, you can do something like: `User.^all.first: *.email eq $form.email` or to get all rows with that email: `User.^all.grep: *.email eq $form.email` 10:45
kawaii I mean, there should only ever be one, as constrained by the database :)
SmokeMachine yes, it seems to be a bug... :( 10:48
kawaii SmokeMachine: I was thinking so, it seems that even `is unique` on the email column didn't prevent me registering another account with the same email 10:54
SmokeMachine it seems its finding only username is unique 10:55
kawaii: it seems to be a bug on having more than one unique column. If you make username not unique if sees hat email is unique 10:56
kawaii: sorry, it's isn't easy enough to fix it now... :( 10:58
kawaii SmokeMachine: no problem :) I will use grep/all.first instead of load until there is a patch 10:59
SmokeMachine: not sure if this is another Red bug, but `my $subject = User.^all.first: *.email eq $form.email;` looks like it causes cro to sit there waiting for a request that will never finish 11:12
SmokeMachine kawaii: it seems to be working to me... www.irccloud.com/pastebin/X5Krp5IQ/ 11:15
kawaii mmm could be an issue with my cro related code then 11:16
SmokeMachine kawaii: could you share a bit of more code, to let me understand the context, please? 11:27
kawaii SmokeMachine: github.com/kawaii/raku-booru/blob/...akumod#L41 11:30
Kaiepi . 11:47
hi99 hello 12:41
kawaii o/
perryprog m: "hi" x 99 12:45
camelia WARNINGS for <tmp>:
Useless use of "x" in expression "\"hi\" x 99" in sink context (line 1)
perryprog Oh 12:46
rude
(probably for the best) 12:47
xinming m: sub t { return }; my @h = (if t() -> { $_ }); @h.raku.say; 13:44
camelia []
xinming Is there idiom to write the if $t() -> { $_ } ?
m: sub t { return }; my @h = (if t { $_ }); @h.raku.say;
camelia 5===SORRY!5===
Function 't' needs parens to avoid gobbling block
at <tmp>:1
------> 3sub t { return }; my @h = (if t { $_ }7⏏5); @h.raku.say;
Missing block (apparently claimed by 't')
at <tmp>:1
------> 3sub t { return }; my @…
xinming m: sub t { return }; my @h = (if t() { $_ }); @h.raku.say;
camelia []
xinming m: hyper for 3, 1, 4 -> $t { await Promise.in($t).then({ $t.say; }) }; 14:19
camelia 3
1
4
xinming In this example, Why doesn't hyper work?
Or, something I did wrong?
I thought, If hyper works, it'll first print 1, then print 3, then 4
lizmat hyper batches in groups of 64 elements by default 14:22
xinming Got it, thanks, Seems we'll have to use map 14:23
use .hyper(...)
lizmat yup, :1batch
or batch => 1 :-)
xinming :-) 14:26
xinming m: my %h = :left<1>, :right<2>; %h ~~ :(:$left, :$right); $left.raku.say; 15:16
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$left' is not declared
at <tmp>:1
------> 3>, :right<2>; %h ~~ :(:$left, :$right); 7⏏5$left.raku.say;
xinming Is it possible to use signature to unpack the data and access the variable definitions?
guifa m: my %h = :left<1>, :right<2>; %h ~~ :(:left(my $left), :right(my $right); $left.raku.say; 15:34
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in parenthesized expression; couldn't find final ')' (corresponding starter was at line 1)
at <tmp>:1
------> 3eft), :right(my $right); $left.raku.say;7⏏5<EOL>
guifa m: : my %h = :left<1>, :right<2>; %h ~~ :(:left(my $left), :right(my $right)); $left.raku.say;
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus statement
at <tmp>:1
------> 3:7⏏5 my %h = :left<1>, :right<2>; %h ~~ :(:l
expecting any of:
colon pair
guifa I don’t think so, at least not in a signature literal like that but maybe there is a way I can’t think of 15:35
guifa Weird. Is CommaIDE supposed to support Enums? It’s … not for me right now 15:38
cpan-raku New module released to CPAN! Gnome::Gtk3 (0.32.0) by 03MARTIMM 15:52
[Coke] anyone have feedback on github.com/rakudo/rakudo/pull/3989 ? (add way to hide some diag output from Test) 16:28
holli__ Kevlin is right. Naming is hard 17:17
El_Che travis is so slow lately :/ 17:50
[Coke] nqp: nqp::say(nqp::inf-nqp::inf) 19:19
camelia
[Coke] m: use nqp; dd nqp::inf-nqp::inf
camelia NaN
SmokeMachine I just got `Failed to find dependencies: perl:from<native>` when installing Inline::Perl5 19:37
anyone get that too? 19:38
(I do have perl installed) 19:39
timotimo but do you have libperl? 20:33
Geth doc: patrickbkr++ created pull request #3677:
rakudobrew -> rakubrew
22:18
elcaro bisectable6: my @a[3]; 23:59
bisectable6 elcaro, Will bisect the whole range automagically because no endpoints were provided, hang tight