🦋 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.
oddp_ m: my $a = 0, 2, { say $^a + 2; $a + 2 } ... 10; 00:01
camelia Potential difficulties:
Useless use of ... in sink context
at <tmp>:1
------> 3y $a = 0, 2, { say $^a + 2; $a + 2 } ...7⏏5 10;
4
6
8
10
oddp_ m: my $a = 0, 2, { say $^a + 2; $a + 2 } ... 10; say 'foo' 00:02
camelia Potential difficulties:
Useless use of ... in sink context
at <tmp>:1
------> 3y $a = 0, 2, { say $^a + 2; $a + 2 } ...7⏏5 10; say 'foo'
4
6
8
10
foo
SmokeMachine there is a new entry on Red cookbook for custom joins if anyone is interested: github.com/FCO/Red/blob/master/doc...-source-id 00:14
Geth_ ¦ problem-solving: vrurg assigned to jnthn Issue Loading of custom setting logic is undefined github.com/Raku/problem-solving/issues/213 00:20
cpan-raku New module released to CPAN! Red (0.1.17) by 03FCO 00:23
guifa2 ooooh 03:21
I just realized that augment is not lexically scoped
guifa2 lizmat jnthn: is that by design? 03:21
cpan-raku New module released to CPAN! Template::Mustache (1.2.0) by 03SOFTMOTH 03:37
raku-bridge <pilne> it's funny, I often wander away from my perl roots and raku infatuation, but I always seem to come back when I realize just how enjoyable DWIM is. sure some of the things I look at handle specific things better, but nothing has ever come close to being as simple, easy, and fun for general purpose stuff as perl/raku. 06:07
raku-bridge <pilne> I am honestly super happy there's already some perl stuff I can look at/use via inline::perl magic that brings prolog goodness to raku (: 06:53
oddp_ m: say Date.today.later(foo => 3) 12:23
camelia 2023-07-16
rypervenche That looks like a bug :X 12:28
sena_kun m: say Date.today.later(baz => 3) 12:31
camelia 2023-07-16
sena_kun Seems like the year is updating without checking actual named.
Who wants to write a patch? :)
sourceable6, Date.today.later(foo => 3)
sourceable6 sena_kun, github.com/rakudo/rakudo/blob/8532...e.pm6#L234
timotimo m: my $t = Date.today; for "/usr/share/dict/words".IO.lines -> $w { if $t.later(|(Pair.new($w, 5))) !eqv $t { say "$w works!" } } 12:33
camelia Failed to open file /usr/share/dict/words: No such file or directory
in block <unit> at <tmp> line 1
timotimo c: HEAD my $t = Date.today; for "/usr/share/dict/words".IO.lines -> $w { if $t.later(|(Pair.new($w, 5))) !eqv $t { say "$w works!" } }
sena_kun github.com/rakudo/rakudo/blob/8532...e.pm6#L277 <- it happens here
timotimo c: HEAD say "hi" 12:44
committable6 timotimo, ¦HEAD(85320f4): «hi␤»
timotimo c: HEAD my $t = Date.today; hyper for "/usr/share/dict/words".IO.lines.hyper(:512batch) -> $w { if $t.later(|(Pair.new($w, 5))) !eqv $t { say "$w works!" } } 12:45
oh, huh. 12:46
m: my $t = Date.today; say $t eqv $t; say $t eqv $t.later(:0day)
camelia True
True
timotimo m: my $t = Date.today; say $t eqv $t; say $t eqv $t.later(|Pair.new("day", 0)) 12:47
camelia True
True
timotimo m: my $t = Date.today; say $t eqv $t; say $t eqv $t.later(|Pair.new("day", 1))
camelia True
False
timotimo m: my $t = Date.today; say $t !eqv $t; say $t !eqv $t.later(|Pair.new("day", 1))
camelia False
True
timotimo m: my $t = Date.today; say $t !eqv $t; say $t !eqv $t.later(|Pair.new("blorple", 1))
camelia False
True
timotimo m: my $t = Date.today; say $t !eqv $t; say $t eqv $t.later(|Pair.new("blorple", 1)); say $t !eqv $t.later(|Pair.new("blorple", 1)); 12:48
camelia False
False
True
timotimo do i need caffeine or something?
m: my $t = Date.today; say $t; say $t.later(|Pair.new("blorep", 1)) 12:50
camelia 2020-07-16
2021-07-16
timotimo m: my $t = Date.today; say $t; say (my $other = $t.later(|Pair.new("blorep", 1))); say $t eqv $other
camelia 2020-07-16
2021-07-16
False
timotimo so that's what, Date isn't value-type-y?
m: my $t = Date.today; say $t; say (my $other = $t.later(|Pair.new("blorep", 1))); say $t.WHICH, " ", $other.WHICH
camelia 2020-07-16
2021-07-16
Date|59046 Date|59411
timotimo is it the formatter that you can change? 12:51
rypervenche So I'm trying to convert the variables at the top of my script to constants, but am having an issue with it. gist.github.com/rypervenche/3c338a...75a2358c72 12:52
sena_kun rypervenche, use `X~` instead of `X=~` 12:54
oops, `X~=`
rypervenche Oh... derp.
Thanks so much :D
sena_kun Because it is assigning and it tries to assign stuff to @backup-paths with cross operator, and re-assign is prohibited.
yw
rypervenche That's what I get for trying to do this stuff late a night. :P 12:55
committable6 timotimo, gist.github.com/74e72381e3f346df99...3c0c11f7a8 13:18
timotimo c: HEAD my $t = Date.today; hyper for "/usr/share/dict/words".IO.lines.hyper(:512batch) -> $w { if $t.later(|(Pair.new($w, 5))) !eq $t { say "$w works!" } } 13:19
timotimo should have stringified $t ahead of time once there 13:23
committable6 timotimo, gist.github.com/3a2abac160868cbf86...5ec056e750 13:42
timotimo huh. why? 13:43
c: HEAD my $t = Date.today; hyper for "/usr/share/dict/words".IO.lines.head(1024) -> $w { say $t.later(|(Pair.new($w, 5))).Str, " - ", $t.Str; } 13:44
committable6 timotimo, gist.github.com/4bd27d469941843a4a...9a7dace17b
timotimo oh ok now that i look more closely i *finally* get what the bug was
committable6 timotimo, gist.github.com/58838e03c13222220e...673d6bb29e 13:58
Geth_ doc/master: 6 commits pushed by (JJ Merelo)++ 15:50
codesections How do I `use` a module defined in the same file? I would've thought I could write a CLI like this: 15:55
le Foo { sub foo() is export { say "FOO" } }
use Foo;
sub MAIN() { foo }
JJMerelo codesections you don't need to use, it's already in the namespace 15:56
codesections s/le/ module/
JJMerelo m: module Foo { sub foo() is export { say "FOO" } }; say foo 15:57
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
foo used at line 1
codesections but, keeping that code and cutting the `use Foo;` line gets me an "Undeclared routine foo`
JJMerelo m: module Foo { sub foo() is export { say "FOO" } }; say Foo::foo
camelia Could not find symbol '&foo' in 'Foo'
in block <unit> at <tmp> line 1
codesections yeah, like that :)
JJMerelo Hum
JJMerelo m: module Foo { sub foo() is export { say "FOO" } }; need Foo; say Foo::foo 15:57
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find Foo in:
inst#/home/camelia/.raku
inst#/home/camelia/rakudo-m-inst-1/share/perl6/site
inst#/home/camelia/rakudo-m-inst-1/share/perl6/vendor
inst#/home/camelia/rakud…
JJMerelo m: package Foo { sub foo() is export { say "FOO" } }; say Foo::foo 15:58
camelia Could not find symbol '&foo' in 'Foo'
in block <unit> at <tmp> line 1
JJMerelo m: package Foo { sub foo() is export { say "FOO" } }; say foo
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
foo used at line 1
codesections My thoughts exactly :) At least I know I'm not crazy – those are the same sort of things I tried
JJMerelo m: package Foo { sub foo() is export { say "FOO" } }; require Foo; say foo 15:59
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
foo used at line 1
codesections I also tried `use lib '.';` (which is how I'd do it from a different file in the same development directory
)
JJMerelo m: our package Foo { sub foo() is export { say "FOO" } }; say foo 16:00
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
foo used at line 1
JJMerelo m: our module Foo { sub foo() is export { say "FOO" } }; say foo
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
foo used at line 1
JJMerelo m: our class Foo { sub foo() is export { say "FOO" } }; say foo 16:01
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
foo used at line 1
JJMerelo m: our class Foo { sub foo() is export { say "FOO" } }; say Foo::foo
camelia Could not find symbol '&foo' in 'Foo'
in block <unit> at <tmp> line 1
[Coke] OMG
:)
JJMerelo m: our module Foo is export { sub foo() is export { say "FOO" } }; foo
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
foo used at line 1
JJMerelo m: sub Foo::foo() is export { say "FOO" } }; Foo::foo 16:02
camelia 5===SORRY!5=== Error while compiling <tmp>
Unexpected closing bracket
at <tmp>:1
------> 3sub Foo::foo() is export { say "FOO" } 7⏏5}; Foo::foo
JJMerelo m: sub Foo::foo() { say "FOO" }; Foo::foo
camelia Could not find symbol '&foo' in 'Foo'
in block <unit> at <tmp> line 1
JJMerelo m: sub Foo::foo() { say "FOO" }; Foo::<foo> 16:03
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Foo used at line 1
JJMerelo Well...
m: sub Foo::foo() { say "FOO" }; Foo::<&foo> 16:04
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Foo used at line 1
JJMerelo m: sub Foo::foo() { say "FOO" }; say Foo.^lookup('foo') 16:05
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Foo used at line 1
codesections Thanks for the attempt :) (It's also possible that the correct syntax won't work with camelia, though I'm not sure)
It's not a big deal to split the script into two files; I just feel like I must be missing something easy 16:06
JJMerelo m: our module Foo is export { sub foo() is export { say "FOO" } }; say OUR::("Foo")
camelia (Foo)
JJMerelo m: our module Foo is export { sub foo() is export { say "FOO" } }; say OUR::("Foo").keys
camelia ()
JJMerelo m: our module Foo is export { sub foo() is export { say "FOO" } }; import Foo; foo; 16:07
camelia FOO
JJMerelo I mean, really
just import
JJMerelo Probably not the best documented thing docs.raku.org/language/module-pack...try-import codesections 16:08
[Coke] codesections: splitting the package into a separate file also allows for precomp.
codesections :JJMerelo Thanks! 16:09
JJMerelo Also this issue github.com/Raku/doc/issues/2364
codesections Yeah, true. Like I said, this was just for a simple CLI. Eventually, it'll get big enough to split
JJMerelo m: sub Foo::foo() { say "FOO" }; import Foo; foo; 16:10
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find module Foo to import symbols from
at <tmp>:1
------> 3sub Foo::foo() { say "FOO" }; import Foo7⏏5; foo;
JJMerelo m: our sub Foo::foo() { say "FOO" }; foo; 16:11
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
foo used at line 1
JJMerelo m: our sub Foo::foo() { say "FOO" }; Foo::foo;
camelia Could not find symbol '&foo' in 'Foo'
in block <unit> at <tmp> line 1
JJMerelo m: our sub Foo::foo() { say "FOO" }; import Foo; Foo::foo;
camelia 5===SORRY!5=== Error while compiling <tmp>
Could not find module Foo to import symbols from
at <tmp>:1
------> 3ub Foo::foo() { say "FOO" }; import Foo7⏏5; Foo::foo;
JJMerelo No, that won't work...
dotdotdot m: module Foo { sub foo is export { say "FOO" } }; import Foo; foo; 16:12
camelia FOO
Geth_ doc: 9ff3b27ab9 | (JJ Merelo)++ | doc/Type/Supply.pod6
Skip test for success of compilation, closes #3515
16:14
linkable6 Link: docs.raku.org/type/Supply
DOC#3515 [closed]: github.com/Raku/doc/issues/3515 [docs] xt/examples-compilation.t doc/Type/Supply.pod6 fails
Petr37 your favourite OS (for daily use or development)? 16:28
tadzik some variant of Linux 16:29
Petr37 tadzik, debian like? 16:32
timotimo i have a fedora 16:34
at some point i want to try silverblue
tadzik Petr37: currently, yes, but I don't much care tbh :)
I have Ubuntu on a laptop, Pop_Os on the desktop, debian-something on the server
timotimo well, fedora has "First" as part of their motto, so you can be sure to get the latest and best linux stuff 16:35
jdv79 i use ubuntu at work at fedora at home and the diffs are tiny, to me. 16:36
rypervenche I use Gentoo for my laptop, work machine, and servers. 16:40
Petr37 thanks 😊 16:44
now i use win 10, but thinking about nix like 16:45
oddp_ Why?
Petr37 what's about bsd?
guifa2 Anyone here on a Windows machine? 16:46
Petr37 oddp_, more flexible,less system requirements
guifa2 . o O ( since we're talking about OSs and I'm currently writing a UserTimezone module haha)
Petr37 guifa2, i use Windows 10 now 16:47
guifa2 Petr37: do you happen to know a way to grab the current timezone via the (non-Power) shell? O:-) 16:48
[Coke] tzutil /g ? 16:49
shows "Eastern Standard Time" here.
[Coke] you can parse the output of tzutil /l to see the definition 16:50
guifa2 ah nice. Any option/flag that could would output America/New_York for you?
Petr37 guifa2, @echo off setlocal for /f "tokens=*" %%f in ('tzutil /g') do ( echo %%f ) endlocal
[Coke] not that I see 16:51
guifa2 is away from home so no Windows machine to boot onto to test
[Coke] there's /g (get) /s (set) and /l (list) - don't see any other options
Petr37 guifa2, from stackoverflow
guifa2 sighs 16:52
Why does Windows always have to do things so differently lol
oh 16:54
sweet
CLDR actually already recognized this and through their hands up and have a literal entire separate file for Windows timezones mapping them to the standard ones lololol
Petr37 guifa2, superuser.com/questions/1460526/ge...mmand-line 16:57
maybe anyone know use bsd? 16:58
i use ubuntu(about 3 ears),but it crashes sometimes 17:01
Petr37 where i can find info about Rakudo.js? 17:12
oddp_ "maybe anyone know use bsd?" I've used freebsd on my laptop for a while. It's a bit more involved to maintain than the usual linux distros (lot of manual reading). Switched back because the graphics driver story wasn't pretty. Was a solid workstation experience otherwise. 17:17
[Coke] www.npmjs.com/package/rakudo 17:22
Petr37 [Coke], thanks )) 17:27
oddp_, ok) very useful info! 17:29
[Coke] timotimo: question on rakudo.org - when you got the keys to the kingdom, is there a document somewhere that shows how things are setup? 19:17
wondering if you can answer github.com/perl6/rakudo.org/issues/41
timotimo that's not a small question i could just quickly answer :D 19:27
[Coke] well, if there was already a document, there would be. :)
[Coke] I guess for now I can just remove the reference. 19:27
guifa2 repeats his question about Windows needing to be special and using numerical ids for geographical identities that are just plain whacky 19:53
rypervenche Oh wow, I just learned about Uzu. It's so much like Hugo, but written in Raku :D And uses Template6 and Mustache.
[Coke] fixes github.com/perl6/rakudo.org/issues/36 21:34
Altai-man_ [Coke], thank you! 21:37
[Coke] sure. Doing all the easy stuff now that the site regen is happening 21:53
.tell lizmat I added a link to #rakulang on twitter on the rakudo.org footer
tellable6 [Coke], I'll pass your message to lizmat
lizmat [Coke]++ 21:54
[Coke] oh, you're still here. :)
~~
give it 5 minutes to show up on the live site. :)
lizmat yeah, not hacking anymore, just trying to get Rakudo to build :-(
I made the mistake of nuking the "gen" dir 21:55
apparently, the gen dir is not generated
[Coke] there it is. 21:56
oops
lizmat haz a rakudo again 21:57
raku-bridge <pilne_discord> i'm on win10 for the moment to game with the gf better, but i vastly prefer a debian-based (usually ubuntu tbh) linux for my daily driver. 22:31
usermac Hello all. New to Raku. How do I type "「 」" on macOS? 22:43
and what are they????
rypervenche usermac: I don't use a Mac, but can you try alt+shift+8 (and again with 9)? 22:44
usermac Thank you but no-go on mac 22:45
rypervenche Oh, but that's the double quote version. Hmm. Doesn't seem possible without using some sort of layout that allows you to do it.
oddp_ usermac: They're special quotation. But you don't have to use them, "foo" and 'bar' is just as fine. 22:46
What are you trying to do?
usermac So they're not part of Raku? I am learning and the examples show it all the time in code
usermac # OUTPUT: 「I ♥ Raku」 love => 「♥」 lang => 「Raku」 22:47
above is an example from roku.org home screen
jnthn No idea how to type them on Mac, but yes, they are a Raku quoting constructing, and used in the regex match output. They were chosen because they're very unlikely to be encountered otherwise, and so allow the output to be displayed without escaping. 22:49
usermac Ah, thank you.
oddp_ usermac: as a newcomer myself, I found raku.guide/ quite helpful. It's a nice overview. And more in-depth stuff is in the offical docs. 22:55
melezhik Hi! Here is the draft of RakuOps, issue number 2 - sparrowdo.wordpress.com/2020/07/16...s-issue-2/ 22:59
please share you comments, any typos found (there should be some) before it gets public, thank you!
guifa2 jnthn: did you happen to see my Q about augment? 23:15
jnthn guifa2: No, also heading to sleep now, but feel free to point me at it tomorrow :) 23:47
guifa2 alright will do :-)
jnthn 'night o/