»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:02 risou_ left 00:11 Moukeddar left 00:12 jaldhar joined 00:13 Moukeddar joined 00:17 whiteknight joined 00:20 benabik joined
TimToady
.oO(obviously the thing we'll want after "nom" is "fast")
00:21
00:37 awwaiid left 00:39 awwaiid joined 00:47 ymasory_ joined 00:49 keeth joined 01:00 keeth left 01:06 nsh_ left 01:07 keeth joined, nsh_ joined 01:16 wamba left 01:36 keeth left 01:48 Moukeddar left 01:56 keeth joined 01:58 whiteknight left 01:59 leprevost joined 02:08 keeth left 02:11 dolmen left 02:17 Bucciarati left, fridim_ joined 02:21 V15170R joined, Bucciarati joined 02:35 TiMBuS left 02:52 leprevost left 02:55 V15170R left
TimToady sorear: the top level "niezca" seems to be a misspelling 03:00
sorear Where is that string? 03:05
03:23 Su-Shee_ joined 03:24 Su-Shee left 03:46 fridim_ left 03:52 dakkar joined 04:17 Chillance left 04:27 nrdfst joined, dakkar_ joined, dakkar left, dakkar_ is now known as dakkar, nrdfst left 04:30 starcoder left 04:39 starcoder joined 04:42 starcoder left 04:43 starcoder joined, starcoder left 04:44 starcoder joined 04:46 starcoder left, starcoder joined 04:53 Axius joined 05:03 envi joined 05:08 nymacro joined 05:22 hudnix left 05:44 kaare_ joined, woosley joined 05:45 woosley left 05:46 justatheory left 05:53 Arcus joined 05:56 Axius left 06:03 Arcus left, molaf joined 06:07 araujo left 06:11 Axius joined 06:18 Axius left 06:20 [particle]1 left 06:28 wamba joined 06:32 benabik left 06:39 SHODAN joined 06:51 sivoais joined 06:52 birdwindupbird joined 07:01 envi left 07:02 Mowah joined 07:08 envi joined 07:13 lue left
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
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)␤»
moritz nqp: use NQPHLL; say(HLL::Actions::string_ton_int('12', 8))
p6eval nqp: OUTPUT«Null PMC access in invoke()␤current instr.: '_block11' pc 48 ((file unknown):25)␤»
moritz nqp: use NQPHLL; say(HLL::Actions::string_to_int('12', 8))
p6eval nqp: OUTPUT«10␤»
moritz nqp: use NQPHLL; say(HLL::Actions::string_to_int('14', 8))
p6eval nqp: OUTPUT«12␤»
07:26 lue joined
moritz rakudo: say :16(12) 07:34
p6eval rakudo 6ae3c9: OUTPUT«18␤»
07:41 donri joined 07:48 Su-Shee_ is now known as Su-Shee 07:58 wamba left 08:28 araujo joined 08:33 ingy left 08:34 ingy joined 08:52 kfo joined 08:53 masak joined
masak morning, #perl6. 08:54
moritz good morning masak
08:55 kfo_ left
tadzik good morning zebras 08:58
irclog.perlgeek.de/perl6/2010-12-17#i_3100174 -- history :') 09:00
irclog.perlgeek.de/perl6/2010-12-18#i_3101102 follow-up :) 09:01
masak :P 09:03
tadzik I fell like a blagpost just about that :) 09:04
masak "the incident taught us that things aren't always black and white"
masak should blog today too 09:05
tadzik do you have blogging on your schedule? 09:07
masak moritz++ # p6l reply
09:07 molaf left
masak tadzik: no. I probably should. 09:08
tadzik: I've totally fallen out of this Ironman thing.
moritz masak: which one? :-)
masak moritz: the base conversion one :)
though the 'eval' one is interesting too. 09:09
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
masak right.
moritz s/fails/succeeds/
moritz -> buying asparagus 09:13
tadzik karma zebras 09:17
aloha zebras has karma of 0.
tadzik no way! zebras++
09:21 wamba joined
tadzik loliblogged! ttjjss.wordpress.com/2011/05/07/zeb...rl-6-herd/ 09:23
masak tadzik++ 09:31
09:41 dual left, M_o_C joined 09:57 MayDaniel joined 10:03 wamba left 10:06 risou joined 10:10 wamba joined 10:17 pernatiy joined 10:18 fridim_ joined 10:19 itz_ left 10:20 moritz left, moritz joined
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␤»
masak \o/
10:26 wamba left, Su-Shee_ joined 10:28 Axius joined 10:30 Su-Shee left 10:38 risou_ joined, Axius left, Axius joined 10:39 Axius left 10:40 risou left 10:41 Axius joined 10:42 Axius left 10:45 Axius joined, Axius left
moritz tadzik: "Since that day, zebras have been mentioned 230 on #perl6," 10:45
tadzik: 230 *times*?
anway, tadzik++ for the blog post
masak no, they've been mentioned 230. accidentally. 10:46
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
all I know about is Asparagus Boulevard :P
moritz masak: du må skrelle den :-) 10:48
10:48 silent_h_ joined
moritz masak: at least white asparagus must be peeled, and cooked for about 20 minutes (more if they are thicker) 10:48
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
and it helps to have a bit of butter and sugar in the cooking water
masak ah. excellent. 10:51
jnthn Asparagus Boulevard \o/
10:51 silent_h_ left
jnthn I mean, er, hi :) 10:51
masak hi jnthn! :)
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 :-)
masak the suggestion that's flexible enough yet doesn't look like it was hacked on wins.
moritz masak: it alread does %x and %b and %o iirc
wait 10:53
masak moritz: right, but those are special cases.
moritz maybe it's just a method in Real
say 123.base(12)
masak ooh
moritz too obvious? :-)
masak is that unambiguous enough wrt conversion direction?
moritz yes
if you call it on a number 10:54
masak then I like it.
moritz it must be to string
masak moritz++
it's very, very obvious. which is good.
jnthn 123.to_base(12)
masak yeah, but...
jnthn :)
masak the underscore is ugly.
moritz to-base(12)
masak and if 'base' means the same thing...
I think both dashes and underscores should stay out of builtins. 10:55
moritz let's just go with base
masak yes.
\o/
moritz should the argument be a Cool or an Int? 10:56
masak hm.
Cool, I think.
but 'as Int'.
with an exception unless the Int > 2, I guess. 10:57
dalek ecs: 03f8d38 | moritz++ | S32-setting-library/Numeric.pod:
[S32/Numeric] spec Real.base
masak er, >= 2
moritz++
moritz feel free to fill in the details
masak oki
10:59 whiteknight joined 11:01 nymacro left 11:06 nymacro joined 11:07 dakkar left, MayDaniel left
dalek ecs: bf245c0 | masak++ | S32-setting-library/Numeric.pod:
[S32/Numeric] added $base condition

  $base in the conversion method .base must be at least 2.
