»ö« 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! | Rakudo Star Released!
Set by diakopter on 6 September 2010.
00:07 M_o_C left
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....dex_tablet 00:10
sjn whoa 00:13
00:14 nadim left 00:15 soroush joined 00:16 shi joined 16:39 ilogger2 joined, ChanServ sets mode: +v ilogger2
pat_is_learning_ I personally liked www.youtube.com/view_play_list?p=C1...6F1196AF53 this playlist 16:41
but I'm also kind of new to perl6, maybe there's something better out there
arcus rakudo: say "hello" 16:45
p6eval rakudo cae7f9: OUTPUT«hello␤»
16:48 cotto joined
pat_is_learning_ what does «Null PMC access» in type() mean? 16:48
flussence usually that someone needs to write a better error message there :) 16:50
16:51 am0c joined 16:54 MayDaniel joined 16:56 am0c left
pumphaus rakudo: print "Hello" 16:57
p6eval rakudo cae7f9: OUTPUT«Hello»
17:00 am0c joined
colomon flussence: actually, "Null PMC access" means something is REALLY broken. 17:06
flussence in my experience, it means I'm making some stupid and obvious mistake... 17:10
tadzik it's rather like a segfault, but in Rakudo, ko? 17:13
s/ko/no/
flussence K.O.!
allbery_b segfault in the prrot virtual machine 17:15
parrot even
some PIR did the equivalent of reading *((char *) 0)
arnsholt Yeah, null PMC is essentially Parrot's NULL pointer
tadzik that's what I thought 17:16
flussence I got quite a lot of them when messing around with zavolaj
tadzik :)
flussence (and actual null-deref segfaults, too) 17:17
17:17 sftp joined 17:24 shabble joined
tadzik when is star coming out? 17:26
flussence in time for new year's day 17:27
colomon \o/ 17:34
tadzik just read a 7th Dec #phasers, about moving a Rakudo development from place. Would it be hard to create a TODO list with knowlegde prerequisites for each thing? Or dividing it into subtasks, so it'd be easier to pick up for newbies like me :) 17:36
Really important items – 1 ? module installer 17:39
hrm
17:43 justatheory joined
tadzik 2 ? other S02 data types -- KeySet, KeyBag (A) – that souds doable 17:43
colomon: got a while? 17:46
colomon not exactly, but if you ask, I'll try to answer. 17:49
(computer set up in kitchen, working on cooking and cleaning) 17:50
tadzik oh. I'd like to try implementing KeyHash for Rakudo, and I think whether inheriting from Hash is a right thing. According to my poor spec knowledge it shold do Associative, but my first (maybe wrong) thought is making it a special king of Hash 17:51
s/king/kind/
colomon my inclination is that's not the right approach -- violates liskov 17:53
my second inclination is to think I'm actually thinking of KeyBag, and I need to check the spec. 17:54
tadzik liskov?
colomon might be spelled wrong. 17:55
tadzik KeyHash is a Hash that "nulls" a value when set to a default value
17:55 icwiener joined
colomon If A is a B, then you should be able to use A wherever you use B. 17:55
may be spelled wrong.
en.wikipedia.org/wiki/Liskov_substi..._principle 17:56
tadzik ah, sure 17:57
colomon I suspect they should be related classes, but neither derived from the other.
but I certainly haven't looked closely into it!
tadzik so, question for the insiders: Hash is EnumMap, not only does Associative. What is an EnumMap? Should KeyHash be an EnumMap too? 17:58
18:04 Pacosani joined
tadzik also, I'd feel glad to know what the user is trying to store when he/she is trying to store. Would that require some lowlevel mangling or what? I'd love some tips/guidance 18:05
18:14 dsp_ joined 18:15 vastak joined
colomon tadzik: apologies that I don't have a better quick grasp on the different Associative types. 18:18
tadzik colomon: no problem 18:19
colomon at a quick notion: it might be better to make a quick and dirty module which provides the various Key types, just so that we can get some experience using them. 18:20
pat_is_learning_ rakudo: say .(3,1) given { $^a > 2 ?? &?ROUTINE($^a-1, $^b*$^a) !! $^b} 18:21
p6eval rakudo cae7f9: OUTPUT«Could not find sub &?ROUTINE␤ in <anon> at line 22:/tmp/5KUgq6tfMo␤ in main program body at line 22:/tmp/5KUgq6tfMo␤»
pat_is_learning_ ??
pugs: say .(3,1) given { $^a > 2 ?? &?ROUTINE($^a-1, $^b*$^a) !! $^b}
p6eval pugs: OUTPUT«(timeout)»
tadzik colomon: that's what I thought about, yet I have no luck locating any place in rakudo code when a value is assigned to a key in a hash, and that's what KeyHash needs to look into 18:22
colomon tadzik: for a quick and dirty implementation, I might make it so KeyHash has Hash, rather than is. 18:23
tadzik colomon: that would be the easiest one, yes 18:25
but I still don't know what actually happens when someone does an assignment on a hash element: what gets called, what can I inspect 18:28
18:29 niella joined, niella left, niella joined
tadzik pugs: my $a is KeyHash; say $a.WHAT 18:43
p6eval pugs: OUTPUT«Scalar␤»
tadzik pugs: my $a is KeyHash = a => 5; say $a.WHAT
p6eval pugs: OUTPUT«Pair␤»
tadzik oh you 18:44
pugs: my $a is KeyHash = a => 5, b => 7; say $a.WHAT
p6eval pugs: OUTPUT«Pair␤»
tadzik wklej.org/id/444886/ -- why is it so dead silent? It could at least crash, or something 18:48
flussence the second "role KeyHash" defines that to the end of the file, put {}s after it (which will make it a lot more error-y) 18:53
tadzik oh, ok 18:55
so how do I create a "prototype" of this role, so the below line would know it's about ints?
19:05 alyx joined 19:10 Pacosani left 19:20 Pacosani joined 19:37 Psyche^ joined, Psyche^ is now known as Patterner 19:39 niella left
tadzik quick offtopic survey for linuxers: which distro do you use? 19:48
alyx tadzik: slackware on laptop, alpine everywhere else. 19:52
flussence gentoo at home, ubuntu at $dayjob 19:53
...and I got a printer yesterday, which means I have to reinstall everything with cups support :( 19:55
alyx flussence: ouch O_o
tadzik oh, I remember why I I lived Dentoo :) 19:56
flussence "8 reinstalls"... oh well, not so bad.
19:57 Axius joined
tadzik erm, loved gentoo 19:57
typing colemak is hard with a lad
flussence: is no one caring about Parrot and Rakudo on Gentoo? 20:04
flussence afaik, one of the devs wrote the ebuilds, but they don't bother updating them 20:07
20:10 Axius left
flussence (wait a minute, this printer takes sd cards. I don't even need to mess with my PC) 20:11
tadzik oh come on! :)
flussence yeah, I'm cheating a bit, but it's a kodak and from what I've been reading, they pretend Linux doesn't exist.
so I'll humour them 20:12
tadzik :)
20:16 Axius joined 20:29 M_o_C joined, Pacosani left 20:37 born2frag joined 20:49 am0c left 20:51 masak joined
masak hi, zebras. 20:52
tadzik hi giraffe
masak :)
20:52 vastak left
masak well, I do tend to stick my neck out... 20:52
I made a blog post: strangelyconsistent.org/blog/im-doi...till-alive 20:53
tadzik want to try touching KeyHash with me?
I made some pityful trials
masak I saw you had some questions about those things in the backlog. 20:54
I'll be happy to share what little I've been able to figger out myself about it. :)
don't be surprised if my connection fails though. I'm on a bus again. 20:55
an EnumMap is a map of Enum objects. an Enum object is the smallest constituent of an enumeration: a key and a value.
the big difference between an Enum and a Pair is that the latter's value is read-write. 20:56
correspondingly, a Hash can have its values changed.
tadzik but Hash is not just a bunch of Pairs 20:59
21:00 coldhead joined
masak be careful with that word, "is" :) 21:00
there's a whole movement called E-Prime which strives to speak without the word "is" in its different forms. it sits at the bottom of a number of misunderstandings and logical errors, they maintain. 21:01
a Hash can be thought of as a collection of unique-key Pairs. unless I missed something. 21:02
tadzik well, the point is not being a list, O(1) access and stuff 21:03
masak I didn't say it's a list.
even you said "bunch". :)
tadzik :)
alright
masak but anyway, having Hash derive from EnumMap always surprised me slightly. 21:04
I kinda-sorta see why, with Hash being a read-write version of EnumMap.
but to me, that's not a particularly overwhelming reason to derive stuff.
21:08 masak` joined
masak` dropped out. now I'm here again. 21:08
seems to me a KeyHash[::T] is a variant of a Hash, one that erases the differences between non-existent keys and keys with the default value of ::T.
tadzik I thought alike 21:09
masak` and then you essentially get KeySet and KeyBag for free, it seems.
21:11 masak left, masak` is now known as masak
masak S32/Containers:1058: role KeyHash[::T, $default = Any] 21:12
this seems wrongish to me.
better would be to have type ::T know its default. it'll need to, anyway.
21:13 Axius left 21:14 masak` joined
tadzik that mislead me too 21:14
masak` I'm glad we seem to be following the same path here :) 21:15
'course, S32 is hardly normative. :P
so maybe this is a good time to exercise good judgment and ignore or even change it. 21:16
imagine instantiating a KeyHash[Int]. it'll fail as soon as it tries to store an Any in an Int slot.
or a KeyHash[Int, "OH HAI"]. not too useful either. 21:17
tadzik hmm
21:17 M_o_C left 21:18 masak left, Pacosani joined 21:20 masak`` joined, masak`` is now known as masak
masak the design, seems to me, is well-intended, but too complicated. 21:20
role KeyHash[::T] would be better.
tadzik so what would default be? 21:22
masak it seems to me that formalizing what is meant by a "default" for all the built-in types would be useful, too.
21:22 masak` left
tadzik nothing by default?:) 21:22
masak for Int it's 0, for Str it's "", for Bool it's False...
we take this for granted, but it's nowhere in the spec.
21:22 risou joined
masak what's the default for a user-defined enumeration? 21:22
the default for a user-defined class is probably the type object. 21:23
21:23 masak` joined
masak` but it's not for Int, which makes Int different somehow. and if it's different, it's different for a *reason*, for example because it's been stated explicitly somewhere in Int's definition. 21:24
tadzik masak`: "0" is false too
masak` rakudo: say ?"0"
p6eval rakudo cae7f9: OUTPUT«Bool::False␤»
21:25 masak`` joined
tadzik that's what broke the same idea in my mind too :) 21:25
masak`` but I still think "" is the default for Str, not "0".
21:27 masak left 21:29 masak` left 21:30 jhuni joined, masak joined
masak so, anyway. 21:30
arnsholt masak: Interestingly, I find science to be just as much right-brain as left =) 21:31
masak I can't argue *against* "0" being the default for Str, except that it "feels wrong".
arnsholt: yes, I wrote it that way partly to provoke.
21:32 masak`` left
tadzik masak: I had the same feeling. Just "Pass a false value to erase won't work now" 21:32
masak compared to being disciplined and following a TOTE cycle, science is a fairly unregulated activity. even if it, too, has a goal in mind.
pmurias masak: i noticed you started submiting bugs for niecza, what's your experience of using niecza so far? 21:33
21:33 y3llow_ joined
masak tadzik: one current limitation of Hash in Rakudo is that they can only have Str keys. 21:33
21:33 pothos_ joined
masak pmurias: after the initial surprise at how far along it is, I'm delighted by being obstructed so much. :) 21:33
haven't felt that with Rakudo since the alpha->ng transition, and even it was just a weak shadow of Rakudo in 2008. 21:34
tadzik masak: oh, so we have it easier now :)
21:34 y3llow_ is now known as y3llow
masak boy. yes. 21:34
tadzik a'right 21:35
21:35 pothos_ is now known as pothos
masak pmurias: example: found niecza didn't have any .split method. meant to make a small one myself with .index. found niecza didn't have .index either. ended up using ~~ 21:35
pmurias masak: and speed wise how does it compare?
masak it's faster. 21:36
which is refreshing.
the parse phase is slow, though.
tadzik but but. I copied all the Hash code into a new class, then I was trying to locate some method that sets the value so I'd be able to set a trap inside, but I couldn't find any
masak rakudo: my $a = 3; $a &&= 4; say $a 21:38
p6eval rakudo cae7f9: OUTPUT«4␤»
masak tadzik: do it again, but simpler this time :) 21:39
tadzik even simplier?
masak yes.
tadzik I tried to assign a "die" so it'd print a backtrace, but it didn't 21:40
masak the smallest part of functionality you can think of, in the most controlled conditions you can think of.
which for me is usually a one-liner on the terminal, but YMMV.
hm. need to start packing up. almost at my destination now. 21:41
see you on a more stable connection, #perl6. 21:42
21:42 masak left
tadzik oh look, his connection died again! 21:42
pmurias what is the repo for the synopsis? 21:43
diakopter perl6/specs 21:46
pmurias thanks 21:50
lue howdy #perl6 22:06
22:28 shi joined
dalek ok: 738eb39 | (Przemysław Wesołek)++ | bin/book-to-latex:
TT sends output to STDOUT, removed extra print().
22:32
22:43 vastak joined 22:59 am0c joined
lue how do you negate in a perl6 regex? Things like \S, except with a named regex (things like <snowman>) 23:02
nvm, found it. 23:12
23:12 Bucciarati is now known as Buccia`27C3
tadzik so how? :) 23:12
23:13 ggoebel joined
lue with <-alpha> ( <!alpha> is counterintuitively not the solution ) 23:15
dalek ok: c696fe7 | (Przemysław Wesołek)++ | lib/book.sty:
Added missing TeX dimension.
23:21
23:24 ggoebel left
dalek rixel: 1e39860 | diakopter++ | / (14 files):
sprixel/perlesque WIP commit
23:25
23:39 araujo joined, araujo left, araujo joined 23:55 masak joined
masak oh hai from a more stationary point of view ;) 23:55
I find this Twitter exchange a relative success: twitter.com/sotechx/status/18477993152217088 twitter.com/carlmasak/status/18698308276981760 twitter.com/sotechx/status/18716138187792384 twitter.com/carlmasak/status/19019726873169920 twitter.com/sotechx/status/19039233339559936
sometimes all people really want is straight answers. 23:56
23:56 ggoebel joined 23:58 [Coke] joined