»ö« 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.
00:03 chris2 joined 00:06 |2701 left, |2701 joined, |2701 left, |2701 joined 00:16 mr-foobar left 00:17 mr-foobar joined, cdg left
mspo facebook.github.io/reason/images/RtopOptCrop.gif 00:18
00:18 cdg joined
mspo pretty sweet repl 00:18
Zoffix doesn't understand why everyone is so obsessed with repls :S 00:20
00:22 cdg left
Xliff repl? 00:26
Zoffix: How is Doom 2016. I was thinking about getting it, but $60 is kinda high for a remake.
Zoffix Xliff, I love it. It's the perfect remake. 00:27
AlexDaniel yeah, well, just trying to install perl 6 into some specific directory is already an adventure 00:33
mspo put that directory in your path before you start 00:35
00:35 Possum left 00:41 matiaslina joined 00:47 chee is now known as saladfish, mr-foobar left 00:48 mr-foobar joined 00:49 saladfish is now known as chee
Zoffix Nice: phys.org/news/2016-05-ibm-scientist...rough.html 00:51
01:01 ssotka left 01:05 sortiz joined 01:06 Actualeyes joined 01:08 yqt left 01:12 Actualeyes left 01:20 jcallen left 01:21 jcallen joined 01:22 Zoffix left 01:23 Zoffix joined 01:24 Zoffix left 01:25 Zoffix joined 01:26 pierre joined 01:35 hotel_california left, hotel_california joined 01:42 Actualeyes joined 01:43 BenGoldberg left 01:44 sufrostico left 01:46 ilbot3 left 01:47 huggable left, huggable joined 01:48 ilbot3 joined, molaf left 01:49 kid51 joined 01:50 BenGoldberg joined 01:52 willthechill joined 01:55 labster joined
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…»
diakopter labster: hi
labster hi diakopter!
01:57 zakharyas joined 02:00 molaf joined 02:01 Possum joined 02:02 noganex_ joined 02:05 matiaslina left
Zoffix .u ' 02:05
yoleaux U+0027 APOSTROPHE [Po] (')
02:05 noganex left
Zoffix m: say 031 == 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 031 == 1 ?? 'a' !! 'b'␤Bogus postfix␤at /tmp/TfdB8rmQEs:1␤------> 3say 7⏏5031 == 1 ?? 'a' !! 'b'␤ expecting any of:␤ inf…»
02:13 mr-foobar left 02:14 mr-foobar joined 02:16 AlexDaniel left 02:17 BenGoldberg left
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:18
02:19 BenGoldberg joined
teatime Zoffix: Do you prefer MMD to Pandoc? 02:24
Zoffix teatime, never heard of Pandoc 02:25
teatime o rly? look into it. my personal favorite markup renderer / converter / parser.
written in haskell, extensible in arbitrary languages.
I have a feeling it would appeal to this demographic. 02:27
Zoffix teatime, am I looking at the wrong thing? I see an utility for converting from format X to Y: pandoc.org/README.html 02:28
02:28 wamba left
teatime That's correct, that's what it is. 02:28
Zoffix So I'm unsure how a program compares to document format :D
teatime Y can be PDF, HTML, man pages, etc. 02:29
Zoffix: Well, it implements a number of (optionally-enabled) extensions to Markdown
Zoffix But what is X? Is there a special Pandoc language that's superior to MultiMarkdown?
teatime Pandoc Markdown
02:29 kid51 left
teatime and I don't know if it's superior, but you can look and decide if you think it is. 02:29
X can be classic Markdown, Github-Flavored Markdown, Pandoc Markdown, HTML, LaTeX, DocBook, etc. 02:30
Zoffix: pandoc.org/diagram.jpg 02:32
labster Pandoc: 5 stars, would execute again
02:32 kid51 joined
labster That image is really only useful for the fractals 02:32
02:33 kid51 left
teatime Zoffix: pandoc.org/README.html#pandocs-markdown 02:33
02:37 cooper joined
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
two format corroborate that view.
😜
TEttinger you haven't heard of pandoc? 02:40
I mean I've heard of MMD and Pandoc, but I don't consider them competing 02:41
when was the last time MMD had or needed an update?
Zoffix TEttinger, no, never heard of it. And it was just presented to me as a superior alternative to MMD, hence my answer 02:42
TEttinger I mean, it is superior if you compare features :) 02:43
since MMD is one of the things it allows you to convert
02:44 aries_liuxueyang left
Zoffix I'm talking about the languages--Pandoc Markdown vs. Multi Markdown. 02:44
teatime lol, ok Zoffix, whatever works for you :) 02:46
02:47 aries_liuxueyang joined
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.
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:50
Zoffix Can we use haskell libraries from Perl 6? 02:51
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
specify that so that it parses exactly that.
02:53 aborazmeh joined
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
02:53 aborazmeh left, aborazmeh joined
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.
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
Zoffix: I'd appreciate a link. whatever case that is, it has definitely never come for me, nor anything equally ugly.
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?
Zoffix teatime, it's on this page: rmarkdown.rstudio.com/authoring_pan...html#lists search for <!-- end of list --> 02:57
geekosaur which is DIHWIDT really
Zoffix teatime, and still, I've no idea how to use a haskell library from P6 :)
teatime geekosaur: not necessary, by default inline html is allowed.
02:57 kurahaupo joined
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
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) 02:58
02:58 aries_liuxueyang left
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
03:00 noganex joined, aries_liuxueyang joined
teatime geekosaur: argh, yeah I meant to correct myself, and say, I think pandoc essentially provides C bindings 03:00
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:03 noganex_ left
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
and I was only assuming they linked to it
that seems to be the case, and it does not provide C wrapper itself. 03:09
03:10 cpage_ left
teatime oh, perfect... Zoffix: final bit, this looks like exactly what I should have found for you originally: github.com/jgm/pandoc/wiki/Pandoc-...timarkdown 03:10
03:11 |2701 left
teatime oh, and I will mention: my personal favorite / killer feature, is the very complete/rich citation support. 03:12
03:13 ssotka joined
Zoffix Even that page's comparison treats Pandoc as married to the utility that handles it :) 03:13
teatime yes; that does seem to be a true fact, unless, I guess, you're writing your app in Haskell :) 03:14
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: github.com/ShabbyX/libpandoc 03:16
dalek c: a52bd24 | (Daniel Green)++ | doc/Type/Range.pod:
Fixed some typos in Range.pod
03:17
c: 5b11c47 | (Zoffix Znet)++ | doc/Type/Range.pod:
Merge pull request #521 from MasterDuke17/master

Fixed some typos in Range.pod
teatime aye, saw it, but was concerned about whether it was maintained actively enough
Zoffix I think I'll go with fixing IRC::Client. 'cause huggable uses it and I'm sick of restarting her daily :P 03:18
huggable, hug me 03:19
huggable hugs Zoffix
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?
a lot of games have proprietary/custom but relatively simple binary archive formats. 03:21
worst case, you might have to reverse-engineer at least some of the format yourself to get what you want.
MadcapJake old game called Ancient Conquest, it has these .dkd, .dkx files but I can't find anything about them online
teatime: how do you go doing that? :P 03:22
teatime with a hex editor and a lot of time to waste
and probably a good debugger too
jeek Jake: forum.xentax.com/viewtopic.php?f=10&t=6819 03:23
MadcapJake ehh, sounds a bit over my head I think
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: aluigi.altervista.org/quickbms.htm
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.
MadcapJake haha jeek! this could be it, same extensiosn at least, what language is that script in? 03:25
03:25 aries_liuxueyang left
teatime but for an older game that maybe wasn't super-popular new? don't hold your breath. 03:25
03:25 Actualeyes left
jeek Jake: Google Harder next time. 03:25
I just did a search for: dkd dkx file format 03:26
It was the second result. ;)
MadcapJake wow, I did "dkd dkx extension", and "dkd dkx game files" :P
geekosaur 2nd line of that script is "# script for QuickBMX aluigi.altervista.org/quickbms.htm"
er QuickBMS 03:27
MadcapJake xD QuickBMX, "goto halfpipe, perform 180, land bike"
TEttinger hardgoogle
jeek Google Extreme
03:27 aries_liuxueyang joined
geekosaur has pretty much reached "brain and brain what is brain" :/ 03:28
03:28 kurahaupo left
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, cpage_ left 03:39 cpage_ joined 03:43 pierre left
MadcapJake oi this quickbms thing was made for 32bit 03:43
03:44 pierre joined 03:48 hotel joined 03:49 hotel_california left
MadcapJake ok that's too much of a pain :P 03:49
03:55 pierre left
Xliff MadcapJake, you can't get it working? 03:55
MadcapJake nah, would need to install lots of 32bit libs, I think 03:56
Xliff Ah. 03:57
Wonder if that would work under WINE, then.
MadcapJake Xliff: was thinking that, they do provide an exe file already built even 03:58
Xliff You
s/ou/up/
04:04 pierre joined
MadcapJake well that kinda worked but the files it extracts are unreadable 04:08
04:08 molaf left
MadcapJake oh nautilus...accidentally initiated a search inside there and now it's completely locked up xD 04:12
04:13 willthechill left
geekosaur MadcapJake, yeh, I looked that thing up and the suggestion is that they're encrypted somehow 04:13
which would make sense if it's a commercial game 04:14
MadcapJake bummer yeah it was :P
geekosaur (well, it doesn't really make sense, but it does fit what commercial game devs tend to do...)
MadcapJake eh well, at least I gave gvfsd-trash something to do :) 04:16
MadcapJake is off to bed 04:19
04:19 mr-foobar left, mr-foobar joined 04:20 MasterDuke left
teatime .u U+20dd 04:20
yoleaux U+20DD COMBINING ENCLOSING CIRCLE [Me] (◌⃝)
teatime anyone in a text term that can actually see the ^^ combining circle?
04:21 BenGoldberg left 04:22 inokenty left 04:25 willthechill joined 04:34 mr-foobar left 04:36 cbk joined, mr-foobar joined
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:37
04:40 pierre left 04:41 pierre joined, pierre left, pierre joined, TreyHarris joined 04:43 pierre left 04:46 pierre joined, khw left, Cabanossi left 04:48 Cabanossi joined
teatime skids: word, thx 04:48
apparently urxvt, zsh, and friends etc. will actually draw it after all
I just gotta find a font w/ it in it :)
04:50 aborazmeh left
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
I kicked all libvte-based terms off my system, so I can't say what they do.
linux console just shows a diamond. 04:53
(no combining)
04:55 pierre left 04:59 Actualeyes joined 05:00 pierre joined 05:14 ilogger2 joined, ChanServ sets mode: +v ilogger2, go|dfish joined, aries_liuxueyang joined 05:23 aries_liuxueyang left 05:27 aries_liuxueyang joined
Xliff m: my $a = 0; say "Yes" if ! $a 05:28
camelia rakudo-moar e39ce3: OUTPUT«Yes␤»
05:40 domidumont joined
teatime Xliff: find anything on efficienly appending files? 05:41
I'm trying to figure out how to pipe IO::Handles :) probably involves .supply, somehow... 05:42
Xliff Found something for perl5 using $/.
I haven't yet gotten to Supply and Supplier.
teatime me either
05:43 domidumont left
Xliff I'm thinking something like this: "$fo.write($fi.read(BLOCKSIZE) while ! $fi.eof" 05:44
05:44 domidumont joined
Xliff Oops... 05:44
05:44 inokenty joined
Xliff Correction: "$fo.write($fi.read(BLOCKSIZE)) while ! $fi.eof" 05:44
But now I have to figure out if I can reopen a :w IO::Handle as :r and then .seek(0, SeekFromBeginning) 05:47
I might need to .close and re-open…..
05:52 CIAvash joined
Xliff Supply looks neat, but I don't need concurrency for this application. 05:53
05:53 domidumont left
teatime I do. 05:56
ugexe a supply doesnt mean concurrency 06:02
06:03 domidumont joined 06:14 CIAvash left 06:16 lizmat joined 06:18 CIAvash joined 06:24 pierre_ joined 06:26 pierre_ left 06:27 pierre_ joined, firstdayonthejob joined 06:33 firstdayonthejob left
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»
moritz I kinda wonder why it doesn't on IRC 06:47
m: my $o = $*OUT; my $s = $o.Supply; $s.tap: { note("TAP $_") }; $o.print("adsfasfd") 06:48
camelia rakudo-moar e39ce3: OUTPUT«adsfasfd»
moritz seems it doesn't tap when there's no terminal?
ugexe if you press enter in the terminal it will fire, but keeps running 06:49
moritz sure, because it feeds itself
nope, even if I change the say to note, it hangs 06:50
06:51 wamba joined
moritz seems the $*OUT.tap call hangs here 06:51
erm, $*OUT.Supply.tap
CIAvash Xliff: open('file1', :a).write: 'file2'.IO.slurp: :bin 06:52
or 'filetest.txt'.IO.spurt: 'filetoast.txt'.IO.slurp(:bin), :append 06:56
06:58 RabidGravy joined
RabidGravy Boom! 07:02
dalek c: aa84e0b | (Daniel Green)++ | doc/Type/Any.pod:
Minor fixes to Any.pod
07:08
c: 238ac7d | (Daniel Green)++ | doc/Type/ (9 files):
Mostly minor fixes, a slightly more substantial fix in Bag.pod
c: b239cbc | RabidGravy++ | doc/Type/ (10 files):
Merge pull request #522 from MasterDuke17/master

Some more minor fixes
07:13 tokuhirom joined, ufobat joined
ufobat morning 07:13
moritz \o 07:16
ufobat: are you coming to Erlangen.pm tonight?
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
ufobat and on the other side holidays aren't that bad :) 07:19
07:20 Woodi joined
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:20
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.
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 }
and when you want to wait for it to be done: await $promise; 07:24
CIAvash teatime: I was only responding to "a way to append one file to another" 07:25
07:36 pierre_ left 07:41 ufobat left 07:47 pierre_ joined 07:48 abraxxa joined, _mg_ joined
Xliff CIAvash, won't using slurp read the file into memory? 07:49
CIAvash Xliff: I overlooked "a cheap way" :/ 08:01
nine Xliff: seriously with Perl being about pragmatism and Perl 6 having less than stellar performance, have you considered shell("cat $source >> $target")? 08:09
timotimo open the two files, then NativeCall to "sendfile" 08:10
nine That would be the high tech way. And probably the fastest way possible :) 08:11
timotimo wouldn't cat do that same thing?
nine Yes, but the cat thing has the overhead of starting a shell and cat
timotimo ah
well, NativeCall overhead is also like 1000000x of what it could be when we finally get around to optimizing it :)
08:13 avalenn joined
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
for slurp, we could do that, too. i wonder how much that's worth.
nine busybox's cat uses sendfile
08:18 darutoko joined, woodruffw joined, woodruffw left 08:19 woodruffw joined
nine FADVISE_SEQUENTIAL seems to double the readahead window size 08:19
timotimo it'll probably read huge buffers anyway, so i expect the program alone would keep the disk busy enough on its own 08:21
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:26
08:27 YoungFrog joined
teatime nine: so, 512B to 4kiB ? 08:27
seems like it would be faster to be a lot larger than that
nine I would for example always prefer the system's cp to a Perl module for file copying. Especially because auf --reflink=auto
teatime or did you mean, it chooses a multiple?
nine teatime: insize = io_blksize (stat_buf); insize = MAX (insize, outsize); ok &= simple_cat (ptr_align (inbuf, page_size), insize); 08:29
Xliff So you think sendfile() would be better? 08:31
nadim Good morning 08:32
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
Xliff Might code in a fallback to the inefficient method if that's the case.
Thanks for the suggestion! teatime++ && CIAvash++ 08:35
teatime wait, did I actually help? :)
Xliff Oh! nine++
teatime lol, no, I didn't, as it turns out :) 08:36
teatime hugs you all anyway, goes to get breakfast.
Xliff MMMM.... breakfast
08:36 dakkar joined
Xliff teatime: You mentioned sendfile 08:36
teatime negatif
Xliff Oh! that was timotimo++ 08:37
teatime I think that was timotimo
Xliff Yeah. It's 4:30am here and I'm drinking my last beer.
You t's all look alike! ^_^
teatime, you still get the pluses because you're you. 08:38
timotimo i'm sorry :) 08:39
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:40
08:41 buharin_ joined, jargan joined, labster1 joined, sQuEE` joined
CIAvash Xliff: I didn't really help either, did I?! :) 08:41
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
08:42 clkao_ joined, alva_ joined, pierrot_ joined
Xliff CIAvash, everyone here did! 08:42
08:43 jcallen_ joined, kipd_ joined, chansen__ joined 08:44 hotel joined, obfusk_ joined, Lucas_One_ joined, aindilis` joined, richi238 joined, petercom1and joined, mls_ joined, pmichaud_ joined, integral_ joined, integral_ left, integral_ joined 08:45 sergot_ joined, jusafing_ joined, remmie2 joined, hanekomu joined, Juerd_ joined, willthechill joined, hobbs joined, hobbs left, hobbs joined, riatre_ joined 08:46 Juerd_ is now known as Juerd
teatime wheeeee 08:46
08:46 kipd_ is now known as kipd
RabidGravy boom 08:46
08:46 chansen__ is now known as chansen_, samb1 joined, ggherdov_ joined 08:47 zakharyas joined 08:48 CIAvash left, dg joined 08:49 clkao_ is now known as clkao 08:50 ilmari joined, simcop2387 joined 08:52 sno joined 08:54 damnlie joined 08:55 ggherdov_ is now known as ggherdov 08:56 PotatoGim joined 08:57 mls_ is now known as mls, notbenh_ joined 08:58 MadcapJake joined 09:00 SmokeMachine____ joined 09:01 willthechill left 09:03 Spot__ joined 09:04 CIAvash joined 09:09 jargan is now known as jast 09:14 g4 joined 09:24 rindolf joined 09:26 olinkl joined, cgfbee joined, grondilu joined
grondilu Hi #perl6 09:27
RabidGravy erp
09:27 ocbtec joined 09:31 labster joined 09:34 pochi joined 09:35 labster1 left, pmurias joined 09:38 zakharyas left 09:40 brrt joined 09:42 pierre_ left, silug joined, ufobat joined 09:46 pierre_ joined 09:56 pierre_ left 09:58 pierre_ joined 10:04 CIAvash left 10:05 ufobat left 10:08 buharin joined
buharin hi 10:08
:)
10:17 aries_liuxueyang left
gregf_ m: "1".Int.can("+") 10:17
camelia ( no output )
gregf_ shouldn't that return me some methods? :| 10:18
psch gregf_: infix:<+> is no method
10:18 aries_liuxueyang joined
gregf_ psch: sorry, wasnt able to get you 10:20
is the infix, prefix, postfix bit linked to the parser?
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
timotimo m: say &infix:<+>
camelia rakudo-moar e39ce3: OUTPUT«sub infix:<+> (Mu $?, Mu $?) { #`(Sub+{<anon|44734144>}+{Precedence}|63420528) ... }␤»
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
psch ...right, it's probably more the other way around 10:22
not "how we want it treated" but "where we want the parser to expect it"
10:23 CIAvash joined, labster left
gregf_ hmm - ok 10:23
m: &infix:<+>.(10,20) # that works. surely thats a Sub then? global one?
camelia ( no output )
gregf_ m: say &infix:<+>.(10,20) 10:24
camelia rakudo-moar e39ce3: OUTPUT«30␤»
psch m: say CORE::.keys.grep({ $_ ~~ / 'infix:<+>' / })
camelia rakudo-moar e39ce3: OUTPUT«(&infix:<+>)␤»
10:26 buharin left
gregf_ psch: timotimo cheers 10:27
i was trying a simple calculation and it was'nt working :|.like a foldleft 10:29
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] })
camelia rakudo-moar e39ce3: OUTPUT«-> $a, $b { #`(Block|87973960) ... }␤»
gregf_ timotimo: yep ^^
timotimo oh, you're trying to build your own expression parser?
gregf_ yeah kinda... *a simple one*
grondilu gregf_: that's pretty obscure code 10:37
gregf_ oh - is it :| 10:40
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
camelia rakudo-moar e39ce3: OUTPUT«-> ;; $_? is raw { #`(Block|80595272) ... }␤»
arnsholt But it's likely one of those things you just need to get used to
gregf_ but that code would literally be the same in scala ruby for example
%{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:42
arnsholt Well, reduces in general, TBH =) 10:45
But I do suspect it's an idiom you just need to assimilate
gregf_ heh, you're right :) 10:46
arnsholt Kind of like map/filter/comprehensions instead of for loops
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:47
10:50 avalenn left, edenc joined 10:51 avalenn joined 10:59 CIAvash left 11:02 pierre_ left 11:09 _mg_ left 11:10 CIAvash joined 11:22 pmurias_ joined 11:24 pmurias left 11:26 buharin joined 11:27 buharin left 11:28 CIAvash left 11:31 kid51 joined 11:32 kid51 left 11:42 brrt left 11:43 awwaiid joined
masak arnsholt: jumping into the discussion here, but... 11:44
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:45
11:50 avalenn_ joined 11:52 |2701 joined 11:53 avalenn left 11:54 cgfbee left 11:55 aries_liuxueyang left, kaare_ joined 11:56 cgfbee joined 11:57 nicqbot joined 11:58 aries_liuxueyang joined 11:59 avalenn_ left 12:00 tphilipp joined 12:02 tphilipp left 12:04 avalenn joined, CIAvash joined 12:05 _mg_ joined
arnsholt masak: Yeah, that sounds reasonable 12:09
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
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
arnsholt Yeah, definitely 12:14
12:14 aries_liuxueyang left
arnsholt I almost wrote something similar 12:14
Basically that reduces seem to be a higher-level description of the same fundamental process
12:16 aries_liuxueyang joined
masak the `reduce` function is my least favorite higher-order function :) 12:18
moritz why?
masak it doesn't provide all that much relief in terms of being able to ignore the mechanics/details of the transform
not like map and grep do, anyway
I think it's related to the fact that with `reduce`, outputs are fed in as inputs to the next step 12:19
moritz I kinda disagree 12:21
reduce hides state (the variable into which elements are being reduced) 12:22
whereas a grep, to me, is just a map { $elem if $elem ~~ $condition }, which doesn't really hide state
so I find reduce a bigger relieve than grep
your mileage varies, obvisously :-) 12:23
masak we may or may not disagree, even
moritz wow. Others agree to disagree. We disagree about whether we disagree :-) 12:24
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]) })
camelia rakudo-moar e39ce3: OUTPUT«(0 60)␤»
masak here's an example where I think .reduce did more to confuse than to help
there's a lot of "moving parts" in that code to understand. lots of structure to unpack
moritz yes, but that's just because you chose a complex reduction step 12:26
if you call grep with a complex search condition, it might also more confuse than help
masak I agree as far as that goes
moritz : say [(1, 10), (2, 20), (3, 30)].grep({ $ += .[1] >= 15}) 12:27
m: say [(1, 10), (2, 20), (3, 30)].grep({ $ += .[1] >= 15})
camelia rakudo-moar e39ce3: OUTPUT«((2 20) (3 30))␤»
masak but in my experience, there are (a) simple reduce cases, like .reduce(&infix:<+>), which are better written as &sum
12:27 pmurias joined
masak and (b) complex cases, which are harder to understand than an imperative loop 12:27
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))␤»
masak due to precedence
jnthn $a and $b aren't the best choice of names if you want the thing to be understandable
masak let me write the easy-to-read version of my reduce 12:29
jast $A and $Α are much better choices
12:29 pmurias_ left
masak m: say [(1, 10), (2, 20), (3, 30)].map(*[1]).sum 12:29
jnthn :P
camelia rakudo-moar e39ce3: OUTPUT«60␤»
masak the way I did the reduce obscured the fact that I was summing the second element
which is exactly my point
dalek c: 8015be8 | (Zoffix Znet)++ | doc/Type/Int.pod:
.polymod is a method, not a routine
12:30
masak Zoffix: methods are routines :)
m: say Method ~~ Routine
camelia rakudo-moar e39ce3: OUTPUT«True␤»
moritz masak: would it be fair to say that .reduce tempts you to write unnecessary complex code?
12:31 ZoffixW joined, wamba left
ZoffixW masak, isn't that just internal detail? 12:31
masak moritz: yes, I'd say so
ZoffixW m: polymod
camelia rakudo-moar e39ce3: OUTPUT«5===SORRY!5=== Error while compiling /tmp/lwzqSiIvr7␤Undeclared routine:␤ polymod used at line 1␤␤»
masak ZoffixW: no, it's a subsetship
ZoffixW: methods are routines. subs are routines too. macros are routines.
blocks are not routines.
moritz fwiw I agree with ZoffixW++'s patch, because it makes the docs more precise
masak yes, me too 12:32
moritz and I agree with masak++'s comment too :-)
ZoffixW k :D
moritz hug overflow!
masak I like the fix, but the commit comment is wrong :P
ZoffixW Noted :)
moritz quick, let's rewrite history!
masak ".giraffe is a mammal, not an animal"
12:32 huggable joined 12:33 aries_liuxueyang left
ZoffixW hehe :) 12:33
12:34 ZoffixW left 12:35 aries_liuxueyang joined 12:46 buharin joined 12:48 itaipu joined 12:54 g4 left 12:56 aries_liuxueyang left 12:58 CIAvash left 13:00 aries_liuxueyang joined 13:01 aries_liuxueyang left 13:04 aries_liuxueyang joined 13:06 aries_liuxueyang left 13:07 buharin left 13:08 peteretep joined 13:09 avalenn left 13:10 willthechill joined, aries_liuxueyang joined 13:12 zakharyas left 13:15 aries_liuxueyang left 13:17 avalenn joined, buharin joined 13:23 trkldoi joined, skids joined 13:26 wamba joined 13:27 aries_liuxueyang joined
Xliff Does anyone have up-to-date documentation for Buf and Blob? 13:31
13:31 buharin left
masak Xliff: how does docs.perl6.org/type/Buf and docs.perl6.org/type/Blob seem as a starting point? 13:35
13:36 Actualeyes joined, Gothmog_ joined 13:39 buharin joined
moritz and if you find something out-of-date in there, please file an issue 13:40
13:40 Ven joined, aries_liuxueyang left
tony-o www.telegraph.co.uk/technology/2016...orlds-big/ 13:42
Xliff masak: Yes, been there. Those seem to lack any information on .push, et all.
This RT gives the impression that they were implemented: rt.perl.org/Public/Bug/Display.html?id=125182 13:43
Ven o/
Xliff I will have to hit the source to see exactly what is missing.
13:43 sergot_ is now known as sergot 13:44 willthechill left, cdg joined, aries_liuxueyang joined
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
I will file for Buf. I don't know how many of those are appropos for Blob
moritz none 13:49
because Blob is immutable
m: say WHAT $*GROUP
camelia rakudo-moar e39ce3: OUTPUT«(IntStr)␤»
Xliff Aaand... RT is very (new) user unfriendly. 13:51
Where can I file a new bug as anonymous?
Ven send an email
13:53 buharin left
Xliff I registered with bitcard. 13:54
Ven: Send an email where?
The page doesn't say, either.
arnsholt rakudobug@$something_i_forget IIRC
jnthn It's in the Rakudo README iirc 13:55
Xliff rt.perl.org/Ticket/Display.html?id...e5247e1f27 13:57
'k -- and with that, I turn into a Pumpkin. See you all in a few hours.
13:58 mohae_ joined
nine tony-o: that's...wow 14:01
14:02 Ven left 14:05 ptolemarch joined 14:15 ZoffixW joined
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␤␤»
ZoffixW This line should read `if $more < 0 and $inf` shouldn't it: github.com/rakudo/rakudo/blob/nom/...eal.pm#L70 14:17
Or rather... what fail should not be there in the first place.
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:18
Hm. Or maybe I did something weird that I got negatives in my output 14:20
(-0.000888824462890625kg -3.640625g -232mg 655360μg -3087007744ng)
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 …»
moritz looks like an overflow to me
m: say 151443434343434343434343.Num
camelia rakudo-moar e39ce3: OUTPUT«1.51443434343434e+23␤»
ZoffixW k, never mind :)
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 ...)␤»
moritz ... or numerical errors
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.
ZoffixW Heisenberg's Uncertainty Princple :P
Xliff Wonder what I'd find if I ran one of Trump's speeches through it...
moritz Xliff: the abyss
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
geekosaur contemplates whether neural nets can be driven to psychosis 14:25
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
geekosaur (alternately, rebuttals combining misparses with Markov Chaney >.> )
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:27
which is pretty much a neurological dysfunctionality :-) 14:28
geekosaur yep
14:28 ZoffixW left
Xliff tony-o, link in a PM? 14:28
14:32 tokuhirom left
gregf_ voting in the US election is prolly the toughest decision on the planet *ducks and runs* 14:33
"most taxing to a human mind"
tony-o Xliff: sent
gregf_: not really 14:34
14:36 _mg_ left 14:37 lizmat left
llfourn m: say Bool.pick # algorithm I use for voting in election 14:38
camelia rakudo-moar e39ce3: OUTPUT«False␤»
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
* presidential
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:41
tony-o haha, i agree - the persuasion side of the whole thing is interesting to me too 14:42
14:47 avalenn left, willthechill joined 14:49 _mg_ joined
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
14:50 avalenn joined 14:51 Possum joined, Possum left, Possum joined
llfourn teatime: TIMTOWTDI 14:52
ugexe does this diag() really belong in subtest? github.com/rakudo/rakudo/blob/nom/...t.pm6#L296
llfourn (they are the same afaik)
ugexe its defaulting to a verbosity that prove provides with `-v`, so if you *do* run with -v you have redundancy 14:53
14:53 Possum left 14:54 Possum joined
tony-o does .reduce guarantee order? 14:54
ugexe reduce's arguments come in order yes
14:55 avalenn left 14:57 Possum left, Possum joined 14:58 avalenn joined 14:59 aries_liuxueyang left 15:02 aries_liuxueyang joined 15:14 trkldoi left 15:17 avalenn left 15:19 avalenn joined, avalenn left 15:20 khw joined
ugexe ah `diag` indeed does not belong in subtest gist.github.com/ugexe/0fd759225aef...cc87603206 15:20
15:24 hotel_california joined 15:25 ssotka joined, hotel left 15:28 grondilu left, ZoffixW joined 15:30 aries_liuxueyang left 15:31 kurahaupo joined
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
ugexe maybe proclaim, but im not sure 15:33
15:34 |2701 left, |2701 joined, |2701 left, |2701 joined, aries_liuxueyang joined
ZoffixW Just toss it entirely. PR submitted: github.com/rakudo/rakudo/pull/771 15:35
perigrin w82
ZoffixW That change went in just 2 days ago from my implementation of subtest multi 15:36
ugexe heh 770 already does that
ZoffixW haha :D
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:37
15:38 tokuhirom left, hotel joined 15:40 hotel_california left, willthechill left 15:42 nicqbot left 15:48 kurahaupo_ joined 15:51 kurahaupo left 15:53 _mg_ left
ZoffixW New blog post: Perl 6 .polymod: Break Up a Number Into Denominations: perl6.party/post/Perl6-.polymod-bre...ominations 15:57
psch, Alex[tab] ^ you said you didn't understand .polymod last night, so here, if you're interested :)
15:59 abraxxa left, hotel_california joined 16:00 hotel left
jnthn ZoffixW++ # nice post :) 16:01
psch ZoffixW: i don't really have brains today, i notice... :)
16:01 pecastro joined
ZoffixW :) 16:01
moritz as anybody looked at threatpost.com/academics-make-theo...on/118150/ a little deeper? 16:03
geekosaur key word there is "theoretical" 16:04
16:05 pierrot_ is now known as pierrot
geekosaur eccc.hpi-web.de/report/2015/119/ (via www.sciencedaily.com/releases/2016...15441.htm) --- although I misremembered, I guess they already expanded it to random sequences 16:06
"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:07 ZoffixW left, ssotka left
nemo geekosaur: yeah, it's theory, but seems like it would immediately be applicable to, oh, /dev/random 16:08
geekosaur: since your computer is combining poor entropy sources most of the time
16:08 ianm joined
geekosaur I meant the "Their paper shows how to generate only one truly random number" part 16:08
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
ianm Shout-out from OSCON Austin, TX. Larry Wall is currently presenting about PERL6. Very healthy crowd.
nemo geekosaur: for more bits, you'd just need more input ☺
tony-o hi ianm
ianm Hi tony-o
nemo geekosaur: looks like the link you gave, unsurprisingly, links the extractor's error to the input bits 16:10
geekosaur: so you could just decide exactly how confident you wanted to be
most of the time for low-grade sources you have quite a lot of bits
16:12 ssotka joined 16:16 stmuk2 joined
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:19
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
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
nemo such that reusing the streams could cause the error to multiply
16:21 hotel_california left
dalek c: 8307f6c | (Zoffix Znet)++ | doc/Type/Int.pod:
Improve description of .polymod
16:24
16:27 dogbert17 joined
ilmari polyamorous mods? 16:28
geekosaur customer call... anyway yes that is what I inferred from that, having not read the original
ilmari in constant battle with monogamous rockers?
16:28 pecastro left
geekosaur (which is likely to be well over my head; I am not very mathy) 16:28
16:29 stmuk2 left 16:32 huggable left, huggable joined 16:33 domidumont left 16:34 tokuhirom joined 16:35 freeze joined 16:37 mohae joined, sno left 16:39 tokuhirom left 16:40 mohae_ left 16:42 ianm left 16:43 sufrostico joined 16:47 petercom1and is now known as petercommand, keix joined, stmuk joined 16:48 ianm joined
dalek k-simple: e91fa56 | RabidGravy++ | lib/GTK/Simple.pm6:
Add additional widgets

  * Add Status Bar
  * Add Separator
  * Add Progress Bar
  * Box is a Container
  * Accessor for Button.label
16:51
k-simple: c5ef07f | RabidGravy++ | examples/05_bars.p6:
Add boxes example
16:52 ianm left
RabidGravy may do a couple more this evening 16:53
16:53 BuildTheRobots joined, sortiz joined 16:54 dakkar left, khw left 16:55 Actualeyes left 17:01 molaf joined 17:03 khw joined, domidumont joined, spider-mario joined 17:06 pmurias left 17:12 xue_ joined
dalek c: 339fac3 | (Jan-Olof Hendig)++ | doc/Type/List.pod:
Fixed a couple of broken links
17:14
17:15 stmuk left 17:17 CIAvash joined 17:18 stmuk joined 17:19 firstdayonthejob joined 17:26 ocbtec left 17:30 sufrosti1o joined 17:31 roguelazer joined 17:34 MadcapJake left
xfix codegolf.stackexchange.com/a/80149/3103 17:49
I do wonder if I could do better :).
timotimo it's the xfix! o/ 17:50
xfix Hi, timotimo.
I don't really like that <A G C T> part myself, hm...
timotimo it's still shorter than "AGCT".comb 17:52
i wonder if you can get better with a Uni type instead of ords and base2 17:53
xfix I like how I managed to do it in 58 characters however. 17:56
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). 17:57
18:01 aindilis` left, sufrostico left, aindilis` joined 18:02 sufrosti1o left 18:10 labster joined 18:17 AlexDaniel joined
AlexDaniel labster: you may be interested in this: gist.github.com/AlexDaniel/c89bd2786f9b63f31e4c 18:18
labster Oh, that's nice AlexDaniel 18:20
timotimo oh my %) 18:22
18:23 cdg left 18:24 jcallen_ is now known as jcallen
AlexDaniel huggable: hug 18:24
huggable AlexDaniel, nothing found
mst AlexDaniel: now I want a unicode character for trout.me.uk/youtriedstar.jpg for bad parameter exceptions
psch i kinda like ◌ as unicode whatever 18:25
well, i think it's the same that's usually used to demonstrate combining characters at least 18:26
if not, i mean that one that's used for that :P
mst (* * *) does amuse me though 18:27
AlexDaniel (* × *) makes it easier to understand
(◌ × ◌) is even better, I guess
mst yes
psch m: say (** ** [*] ([*] + [*]))([*]) # /o\ 18:29
camelia rakudo-moar e39ce3: OUTPUT«(1)␤»
labster O_o
AlexDaniel m: say “a\x[20DD]b”
camelia rakudo-moar e39ce3: OUTPUT«a⃝b␤»
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.
psch m: say uniname "\x20DD"
camelia rakudo-moar e39ce3: OUTPUT«COMBINING ENCLOSING CIRCLE␤»
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
who is as?
teatime AlexDaniel: well, I'm comitted to figuring it out, like, today or tomorrow. 'cause I hve had enough lol.
AlexDaniel and who is book?
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
Since that totally didn't happen, I'll go back to that method.
AlexDaniel: did I type something dumb and not realize it? 18:33
AlexDaniel teatime: mhmm? No
I am just annoyed by nickname highlighting of “book” and “as”
teatime oh 18:34
I see..
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?
teatime 'You Tried!' seems like exactly the sort of thing they'd add, provided you can use variation selectors to select its color.
psch teatime: i think you wanted to talk to mst :)
18:36 ZoffixW joined
teatime sorry 18:37
psch m: say [*] + [*]
camelia rakudo-moar e39ce3: OUTPUT«1␤»
ZoffixW mst, no, it does multiplication on an empty list, which is 1
psch m: say [*]
camelia rakudo-moar e39ce3: OUTPUT«1␤»
mst ah
psch so, how does that bit work? :)
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
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
ZoffixW m: say ([*]) + [*] 18:38
camelia rakudo-moar e39ce3: OUTPUT«2␤»
teatime oh wait, no sorry psch, you're right, I did literally want to be addressing mst :)
ZoffixW psch, multiplication of a list of 1 element containing 1? :)
m: say [*] [*]
camelia rakudo-moar e39ce3: OUTPUT«1␤»
ZoffixW And the plus is unary
psch ZoffixW: yup
AlexDaniel .u copyleft 18:39
yoleaux No characters found
AlexDaniel :[
ZoffixW \o/
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)␤»
psch mst: ^^^ in case there was anything left unclear
AlexDaniel .u hyper 18:41
yoleaux No characters found
mst psch: the 'positive multiplication identity' bit was what I hadn't got
that makes sense as a thing that would produce a 1 18:42
ZoffixW m: say (* * * * * * * * * * * * * * * * * * * * *)(|(^11+1))
camelia rakudo-moar e39ce3: OUTPUT«39916800␤»
18:45 CIAvash left 18:47 darutoko left 18:49 vendethiel joined 18:50 xue_ left
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 …»
AlexDaniel \o/ 18:51
timotimo for a moment i was wondering when ** became a metaop, and what **, does %) 18:55
ZoffixW m: say 4, **, 7, **, 1, **, 5 18:57
camelia rakudo-moar e39ce3: OUTPUT«4**7**1**5␤»
ZoffixW :/
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? :/
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.
of course, I'm also sure you'll come up w/ a way better name for it.
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))␤»
psch ZoffixW: ^^ that helpful?
AlexDaniel psch: : : lol 19:01
ZoffixW m: say grep permutations ^4 : : (3, *) 19:02
camelia rakudo-moar e39ce3: OUTPUT«()␤»
ZoffixW Not really. What does grep get? A callable? 19:03
psch m: say (1, 2, 3) ~~ (1, *); say (1, 2, 3) ~~ (1, **)
camelia rakudo-moar e39ce3: OUTPUT«False␤True␤»
ZoffixW Ah
m: say (1, 2, 3) ~~ (1, 2, *); say (1, 2, 3) ~~ (1, **)
camelia rakudo-moar e39ce3: OUTPUT«True␤True␤»
ZoffixW Nice. psch++ Now I get it 19:04
TimToady m: say (10¹, 10² ... *)[^10]
camelia rakudo-moar e39ce3: OUTPUT«(10 100 190 280 370 460 550 640 730 820)␤»
TimToady ZoffixW: ^^^ you need three terms there
m: say (10¹, 10², 10³ ... *)[^10]
camelia rakudo-moar e39ce3: OUTPUT«(10 100 1000 10000 100000 1000000 10000000 100000000 1000000000 10000000000)␤»
TimToady with only two terms you only get arithmetic, not geometric 19:05
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
TimToady but the mods are cumulative, so you don't have to do the multiplication yourself
m: 12345.polymod(10 xx *).say 19:07
camelia rakudo-moar e39ce3: OUTPUT«(5 4 3 2 1)␤»
TimToady m: 12345.polymod(1,10,100,1000).say
camelia rakudo-moar e39ce3: OUTPUT«(0 5 34 12 0)␤»
TimToady unless that's what you're trying to do...
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:09
dalek c: d768666 | (Zoffix Znet)++ | doc/Type/Int.pod:
Fix incorrect sequence operator progression
19:11
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
s/because/because it/;
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:13
ZoffixW: and that example is just a simplified version of what actually happens: github.com/rakudo/rakudo/blob/c403...Int.pm#L90 19:15
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: github.com/rakudo/rakudo/blob/c403...eal.pm#L65 19:17
19:20 nicqbot joined
dalek c: be5139e | (Zoffix Znet)++ | doc/Type/Int.pod:
Add implementation example for polymod
19:21
[Coke] "how do I report a bug" -- github.com/rakudo/rakudo#reporting-bugs 19:22
ZoffixW huggable, rakudobug 19:23
huggable ZoffixW, [email@hidden.address] or use perl6 query on rt.perl.org ; see github.com/rakudo/rakudo/#reporting-bugs
[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)
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 …»
psch just for clarity: doesn't need a double grep
star-m: say ^Inf .grep: { last if $++ > 10; $_ };
camelia star-m 2016.01: OUTPUT«(1 2 3 4 5 6 7 8 9 10)␤»
psch i am fairly sure that should be considered buggy
ugexe i think the $ state is considered to be inside a { } even though its a post-if 19:27
so it gets reset every iteration
psch star-m: say ^Inf .grep: { state $x = 0; say $x; last if $x++ > 10; $_ };
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)␤»
psch star-m: say ^Inf .grep: { last if state $++ > 10; $_ };
camelia star-m 2016.01: OUTPUT«(1 2 3 4 5 6 7 8 9 10)␤»
psch ahh
ugexe++
i'm not sure i like that difference there - '$ is an anonymous state variable' is something i got very used to 19:28
oh duh, that's star there
m: say ^Inf .grep: { last if state $++ > 10; $_ };
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 …»
psch m: say ^Inf .grep: { state $x = 0; say $x; last if $x++ > 10; $_ };
camelia rakudo-moar e39ce3: OUTPUT«0␤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␤5…»
psch so, no, doesn't help :/
19:30 domidumont left
AlexDaniel [Coke]: sure. Thanks you 19:30
psch m: for ^5 { if $_ < 4 { say ++$ } }; for ^5 { say ++$ if $_ < 4 }
camelia rakudo-moar e39ce3: OUTPUT«1␤1␤1␤1␤1␤2␤3␤4␤»
AlexDaniel thank*
psch ugexe: that's what you mean i gather?
19:32 hankache joined
AlexDaniel ZoffixW: thank you 19:33
ZoffixW Any time 19:34
hankache evening #perl6
ZoffixW \o
ugexe m: (loop { state $a++; say $a; })[^5] 19:35
camelia rakudo-moar e39ce3: OUTPUT«1␤1␤1␤1␤1␤»
AlexDaniel ZoffixW: #128176 is a good catch. Good job
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128176
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␤…»
ugexe m: my $x = do { while ( 1 ) { state $a++; say $a; }; }; say $x;
camelia rakudo-moar e39ce3: OUTPUT«(timeout)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␤5…» 19:37
dogbert17 evening #perl6 19:38
ZoffixW \o
ugexe psch: ^ i was guessing it was related to this behavior where adding the { } makes it act as expected
dogbert17 Hi zoffix, have some new docs for review here, are they ok :) gist.github.com/dogbert17/5c943bf4...d48a950ac7
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
ah, yeah
ZoffixW FWIW, I believe Coke found the offending commit yesterday 19:40
dogbert17, there are two commas missing, but the rest looks fine to me: gist.github.com/zoffixznet/a214216.../revisions 19:41
Hm. Maybe just one comma
m: class Foo { method bar (Foo: $meow) { say $meow } }; Foo.new.bar: 'meow' 19:42
camelia rakudo-moar e39ce3: OUTPUT«meow␤»
ZoffixW m: class Foo { method bar (Foo:, $meow) { say $meow } }; Foo.new.bar: 'meow'
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: '␤»
ZoffixW dogbert17, yeah, sorry, just one comma in the sentence before "and" :)
19:42 sno joined
dogbert17 ZoffixW: fixed 19:43
ZoffixW cool
dogbert17 ZoffixW: thx, will commit :) 19:44
19:44 Ven joined
[Coke] yup, alexdaniel's offending commit is in the history somewhere. 19:46
19:47 nicqbot left
AlexDaniel LHF in docs: rt.perl.org/Ticket/Display.html?id...8224782f83 19:47
oops
#128177
RT #128177
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128177
19:48 ZoffixW left
dalek c: f7d1a9e | (Jan-Olof Hendig)++ | doc/Type/IO/Path.pod:
Added docs for methods 'parent' and 'child' in IO::Path. ZoffixW++
19:49
19:50 hankache left 19:53 hankache joined
[Coke] whoever runs camelia, we need her on perl6-dev 19:56
geekosaur also synopsebot6 (and both exiting #p6dev) 19:57
19:58 rindolf left, camelia joined
moritz [Coke]: I'm taking care of camelia 19:58
20:00 ChanServ sets mode: +v camelia 20:01 MadcapJake joined
AlexDaniel [Coke]: isn't it something you can do yourself? 20:02
hmm maybe not 20:03
I thought that just changing this github.com/perl6/evalbot/blob/mast...e.org.conf and restaring camelia is enough
but at the same time camelia was on #p6dev but there is no such entry in this config 20:04
20:07 Relsak joined 20:11 Relsak left, Sound joined 20:12 hankache left
[Coke] I might have the privs, sure, but I have no idea what buttons to push yet. 20:13
But if moritz++ hadn't raised his hand, I could have looked deeper. now I don't have to. :) 20:14
[Coke] updates his dumb utility script to use polymod. 20:15
AlexDaniel [Coke]: well, almost everyone has the privs. All you have to do is just ask camelia politely :) 20:16
20:16 cdg joined
[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␤»
dalek albot: af272a7 | moritz++ | freenode.org.conf:
Add #perl6-dev to freenoce config
20:17
20:30 integral_ left, integral joined 20:32 huggable left, huggable joined 20:36 tokuhirom joined 20:41 tokuhirom left, TEttinger joined 20:48 wamba left 20:49 cpage_ joined 20:50 dwarring joined 20:56 _dolmen_ joined 20:57 remmie2 left, remmie joined 21:00 tokuhirom joined 21:03 kaare_ left 21:04 tokuhirom left 21:05 Ven left, quietfanatic joined 21:07 quietfanatic left 21:08 yqt joined 21:20 cdg_ joined, cdg left 21:21 adssdfqsfq joined, adssdfqsfq left
AlexDaniel [Coke]: #128181 21:22
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=128181
21:22 cdg_ left
[Coke] AlexDaniel++ perfect. 21:23
21:24 cdg joined
dalek k-simple: 7df7b5b | RabidGravy++ | / (3 files):
Add ComboBox, Frame

Also add widget tooltips
21:24
RabidGravy only another 300 widgets to add :) 21:27
AlexDaniel m: say ‘z’.succ
camelia rakudo-moar e39ce3: OUTPUT«aa␤»
AlexDaniel m: say ‘#’.succ
camelia rakudo-moar e39ce3: OUTPUT«#␤»
21:28 Sound left
AlexDaniel m: say (‘#’..‘WAT’)[^20] 21:28
camelia rakudo-moar e39ce3: OUTPUT«(# # # # # # # # # # # # # # # # # # # #)␤»
AlexDaniel m: say (‘a’..‘WAT’)[^20]
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)␤»
AlexDaniel /o\
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)␤»
geekosaur this is the WAT of DWIMmy enumerations 21:31
timotimo yeah :\
Zoffix disappears 21:34
21:35 cpage_ left 21:38 skids left 21:42 itaipu left 21:47 rindolf joined
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)␤»
timotimo m)
psch m: say 'a' cmp 'E'
camelia rakudo-moar e39ce3: OUTPUT«More␤»
psch well, there you have it
m: say 20..10 21:49
camelia rakudo-moar e39ce3: OUTPUT«20..10␤»
psch m: say (20..10)[^20]
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␤␤»
psch ...i wonder if that error message works better than the a > E case
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:50
m: say 6, 4, * - 2 ... -10 21:51
camelia rakudo-moar e39ce3: OUTPUT«(6 4 2 0 -2 -4 -6 -8 -10)␤»
psch m: say ('a', *.pred ... 'Egypt')[^20]
camelia rakudo-moar e39ce3: OUTPUT«Decrement out of range␤ in block <unit> at /tmp/uCEjGWAiu3 line 1␤␤Actually thrown at:␤␤»
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␤␤»
psch yeah, i actually like that i think
if you want that ord-y, do it yourself
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)␤»
psch that is kind of funny, cause it can't actually reach 'wAT' either... :S
21:54 vendethiel left
psch m: say (‘a’..‘wAT’)[^20].grep: * ~~ /<[A..Z]>/ 21:54
camelia rakudo-moar e39ce3: OUTPUT«()␤»
psch m: say (‘a’..‘wAT’).grep: * ~~ m/<[A..Z]>/
camelia rakudo-moar e39ce3: OUTPUT«Method 'match' not found for invocant of class 'Any'␤ in block <unit> at /tmp/i4toMZlobu line 1␤␤»
psch m: say (‘a’..‘wAT’).grep: { $_ ~~ m/<[A..Z]>/ }
camelia rakudo-moar e39ce3: OUTPUT«()␤»
psch m: say (‘a’..‘wAT’).grep: { $_.chars > 5 } 21:55
camelia rakudo-moar e39ce3: OUTPUT«()␤»
psch m: say (‘a’..‘wAT’).grep: { $_.chars > 1 }
camelia rakudo-moar e39ce3: OUTPUT«()␤»
psch m: say (‘a’..‘wAT’)
camelia rakudo-moar e39ce3: OUTPUT«"a".."wAT"␤»
psch m: say eager (‘a’..‘wAT’)
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)␤»
psch m: say eager (‘a’..‘ww’)
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)␤»
psch too magical for me vOv 21:56
sorry for the spam :S
21:56 _dolmen_ left 21:59 Sgeo joined 22:01 vendethiel joined 22:03 cdg left 22:10 Actualeyes joined 22:11 kid51 joined 22:25 ilogger2 joined, ChanServ sets mode: +v ilogger2 22:37 vendethiel joined 22:40 cpage_ joined 22:53 mohae joined 22:57 BenGoldberg joined 23:00 cpage_ left 23:01 tokuhirom joined 23:03 cpage_ joined 23:06 tokuhirom left 23:08 cdg joined 23:10 skids joined 23:13 cpage_ left 23:19 BenGoldberg left 23:23 cpage_ joined, vendethiel left 23:24 BenGoldberg joined 23:26 BenGoldberg left 23:31 BenGoldberg joined 23:32 vendethiel joined 23:36 aries_liuxueyang joined
Sgeo `do` is weird 23:42
It turns statements into expressions and some expressions into different expressions
m: do { say "Hi" }
camelia rakudo-moar e39ce3: OUTPUT«Hi␤»
Sgeo m: do if True { 5 } else { 6 }
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)␤»
Sgeo m: say(do if True { 5 } else { 6 })
camelia rakudo-moar e39ce3: OUTPUT«5␤»
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 })␤»
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␤------> 035 ~~ :(Int $a); say 7⏏5$a␤»
Sgeo Is what I attempted possible somehow?:
m: 0 ~~ True 23:48
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␤ ------> 030 ~~ 7⏏5True␤»
Juerd Sgeo: What were you attempting? :)
Sgeo Smartmatch against True/False behaves the way it does to support DWIM behavior of expressions on the right of ~~, I assume?
Juerd, pattern matching and having the value go into the variable
Juerd What do you mean by pattern matching? 23:49
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 vendethiel left
Juerd m: my (Int $foo, Int $bar) := (42, 23); say $foo; say $bar; 23:53
camelia rakudo-moar e39ce3: OUTPUT«42␤23␤»
Juerd Like that?
Sgeo yes, ty
Did := need to be used there?
Well, no... what if I want it to be able to fail
like `when` can?
Juerd Can you give an example of what you want, in a non-contrived context? 23:54
I have no idea what you really want :)
Or why...
Sgeo I like comparing languages, that's the real "why"
>.>
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"
foo ~~ bar is just syntactic sugar for bar.ACCEPTS(foo) 23:56
e.g. 5 ~~ Int is the same as Int.ACCEPTS(5), and "foo" ~~ /o/ is the same as /o/.ACCEPTS("foo")
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
Sgeo Maybe if bar was a closure, its .ACCEPTS could ... hmm, accept a closure? 23:58
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.