»ö« 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.
sorear good * #perl6 00:20
how much demand is there for .WHY? 00:48
phenny: tell masak Change the spec of BUILD, then see if anyone rises to defend the old way on p6l. 00:57
phenny sorear: I'll pass that on when masak is around.
TimToady
.oO("Let's you and him fight.")
01:24
sorear good * #perl6 02:37
sorear too quiet. 02:54
crickets chirps 02:55
phenny crickets: 30 Nov 12:46Z <j105rob> tell crickets to stop chirping
TimToady wow 02:59
sorear 30 Nov 12:46Z... what year? 03:53
plobsing same year as xmas 03:59
sorear What happens if a proto is called directly? 04:10
TimToady protos are always called directly, it's multis that can't be called 04:18
worr jjhj 04:19
sorry about that
TimToady checked your radiation levels? 04:20
(well, multis can be called if you know their long name, or dispatchers wouldn't work...) 04:22
diakopter . 04:34
phenny: tell crickets Camelia refrains from eating you... this time. 04:36
phenny diakopter: I'll pass that on when crickets is around.
sorear TimToady: normally, protos are called through dispatch subs? 05:14
TimToady no, protos *call* dispatch subs 05:18
S06:94 05:19
when you say foo() you are always calling either a proto or an only 05:20
tadzik sorear: I can't build niecza on Mono 2.8.2: nopaste.snit.ch/38032 05:48
sorear ... 06:00
that is the dumbest thing I've seen all week. 06:01
diakopter Unknown char: . 06:02
ROFL
sorear diakopter: look at the time output
diakopter: tadzik's .net seems to think the decimal point character is ','
diakopter right, yeah 06:03
sorear I really, really didn't want to implement floating point parsing myself
but if the CLR is going to do something idiotic like non-optional locale "support"...
diakopter you can force your json reader/writer to always use a particular locale 06:04
tadzik oh crap 06:05
so the locale thingy?
tadzik sorear: looks like it passes with `LC_ALL="" make` 06:08
diakopter sorear: 06:11
tadzik but now I have to `LC_ALL="" niecza` too, otherwise it works with `my $a = 2,23` but crashes with `my $a = 2.23`
diakopter ((CultureInfo)(new CultureInfo("en-US", false)).NumberFormat
er, I guess that cast isn't needed 06:12
Double.Parse(string s, (new CultureInfo("en-US", false)).NumberFormat) 06:13
sorear: I think it would be best to standardize the formatting of your json storage format as an internal thingie 06:15
sorear diakopter: anything that involves instantiating Locale objects based on string keys sounds unusably slow 07:06
diakopter: json formatting is already standardized, in an RFC. The fact that niecza fails to generate valid JSON in tadzik's locale is a bug, not a "would be best" thing 07:07
sorear out
diakopter sorear: um. utter failure to receive communication. thanks a lot. 07:33
moritz_ breaks the silence 13:14
moritz_ STD.pm6 line 580 "or () to represent Nil" 13:19
I thought Nil and () are now explicilty distinct?
moritz_ wow, STD.pm has at least 170 distinct error messages, not counting the various .obs and .sorryobs calls 14:06
sorear good * #perl6 14:11
moritz_ \o|
moritz_ some error messages use "Cannot", some "Can not", and others "Can't" 14:13
Can't we agree on one spelling? :-)
tadzik no, we Cannot :)
mathw it would be good to be consistent 14:14
looks better
flussence_ I'd go with one without an apostrophe, just to make things slightly easier for people writing grep regex 14:35
mathw I'd also tend to think "can't" is a bit too informal for a compiler's error message
moritz_ so, "Cannot" or "Can not"? 14:39
sorear +1 to Cannot 14:41
mathw I'm not sure which is considered 'correct' 14:43
but I think 'cannot' is better in this kind of thing 14:44
tadzik I'm for "thou shant" 14:44
colomon If can't is out, then cannot, IMO. 14:52
moritz_ can't isn't out yet, I'm still collecting opinions 14:53
and I want a green light from TimToady before I change all instances in STD.pm6
[Coke] FGP. 15:07
moritz_ hm :-) 15:08
slavik1 just go with "NO"
so that when compilation fails, you just get a "NO! Your code is stupid. Go away!"
:D
sorear slavik1: someone in another channel once complained about a Prolog implementation they had to use which had a single message for all syntax errors 15:14
slavik1 nice^^ 15:15
colomon "Bad programmer! No cookie!" 15:25
arnsholt sorear: I usually quite like Prolog, but that sounds kinda nasty 15:27
Although truth be told, my Prolog compiler isn't exactly helpful on syntax errors either ^_^ 15:28
slavik1 I was wondering ... how much extra work would it be to take Perl6 Grammars and bolt on things to get a lexer/parser? 15:32
slavik1 so that it would tell you what token it is expecting if it was wrong 15:32
sorear slavik1: STD has that capability, but it's quite useless in practice 15:42
slavik1 I mean for coming up with my own language or something
PerlJam slavik1: that's what :dba('foo') is all about 15:43
tigeraniya hiiii 17:23
sorear Hello tigeraniya. Welcome! 17:24
tigeraniya thanks , i am coder with good skills in c java and python how can i help this project 17:25
where to pull SRC
something like git repo
flussence_ github.com/rakudo/rakudo
tigeraniya thnks FLUSSence_ 17:26
sorear There isn't a single global repository; there are many independant subprojects
What flussence_ just linked you to was one of the compilers; it has very little C and no Java nor Python
tigeraniya ohh 17:27
sorear If you want to use Perl 6, the dominant platform currently is Rakudo + Parrot
tigeraniya ok sorear
sorear Parrot has a lot of C components; it's the VM Rakudo uses 17:28
tigeraniya hmm
TimToady sorear has mostly been working on an implementation called 'niecza' that is considerably faster but doesn't implement as much yet, and runs on the CLR 17:29
sorear Rakudo is written in a subset of Perl 6; it parses Perl 6 and prepares it for execution by Parrot
Rakudo also contains a few C fragments used as native calls of a sort to speed up very important operations (operator overloading etc)
TimToady niecza has a better parser :)
sorear it also contains a minimal standard library, which is written in unrestricted Perl 6 17:30
sorear is not much for self-promotion :p 17:30
tigeraniya sorear i am not a professional . but i will have to study this project so that i can contribute , what yo guys can do is point me to right direction , so that i won't consume ur ( our community precious coders) precious time
TimToady I realize this, which is why I'm doing it :)
tigeraniya: there are many ways to contribute 17:31
tigeraniya ok
TimToady you can write tests, or docs, for instance
tigeraniya ok where to start
TimToady you can give feedback on what you find confusing
tigeraniya ok
or somewhere i can find 17:32
give me some work to do
TimToady first you should probably install rakudo and play with it a bit
tigeraniya ok am on it
sorear If you want to do C coding to help Perl 6, you should look at trac.parrot.org/parrot/wiki 17:35
TimToady or you can help mberends++ to target the JVM 17:37
nobody's targeting Python :) (though parrot also plans to support other languages including python) 17:38
sorear except for pugs, I think all of the serious attempts to implment Perl 6 have relied heavily on Perl coding 17:39
I blame the fact that Perl 6's grammar is defined in terms of Perl 6 parsing operators
TimToady whoops, tigeraniya has left 17:40
sorear things which make me feel stupid: noticing that I have code to use a hash table to cache the result of a function... which does a hash table lookup. 17:49
masak oh hai, #perl6. 18:03
phenny masak: 17 Mar 23:10Z <TimToady> tell masak a role's submethods do not override a class's, so that problem doesn't arise with submethod BUILD
masak: 00:57Z <sorear> tell masak Change the spec of BUILD, then see if anyone rises to defend the old way on p6l.
masak TimToady: yes, but what about the case where the class has no BUILD submethod? 18:04
TimToady every class has a BUILD that it thinks of as its own, even if it's really Mu::BUILD 18:15
masak this is news to me. how does that square with submethods not being inherited? 18:22
TimToady historically, Mu's build has been declared as a method rather than a submethod, but that's perhaps an implementation detail that could be wrongish 18:23
in some sense infrastructure has to be at a lower level, and each class's portion of the current object has to managed by that class 18:24
if it delegates that responsibility to Mu::BUILD or something else in the REPR, say, then that's kinda up to the class
I'm of two minds whether callsame should be used for that particular delegation 18:26
masak we seem to agree on the current state not being ideal.
TimToady well, the specs are somewhat agnostic on the particular BUILD wrappiness; one shouldn't take rakudo's approach as necessarily canonical 18:27
but the design needs to balance several conflicting goals 18:28
TimToady one really important one is performance, which is why the current semantics try to prevent assignment of defaults only to be overridden 18:28
that's just wasted work
TimToady but within that constraint we also want to preserve flexibility 18:29
and where exactly the various BUILD components live can certainly be tweaked
however, it's certainly the case that role submethods belong to the role, not to the class in which they are composed 18:30
TimToady hafta go pick someone up at the airport now 18:30
later &
masak performance is the first good reason I've heard for the overriding of default attribute initialization. 18:31
rakudo: role R[::T] { multi method foo(T $x) { say $x } }; class C does R[Str] does R[Int] {}; C.new.foo(5.5) 18:33
p6eval rakudo 25e5bd: OUTPUT«get_attr_str() not implemented in class 'Sub'␤ in main program body at line 7529␤»
masak rakudo: role R[::T] { multi method foo(T $x) { say $x } }; class C does R[Str] does R[Int] {}; C.new.foo(42)
p6eval rakudo 25e5bd: OUTPUT«42␤»
masak rakudo: role R[::T] { multi method foo(T $x) { say $x } }; class C does R[Str] does R[Int] {}; C.new.foo("OH HAI")
p6eval rakudo 25e5bd: OUTPUT«get_attr_str() not implemented in class 'Sub'␤ in main program body at line 7529␤» 18:33
masak closes #83668 18:36
moritz_ RT doesn't know any 83668 19:05
masak oh. 19:18
it was the one you replied to recently.
#86338, sorry.
moritz_ the one with type cpatures? 19:19
masak ::Right. 19:20
tadzik hello pandas 19:21
masak luckily, I had already successfully filed that bug ;)
tadzik: \o
colomon o/ 19:23
moritz_ \o 19:27
tadzik weekends! \o/ 19:33
masak \o/ 19:40
moritz_ weekend = enought time to announce the p6cc winner, masak?
masak oh, I should think so.
moritz_ \o\ 19:41
masak been busy with $teaching the last two days. currently returning to caring about other things.
colomon really likes ?? !! better than ? : 19:54
sbp really?? great!! 19:56
tadzik :D
pyrimidine looks like Parrot Foundation and TPF got into GSoC! 19:57
socghop.appspot.com/gsoc/program/ac...e/gsoc2011
moritz_ \o/ 20:00
tadzik aye :) 20:01
sorear masak: I think that lazy initialization of object attributes on first read or end of BUILD is ETOOMUCHMAGIC 20:02
dalek ecza: c2fbfdf | sorear++ | lib/ (2 files):
Refactor <foo> LTM resolution, start stubbing in dispatch methods
20:03
masak sorear: I'm all for simplicity. and BUILD overriding the default initialization seems to violate Least Surprise for people.
sorear masak: the spec can't change itself 20:04
(we hope)
masak sorear: I usually tell people that ;) 20:07
sorear: I promise to make the spec change as soon as I'm sufficiently convinced of it.
sorear masak: let's drown out shi. 20:24
sorear masak: what really bugs me is has $!a = rand; submethod BUILD() { say $!a } 20:25
masak sorear: why does that case particularly bug you? 20:28
sorear masak: it requires the reads to be active 20:29
masak: rand isn't done until $!a is accessed
masak: it requires tie-y functionality
masak wait, are you talking about current semantics, or proposed? 20:30
sorear current.
masak by current semantics, that'd print "Any()"...
(since the BUILD overrides the default initialization)
I refer you to TimToady's argument about wastefulness and performance above. 20:31
sorear I think having to keep an extra "this Any has been explicitly assigned" bit is almost certainly worse than the benefit 20:32
masak full ACK. 20:33
never liked that bit.
Tene masak: what have you been teaching? 20:33
masak Tene: Android development. 20:34
www.informator.se/utbildningar/syst...droid.aspx 20:39
Tene Huh. I hadn't remembered that you also did Java. 20:42
masak it's a living. 20:43
perigrin Android seemed like a slightly less eye-stabby environment to write Java for. 20:48
but I can only compare it to writing JTable Applets 20:49
masak question: what should 'perl6 -p' do, now that 'perl6' goes into a REPL? 21:26
moritz_ die 21:27
sorear +1
moritz_ anything that reads from $*IN interacts badly with REPL
masak the current (emergent) behavior is... interesting. 21:29
but probably not too useful.
On96 Hi! 21:44
moritz_ hello On96
On96 got banned by someone on #perl for suggesting a security issue related to Perl being sponatneous when it comes to saving files in either ANSI or UTF-8. Was it such a bad quiestion? If so-I can actualy show that. 21:46
[email@hidden.address] banned me
moritz_ On96: if you want to report a security issue in perl, please try #p5p on irc.perl.org 21:47
On96 Thanks
moritz_ or mailto:perlbug@perl.org
BinGOs I would suggest the latter.
On96 I actualy asked for help- for a simple way to identify the flag in which the file is encoded in, without needing to run complciated tests. 21:48
masak On96: sorry to hear you had a hard time over at #perl. 21:49
On96: you're the second this week to come in here and say that.
On96 is 46 years old... and last tiem he got banned on irc must have been 8 years ago. 21:50
masak from what you're saying, it was unwarranted.
tadzik #perl doetn's have the reputation of a friendliest place on earth, does it 21:51
On96 Looks like a good trick to promote Perl6 atleast :-)
Yaakov is not there any more :(
moritz_ I was about to say that you won't get banned for any Perl 6 security concerns here :-) 21:52
masak :P
tadzik On96: OTOH, you're on one of the friendliest channels, welcome! )
On96 Thanks! :-) :-) :-)
masak who's Yaakov?
On96 Yaakov was an ol op there, havent talked to him for years. 21:53
masak smiles at the comment '# MUST BE LOWERCASE' in src/Perl6/Compiler.pir 21:54
On96 Thanks tadzik; I know I have been here before too :-) Even talked to TimToady once :-)
moritz_ such things happen here 21:55
masak our notional hierarchy is flat. ish. 21:56
On96 True anarchists?
sorear our notional hierarchy is upside down!
On96 lol
masak we dance the mambo with our notional hierarchy! 21:57
On96 hehehe
moritz_ what do you expect from computer scientist, who draw trees with their root on top
masak sorear: are you referring to the fact that all of us are the boss of TimToady? :P
On96 How is his health these days? anyoen knows? 21:58
masak maybe ask TimToady. he's at the airport, but he'll be back.
On96 I own him more then half of my life to say it exact.
masak wow. 21:59
On96 Perl gave me a life.
sorear TimToady hasn't said anything about health recently
unless jet lag counts
On96 Job, family and something to dream about at the night time.
sorear hey, I could use one of those
masak On96: I predict you're going to like it here :)
On96: we dream about Perl most of the time. 22:00
tadzik yeah. I go to sleep counting zebras
*cough*
On96 lol
tadzik sorry, stripped joke 22:01
masak tadzik: you know what I think would be really big? EAN zebras.
On96 Will go back to my UTF-8 issue- 2 more hours before dreaming starts.
tadzik EAN?
masak tadzik: barcodes.
On96 Thanks alot to everyone.
masak On96: good luck!
tadzik masak: what about them?
On96: o/
masak tadzik: you could scan them once, and then keep track of them somehow. 22:02
tadzik: then you wouldn't have to count them every night.
sorear or just use rfid
tadzik masak: oh wow
and maybe create some lazy list of'em 22:03
masak sorear: obviously, you're thinking about goldfish, not zebras. :)
tadzik after all, you usually get asleep before you count them all, so there's no use in keeping 'em all in memory
masak that makes sense. 22:04
jnthn home o/ 22:06
masak rakudo: .say for "zebra 1", { (True, True, True, False).pick ?? $_++ !! "zzz" } ... "zzz"
p6eval rakudo 25e5bd: OUTPUT«zebra 1␤zebra 1␤zebra 1␤zebra 1␤zzz␤»
masak jnthn! \o/
oh, right.
jnthn o/ masak
masak rakudo: .say for "zebra 1", { (True, True, True, False).pick ?? ++$_ !! "zzz" } ... "zzz"
p6eval rakudo 25e5bd: OUTPUT«zebra 1␤zzz␤»
masak :P
rakudo: .say for "zebra 1", { (True, True, True, False).pick ?? ++$_ !! "zzz" } ... "zzz"
p6eval rakudo 25e5bd: OUTPUT«zebra 1␤zebra 2␤zebra 3␤zzz␤»
masak \o/
On96 Got my answer by the way: Test::utf8 so... if anyoen feels like telling the guys in #perl this is the best way to check a string for sane utf-8 thanks. 22:07
BinGOs which appears to use Encode. 22:09
On96 True 22:11
return ok(Encode::is_utf8($string),$name); 22:13
I wish there was something like this for files, eg. -B and -T tests
masak oh btw. 22:20
I got another p5 solution from ajs.
(not part of the contest, of course, but still potentially interesting) 22:21
sorear On96: Encode::is_utf8 doesn't check a string for sane utf-8 22:21
On96 What does it do then? 22:23
On96 is frustrated
sorear This is probably why you got banned from #perl
masak sorear: it just checks a flag? 22:23
sorear They're very touchy about people mis-using deep internals 22:24
masak: yes
On96 hrrm
sorear masak: Perl 5 automatically coerces between Buf and Str as needed; is_utf8 basically does ~~ Str
masak aye.
sorear it's not relevant unless you are debugging Perl itself, or a C-level extension 22:25
masak only because Perl 5 blurs the line between Str and Buf enough for it to be "internals". 22:26
On96 Trying to convert an entire CMS to UTF-8
web-app
masak On96: have you read perlunitut? 22:27
On96 no
masak you'll probably want to at this point. just to be sure. 22:28
On96 I have 15 Perl Oreilly other books though :)
On96 Will look for it thanks. 22:28
masak perldoc.perl.org/perlunitut.html 22:29
On96 thanks! 22:32
On96 So actually it is an administartive issue-unless unless I want to start messing around with Perl internals :-( 22:44
On96 is a bad administrator 22:45
masak On96: well, no; not if you're trying to solve a problem related to Perl giving output in different encodings. 22:55
that sounds like the recipe "1. decode, 2. process, 3. encode" isn't being done right.
moritz_ perlgeek.de/en/article/encodings-and-unicode btw
On96 Interesting link moritz. Reading. 23:01
On96 This is actually my problem: "Otherwise, you can get confused very fast, and lose track of which strings are byte strings, and which ones are text strings" (quoted from the link..). 23:01
masak right. that's exactly the problem you don't want to have in your application. 23:02
the strings inside of the barriers should all be of the same "type".
On96 oy... 23:04
masak was that from picturing the refactorings involved? :P 23:05
On96 I tried to enforce utf-8 encoding on all files starting form a certain date, to make it easy for users to upgarde thier CMS... but then again, Perl sometimes refuses to savethe file in utf-8 very strange. I used the encode for that. 23:06
sorear you seem to be very confused about what utf-8 is. 23:13
On96 My utf-8 knowledge varies with the results it produces on the html output :-( I must admit... 23:14
I know how to encode utf-8 into a non utf-8, and how to do it... once too much and even twice! lol
masak On96: hang in there. confusion about utf-8 and encodings eventually goes away, and once it does, things get a *lot* simpler.
a bit like Git, actually :) 23:15
On96 thanks for the empathy...
feel much better already :-)
masak "#perl6: you'll feel much better" :) 23:16
On96 hehehe 23:17
Does Dreamhost have it installed?
masak Perl 6? I doubt it.
On96 This is a problem-its a CMS, we have many people dependent on it. 23:18
not a great CMS, but it makes some people happy. 23:19
masak sure 23:21
Tene On96: if they provide fedora systems, yes, you can install it from the package manager.
I don't recall if we ever got packages in ubuntu or not.
On96 will ask them 23:29
diakopter I own the groups/packages/namespaces in ubuntu - they're free for anyone else to join/takeover though...
I used to, anyway 23:30
On96 I try to convince to take in Perl6 23:32
sorear TimToady: hi 23:36
TimToady: if I have proto rule foo { {*} <bar> }, what does $<foo>.keys look like? 23:37