Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-05-18

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:03 chris2 joined #perl6
00:06 |2701 joined #perl6
00:06 |2701 joined #perl6
00:17 mr-foobar joined #perl6
00:18 mspo http://facebook.github.io/re​ason/images/RtopOptCrop.gif
00:18 cdg joined #perl6
00:18 mspo pretty sweet repl
00:20 * Zoffix doesn't understand why everyone is so obsessed with repls :S
00:26 Xliff repl?
00:26 Xliff Zoffix: How is Doom 2016. I was thinking about getting it, but $60 is kinda high for a remake.
00:27 Zoffix Xliff, I love it. It's the perfect remake.
00:33 AlexDaniel yeah, well, just trying to install perl 6 into some specific directory is already an adventure
00:35 mspo put that directory in your path before you start
00:41 matiaslina joined #perl6
00:48 mr-foobar joined #perl6
00:51 Zoffix Nice: http://phys.org/news/2016-05-ibm-scien​tists-storage-memory-breakthrough.html
01:05 sortiz joined #perl6
01:06 Actualeyes joined #perl6
01:21 jcallen joined #perl6
01:23 Zoffix joined #perl6
01:25 Zoffix joined #perl6
01:26 pierre joined #perl6
01:35 hotel_california joined #perl6
01:42 Actualeyes joined #perl6
01:48 ilbot3 joined #perl6
01:48 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!
01:49 kid51 joined #perl6
01:50 BenGoldberg joined #perl6
01:52 willthechill joined #perl6
01:55 labster joined #perl6
01:56 labster m: say 1 == 1 ⁇ 'a' ‼ 'b'
01:56 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/4hja9P_RfE␤Confused␤at /tmp/4hja9P_RfE:1␤------> 3say 1 == 17⏏5 ⁇ 'a' ‼ 'b'␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        st…»
01:56 diakopter labster: hi
01:56 labster hi diakopter!
01:57 zakharyas joined #perl6
02:00 molaf joined #perl6
02:01 Possum joined #perl6
02:02 noganex_ joined #perl6
02:05 Zoffix .u '
02:05 yoleaux U+0027 APOSTROPHE [Po] (')
02:08 Zoffix m: say 1 == 1 ?? 'a' !! 'b'
02:08 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at /tmp/TfdB8rmQEs:1␤------> 3say7⏏5 1 == 1 ?? 'a' !! 'b'␤Bogus postfix␤at /tmp/TfdB8rmQEs:1␤------> 3say 7⏏51 == 1 ?? 'a' !! 'b'␤    expecting any of:␤        inf…»
02:14 mr-foobar joined #perl6
02:18 Zoffix Hm, I have a 5-day weekend coming up. What's more important/useful to spend it on: rewrite IRC::Client so it actually works. Write good MultiMarkdown parser. Learn C so I could write library bindings modules and [maybe someday] help out with MoarVM....
02:19 BenGoldberg joined #perl6
02:24 teatime Zoffix: Do you prefer MMD to Pandoc?
02:25 Zoffix teatime, never heard of Pandoc
02:25 teatime o rly?  look into it.  my personal favorite markup renderer / converter / parser.
02:25 teatime written in haskell, extensible in arbitrary languages.
02:27 teatime I have a feeling it would appeal to this demographic.
02:28 Zoffix teatime, am I looking at the wrong thing? I see an utility for converting from format X to Y: http://pandoc.org/README.html
02:28 teatime That's correct, that's what it is.
02:28 Zoffix So I'm unsure how a program compares to document format :D
02:29 teatime Y can be PDF, HTML, man pages, etc.
02:29 teatime Zoffix: Well, it implements a number of (optionally-enabled) extensions to Markdown
02:29 Zoffix But what is X? Is there a special Pandoc language that's superior to MultiMarkdown?
02:29 teatime Pandoc Markdown
02:29 teatime and I don't know if it's superior, but you can look and decide if you think it is.
02:30 teatime X can be classic Markdown, Github-Flavored Markdown, Pandoc Markdown, HTML, LaTeX, DocBook, etc.
02:32 teatime Zoffix: http://pandoc.org/diagram.jpg
02:32 labster Pandoc: 5 stars, would execute again
02:32 kid51 joined #perl6
02:32 labster That image is really only useful for the fractals
02:33 teatime Zoffix: http://pandoc.org/README.html#pandocs-markdown
02:37 cooper joined #perl6
02:39 Zoffix teatime, pass. (a) it seems to be overly married to that program, so ripping it out into a standalone module is more of a challenge (a.2) it's not a superset of Markdown and requires strict mode (set in the utility parsing it) to be compatible. (b) I'm not a fan of stuff like "<!-- end of list -->". (c) I never heard of it, while I heard of MultiMarkdown and in my biased universe that means MMD is more popular :) the +1 votes on metacpan.org for the
02:39 Zoffix two format corroborate that view.
02:39 Zoffix 😜
02:40 TEttinger you haven't heard of pandoc?
02:41 TEttinger I mean I've heard of MMD and Pandoc, but I don't consider them competing
02:41 TEttinger when was the last time MMD had or needed an update?
02:42 Zoffix TEttinger, no, never heard of it. And it was just presented to me as a superior alternative to MMD, hence my answer
02:43 TEttinger I mean, it is superior if you compare features :)
02:43 TEttinger since MMD is one of the things it allows you to convert
02:44 Zoffix I'm talking about the languages--Pandoc Markdown vs. Multi Markdown.
02:46 teatime lol, ok Zoffix, whatever works for you :)
02:47 aries_liuxueyang joined #perl6
02:48 teatime Zoffix: I can respond to your comments above, if you're interested; or if not, I'll leave you in peace :)
02:48 Zoffix teatime, sure, respond.
02:50 teatime Zoffix: ok.  Yes, I'm not aware of anything else that parses its Pandoc-specific markdown extensions, however Pandoc is a (complete, haskell) library, the executable is just a thin wrapper around that.  So provided you're willing to use / link to a haskell library, you have a a Pandoc library.  There are bindings for like, every language you'd probably want (except probably Perl6 :)
02:51 Zoffix Can we use haskell libraries from Perl 6?
02:52 * Zoffix never even seen haskell code, let alone know it
02:52 teatime Zoffix: it's setup as extensions you can turn on and off; it is very close to a superset of markdown, but it does fix some of the warts and ambiguities of markdown syntax, which sometimes makes it not a strict superset.  However if you adjust the enabled extensions, you may be able to make it much closer to or actually a strict superset; and if you're actually parsing another flavor of markdown, you would
02:52 teatime specify that so that it parses exactly that.
02:53 aborazmeh joined #perl6
02:53 teatime Zoffix: I have no idea what you're referring to when you say "<!-- end of list -->" ... the main reason I love Pandoc is how beautiful Pandoc markdown is when viewed as plain-text; or rather, that's why I like Markdown, and Pandoc markdown is just the flavor with the most features.
02:53 aborazmeh joined #perl6
02:54 teatime and finally, it's very well known and well regarded.
02:54 Zoffix Just spotted it in the docs where it says in some cases you have to include <!-- end of list --> after lists because otherwise the stuff that follows them gets incorrectly interpreted.
02:55 teatime the thing I thought might particularly appeal here, is that, the way it works, is it parses the input format into an AST, then compiles the AST to the output format; in between, you can insert your own (haskell/perl/lua/javascript/python/whatever) script to transform the AST in whatever way might be convenient for you
02:55 teatime Zoffix: I'd appreciate a link.  whatever case that is, it has definitely never come for me, nor anything equally ugly.
02:56 teatime The only actual significant difference I can really think of that actually happens often compared to other markdown syntaxes, is pandoc requires a blank line occassionally that others do not, and the reason is otherwise the spec is ambiguious.  but I'm pretty sure you can turn that off, although I prefer it anyway.
02:56 geekosaur wouldn't that only be for some intermixed html+other markup?
02:57 Zoffix teatime, it's on this page: http://rmarkdown.rstudio.com/auth​oring_pandoc_markdown.html#lists search for <!-- end of list -->
02:57 geekosaur which is DIHWIDT really
02:57 Zoffix teatime, and still, I've no idea how to use a haskell library from P6 :)
02:57 teatime geekosaur: not necessary, by default inline html is allowed.
02:57 kurahaupo joined #perl6
02:57 teatime Zoffix: I *think* it's like using a C library, but I dunno for sure.
02:57 geekosaur sure, it's allowed. it's also asking for trouble unless you stick to a fairly small subset
02:58 geekosaur and for Haskell from anything else, it's a bit harder than C unless they provide a C wrapper that deals with GHC runtime management for you (it might! I have not looked)
03:00 teatime Zoffix: fwiw, I cannot remember having to do this, although tbh I probably have.  any unindented content, including some text before the code block in the paragraph after the list, would serve the same function as the comment, though.
03:00 noganex joined #perl6
03:00 aries_liuxueyang joined #perl6
03:00 teatime geekosaur: argh, yeah I meant to correct myself, and say, I think pandoc essentially provides C bindings
03:01 teatime I would not expect haskell code in general to be quite as easy to link to from C, as C :)
03:01 geekosaur it's not actually that hard. mian issue is making calls to start up and shut down ghc's runtime
03:04 teatime it also makes calling it via e.g. system() from a program rather easy/painless, by having smart flags, and accepting an AST in e.g. JSON format as input and output, so actually, maybe a lot of things just use that
03:04 teatime and I was only assuming they linked to it
03:09 teatime that seems to be the case, and it does not provide C wrapper itself.
03:10 teatime oh, perfect... Zoffix:  final bit, this looks like exactly what I should have found for you originally:  https://github.com/jgm/pandoc​/wiki/Pandoc-vs-Multimarkdown
03:12 teatime oh, and I will mention: my personal favorite / killer feature, is the very complete/rich citation support.
03:13 ssotka joined #perl6
03:13 Zoffix Even that page's comparison treats Pandoc as married to the utility that handles it :)
03:14 teatime yes; that does seem to be a true fact, unless, I guess, you're writing your app in Haskell :)
03:16 Zoffix And this looks to be a C wrapper, but in the context of having a Perl 6 module this adds quite uncomfortable list of prerequisites: https://github.com/ShabbyX/libpandoc
03:17 dalek doc: a52bd24 | (Daniel Green)++ | doc/Type/Range.pod:
03:17 dalek doc: Fixed some typos in Range.pod
03:17 dalek doc: review: https://github.com/perl6/doc/commit/a52bd2418a
03:17 dalek doc: 5b11c47 | (Zoffix Znet)++ | doc/Type/Range.pod:
03:17 dalek doc: Merge pull request #521 from MasterDuke17/master
03:17 dalek doc:
03:17 dalek doc: Fixed some typos in Range.pod
03:17 dalek doc: review: https://github.com/perl6/doc/commit/5b11c47f4c
03:17 teatime aye, saw it, but was concerned about whether it was maintained actively enough
03:18 Zoffix I think I'll go with fixing IRC::Client. 'cause huggable uses it and I'm sick of restarting her daily :P
03:19 Zoffix huggable, hug me
03:19 * huggable hugs Zoffix
03:20 MadcapJake how would I go about opening a really old game file to try and pull out some images?
03:20 teatime depends on the game file format.  what game?
03:21 teatime a lot of games have proprietary/custom but relatively simple binary archive formats.
03:21 teatime worst case, you might have to reverse-engineer at least some of the format yourself to get what you want.
03:21 MadcapJake old game called Ancient Conquest, it has these .dkd, .dkx files but I can't find anything about them online
03:22 MadcapJake teatime: how do you go doing that? :P
03:22 teatime with a hex editor and a lot of time to waste
03:22 teatime and probably a good debugger too
03:23 jeek Jake: http://forum.xentax.com/vie​wtopic.php?f=10&amp;t=6819
03:23 MadcapJake ehh, sounds a bit over my head I think
03:24 teatime I have done it, actually, in small/easy instances... it's definitely a skill unto its own, that improves with time, and it can be very frustrating in the beginning, especially if you have specific practical goals you want to accomplish.
03:24 jeek Jake: Possibly also relevant: http://aluigi.altervista.org/quickbms.htm
03:24 teatime BUT, you should also search very thoroughly on the net, 'cause a lot of people do it and then post their tools or info.
03:25 MadcapJake haha jeek! this could be it, same extensiosn at least, what language is that script in?
03:25 teatime but for an older game that maybe wasn't super-popular new?  don't hold your breath.
03:25 jeek Jake: Google Harder next time.
03:26 jeek I just did a search for: dkd dkx file format
03:26 jeek It was the second result. ;)
03:26 MadcapJake wow, I did "dkd dkx extension", and "dkd dkx game files" :P
03:26 geekosaur 2nd line of that script is "# script for QuickBMX http://aluigi.altervista.org/quickbms.htm"
03:27 geekosaur er QuickBMS
03:27 MadcapJake xD QuickBMX, "goto halfpipe, perform 180, land bike"
03:27 TEttinger hardgoogle
03:27 jeek Google Extreme
03:27 aries_liuxueyang joined #perl6
03:28 * geekosaur has pretty much reached "brain and brain what is brain" :/
03:32 MadcapJake weird that `make` says "compilation terminated" a ton of times but yet keeps on going...
03:32 jeek Illbeback.c
03:37 cpage_ joined #perl6
03:39 cpage_ joined #perl6
03:43 MadcapJake oi this quickbms thing was made for 32bit
03:44 pierre joined #perl6
03:48 hotel joined #perl6
03:49 MadcapJake ok that's too much of a pain :P
03:55 Xliff MadcapJake, you can't get it working?
03:56 MadcapJake nah, would need to install lots of 32bit libs, I think
03:57 Xliff Ah.
03:57 Xliff Wonder if that would work under WINE, then.
03:58 MadcapJake Xliff: was thinking that, they do provide an exe file already built even
03:58 Xliff You
03:58 Xliff s/ou/up/
04:04 pierre joined #perl6
04:08 MadcapJake well that kinda worked but the files it extracts are unreadable
04:12 MadcapJake oh nautilus...accidentally initiated a search inside there and now it's completely locked up xD
04:13 geekosaur MadcapJake, yeh, I looked that thing up and the suggestion is that they're encrypted somehow
04:14 geekosaur which would make sense if it's a commercial game
04:14 MadcapJake bummer yeah it was :P
04:14 geekosaur (well, it doesn't really make sense, but it does fit what commercial game devs tend to do...)
04:16 MadcapJake eh well, at least I gave gvfsd-trash something to do :)
04:19 * MadcapJake is off to bed
04:19 mr-foobar joined #perl6
04:20 teatime .u U+20dd
04:20 yoleaux U+20DD COMBINING ENCLOSING CIRCLE [Me] (◌⃝)
04:20 teatime anyone in a text term that can actually see the ^^ combining circle?
04:25 willthechill joined #perl6
04:36 cbk joined #perl6
04:36 mr-foobar joined #perl6
04:37 skids under linux pterm I see only the right half of the circle.  under pidgin irc I see the whole circle, but it is rightwards shifted enough to actually cross the \x25CC character.
04:41 pierre joined #perl6
04:41 pierre joined #perl6
04:41 TreyHarris joined #perl6
04:46 pierre joined #perl6
04:48 Cabanossi joined #perl6
04:48 teatime skids: word, thx
04:48 teatime apparently urxvt, zsh, and friends etc. will actually draw it after all
04:48 teatime I just gotta find a font w/ it in it :)
04:51 skids normal rxvt does not, at least with default settings.  Base xterm shows it but it looks like a big tall O with squarish corners.
04:51 skids I kicked all libvte-based terms off my system, so I can't say what they do.
04:53 skids linux console just shows a diamond.
04:53 skids (no combining)
04:59 Actualeyes joined #perl6
05:00 pierre joined #perl6
05:03 cooper_ joined #perl6
05:03 cooper_ joined #perl6
05:04 lizmat_ joined #perl6
05:07 Praise- joined #perl6
05:07 Praise- joined #perl6
05:07 Xliff Is there a cheap way to append one file to another in perl6?
05:08 xinming joined #perl6
05:08 Shozan joined #perl6
05:08 yubimusubi joined #perl6
05:08 hanekomu_ joined #perl6
05:08 jdv79_ joined #perl6
05:08 hcit_ joined #perl6
05:08 literal_ joined #perl6
05:11 bitmap_ joined #perl6
05:12 pierre joined #perl6
05:14 ilogger2 joined #perl6
05:14 go|dfish joined #perl6
05:14 aries_liuxueyang joined #perl6
05:27 aries_liuxueyang joined #perl6
05:27 Xliff m: my $a = 0; say "Yes" if ! $a
05:28 camelia rakudo-moar e39ce3: OUTPUT«Yes␤»
05:40 domidumont joined #perl6
05:41 teatime Xliff: find anything on efficienly appending files?
05:42 teatime I'm trying to figure out how to pipe IO::Handles :)  probably involves .supply, somehow...
05:42 Xliff Found something for perl5 using $/.
05:42 Xliff I haven't yet gotten to Supply and Supplier.
05:42 teatime me either
05:44 Xliff I'm thinking something like this: "$fo.write($fi.read(BLOCKSIZE) while ! $fi.eof"
05:44 domidumont joined #perl6
05:44 Xliff Oops...
05:44 inokenty joined #perl6
05:44 Xliff Correction: "$fo.write($fi.read(BLOCKSIZE)) while ! $fi.eof"
05:47 Xliff But now I have to figure out if I can reopen a :w IO::Handle as :r and then .seek(0, SeekFromBeginning)
05:47 Xliff I might need to .close and re-open…..
05:52 CIAvash joined #perl6
05:53 Xliff Supply looks neat, but I don't need concurrency for this application.
05:56 teatime I do.
06:02 ugexe a supply doesnt mean concurrency
06:03 domidumont joined #perl6
06:16 lizmat joined #perl6
06:18 CIAvash joined #perl6
06:24 pierre_ joined #perl6
06:27 pierre_ joined #perl6
06:27 firstdayonthejob joined #perl6
06:40 ugexe m: my $o = $*OUT; my $s = $o.Supply; $s.tap: { .say }; $o.print("adsfasfd"); # from a terminal this runs forever?
06:40 camelia rakudo-moar e39ce3: OUTPUT«adsfasfd»
06:47 moritz I kinda wonder why it doesn't on IRC
06:48 moritz m: my $o = $*OUT; my $s = $o.Supply; $s.tap: { note("TAP $_") }; $o.print("adsfasfd")
06:48 camelia rakudo-moar e39ce3: OUTPUT«adsfasfd»
06:48 moritz seems it doesn't tap when there's no terminal?
06:49 ugexe if you press enter in the terminal it will fire, but keeps running
06:49 moritz sure, because it feeds itself
06:50 moritz nope, even if I change the say to note, it hangs
06:51 wamba joined #perl6
06:51 moritz seems the $*OUT.tap call hangs here
06:51 moritz erm, $*OUT.Supply.tap
06:52 CIAvash Xliff: open('file1', :a).write: 'file2'.IO.slurp: :bin
06:56 CIAvash or 'filetest.txt'.IO.spurt: 'filetoast.txt'.IO.slurp(:bin), :append
06:58 RabidGravy joined #perl6
07:02 RabidGravy Boom!
07:08 dalek doc: aa84e0b | (Daniel Green)++ | doc/Type/Any.pod:
07:08 dalek doc: Minor fixes to Any.pod
07:08 dalek doc: review: https://github.com/perl6/doc/commit/aa84e0b55a
07:08 dalek doc: 238ac7d | (Daniel Green)++ | doc/Type/ (9 files):
07:08 dalek doc: Mostly minor fixes, a slightly more substantial fix in Bag.pod
07:08 dalek doc: review: https://github.com/perl6/doc/commit/238ac7d1e0
07:08 dalek doc: b239cbc | RabidGravy++ | doc/Type/ (10 files):
07:08 dalek doc: Merge pull request #522 from MasterDuke17/master
07:08 dalek doc:
07:08 dalek doc: Some more minor fixes
07:08 dalek doc: review: https://github.com/perl6/doc/commit/b239cbc346
07:13 tokuhirom joined #perl6
07:13 ufobat joined #perl6
07:13 ufobat morning
07:16 moritz \o
07:16 moritz ufobat: are you coming to Erlangen.pm tonight?
07:18 ufobat no :-( i'd like to but i am curently in italy
07:18 teatime CIAvash: I am fairly sure that's not what I'll be looking for, when I get there
07:19 ufobat and on the other side holidays aren't that bad :)
07:20 Woodi joined #perl6
07:20 teatime I'm hoping for something like 'source.txt'.IO.pipe('dest.txt'.IO) that will return immediately as the copy proceeds in the background.  I think.
07:22 moritz ufobat: Italy doesn't sound that bad :-)
07:22 teatime I don't think I actual honest-to-goodness threading; coroutines / event-loop would be satisfactory, I think; but it seems like P6 provides the tools to make it actually multi-threaded for little/no extra effort, so why not.
07:23 teatime but it would probably help if I had more of a clue about non-threated async programming :)
07:23 moritz my $promise = start { your copy code here }
07:24 moritz and when you want to wait for it to be done: await $promise;
07:25 CIAvash teatime: I was only responding to "a way to append one file to another"
07:47 pierre_ joined #perl6
07:48 abraxxa joined #perl6
07:48 _mg_ joined #perl6
07:49 Xliff CIAvash, won't using slurp read the file into memory?
08:01 CIAvash Xliff: I overlooked "a cheap way" :/
08:09 nine Xliff: seriously with Perl being about pragmatism and Perl 6 having less than stellar performance, have you considered shell("cat $source >> $target")?
08:10 timotimo open the two files, then NativeCall to "sendfile"
08:11 nine That would be the high tech way. And probably the fastest way possible :)
08:11 timotimo wouldn't cat do that same thing?
08:11 nine Yes, but the cat thing has the overhead of starting a shell and cat
08:11 timotimo ah
08:11 timotimo well, NativeCall overhead is also like 1000000x of what it could be when we finally get around to optimizing it :)
08:13 avalenn joined #perl6
08:16 nine Intriguingly GNU coreutils' cat doesn't use sendfile. But it at least does fdadvise (input_desc, 0, 0, FADVISE_SEQUENTIAL);
08:16 timotimo ah, neat trick
08:16 timotimo for slurp, we could do that, too. i wonder how much that's worth.
08:16 nine busybox's cat uses sendfile
08:18 darutoko joined #perl6
08:18 woodruffw joined #perl6
08:19 woodruffw joined #perl6
08:19 nine FADVISE_SEQUENTIAL seems to double the readahead window size
08:21 timotimo it'll probably read huge buffers anyway, so i expect the program alone would keep the disk busy enough on its own
08:26 nine cat itself uses the device block size for its buffers. Another neat trick. Reading the source of basic utilities can be quite instructive :)
08:27 YoungFrog joined #perl6
08:27 teatime nine: so, 512B to 4kiB ?
08:27 teatime seems like it would be faster to be a lot larger than that
08:27 nine I would for example always prefer the system's cp to a Perl module for file copying. Especially because auf --reflink=auto
08:27 teatime or did you mean, it chooses a multiple?
08:29 nine teatime: insize = io_blksize (stat_buf); insize = MAX (insize, outsize); ok &= simple_cat (ptr_align (inbuf, page_size), insize);
08:31 Xliff So you think sendfile() would be better?
08:32 nadim Good morning
08:34 Xliff sendfile has a 2G limit, though.
08:34 teatime nine: it looks like the value io_blksize returns is typically largeish, perhaps never smaller than 128kiB
08:34 Xliff Might code in a fallback to the inefficient method if that's the case.
08:35 Xliff Thanks for the suggestion! teatime++ && CIAvash++
08:35 teatime wait, did I actually help? :)
08:35 Xliff Oh! nine++
08:36 teatime lol, no, I didn't, as it turns out :)
08:36 * teatime hugs you all anyway, goes to get breakfast.
08:36 Xliff MMMM.... breakfast
08:36 dakkar joined #perl6
08:36 Xliff teatime: You mentioned sendfile
08:36 teatime negatif
08:37 Xliff Oh! that was timotimo++
08:37 teatime I think that was timotimo
08:37 Xliff Yeah. It's 4:30am here and I'm drinking my last beer.
08:37 Xliff You t's all look alike! ^_^
08:38 Xliff teatime, you still get the pluses because you're you.
08:39 timotimo i'm sorry :)
08:40 teatime you know, tbh, it's a rare opportunity to be among the least knowledgable etc. in a friendly group.  I used to seek out such situations w/ enthusiam, and should probably continue to :)
08:41 buharin_ joined #perl6
08:41 jargan joined #perl6
08:41 labster1 joined #perl6
08:41 sQuEE` joined #perl6
08:41 CIAvash Xliff: I didn't really help either, did I?! :)
08:42 teatime heck, it's a valuable opportunity to be the least knowledgeable in a grumpy, curmudgeony group... for it to be a friendly group is truly a rare chance :)
08:42 clkao_ joined #perl6
08:42 alva_ joined #perl6
08:42 pierrot_ joined #perl6
08:42 Xliff CIAvash, everyone here did!
08:43 jcallen_ joined #perl6
08:43 kipd_ joined #perl6
08:43 chansen__ joined #perl6
08:44 hotel joined #perl6
08:44 obfusk_ joined #perl6
08:44 Lucas_One_ joined #perl6
08:44 aindilis` joined #perl6
08:44 richi238 joined #perl6
08:44 petercom1and joined #perl6
08:44 mls_ joined #perl6
08:44 pmichaud_ joined #perl6
08:44 integral_ joined #perl6
08:44 integral_ joined #perl6
08:45 sergot_ joined #perl6
08:45 jusafing_ joined #perl6
08:45 remmie2 joined #perl6
08:45 hanekomu joined #perl6
08:45 Juerd_ joined #perl6
08:46 willthechill joined #perl6
08:46 hobbs joined #perl6
08:46 hobbs joined #perl6
08:46 riatre_ joined #perl6
08:46 teatime wheeeee
08:46 RabidGravy boom
08:46 samb1 joined #perl6
08:46 ggherdov_ joined #perl6
08:46 zakharyas joined #perl6
08:48 dg joined #perl6
08:50 ilmari joined #perl6
08:50 simcop2387 joined #perl6
08:52 sno joined #perl6
08:54 damnlie joined #perl6
08:56 PotatoGim joined #perl6
08:57 notbenh_ joined #perl6
08:58 MadcapJake joined #perl6
09:00 SmokeMachine____ joined #perl6
09:03 Spot__ joined #perl6
09:04 CIAvash joined #perl6
09:14 g4 joined #perl6
09:24 rindolf joined #perl6
09:26 olinkl joined #perl6
09:26 cgfbee joined #perl6
09:26 grondilu joined #perl6
09:27 grondilu Hi #perl6
09:27 RabidGravy erp
09:27 ocbtec joined #perl6
09:31 labster joined #perl6
09:34 pochi joined #perl6
09:35 pmurias joined #perl6
09:40 brrt joined #perl6
09:42 silug joined #perl6
09:42 ufobat joined #perl6
09:46 pierre_ joined #perl6
09:58 pierre_ joined #perl6
10:08 buharin joined #perl6
10:08 buharin hi
10:08 buharin :)
10:17 gregf_ m: "1".Int.can("+")
10:17 camelia rakudo-moar e39ce3: ( no output )
10:18 gregf_ shouldn't that return me some methods? :|
10:18 psch gregf_: infix:<+> is no method
10:18 aries_liuxueyang joined #perl6
10:20 gregf_ psch: sorry, wasnt able to get you
10:20 gregf_ is the infix, prefix, postfix bit linked to the parser?
10:21 gregf_ ah - ok
10:21 psch gregf_: foofix is a special type of sub declaration to teach the parser how we want a given sub treated as when it's used as an operator
10:21 timotimo m: say &infix:<+>
10:21 camelia rakudo-moar e39ce3: OUTPUT«sub infix:<+> (Mu $?, Mu $?) { #`(Sub+{<anon|44734144>}+{Precedence}|63420528) ... }␤»
10:21 timotimo it's actually part of the name. the parser knows to look for things with that name when it finds something that looks like an infix, for example
10:22 psch ...right, it's probably more the other way around
10:22 psch not "how we want it treated" but "where we want the parser to expect it"
10:23 CIAvash joined #perl6
10:23 gregf_ hmm - ok
10:23 gregf_ m: &infix:<+>.(10,20) # that works. surely thats a Sub then? global one?
10:23 camelia rakudo-moar e39ce3: ( no output )
10:24 gregf_ m: say &infix:<+>.(10,20)
10:24 camelia rakudo-moar e39ce3: OUTPUT«30␤»
10:24 psch m: say CORE::.keys.grep({ $_ ~~ / 'infix:<+>' / })
10:24 camelia rakudo-moar e39ce3: OUTPUT«(&infix:<+>)␤»
10:27 gregf_ psch: timotimo cheers
10:29 gregf_ i was trying a simple calculation and it was'nt working :|.like a foldleft
10:30 timotimo so like [+] 1, 2, 3, 4 ?
10:30 gregf_ m: say q{10 + 3 - 2 * 5}.split(/\s+/).reduce({ $^a.isa(Array) ?? { $^a[0].Int.can($^a[1])[0].($^b.Int) } !! [$^a,$^b] })
10:30 camelia rakudo-moar e39ce3: OUTPUT«-> $a, $b { #`(Block|87973960) ... }␤»
10:30 gregf_ timotimo: yep ^^
10:30 timotimo oh, you're trying to build your own expression parser?
10:30 gregf_ yeah kinda... *a simple one*
10:37 grondilu gregf_: that's pretty obscure code
10:40 gregf_ oh - is it :|
10:41 arnsholt Reduces are generally kinda opaque, IMO, unless they're one of the standard reduces like sum or product
10:41 gregf_ m: say q{10 + 3 - 2 * 5}.split(/\s+/).reduce: ->$x,$y { $x.isa(Array) ?? { $x[0].Int.can($x[1])[0].($y.Int) } !! [$x,$y] } # more readable presumably
10:41 camelia rakudo-moar e39ce3: OUTPUT«-> ;; $_? is raw { #`(Block|80595272) ... }␤»
10:41 arnsholt But it's likely one of those things you just need to get used to
10:41 gregf_ but that code would literally be the same in scala ruby for example
10:42 gregf_ %{10 + 3 - 2 * 5}.split().reduce(){ |v1,v2| v1.is_a?(Array) ? v1[0].to_i.send(v1[1], v2.to_i) : [v1,v2] } # ruby version. but yeah, its ugly :|
10:45 arnsholt Well, reduces in general, TBH =)
10:45 arnsholt But I do suspect it's an idiom you just need to assimilate
10:46 gregf_ heh, you're right :)
10:46 arnsholt Kind of like map/filter/comprehensions instead of for loops
10:47 arnsholt At least that's what I told my students (who were just beginning programming): "Initially, you're going to have trouble parsing comprehensions compared to the equivalent for loop. But it does get easier with time."
10:50 edenc joined #perl6
10:51 avalenn joined #perl6
11:10 CIAvash joined #perl6
11:22 pmurias_ joined #perl6
11:26 buharin joined #perl6
11:31 kid51 joined #perl6
11:43 awwaiid joined #perl6
11:44 masak arnsholt: jumping into the discussion here, but...
11:45 masak arnsholt: to me it's a matter of framing it in terms of follow-these-steps-to-get-the-data-structure (imperatively, lots of moving parts) versus here-is-how-I-describe-the-data-structure (declaratively, no moving parts)
11:50 avalenn_ joined #perl6
11:52 |2701 joined #perl6
11:55 kaare_ joined #perl6
11:56 cgfbee joined #perl6
11:57 nicqbot joined #perl6
11:58 aries_liuxueyang joined #perl6
12:00 tphilipp joined #perl6
12:02 tphilipp left #perl6
12:04 avalenn joined #perl6
12:04 CIAvash joined #perl6
12:05 _mg_ joined #perl6
12:08 arnsholt masak: Yeah, that sounds reasonable
12:12 masak arnsholt: there's something funny/interesting going on there. as domains grow more understood, they tend to also be described more declaratively.
12:12 masak it's almost as if you write imperatively the things you're still exploring and don't grok fully, and declaratively the things you grok
12:12 zakharyas joined #perl6
12:14 arnsholt Yeah, definitely
12:14 arnsholt I almost wrote something similar
12:14 arnsholt Basically that reduces seem to be a higher-level description of the same fundamental process
12:16 aries_liuxueyang joined #perl6
12:18 masak the `reduce` function is my least favorite higher-order function :)
12:18 moritz why?
12:18 masak it doesn't provide all that much relief in terms of being able to ignore the mechanics/details of the transform
12:18 masak not like map and grep do, anyway
12:19 masak I think it's related to the fact that with `reduce`, outputs are fed in as inputs to the next step
12:21 moritz I kinda disagree
12:22 moritz reduce hides state (the variable into which elements are being reduced)
12:22 moritz whereas a grep, to me, is just a map { $elem if $elem ~~ $condition }, which doesn't really hide state
12:22 moritz so I find reduce a bigger relieve than grep
12:23 moritz your mileage varies, obvisously :-)
12:23 masak we may or may not disagree, even
12:24 moritz wow. Others agree to disagree. We disagree about whether we disagree :-)
12:25 arnsholt Is this what happens when the hug register overflows? =D
12:25 masak m: say [(1, 10), (2, 20), (3, 30)].reduce(-> $a, $b { (0, $a[1] + $b[1]) })
12:25 camelia rakudo-moar e39ce3: OUTPUT«(0 60)␤»
12:25 masak here's an example where I think .reduce did more to confuse than to help
12:25 masak there's a lot of "moving parts" in that code to understand. lots of structure to unpack
12:26 moritz yes, but that's just because you chose a complex reduction step
12:26 moritz if you call grep with a complex search condition, it might also more confuse than help
12:26 masak I agree as far as that goes
12:27 moritz : say [(1, 10), (2, 20), (3, 30)].grep({ $ += .[1] >= 15})
12:27 moritz m: say [(1, 10), (2, 20), (3, 30)].grep({ $ += .[1] >= 15})
12:27 camelia rakudo-moar e39ce3: OUTPUT«((2 20) (3 30))␤»
12:27 masak but in my experience, there are (a) simple reduce cases, like .reduce(&infix:<+>), which are better written as &sum
12:27 pmurias joined #perl6
12:27 masak and (b) complex cases, which are harder to understand than an imperative loop
12:28 masak m: say [(1, 10), (2, 20), (3, 30)].grep({ .[1] >= 15}) # useless use of `$ +=`
12:28 camelia rakudo-moar e39ce3: OUTPUT«((2 20) (3 30))␤»
12:28 masak due to precedence
12:28 jnthn $a and $b aren't the best choice of names if you want the thing to be understandable
12:28 masak let me write the easy-to-read version of my reduce
12:29 jast $A and $Α are much better choices
12:29 masak m: say [(1, 10), (2, 20), (3, 30)].map(*[1]).sum
12:29 jnthn :P
12:29 camelia rakudo-moar e39ce3: OUTPUT«60␤»
12:29 masak the way I did the reduce obscured the fact that I was summing the second element
12:29 masak which is exactly my point
12:30 dalek doc: 8015be8 | (Zoffix Znet)++ | doc/Type/Int.pod:
12:30 dalek doc: .polymod is a method, not a routine
12:30 dalek doc: review: https://github.com/perl6/doc/commit/8015be8ed6
12:30 masak Zoffix: methods are routines :)
12:30 masak m: say Method ~~ Routine
12:30 camelia rakudo-moar e39ce3: OUTPUT«True␤»
12:30 moritz masak: would it be fair to say that .reduce tempts you to write unnecessary complex code?
12:31 ZoffixW joined #perl6
12:31 ZoffixW masak, isn't that just internal detail?
12:31 masak moritz: yes, I'd say so
12:31 ZoffixW m: polymod
12:31 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lwzqSiIvr7␤Undeclared routine:␤    polymod used at line 1␤␤»
12:31 masak ZoffixW: no, it's a subsetship
12:31 masak ZoffixW: methods are routines. subs are routines too. macros are routines.
12:31 masak blocks are not routines.
12:31 moritz fwiw I agree with ZoffixW++'s patch, because it makes the docs more precise
12:32 masak yes, me too
12:32 moritz and I agree with masak++'s comment too :-)
12:32 ZoffixW k :D
12:32 moritz hug overflow!
12:32 masak I like the fix, but the commit comment is wrong :P
12:32 ZoffixW Noted :)
12:32 moritz quick, let's rewrite history!
12:32 masak ".giraffe is a mammal, not an animal"
12:32 huggable joined #perl6
12:33 ZoffixW hehe :)
12:35 aries_liuxueyang joined #perl6
12:46 buharin joined #perl6
12:48 itaipu joined #perl6
13:00 aries_liuxueyang joined #perl6
13:04 aries_liuxueyang joined #perl6
13:08 peteretep joined #perl6
13:10 willthechill joined #perl6
13:10 aries_liuxueyang joined #perl6
13:17 avalenn joined #perl6
13:17 buharin joined #perl6
13:23 trkldoi joined #perl6
13:23 skids joined #perl6
13:26 wamba joined #perl6
13:27 aries_liuxueyang joined #perl6
13:31 Xliff Does anyone have up-to-date documentation for Buf and Blob?
13:35 masak Xliff: how does http://docs.perl6.org/type/Buf and http://docs.perl6.org/type/Blob seem as a starting point?
13:36 Actualeyes joined #perl6
13:36 Gothmog_ joined #perl6
13:39 buharin joined #perl6
13:40 moritz and if you find something out-of-date in there, please file an issue
13:40 Ven joined #perl6
13:42 tony-o http://www.telegraph.co.uk/technology/​2016/05/17/has-googles-parsey-mcparsef​ace-just-solved-one-of-the-worlds-big/
13:42 Xliff masak: Yes, been there. Those seem to lack any information on .push, et all.
13:43 Xliff This RT gives the impression that they were implemented: https://rt.perl.org/Public/​Bug/Display.html?id=125182
13:43 Ven o/
13:43 Xliff I will have to hit the source to see exactly what is missing.
13:44 cdg joined #perl6
13:44 aries_liuxueyang joined #perl6
13:48 Xliff Yeah Buf is missing the Array methods: push, pop, append, prepend, shift and unshift, splice. All of these are defined in Buf.pm
13:48 Xliff I will file for Buf. I don't know how many of those are appropos for Blob
13:49 moritz none
13:49 moritz because Blob is immutable
13:49 moritz m: say WHAT $*GROUP
13:49 camelia rakudo-moar e39ce3: OUTPUT«(IntStr)␤»
13:51 Xliff Aaand... RT is very (new) user unfriendly.
13:51 Xliff Where can I file a new bug as anonymous?
13:51 Ven send an email
13:54 Xliff I registered with bitcard.
13:54 Xliff Ven: Send an email where?
13:54 Xliff The page doesn't say, either.
13:54 arnsholt rakudobug@$something_i_forget IIRC
13:55 jnthn It's in the Rakudo README iirc
13:57 Xliff https://rt.perl.org/Ticket/Display.html?id=1281​74&amp;results=138338b73b1e05125a87e9e5247e1f27
13:57 Xliff 'k -- and with that, I turn into a Pumpkin. See you all in a few hours.
13:58 mohae_ joined #perl6
14:01 nine tony-o: that's...wow
14:05 ptolemarch joined #perl6
14:15 ZoffixW joined #perl6
14:16 ZoffixW m: (-2).Rat.polymod
14:16 camelia rakudo-moar e39ce3: OUTPUT«invocant to polymod out of range. Is: -2, should be in 0..*␤  in block <unit> at /tmp/_sdv2A2x6j line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/_sdv2A2x6j line 1␤␤»
14:17 ZoffixW This line should read `if $more < 0 and $inf` shouldn't it: https://github.com/rakudo/rakud​o/blob/nom/src/core/Real.pm#L70
14:17 ZoffixW Or rather... what fail should not be there in the first place.
14:18 ZoffixW The calculation itself can push the value into negatives. You can argue that in lazy mode, negative invocant would result in an infinite loop since it'll never reach zero, but not all lazy lists infinite
14:20 ZoffixW Hm. Or maybe I did something weird that I got negatives in my output
14:20 ZoffixW (-0.000888824462890625kg -3.640625g -232mg 655360μg -3087007744ng)
14:21 ZoffixW m: say 151443434343434343434343.Num.polymod: 10¯³ xx 100
14:21 camelia rakudo-moar e39ce3: OUTPUT«(0 0 0 0 0 -1.88894659314786e+22 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2.8118211215895e+160 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.36895460861314e+226 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -Inf …»
14:21 moritz looks like an overflow to me
14:21 moritz m: say 151443434343434343434343.Num
14:21 camelia rakudo-moar e39ce3: OUTPUT«1.51443434343434e+23␤»
14:21 ZoffixW k, never mind :)
14:22 moritz m: say 151443434343434343434343.Rat.polymod: 10¯³ xx 100
14:22 camelia rakudo-moar e39ce3: OUTPUT«(0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...)␤»
14:22 moritz ... or numerical errors
14:23 ZoffixW Yeah, looks like there's some precision difference between % and / values
14:23 Xliff tony-o, nine: Parsey McParseface? Even with the silly name, that's some impressive stuff.
14:23 ZoffixW Heisenberg's Uncertainty Princple :P
14:23 Xliff Wonder what I'd find if I ran one of Trump's speeches through it...
14:23 moritz Xliff: the abyss
14:24 Xliff moritz++
14:24 tony-o Xliff: scott adams (the dilbert comic fella) has an interesting blog discussing persuasion and trump, if you're into that sort of thing
14:25 * geekosaur contemplates whether neural nets can be driven to psychosis
14:26 perlpilot geekosaur: clearly they can.  See psychotic humans  :)
14:26 moritz geekosaur: one could even argue that not driving them to psychosis during training is one of the bigger challenges in machine learning
14:26 geekosaur (alternately, rebuttals combining misparses with Markov Chaney >.> )
14:27 moritz if you naively train a neural net to classify some images, it'll likely use some micro texture in the images to classify them, not the way you wanted them to
14:28 moritz which is pretty much a neurological dysfunctionality :-)
14:28 geekosaur yep
14:28 Xliff tony-o, link in a PM?
14:33 gregf_ voting in the US election is prolly the toughest decision on the planet *ducks and runs*
14:33 gregf_ "most taxing to a human mind"
14:33 tony-o Xliff: sent
14:34 tony-o gregf_: not really
14:38 llfourn m: say Bool.pick # algorithm I use for voting in election
14:38 camelia rakudo-moar e39ce3: OUTPUT«False␤»
14:39 pmurias tony-o: for me as someone from out side of the US Scott's Adams analysis of the US presidentential campaign is really interesting
14:39 pmurias * presidential
14:41 pmurias much more then the local politics which are a battle between unskilled morons who have no idea what they are doing and win mostly by chance ;)
14:42 tony-o haha, i agree - the persuasion side of the whole thing is interesting to me too
14:47 willthechill joined #perl6
14:49 _mg_ joined #perl6
14:50 teatime ".reduce(&infix:<+>), which are better written as &sum"  isn't this what the [+] class of operators is for?  (I assume not, but what am I missing)
14:50 avalenn joined #perl6
14:51 Possum joined #perl6
14:51 Possum joined #perl6
14:52 llfourn teatime: TIMTOWTDI
14:52 ugexe does this diag() really belong in subtest? https://github.com/rakudo/raku​do/blob/nom/lib/Test.pm6#L296
14:52 llfourn (they are the same afaik)
14:53 ugexe its defaulting to a verbosity that prove provides with `-v`, so if you *do* run with -v you have redundancy
14:54 Possum joined #perl6
14:54 tony-o does .reduce guarantee order?
14:54 ugexe reduce's arguments come in order yes
14:57 Possum joined #perl6
14:58 avalenn joined #perl6
15:02 aries_liuxueyang joined #perl6
15:19 avalenn joined #perl6
15:20 khw joined #perl6
15:20 ugexe ah `diag` indeed does not belong in subtest https://gist.github.com/ugexe/0​fd759225aefbeac9c08d1cc87603206
15:24 hotel_california joined #perl6
15:25 ssotka joined #perl6
15:28 ZoffixW joined #perl6
15:31 kurahaupo joined #perl6
15:32 ZoffixW ugexe, the argument for addition of diag was that it's easier to see which subtest started to run, because standard verbosity puts it the name of the subtest at the end. It does feel iffy though, I agree.
15:32 ugexe right, but it doesnt parse correctly
15:33 tokuhirom joined #perl6
15:33 ugexe maybe proclaim, but im not sure
15:34 |2701 joined #perl6
15:34 |2701 joined #perl6
15:34 aries_liuxueyang joined #perl6
15:35 ZoffixW Just toss it entirely. PR submitted: https://github.com/rakudo/rakudo/pull/771
15:35 perigrin w82
15:36 ZoffixW That change went in just 2 days ago from my implementation of subtest multi
15:36 ugexe heh 770 already does that
15:36 ZoffixW haha :D
15:37 ugexe the only reason ive talked about it this much is because the first subtest diag still ends up in stdout, but all subsequent ones end up in stderr which had me chasing my tail
15:38 hotel joined #perl6
15:48 kurahaupo_ joined #perl6
15:57 ZoffixW New blog post: Perl 6 .polymod: Break Up a Number Into Denominations: http://perl6.party/post/Perl6-.polymod​-break-up-a-number-into-denominations
15:57 ZoffixW psch, Alex[tab] ^ you said you didn't understand .polymod last night, so here, if you're interested :)
15:59 hotel_california joined #perl6
16:01 jnthn ZoffixW++ # nice post :)
16:01 psch ZoffixW: i don't really have brains today, i notice... :)
16:01 pecastro joined #perl6
16:01 ZoffixW :)
16:03 moritz as anybody looked at https://threatpost.com/academics-make-theoretical​-breakthrough-in-random-number-generation/118150/ a little deeper?
16:04 geekosaur key word there is "theoretical"
16:06 geekosaur http://eccc.hpi-web.de/report/2015/119/ (via https://www.sciencedaily.com/rel​eases/2016/05/160516115441.htm) --- although I misremembered, I guess they already expanded it to random sequences
16:06 geekosaur "Their paper shows how to generate only one truly random number -- akin to one coin toss -- but Zuckerman's former student Xin Li has already demonstrated how to expand it to create sequences of many more random numbers."
16:08 nemo geekosaur: yeah, it's theory, but seems like it would immediately be applicable to, oh, /dev/random
16:08 nemo geekosaur: since your computer is combining poor entropy sources most of the time
16:08 ianm joined #perl6
16:08 geekosaur I meant the "Their paper shows how to generate only one truly random number" part
16:09 tony-o i can't tell if my eyes are fuzzy or they chose to enlarge tiny fonts on eccc
16:09 nemo geekosaur: well. they demonstrated one bit, 'cause that was all that was really necesary
16:09 ianm Shout-out from OSCON Austin, TX. Larry Wall is currently presenting about PERL6. Very healthy crowd.
16:09 nemo geekosaur: for more bits, you'd just need more input ☺
16:09 tony-o hi ianm
16:09 ianm Hi tony-o
16:10 nemo geekosaur: looks like the link you gave, unsurprisingly, links the extractor's error to the input bits
16:10 nemo geekosaur: so you could just decide exactly how confident you wanted to be
16:10 nemo most of the time for low-grade sources you have quite a lot of bits
16:12 ssotka joined #perl6
16:16 stmuk2 joined #perl6
16:19 nemo geekosaur: yeah, that quote you have there just seems really weird to me... I have a function that takes N bits and generates 1 bit... how do I get more than 1 bit? maybe call the function more than once? 😃
16:20 nemo it's not like the function self-destructs after invoking 😝
16:20 geekosaur well, there is a little more than that involved since the randomness of consecutive calls can differ from the "absolute" randomness in a single call
16:21 nemo geekosaur: so you're saying the error in that 1 bit is sensitive to the quality of the input streams
16:21 geekosaur that said, it did come from sciencedaily.com which is targeting laypeople. oversimplification is kinda expected
16:21 nemo such that reusing the streams could cause the error to multiply
16:24 dalek doc: 8307f6c | (Zoffix Znet)++ | doc/Type/Int.pod:
16:24 dalek doc: Improve description of .polymod
16:24 dalek doc: review: https://github.com/perl6/doc/commit/8307f6c8c1
16:27 dogbert17 joined #perl6
16:28 ilmari polyamorous mods?
16:28 geekosaur customer call... anyway yes that is what I inferred from that, having not read the original
16:28 ilmari in constant battle with monogamous rockers?
16:28 geekosaur (which is likely to be well over my head; I am not very mathy)
16:32 huggable joined #perl6
16:34 tokuhirom joined #perl6
16:35 freeze joined #perl6
16:37 mohae joined #perl6
16:43 sufrostico joined #perl6
16:47 keix joined #perl6
16:47 stmuk joined #perl6
16:48 ianm joined #perl6
16:51 dalek gtk-simple: e91fa56 | RabidGravy++ | lib/GTK/Simple.pm6:
16:51 dalek gtk-simple: Add additional widgets
16:51 dalek gtk-simple:
16:51 dalek gtk-simple: * Add Status Bar
16:51 dalek gtk-simple: * Add Separator
16:51 dalek gtk-simple: * Add Progress Bar
16:51 dalek gtk-simple: * Box is a Container
16:51 dalek gtk-simple: * Accessor for Button.label
16:51 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/e91fa56eb0
16:51 dalek gtk-simple: c5ef07f | RabidGravy++ | examples/05_bars.p6:
16:51 dalek gtk-simple: Add boxes example
16:51 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/c5ef07f553
16:53 RabidGravy may do a couple more this evening
16:53 BuildTheRobots joined #perl6
16:53 sortiz joined #perl6
17:01 molaf joined #perl6
17:03 khw joined #perl6
17:03 domidumont joined #perl6
17:03 spider-mario joined #perl6
17:12 xue_ joined #perl6
17:14 dalek doc: 339fac3 | (Jan-Olof Hendig)++ | doc/Type/List.pod:
17:14 dalek doc: Fixed a couple of broken links
17:14 dalek doc: review: https://github.com/perl6/doc/commit/339fac3ff0
17:17 CIAvash joined #perl6
17:18 stmuk joined #perl6
17:19 firstdayonthejob joined #perl6
17:30 sufrosti1o joined #perl6
17:31 roguelazer joined #perl6
17:49 xfix http://codegolf.stackexchange.com/a/80149/3103
17:49 xfix I do wonder if I could do better :).
17:50 timotimo it's the xfix! o/
17:50 xfix Hi, timotimo.
17:50 xfix I don't really like that <A G C T> part myself, hm...
17:52 timotimo it's still shorter than "AGCT".comb
17:53 timotimo i wonder if you can get better with a Uni type instead of ords and base2
17:56 xfix I like how I managed to do it in 58 characters however.
17:57 xfix Perl 6 may not be a golfing language, but I do admit, it works quite well as one (even if it's not going to win against languages designed for code golf).
18:01 aindilis` joined #perl6
18:10 labster joined #perl6
18:17 AlexDaniel joined #perl6
18:18 AlexDaniel labster: you may be interested in this: https://gist.github.com/Alex​Daniel/c89bd2786f9b63f31e4c
18:20 labster Oh, that's nice AlexDaniel
18:22 timotimo oh my %)
18:24 AlexDaniel huggable: hug
18:24 huggable AlexDaniel, nothing found
18:24 mst AlexDaniel: now I want a unicode character for http://trout.me.uk/youtriedstar.jpg for bad parameter exceptions
18:25 psch i kinda like ◌ as unicode whatever
18:26 psch well, i think it's the same that's usually used to demonstrate combining characters at least
18:26 psch if not, i mean that one that's used for that :P
18:27 mst (* * *) does amuse me though
18:27 AlexDaniel (* × *) makes it easier to understand
18:27 AlexDaniel (◌ × ◌) is even better, I guess
18:27 mst yes
18:29 psch m: say (** ** [*] ([*] + [*]))([*]) # /o\
18:29 camelia rakudo-moar e39ce3: OUTPUT«(1)␤»
18:29 labster O_o
18:29 AlexDaniel m: say “a\x[20DD]b”
18:29 camelia rakudo-moar e39ce3: OUTPUT«a⃝b␤»
18:30 AlexDaniel teatime: I can kinda see it in my terminal, but it is very buggy
18:30 teatime yeah, I'm over it.  it was for someone else anyway.
18:30 psch m: say uniname "\x20DD"
18:30 camelia rakudo-moar e39ce3: OUTPUT«COMBINING ENCLOSING CIRCLE␤»
18:30 teatime I desperately need to figure out how to query my system for 'fonts that contain a glyph for char ___', though.
18:31 AlexDaniel teatime: I'd love to know that as well
18:31 AlexDaniel who is as?
18:31 teatime AlexDaniel: well, I'm comitted to figuring it out, like, today or tomorrow.  'cause I hve had enough lol.
18:31 AlexDaniel and who is book?
18:32 teatime AlexDaniel: I had found what looked light a straightforward way once, once I skipped over it because it would have been more work / scripting / whatever than I thought would be necessary, as I fully expected to find an obvious solution immediately thereafter.
18:32 teatime Since that totally didn't happen, I'll go back to that method.
18:33 teatime AlexDaniel: did I type something dumb and not realize it?
18:33 AlexDaniel teatime: mhmm? No
18:33 AlexDaniel I am just annoyed by nickname highlighting of “book” and “as”
18:34 teatime oh
18:34 teatime I see..
18:36 teatime psch: you should write a proposal to UCC to add that.  They put in 'pile of poo', and then totally added bacon on the justification of 'we have a lot of food now, and BACON!!', but they've been arguing for like 12 years over whether the copyleft symbol is a character or a logo, and whether or not it's widely-used enough to justify inclusion if it's a character.
18:36 mst psch: the feck is that doing, does the last whatever star end up as 1 somehow?
18:36 teatime 'You Tried!' seems like exactly the sort of thing they'd add, provided you can use variation selectors to select its color.
18:36 psch teatime: i think you wanted to talk to mst :)
18:36 ZoffixW joined #perl6
18:36 teatime sorry
18:37 psch m: say [*] + [*]
18:37 camelia rakudo-moar e39ce3: OUTPUT«1␤»
18:37 ZoffixW mst, no, it does multiplication on an empty list, which is 1
18:37 psch m: say [*]
18:37 camelia rakudo-moar e39ce3: OUTPUT«1␤»
18:37 mst ah
18:37 psch so, how does that bit work? :)
18:37 teatime I actually didn't mean that last bit either, it was a lame attempt at a joke.  I think it's cool and easy for emoiis to have multiple genders and races
18:37 CIAvash It's not the same thing, but in Emacs you can press `C-u C-x =` to see information about a character, one of them is the font which is being used to show the character
18:38 ZoffixW m: say ([*]) + [*]
18:38 camelia rakudo-moar e39ce3: OUTPUT«2␤»
18:38 teatime oh wait, no sorry psch, you're right, I did literally want to be addressing mst :)
18:38 ZoffixW psch, multiplication of a list of 1 element containing 1? :)
18:38 ZoffixW m: say [*] [*]
18:38 camelia rakudo-moar e39ce3: OUTPUT«1␤»
18:38 ZoffixW And the plus is unary
18:38 psch ZoffixW: yup
18:39 AlexDaniel .u copyleft
18:39 yoleaux No characters found
18:39 AlexDaniel :[
18:39 ZoffixW \o/
18:40 psch m: say (** #`[ <- HyperWhatever ] ** #`[ <- to the power of ] [*] #`[ <- the product reduce of ] ([*] #`[ <- the product reduce of ] + [*] #`[ <- the positive multiplication identity ]))([*] #`[ <- with the multiplication identity as argument ])
18:40 camelia rakudo-moar e39ce3: OUTPUT«(1)␤»
18:40 psch mst: ^^^ in case there was anything left unclear
18:41 AlexDaniel .u hyper
18:41 yoleaux No characters found
18:41 mst psch: the 'positive multiplication identity' bit was what I hadn't got
18:41 mst that makes sense as a thing that would produce a 1
18:42 ZoffixW m: say (* * * * * * * * * * * * * * * * * * * * *)(|(^11+1))
18:42 camelia rakudo-moar e39ce3: OUTPUT«39916800␤»
18:49 vendethiel joined #perl6
18:50 AlexDaniel m: say (^8).permutations.grep: (4, **, 7, **, 1, **, 5)
18:50 camelia rakudo-moar e39ce3: OUTPUT«((4 0 2 3 6 7 1 5) (4 0 2 3 7 1 6 5) (4 0 2 3 7 6 1 5) (4 0 2 6 3 7 1 5) (4 0 2 6 7 1 3 5) (4 0 2 6 7 3 1 5) (4 0 2 7 1 3 6 5) (4 0 2 7 1 6 3 5) (4 0 2 7 3 1 6 5) (4 0 2 7 3 6 1 5) (4 0 2 7 6 1 3 5) (4 0 2 7 6 3 1 5) (4 0 3 2 6 7 1 5) (4 0 3 2 7 1 6 5) (4 …»
18:51 AlexDaniel \o/
18:55 timotimo for a moment i was wondering when ** became a metaop, and what **, does %)
18:57 ZoffixW m: say 4, **, 7, **, 1, **, 5
18:57 camelia rakudo-moar e39ce3: OUTPUT«4**7**1**5␤»
18:57 ZoffixW :/
18:58 teatime AlexDaniel: I also need to figure out how to modify a font to remove glyphs from it, if that's easy.  I'm hoping it will be pretty trivial.
18:58 ZoffixW AlexDaniel, what exactly is that grep doing? :/
18:59 AlexDaniel ZoffixW: oh look! Looks like someone is going to wrike a blog post about hyperwhatever :)
18:59 teatime I think it may be a bit too early (i.e., it'd be way easy mode right now, from what I've seen being in this chan :), but you guys should *definitely* throw an Obfuscated Perl6 Contest at some point.
18:59 teatime of course, I'm also sure you'll come up w/ a way better name for it.
19:00 psch m: say grep permutations ^4 : : (3, **)
19:00 camelia rakudo-moar e39ce3: OUTPUT«((3 0 1 2) (3 0 2 1) (3 1 0 2) (3 1 2 0) (3 2 0 1) (3 2 1 0))␤»
19:00 psch ZoffixW: ^^  that helpful?
19:01 AlexDaniel psch: : : lol
19:02 ZoffixW m: say grep permutations ^4 : : (3, *)
19:02 camelia rakudo-moar e39ce3: OUTPUT«()␤»
19:03 ZoffixW Not really. What does grep get? A callable?
19:03 psch m: say (1, 2, 3) ~~ (1, *); say (1, 2, 3) ~~ (1, **)
19:03 camelia rakudo-moar e39ce3: OUTPUT«False␤True␤»
19:03 ZoffixW Ah
19:03 ZoffixW m: say (1, 2, 3) ~~ (1, 2, *); say (1, 2, 3) ~~ (1, **)
19:03 camelia rakudo-moar e39ce3: OUTPUT«True␤True␤»
19:04 ZoffixW Nice. psch++ Now I get it
19:04 TimToady m: say (10¹, 10² ... *)[^10]
19:04 camelia rakudo-moar e39ce3: OUTPUT«(10 100 190 280 370 460 550 640 730 820)␤»
19:04 TimToady ZoffixW: ^^^ you need three terms there
19:04 TimToady m: say (10¹, 10², 10³ ... *)[^10]
19:04 camelia rakudo-moar e39ce3: OUTPUT«(10 100 1000 10000 100000 1000000 10000000 100000000 1000000000 10000000000)␤»
19:05 TimToady with only two terms you only get arithmetic, not geometric
19:06 TimToady otoh, if you really want to mod by 10 each time, you just want 10 xx *
19:06 ZoffixW TimToady, oh, right lol. I originally had it as 1, 10, 100 ... Inf and then converted to powers and lost the 1
19:06 TimToady but the mods are cumulative, so you don't have to do the multiplication yourself
19:07 TimToady m: 12345.polymod(10 xx *).say
19:07 camelia rakudo-moar e39ce3: OUTPUT«(5 4 3 2 1)␤»
19:07 TimToady m: 12345.polymod(1,10,100,1000).say
19:07 camelia rakudo-moar e39ce3: OUTPUT«(0 5 34 12 0)␤»
19:07 TimToady unless that's what you're trying to do...
19:09 AlexDaniel ZoffixW: I'm not sure if I like your idea of moving a “Handmade” polymod example from the docs into your blog post, umm… If I'm not mistaken, I was the one who recommended to include such example, simply because it was very hard for me to understand polymod, but the underlying code made it *much* clearer.
19:11 dalek doc: d768666 | (Zoffix Znet)++ | doc/Type/Int.pod:
19:11 dalek doc: Fix incorrect sequence operator progression
19:11 dalek doc: review: https://github.com/perl6/doc/commit/d768666cd7
19:12 ZoffixW AlexDaniel, but what about the new description in the docs, doesn't it make it clearer? The reason I removed that code is because replicates just 1 of the 4 modes .polymod works in, so I figured it'd be confusing to have in there and too wordy to explain that it's just a part of what .polymod does.
19:12 ZoffixW s/because/because it/;
19:13 AlexDaniel ZoffixW: the rest of your commit is fine. I'm just thinking that I'm not the only idiot who is unable to understand it by reading a textual description
19:15 AlexDaniel ZoffixW: and that example is just a simplified version of what actually happens: https://github.com/rakudo/rakudo/blob/c40374237bf​986ef972a7e59aeb671eae72ac69f/src/core/Int.pm#L90
19:17 ZoffixW If by "simplified" you mean implementing just half of that code, sure :) And that code is only half of .polymod code. There's also: https://github.com/rakudo/rakudo/blob/c40374237bf9​86ef972a7e59aeb671eae72ac69f/src/core/Real.pm#L65
19:20 nicqbot joined #perl6
19:20 dalek doc: be5139e | (Zoffix Znet)++ | doc/Type/Int.pod:
19:20 dalek doc: Add implementation example for polymod
19:20 dalek doc: review: https://github.com/perl6/doc/commit/be5139e7ed
19:22 [Coke] "how do I report a bug" -- https://github.com/rakudo/rakudo#reporting-bugs
19:23 ZoffixW huggable, rakudobug
19:23 huggable ZoffixW, rakudobug@perl.org or use perl6 query on http://rt.perl.org ; see https://github.com/rakudo/rakudo/#reporting-bugs
19:23 [Coke] AlexDaniel: if you want that behavior to go back the way it was, or get more eyes on it, please open a bug in RT so it doesn't get lost. (re. the infinite series double grep)
19:25 psch m: say ^Inf .grep: { last if $++ > 10; $_ };
19:25 camelia rakudo-moar e39ce3: OUTPUT«(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 …»
19:25 psch just for clarity: doesn't need a double grep
19:25 psch star-m: say ^Inf .grep: { last if $++ > 10; $_ };
19:25 camelia star-m 2016.01: OUTPUT«(1 2 3 4 5 6 7 8 9 10)␤»
19:25 psch i am fairly sure that should be considered buggy
19:27 ugexe i think the $ state is considered to be inside a { } even though its a post-if
19:27 ugexe so it gets reset every iteration
19:27 psch star-m: say ^Inf .grep: { state $x = 0; say $x; last if $x++ > 10; $_ };
19:27 camelia star-m 2016.01: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤(1 2 3 4 5 6 7 8 9 10)␤»
19:27 psch star-m: say ^Inf .grep: { last if state $++ > 10; $_ };
19:27 camelia star-m 2016.01: OUTPUT«(1 2 3 4 5 6 7 8 9 10)␤»
19:27 psch ahh
19:27 psch ugexe++
19:28 psch i'm not sure i like that difference there - '$ is an anonymous state variable' is something i got very used to
19:28 psch oh duh, that's star there
19:28 psch m: say ^Inf .grep: { last if state $++ > 10; $_ };
19:28 camelia rakudo-moar e39ce3: OUTPUT«(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 …»
19:28 psch m: say ^Inf .grep: { state $x = 0; say $x; last if $x++ > 10; $_ };
19:28 camelia rakudo-moar e39ce3: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤1​4␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27​␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39␤40␤​41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤52␤5…»
19:28 psch so, no, doesn't help :/
19:30 AlexDaniel [Coke]: sure. Thanks you
19:30 psch m: for ^5 { if $_ < 4 { say ++$ } }; for ^5 { say ++$ if $_ < 4 }
19:30 camelia rakudo-moar e39ce3: OUTPUT«1␤1␤1␤1␤1␤2␤3␤4␤»
19:30 AlexDaniel thank*
19:30 psch ugexe: that's what you mean i gather?
19:32 hankache joined #perl6
19:33 AlexDaniel ZoffixW: thank you
19:34 ZoffixW Any time
19:34 hankache evening #perl6
19:34 ZoffixW \o
19:35 ugexe m: (loop { state $a++; say $a; })[^5]
19:35 camelia rakudo-moar e39ce3: OUTPUT«1␤1␤1␤1␤1␤»
19:35 AlexDaniel ZoffixW: #128176 is a good catch. Good job
19:35 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=128176
19:36 ugexe m: my $x = do while ( 1 ) { state $a++; say $a; }; say $x;
19:36 camelia rakudo-moar e39ce3: OUTPUT«1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1​␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1​␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤…»
19:36 ugexe m: my $x = do { while ( 1 ) { state $a++; say $a; }; }; say $x;
19:37 camelia rakudo-moar e39ce3: OUTPUT«(timeout)1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤1​2␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤25␤​26␤27␤28␤29␤30␤31␤32␤33␤34␤35␤36␤37␤38␤39​␤40␤41␤42␤43␤44␤45␤46␤47␤48␤49␤50␤51␤5…»
19:38 dogbert17 evening #perl6
19:38 ZoffixW \o
19:38 ugexe psch: ^ i was guessing it was related to this behavior where adding the { } makes it act as expected
19:38 dogbert17 Hi zoffix, have some new docs for review here, are they ok :)  https://gist.github.com/dogbert17​/5c943bf4448a2ca8f5182ed48a950ac7
19:39 ugexe but that still happens on 2016.01 so it must be unrelated
19:39 psch ugexe: i see.  it doesn't seem related from here fwiw
19:39 psch ah, yeah
19:40 ZoffixW FWIW, I believe Coke found the offending commit yesterday
19:41 ZoffixW dogbert17, there are two commas missing, but the rest looks fine to me: https://gist.github.com/zoffixznet/a214​216441c8f6e59d6d64184acbf57f/revisions
19:41 ZoffixW Hm. Maybe just one comma
19:42 ZoffixW m: class Foo { method bar (Foo: $meow) { say $meow } }; Foo.new.bar: 'meow'
19:42 camelia rakudo-moar e39ce3: OUTPUT«meow␤»
19:42 ZoffixW m: class Foo { method bar (Foo:, $meow) { say $meow } }; Foo.new.bar: 'meow'
19:42 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FSiIpZKkEc␤Malformed parameter␤at /tmp/FSiIpZKkEc:1␤------> 3class Foo { method bar (Foo:7⏏5, $meow) { say $meow } }; Foo.new.bar: '␤»
19:42 ZoffixW dogbert17, yeah, sorry, just one comma in the sentence before "and" :)
19:42 sno joined #perl6
19:43 dogbert17 ZoffixW: fixed
19:43 ZoffixW cool
19:44 dogbert17 ZoffixW: thx, will commit :)
19:44 Ven joined #perl6
19:46 [Coke] yup, alexdaniel's offending commit is in the history somewhere.
19:47 AlexDaniel LHF in docs: https://rt.perl.org/Ticket/Display.html?id=1281​77&amp;results=5d1b0db9c95b5ff958100b8224782f83
19:47 AlexDaniel oops
19:47 AlexDaniel #128177
19:47 AlexDaniel RT #128177
19:47 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=128177
19:47 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=128177
19:49 dalek doc: f7d1a9e | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod:
19:49 dalek doc: Added docs for methods 'parent' and 'child' in IO::Path. ZoffixW++
19:49 dalek doc: review: https://github.com/perl6/doc/commit/f7d1a9e08d
19:53 hankache joined #perl6
19:56 [Coke] whoever runs camelia, we need her on perl6-dev
19:57 geekosaur also synopsebot6 (and both exiting #p6dev)
19:58 camelia joined #perl6
19:58 moritz [Coke]: I'm taking care of camelia
20:01 MadcapJake joined #perl6
20:02 AlexDaniel [Coke]: isn't it something you can do yourself?
20:03 AlexDaniel hmm maybe not
20:03 AlexDaniel I thought that just changing this https://github.com/perl6/evalbo​t/blob/master/freenode.org.conf and restaring camelia is enough
20:04 AlexDaniel but at the same time camelia was on #p6dev but there is no such entry in this config
20:07 Relsak joined #perl6
20:11 Sound joined #perl6
20:13 [Coke] I might have the privs, sure, but I have no idea what buttons to push yet.
20:13 [Coke] But if moritz++ hadn't raised his hand, I could have looked deeper. now I don't have to. :)
20:15 * [Coke] updates his dumb utility script to use polymod.
20:16 AlexDaniel [Coke]: well, almost everyone has the privs. All you have to do is just ask camelia politely :)
20:16 cdg joined #perl6
20:16 [Coke] m: my $time=12345678901; say sprintf "Total time left: %id%ih%im%is ish", ($time.polymod: 60, 60, 24).reverse
20:16 camelia rakudo-moar e39ce3: OUTPUT«Total time left: 142889d19h15m1s ish␤»
20:17 dalek evalbot: af272a7 | moritz++ | freenode.org.conf:
20:17 dalek evalbot: Add #perl6-dev to freenoce config
20:17 dalek evalbot: review: https://github.com/perl6/evalbot/commit/af272a787f
20:30 integral joined #perl6
20:32 huggable joined #perl6
20:36 tokuhirom joined #perl6
20:41 TEttinger joined #perl6
20:49 cpage_ joined #perl6
20:49 dwarring joined #perl6
20:56 _dolmen_ joined #perl6
20:57 remmie joined #perl6
21:00 tokuhirom joined #perl6
21:05 quietfanatic joined #perl6
21:08 yqt joined #perl6
21:20 cdg_ joined #perl6
21:21 adssdfqsfq joined #perl6
21:22 AlexDaniel [Coke]: #128181
21:22 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=128181
21:23 [Coke] AlexDaniel++ perfect.
21:24 cdg joined #perl6
21:24 dalek gtk-simple: 7df7b5b | RabidGravy++ | / (3 files):
21:24 dalek gtk-simple: Add ComboBox, Frame
21:24 dalek gtk-simple:
21:24 dalek gtk-simple: Also add widget tooltips
21:24 dalek gtk-simple: review: https://github.com/perl6/gt​k-simple/commit/7df7b5b062
21:27 RabidGravy only another 300 widgets to add :)
21:27 AlexDaniel m: say ‘z’.succ
21:27 camelia rakudo-moar e39ce3: OUTPUT«aa␤»
21:27 AlexDaniel m: say ‘#’.succ
21:27 camelia rakudo-moar e39ce3: OUTPUT«#␤»
21:28 AlexDaniel m: say (‘#’..‘WAT’)[^20]
21:28 camelia rakudo-moar e39ce3: OUTPUT«(# # # # # # # # # # # # # # # # # # # #)␤»
21:28 AlexDaniel m: say (‘a’..‘WAT’)[^20]
21:28 camelia rakudo-moar e39ce3: OUTPUT«(Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil)␤»
21:28 AlexDaniel /o\
21:29 gfldex m: say (‘a’..‘Egypt’)[^20]
21:29 camelia rakudo-moar e39ce3: OUTPUT«(Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil)␤»
21:31 geekosaur this is the WAT of DWIMmy enumerations
21:31 timotimo yeah :\
21:34 * Zoffix disappears
21:47 rindolf joined #perl6
21:48 psch m: say (eager (‘a’..‘Egypt’))[^20]
21:48 camelia rakudo-moar e39ce3: OUTPUT«(Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil)␤»
21:48 timotimo m)
21:48 psch m: say 'a' cmp 'E'
21:48 camelia rakudo-moar e39ce3: OUTPUT«More␤»
21:48 psch well, there you have it
21:49 psch m: say 20..10
21:49 camelia rakudo-moar e39ce3: OUTPUT«20..10␤»
21:49 psch m: say (20..10)[^20]
21:49 camelia rakudo-moar e39ce3: OUTPUT«Index out of range. Is: 0, should be in 0..-1␤  in block <unit> at /tmp/D_UOL0uovY line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/D_UOL0uovY line 1␤␤»
21:49 psch ...i wonder if that error message works better than the a > E case
21:50 psch well, if there's something to be done, it's probably something like "Can't deduce sequences with negative steps, please use ... and a value-generating closure"..?
21:51 psch m: say 6, 4, * - 2 ... -10
21:51 camelia rakudo-moar e39ce3: OUTPUT«(6 4 2 0 -2 -4 -6 -8 -10)␤»
21:51 psch m: say ('a', *.pred ... 'Egypt')[^20]
21:51 camelia rakudo-moar e39ce3: OUTPUT«Decrement out of range␤  in block <unit> at /tmp/uCEjGWAiu3 line 1␤␤Actually thrown at:␤␤»
21:52 psch m: say 'a'.pred
21:52 camelia rakudo-moar e39ce3: OUTPUT«Decrement out of range␤  in block <unit> at /tmp/o1t6VXxzvt line 1␤␤Actually thrown at:␤  in block <unit> at /tmp/o1t6VXxzvt line 1␤␤»
21:52 psch yeah, i actually like that i think
21:52 psch if you want that ord-y, do it yourself
21:53 psch m: say (‘a’..‘wAT’)[^20]
21:53 camelia rakudo-moar e39ce3: OUTPUT«(a b c d e f g h i j k l m n o p q r s t)␤»
21:53 psch that is kind of funny, cause it can't actually reach 'wAT' either... :S
21:54 psch m: say (‘a’..‘wAT’)[^20].grep: * ~~ /<[A..Z]>/
21:54 camelia rakudo-moar e39ce3: OUTPUT«()␤»
21:54 psch m: say (‘a’..‘wAT’).grep: * ~~ m/<[A..Z]>/
21:54 camelia rakudo-moar e39ce3: OUTPUT«Method 'match' not found for invocant of class 'Any'␤  in block <unit> at /tmp/i4toMZlobu line 1␤␤»
21:54 psch m: say (‘a’..‘wAT’).grep: { $_ ~~ m/<[A..Z]>/ }
21:54 camelia rakudo-moar e39ce3: OUTPUT«()␤»
21:55 psch m: say (‘a’..‘wAT’).grep: { $_.chars > 5 }
21:55 camelia rakudo-moar e39ce3: OUTPUT«()␤»
21:55 psch m: say (‘a’..‘wAT’).grep: { $_.chars > 1 }
21:55 camelia rakudo-moar e39ce3: OUTPUT«()␤»
21:55 psch m: say (‘a’..‘wAT’)
21:55 camelia rakudo-moar e39ce3: OUTPUT«"a".."wAT"␤»
21:55 psch m: say eager (‘a’..‘wAT’)
21:55 camelia rakudo-moar e39ce3: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w)␤»
21:55 psch m: say eager (‘a’..‘ww’)
21:55 camelia rakudo-moar e39ce3: OUTPUT«(a b c d e f g h i j k l m n o p q r s t u v w)␤»
21:56 psch too magical for me vOv
21:56 psch sorry for the spam :S
21:59 Sgeo joined #perl6
22:01 vendethiel joined #perl6
22:10 Actualeyes joined #perl6
22:11 kid51 joined #perl6
22:25 ilogger2 joined #perl6
22:37 vendethiel joined #perl6
22:40 cpage_ joined #perl6
22:53 mohae joined #perl6
22:57 BenGoldberg joined #perl6
23:01 tokuhirom joined #perl6
23:03 cpage_ joined #perl6
23:08 cdg joined #perl6
23:10 skids joined #perl6
23:22 cpage_ joined #perl6
23:24 BenGoldberg joined #perl6
23:31 BenGoldberg joined #perl6
23:32 vendethiel joined #perl6
23:36 aries_liuxueyang joined #perl6
23:42 Sgeo `do` is weird
23:42 Sgeo It turns statements into expressions and some expressions into different expressions
23:42 Sgeo m: do { say "Hi" }
23:42 camelia rakudo-moar e39ce3: OUTPUT«Hi␤»
23:42 Sgeo m: do if True { 5 } else { 6 }
23:42 camelia rakudo-moar e39ce3: OUTPUT«WARNINGS for /tmp/z9A00dMNUf:␤Useless use of constant integer 5 in sink context (line 1)␤Useless use of constant integer 6 in sink context (line 1)␤»
23:42 Sgeo m: say(do if True { 5 } else { 6 })
23:42 camelia rakudo-moar e39ce3: OUTPUT«5␤»
23:43 Sgeo m: say(if True { 5 } else { 6 })
23:43 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/63D3oArt2g␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/63D3oArt2g:1␤------> 3say(if 7⏏5True { 5 } else { 6 })␤»
23:47 Sgeo m: 5 ~~ :(Int $a); say $a
23:47 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/vOtXHHg2Cm␤Variable '$a' is not declared␤at /tmp/vOtXHHg2Cm:1␤------> 5 ~~ :(Int $a); say 7⏏5$a␤»
23:47 Sgeo Is what I attempted possible somehow?:
23:47 Sgeo m: 0 ~~ True
23:47 camelia rakudo-moar e39ce3: OUTPUT«Potential difficulties:␤    Smartmatch against True always matches; if you mean to test the topic for truthiness, use :so or *.so or ?* instead␤    at /tmp/Ssj9MpxiK_:1␤    ------> 0 ~~ 7⏏5True␤»
23:48 Juerd Sgeo: What were you attempting? :)
23:48 Sgeo Smartmatch against True/False behaves the way it does to support DWIM behavior of expressions on the right of ~~, I assume?
23:48 Sgeo Juerd, pattern matching and having the value go into the variable
23:49 Juerd What do you mean by pattern matching?
23:52 Sgeo ala Haskell. SImilar to smartmatching except you can have variables in the pattern (here a signature) and in a scope that variable has a value
23:52 Juerd I don't know any Haskell
23:53 Juerd m: my (Int $foo, Int $bar) := (42, 23); say $foo; say $bar;
23:53 camelia rakudo-moar e39ce3: OUTPUT«42␤23␤»
23:53 Juerd Like that?
23:53 Sgeo yes, ty
23:53 Sgeo Did := need to be used there?
23:53 Sgeo Well, no... what if I want it to be able to fail
23:53 Sgeo like `when` can?
23:54 Juerd Can you give an example of what you want, in a non-contrived context?
23:54 Juerd I have no idea what you really want :)
23:54 Juerd Or why...
23:54 Sgeo I like comparing languages, that's the real "why"
23:54 Sgeo >.>
23:55 Sgeo But it feels like ~~ is a pervasive pattern matching feature, except... missing something
23:55 Juerd I don't see how it would do "patterns"
23:56 Juerd foo ~~ bar is just syntactic sugar for bar.ACCEPTS(foo)
23:56 Juerd e.g. 5 ~~ Int is the same as Int.ACCEPTS(5), and "foo" ~~ /o/ is the same as /o/.ACCEPTS("foo")
23:58 BenGoldberg m: if( (^42).pick ) -> $x { say "true: $x" } else { say "false: $x" }
23:58 camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5===␤Word 'if' interpreted as 'if()' function call; please use whitespace instead of parens␤at /tmp/yUdSQ89MgN:1␤------> 3if7⏏5( (^42).pick ) -> $x { say "true: $x" } ␤Unexpected block in infix position (two terms in a row)␤at…»
23:58 tbrowder joined #perl6
23:58 Sgeo Maybe if bar was a closure, its .ACCEPTS could ... hmm, accept a closure?
23:59 Sgeo In addition to its normal argument
23:59 Juerd Sgeo: If the RHS of ~~ (or the invocant to ACCEPTS) is a closure, it'll get the LHS (or the argument) as its argument, and whatever is returned by the closure, is returned by the smartmatch.

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

Perl 6 | Reference Documentation | Rakudo