🦋 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! Terminal::ANSI (0.0.1) by 03BDUGGAN 02:25
cpan-raku New module released to CPAN! Async::Workers (0.2) by 03VRURG 04:15
cpan-raku New module released to CPAN! Async::Workers (0.2.1) by 03VRURG 04:31
Zero_Dogg Is there any syntax for destructuring a hash based on the left side? Ie. something like my ($a,$b) = %hash; extracting the a and b keys (I know this doesn't work) 08:39
tobs m: my %h = :42a, :80b; my (:$a, :$b) := %h; say $a; say $b 08:50
camelia 42
80
tobs Zero_Dogg: you have to use the binding := operator, then you can destructure just like in signatures 08:51
Zero_Dogg tobs: aha, I tried that with = not :=. Thanks!
xinming_ SmokeMachine: is there a roadmap to fix github.com/FCO/Red/issues/128 ? :-) 09:58
xinming_ module A { class B { }; class B::C { } }; B.raku.say; # <-- Sorry to repeat the question. in this example, The namespace B is created globally, Is this a bug or a feature? 11:07
evalable6 A::B
xinming_ I thought that when we are in module A { }; everything should be restricted to namespace, A, even the class declarations. 11:08
cpan-raku New module released to CPAN! Terminal::Table (0.0.9) by 03ALOREN 11:36
New module released to CPAN! pack6 (0.3) by 03ALOREN
New module released to CPAN! Terminal::Table (0.0.8) by 03ALOREN
cpan-raku New module released to CPAN! Terminal::ANSI (0.0.2) by 03BDUGGAN 13:57
xheimlich is there a function that takes a function (roughly like collatz-step in the paste) and repeatedly iterates it until some condition like collatz-iter like in pastebin.com/7FWvCvYj ? 14:01
xheimlich minus say $n. actually maybe append to a list. 14:02
tobs xheimlich: yes, the sequence operator can do this sort of thing. Just a second 14:03
xheimlich the irclog web interface is brilliant. how many times I forget or get disconnected from a lower-traffic, freenode channel. 14:05
tobs m: sub collatz-step ($n) { $n %% 2 ?? $n/2 !! 3*$n+1 }; my seq = 17, &collatz-step ... * == 1; say seq # 17 is the initial value 14:07
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed my (did you mean to declare a sigilless \seq or $seq?)
at <tmp>:1
------> 3n) { $n %% 2 ?? $n/2 !! 3*$n+1 }; my seq7⏏5 = 17, &collatz-step ... * == 1; say seq
tobs m: sub collatz-step ($n) { $n %% 2 ?? $n/2 !! 3*$n+1 }; my \seq = 17, &collatz-step ... * == 1; say seq # 17 is the initial value
camelia (17 52 26 13 40 20 10 5 16 8 4 2 1)
tobs the construct `17, &f ... $condition` makes a sequence that starts with 17, f(17), f(f(17)), etc. until $condition is satisfied 14:08
(the arity of &f can be greater than one as well, in which case you need enough initial values) 14:09
xheimlich what's the backslash in "my \seq"? 14:10
MasterDuke just how you create a non-sigiled variable 14:11
tobs it's a sigil-less variable. The sequence operator returns a Seq object and I want to avoid any containers in the way of me iterating that sequence.
I guess you could have used @seq as well, but I'm not sure if that would have iterated the Seq during assignment (dangerous if the Collatz conjecture is false) or if it would have become a lazy array. The sigil-less seq is definitely lazy. 14:13
xheimlich oh. thanks a lot! 14:14
xheimlich I can't think of the idiomatic equivalent of junctions in any other language. 14:42
cpan-raku New module released to CPAN! Algorithm::LBFGS (0.0.6) by 03TITSUKI 14:43
xheimlich I've got professional experience in Matlab then Python. I know how to use generators and yield from etc. But this? pastebin.com/tfWWFirx 14:45
Geth_ ¦ doc: Altai-man self-assigned Add navigation sidebar to docs website github.com/Raku/doc/issues/2509 14:57
¦ doc: Altai-man self-assigned Suggest appearance improvements for the site github.com/Raku/doc/issues/2429
¦ doc: Altai-man self-assigned docs.perl6.org design github.com/Raku/doc/issues/1090
¦ doc: Altai-man self-assigned Mobile usability problems github.com/Raku/doc/issues/3470 15:00
¦ doc: Altai-man self-assigned Deploy docs regularly github.com/Raku/doc/issues/3428
¦ doc: Altai-man self-assigned docs.perl6.org looks bad in dark-themed browsers github.com/Raku/doc/issues/3055
¦ doc: Altai-man self-assigned DevTools failed to parse SourceMap github.com/Raku/doc/issues/2988 15:01
¦ doc: Altai-man self-assigned Migrate from Mojolicious to Cro github.com/Raku/doc/issues/2910
¦ doc: Altai-man self-assigned Is there a good reason why we're not using jQuery CDNs? github.com/Raku/doc/issues/2906 15:02
¦ doc: Altai-man self-assigned Create a web deployment script github.com/Raku/doc/issues/2909
¦ doc: Altai-man self-assigned Rewriting pointers to web fragments has stopped working github.com/Raku/doc/issues/2833 15:03
¦ doc: Altai-man self-assigned Create site-specific Mustache templates github.com/Raku/doc/issues/2508
¦ doc: Altai-man self-assigned Drop different renderings (italics vs. upright) of class and role descriptions in type table github.com/Raku/doc/issues/2477 15:04
¦ doc: Altai-man self-assigned Fix left sidebar in the "Language" page github.com/Raku/doc/issues/2138
¦ doc: Altai-man self-assigned Collect repo traffic stats github.com/Raku/doc/issues/2045
¦ doc: Altai-man self-assigned execute code on glot.io github.com/Raku/doc/issues/1866
¦ doc: Altai-man self-assigned Only highlight perl 6 snippets as perl 6 github.com/Raku/doc/issues/1430 15:05
¦ doc: Altai-man self-assigned Search Index anchors point a line too low github.com/Raku/doc/issues/1303 15:06
¦ doc: Altai-man self-assigned Typing a search term and hitting return always gives first result from menu of indexed items github.com/Raku/doc/issues/1108 15:08
¦ doc: Altai-man self-assigned Add new top level search page github.com/Raku/doc/issues/1099
¦ doc: Altai-man self-assigned convert 'make run' to use Perl 6 github.com/Raku/doc/issues/1057
¦ doc: Altai-man self-assigned Lots of broken links, invalid HTML and so on (checklink) github.com/Raku/doc/issues/561
¦ doc: Altai-man self-assigned Need a way to mark which version something is part of. github.com/Raku/doc/issues/302
Geth_ ¦ doc: Altai-man unassigned from antoniogamiz Issue Standardize search categories github.com/Raku/doc/issues/1410 15:35
¦ doc: Altai-man self-assigned Standardize search categories github.com/Raku/doc/issues/1410
¦ doc: Altai-man self-assigned Search methods through class hierarchy github.com/Raku/doc/issues/1087 15:36
¦ doc: Altai-man self-assigned Extra info in search criteria github.com/Raku/doc/issues/1086
¦ doc: Altai-man self-assigned Page search function conflicts with browser search github.com/Raku/doc/issues/3025 15:37
¦ doc: Altai-man self-assigned //= Not easy to find in docs github.com/Raku/doc/issues/2861 15:38
¦ doc: Altai-man self-assigned searching for slurp isn't great github.com/Raku/doc/issues/2491 15:40
cpan-raku New module released to CPAN! PDF::Class (0.4.7) by 03WARRINGD 17:05
SmokeMachine xinming_: I'm working on it... but it's taking longer than I'd like it to take... github.com/FCO/Red/compare/inheritance 17:56
xinming_ SmokeMachine: the multi-column unique example in docs/tutorials/cookbook.md doesn't work, Is that known bug?
xinming_ lol, I was typing the question, and you replied. ;-) 17:57
SmokeMachine xinming_: odd... it was working when I've created that 18:00
xinming_ something definitely broke it, Did you try it just now? 18:01
SmokeMachine just did... and yes, it's broken
that's the same error as before I've fixed that...
xinming_: sorry, I wasn't with the last master on this machine... it seems to be working here to me...\ 18:03
xinming_: www.irccloud.com/pastebin/FP0bGeiT/
xinming_ Ok, take your time fixing it. ;-)
SmokeMachine xinming_: are you using from git repo? from the last master? 18:04
xinming_ Yea 18:05
SmokeMachine that worked here to me...
could you show me the complete error you are getting, please?
xinming_ SmokeMachine: paste.debian.net/1170360/ 18:09
SmokeMachine xinming_: that's the same error I was getting before pulling master... 18:10
xinming_: www.irccloud.com/pastebin/wjAHJAOo/ 18:11
xinming_ SmokeMachine: Ok, Thanks, After I pull the master, seems working
I'll try more
SmokeMachine (I should deploy that...) 18:12
I think I'll do that now! 18:13
xinming_ www.irccloud.com/pastebin/FP0bGeiT/ <--- This example output is not perfect, There are 2 unique constraints for a2
SmokeMachine yes... I'll fix that 18:14
xinming_ BTW, what does :unique<a b c> mean?
SmokeMachine no, that's right... that's exactly what I've asked for, isn't it? 18:15
xinming_ are a b c placeholder?
SmokeMachine it mean I want to add that column on the unique constraint a b and c
I'm "giving names" to the unique constraints and setting on what constraint the column should apear 18:16
xinming_ SmokeMachine: is it possible to do something like, ::?CLASS.add-unique-constraint('name' => {.col1, .col2, .col3}); ?? 18:17
SmokeMachine without name
::?CLASS.add-unique-constraint({.col1, .col2, .col3});
xinming_ SmokeMachine: Thanks, I think I understand that `a b c` means anonymous constriant placeholder. 18:18
SmokeMachine but the idea is accept name in the future
xinming_ we need the name in pg
SmokeMachine the names aren't being used to anything besides grouping them... but that will be the name of the constraint in the future... 18:19
yes, it will be used there
xinming_ Thanks. just now, I grep the lib/, and found .^add-unique-constraint 18:20
Sleep time, thanks, Night.
SmokeMachine have a good night
xinming_ quite sleepy, it's 2:20 AM here
SmokeMachine oh... thanks for all your effort playing with Red 18:22
cpan-raku New module released to CPAN! Red (0.1.28) by 03FCO 18:38
cpan-raku New module released to CPAN! MongoDB (0.43.15) by 03MARTIMM 20:13
xheimlich raku -e "say 2" works, but raku -e "longer contrived oneliner" gives a bash error. This isn't about raku, but I'm not sure how to incorporate raku one-liners in bash scripts 20:24
timotimo yeah, usually trouble with quoting 20:25
raku allows using a rather extensive selection of quoting constructs that wouldn't conflict with bash 20:26
moon-child xheimlich: write the whole script in raku, then you can have one-liners to your heart's content :) 21:09