Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-04-30

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:01 jnthn sleep &
00:17 impious left #perl6
00:19 [1]imamelia joined #perl6
00:20 imamelia left #perl6
00:20 [1]imamelia is now known as imamelia
00:50 awwaiid joined #perl6
01:04 noganex joined #perl6
01:08 noganex_ left #perl6
01:09 orafu joined #perl6
01:23 mtk left #perl6
01:30 jcrigby left #perl6
01:31 mtk joined #perl6
01:33 aesop left #perl6
01:34 aesop joined #perl6
01:40 whiteknight left #perl6
01:50 awwaiid left #perl6
01:54 cotto left #perl6
01:57 awwaiid joined #perl6
01:59 Chillance left #perl6
02:02 colomon ack.  I've forgotten where pmichaud's brilliant cards example is again
02:02 colomon Though I'd even downloaded it....
02:10 colomon I'm also trying to think of a good "there's more than one way to do it" example
02:17 TimToady a number of rosettacode examples show both imperative and functional solutions, such as http://rosettacode.org/wiki/V​an_der_Corput_sequence#Perl_6
02:17 TimToady factorial has four different solutions, I think
02:18 leprevost joined #perl6
02:27 bacek left #perl6
02:28 pnu left #perl6
02:29 pnu joined #perl6
02:30 bacek joined #perl6
03:12 hudnix left #perl6
03:14 newtonrunz left #perl6
03:23 Su-Shee_ joined #perl6
03:27 Su-Shee left #perl6
03:31 beekor left #perl6
03:38 takesako__ left #perl6
03:38 gabiruh left #perl6
03:39 gabiruh joined #perl6
03:42 [particle]1 joined #perl6
03:42 [particle] left #perl6
03:43 leprevost left #perl6
03:43 plobsing left #perl6
03:44 plobsing joined #perl6
03:49 donri left #perl6
03:55 leprevost joined #perl6
04:15 Helios` left #perl6
04:16 Helios` joined #perl6
04:21 robinsmidsrod joined #perl6
04:32 Helios` left #perl6
04:34 Helios` joined #perl6
04:54 nymacro joined #perl6
05:04 Mowah joined #perl6
05:05 justatheory left #perl6
05:14 Mowah left #perl6
05:14 Mowah joined #perl6
05:33 imamelia left #perl6
05:34 imamelia joined #perl6
05:53 plobsing left #perl6
05:57 imamelia There's something to consider for Perl 6...a function that automatically returns output of another program.
06:02 tylercurtis imamelia: another Perl 6 program? Or another program in general?
06:03 tylercurtis In the former case, writing such a function with eval would be trivial. Otherwise, I believe qx/ foo / does that.
06:04 drbean joined #perl6
06:06 imamelia Something like system() combined with a pipe.
06:07 araujo left #perl6
06:07 tylercurtis imamelia: qx/ foo / runs the command "foo" and produces its output as a string.
06:08 tylercurtis I'd demonstrate it, but p6eval doesn't allow it.
06:09 drbean left #perl6
06:10 drbean joined #perl6
06:10 cotto joined #perl6
06:14 imamelia So you can do my $asdf = qx/$assembler tmpasm.asm tmpasm.bin/;?
06:15 drbean left #perl6
06:17 silent_h_ joined #perl6
06:30 tylercurtis Yes.
06:31 tylercurtis Well, actually, in Perl 6, to interpolate that $assembler, you'd need to do qqx/.../
06:33 imamelia left #perl6
06:34 takadonet left #perl6
06:34 imamelia joined #perl6
06:47 imamelia is now known as imamelia|Sleep
06:51 imamelia|Sleep left #perl6
07:12 rhr left #perl6
07:21 molaf joined #perl6
07:25 starcoder is now known as scoder
07:25 scoder is now known as starcoder
07:25 starcoder is now known as scoder
07:38 scoder is now known as starcoder
07:39 rhr joined #perl6
07:44 wallberg joined #perl6
07:48 leprevost left #perl6
07:48 leprevost joined #perl6
07:56 moritz good morning
07:56 Moukeddar joined #perl6
07:56 tadzik good morning
08:00 starcoder is now known as iElijah101
08:00 iElijah101 is now known as scoder
08:03 scoder is now known as starcoder
08:04 nymacro left #perl6
08:05 silent_h_ left #perl6
08:11 Moukeddar left #perl6
08:14 leprevost left #perl6
08:15 Moukeddar joined #perl6
08:15 Moukeddar left #perl6
08:15 Moukeddar joined #perl6
08:22 leprevost joined #perl6
08:22 Su-Shee_ is now known as Su-Shee
08:23 Helios` left #perl6
08:24 Moukeddar left #perl6
08:25 Helios` joined #perl6
08:34 takadonet joined #perl6
08:49 arcus joined #perl6
09:06 pernatiy left #perl6
09:09 masak joined #perl6
09:10 masak greetings, pandas.
09:10 nadim left #perl6
09:12 nadim joined #perl6
09:20 araujo joined #perl6
09:31 masak niecza: say "World Domin{.pick}" given <oes us ation>
09:31 p6eval niecza v4-76-g7bf5ef9: OUTPUT«Unhandled exception: Unable to resolve method pick in class Parcel␤  at /tmp/6MOD0e3ynU line 1 (MAIN mainline @ 3)␤  at /home/p6eval/niecza/lib/CORE.setting line 1311 (CORE C552_ANON @ 2)␤  at /home/p6eval/niecza/lib/CORE.setting line 1312 (CORE module-CORE @ 39)␤  at
09:31 p6eval ../home/p6eval/…
09:31 masak aww :)
09:32 masak a few of us could probable have a very productive "let's populate the Niecza setting" evening at some point.
09:32 masak s/ble/bly/
09:34 masak it would also be cool to have a "let's close some of these rakudobugs" evening. there's lots we can do if we pool our resources.
09:42 arcus left #perl6
09:44 arcus joined #perl6
10:01 wamba left #perl6
10:05 masak is C<uniq> spec'd anywhere?
10:11 arcus left #perl6
10:14 wamba joined #perl6
10:15 mj41 joined #perl6
10:27 whiteknight joined #perl6
10:32 masak write Ruby, run PHP: http://fructoselang.org/
10:32 masak this is the first example of someone compiling into PHP that I've seen. I'm simultaneously intrigued and concerned. :)
10:38 ggoebel__ left #perl6
10:43 ggoebel__ joined #perl6
10:49 drbean joined #perl6
10:52 masak left #perl6
10:55 drbean left #perl6
10:56 drbean joined #perl6
11:00 masak joined #perl6
11:00 drbean left #perl6
11:02 drbean joined #perl6
11:03 wamba left #perl6
11:06 risou joined #perl6
11:07 drbean left #perl6
11:08 jnthn afternoon, #perl6
11:08 drbean joined #perl6
11:09 mathw afternoon, jnthn
11:09 masak jnthn! \o/
11:10 jnthn masak! \o/
11:10 jnthn I survived $consulting-gig night out ;)
11:11 masak glad to hear it ;)
11:13 wallberg left #perl6
11:13 drbean left #perl6
11:14 wamba joined #perl6
11:15 drbean joined #perl6
11:17 wamba left #perl6
11:19 drbean left #perl6
11:19 mathw :)
11:21 drbean joined #perl6
11:22 mj41 left #perl6
11:22 wamba joined #perl6
11:25 Chillance joined #perl6
11:25 drbean left #perl6
11:27 drbean joined #perl6
11:28 otetar joined #perl6
11:31 drbean left #perl6
11:32 MayDaniel joined #perl6
11:33 tadzik o/
11:34 drbean joined #perl6
11:34 risou left #perl6
11:36 risou joined #perl6
11:38 Moukeddar joined #perl6
11:38 drbean left #perl6
11:38 wamba left #perl6
11:40 drbean joined #perl6
11:40 pernatiy joined #perl6
11:42 masak \o
11:43 tadzik I feel like I got to some new stage of enlightenment
11:43 drbean left #perl6
11:43 tadzik I feel annoyed seeing code with no tests
11:45 masak I usually feel a bit sad.
11:45 masak it's a lost opportunity.
11:46 masak then again, I still write mid-sized pieces of code without tests, so I shouldn't be too much of a hypocrite.
11:46 drbean joined #perl6
11:48 Moukeddar haha
11:48 Moukeddar testing ?
11:48 masak Moukeddar: oh, you'd be surprised.
11:48 masak :)
11:49 Moukeddar i have  a very rare adventures with Testing
11:51 drbean left #perl6
11:52 drbean joined #perl6
11:53 Patterner left #perl6
11:55 masak Moukeddar: automated tests are one of those outgroup-ingroup phenomena. before you've tried them in earnest, they don't seem worth the time. once you're used to them, it feels outright *reckless* to code without them.
11:55 Moukeddar masak, maybe :)
11:57 arcus joined #perl6
11:57 Psyche^ joined #perl6
11:57 Psyche^ is now known as Patterner
11:57 drbean left #perl6
11:57 masak this happens to me all the time now: I change something -- maybe adding new functionality or what have you -- and a test turns red. I go "oh right", and fix my thinko.
11:57 masak but without tests, I would've just coded on, oblivious.
11:58 masak and the cost for fixing that error increases with the square of the distance to the time I wrote the original code.
11:58 masak (or something like that)
11:59 drbean joined #perl6
12:00 Moukeddar masak, it's quite helpful in big projects :)
12:00 Moukeddar as i see
12:03 masak anything with an API of some kind.
12:03 masak doing tests right also enforces good encapsulation habits, as I've lately discovered.
12:04 masak if you're at the stage where you're saying "I'll just make this attribute/field/method protected so that I can test it", you're still not doing encapsulation right :)
12:05 drbean left #perl6
12:05 Moukeddar hehe
12:05 drbean joined #perl6
12:05 Moukeddar i still do :)
12:06 masak :)
12:07 Moukeddar i'm a lousy dev :)
12:08 masak I didn't say that. :) we're all on a journey.
12:09 Moukeddar you didn't,but i admit it :(
12:09 drbean left #perl6
12:10 masak what I really mean is that if you feel the need to open up things beyond your API in order to do testing, then either (1) you're likely testing the wrong things, or (2) your API isn't expressive enough.
12:10 masak I'd be happy to discuss counterexamples.
12:11 drbean joined #perl6
12:15 sunnavy /win 8
12:16 drbean left #perl6
12:16 Moukeddar well
12:16 Moukeddar i'm currently working on a mini engine:)
12:16 Moukeddar to render some basic stuff using DX(managed)
12:16 Moukeddar does it need testing?
12:18 drbean joined #perl6
12:21 masak things having to do with IO (or graphics, or persistence, or real-world side effects) are sort of off the beaten track with testing.
12:21 masak often it's possible to test them, with special testing frameworks and the like.
12:22 masak but I think the important thing to test is the "side-effect free" core of an application.
12:22 drbean left #perl6
12:22 masak the brain sitting in the middle, directing things like IO, graphics, and persistence.
12:24 mathw this is why one should structure one's applications properly
12:24 drbean joined #perl6
12:24 mathw app logic should not involve any IO or other side effects if at all possible
12:25 masak on the cqrs-ddd mailing list, one of the recurring questions is apparently, "how do I inject a repository into my domain objects?"
12:25 masak the answer is, of course, "don't do that!"
12:26 Moukeddar i see , then i have to redesign it :(
12:26 mathw it feels like a pain to start with
12:26 mathw but it's really, really worth it
12:26 masak yeah.
12:26 mathw if your data structures and your app logic are all unit testable, it's soooo good
12:26 masak and soon enough it becomes second nature.
12:27 masak also, structure and separation of concerns is everywhere, if you look for it.
12:27 mathw it helps you get a good API, and then you can replace a data structure wholesale, just stick to the same API and run it through your tests and it should be fine
12:27 mathw I have discussions with people at work about this sometimes
12:27 Moukeddar ok then after you mentioned how the internal core shouldn't have any IO , i saw many flaws in my design :(
12:27 mathw Got yelled at the other week
12:27 mathw why did you add this method here
12:27 mathw it just turns into a check of this
12:27 mathw why not just check it over here instead
12:27 mathw gargh
12:28 mathw yeah sure if you want to couple everything together too tightly
12:28 masak one blog post that I never wrote was about refactoring Druid into something object-oriented. I even made a diagram with color-coded sections of code for various concerns. and then mapped the colors to the old code. it made the old code look terribly scattered and tangled. :)
12:28 drbean left #perl6
12:29 masak I guess that's a universal law, though: "old code will look like crap from the 20-20 hindsight perspective of a separated concern"
12:29 hudnix joined #perl6
12:29 Moukeddar god , it's painful
12:29 mathw yes
12:29 Moukeddar make the pain go away please
12:29 mathw sometimes you can only see the design afterwards
12:30 drbean joined #perl6
12:31 Moukeddar i need some book about Design
12:32 masak Moukeddar: http://www.amazon.com/Domain-Driven-Design-​Tackling-Complexity-Software/dp/0321125215
12:32 orafu left #perl6
12:34 Moukeddar is it general or Perl Specific ?
12:34 Moukeddar is it about teams ?
12:34 orafu joined #perl6
12:35 drbean left #perl6
12:36 masak general. teams are a part of it, yes.
12:36 Moukeddar ouch!
12:36 Moukeddar i'm one army man :)
12:36 drbean joined #perl6
12:37 otetar left #perl6
12:37 masak that shouldn't prevent you from getting something out of that book.
12:38 icwiener joined #perl6
12:38 Moukeddar i'll see: )
12:40 sjn left #perl6
12:41 drbean left #perl6
12:41 Moukeddar sounds good :)
12:42 Moukeddar reviews too :)
12:42 drbean joined #perl6
12:43 Moukeddar so many books
12:44 Moukeddar some of them are worthless , just a RIP of some WIKI or documention
12:44 masak not this one.
12:45 Moukeddar i'll take your word :)
12:47 drbean left #perl6
12:48 drbean joined #perl6
12:48 Moukeddar masak, what's exactly domain-driven thingy ?
12:49 sjn joined #perl6
12:49 masak the way I understand it: for every business application we write, there's an underlying domain, often with a great tradition.
12:49 masak if we write a shipping system, there's a shipping domain with a lot of established terms.
12:49 Moukeddar ah i see now
12:49 masak stock exchange system -- stock exchange domain. etc.
12:50 Moukeddar just like i thought it is :)
12:50 masak thing is, the programmer usually isn't a domain expert. but a domain expert is needed in order for the system to be relevant/useful/usable.
12:50 Moukeddar studying in foreign language can be a pain :p
12:51 Moukeddar so, i don't have to "Know it All " ????
12:51 masak correct.
12:51 Moukeddar sweet
12:51 Moukeddar i was feeling crippled
12:52 Moukeddar so , later in my career
12:52 Moukeddar i'll get the specification
12:52 Moukeddar then i'll work out a solution right?
12:52 masak the specification isn't a domain expert.
12:52 drbean left #perl6
12:53 masak what you need is an actual human being who knows the domain.
12:53 Moukeddar ah
12:53 Moukeddar for example let's say i was assignet to code an accounting app
12:53 masak and then to work out a common language with terms that (1) the domain expert understands and can use, and (2) you understand and use in your system.
12:53 MayDaniel left #perl6
12:53 Moukeddar i'll have to discuss everything with an accountant for example
12:53 Moukeddar right?
12:53 masak right.
12:54 masak or someone who is very familiar with accounting.
12:54 Moukeddar nice :)
12:54 mathw although if you work for a big company, you may well just be handed a design and told to code a particular part of it
12:54 Moukeddar things are getting clear for me
12:54 drbean joined #perl6
12:54 Trashlord left #perl6
12:54 Moukeddar Mercy
12:54 mathw although that sucks, implementing someone else's design is usually frustrating because they'll get it wrong :)
12:55 masak mathw: that's very waterfall-y. problem is that experience only trickles downward/forward.
12:55 mathw yeah
12:55 Moukeddar haha , and there's no way for you to correct it ?
12:55 masak no :/
12:55 mathw fortunately where I am we don't have specific software designers
12:55 Moukeddar Ouch!
12:55 mathw so we all do a mixture
12:55 masak yeah.
12:55 mathw we're software engineers rather than programmers
12:55 mathw so we get a thing to do
12:55 mathw and have to come up with how to do it, how to fit it into the existing system, all that
12:56 Moukeddar good :)
12:56 mathw solo or with consultation with colleagues
12:56 Moukeddar i wish i could go to get a software engineer degree
12:56 mathw usually the latter, they help spot the stupid mistakes before you make them :)
12:56 Moukeddar so hard here
12:56 mathw :(
12:56 mathw I've got a degree in computer science
12:56 mathw we had a module on good software design
12:56 mathw very useful
12:56 mathw I wish there was evidence in the world that anybody else had ever done it...
12:57 mathw Like Mum's work had a new database app
12:57 mathw supposedly customised for their specific needs
12:57 Moukeddar here ,either high grades (which's kinda impossible due to private schools galactical marks ) or money
12:57 mathw the company gathered loads of requirements and use cases... and then ignored them all
12:58 mathw ah
12:58 mathw not so bad here
12:58 drbean left #perl6
12:59 mathw My parents supplied me with a fair amount of money
12:59 mathw I had work in the holidays
12:59 mathw and a student loan
12:59 Moukeddar it's very bad here
12:59 mathw my university's now charging 3x the fees it was though
12:59 Moukeddar 3rd world Style baddassity
13:00 drbean joined #perl6
13:00 mathw but then, we now have a government who apparently have no interest in the idea of anybody without old money being educated beyond the age of 18
13:00 Moukeddar there's no work here than can supply me with enough money for those schools
13:01 Moukeddar but still , i'll do it
13:01 Moukeddar i'll take  abumpy road and hope it'll work :)
13:02 Moukeddar thanks for the tips guys :)
13:03 mathw I hope you can do it
13:04 Moukeddar i really do too :)
13:04 drbean left #perl6
13:04 tadzik seen worr
13:04 aloha worr was last seen in #perl6 43 days 8 hours ago saying "sorry about that".
13:06 masak Moukeddar: listen to what books people recommend, read them, code a lot. it's not a total substitute for a higher education, but it will get you a long way.
13:06 drbean joined #perl6
13:06 Moukeddar masak, that's what i'm trying to do :)
13:07 masak Moukeddar++
13:08 mathw yes
13:08 mathw do open source stuff, listen to what people say about what you do, learn from them
13:08 mathw there are some extremely skilled and very talented people in places like this
13:09 Moukeddar i'll have to take my coding level one more step before being able to contribute to open source projects
13:09 Moukeddar or else i'll get flamed
13:10 mathw we don't do flaming
13:10 mathw education instead
13:10 Moukeddar well
13:10 Moukeddar they do
13:10 drbean left #perl6
13:10 moritz then contribute to us, not to them :-)
13:11 mathw yes :)
13:11 Moukeddar i went to Gamedev asking about XNA or SlimDX , and i got flamed real bad :)
13:11 mathw seriously, this is one of the friendliest places online
13:11 mathw ah games people
13:11 mathw yes
13:11 mathw some of them are not very nice
13:11 Moukeddar perl6 is really tempting :)
13:11 Moukeddar the gamdev guys are quite arrogant
13:12 drbean joined #perl6
13:12 Moukeddar one other thing i got flamed because is that i asked if the fact that i didn't learn Assembly or C\C++ is bad
13:13 Moukeddar i got no response
13:13 Moukeddar is it that bad?
13:13 masak it's a bit of a one-dimensional question.
13:13 Moukeddar and the answer is ?
13:14 moritz Moukeddar: no response is not the same as getting flamed
13:14 masak Moukeddar: "it depends"
13:14 Moukeddar it's not the "non response" but the few responses i got were pure troll or flame
13:15 masak I think C is still worth learning for any developer, and probably more so with gaming.
13:15 masak but you could write a perfectly good game in Python nowadays and not have to touch C or Assembly.
13:16 mathw I think most big games these days are written primarily in C++
13:16 mathw but they usually have large chunks of game-specific code in a higher-level language
13:16 Moukeddar the performance penalty
13:16 Moukeddar so what's say ? learn C instead of ASM ?
13:16 masak right, that was my next point: "but if you start writing for the big players on the market..."
13:16 mathw the core game engine is often C++, but the game's own logic may well be in a scripting language the engine can run
13:16 masak Lua, say.
13:16 mathw i.e. Unreal Engine supports UnrealScript
13:16 drbean left #perl6
13:17 mathw Lua's a common one, yes
13:17 masak Moukeddar: I'd go with C before ASM, yes.
13:17 Moukeddar i'm aware of the scripting thing in games :)
13:17 Moukeddar C it is :)
13:17 mathw I believe Civilisation 4's engine introduced Python
13:17 mathw C is worth learning, yes
13:17 Moukeddar this summer i'm gonna rock :)
13:17 mathw I'm a bit biased of course
13:17 * flussence vaguely remembers the horrible language used by a few Doom sourceports...
13:17 mathw I'm a professional C++ programmer :)
13:17 masak Moukeddar: ASM is always CPU-specific; C is the assembly language of the von Neumann machine :)
13:17 Su-Shee I'm doing web development and guis and I still think it's a good thing per se to know C and assembler. (and smalltalk and scheme or lisp and for example io or self or javascript..)
13:17 Helios` left #perl6
13:17 mathw But I think all programmers should be at least familiar with C
13:18 mathw and have also looked at languages in other paradigms
13:18 Moukeddar ASM seems like an Overkill for what i'm intending to do in the future
13:18 masak mathw: me too.
13:18 Moukeddar ok C :)
13:18 mathw I need to make some time to brush up on my Haskell properly again
13:18 mathw then I think I'll need to spend some more time with Prolog
13:18 Moukeddar you're a league of gentlemen :)
13:18 mathw and I still want to learn Common Lisp (don't ask why, maybe I'm feeling masochistic)
13:18 Helios` joined #perl6
13:18 masak learn this: C, LISP, Haskell, Prolog, Perl 5, and Perl 6. :)
13:19 Su-Shee thanks to the rise of available microcontrollers for everyone I also think a little assembler doesn't hurt.
13:19 drbean joined #perl6
13:19 masak let's make that Common Lisp.
13:19 Su-Shee masak: you're missing one of the purist OO langs ;)
13:19 masak Su-Shee: oh, that's very true.
13:19 Moukeddar microcontroller ?
13:19 mathw Common Lisp is awesomely powerful, but the syntax sends my eyes wild
13:19 Moukeddar costs a fortune here
13:19 mathw Su-Shee: Smalltalk!
13:19 masak yes, Smalltalk.
13:19 mathw I did some of that once
13:19 mathw I didn't like the whole persistent image thing
13:19 Su-Shee I love smalltalk. really opened my eyes on a very special way.
13:19 masak Java and/or C# there will be plenty of time to learn at $work :P
13:19 Moukeddar C is a must , then i'll go wild :)
13:20 mathw but I love the idea of OO using message passing instead of method calls
13:20 Su-Shee mathw: it felt weird but the integration is amazing.
13:20 masak this sounds like a blog post. "why you should learn these 7 langauges"
13:20 mathw Interestingly, Objective-C uses a very smalltalky object model
13:20 Su-Shee and the smalltalk books are exceptional.
13:20 mathw masak: go for it
13:20 Moukeddar mathw, should try the Async thingy , amazing :)
13:21 Su-Shee masak: there's at least 20 of those already and 30 stack overflow threads and they _all_ agree basically on the canon :)
13:21 Su-Shee crockford's 6 episode javascript lessons basically tell it as well.
13:21 masak Su-Shee: you don't happen to have the URLs to some of them?
13:21 Su-Shee (which are really worthwhile to watch..)
13:22 mathw okay
13:22 mathw I need to go out and get some yarn
13:22 Helios` is now known as Helios
13:22 mathw I have a teddy bear to make, and at the moment I can only make it in luminous green
13:22 Su-Shee masak: not at hand, I'll paste it if I fall over one again. I plainly did what a good humanities student is supposed to do: "know the classics" ;)
13:22 Moukeddar teddy bear ?
13:22 Moukeddar lol
13:22 Moukeddar you guys are hilarious :)
13:23 Moukeddar thanks again :)
13:23 masak mathw++ # practicing the soft arts
13:23 IllvilJa left #perl6
13:23 mathw yeah I like making things that are tangible
13:23 Su-Shee but I can really really recommend smalltalk books.
13:23 Su-Shee mathw: that's why I bake bread :)
13:23 mathw Su-Shee: I baked bread this morning :)
13:23 mathw later I will be playing music
13:23 Su-Shee mathw: mine is still growing ;) (sourdough)
13:23 drbean left #perl6
13:23 mathw ah
13:24 mathw I've never managed to get a sourdough starter going
13:24 masak re Smalltalk: I sometimes come back to this document: http://gagne.homedns.org/~tgag​ne/contrib/EarlyHistoryST.html
13:24 masak it's inspiring reading.
13:24 mathw but I did do a nice slow rise, so it should have good flavour
13:24 mathw I'll find out later :)
13:24 Moukeddar one other issue i have is the language
13:24 Moukeddar :(
13:25 moritz mathw: starting a sourdough is a bit like bootstrapping a compiler :-)
13:25 mathw okay, I'm off
13:25 mathw I'll be back later
13:25 drbean joined #perl6
13:25 Su-Shee masak: there's also an extremely interesting lecture of alan kay from the mid 80ies about userinterface, it's amazing what this man was involved in.
13:25 Moukeddar hello ?
13:25 jnthn moritz: I said "d'oh" quite a few times working on nqp bootstrapping ;)
13:26 masak Moukeddar: don't ask to ask. :) just say what you want.
13:27 Moukeddar i need a better translator :)
13:29 Moukeddar thank you guys again
13:29 Moukeddar i'm off to NOMNOM
13:29 masak o/
13:30 drbean left #perl6
13:31 drbean joined #perl6
13:32 Moukeddar false alarm , not ready yet :(
13:34 Moukeddar left #perl6
13:36 drbean left #perl6
13:38 drbean joined #perl6
13:45 drbean left #perl6
13:46 drbean joined #perl6
13:49 colomon just blogged a p6 resource page for my talk today, comments deeply appreciated: http://justrakudoit.wordpress.c​om/2011/04/30/perl-6-resources/
13:50 wallberg joined #perl6
13:51 drbean left #perl6
13:52 masak colomon++
13:52 moritz colomon: change that link to masak's blog post to http://strangelyconsistent.org/bl​og/happy-10th-anniversary-perl-6
13:52 moritz colomon: otherwise: very nice
13:52 * masak was just going to say that
13:53 drbean joined #perl6
13:53 * moritz faster
13:53 JimmyZ joined #perl6
13:53 masak :)
13:53 moritz can anybody else confirm spectest failures on newest parrot?
13:53 colomon I'm going to stick my presentation on line in a couple of minutes for suggestions, too.
13:53 colomon moritz++
13:53 pmurias joined #perl6
13:53 masak ooh, I found a typo in the first paragraph of that post...
13:53 * masak fixes
13:57 awwaiid left #perl6
13:58 drbean left #perl6
13:59 drbean joined #perl6
13:59 colomon Is try.rakudo.org working atm?
13:59 fhelmberger joined #perl6
14:00 moritz seems not
14:02 wallberg hi all! I seem to recall asking this a long time ago but here it goes again. how can I open a named UNIX pipe/fifo in p6 and read input on it?
14:02 * moritz would try open('pipename')
14:03 masak doesn't a named UNIX pipe/fifo work just like a file?
14:03 drbean left #perl6
14:03 flussence it's socket files that are fiddly, fifos should work just fine
14:04 JimmyZ_ joined #perl6
14:04 masak the abstraction that a fifo does is that it's behavior pretending to be a file. so a Perl 6 implementation should blithely treat it as a file, otherwise the implementation is doing something wrong.
14:05 drbean joined #perl6
14:05 wallberg ok
14:06 wallberg Can we make system calls from within p6 to run commands such as mkfifo?
14:06 JimmyZ left #perl6
14:06 JimmyZ_ is now known as JimmyZ
14:06 wallberg system("bla bla")?
14:06 moritz run("mkfifo arg1 arg2")
14:06 masak run 'bla bla'
14:06 wallberg oki
14:07 masak moritz is faster than I today ;)
14:07 colomon backtick works as well, no?
14:07 masak no.
14:07 colomon btw, presentation draft is http://www.harmonyware.com/out-talk/0001.html
14:07 masak but qx and qqx do.
14:07 moritz qx/qqx
14:07 masak ooh.
14:07 colomon still needs the section on junctions.  :)
14:07 pochi left #perl6
14:07 colomon and probably much advice from the worthies here.
14:07 jnthn colomon: will take quick look through
14:07 wallberg can someone elaborate a little on qx and qqx?
14:08 masak colomon: "All the main developers are there pretty much day" -- missing "every"?
14:08 colomon yes
14:08 jnthn colomon: All the main developers are there pretty much day
14:08 jnthn oh, masak was quicker
14:08 colomon corrected locally now.  :)
14:08 masak "Two languages from the Perl family" -- Larry Wall
14:09 masak is that a direct quote?
14:09 masak I recall obra saying that, but not TimToady.
14:09 jnthn "Implemented in NQP (Not Quite Perl 6) and Parrot"
14:09 jnthn Worth mentioning that much of it is written in Perl 6 too (e.g. the setting)
14:09 imamelia|Sleep joined #perl6
14:10 drbean left #perl6
14:10 jnthn "We hope to have it also running on .NET soon" ==> yes, but the new meta-model and gradual typing improvements are more immediate
14:10 masak <TimToady> I think deuterium should be renamed to something less insulting to hydrogen.
14:10 jnthn And potentially more interesting.
14:10 colomon masak: That's actually ripped from one of jnthn++'s talks
14:10 masak oh, ok :)
14:10 jnthn orly? :)
14:10 masak jnthn: is that a direct quote? :)
14:10 drbean joined #perl6
14:11 arcus left #perl6
14:11 colomon jnthn: " * New meta-model and gradual typing improvements are the next big project" added before .NET line
14:12 jnthn colomon: OK
14:12 jnthn Maybe even next/current :)
14:12 jnthn er, s/next/current/ :)
14:12 colomon done
14:12 arcus joined #perl6
14:13 Helios left #perl6
14:13 jnthn masak: er...
14:13 wamba joined #perl6
14:13 jnthn masak: I'm guessing if I put it as a direct quote I musta got that from somewhere
14:14 Helios joined #perl6
14:15 drbean left #perl6
14:15 arcus hi
14:15 arcus I get some error while running a script:http://dpaste.com/537475/
14:15 tadzik hello arcus
14:15 tadzik arcus: this is a Perl 6 channel, you seem to have a problem with Perl 5
14:15 colomon now I'm worried I made up that quote, I can't find where jnthn said it.
14:16 masak colomon: one possible source is this post: http://strangelyconsistent.org/b​log/how-perl-6-could-kill-us-all
14:16 moritz I've also quoted larry saying that
14:17 masak "Perl 5 and Perl 6 are two languages in the Perl family, but of different lineages."
14:17 drbean joined #perl6
14:17 masak but the meme is definitely earlier than that.
14:18 colomon Ah, I probably stole it from moritz++
14:18 masak from moritz?
14:19 masak colomon: nice slides.
14:19 colomon Thanks.
14:19 moritz I had it as a quote in a german 5 -> 6 talk
14:19 masak ah.
14:20 colomon moritz: which was the source file I started working with to do this talk.  :)
14:20 colomon I think a couple of your examples may have survived too.
14:21 drbean left #perl6
14:21 colomon like bits of factorials
14:22 JimmyZ left #perl6
14:23 drbean joined #perl6
14:23 moritz colomon: fwiw the output in s5/index.html is much more polished
14:23 moritz colomon: I don't know if the README says it, but there are two different sets of output files generated
14:24 moritz colomon: the ones in s5/ are prettier :-)
14:24 colomon One thought on roles I developed while working on this: roles can be akin to "has a" relationships.  So for instance in the ABC example, it makes sense to say Note has a Duration.  It makes no sense to say Note *is* a Duration, so inheritance doesn't really fit well.
14:25 colomon moritz: errr...
14:25 moritz colomon: cd s5; firefox index.html
14:26 colomon actually, if I use the s5 version, Camelia is lurking over the upper left hand corner of my text on every page
14:26 moritz then make her smaller :-)
14:26 masak ooh -- psyde crashed.
14:26 masak something must've moved under it while I didn't blog.
14:27 colomon moritz: suggestions as to how?
14:27 imamelia|Sleep is now known as imamelia
14:27 moritz colomon: s5.tmpl is the template
14:28 drbean left #perl6
14:28 moritz oh wait
14:28 moritz just resize s5/camelia.gif, or so
14:28 * moritz hasn't used it for ages
14:29 masak colomon: if the Note *has a* Duration, isn't that a hint that you should use composition, not role-'does'?
14:29 drbean joined #perl6
14:30 colomon masak: what do you mean by composition?
14:30 moritz has $.duration;
14:31 colomon hmmm... I guess it's the difference between has $.duration versus is duration-bearing-object
14:34 [1]imamelia joined #perl6
14:34 drbean left #perl6
14:35 drbean joined #perl6
14:36 masak I often find this kind of OO design decision tricky.
14:36 masak it often feels like there are a few degrees of freedom left over, with no real guidance (apart from experience) on how to factor things.
14:37 imamelia left #perl6
14:37 [1]imamelia is now known as imamelia
14:37 colomon masak: yes.  As you might gather, I'm still trying to feel out when it makes sense to use inheritance and when roles.
14:38 colomon I feel like there's an article or book waiting to be written on the subject once someone understands it a little better.  :)
14:38 colomon moritz: s5 version looks much much better once it is de-cameliaized, but now some of the slides are too.
14:38 colomon *long
14:39 masak colomon: the "extremist" line would be to use roles for all behavior reuse, and inheritance only for type relations between classes.
14:39 drbean left #perl6
14:40 moritz colomon: then split them up
14:40 colomon moritz: yes, I'm working on it
14:40 moritz colomon: the rule of thumb is that you shouldn't have more than 5 facts on a single slide :-)
14:41 drbean joined #perl6
14:45 drbean left #perl6
14:47 drbean joined #perl6
14:52 drbean left #perl6
14:52 colomon rakudo: my Int|Str $error = "String"; say $error
14:52 p6eval rakudo 8533c3: OUTPUT«===SORRY!===␤In "my" declaration, typename Int must be predeclared (or marked as declarative with :: prefix) at line 22, near "|Str $erro"␤»
14:52 colomon odd error
14:53 moritz std: my Int|Str $error = "String"; say $error
14:53 p6eval std 3468e14: OUTPUT«[31m===[0mSORRY![31m===[0m␤Multiple prefix constraints not yet supported at /tmp/VLi3cE_UJL line 1:␤------> [32mmy Int[33m⏏[31m|Str $error = "String"; say $error[0m␤Malformed my at /tmp/VLi3cE_UJL line 1:␤------> [32mmy Int[33m⏏[31m|Str $error = "String"; say
14:53 p6eval ..$error[0m␤…
14:53 colomon woah, not even supported in STD yet?!
14:53 moritz not even in Perl 6
14:54 drbean joined #perl6
14:54 colomon the example is straight from the spec.
14:54 masak there's been a de-emphasizing of junctional types in favor of where clauses.
14:54 masak colomon: then the spec needs updating.
14:55 colomon that was from S02, I think.
14:55 colomon I'm looking for the section on junctions?
14:55 masak there's a little about junctions in S09.
14:55 colomon and a tiny bit in S03
14:57 colomon so, where in the world is pmichaud's beautiful card script?  I saved it somewhere safe...
14:57 masak https://gist.github.com/153993
14:57 colomon masak++
14:58 drbean left #perl6
14:59 drbean joined #perl6
14:59 colomon interesting ... it gives errors now
14:59 colomon Use of uninitialized value in numeric context  in 'Code::assuming_helper' at line 1
15:00 colomon ouch
15:00 colomon @deck Z @( (2..10, 10, 10, 10, 11) >>xx>> 4 ); doesn't work correctly
15:00 masak confirmed.
15:01 masak (the error message, that is)
15:01 moritz try it with  Xxx 4  instead of >>xx>> 4
15:01 * colomon is not sure he approves of Xxx as a command
15:01 colomon however, that does work.  moritz++
15:01 moritz wow, I'm impressed. That was a shot in the dark
15:02 wamba left #perl6
15:02 moritz it's three chars shorter :-)
15:03 drbean left #perl6
15:04 colomon process.pl:  Wide character in subroutine entry at process.pl line 143.
15:04 colomon seems like it doesn't like unicode?
15:05 moritz colomon: you can ignore that warning, I can also fix it :-)
15:05 drbean joined #perl6
15:06 moritz colomon: git pull, and try again please
15:06 pochi joined #perl6
15:07 colomon beauty!  moritz++
15:10 drbean left #perl6
15:11 drbean joined #perl6
15:16 drbean left #perl6
15:18 drbean joined #perl6
15:20 cognominal left #perl6
15:21 cognominal joined #perl6
15:22 drbean left #perl6
15:24 drbean joined #perl6
15:25 orafu left #perl6
15:27 orafu joined #perl6
15:29 drbean left #perl6
15:30 drbean joined #perl6
15:32 JimmyZ joined #perl6
15:34 JimmyZ rakudo:sub postfix:<!>($a) { [*] 1..$a; }; say (*!)(5);
15:34 p6eval rakudo 8533c3: OUTPUT«120␤»
15:35 mtk left #perl6
15:36 cotto left #perl6
15:37 [1]imamelia joined #perl6
15:38 drbean left #perl6
15:39 imamelia left #perl6
15:39 [1]imamelia is now known as imamelia
15:39 drbean joined #perl6
15:42 ymasory_ joined #perl6
15:44 mtk joined #perl6
15:44 drbean left #perl6
15:45 drbean joined #perl6
15:46 ymasory left #perl6
15:46 ymasory_ is now known as ymasory
15:49 arcus_ joined #perl6
15:50 drbean left #perl6
15:51 JimmyZ rakudo:sub postfix:< >($a) { [*] 1..$a; }; say   (* )(5); #is this expected?
15:51 p6eval rakudo 8533c3: OUTPUT«120␤»
15:51 arcus left #perl6
15:51 moritz no, I think whitespace in operators is disallowed
15:51 drbean joined #perl6
15:53 JimmyZ rakudo:sub postfix:< >($a) { [*] 1..$a; }; say   (* )(5);  # SBC case
15:53 p6eval rakudo 8533c3: OUTPUT«120␤»
15:56 JimmyZ std:sub postfix:< >($a) { [*] 1..$a; }; say   (* )(5);
15:56 p6eval std 3468e14: OUTPUT«Use of uninitialized value $starter in concatenation (.) or string at /usr/local/share/perl/5.10.1/CursorBase.pm line 2754.␤Use of uninitialized value $stopper in concatenation (.) or string at /usr/local/share/perl/5.10.1/CursorBase.pm line 2754.␤Use of uninitialized value
15:56 p6eval ..$starte…
15:56 drbean left #perl6
15:58 drbean joined #perl6
15:59 colomon rakudo: say 4 & 5 == 4 & 5
15:59 p6eval rakudo 8533c3: OUTPUT«all(all(Bool::True, Bool::False), all(Bool::False, Bool::True))␤»
16:01 Kovensky left #perl6
16:02 drbean left #perl6
16:04 drbean joined #perl6
16:04 [Coke] left #perl6
16:06 [Coke] joined #perl6
16:09 drbean left #perl6
16:10 drbean joined #perl6
16:11 [Coke] left #perl6
16:11 moritz colomon: don't even start telling beginners about junctions
16:11 moritz rakudo: say so 4 & 5 == 4 & 5
16:11 p6eval rakudo 8533c3: OUTPUT«Bool::False␤»
16:12 moritz rakudo: say so 4 | 5 == 4 & 5
16:12 p6eval rakudo 8533c3: OUTPUT«Bool::True␤»
16:12 [Coke] joined #perl6
16:13 colomon Should I just leave that bit out?  I did write up two slides for it.
16:13 moritz IMHO they are rather confusing for beginners
16:14 moritz and they tend to spend way too much time on it, and then are disappointed in the end
16:14 colomon IMO they are confusing, period.  :)
16:14 colomon And I have the impression the entire p6 community spent too much time on them, so fair enough.
16:15 colomon those slides are now gone.
16:15 drbean left #perl6
16:15 Kovensky joined #perl6
16:16 JimmyZ left #perl6
16:16 drbean joined #perl6
16:21 drbean left #perl6
16:23 justatheory joined #perl6
16:23 drbean joined #perl6
16:23 colomon rakudo: my @a = 1..52; my @b = @a.shift(5); say ~@b
16:23 p6eval rakudo 8533c3: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in 'List::shift' at line 2906:CORE.setting␤  in main program body at line 22:/tmp/ctPkOjZ3zJ␤»
16:27 drbean left #perl6
16:29 drbean joined #perl6
16:29 arcus joined #perl6
16:30 plobsing joined #perl6
16:31 Tedd1 left #perl6
16:34 drbean left #perl6
16:35 drbean joined #perl6
16:40 drbean left #perl6
16:41 drbean joined #perl6
16:46 drbean left #perl6
16:48 drbean joined #perl6
16:51 drbean left #perl6
16:52 mberends left #perl6
16:54 drbean joined #perl6
16:58 drbean left #perl6
17:00 drbean joined #perl6
17:05 drbean left #perl6
17:05 mberends joined #perl6
17:06 drbean joined #perl6
17:11 MayDaniel joined #perl6
17:11 drbean left #perl6
17:13 drbean joined #perl6
17:17 arcus left #perl6
17:17 colomon left #perl6
17:18 drbean left #perl6
17:19 drbean joined #perl6
17:22 Helios left #perl6
17:24 drbean left #perl6
17:25 Helios joined #perl6
17:26 drbean joined #perl6
17:30 orafu left #perl6
17:30 drbean left #perl6
17:32 drbean joined #perl6
17:32 orafu joined #perl6
17:35 MayDaniel left #perl6
17:36 drbean left #perl6
17:38 drbean joined #perl6
17:40 leprevost left #perl6
17:42 Helios left #perl6
17:42 Helios joined #perl6
17:42 drbean left #perl6
17:44 drbean joined #perl6
17:47 drbean left #perl6
17:51 drbean joined #perl6
17:55 drbean left #perl6
17:57 drbean joined #perl6
17:57 arcus_ left #perl6
18:01 cotto joined #perl6
18:01 drbean left #perl6
18:03 drbean joined #perl6
18:04 jaldhar left #perl6
18:04 jaldhar joined #perl6
18:07 pamera joined #perl6
18:08 drbean left #perl6
18:10 drbean joined #perl6
18:11 whiteknight left #perl6
18:13 ymasory left #perl6
18:14 drbean left #perl6
18:15 drbean joined #perl6
18:20 drbean left #perl6
18:20 justatheory left #perl6
18:21 drbean joined #perl6
18:26 drbean left #perl6
18:27 drbean joined #perl6
18:29 Helios left #perl6
18:29 Helios joined #perl6
18:32 drbean left #perl6
18:34 drbean joined #perl6
18:38 Sonja joined #perl6
18:39 drbean_ joined #perl6
18:39 drbean left #perl6
18:44 drbean_ left #perl6
18:44 drbean joined #perl6
18:45 Helios left #perl6
18:47 orafu left #perl6
18:47 Helios joined #perl6
18:48 drbean left #perl6
18:50 drbean joined #perl6
18:51 orafu joined #perl6
18:55 drbean left #perl6
18:57 drbean joined #perl6
18:57 mj41 joined #perl6
18:57 Helios left #perl6
18:59 cotto left #perl6
18:59 orafu left #perl6
19:00 orafu joined #perl6
19:01 drbean left #perl6
19:02 Helios joined #perl6
19:02 Sonja left #perl6
19:03 Sonja joined #perl6
19:03 drbean joined #perl6
19:04 noganex_ joined #perl6
19:07 noganex left #perl6
19:07 drbean left #perl6
19:09 drbean joined #perl6
19:14 drbean left #perl6
19:16 drbean joined #perl6
19:21 drbean left #perl6
19:21 donri joined #perl6
19:22 drbean joined #perl6
19:26 drbean left #perl6
19:28 SHODAN joined #perl6
19:28 drbean joined #perl6
19:28 justatheory joined #perl6
19:34 drbean left #perl6
19:34 risou left #perl6
19:35 drbean joined #perl6
19:39 drbean left #perl6
19:41 drbean joined #perl6
19:42 pjcj left #perl6
19:43 pamera left #perl6
19:43 Sonjaaa joined #perl6
19:43 risou joined #perl6
19:44 Sonjaaa left #perl6
19:45 drbean left #perl6
19:46 drbean joined #perl6
19:46 Sonja left #perl6
19:50 drbean left #perl6
19:51 drbean joined #perl6
19:54 pmurias left #perl6
19:56 drbean left #perl6
19:57 bluescreen10 joined #perl6
19:58 drbean joined #perl6
20:02 drbean left #perl6
20:04 drbean joined #perl6
20:05 ymasory joined #perl6
20:08 drbean left #perl6
20:09 drbean joined #perl6
20:12 risou left #perl6
20:13 molaf left #perl6
20:14 drbean left #perl6
20:14 drbean joined #perl6
20:16 dorlamm joined #perl6
20:19 drbean left #perl6
20:21 drbean joined #perl6
20:25 drbean left #perl6
20:26 drbean joined #perl6
20:27 imamelia left #perl6
20:30 drbean left #perl6
20:31 drbean joined #perl6
20:34 alester joined #perl6
20:36 drbean left #perl6
20:37 drbean joined #perl6
20:38 pjcj joined #perl6
20:42 drbean left #perl6
20:43 drbean joined #perl6
20:47 drbean left #perl6
20:48 Tedd1 joined #perl6
20:49 drbean joined #perl6
20:50 mberends left #perl6
20:53 drbean left #perl6
20:53 justatheory left #perl6
20:54 justatheory joined #perl6
20:54 masak JimmyZ++ # whitespace op bug
20:54 * masak submits rakudobug
20:54 masak rakudo: say (* )(5)
20:54 p6eval rakudo 8533c3: OUTPUT«invoke() not implemented in class 'Whatever'␤  in main program body at line 22:/tmp/B33jnbC8fQ␤»
20:55 drbean joined #perl6
20:56 mj41 left #perl6
20:58 justatheory left #perl6
20:59 drbean left #perl6
21:02 drbean joined #perl6
21:03 mberends joined #perl6
21:06 drbean left #perl6
21:07 drbean joined #perl6
21:11 drbean left #perl6
21:12 drbean joined #perl6
21:13 [particle] joined #perl6
21:14 [particle]1 left #perl6
21:17 wamba joined #perl6
21:17 drbean left #perl6
21:17 lue hello world, finally! o/
21:17 masak lue!!\o/!!
21:19 drbean joined #perl6
21:20 masak rakudo: say "lue is back! oh {<joy noes>.pick}!"
21:20 p6eval rakudo 8533c3: OUTPUT«lue is back! oh noes!␤»
21:20 masak :)
21:20 frettled (:
21:22 lue Can't wait for the next Doctor Who episode (in ≈4 hours!)
21:23 lue rakudo: say "lue is back! oh {<joy noes>.pick}!"
21:23 p6eval rakudo 8533c3: OUTPUT«lue is back! oh joy!␤»
21:23 drbean left #perl6
21:23 masak rakudo: say "Doctor {<Who What Where Why When>.pick}?"
21:23 p6eval rakudo 8533c3: OUTPUT«Doctor Where?␤»
21:24 lue rakudo: say Doctor.WHO
21:24 p6eval rakudo 8533c3: OUTPUT«Could not find sub &Doctor␤  in main program body at line 22:/tmp/x7tAQTDlnA␤»
21:24 lue aw, not even Perl6 knows his name :(
21:25 drbean joined #perl6
21:28 icwiener left #perl6
21:29 lue Anyone bother messing with my Pod6 reader lately? :)
21:29 Limbic_Region joined #perl6
21:30 drbean left #perl6
21:30 spam_ joined #perl6
21:30 masak lue: no; did you leave an encouragement somewhere for people to do that?
21:30 drbean joined #perl6
21:30 MayDaniel joined #perl6
21:31 spam_ i need to recent good reference on perl6, i also do not know alot about perl5 so I need to know if I should learn it too to learn perl6.
21:32 masak spam_: hello.
21:32 masak spam_: it helps to know Perl 5, but it's not necessary.
21:32 spam_ masak: hello.
21:32 lue I think I did, but just a weak one in my blog post.
21:32 masak spam_: as to good references, may I recommend perl6.org ?
21:33 masak spam_: from there, you can reach other good resources, such as the Advent Calendar and Rosetta Code.
21:33 lue spam_: I haven't learned any Perl5 and I'm doing just fine.
21:33 justatheory joined #perl6
21:33 * tylercurtis knows Perl 5 mostly as a backend for his internal Perl 6 compiler.
21:34 masak :)
21:34 spam_ I know python but not sure that will help with perl6. I always wanted to check perl6 but always got this feeling that learning perl6 without knowing perl5 is a waste of time...
21:34 y3llow left #perl6
21:34 masak it's certainly not a waste of time.
21:34 drbean left #perl6
21:34 masak and knowing Python will help you in many cases too.
21:34 y3llow joined #perl6
21:34 masak rakudo: my $a = 5; say 2 < $a < 8
21:34 p6eval rakudo 8533c3: OUTPUT«Bool::True␤»
21:35 masak that's a Python feature, right? :)
21:35 TimToady and Perl 6 := is basically identical to Python assignment
21:35 drbean joined #perl6
21:35 spam_ ah! found a pdf named using perl6. seems nice..
21:36 tylercurtis TimToady: really?
21:36 masak spam_: yes, it's a book in progress. but you'll find a lot in there.
21:36 lue TimToady: there is nothing like binding (:=) in Python. That's why I came to Perl6.
21:36 lue (nothing easy to use, anyway)
21:37 tylercurtis rakudo: my $x = 5; my $y := $x; say :$x, :$y; $x = 6; say :$x; :$y;
21:37 p6eval rakudo 8533c3: OUTPUT«2 unexpected named parameters passed (x, y)␤  in 'say' at line 5828:CORE.setting␤  in main program body at line 22:/tmp/ouA4pd9pRv␤»
21:37 TimToady au contraire, = in Python is scalar := in Pelr 6
21:37 TimToady *Perl 6 even
21:37 tylercurtis rakudo: my $x = 5; my $y := $x; say (:$x, :$y); $x = 6; say (:$x; :$y);
21:37 TimToady is supposed to be, not necessarily what rakudo does right now
21:37 p6eval rakudo 8533c3: OUTPUT«x 5y      5␤y     6␤»
21:38 tylercurtis rakudo: my $x = 5; my $y := $x; say (:$x, :$y); $x = 6; say (:$x, :$y);
21:38 p6eval rakudo 8533c3: OUTPUT«x 5y      5␤x     6y      6␤»
21:38 tylercurtis TimToady: what should that output?
21:39 TimToady that looks correct to me
21:39 spam_ left #perl6
21:40 drbean left #perl6
21:41 tylercurtis TimToady: The equivalent Python program (replacing := with =) results in x = 6 and y = 5.
21:41 masak rakudo: say join ' ', <be bop>.roll(4), <bi bop!>
21:41 p6eval rakudo 8533c3: OUTPUT«bop bop be bop bi bop!␤»
21:42 drbean joined #perl6
21:42 TimToady yes, but you also have to replace = with something Python doesn't have
21:42 tylercurtis ah, true.
21:44 * lue assumes that something is binding.
21:46 TimToady Python has binding; it doesn't support assignment in the sense that Perl does
21:46 masak lue: what TimToady is saying is that Python does have binding, and spells it '='.
21:47 masak lue: what it doesn't have is assignment, in the form Perl 6 does.
21:47 drbean left #perl6
21:47 tylercurtis TimToady: In what way is this distinguishable from having assignment, but not binding?
21:47 masak lue: it's a bit similar to nqp, which also only has binding. but nqp spells it ':='
21:47 dalek std: 9f27365 | larry++ | CursorBase.pmc:
21:47 dalek std: Disallow null operators
21:47 dalek std: review: https://github.com/perl6/std/commit/9f273652f2
21:48 drbean joined #perl6
21:49 lue Then what Python mustn't have done the action-at-a-distance part in the way := does.
21:50 masak lue: it can't, if all you have is binding.
21:50 masak lue: you can only do that when you have binding *and* assignment.
21:50 TimToady tylercurtis: it lacks copy semantics in places where a Perl programmer would expect it
21:50 TimToady such as: a = [1,2,3]; b = a; b[0] = 42; print a  # [42,2,3]
21:51 masak rakudo: my $a = [1,2,3]; my $b = $a; $b[0] = 42; say $a.perl
21:51 p6eval rakudo 8533c3: OUTPUT«[42, 2, 3]␤»
21:51 * masak stands arms akimbo :)
21:52 never joined #perl6
21:52 TimToady there may be a better example :)
21:52 drbean left #perl6
21:52 masak rakudo: say "never!"
21:52 p6eval rakudo 8533c3: OUTPUT«never!␤»
21:52 never top of the evening to you all :)
21:53 lue So it's beause Python never made a distinction, not that it was w/o binding, that I got frustrated and switched to P6?
21:53 masak lue: I guess we will never know :)
21:54 drbean joined #perl6
21:54 am0c joined #perl6
21:55 lue Well, what did it for me was lack of switch statements (could you imagine typing something like    if opcode ==    256 times? I couldn't.)
21:56 masak that's what hashes are for :)
21:57 moritz or arrays
21:57 masak or arrays, if your... what moritz said.
21:57 moritz in the case of integer opcodes :-)
21:57 masak arrays are just 0-based integer special cases of hashes. :P just ask the PHP or awk folks.
21:59 drbean left #perl6
21:59 lue And I needed AAAD for the "shadow ROM" areas of the NES memory, but I could get around it with manually diverting calls to shadow memory.
22:00 drbean joined #perl6
22:03 wamba left #perl6
22:05 drbean left #perl6
22:07 masak 'AAAD'?
22:07 drbean joined #perl6
22:09 lue Action At A Distance (I was getting tired of writing it all out)
22:11 drbean left #perl6
22:11 masak lue: all problems in computer science can be solved by adding another layer of indirection.
22:12 sbp or by writing a program that adds another layer of indirection
22:12 sbp or a framework to create programs that add new layers of indirection
22:13 masak make it an abstract framework factory.
22:13 moritz or a FrameworkFactory that helps you write framworks that ...
22:13 masak I might need more frameworks down the line.
22:13 drbean joined #perl6
22:13 masak moritz: stop thinking what I'm thinking! :P
22:14 moritz masak: stop thinking what I'm thinking! :P
22:14 masak arrrgh!
22:14 masak :)
22:14 frettled All programming is an exercise in caching.
22:14 frettled (John Mashey, IIRC)
22:15 masak frettled: I don't see that one quite so easily. do you have an elucidating example?
22:15 lue .oO(I wanted to build the framework, but I had no frame of reference...)
22:15 TimToady masak: it's hard to shift a hash
22:16 masak TimToady: yeah. I did put a smiley on that line, fwiw :)
22:16 TimToady doesn't look like a smile to me :P
22:16 frettled masak: sorry, it was Terje Mathisen, not John Mashey, that changes _everything_ ;)
22:17 masak TimToady: you would see my smile if the tongue weren't in the way :P
22:18 drbean left #perl6
22:18 frettled masak: but in general, no matter how you try to abstract things, your programming usually makes assumptions about how you handle data, which kinds and amounts of data are practical to handle, in which way
22:18 drbean joined #perl6
22:19 frettled the real quote has the «almost» prefix, though
22:20 frettled coz Terje is really, really smart
22:20 alester left #perl6
22:22 drbean left #perl6
22:23 drbean joined #perl6
22:25 saaki left #perl6
22:27 vert2_ left #perl6
22:27 dorlamm left #perl6
22:27 Helios left #perl6
22:28 drbean left #perl6
22:29 Lorn left #perl6
22:29 Helios joined #perl6
22:30 drbean joined #perl6
22:31 Lorn joined #perl6
22:34 drbean left #perl6
22:36 drbean joined #perl6
22:37 Lorn left #perl6
22:41 drbean left #perl6
22:42 drbean joined #perl6
22:46 drbean left #perl6
22:48 drbean joined #perl6
22:51 lue [Pod6] Hm. Should I treat semantic blocks (things like TITLE and LICENSE and so on) like just another blocktype, or as a wholly separate thing?
22:53 drbean left #perl6
22:53 masak an excellent question.
22:54 masak please provide adequate reasons for both scenarios :)
22:54 drbean joined #perl6
22:54 cotto joined #perl6
22:57 * lue thinking...
22:58 masak lue: syntactically, they're just a type of abbreviated blocks, no?
22:58 drbean left #perl6
22:59 masak so one way to factor things would be to just say "semantic blocks are abbreviated blocks whose names happen to be all-uppercase".
23:00 lue According to S26, they're like =para blocks, but with a free title (usually rendered as =head1) and semantic info for parsers.
23:00 masak right.
23:01 drbean joined #perl6
23:02 lue I'm wondering how to deal with them. Either they are separted in the grammar so they can be sorted neatly in the actions, or they're treated like any other block name with the parser responsible for figuring out which blocks are semantic during conversion.
23:02 lue (btw, have you ever done    file *    in the specs repo?)
23:03 masak I think they should be separated in the grammar iff the fact that they are semantic blocks affects the subsequent parsing.
23:03 masak judging from what you wrote above about =para blocks, sounds like that might be the case. though I'm not sure.
23:05 MayDaniel left #perl6
23:05 drbean left #perl6
23:06 lue I would think there are certain formats (Manpage in particular IIRC) where that semantic info is important, and having the grammar sort it out seems cleaner than having the conversion mechanism try to guess at it.
23:07 drbean joined #perl6
23:08 masak there's no doubt that by the time the Pod machinery is done building the AST, the information should be there.
23:08 masak the question is more: should it be the grammar or the action methods doing the tagging?
23:08 masak guess in the end, it doesn't matter too much. just do what falls out most easily.
23:09 masak rakudo: say gcd(14, 21)
23:09 p6eval rakudo 8533c3: OUTPUT«7␤»
23:09 masak jnthn: look, we already had it that way :)
23:09 masak rakudo: say lcm(14, 21)
23:09 p6eval rakudo 8533c3: OUTPUT«Could not find sub &lcm␤  in main program body at line 22:/tmp/mXMLN858lP␤»
23:09 masak meh.
23:10 lue I would guess the answer is 42.
23:10 lue I think having a separate  semantic  rule in the grammar is the best way to go.
23:10 jnthn masak: I wonder how deliberate that is... :)
23:10 masak rakudo: sub lcm($x, $y) { $x * $y / gcd($x, $y) }; say lcm(14, 21)
23:10 p6eval rakudo 8533c3: OUTPUT«42␤»
23:10 masak lue++ !!
23:11 drbean left #perl6
23:11 lue I memorized all the integer factors of 42 a long time ago. 1 2 3 6 7 14 21 42 [not that it's hard to memorize though :)]
23:12 masak lue: I am reluctantly impressed.
23:12 masak I wouldn't have though such knowledge to ever be useful. but apparently it was in exactly this case.
23:13 drbean joined #perl6
23:13 whiteknight joined #perl6
23:14 lue I think what actually happened was I read h2g2 in middle school, became fascinated with 42, and before I knew it I knew all the factors.
23:14 lue =head1 header\n\n    is legal, right?
23:15 masak think so.
23:15 masak I'm equally narrowly interested in some numbers. numbers of the form 2 ** $N always fascinated me.
23:15 masak even more so numbers of the form 2 ** (2 ** $N)
23:15 masak I learned this one by heart:
23:16 masak niecza: say 2 ** 32
23:16 p6eval niecza v4-76-g7bf5ef9: OUTPUT«4294967296␤»
23:16 masak it's a pretty number.
23:16 jnthn ...what makes a number pretty? :)
23:16 masak just bias, I guess. :P
23:17 masak but I think all the numbers in that sequence are quite pretty.
23:17 masak rakudo: .say for map { 2 ** $_ }, 0..32
23:17 p6eval rakudo 8533c3: OUTPUT«1␤2␤4␤8␤16␤32␤64␤128␤256␤512␤1024␤204​8␤4096␤8192␤16384␤32768␤65536␤131072␤262144␤​524288␤1048576␤2097152␤4194304␤8388608␤16777​216␤33554432␤67108864␤134217728␤268435456␤53​6870912␤1073741824␤2147483648␤4294967296␤»
23:18 lue I know those by heart up to 1024, 4096 if I think about it.
23:18 jnthn Beauty is in the eye of the beholder. :)
23:18 TimToady rakudo: say 2 ** 2 ** 2 ** 2 * 2 ** 2 ** 2 ** 2
23:18 p6eval rakudo 8533c3: OUTPUT«4294967296␤»
23:18 drbean left #perl6
23:19 lue rakudo: .say for map {16 ** $_ }, 0..5
23:19 drbean joined #perl6
23:19 p6eval rakudo 8533c3: OUTPUT«1␤16␤256␤4096␤65536␤1048576␤»
23:19 lue rakudo: .say for map {16 ** $_ }, 0..10
23:19 p6eval rakudo 8533c3: OUTPUT«1␤16␤256␤4096␤65536␤1048576␤16777216␤26​8435456␤4294967296␤68719476736␤1099511627776␤»
23:19 skangas left #perl6
23:19 masak rakudo: .say for map { 2 ** (2 ** $_) }, ^5
23:19 p6eval rakudo 8533c3: OUTPUT«2␤4␤16␤256␤65536␤»
23:19 masak rakudo: .say for map { 2 ** (2 ** $_) }, ^6
23:20 p6eval rakudo 8533c3: OUTPUT«2␤4␤16␤256␤65536␤4294967296␤»
23:20 masak a girl in high school found out about my obsession.
23:20 lue 16 ** $N is another favorite of mine. Up to 65536, with vague memories of the next two.
23:20 masak she learned this number:
23:20 masak rakudo: say 2 ** (2 ** 6)
23:20 TimToady what with the superstitious parens?
23:20 p6eval rakudo 8533c3: OUTPUT«1.84467440737096e+19␤»
23:21 masak heh :)
23:21 masak rakudo: say 2 ** 2 ** 6
23:21 p6eval rakudo 8533c3: OUTPUT«1.84467440737096e+19␤»
23:21 lue Superstition? Overuse of TI calcs?
23:21 masak TimToady: I'm too lazy to learn the associativity of **, I guess...
23:21 TimToady rakudo: say 2 ** 2 ** $_ for ^6
23:21 lue .oO(Overuse of TeX?)
23:21 p6eval rakudo 8533c3: OUTPUT«2␤4␤16␤256␤65536␤4294967296␤»
23:22 test-1 joined #perl6
23:22 masak TimToady: it's definitely one where I don't assume that the reader of my code knows it.
23:22 masak TimToady: but in essence, I don't know it by heart either :)
23:23 masak niecza: say 2 ** 2 ** 6
23:23 p6eval niecza v4-76-g7bf5ef9: OUTPUT«1.84467440737096E+19␤»
23:23 masak bah. :)
23:23 masak pugs: say 2 ** 2 ** 6
23:23 p6eval pugs: OUTPUT«18446744073709551616␤»
23:23 mtk left #perl6
23:23 masak \o/
23:23 drbean left #perl6
23:23 masak I never learned this number.
23:24 test-1 p6eval rakudo: say 1 + 1
23:24 p6eval test-1: rakudo 8533c3: OUTPUT«2␤»
23:24 TimToady ooh, ship it!
23:25 jnthn Huh, we could do that a couple of years ago... :P
23:25 drbean joined #perl6
23:25 lue I should learn all 40 digits of pi eventually.    http://betterexplained.com/articles/learning-calc​ulus-overcoming-our-artifical-need-for-precision/
23:26 masak all five of them, you mean? :)
23:26 TimToady I have it on good authority that the last digit of pi is incorrect.
23:26 sorear jnthn: (what makes a number pretty) low Kolmogorov complexity.
23:26 masak sorear: so pi is a really ugly number?
23:27 masak 'night, pandas
23:27 jnthn sorear: whoa
23:27 masak left #perl6
23:30 drbean left #perl6
23:31 drbean joined #perl6
23:32 mtk joined #perl6
23:32 test-1 msg rakudo : say  1+2
23:32 test-1 ?
23:34 test-1 msg  p6eval rakudo: say  1+2
23:35 ymasory left #perl6
23:36 drbean left #perl6
23:36 Lorn joined #perl6
23:36 TimToady use /msg
23:37 TimToady but we don't mind you playing with it here, as long as you don't overdo it
23:38 drbean joined #perl6
23:41 wallberg left #perl6
23:42 drbean left #perl6
23:44 drbean joined #perl6
23:48 drbean left #perl6
23:50 drbean joined #perl6
23:54 drbean left #perl6
23:56 ashleydev left #perl6
23:56 ashleydev joined #perl6
23:56 drbean joined #perl6
23:59 Helios left #perl6

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

Perl 6 | Reference Documentation | Rakudo