»ö« 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:13 cdarroch left 00:20 jeeger`` left 00:21 khisanth_ joined 00:22 Khisanth left 00:23 khisanth_ is now known as Khisanth 00:24 jeeger`` joined
jeeger`` Hm, is it a "feature" that multiple multis with the same signature can coexist? 00:24
sorear it is a "bug" 00:25
however, fixing it would require solving the halting problem
shortcircuit rakudo: say 4 :: 2;
p6eval rakudo cae7f9: OUTPUT«===SORRY!===␤Confused at line 22, near "say 4 :: 2"␤»
shortcircuit gah
sorear in the general case
shortcircuit rakudo: say 4 %% 2;
p6eval rakudo cae7f9: OUTPUT«Bool::True␤»
jeeger`` sorear: Ah, because of the code in the where clause. 00:26
sorear yes
shortcircuit rakudo: say {4 %% 2} ?? 7 :: 1;
p6eval rakudo cae7f9: OUTPUT«===SORRY!===␤Confused at line 22, near "say {4 %% "␤»
jeeger`` Not solveable in the general case.
shortcircuit rakudo: ({4 %% 2} ?? 7 :: 1).say;
p6eval rakudo cae7f9: OUTPUT«===SORRY!===␤Confused at line 22, near "({4 %% 2} "␤»
sorear in the absense of where clauses, it's possible to statically detect signature collisions
jeeger`` Which isn't done yet.
sorear I don't know if anyone has actually bothered to do this though
00:26 sftp left
jeeger`` not in my rakudo. 00:26
sorear pugs: multi sub foo(Int $x) {}; multi sub foo (Int $x) {} 00:27
p6eval pugs: ( no output )
sorear pugs: multi sub foo(Int $x) {}; multi sub foo (Int $x) {}; foo(5)
p6eval pugs: ( no output )
sorear alpha: multi sub foo(Int $x) {}; multi sub foo (Int $x) {}; foo(5)
p6eval alpha : OUTPUT«Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(Int $x)␤:(Int $x)␤in Main (file <unknown>, line <unknown>)␤»
sorear rakudo: multi sub foo(Int $x) {}; multi sub foo (Int $x) {}; foo(5)
p6eval rakudo cae7f9: OUTPUT«Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:(Int $x)␤:(Int $x)␤␤ in main program body at line 22:/tmp/R2UOw3vzcr␤»
shortcircuit rakudo: say 4 %% 2 ?? 7 :: 1; 00:39
p6eval rakudo cae7f9: OUTPUT«===SORRY!===␤Confused at line 22, near "say 4 %% 2"␤» 00:40
jeeger`` Hm, how do I include a file in the repl?
shortcircuit By how I read it, I would expect rakudo to output 7NL. Clearly, I'm reading (and thus writing) it wrong. What am I missing? 00:41
jeeger`` rakudo: say (4 %% 2) ?? 7 :: 1 00:42
p6eval rakudo cae7f9: OUTPUT«===SORRY!===␤Confused at line 22, near "say (4 %% "␤»
sorear std: say 4 %% 2 ?? 7 !! 1 00:45
p6eval std 625303c: OUTPUT«ok 00:01 120m␤»
sorear it's !!, not ::
std: say 4 %% 2 ?? 7 :: 1
p6eval std 625303c: OUTPUT«===SORRY!===␤Please use !! rather than :: at /tmp/pj26cyoCwI line 1:␤------> say 4 %% 2 ?? 7 :⏏: 1␤ expecting any of:␤ coloncircumfix␤ signature␤Parse failed␤FAILED 00:01 120m␤»
sorear rakudo: say 4 %% 2 ?? 7 !! 1
p6eval rakudo cae7f9: OUTPUT«7␤»
shortcircuit hm
k. Thanks. 00:46
00:54 hercynium left 00:56 khisanth_ joined, Khisanth left 01:00 mtk left 01:02 jeeger`` left, khisanth_ is now known as Khisanth 01:08 lopnor is now known as lopaway, QinGW joined 01:10 lopaway is now known as lopnor
shortcircuit "my $val = 1; {++$val} until ($val > 10);" works in Perl 5, but not in Perl 6. (P6 hits an infinite loop.) 01:13
Is this an intentional change of the semantics of P6?
*infinite
shortcircuit misreads his own lines. Heh.
sorear Do you mean, "an intentional change of the semantics of Perl"? 01:15
I would argue it as a syntactic change 01:16
P6 interprets {++$val} as meaning sub () { ++$val; } in many cases
I don't know offhand if this is supposed to be one of them
shortcircuit sorear: What I meant isn't very close to what I said, the more I read it. 01:17
Hm. I wonder if {}.until works.
shortcircuit checks
er. Probably not. 01:18
sorear I've never heard of until as a method
shortcircuit Yeah, I misrembered a for loop I'm using. 01:19
shortcircuit grumbles.
Tomorrow is my first day of vacation...and I'm naturally now coming down with a cold.
gfldex even if it's an anonymous sub, it should work as expected 01:20
<-- wrong 01:21
:=
:)
rakudo: my $a = 1; repeat {say $a++} until $a > 10 ;
p6eval rakudo cae7f9: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
gfldex std: my $a = 1; {say $a++} until $a > 10 ;
p6eval std 625303c: OUTPUT«ok 00:01 121m␤»
sorear gfldex: evaluating an anoymous sub does nothing 01:22
sorear mutters something about eta-convertion
gfldex so we get a nothing that is kinda true and hand it over to until that is not complaining about that truish nothing
01:22 felliott left
shortcircuit Can't help that Codepad won't run Perl6, but here's the code I was playing around with. (Borrowed is_prime from RC.) codepad.org/Su8ikIm8 01:23
01:24 colomon joined 01:29 felliott joined 01:34 lopnor is now known as lopaway
shortcircuit rosettacode.org/wiki/Lucas-Lehmer_test#Perl_6 01:40
Does Rakudo handle arbitrary-precision int yet?
shortcircuit notices his script is consuming about 900M of RAM. 01:43
shortcircuit thinks he needs to go to sleep, and maybe think about more of these things in the day time. 01:44
colomon nope 01:47
sorear pugs: 2**70 01:49
p6eval pugs: ( no output )
sorear pugs: say 2**70
p6eval pugs: OUTPUT«1180591620717411303424␤»
sorear pugs: say 10**20
p6eval pugs: OUTPUT«100000000000000000000␤»
sorear looks like pugs does though
you should test on that, shortcircuit
if you can work around the *other* places pugs has fallen behind 01:50
plobsing_ it could. parrot has a bigint implementation. I suspect the devs have more pressing issues though.
sorear parrot might have a bigint implementation 01:51
colomon when I asked, I got the impression that parrot's bigint implementation was bitrotted. 01:52
sorear Parrot doesn't actually bundle libgmp, so we can't rely on it being there
and the conditional availability of Unicode support is quite enough pair
pain
colomon I also think there is some fear on the Rakudo devs part that adding bigints will make Rakudo run even slower. 01:55
At very least, pmichaud has NOT encouraged me to try to add bigints, though I have asked him about it several times in the last year. 01:56
sorear the benchmarking I've done suggests that currently PCC swamps everything else in long-running programs
I doubt adding bigints will have much proportional effect, if they're implemented sanely
oh. 01:57
colomon PCC? 01:58
plobsing_ parrot calling conventions. a old and well known bottleneck
colomon ah.
02:00 ggoebel left
colomon sorear: what's your idea of implemented sanely? 02:00
(in this context?)
02:01 felliott_ joined 02:02 felliott left, felliott_ is now known as felliott 02:06 lopaway is now known as lopnor
sorear colomon: "not insanely" :) I think the biggest thing is to use a tagged big/small representation and keep the fast path entirely within Parrot 02:07
also we should find a small ANSI C public domain bigint library and bundle it, so that Parrot's API stays consistent 02:08
allbery_b funny, they'e discussing that in #ghc too 02:09
sorear well #ghc is pretty constrained
allbery_b someone pointed to *BSD libmp but that's pretty much dead and known to be buggy. and points to *BSD libcrypto
sorear the Haskell Report has required bigints since forever
allbery_b not at the moment, they've been isolating the bignum stuff specifically so they can remove the dependency on gmp 02:10
02:11 Chillance left
sorear if there isn't a <4000 line C89 public domain bigint library already, I'm 1) very suprised 2) offering to implement it 02:11
allbery_b there probably is, but the next thing people ask for is bigfloats :)
sorear the questions is how fancy you need to be
I for one am happy with O(n^2) multiplication generally 02:12
sorear finds decimal FP revolting, re. bigfloats 02:17
02:17 kid51 joined, mtk joined
allbery_b svn.FreeBSD.org/viewvc/base/release...iew=markup fwiw (but it's a front end for openssl, which is probably a worse idea than gmp :) 02:18
sorear better now than back when the US regulated OSS crypto exports. 02:19
allbery_b en.wikipedia.org/wiki/Arbitrary-pre...#Libraries 02:21
02:24 colomon_ joined, colomon left, colomon_ is now known as colomon
allbery_b amusing idea: go has a "big" library implementing arbitrary precision Int and Rat types, all native code. looks easily treanslateable 02:26
golang.org/src/pkg/big/int.go 02:27
(er. that's ambiguous. all "go" code, not asselmbler or linkage to platform libs) 02:28
colomon wow, lots of packages to choose from 02:45
02:47 jaldhar joined, industry__ joined
colomon MPI? 02:48
02:50 C0keNC0de joined 02:52 gimix joined 02:54 felliott left
sorear Message Passing Infrastructure 02:55
it's one of the standards for writing code to run on clusters
colomon no, spinning-yarns.org/michael/mpi/#what 02:57
that was, "Maybe MPI is a good fit for what we were looking for."
all C, Integer only
LGPL
03:01 shi joined 03:04 colomon left
kid51 Has pmichaud been blogging anywhere since the demise of use.perl.org? 03:05
03:09 colomon joined 03:24 uasi joined 03:26 kid51 left 03:33 shi left 03:37 lumn joined 03:51 lopnor is now known as lopaway, lumn left
shortcircuit How difficult is is to override an existing type entirely? Could Int be contextually overridden to use a module that uses NativeCall to tie into libgmp? 03:56
That has the nice tradeoff of native precision speed by default, and arbitrary precision where wanted. 03:57
03:59 industry__ left
shortcircuit (Obviously, if a native type can be overridden, then it could be implemented using whatever library backend is desired.) 04:00
colomon seems like overriding Int would be dicey, it's pretty fundamental. 04:02
I was pondering just making a BigInt module for the moment. Not the way things should be in the long run, but at least making arbitrary precision integers available in the short run. 04:03
04:06 colomon_ joined, colomon left, colomon_ is now known as colomon 04:07 industry__ joined, satyavvd joined 04:11 envi joined 04:21 plobsing_ left 04:25 lopaway is now known as lopnor, industry__ left
dalek ecza/cilbackend: 99606de | sorear++ | lib/CLRBackend.cs:
Add nam->cpsop framework
04:27
ecza/cilbackend: 86f0cf4 | sorear++ | lib/CLRBackend.cs:
Add prog, ann, basic context operators
ecza/cilbackend: 634d5fb | sorear++ | lib/CLRBackend.cs:
Implement most of scopedlex/corelex
04:30 masak joined
masak hi there, zebras. 04:30
phenny masak: 20 Dec 22:23Z <sorear> tell masak lue++ just noticed that 'token category:id' doesn't work in Rakudo; it needs to be 'token category:sym<id>'. Is this a new bug?
masak: 20 Dec 22:23Z <sorear> tell masak c.f. irclog.perlgeek.de/perl6/2010-12-20#i_3107596
sorear hi, masak.
masak hi.
sorear: it's been that way for as long as I can remember. I don't think anyone's reported it.
I'm going to turn to the backlog eventually, but I thought I'd get Advent day 21 out the door first. 04:31
post's away: perl6advent.wordpress.com/2010/12/2...nd-beyond/ 04:36
04:42 kdaiba joined
shortcircuit likes his prime-finding script: pastebin.com/e1WykAJ8 04:42
This is scary. It's been years since I found a programming language fun. 04:43
04:44 C0keNC0de left
shortcircuit Maybe tomorrow I'll figure out how to efficiently create a @sums sequence that contains the sums of the @primes up to the point in the sequence. Tonight, sleep. 04:45
masak sleep well, shortcircuit. dream of the fun in programming. :) 04:46
diakopter it's all fun and games until someone gets hurt 04:47
and after that, it's all fun and games until someone gets injured 04:48
and after that, it's all fun and games until someone gets killed
04:48 orafu left, orafu joined
masak I vote for avoiding the latter two. 04:49
another contestant just signed up. which brings the total number up to 10. 04:51
hm; the .Bool method on the Bool class looks like this: method Bool { self ?? True !! False } 04:54
I'm thinking of spectesting a patch that makes it look thusly instead: method Bool { self }
if that works, it'd be more subclassing-friendly. 04:55
TimToady I think that breaks the circularity saw
the assumption being that ?? is defined as a lower level primitive somehow
masak sorry, which one breaks the circularity saw; the current one, or my proposed change? 04:56
Rakudo implements Bool as a class; I think it should really be an enumeration type. 04:57
05:02 ShaneC left 05:06 colomon_ joined, colomon left, colomon_ is now known as colomon
allbery_b (it's all fun and games until someone loses an "i"?) 05:09
masak sounds like it would get far less complex without the "i" :)
sorear: returning to your phennytell; I'd consider that a TODO bug, and it might be worth to have it in RT. 05:25
ss/TODO bug/TODO ticket/ 05:26
05:32 redicaps joined 05:36 lopnor is now known as lopaway
masak twitter.com/briandfoy_perl/status/1...3846980609 -- me too! belated felicitations, Perl! 05:41
breakfast & 05:43
05:43 masak left 05:48 satyavvd left
TimToady added idiomatic version and notes to rosettacode.org/wiki/Text_processing/2#Perl_6 05:51
sorear %hash.pairs ? I thought hashes automatically turned into pair lists when treated by list operations 05:55
TimToady for clarity, as noted
05:55 lopaway is now known as lopnor
sorear oh. 05:56
06:07 colomon_ joined, colomon left, colomon_ is now known as colomon
TimToady rakudo: my $x = Int; say $x(3.14159625) 06:09
p6eval rakudo cae7f9: OUTPUT«invoke() not implemented in class 'Integer'␤ in main program body at line 22:/tmp/O4hlE8ESJy␤»
TimToady rakudo: my $x = Int; say 3.14159625.$x 06:10
p6eval rakudo cae7f9: OUTPUT«invoke() not implemented in class 'Integer'␤ in main program body at line 22:/tmp/9i5u_w1T2y␤»
sorear Trolling for bugs? 06:11
TimToady having a discussion with quietfanatic++ and showsing some thing :) 06:12
s/ws/w/
s/ng/ngs/
that's one very misplaced s
06:21 nymacro joined 06:26 kaare joined, kaare is now known as Guest90242 06:34 agentzh joined 07:04 gimix left, gimix joined 07:07 kcwu left, colomon_ joined, colomon left, colomon_ is now known as colomon 07:23 adu joined 07:37 Axius joined 07:42 justatheory left
dalek ecza/cilbackend: 172eec1 | sorear++ | lib/CLRBackend.cs:
And now letn
08:00
ecza/cilbackend: 4bd55ef | sorear++ | lib/CLRBackend.cs:
Add subcall/methodcall (but no named params yet)
ecza/cilbackend: 7b1a299 | sorear++ | / (2 files):
Add capability to resolve class references
ecza/cilbackend: 4c5e093 | sorear++ | lib/CLRBackend.cs:
Add Sink handling w/ DCE
ecza/cilbackend: 52eb58c | sorear++ | lib/CLRBackend.cs:
Implement newboundvar
08:06 wamba joined 08:07 wamba left, colomon_ joined, colomon left, colomon_ is now known as colomon 08:34 zby_home_ joined 08:39 cookys joined 08:48 jhuni left 08:53 masak joined 08:54 kensanata joined
masak std: class A is A {} 08:54
p6eval std 625303c: OUTPUT«ok 00:01 118m␤»
masak rakudo: class A is A {}; say A.new 08:55
p6eval rakudo cae7f9: OUTPUT«===SORRY!===␤No applicable candidates found to dispatch to for 'trait_mod:<is>'. Available candidates are:␤:(Mu $child, Role $r)␤:(Routine $r, Any :default($default)!)␤:(Code $block, Any $arg?, Any :export($export)!)␤:(Mu $child, Mu $parent)␤:(Mu $type where ({ ... }), Any
..:rw($rw)…
masak LTA
masak submits rakudobug
sorear it's being parsed as a bareword trait
niecza: class A is A { }
p6eval niecza 406e042: OUTPUT«Deep recursion on subroutine "Metamodel::Class::close" at /home/p6eval/niecza/src/Metamodel.pm line 314.␤Out of memory!␤»
masak submits nieczabug 08:56
masak high-fives himself
the world is so full of bugs, ripe for the taking! 08:57
sorear high-fives masak too 08:58
masak rakudo: class A { ... }; class B is A {}; class A is B {}; say "alive"; say A.new
p6eval rakudo cae7f9: OUTPUT«===SORRY!===␤Parent isn't a Class.␤»
masak submits LTA rakudobug 08:59
masak wonders idly what the parent is
rakudo: class A { ... }; say A.WHAT; say A.PARROT
p6eval rakudo cae7f9: OUTPUT«Failure()␤Failure␤»
masak ah.
rakudo: class A { ... }; say A; say A.Str 09:01
p6eval rakudo cae7f9: OUTPUT«Can not find sub A␤ in main program body at line 1␤»
sorear masak: heh did you notice the end of the error 09:04
masak in niecza?
yes.
09:08 colomon_ joined, colomon left, colomon_ is now known as colomon
masak rakudo: class A { ... }; class B is A {} 09:08
p6eval rakudo cae7f9: OUTPUT«===SORRY!===␤Null PMC access in can()␤»
masak huh.
that's the first causality-defying Null PMC access. :)
rakudo: class A { ... }; class B is A {}; class A {} 09:09
p6eval rakudo cae7f9: OUTPUT«===SORRY!===␤Parent isn't a Class.␤»
diakopter masak: I think it's a say()/repl discrepancy 09:14
rakudo: class A { ... }; class B is A {}; 1;
p6eval rakudo cae7f9: OUTPUT«===SORRY!===␤Null PMC access in can()␤»
diakopter hm
masak theory disproved.
diakopter indeed
those are large watermelons 09:15
masak :)
diakopter wait, this is masak-sleep-time 09:16
09:16 kcwu joined
masak it is? 09:20
10:20 am here.
diakopter :) 09:21
oh! I should sleep. 09:22
masak heh :)
colomon: for a good use of the conflation of 1-elem lists and items, see the last line of the second solution at rosettacode.org/wiki/Text_processing/2#Perl_6 09:23
09:26 lopnor is now known as lopaway 09:27 lopaway is now known as lopnor
dalek ecza/cilbackend: 23248b7 | sorear++ | lib/CLRBackend.cs:
Add ternary
09:29
ecza/cilbackend: 4521216 | sorear++ | lib/CLRBackend.cs:
Add constructor calls and many Builtins.* wrappers
ecza/cilbackend: 6251ac8 | sorear++ | lib/CLRBackend.cs:
Add low-level whileloop operator
masak ooh, a ternary! nice! 09:30
masak beta-tests it
oh, this is in a branch, isn't it? 09:31
ah, and master already had the ternary.
sorear yes and yes 09:32
masak sorear++ # no bugs in nested ternaries 09:33
09:34 neroxx joined
sorear bugs? in nested ternaries? perish the tought 09:34
masak you'd be surprised...
niecza: say (say 42) 09:36
p6eval niecza 406e042: OUTPUT«42␤␤»
masak submits nieczabug
second output should be 'Bool::True'
sorear you can blame au for that not crashing
masak according to S32::IO::438
au++
sorear: I'm happy to see you shake up the Rakudo hegemony a bit. keep up the good work! 09:43
cotto @seen jnthn 09:44
sorear looks up hegemony 09:45
cotto seen jnthn 09:46
aloha jnthn was last seen in #perl6 1 days 10 hours ago saying "nomdo :D".
masak ah, you native speakers are so cute.
09:51 Trashlord left
cotto Does anyone here have some familiarity with jnthn's 6model work? 09:55
sorear raises hand halfway 09:56
cotto sorear, do you know about how stable its interface is? 09:57
masak I'm curious what interesting project idea would prompt such a question. 10:00
sorear cotto: I think that depends a lot on the branch
beyond that, I can't really sayt
cotto masak, given the uncertainty of the timeline, I'm looking for ways that the Parrot folks can productively hack on Lorito without a complete (and official) MOP implementation. 10:01
masak "complete (and official)" # :) 10:02
cotto what I'm currently thinking is that some aspects could be hard-coded if the interface is known
masak aye.
only jnthn can give a definitive answer, but it seems to me as an interested observer that some things are quite stable already. 10:03
to the extent that any guarantees at all can be given, I think you'd be fairly safe to look at what is there now, and copy it.
I think the .Net stuff is newer, though.
cotto Right. 10:04
szabgab I know I am just disturbing you guys but FOSDEM is getting closer and I'd like to know if there is going to be any Perl 6 presence there?
10:05 QinGW left
masak szabgab: I don't think I'll be able to make it. too many unknowns with new $job, and too many other planned confs in spring. :/ 10:06
10:07 kdaiba left, dakkar joined 10:08 colomon_ joined, colomon left, colomon_ is now known as colomon 10:09 agentzh left 10:14 giancarlotaroni joined 10:15 giancarlotaroni left
szabgab so if not masak, is there going to be anyone at FOSDEM giving perl related talk(s)? 10:16
sorear When & where? 10:18
masak szabgab: mention that travel and accomodation is sponsored, too :) 10:19
dalek ecza/cilbackend: b5dd3ad | sorear++ | lib/CLRBackend.cs:
Add arithmetic & comparison ops
10:20
ecza/cilbackend: 41bcbca | sorear++ | lib/CLRBackend.cs:
Add newscalar, newrwscalar, setslot
ecza/cilbackend: a292bbb | sorear++ | lib/CLRBackend.cs:
Add double literals, 15 new builtin bindings
10:20 icwiener joined
szabgab sorear: February, Brussels 10:21
we have some limited funs for travel and accommodation
sorear the new backend has gotten through Mu; I'll call it a night 10:22
10:22 redicaps left
sorear out 10:23
10:24 masak` joined 10:26 lestaway joined, am0c left 10:27 fith_ joined, Juerd_ joined 10:28 TimToady_ joined 10:29 roen joined 10:32 risou_ joined, nero2x joined, neroxx left, masak left, risou left, lestrrat left, p6eval left, tylerni7 left, Juerd left, fith left, TimToady left, flatwhatson left, lestaway is now known as lestrrat, Juerd_ is now known as Juerd 10:33 tylerni7 joined, flatwhatson joined, tylerni7 left, tylerni7 joined, p6eval joined, ChanServ sets mode: +v p6eval
masak` it hurts when the net splits. 10:34
cotto be strong, masak prime 10:41
10:42 Axius left
masak` oh, I wish it was a prime. it's a sodding backtick. :( 10:43
10:43 am0c joined
masak` lunch & 10:44
cotto wonders about masak's factors 10:45
10:48 glow joined
moritz_ good morning zebras 10:54
github.com/moritz/perlgeek.de/blob...n-2010.txt # draft of a new blog post, feedback welcome 10:55
I wrote it offline, so lots of links are missing
cotto "maturing" would be better than "riping" 10:57
moritz_ fixes 10:58
cotto I love the lazy Fibonacci list example. 10:59
It demonstrates several features quite succinctly. 11:00
Instead of "This specification", I'd say "This part of the specification", though that might be too nit-picky. 11:01
moritz_ "this part" is better 11:02
cotto When I saw "my @sum = @l1 Z+ @l2;", the font made me wonder what @11 and @12 were.
moritz_ I'll spell out @list1 and @list2 11:03
cotto wfm
moritz_ pushed with some fixes 11:06
cotto++
cotto If you have links to production uses of Rakudo, make sure to include those
that's pretty cool
looks good 11:08
11:08 colomon_ joined, colomon left, colomon_ is now known as colomon
flussence moritz_: typo, "<dt>roat</dt>" on line 134 11:09
moritz_ fixes 11:10
11:10 Vlavv joined
moritz_ if you find some omissions of things you deem important, please speak up too 11:10
Vlavv Hi
moritz_ hi Vlavv 11:11
11:12 ch3ck3r left 11:21 ggoebel joined 11:23 uasi_ joined 11:25 fhelmberger joined, uasi left 11:26 adu left 11:28 molaf joined 11:29 nero__ joined, mikehh joined 11:30 uasi_ left, uasi joined 11:31 roen_ joined 11:32 nero2x left
uasi moritz_: JSON::Tiny::from-json('["\/"]') returns ["Any()"] 11:34
moritz_: I fixed it and sent a pull request. can you please pull it?
11:34 roen left
moritz_ reviews 11:35
11:36 hugme joined, ChanServ sets mode: +v hugme
moritz_ hugme: add uasi to json 11:36
hugme hugs uasi. Welcome to json!
moritz_ uasi: I'll merge the pull request. In future you're welcome to commit directly to json :-)
uasi moritz_: thanks for hugging :) 11:37
moritz_ uasi: :-) hugging is only the secondary function of hugme, but it sure makes for a cute name 11:38
moritz_ still hasn't thought about masak's problem 4 properly 11:39
it feels like there should be a very simple approach, but I get bogged down in details every time I approach it 11:40
fwiw I'll have limited internet access until Dec 26th. I'll backlog if highlighted, and you all know my email address I think... :-) 11:46
moritz_ slowly fades out 11:48
11:50 nymacro left 11:59 roen_ left 12:01 roen joined, WonTu joined 12:02 WonTu left, roen left 12:05 roen joined 12:08 colomon_ joined, colomon left, colomon_ is now known as colomon 12:11 Trashlord joined
colomon moritz_: you've got "several repository", should be "several repositories". 12:13
12:17 holli joined
holli I am trying to install rakudo* on WinXP using a Strawberry Perl 5.12 too bootstrap, but i get an error: snipt.org/tHI/ 12:20
Any suggestions? 12:21
12:22 jimmy1980 joined 12:42 smash joined
smash hello everyone 12:42
colomon smash: o/ 12:48
holli: not sure if our Windows experts are around this morning.
holli: actually, I believe that's a parrot build error. Might be worth your while to check #parrot. 12:52
12:56 hanekomu joined, masak` is now known as masak 13:00 ch3ck joined
masak moritz_++ # github.com/moritz/perlgeek.de/blob...n-2010.txt 13:01
colomon Any hints for p6-style testing of .pl files? 13:05
masak colomon: multi MAIN() { ... }; multi MAIN("test") { ... } 13:06
learned that trick from moritz_++ :)
colomon and "use Test;" ?
hmmm
masak yes.
colomon masak++ moritz_++
13:09 colomon_ joined, colomon left, colomon_ is now known as colomon, gimix left
uasi thinks that implementing Hash.hash was a mistake 13:14
holli colomon: asked in #parrot 13:15
colomon holli: any luck?
uasi: why?
holli just a second ago
13:16 daxim joined 13:17 soroush_ joined, soroush_ left, soroush left
uasi colomon: it's like implementing Int.hash or something 13:18
er, hard to say
uasi is consulting JP-EN dictionary 13:19
13:20 MayDaniel joined
masak Hash.hash seems an entirely sensible no-op to me. 13:20
a bit like List.list
13:21 felliott joined
colomon Right. 13:21
tadzik hello kangaroos! 13:26
masak ooh, improvisation :P 13:27
tadzik :)
colomon greetings, koala. 13:29
tadzik where is the integer token defined in Grammar.pm? Is it inherited from HLL::Grammar or something? 13:31
colomon something like that, I think 13:32
tadzik or where are we distinguishing the octal, binary, hex etc?
13:32 wamba joined
uasi at least, $hash.hash in list context should be coerced to pairlist, like $pairlist.hash is 13:38
masak uasi: oh, you're right. forget what I said about a no-op :) 13:39
so it's essentially like .pairs? :)
uasi masak: yes 13:40
colomon what does "list context" mean here? (I'm very confused.) 13:47
uasi (or $pairlist.hash in list context should not be flattend like $hash.hash is not :)
mikehh rakudo (cae7f95) - builds on parrot (2_10_1-917-g1e0c652) - make test, make spectest_smolder[(#1789), roast (f94554a)] PASS - Ubuntu 10.10 amd64 (g++-4.5 with --optimize) 13:49
13:52 shi joined
uasi colomon: the context that comma-separated values are put into 13:54
rakudo: ((foo => 'bar').hash, 'baz')[0].WHAT.say
p6eval rakudo cae7f9: OUTPUT«Pair()␤»
uasi rakudo: ({foo => 'bar'}.hash, 'baz')[0].WHAT.say 13:55
p6eval rakudo cae7f9: OUTPUT«Hash()␤»
mikehh makerealclean does not seem to remove files -> tempfile_filehandles_io.6755.291, git status gives me 10 of them - indicated file is the latest 14:01
make realclean
colomon rakudo: my @a = 1..10; say @a[2, 4, 6] 14:08
p6eval rakudo cae7f9: OUTPUT«357␤»
14:09 colomon_ joined, colomon left, colomon_ is now known as colomon, mikehh left 14:11 lopnor is now known as lopaway 14:15 roen left
smash .pm groups names suggestions for next rakudo release are welcome 14:17
colomon oooo, this is release week, isn't it? 14:18
14:19 roen joined
masak wow, already? 14:19
I won't make it to #phasers tonight.
colomon Today should be Parrot release day, so yup.
Me neither, will probably be on the road then.
14:21 jimmy1980 left
smash release in two days, yes 14:24
masak rakudo: say "non-existent-file-tests".IO.f
p6eval rakudo cae7f9: OUTPUT«Bool()␤»
masak rakudo: say "non-existent-file-tests".IO ~~ :f
p6eval rakudo cae7f9: OUTPUT«Bool::False␤»
masak rakudo: say "non-existent-file-tests".IO ~~ :!f 14:25
p6eval rakudo cae7f9: OUTPUT«Bool::True␤»
masak this last evaluation is the *only* test that fails when I replace the Bool.Bool method to be just { self } rather than { self ?? True !! False }
I haven't really explained to myself yet why it fails. 14:26
but it feels like a relatively minor thing, probably indicative of something else being wrong somewhere.
14:28 mikehh joined
smash best list to send release reminder, perl6-compiler ? 14:34
masak we usually don't :)
but yes, that would be the one. 14:35
since practically all the commit activity has its basis on #perl6, there's not much need generally to remind p6c about the release.
smash just to remind everyone to update news and changelog etc. 14:36
masak I like the idea. go right ahead. 14:37
14:39 frogerina joined
masak ok, so it all comes down to this: 14:40
rakudo: say { foo => Bool } ~~ :!foo 14:41
p6eval rakudo cae7f9: OUTPUT«Bool::False␤»
masak I argue that this should print Bool::True.
who's with me? :)
14:42 plainhao joined, MayDaniel left 14:46 dju left
frogerina I have to say, Perl > PHP (this was always true, not just in the era of Perl6). www.myefact.com/ 14:48
colomon awesome: having tests for my script in my script. 14:50
not so awesome: having my script be more than 50% tests.
14:51 uasi_ joined
masak frogerina: mpt sure I see the relevance of your URL. are you sure you're not a spammer? 14:51
flussence the site in that url is PHP-based, too :) 14:52
maybe he's saying if the spammers learned Perl, they'd be able to get actual jobs... 14:53
14:54 Guest90242 left, uasi left
colomon woah. latest of those tests just found a bug in a core algorithm from $work that's survived 11 years of use in the field. 14:54
flussence wow.
.oO( how long does a bug have to go unnoticed until it becomes a feature? )
14:56
frogerina has an identity crisis 14:57
14:58 plobsing joined
colomon flussence: I can't imagine numeric code saying, "Yes, I have an answer." and then returning NaN to be a feature. 15:00
flussence: but it's very unlikely in practice, I guess.
afk
flussence that's a valid answer for a "parse string into number" function, but I get your point :) 15:02
masak frogerina: didn't mean to throw you into an identity crisis. :) but I am curious what we should be looking for at your provided URL. 15:04
15:09 icwiener_ joined, colomon_ joined, colomon left, colomon_ is now known as colomon 15:12 icwiener left, plobsing left 15:13 plobsing joined 15:23 frogerina left 15:26 alester joined
colomon masak++ # for making me examine the old algorithms 15:30
afk # around town then driving home, be back post-phasers
15:30 colomon left
masak what? what did I do? :) 15:31
alester If anyone has brilliant ideas on figuring out why my apache keeps tanking, I'd love to hear 'em. :-( 15:32
15:32 hanekomu left
flussence bad RAM? 15:32
15:32 risou_ left, sftp joined
PerlJam alester: what flussence said was my first reaction as well 15:33
flussence no, that can't be it... other stuff would be going wrong too
smash alester: error_log ? strace ?
alester I believe I'm getting (effectively) DOSed by comment spammers
but can't but my finger on it.
15:33 _kaare joined
alester maybe I just need a fatter linode 15:34
15:34 masak left
smash alester: iptables is you friend :) 15:35
alester smash: Go on.
smash: How specifically do you mean to use iptables. 15:36
15:37 risou joined
flussence what I'd do would be along the lines of: tcp syn & (hashlimit > 5packet/sec, netmask = /30) -> drop 15:38
lemme look it up...
alester flussence: Please dumb it down a little. I don't know what that means that you're saying. 15:39
What is the goal, in English?
To drop packets from who? 15:40
15:40 nero__ left
flussence basically, limit each /30 of IPs to 5 connections per second and ignore over that 15:40
smash alester: look at comments spammer source IPS, block some of those networks for starters.. nothing fancy 15:41
flussence which in command-line terms would be...
iptables -A INPUT -p tcp --syn -m hashlimit --haslimit-above 5/sec --hashlimit-mode srcip --hashlimit-name connect --hashlimit-srcmask 30 -j DROP
alester OK, I DO have a big file of bad IPs that I've harvested from logwatch
so you're saying block the comment spammers
But the comment spammers are only, maybe, 20/day
I can't imagine they're killing the site that much. 15:42
TimToady_ planetsix can try to make many connections quickly though
flussence oh, I got the wrong idea of "DOS" there...
20 a day shouldn't be crashing apache though, I imagine there's another problem elsewhere
smash alester: check apache config, number of spawns, clients p/ spawn, etc. 15:43
alester smash: And check what?
These high-level ideas are fine, but I don't know what specifically to check for.
smash alester: first, look at apache logs.. how many hits are you getting
on your apache, like 1000000 hits/day ?
alester: MaxKeepAliveRequests, KeepAliveTimeout, StartServers, ServerLimit, MaxClients, MaxRequestsPerChild usually good places to start 15:45
but first make sure you're problem is _actually_ number of requests on apache 15:46
flussence (and if this is a segfault... those usually show up in the kernel log)
alester smash: my point is, you say to look at MaxKeepAliveRequests, but how do I know what that should be set at?
Should it be 3? 300?
How do I know. 15:47
smash it should be a high value, 300, 400
there's no golden rule here, sorry..
if you dont' have many images, or static content, maybe a lower value like 100 is fine 15:48
flussence StartServers: 5-10, ServerLimit: should be low enough that apache can't eat all the RAM, MaxClients: ~500 or so is enough, MaxRequestsPerChild is really just a safety net for mem leaks, but set it to something like 10k. 15:49
alester And plus the backend is MySQL which is no friend to me. 15:50
smash activate mysql slow query log is usually a good place to start at that front 15:51
alester well, hell, my load avg is currently 49.50
but I can't even tell why
there are HTTPD in there, but there's also mysql
"in there" = in top 15:52
smash how's memory ? and swap ?
alester Smash: I don't know.
I don't know how to answer "how's memory" 15:53
You ask me these questions like I know what you're talking about. :-)
smash alester: sorry, my bad.. i meant on your top press M to see processes memory consume
alester right now, I'm glad to get a prompt 15:54
flussence (worst loadavg I've ever heard of was something like 200...)
smash alester: set a cron job to take a snapshot of process list every minute is also a good idea
alester OK, so I hit M
now what 15:55
smash which process is on top ?
alester well it was spamd
flussence (M = sort by mem)
alester but I killed it
because it was huge
smash how's httpds and mysqld memory usage ? 15:56
alester 154m for mysqld
15:56 MayDaniel joined
smash alester: to you have slow query set for mysql ? 15:58
alester I doubt it
I don't do mysql.
Pg is my baby
smash do you need mysql running ? 15:59
alester yes
it's the backend to rakudo.org 16:00
My gut tells me that spamd is my bummer.
mikehh rakudo (cae7f95) - builds on parrot (2_10_1-918-gee0b73f) - make test, make spectest_smolder[(#1798), roast (f94554a)] PASS - Ubuntu 10.10 i386 (g++-4.5 with --optimize)
alester three spamd processes using 26% 16:01
of RAM
flussence how much RAM's it got in total? 16:02
smash alester: sorry, never used spamd
alester pastebin.com/uxu1JAcY
flussence hm... 16:03
those "D" in the column of "S" means something's doing disk IO... and it all seems to be on the email/blog comment processes... 16:06
I wonder if that's just getting out of swap after some of the memory was freed up, or what. 16:07
16:07 glow left
smash alester: are you getting mail spammed ? 16:10
alester yes
And right now I can't even get a prompt
I'm bouncing my node
I think I'll just run w/o mail
and see if we still spike
smash stop spamd, or iptables -I INPUT --dport 25 -j DROP 16:11
alester My RAM is 512B
smash: Or stop postfix. :-)
16:11 jeeger`` joined
smash isn't spamd checking blacks lists ? 16:11
alester Could be 16:12
what's your line of thinking?
smash well, if you are getting spammed probably those sources are already blacklisted on spamhaus and such 16:13
alester yes, and
You're saying that those spammers shouldn't be getting through?
smash if it's trahing your server yes
*trashing
alester I don't know that it is.
16:14 kanishka joined
smash well, stop postfix for a couple of hours and see how it goes 16:14
alester that's what I'm doin' right now
or just don't send mail thru spamd and take the spam hit
16:14 kanishka left 16:15 kensanata left
flussence website's alive again, anyway. 16:15
alester yes, rebooting is a magic thing. :-)
16:15 kensanata joined
flussence ...and now it isn't! 16:16
alester Yes, I just killed it.
because I'm immediately up to load average of 14
Now I'm thinking it's MT
16:21 mtk0 joined
flussence "tail -n1000 /var/log/apache/access_log | grep -c POST" - the number out of this *should* be low, if not, it's probably a bot trying to spampost 16:21
where "low" is ~100 or less
16:22 jeeger`` is now known as jeeger
alester Of course all my logs are spit out per server 16:22
but I know what you mean
16:22 mtk left 16:23 mtk0 left, mtk joined 16:25 WonTu joined, WonTu left
flussence I'm gonna agree that it's MT at fault; rakudo.org/robots.txt loads instantly while the main page doesn't at all. 16:25
alester which main page? 16:26
flussence s/doesn.*/really slowly
alester rakudo.org?
dalek ok: ff0067c | duff++ | src/roles.pod:
fixed reference to grammars jeeger++
flussence yeah
alester rakudo.org is Drupal
flussence oh
flussence facepalm
but yeah, it's got no problem loading static content... 16:27
16:28 foolman joined 16:29 justatheory joined
alester at least it's prob'ly not ram 16:30
'cause I'm not swapping
(That IS a valid conclusion, right?) 16:31
flussence guess so.
alester And I define "not swapping" as "top says 84k of swap used"
foolman NEXT
flussence is that perlbuzz's MT running on that server? 16:32
alester yes
flussence huh... that loads instantly.
alester it's static content
flussence I'm gonna blame PHP.
alester well
flussence just cause.
alester it could easily be mt-*.cgi
16:32 risou_ joined 16:33 risou left 16:40 jaldhar left
alester Oh, this is interesting 16:43
huggy:/home/amy/Maildir/.-spam/cur # ls | wc -l
has not yet returned
flussence I'm gonna bet it's something insane like 1.5 million 16:44
alester I'll put it at 200,000
tra la la la la , still running 16:45
flussence (might be faster to do ls -U ... by default it reads the entire list then sorts it.) 16:48
16:48 spq1 joined
allbery_b ls -f (and on linux unalias ls first and unset $LS_OPTIONS, because it defaults to stat()ing every single file) 16:50
alester or maybe just du c
du -c
flussence didn't know that one. -f must mean "fast". :) 16:51
allbery_b essentially yes
on linux they turn on colorization by default, which means ls gathers all the info needed for all its color fun, which takes forever in big directories
alester Thanks, Russ 16:52
What's the _b?
ah, -f includes -U and -a
also adding -1 16:53
flussence allbery_b: in this case it won't bother to stat them since it checks for a tty first. just checked with strace.
alester I'm gonna have to kill 'em all anyway, I might as well rm while I'm at it. :-) 16:54
but I wanan know how bad it is.
allbery_b sorry, not Russ. (yes, there are two of us. second cousins) 16:55
and the _b is for Brandon
(I've never seen rra on here, which is probably just as well because people get confused enough as it is :) 16:57
16:58 jaldhar joined
alester Sorry, Brandon. I just figured there couln't be more than one Allbery. 17:02
17:03 cdarroch joined, cdarroch left, cdarroch joined
allbery_b last I checked there were at least 3, actually 17:03
alester In Perl? 17:05
allbery_b no
alester well, yeah, I figured there had to be parents somewhere. :-)
Only 102,000 in that folder. 17:07
17:08 roen left
flussence :( I was off by miles. 17:08
alester but still, just adding a message to that would hammer the box
17:10 glow joined 17:19 [Coke] left, [Coke] joined
alester Well, I think we're good now. 17:22
The rm-o-matic is running.
smash, flussence, allbery_b: petdance.com/random/diskio.png 17:31
I think that pretty much epxlains it all. :-) 17:32
17:33 MayDaniel left
flussence looks like it was about to go off the deep end too. 17:34
17:34 rhr left 17:35 starcoder left, hercynium joined
alester Note that that's overthe past 4 weeks 17:36
17:36 ch3ck3r joined
alester so at some point, the # of spams in Amy's folder dog-legged 17:36
17:38 rhr joined 17:40 ch3ck left 17:41 starcoder joined 17:45 foolman left 17:50 kanishka joined 17:52 abra joined, am0c^ joined 17:54 Chillance joined 17:55 kensanata left 17:58 uasi_ left, fith_ left, fith joined, kanishka left
flussence is that rm command still running? 18:03
18:04 ShaneC joined 18:17 shi left 18:19 dakkar left
flussence looks like rakudo.org is alive and well again 18:28
alester++
18:34 impious joined, risou_ left 18:45 abra left 18:47 am0c left 19:01 WonTu joined 19:02 WonTu left 19:09 glow left
[Coke] . 19:14
19:15 jeeger left 19:16 _buno_ joined
Util Shouldn't #phasers be meeting now, or is my clock out of phase? 19:21
19:23 molaf left 19:25 _buno_ left, M_o_C joined 19:26 Patterner left, Psyche^ joined 19:27 Psyche^ is now known as Patterner 19:33 Gahrian left
frettled Util: perhaps they've all been stunned. 19:39
Util heh 19:41
19:42 envi left 19:44 [Coke] left 19:46 glow joined 19:58 impious left
lue ohai o/ 20:03
disconnect! 20:10
20:12 fhelmberger left 20:15 lue left 20:16 MayDaniel joined 20:18 daxim left 20:22 lue joined
lue reconnect! [the christmas ornaments are in a closet my computer blocks.] 20:23
20:28 _buno_ joined
flussence whee, I broke rakudo 20:29
lue that's always fun :)
flussence it doesn't like it when I write "use A::B::C;" in A/B.pm :( 20:30
illegal redeclaration or somesuch
20:31 M_o_C left
moritz_ try to write the use line after the class (or module) line 20:31
dalek : 3e8e97c | moritz++ | misc/perl6advent-2010/ (2 files):
[advent] I volunteer for tormorrow; fill in some gaps
flussence no good, "use v6; class A::B; use A::B::C;" still explodes. 20:32
moritz_ :(
flussence I've got it down to just the use/class statements now, anyway
lue is there an A/B/C.pm ? [I would think so, just checking]
flussence lue: yep 20:33
PerlJam I think
lue Try B::C, maybe it works that way?
PerlJam I think: use A::B::C tries to unconditionally autovivify A, A::B, and A::B::C
flussence hm
20:33 thundergnat joined 20:34 shi joined
flussence if I put use A::B::C; and use A::B; in another file in either order, same result. 20:35
the only workaround I've found so far is to just not use package names with more than one :: in them...
20:36 shi left
thundergnat Hi perl6 people. 20:36
20:36 _buno_ left
sorear good * #perl6 20:37
PerlJam Who's got the rakudo release this month?
thundergnat Hi sorear
moritz_ PerlJam: smash++ does 20:38
20:39 shi joined
PerlJam moritz_: does he know it? :) 20:39
moritz_ PerlJam: ask him, not me
thundergnat I put together something I was thinking about submitting for an advent post, but I'm not sure it's sufficiently awesome. Anyone feel like taking a look and commenting. home.comcast.net/~thundergnat/schwartz.htm 20:40
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....gex_tablet
PerlJam thundergnat: surely it's awesome enough that it was used last year IIRC 20:41
thundergnat Was it? Didn't see that...
20:41 lidden joined
moritz_ thundergnat: my @sorted = @unsorted.sort: { *.lc }; 20:42
should be { .lc } or *.lc
but not both
20:42 abra joined, rgrau joined 20:43 tylercurtis joined, mberends joined
PerlJam thundergnat: See perl6advent.wordpress.com/2009/12/2...ig-things/ :-) 20:43
20:43 plainhao left
moritz_ thundergnat, PerlJam: it was indeed mentioned last year, but not in so much detail, and without the part on natural sorting 20:43
so I'd vote for taking it
PerlJam thundergnat: but yours is a much longer treatment of the subject. Claim one of the few remaining days and post it!
thundergnat moritz_: fixed { *.lc } 20:44
moritz_ fwiw I just stored a draft of tomorrow's advent post in wordpress
thundergnat: if you tell (or /msg) me your email address, I'll give you access to the advent blog 20:45
thundergnat I don't know anything about wordpress so I'm not to sure about how to post it.
moritz_ thundergnat: the UI is fairly intuitive
once you're in the admin menu, just click 'Posts' -> 'Add New' 20:46
PerlJam thundergnat: do you have a wordpress account?
thundergnat PerlJam: yes, but not a blog 20:47
moritz_ that's fine
lidden How would I translate this p5 regex to p6? s/^ ([^\s\-] .*)/: $1 :/x;
thundergnat moritz_: sent PM with email addr.
moritz_ thundergnat: invitation sent. Welcome to the wonderful world of Perl 6 advent :-) 20:48
std: s/^(<-\s -[-]> \N*)/: $0 :/ 20:50
p6eval std 625303c: OUTPUT«===SORRY!===␤Unrecognized regex assertion at /tmp/8ru4Ibh891 line 1:␤------> s/^(<-⏏\s -[-]> \N*)/: $0 :/␤ expecting character class element␤Parse failed␤FAILED 00:01 119m␤»
moritz_ std: s/^(<-space -[-]> \N*)/: $0 :/ 20:51
p6eval std 625303c: OUTPUT«ok 00:01 122m␤»
moritz_ lidden: see above
note that rakudo doesn't handle $0 in the substitution part correctly atm
lidden moritz_: Thanks
moritz_ you'd need $str.subst($regex, -> $/ { ": $0 :" }) as a workaround
lidden Is that why I get a lot of Any() when I try
moritz_ right 20:52
it doesn't set the match variable for the right-hand side
(and it's a nontrivial fix, which is why we haven't done it yet, even though it bites many people)
"nontrivial" is a sort of understatement. It needs more conceptual work 20:53
20:54 lichtkind joined
PerlJam "nontrivial" is always an understatement when people apply it to Perl 6. :-) 20:55
moritz_ otoh it fits fairly well to how mathematicians and physicists use it :-) 20:56
20:56 MayDaniel left
sorear $str.lines.map({ m/^^ <[ \s - ]>/ ?? ":$_:" !! $_ }) 20:56
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....gex_tablet 20:57
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ics_tablet
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....oop_tablet 21:02
tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ine_tablet
: 8450af4 | thundergnat++ | misc/perl6advent-2010/schedule:
Volunteer for 23rd
21:03
21:09 zorgnax left 21:10 youwin_ left
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....ics_tablet 21:14
lichtkind th y alias for tr is gone? 21:18
PerlJam lichtkind: aye
moritz_ std: tr///, y/// 21:19
p6eval std 625303c: OUTPUT«===SORRY!===␤Unsupported use of y///; in Perl 6 please use tr/// at /tmp/fTUOZwC4BD line 1:␤------> tr///, y⏏///␤Parse failed␤FAILED 00:01 120m␤»
lichtkind great thanks
PerlJam rakudo: y///
p6eval rakudo cae7f9: OUTPUT«===SORRY!===␤Confused at line 22, near "y///"␤»
moritz_ tr/// parsing is complicated in rakudo 21:20
because the string parsing rules eat up the terminator 21:21
so once the tr/search/ part is parsed, the second / is already used up
and replace/ doesn't parse anymore
21:23 zorgnax joined 21:25 youwin_ joined
moritz_ everybody with a wordpress account, feel free to improve my posting for tomorrow 21:28
moritz_ goes to sleep now
takadonet moritz_: good night 21:29
21:30 pumphaus joined
pumphaus hi 21:30
takadonet pumphaus: hey 21:31
pumphaus is there a way to dynamically create classes at runtime?
I'm thinking about creating Qt bindings for perl6/rakudo, and dynamically creating the Qt classes would be a requirement for that I think 21:32
I've already found P6object, but that seems to be very low level Parrot stuff 21:33
and given its name, I figured perl6 has this functionality out of the box
I just can't find any resources on that
PerlJam pumphaus: I don't think it's implemented at the Perl 6 level just yet 21:34
pumphaus oh, too bad
well, thanks anyway :) 21:35
PerlJam pumphaus: Ask jnthn for something definitive on implementation
21:35 Krunch joined
sorear pumphaus: this is what eval is for 21:38
I mean, eval is intended to be a universal stopgap solution 21:39
pumphaus sorear: thanks, will try that 21:41
sorear there is one way to create classes in standard Perl 6
without eval
if you can phrase all of your classes as base class + some parametric roles
21:43 tylercurtis left
pumphaus sorear: yea, I can do that. the eval thing doesn't work btw... the scope of the declared class seems to be limited 21:43
sorear You can't add stuff to a scope at runtime. 21:44
There is no way to create stuff at runtime with unlimited scope
21:44 mtk left
pumphaus well what I mean is 'eval 'class Dog {}'; my $dog = Dog.new();' doesn't work 21:45
sorear of course not
"Dog" is a lexical symbol
it has to be known at compile time
21:46 MayDaniel joined
sorear you could do my $dogc = eval 'class Dog {}'; my $dog = $dogc.net 21:46
pumphaus I see... 21:47
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....dex_tablet
21:48 _kaare left
pumphaus seems like things get a little more complicated now that it's not all interpreted anymore 21:49
Tene rakudo: eval 'class Dog {}'; my $dog = eval 'Dog.new()'; say $dog.WHAT;
p6eval rakudo cae7f9: OUTPUT«Dog()␤»
Tene If you delay class creation to runtime, you also need to delay class lookup until runtime.
sorear I think the second Dog needs to be GLOBAL::Dog to be portable 21:50
Tene Probably.
sorear rakudo: BEGIN { eval 'class Dog {}' }; my $dog = Dog.new; say $dog.WHAT; 21:51
p6eval rakudo cae7f9: OUTPUT«Dog()␤»
sorear you can also do that
pumphaus ah, that's more along the lines of what I need
thanks
Tene pumphaus: what do you want it for?
pumphaus Tene: creating Qt bindings 21:52
Tene Ah.
pumphaus and generating perl6 sources for all the Qt classes is just so... static
and not really nice either
dalek tpfwiki: (Herbert Breunung)++ | www.perlfoundation.org/perl6/index....dex_tablet 21:53
Tene pumphaus: Ah, nice.
pumphaus: You should be able to do it all through the metamodel instead of using eval, though.
PerlJam pumphaus: so you're going to do something like BEGIN { for <Foo Bar Baz> -> $stuff { eval 'class Qt$stuff { }' } ? 21:54
Tene Ideally, at least. I'm not sure rakudo's metamodel is sufficiently exposed right now, though.
PerlJam Tene: I'm pretty sure it's not
Tene: or at least not coherently exposed
sorear in the short term eval will be much more portable
there is basically no spec on MOPpage
Tene Yes, rather.
sorear while eval uses ordinary P6 strings 21:55
pumphaus I didn't find any resources on metamodel, so I don't really have a clue what it's all about
PerlJam: yea, I think this is what it'll bee
-e
sorear pumphaus: eval = parser + metamodel
the parser takes a statement like class Foo {} and teases it apart into operations ("create class", "install class name", etc) on the metamodel 21:56
21:56 Krunch left
Tene I'm reading The Art of the Metaobject Protocol right now. 22:02
22:07 ShaneC1 joined 22:08 M_o_C joined, M_o_C left, M_o_C joined 22:10 ShaneC left 22:11 hudnix left, dju joined, dju left, dju joined 22:14 colomon joined
takadonet colomon: welcome .... to the future 22:15
colomon no way, man, I'm Living in the Past
sorear hey colomon 22:16
colomon hello!
takadonet colomon: well take your C style loops with you then! 22:18
PerlJam C style loops? he could be further in the past: do 10 i = 1, n ... 10 continue 22:19
:-) 22:20
22:23 spq1 left, abra left 22:24 M_o_C left 22:28 starcoder left 22:30 starcoder joined
colomon I scoff at your looping constructs. All I need are ifs and gotos. 22:33
takadonet ... 22:34
22:39 zby_home_ left
takadonet rakudo: my $var ='beer'; my $ref = \$var; say $ref; 22:49
p6eval rakudo cae7f9: OUTPUT«Capture()<0xdde0138>␤»
takadonet How do I dereference $ref so I can get the value 'beer' ?
.... anyone? 22:51
sorear $ref.[0]
takadonet I know it's a stupid question
sorear \ doesn't make references anymore
takadonet well a capture then :)
sorear: thanks 22:53
good night all 22:57
22:57 takadonet left 23:02 soroush joined 23:11 thundergnat left 23:16 lopaway is now known as lopnor 23:17 lopnor is now known as lopaway 23:28 justatheory left, timbunce joined, justatheory joined, Chillance left 23:29 hercynium left 23:33 lidden left
lichtkind good night 23:34
23:36 timbunce left 23:43 icwiener_ left 23:44 MayDaniel left 23:56 ShaneC1 left, ShaneC joined