[00:03] *** patrickz joined [00:05] *** melezhik left [00:06] *** wamba left [00:07] *** patrickb left [00:10] *** Xliff joined [00:10] *** AlexDaniel left [00:23] *** aborazmeh left [00:24] *** aborazmeh joined [00:24] *** aborazmeh left [00:24] *** aborazmeh joined [00:35] *** aborazmeh left [00:35] *** aborazmeh joined [00:35] *** aborazmeh left [00:35] *** aborazmeh joined [00:49] *** pecastro left [00:49] *** Kaeipi joined [00:49] *** Kaiepi left [00:54] *** zacts left [01:00] \o [01:12] *** Kaeipi left [01:13] *** Kaeipi joined [01:14] *** Kaeipi left [01:15] *** holli__ left [01:15] *** Kaeipi joined [01:15] *** Kaeipi left [01:16] *** Kaeipi joined [01:17] *** Kaeipi left [01:19] *** Kaiepi joined [01:20] *** Kaiepi left [01:21] *** Kaiepi joined [01:22] *** Kaiepi left [01:23] *** Kaiepi joined [01:23] *** Kaiepi left [01:27] *** Kaiepi joined [01:48] *** Xliff left [01:48] *** maggotbrain left [02:14] *** zacts joined [02:15] *** molaf left [02:28] *** molaf joined [02:37] *** zacts left [02:50] *** mithaldu_ left [02:50] *** kawaii left [02:51] *** peteretep left [02:51] *** peteretep joined [02:51] *** mithaldu_ joined [02:52] *** kawaii joined [02:52] *** spycrab0 left [02:54] *** spycrab0 joined [03:20] *** Kaiepi left [03:21] *** Kaiepi joined [03:40] *** zacts joined [03:41] *** Kaiepi left [03:41] *** Kaiepi joined [03:56] m: module A { class B { }; class B::C { } }; B.raku.say; [03:56] rakudo-moar 85847d2f1: OUTPUT: «A::B␤» [03:56] In this example, we don't have B declared in global namespace, But we have `constant B = A::B` alias, Is this a bug? [04:08] *** cpan-raku joined [04:08] *** cpan-raku left [04:08] *** cpan-raku joined [04:35] *** aborazmeh left [04:54] *** aborazmeh joined [04:54] *** aborazmeh left [04:54] *** aborazmeh joined [05:08] *** orinthe left [05:08] *** orinthe joined [05:24] *** BenGoldberg left [05:26] *** frost-lab joined [05:52] *** aborazmeh left [06:01] *** xinming_ joined [06:04] *** xinming left [06:12] *** Summertime left [06:14] *** Summertime joined [06:25] *** brass_ joined [06:26] *** brass left [06:31] *** sena_kun joined [06:33] *** parabolize left [06:36] *** DarthGandalf left [06:44] *** holli__ joined [07:05] SmokeMachine: http://paste.debian.net/1169329/ <--- Where did I do wrong in this example? [07:15] *** Kaeipi joined [07:15] *** sjm_uk joined [07:15] *** Kaiepi left [07:22] *** sno joined [07:29] *** Kaeipi left [07:30] *** Kaeipi joined [07:37] *** Kaeipi left [07:38] *** Kaiepi joined [07:50] *** jmerelo joined [07:54] *** Kaiepi left [07:54] *** Kaiepi joined [08:01] *** squashable6 left [08:02] *** skids left [08:03] *** Kaiepi left [08:03] *** squashable6 joined [08:04] *** Kaiepi joined [08:07] *** natrys joined [08:08] *** Altai-man joined [08:10] *** sena_kun left [08:15] *** BenGoldberg joined [08:25] *** frost-lab left [08:26] *** sno left [08:27] *** cxreg left [08:29] *** holli__ left [08:44] *** cpan-raku left [08:49] *** frost-lab joined [08:49] *** BenGoldberg left [08:52] *** Sgeo left [09:01] *** cpan-raku joined [09:01] *** cpan-raku left [09:01] *** cpan-raku joined [09:07] *** wamba joined [09:31] *** sno joined [09:35] *** wamba left [09:36] *** wamba joined [09:39] *** domm left [09:56] *** holli__ joined [10:06] *** frost-lab left [10:20] *** domidumont joined [10:25] *** domidumont left [10:28] *** domidumont joined [10:29] *** patrickz left [10:36] *** sno left [10:50] *** pecastro joined [11:08] *** sjm_uk left [11:39] *** holli__ left [11:40] *** BenGoldberg joined [11:42] *** holli__ joined [11:42] *** Black_Ribbon left [11:46] *** |oLa| joined [11:49] *** sjm_uk joined [12:04] *** |oLa| left [12:09] *** sena_kun joined [12:10] *** Altai-man left [12:14] *** BenGoldberg left [12:17] *** wamba left [12:18] *** aborazmeh joined [12:18] *** aborazmeh left [12:18] *** aborazmeh joined [12:38] xinming_: interesting code! Is that giving error? I’m not sure if I ever tested a column being a pk and a fk at the same time [12:42] SmokeMachine: Yea, It'll report an error [12:43] Something like, Type check failed in assignment to $!right; expected Red::AST but got Slip (Empty) [12:44] *** jmerelo left [12:44] xinming_: would you mind to open a issue with that? I’ll take a look [12:49] *** holli__ left [12:53] SmokeMachine: https://github.com/FCO/Red/issues/449 [12:54] *** jmcgnh left [12:56] *** rindolf joined [12:59] It should be referencing *.id and not *.a-id [13:00] xinming_: it should be referencing *.id and not *.a-id and it’s :references instead of :referencing [13:00] m: m: module A { class B { }; class B::C { } }; B.raku.say; [13:00] rakudo-moar 85847d2f1: OUTPUT: «A::B␤» [13:00] m: module A { class B { }; class B::C { } }; B.raku.say; [13:00] rakudo-moar 85847d2f1: OUTPUT: «A::B␤» [13:01] (Sorry my app haven’t showed me my first message) [13:02] *** jmcgnh joined [13:02] SmokeMachine: So, you mean something like: has Int $.a-id is column{ :id, :references(*.id, :model-name) }; [13:02] ?? [13:02] Yes [13:03] then, we'll get this error: On Red:api<2> references must declaire :model-name and the references block must receive the model as reference [13:03] I tried both :model-name and :model(A) and :model [13:04] Hmm, ignore me, I'll try again [13:04] Sorry, I’ll try it... just not with my computer right now [13:06] Odd: https://github.com/FCO/Red/blob/master/lib/Red/Traits.pm6#L69 [13:07] SmokeMachine: works with has Int $.a-id is column{ :id, :references(*.id), :model-name } [13:08] BTW, How do we declare has-one relationship? in that example, we can have $a-result an accessor to the b [13:09] So, is that working now? [13:10] Sorry, that is a has-one relationship, isn’t it? [13:10] has Int $.a-id is column{ :id, :references(*.id), :model-name } <--- This version works [13:10] SmokeMachine: The B to A is a belongs-to relationship [13:11] But A might-have a B [13:11] is not belongs-to [13:11] I'll trouble you later before I try more. [13:12] Currently the only way would be treat that as a has-many, adding a @ sigil on that [13:14] Ok, doesn't seem to be a good sollution. [13:15] BTW, for views, I think we can do something like, `model x is view('aaa')` to mean view created, and `model x is view { }` to mean virtual views. [13:15] xinming_: about the pk and fk at the same time, would you do me a favor? Would you mind to write that as a cookbook entry, please? https://fco.github.io/Red/tutorials/cookbook.html [13:16] Then, we can do something like, model x is view(view-name) is content('view-definition') { has $.a is column; has $.b is column; } [13:16] SmokeMachine: Ok, will do that. [13:17] About the created views I was thinking of using the `is temp` that already exists... but I’m not sure if it’s a good idea [13:18] `is temp` is used for creating temp table, I don't think it's a good idea. [13:19] BTW, when I read the source code about `is temp`, it got me thinking, is there a way to curry the temp table with predefined table name? [13:19] Yes, makes sense [13:20] Not sure... [13:20] For example, TmpModel is temp { }; then in code, we can do something like, my $user-specific-tmp-table = TmpModel.^create-temp-table: :table-name [13:21] Then, $user-specific-tmp-table will just curry the TmpModel with predefined table-name to query. [13:22] Is that a good idea? [13:26] I think so... but I wouldn’t call that `create-tmp-table` it’s already defined as temp... maybe just a `create-table` should be enough [13:27] BTW, is it possible for us to do something like `temp Model.table-name = 'new-table'` name now? [13:27] How do we change the table name at runtime? [13:27] Maybe a TmpModel.^alias(“otherName”).^create-table` should work [13:28] SmokeMachine: I think it's best to hold the curried model within a variable. [13:29] Not sure... would you mind if I search for that in a few moments? I’m doing the dishes now... [13:29] Ok [13:41] *** zacts left [14:04] xinming_: this seems to work, but I don't think that's a goos way of doing that... https://www.irccloud.com/pastebin/eCIfE3u6/ [14:23] *** BenGoldberg joined [14:27] SmokeMachine: There are some places where it saves a lot of times, Which is like, we have 2 table, one is archive, and another is live data table. [14:39] SmokeMachine: I've created the pull request for the doc/cookbook.md update. BTW, I have another branch which is mostly postgres fix, I'll enchance when I have time. Now busy with other things. [14:45] *** parabolize joined [14:45] *** mid_home left [14:52] *** vgrato_ left [15:05] *** rindolf left [15:05] *** rindolf joined [15:07] *** zacts joined [15:09] m: module A { class B { }; class B::C { } }; B.raku.say; # <-- in this example, The namespace B is created globally, Is this a bug or a feature? [15:09] rakudo-moar 85847d2f1: OUTPUT: «A::B␤» [15:12] *** zacts left [15:35] *** Kaiepi left [15:40] *** sno joined [15:42] *** MilkmanDan left [15:42] *** MilkmanDan joined [15:57] *** Kaiepi joined [16:00] *** aborazmeh left [16:01] *** Kaiepi left [16:03] *** xelxebar left [16:05] SmokeMachine: How do we specify the column type of database? now, I found that most column types are incorrect, `has DateTime $.dt is column` emits VAR(255) length string. [16:06] you can use :type for defining that [16:07] *** xelxebar joined [16:08] *** Altai-man joined [16:08] *** Kaiepi joined [16:09] *** sjm_uk left [16:10] *** MilkmanDan left [16:10] *** sena_kun left [16:10] *** holli__ joined [16:11] *** MilkmanDan joined [16:20] xinming_: this is the reason: https://github.com/FCO/Red/blob/master/lib/Red/Driver/CommonSQL.pm6#L762 [16:25] SmokeMachine: I know, I think it's best that we specify it manually, also, we specify the default value for the database literraly [16:29] xinming_: sorry, I didn't get it... [16:32] SmokeMachine: model A { has DateTime $.dt is column = DateTime.now }; Wether we can do something like, model A { has DateTime $.dt is column{:type, :default} } [16:33] Will generate sql which is like CREATE TABLE aa { dt timestamp NOT NULL DEFAULT now }; [16:33] SmokeMachine: model A { has DateTime $.dt is column = DateTime.now }; Wether we can do something like, model A { has DateTime $.dt is column{:type, :default('now()')} } [16:34] If people want the 'now()' to be string, We can do something like :default(q{'now()'}) [16:35] xinming_: I'm still deciding how to do the default value... I don't really like to make it with "SQL" [16:36] SmokeMachine: We still need that feature finally. We can have the most sane default, But we do need a way to inject the plain SQL some way. [16:36] xinming_: I'm more like doing something like: `has DateTime $.dt is column{:type, :default{ .now }} ` [16:37] Yea, the .now is an example. What if we want an xml column, with default xml? [16:37] Or geo location column in pg. I know you hate plain sql, But you can't avoid it [16:38] maybe using something like this: https://github.com/FCO/Red/blob/master/lib/Red/ColumnMethods.pm6#L65 [16:38] I face this many times in p5 DBIC. [16:39] in that case ww could use Red::AST::Function [16:39] or use something like RED::AST::Generic (https://github.com/FCO/Red/tree/master/lib/Red/AST/Generic) [16:41] Ok, Will follow your decision. ;-) [16:44] *** sjm_uk joined [16:45] *** MilkmanDan left [16:47] *** MilkmanDan joined [16:47] m: ("a" ~~ Str).raku.say; [16:47] rakudo-moar 85847d2f1: OUTPUT: «Bool::True␤» [16:47] *** holli__ left [16:48] m: my $_ = "a"; Str.ACCEPTS($_); # https://docs.raku.org/routine/~~ <--- Am I right understanding the smart match operator? [16:48] rakudo-moar 85847d2f1: OUTPUT: «Potential difficulties:␤ Redeclaration of symbol '$_'.␤ at :1␤ ------> 3my $_7⏏5 = "a"; Str.ACCEPTS($_); # https://do␤» [16:48] m: temp $_ = "a"; Str.ACCEPTS($_); # https://docs.raku.org/routine/~~ <--- Am I right understanding the smart match operator? [16:48] rakudo-moar 85847d2f1: ( no output ) [16:48] m: temp $_ = "a"; Str.ACCEPTS($_).raku.say; # https://docs.raku.org/routine/~~ <--- Am I right understanding the smart match operator? [16:48] rakudo-moar 85847d2f1: OUTPUT: «Bool::True␤» [16:48] Left is aliased to $_, then, call the .ACCEPTS method from the right hand side. [16:50] after some testing, seems I'm right. [16:54] *** sno left [16:54] *** sno joined [17:09] *** parabolize left [17:31] *** oneeggeach joined [17:31] *** oneeggeach left [17:31] *** aborazmeh joined [17:31] *** aborazmeh left [17:31] *** aborazmeh joined [17:36] *** perryprog left [17:37] *** perryprog joined [17:40] *** bocaneri left [17:47] .tell kawaii I've closed https://github.com/FCO/Red/issues/448, but if you think it's not ok yet, please open it again. [17:47] SmokeMachine, I'll pass your message to kawaii [17:49] *** bocaneri joined [17:56] *** MilkmanDan left [17:56] *** MilkmanDan joined [17:58] *** bocaneri left [17:58] *** bocaneri joined [18:00] *** wamba joined [18:30] *** oneeggeach joined [18:30] *** oneeggeach left [18:30] *** oneeggeach joined [18:31] *** oneeggeach left [18:31] *** oneeggeach joined [18:32] *** oneeggeach left [18:32] *** oneeggeach joined [18:33] *** oneeggeach left [18:33] *** oneeggeach joined [18:33] *** oneeggeach left [18:34] *** oneeggeach joined [18:34] *** oneeggeach left [18:34] *** oneeggeach joined [18:35] *** oneeggeach left [18:39] *** holli__ joined [18:39] *** Sgeo joined [18:55] *** domidumont left [18:59] SmokeMachine: I didn't have any problems with it, but I'm not using named uniques, just multiple, it's probably fine :) [18:59] 2020-10-31T17:47:17Z #raku kawaii I've closed https://github.com/FCO/Red/issues/448, but if you think it's not ok yet, please open it again. [19:13] ¦ doc: a21340f2b2 | Coke++ | 2 files [19:13] ¦ doc: Make dep on Documentable "official" [19:13] ¦ doc: [19:13] ¦ doc: Update build directions to install deps from META6.json [19:13] ¦ doc: review: https://github.com/Raku/doc/commit/a21340f2b2 [19:22] *** holli__ left [19:22] *** oneeggeach joined [19:23] *** roguelazer left [19:25] *** oneeggeach left [19:33] ¦ doc: coke self-assigned Spin off Pod::Convenience https://github.com/Raku/doc/issues/2696 [19:35] <[Coke]> .ask jjmerelo - to avoid github ticket volleyball, do you agree that we should reject tickets regarding 'p6doc' executable since it is no longer in the repo? If so, I'm happy to do the ticket cleanup. [19:35] [Coke], I'll pass your message to jmerelo [19:35] <[Coke]> .ask jjmerelo - I will also save the list of tickets for the new repo so whoever owns it can extract the bug info if they need it. [19:35] [Coke], I'll pass your message to jmerelo [19:38] *** holli__ joined [19:39] <[Coke]> ... I do like that it dealt with my typo. [19:41] ¦ doc: coke assigned to Altai-man Issue Convert static site to dynamic site https://github.com/Raku/doc/issues/1246 [19:44] *** sjm_uk left [19:58] *** sjm_uk joined [20:03] ¦ doc: Altai-man self-assigned Test documentable https://github.com/Raku/doc/issues/2972 [20:09] *** sena_kun joined [20:10] *** Altai-man left [20:14] *** Sgeo_ joined [20:18] *** Sgeo left [20:18] New module released to CPAN! Universal::errno (0.0.3) by 03GARLANDG [20:22] *** [Sno] joined [20:23] [Coke]: Is there a replacement for p6doc? [20:24] *** sno left [20:26] *** cxreg joined [20:26] *** zacts joined [20:27] *** cxreg left [20:27] *** cxreg joined [20:29] *** markmarkmark joined [20:32] *** ape666 joined [21:01] <[Coke]> Zero_Dogg: https://github.com/Raku/rakudoc [21:01] <[Coke]> no idea if it's in a better state than p6doc was. [21:03] *** grep0r joined [21:03] well, p6doc isn't installable at all, so if it installs, that'll be an improvement (though it's not on cpan it seems) [21:03] *** grep0r left [21:04] *** aborazmeh left [21:05] *** JustThisGuy joined [21:06] <[Coke]> p6doc isn't in the repo anymore. [21:06] <[Coke]> (and yes, before that it was super busted.) [21:06] 'zef install p6doc' does try to install something, though [21:06] granted, it fails at it, but still [21:09] <[Coke]> Can't speak to that one. There was one in raku/doc before that's gone now. [21:11] rakudoc fails its tests. Sigh. perldoc has spoiled me. [21:11] Hi all! Given a codepoint e.g. 1F1E9 1F1EA I want to be able to get .uniname. I've been googling and reading the docs, and I see that .NFC returns a codepoint, but I want to do the inverse and create a string from a codepoint. Thanks! [21:15] *** sjm_uk left [21:15] m: say "\x[1F1E9,1F1EA]" [21:15] rakudo-moar 85847d2f1: OUTPUT: «🇩🇪␤» [21:16] JustThisGuy: or do you want to create a string from the codepoint name? [21:16] m: say "\x[1F1E9,1F1EA]".uniname [21:16] rakudo-moar 85847d2f1: OUTPUT: «REGIONAL INDICATOR SYMBOL LETTER D␤» [21:17] m: say "\x[1F1E9,1F1EA]".uninames [21:17] rakudo-moar 85847d2f1: OUTPUT: «(REGIONAL INDICATOR SYMBOL LETTER D REGIONAL INDICATOR SYMBOL LETTER E)␤» [21:17] That's what's confusing me is "REGIONAL INDICATOR SYMBOL LETTER D". I'm looking for "German Flag" or similar. [21:18] well, there's the official Unicode database, which mostly has just one name for each codepoint. That's what Raku offers you [21:18] if you want other names for that, you must look elsewhere for other data sources that map "vulgar" names to codepoints [21:19] OK. Thanks! [21:19] *** JustThisGuy left [21:23] *** Manifest0 joined [21:49] *** natrys left [21:50] New module released to CPAN! Red (0.1.27) by 03FCO [22:00] *** ape666 left [22:03] *** mid_home joined [22:04] *** rindolf left [22:05] *** parabolize joined [22:05] New module released to CPAN! Universal::errno (0.0.4) by 03GARLANDG [22:11] *** Ben_Goldberg joined [22:11] *** BenGoldberg left [22:11] *** Ben_Goldberg is now known as BenGoldberg [22:11] *** sena_kun left [22:13] *** roguelazer joined [22:39] *** zacts left [23:06] *** lizmat_ joined [23:06] *** lizmat left [23:06] *** lizmat_ is now known as lizmat [23:07] *** Xliff joined [23:07] \o [23:08] How would one go searching a Buf for a byte pattern? [23:14] *** lizmat_ joined [23:15] *** lizmat__ joined [23:17] *** aindilis left [23:17] *** mowcat joined [23:17] *** lizmat left [23:17] *** lizmat__ is now known as lizmat [23:18] *** lizmat_ left [23:20] <[Coke]> (german flag) - the flags are combos of the 2 letter country ids. [23:20] <[Coke]> m: say "\C[REGIONAL INDICATOR SYMBOL LETTER D][REGIONAL INDICATOR SYMBOL LETTER E [23:20] rakudo-moar 85847d2f1: OUTPUT: «5===SORRY!5=== Error while compiling ␤Unrecognized backslash sequence: '\C'␤at :1␤------> 3say "\7⏏5C[REGIONAL INDICATOR SYMBOL LETTER D][RE␤ expecting any of:␤ argument list␤ double quotes␤ te…» [23:22] <[Coke]> m: for -> $l { say "\c[REGIONAL INDICATOR SYMBOL LETTER D]\c[REGIONAL INDICATOR SYMBOL LETTER $l]" [23:22] rakudo-moar 85847d2f1: OUTPUT: «5===SORRY!5=== Error while compiling ␤Unrecognized character name [REGIONAL INDICATOR SYMBOL LETTER $l]␤at :1␤------> 3D]\c[REGIONAL INDICATOR SYMBOL LETTER $l7⏏5]"␤» [23:22] Huh! For now I had to roll my own: sub c-decode ($b) { [23:22] my $i = 0; $i++ while $b[$i]; $b.subbuf(0, $i).decode } [23:22] <[Coke]> awwww [23:24] <[Coke]> m: for -> $l { say "\c[REGIONAL INDICATOR SYMBOL LETTER D]" ~ "REGIONAL INDICATOR SYMBOL LETTER $l".parse-names } [23:24] rakudo-moar 85847d2f1: OUTPUT: «🇩🇫␤Saw 1 occurrence of deprecated code.␤================================================================================␤Method parse-names (from Str) seen at:␤ , line 1␤Please use uniparse instead.␤----------------------------…» [23:24] <[Coke]> m: for -> $l { say "\c[REGIONAL INDICATOR SYMBOL LETTER D]" ~ "REGIONAL INDICATOR SYMBOL LETTER $l".uniparse } # yes? [23:24] rakudo-moar 85847d2f1: OUTPUT: «🇩🇪␤🇩🇬␤» [23:24] <[Coke]> whew. [23:39] ¦ doc/coke/pod: 747898fca8 | Coke++ | 5 files [23:39] ¦ doc/coke/pod: Switch to POD::Utilities [23:39] ¦ doc/coke/pod: review: https://github.com/Raku/doc/commit/747898fca8 [23:47] *** Ben_Goldberg joined [23:47] *** BenGoldberg left [23:47] *** Ben_Goldberg is now known as BenGoldberg