Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-05-07

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:02 risou_ left #perl6
00:11 Moukeddar left #perl6
00:12 jaldhar joined #perl6
00:13 Moukeddar joined #perl6
00:17 whiteknight joined #perl6
00:20 benabik joined #perl6
00:21 TimToady .oO(obviously the thing we'll want after "nom" is "fast")
00:37 awwaiid left #perl6
00:39 awwaiid joined #perl6
00:47 ymasory_ joined #perl6
00:49 keeth joined #perl6
01:00 keeth left #perl6
01:06 nsh_ left #perl6
01:07 keeth joined #perl6
01:07 nsh_ joined #perl6
01:16 wamba left #perl6
01:36 keeth left #perl6
01:48 Moukeddar left #perl6
01:56 keeth joined #perl6
01:58 whiteknight left #perl6
01:59 leprevost joined #perl6
02:08 keeth left #perl6
02:11 dolmen left #perl6
02:17 Bucciarati left #perl6
02:17 fridim_ joined #perl6
02:21 V15170R joined #perl6
02:21 Bucciarati joined #perl6
02:35 TiMBuS left #perl6
02:52 leprevost left #perl6
02:55 V15170R left #perl6
03:00 TimToady sorear: the top level "niezca" seems to be a misspelling
03:05 sorear Where is that string?
03:23 Su-Shee_ joined #perl6
03:24 Su-Shee left #perl6
03:46 fridim_ left #perl6
03:52 dakkar joined #perl6
04:17 Chillance left #perl6
04:27 nrdfst joined #perl6
04:27 dakkar_ joined #perl6
04:27 dakkar left #perl6
04:27 dakkar_ is now known as dakkar
04:27 nrdfst left #perl6
04:30 starcoder left #perl6
04:39 starcoder joined #perl6
04:42 starcoder left #perl6
04:43 starcoder joined #perl6
04:43 starcoder left #perl6
04:44 starcoder joined #perl6
04:46 starcoder left #perl6
04:46 starcoder joined #perl6
04:53 Axius joined #perl6
05:03 envi joined #perl6
05:08 nymacro joined #perl6
05:22 hudnix left #perl6
05:44 kaare_ joined #perl6
05:44 woosley joined #perl6
05:45 woosley left #perl6
05:46 justatheory left #perl6
05:53 Arcus joined #perl6
05:56 Axius left #perl6
06:03 Arcus left #perl6
06:03 molaf joined #perl6
06:07 araujo left #perl6
06:11 Axius joined #perl6
06:18 Axius left #perl6
06:20 [particle]1 left #perl6
06:28 wamba joined #perl6
06:32 benabik left #perl6
06:39 SHODAN joined #perl6
06:51 sivoais joined #perl6
06:52 birdwindupbird joined #perl6
07:01 envi left #perl6
07:02 Mowah joined #perl6
07:08 envi joined #perl6
07:13 lue left #perl6
07:22 moritz rakudo: my $base = 8; say :$base('10')
07:22 p6eval rakudo 6ae3c9: OUTPUT«invoke() not implemented in class 'Pair'␤  in main program body at line 22:/tmp/DthMZmnOiE␤»
07:22 ymasory_ left #perl6
07:24 moritz nqp: use NQPHLL; say HLL::Actions::string_ton_int('12', 8)
07:24 p6eval nqp: OUTPUT«Confused at line 1, near "say HLL::A"␤current instr.: 'nqp;HLL;Grammar;panic' pc 26292 (src/stage2/gen/NQPHLL.pir:7011)␤»
07:24 moritz nqp: use NQPHLL; say(HLL::Actions::string_ton_int('12', 8))
07:24 p6eval nqp: OUTPUT«Null PMC access in invoke()␤current instr.: '_block11' pc 48 ((file unknown):25)␤»
07:24 moritz nqp: use NQPHLL; say(HLL::Actions::string_to_int('12', 8))
07:24 p6eval nqp: OUTPUT«10␤»
07:24 moritz nqp: use NQPHLL; say(HLL::Actions::string_to_int('14', 8))
07:24 p6eval nqp: OUTPUT«12␤»
07:26 lue joined #perl6
07:34 moritz rakudo: say :16(12)
07:34 p6eval rakudo 6ae3c9: OUTPUT«18␤»
07:41 donri joined #perl6
07:48 Su-Shee_ is now known as Su-Shee
07:58 wamba left #perl6
08:28 araujo joined #perl6
08:33 ingy left #perl6
08:34 ingy joined #perl6
08:52 kfo joined #perl6
08:53 masak joined #perl6
08:54 masak morning, #perl6.
08:54 moritz good morning masak
08:55 kfo_ left #perl6
08:58 tadzik good morning zebras
09:00 tadzik http://irclog.perlgeek.de/perl6/2010-12-17#i_3100174 -- history :')
09:01 tadzik http://irclog.perlgeek.de/perl6/2010-12-18#i_3101102 follow-up :)
09:03 masak :P
09:04 tadzik I fell like a blagpost just about that :)
09:04 masak "the incident taught us that things aren't always black and white"
09:05 * masak should blog today too
09:07 tadzik do you have blogging on your schedule?
09:07 masak moritz++ # p6l reply
09:07 molaf left #perl6
09:08 masak tadzik: no. I probably should.
09:08 masak tadzik: I've totally fallen out of this Ironman thing.
09:08 moritz masak: which one? :-)
09:08 masak moritz: the base conversion one :)
09:09 masak though the 'eval' one is interesting too.
09:10 masak it's been argued on the channel that 'eval' not dying on errors (either compiletime or runtime ones) is a ditchable p5ism.
09:10 moritz even if eval compilation fails, I don't think the eval should catch runtime exceptions from within the eval
09:10 masak right.
09:10 moritz s/fails/succeeds/
09:13 * moritz -> buying asparagus
09:17 tadzik karma zebras
09:17 aloha zebras has karma of 0.
09:17 tadzik no way! zebras++
09:21 wamba joined #perl6
09:23 tadzik loliblogged! http://ttjjss.wordpress.com/2011/05/07/zebras-in-the-perl-6-herd/
09:31 masak tadzik++
09:41 dual left #perl6
09:41 M_o_C joined #perl6
09:57 MayDaniel joined #perl6
10:03 wamba left #perl6
10:06 risou joined #perl6
10:10 wamba joined #perl6
10:17 pernatiy joined #perl6
10:18 fridim_ joined #perl6
10:19 itz_ left #perl6
10:20 moritz left #perl6
10:20 moritz joined #perl6
10:23 masak rakudo: sub verb-forms { $^verb.chop X~ <is as os us i u> }; .say for verb-forms "kompreni"
10:23 p6eval rakudo 6ae3c9: OUTPUT«komprenis␤komprenas␤komprenos␤komprenus␤kompreni␤komprenu␤»
10:23 masak \o/
10:26 wamba left #perl6
10:26 Su-Shee_ joined #perl6
10:28 Axius joined #perl6
10:30 Su-Shee left #perl6
10:38 risou_ joined #perl6
10:38 Axius left #perl6
10:38 Axius joined #perl6
10:39 Axius left #perl6
10:40 risou left #perl6
10:41 Axius joined #perl6
10:42 Axius left #perl6
10:45 Axius joined #perl6
10:45 Axius left #perl6
10:45 moritz tadzik: "Since that day, zebras have been mentioned 230 on #perl6,"
10:45 moritz tadzik: 230 *times*?
10:45 moritz anway, tadzik++ for the blog post
10:46 masak no, they've been mentioned 230. accidentally.
10:47 masak moritz: when you've bought the asparagus, do you cook it in some way, or do you just eat it raw?
10:47 * masak is a total asparagus beginner
10:47 masak all I know about is Asparagus Boulevard :P
10:48 moritz masak: du må skrelle den :-)
10:48 silent_h_ joined #perl6
10:48 moritz masak: at least white asparagus must be peeled, and cooked for about 20 minutes (more if they are thicker)
10:49 moritz masak: usually served with a butter-based sauce, and raw or cooked ham. Sometimes also with beef steak (that's what we are going to do :-)
10:49 moritz and it helps to have a bit of butter and sugar in the cooking water
10:51 masak ah. excellent.
10:51 jnthn Asparagus Boulevard \o/
10:51 silent_h_ left #perl6
10:51 jnthn I mean, er, hi :)
10:51 masak hi jnthn! :)
10:52 masak moritz: so, how should we augment sprintf to render a number in some base or other?
10:52 moritz masak: if you happen to visit Germany before 24th of June, we must prepare and eat asparagus together :-)
10:52 masak the suggestion that's flexible enough yet doesn't look like it was hacked on wins.
10:52 moritz masak: it alread does %x and %b and %o iirc
10:53 moritz wait
10:53 masak moritz: right, but those are special cases.
10:53 moritz maybe it's just a method in Real
10:53 moritz say 123.base(12)
10:53 masak ooh
10:53 moritz too obvious? :-)
10:53 masak is that unambiguous enough wrt conversion direction?
10:53 moritz yes
10:54 moritz if you call it on a number
10:54 masak then I like it.
10:54 moritz it must be to string
10:54 masak moritz++
10:54 masak it's very, very obvious. which is good.
10:54 jnthn 123.to_base(12)
10:54 masak yeah, but...
10:54 jnthn :)
10:54 masak the underscore is ugly.
10:54 moritz to-base(12)
10:54 masak and if 'base' means the same thing...
10:55 masak I think both dashes and underscores should stay out of builtins.
10:55 moritz let's just go with base
10:55 masak yes.
10:55 masak \o/
10:56 moritz should the argument be a Cool or an Int?
10:56 masak hm.
10:56 masak Cool, I think.
10:56 masak but 'as Int'.
10:57 masak with an exception unless the Int > 2, I guess.
10:57 dalek specs: 03f8d38 | moritz++ | S32-setting-library/Numeric.pod:
10:57 dalek specs: [S32/Numeric] spec Real.base
10:57 dalek specs: review: https://github.com/perl6/specs/commit/03f8d38e1b
10:57 masak er, >= 2
10:57 masak moritz++
10:57 moritz feel free to fill in the details
10:57 masak oki
10:59 whiteknight joined #perl6
11:01 nymacro left #perl6
11:06 nymacro joined #perl6
11:07 dakkar left #perl6
11:07 MayDaniel left #perl6
11:12 dalek specs: bf245c0 | masak++ | S32-setting-library/Numeric.pod:
11:12 dalek specs: [S32/Numeric] added $base condition
11:12 dalek specs:
11:12 dalek specs: $base in the conversion method .base must be at least 2.
11:12 dalek specs: review: https://github.com/perl6/specs/commit/bf245c0d16
11:15 jnthn nqp: use nqp;
11:15 p6eval nqp: OUTPUT«Null PMC access in assign_pmc()␤current instr.: '' pc 298 (src/stage2/gen/NQP.pir:107)␤»
11:16 Chillance joined #perl6
11:17 moritz masak: what about upper limit for base? 36?
11:17 masak oh, right.
11:17 masak feel free to add that. :)
11:17 * masak noms lunch
11:20 Tene jnthn: ping
11:20 jnthn Tene: pong
11:21 Tene jnthn: do you currently have plans for making it easier for 6model users to add their own reprs?
11:21 jnthn Tene: It's not near the top of my list, but it's something that I know should be better.
11:21 Tene 'k
11:22 jnthn Tene: Do you have an immediate need to do so?
11:23 Tene I'm considering trying some custom reprs for cardinal
11:23 Tene I can just add them to REPR_initialize_registry in a fork or something
11:24 jnthn *nod*
11:24 jnthn Do that for now, then we can work out something better.
11:25 Tene I finally sat down and drew out some charts for working out where I was confused in my previous ruby-6model impl
11:25 Su-Shee_ is now known as Su-Shee
11:26 risou_ left #perl6
11:26 dalek specs: 9019a8e | moritz++ | S32-setting-library/Numeric.pod:
11:26 dalek specs: [S32/Numeric] Real.base: $base <= 36, upper case in result
11:26 dalek specs: review: https://github.com/perl6/specs/commit/9019a8e140
11:27 Tene I still find myself confused by exactly what repr_type_object_for means.
11:28 Tene "creates a new type object of this representation and associates it with the given HOW"
11:29 jnthn Read "how" as "meta-object"
11:30 jnthn Basically it creates a type based on a repr/meta-object pairing, and gives you back a handle do it.
11:30 jnthn *to it
11:31 jnthn You can then use repr_instance_of on that handle to get an instance.
11:32 Tene so the type object is just a meta-object with a repr stuck on, and the purpose of that is indicating what repr to use when instantiating the given type object.
11:34 Axius joined #perl6
11:36 jnthn Kinda. It's not really a meta-object at all - it's more like a way of talking about a meta-object and repr pairing.
11:36 jnthn For: anObject = MyClass.new(parameters)
11:36 Tene Ah.
11:37 jnthn That new method should somehow be able to locate the type object and call repr_instance_of on it
11:37 jnthn I guess anyway
11:37 jnthn I'm not familiar enough with Ruby to know exactly how that should be factored.
11:39 jnthn Part of me suspects the Class class has an attribute $!instantiation_handle which the new method of it calls repr_instance_of on.
11:41 Tene the actual ruby soruce has two structs used, RObject which is a subset of RClass.  They both have an RBasic, which is a class pointer and some flags, and a hash holding instance attributes.  RClass also has a hash for holding methods, and a superclass pointer.
11:43 Tene I was thinking that I should try writing an RClass repr, and maybe an RObject repr.
11:44 Tene I *could* get away with just a HashAttrStore, though, just fine.
11:50 jnthn Tene: It feels to me like RBasic playing the repr-ish role here, while RObject and RClass are more like meta-objects.
11:51 jnthn I suspect that making a few reprs would actually work.
11:52 Tene The actual symptom of whatever I was doing wrong before was that if I defined a method on Class, it was available on actual terminal object instances, so I was confusing instance-of and inherits-from
11:53 jnthn Where do class methods live in the Ruby factoring?
11:56 Tene all method lookup is always: given an object, first fetch its -> klass pointer from the RBasic, which should be a pointer to an RClass, or nil.  Given that class, check its method table, and if you don't find the method, follow that class's -> super pointer.
11:57 Tene so class methods live in the method table of the "eigenclass" of the class object.
11:57 moritz sounds a bit like the type object in Perl 6
11:58 moritz std: do { } while 1
11:58 p6eval std 9f27365: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unsupported use of do...while; in Perl 6 please use repeat...while at /tmp/XO2WRRWv0c line 1 (EOF):␤------> [32mdo { } while 1[33m⏏[31m<EOL>[0m␤Parse failed␤FAILED 00:01 113m␤»
11:58 Tene on any ruby object, you can add in arbitrary extra attributes and methods.  When you do so, ruby inserts an extra object between that object and its class, setting that object's class as the eigenclass's superclass.
11:59 jnthn Ah, interesting.
12:00 Tene So if you define a class Cow, with no class methods or class variables, Cow->klass == Class
12:00 jnthn In Ruby, decidedly Class object != type object.
12:01 Tene If you do have class methods or variables, which are just instance methods or variables on the class object, Cow->klass is the eigenclass for that object, and Cow->klass->super == Class
12:01 moritz ok, I agree now :-)
12:01 jnthn Sounds like in 6model ->klass translates as get_how
12:02 Tene (also Cow->klass->klass == Class)
12:02 jnthn Ah, the meta-loop. :)
12:02 Tene That's how i originally tried to model it, but I screwed it up somewhere.  I need to draw some diagrams and start over.
12:02 jnthn Yeah, that bit is a proper brain tease...
12:03 Axius left #perl6
12:03 Tene http://www.hokstad.com/static/rom/rom.png -- dashed lines are ->klass (instance-of), and solid lines are ->super
12:04 Tene that's (allegedly) how the core ruby meta-loop works
12:04 Tene where <foo> is an eigenclass for foo
12:05 * jnthn tries to take it in :
12:05 jnthn :)
12:06 Tene Module inclusion, for mixins, is done similarly.  You push down an instance of module onto the appropriate pointer.
12:06 Tene if you use 'include', it's affecting instances of the class, so you put it on ->super
12:06 Patterner left #perl6
12:07 Tene If you use 'extend', it's affecting the class, so you put it on ->klass
12:07 Tene and in both cases, ->klass of the thing you push in there is Module and ->super is whatever was previously on ->klass or ->super
12:08 Tene http://www.slideshare.net/burkelibbey/rubys-object-model-metaprogramming-and-other-magic?from=ss_embed is my big source for understanding this
12:11 Tene The last time I tried this, I failed at working out how to decouple instance methods from class methods.  Of course, I didn't have an actual plan for anything, much less a model for what's being handled by what, what my type objects are, etc.
12:13 jnthn Tene: That presentation helps but it'll take me a while to digest and come up with a model. :)
12:13 Tene Yeah.
12:13 jnthn Slide 26 is...revealing...
12:13 Tene slide 26 is "eigenclasses are hidden from users"
12:16 woosley joined #perl6
12:17 Tene So, I mean, I could have an RObject and RClass HOW, and punt everything up to a higher level, as ruby-level objects
12:17 wamba joined #perl6
12:17 masak left #perl6
12:18 Tene or I could try to push it down with get_how being equivalent to ->klass
12:19 Tene Ideally, in the end state, I can do static analysis of ruby programs looking for attributes known at compile-time and allocating fixed storage for them, etc.
12:19 jnthn It feels like a lot of the method dispatch that does pointer following could be flattenable too
12:19 Tene Yes, agreed.  real ruby does use a method cache.
12:20 jnthn ah, ok
12:20 Tene or is that not what you mean?
12:20 jnthn Yes, it's what I mean.
12:22 Tene so if get_how is ->klass, is it reasonable for Class to be an instance of Class?  for get_how on Class to return itself?
12:22 Tene or, really, on the eigenclass of Class, but mumble mumble
12:24 Tene Hmm, no, that can't be right, actually.
12:24 jnthn At the top of the NQP hierarchy, get_how on KnowHOW is an instance of KnowHOW.
12:24 Tene because the HOW has to conform to the 6model API, right?
12:25 jnthn The HOW is just something with methods.
12:25 jnthn find_method is currently "special"
12:25 jnthn But I don't plan for it to be that way forever.
12:26 dalek roast: 03eb0be | moritz++ | S32-num/base.t:
12:26 dalek roast: [base.t] test Real.base (well, Int.base for now)
12:26 dalek roast: review: https://github.com/perl6/roast/commit/03eb0be808
12:26 masak joined #perl6
12:26 jnthn Tene: I probably need to go through the Ruby presentation a bit more carefully and try to work out a model if I'm going to be more helpful than that. :)
12:26 jnthn *than this
12:27 Tene oh, right, the HOW does shit like publishing a method cache through PIR ops.
12:27 jnthn Yeah, it's where "what being a class" means.
12:27 jnthn *where you define
12:29 Tene actual interoperation with Parrot or other languages should go through a vtable or something, not through methods
12:29 Tene right?
12:29 * moritz would have expected through methods
12:30 jnthn I think we'll need a way that things can specify an operation => method map
12:30 Tene moritz: well, we just said that a HOW doesn't have to follow any given API
12:30 jnthn So languages are free to have whatever methods they want in their meta-objects, but interop can still work.
12:31 moritz Tene: I wasn't thinking about methods on HOW, but methods on actual instnances
12:31 Tene moritz: Ah, right.
12:32 Tene moritz: but, for example, if I have a class and I want to get an instance out of it, not all languages have a 'new' method on the class.
12:32 Tene if I want to get the parents from a class, or list the methods in a class...
12:32 moritz Tene: that's right. Neither do all languages have classes
12:33 moritz Tene: in that case you can't expect HLL interop to DWYM without knowing stuff about the foreign language
12:34 risou joined #perl6
12:35 masak rakudo: use MONKEY_TYPING; augment class Int { multi method base(Cool $base as Int) { my $n = self; join "", reverse gather while $n > 0 { my $digit = $n % $base; if $digit > 9 { $digit = chr($digit - 10 + ord("A")) }; take $digit; $n div= $base }; } }; say 42.base(5); say 1000.base(36)
12:35 p6eval rakudo 6ae3c9: OUTPUT«132␤RS␤»
12:36 masak rakudo; say :5<132>; say :36<RS>
12:36 masak rakudo: say :5<132>; say :36<RS>
12:36 p6eval rakudo 6ae3c9: OUTPUT«42␤1000␤»
12:37 masak moritz: you're probably working on a .base implementation :)
12:37 masak moritz: does it look anything like mine above?
12:41 risou left #perl6
12:42 risou joined #perl6
13:01 dalek rakudo: 705435e | moritz++ | / (2 files):
13:01 dalek rakudo: implement Int.base
13:01 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/705435e1a7
13:03 masak ah, nice. a @conversion table and the minus case.
13:04 masak also, a repeat-while, which also makes a lot more sense.
13:04 masak moritz++
13:04 masak moritz: hm, what about fractional numbers?
13:05 masak there's the problem of infinitely repeating decimals, of course...
13:05 wamba left #perl6
13:05 masak but besides that, it feels like a pretty reasonable use case.
13:06 moritz masak: it's NYI
13:06 colomon left #perl6
13:06 wamba joined #perl6
13:08 masak right; I see that. (and that's fine.)
13:08 masak but what about it? how do we address the infinitely repeating decimals thing?
13:08 masak we should probably spec it once we decide, too :)
13:11 Moukeddar joined #perl6
13:16 moritz we just handle it like normal number stringification
13:16 moritz just cut off
13:16 moritz at some[tm] point
13:17 masak at some parameterized point?
13:17 masak what's the rounding policy? is it parameterized, too?
13:18 * moritz doesn't see the need for it
13:18 moritz I'd just say roughly Num machine precision
13:18 masak make sense.
13:18 Moukeddar http://www.youtube.com/watch?v=4NuqLFzo6A8
13:18 masak makes&
13:18 Moukeddar what do you think?
13:18 Moukeddar hi masak
13:18 masak hello Moukeddar
13:19 Moukeddar how are you?
13:19 masak Moukeddar: nice bevel. you should write a raytracer in Perl 6. :)
13:19 masak I'm fine. I appreciate it being weekend.
13:20 masak Moukeddar: and you?
13:20 Moukeddar doing pretty good :)
13:20 Moukeddar preparing for the exams :(
13:21 Moukeddar that logo took me all night ;)
13:36 wamba left #perl6
13:40 risou_ joined #perl6
13:42 risou left #perl6
13:46 dalek nqp: 2656070 | masak++ | src/ModuleLoader.pm:
13:46 dalek nqp: [ModuleLoader] strip away Unixy './' in module path
13:46 dalek nqp:
13:46 dalek nqp: This prevented the lookup from working on Linux. Works now.
13:46 dalek nqp: review: https://github.com/perl6/nqp/commit/26560704dd
13:46 jnthn Note, only was issue when your mainline is the module you want to load. :)
13:46 masak right.
13:46 masak but who wouldn't want that? :P
13:46 jnthn :P
13:46 moritz :-)
13:46 jnthn Nobody until you. :P
13:47 moritz but I think nqp only had two users before masak :-)
13:47 jnthn True :)
13:47 masak "a third of all the users want to load the mainline!"
13:48 * jnthn re-inforces the GitHub issues for nqp Just In Case ;)
13:54 * jnthn wonders what weird mathematical properly means you can't have a base greater than 36, then realizes it's because the alphabet only goes up to Z. :)
13:59 dalek rakudo/nom: d1c4f3f | jnthn++ | src/Perl6/Actions.pm:
13:59 dalek rakudo/nom: Remove old setting mode flag.
13:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d1c4f3f908
13:59 dalek rakudo/nom: 40c47c3 | jnthn++ | src/Perl6/Grammar.pm:
13:59 dalek rakudo/nom: Add a missing our scope declarator that we somehow got away with in nqp-rx.
13:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/40c47c3833
13:59 dalek rakudo/nom: 35b6a71 | jnthn++ | / (5 files):
13:59 dalek rakudo/nom: Start to refactor hanlding of module loading. Also stub in some setting loading bits.
13:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/35b6a7134a
14:01 masak jnthn: if the Swedish alphabet were the standard one in computers, the base could go up to 39 or possibly 40 :)
14:04 Tedd1 left #perl6
14:05 jnthn :P
14:06 * jnthn has some way to go before he's ö years old.
14:06 Tedd1 joined #perl6
14:13 dual joined #perl6
14:13 Moukeddar left #perl6
14:14 dalek rakudo/nom: cf7946d | jnthn++ | src/Perl6/ModuleLoader.pm:
14:14 dalek rakudo/nom: Rakudo-ize something grabbed from nqp.
14:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cf7946d679
14:14 dalek rakudo/nom: 5eddfaa | jnthn++ | src/Perl6/Grammar.pm:
14:14 dalek rakudo/nom: Handle EXPORTHOW, so we can haz meta-objects available.
14:14 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5eddfaabec
14:17 M_o_C left #perl6
14:20 M_o_C joined #perl6
14:35 cognominal left #perl6
14:41 dalek rakudo/nom: 2da19b3 | jnthn++ | src/Perl6/ (2 files):
14:41 dalek rakudo/nom: Refactor handling of {YOU_ARE_HERE} to match STD. Couple of other twiddles to blockoid to match it up with STD. Emit code build by serialization context.
14:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2da19b37a5
14:41 dalek rakudo/nom: 417b4c3 | jnthn++ | src/CORE.setting/BOOTSTRAP.pm:
14:41 dalek rakudo/nom: Add a {YOU_ARE_HERE}.
14:41 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/417b4c3d28
14:42 risou_ left #perl6
14:49 MayDaniel joined #perl6
14:52 snearch joined #perl6
14:56 dalek rakudo/nom: 7112a1f | jnthn++ | src/Perl6/ (2 files):
14:56 dalek rakudo/nom: Start to refactor package handling a bit. Toss package_declarator:sym<does> - STD no longer does it that way.
14:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7112a1fde2
14:58 Moukeddar joined #perl6
14:58 Moukeddar hello
14:58 Moukeddar is it wise to suspend your Facebook Account?
14:59 dalek nqp: dcd196e | jonathan++ | src/NQP/Grammar.pm:
14:59 dalek nqp: Toss unused variable.
14:59 dalek nqp: review: https://github.com/perl6/nqp/commit/dcd196ef23
15:10 masonkramer joined #perl6
15:10 Moukeddar left #perl6
15:12 whiteknight left #perl6
15:14 noganex joined #perl6
15:14 wamba joined #perl6
15:17 risou joined #perl6
15:17 noganex_ left #perl6
15:21 Trashlord joined #perl6
15:22 tadzik moritz: yeah, 230 times, good catch :)
15:23 muixirt joined #perl6
15:25 wooden left #perl6
15:26 tadzik jnthn: how hard is diving into ModuleLoader now?
15:27 jnthn tadzik: Bad time.
15:28 jnthn tadzik: I'd rather get to a point where something works at all.
15:28 jnthn Right now there's no way to even know if the stuff you've changed worked. ;-)
15:28 M_o_C left #perl6
15:28 tadzik I see
15:28 tadzik that was to be my next question :)
15:29 jnthn Once things are a bit further along, it'll certainly be a good place to dive in and hack. :)
15:29 jnthn I'm currently doing the first big cut of refactoring package handling.
15:32 noganex_ joined #perl6
15:33 noganex left #perl6
15:35 Moukeddar joined #perl6
15:42 tadzik jnthn: nom doesn't build, right?
15:43 jnthn tadzik: Build fails in last step compiling the setting.
15:43 am0c left #perl6
15:44 risou left #perl6
15:44 tadzik okay
15:44 jnthn If you do a perl6 -e "1" or something it should whine about not being able to load the CORE.setting.
15:45 tadzik aye
15:45 jnthn OK, then we're seeing the same thing :)
15:45 jnthn My current goal is to be able to compile src/CORE.setting/BOOTSTRAP.pm.
15:46 jnthn Though it'll actually end up complaining that some stubs aren't completed :)
15:49 cognominal joined #perl6
15:53 woosley left #perl6
15:56 am0c joined #perl6
15:57 Moukeddar left #perl6
15:57 benabik joined #perl6
16:08 jdhore left #perl6
16:09 jdhore joined #perl6
16:12 moritz Contextual %*PKGCOMPILER not found
16:12 moritz is what I get
16:12 jnthn yup
16:12 jnthn moritz: That's the error when compiling the setting.
16:13 jnthn moritz: But by that point we already built the Perl 6 executable.
16:13 moritz ah
16:13 jnthn But it won't do much because it can't find CORE.setting 'cus it didn't build ;-)
16:13 jnthn The build procedure is different now.
16:14 jnthn Just changing the setting won't cause a re-build of perl6 executable...there's no real need to bundle everything into one executable.
16:15 tadzik so settings will be loaded in runtime?
16:15 moritz sounds like
16:15 jnthn Yes.
16:16 jnthn --setting=CORE # the default; specify a different name here, or NULL for none
16:21 jnthn afk, masakism
16:21 * masak ism?
16:21 jnthn :P
16:22 jnthn long walk... :)
16:22 jnthn in the hot
16:22 jnthn ;)
16:22 jnthn Nah, it's probably cooled off a bit by now.
16:22 masak you'll get a glass of apple juice when you arrive :)
16:22 jnthn \o/
16:22 jnthn &
16:24 s1n left #perl6
16:25 Moukeddar joined #perl6
16:25 Moukeddar so guys , is prototyping essential ?
16:26 masak Moukeddar: insufficient data. please try again :)
16:26 s1n joined #perl6
16:26 Moukeddar for example , let's say i'm making a website , let it be  a portal
16:26 Moukeddar or some application
16:26 Moukeddar f.e management app
16:26 masak sure.
16:26 moritz then you start with something very small that runs
16:27 moritz und slowly turn it into something that still runs
16:27 Moukeddar i was talking about the UI
16:27 moritz that applies for the UI too
16:27 Moukeddar and use TDD right ?
16:27 masak only if you understand TDD.
16:27 masak don't do it because we say so.
16:28 dalek rakudo/nom: 1c04306 | jnthn++ | src/Perl6/Grammar.pm:
16:28 dalek rakudo/nom: Start to refactor package_def so it creates the meta-object at compile time and also looks much more like the one in STD.
16:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1c04306016
16:28 masak do it once you realize that not doing it is a type of insanity.
16:28 Moukeddar masak, i'm starting to kinda realize it :)
16:28 moritz and also do a project without tests, and compare :-)
16:28 Moukeddar i run into some issues
16:29 Moukeddar methods became buggy and not doing the wor
16:29 Moukeddar work
16:29 moritz that's live
16:29 masak writing tests first is on par with writing documentation first. you don't *have* to do it, but chances are you'll thank yourself later.
16:29 Moukeddar all my previous project were Test-less
16:29 masak also, write code that dies a lot.
16:29 masak that's how you get robust code in the end.
16:29 Moukeddar Bacteria Code?
16:30 Moukeddar brb :) , Tea Time
16:30 * masak tries to clean up before jnthn arrives :)
16:31 masak why is the entropy always maximal just before I have a guest? wait, don't answer that.
16:31 moritz if your code dies whenever something goes wrong, you are more likely do fix problems as you encounter them, as opposed to defer and forget
16:31 masak I'm starting to like that more and more.
16:31 masak I write code that cries bloody death at the smallest unforseen input.
16:32 masak with the result that I know immediately when unforseen things happen.
16:32 moritz that's why I prefer postgres over mysql these days :-)
16:32 masak it goes against the grain of many Perl 5 built-ins, but it's not that hard to adopt as a habit.
16:32 masak Moose helps a lot with this, too.
16:32 sorear good * #perl6
16:32 masak sorear! \o/
16:32 moritz \o it's sorear
16:33 masak nowadays when I write objects in Perl 5, I tend to write them as Moose::Manual::Unsweetened.
16:33 sorear Rakudo has --setting now?
16:33 moritz sorear: in the nom branch
16:33 moritz sorear: aka "not really" :-)
16:34 tadzik aka "almost there" :)
16:35 masak aka "the future is here, it's just unevenly distributed"
16:36 masak ...with Git.
16:40 nymacro left #perl6
16:42 masak Moukeddar: re "methods became buggy and not doing the work" -- as moritz points out, you just described all kinds of complexity problems. all the architectural stuff that comes after is meant to mitigate the fact that programming is hard and complexity tends to accrue.
16:42 risou joined #perl6
16:46 masak (and every design pattern is an instance of Separation of Concerns)
16:49 Moukeddar masak, what i meant that after 'Developing" the methods
16:49 Moukeddar they no longer give the expected results
16:50 REPLeffect left #perl6
16:50 Moukeddar Queries gone wrong , bad output
16:50 Moukeddar etc....
16:50 masak sounds like you're in a place where you're ready to appreciate tests, yes.
16:50 masak and remember, *automated* tests.
16:50 Moukeddar what's that ?
16:50 masak not just "testing the code now and then" :)
16:50 masak it's a piece of code that runs your tests.
16:50 masak see, for example, the spectest suite.
16:51 masak https://github.com/perl6/roast
16:51 masak each .t file in there is a small Perl 6 program, running some tests.
16:51 masak and the test output is very simple: "ok" or "not ok".
16:51 masak so that you know if and when things break.
16:52 masak *that's* testing. :)
16:52 Moukeddar i see , there's Test Project in Visual Studio
16:52 Moukeddar very similar
16:52 masak the real benefit comes when you accidentally break something fairly unrelated, and the tests discover it for you.
16:53 Moukeddar to insure the Quality right?
16:53 sorear niecza is pretty slow running tests but it can still test itself better in 2 minutes than I can
16:53 masak also, refactoring suddenly becomes feasible, and the "don't fix it" fear goes away.
16:53 sorear ensure
16:54 masak Moukeddar: what sorear said. what do you mean, "Quality"?
16:54 masak that sounds like a marketing word :P
16:54 Moukeddar hehe
16:54 Moukeddar no  matter how much you enhance , the function will still do it's work
16:55 Moukeddar ensure* yeah :p
16:55 masak but yeah, Quality Assurance involves testing IIUC.
16:55 Moukeddar you mean the UI ?
16:57 Moukeddar_ joined #perl6
16:57 Moukeddar left #perl6
16:58 masak no, I mean everything.
16:58 Moukeddar_ to see if it's Fool-proof?
16:58 masak you seem very focused on the UI. :)
16:58 masak phenny: google "invent a better fool"
16:58 justatheory joined #perl6
16:59 Moukeddar_ hehe , UI is a very important part of the app
16:59 masak Moukeddar_: "Build something that's foolproof and they invent a better fool."
16:59 Moukeddar_ i remember a quote
16:59 Moukeddar_ wait a sec i'll get it
16:59 masak Moukeddar_: oh, sure. it's important. the UI is another one of those things you should do first :)
17:00 Moukeddar_ sketching and prototyping right?
17:00 Moukeddar_ Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. � Rick Cook
17:00 moritz .u "invert a better fool"
17:00 phenny moritz: Sorry, your input is too long!
17:00 moritz .g "invert a better fool"
17:00 phenny moritz: No results found for '"invert a better fool"'.
17:01 Moukeddar_ .g "invent a better fool"
17:01 phenny Moukeddar_: http://faculty.ed.umuc.edu/~jrugg/prgmrule.htm
17:03 Moukeddar_ lol , funny
17:03 masak Moukeddar_: yeah, that longer quote feels like an elaboration of mine.
17:04 Moukeddar_ prototyping is time sink
17:04 masak so is debugging.
17:05 masak so is trying to change an opaque model.
17:05 Moukeddar_ i'm in a vortex
17:06 REPLeffect joined #perl6
17:06 masak that's why it's called "whirlpool development" :P
17:06 Moukeddar_ hehe, funny one
17:09 Moukeddar_ masak, there's gazzillions of C books
17:09 Moukeddar_ which to take?
17:11 am0c left #perl6
17:11 masak that one's easy. "The C Programming Language" by K&R.
17:11 masak read it three times.
17:12 Moukeddar_ it isn't from "Scratch" right ?
17:14 tadzik it is, but it's the best one around, hands down
17:14 Moukeddar_ ok
17:17 Moukeddar_ i see no Arabic translation for the book
17:17 Moukeddar_ someone should do it :)
17:21 Moukeddar_ 294 Reviews
17:21 Moukeddar_ 5 star: (237)
17:27 Moukeddar_ THIS is the best Community Ever :)
17:28 REPLeffect left #perl6
17:29 tadzik you mean *this?
17:30 Moukeddar_ i mean here
17:30 Moukeddar_ this channel
17:30 Moukeddar_ these people here :)
17:32 tadzik I'm glad to be a part of it :)
17:32 Su-Shee_ joined #perl6
17:32 Moukeddar_ i've learned here more than i ever thought :)
17:36 Su-Shee left #perl6
17:37 Moukeddar_ left #perl6
17:42 REPLeffect joined #perl6
17:49 Mowah left #perl6
17:58 Moukeddar joined #perl6
17:58 BoWozZ joined #perl6
18:02 Su-Shee_ is now known as Su-Shee
18:03 Mowah joined #perl6
18:04 BoWozZ left #perl6
18:09 muixirt left #perl6
18:10 anazawa joined #perl6
18:17 masak Moukeddar: me too :)
18:20 anazawa left #perl6
18:20 Moukeddar http://www.youtube.com/view_play_list?p=F8F947A36026F8BC
18:20 Moukeddar which one do you like the most from this 4 versions?
18:22 birdwindupbird left #perl6
18:27 REPLeffect left #perl6
18:33 colomon joined #perl6
18:36 s1n left #perl6
18:36 tylercurtis left #perl6
18:36 tylercur1is joined #perl6
18:36 Moukeddar masak, check this : http://www.youtube.com/watch?v=M5g3f-OFI8g
18:37 s1n joined #perl6
18:42 TiMBuS joined #perl6
18:47 MELILLA joined #perl6
18:47 justatheory left #perl6
18:48 MELILLA left #perl6
18:49 MayDaniel left #perl6
18:52 wooden joined #perl6
18:53 colomon left #perl6
18:56 Moukeddar left #perl6
18:58 whiteknight joined #perl6
19:06 wamba left #perl6
19:15 justatheory joined #perl6
19:23 birdwindupbird joined #perl6
19:30 colomon joined #perl6
19:31 hudnix joined #perl6
19:43 birdwindupbird left #perl6
19:49 [Coke] left #perl6
19:49 dwnichols left #perl6
19:51 [Coke] joined #perl6
19:56 [Coke] left #perl6
19:57 donri left #perl6
19:57 [Coke] joined #perl6
20:13 [Coke] left #perl6
20:15 [Coke] joined #perl6
20:19 bluescreen10 joined #perl6
20:30 starcoder is now known as evilstarcoder
20:30 evilstarcoder is now known as starcoder
20:35 [Coke] left #perl6
20:37 [Coke] joined #perl6
20:42 snearch left #perl6
20:48 masonkramer left #perl6
20:49 justatheory left #perl6
21:05 Trashlord left #perl6
21:09 Trashlord joined #perl6
21:20 SHODAN left #perl6
21:23 ribasushi left #perl6
21:24 ribasushi joined #perl6
21:32 envi left #perl6
21:37 orafu left #perl6
21:40 newbee joined #perl6
21:40 newbee hi all :)
21:41 tadzik hello
21:41 newbee how can i make an alias for a subset? Example: Gave the name Hour and Minute to: subset Sexadecimal of Int where 0..59;
21:42 newbee s/gave/give/
21:45 perimosocordiae joined #perl6
21:49 perimosocordiae hey #perl6, I'm working on a data mining project using the irclogs from http://irclog.perlgeek.de/ (thanks, moritz)
21:49 perimosocordiae and we're now working on generating conversation summaries (over a day's worth of logs)
21:50 perimosocordiae so I'm wondering if there are any especially memorable days from the last 6 years that we can use as test cases
21:51 perimosocordiae to check if our summarization algorithm picks up the relevant keywords
21:51 plobsing #phasers #rakudosketch and #parrotsketch are by definition notable
21:52 newbee left #perl6
21:54 perimosocordiae plobsing: any particular days / events, though?
21:55 plobsing perimosocordiae: no, sorry. it is all a blur to me.
21:55 perimosocordiae we've tested on July 29 2010, the day rakudo star was announced, and that worked pretty well
22:08 Limbic_Region joined #perl6
22:13 Bucciarati left #perl6
22:16 newbee joined #perl6
22:18 newbee which is the "Test::More" for perl6?
22:21 Su-Shee left #perl6
22:22 Bucciarati joined #perl6
22:22 kaare_ left #perl6
22:22 masak newbee: Test.pm
22:24 Su-Shee joined #perl6
22:26 newbee left #perl6
22:27 noganex joined #perl6
22:30 noganex_ left #perl6
22:40 Mowah left #perl6
22:42 newbee joined #perl6
22:42 colomon left #perl6
22:49 p6eval left #perl6
22:50 newbee rakudo: class hourmin {  has Int $h;  has Int $m;  method infix:<+>(hourmin $h1, $hourmin $h2){  my hourmin $r;  $r.h=$h1.h+$h2.h;  $r.m=$h1.m+$h2.m;  if $r.m>60 {$r.h++;$r.m-=60};  } } my $H1 = hourmin.new(h=>22,m=>40); my $H2 = hourmin.new(h=>1,m=>21); my hourmin $H3; $H3 = $H1+H2;
22:51 p6eval joined #perl6
22:53 p6eval left #perl6
22:54 p6eval joined #perl6
23:02 bacek left #perl6
23:03 silent_h joined #perl6
23:11 silent_h left #perl6
23:12 newbee perl6: class hourmin {  has Int $.h;  has Int $.m; } sub infix:<+>(hourmin $h1, hourmin $h2) {  my $r = hourmin.new(h=>0,m=>0);  $r.h = $h1.h+$h2.h;  $r.m = $h1.m+$h2.m;  if $r.m>60 {$r.h++;$r.m-=60};  return $r;  say "adding"; } my $H1 = hourmin.new(h=>22,m=>40); my $H2 = hourmin.new(h=>1,m=>21); say $H1.perl;
23:12 p6eval pugs: OUTPUT«\hourmin.new(("h" => 22), ("m" => 40))␤»
23:12 p6eval ..niecza v5: OUTPUT«[31m===[0mSORRY![31m===[0m␤␤In has declaration, typename 'Int' must be predeclared (or marked as declarative with :: prefix) at /tmp/pcFKNYUv6u line 1:␤------> [32mclass hourmin {  has Int[33m⏏[31m $.h;  has Int $.m; } sub infix:<+>(hour[0m␤␤Any()Malformed has at
23:12 p6eval ../tmp/pcFKN…
23:12 p6eval ..rakudo 705435: OUTPUT«===SORRY!===␤Confused at line 22, near "class hour"␤»
23:13 newbee pugs gets it's right :S
23:13 newbee s/it's/it/
23:14 tadzik you're missing a semicolon
23:14 tadzik class {}; sub
23:16 newbee ohh, i see. it works now. but..
23:16 p6eval left #perl6
23:17 newbee rakudo: class hourmin {  has Int $.h;  has Int $.m; }; sub infix:<+>(hourmin $h1, hourmin $h2) {  my $r = hourmin.new(h=>0,m=>0);  $r.h = $h1.h+$h2.h;  $r.m = $h1.m+$h2.m;  if $r.m>60 {$r.h++;$r.m-=60};  return $r;  say "adding"; } my $H1 = hourmin.new(h=>22,m=>40); my $H2 = hourmin.new(h=>1,m=>21); say $H1.perl;
23:18 p6eval joined #perl6
23:21 p6eval left #perl6
23:22 p6eval joined #perl6
23:25 newbee ...but this is what i'm trying to do
23:25 newbee rakudo: use v6;  class hourmin {      has Int $.h;      has Int $.m;  };  sub infix:<+>(hourmin $h1, hourmin $h2) {      my $r = hourmin.new(h=>0,m=>0);      $r.h = $h1.h+$h2.h;      $r.m = $h1.m+$h2.m;      if $r.m>60 {$r.h++;$r.m-=60};      return $r;  };    my $H1 = hourmin.new(h=>22,m=>40);  my $H2 = hourmin.new(h=>1,m=>21);  say $H1.perl; say ($H1+$H2).perl;
23:25 p6eval rakudo 705435: OUTPUT«hourmin.new(h => 22, m => 40)␤Nominal type check failed for parameter '$h1'; expected hourmin but got Int instead␤  in 'infix:<+>' at line 1:/tmp/p_nDhHsCbW␤  in 'infix:<+>' at line 22:/tmp/p_nDhHsCbW␤  in main program body at line 22:/tmp/p_nDhHsCbW␤»
23:28 bacek joined #perl6
23:34 masak newbee: in the addition routine, you're trying to assign to the attributes. but the attributes are not rw.
23:34 masak newbee: (that's not the issue you're seeing, but it will be a problem once you fix that)
23:36 masak oh, I know what it is.
23:37 masak newbee: you're overriding the infix:<+> provided by the Perl 6 setting.
23:37 masak so that when you do addition inside of your sub infix:<+>, it recurses. and fails to bind the (now Int) argument to the parameters.
23:38 justatheory joined #perl6
23:38 flussence (is there any good reason why operator subs aren't always implicitly multi?)
23:41 jnthn flussence: The proto in the setting probably should make that the case.
23:41 jnthn Rakudo didn't catch up with those just yet.
23:50 colomon joined #perl6
23:55 masak jnthn: O RLY?
23:56 masak jnthn: wouldn't an only sub in an inner scope just take precedence over the proto in the outer scope?
23:57 jnthn I thought there was some language in S06 about a proto in scope forcing multiness...
23:58 masak sure. in the same scope.
23:58 masak but the setting is one scope up.
23:58 jnthn I'd read "in scope" as meaning "in a visible scope"
23:59 jnthn hmmm
23:59 jnthn "A C<proto>"
23:59 jnthn also adds an implicit C<multi> to all routines of the same short
23:59 jnthn name within its scope, unless they have an explicit modifier.

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

Perl 6 | Reference Documentation | Rakudo