»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
Geth doc/in-buffer: 52a793b3ff | (Zoffix Znet)++ | 2 files
Document handle buffering

  - :buffer remains under the hood, deprecated for 3 releases
  - :buffer is now :out-buffer, tweaking output buffer
  - :in-buffer lets tweak input buffer
Impl: github.com/rakudo/rakudo/commit/f9c10c2145
   github.com/rakudo/rakudo/commit/3fcd74abf0
Spec: github.com/perl6/roast/commit/1a7b5f6130
   github.com/perl6/roast/commit/a99c1d5ae1
00:01
travis-ci Doc build passed. Zoffix Znet 'Document handle buffering 00:26
travis-ci.org/perl6/doc/builds/289750016 github.com/perl6/doc/commit/52a793b3ff28
ryn1x Has anyone read Perl 6 Deep Dive yet? Any opinions on it? 01:34
gfldex if you .to-json a WhateverCode, what would you expect? 09:13
or any Code for that matter 09:14
moritz ryn1x: i've skimmed a few chapters. Looks decent. 09:18
quite a different style than my own writing :)
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:12
before her talk a room of ~100 had about 5% who heard of perl 6, after 100% 10:13
DrForr 5% is impressive as it is. 10:14
tyil go is the less powerful version of perl 6 made by google right
stmuk_ a little careful promption in other language communities (with no enegative attacks) might be good advocacy 10:15
stmuk_ tyil: Go is more like a modern version of C in the same way Perl is a modern version of Awk :) 10:16
tyil: different tools for different tasks
virtualsue I only had one slightly trollish question too. Which I treated as funny. 10:30
moritz virtualsue++ 10:39
DrForr Is the tweet available for me to boost? 10:41
moritz or for @perl6org to retweet :) 10:43
stmuk_ twitter.com/francesc/status/920359302728245249 10:48
the example code is likely to look different by the time it gets to the Barcelona Perl Workshop 10:49
DrForr RT'd. 10:50
moritz too
stmuk_ Also interesting that Workshop has some Elixir too 10:51
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
HoboWithAShotgun but the author is reluctant, says he doesnt think that's neccessary
what do i do?
DrForr We just had a talk about Elixir here at GoodData, looked interesting. 10:53
moritz HoboWithAShotgun: make it an option?
stmuk_ virtualsue: @promises.push :P 10:54
moritz fwiw I'm not using mi6 right now because it overwrites my hand-crafted README
virtualsue yeah yeah
HoboWithAShotgun moritz: there is an ini file where you can specify in which file too read the pod for the readme from 10:55
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
but as i said, the author doesn't see the value behind that change
now should i try to convince him, or just fork and make my own mi7 10:58
i'm terrible with humans :-/
moritz or you contribute a functionality of your liking to ddt 11:00
github.com/kalkin/Ddt
HoboWithAShotgun well, what i like about mi6 is, that i don't have to interact with fricking PAUSE 11:06
i fixed an outstanding issue with one of my P5 modules last night and it's still as horrible as i remembered it
virtualsue :-) 11:07
Grimy p6: $_ = 1e-1 + 2e-1; 3e-1; say $_ == 3e-1; 11:52
camelia WARNINGS for <tmp>:
True
Useless use of constant floating-point number 0.3 in sink context (line 1)
Grimy p6: $_ = 1e-1 + 2e-1; 0.3e0; say $_ == 3e-1 11:53
camelia WARNINGS for <tmp>:
False
Useless use of constant floating-point number 0.3 in sink context (line 1)
Grimy This seems like a bug. If the use is useless, why does it change the result of the following comparison?
awwaiid Cool talk on notation by Guy Steele given at Clojure/conj 2017 last week, www.youtube.com/watch?time_continu...CuZkaaou0Q . Talks about regex, bnf, ellipses, parens, overbars. (TimToady) 11:55
raschipi m: $_ = 1e-1 + 2e-1; 3e-1; say $_ 11:57
camelia WARNINGS for <tmp>:
0.3
Useless use of constant floating-point number 0.3 in sink context (line 1)
raschipi m: $_ = 1e-1 + 2e-1; 0.3e0; say $_
camelia WARNINGS for <tmp>:
0.3
Useless use of constant floating-point number 0.3 in sink context (line 1)
raschipi m: $_ = 1e-1 + 2e-1; 3e-1; say $_.^name
camelia WARNINGS for <tmp>:
Num
Useless use of constant floating-point number 0.3 in sink context (line 1)
raschipi m: $_ = 1e-1 + 2e-1; 0.3e0; say $_.^name
camelia WARNINGS for <tmp>:
Num
Useless use of constant floating-point number 0.3 in sink context (line 1)
raschipi m: $_ = 1e-1 + 2e-1; 3e-1; say $_ == 3e-1;
camelia WARNINGS for <tmp>:
True
Useless use of constant floating-point number 0.3 in sink context (line 1)
raschipi m: $_ = 1e-1 + 2e-1; 0.3e0; say $_ == 3e-1 11:58
camelia WARNINGS for <tmp>:
False
Useless use of constant floating-point number 0.3 in sink context (line 1)
geekosaur wonders what that does with spesh disabled
(thinking leaky fp state + general ieee weirdness)
HoboWithAShotgun prepares the same path for Ddt 12:01
*patch.
Turns out, it's the same code. Looks like Ddt once was a mi6 fork 12:02
bitrauser Good afternoon everyone 12:03
raschipi good morning
[Coke] retroactively waves at masak. 12:40
wictory[m] Hi! Does anybody here know whether CArray is null terminated? 12:43
[Coke] Happy Diwali, folks. 12:45
moritz wictory[m]: I think it's not
[Coke] (I know it's not *our* Diwali)
wictory[m] moritz: hmm .. I guess it pretty difficult to get it null terminated then. 12:46
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
Maybe you can use a type object instead 12:49
wictory[m] aah, Str:U is the null c string
(they are c-strings)
wictory[m] * with some definition of is :) 12:50
araraloren Do you mean a special value as the terminator, like the \0 of string ? 12:52
Geth doc: 1322c386d8 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/tables.pod6
clarify effect of bounding column separators
12:53
synopsebot Link: doc.perl6.org/language/tables
wictory[m] no, I want an array of c-strings, where the array is terminated by NULL
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
wictory[m] (the c-strings are terminated by \0 too, but thats fixed by Str)
[Coke] tbrowder: You have an extra a in that last commit.
araraloren yeah, that's what I mean ,you can put Str as the last element 12:55
NULL is only use for the terminator of C-string
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
remove spurious a
wictory[m] I found it in the docs now
tyil tbrowder++ 12:57
HoboWithAShotgun moritz: I filed the same patch for Ddt. ( github.com/kalkin/Ddt/pull/6 )
tbrowder [Coke]: wow, you have good (and fast) vision! 12:58
HoboWithAShotgun grabs some gear and goes off to measure c in the area around Coke 12:59
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:05
raschipi to treat a string as code, you need to eval it. 13:08
moritz s:g[\$ (\w+)] = $::(~$0);
to first approximation 13:09
araraloren great advice 13:10
perlpilot HoboWithAShotgun: though, you still might want to reevaluate why you want this :) 13:11
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
ish 13:13
a symbol lookup
araraloren docs.perl6.org/language/packages#i...3A_package
moritz (could be lexpad, which is a kind of symbol table, we tend to not call it that)
Geth doc: bdbcdfdc26 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/tables.pod6
explain effects of empty cells and short rows
13:15
synopsebot Link: doc.perl6.org/language/tables
ilmari the "Control Flow" link on docs.perl6.org/syntax/quietly has a broken fragment: docs.perl6.org/language/control#Flow%29_quietly 13:52
should just be #quietly
moritz look like a linkgen bug 14:00
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
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, ...
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
you can easily build domain-specific-languages from simple subroutine-based stuff all the way to fully new syntax (think JSX)
oh, and we have the best support for unicode 14:48
rivaled only by Swift, i hear
ridthyself oh my
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?
timotimo that's right
our FFI support for C, C++, and friends is also world-class 14:50
do you want to hear some drawbacks? :)
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
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
ridthyself not that that matters most of the time on modern equipment, but i imagine it's not for IOT
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
if you're building your own IOT devices, you may have to get a bit more RAM to run big perl6 programs
you'll have to have a device with a full operating system, for one
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:54
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
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
HoboWithAShotgun i have multi sub find-dist-files($file where $file.IO.e = "MANIFEST") but that seems like a hack
ridthyself can perl6 be compiled? or does it only run with an interpreter 14:57
moritz HoboWithAShotgun: have you tried where *.IO.e ?
timotimo perl6 modules are compiled to bytecode, but it still requires the runtime
HoboWithAShotgun the Perl 6 compiler will be ready on easter ridthyself :)
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
ridthyself what year?
oh.
ridthyself :) 14:57
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
timotimo hm, you probably can. i haven't tried, though 14:59
Ulti I seem to recall giving it a go
HoboWithAShotgun i think the current way of distributing perl6 apps is docker, no?
timotimo then you're ahead of me :)
moritz m: sub f('MANIFEST' where { .IO.e. }) { }; f('MANIFEST') 14:59
camelia 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')
moritz m: sub f('MANIFEST' where { .IO.e }) { }; f('MANIFEST')
camelia 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')
moritz oh 15:00
I see
timotimo since 'MANIFEST' there is already compiled as if it were Str $ where "MANIFEST", you can just add that to the constraint, no?
moritz subset MANIFEST of Str where { $_ eq 'MANIFEST' and .IO.e };
but, IMHO, doing .IO inside a type constraint is confusing as hell 15:01
rather do something like
araraloren Does Perl6 will change name to 6lang ? I have heard that
moritz m: sub f('MANIFEST') { PRE 'MANIFEST'.IO.e; }; f 'MANIFEST'
camelia Precondition ''MANIFEST'.IO.e' failed
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
moritz araraloren: I hope not
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.
araraloren oh 15:03
araraloren yeah, I agree Perl6 would give somebody impression you know the "Perl" code 15:04
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
HoboWithAShotgun i assume the latter 15:09
ridthyself i like psix (pronounced siks) 15:10
(just read up on it)
araraloren There is a tool can generate it for you. HoboWithAShotgun
Mi6
HoboWithAShotgun That's the point. Mi6 does it wrong 15:11
it just puts everything in the tld of the tarball
araraloren 6lang is sound great too, in china, 6 is something mean "everything is going smoothly" 15:12
or powerful
HoboWithAShotgun and the PAUSE instructions say it sub ust go must go into something.tgz/Perl6
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?
raschipi araraloren: 6lang won't work because identifiers can't start with digits. 15:18
araraloren oh, so said :( ok, time to go to bed 15:19
bye
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:22
timotimo you can use /repo/NameOfModule on modules.perl6.org 15:24
(even though i consider that a bug)
raschipi zoffix, can modules.perl6.org include links to CPAN?
HoboWithAShotgun that redirects me to github 15:26
raschipi which module are you trying to get?
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
moritz HoboWithAShotgun: Pause offers the option to upload files into subdirectories
HoboWithAShotgun Oh# 15:28
moritz there's a text field for the subdir
HoboWithAShotgun *facepalm*
tyil it has to be in Perl6
not any lower dir, not in the root dir, just Perl6
timotimo oh, then that particular bug has been fixed 15:29
huh? 15:30
modules.perl6.org/repo/JSON::FastHoboWithAShotgun
this one gives the tarball from cpan
Geth doc: 5decac63f6 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/tables.pod6
add note about efficiency
15:31
synopsebot Link: doc.perl6.org/language/tables
Geth modules.perl6.org: 3fdf9ea779 | (Zoffix Znet)++ | bin/build-project-list.pl
Remove mention of --interval option
15:42
Geth modules.perl6.org: fe6f22d0ba | (Zoffix Znet)++ | lib/ModulesPerl6/Controller/Dist.pm
Fix Infiniloop on Dist Disambiguation page

Cludge for #89
15:48
HoboWithAShotgun m: my @maybe = 1,2,3,4; my @no = 2,3; say @maybe.grep( * ∉ @no ); 15:50
camelia (1 4)
Geth modules.perl6.org: efe6024641 | (Zoffix Znet)++ | lib/ModulesPerl6/Controller/Dist.pm
Fix incorrect definedness map

Part of #89
15:52
modules.perl6.org: 2a535de504 | (Zoffix Znet)++ | lib/ModulesPerl6/Controller/Dist.pm
Fix (for real?) infiniloop in dist ambig page

Third time's the charm
15:55
Zoffix raschipi: yeah, the /repo/ endpoint directs to CPAN dist archave 15:57
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
timotimo so maybe /source/ for the "other" thing? 15:58
Zoffix timotimo: I think just make /repo/ do repos and /dist-source/ for current behaviour 15:59
timotimo: is there a "specced" META key that'd contain the git repo for CPAN dists?
timotimo i thought the one we're currently using is the right one? 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:02
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
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:04
japhb Is virtualsue's talk from twitter.com/francesc/status/920359302728245249 online anywhere? 16:05
hyu hello 16:16
pidory
bless me epta
p6: say 3; 16:17
camelia 3
hyu p6: say suka;
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
suka used at line 1
hyu p6: say 'suka'; 16:17
camelia suka
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.
hyu \me hh
hyu hhh 16:18
scovit what is the most idiomatic way to express "retry on failure" ?
scovit I sometimes end up with things like this { doit CATCH { doit } } 16:18
ideally it would be nice to say retry an infinite amount of time, or at least N times
hyu нихуя себе 16:19
у вас есть трай кетч
пиздец!
jnthn ... 16:20
jnthn scovit: loop { doit(); last; CATCH { default {} } } or some such 16:21
scovit: Or factor that out into a retry sub :) 16:22
Zoffix heh
tyil jnthn: would you need a redo in the default block?
Zoffix We getting popular, I guess? :)
tyil probably not, since the loop just ends and implicitly redoes then
jnthn Zoffix: It's the first time I've seen a language be insulted for having try/catch :P 16:23
Zoffix Yeah lol :)
scovit jnthn the loop seems fine! 16:24
jnthn tyil: No, since it's already a loop
Catching an exception in a loop block handles it and continues the loop
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 metacpan.org/pod/Try::Tiny::Retry in Perl 6. Or even just something that does `retry { } :5times`
Zoffix virtualsue: "трай кетч" is russified "try CATCH"
tyil we need a slang so I can use that instead of the boring plain try CATCH keywords 16:29
with пиздец as the throw keyword
Zoffix m: my &пиздец = &die; пиздец "Not implemented" 16:30
camelia Not implemented
in block <unit> at <tmp> line 1
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
Zoffix m: sub doit { say "doing"; die unless ++$ > 2; }; {doit} ...^ !*
camelia 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
scovit perlpilot: it is just that I am using an api which fails on a regular bases due to random network timeouts
timotimo a try with :times would probably require a slang 16:33
perlpilot yeah, that's why I was leaning towards a "retry" keyword. You could at least prototype it in module-land 16:34
timotimo fwiw, just replacing the loop in jnthn's example with "for ^5" would also do that 16:35
though it'd want to have something to make that the return value, too ...
"that" being "the result of doit() if it's successful"
Zoffix m: sub doit { say "doing"; die unless ++$ > 2; 42 }; (try doit) orelse redo for ^* 16:37
camelia doing
doing
doing
Zoffix wtf 16:39
m: sub doit { say "doing"; die unless ++$ > 2; 42 }; loop {doit; CATCH {redo}}
camelia (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…
Zoffix m: sub doit { say "doing"; die unless ++$ > 2; 42 }; for ^* {doit; CATCH {redo}}
camelia doing
doing
doing
japhb virtualsue: Ah, OK. Will look forward to it in ~ a month then. :-)
ilmari doing rhymes with boing 16:40
Zoffix Why do the two differ? 16:40
m: for ^* {say "doit"} 16:41
camelia doit
virtualsue The p6 code is likely to be rather better the next time :)
Zoffix Oh it's freaking whatever code, not an ^Inf
m: sub doit { say "doing"; die unless ++$ > 2; 42 }; for (^*)(Inf) {doit; CATCH {redo}} 16:42
camelia (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
Zoffix ZofBot: camelia not doing allah is doing
ZofBot Zoffix, Call it my fear That keeps you in the house and not your own
timotimo m: sub doit { say "doing $(++$)"; die unless ++$ > 2; 42; }; loop { doit; CATCH { redo } } 16:43
camelia (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…
timotimo m)
there's no "last" in there
m: sub doit { say "doing $(++$)"; die unless ++$ > 2; 42; }; loop { doit; last; CATCH { redo } }
camelia doing 1
doing 2
doing 3
mst doing is the noise those springy doorstopper things make when you flick them 16:44
ilmari: agreed?
ilmari yep
doioioiongggg
if you flick them hard enough 16:45
timotimo i never had one of this kind
ilmari media.giphy.com/media/jVg9wgGrvu9QA/giphy.gif 16:46
ugexe jnthn.net/papers/2017-perl6-concurrency-pcp.pdf page 62 (A retry mechanism) 16:56
timotimo that's for supply-based (or react-based) things 17:06
HoboWithAShotgun how do i access a global dynamic variable in another package? $*Foo::Variable; doesn't work 17:13
Geth modules.perl6.org: f65dc13c6a | (Zoffix Znet)++ | assets/sass/main.scss
Highlight linked-to line number

Off-hand don't see a way to highlight the line of code itself as well.
17:17
lizmat new on HN, old on perl6maven: news.ycombinator.com/item?id=15507307 17:20
[Coke] HoboWithAShotgun: I'm not sure that question makes sense; aren't dynamic variables lexically scoped?
Do you want an our scoped package variable? 17:21
El_Che I didn't know gabor had a perl6 ssite 17:21
site
lizmat has had one for a *looong* time 17:22
[Coke] even before the bailador book that's in progress.
El_Che aka "instructions: 1. Install Parrot"
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
see, here: github.com/jonathanstowe/Test-META...t/META.pm, line 258
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:23
This is Rakudo version 2017.09 built on MoarVM version 2017.09.1 17:24
[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
(also, you can link to github source including a line number; click on the line, the URL changes0
HoboWithAShotgun having read up on what dynamic variables are, i now see that :) 17:26
[Coke] cool
HoboWithAShotgun m: my $*x = 1; sub foo { $*x = 1; }; foo; $*x.say 17:33
camelia 1
HoboWithAShotgun m: my $*x = 1; sub foo { $*x = 2; }; foo; $*x.say
camelia 2
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 1
2
1
3
3
timotimo neat. the 1 through 5 buttons on this keyboard emit XF86Launch 5 through 9 17:51
i'll put the atomic icon on one of these %) 17:52
El_Che while I type mostly blind, not a fan of symbols-not-on-my-keyboard :) 17:54
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:55
needs a little work to make that actally work, though 17:56
HoboWithAShotgun can i suppress uninitialized warnings? per scope would be nice 18:28
moritz quietly { ... } 18:29
masak but I would much recommend *fixing* them instead
HoboWithAShotgun other peoples code
AlexDaniel` same thing
masak .oO( "I don't want to understand the problem, I just want to fix it!" )
HoboWithAShotgun No, I really don't care why Test::Meta throws warnings when there is no version key in the meta file 18:30
I just want it to be silent about it while I catch the error elsewhere 18:31
m: my $x = quitely { warn "argh"; 1; }; $x.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
quitely used at line 1
18:31
HoboWithAShotgun m: my $x = quietely { warn "argh"; 1; }; $x.say 18:32
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
quietely used at line 1
HoboWithAShotgun m: my $x = quietly { warn "argh"; 1; }; $x.say
camelia 1
HoboWithAShotgun sry, that's my dislexia :)
AlexDaniel` japhb: yeah, it installed just fine locally, therefore the question :) I guess there's no problem then
AlexDaniel` japhb: but let me know if there's something else 18:32
AlexDaniel` so I guess I'm running the toaster myself this time? Alright 18:33
perlpilot m: quietly quietly { CATCH { use MONKEY; } } # so close! 18:40
camelia ( no output )
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 -> 6guts.wordpress.com/2015/12/05/get...christmas/
[Coke] as_: docs.perl6.org/type/atomicint ? 18:45
as_ yes but it does not work 18:46
Undeclared routine: atomic-fetch-inc used at line 12
[Coke] as_: what version of rakudo do you have>
as_ Bogus postfix $i⏏⚛++
[Coke] $ perl6 -v
as_ 2017.07
geekosaur atomic ops are very recent 18:47
[Coke] github.com/rakudo/rakudo/blob/nom/.../ChangeLog
they were added in 2017.08
as_ seeems i need to compile rakudo compiler
[Coke] github.com/rakudo/rakudo/blob/nom/...geLog#L124
as_ thus not available in Star
[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
thanks :)
chakli Hey guys I made a sceipt to sort images based on GPS info in exif tag 19:17
github.com/hstejas/ImageSort
Zoffix as_, we have packages with recent compilers for several distros: 19:20
huggable: debs
huggable Zoffix, CentOS, Debian, Fedora and Ubuntu Rakudo packages: github.com/nxadm/rakudo-pkg/releases
Zoffix chakli: sweet \o/
moritz chakli: nice! 19:21
chakli It uses inline perl5 and is around 100 lines :) my first perl script thats practical 19:22
Zoffix \o/
moritz my last non-trivial, practical Perl 6 script was this: gist.github.com/moritz/8cd941011b5...23fe279e84 19:27
masak last, or latest? :) 19:38
masak loves inner subroutines 19:39
moritz latest 19:42
yes, they are very handy
HoboWithAShotgun m: my $x = "hello" but False; my $y = $x; $y.say if $y; 19:49
camelia ( no output )
HoboWithAShotgun so, that flag is sticky. how do i un-but it? 19:50
moritz m: my $x = "hello" but False; my $y = "$x"; say so $y 19:52
camelia False
moritz m: my $x = "hello" but False; my $y = $x.Str; say so $y
camelia False
moritz wow
m: my $x = "hello" but False; my $y = $x but True; say so $y
camelia True
moritz m: my $x = "hello" but False; my $y = Str.new($x); say so $y
camelia Default constructor for 'Str' only takes named arguments
in block <unit> at <tmp> line 1
callyalater m: my $a = "a" ~ 0x304.chr; say $a; say $a.codes; say $a.NFD.codes; 20:55
camelia ā
1
2
callyalater m: my $a = "a" ~ 0x304.chr; say $a; say $a.codes; say $a.NFD.codes; .say for $a.NFD.list; 20:58
camelia ā
1
2
97
772
callyalater m: say 0x304; 20:59
camelia 772
timotimo oh i hadn't seen "machine learning in perl 6" yet 21:47
timotimo holy crap what happened to the microphone in the beginning 21:48
m: say Str.new 21:49
camelia
HoboWithAShotgun you know, at first it was totally weird looking at symbold with hyphens 21:51
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 :)
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
camelia Str+{<anon|71828256>}
timotimo it creates a new class for you
Zoffix HoboWithAShotgun: so to unbut it, you could mixin the same method again, with a different value 21:54
m: my $x = "hello" but False; my $y = $x but True; $y.say if $y;
camelia hello
Zoffix Or extract the value from original:
m: my $x = "hello" but False; my $y = "$x"; $y.say if $y;
camelia ( no output )
Zoffix m: my $x = "hello" but False; my $y = ''~$x; $y.say if $y;
camelia hello
Zoffix m: my $x = "hello" but False; my $y = Str.new: :value($x); $y.say if $y; 21:55
camelia hello
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
m: say my $thing-you're-butting = 42; # quotes are also nice in identifiers :) 21:56
camelia 42
timotimo m: sub the-so-called'foo'function() { } 21:56
camelia ( no output )
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:03
timotimo utf8-c8 encoding is supposed to help with that - at least it roundtrips stuff 22:04
timotimo m: say Uni.new(0x0061, 0x0308).decode('utf8-c8').perl.say 22:05
camelia No such method 'decode' for invocant of type 'Uni'
in block <unit> at <tmp> line 1
timotimo er, yeah
m: Buf.new(0xc3, 0xa4).decode('utf8-c8').perl.say
camelia "ä"
timotimo m: Buf.new(0xc3, 0xa4).decode('utf8-c8').encode('utf8-c8').perl.say 22:06
camelia Blob[uint8].new(195,164)
timotimo m: say 0xc3, " ", 0xa4
camelia 195 164
timotimo m: Buf.new(0xc3, 0xa4).decode('utf8').encode('utf8').perl.say
camelia utf8.new(195,164)
timotimo oh, huh
that's actually the composed representation i got there
m: Buf.new(0xc4, 0x4).decode('utf8-c8').encode('utf8-c8').perl.say 22:07
camelia Blob[uint8].new(196,4)
timotimo oops
m: Buf.new(0xc4, 0x9d).decode('utf8-c8').encode('utf8-c8').perl.say
camelia Blob[uint8].new(196,157)
timotimo m: Buf.new(0xc4, 0x9d).decode('utf8').encode('utf8').perl.say
camelia utf8.new(196,157)
timotimo wait, that doesn't exist as a precomposed character in the first place
...
callyalater m: Buf.new(0x65, 0x304).decode('utf8').encode('utf8').perl.say 22:19
camelia utf8.new(101,4)
Zoffix m: Buf.new(0x65, 0x304).decode("utf8-c8").NFD.say 22:24
camelia NFD:0x<0065 0004>
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:25
callyalater Zoffix: Thank you. 22:26
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:27
HoboWithAShotgun how do i die without a stak trace? 22:31
Zoffix eco: die 22:32
buggable Zoffix, Die 'Perl 5 like die routine for note + exit': github.com/zoffixznet/perl6-Die
gfldex imagines a gravestone with a stacktrace
Zoffix HoboWithAShotgun: note "meows" and exit 42
c: note "meows" and exit 42
committable6 Zoffix, ¦note: «Cannot find this revision (did you mean “Bend”?)»
Zoffix c: HEAD note "meows" and exit 42
committable6 Zoffix, ¦HEAD(ee3f0f4): «meows «exit code = 42»» 22:33
HoboWithAShotgun uh, nice 22:33
Geth doc/in-buffer: 3360de986d | (Zoffix Znet)++ | 2 files
Document handle buffering

  - :buffer remains under the hood, deprecated for 3 releases
  - :buffer is now :out-buffer, tweaking output buffer
  - :in-buffer lets tweak input buffer
Impl: github.com/rakudo/rakudo/commit/f9c10c2145 ... (6 more lines)
23:43
doc: zoffixznet++ created pull request #1615:
Document handle buffering
doc: 42a563d922 | (Zoffix Znet)++ (committed using GitHub Web editor) | 2 files
Document handle buffering (#1615)

  - :buffer remains under the hood, deprecated for 3 releases
  - :buffer is now :out-buffer, tweaking output buffer
  - :in-buffer lets tweak input buffer
Impl: github.com/rakudo/rakudo/commit/f9c10c2145 ... (6 more lines)
travis-ci Doc build errored. Zoffix Znet 'Document handle buffering 23:44
travis-ci.org/perl6/doc/builds/290240745 github.com/perl6/doc/compare/52a79...60de986d94
buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
Zoffix (benign; it's just 'cause I merged and deletd the branch before it cloned it) 23:45