»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:08 mj41 left 00:19 sftp left 00:29 coldhead left, coldhead joined 00:53 Trashlord left
masak could someone please figure out a way to put this image in a talk? s-ak.buzzfed.com/static/enhanced/te...925-30.jpg 00:58
masak sleeps 01:12
01:13 masak left 01:17 [Coke] joined 01:36 tyatpi_ left 02:11 jimmy1980 left 02:15 Tedd1 left 02:16 whiteknight left 02:17 woosley joined 02:24 envi joined 02:51 nymacro joined 02:55 bph left, bph joined 03:02 bph left 03:07 Chillance left, bph joined 03:22 donri left 04:05 tyatpi_ joined, Sarten-X left 04:13 Sarten-X joined 04:26 Su-Shee left 04:28 Su-Shee joined 04:32 lue joined
lue hello world o/ 04:33
mberends hello lue o/
lue [good thing this Linux install CD comes with irssi and ssh. I can work on Perl6 stuff while installing. :P] 04:34
mberends which Linux are you using? I'm alternating between Debian 6 and Ubuntu 2011.04 prerelease. 04:36
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:37
mberends that's smart planning :) 04:38
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:40
mberends you should have time-traveled ahead to see how long you were going to be sick. 04:41
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
So theoretically, you could configure Gentoo for TARDISes... (just make sure to download the correct kernel sources)
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:46
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
I got as far as having a GNOME desktop and everything, but gave up when the audio wouldn't work and found something else :)
mberends +1 the Gentoo Handbook is one of the finest examples of documentation that I can think of. Beautiful and practical.. 04:51
04:52 flatwhatson_ left
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:53
mberends that process cures linux-noobness very well :) 04:54
04:55 woosley left
sorear I feel so old. I installed linux from FLOPPIES. 04:55
mberends especially if you choose the long route that even compiles your own C compiler 04:56
lue has a USB floppy disk drive for when he wants to get some Infocom games off his floppies. 04:57
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:00
lue rakudo: say now 05:02
p6eval rakudo 25e5bd: OUTPUT«Instant:2011-03-20T05:02:52.030006Z␤»
lue ooh, that ZNL bit is new. 05:03
(nvm, stupid console rendered that newline character as 'NL') 05:04
mberends I almost thought you were coming to visit me in NL ;)
lue
.oO(actually, that's a very graceful way to deal with >ASCII)
05:11
mberends rakudo: say now.to-posix[0] 05:13
p6eval rakudo 25e5bd: OUTPUT«1300598034.50377␤»
mberends niecza: say now.to-posix[0] 05:14
p6eval niecza v3-78-gc58db17: OUTPUT«1300598050.39582␤»
sorear mberends: lue seems from prior comments to be in the same situation I am 05:16
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.
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.
lue er, s:2nd/you//
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.
it's so liberating not to be shackled to those old mechanical hard disks 05:25
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:26
mberends :D the fan occasionally spins a little faster, I guess 05:27
lue What's worse with all mobile computers (and newer desktops too now!) are those stupid scissor mechanisms used in the keyboard keys. 05:28
mberends do they cut your fingertips? 05:30
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:31
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:32
mberends I get what you mean, probably necessary to achieve the thin profile. Darn difficult to service or repair, indeed. 05:34
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:37
diakopter don' be hatin' 05:38
mberends lue, watch out, the Thought Police are coming ;)
lue
.oO(hm, your name color changed from default to yellow. I wonder what that means)
05:39
mberends er, Good Morning Mr. Diakopter.
tadzik good very-morning 05:40
mberends hi tadzik
lue hello diakopter o/ (I hate them in my memories, now I just have a mild displeasure towards them)
diakopter heh 05:41
mberends actually most people misuse the word hate, I have corrected some as well.
05:42 orafu left
lue
.oO(People don't misuse the word, they're just exaggerating.)
05:42
mberends aye
05:42 orafu joined
diakopter actually it's an allusion to Jamie Kennedy in Malibu's Most Wanted 05:42
mberends sorry, I missed the accent
hungry & 05:43
diakopter :P 05:44
lue .oO[ Allusions are meaningless if you don't know where they come from. Lunch doubly so :) ] 05:45
05:51 tyatpi_ left 06:08 gabiruh left, gabiruh joined
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
ARMv5 core, etc
mberends +1, the main barrier I see is lack of profit for the supplier 06:14
lue well, at least you won't lose *that* much money (relatively speaking of course) 06:17
mberends the $100 laptop project was very worthy, but perhaps incorporated too little of Moore's Law in the hardware design. 06:19
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
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
also: more modular = more efficient use of replacement parts 06:24
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:26
mberends I've just had a glimpse into the future, and electric paint put them out of business 06:28
lue
.oO(must resist science-related correction....)
06:30
06:38 bph left
moritz_ good morning 06:58
06:59 justatheory left
lue good morning moritz_ o/ 07:08
07:20 jaldhar left, jaldhar joined 07:29 jimmy_ joined 07:30 jimmy_ left
lue Good night, #perl6 land o/ 07:40
diakopter the #perl6 ether waves back at you 07:42
07:45 lue left 07:48 alim joined
moritz_ "{insert generic sovjet russia inversion joke here}" 07:48
08:08 Mowah joined 08:15 GinoMan joined 08:17 cjk101010 joined 08:28 bbkr_ left 08:29 mjk joined, mjk left, jaldhar left 08:30 jaldhar joined 08:46 cjk101010 left 08:56 Trashlord joined 09:18 complex joined 09:22 mj41 joined 09:25 alim left 09:26 alim joined 09:30 sftp joined 09:42 bacek left 09:49 alim left 09:50 am0c^ joined, cjk101010 joined 09:52 bacek joined 09:54 alim joined 09:57 mj41 left 09:58 mj41 joined 10:26 am0c^ left, risou joined 10:27 risou_ joined, risou_ left, risou_ joined 10:30 risou left 10:32 risou_ left 10:33 risou joined 10:36 noganex joined 10:39 coldhead left, ponbiki left, HarryS left, noganex_ left 10:40 coldhead joined 10:41 HarryS joined, ponbiki joined 10:49 breinbaas joined 10:50 whiteknight joined 10:54 JimmyZ joined 11:10 masak joined
masak hi, zebras. 11:10
11:10 JimmyZ left
tadzik he masak 11:11
and hi, laggy connection
moritz_ \o 11:13
11:17 ponbiki left 11:18 ponbiki joined 11:22 complex left 11:26 bbkr_ joined 11:32 tyatpi_ joined 11:36 bbkr_ left 11:39 Chillance joined 11:42 bbkr_ joined 11:44 woosley joined 11:45 bbkr_ left 11:47 bbkr_ joined 11:52 coldhead left, coldhead joined 12:02 Holy_Cow joined 12:06 donri joined 12:09 Holy_Cow left 12:22 Su-Shee left 12:24 cjk101010 left 12:30 bobbogo joined
masak I'm trying to picture what spec change might fall out of this: twitter.com/quietfanatic/status/493...4079501312 :) 12:32
12:44 donri left
moritz_ closure within closures... within closures 12:45
masak each one executing a bit slower than the last? :) 12:48
colomon masak: oh noez! 12:49
masak Inception is, I believe, one of the most programmer-compatible films I've seen. 12:50
colomon I haven't actually seen it.
moritz_ with exceptions
masak moritz_: yeah!
moritz_ :-)
but the idea that time goes faster inside a dream doesn't make sense when recursing 12:51
it still happens in the human brain, after all
masak aye. from my experience, second layers of dreaming are very much like first ones. 12:52
not just speed-wise.
colomon I never have second layers of dream. just odd segues to new subjects.
moritz_ and n-th dream levels feel more like continuations, less like stacks 12:53
masak not sure I've ever had a third dream layer. 12:54
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
but it felt like continuations, not stacks :-)
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. :(
moritz_ masak: that can be trained, like nearly everything
masak aye. 12:56
moritz_ oh, and once I had quite a nerdy dream
masak I just haven't put any effort into it. I definitely could.
moritz_ I dreamt that my sister had given me a model of a quine tower for christmas
ie a tower which contains itself in full size
masak huh? :) 12:57
it's... exospatial? :)
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"
masak :P
I had that reaction once or twice to being weightless in dreams. there's nothing to it, really. 12:58
just a matter of pulling up both legs at once and then not putting them down again.
13:07 am0c joined, cogno joined 13:09 mj41 left 13:15 cogno left
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 13:22 bobbogo left 13:23 am0c left 13:24 cogno joined 13:26 tyatpi_ left 13:30 flatwhatson_ joined 13:35 cogno left 13:37 tyatpi_ joined
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:46
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
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:50
13:52 risou left 13:53 risou joined
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.
masak same here, at my grandparent's place.
I think I managed to refrain from ever dividing by 0 on it.
but it was quite evident what *would* have happened. :)
mberends lol 14:04
14:04 cjk101010 joined
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)
mberends: if there's a deus in the machina, it's bound do be in the region of "divide by 0"... :) 14:05
masak .oO ( God of the Gaps ) 14:06
people: what rationale would you give for signatures in Perl 6 (as opposed to in Perl 5) no longer being slurpy by default? 14:08
mberends masak: the compiler can detect when callers are passing too many parameters? 14:11
masak hmm... yes...
also, I guess, references aren't exposed in the same way in Perl 6. 14:12
14:15 _twitch joined 14:16 risou_ joined 14:18 risou left
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
14:19 risou_ is now known as risou 14:21 icwiener joined
moritz_ masak: maybe overriding the inherited command_line method 14:21
masak ooh 14:24
moritz_++
OO++
moritz_ or do the same with 'interactive' method (also inherited from PCT::HLLCompiler 14:26
masak sounds even better. 14:31
14:32 huh_who joined
masak what's the way to emulate 'super()' or 'callsame' in PIR? any existing examples? 14:35
14:37 donri joined
masak oh wait. PIR is the one with no invocant checking whatsoever. nevermind :) 14:42
huh_who . 14:43
14:44 huh_who left
tadzik hoo-hoo 14:47
14:48 On96 left 15:03 woosley left
masak tadzik: reminds me of www.democraticunderground.com/discu...ss=283x582 15:03
tadzik masak: I actually laughed aloud 15:06
what times do we live in, when LOL became so common it's actually useless
donri good times, obv 15:07
masak tadzik: that's just inflation. it happens with all common expressions. 15:08
tadzik inflation. Makes sense, yeah 15:09
any opinions on Vala, #perl6?
masak Vala, the Rajput clan in India? 15:10
tadzik no, Vala the programming languages
AKA "please gnome, don't write C#" 15:11
masak looks interesting.
donri It compiles directly to GObject; I don't think it's about mono-hate
masak compiling to C definitely has its advantages. 15:12
so, in a way, Vala is a bunch of syntactic sugar on C.
I think I'd like to write C like that if I felt I needed OO features.
tadzik donri: it's not about hate, but ISTR it _is_ about having something less... well, mono 15:13
masak: I like to call this "C with classes", I don't really fancy C++ 15:14
and this seems quite sane
donri Vala is intended for situations where you'd write direct C for GObject
masak well, lots of things are "C with classes".
tadzik also, GC, stupid or not
masak: example?
masak tadzik: Objective C, C++, D.
as improvements on C, D has always intrigued me. so far not enough for me to take a good look at it, though. 15:15
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
tadzik the fact that people use C++, but limiting themselves to a particular set of features, is kinda wrong 15:17
well we do the same in Perl 5, OTOH
donri tadzik: But Perl 6 is a testament to Perl 5 being "kinda wrong" 15:18
tadzik donri: yes
15:18 alim left 15:20 risou left, risou_ is now known as risou
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:29
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:31
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:32
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:33
15:34 alim joined
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:36
ooh, Vala has an infix:<//> operator, but they spell it '??'. 15:38
flussence_ ?? without the !! (?) 15:39
masak no, 'a ?? b' is more like 'defined a ?? a !! b' 15:40
which we would write 'a // b' in Perl 6. 15:41
15:41 justatheory joined
masak (oh, and Vala uses ? and : for its ternary operator) 15:41
tadzik: oh, and Genie appears to be some kind of Pythonification of Vala. 15:43
tadzik yeah
it's just an alternative syntax, everything is the same
I assume it's a different parser and the same meat inside
masak sounds likely. 15:49
15:52 cizpre joined 15:59 plobsing left 16:01 plobsing joined
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
I might make such a list myself, if no-one else jumps on it.
&
16:13 Hackbinary joined 16:17 risou_ joined 16:20 risou left 16:21 risou_ is now known as risou 16:43 envi left, alim left 16:55 s1n left 16:58 _twitch left 17:00 s1n joined 17:17 risou_ joined 17:18 risou_ left, risou_ joined 17:19 risou left 17:25 Rotwang joined 17:26 s1n left 17:27 snearch joined 17:28 Rotwang left 17:35 nymacro left, risou_ is now known as risou 17:40 s1n joined 17:44 s1n left 17:48 s1n joined
moritz_ masak: gist.github.com/878489 not alphabetical 17:49
sorear some of those errors (for niecza) are only possible with a compiler bug, or subversive activity 17:52
it might make sense to have an "internal" category
"Load module "... can only happen if the user sneaks a .dll into the compiled object cache without the expected entry points 17:53
"Cannot eval; no compiler available" lies on the boundary between runtime and non-spec, I'm not sure what to make of it 17:54
"Recursive module graph"... likewise is not possible if all used .dlls were created by a working compiler 17:56
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
so I'm commenting on the ones I know things about 17:58
moritz_ yes, thanks
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
moritz_ the distinction between "compile time" and "parsing" is mostly also quite arbitrary
sorear it looks like you skipped over NieczaActions.pm6 18:00
moritz_ quite possible that I missed that one, yes
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 18:02 alester joined, s1n left
masak moritz_++ 18:04
will have a closer look after noms. 18:05
moritz_ masak: don't forget to announce a p6cc winner :-)
masak I meant to do it tonight, but GoOpen preparations might very well take up that time slot. 18:07
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
18:08 cizpre left, Sarten-X joined
masak you can be assured that p6cc has not slipped from my mind ;) 18:08
donri does perl6 have something similar to maybe monads? .?foo is vaguely similar but not really 18:09
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
masak: of course; I'm curious about more corey stuff 18:11
masak I haven't had overwhelming reasons to use .? so much yet. 18:12
but I predict I'll come to use it more often than .+ and .* combined.
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! )
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
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
that's an Int with a happy smiley face.
it's probably happy about being so defined. 18:16
flussence_ donri: I get it now... still no idea how .+ and .* work though. :)
donri flussence_: those are for multis
"dispatch to one-or-more (+) or any (*) matching multi" 18:17
masak flussence_: Yapsi has a very nice example of .*
flussence_: it uses self.*tick; in places to enable plugging in Tardis.
flussence_ ooh.
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
masak flussence_: feel free to check out the source code.
flussence_ will do!
donri normally roles can't override methods, but they can add multis, and .* can be used to dispatch events
Tene rakudo: my Int:D $x;
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;"␤»
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
Tene Huh. I thought I'd seen impl of that. Did the spec change? 18:19
masak no, just NYI in Rakudo. 18:20
might be implemented in nom.
in fact, I'm pretty sure it is.
donri is there any method on Nil that doesn't return something false-ish or null-ish? 18:21
moritz_ rakudo: say Nil.not
p6eval rakudo 25e5bd: OUTPUT«Bool::True␤»
donri except those :)
moritz_ except those that do? 18:22
Tene rakudo: say Nil.^methods().perl
p6eval rakudo 25e5bd: OUTPUT«[{ ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ... }, { ...
..}, { …
Tene ... heh
masak rakudo: say Nil.Str
donri ;)
p6eval rakudo 25e5bd: OUTPUT«␤»
moritz_ akudo: say Nil.^methods()>>.name.perl
masak rakudo: say Nil.List
moritz_ rakudo: say Nil.^methods()>>.name.perl
p6eval rakudo 25e5bd: OUTPUT«Method 'List' not found for invocant of class ''␤ in main program body at line 22:/tmp/fjRDMOkv_l␤»
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",
.."roots",…
moritz_ rakudo: say Nil.cos
18:22 risou left
p6eval rakudo 25e5bd: OUTPUT«1␤» 18:22
masak :P
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
moritz_ rakudo: say Nil.exp 18:23
p6eval rakudo 25e5bd: OUTPUT«1␤»
donri you'll end up doing Nil().?foo etc
Tene rakudo: say Nil.?cos
p6eval rakudo 25e5bd: OUTPUT«1␤»
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.
s/string/strong/
donri well, maybe monad :)
Tene masak: "if you get an undef at any point in this method chain, just return undef for the entire thing
is what's wanted 18:25
.? isn't quite that
masak no.
moritz_ donri: .? is "call if possible", not "call if defined"
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 :-)
$ob.//.method ? :-)
with the second dot, probably
masak oh right :)
Tene moritz_: obviously should be ?.
18:27 dual joined
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.
we don't have a symbol for .defined
except :D
donri by "call if possible" you mean it matches against the signature, even for non-multis?
18:29 Helios` left
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?
masak for example, if there's no such method at all.
donri: sorry, where do subs get into the picture? 18:30
this is exclusively for methods.
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.
donri separate question :)
masak complain*
18:32 Helios- joined
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␤»
donri i see
masak rakudo: class A { multi method foo(Int $a) { say "not going to happen " }; A.new.?foo("OH HAI"); say "alive"
donri is there something similar to .? .+ .* for subs?
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"
p6eval rakudo 25e5bd: OUTPUT«alive␤»
masak donri: to a first approximation, no.
moritz_ &multi.candidates>>.($arguments) 18:37
oh wait, that calls all of them 18:38
donri that's .* right?
moritz_ so you need to fiddle with .grep and .cando
masak rakudo: multi sub foo(Int $a) { say "not going to happen" }; "OH HAI".?&foo(); say "alive"
p6eval rakudo 25e5bd: OUTPUT«===SORRY!===␤Can not use .? on a non-identifier method call at line 22, near "; say \"ali"␤»
donri well .+ i suppose because &multi has to be something?
masak rakudo: multi sub foo(Int $a) { say "not going to happen" }; "OH HAI".?"&foo"(); say "alive"
p6eval rakudo 25e5bd: OUTPUT«alive␤»
donri wait ignore me 18:39
masak rakudo: multi sub foo(Int $a) { say "it works!" }; 42.?"&foo"(); say "alive"
p6eval rakudo 25e5bd: OUTPUT«alive␤»
masak ah. :)
rakudo: multi sub foo(Int $a) { say "it works!" }; 42.&foo()
p6eval rakudo 25e5bd: OUTPUT«it works!␤»
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.
Tene That should theoretically work.
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
masak sorear: no problem for a first shot. Tardis isn't really that impressive yet anyway. 18:41
18:41 GinoMan left
sorear Perl 5.14 seems to be adding someting like $foo&&->bar for $foo && $foo->bar 18:42
in Perl 6 you can just use $foo andthen .bar (donri) 18:43
Tene (seriously tempted to hack on macros for rakudo today)
masak yay
donri sorear: why? 18:44
sorear incidentally, andthen was added specifically to evoke Maybe
Tene: porting my macros to new rakudo?
donri Tene: +1
Tene sorear: I was unaware that niecza had macros.
sorear Tene: niecza does not
Tene sorear: What macros are yours, then? 18:45
sorear git://github.com/sorear/rakudo.git branch
18:46 bph joined, Psyche^ joined, Psyche^ is now known as Patterner
sorear donri: why what? 18:47
Tene sorear: looks like you didn't implement quasi? 18:48
donri sorear: why should i use andthen? 18:51
wait what does that do
or more interestingly, what does this do: $foo andthen .bar andthen .baz 18:52
what is .baz called on?
moritz_ $_ 18:53
donri is that set to .bar first?
Tene donri: result of calling .bar 18:54
moritz_ don't think so (but not sure; S03 knows)
donri Tene: ah, then it's what i want
19:02 Rotwang joined, s1n joined
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:02
sorear: It's validating to see that I'm headed in the right direction. :) 19:03
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:05
19:07 Sarten-X left, tyatpi_ left
sorear masak: why isn't tardis impressive? 19:12
19:12 snearch_ joined
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
sorear looks forwared to adding macros to niecza, but needs to understand BEGIN and serialization first
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
sorear would love to discuss macros with Tene, but doesn't know when the tuits will flow enough 19:15
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.
sorear drops out again. 19:17
Tene sorear: I'm unable to find the problem there.
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.
Tene I assume it has to do with lexical scoping, but the sub is declared as 'our'
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
Tene masak: I'm not sure what you're referring to, but it reminded me of this: search.cpan.org/~kraman/Devel-sdb-0..._the_data? 19:18
sorear masak: ah. 19:19
sorear drops out for real.
masak Tene: ooh 19:21
19:22 snearch left
masak yes, I'll need something like that. 19:23
in essence, I'm not entirely sure how the textual interface to a time-traveling debugger should look. 19:24
Tene masak: have you looked at www.gnu.org/software/gdb/news/reversible.html ? 19:26
masak yes, I've read about it at some point. 19:32
might even've been you who mentioned it. 19:36
19:42 GinoMan joined
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:47
19:49 Mowah left 19:52 Mowah joined 20:02 MayDaniel joined 20:03 tyatpi_ joined 20:12 GinoMan left
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:16
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
much better if the focus is on real questions like "this variable has that value. where and when did it get that value?"
such questions are the reason I began wanting Tardis, while debugging GGE. 20:18
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 www.cs.cmu.edu/~rwh/plbook/book.pdf
20:21 dual left 20:24 dual joined
masak diakopter: what's the name of that notation with the horizontal line, and expressions both above and below it? 20:25
I've seen it in TaPL as well, but I've forgotten its name.
anyway, looks like an awesome book, even in its draft state. 20:29
20:29 lue joined
masak lue! \o/ 20:29
lue hello world! o/
masak there's some DW diskussion about an hour into the backlog. 20:30
s/k/c/
lue Aw. What was it about?
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.
lue [ I'm using a terminal right now, if you backlog :) ]
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!)
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:36
mberends +1 to cannot 20:39
20:41 MayDaniel left 20:42 alester left
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
but I actually don't think so. for one thing, it's the program admitting its limitations.
as opposed to "SYNTAX ERROR" or "INVALID %s" where the program is assigning blame. 20:48
20:49 Trashlord left
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.
there's a great flow to "You can't backslash that".
21:00 cjk101010 left
dalek d: 52399f8 | masak++ | STD.pm6:
Updated copyright year
21:00
moritz_ masak: ok, Cannot it will be. Will unify tomorrow, if all goes well 21:01
21:01 GinoMan joined
lue (I'm assuming this is about error messages being inconsistent using can't, can not, and cannot) 21:02
moritz_ lue: you assume correctly 21:03
21:05 tomaw left
masak is surprised to find "user-friendly" as an attribute of a high-end bar of chocolate 21:10
21:10 tomaw joined
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:12
masak I'd say it probably varies. 21:13
21:14 alim joined
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
then the predominant representation of things would be program flows. a bit like Gmail threads, I guess.
21:16 y3llow left
masak you could pick any point in the code and get back "the program flow went through this point $N times". 21:16
and you could zoom in on any particular flow through a subroutine or loop block or whatever. 21:17
so you're sort of making slices in (flow) time and (program) space.
lue So a sort of situation where you run it and see the damage?
21:18 y3llow joined, pothos_ joined
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
masak mberends: :) 21:19
21:19 risou_ joined, pothos_ is now known as pothos
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.
mberends aye
masak in fact, I said as much in my (so far) only talk about Tardis ;)
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
21:22 risou left
masak I got this meme from Scott Aaronson, one of my academic heroes. 21:23
mberends sure, theories that do match reality (to a degree) are useful (to a degree). 21:24
masak: Chapter 44 is about Future!
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:26
21:27 zby_home left 21:29 alim left
masak mberends: heh. what it most reminded me of was the way some processors "take both branches". 21:30
lue: that's not a bad idea. thanks.
21:31 Mowah left
masak of course, ideally there could be several complementary views to the same data. 21:31
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.
justatheory is reliable
masak hugs justatheory 21:33
mberends gives justatheory a cookie
justatheory Mmm, cooookiiiiiie
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 :)
(or a zig-zag actually) 21:34
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 :)
masak any Perl 6 debugger, not just time-traveling ones, will have to handle that.
a/an /a / 21:36
21:36 Mowah joined 21:38 alim joined 21:48 alim left 21:49 GinoMan left 21:57 alim joined 21:58 Rotwang left 22:04 alim left 22:18 risou joined 22:20 risou_ left 22:21 silent_h_ joined 22:31 PacoLinux left
diakopter mberends: hence me saying I got "lost" in it :P 22:50
masak oh... I thought it was because you were entranced by it. 22:51
diakopter both
masak :)
diakopter :)
22:54 bph left
masak 'night, zebras. 23:00
23:01 masak left 23:13 dju_ joined, Vlavv left 23:14 Mowah left, PZt left, Vlavv joined 23:16 dju left 23:19 karupanerura joined 23:20 tyatpi_ left 23:21 tyatpi_ joined 23:22 alester joined 23:34 silent_h_ left 23:35 PZt joined