[00:06] tbrowder: It'd be great if you could add some image to the module's readme showcasing the result from Draw2D::Furniture [00:06] lizmat++ for keeping on top of things ;-)! [00:08] uzl[m]: good idea, i'll see what i can do... [00:09] *** TeamBlast left [00:09] *** dotdotdot left [00:10] *** TeamBlast joined [00:11] *** dotdotdot joined [00:12] *** AlexDaniel joined [00:12] *** AlexDaniel left [00:12] *** AlexDaniel joined [00:26] *** Circlepuller joined [00:27] *** TeamBlast left [00:27] *** Circlepuller is now known as TeamBlast [00:35] *** upupbb-user1 left [00:42] *** lucasb left [01:01] *** mniip left [01:02] <[Coke]> MasterDuke: working on a response. [01:05] *** PacoLinux joined [01:11] *** mniip joined [01:27] *** gabiruh joined [01:35] *** hungrydonkey joined [01:36] *** devmikey left [01:37] * [Coke] gives up for tonight and posts this as his work in progress: [01:45] <[Coke]> https://gist.github.com/coke/91e50f577cfe7c072291ae6d44541a3a [01:45] <[Coke]> Feel free to steal any of that if you're putting together a response. [01:53] *** Redfoxmoon left [01:53] *** Redfoxmoon_ joined [01:57] *** Black_Ribbon joined [02:03] *** ToddAndMargo joined [02:03] Anybody home? [02:04] What is the opposite of "get". I want to send something to the Internet [02:04] depends what the server expects but usually POST or PUT [02:05] Thank you! I want to send an smtp command [02:05] I was assuming you were talking HTTP of course, which you weren't :P [02:07] https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol#Protocol_overview describes how SMTP works at a high level [02:07] I saw an example of "get" to read an http address, so I presumes a little too much. :'( [02:07] it's quite unrelated to HTTP [02:07] except that both are TCP-based [02:07] do we have a library written for smtp? [02:08] well, first of all, you usually only need sendmail if your local system already has a working sendmail [02:08] smtp is a second choice after that, because you need to authenticate with the smtp server [02:09] direct smtp, i should say [02:09] if wish. I have to cross platform Linux and Windows. And pain-in-the-neck, I have to talk to OAuth2 servers [02:10] I don't see an analogue to Email::Sender for raku, though (which would be your sendmail-or-smtp wrapper) [02:10] there is https://modules.raku.org/dist/Net::SMTP::Client::Async:cpan:HANENKAMP [02:10] *** rbt left [02:11] *** rbt joined [02:11] for smtp specifically, but you probably want to use another module to build the MIME message [02:11] https://modules.raku.org/dist/Email::MIME:cpan:RBT [02:11] *** ufobat_ joined [02:11] I have all the mime stuff down. [02:13] OAuth2 is an HTTP authentication scheme, so I'm not sure how it would apply to sendmail or SMTP [02:14] indeed. You have to get all that stuff ready first, then include the token with your smtp command [02:14] *** ufobat left [02:15] Where I am stopped is the syntax to send the token [02:16] it is probably a message header [02:16] may even be the same Authorization header a normal HTTP request would use [02:19] not seeing a way to add a header to Email::MIME:cpan:RBT. Or a way to talk to the author [02:19] in the example header-str's value appears to be the set of headers [02:20] Sorry, I didn't write it. Just took over maintaining it. I mostly use it for parsing messages. [02:21] how do I include an OAuth2 token in the run string? [02:24] Good question. It's a port of the perl5 version. Perhaps the docs here will help: https://metacpan.org/pod/Email::MIME [02:25] https://metacpan.org/pod/Email::MIME#header Do we have `header_str_pairs` in our port somewhere? [02:26] Yes [02:26] header-str-pairs() [02:27] Maybe I am on the wrong module. I am on https://modules.raku.org/dist/Net::SMTP::Client::Async:cpan:HANENKAMP and my search function comes up zero on "header" [02:29] *** MasterDuke left [02:30] that is the module for sending the message, not building it [02:30] *** hungrydonkey left [02:31] *** hungrydonkey joined [02:32] where should I be? [02:33] Both? Build a message (Email::MIME), then take the resulting Str and send it (Net::SMTP*) [02:37] Got it. Thank you! I have been doing this with a call to cURL (no Auth2 support). I am looking at my module right now [02:39] *** Black_Ribbon left [02:39] Looks like I just stick it here: my $email = Email::MIME.create(...) [02:39] <[Coke]> off topic: any MTG Arena players here? [02:40] <[Coke]> if so, feel free to DM me friend details. [02:40] *** Doc_Holliwood left [02:42] New module released to CPAN! Concurrent::PChannel (0.0.1) by 03VRURG [02:42] rbt; if I get this working, would you mind if I sent you details so you can add it as an example? [02:43] That would be great. [02:44] best method to contact you? [02:47] Can you make a github ticket? [02:47] https://github.com/retupmoca/p6-Email-MIME [02:51] Will do when I get it figured out. Eventually I am going ot wrap CobiaN Backup with it, as Cobian does not support Auth2 is is not longer supported (split infinitive) plus all my Linux call home programs on the servers I support when Google stops supporting Less Secure Apps on g-suite come July [02:54] I also have a pythod example, if tht means anything to you guys: https://stackoverflow.com/questions/11445523/python-smtplib-is-sending-mail-via-gmail-using-oauth2-possible [02:59] *** AlexDani` joined [03:01] *** AlexDaniel left [03:01] *** Manifest0 left [03:02] *** Manifest0 joined [03:22] *** AlexDani` is now known as AlexDaniel [03:22] *** rbt left [03:22] *** AlexDaniel left [03:22] *** AlexDaniel joined [03:23] *** rbt joined [03:26] *** upupbb-user2 joined [03:38] ToddAndMargo: i assume using Inline::Python is a bit too annoying to deploy to your target systems? [03:40] I want to learn python and installing it on Windows machine like I want a hole in the head. I love Raku. I actually enjoy programming in it. [03:52] *** pilne left [03:56] *** vike left [04:00] *** yht left [04:01] *** vike joined [04:07] what is this all about? K:\Windows\NtUtil>zef install OAuth2::Client::Google===> Searching for: OAuth2::Client::GoogleEnabled extracting backends [git path psunzip] don't understand C:\Users\tony/.zef/tmp\1585022838.2848.5555.088006717173\OAuth2-Client-Google-0.1.1.tar.gzYou may need to configure one of the following backends, or install its [04:07] underlying software - [tar p5tar unzip] [04:10] *** epony joined [04:36] *** hungrydonkey left [04:43] *** aindilis left [04:50] *** epony left [04:50] *** epony joined [04:53] *** epony left [04:55] *** epony joined [04:59] *** aindilis joined [05:02] *** yht joined [05:07] *** hungrydonkey joined [05:09] *** molaf joined [05:10] if you get spammed (info https://freenode.net/kb/answer/usermodes) set: /mode yournick +R [05:24] *** ToddAndMargo left [05:31] *** Redfoxmoon_ left [05:31] *** Redfoxmoon_ joined [05:32] *** Redfoxmoon_ is now known as Redfoxmoon [05:39] *** molaf left [05:59] *** cpup left [06:01] *** cpup joined [06:08] *** yht left [06:13] *** wamba joined [06:23] *** yht joined [06:31] *** Doc_Holliwood joined [06:35] *** sjm_uk joined [06:53] *** marcusr joined [06:54] *** no-n joined [06:56] *** no-n left [07:14] *** rindolf joined [07:30] *** MasterDuke joined [07:48] *** upupbb-user2 left [07:52] *** pecastro joined [08:24] *** pecastro left [08:24] *** sjm_uk left [08:37] *** dakkar joined [08:39] *** PacoLinux left [08:58] *** aborazmeh joined [08:58] *** aborazmeh left [08:58] *** aborazmeh joined [09:23] *** Doc_Holliwood left [09:40] * lizmat clickbaits https://rakudoweekly.blog/2020/03/23/2020-12-jvm-nullification/ [09:43] *** hungryd4 joined [09:43] *** hungrydonkey left [09:45] *** aindilis left [09:45] *** aindilis joined [09:55] *** stoned75_ left [09:56] *** stoned75 left [10:03] *** mniip left [10:03] *** hungryd4 left [10:04] *** hungrydonkey joined [10:12] * Altreus clicks [10:12] dammit! Baited! [10:15] *** mniip joined [10:21] <[ptc]> that happens to me every week too! [10:22] releasable6, status [10:22] Kaiepi, Next release in ≈4 days and ≈8 hours. 4 blockers. Changelog for this release was not started yet [10:22] Kaiepi, Details: https://gist.github.com/a384e152a37bcbdda5af7b848833aa6d [10:29] I was confused why it had the volkswagen logo as the favicon but then I realised it was wordpress [10:31] . o O ( VolksWörter ) [10:33] .tell uzl[m] take a look at the Draw2D::Furniture now [10:33] tbrowder, I'll pass your message to uzl[m] [10:37] *** chloekek joined [10:38] *** aborazmeh left [10:38] tadzik: vox populi elsewhere :) [10:40] *** MasterDuke left [10:46] New module released to CPAN! P5pack (0.0.11) by 03ELIZABETH [10:51] uzl[m]: short of gihub pages (haven't used yet) that's the only thing i know how to do [10:53] *** upupbb-user2 joined [11:04] *** aborazmeh joined [11:04] *** aborazmeh left [11:04] *** aborazmeh joined [11:13] *** MasterDuke joined [11:47] *** squashable6 left [11:48] *** squashable6 joined [11:49] *** Tirifto joined [11:58] *** xxpor joined [12:08] *** hungrydonkey left [12:26] *** natrys joined [12:29] *** hungrydonkey joined [12:33] *** hungrydonkey left [12:34] *** hungrydonkey joined [12:40] *** hungryd79 joined [12:40] *** hungrydonkey left [12:46] *** Actualeyes left [12:55] *** hungrydonkey joined [12:58] *** hungryd79 left [12:58] *** hungryd13 joined [13:01] *** hungryd89 joined [13:02] *** hungrydonkey left [13:05] *** hungryd13 left [13:05] *** hungrydonkey joined [13:08] *** hungryd89 left [13:08] *** PacoLinux joined [13:08] *** Actualeyes joined [13:09] *** mowcat joined [13:14] *** hungryd1 joined [13:17] *** hungrydonkey left [13:18] *** camelCaser left [13:19] *** yht left [13:20] *** camelCaser joined [13:22] *** hungrydonkey joined [13:23] *** hungryd1 left [13:32] *** hungryd67 joined [13:35] *** hungrydonkey left [13:38] *** yht joined [13:40] *** hungrydonkey joined [13:41] i have a library that's ready for release once v2020.03 gets released that'll be of interest to anyone who likes their code to be strictly typed https://github.com/Kaiepi/p6-Data-Record [13:41] can also be used to sanitize data [13:42] *** hungryd67 left [13:45] *** hungrydonkey left [13:45] Kaiepi: cool, and funny to see p6 in that repo's name :-) [13:46] *** hungrydonkey joined [13:54] lizmat: I love seeing your consistency with the name change. :D [13:55] I'm afraid I put that on me, when I suggested the name change :-) [13:55] eh, i'll change the prefix i use for raku repos to ra at some point or other [13:55] * to actually doing the name change [13:56] there are around a dozen i'll have to do and rerelease to cpan [13:57] tadzik: ping (in case you've turned off github notifications). https://github.com/tadzik/Grammar-BNF/pull/15 [13:58] MasterDuke: I have indeed. Thanks :) [13:59] tadzik++ [13:59] no, MasterDuke++ :) [14:04] It's still very nice to see people pushing and insisting on changes to ultimately have consistency. It's nice to see it taken seriously. :) [14:05] wait, when renaming repos, does the old name redirect to the new one? [14:07] Yes [14:07] * nine is glad to have never used a language prefix for his repos :) [14:10] ah, then there's no problem renaming them then [14:12] *** upupbb-user2 left [14:13] *** sena_kun joined [14:13] *** hungrydonkey left [14:13] *** sena_kun left [14:18] *** hungrydonkey joined [14:24] *** cpan-raku left [14:24] *** cpan-raku joined [14:24] *** cpan-raku left [14:24] *** cpan-raku joined [14:30] *** hungryd67 joined [14:30] *** hungrydonkey left [14:42] *** aborazmeh left [15:09] *** pecastro joined [15:10] That blog post from brian d foy says "The reduction operator ... knows what operations to do first" [15:10] But the assertion doesn't seem relevant to the topic at hand and is not expounded upon [15:11] Can anyone explain what he is referring to? [15:11] *** sena_kun joined [15:12] *** molaf joined [15:12] *** molaf left [15:13] *** sena_kun left [15:14] *** sena_kun joined [15:15] *** Tirifto left [15:15] *** Tirifto joined [15:15] *** thundergnat joined [15:17] Altreus, As I understand it he is referring to the associativity of the operator. EG. [**] 2,3,4 is 2**(3**4) not (2**3)**4) [15:17] m: say [**] 2,3,4; [15:17] rakudo-moar 9b6d89b18: OUTPUT: «2417851639229258349412352␤» [15:18] But that's the same as what reduce does already [15:18] Is there an example where it's associative the other way? [15:18] 2 OP (3 OP 4) [15:19] Cos he specifically says it doesn't just apply the operator to the first two and replace them with its result, right? [15:19] But that's indistinguishable from the ** example [15:20] But.. but it _doesn't_ just do the first two and replace them with its result. [15:20] m: say (2**3)**4; say 2**(3**4); say [**] 2,3,4 [15:20] rakudo-moar 9b6d89b18: OUTPUT: «4096␤2417851639229258349412352␤2417851639229258349412352␤» [15:21] It does the _last_ two and replaces them with its value, because ** is right associative [15:23] *** camelCaser left [15:25] *** camelCaser joined [15:26] m: say [/] 40,4,5; say (40 / 4 ) / 5; say 40 / ( 4 / 5 ); # division on the other hand is left associative [15:26] rakudo-moar 9b6d89b18: OUTPUT: «2␤2␤50␤» [15:29] *** thundergnat left [15:31] Is there a clever zef trick for getting a list of the currently installed modules? [15:32] (getting modules installed on new version is my primary headache with upgrading raku) [15:32] yes zef list --installed [15:32] *** rbt left [15:32] a new rakudo will just™ recompile the modules from source so you shouldn't have to reinstall modules i think? [15:32] *** rbt joined [15:35] * colomon might still be using rakudobrew [15:35] timotimo++ [15:39] *** Doc_Holliwood joined [15:56] Inline::Perl5 not installing on 20.2.1? Failed to find dependencies: perl [15:58] *** abraxxa left [16:06] *** abraxxa joined [16:06] *** Altai-man_ joined [16:07] ¦ doc: sztanyi++ created pull request #3282: change perl method to raku method [16:07] ¦ doc: review: https://github.com/Raku/doc/pull/3282 [16:09] *** sena_kun left [16:10] *** guifa joined [16:10] lizmat++ for weekly [16:39] *** hungryd67 left [16:40] *** yht left [16:57] *** sauvin left [17:02] *** sauvin joined [17:03] :-( [17:03] Houston conference just got cancelled [17:04] amsterdam too i think [17:08] *** molaf joined [17:10] possible project for the Gnome* modules: a configurable Unicode character widget for copy pasting into Raku source code. any interest as a community project? [17:12] like `gucharmap`? [17:18] *** upupbb-user3 joined [17:22] *** hungrydonkey joined [17:30] *** hungrydonkey left [17:45] *** Kaiepi left [17:45] *** stux|RC left [17:45] *** stux|RC-only left [17:45] *** kybr left [17:45] *** autarch left [17:45] *** gordonfish left [17:45] *** daxim left [17:45] *** dogbert17 left [17:45] *** dogbert17 joined [17:45] *** Kaiepi joined [17:45] *** autarch joined [17:45] *** daxim joined [17:45] *** kybr joined [17:46] *** gordonfish joined [17:47] *** stux|RC-only joined [17:47] *** ribasushi left [17:49] *** ribasushi joined [17:51] *** stux|RC joined [17:51] *** dakkar left [17:51] MasterDuke: it’s sad, but understandable. I was really looking forward to it though, would have been my first tech conf [17:52] dakkar: ?, i'll check it...no, not configurable that i can see, but useful anyway, thnx [17:52] tbrowder, I'll pass your message to dakkar [17:53] i want one that i can configure to a limited set of oft-used chars, best in separate tabs to group them [17:55] anyone using comma? what is expected to be in the "Raku SDK"? [17:57] ah, found it "/path/to/my/raku" [18:00] *** molaf left [18:07] *** sena_kun joined [18:08] *** Altai-man_ left [18:10] *** AlexDani` joined [18:10] *** AlexDaniel left [18:11] *** AlexDani` is now known as AlexDaniel [18:11] *** AlexDaniel left [18:11] *** AlexDaniel joined [18:14] *** rindolf left [18:19] guifa: there will be other conferences... [18:21] lizmat: of course! And actually, now that I know I have a place to stay at in NL (one of my good friends is working at the university in Utrecht), maybe I could do the AMS one too [18:23] *** sauvin left [18:31] *** rindolf joined [18:42] *** daxim left [18:45] *** wildtrees joined [18:45] *** kent\n left [18:48] *** daxim joined [18:49] *** upupbb-user3 left [18:57] is there a way I can do postgres transactions with DBIish? or should I be using some other pg database library? [18:58] *** molaf joined [19:00] wildtrees: sure, you can execute a "BEGIN WORK" followed by "COMMIT" or "ROLLBACK" statements [19:04] can I pass in parameters? I can't seem to use prepare , do seems to work a bit though [19:05] $db.do(q{BEGIN}); [19:05] wildtrees, FYI I fixed the array thing. Just waiting for someone to merge it. https://github.com/raku-community-modules/DBIish/pull/176 [19:06] I had found a workaround using string_to_array and @array.join(',') , rbt, thanks [19:06] Postgresql doesn't support prepared queries for transaction control statements (BEGIN/COMMIT, etc.) [19:07] so how can I pass in parameters into a transaction and see if it is successful in DBIish? [19:08] kinda new to all of this, have done a small amount of sql in the past [19:08] You mean things like isolation level? [19:08] You need to build the begin statement yourself. 'BEGIN WORK ISOLATION LEVEL %s'.sprintf('SERIALIZABLE'); [19:09] whats isolation level [19:09] Hmm What did you mean by "parameters into a transaction" [19:09] I want to basically update two different array columns in two different rows either all together or not at all , as an atomic change [19:09] Okay. [19:10] so I build the query string myself and pass it to $dbh.do($query) ? [19:10] Each statement needs to be it's own string. [19:10] So do(q{BEGIN}); [19:10] Then $sth = $db.prepare(q{UPDATE ... SET foo = $1}); $sth.execute($param); [19:11] Then do(q{COMMIT}); [19:12] Erm, I suppose if you want to be fancy you can also use Common Table Expressions for the same thing in a single statement; but that's fairly advanced SQL. [19:12] so like do BEGIN, $h1 = prepare($statement1) ; $h.execute ; $h2 = prepare($statement2) ; h2.execute ; do COMMIT (in pseudocode) ? [19:12] Yes. [19:13] how do I know if the transaction is successful or not? [19:13] CATCH {} [19:14] The Pg driver throws very nice exceptions. [19:15] rbt, where can I read about the possible errors thrown by the Pg driver? [19:16] "Statement Exceptions" https://github.com/raku-community-modules/DBIish [19:17] Database level errors are converted into Raku exceptions. [19:17] PostgreSQL error classes are documented here: https://www.postgresql.org/docs/10/errcodes-appendix.html [19:24] *** abraxxa left [19:33] so if I do something like this do BEGIN ; select $1 <> $2 ; some insert ; do Commit ; why does the insert go through even when $1 = $2? how do I condition a transaction? thought the select <> returns false so it will cause the transaction to fail/abort [19:35] wildtrees, are you asking from DBIish perspective or sql perspective? [19:36] well I am doing it from dbiISH, but I guess it's more of a pg-sql question, [19:37] I am not a dbiish pro, but if you're doing a select and then an insert, there is no condition between them. You might want to explicitly `do` (or prepare/execute, whatever) some postgres query with a conditiona insertion, and examples of those are easy to look up [19:39] *conditional [19:42] *** kent\n joined [19:50] wildtrees, `SELECT $1 <> $2` is not an assertion. It simply returns false. [19:50] Or true [19:50] should I just do the check for raku for now? [19:50] sql does not condition transactions. that's up to your program logic [19:51] do the check in raku for now [19:51] yes. [19:51] * wildtrees is starting to see the pieces slowly coming together [19:51] Generally you want to do most of the basic checks first before starting to work with the database. [19:52] i don't know what DBIish provides, but generally, transaction helpers in code work like: you start a transaction in a scope, if you leave the scope with an exception or otherwise early, it rolls back, otherwise it commits [19:53] so structuring your code to work like that has the best chance of being useful [19:59] just had a type mismatch in a transaction (just test code don't need the actual transaction for now) and it seems to hang the transaction block for further requests [20:04] Yep. You need to CATCH exceptions and cleanup state. [20:06] *** Altai-man_ joined [20:07] your code will need to call either commit or rollback at some point [20:07] always [20:07] sub write($a, $b) { [20:07] # Pre-write tests [20:07] die('A must be larger than B') unless $a > $b; [20:07] try { [20:07] $db.do: q{BEGIN}; [20:07] my $sth = $db.prepare: q{INSERT INTO ...}; [20:07] $sth.execute($a); [20:07] $sth.execute($b); [20:07] $db.do: q{COMMIT}; [20:08] CATCH { [20:08] default { [20:08] # log? [20:08] $db.do: q{ROLLBACK}; [20:08] } [20:08] } [20:08] } [20:08] write($a, $b); [20:08] You'll end up with something like that. [20:08] *** sena_kun left [20:08] ideally you'd also have it rollback if someone leaves the block without reaching COMMIT, but you can also just avoid doing that [20:13] And retry loops for serialization, network, and other temporary errors ... [20:21] Can't change a github repo status in travis-ci. Can anybody check if this is my local problem or it's something global? [20:24] *** AlexDaniel left [20:28] *** PacoLinux left [20:31] New module released to CPAN! Termbox (0.0.2) by 03JJATRIA [20:48] *** Kaiepi left [21:02] New module released to CPAN! Termbox (0.0.3) by 03JJATRIA [21:09] *** pilne joined [21:34] *** chloekek left [21:36] *** Kaiepi joined [21:42] *** Actualeyes left [21:59] *** mowcat left [22:00] *** Manifest0 left [22:01] what is the raku version of perl's do block (do {})? [22:02] i'm guessing "=> {}" [22:02] tbrowder, what's the semantics? [22:02] 2020-03-22T18:25:50Z #raku-dev Altai-man_ btw you can use #whateverable channel to abuse the bots [22:02] 2020-03-22T18:26:16Z #raku-dev Altai-man_ you don't seem to do it often but maybe that's because you don't want to spam on main channels :) [22:04] tbrowder, I think just `{}` is enough, no? [22:04] the do block "returns value of last command in the block" [22:04] m: my $a = { 1; 2; 42; }; say $a; [22:04] rakudo-moar 170add262: OUTPUT: «WARNINGS for :␤-> ;; $_? is raw = OUTER::<$_?> { #`(Block|84735176) ... }␤Useless use of constant integer 2 in sink context (line 1)␤Useless use of constant integer 1 in sink context (line 1)␤» [22:04] m: my $a = { say 1; say 2; 42; }; say $a; [22:04] rakudo-moar 170add262: OUTPUT: «-> ;; $_? is raw = OUTER::<$_?> { #`(Block|65343328) ... }␤» [22:05] i'll try it...thnx [22:05] *** Manifest0 joined [22:05] *** sena_kun joined [22:05] m: say {23} [22:05] rakudo-moar 170add262: OUTPUT: «-> ;; $_? is raw = OUTER::<$_?> { #`(Block|54582040) ... }␤» [22:06] say "{23; 1}" [22:06] tbrowder, rakudo-moar 170add262: OUTPUT: «WARNINGS for /tmp/DhJbIVEIyj:␤1␤Useless use of constant integer 23 in sink context (line 1)␤» [22:07] m: say do { say 42; 5000 }; [22:07] rakudo-moar 170add262: OUTPUT: «42␤5000␤» [22:09] *** Altai-man_ left [22:09] m: my $a = do {1;2}; say $a [22:09] rakudo-moar 170add262: OUTPUT: «WARNINGS for :␤2␤Useless use of constant integer 1 in sink context (line 1)␤» [22:10] *** rindolf left [22:13] m: my $a = sub {1;2}; say $a [22:13] rakudo-moar 170add262: OUTPUT: «WARNINGS for :␤sub { }␤Useless use of constant integer 1 in sink context (line 1)␤» [22:14] *** Kaiepi left [22:14] m: my $a = => { 1,2}; say $a [22:14] rakudo-moar 170add262: OUTPUT: «5===SORRY!5=== Error while compiling ␤Preceding context expects a term, but found infix => instead.␤at :1␤------> 3my $a = =>7⏏5 { 1,2}; say $a␤» [22:15] m: sub f(){1;2}; f [22:15] rakudo-moar 170add262: OUTPUT: «WARNINGS for :␤Useless use of constant integer 1 in sink context (line 1)␤» [22:16] *** caterfxo joined [22:16] m: sub f(){1;2}; say f [22:16] rakudo-moar 170add262: OUTPUT: «WARNINGS for :␤2␤Useless use of constant integer 1 in sink context (line 1)␤» [22:17] m: say do { 1; 2; 42 } [22:17] rakudo-moar 170add262: OUTPUT: «WARNINGS for :␤42␤Useless use of constant integer 1 in sink context (line 1)␤Useless use of constant integer 2 in sink context (line 1)␤» [22:18] m: say do { say 1; say 2; 42 } [22:18] rakudo-moar 170add262: OUTPUT: «1␤2␤42␤» [22:18] weekly: O'Reilly stopping *all* conference events permanently: https://www.oreilly.com/conferences/from-laura-baldwin.html [22:18] lizmat, Noted! (weekly) [22:18] looks to me like the p5 do block is some kind of inline function (lamda?) [22:19] tbrowder: not sure. It's just invoking a block. [22:19] perl5 has only anonymous subs, if I still remember it right. [22:21] do BLOCK just allows you to place a block in expression context [22:21] but the p5 code i'm looking at...i'll gist it in a few minutes [22:21] (in perl) [22:21] *** wamba left [22:22] it's not a loop and can't be returned from [22:22] just returns the last expression [22:22] the raku do "creates a supply..." [22:25] so are you saying our bare block should be the same? sounds right as sena_kun said, too, but why can't we assign it to a var? [22:25] tbrowder: that can't be true. Maybe you're confusing the do BLOCK syntax with the do method on a Supply? [22:25] tbrowder: why can't? [22:26] m: my &f = { say $_ }; f(pi) [22:26] rakudo-moar 170add262: OUTPUT: «3.141592653589793␤» [22:26] well i don't see the do block in our docs [22:26] tbrowder: ^ this? [22:26] tbrowder: https://docs.raku.org/language/control#index-entry-control_flow_do-do [22:26] nope, that's a sub [22:27] tbrowder: http://docs.perl6.wakelift.de/language/control#index-entry-control_flow_do-do [22:27] Grinnz: what is a sub? [22:28] m: my $a = { say $_ }; $a(42) [22:28] rakudo-moar 170add262: OUTPUT: «42␤» [22:28] ok, i couldn't find that in the search box, thnx [22:28] you're storing code to execute, rather than just immediately running a block and returning the result as perl's do BLOCK does [22:29] tbrowder: type 'do' and around the middle of the suggestions list you'll see control flow do [22:29] Grinnz: Look at my earlier example. [22:29] yeah that looks more like it [22:29] Grinnz: I was answering tbrowder question about assigning a block to a variable. [22:30] i was lead astray by the nutshell docs about using repeat instead of do :-D [22:30] *** devmikey joined [22:31] *** devmikey left [22:31] *** devmikey joined [22:31] oh yeah, that usage of do seems to have been disambiguated from Perl to Raku. Apparently do in Raku can never be made to loop. [22:32] ok, thanks much folks! [22:32] do BLOCK while ... is a strange special case in perl anyway, mostly meant to emulate C [22:33] *** Kaiepi joined [22:33] *** Kaiepi left [22:33] *** Kaiepi joined [22:35] *** Tirifto left [22:37] *** PacoLinux joined [22:42] *** natrys left [22:43] *** sena_kun left [22:51] *** Doc_Holliwood left [22:55] *** natrys joined [22:58] *** natrys left [23:08] *** Xliff joined [23:09] . [23:16] *** lizmat left [23:27] *** Kaeipi joined [23:27] *** Kaiepi left [23:29] *** Kaiepei joined [23:31] *** Kaiepi joined [23:31] *** Kaeipi left [23:34] *** Kaiepei left [23:40] *** pecastro left [23:43] . [23:46] *** xelxebar left [23:47] .tell tbrowder did you express wanting to help test zeco? [23:47] tony-o, I'll pass your message to tbrowder [23:52] *** upupbb-user3 joined [23:53] *** Kaeipi joined [23:53] *** AlexDaniel joined [23:53] *** AlexDaniel left [23:53] *** AlexDaniel joined [23:56] *** Kaiepi left [23:56] *** Kaiepei joined [23:57] m: say {say 1; 2}() ; [23:57] rakudo-moar 170add262: OUTPUT: «1␤2␤» [23:57] *** Kaeipi left