11:12
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
moritz masak: what about upper limit for base? 36? 11:17
masak oh, right.
feel free to add that. :)
masak noms lunch
Tene jnthn: ping 11:20
jnthn Tene: pong
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.
Tene 'k
jnthn Tene: Do you have an immediate need to do so? 11:22
Tene I'm considering trying some custom reprs for cardinal 11:23
I can just add them to REPR_initialize_registry in a fork or something
jnthn *nod* 11:24
Do that for now, then we can work out something better.
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
11:25 Su-Shee_ is now known as Su-Shee 11:26 risou_ left
dalek ecs: 9019a8e | moritz++ | S32-setting-library/Numeric.pod:
[S32/Numeric] Real.base: $base <= 36, upper case in result
11:26
Tene I still find myself confused by exactly what repr_type_object_for means. 11:27
"creates a new type object of this representation and associates it with the given HOW" 11:28
jnthn Read "how" as "meta-object" 11:29
Basically it creates a type based on a repr/meta-object pairing, and gives you back a handle do it. 11:30
*to it
You can then use repr_instance_of on that handle to get an instance. 11:31
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:32
11:34 Axius joined
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
For: anObject = MyClass.new(parameters)
Tene Ah.
jnthn That new method should somehow be able to locate the type object and call repr_instance_of on it 11:37
I guess anyway
I'm not familiar enough with Ruby to know exactly how that should be factored.
Part of me suspects the Class class has an attribute $!instantiation_handle which the new method of it calls repr_instance_of on. 11:39
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:41
I was thinking that I should try writing an RClass repr, and maybe an RObject repr. 11:43
I *could* get away with just a HashAttrStore, though, just fine. 11:44
jnthn Tene: It feels to me like RBasic playing the repr-ish role here, while RObject and RClass are more like meta-objects. 11:50
I suspect that making a few reprs would actually work. 11:51
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:52
jnthn Where do class methods live in the Ruby factoring? 11:53
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:56
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
std: do { } while 1 11:58
p6eval std 9f27365: OUTPUT«===SORRY!===␤Unsupported use of do...while; in Perl 6 please use repeat...while at /tmp/XO2WRRWv0c line 1 (EOF):␤------> do { } while 1⏏<EOL>␤Parse failed␤FAILED 00:01 113m␤»
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.
jnthn Ah, interesting. 11:59
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.
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 :-)
jnthn Sounds like in 6model ->klass translates as get_how
Tene (also Cow->klass->klass == Class) 12:02
jnthn Ah, the meta-loop. :)
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.
jnthn Yeah, that bit is a proper brain tease...
12:03 Axius left
Tene www.hokstad.com/static/rom/rom.png -- dashed lines are ->klass (instance-of), and solid lines are ->super 12:03
that's (allegedly) how the core ruby meta-loop works 12:04
where <foo> is an eigenclass for foo
jnthn tries to take it in : 12:05
:)
Tene Module inclusion, for mixins, is done similarly. You push down an instance of module onto the appropriate pointer. 12:06
if you use 'include', it's affecting instances of the class, so you put it on ->super
12:06 Patterner left
Tene If you use 'extend', it's affecting the class, so you put it on ->klass 12:07
and in both cases, ->klass of the thing you push in there is Module and ->super is whatever was previously on ->klass or ->super
www.slideshare.net/burkelibbey/ruby...m=ss_embed is my big source for understanding this 12:08
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:11
jnthn Tene: That presentation helps but it'll take me a while to digest and come up with a model. :) 12:13
Tene Yeah.
jnthn Slide 26 is...revealing...
Tene slide 26 is "eigenclasses are hidden from users"
12:16 woosley joined
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
12:17 wamba joined, masak left
Tene or I could try to push it down with get_how being equivalent to ->klass 12:18
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
Tene Yes, agreed. real ruby does use a method cache.
jnthn ah, ok 12:20
Tene or is that not what you mean?
jnthn Yes, it's what I mean.
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
or, really, on the eigenclass of Class, but mumble mumble
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.
Tene because the HOW has to conform to the 6model API, right?
jnthn The HOW is just something with methods. 12:25
find_method is currently "special"
But I don't plan for it to be that way forever.
dalek ast: 03eb0be | moritz++ | S32-num/base.t:
[base.t] test Real.base (well, Int.base for now)
12:26
12:26 masak joined
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
*than this
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.
*where you define
Tene actual interoperation with Parrot or other languages should go through a vtable or something, not through methods 12:29
right?
moritz would have expected through methods
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
jnthn So languages are free to have whatever methods they want in their meta-objects, but interop can still work.
moritz Tene: I wasn't thinking about methods on HOW, but methods on actual instnances 12:31
Tene moritz: Ah, right.
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
if I want to get the parents from a class, or list the methods in a class...
moritz Tene: that's right. Neither do all languages have classes
Tene: in that case you can't expect HLL interop to DWYM without knowing stuff about the foreign language 12:33
12:34 risou joined
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␤»
masak rakudo; say :5<132>; say :36<RS> 12:36
rakudo: say :5<132>; say :36<RS>
p6eval rakudo 6ae3c9: OUTPUT«42␤1000␤»
masak moritz: you're probably working on a .base implementation :) 12:37
moritz: does it look anything like mine above?
12:41 risou left 12:42 risou joined
dalek kudo: 705435e | moritz++ | / (2 files):
implement Int.base
13:01
masak ah, nice. a @conversion table and the minus case. 13:03
also, a repeat-while, which also makes a lot more sense. 13:04
moritz++
moritz: hm, what about fractional numbers?
there's the problem of infinitely repeating decimals, of course... 13:05
13:05 wamba left
masak but besides that, it feels like a pretty reasonable use case. 13:05
moritz masak: it's NYI 13:06
13:06 colomon left, wamba joined
masak right; I see that. (and that's fine.) 13:08
but what about it? how do we address the infinitely repeating decimals thing?
we should probably spec it once we decide, too :)
13:11 Moukeddar joined
moritz we just handle it like normal number stringification 13:16
just cut off
at some[tm] point
masak at some parameterized point? 13:17
what's the rounding policy? is it parameterized, too?
moritz doesn't see the need for it 13:18
I'd just say roughly Num machine precision
masak make sense.
Moukeddar www.youtube.com/watch?v=4NuqLFzo6A8
masak makes&
Moukeddar what do you think?
hi masak
masak hello Moukeddar
Moukeddar how are you? 13:19
masak Moukeddar: nice bevel. you should write a raytracer in Perl 6. :)
I'm fine. I appreciate it being weekend.
Moukeddar: and you? 13:20
Moukeddar doing pretty good :)
preparing for the exams :(
that logo took me all night ;) 13:21
13:36 wamba left 13:40 risou_ joined 13:42 risou left
dalek p: 2656070 | masak++ | src/ModuleLoader.pm:
[ModuleLoader] strip away Unixy './' in module path

