🦋 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.
sacomo elcaro: if version is defined, you can use something like this `use JSON::Class; say JSON::Class.^ver`, otherwise, a simple way with zef "zef locate JSON::Class " 00:33
tbrowder .seen thundergnat 02:30
tellable6 tbrowder, I saw thundergnat 2019-11-12T22:17:13Z in #raku: <thundergnat> Looks ok to me so far. At least, I see nothing that makes me say hmmm.
Geth doc: d14900000d | Altai-man++ (committed using GitHub Web editor) | doc/Type/Str.pod6
Fix thinko

  @germanrodriguezherrera++ for spotting!
Closes github.com/perl6/doc/issues/3086
08:21
wahnberger hello, is there a way to add the :batch to a construction like this: race for @rows -> @ { ... } 10:01
AlexDaniel wahnberger: race for @rows.race(:2batch) -> … { … } 10:21
otherwise it won't race at all, if I'm not mistaken
jnthn No, it's if you forget the `race` before `for` that it won't do it at all
wahnberger yep..but that seems to much for DBIsh :) 10:22
jnthn Make sure you're not sharing a connection object between threads. That won't end well anywhere. 10:23
wahnberger what i need to read? 10:24
jnthn I'd just use one of the DB::SQLite, DB::Pg, and so on, which do a pool for you. 10:25
wahnberger DB::Pg wont install on windows to i use DBIsh 10:27
*so 10:28
@Daniel: race for @rows.race(:2batch) -> … { … } so "race" two times? 10:40
jnthn Yes 10:41
wahnberger i would never dig from reading the docs
Altreus Going from path to the leaf dirname is awkward: $path.IO.dirname.IO.basename 10:44
Is there a better way?
/srv/captures/someplace/file.xml --> 'someplace' 10:45
CIAvash Altreus: what about `.IO.parent.basename`? 11:10
scimon Ok... I think I have my slides ready for next week (giving the talk internally on Friday to test it out first). Now to start working on my Advent articles :) 11:49
El_Che scimon: cool, man 12:13
Altreus CIAvash: ah interesting 12:37
some methods do return another IO
cpan-raku New module released to CPAN! Chart::Gnuplot (0.0.12) by 03TITSUKI 13:29
cpan-raku New module released to CPAN! Chart::Gnuplot (0.0.13) by 03TITSUKI 14:15
Altreus Is there a Red channel? 16:28
lizmat Altreus: not afaik 16:28
SmokeMachine: is there a Red channel ? 16:29
SmokeMachine Altreus, lizmat: Yes… but I was going tou anounce it after the bot red become available… #red 16:30
lizmat hmmm... don't see it in the channel list yet ? 16:35
SmokeMachine lizmat: it’s not anywhere yet... 16:37
lizmat ah, ok... :-)
perhaps call it #red-orm instead of #red, you might get a lot of inappropriate visits otherwise 16:38
there also appears to be a #red-lang :-)
Altreus I was going to assume #red-orm so +1 that idea 16:39
Altreus politely doesn't create it :P 16:40
I was going to ask if there's a way to turn on auto-quoting of identifiers
I just tried to create a table called transaction...
Alternatively, if there's a way of controlling how the table gets named
(so the model Transaction creates the table transactions)
SmokeMachine Altreus: you can use the trait `is table<another_name>` to name yout table... 16:48
Altreus: for example `model Black is table<not_bla> { … }` will use `not_bla` as table name... 16:49
Altreus nice, nice 16:51
I was poring through the code looking for a clue :)
SmokeMachine I think I’ll create a new survey… should Red generate a different name for your table if the database do not accept the name of your model? for example: should `model Transaction {…}` create a table called `_transaction` or something else? 16:52
Altreus dbic has the option to use plural names, which is a style choice but many prefer it 16:53
Perl5, mind you, has modules to pluralise words...
But most DB drivers don't have "illegal" table names, they just have quoting styles
in psql, CREATE TABLE "transaction" ... is legal 16:54
SmokeMachine: I created a new wiki page for answers to questions like mine :) github.com/FCO/Red/wiki/Cookbook 16:55
SmokeMachine Altreus: thanks!
Altreus Every few months I come back to Red and start documenting stuff xD 16:56
SmokeMachine Altreus: maybe I’ve done it wrong, but I got a list of reserver SQL words and did this: github.com/FCO/Red/blob/master/lib...QL.pm6#L33
Altreus: can I ask you a favor? would you mind to add that Cookbook here? github.com/FCO/Red/tree/master/docs 16:59
eiro hello people 17:16
raku.org/community/ > smoke.perl6.org/ which is the nginx config page
Altai-man_ eiro, thanks for the report! 17:19
rba, raku.org/community/ leads to smoke.perl6.org/ which is down. 17:20
eiro Altai-man_: you're welcome
Altai-man_: curious what is the smoker ? i have a lot of tap to collect by my own and for the moment i just generate simple web pages 17:21
Altai-man_ eiro, to be honest, no idea. :( 17:22
cpan-raku New module released to CPAN! AVL-Tree (0.0.1) by 03TBROWDER 17:37
tbrowder .tell thundergnat avl tree is on rosettacode.org 18:15
tellable6 tbrowder, I'll pass your message to thundergnat
hythm can I use Array as a key object for Bag, without stringfying the array? 19:38
m: my @a = (1, 2), (1, 2); say @a.Bag.pairs; #wanted result (1 2) => 2
camelia ((1 2) => 1 (1 2) => 1)
vrurg hythm: Bag operates on objects. Thus, @a[0] and @a[1] are two different arrays. 19:51
m: my @a = <a b>; my $b = Bag.new(@a, @a); say $b 19:52
camelia Bag([a b](2))
hythm vrurg, I get your point, but since @a[0] and @[1], contains the same items, I expected it to work in this case. reading Elizabeth Mattijsen answer on this SO question, If i understood correctly it means It should work, but still not yet implemented. stackoverflow.com/questions/479415...-in-perl-6 20:04
vrurg hythm: I just tell you how things are for the moment. :) 20:06
You asked, what you can do, right? ;)
hythm Thanks vrurg :). I was checking if there is other way to do that 20:13
vrurg hythm: I wonder if... 20:14
Wait a second.
m: my @a = (1, 2), (1, 2); say @a.Map.Bag;
camelia Bag(1 2(2))
vrurg m: my @a = (1, 2), (1, 2); say @a.List.Bag 20:18
camelia Bag(1(2), 2(2))
hythm vrurg: hmm, so why "Map" makes it work? 20:19
vrurg m: my @a = (1, 2), (1, 2); say @a.Map.Bag.perl
camelia ("1 2"=>2).Bag
vrurg I'm just doing many things at once and messed up Map and List. 20:20
vrurg hythm: Unfortunately, I can't find a quick workaround for now. 20:23
If order of items is not important, then: 20:24
vrurg m: my @a = [1, 2], [1, 2]; say @a.map( *.Set ).Bag 20:25
camelia Bag(set(1 2)(2))
johnjay p6: say 🔵
camelia 5===SORRY!5===
Argument to "say" seems to be malformed
at <tmp>:1
------> 3say7⏏5 🔵
Bogus postfix
at <tmp>:1
------> 3say 7⏏5🔵
expecting any of:
infix
infix stopper
postfix
johnjay so i guess having raku variables named 🔴 or 🔵is out 20:26
hythm vrurg: Thanks vrurg :) 20:27
tobs johnjay: that is not sufficiently identifier-like, but you can define it as a term: 20:28
m: sub term:<🔴> { "STOP" }; say 🔴
camelia STOP
johnjay nice
johnjay imagines in the future everyone will program with emojis.
then i guess we'll complete the cycle began by egypt when they invented writing 20:29
tobs as for your question in #perl6, if you're porting code for example, you can start here for some differences: docs.perl6.org/language/5to6-nutshell
johnjay ah ok. i was more thinking of what are the pros and cons of learning each 20:30
El_Che there is no cons in learning languages 20:53
robertle there are lots of cons if you are learning scheme :) 20:59
AlexDaniel El_Che: are you sure? 21:02
El_Che: after learning Raku I no longer enjoy programming in other languages
Grinnz remembers having that same experience with Perl in 2006 21:03
and yet, i still must use JS... :P 21:04
El_Che ok, boomer 21:06
(I had to do it)
Grinnz ahaha 21:08
MasterDuke remembers that experience with Perl in 2000/2001 (after the first exposure to Java created a dislike for programming in general), but is not a boomer 21:11
tobs remembers that experience with Perl in... 2017 21:25
those were the golden days (?)
lizmat .tell hythm maybe the Tuple module is what you need ? 22:54
tellable6 lizmat, I'll pass your message to hythm
cpan-raku New module released to CPAN! Chart::Gnuplot (0.0.14) by 03TITSUKI 23:33