-Ofun: xrl.us/hxhk | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6 Set by apple-gunkies on 11 November 2005. |
|||
Smari | Regarding infix operators; is it not possible to define an infix for two arrays? | 00:27 | |
clkao | sure it's possible | 00:33 | |
i just did it | |||
Smari | Care to show me? Mine's not working as it should. | 00:34 | |
Probably just me being stupid, but hey.. :) | |||
clkao | our &infix:<»+«> := -> Array @a, Array @b { __hyper(\&infix:<+>, @a, @b) }; | ||
sub __hyper (Code $op, Array @a, Array @b) { | |||
... } | |||
Smari | Hmm. | 00:35 | |
obra | it's sad when one can't actually paste perl code to IRC. | ||
Smari | multi sub infix:<·>(Array @a, Array @b) returns Int is commutative { [+] (@a »*« @b); } | ||
.. why won't this work? | |||
clkao | it works for me. if i name the operator XO | 00:37 | |
Smari | Aye. Works here too when I call it that. | 00:38 | |
Incorrectly defined function though. Haha. | 00:40 | ||
clkao | Smari: works for me if i name it ♨ | ||
Smari | Why doesn't · work? | ||
Bug? | 00:41 | ||
clkao | see if hotspring works | ||
Smari | hotspring? | ||
clkao | the symbol i just pasted | ||
Smari | Yup, it works. | ||
obra cries. I want unicode irc | 00:42 | ||
clkao | obra: it's almost year 2006, get your software working! | 00:43 | |
obra | gnome-terminal, screen and irssi. These things should all work | ||
xinming want the the console utf-8 in utf-8 encoding by default. :-) | 00:45 | ||
oopos. | |||
I just wish console will support utf-8 by default without starting X. :-P | |||
Smari | Hah! | 00:46 | |
Now it works. | |||
It was failing because for some reason I was using the ISO-8859-1 · instead of the UTF-8 one. | |||
paran01d | hi im having trouble getting my ext tests to run they seem to be looking for pugs in a scripts dir within blib that isnt there any ideas ? | 01:56 | |
taking my first steps into pugs after a tlk from audrey last week at sydney perlmongers | 01:58 | ||
dduncan | paran01d, are you talking about the pre-existing ext tests, or new ones you are making? | 02:25 | |
gaal | paran01d: how are you running your tests? does export HARNESS_PERL=`pwd` help? | 05:20 | |
audreyt | gaal: hey | 05:35 | |
audreyt wakes up and goes out to collect laptop | |||
anything I should look at when on the road wrt your lexical patch? | 05:36 | ||
gaal | audreyt: just that it's not lexical :-/ | 05:47 | |
I ended up punting and doing SGlobal in the caller's context | |||
it at least solves the double-use problem for now | |||
audreyt | OKIE | 05:48 | |
er, sorry, capslock | |||
okie. | |||
do you have your half formed lexical patch somewhere commented out in th esrc? | |||
gaal | I haven't read that article about mixins and stuff yet -- busy weekend unfortunately over -- | ||
audreyt: well, look in Parser.hs 849 | 05:49 | ||
compare with 467 | |||
audreyt | k | ||
gaal | ...re: that article, I do want to read it hoping it clarifies what some exports might be. Eg. I still don't undersatnd when you might want to import something into an env or state var. | 05:50 | |
audreyt | *nod* | ||
gaal | Reason I punted on lexicals was that I just wasn't sure how to combine Pad transofmers. You'll see that SGlobal exports are much simpler (void context map in Haskell! haha) | 05:52 | |
audreyt | ok:) | 05:53 | |
yup, I see it. will hack it some more on the taxi | |||
s/on/in/ # or whatever the correct term is | |||
gaal hopes the duct tape holds out :-) | 05:54 | ||
(I mean on the temp laptop) | |||
$Larry also mentioned something looking a bit like new syntax for the importation spec, too | 05:55 | ||
let me find it... | |||
oh, dang, I just remembered thinging it needed more discussion but I was too excited by the rest of the email to follow up: | 05:56 | ||
my $hownow is export(:state); # override implicit :my default | |||
but if that works, how do you set tagsets? | 05:57 | ||
what it *does* imply though is that the export hash needs another layer of metadata, something like | |||
%INC<MyModule><exports> = { '&f' => { bind => sub{...}, mode => 'lexical' }, '%s' => { bind = ??, mode => 'state' } } | 05:59 | ||
but that's easy to add. | |||
(s/mode/Scope/ too) | |||
audreyt | yup, got it. | 06:02 | |
I wonder what doe this mean | 06:03 | ||
sub foo { my $bar is export; ... } | |||
gaal | eep :) | 06:04 | |
I hope it means a compiler error! | |||
s/compiler/compile-time/ | |||
audreyt | how is it diff from | 06:05 | |
sub foo { sub bar is export { ... } } | |||
or even | |||
{ my $foo; sub bar is export { ... } } | |||
the last one is obviously correct | |||
gaal | hhmm. | 06:06 | |
but you can close on lexicals, not on subs. | |||
audreyt | but the block is conceptually a closure as well | 06:08 | |
because you can reenter it with &?BLOCK(...) | |||
from within itself | |||
gaal | but you can't export to yourself | 06:09 | |
audreyt | indeed that's not sane | 06:10 | |
but consider: | 06:11 | ||
Foo.pm: my $foo is export; | |||
vs | |||
Foo.pm: { my $foo is export; } | |||
that's what I was thinking about | |||
namely how far the exports hoist themselves from inner blocks | |||
gaal | conceptually it already is in an inner block even in the first place, no? | 06:12 | |
audreyt | it is, but it's the _first_ inner block | ||
gaal | package Foo; my $x === package Foo { my $x } | ||
yes. hmm. | |||
audreyt | whilst in the second one, the "export" need to be hoisted to the package closure | ||
because the package closure will not know about $foo | |||
and hence can't provide it if we are to request it from the closure | 06:13 | ||
gaal | on a possibly related note, what does this mean? | 06:14 | |
my $foo is export(:GLOBAL) | |||
or | |||
our $foo is export(:MY) | |||
etc. | |||
audreyt | that's easy | 06:16 | |
it affects symbol creation on the importation site | |||
gaal | you mean, there's just yet another binding of some arbitrary scope | 06:17 | |
but what about closures then? | |||
package Foo; sub mk_counter { my $color = @_ is export; return { "<font color='$color'>" ~ @_ ~ "</font>" } } | 06:18 | ||
apart from hoisitng | 06:19 | ||
this especially doesn't make sense because $color is lexical and closed on. | |||
well, drats. my($color) = @_, and I can't believe I fell for that once again. | 06:20 | ||
audreyt | my $color = @_; # this has a very well defined meaning of \@_ :) | 06:21 | |
but anyways. | |||
I'll think about it more; for now it sufficies to rule out all but toplevel symbols as export candidates | 06:22 | ||
we can always p6l if ambiguity arises | |||
yay, the taxi is here. will be back in ~2hr | 06:23 | ||
gaal | does the parser readily know if a symbol is top level? | ||
ok i'm going to $work. good luck | |||
audreyt | gaal: the idea is we collect it perclosure | ||
and if it's not a package closure, something is very wrong. | |||
this belongs to the compiler phase not parser | 06:24 | ||
but the parser at importation site should just query the export list from the module -- we'll see how it turns out :) | |||
enjoy $work :) | |||
audreyt waves & | |||
gaal waves back, er, away & | |||
asavige | paran01d: re running tests, I set env vbles HARNESS_PERL=./pugs PERL6LIB=ext/Test/lib | 06:29 | |
Then run test with prove -v t/fred.t I'm a bit rusty, is that still recommended way to do it? | |||
gaal | PERL6LIB=blib6/lib possibly even better | ||
and HARNESS_PERL=`pwd` so you can cd around. | 06:30 | ||
dduncan | new commit pending ... | 07:37 | |
push of new file SQL::Routine::Language done | 07:46 | ||
svnbot6 | r8289 | Darren_Duncan++ | r1389@Darren-Duncans-Computer: darrenduncan | 2005-12-17 23:45:43 -0800 | ||
r8289 | Darren_Duncan++ | /ext/Rosetta-Incubator : added start of new file lib/SQL/Routine/Language.pod, the authoritative Rosetta VM language specs | |||
dduncan | oh, that's up too | 07:47 | |
avar | 'Migration is important. The perl interpreter will assume that it is being fed Perl 5 code unless the code starts with a "class" or "module" keyword, or you specifically tell it you're running Perl 6 code in some other way, such as by:' | 12:59 | |
-syn01 | |||
so code like: | |||
use strict; | |||
class Foo { ... won't be considered perl6 code? | 13:00 | ||
(doesn't start with class) | |||
xinming | avar: No, It will, It means, if the current file which has some signature that perl 6 has, It will be automatically turn running into perl 6 | 13:08 | |
Just like, If you have a package which contain a class, then the file is perl 6 source, | 13:09 | ||
hmm, for example, package Pkg1; bla...bla..bla; class Cls1; bla..bla..bla; 1; This will be considered perl 6, as there is a class. | 13:10 | ||
certainly for some other signature... Just like `for @a -> $v { ... }` | 13:11 | ||
hmm, maybe, the if without the parenthesis in test statement, will also be considered perl 6 | 13:12 | ||
avar | sure there's lots of things, syn01 is just a bit unclear on it... | 13:13 | |
Another big thing to check for is Str/Num/Int/Array.. | |||
xinming | It's understandable. Str is an object, and str is a bit like char *s = "bla...bla...bla..." | 13:14 | |
and str can be promoted automatically | |||
hope what I say is understandable. :-P | 13:15 | ||
audreyt | stevan_: ping | 13:36 | |
stevan_: I see this | 13:40 | ||
$nothead++ && last if exists $in_tail{$cand}; | |||
in your C3 | |||
shouldn't it be ++$nothead ? | |||
otherwise the && won't take effect | |||
or am I missing some very clever use of postincrement? | |||
avar | isn't that equivalent to ($nothead++) && last if exists $in_tail{$cand}; since ++ is above && in the precedence table? | 13:43 | |
audreyt | yeah | 13:44 | |
but that will make the "last" not run on the first time of $nothead++ | |||
which sounds wrong to me | |||
(this is not seen in the lisp or python implementation of C3) | |||
avar | is that perl5/Perl6-MetaModel/lib6/metamorph.pl ? | 13:47 | |
stevan_ | audreyt: no cleverness involved | 13:48 | |
bad coding instead :) | |||
audreyt | avar: no... Class::C3 on CPAN and perl5/Perl6-ObjectSpace/lib/Perl6/MM/C3.pm | ||
stevan_ | however, it passes all the (Python, Dylan) tests | ||
audreyt | stevan_: sure, because it will loop to the end anyway | 13:49 | |
it just consumes some more CPU | |||
stevan_ | ah | ||
13:49
stevan_ is now known as stevan
|
|||
stevan | I will adjust them then :) | 13:49 | |
audreyt: I looked for a Haskell impl of C3 last night, all I found was Scheme, so I went back to reading Algorithms :) | 13:51 | ||
svnbot6 | r8290 | iblech++ | t/builtins/lists/minmax.t: Added tests for min and max with literals (e.g. | ||
r8290 | iblech++ | max(1,2,3)); bug in PIL2JS spotted by clkao++ | |||
stevan | but its time for breakfast right now | ||
stevan & | |||
audreyt | stevan: anyway, I coded it up in 3 mins :) | 13:55 | |
not sure about correctness tho. | |||
testing | |||
avar | $ pugs -e 'say 5^5' | 13:56 | |
one() <- mm? | |||
strange output;) | |||
audreyt | ^ is infix one() | ||
avar | ah, ;) | ||
avar still learning all the operators | 13:57 | ||
gaal | yo a.* | 13:58 | |
audreyt | stevan: it looks like this | ||
doMerge res seqs | |||
| seqs'@(_:_) <- filter (not . null) seqs | |||
, (cand:_) <- [ s | (s:_) <- seqs', all (not . elem s . tail) seqs'] | |||
= doMerge (cand:res) [ if s == cand then rest else full | full@(s:rest) <- seqs' ] | |||
doMerge res _ = res | |||
gaal: hey... I'll have to wait until tomorrow afternoon to get my laptop back... they overflowed on weekend | 13:59 | ||
gaal | no worries :) i hope their overflow isn't liquid though | 14:00 | |
audreyt | prolly not :) | ||
gaal | I should work on the other side of this anyway, too: parsing the import requests. | 14:04 | |
svnbot6 | r8291 | autrijus++ | * C3 MRO lands to Minilang... would love some more tests. | ||
gaal | and exporting vars. | ||
audreyt | cool! | 14:05 | |
stevan: I've committed a bunch of work on C3 MRO and objs | |||
svnbot6 | r8292 | autrijus++ | * replace objects in minilang from simple hashes into | ||
r8292 | autrijus++ | opaque objects with fetch/store/freeze/thaw virtual | |||
r8292 | autrijus++ | methods. this should make autoboxing infinitely easier | |||
r8292 | autrijus++ | as an autoboxed Int can use a haskell Integer without | |||
r8292 | autrijus++ | exposing it to the externals. | |||
audreyt | sanity checks welcome | ||
also for the [].apply(->{}) form, can you use (->{}).do_for([]) instead? | 14:06 | ||
masak | how does one find out if a reference holds a scalar in perl 6? ref() seems to be too specific, returning Int, Str and Bool | 14:08 | |
audreyt | $var.does(Scalar) | 14:11 | |
bbl... *sleep* | |||
audreyt prays tomorrow will yield a working laptop | 14:12 | ||
& | |||
masak | audreyt: thx | ||
ingy | audreyt: yo | 14:14 | |
ingy alwayz missez audreyt by minutez | 14:15 | ||
Juerd | audreyt: Consider IBM laptops :) They don't break quite as easily | 14:23 | |
avar | multi sub infix:<≠> (Int $x, Int $y) returns Bool { $x != $y } | 14:24 | |
say "five & ten are not equal" if 5 ≠ 10; | |||
works with <z> and if 5 z 10; | |||
xinming bought an Asus Laptop because of audreyt who also has one... Hope mine won't break so easy. :-/ | |||
avar | limitation in pugs or perl6? | ||
xinming | avar: what do you mean? | 14:25 | |
Juerd | xinming: Hm. Asus is one of the regular brands, on the cheaper side of things. They're great for normal users, but not for almost continuous use... | 14:26 | |
It's a shame laptop manufacturers don't specify the duty cycle their products were designed for. | |||
clkao | morning | ||
Juerd | Afternoon | 14:27 | |
clkao | *yawn* | ||
xinming | Juerd: I ever wish to choose IBM series. But the problem is, It's too expensive... for my A3E (1.73G with 1G ram) It took about $1200, But for IBM, the price is oever $2000 Maybe. :-/ | ||
clkao | Juerd: i like my asus quite alright, it's been solid and light :) | 14:28 | |
Juerd | xinming: I was parsing "for my ... (...)" as Perl 5 and expected a { ... Wow. | ||
xinming: Anyway, the trick is to be less picky about specs. | |||
clkao | xinming: very few laptops can pass the 'audrey test' | ||
Juerd | If you work remotely, the speed of your laptop is much less relevant. | ||
And it's cheaper often to buy a very simple speed machine that you connect to a permanent internet connection, than to buy an equally much faster laptop. | 14:29 | ||
While the simple speed machine has additional benefits. | |||
I guess most depends on the availability of fast internet connections. | 14:30 | ||
xinming | Juerd: Yeap, I agree, But for a person who really loves computer, how will he think of the speed of computer. escpecially the faster the better. :-), at least, to me, I really hope my computer as good as possible. | ||
Juerd | xinming: I disagree about that. I absolutely love computers, and adore my laptop, but speed is not that important. How computers are built, and how they interact with me (comfort level) are much more important. | 14:31 | |
"good" should be established through a lot more than the hardware specs. | |||
A good casing, comfortable keyboard (hey, you type HOW MANY keys a day?), good touchpad or trackpoint, battery life, screen brightness (and the ability to dim it enough), etcetera | 14:32 | ||
xinming | I ever got a laptop which contains C3 Via CPU, and 256M, Ram, If you make me compile pugs on that machine, I would rather choose a much cheaper computer instead of laptop. | ||
jethr0 | hi, i am trying to "darcs get" pugs from the repository, but it won't work :( | ||
integral | you'd only want to compile pugs locally if you didn't have inet... | ||
Juerd | If I can't hold the laptop by its screen, because it has weak hinges or a weak cover, I won't want the laptop. | 14:33 | |
If its keyboard is uncomfortable, I don't want it. If the battery only lasts an hour, no way. | |||
xinming | Juerd: thanks for sharing the experience. :-) | ||
Juerd | integral: Yes, but there's a balance to be found. | ||
I think a centrino 1.5 GHz is fast enough to compile occassionally. | 14:34 | ||
That's much cheaper than an 1.7 | |||
Of course, I'm not saying you should go for a C3 :) That's not nice for programmers. | |||
jethr0 | the ibm x40 is small, light and has up to 11h battery life with extension accu. | ||
Juerd | jethr0: Nonsense. It's 6 to 7 hours. | ||
xinming | hmm, by the way, for a machine which is running at home as server, to you all, is the paying for Adsl more than electicity? | ||
.... 11h? >_< | 14:35 | ||
jethr0 | there's an additional (huge) accu | ||
which fits exactly under the notebook | |||
Juerd | jethr0: Yes, the 8 cell one. I sell those things. | ||
jethr0: And the laptops. | |||
gaal | hey Juerd, resident lang moose. Is this a pugsbug? | ||
?eval <a b c d>.kv | |||
Juerd | What, that there is no response? | ||
No, that's just because evalbot isn't here. | 14:36 | ||
Can't assign that bug to pugs :) | |||
gaal | ahem. no, that's an evalbot hiccup :-) | ||
jethr0 | Juerd: ok, but it's still quite nice even with the 8cell accu attached. rather cute :) | ||
gaal | it'll fail on VUndef being ro or some such weirdness. | ||
Juerd | jethr0: Certainly. | ||
jethr0: Just don't spread expectations that are too high, because that results in disappointment. | |||
xinming | hmm, I wish to setup a home server to myself, It's a bit expensive, which cost about $250 per year for electicity, and $120 for Adsl | ||
jethr0 | ok | ||
gaal | should it result in <0 a 1 b 2 c 3 d> ? | ||
(i think it should). | 14:37 | ||
Juerd | jethr0: 6 to 7 hours is impressive for a 1.8 kg laptop; there isn't even need for exaggeration :) | ||
jethr0 | :) | ||
Juerd | gaal: It depends. Is .kv an array method, or a hash method only? | ||
gaal | on arrays it does work. | ||
Juerd | If it's a hash method ONLY, then the list is probably coerced to an array, and that again to a hash, via an implicit list. Which would be madness, by the way. | 14:38 | |
gaal | @l = <a b c d>; @l.kv => what I said above. | ||
Juerd | What *works* I find irrelevant when answering these questions. What do the specs say? :) | ||
gaal | nono, it's even devined as List::kv. | ||
the specs say it gives these indices. | |||
Juerd | Lists, when used with methods, are coerced to arrays, so there should be no difference between @foo = <>; @foo.bar and <>.bar | 14:39 | |
afaik. | |||
gaal | so there's certainly a bug then. | ||
Juerd | My back hurts | ||
gaal | afayk. | ||
masak | I encountered this line in some code I'm porting to perl6: | 14:40 | |
my $pat = quotemeta ($opt); | |||
what does it do? | |||
is there a perl6 equivalent? | |||
gaal | masak: probably not needed | ||
masak | oh, good | 14:41 | |
gaal | it escapes hings like * and \b and so on | ||
Juerd | masak: Instead of /$pat/, just use /$pat/ :) | ||
gaal | so that when you interpolate $pat, they don't become metachars | ||
Juerd | masak: Instead of /$pat/, just use /$opt/ :) | ||
gaal: It's not interpolation, and *because of that*, there are no metachars. | |||
masak | Juerd: oki | ||
gaal | there's a way to explicitly ask $opt to be interpolated | 14:42 | |
Juerd | Oh, you were still discussing Perl 5. Nevermind. | ||
gaal | Juerd: yes, I know. | ||
Juerd | gaal: s/interpolated/interpreted as a rule/ | ||
gaal | Juerd: true | ||
gaal returns to $work | |||
Juerd | Just as $bar isn't interpolated in $bar() | ||
masak | has `foreach` been deprecated in perl6? | 14:47 | |
pugs doesn't recognize it | |||
?eval for 1..5 { say $_ } | |||
oh. evalbot is sleeping, it seems | |||
nvm. anyway, `foreach` is not a recognized keyword in pugs, it seems | 14:48 | ||
intentional? | |||
xinming | masak: It's deprecated, since in perl 6, list are lazy by default, So, No need to use foreach | 14:49 | |
for is enough | |||
maybe It's deleted from perl 6 | 14:50 | ||
Juerd | masak: In Perl 5, for and foreach are aliases. The list iterating thing is just "for" in Perl 6, and the C-style loop is "loop". | ||
avar | there's no foreach in p6 | ||
Juerd | That was more or less implied :) | ||
masak | I interpret your answers as there no longer being any use for `foreach` in p6 | 14:51 | |
fair enough | |||
since they are synonyms anyway, I mean :) | |||
Juerd | I don't like this change. I think the alias is nice to have. | ||
Even though I always write "for". | |||
masak | Juerd: me too. but you can create a macro if you want | ||
at least as soon as we have macros in pugs :) | 14:52 | ||
Juerd | masak: my &statement:<foreach> ::= &statement:<for>; | ||
Not a macro. An alias! :) | |||
masak | Juerd: of course. my bad. | ||
clkao | &infix:{'+'} | 16:04 | |
doesn't seem to parse | |||
grr, currying broken: | 16:12 | ||
t/subroutines/currying.t | |||
pugs: malformed named arg: Syn "named" [Ann (Cxt (CxtItem (mkType "Str"))) (Val (VStr "y")),Val (VInt 2)] | |||
avar | Have there been any reports on what filesystem functions will be like in perl 6 ? | 16:13 | |
I noticed that there isn't a synopsis / apocolypse for that yet | |||
clkao | s29. very sparse | ||
gaal | avar: look in Prelude.pm for a link to some discussion. | 16:20 | |
svnbot6 | r8293 | clkao++ | sym should be local variable. | 16:33 | |
clkao | dogh | 16:43 | |
13902 pugs 44.3% 3:53.08 1 13 777 669M+ 6.37M 423M- 796M | |||
svnbot6 | r8294 | clkao++ | Failed tests for currying subs with array arguments. | 16:54 | |
r8295 | clkao++ | Hyperoperators coming to pil2js backend - | 16:57 | ||
r8295 | clkao++ | We have >>+<< now, was hoping to do everything with currying, | |||
r8295 | clkao++ | but it doesn't work yet, left the currying implementation in | |||
r8295 | clkao++ | comments. | |||
r8296 | clkao++ | a bit more hyper-operators so we can pass some more tests. | 17:06 | ||
stevan_ | audreyt: ping | 17:12 | |
avar | clkao: does $x »++ work now? | ||
eh | |||
@x »++ | |||
r0nny | re | 17:23 | |
stevan_ | audreyt: all tests are passing now, I am going to try and write some more MRO tests (port them from Class::MRO, etc) | 17:46 | |
clkao | avar: no. i didn't touch it. i was working on the js backend | ||
svnbot6 | r8297 | stevan++ | PIL.Native.Eval.hs | ||
r8297 | stevan++ | - changed mro_merge to merge against obj, not cls (see NOTE) | |||
r8297 | stevan++ | PIL.Native.Bootstrap.pil | |||
r8297 | stevan++ | - uncached ::Class.MRO, I think we need to get | |||
r8297 | stevan++ | attr.instantiate_container() working in order to | |||
r8297 | stevan++ | make this work correctly | |||
r8297 | stevan++ | - all tests in t/pil/bootstrap.pil work now | |||
gaal | stevan_: you hacking haskell now? cool! | 17:48 | |
TWD is closer by the ci :-) | 17:49 | ||
clkao | TWD? | 17:50 | |
gaal | total world domination | ||
clkao grins | |||
now if only people can sort out weirdness in currying | |||
it's totally broken with haskell backend. semi broken for js | 17:51 | ||
t/subroute/currying.t | |||
subroutine | |||
gaal looks | 17:52 | ||
urrr, didn't audreyt revive inlined source prelude? | 17:56 | ||
clkao | er? | ||
gaal | when you "make unopimized", precompiling the prelude typically fails | 17:57 | |
so for those builds, we wanted to bring back the old way of doing it, not precompiling the prelude but storing its p6 text source inside pugs, to be evalled every load. | |||
clkao | i was thinking we probably need to define different tiers of functions, so it's easily to do bootstrapping | 17:58 | |
gaal | weird, i do get a prelude now. must see how that's done :-) | ||
aaahhh, I get it. audreyt++ # smart | 17:59 | ||
stevan_ | gaal: if you consider deleting one word hacking Haskell :) | 18:02 | |
stevan_ still can't seem to grok Haskell | |||
gaal | well, I see what the problem is (an annotation node messing up patmatch), but I'm not sure yet about how to fix this. | 18:03 | |
stevan_ | my brains just doesn't work that way,.. no matter how hard I try | ||
clkao | Oh, bootstrap.pil is beautiful # stevan++ | ||
gaal | stevan_: we have one of those untranslatable words in hebrew (comes from Arabic really): "alek" | ||
loosely, it means, "yeah right" | |||
stevan_ | clkao: thanks,.. audreyt deserves much credit too... it's his mini-lang :) | 18:04 | |
gaal | I'm sure you can moose it! | ||
just ignore monads for the while :-) | |||
stevan_ | gaal: I think if I had a few weeks to dedicate to it, maybe,.. but the problem is the $work distractions bring my mind back to Perl | 18:05 | |
gaal | tell me about it :( I just hopped from straight c to C# | 18:08 | |
stevan_ | I like C# actually :) | ||
better than Java ;) | |||
gaal | oh, I didn't say I don't like it | 18:09 | |
but the context switches are jarring | |||
stevan_ | yeah I bet | ||
Odin-LAP | C# has a public domain spec. | ||
(Which, admittedly, doesn't mean a thing, but it's still an interesting point.) | 18:10 | ||
stevan_ | Odin-LAP: that is because MS want's it standardized | ||
standardized == Manager-freindly | 18:11 | ||
gaal | Open. But PD? | ||
Odin-LAP | gaal: Yes. | ||
gaal: All ECMA publications are public domain. | |||
stevan_ | The CLR spec if public domain as well IIRC | ||
gaal | walla? (Arabic's the language du jour for interjections) | ||
Odin-LAP | stevan_: Yup. Both C# and CLI were submitted to ECMA for standardisation. | 18:12 | |
Hardcopies are available for free, too. Which is quite unusual. | 18:13 | ||
gaal | clkao: svk pull | 18:15 | |
svnbot6 | r8298 | gaal++ | unbreak named args | ||
gaal | three tests still fail, but that's another problem. | ||
clkao | the last one fails? | 18:16 | |
that's the one i want to get it work :/ with arrays | |||
as i want to implement hyperop in jsbackend with curryed function | |||
gaal | I think it passes with no message | ||
clkao | whoot | 18:17 | |
gaal | add one? :) | ||
svnbot6 | r8299 | clkao++ | add name to currying array arg test. | 18:21 | |
gaal shrieks at L<S06/Currying> | |||
"The result of a use statement is a (compile-time) object that also has an .assuming method" | |||
hmmm, that section no longer stipulates .assuming only takes named args, so one of the tests is obsolete. but does that mean currying is now OK with positional args? | 18:24 | ||
clkao | no idea | ||
gaal | clkao: __hyper in that test looks wrong. I don't know if it's the same implementaion you're using elsewhere | 18:29 | |
it thunks elements from the long list when the short one is exhausted | |||
but (I think) <1> >>-<< <1 2 3> => <0 -2 -3> | 18:30 | ||
this is the same problem as the reduce identity issue (that got a looooong thread on p6l) | |||
FWIW, main pugs gives <0 -1 -2>, which is weird in this case but just means someone chose 1 as the default identity | 18:32 | ||
brb | 18:34 | ||
clkao | i thought it's doing that if it's a list. was going to do expanding if any of them is single | 18:35 | |
gaal | oh, you mean take the last element? let me see | 18:40 | |
where's evalbot? :( | 18:41 | ||
you're right! | |||
./pugs -e 'say <5> >>-<< <1 2 3>' => 432 | |||
clkao | but: | 18:42 | |
423 | |||
./pugs -e 'say <5 4> >>-<< <1 2 3>' | |||
gaal | looks like it takes the last element | 18:43 | |
oh. no | |||
clkao | no | ||
gaal | what does that mean then? | ||
clkao | only when it's with one ele | ||
otherwise it takes the missing one | |||
gaal | ahhh ok. | 18:45 | |
gaal goes to look at the spec | |||
avar | boo! | ||
%h{str} doesn't work anymore;/ | |||
gaal | the spec doesn't say anything :/ | ||
Juerd | Note: do not use lists like 1 2 3 or 0 1 2 in testing attempts :) | 18:46 | |
gaal | avar: that's because pure {} means only a closure now | ||
avar: %h<str> or %h{'str'} | |||
Juerd | You want to be sure it's using your value, not an internal counter. | ||
gaal | Juerd: point. I often start at 42 | ||
avar | woo | ||
Juerd | Some newbies think @foo returns the last element, because after @foo = 1..4, @foo == 4. | 18:47 | |
avar | is there something like .inspect in ruby to find out how a datastructure is laid out? | ||
Juerd | Don't get bitten by the same thing :) | ||
gaal: I usually don't use regular intervals | |||
gaal: My favourite numbers are 42, 15 and 123. | |||
avar | $ ruby -e 'x = {"a" => %w{a b c}}; puts x.inspect' | 18:48 | |
{"a"=>["a", "b", "c"]} | |||
gaal | which reminds me how just last week I was tuning some code where I wanted a rollover counter but didn't know what a good value would be. I ran some experiments and 42 turned out to be good, so I used that. | ||
Juerd | Hehe | ||
So I'm not the only one using $foo % 42 ;) | 18:49 | ||
gaal | Juerd: I'd never use something like that because it'd mean I have to like, do arithmetic to check the result, and I'd probably be wrong cause I can't count :-) | ||
Juerd | Though a few months ago, a client asked me why his web based database application thingy paged results per 42 :) | ||
gaal | the correct answer is of course "why any other number?" | ||
let's see you make an appointment on an hour that's != (mod 15). | 18:50 | ||
Juerd | Hours are so weird | ||
gaal | != 0 that is | 18:51 | |
Juerd | But I've stopped trying to round appointment times at nice epoch times. | ||
gaal | explicitly mixed-radix system with an implicit further radix. | ||
Juerd | Which fluctuates in a fixed pattern | 18:52 | |
A pattern which again fluctuates per a fixed pattern which fluctuates per a fixed pattern. | |||
gaal | epoch times are, of course, just as arbitrary :) | ||
Juerd | Sure. | 18:53 | |
But at least one can easily calculate with them. | |||
gaal | true dat. | ||
Juerd | A base-60/base-60/base-24/base-(28|29|30|31)/base-12/base-10 number is hard. | 18:54 | |
clkao | how to you create an array with same elements? like map { 5 } 1..10 ? | 18:55 | |
there gotta be something simpler | 18:56 | ||
gaal | 5 xx 10 | ||
clkao | cool | ||
araujo | Hello. | 18:58 | |
xinming | x is enough. :-) | ||
clkao | i thought x is for making the string? | ||
avar | xinming: x makes a string | ||
*repets a string | |||
xinming | oops, sorry, misunderstood. :-/ | ||
gaal | off to see a film. bye! :) & | 18:59 | |
avar | mm | 19:05 | |
I can't do something like for 1..10.mysub(arg) ? | 19:06 | ||
I was going to write a method like ruby's step() so I don't have to use loop() | |||
for 1..0.step(2) -> $i { say $i } | |||
1..10 | |||
Juerd | Has feather been unreachable for long? | 19:09 | |
(by ssh) | |||
wolverian | heh, nice load average on feather :) | 19:35 | |
webmind | Juerd, quite | 19:39 | |
maybe nice is an idea | |||
hmm | 19:40 | ||
it was niced | |||
and now we're banned from perlhelp | |||
:) | |||
wolverian | what happened? :) | 19:41 | |
(and I'm not banned.) | |||
webmind | my guess is a big load | ||
mode/#perlhelp [+b *!*@feather.perl6.nl] | 19:42 | ||
Juerd | webmind: Thanks for the SMS | 19:52 | |
webmind | np | 19:53 | |
didn't know if you where there already or simething | |||
something | |||
Juerd | unbanned. | 19:55 | |
webmind: Nah - still eating :) | |||
webmind | k | 19:56 | |
thanks | |||
Juerd | 20:56 -!- mode/#perlhelp [-oo flang perl-d] by Juerd | 19:57 | |
20:56 -!- mode/#perlhelp [-b *!*@feather.perl6.nl] by Juerd | |||
20:57 <@Juerd> Sorry about the bot de-op, but providing access should be a primary concern, and they | |||
currently prevent legitimate users from accessing. | |||
Try again. | |||
lafk | 19:58 | ||
s/l// | |||
Dec 18 20:34:39 feather kernel: Swap cache: add 37775494, delete 37775494, find 16367583/20409750, race 5+29 | |||
Dec 18 20:34:39 feather kernel: Free swap = 0kB | 19:59 | ||
Dec 18 20:34:39 feather kernel: Total swap = 987896kB | |||
Load issue indeed. | |||
Dec 18 20:34:39 feather kernel: Out of Memory: Killed process 18385 (ghc-6.4.1). | |||
Someone forgot to ulimit. | |||
(grrrr!) | |||
afk | |||
r0nny | yo | 20:33 | |
anyone knows the state of audreyt's work on the new object system ? ? | 20:36 | ||
gaal | hey r0nny, you can see the commit log here: rt.openfoundry.org/Foundry/Project/.../pugs/log/ | 21:19 | |
clkao: is the problem with use fixed? if not where can I find a test case? | 21:20 | ||
avar | mm, anyone have an idea as to my previous question? | 21:32 | |
i.e. is there something like ruby's .inspect in p6? | |||
gaal | avar: I don't know ruby. Does .perl do what you want? | 21:36 | |
try: ./pugs -e 'class Foo; has $.x; my $foo = Foo.new(x => 42); $foo.perl.say' | 21:37 | ||
avar | woo, perfect | ||
yeah, that's it | |||
gaal | cool | 21:38 | |
avar | $ ruby -e 'a = [[1..2], [3..4]]; puts a.inspect' | ||
[[1..2], [3..4]] | |||
$ pugs -e 'my @a = ([1..2],[3..4]); say @a.perl' | |||
[[1, 2], [3, 4]] | |||
;) | |||
gaal | last I checked reflection wasn't specced very much, though. I imagine ruby has that. | 21:39 | |
avar | well actually that 1..2 didn't create a range in ruby.. | ||
reflection? | |||
gaal | you know, "what is the signature of all the methods in this class" | 21:40 | |
but then, stevan and audreyt are working on that stuff. | |||
...at least for OO code. I don't know about non-method routines in general. | 21:41 | ||
stevan_ | r0nny: re: the object system,.. I would say it will be about a week before we have anything working which can be used through Pugs | 22:56 | |
r0nny: it is a slow process, some of the stuff we are doing is being done for the first time (at least as far as I know, and have googled) | 22:57 | ||
avar, gaal: re: reflection, the OO reflection should carry over to non-OO code since all things in p6 (at some level) are OO | 22:59 | ||
however, some of those things might be more useful than others | |||
22:59
evalbot_8018 is now known as evalbot_8301
|
|||
stevan_ dinner & | 23:00 | ||
Juerd | I won't be having much time to finish the fears responses. | 23:12 | |
If you have ideas, please don't wait for me :) | |||
clkao | gaal: sorry? what problem with 'use'? | 23:21 |