This prevented the lookup from working on Linux. Works now.
13:46
jnthn Note, only was issue when your mainline is the module you want to load. :)
masak right.
but who wouldn't want that? :P
jnthn :P
moritz :-)
jnthn Nobody until you. :P
moritz but I think nqp only had two users before masak :-) 13:47
jnthn True :)
masak "a third of all the users want to load the mainline!"
jnthn re-inforces the GitHub issues for nqp Just In Case ;) 13:48
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:54
dalek kudo/nom: d1c4f3f | jnthn++ | src/Perl6/Actions.pm:
Remove old setting mode flag.
13:59
kudo/nom: 40c47c3 | jnthn++ | src/Perl6/Grammar.pm:
Add a missing our scope declarator that we somehow got away with in nqp-rx.
kudo/nom: 35b6a71 | jnthn++ | / (5 files):
Start to refactor hanlding of module loading. Also stub in some setting loading bits.
masak jnthn: if the Swedish alphabet were the standard one in computers, the base could go up to 39 or possibly 40 :) 14:01
14:04 Tedd1 left
jnthn :P 14:05
jnthn has some way to go before he's ö years old. 14:06
14:06 Tedd1 joined 14:13 dual joined, Moukeddar left
dalek kudo/nom: cf7946d | jnthn++ | src/Perl6/ModuleLoader.pm:
Rakudo-ize something grabbed from nqp.
14:14
kudo/nom: 5eddfaa | jnthn++ | src/Perl6/Grammar.pm:
Handle EXPORTHOW, so we can haz meta-objects available.
14:17 M_o_C left 14:20 M_o_C joined 14:35 cognominal left
dalek kudo/nom: 2da19b3 | jnthn++ | src/Perl6/ (2 files):
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
kudo/nom: 417b4c3 | jnthn++ | src/CORE.setting/BOOTSTRAP.pm:
Add a {YOU_ARE_HERE}.
14:42 risou_ left 14:49 MayDaniel joined 14:52 snearch joined
dalek kudo/nom: 7112a1f | jnthn++ | src/Perl6/ (2 files):
Start to refactor package handling a bit. Toss package_declarator:sym<does> - STD no longer does it that way.
14:56
14:58 Moukeddar joined
Moukeddar hello 14:58
is it wise to suspend your Facebook Account?
dalek p: dcd196e | jonathan++ | src/NQP/Grammar.pm:
Toss unused variable.
14:59
15:10 masonkramer joined, Moukeddar left 15:12 whiteknight left 15:14 noganex joined, wamba joined 15:17 risou joined, noganex_ left 15:21 Trashlord joined
tadzik moritz: yeah, 230 times, good catch :) 15:22
15:23 muixirt joined 15:25 wooden left
tadzik jnthn: how hard is diving into ModuleLoader now? 15:26
jnthn tadzik: Bad time. 15:27
tadzik: I'd rather get to a point where something works at all. 15:28
Right now there's no way to even know if the stuff you've changed worked. ;-)
15:28 M_o_C left
tadzik I see 15:28
that was to be my next question :)
jnthn Once things are a bit further along, it'll certainly be a good place to dive in and hack. :) 15:29
I'm currently doing the first big cut of refactoring package handling.
15:32 noganex_ joined 15:33 noganex left 15:35 Moukeddar joined
tadzik jnthn: nom doesn't build, right? 15:42
jnthn tadzik: Build fails in last step compiling the setting. 15:43
15:43 am0c left 15:44 risou left
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.
tadzik aye 15:45
jnthn OK, then we're seeing the same thing :)
My current goal is to be able to compile src/CORE.setting/BOOTSTRAP.pm.
Though it'll actually end up complaining that some stubs aren't completed :) 15:46
15:49 cognominal joined 15:53 woosley left 15:56 am0c joined 15:57 Moukeddar left, benabik joined 16:08 jdhore left 16:09 jdhore joined
moritz Contextual %*PKGCOMPILER not found 16:12
is what I get
jnthn yup
moritz: That's the error when compiling the setting.
moritz: But by that point we already built the Perl 6 executable. 16:13
moritz ah
jnthn But it won't do much because it can't find CORE.setting 'cus it didn't build ;-)
The build procedure is different now.
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:14
tadzik so settings will be loaded in runtime? 16:15
moritz sounds like
jnthn Yes.
--setting=CORE # the default; specify a different name here, or NULL for none 16:16
afk, masakism 16:21
masak ism?
jnthn :P
long walk... :) 16:22
in the hot
;)
Nah, it's probably cooled off a bit by now.
masak you'll get a glass of apple juice when you arrive :)
jnthn \o/
&
16:24 s1n left 16:25 Moukeddar joined
Moukeddar so guys , is prototyping essential ? 16:25
masak Moukeddar: insufficient data. please try again :) 16:26
16:26 s1n joined
Moukeddar for example , let's say i'm making a website , let it be a portal 16:26
or some application
f.e management app
masak sure.
moritz then you start with something very small that runs
und slowly turn it into something that still runs 16:27
Moukeddar i was talking about the UI
moritz that applies for the UI too
Moukeddar and use TDD right ?
masak only if you understand TDD.
don't do it because we say so.
dalek kudo/nom: 1c04306 | jnthn++ | src/Perl6/Grammar.pm:
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
masak do it once you realize that not doing it is a type of insanity.
Moukeddar masak, i'm starting to kinda realize it :)
moritz and also do a project without tests, and compare :-)
Moukeddar i run into some issues
methods became buggy and not doing the wor 16:29
work
moritz that's live
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.
Moukeddar all my previous project were Test-less
masak also, write code that dies a lot.
that's how you get robust code in the end.
Moukeddar Bacteria Code?
brb :) , Tea Time 16:30
masak tries to clean up before jnthn arrives :)
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
masak I'm starting to like that more and more.
I write code that cries bloody death at the smallest unforseen input.
with the result that I know immediately when unforseen things happen. 16:32
moritz that's why I prefer postgres over mysql these days :-)
masak it goes against the grain of many Perl 5 built-ins, but it's not that hard to adopt as a habit.
Moose helps a lot with this, too.
sorear good * #perl6
masak sorear! \o/
moritz \o it's sorear
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?
moritz sorear: in the nom branch
sorear: aka "not really" :-)
tadzik aka "almost there" :) 16:34
masak aka "the future is here, it's just unevenly distributed" 16:35
...with Git. 16:36
16:40 nymacro left
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
16:42 risou joined
masak (and every design pattern is an instance of Separation of Concerns) 16:46
Moukeddar masak, what i meant that after 'Developing" the methods 16:49
they no longer give the expected results
16:50 REPLeffect left
Moukeddar Queries gone wrong , bad output 16:50
etc....
masak sounds like you're in a place where you're ready to appreciate tests, yes.
and remember, *automated* tests.
Moukeddar what's that ?
masak not just "testing the code now and then" :)
it's a piece of code that runs your tests.
see, for example, the spectest suite.
github.com/perl6/roast 16:51
each .t file in there is a small Perl 6 program, running some tests.
and the test output is very simple: "ok" or "not ok".
so that you know if and when things break.
*that's* testing. :) 16:52
Moukeddar i see , there's Test Project in Visual Studio
very similar
masak the real benefit comes when you accidentally break something fairly unrelated, and the tests discover it for you.
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
masak also, refactoring suddenly becomes feasible, and the "don't fix it" fear goes away.
sorear ensure
masak Moukeddar: what sorear said. what do you mean, "Quality"? 16:54
that sounds like a marketing word :P
Moukeddar hehe
no matter how much you enhance , the function will still do it's work
ensure* yeah :p 16:55
masak but yeah, Quality Assurance involves testing IIUC.
Moukeddar you mean the UI ?
16:57 Moukeddar_ joined, Moukeddar left
masak no, I mean everything. 16:58
Moukeddar_ to see if it's Fool-proof?
masak you seem very focused on the UI. :)
phenny: google "invent a better fool"
16:58 justatheory joined
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."
Moukeddar_ i remember a quote
wait a sec i'll get it
masak Moukeddar_: oh, sure. it's important. the UI is another one of those things you should do first :)
Moukeddar_ sketching and prototyping right? 17:00
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. 􏿽x96 Rick Cook
moritz .u "invert a better fool"
phenny moritz: Sorry, your input is too long!
moritz .g "invert a better fool"
phenny moritz: No results found for '"invert a better fool"'.
Moukeddar_ .g "invent a better fool" 17:01
phenny Moukeddar_: faculty.ed.umuc.edu/~jrugg/prgmrule.htm
Moukeddar_ lol , funny 17:03
masak Moukeddar_: yeah, that longer quote feels like an elaboration of mine.
Moukeddar_ prototyping is time sink 17:04
masak so is debugging.
so is trying to change an opaque model. 17:05
Moukeddar_ i'm in a vortex
17:06 REPLeffect joined
masak that's why it's called "whirlpool development" :P 17:06
Moukeddar_ hehe, funny one
masak, there's gazzillions of C books 17:09
which to take?
17:11 am0c left
masak that one's easy. "The C Programming Language" by K&R. 17:11
read it three times.
Moukeddar_ it isn't from "Scratch" right ? 17:12
tadzik it is, but it's the best one around, hands down 17:14
Moukeddar_ ok
i see no Arabic translation for the book 17:17
someone should do it :)
294 Reviews 17:21
5 star: (237)
THIS is the best Community Ever :) 17:27
17:28 REPLeffect left
tadzik you mean *this? 17:29
Moukeddar_ i mean here 17:30
this channel
these people here :)
tadzik I'm glad to be a part of it :) 17:32
17:32 Su-Shee_ joined
Moukeddar_ i've learned here more than i ever thought :) 17:32
17:36 Su-Shee left 17:37 Moukeddar_ left 17:42 REPLeffect joined 17:49 Mowah left 17:58 Moukeddar joined, BoWozZ joined 18:02 Su-Shee_ is now known as Su-Shee 18:03 Mowah joined 18:04 BoWozZ left 18:09 muixirt left 18:10 anazawa joined
masak Moukeddar: me too :) 18:17
18:20 anazawa left
Moukeddar www.youtube.com/view_play_list?p=F8...A36026F8BC 18:20
which one do you like the most from this 4 versions?
18:22 birdwindupbird left 18:27 REPLeffect left 18:33 colomon joined 18:36 s1n left, tylercurtis left, tylercur1is joined
Moukeddar masak, check this : www.youtube.com/watch?v=M5g3f-OFI8g 18:36
18:37 s1n joined 18:42 TiMBuS joined 18:47 MELILLA joined, justatheory left 18:48 MELILLA left 18:49 MayDaniel left 18:52 wooden joined 18:53 colomon left 18:56 Moukeddar left 18:58 whiteknight joined 19:06 wamba left 19:15 justatheory joined 19:23 birdwindupbird joined 19:30 colomon joined 19:31 hudnix joined 19:43 birdwindupbird left 19:49 [Coke] left, dwnichols left 19:51 [Coke] joined 19:56 [Coke] left 19:57 donri left, [Coke] joined 20:13 [Coke] left 20:15 [Coke] joined 20:19 bluescreen10 joined 20:30 starcoder is now known as evilstarcoder, evilstarcoder is now known as starcoder 20:35 [Coke] left 20:37 [Coke] joined 20:42 snearch left 20:48 masonkramer left 20:49 justatheory left 21:05 Trashlord left 21:09 Trashlord joined 21:20 SHODAN left 21:23 ribasushi left 21:24 ribasushi joined 21:32 envi left 21:37 orafu left 21:40 newbee joined
newbee hi all :) 21:40
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;
s/gave/give/ 21:42
21:45 perimosocordiae joined
perimosocordiae hey #perl6, I'm working on a data mining project using the irclogs from irclog.perlgeek.de/ (thanks, moritz) 21:49
and we're now working on generating conversation summaries (over a day's worth of logs)
so I'm wondering if there are any especially memorable days from the last 6 years that we can use as test cases 21:50
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
perimosocordiae plobsing: any particular days / events, though? 21:54
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 22:13 Bucciarati left 22:16 newbee joined
newbee which is the "Test::More" for perl6? 22:18
22:21 Su-Shee left 22:22 Bucciarati joined, kaare_ left
masak newbee: Test.pm 22:22
22:24 Su-Shee joined 22:26 newbee left 22:27 noganex joined 22:30 noganex_ left 22:40 Mowah left 22:42 newbee joined, colomon left 22:49 p6eval left
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:50
22:51 p6eval joined, ChanServ sets mode: +v p6eval 22:53 p6eval left 22:54 p6eval joined, ChanServ sets mode: +v p6eval 23:02 bacek left 23:03 silent_h joined 23:11 silent_h left
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))␤»
..niecza v5: OUTPUT«===SORRY!===␤␤In has declaration, typename 'Int' must be predeclared (or marked as declarative with :: prefix) at /tmp/pcFKNYUv6u line 1:␤------> class hourmin { has Int⏏ $.h; has Int $.m; } sub infix:<+>(hour␤␤Any()Malformed has at
../tmp/pcFKN…
..rakudo 705435: OUTPUT«===SORRY!===␤Confused at line 22, near "class hour"␤»
newbee pugs gets it's right :S 23:13
s/it's/it/
tadzik you're missing a semicolon 23:14
class {}; sub
newbee ohh, i see. it works now. but.. 23:16
23:16 p6eval left
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:17
23:18 p6eval joined, ChanServ sets mode: +v p6eval 23:21 p6eval left 23:22 p6eval joined, ChanServ sets mode: +v p6eval
newbee ...but this is what i'm trying to do 23:25
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;
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
masak newbee: in the addition routine, you're trying to assign to the attributes. but the attributes are not rw. 23:34
newbee: (that's not the issue you're seeing, but it will be a problem once you fix that)
oh, I know what it is. 23:36
newbee: you're overriding the infix:<+> provided by the Perl 6 setting. 23:37
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
flussence (is there any good reason why operator subs aren't always implicitly multi?) 23:38
jnthn flussence: The proto in the setting probably should make that the case. 23:41
Rakudo didn't catch up with those just yet.
23:50 colomon joined
masak jnthn: O RLY? 23:55
jnthn: wouldn't an only sub in an inner scope just take precedence over the proto in the outer scope? 23:56
jnthn I thought there was some language in S06 about a proto in scope forcing multiness... 23:57
masak sure. in the same scope. 23:58
but the setting is one scope up.
jnthn I'd read "in scope" as meaning "in a visible scope"
hmmm 23:59
"A C<proto>"
also adds an implicit C<multi> to all routines of the same short
name within its scope, unless they have an explicit modifier.