🦋 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.
cpan-raku New module released to CPAN! Grammar::DiceRolls (0.3.0) by 03TYIL 04:54
New module released to CPAN! IRC::Client::Plugin::DiceRolls (0.2.0) by 03TYIL 05:01
Geth_ doc: 302ffc04cf | (JJ Merelo)++ | doc/Language/typesystem.pod6
Slightly correct API information
08:35
linkable6 Link: docs.raku.org/language/typesystem
Geth_ doc: 526aa2fdf5 | (JJ Merelo)++ | doc/Language/typesystem.pod6
Clarify auth string
08:38
linkable6 Link: docs.raku.org/language/typesystem
Geth_ doc: d77197925d | (JJ Merelo)++ | doc/Language/typesystem.pod6
Change example to reflect common usage.
08:40
linkable6 Link: docs.raku.org/language/typesystem
bartolin_ JJMerelo: a quick question: I've stumpled upon the variable names in this example for number context github.com/Raku/doc/blob/d77197925...6#L69-L71. My mind insisted 'but these are strings'. Wouldn't changing the variable names to $not-a-number and $neither-a-number make the example clearer? (You've added the example, so I'm asking. I could do the change.) 09:09
cpan-raku New module released to CPAN! MongoDB (0.43.11) by 03MARTIMM 12:17
RaycatWhoDat Quick question: is there a way to do something like `my Int $max = 5; for 1..$max { .say }`? 14:12
Or would it be better to just manually `Range.new`?
p6: my Int $max = 5; for 1..$max { .say } 14:14
camelia 1
2
3
4
5
RaycatWhoDat dammit
I swear, every time I ask a question here, I run the code in Camelia and it just works
RaycatWhoDat p6: say VERSION 14:16
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
VERSION used at line 1. Did you mean 'Version'?
RaycatWhoDat p6: say Version
camelia (Version)
RaycatWhoDat Hm.
El_Che RaycatWhoDat: you're just showing of how your brain is a perfect rakudo compiler 14:31
:)
raku-bridge <Snoofkin> Version is a type for... you guessed it, a version identifier 14:44
<Snoofkin> m: say $*RAKU.version 14:46
<Snoofkin> well, naturally that wouldn't work over the bridge
<Snoofkin> but that's how you'd ask for the version
raku-bridge <Snoofkin> But that only gives the language version, so it's more useful to look at $*VM 14:48
RaycatWhoDat Ah, thanks. El_Che, Snoofkin 15:03
p6: $*VM.version.say 15:04
camelia v2020.05.35.gf.6.d.04.a.45.b
RaycatWhoDat Where can I find more information on these $* vars?
El_Che docs.raku.org/language/variables#D..._variables
RaycatWhoDat Got it, thanks again. Totally forgot twigils are a thing. 15:05
So, another thing I'm kinda hoping to get out of this foray into a language is a better understanding of how to be a computer scientist. I've been coding for 10ish years but I seem to be falling short in several deeper conversations about algorithms or data science or what have you. I can understand it in context but I'm having trouble articulating approaches and such. 15:07
Y'all wouldn't happen to have any reading material or pointers for that, would ya? 15:08
El_Che RaycatWhoDat: as matter of fact, I do, met look for the url 15:14
greenteapress.com/wp/think-perl-6/
you can buy the book, or download the pdf for free
RaycatWhoDat Oh! Nice. 15:15
El_Che if you have programming experience, you can go faster through the book, but it shows some concepts that are good to know
algorhythm and CS book don't need to be language specific if you want to dig deeoer 15:16
deper
e
RaycatWhoDat You tried.
xD
El_Che and failed :)
RaycatWhoDat That makes sense, though re: language-agnostic. Just bought that book. I'll give it a good read and see where my head's at after that. 15:18
suman m: my $x = 3; until $x != 1 { say "hello"; $x = $x - 1;} 15:19
camelia ( no output )
suman I guess it should say hello twice 15:20
but no output
m: my $x = 3; until $x != 1 { say "hello"; $x = $x - 1;}
camelia ( no output )
RaycatWhoDat Hmm. 15:21
lucs suman: At what point does $x become different from 1? That's when the loop stops.
RaycatWhoDat Doesn't the conditional get fulfilled immediately?
Ah, ninja'd by lucs
Might be looking for `while`.
lucs suman: You got the logic backwards (who hasn't, many times (/me looks at himself)) 15:22
RaycatWhoDat lucs: I feel that on a spiritual level.
Coded myself into a box where the logic is all wrong and the variables don't matter
suman My logic is start with 3 and not until x is 1 run the loop at the same time decrement x 15:23
lucs m: my $x = 3; until $x == 1 { say "hello"; $x = $x - 1;}
camelia hello
hello
lucs m: my $x = 3; while $x != 1 { say "hello"; $x = $x - 1;} 15:24
camelia hello
hello
RaycatWhoDat `until` is one of those keywords that feels where when it isn't postfix
weird* 15:25
suman lucs You nailed it thank you
lucs You're welcome.
I only use 'until' and 'unless' as postfix, otherwise I get confused :/ 15:26
RaycatWhoDat ^
lucs 「action」 unless 「cond」 <---> if ! 「cond」 { 「action」 } 15:29
「action」 until 「cond」 <---> while ! 「cond」 { 「action」 }
phogg I think this is because in English saying "Unless X then Y" is less common than saying "Y, unless X" and so the latter is more natural. Similarly you don't often see sentences starting with "Until," except certain stock phrases e.g. "Until next time" is normal but "Until we are finished we will keep working" is not. 15:34
lucs phogg: Yep, that's how I feel it. 15:38
Geth_ doc: d69724319e | Coke++ | util/update-and-test
Don't allow TEST_JOBS > 1

Related to #3466
15:58
linkable6 DOC#3466 [open]: github.com/Raku/doc/issues/3466 [xt] Pod::Cache isn't safe for concurrent access
Doc_Holliwood I think it's common in parent talk. "until you've cleaned your room you will not leave it" =) 16:37
suman Is it possible to return multiple values from a function ? 17:26
suman example return a scalar and array 17:26
This works but it it advisable 17:29
return @sequence, "\n", "Total steps: ", $count;
lucs suman: You can do that if you wish. More details here: docs.raku.org/language/functions#Return_values 17:34
Note that returning a bunch of values might get a bit hard to manage. 17:35
suman lucs # This function takes a number and calculates value of the num 17:37
$number = $number/2;
"Total steps: ", $count;
lucs I'm not sure I'm following. You might want to paste more complete code in a gist or something. 17:39
lucs & # ... 17:58
[Coke] m: subset Y is Int|Str; sub foo(--> Y) { ... } # Is this a LTA message? 18:18
camelia 5===SORRY!5=== Error while compiling <tmp>
No such method 'add_parent' for invocant of type 'Perl6::Metamodel::SubsetHOW'
at <tmp>:1
[Coke] m: subset Y is Int|Str; # sub not needed
camelia 5===SORRY!5=== Error while compiling <tmp>
No such method 'add_parent' for invocant of type 'Perl6::Metamodel::SubsetHOW'
at <tmp>:1
[Coke] (I know the syntax is wrong there) 18:19
lizmat [Coke]: I'd say yes, that's LTA error message 18:20
[Coke] m: subset Y is Int; # junction also not needed. :) 18:34
camelia 5===SORRY!5=== Error while compiling <tmp>
No such method 'add_parent' for invocant of type 'Perl6::Metamodel::SubsetHOW'
at <tmp>:1
deadmarshal Hi. I've just started reading a bit of Raku and found it very much uglier than perl5. what do you think? 🤔 isn't it harder to read? considering that in this age readability counts amongst people. 18:49
CIAvash say WHAT now; 18:55
lizmat deadmarshal: feels more like a question you should be asking on the #perl channel 18:58
deadmarshal hmmmm 19:06
raku-bridge <tmtvl> say .WHAT with now; # OUTPUT: (Instant) 19:22
Geth_ doc: softmoth++ created pull request #3467:
p6doc: Add a deprecation comment to inform developers
19:47
rypervenche Sorry for the notive question. I'm looking to have a subroutine run some rsync commands and have different rsync options for each src/dest. What would be the best data structure to have the src, dest, rsync options, etc for each sync that I need to do? I'm guessing maybe an array of hashes or hash of hashes, but I'm curious to know if there's a better way to structure it all. And how I might write it 20:11
well into my code.
El_Che Personally I would write a hash of hashes 21:07
but you can make objects as well
rypervenche: from my backup script: paste.ubuntu.com/p/xX2rmd7Ns6/ 21:10
Geth_ doc/sethash-link-set-ops: 98bad76bc3 | (Stoned Elipot)++ | doc/Type/SetHash.pod6
Fix link to set operators
21:24
doc: stoned++ created pull request #3468:
Fix link to set operators
21:25
[Coke] m: say "3.9.2".Version < "3.10.1".Version 22:31
camelia True
[Coke] ^^ Very handy for me at work at the moment
[Coke] ... once I update my install of rakudo. :| 22:33
(eh, will just use Version.new) 22:34
Geth_ doc: softmoth++ created pull request #3469:
create-cli: Minor improvements to enum example
22:38
rypervenche El_Che: Thanks 23:40