Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-10-19

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 Geth ¦ doc/in-buffer: 52a793b3ff | (Zoffix Znet)++ | 2 files
00:01 Geth ¦ doc/in-buffer: Document handle buffering
00:01 Geth ¦ doc/in-buffer:
00:01 Geth ¦ doc/in-buffer: - :buffer remains under the hood, deprecated for 3 releases
00:01 Geth ¦ doc/in-buffer: - :buffer is now :out-buffer, tweaking output buffer
00:01 Geth ¦ doc/in-buffer: - :in-buffer lets tweak input buffer
00:01 Geth ¦ doc/in-buffer:
00:01 Geth ¦ doc/in-buffer: Impl: https://github.com/rakudo/rakudo/commit/f9c10c2145
00:01 Geth ¦ doc/in-buffer:       https://github.com/rakudo/rakudo/commit/3fcd74abf0
00:01 Geth ¦ doc/in-buffer: Spec: https://github.com/perl6/roast/commit/1a7b5f6130
00:02 Geth ¦ doc/in-buffer:       https://github.com/perl6/roast/commit/a99c1d5ae1
00:02 Geth ¦ doc/in-buffer: review: https://github.com/perl6/doc/commit/52a793b3ff
00:17 cdg joined #perl6
00:24 margeas joined #perl6
00:26 travis-ci joined #perl6
00:26 travis-ci Doc build passed. Zoffix Znet 'Document handle buffering
00:26 travis-ci https://travis-ci.org/perl6/doc/builds/289750016 https://github.com/perl6/doc/commit/52a793b3ff28
00:26 travis-ci left #perl6
00:30 ryn1x_ joined #perl6
00:35 aborazmeh joined #perl6
00:35 aborazmeh joined #perl6
00:35 ryn1x joined #perl6
00:40 ryn1x_ joined #perl6
00:59 Cabanossi joined #perl6
01:09 ryn1x joined #perl6
01:13 cdg joined #perl6
01:16 pilne joined #perl6
01:34 ryn1x Has anyone read Perl 6 Deep Dive yet? Any opinions on it?
01:34 epony joined #perl6
01:35 bitrauser joined #perl6
01:54 astj joined #perl6
01:54 llfourn joined #perl6
01:56 ilbot3 joined #perl6
01:56 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
02:03 cdg joined #perl6
02:07 ryn1x_ joined #perl6
02:27 noganex joined #perl6
02:32 ufobat_ joined #perl6
02:36 wamba joined #perl6
02:43 Herby__ joined #perl6
02:47 geekosaur joined #perl6
02:59 Cabanossi joined #perl6
03:06 jeek joined #perl6
03:40 evalable6 joined #perl6
03:40 nativecallable6 joined #perl6
03:40 greppable6 joined #perl6
03:40 quotable6 joined #perl6
03:40 bloatable6 joined #perl6
03:40 unicodable6 joined #perl6
03:40 committable6 joined #perl6
03:40 releasable6 joined #perl6
03:40 benchable6 joined #perl6
03:40 coverable6 joined #perl6
03:40 bisectable6 joined #perl6
03:40 squashable6 joined #perl6
03:40 statisfiable6 joined #perl6
03:43 Cabanossi joined #perl6
04:05 cdg joined #perl6
04:18 araujo joined #perl6
04:28 Cabanossi joined #perl6
04:50 xtreak joined #perl6
04:52 sena_kun joined #perl6
05:23 patrickz joined #perl6
05:43 Cabanossi joined #perl6
05:57 lustlife joined #perl6
06:02 domidumont joined #perl6
06:03 ggoebel joined #perl6
06:20 nadim joined #perl6
06:20 mr-foobar joined #perl6
06:21 cdg joined #perl6
06:22 darutoko joined #perl6
06:24 wamba joined #perl6
06:46 nativecallable6 joined #perl6
06:46 bloatable6 joined #perl6
06:46 quotable6 joined #perl6
06:46 coverable6 joined #perl6
06:46 greppable6 joined #perl6
06:46 benchable6 joined #perl6
06:46 committable6 joined #perl6
06:46 bisectable6 joined #perl6
06:46 unicodable6 joined #perl6
06:46 evalable6 joined #perl6
06:46 releasable6 joined #perl6
06:46 squashable6 joined #perl6
06:46 statisfiable6 joined #perl6
06:56 vivus-ignis joined #perl6
06:57 wamba joined #perl6
07:01 jonas1 joined #perl6
07:04 lustlife joined #perl6
07:09 ryn1x joined #perl6
07:11 xtreak joined #perl6
07:12 domidumont joined #perl6
07:14 aborazmeh joined #perl6
07:14 aborazmeh joined #perl6
07:27 lowbro joined #perl6
07:27 lowbro joined #perl6
07:27 lustlife joined #perl6
07:28 Cabanossi joined #perl6
07:30 lustlife joined #perl6
07:31 |oLa| joined #perl6
07:34 abraxxa joined #perl6
07:46 dakkar joined #perl6
07:49 lustlife` joined #perl6
07:58 xtreak joined #perl6
07:58 Cabanossi joined #perl6
08:05 a3r0 joined #perl6
08:11 zakharyas joined #perl6
08:18 rgrau joined #perl6
08:21 margeas joined #perl6
08:24 [particle]1 joined #perl6
08:25 ryn1x joined #perl6
08:28 Cabanossi joined #perl6
08:41 robertle joined #perl6
08:46 cgfbee joined #perl6
08:52 steeznson joined #perl6
08:58 Cabanossi joined #perl6
08:59 virtualsue joined #perl6
09:02 ryn1x joined #perl6
09:04 xtreak joined #perl6
09:13 gfldex if you .to-json a WhateverCode, what would you expect?
09:14 gfldex or any Code for that matter
09:18 moritz ryn1x: i've skimmed a few chapters. Looks decent.
09:18 moritz quite a different style than my own writing :)
09:28 Cabanossi joined #perl6
09:49 HoboWithAShotgun joined #perl6
09:55 itaylor57 joined #perl6
09:57 wamba joined #perl6
10:00 llfourn joined #perl6
10:02 k_89 joined #perl6
10:09 v4hid joined #perl6
10:12 stmuk_ ha! virtualsue got a Google Developer Advocate to tweet about Perl 6 by giving a go v perl6 talk at a go meetup
10:13 stmuk_ before her talk a room of ~100 had about 5% who heard of perl 6, after 100%
10:14 DrForr 5% is impressive as it is.
10:14 tyil go is the less powerful version of perl 6 made by google right
10:15 sproctor joined #perl6
10:15 stmuk_ a little careful promption in other language communities (with no enegative attacks) might be good advocacy
10:16 stmuk_ tyil: Go is more like a modern version of C in the same way Perl is a modern version of Awk :)
10:16 stmuk_ tyil: different tools for different tasks
10:22 cdg joined #perl6
10:25 HoboWithAShotgun joined #perl6
10:30 virtualsue I only had one slightly trollish question too. Which I treated as funny.
10:39 moritz virtualsue++
10:41 DrForr Is the tweet available for me to boost?
10:43 moritz or for @perl6org to retweet :)
10:45 eliasr joined #perl6
10:48 stmuk_ https://twitter.com/francesc/status/920359302728245249
10:49 stmuk_ the example code is likely to look different by the time it gets to the Barcelona Perl Workshop
10:50 DrForr RT'd.
10:50 * moritz too
10:50 rindolf joined #perl6
10:51 ryn1x joined #perl6
10:51 khw joined #perl6
10:51 stmuk_ Also interesting that Workshop has some Elixir too
10:52 HoboWithAShotgun so i patched mi6 last night so the program won't just only look in the main .pm6 file for pod (to generate the readme.md), but also in other places like *.pod6 files silently overwrite the README.md file
10:52 virtualsue My other choice for concurrency comparison would have been elixir
10:52 HoboWithAShotgun but the author is reluctant, says he doesnt think that's neccessary
10:52 HoboWithAShotgun what do i do?
10:53 DrForr We just had a talk about Elixir here at GoodData, looked interesting.
10:53 moritz HoboWithAShotgun: make it an option?
10:54 stmuk_ virtualsue: @promises.push :P
10:54 moritz fwiw I'm not using mi6 right now because it overwrites my hand-crafted README
10:54 virtualsue yeah yeah
10:55 HoboWithAShotgun moritz: there is an ini file where you can specify in which file too read the pod for the readme from
10:57 HoboWithAShotgun that's fine, but to satisfy least surprise paradig my version looks in lib/Module/Name.pm6, lib/Module/name.pod6, docs/Module/Name.pod6 and README.pod6
10:57 HoboWithAShotgun but as i said, the author doesn't see the value behind that change
10:58 HoboWithAShotgun now should i try to convince him, or just fork and make my own mi7
10:58 HoboWithAShotgun i'm terrible with humans :-/
10:58 cdg joined #perl6
11:00 moritz or you contribute a functionality of your liking to ddt
11:00 moritz https://github.com/kalkin/Ddt
11:03 W4RL0RD joined #perl6
11:06 HoboWithAShotgun well, what i like about mi6 is, that i don't have to interact with fricking PAUSE
11:06 HoboWithAShotgun i fixed an outstanding issue with one of my P5 modules last night and it's still as horrible as i remembered it
11:07 virtualsue :-)
11:23 raschipi joined #perl6
11:30 wamba joined #perl6
11:42 cdg joined #perl6
11:52 Grimy joined #perl6
11:52 Grimy p6: $_ = 1e-1 + 2e-1; 3e-1; say $_ == 3e-1;
11:52 camelia rakudo-moar f9c10c214: OUTPUT: «WARNINGS for <tmp>:␤True␤Useless use of constant floating-point number 0.3 in sink context (line 1)␤»
11:53 Grimy p6: $_ = 1e-1 + 2e-1; 0.3e0; say $_ == 3e-1
11:53 camelia rakudo-moar f9c10c214: OUTPUT: «WARNINGS for <tmp>:␤False␤Useless use of constant floating-point number 0.3 in sink context (line 1)␤»
11:53 Grimy This seems like a bug. If the use is useless, why does it change the result of the following comparison?
11:55 awwaiid Cool talk on notation by Guy Steele given at Clojure/conj 2017 last week, https://www.youtube.com/watch?time_continue=540&amp;v=dCuZkaaou0Q . Talks about regex, bnf, ellipses, parens, overbars. (TimToady)
11:57 raschipi m: $_ = 1e-1 + 2e-1; 3e-1; say $_
11:57 camelia rakudo-moar f9c10c214: OUTPUT: «WARNINGS for <tmp>:␤0.3␤Useless use of constant floating-point number 0.3 in sink context (line 1)␤»
11:57 raschipi m: $_ = 1e-1 + 2e-1; 0.3e0; say $_
11:57 camelia rakudo-moar f9c10c214: OUTPUT: «WARNINGS for <tmp>:␤0.3␤Useless use of constant floating-point number 0.3 in sink context (line 1)␤»
11:57 raschipi m: $_ = 1e-1 + 2e-1; 3e-1; say $_.^name
11:57 camelia rakudo-moar f9c10c214: OUTPUT: «WARNINGS for <tmp>:␤Num␤Useless use of constant floating-point number 0.3 in sink context (line 1)␤»
11:57 raschipi m: $_ = 1e-1 + 2e-1; 0.3e0; say $_.^name
11:57 camelia rakudo-moar f9c10c214: OUTPUT: «WARNINGS for <tmp>:␤Num␤Useless use of constant floating-point number 0.3 in sink context (line 1)␤»
11:57 raschipi m: $_ = 1e-1 + 2e-1; 3e-1; say $_ == 3e-1;
11:57 camelia rakudo-moar f9c10c214: OUTPUT: «WARNINGS for <tmp>:␤True␤Useless use of constant floating-point number 0.3 in sink context (line 1)␤»
11:58 Cabanossi joined #perl6
11:58 raschipi m: $_ = 1e-1 + 2e-1; 0.3e0; say $_ == 3e-1
11:58 camelia rakudo-moar f9c10c214: OUTPUT: «WARNINGS for <tmp>:␤False␤Useless use of constant floating-point number 0.3 in sink context (line 1)␤»
11:58 * geekosaur wonders what that does with spesh disabled
11:58 geekosaur (thinking leaky fp state + general ieee weirdness)
12:01 * HoboWithAShotgun prepares the same path for Ddt
12:01 HoboWithAShotgun *patch.
12:02 HoboWithAShotgun Turns out, it's the same code. Looks like Ddt once was a mi6 fork
12:03 bitrauser Good afternoon everyone
12:03 raschipi good morning
12:06 xtreak joined #perl6
12:08 ryn1x joined #perl6
12:17 SlipperySlope joined #perl6
12:19 wamba joined #perl6
12:25 zakharyas joined #perl6
12:28 araraloren joined #perl6
12:40 * [Coke] retroactively waves at masak.
12:43 wictory[m] Hi! Does anybody here know whether CArray is null terminated?
12:45 [Coke] Happy Diwali, folks.
12:45 moritz wictory[m]: I think it's not
12:45 [Coke] (I know it's not *our* Diwali)
12:46 wictory[m] moritz: hmm .. I guess it pretty difficult to get it null terminated then.
12:47 wictory[m] let's say I have a CArray[Str] and want to make it null terminated, because that the way to encode the size
12:47 araraloren NO except it is a C-string
12:49 araraloren Maybe you can use a type object instead
12:49 wictory[m] aah, Str:U is the null c string
12:49 wictory[m] (they are c-strings)
12:50 ryn1x joined #perl6
12:50 wictory[m] * with some definition of is :)
12:52 araraloren Do you mean a special value as the terminator, like the \0 of string ?
12:53 Geth ¦ doc: 1322c386d8 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/tables.pod6
12:53 Geth ¦ doc: clarify effect of bounding column separators
12:53 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1322c386d8
12:53 synopsebot Link: https://doc.perl6.org/language/tables
12:53 wictory[m] no, I want an array of c-strings, where the array is terminated by NULL
12:54 pilne joined #perl6
12:54 moritz you get that by putting the Str type object as the last element, iirc
12:54 araraloren No, I think it can't be like that
12:54 wictory[m] (the c-strings are terminated by \0 too, but thats fixed by Str)
12:54 [Coke] tbrowder: You have an extra a in that last commit.
12:55 araraloren yeah, that's what I mean ,you can put Str as the last element
12:55 araraloren NULL is only use for the terminator of C-string
12:56 mcmillhj joined #perl6
12:56 araraloren And it's not like an Array of C-string pointer
12:56 Geth ¦ doc: 4765b335ff | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/tables.pod6
12:56 Geth ¦ doc: remove spurious a
12:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/4765b335ff
12:56 wictory[m] I found it in the docs now
12:57 tyil tbrowder++
12:57 HoboWithAShotgun moritz: I filed the same patch for Ddt. ( https://github.com/kalkin/Ddt/pull/6 )
12:57 mson joined #perl6
12:58 tbrowder [Coke]: wow, you have good (and fast) vision!
12:59 * HoboWithAShotgun grabs some gear and goes off to measure c in the area around Coke
13:05 HoboWithAShotgun say I have a string (not a string literal) that contains "x $foo x". how do i let it undergo interpolation? Eval, obviously but is there another way?
13:08 raschipi to treat a string as code, you need to eval it.
13:08 moritz s:g[\$ (\w+)] = $::(~$0);
13:09 moritz to first approximation
13:09 cdg joined #perl6
13:10 araraloren great advice
13:11 perlpilot HoboWithAShotgun: though, you still might want to reevaluate why you want this  :)
13:12 HoboWithAShotgun so, ::() is doing what? i've used that in a require statement without real understanding. i think it's a lookup in the symbol table, yes?
13:12 moritz yes
13:13 moritz ish
13:13 moritz a symbol lookup
13:13 moritz (could be lexpad, which is a kind of symbol table, we tend to not call it that)
13:13 araraloren https://docs.perl6.org/language/packages#index-entry-%3A%3A_package
13:15 Geth ¦ doc: bdbcdfdc26 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/tables.pod6
13:15 synopsebot Link: https://doc.perl6.org/language/tables
13:15 Geth ¦ doc: explain effects of empty cells and short rows
13:15 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bdbcdfdc26
13:19 cdg_ joined #perl6
13:37 thunktone joined #perl6
13:43 Cabanossi joined #perl6
13:46 steeznson joined #perl6
13:52 ilmari the "Control Flow" link on https://docs.perl6.org/syntax/quietly has a broken fragment: https://docs.perl6.org/language/control#Flow%29_quietly
13:52 ilmari should just be #quietly
14:00 moritz look like a linkgen bug
14:03 sena_kun joined #perl6
14:08 mson joined #perl6
14:09 virtualsue joined #perl6
14:20 ryn1x joined #perl6
14:20 bdmatatu joined #perl6
14:25 Kyo91_ joined #perl6
14:30 konsolebox joined #perl6
14:31 HoboWithAShotgun joined #perl6
14:38 Hotkeys joined #perl6
14:40 mcmillhj joined #perl6
14:40 ridthyself joined #perl6
14:45 ridthyself does perl6 focus on server side scripting, or is it more like a better java/c# general purpose language?
14:45 timotimo it's really a general purpose language
14:46 mcmillhj joined #perl6
14:46 ridthyself what's an advantage it might have over java or .net?
14:46 timotimo you can build server-side stuff, client-side stuff, there's a few GUI toolkits available, there's SDL2 and Cairo bindings for graphical stuff, there's modules for CLI and TUI, ...
14:47 timotimo it's very expressive, it lets you express anything in the paradigm you prefer for any given task, the new regex syntax is fantastic, as is the ability to combine regexes into "grammars"
14:47 timotimo you can easily build domain-specific-languages from simple subroutine-based stuff all the way to fully new syntax (think JSX)
14:48 timotimo oh, and we have the best support for unicode
14:48 timotimo rivaled only by Swift, i hear
14:48 ridthyself oh my
14:49 timotimo and out of python, ruby, and javascript, we're the only ones that don't have something equivalent to a Global Interpreter Lock
14:49 ridthyself does that mean support for multithreading?
14:49 timotimo that's right
14:50 timotimo our FFI support for C, C++, and friends is also world-class
14:50 timotimo do you want to hear some drawbacks? :)
14:51 ridthyself I imagine its a very big language for one!
14:51 timotimo it is, but it's internally very consistent, which makes learning it easier
14:52 ridthyself what are some of the drawbacks? runtime speed?
14:52 timotimo speed in general can be a pain point, but it depends very strongly on what exactly you're doing
14:52 ridthyself not that that matters most of the time on modern equipment, but i imagine it's not for IOT
14:53 timotimo some things we can do blazing fast, some things are painfully slow. many things you can do in a painfully-slow way you can usually replace with a fast-enough way, though
14:53 timotimo if you're building your own IOT devices, you may have to get a bit more RAM to run big perl6 programs
14:53 timotimo you'll have to have a device with a full operating system, for one
14:54 timotimo whereas if you build your IOT in C/C++ or any other compiled-to-native language, you won't have to have that
14:54 timotimo but given how many IOT things build on nodejs and javascript, i'd say that's already common
14:55 moritz does the IOT stuff itself build on nodejs, or the services that the IOT devices talk to?
14:55 timotimo just starting perl6 with an empty program takes like 0.09 seconds on my machine
14:56 HoboWithAShotgun this: multi sub find-dist-files("MANIFEST" where $file.IO.e) doesn't work yet sadly, what's the next closest thing?
14:56 timotimo i'm not an IOT guy, that was just the impression i got from the outside
14:56 HoboWithAShotgun i have multi sub find-dist-files($file where $file.IO.e = "MANIFEST") but that seems like a hack
14:57 ridthyself can perl6 be compiled? or does it only run with an interpreter
14:57 moritz HoboWithAShotgun: have you tried  where *.IO.e ?
14:57 timotimo perl6 modules are compiled to bytecode, but it still requires the runtime
14:57 HoboWithAShotgun the Perl 6 compiler will be ready on easter ridthyself :)
14:57 timotimo the compiler isn't strictly necessary, but you currently can't run a perl6 module by itself without asking the compiler to load it for you
14:57 ridthyself what year?
14:57 ridthyself oh.
14:57 ridthyself :)
14:58 Cabanossi joined #perl6
14:58 HoboWithAShotgun moritz: Cannot do non-typename cases of type_constraint yet
14:58 Ulti timotimo: is that true? I thought you could run moarvm with the setting on its own along with your program
14:58 thunktone joined #perl6
14:59 timotimo hm, you probably can. i haven't tried, though
14:59 Ulti I seem to recall giving it a go
14:59 HoboWithAShotgun i think the current way of distributing perl6 apps is docker, no?
14:59 timotimo then you're ahead of me :)
14:59 ryn1x joined #perl6
14:59 moritz m: sub f('MANIFEST' where { .IO.e. }) { }; f('MANIFEST')
14:59 camelia rakudo-moar f9c10c214: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at <tmp>:1␤------> 3sub f('MANIFEST' where { .IO.e. 7⏏5}) { }; f('MANIFEST')␤»
14:59 moritz m: sub f('MANIFEST' where { .IO.e }) { }; f('MANIFEST')
14:59 camelia rakudo-moar f9c10c214: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Cannot do non-typename cases of type_constraint yet␤at <tmp>:1␤------> 3sub f('MANIFEST' where { .IO.e }7⏏5) { }; f('MANIFEST')␤»
15:00 moritz oh
15:00 moritz I see
15:00 timotimo since 'MANIFEST' there is already compiled as if it were Str $ where "MANIFEST", you can just add that to the constraint, no?
15:00 moritz subset MANIFEST of Str where { $_ eq 'MANIFEST' and .IO.e };
15:01 moritz but, IMHO, doing .IO inside a type constraint is confusing as hell
15:01 moritz rather do something like
15:01 araraloren Does Perl6 will change name to 6lang ? I have heard that
15:01 moritz m: sub f('MANIFEST') { PRE 'MANIFEST'.IO.e; }; f 'MANIFEST'
15:01 camelia rakudo-moar f9c10c214: OUTPUT: «Precondition ''MANIFEST'.IO.e' failed␤  in sub f at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:01 moritz araraloren: I hope not
15:02 moritz but I'm not in charge
15:02 jnthn araraloren: It's only a proposal, and the overall idea is to have an *additional* name for marketing purposes. For me personally, I expect to continue calling it Perl 6 in the stuff I do/write.
15:03 araraloren oh
15:04 araraloren yeah, I agree Perl6 would give somebody impression you know the "Perl" code
15:06 zakharyas joined #perl6
15:08 virtualsue joined #perl6
15:09 HoboWithAShotgun it is my understanding that, for a CPAN dist, the tarball needs to have a Perl6 top level directory, right? And it must have a META6.json. But must said meta file go next to Perl6 in the top level or into Perl6 with the rest?
15:09 zakharyas joined #perl6
15:09 HoboWithAShotgun i assume the latter
15:10 ridthyself i like psix (pronounced siks)
15:10 ridthyself (just read up on it)
15:10 araraloren There is a tool can generate it for you. HoboWithAShotgun
15:10 araraloren Mi6
15:11 HoboWithAShotgun That's the point. Mi6 does it wrong
15:11 HoboWithAShotgun it just puts everything in the tld of the tarball
15:12 araraloren 6lang is sound great too, in china, 6 is something mean "everything is going smoothly"
15:12 araraloren or powerful
15:12 HoboWithAShotgun and the PAUSE instructions say it sub ust go must go into something.tgz/Perl6
15:13 HoboWithAShotgun looks like my backspace key hangs
15:13 araraloren I don't know, maybe you can ask someone, or download a tab ball form CPAN, and check for it?
15:13 raschipi joined #perl6
15:18 callyalater joined #perl6
15:18 raschipi araraloren: 6lang won't work because identifiers can't start with digits.
15:19 araraloren oh, so said :( ok, time to go to bed
15:19 araraloren bye
15:22 HoboWithAShotgun mmh, where do i get an actual working tarball? cpan doesnt display the psix modules (i like that too) and modules.perl6.org lets me browse the source but no link to the tarball
15:23 someuser_ joined #perl6
15:24 timotimo you can use /repo/NameOfModule on modules.perl6.org
15:24 timotimo (even though i consider that a bug)
15:24 raschipi zoffix, can modules.perl6.org include links to CPAN?
15:26 HoboWithAShotgun that redirects me to github
15:26 raschipi which module are you trying to get?
15:27 HoboWithAShotgun what the hell does PAUSE mean with "to upload a Perl6 distribution a target directory whose top level subdirectory is "Perl6" must be specified."
15:27 ilmari HoboWithAShotgun: that you need to upload it into the Perl6 subdirectory of your PAUSE author directory
15:27 moritz HoboWithAShotgun: Pause offers the option to upload files into subdirectories
15:28 HoboWithAShotgun Oh#
15:28 moritz there's a text field for the subdir
15:28 HoboWithAShotgun *facepalm*
15:28 tyil it has to be in Perl6
15:28 tyil not any lower dir, not in the root dir, just Perl6
15:29 timotimo oh, then that particular bug has been fixed
15:30 timotimo huh?
15:30 timotimo http://modules.perl6.org/repo/JSON::Fast ← HoboWithAShotgun
15:30 timotimo this one gives the tarball from cpan
15:31 Geth ¦ doc: 5decac63f6 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/tables.pod6
15:31 synopsebot Link: https://doc.perl6.org/language/tables
15:31 Geth ¦ doc: add note about efficiency
15:31 Geth ¦ doc: review: https://github.com/perl6/doc/commit/5decac63f6
15:31 Kyo91 joined #perl6
15:32 Kyo91 joined #perl6
15:33 ryn1x joined #perl6
15:42 Geth ¦ modules.perl6.org: 3fdf9ea779 | (Zoffix Znet)++ | bin/build-project-list.pl
15:42 Geth ¦ modules.perl6.org: Remove mention of --interval option
15:42 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/3fdf9ea779
15:48 Geth ¦ modules.perl6.org: fe6f22d0ba | (Zoffix Znet)++ | lib/ModulesPerl6/Controller/Dist.pm
15:48 Geth ¦ modules.perl6.org: Fix Infiniloop on Dist Disambiguation page
15:48 Geth ¦ modules.perl6.org:
15:48 Geth ¦ modules.perl6.org: Cludge for #89
15:48 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/fe6f22d0ba
15:50 HoboWithAShotgun m: my @maybe = 1,2,3,4; my @no = 2,3; say @maybe.grep( * ∉ @no );
15:50 camelia rakudo-moar f9c10c214: OUTPUT: «(1 4)␤»
15:51 kyan joined #perl6
15:52 Geth ¦ modules.perl6.org: efe6024641 | (Zoffix Znet)++ | lib/ModulesPerl6/Controller/Dist.pm
15:52 Geth ¦ modules.perl6.org: Fix incorrect definedness map
15:52 Geth ¦ modules.perl6.org:
15:52 Geth ¦ modules.perl6.org: Part of #89
15:52 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/efe6024641
15:55 Geth ¦ modules.perl6.org: 2a535de504 | (Zoffix Znet)++ | lib/ModulesPerl6/Controller/Dist.pm
15:55 Geth ¦ modules.perl6.org: Fix (for real?) infiniloop in dist ambig page
15:55 Geth ¦ modules.perl6.org:
15:55 Geth ¦ modules.perl6.org: Third time's the charm
15:55 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/2a535de504
15:57 Zoffix joined #perl6
15:57 Zoffix raschipi: yeah, the /repo/ endpoint directs to CPAN dist archave
15:58 Zoffix timotimo: it's not a bug. It's just poorly named, 'cause when it was invented we didn't have CPAN
15:58 timotimo right
15:58 Cabanossi joined #perl6
15:58 timotimo so maybe /source/ for the "other" thing?
15:59 Zoffix timotimo: I think just make /repo/ do repos and /dist-source/ for current behaviour
15:59 Zoffix timotimo: is there a "specced" META key that'd contain the git repo for CPAN dists?
16:02 timotimo i thought the one we're currently using is the right one?
16:02 Rodney__ joined #perl6
16:02 ugexe could use "support" : { "source" : "..." } and let source-url stand as an ecosystem defined key, but then zef would also have to ignore it (support : source) *unless* it contained the @commit-id at the end of the uri
16:03 Zoffix timotimo: but for CPAN dists it points to CPAN, not whatever source control system the author may or may not be using
16:03 timotimo oh
16:04 Zoffix HoboWithAShotgun: multi sub find-dist-files("MANIFEST") is short for multi sub find-dist-files($ where "MANIFEST"). If you need to add extra `where` constrains, move the string match one there as well: multi sub find-dist-files($ where "MANIFEST" & .IO.e)
16:05 japhb Is virtualsue's talk from https://twitter.com/francesc/status/920359302728245249 online anywhere?
16:08 scovit joined #perl6
16:16 hyu joined #perl6
16:16 hyu hello
16:16 hyu pidory
16:16 hyu bless me epta
16:17 hyu p6: say 3;
16:17 camelia rakudo-moar f9c10c214: OUTPUT: «3␤»
16:17 hyu p6: say suka;
16:17 camelia rakudo-moar f9c10c214: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    suka used at line 1␤␤»
16:17 hyu p6: say 'suka';
16:17 camelia rakudo-moar f9c10c214: OUTPUT: «suka␤»
16:17 virtualsue @japhb No. As I'm giving it again soon, we'll see if the next venue will video it. I'm not ready to publish slides just yet.
16:17 hyu \me hh
16:18 * hyu hhh
16:18 scovit what is the most idiomatic way to express "retry on failure" ?
16:18 scovit I sometimes end up with things like this { doit CATCH { doit } }
16:18 scovit ideally it would be nice to say retry an infinite amount of time, or at least N times
16:19 hyu нихуя себе
16:19 hyu у вас есть трай кетч
16:19 hyu пиздец!
16:20 jnthn ...
16:20 mempko joined #perl6
16:21 jnthn scovit: loop { doit(); last; CATCH { default {} } } or some such
16:22 jnthn scovit: Or factor that out into a retry sub :)
16:22 Zoffix heh
16:22 tyil jnthn: would you need a redo in the default block?
16:22 Zoffix We getting popular, I guess? :)
16:22 tyil probably not, since the loop just ends and implicitly redoes then
16:23 jnthn Zoffix: It's the first time I've seen a language be insulted for having try/catch :P
16:23 Zoffix Yeah lol :)
16:24 scovit jnthn the loop seems fine!
16:24 jnthn tyil: No, since it's already a loop
16:24 jnthn Catching an exception in a loop block handles it and continues the loop
16:28 virtualsue I asked google translate about those comments and it thought 'trac ketch' was involved. It got the swearing right though.
16:28 perlpilot scovit: It might be nice to have something like https://metacpan.org/pod/Try::Tiny::Retry in Perl 6.  Or even just something that does `retry { } :5times`
16:28 Zoffix virtualsue: "трай кетч" is russified "try CATCH"
16:29 tyil we need a slang so I can use that instead of the boring plain try CATCH keywords
16:29 tyil with пиздец as the throw keyword
16:30 Zoffix m: my &пиздец = &die; пиздец "Not implemented"
16:30 camelia rakudo-moar f9c10c214: OUTPUT: «Not implemented␤  in block <unit> at <tmp> line 1␤␤»
16:32 Zoffix Hm, was hoping there was a way to do the re-try-on-fail with the … op, but not only I can't get it to work, it also emits bogus "useless use" error
16:32 scovit perlpilot: try could accept an adverb :times, which do it automatically, but I don't think it is such a very used construct
16:32 Zoffix m: sub doit { say "doing"; die unless ++$ > 2;  }; {doit} ...^ !*
16:32 camelia rakudo-moar f9c10c214: OUTPUT: «Potential difficulties:␤    Useless use of ...^ in sink context␤    at <tmp>:1␤    ------> 3ng"; die unless ++$ > 2;  }; {doit} ...^7⏏5 !*␤doing␤Died␤  in sub doit at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
16:32 scovit perlpilot: it is just that I am using an api which fails on a regular bases due to random network timeouts
16:32 Morfent joined #perl6
16:33 timotimo a try with :times would probably require a slang
16:34 perlpilot yeah, that's why I was leaning towards a "retry" keyword.  You could at least prototype it in module-land
16:35 timotimo fwiw, just replacing the loop in jnthn's example with "for ^5" would also do that
16:35 timotimo though it'd want to have something to make that the return value, too ...
16:35 timotimo "that" being "the result of doit() if it's successful"
16:36 Mrofnet joined #perl6
16:37 Zoffix m: sub doit { say "doing"; die unless ++$ > 2; 42 }; (try doit) orelse redo for ^*
16:37 camelia rakudo-moar f9c10c214: OUTPUT: «doing␤doing␤doing␤»
16:39 Zoffix wtf
16:39 Zoffix m: sub doit { say "doing"; die unless ++$ > 2; 42 }; loop {doit; CATCH {redo}}
16:39 camelia rakudo-moar f9c10c214: OUTPUT: «(signal XFSZ)doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing…»
16:39 Zoffix m: sub doit { say "doing"; die unless ++$ > 2; 42 }; for ^* {doit; CATCH {redo}}
16:39 camelia rakudo-moar f9c10c214: OUTPUT: «doing␤doing␤doing␤»
16:39 japhb virtualsue: Ah, OK.  Will look forward to it in ~ a month then.  :-)
16:40 ilmari doing rhymes with boing
16:40 Zoffix Why do the two differ?
16:41 Zoffix m: for ^* {say "doit"}
16:41 camelia rakudo-moar f9c10c214: OUTPUT: «doit␤»
16:41 virtualsue The p6 code is likely to be rather better the next time :)
16:41 Zoffix Oh it's freaking whatever code, not an ^Inf
16:42 Zoffix m: sub doit { say "doing"; die unless ++$ > 2; 42 }; for (^*)(Inf) {doit; CATCH {redo}}
16:42 camelia rakudo-moar f9c10c214: OUTPUT: «(signal XFSZ)WARNINGS for <tmp>:␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤doing␤…»
16:42 Zoffix ZofBot: camelia not doing allah is doing
16:42 ZofBot Zoffix, Call it my fear That keeps you in the house and not your own
16:43 timotimo m: sub doit { say "doing $(++$)"; die unless ++$ > 2; 42; }; loop { doit; CATCH { redo } }
16:43 camelia rakudo-moar f9c10c214: OUTPUT: «(signal XFSZ)doing 1␤doing 2␤doing 3␤doing 4␤doing 5␤doing 6␤doing 7␤doing 8␤doing 9␤doing 10␤doing 11␤doing 12␤doing 13␤doing 14␤doing 15␤doing 16␤doing 17␤doing 18␤doing 19␤doing 20␤doing 21␤doing 22␤doing…»
16:43 timotimo m)
16:43 timotimo there's no "last" in there
16:43 timotimo m: sub doit { say "doing $(++$)"; die unless ++$ > 2; 42; }; loop { doit; last; CATCH { redo } }
16:43 camelia rakudo-moar f9c10c214: OUTPUT: «doing 1␤doing 2␤doing 3␤»
16:44 mst doing is the noise those springy doorstopper things make when you flick them
16:44 mst ilmari: agreed?
16:44 ilmari yep
16:44 ilmari doioioiongggg
16:45 ilmari if you flick them hard enough
16:45 timotimo i never had one of this kind
16:46 Zoffix left #perl6
16:46 ilmari https://media.giphy.com/media/jVg9wgGrvu9QA/giphy.gif
16:47 domidumont joined #perl6
16:51 lizmat joined #perl6
16:56 ugexe http://jnthn.net/papers/2017-perl6-concurrency-pcp.pdf page 62 (A retry mechanism)
16:58 Cabanossi joined #perl6
17:00 mcmillhj joined #perl6
17:02 mr-foobar joined #perl6
17:02 Kyo91_ joined #perl6
17:06 timotimo that's for supply-based (or react-based) things
17:13 HoboWithAShotgun how do i access a global dynamic variable in another package? $*Foo::Variable; doesn't work
17:14 robertle joined #perl6
17:17 Geth ¦ modules.perl6.org: f65dc13c6a | (Zoffix Znet)++ | assets/sass/main.scss
17:17 Geth ¦ modules.perl6.org: Highlight linked-to line number
17:17 Geth ¦ modules.perl6.org:
17:17 Geth ¦ modules.perl6.org: Off-hand don't see a way to highlight the line of code itself
17:17 Geth ¦ modules.perl6.org: as well.
17:17 Geth ¦ modules.perl6.org: review: https://github.com/perl6/modules.perl6.org/commit/f65dc13c6a
17:19 virtualsue joined #perl6
17:20 lizmat new on HN, old on perl6maven: https://news.ycombinator.com/item?id=15507307
17:20 [Coke] HoboWithAShotgun: I'm not sure that question makes sense; aren't dynamic variables lexically scoped?
17:21 [Coke] Do you want an our scoped package variable?
17:21 mcmillhj joined #perl6
17:21 El_Che I didn't know gabor had a perl6 ssite
17:21 El_Che site
17:22 lizmat has had one for a *looong* time
17:22 [Coke] even before the bailador book that's in progress.
17:22 El_Che aka "instructions: 1. Install Parrot"
17:22 HoboWithAShotgun what i want is to use Test::Meta, for what i am doing it has a wrong idea (i think) about the $*DIST-DIR
17:22 HoboWithAShotgun see, here: https://github.com/jonathanstowe/Test-META/blob/master/lib/Test/META.pm, line 258
17:23 scovit I get this error randomly: Too few positionals passed to ''; expected 3 arguments but got 1   in any bind_sig at /prefix/share/nqp/lib/Perl6/BOOTSTRAP.moarvm ... does it rings you any bells?
17:24 scovit This is Rakudo version 2017.09 built on MoarVM version 2017.09.1
17:25 [Coke] HoboWithAShotgun: seems like you'd set $*DIST-DIR, then invoke it, and it would use the value you had set. Are you not seeing that?
17:25 [Coke] (also, you can link to github source including a line number; click on the line, the URL changes0
17:26 HoboWithAShotgun having read up on what dynamic variables are, i now see that :)
17:26 [Coke] cool
17:33 HoboWithAShotgun m: my $*x = 1; sub foo { $*x = 1; }; foo; $*x.say
17:33 camelia rakudo-moar cf1673d9c: OUTPUT: «1␤»
17:33 HoboWithAShotgun m: my $*x = 1; sub foo { $*x = 2; }; foo; $*x.say
17:33 camelia rakudo-moar cf1673d9c: OUTPUT: «2␤»
17:38 imcsk8 joined #perl6
17:38 mcmillhj joined #perl6
17:42 callyalater m: my $*x = 1; say $*x; sub foo { my $*x = 2; say $*x; }; foo; say $*x; sub bar { $*x = 3; say $*x; }; bar; say $*x;
17:42 camelia rakudo-moar cf1673d9c: OUTPUT: «1␤2␤1␤3␤3␤»
17:51 ilbot3 joined #perl6
17:51 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
17:51 timotimo neat. the 1 through 5 buttons on this keyboard emit XF86Launch 5 through 9
17:52 timotimo i'll put the atomic icon on one of these %)
17:54 El_Che while I type mostly blind, not a fan of symbols-not-on-my-keyboard :)
17:55 timotimo this keyboard has an interesting "zoom slider" between the two halves (it's an ergonomic keyboard, that's why it's got two halves)
17:56 timotimo needs a little work to make that actally work, though
18:03 Rawriful joined #perl6
18:04 coverable6 joined #perl6
18:04 bloatable6 joined #perl6
18:04 quotable6 joined #perl6
18:04 evalable6 joined #perl6
18:04 mcmillhj joined #perl6
18:05 epony joined #perl6
18:06 rindolf joined #perl6
18:10 itaipu joined #perl6
18:11 AlexDaniel` joined #perl6
18:28 HoboWithAShotgun can i suppress uninitialized warnings? per scope would be nice
18:29 moritz quietly { ... }
18:29 masak but I would much recommend *fixing* them instead
18:29 HoboWithAShotgun other peoples code
18:29 AlexDaniel` same thing
18:29 * masak .oO( "I don't want to understand the problem, I just want to fix it!" )
18:30 HoboWithAShotgun No, I really don't care why Test::Meta throws warnings when there is no version key in the meta file
18:31 HoboWithAShotgun I just want it to be silent about it while I catch the error elsewhere
18:31 HoboWithAShotgun m: my $x = quitely { warn "argh"; 1; }; $x.say
18:31 camelia rakudo-moar cf1673d9c: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    quitely used at line 1␤␤»
18:32 evalable6 joined #perl6
18:32 HoboWithAShotgun m: my $x = quietely { warn "argh"; 1; }; $x.say
18:32 camelia rakudo-moar cf1673d9c: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤    quietely used at line 1␤␤»
18:32 HoboWithAShotgun m: my $x = quietly { warn "argh"; 1; }; $x.say
18:32 camelia rakudo-moar cf1673d9c: OUTPUT: «1␤»
18:32 HoboWithAShotgun sry, that's my dislexia :)
18:32 AlexDaniel` japhb: yeah, it installed just fine locally, therefore the question :) I guess there's no problem then
18:32 ryn1x joined #perl6
18:32 AlexDaniel` japhb: but let me know if there's something else
18:33 chakli joined #perl6
18:33 AlexDaniel` so I guess I'm running the toaster myself this time? Alright
18:35 cdg joined #perl6
18:40 perlpilot m: quietly quietly { CATCH { use MONKEY; } }   # so close!
18:40 camelia rakudo-moar cf1673d9c: ( no output )
18:42 as_ joined #perl6
18:43 as_ Hi guys, can you tell if atomic operations are available in rakudo?
18:43 yoleaux 19 Sep 2017 00:17Z <perlawhirl> as_: re: Supplier -> https://6guts.wordpress.com/2015/12/05/getting-closer-to-christmas/
18:44 ryn1x joined #perl6
18:45 [Coke] as_: https://docs.perl6.org/type/atomicint ?
18:46 as_ yes but it does not work
18:46 as_ Undeclared routine:     atomic-fetch-inc used at line 12
18:46 [Coke] as_: what version of rakudo do you have>
18:46 as_ Bogus postfix $i⏏⚛++
18:46 [Coke] $ perl6 -v
18:46 as_ 2017.07
18:47 geekosaur atomic ops are very recent
18:47 [Coke] https://github.com/rakudo/rakudo/blob/nom/docs/ChangeLog
18:47 [Coke] they were added in 2017.08
18:47 as_ seeems i need to compile rakudo compiler
18:47 [Coke] https://github.com/rakudo/rakudo/blob/nom/docs/ChangeLog#L124
18:47 as_ thus not available in Star
18:48 [Coke] If you're using rakudo star, there might be a new one this month, but I find getting the latest monthly release is still worth it
18:48 as_ yes
18:48 as_ thanks :)
18:55 konsolebox joined #perl6
19:14 lostinfog joined #perl6
19:17 mr-foobar joined #perl6
19:17 chakli Hey guys I made a sceipt to sort images based on GPS info in exif tag
19:17 chakli https://github.com/hstejas/ImageSort
19:18 wamba joined #perl6
19:20 Zoffix joined #perl6
19:20 Zoffix as_, we have packages with recent compilers for several distros:
19:20 Zoffix huggable: debs
19:20 huggable Zoffix, CentOS, Debian, Fedora and Ubuntu Rakudo packages: https://github.com/nxadm/rakudo-pkg/releases
19:20 Zoffix chakli: sweet \o/
19:21 moritz chakli: nice!
19:22 chakli It uses inline perl5 and is around 100 lines :) my first perl script thats practical
19:22 Zoffix \o/
19:24 cognominal joined #perl6
19:26 Zoffix left #perl6
19:27 moritz my last non-trivial, practical Perl 6 script was this: https://gist.github.com/moritz/8cd941011b5a947e5401ce23fe279e84
19:38 masak last, or latest? :)
19:39 * masak loves inner subroutines
19:42 mson joined #perl6
19:42 moritz latest
19:42 moritz yes, they are very handy
19:49 HoboWithAShotgun m: my $x = "hello" but False; my $y = $x; $y.say if $y;
19:49 camelia rakudo-moar cf1673d9c: ( no output )
19:50 HoboWithAShotgun so, that flag is sticky. how do i un-but it?
19:52 moritz m: my $x = "hello" but False; my $y = "$x"; say so $y
19:52 camelia rakudo-moar f980cdafe: OUTPUT: «False␤»
19:52 moritz m: my $x = "hello" but False; my $y = $x.Str; say so $y
19:52 camelia rakudo-moar f980cdafe: OUTPUT: «False␤»
19:52 moritz wow
19:52 moritz m: my $x = "hello" but False; my $y = $x but True; say so $y
19:52 camelia rakudo-moar f980cdafe: OUTPUT: «True␤»
19:52 moritz m: my $x = "hello" but False; my $y = Str.new($x); say so $y
19:52 camelia rakudo-moar f980cdafe: OUTPUT: «Default constructor for 'Str' only takes named arguments␤  in block <unit> at <tmp> line 1␤␤»
20:03 espadrine joined #perl6
20:08 cdg joined #perl6
20:11 telex joined #perl6
20:15 cdg_ joined #perl6
20:20 mcmillhj joined #perl6
20:20 Rawriful joined #perl6
20:22 mempko joined #perl6
20:22 Rawriful joined #perl6
20:26 bdmatatu joined #perl6
20:30 ryn1x joined #perl6
20:55 niceperl joined #perl6
20:55 callyalater m: my $a = "a" ~ 0x304.chr; say $a; say $a.codes; say $a.NFD.codes;
20:55 camelia rakudo-moar f980cdafe: OUTPUT: «ā␤1␤2␤»
20:58 callyalater m: my $a = "a" ~ 0x304.chr; say $a; say $a.codes; say $a.NFD.codes; .say for $a.NFD.list;
20:58 camelia rakudo-moar f980cdafe: OUTPUT: «ā␤1␤2␤97␤772␤»
20:59 callyalater m: say 0x304;
20:59 camelia rakudo-moar f980cdafe: OUTPUT: «772␤»
21:06 k_89 joined #perl6
21:09 chakli joined #perl6
21:17 grumble joined #perl6
21:17 mcmillhj joined #perl6
21:32 xi- joined #perl6
21:37 MasterDuke joined #perl6
21:47 xi- joined #perl6
21:47 timotimo oh i hadn't seen "machine learning in perl 6" yet
21:48 timotimo holy crap what happened to the microphone in the beginning
21:49 timotimo m: say Str.new
21:49 camelia rakudo-moar ee3f0f4fb: OUTPUT: «␤»
21:50 xi- joined #perl6
21:51 HoboWithAShotgun you know, at first it was totally weird looking at symbold with hyphens
21:52 Zoffix joined #perl6
21:52 HoboWithAShotgun now it feels completely natural and it's probably what i'll miss most when using another language
21:52 timotimo sorry about that :)
21:53 Zoffix HoboWithAShotgun: it's not a "flag". You're cloning the object and mixing in `role { method Bool { False } }` into the Str object.
21:53 timotimo m: say ("Hello" but False).^name
21:53 camelia rakudo-moar ee3f0f4fb: OUTPUT: «Str+{<anon|71828256>}␤»
21:53 timotimo it creates a new class for you
21:54 Zoffix HoboWithAShotgun: so to unbut it, you could mixin the same method again, with a different value
21:54 Zoffix m: my $x = "hello" but False; my $y = $x but True; $y.say if $y;
21:54 camelia rakudo-moar ee3f0f4fb: OUTPUT: «hello␤»
21:54 Zoffix Or extract the value from original:
21:54 Zoffix m: my $x = "hello" but False; my $y = "$x"; $y.say if $y;
21:54 camelia rakudo-moar ee3f0f4fb: ( no output )
21:54 Zoffix m: my $x = "hello" but False; my $y = ''~$x; $y.say if $y;
21:54 camelia rakudo-moar ee3f0f4fb: OUTPUT: «hello␤»
21:55 Zoffix m: my $x = "hello" but False; my $y = Str.new: :value($x); $y.say if $y;
21:55 camelia rakudo-moar ee3f0f4fb: OUTPUT: «hello␤»
21:55 Zoffix You can `but` a role; if it's not a role, it shorcuts to mixing in a role with method $thing-you're-butting.^name that returns $thing-you're-butting
21:56 Zoffix m: say my $thing-you're-butting = 42; # quotes are also nice in identifiers :)
21:56 camelia rakudo-moar ee3f0f4fb: OUTPUT: «42␤»
21:56 lizmat joined #perl6
21:56 timotimo m: sub the-so-called'foo'function() { }
21:56 camelia rakudo-moar ee3f0f4fb: ( no output )
21:57 mienaikage joined #perl6
22:03 callyalater Is there a way to prevent string normalization for input? ie. If a string was input as two distinct codepoints, can you prevent perl6 from converting it to its precomposed form?
22:04 timotimo utf8-c8 encoding is supposed to help with that - at least it roundtrips stuff
22:05 timotimo m: say Uni.new(0x0061, 0x0308).decode('utf8-c8').perl.say
22:05 camelia rakudo-moar ee3f0f4fb: OUTPUT: «No such method 'decode' for invocant of type 'Uni'␤  in block <unit> at <tmp> line 1␤␤»
22:05 timotimo er, yeah
22:05 timotimo m: Buf.new(0xc3, 0xa4).decode('utf8-c8').perl.say
22:05 camelia rakudo-moar ee3f0f4fb: OUTPUT: «"ä"␤»
22:06 timotimo m: Buf.new(0xc3, 0xa4).decode('utf8-c8').encode('utf8-c8').perl.say
22:06 camelia rakudo-moar ee3f0f4fb: OUTPUT: «Blob[uint8].new(195,164)␤»
22:06 timotimo m: say 0xc3, " ", 0xa4
22:06 camelia rakudo-moar ee3f0f4fb: OUTPUT: «195 164␤»
22:06 timotimo m: Buf.new(0xc3, 0xa4).decode('utf8').encode('utf8').perl.say
22:06 camelia rakudo-moar ee3f0f4fb: OUTPUT: «utf8.new(195,164)␤»
22:06 timotimo oh, huh
22:06 timotimo that's actually the composed representation i got there
22:07 timotimo m: Buf.new(0xc4, 0x4).decode('utf8-c8').encode('utf8-c8').perl.say
22:07 camelia rakudo-moar ee3f0f4fb: OUTPUT: «Blob[uint8].new(196,4)␤»
22:07 timotimo oops
22:07 timotimo m: Buf.new(0xc4, 0x9d).decode('utf8-c8').encode('utf8-c8').perl.say
22:07 camelia rakudo-moar ee3f0f4fb: OUTPUT: «Blob[uint8].new(196,157)␤»
22:07 timotimo m: Buf.new(0xc4, 0x9d).decode('utf8').encode('utf8').perl.say
22:07 camelia rakudo-moar ee3f0f4fb: OUTPUT: «utf8.new(196,157)␤»
22:07 timotimo wait, that doesn't exist as a precomposed character in the first place
22:07 timotimo ...
22:10 PMortens_logOnly joined #perl6
22:19 callyalater m: Buf.new(0x65, 0x304).decode('utf8').encode('utf8').perl.say
22:19 camelia rakudo-moar ee3f0f4fb: OUTPUT: «utf8.new(101,4)␤»
22:24 Zoffix m: Buf.new(0x65, 0x304).decode("utf8-c8").NFD.say
22:24 camelia rakudo-moar ee3f0f4fb: OUTPUT: «NFD:0x<0065 0004>␤»
22:25 Zoffix callyalater: that might be it. I recall a discussion a while back that there's currently no convenient way to avoid normalization and still using strings. It's something with `Uni` that still needs to be implemented or soemthing
22:26 callyalater Zoffix: Thank you.
22:27 timotimo aye, getting from a Buf that has utf8 bytes in it to a Uni that has the corresponding unicode codepoints but without doing normalization to NFG, that's what's missing
22:31 ChoHag joined #perl6
22:31 HoboWithAShotgun how do i die without a stak trace?
22:32 Zoffix eco: die
22:32 buggable Zoffix, Die 'Perl 5 like die routine for note + exit': https://github.com/zoffixznet/perl6-Die
22:32 * gfldex imagines a gravestone with a stacktrace
22:32 Zoffix HoboWithAShotgun: note "meows" and exit 42
22:32 Zoffix c: note "meows" and exit 42
22:32 committable6 Zoffix, ¦note: «Cannot find this revision (did you mean “Bend”?)»
22:32 Zoffix c: HEAD note "meows" and exit 42
22:32 committable6 Zoffix, ¦HEAD(ee3f0f4): «meows «exit code = 42»»
22:33 PMortens_logOnly joined #perl6
22:33 HoboWithAShotgun uh, nice
22:35 ryn1x joined #perl6
22:36 tadzik joined #perl6
22:36 AlexDaniel joined #perl6
22:36 mack[m] joined #perl6
22:36 CIAvash[m] joined #perl6
22:36 tyil[m] joined #perl6
22:36 unclechu joined #perl6
22:36 M-Illandan joined #perl6
22:36 wictory[m] joined #perl6
22:36 wamba[m] joined #perl6
22:36 Matthew[m] joined #perl6
22:36 Garland_g[m] joined #perl6
22:36 ilmari[m] joined #perl6
22:36 xui_nya[m] joined #perl6
22:39 callyalater left #perl6
22:50 alanhaggai joined #perl6
22:52 callyalater joined #perl6
22:52 callyalater left #perl6
23:13 Cabanossi joined #perl6
23:23 pilne joined #perl6
23:27 troys joined #perl6
23:43 Geth ¦ doc/in-buffer: 3360de986d | (Zoffix Znet)++ | 2 files
23:43 Geth ¦ doc/in-buffer: Document handle buffering
23:43 Geth ¦ doc/in-buffer:
23:43 Geth ¦ doc/in-buffer: - :buffer remains under the hood, deprecated for 3 releases
23:43 Geth ¦ doc/in-buffer: - :buffer is now :out-buffer, tweaking output buffer
23:43 Geth ¦ doc/in-buffer: - :in-buffer lets tweak input buffer
23:43 Geth ¦ doc/in-buffer:
23:43 Geth ¦ doc/in-buffer: Impl: https://github.com/rakudo/rakudo/commit/f9c10c2145
23:43 Geth ¦ doc/in-buffer: <…commit message has 6 more lines…>
23:43 Geth ¦ doc/in-buffer: review: https://github.com/perl6/doc/commit/3360de986d
23:43 Geth ¦ doc: zoffixznet++ created pull request #1615: Document handle buffering
23:43 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1615
23:43 Geth ¦ doc: 42a563d922 | (Zoffix Znet)++ (committed using GitHub Web editor) | 2 files
23:43 Geth ¦ doc: Document handle buffering (#1615)
23:43 Geth ¦ doc:
23:43 Geth ¦ doc: - :buffer remains under the hood, deprecated for 3 releases
23:43 Geth ¦ doc: - :buffer is now :out-buffer, tweaking output buffer
23:43 Geth ¦ doc: - :in-buffer lets tweak input buffer
23:43 Geth ¦ doc:
23:43 Geth ¦ doc: Impl: https://github.com/rakudo/rakudo/commit/f9c10c2145
23:43 Geth ¦ doc: <…commit message has 6 more lines…>
23:43 Geth ¦ doc: review: https://github.com/perl6/doc/commit/42a563d922
23:44 travis-ci joined #perl6
23:44 travis-ci Doc build errored. Zoffix Znet 'Document handle buffering
23:44 travis-ci https://travis-ci.org/perl6/doc/builds/290240745 https://github.com/perl6/doc/compare/52a793b3ff28...3360de986d94
23:44 buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
23:44 travis-ci left #perl6
23:45 Zoffix (benign; it's just 'cause I merged and deletd the branch before it cloned it)
23:46 ChoHag joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo