Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-03-20

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:08 mj41 left #perl6
00:19 sftp left #perl6
00:29 coldhead left #perl6
00:29 coldhead joined #perl6
00:53 Trashlord left #perl6
00:58 masak could someone please figure out a way to put this image in a talk? http://s-ak.buzzfed.com/static/enhanced/terminal01/2011/3/18/15/enhanced-buzz-32477-1300477925-30.jpg
01:12 * masak sleeps
01:13 masak left #perl6
01:17 [Coke] joined #perl6
01:36 tyatpi_ left #perl6
02:11 jimmy1980 left #perl6
02:15 Tedd1 left #perl6
02:16 whiteknight left #perl6
02:17 woosley joined #perl6
02:24 envi joined #perl6
02:51 nymacro joined #perl6
02:55 bph left #perl6
02:55 bph joined #perl6
03:02 bph left #perl6
03:07 Chillance left #perl6
03:07 bph joined #perl6
03:22 donri left #perl6
04:05 tyatpi_ joined #perl6
04:05 Sarten-X left #perl6
04:13 Sarten-X joined #perl6
04:26 Su-Shee left #perl6
04:28 Su-Shee joined #perl6
04:32 lue joined #perl6
04:33 lue hello world o/
04:33 mberends hello lue o/
04:34 lue [good thing this Linux install CD comes with irssi and ssh. I can work on Perl6 stuff while installing. :P]
04:36 mberends which Linux are you using? I'm alternating between Debian 6 and Ubuntu 2011.04 prerelease.
04:37 lue I have Fedora 12 on this system, but they dropped PPC support since 13. I'm now going to install Gentoo again (I picked now 'cos if I screw up, I got a week of vacation to fix it).
04:38 mberends that's smart planning :)
04:40 lue Although I was sick from school Mon-Thur the first week of March. If I'd know I'd be sick that long, I'd've done it then :)
04:41 mberends you should have time-traveled ahead to see how long you were going to be sick.
04:44 lue Nice thing about Gentoo, it's so configurable, the only way to be more manual is to download every single piece of software you need and doing it like nobody's built a distro before.
04:44 lue So theoretically, you could configure Gentoo for TARDISes... (just make sure to download the correct kernel sources)
04:46 mberends yeah, I once built a Gentoo system a few years back, it was a huge time sink though. That system becomes efficient only after you become proficient, so I gave up.
04:49 lue When I first got this 10-yr old PPC laptop (for FREE!), Gentoo was the first thing I found that would shut down on me during the install process (Gentoo as a first system is like Assembler as a first language :/) Thank goodness for the well-detailed handbook.
04:49 lue I got as far as having a GNOME desktop and everything, but gave up when the audio wouldn't work and found something else :)
04:51 mberends +1 the Gentoo Handbook is one of the finest examples of documentation that I can think of. Beautiful and practical..
04:52 flatwhatson_ left #perl6
04:53 lue I, a Linux noob at the time, was able to plow through Gentoo with it, so I think that says how well it works. (Gentoo Handbook)++ indeed.
04:54 mberends that process cures linux-noobness very well :)
04:55 woosley left #perl6
04:55 sorear I feel so old. I installed linux from FLOPPIES.
04:56 mberends especially if you choose the long route that even compiles your own C compiler
04:57 * lue has a USB floppy disk drive for when he wants to get some Infocom games off his floppies.
05:00 mberends I still have an 80286 Unix clone system called Coherent whose install media is just 4 floppies :)  Ah, those were the days, five users sharing one megabyte of RAM.
05:02 lue rakudo: say now
05:02 p6eval rakudo 25e5bd: OUTPUT«Instant:2011-03-20T05:02:52.030006Z␤»
05:03 lue ooh, that ZNL bit is new.
05:04 lue (nvm, stupid console rendered that newline character as 'NL')
05:04 mberends I almost thought you were coming to visit me in NL ;)
05:11 lue .oO(actually, that's a very graceful way to deal with >ASCII)
05:13 mberends rakudo: say now.to-posix[0]
05:13 p6eval rakudo 25e5bd: OUTPUT«1300598034.50377␤»
05:14 mberends niecza: say now.to-posix[0]
05:14 p6eval niecza v3-78-gc58db17: OUTPUT«1300598050.39582␤»
05:16 sorear mberends: lue seems from prior comments to be in the same situation I am
05:18 lue what situation would that be?
05:18 mberends supposedly you mean being boxed in by hardware constraints. I would say to both of you that a used netbook PC would be a good step forward, for about US$200.
05:20 lue When you say "netbook", I assume you mean the kind that you come with chopsticks for the keyboard keys? :)
05:20 mberends I am very happy with my 2 year old EeePC 1000.  It's no longer being produced, was the last model that had no Windows included.
05:20 lue er, s:2nd/you//
05:23 lue I can certainly see the advantages of having a netbook, but I'd like something a little bigger for a portable computer.
05:23 mberends the keyboard is 90% of a full keyboard, doesn't feel like chopsticks. The greatest feature is bootable removable MicroSD media.
05:25 mberends it's so liberating not to be shackled to those old mechanical hard disks
05:26 lue But how else can you know your computer is doing stuff if you don't hear/feel the whirr of a ceramic hard drive?
05:27 mberends :D the fan occasionally spins a little faster, I guess
05:28 lue What's worse with all mobile computers (and newer desktops too now!) are those stupid scissor mechanisms used in the keyboard keys.
05:30 mberends do they cut your fingertips?
05:31 mberends what surprises me is how effectively Intel and Microsoft have put the lid on Moore's Law in the netbook market. Today's models have the same clock speed and memory capacity as those of 2-3 years ago, and the prices have remained at almost the same level.
05:32 lue No, they're two intertwined pieces of plastic joined to two opposing edges of your keys going diagonally to the keyboard, behaving like a scissor when depressed. You are almost guaranteed (~80-80%) to NEVER get a key back on the keyboard if it comes off.
05:34 mberends I get what you mean, probably necessary to achieve the thin profile. Darn difficult to service or repair, indeed.
05:37 lue (sorry, I meant (~80-90%))    I worked as a Teacher's Aide for my math teacher/school computer guy a few years back. I. Hate. Scissor. Mechanisms. (and the vandals who took those keys off the keyboards)
05:38 diakopter don' be hatin'
05:38 mberends lue, watch out, the Thought Police are coming ;)
05:39 lue .oO(hm, your name color changed from default to yellow. I wonder what that means)
05:39 mberends er, Good Morning Mr. Diakopter.
05:40 tadzik good very-morning
05:40 mberends hi tadzik
05:40 lue hello diakopter o/ (I hate them in my memories, now I just have a mild displeasure towards them)
05:41 diakopter heh
05:41 mberends actually most people misuse the word hate, I have corrected some as well.
05:42 orafu left #perl6
05:42 lue .oO(People don't misuse the word, they're just exaggerating.)
05:42 mberends aye
05:42 orafu joined #perl6
05:42 diakopter actually it's an allusion to Jamie Kennedy in Malibu's Most Wanted
05:42 mberends sorry, I missed the accent
05:43 mberends hungry &
05:44 diakopter :P
05:45 lue .oO[ Allusions are meaningless if you don't know where they come from. Lunch doubly so :) ]
05:51 tyatpi_ left #perl6
06:08 gabiruh left #perl6
06:08 gabiruh joined #perl6
06:13 sorear I'd like to see someone build a $10 1995-class netbook using the power of Moore's Law and parts that currently pass for "microcontrollers"
06:13 sorear ARMv5 core, etc
06:14 mberends +1, the main barrier I see is lack of profit for the supplier
06:17 lue well, at least you won't lose *that* much money (relatively speaking of course)
06:19 mberends the $100 laptop project was very worthy, but perhaps incorporated too little of Moore's Law in the hardware design.
06:22 mberends http://one.laptop.org/ nice to see them still doing good work
06:22 sorear I wonder why nobody seems to be making tiled LCD screens
06:23 lue (I once found a $200 desktop project.) I'm going to do more research on it later, but AFAIK building your own laptop is cheaper than a similarly-equipped off-the-shelf.
06:23 sorear 2cm by 2cm lcds should have pretty decent yields, and I promise you will learn to not see the seams in <1yr
06:24 sorear also: more modular = more efficient use of replacement parts
06:26 lue sounds like a cool idea. Another thing: the modularity would allow you to make crazy shapes ("want an LCD screen contorted into roughly the shape of a Mobius band? Sure!")
06:28 mberends I've just had a glimpse into the future, and electric paint put them out of business
06:30 lue .oO(must resist science-related correction....)
06:38 bph left #perl6
06:58 moritz_ good morning
06:59 justatheory left #perl6
07:08 lue good morning moritz_ o/
07:20 jaldhar left #perl6
07:20 jaldhar joined #perl6
07:29 jimmy_ joined #perl6
07:30 jimmy_ left #perl6
07:40 lue Good night, #perl6 land o/
07:42 diakopter the #perl6 ether waves back at you
07:45 lue left #perl6
07:48 alim joined #perl6
07:48 moritz_ "{insert generic sovjet russia inversion joke here}"
08:08 Mowah joined #perl6
08:15 GinoMan joined #perl6
08:17 cjk101010 joined #perl6
08:28 bbkr_ left #perl6
08:29 mjk joined #perl6
08:29 mjk left #perl6
08:29 jaldhar left #perl6
08:30 jaldhar joined #perl6
08:46 cjk101010 left #perl6
08:56 Trashlord joined #perl6
09:18 complex joined #perl6
09:22 mj41 joined #perl6
09:25 alim left #perl6
09:26 alim joined #perl6
09:30 sftp joined #perl6
09:42 bacek left #perl6
09:49 alim left #perl6
09:50 am0c^ joined #perl6
09:50 cjk101010 joined #perl6
09:52 bacek joined #perl6
09:54 alim joined #perl6
09:57 mj41 left #perl6
09:58 mj41 joined #perl6
10:26 am0c^ left #perl6
10:26 risou joined #perl6
10:27 risou_ joined #perl6
10:27 risou_ left #perl6
10:27 risou_ joined #perl6
10:30 risou left #perl6
10:32 risou_ left #perl6
10:33 risou joined #perl6
10:36 noganex joined #perl6
10:39 coldhead left #perl6
10:39 ponbiki left #perl6
10:39 HarryS left #perl6
10:39 noganex_ left #perl6
10:40 coldhead joined #perl6
10:41 HarryS joined #perl6
10:41 ponbiki joined #perl6
10:48 breinbaas left #perl6
10:49 breinbaas joined #perl6
10:50 whiteknight joined #perl6
10:54 JimmyZ joined #perl6
11:10 masak joined #perl6
11:10 masak hi, zebras.
11:10 JimmyZ left #perl6
11:11 tadzik he masak
11:11 tadzik and hi, laggy connection
11:13 moritz_ \o
11:17 ponbiki left #perl6
11:18 ponbiki joined #perl6
11:22 complex left #perl6
11:26 bbkr_ joined #perl6
11:32 tyatpi_ joined #perl6
11:36 bbkr_ left #perl6
11:39 Chillance joined #perl6
11:42 bbkr_ joined #perl6
11:44 woosley joined #perl6
11:45 bbkr_ left #perl6
11:47 bbkr_ joined #perl6
11:52 coldhead left #perl6
11:52 coldhead joined #perl6
12:02 Holy_Cow joined #perl6
12:06 donri joined #perl6
12:09 Holy_Cow left #perl6
12:22 Su-Shee left #perl6
12:24 cjk101010 left #perl6
12:30 bobbogo joined #perl6
12:32 masak I'm trying to picture what spec change might fall out of this: http://twitter.com/quietfanatic/status/49323724079501312 :)
12:44 donri left #perl6
12:45 moritz_ closure within closures... within closures
12:48 masak each one executing a bit slower than the last? :)
12:49 colomon masak: oh noez!
12:50 masak Inception is, I believe, one of the most programmer-compatible films I've seen.
12:50 colomon I haven't actually seen it.
12:50 moritz_ with exceptions
12:50 masak moritz_: yeah!
12:50 moritz_ :-)
12:51 moritz_ but the idea that time goes faster inside a dream doesn't make sense when recursing
12:51 moritz_ it still happens in the human brain, after all
12:52 masak aye. from my experience, second layers of dreaming are very much like first ones.
12:52 masak not just speed-wise.
12:52 colomon I never have second layers of dream.  just odd segues to new subjects.
12:53 moritz_ and n-th dream levels feel more like continuations, less like stacks
12:54 masak not sure I've ever had a third dream layer.
12:55 masak I do wish I had better recollection of dreams.
12:55 moritz_ I've once had a dream where multiple times I was sure that I've woken up from a dream
12:55 moritz_ but it felt like continuations, not stacks :-)
12:55 masak it's especially annoying remembering later in the day that I remembered the dream when I woke up, that it has since been GC'd. :(
12:55 moritz_ masak: that can be trained, like nearly everything
12:56 masak aye.
12:56 moritz_ oh, and once I had quite a nerdy dream
12:56 masak I just haven't put any effort into it. I definitely could.
12:56 moritz_ I dreamt that my sister had given me a model of a quine tower for christmas
12:56 moritz_ ie a tower which contains itself in full size
12:57 masak huh? :)
12:57 masak it's... exospatial? :)
12:57 moritz_ and I was "whoa, this is totally cool, didn't known it was possible. I must totally remember how this works when waking up"
12:57 masak :P
12:58 masak I had that reaction once or twice to being weightless in dreams. there's nothing to it, really.
12:58 masak just a matter of pulling up both legs at once and then not putting them down again.
13:07 am0c joined #perl6
13:07 cogno joined #perl6
13:09 mj41 left #perl6
13:15 cogno left #perl6
13:20 mberends my nerdy contribution to today's theme is that right after learning hexadecimal, I dreamed that currency was 16-based, so your $10 bill was the one after $F.
13:20 moritz_ :-)
13:20 zby_home joined #perl6
13:22 bobbogo left #perl6
13:23 am0c left #perl6
13:24 cogno joined #perl6
13:26 tyatpi_ left #perl6
13:30 flatwhatson_ joined #perl6
13:35 cogno left #perl6
13:37 tyatpi_ joined #perl6
13:46 masak mberends: I was lucky enough to be taught bin/oct/hex at an early age by my uncle who had just finished University. I guess it's one of the early influences that got me interested in programming.
13:48 mberends :)
13:48 masak the same uncle also (some years later) showed me how to calculate factorials with recursion rather than with a loop. I remember considering the recursive approach odd and needlessly obfuscated. :P
13:50 mberends when I first grokked batteries, lamps and switches, I could not stop thinking, there must be a way to make these things do addition.
13:52 risou left #perl6
13:53 risou joined #perl6
14:03 masak :)
14:03 mberends my uncle had a mechanical calculator that could multiply. As a kid I enjoyed cranking out huge numbers when we went to visiit.
14:03 masak same here, at my grandparent's place.
14:03 masak I think I managed to refrain from ever dividing by 0 on it.
14:03 masak but it was quite evident what *would* have happened. :)
14:04 mberends lol
14:04 cjk101010 joined #perl6
14:04 mberends masak: we have found the roots of "deus ex machina"
14:04 masak (this one was motor-driven, and had a charming electrical/mechanical sound when cranking the numbers)
14:05 masak mberends: if there's a deus in the machina, it's bound do be in the region of "divide by 0"... :)
14:06 * masak .oO ( God of the Gaps )
14:08 masak people: what rationale would you give for signatures in Perl 6 (as opposed to in Perl 5) no longer being slurpy by default?
14:11 mberends masak: the compiler can detect when callers are passing too many parameters?
14:11 masak hmm... yes...
14:12 masak also, I guess, references aren't exposed in the same way in Perl 6.
14:15 _twitch joined #perl6
14:16 risou_ joined #perl6
14:18 risou left #perl6
14:19 masak if I were to patch Rakudo to forbid the combination of 'perl6 -p' and the REPL, where would I add such a check?
14:19 risou_ is now known as risou
14:21 icwiener joined #perl6
14:21 moritz_ masak: maybe overriding the inherited command_line method
14:24 masak ooh
14:24 masak moritz_++
14:24 masak OO++
14:26 moritz_ or do the same with 'interactive' method (also inherited from PCT::HLLCompiler
14:31 masak sounds even better.
14:32 huh_who joined #perl6
14:35 masak what's the way to emulate 'super()' or 'callsame' in PIR? any existing examples?
14:37 donri joined #perl6
14:42 masak oh wait. PIR is the one with no invocant checking whatsoever. nevermind :)
14:43 huh_who .
14:44 huh_who left #perl6
14:47 tadzik hoo-hoo
14:48 On96 left #perl6
15:03 woosley left #perl6
15:03 masak tadzik: reminds me of http://www.democraticunderground.com/discuss/duboard.php?az=view_all&amp;address=283x582
15:06 tadzik masak: I actually laughed aloud
15:06 tadzik what times do we live in, when LOL became so common it's actually useless
15:07 donri good times, obv
15:08 masak tadzik: that's just inflation. it happens with all common expressions.
15:09 tadzik inflation. Makes sense, yeah
15:09 tadzik any opinions on Vala, #perl6?
15:10 masak Vala, the Rajput clan in India?
15:10 tadzik no, Vala the programming languages
15:11 tadzik AKA "please gnome, don't write C#"
15:11 masak looks interesting.
15:11 donri It compiles directly to GObject; I don't think it's about mono-hate
15:12 masak compiling to C definitely has its advantages.
15:12 masak so, in a way, Vala is a bunch of syntactic sugar on C.
15:12 masak I think I'd like to write C like that if I felt I needed OO features.
15:13 tadzik donri: it's not about hate, but ISTR it _is_ about having something less... well, mono
15:14 tadzik masak: I like to call this "C with classes", I don't really fancy C++
15:14 tadzik and this seems quite sane
15:14 donri Vala is intended for situations where you'd write direct C for GObject
15:14 masak well, lots of things are "C with classes".
15:14 tadzik also, GC, stupid or not
15:14 tadzik masak: example?
15:14 masak tadzik: Objective C, C++, D.
15:15 masak as improvements on C, D has always intrigued me. so far not enough for me to take a good look at it, though.
15:16 donri Specifically if you need a linkable library, Vala is handy
15:16 tadzik oh, C++ is a horrible beast, IMHO
15:17 risou_ joined #perl6
15:17 tadzik the fact that people use C++, but limiting themselves to a particular set of features, is kinda wrong
15:17 tadzik well we do the same in Perl 5, OTOH
15:18 donri tadzik: But Perl 6 is a testament to Perl 5 being "kinda wrong"
15:18 tadzik donri: yes
15:18 alim left #perl6
15:20 risou left #perl6
15:20 risou_ is now known as risou
15:29 masak on the other hand, Perl 6 has made a significantly smaller impact on the development industry so far than has Perl 5. and that's even if you count the accumulated impact since the birth of Perl 6.
15:31 masak therefore, in order to reply to the claim that Perl 6 addresses a set of things in Perl 5 that are wrong, a devoted Perl 5 need only incline his head slightly and give a pointed look. :)
15:32 masak I won't say that the resurgence of Perl 5 is a testament to Perl 6 having taken "too long" or Perl 6 not being the desired solution to the problems of Perl 5. but it is a testament to the need for something like Perl 5, and to the things that Perl 5 got right.
15:33 masak will Perl 6 ever be a "better Perl 5" in practice? maybe. I think it's a laudable goal. but it's some ways off still.
15:34 alim joined #perl6
15:36 masak tadzik: first thing I vaguely dislike about Vala syntax: the use of commas to denote number of dimansions in array declarations. one uses N-1 commas to denote an N-dimensional array...
15:38 masak ooh, Vala has an infix:<//> operator, but they spell it '??'.
15:39 flussence_ ?? without the !! (?)
15:40 masak no, 'a ?? b' is more like 'defined a ?? a !! b'
15:41 masak which we would write 'a // b' in Perl 6.
15:41 justatheory joined #perl6
15:41 masak (oh, and Vala uses ? and : for its ternary operator)
15:43 masak tadzik: oh, and Genie appears to be some kind of Pythonification of Vala.
15:43 tadzik yeah
15:43 tadzik it's just an alternative syntax, everything is the same
15:43 tadzik I assume it's a different parser and the same meat inside
15:49 masak sounds likely.
15:52 cizpre joined #perl6
15:59 plobsing left #perl6
16:01 plobsing joined #perl6
16:03 masak moritz_: just backlogged over your "Cannot"/"Can not"/"Can't" question. I have nothing to add on what's already been said about preferences, but it'd be interesting to see a listing of all error messages, in alphabetic order.
16:03 masak I might make such a list myself, if no-one else jumps on it.
16:03 masak &
16:13 Hackbinary joined #perl6
16:17 risou_ joined #perl6
16:20 risou left #perl6
16:21 risou_ is now known as risou
16:43 envi left #perl6
16:43 alim left #perl6
16:55 s1n left #perl6
16:58 _twitch left #perl6
17:00 s1n joined #perl6
17:10 krakan left #perl6
17:17 risou_ joined #perl6
17:18 risou_ left #perl6
17:18 risou_ joined #perl6
17:19 risou left #perl6
17:25 Rotwang joined #perl6
17:26 s1n left #perl6
17:27 snearch joined #perl6
17:28 Rotwang left #perl6
17:35 nymacro left #perl6
17:35 risou_ is now known as risou
17:40 s1n joined #perl6
17:44 s1n left #perl6
17:48 s1n joined #perl6
17:49 moritz_ masak: https://gist.github.com/878489 not alphabetical
17:52 sorear some of those errors (for niecza) are only possible with a compiler bug, or subversive activity
17:52 sorear it might make sense to have an "internal" category
17:53 sorear "Load module "... can only happen if the user sneaks a .dll into the compiled object cache without the expected entry points
17:54 sorear "Cannot eval; no compiler available" lies on the boundary between runtime and non-spec, I'm not sure what to make of it
17:56 sorear "Recursive module graph"... likewise is not possible if all used .dlls were created by a working compiler
17:57 moritz_ I don't claim any of those are to be specced, I just collected them
17:57 sorear I figure you could use comments on them
17:58 sorear so I'm commenting on the ones I know things about
17:58 moritz_ yes, thanks
17:58 sorear " is not usable as a CLR object" is part of the (WIP) use :from<dotnet>; it doesn't pretend to be part of Perl 6
17:58 moritz_ the distinction between "compile time" and "parsing" is mostly also quite arbitrary
18:00 sorear it looks like you skipped over NieczaActions.pm6
18:00 moritz_ quite possible that I missed that one, yes
18:00 sorear which is probably a good thing, I started getting annoyed with all the error messages and didn't write the later ones very well :)
18:01 Sarten-X left #perl6
18:02 alester joined #perl6
18:02 s1n left #perl6
18:04 masak moritz_++
18:05 masak will have a closer look after noms.
18:05 moritz_ masak: don't forget to announce a p6cc winner :-)
18:07 masak I meant to do it tonight, but GoOpen preparations might very well take up that time slot.
18:08 masak in any event, I'll have plenty of travel time in the next few days, and that kind of time is just what I need.
18:08 cizpre left #perl6
18:08 Sarten-X joined #perl6
18:08 masak you can be assured that p6cc has not slipped from my mind ;)
18:09 donri does perl6 have something similar to maybe monads? .?foo is vaguely similar but not really
18:10 masak donri: you could always create a Maybe type with appropriate constructors and access methods.
18:10 donri if you chain .?foo i expect it'd end up checking the methods of Nil
18:11 donri masak: of course; I'm curious about more corey stuff
18:12 masak I haven't had overwhelming reasons to use .? so much yet.
18:12 masak but I predict I'll come to use it more often than .+ and .* combined.
18:13 donri I want something similar but that "short circuits"
18:13 flussence_ .oO( .? is similar to a monad? No wonder I couldn't understand it! )
18:14 donri flussence_: .can('foo') ?? .foo !! Nil()
18:14 moritz_ donri: by default all values in Perl 6 are "maybes", e.g. 'my Int $x' not only allows -1, 0, 1, 2, etc, but also the Int type object
18:15 moritz_ so it's "Just 1" | "Nothing aka Int"
18:15 masak if you don't want that maybe-ness, you should type things as Int:D
18:15 masak that's an Int with a happy smiley face.
18:16 masak it's probably happy about being so defined.
18:16 flussence_ donri: I get it now... still no idea how .+ and .* work though. :)
18:16 donri flussence_: those are for multis
18:17 donri "dispatch to one-or-more (+) or any (*) matching multi"
18:17 masak flussence_: Yapsi has a very nice example of .*
18:17 masak flussence_: it uses self.*tick; in places to enable plugging in Tardis.
18:17 flussence_ ooh.
18:18 masak flussence_: Tardis inherits from Yapsi::Runtime, and provides its own .tick method.
18:18 donri the book has a nice example of using roles with multis for plugins to an irc bot
18:18 masak flussence_: feel free to check out the source code.
18:18 flussence_ will do!
18:18 donri normally roles can't override methods, but they can add multis, and .* can be used to dispatch events
18:18 Tene rakudo: my Int:D $x;
18:18 p6eval rakudo 25e5bd: OUTPUT«===SORRY!===␤In "my" declaration, typename Int:D must be predeclared (or marked as declarative with :: prefix) at line 22, near " $x;"␤»
18:19 Tene rakudo: multi sub foo(Int:D $x) { say 'A' }; multi sub foo(Int:U $x) { say 'B' }; foo(1); foo(Int);
18:19 p6eval rakudo 25e5bd: OUTPUT«===SORRY!===␤Invalid typename in parameter declaration at line 22, near " $x) { say"␤»
18:19 dual left #perl6
18:19 Tene Huh.  I thought I'd seen impl of that.  Did the spec change?
18:20 masak no, just NYI in Rakudo.
18:20 masak might be implemented in nom.
18:20 masak in fact, I'm pretty sure it is.
18:21 donri is there any method on Nil that doesn't return something false-ish or null-ish?
18:21 moritz_ rakudo: say Nil.not
18:21 p6eval rakudo 25e5bd: OUTPUT«Bool::True␤»
18:21 donri except those :)
18:22 moritz_ except those that do?
18:22 Tene rakudo: say Nil.^methods().perl
18:22 p6eval rakudo 25e5bd: OUTPUT«[{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ...
18:22 p6eval ..}, { …
18:22 Tene ... heh
18:22 masak rakudo: say Nil.Str
18:22 donri ;)
18:22 p6eval rakudo 25e5bd: OUTPUT«␤»
18:22 moritz_ akudo: say Nil.^methods()>>.name.perl
18:22 masak rakudo: say Nil.List
18:22 moritz_ rakudo: say Nil.^methods()>>.name.perl
18:22 p6eval rakudo 25e5bd: OUTPUT«Method 'List' not found for invocant of class ''␤  in main program body at line 22:/tmp/fjRDMOkv_l␤»
18:22 p6eval rakudo 25e5bd: OUTPUT«("", "item", "hash", "iterator", "perl", "Bool", "Capture", "Str", "elems", "sort", "join", "at_pos", "ACCEPTS", "of", "item", "Numeric", "Int", "Num", "Str", "elems", "fmt", "list", "Numeric", "Real", "Int", "Rat", "Num", "abs", "conjugate", "exp", "log", "log10", "sqrt",
18:22 p6eval .."roots",…
18:22 moritz_ rakudo: say Nil.cos
18:22 risou left #perl6
18:22 p6eval rakudo 25e5bd: OUTPUT«1␤»
18:22 masak :P
18:23 masak moritz_++ # lateral thinking
18:23 donri I'm pondering what happens if you chain .? invokations and somewhere along the line get a Nil
18:23 risou joined #perl6
18:23 moritz_ rakudo: say Nil.exp
18:23 p6eval rakudo 25e5bd: OUTPUT«1␤»
18:23 donri you'll end up doing Nil().?foo etc
18:23 Tene rakudo: say Nil.?cos
18:23 p6eval rakudo 25e5bd: OUTPUT«1␤»
18:24 donri but the methods I try seem sensible
18:24 masak I don't see an extremely string use case for long chains of .? calls.
18:24 masak s/string/strong/
18:24 donri well, maybe monad :)
18:24 Tene masak: "if you get an undef at any point in this method chain, just return undef for the entire thing
18:25 Tene is what's wanted
18:25 Tene .? isn't quite that
18:25 masak no.
18:25 moritz_ donri: .? is "call if possible", not "call if defined"
18:26 Tene a short-circuiting call-if-defined certainly could be useful.
18:26 moritz_ masak once made the same error while reviewing one of my p6cc submissions :-)
18:26 moritz_ $ob.//.method ? :-)
18:26 moritz_ with the second dot, probably
18:26 masak oh right :)
18:26 Tene moritz_: obviously should be ?.
18:27 dual joined #perl6
18:27 moritz_ Tene: ? has the connotation of being related to .so, not to .defined
18:27 masak not sure I ever got around to correcting that slip in the review.
18:27 masak we don't have a symbol for .defined
18:27 masak except :D
18:27 donri by "call if possible" you mean it matches against the signature, even for non-multis?
18:29 Helios` left #perl6
18:29 masak donri: it tries to bind, but doesn't die if the binding fails.
18:29 donri what happens if you call a multi as usual and there is no matching sub?
18:29 masak for example, if there's no such method at all.
18:30 masak donri: sorry, where do subs get into the picture?
18:30 masak this is exclusively for methods.
18:31 donri thus the "as usual"
18:31 masak but .?foo with several 'multi foo' variants available but none matching the particulare call is the other case where .? doesn't complaing.
18:31 donri separate question :)
18:31 masak complain*
18:32 Helios- joined #perl6
18:34 donri rakudo: multi sub do-say(Int $it) { say $it }; do-say("unspeakable horrors")
18:34 p6eval rakudo 25e5bd: OUTPUT«No applicable candidates found to dispatch to for 'do-say'. Available candidates are:␤:(Int $it)␤␤  in main program body at line 22:/tmp/ojpZMD7K7f␤»
18:34 donri i see
18:34 masak rakudo: class A { multi method foo(Int $a) { say "not going to happen " }; A.new.?foo("OH HAI"); say "alive"
18:34 donri is there something similar to .? .+ .* for subs?
18:35 p6eval rakudo 25e5bd: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
18:35 masak rakudo: class A { multi method foo(Int $a) { say "not going to happen " } }; A.new.?foo("OH HAI"); say "alive"
18:35 p6eval rakudo 25e5bd: OUTPUT«alive␤»
18:35 masak donri: to a first approximation, no.
18:37 moritz_ &multi.candidates>>.($arguments)
18:38 moritz_ oh wait, that calls all of them
18:38 donri that's .* right?
18:38 moritz_ so you need to fiddle with .grep and .cando
18:38 masak rakudo: multi sub foo(Int $a) { say "not going to happen" }; "OH HAI".?&foo(); say "alive"
18:38 p6eval rakudo 25e5bd: OUTPUT«===SORRY!===␤Can not use .? on a non-identifier method call at line 22, near "; say \"ali"␤»
18:38 donri well .+ i suppose because &multi has to be something?
18:38 masak rakudo: multi sub foo(Int $a) { say "not going to happen" }; "OH HAI".?"&foo"(); say "alive"
18:38 p6eval rakudo 25e5bd: OUTPUT«alive␤»
18:39 donri wait ignore me
18:39 masak rakudo: multi sub foo(Int $a) { say "it works!" }; 42.?"&foo"(); say "alive"
18:39 p6eval rakudo 25e5bd: OUTPUT«alive␤»
18:39 masak ah. :)
18:39 masak rakudo: multi sub foo(Int $a) { say "it works!" }; 42.&foo()
18:39 p6eval rakudo 25e5bd: OUTPUT«it works!␤»
18:40 Tene macro dotty:<.¿> ($a,$b) { quasi { ( do { my $tmp = {{{ $a }}}; $tmp ?? $tmp.{{{ $b }}} !! $tmp } ) } };
18:40 sorear masak: so THAT is what the self.?tick is for.
18:40 Tene That should theoretically work.
18:41 masak sorear: was it .? and not .* ?
18:41 sorear (it is *not* going to work in niecza v4 I fear... especially if my tuits stay as dry as yesterday)
18:41 Patterner left #perl6
18:41 masak sorear: no problem for a first shot. Tardis isn't really that impressive yet anyway.
18:41 GinoMan left #perl6
18:42 sorear Perl 5.14 seems to be adding someting like $foo&&->bar for $foo && $foo->bar
18:43 sorear in Perl 6 you can just use $foo andthen .bar (donri)
18:43 Tene (seriously tempted to hack on macros for rakudo today)
18:44 masak yay
18:44 donri sorear: why?
18:44 sorear incidentally, andthen was added specifically to evoke Maybe
18:44 sorear Tene: porting my macros to new rakudo?
18:44 donri Tene: +1
18:44 Tene sorear: I was unaware that niecza had macros.
18:44 sorear Tene: niecza does not
18:45 Tene sorear: What macros are yours, then?
18:45 sorear git://github.com/sorear/rakudo.git branch
18:46 bph joined #perl6
18:46 Psyche^ joined #perl6
18:46 Psyche^ is now known as Patterner
18:47 sorear donri: why what?
18:48 Tene sorear: looks like you didn't implement quasi?
18:51 donri sorear: why should i use andthen?
18:51 donri wait what does that do
18:52 donri or more interestingly, what does this do: $foo andthen .bar andthen .baz
18:52 donri what is .baz called on?
18:53 moritz_ $_
18:53 donri is that set to .bar first?
18:54 Tene donri: result of calling .bar
18:54 moritz_ don't think so (but not sure; S03 knows)
18:54 donri Tene: ah, then it's what i want
19:02 Rotwang joined #perl6
19:02 s1n joined #perl6
19:02 Tene sorear: Yes, that's pretty much the shape of what I planned to implement first.  Doesn't look like it handles lexical scoping for macro definitions, but I hadn't worked out the details of that yet anyway.
19:03 Tene sorear: It's validating to see that I'm headed in the right direction. :)
19:05 masak sorear: the way self.?tick is used in Yapsi, it might as well be implemented with an empty method in the Yapsi::Runtime class and then just self.tick.
19:07 Sarten-X left #perl6
19:07 tyatpi_ left #perl6
19:12 sorear masak: why isn't tardis impressive?
19:12 snearch_ joined #perl6
19:13 sorear Tene: don't bother with lexical scope for macros in current Rakudo; it really requires slangs to do right
19:13 Tene sorear: slangs are exactly what I want to end up implementing
19:13 * sorear looks forwared to adding macros to niecza, but needs to understand BEGIN and serialization first
19:14 sorear rakudo: { our sub infix:<@>($x,$y) { $x - $y } }; say 3 @ 2 # planning to fix this, Tene?
19:14 p6eval rakudo 25e5bd: OUTPUT«1␤»
19:14 Sarten-X joined #perl6
19:15 * sorear would love to discuss macros with Tene, but doesn't know when the tuits will flow enough
19:16 sorear the biggest issue niecza has with BEGIN is "how should side effects be handled?".  BEGIN $x = 2
19:16 Tene sorear: I'm just starting to get over a 2-year tuit deficiency.
19:17 * sorear drops out again.
19:17 Tene sorear: I'm unable to find the problem there.
19:17 masak sorear: primarily because I still don't have a really nice way to present variables as they come and go, and overlap each other.
19:17 Tene I assume it has to do with lexical scoping, but the sub is declared as 'our'
19:18 Tene sorear: if it was 'my sub', or if that ends up with the same semantics somehow, then yes, I plan to fix that.
19:18 sorear Tene: parsing '@' as infix is a grammar modification, which are always lexically scoped
19:18 snearch_ left #perl6
19:18 Tene masak: I'm not sure what you're referring to, but it reminded me of this: http://search.cpan.org/~kraman/Devel-sdb-0.01/sdb.pm#Want_more_insight_to_the_data?
19:19 sorear masak: ah.
19:19 * sorear drops out for real.
19:21 masak Tene: ooh
19:22 snearch left #perl6
19:23 masak yes, I'll need something like that.
19:24 masak in essence, I'm not entirely sure how the textual interface to a time-traveling debugger should look.
19:26 Tene masak: have you looked at http://www.gnu.org/software/gdb/news/reversible.html ?
19:32 masak yes, I've read about it at some point.
19:36 masak might even've been you who mentioned it.
19:42 GinoMan joined #perl6
19:47 Tene Speaking of Tardis, I rather enjoyed the Dr Who comedy mini-episodes that just aired.  Only one more month until season six starts airing.
19:49 Mowah left #perl6
19:52 Mowah joined #perl6
20:02 MayDaniel joined #perl6
20:03 tyatpi_ joined #perl6
20:12 GinoMan left #perl6
20:16 masak I guess I should start by enumerating a bunch of common use cases for Tardis, and dreaming a bit about how they might optimally be visually represented.
20:17 masak I think just presenting views corresponding to 'cd' and 'ls' is far too limited. that's like the equivalent of a CRUD screen.
20:17 masak much better if the focus is on real questions like "this variable has that value. where and when did it get that value?"
20:18 masak such questions are the reason I began wanting Tardis, while debugging GGE.
20:19 masak ideally, I'd like to have an environment that combines tote and Tardis, and switches "modes" intelligently and automatically.
20:19 * diakopter gets lost in http://www.cs.cmu.edu/~rwh/plbook/book.pdf
20:21 dual left #perl6
20:24 dual joined #perl6
20:25 masak diakopter: what's the name of that notation with the horizontal line, and expressions both above and below it?
20:25 masak I've seen it in TaPL as well, but I've forgotten its name.
20:29 masak anyway, looks like an awesome book, even in its draft state.
20:29 lue joined #perl6
20:29 masak lue! \o/
20:29 lue hello world! o/
20:30 masak there's some DW diskussion about an hour into the backlog.
20:30 masak s/k/c/
20:30 lue Aw. What was it about?
20:30 masak <Tene> Speaking of Tardis, I rather enjoyed the Dr Who comedy mini-episodes that just aired. Only one more month until season six starts airing.
20:30 lue [ I'm using a terminal right now, if you backlog :) ]
20:31 masak that was it.
20:31 * lue wants to get the BBC stations just to watch Doctor Who (legend tells they air the classic episodes too!)
20:36 masak moritz_: looking at the errors with 'can not'/'cannot'/"can't" in mind, I don't see anything to distinguish those cases. I would prefer if they were all unified into either of 'can not'/'cannot'. I don't have a strong preference between those two alternatives.
20:39 mberends +1 to cannot
20:41 MayDaniel left #perl6
20:42 alester left #perl6
20:47 masak for a brief while, I considered whether the 'can not'/'cannot' thing itself was a sort of error message anti-pattern -- like, for example, "SYNTAX ERROR" or "INVALID %s".
20:47 masak but I actually don't think so. for one thing, it's the program admitting its limitations.
20:48 masak as opposed to "SYNTAX ERROR" or "INVALID %s" where the program is assigning blame.
20:49 Trashlord left #perl6
20:54 lue unless of course the error is something like "ERROR: you cannot write half-decent code. Pick up a book and try again."
20:54 masak sometimes it's a question of rythm.
20:54 masak there's a great flow to "You can't backslash that".
21:00 cjk101010 left #perl6
21:00 dalek std: 52399f8 | masak++ | STD.pm6:
21:00 dalek std: Updated copyright year
21:00 dalek std: review: https://github.com/perl6/std/commit/52399f8088
21:01 moritz_ masak: ok, Cannot it will be. Will unify tomorrow, if all goes well
21:01 GinoMan joined #perl6
21:02 lue (I'm assuming this is about error messages being inconsistent using can't, can not, and cannot)
21:03 moritz_ lue: you assume correctly
21:05 tomaw left #perl6
21:10 * masak is surprised to find "user-friendly" as an attribute of a high-end bar of chocolate
21:10 tomaw joined #perl6
21:12 lue Does it disable the guilt receptors of your brain as you eat, thereby eliminating how guilty you feel for eating another diet-ruining chocolate bar?
21:13 masak I'd say it probably varies.
21:14 alim joined #perl6
21:15 masak maybe -- returning now to the topic of representing the state of a running program in Tardis -- maybe the correct starting point is a kind of four-dimensional "everything already happened and we're looking at it in a detached way" viewpoint.
21:15 masak then the predominant representation of things would be program flows. a bit like Gmail threads, I guess.
21:16 y3llow left #perl6
21:16 masak you could pick any point in the code and get back "the program flow went through this point $N times".
21:17 masak and you could zoom in on any particular flow through a subroutine or loop block or whatever.
21:17 masak so you're sort of making slices in (flow) time and (program) space.
21:17 lue So a sort of situation where you run it and see the damage?
21:18 y3llow joined #perl6
21:18 pothos_ joined #perl6
21:19 mberends after a hasty skim of the above mentioned "Practical Foundations for Programming Languages" book, I think the author should $title =~ s/Practical/Academic/. It's a pile of axioms, lemmas and theorems :-(
21:19 masak lue: yes. my current use case is something like "this test came out as 'not ok', give me the flow that made it do that". and then the user "zooms in" on further effects and their causes.
21:19 pothos left #perl6
21:19 masak mberends: :)
21:19 risou_ joined #perl6
21:19 pothos_ is now known as pothos
21:20 * lue tries to think about how to set up such a system, and tries *really* hard not to reference a strangely-appropriate bit of DW...
21:20 masak mberends: Real-world/Practical and Academic/Theoretical shouldn't, ideally, be so much of a pair of opposites.
21:20 mberends aye
21:20 masak in fact, I said as much in my (so far) only talk about Tardis ;)
21:22 masak more exactly, using "in theory" and "theoretical" as markers of derision is misguided and dangerous. if a theory didn't match reality, it was unfit, not an example of theories being a bad idea.
21:22 risou left #perl6
21:23 masak I got this meme from Scott Aaronson, one of my academic heroes.
21:24 mberends sure, theories that do match reality (to a degree) are useful (to a degree).
21:24 mberends masak: Chapter 44 is about Future!
21:26 lue How about (at least in a graphical sense), the main body of code is the first line. Whenever this code diverts into a subroutine (or anything that stops the idea of linear programming), the line veers onto another line representing that subroutine, and veers back when it goes back to the main line of code.
21:27 zby_home left #perl6
21:29 alim left #perl6
21:30 masak mberends: heh. what it most reminded me of was the way some processors "take both branches".
21:30 masak lue: that's not a bad idea. thanks.
21:31 Mowah left #perl6
21:31 masak of course, ideally there could be several complementary views to the same data.
21:32 masak mberends: and (at least in mathematics), either a piece of theory is 100% reliable, or it's worthless.
21:32 mberends masak: if we can relate the P6 junction to that thought, we'll have practically achieved something.
21:32 * justatheory is reliable
21:33 * masak hugs justatheory
21:33 * mberends gives justatheory a cookie
21:33 justatheory Mmm, cooookiiiiiie
21:33 lue Or, extending to 3D [:)], 1D = lines of code, 2D = different pieces of code (subroutines, main line, etc.), 3D = time. So perfectly linear code would be a line going down in the 3rd dim., and a subroutine that keeps calling itself with no exit condition would be an infinitely spiraling staricase :)
21:34 lue (or a zig-zag actually)
21:35 masak mberends: yes. also, relating it to the notion of a 'co' -- an cooperatively concurrent thread that starts lazily running next to the main thread, anytime we do something involving a 'gather'.
21:35 mberends :)
21:35 masak any Perl 6 debugger, not just time-traveling ones, will have to handle that.
21:36 masak a/an /a /
21:36 Mowah joined #perl6
21:38 alim joined #perl6
21:48 alim left #perl6
21:49 GinoMan left #perl6
21:57 alim joined #perl6
21:58 Rotwang left #perl6
22:04 alim left #perl6
22:18 risou joined #perl6
22:20 risou_ left #perl6
22:21 silent_h_ joined #perl6
22:31 PacoLinux left #perl6
22:50 diakopter mberends: hence me saying I got "lost" in it :P
22:51 masak oh... I thought it was because you were entranced by it.
22:51 diakopter both
22:51 masak :)
22:51 diakopter :)
22:54 bph left #perl6
23:00 masak 'night, zebras.
23:01 masak left #perl6
23:13 dju_ joined #perl6
23:13 Vlavv left #perl6
23:14 Mowah left #perl6
23:14 PZt left #perl6
23:14 Vlavv joined #perl6
23:16 dju left #perl6
23:19 karupanerura joined #perl6
23:20 tyatpi_ left #perl6
23:21 tyatpi_ joined #perl6
23:22 alester joined #perl6
23:34 silent_h_ left #perl6
23:35 PZt joined #perl6

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

Perl 6 | Reference Documentation | Rakudo