🦋 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. |
|||
AlexDaniel | github.com/topics/raku 181 repos vs 372 repos github.com/topics/perl6 | 00:30 | |
.seen Xliff | 00:59 | ||
tellable6 | AlexDaniel, I saw Xliff 2019-10-25T06:53:50Z in #raku-dev: <Xliff> o/ | ||
01:22
Kaiepi left,
Kaiepi joined
01:24
AlexDani` joined
01:29
AlexDaniel left
01:30
AlexDani` is now known as AlexDaniel,
AlexDaniel left,
AlexDaniel joined
02:00
chloekek left
|
|||
Geth_ | perl6.org: 53e304963d | (Aleks-Daniel Jakimenko-Aleksejev)++ | 8 files More Raku changes Still leaving some places where more work is required, but now most pages talk about Raku. |
02:56 | |
03:05
wamba joined
|
|||
SmokeMachine | Does it make sense? www.irccloud.com/pastebin/TukGCFCK/ | 03:24 | |
03:34
squashable6 left
03:35
squashable6 joined
04:35
notable6 left,
releasable6 left,
quotable6 left,
squashable6 left,
evalable6 left,
tellable6 left,
benchable6 left,
bloatable6 left,
greppable6 left,
unicodable6 joined,
quotable6 joined
04:36
bisectable6 joined
04:37
squashable6 joined,
statisfiable6 joined,
cpan-raku left,
notable6 joined,
shareable6 joined,
greppable6 joined,
reportable6 joined,
coverable6 joined
04:38
bloatable6 joined,
tellable6 joined,
benchable6 joined,
committable6 joined,
evalable6 joined,
releasable6 joined,
nativecallable6 joined,
cpan-raku joined,
cpan-raku left,
cpan-raku joined
|
|||
rba | AlexDaniel: I know. Subdomains are not completely ready yet. | 05:04 | |
06:37
unicodable6 left,
releasable6 left,
nativecallable6 left,
tellable6 left,
notable6 left,
greppable6 left,
reportable6 left,
quotable6 left,
statisfiable6 left,
bisectable6 left,
coverable6 left,
shareable6 left,
evalable6 left,
benchable6 left,
bloatable6 left,
committable6 left,
squashable6 left
06:38
benchable6 joined,
committable6 joined,
releasable6 joined,
quotable6 joined,
squashable6 joined,
statisfiable6 joined
06:39
notable6 joined,
bisectable6 joined,
bloatable6 joined,
coverable6 joined,
tellable6 joined,
evalable6 joined,
unicodable6 joined,
shareable6 joined,
nativecallable6 joined
06:40
reportable6 joined,
greppable6 joined
06:43
wamba left
|
|||
xinming | SmokeMachine: How to do multi column sort BTW? | 08:03 | |
08:14
wamba joined
08:50
wamba left
09:03
hankache joined
09:31
hankache left
|
|||
xinming | m: sub test ($y) { my @x; if $y { @x = <a b c> }; @x; }; test(True); | 09:39 | |
camelia | ( no output ) | ||
xinming | m: sub test ($y) { my @x; if $y { @x = <a b c> }; @x; }; test(True).say; | ||
camelia | [a b c] | ||
09:40
hankache joined
|
|||
xinming | In this example, what is the perl6 way to write `my @x; if $y { @x = ... }; do-something with @x | 09:40 | |
09:55
hankache left
|
|||
SmokeMachine | red: use Post; .say for Post.^all.sort: { .title, .body } # xinming, I don’t remember if it’s implemented... | 09:55 | |
ZzZombo | m: my @x = if 'asd' { 1,2,3 };say @x | 10:13 | |
camelia | 5===SORRY!5=== Word 'if' interpreted as a listop; please use 'do if' to introduce the statement control word at <tmp>:1 ------> 3my @x = if7⏏5 'asd' { 1,2,3 };say @x Unexpected block in infix position (two terms in a row) at <tmp>:… |
||
ZzZombo | m: my @x = do if 'asd' { 1,2,3 };say @x | ||
camelia | [1 2 3] | ||
ZzZombo | m: my @x = do if False { 1,2,3 };say @x | ||
camelia | [] | ||
11:01
redable joined
|
|||
SmokeMachine | red: use Post; .say for Post.^all.sort: { .title, .body } # xinming, I don’t remember if it’s implemented... | 11:01 | |
redable | SmokeMachine, gist.github.com/04f6e837f9ceae9755...c55bf6f988 | ||
SmokeMachine | red: use Post; my $*RED-DEBUG = True; .say for Post.^all.sort: { .title, .body } | 11:02 | |
redable | SmokeMachine, gist.github.com/33537e9ee8955dbee0...d5d6cdeb6e | ||
SmokeMachine | xinming: yes, it's working... ^^ | ||
11:13
redable left
|
|||
tbrowder | hi, raku people! | 11:37 | |
is it true that in a substituion like: s/some stuff/any literal/ | 11:38 | ||
11:39
xinming left
11:40
xinming joined
|
|||
tbrowder | any char between the second pair of forward slashes is valid as a substitution (except another forward slash which must be escaped)? | 11:41 | |
SmokeMachine | red: use Post; say Post.^all.pick | 11:44 | |
11:45
redable joined
|
|||
tbrowder | m: s/foo/'/ | 11:46 | |
camelia | Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at <tmp> line 1 |
||
tbrowder | s/foo/bar/ | ||
m: s/foo/bar/ | 11:47 | ||
camelia | Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. in block <unit> at <tmp> line 1 |
||
SmokeMachine | red: use Post; say Post.^all.pick | 11:49 | |
tbrowder | m: s/foo/bar/; .say | ||
camelia | Use of uninitialized value of type Any in string context. Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful. (Any) in block <unit> at <tmp> line 1 |
||
redable | SmokeMachine, Post.new(id => 1, title => "test1", body => "body-test1", deleted => 0, created => DateTime.new(2019,10,22,12,0,19.196347), tags => Set.new("")) | ||
tbrowder | m: $_ = 'foo'; s/foo/'/; .say | 11:50 | |
camelia | ' | ||
SmokeMachine | red: use Post; my $*RED-DEBUG = Trur; say Post.^all.pick | ||
redable | SmokeMachine, 04===SORRY!04=== Error while compiling /code/./code.p6Undeclared name: Trur used at line 2. Did you mean 'True'? | ||
SmokeMachine | red: use Post; my $*RED-DEBUG = True; say Post.^all.pick | ||
redable | SmokeMachine, gist.github.com/9942a10ffb9399b49f...7bf9ccddf6 | ||
SmokeMachine | red: use Post; my $*RED-DEBUG = True; say Post.^all.pick: 5 | ||
redable | SmokeMachine, gist.github.com/5e15679012d7084c5b...39d6b5a4d5 | ||
tbrowder | m: $_ = 'foo'; s/foo/%/;.say | 11:51 | |
camelia | % | ||
11:52
redable left
|
|||
tbrowder | $_ = 'foo';s/foo/%(/;.say | 11:52 | |
m: $_ = 'foo'; s/foo/%(/.say | 11:53 | ||
camelia | 5===SORRY!5=== Regex not terminated. at <tmp>:1 ------> 3$_ = 'foo'; s/foo/%(/.say7⏏5<EOL> Unable to parse regex; couldn't find final '/' at <tmp>:1 ------> 3$_ = 'foo'; s/foo/%(/.say7⏏5<EOL> expecting any of: … |
||
SmokeMachine | xinming: ^^ | ||
tbrowder | m: $_='foo';s/foo/%\(/.say | 11:54 | |
camelia | 「foo」 | ||
tbrowder | m: $_='foo';s/foo/\%(/;.say | 11:57 | |
camelia | %( | ||
tbrowder | m: $_='foo';s/foo/\%\(/;.say | 11:58 | |
camelia | %( | ||
tbrowder | m: $_='f';s/f/\a/;.say | 11:59 | |
camelia | |||
Geth_ | doc: tusindfryd++ created pull request #3076: Fix broken links |
12:00 | |
tbrowder | so what should we do about the docs? i think we need some more specifics in the section on substitution about some restrictions on the substitution part. at the moment there are none. | 12:02 | |
Ulti | is there a spec for the current Raku things somewhere? like file endings, I know they changed from the initial discussion | 12:05 | |
I'm working on a little tool to port all of my existing modules so figure I can also upload it for everyone else | 12:06 | ||
unless some brave soul has already done this? | |||
12:08
chloekek joined
12:11
wamba joined
|
|||
MasterDuke | Ulti: github.com/perl6/problem-solving/b...to-Raku.md has some info. i thought there was a doc explicitly targeting module authors that jnthn++ wrote, but i either can't find it or am imagining things | 12:22 | |
Geth_ | doc: b839acebab | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/regexes.pod6 start section on substitution RHS restrictions More specifics need to be added. |
12:29 | |
12:46
chloekek left
|
|||
tbrowder | .ask tony-o is there any way to put a unique(cola, colb) constraint using Xoos (SQLite)? | 12:49 | |
tellable6 | tbrowder, I'll pass your message to tony-o | ||
SmokeMachine | red: model MultColUnique { has $.a is column; has $.b is column; ::?CLASS.^add-unique-constraint: { .a, .b } }; $*RED-DEBUG = True; MultColUnique.^create-table | 12:59 | |
:( | 13:00 | ||
AlexDaniel | SmokeMachine: well, the bot is offline :P | 13:12 | |
13:15
squashable6 left
13:16
squashable6 joined
13:21
lucasb joined
13:34
ggoebel left
|
|||
xinming | SmokeMachine: How about NULLS FIRST, NULLS last | 13:45 | |
SmokeMachine | AlexDaniel: yes... probably my machine is sleeping... | 14:08 | |
xinming: what do you mean? | 14:09 | ||
xinming | SmokeMachine: SELECT ... ORDER BY xx ASC NULLS FIRST, yyy DESC NULLS LAST; | 14:15 | |
SmokeMachine | Myo | 14:18 | |
Nyi | |||
xinming | So, If you plan to implement it, what the idea will it be? | 14:28 | |
Something like, null-first(.a), null-last(.b) ? | |||
14:34
evalable6 left
14:36
evalable6 joined
|
|||
SmokeMachine | xinming: idk yet... but I’ll try to find a Raku native way of doing that... | 15:11 | |
xinming: have you seen the pick? | |||
15:13
evalable6_ joined,
evalable6_ left
|
|||
Geth_ | whateverable: b08ffef6f0 | (Aleks-Daniel Jakimenko-Aleksejev)++ | 2 files Make it stop joining #perl6 and #perl6-dev With a temporary hack for evalable and tellable because these are still needed sometimes. |
15:14 | |
15:15
tellable6 left,
evalable6 left
15:16
tellable6 joined,
evalable6 joined
|
|||
xinming | SmokeMachine: What pick? Do you mean your answer for multi column sort? | 15:20 | |
15:23
Voldenet left
|
|||
SmokeMachine | github.com/FCO/Red/commit/8a360962...aa5e2fR322 | 15:28 | |
xinming: ^^ | |||
15:28
Voldenet joined,
Voldenet left,
Voldenet joined
|
|||
Geth_ | perl6.org: 19f88526cb | (Aleks-Daniel Jakimenko-Aleksejev)++ | source/downloads/index.html Fix bold title (Raku) Somehow I missed it in the last commit |
15:30 | |
16:34
chloekek joined
|
|||
xinming | SmokeMachine: saw it, thanks, I understood how pick is implemented now. | 16:37 | |
16:43
pmurias joined
|
|||
SmokeMachine | xinming: and what do you think about this? github.com/FCO/Red/commit/54f29096...080fb7R132 | 16:47 | |
17:07
chloekek left
|
|||
xinming | Do you mean red-do? | 17:09 | |
If you mean red-do, I do wish some way of support like red-do <db1 db2> -> ($db1, $db2) { use db1 and db2 here }; | 17:20 | ||
SmokeMachine | xinming: I was meaning `red-do :transaction` | 17:21 | |
xinming | Ah, That way looks good | ||
SmokeMachine | xinming: `red-do <db1 db2> => { ... }` will run the block twice, one for db1 and other for db2... | 17:23 | |
xinming | SmokeMachine: Yea, I know the red-emit/red-tap will be used to exchange data between databases. I don't think the idea is good. | 17:24 | |
But it seems, Since we don't have "schema" object, We can't pass schema's around. | |||
SmokeMachine | xinming: and you can also do `red-do db1 => { do something with db1 }, db2 => { do something with db2 }` | 17:25 | |
xinming | Yea, What if db1 needs to access db2? | ||
we have to do red-do db1 => { red-do db2 => { }; }; | 17:26 | ||
we'll need many red-do db2 if we need to query databases interacively. | |||
SmokeMachine | xinming: could you please give me an example? | 17:27 | |
17:27
Doc_Holliwood joined
|
|||
SmokeMachine | I still can’t see why one would be changing the database that way... | 17:30 | |
Unless it’s for master/slave DBs... and for that we have a better solution planned... | 17:31 | ||
xinming | SmokeMachine: termbin.com/cuf0 | 17:33 | |
SmokeMachine | github.com/FCO/Red/issues/153#issu...-486462089 | ||
xinming | Not for master/slave sollution, It's just for doing things as easy as possible. | ||
I think red-do within red-do is acceptable. | 17:34 | ||
better than doing temp $*RED-DB = ... all the time. | |||
another question, red-defaults db1 => \("SQLite", :default), db2 => (my $db2 = database("SQLite")); <--- Why do we use Capture in the firt db1 arg? | 17:35 | ||
I know the db2 => (my $db2 = database("...")); my $db2 is used to access $db2 later | |||
does database declared with "capture" the "default" one? | 17:36 | ||
SmokeMachine | xinming: just to show both are acceptable... | ||
xinming | Got it, thanks | 17:38 | |
SmokeMachine | xinming: you can always do something like: `sub process-result(..., :$with = “db1”) { red-do :$with, { ... } }` | 17:44 | |
xinming | Yea, We can wrap them into utilty functions | ||
But be better if we have them as default. | |||
18:28
tobs left
18:38
tobs joined
18:57
jmerelo joined
19:29
jmerelo left
19:52
redable joined,
pmurias left
19:54
pmurias joined
20:01
lucasb left
20:13
pmurias left
20:14
pmurias joined
|
|||
discord6 | <Rogue> How does one destructure a list of Pairs in a for loop? | 20:16 | |
<Rogue> I'm trying to give the keys and values more descriptive names | |||
tobs | m: my @a = :1a, :2b, :3c; for @a -> (:key($foo), :value($bar)) { say "$foo → $bar" } | 20:22 | |
camelia | a → 1 b → 2 c → 3 |
||
uzl[m] | Wow, Raku never ceases to amaze me. I'd have probably done | 20:27 | |
m: my @a = :1a, :2b, :3c; for @a -> $pair { my ($foo, $bar) = $pair.kv; say "$foo → $bar" } | |||
camelia | a → 1 b → 2 c → 3 |
||
20:27
Kaeipi joined
20:28
Kaiepi left
20:30
redable left
|
|||
uzl[m] | So the loop is binding a pair to $_ but how the colon pair in the signature works? | 20:30 | |
AlexDaniel` | m: my @a = :1a, :2b, :3c; for @a -> (:$key, :$value) { say "$key → $value" } | ||
camelia | a → 1 b → 2 c → 3 |
||
uzl[m] | Oh, it's just an old named parameter but in the first case, it's also creating an alias. I've seen it in MAIN subs but didn't extrapolate it to loops. | 20:35 | |
20:37
Kaiepi joined
20:38
Kaeipi left
20:53
Kaiepi left
20:55
[Coke] left
20:56
stoned75 joined
21:00
Kaiepi joined
21:07
[Coke] joined
21:10
Kaiepi left
21:13
Kaiepi joined
21:15
[Coke] left
21:20
[Coke] joined
21:34
wamba left
21:35
pmurias left
21:42
pmurias joined
|
|||
discord6 | <Rogue> huh, I guess I should have thought of objects as fancy hashes | 21:55 | |
<Rogue> that makes sense, thanks tobs and AlexDaniel | 21:56 | ||
timotimo | that's what happens if your class defines a Capture method | 22:23 | |
22:49
pmurias left
22:56
Doc_Holliwood left
22:58
cpan-raku left
22:59
cpan-raku joined,
cpan-raku left,
cpan-raku joined
23:03
Doc_Holliwood joined
23:33
Kaiepi left
23:34
Kaiepi joined
|