Feather users: perlcabal.org/~autrijus/ | pugscode.org/ <Overview Journal Logs> | pugs.kwiki.org
Set by autrijus on 26 May 2005.
Juerd Like $temp, which I'd call $input here, because it will contain the user's input, and only that... 00:00
unless ($choice eq 'f') { 00:02
say "The $enemy.name() is dead!" ;
return 1;
}
How can someone work with indentation like that?
mauke hmm, incompatible tabstop settings?
wolverian tabstop? hard tabs? WHAT? 00:04
svnbot6 r4019, naesten++ | "Yet Another Haskell Tutorial" was written by Hal Daume III, not II
Juerd Ah, yes. 00:05
With ts=3, it's somewhat neater
BUT
SamB oh rats, I should have used SamB for my username...
autrijus greetings.
Juerd Don't mix tabs with spaces unless your tabs are 8 spaces
And... don't use tabs, damnit.
wolverian Juerd++
Juerd The tab *key* is wonderful 00:06
The tab *character* is not.
mauke Juerd-- (I use tabs all the time)
Juerd mauke-- # uses tabs.
kelan tabs save space!
wolverian argh, flamewar :)
mauke but I don't mix them with spaces
Juerd kelan: gzip saves space. I don't see you gzipping all your sources.
kelan i can get 8 characters of space with just one character!
sure i do
compressed partition!
Juerd I don't see you do it.
kelan actually i don't use tabs either 00:07
i have vim convert them to spaces
Juerd expandtab++
kelan yes
Juerd expandtab phone home.
wolverian vim++ # makes things easy
mauke # vi: set ts=4 sw=4 noet:
kelan why not have 'yes' versions of the 'no' options? ':set yesexpandtab' 00:08
mauke to save space
kelan and just to be polite, add a please
wolverian haha.
kelan :set yesexpandtabplease
mauke kelan: do you know INTERCAL?
kelan no:(
but i've heard of it 00:09
COMEFROM
Juerd kelan: Because in English, the word "no" (meaning 0) has no opposite.
kelan hww
Juerd Same for not.
kelan er hmm
some!
Juerd No, that's not an opposite.
kelan :set someexpandtabs 00:10
hmm
Juerd In Dutch (and it's almost the same in German), we have "wel", an opposite of "niet"
mauke kelan: www.ofb.net/~jlm/rot13.i
Juerd English:
SamB needs to seriously consider changing his irc nickname to naesten
Juerd "I'm not doing it" - "But I *am* doing it"
Dutch:
"Ik doe het niet" - "Maar ik doe het wel"
We stress the "wel" part, not the verb.
kelan PLEASE FORGET #2 00:11
mauke hmm, there should be something like c_space_errors for perl
wolverian same in finnish. it's only used when whether the action will be done at all is questioned
chromatic traverse_weak_ptr_list: not WEAK?
Juerd wolverian: Yes 00:12
autrijus SamB: you can register another SamB account and I'll add it to the committer list :)
Juerd wolverian: Well, in Dutch it also has some other meaning, that I don't know how to translate
SamB autrijus: oh, is that allowed?
autrijus SamB: or, you can renick to naesten. make a decision :)
kelan Juerd: take a sentence like, "I have no apples." would you use 'wel' to say the opposite?
autrijus SamB: sure, of course... you need to pick another email though
Juerd wolverian: "Dan doe ik het wel", with "ik" stressed, means "Then I'll do it". But imagine rolling eyes during saying this.
kelan: Yes. 00:13
SamB oh
Juerd kelan: "I have no apples." - "I have (wel) apples"
wolverian Juerd: hm. what does the rolling of eyes signify?
kelan right
that seems useful
Juerd kelan: But as you have no opposite for "no", you can only stress an auxillary verb
kelan we should have it!
Juerd kelan: Turning your sentence into "I *do* have apples."
SamB wishes he could rename the user he has...
kelan :set welexpandtabs
Juerd "I *have* apples" is syntactically correct, but sounds weird. 00:14
autrijus SamB: alright, let me invoke the SysOp power...
wolverian Juerd: is wel used as a more powerful form of affirmative, or is it the common affirmative?
chromatic autrijus, I'm seeing GC errors in t/oo/destruction.t.
autrijus chromatic: hm?
svnbot6 r4020, chromatic++ | Test order of DESTROYALL calls.
Juerd wolverian: Depends on stress 00:15
kelan chromatic: did you get finalizers working?
Juerd wolverian: It's not used unless to contradict the opposite.
s/unless/except/
wolverian Juerd: ok.
Juerd: can you say the phrase above about apples without wel?
chromatic I did, but now GHC gives an error about apparently finding a non-weak pointer as it's trying to traverse a list of weak pointers. 00:16
autrijus SamB: you are SamB now.
Juerd That'd just be "I have apples."
autrijus SamB: try commit
something
chromatic I just checked in a new t/oo/destruction.t. Does it pass for anyone else?
Juerd With no indication left of someone else not having apples.
autrijus I'm seeing
pugs: internal error: EVACUATED object entered!
sounds dangerous 00:17
I know why that happens. sec
(it's triggering a GC run during unsafePerformIO)
(something that is almost certain doom)
Juerd Also, "ik *heb* wel appels, maar ik verkoop ze niet" (I *have* apples, but I'm not selling them)
Here "wel" is used for the contrast with the "niet" in the second part. 00:18
wolverian Juerd: oh, with wel it indicates that you are the only one with apples?
Juerd Not to contrast with someone not having apples.
chromatic Yay, certain doom!
Juerd wolverian: Of two people, likely.
kelan Juerd: kind of like "I have apples, yes, but I'm not selling them."
wolverian Juerd: it's actually the exact same in finnish, now that I think about it.
weird. :)
kelan that does sound a bit odd in english tho 00:19
Juerd wolverian: Or, if you see not having apples as an insult: "You have no apples! | Jij hebt geen appels!", the reply would be a strong "I DO have apples! | Ik heb WEL appels!".
This is the entire problem with Perl 6's true.
No, true is a BAD name.
wolverian finnish would stress the 'do', but still also (optionally, but commonly) have the 'wel' 00:20
kelan it *is* an insult to have no apples!
Juerd It's the worst keyword Perl 6 has.
kelan okay, what is true used for
Juerd kelan: opposite of not
kelan i didn't understand that whole list thread
autrijus kelan: when true
wolverian (finnish 'wel' is 'kyllƤ', which also is the finnish word for 'yes')
Juerd I suggest we use 'wel' :)
wolverian that's almost sensible. 00:21
Juerd $foo = wel $bar;
wolverian when there is no good equivalent, make up a new one.
Juerd It's as short as not :)
It's as short as "not" :)
(It's not as short as it isn't short.)
(It is short, the "as ..." is not "because ...")
kelan Juerd: but isnt `true(anything)` the same as `?anything` ? 00:22
Juerd ENGLISH SUCKS
wolverian did anyone suggest 'yes' in the thread? :)
Juerd kelan: Yes.
kelan then is it just for completeness?
wolverian kelan: the problem is that true is the opposite of false, not 'not'
Juerd kelan: Yes.
wolverian kelan: yes, just like 'not' is.
kelan low precedence?
Juerd kelan: Yes.
kelan Juerd: i'm still not seeing the necessity. can you use it in a way that would matter? 00:23
kolibrie I'm guessing I need $PUGS_EMBED=perl5 to get DBI support 00:25
but now I'm getting errors compiling Pugs.Embed.Perl5
autrijus kolibrie: what errors?
kolibrie first is:
/usr/lib/perl/5.8/CORE/reentr.h:611: error: field `_crypt_struct' has incomplete type
Juerd kelan: Probably. 00:26
kelan: I prefer low precedence ops anyway
autrijus kolibrie: very weird. I do believe integral fixed it some time ago
kolibrie autrijus: just pulled down 4020
wolverian Juerd: aren't conversions to bool implicit, anyway?
autrijus kolibrie: can you nopaste the full buildlog?
kolibrie: including the ghc invocation line
Juerd wolverian: Yes
wolverian Juerd: then why have ops for them? 00:27
kolibrie autrijus: yes
Juerd wolverian: But as you say, true is in Perl 6 not the opposite of false.
true can very well return false.
kolibrie perlbot nopaste
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
Juerd wolverian: To force boolean context
wolverian Juerd: no, I mean; I don't get why you would explicitly need to force boolean context
Juerd wolverian: not is useful to negate it, but !! is often used in perl 5 to force boolean context.
wolverian I've never used it :)
Juerd wolverian: Because you wish to unify the input.
wolverian: Make it abstract.
wolverian Juerd: then make the storage type bool?
shouldn't that autocoerce? 00:28
Juerd wolverian: And get rid of that 20 MB message that happens to be true.
Yes, but nobody wants a certain language feature to require typing.
mauke I only use !! for mapping nonzero numbers to 1
wolverian Juerd: I guess. :)
Juerd: to me, normalising _is_ typing 00:29
Juerd To me, a scalar is a scalar
wolverian: Type %foo<somesetting> for me.
wolverian: Without typing %foo<anothersetting>
autrijus chromatic: ok, I think I found the problem
Juerd Afaik, there is no easy way to do that.
wolverian but then it's not normalization, if you only normalize one thing and not the others :) 00:30
Juerd %config.
chromatic Nifty! I'm about to check in another failing test then. :)
svnbot6 r4021, autrijus++ | * (1 => 2 ?? 3 :: 4) now always constructs a pair, because Larry
r4021, autrijus++ | ruled that => is the same precedence as = now.
r4021, autrijus++ | ninereason++ for bringing it to my attention.
r4022, autrijus++ | * move GC to happen only when we are safely out of reach
r4022, autrijus++ | of unsafePerformIO.
Juerd Some settings are boolean
It's nice if you can make them real bools asap
wolverian hmm, good point
autrijus chromatic: this test-driven thing is really nice :)
wolverian there have been posts on p6l about typing arrays 00:31
with different types per element
dunno if any of that is official
Juerd Now, with arrays, it doesn't make sense to have different types per element.
As I told eric256, when things are unrelated, you're better off with a hash and names describing what things are.
He had [ $accesskey, $description, $parameter ] 00:32
But without names for any of these
They were used as [0], [1] and [2]
mauke I thought that's what structs are for :-)
Juerd It would be much better to use a hash.
pasteling "kolibrie" at 66.160.89.59 pasted "Pugs.Embed.Perl5 compile errors" (57 lines, 5.1K) at sial.org/pbot/10505
Juerd mauke: Hashes are much simpler in many cases.
But yes, if you need to type, then a struct works well.
class Option { has $accesskey; has $description; has $parameter; } 00:33
chromatic has $.?
Juerd chromatic: My brain isn't accepting the wild asymmetry yet.
And I think indicating duration with a sigil is unperlish. 00:34
chromatic We'll domesticate it soon.
Juerd So I tend to forget that dot.
Sometimes on purpose. Not this time. 00:35
autrijus kolibrie: I attempted a fix. 00:36
svnbot6 r4023, autrijus++ | * minor pod fix to use C<> in S29draft.
r4024, chromatic++ | Add tests for BUILD with signatures that don't map directly to attributes.
r4025, SamB++ | Add module Pugs.AST.Types to hold types from Pugs.AST.Internals
r4026, autrijus++ | * use double-quote in optl to be more portable
r4027, autrijus++ | * add ccflags too.
autrijus kolibrie: try r4027?
kolibrie autrijus: pulling now 00:37
mauke man, and I thought emacs was supposed to be more customizable and less ad-hockish
Juerd pugs> sub foo { ... } foo my $bar;
*** Undeclared variable: "$bar"
autrijus Juerd: my is currently statement:<my> 00:38
I know it's wrong. it's todo.
Juerd ok
emaces MORE customizable?! 00:39
s/ces/cs/
One can write a news reader fori t.
mauke that's just a SMOP
Juerd Surely any editor feature can be implemented then.
mauke yeah? try making it use the default cursor of my terminal 00:40
Juerd Every operating system implements its own cursor. 00:41
It's one of those things every OS programmer has to do
Just like how every CGI monkey has to write their own parameter parser.
e
svnbot6 r4028, chromatic++ | Tests for roles with submethods.
Juerd Except the cursor is actually very useful to reimplement all the time. 00:42
mauke I actually patched the C source to make it work "right"
autrijus wow. I actually finished backlogging. journal up
autrijus is finding it harder and harder to keep up with every commit
chromatic Only several thousand. 00:43
mauke I think I've fixed all obvious emacs annoyances 00:44
now I want features like vim's "filetype indent on"
kolibrie autrijus: same errors. do I need to make realclean first? 00:45
Juerd mauke: Are you trying to like emacs? 00:48
mauke yes 00:49
wolverian shouldn't Int.isa(Class) be true, and Int.isa(Int) false? or am I misunderstanding everything? :)
Juerd mauke: I can only recommend vmware then ;)
chromatic Yay, a test failure!
Juerd wolverian: On syntax level, classes are not objects. 00:50
autrijus kolibrie: no, just rerun makefile.pl should do
kolibrie: hm, weird.
wolverian Juerd: oh. that is weird.
autrijus wolverian: I held the same misunderstanding too
however!
Juerd wolverian: Not really.
autrijus foo(Int, Int)
will dispatch to 00:51
multi sub foo (Class, Class)
not
multi sub foo (Int, Int)
Juerd wolverian: Otherwise Class.classmethod wouldn't work.
wolverian autrijus: okay, that makes sense.
Juerd wolverian: Otherwise SomeClass.classmethod wouldn't work.
make better sense.
autrijus so Int only stands for a class object when not used in invocant position.
that is actually a pretty good argument for invocants.
wolverian Juerd: why not?
Juerd wolverian: Because Class has no &classmethod 00:52
autrijus wolverian: consider CGI.new
if CGI meant the CGI class object
then it won't have the "new" method defined
it will end up calling Class.new(::CGI)
wolverian hmm. I thought the new would come from the metaclass.
autrijus class Foo { method bar { 3 } } 00:53
say Foo.bar;
svnbot6 r4029, chromatic++ | Tests for SUPER calls in methods declared in roles.
autrijus we want it to print 3
chromatic remembers arguing for that a little while ago.
autrijus (or not.)
(but it's the way it's specced.)
kolibrie autrijus: same errors...
shower &
autrijus kolibrie: :-/
chromatic autrijus, t/oo/roles/super.t has some interesting behavior.
autrijus kolibrie: give me a shell or something?
kolibrie on my computer? 00:54
chromatic From his shower?
autrijus hm. I remember theorbtwo had the same bug
and he gave me a login
so let me try that
wolverian autrijus: I don't understand why that wouldn't work, frankly.
kolibrie autrijus: one sec
wolverian that is probably an indication that I'm not thinking straight.
autrijus wolverian: so we have this ::Foo object
wolverian: it is of class Class
wolverian yes. 00:55
autrijus now we invoke "bar" on it
if it was a normal obj
then it will just call its the "bar" method of its class
namely Class.bar
and passing it as inv
chromatic my $CGI = DBI.new();
wolverian ahh, now I see! 00:56
autrijus :)
now you can argue that the "bar" should be an _instance method_
on the ::Foo metaobject
distinct from its class methods and overriding them
and I'd even be willing to agree.
wolverian right, that's what I thought
autrijus except it's not specced that way.
chromatic That's awfully Self-ish, isn't it?
wolverian that's logical!
autrijus chromatic: yes and I think it's logical
especially we now allow type arithmetic 00:57
where you can write functions to calculate classes from classes
and use them in dispatch via where{} clause
chromatic There's just no syntax for saying "This method is okay to hoist into the appropriate metaclass".
autrijus but. that will deviate from the Perl 5 tradition so much.
wolverian autrijus: write about it on p6l? or is this set in stone?
autrijus as an implementation monkey I don't really have a strong opinion :)
wolverian: I don't feel strong enough to write p6l. 00:58
s/strong/strongly/
wolverian I just get a vague dread at Int.isa(Int)
svnbot6 r4030, Juerd++ | Example of better coding
wolverian I don't know why exactly.
(I haven't used OO enough to say.) 00:59
I'm trying to say that I don't know how these systems differ in actual usage.
autrijus $ perl -MDBI -e 'print DBI->isa("DBI")'
1
wolverian: some people would like to test Int.isa(Num)
chromatic Even though they should use .does(). 01:00
autrijus same thing.
wolverian autrijus: right.
autrijus instead of, say
chromatic At some point though the semantics are important.
wolverian Int.new.isa(Num) :)
Juerd wonders when inheritance is better than role stuff
autrijus Int.new.isa(Num) 01:01
yeah :)
Juerd wolverian: DBI.new connects.
autrijus actually
Juerd Not every new is pure, and some you want impure.
wolverian autrijus: so Int.meta.isa(Class)?
autrijus Int.instance.isa(Num)
wolverian: yeah
wolverian or is that .meta.meta I want?
autrijus the .instance thing is ruby.
(singleton instance, aka class method, but not called that)
wolverian right. I guess ruby's simplicity gets at you even after just a week or two of using it. 01:02
(in the good sense. and the bad.)
autrijus I should start writing some ruby :)
chromatic Funny, the last code I wrote before Haskell was Ruby. 01:03
autrijus :)
I still think p6's type system is a mess :)
wolverian I gave up after realising there's no built-in way to do Foo.new(named => 1, params => 2) and make it do accessors automatically. it just felt wrong not to have that built-in when the whole language is built around OO. but maybe that's just me and too much Attribute::Property. :p
svnbot6 r4031, Juerd++ | another variable name changed from meaningless name to descriptive of value
r4032, ninereasons++ | perl6.vim: capture vars and pod headers
autrijus (a mess, as in the "specced in a vague self-contradictory way" sense) 01:04
but at least I can help :)
wolverian (note built-in versus do-it-yourself-with-meta-programming, which I did)
chromatic autrijus, part of that is because no one really has experience defining a type system with the presence of actual roles.
autrijus chromatic: Fortress!
autrijus thinks Fortress's got a sound design. 01:05
wolverian does Fortress do this .isa thing differently?
autrijus but it's all based on compile-time binding of types
chromatic I feel a vague sense of unease, though, like in movie trailers that say "From the producers of <whichever Adam Sandler movie I didn't see last year>..."
autrijus chromatic: you mean the Guy Steele name? :) 01:06
wolverian: Fortress has typecasing!
wolverian what is typecasing? 01:07
kolibrie autrijus: log in so I can shower
autrijus (MMD too)
chromatic Yeah, the "Java is a lot like Lisp" thing bugs me.
autrijus kolibrie: I didn't see login info..
kolibrie e-mailed you
autrijus oh ok
kolibrie & 01:08
autrijus wolverian: typecasing is a switch/case statement on the type of sometihng. 01:09
kelan typecasting is when they only cast an actor for a certain type of role
and won't let him/her play anything else!
autrijus given $obj { when Foo { ... } when Bar { ... } } 01:10
but in p6 that is always runtime evaluated
whereas in Fortress that is always compile time.
chromatic Advance Polymorphism Substitute
autrijus I think the problem is p5's type system is that
Type == String
so everything needs to happen at runtime 01:11
chromatic When they compile that to real polymorphism, does the Vogon fleet sneak up on them again?
autrijus but now p6 wants to move _something_ to compile time
so that eg. unboxed types and compile-time mmd and context propagation works better
but p6 also allows type-level arithmetic using Int|Str and :(...)
and I'm having a hard time figuring out how much of it can happen at compile time in a consistent manner ;) 01:12
<- currently taking a "everything happens at runtime" attitude just to be 1)lazy 2)safe
but that means we get almost no compile-time errors. not saying it's worse than p5 :)
chromatic The last discussion I remember is that if you promise, at compile time, that you're not going to change the world at run time, you can optimize.
autrijus chromatic: so how can we disallow 01:13
eval ""'ing new subtypes
or new mmds
into existence?
because once that happens, all type-level optimisation are off.
consider 01:14
eval '::int := ::str';
chromatic The user has to promise that.
autrijus yes. I'm asking how :)
kelan use notypechangingpromise;
Juerd $?USER will { ... };
chromatic The last I remember (post-OSCON last year) was some sort of pragma to consider certain classes or modules closed or final or somesuch.
autrijus that sentence is not of much help to this implementation monkey :) 01:15
PerlJam chromatic: See Open vs. Closed Classes in S12
Juerd feeds autrijus bananas
chromatic You know @Larry[0].
PerlJam autrijus: you to. 01:16
er, too
Juerd Good night!
chromatic Ah, that's now how I remember it PerlJam, but thanks for the pointer.
S12 *did* come out later. 01:17
autrijus PerlJam: thanks!
wolverian chromatic: no, you can only close and finalize _all_ classes
autrijus mm optimize.pm and class.pm.
wolverian not individual ones.
autrijus I wonder if that line will join
use strict;
or
10 RANDOMIZER TIMER 01:18
as something that is mandatory ;)
(by convention, that is)
Juerd Or, *horrible*, $|++.
autrijus that too.
PerlJam autrijus: I don't think so.
Juerd Which is a BAD default.
kelan why do people write $|++ instead of $|=1? 01:19
PerlJam kelan: because they can
Juerd kelan: I have no idea.
kelan the second is clearer to me: set this value
Juerd cargo culting I guess.
kelan not, increment buffering
autrijus PerlJam: without that line, we can't do return type MMDs sensibly, and compile-time typechecking will be impossible
PerlJam autrijus: so convince $Larry to make that the default :) 01:20
autrijus oh and we also can't compile "1+2" to use integer registers in Parrot.
lots of things to lose ;)
but that is actually a good argument for it not being the default
Juerd Surely 1+2 is optimized at compile time to 3? :)
autrijus since
wolverian okay, time to sleep. 5am soon. :) cheers.
autrijus Juerd: how do you know that one line above, the user won't eval another multisub + ? 01:21
Juerd me sleep too
bye
autrijus Juerd: or redefine the int class?
Juerd autrijus: Hm, ouch, that does hurt.
SamB why does 1+2 have to do anything?
Juerd Perl 6 can never be faster than 5 that way.
chromatic optimize.pm is an optimization, that's why it's not the default.
Juerd afk
autrijus chromatic: er. 01:22
itym "an optimization that changes semantic"
if it doesn't, then it's always safe to make it default.
mauke "it's easy to get the wrong answer in O(1) time"
autrijus 42
SamB Perl ought to be purely functional, then you wouldn't have all these problems!
autrijus SamB: er, no. :) 01:23
PerlJam SamB: we all know where to find Haskell :-)
autrijus exactly.
chromatic It's a lot more functional by not being purely functional.
autrijus if there weren't Haskell or *ML, there may be a need to invent them.
SamB is kidding
chromatic Yeah, he's kidding *now*. 01:24
autrijus, there's an infinite loop in SUPER in roles. See t/oo/roles/super.t.
autrijus kolibrie: amazingly I'm building pugsembed fine on your machine
perlembed even
chromatic: roger. fixing 01:25
chromatic Inheritance is the problem there I think.
PerlJam wanders off to write some perl6 01:29
autrijus chromatic: yeah. it's resolving SUPER based on invocant. 01:31
instead of class name.
chromatic Easy mistake to make. I did it in SUPER.pm myself. 01:32
autrijus :)
fixed. committing 01:33
chromatic Just about everything of Test::Builder should work. I added a couple of other test files that show off problems and there's one really odd thing that doens't make sense.
s/ns/sn/
autrijus which one? just this one?
chromatic: are your writing some article about a working p6 Test::Builder module? :) 01:34
r4033, btw.
chromatic No, it's in the 020*t file. It's complaining about not being able to find &Test::Builder::Test::Plan, which is odd.
svnbot6 r4033, autrijus++ | * chromatic++ noticed that ./SUPER::method() was looking
r4033, autrijus++ | up SUPER from invocant, not the current class.
chromatic It's in the Test::Builder::Test::Plan.new() call. 01:35
Is there a length limit somewhere for identifiers?
autrijus no.
how stupid would that be :) 01:36
chromatic Hey, I remember 1990.
I have to go now though. Thanks again.
autrijus np :)
kolibrie: it's complaining that it can't find -lperl
and indeed there's only /usr/lib/libperl.so.5.8 not /usr/lib/libperl.so 01:37
I manually tweaked the line to include /usr/lib/libperl.so.5.8
kelan i think standard C only recognizes the first 40 characters of an identifier for uniqueness
autrijus look at ~autrijus/pugs/sh
mauke kelan: which standard C? 01:38
kelan um 01:39
dunno?
i just vaguely remember that
i havent used C in a long time
Khisanth I thought that was only with OOOOOLD C compilers?
kelan maybe it wasnt standard:) 01:40
could be
mauke in C89 all you get is six characters
autrijus kolibrie: but I didn't run into your build problem at all.
mauke case insensitively
that's just the guaranteed minimum, of course
most compilers/linkers support more
kelan after using visual basic for work, i actually like case insensitivity 01:41
mauke ew 01:42
kelan why would you possibly need two variable names that differed only in case
it just allows you to make typos
mauke because case insensitivity is ill defined 01:43
autrijus kolibrie:
$ ./pugs -e 'use CGI--perl5; say CGI.new'
<obj:Scalar::Perl5>
in vs3 ~autrijus
Khisanth especially when you have unicode identifiers :)
mauke do you really want GRōæ½xD6SSE to be the same variable as grōæ½xF6ōæ½xDFe?
(or grōæ½xF6sse, depending on your current locale) 01:44
Odin-LAP de_CH ?
mauke yep
Odin-LAP :p
svnbot6 r4034, autrijus++ | * add stub casting from SV to VList
kolibrie autrijus: ok 01:46
autrijus autrijus@vs3:~/pugs$ ./pugs -MCGI--perl5 -e 'say CGI.VERSION' 01:49
3.04
svnbot6 r4035, autrijus++ | * ugly horribly hack to get `DBI.VERSION` working
autrijus looks all OK now.
I don't know how to solve the -lperl not found problem 01:50
the -lperl is from %Config
kolibrie thanks very much 01:51
autrijus np :)
kolibrie if I try to rebuild in my pugs, will that work, or should I scrap that and start over? 01:52
theorbtw1 Autrijus: the -lperl issue is on lilith? 01:53
01:53 theorbtw1 is now known as theorbtwo
autrijus theorbtwo: no, on kolibrie's 01:54
kolibrie: I think you can raze your checkout and start over
kolibrie: copying my ~autrijus/pugs/sh if needed
kolibrie :)
autrijus $ ./pugs -MSVK::Simple--perl5 -e 'my $svk = SVK::Simple.new; $svk.ls("//")'
mirror/
pugs/
yay.
bin/svk in perl6 is now entirely trivial 01:55
meppl gute nacht 02:09
theorbtwo Goodnight, meppl. 02:11
meppl ;) 02:12
kolibrie autrijus: maybe I can figure out the -lperl thing tomorrow 02:17
can you e-mail me and tell me what your pugs/sh does? 02:18
autrijus kolibrie: that'd be great. then we can switch to build embperl by default (with probing that it actually works)
kolibrie: I just changed -lperl into /usr/lib/libperl.so.5.8
that's all.
nothing else
kolibrie ok
autrijus I'll sleep now. see ya :) *wave* & 02:19
kolibrie me too &
eric256 dead in here? juerd still around? 02:39
vcv-- he's off fighting some OS wars 02:41
eric256 lol. i thought maybe he had another tab/space war somewhere. ;) 02:42
kelan tabs are the best! 02:45
eric256 .<key> //= ++$i for @options ; 02:56
how do i make $_ rw there?
hmm maybe that isn't the problem....either way shouldn't that autovivify the hash key? 03:00
am i talking to myself?
lol
hmmm...seems it might just be an issue with using key as the name of a key...thinks you are trying to use a Pair object for some reason 03:13
kelan i wouldnt think `key` would be special inside a string tho 03:18
eric256 .<key> keeps trying to call the method &key though
kelan seems like a parse error then
eric256 *** No compatible subroutine found: "&key"
hmmm... trailing for + . syntax fails 03:20
.key for @options; # failes
$_.key for @options; # works
off to see if a test exists yet 03:21
hmmm it works in a test. that is odd. 03:27
or it was a bad test...yep bad tests....objects show as equal in an is() test even if there values arn't equal 03:28
okay i've officaly lost my mind. 03:31
must be some sort of parse error because it depends on what operators you use after the .key portion 03:40
kelan so like `.<key> + 2` might work but `.<key> for %foo` wouldnt? 03:43
yes, i would say parse error
eric256 almost exactly like that.
try { .key //= 1 for @array1 }; # works
try { .key //= ++$i for @array1 }; # fails
kelan seems like the `for` modifier is messed up 03:47
eric256 now i know i have lost it....now .key fails either way.. i must be doing something stupid
kelan heh
i don't have pugs installed so i'm no help either
eric256 i new i should have left those tests in there even though they passed...then maybe i could have noticed i what i did
you should get an account on feather
kelan but what would i do? 03:48
i guess writing tests is easy enough
eric256 i program my little wizard game and write tests for bugs i find 03:49
i couldn't read the haskel part if my life depended on it. ;)
kelan i can read some of it
i started learning haskell a couple months ago
is there networking yet? 03:50
like sockets, etc?
eric256 well there is access to all perl5 modules so i suppose in some fashion the answer is yes 03:51
so any ideas where in the haskel i would look for how it handles trailing for?
vcv-- if you've never done haskell, i dont think you want to even look 03:52
svnbot6 r4036, eric256++ | Added tests for bugs in trailing for statment
eric256 i just want to look, not touch.
kelan i don't know the codebase at all, so i can't give any tips 03:53
vcv-- as did i. then i cried. 03:55
kelan heh
eric256 lol
it looks pretty interesting
vcv-- its just so foreign to me. ill read a tutorial..but it seems each and every one will show stuff and not explain just a few things 03:56
eric256 reading Parser.hs which has a definition for a regular for...not sure if it covers teh trailing for though
clkao *yawn*
vcv-- so i have no idea how they got from D -> E
eric256 any ideas what the trailing for might be called? like modifier or something 03:57
line 731 of Parser.hs .... no idea what it realy means. but that is definitly the definition of trailing for 04:02
clkao autrijus: mmm roundtrip.t still fails 04:09
svnbot6 r4037, SamB++ | Export withArgs from Main
eric256 maybe it isn't parsing so much as .method failing to act on the correct $_
does { } no longer produce a hash ref? 04:24
clkao ok 10 - invoke pugs method from p5 04:27
bwahaha
Khisanth eric256: I think you have to have certain things inside it to be considered a hash 04:28
eric256 clkao: any idea on how to convert an array to a hash?
my %hash = hash( map { $_ => $_ } @array ); failes
Khisanth map { $_ => $_ }, @array; perhaps? 04:31
eric256 nope.... $_ => $_ is creating pair objects which %hash doesn't seem to be expecting 04:32
svnbot6 r4038, clkao++ | Properly invoke pugs object method from perl5.
Khisanth map { $_ => $_ } @array with the {} being a hash is actually kinda confusing... 04:33
clkao autrijus: i have some thoughts about DBI.VERSION stuff
eric256 the {} isn't a hash, its a code block 04:34
Khisanth I thought you just said you wanted it to be a hash?!
eric256 lol. no no. you got lost somewhere. i want to take an array and map it to a hash. like if @array is a set of objects with key values. use those key values as the key in a hash 04:36
my %hash = map { $_.key => $_ } @array;
my %hash; %hash.{ $_.key } = $_ for @array; might be the way to go. dunno 04:37
scook0 eric256: If your argument to map looks like a hash (but shouldn't be), you need to put a semicolon in there
svnbot6 r4039, eric256++ | applied Juerd's suggestions with modifications to make them actualy work. ;) + new Option object
scook0 map { $_.key => $_; }
eric256 ah ha! thanks 04:38
scook0 I think that needs to be put in a FAQ somewhere, if it isn't already...
Khisanth Hang out in #perl6 and learn by osmosis! :) 04:45
svnbot6 r4040, eric256++ | small hash creation change...what a difference a ; makes inmy %hash = map { $_ => $_; } @array;
Khisanth would @array ==> map { $_ => $_; } ==> %hash be valid? 04:47
eric256 i don't think ==> is done yet ;) 04:48
vcv-- are all of the operators going to be defined with perl code themselves? 04:49
eric256 probably not. that normaly isn't the fastest way to do it 04:50
but it looks like you would be able to define them all with perl code...
Khisanth work first optimize later!
eric256 if only the same was true of statments then things like given and when and for etc could be defined by perl itself. now that would be something ;) 04:51
svnbot6 r4041, clkao++ | Fix roundtrip.t, invoker is now properly set to NULL for non-method call.
eric256 maybe macros will bring that
according to S06 that should work ye 04:54
s
Khisanth hmm they all get turned into PIR anyway don't they?
eric256 maybe they will now then. i don't know anything about compilers so don't rely on me 04:55
svnbot6 r4042, gaal++ | fix Pugs::Internals::hSetBinaryMode and Pugs::Internals::openFile Prim decl records, autrijus++ 05:59
Aankhen`` :-\
I'm compiling! 06:00
IshaCocoa is there a step-by-step guide to getting pugs to build on windows anywhere? 06:01
Khisanth isn't "foo" ~~ m:perl5 /PATTERN/ equivalent to "foo" =~ /PATTERN/ ?
Aankhen`` IshaCocoa >> Are you having trouble with getting it to compile or do you just need to know the steps to follow? 06:03
IshaCocoa Looking for what I need to download to get started. 06:06
gaal there are binary builds of parrot and of pugs, that's a start :) 06:07
what c build system are you using? 06:08
Aankhen`` Remind me not to accidentally kick my router's power supply. 06:15
Darren_Duncan fyi, following Autrijus' journal comment that class methods now work, I'll try over the next day getting the Locale-KeyedText test suite to run again, and identify the most pertinent remaining Pugs issues that exist 06:28
svnbot6 r4043, ninereasons++ | perl6.vim: highlight pod and kwid =head 1,2 and 3,4 06:56
08:13 Aankh|Clone is now known as Aankhen``
Aankhen`` Yeesh. 09:04
SVN doesn't like me much.
Khisanth sacrifice a camel to Larry 09:06
Aankhen`` ...or `rm -rf ext` and `svn up`. :-D 09:07
svnbot6 r4044, Aankhen++ | * added first version of HTTP::Headers::Util. 09:21
r4045, Aankhen++ | * fixed small bug relating to , vs. ; in &HTTP::Headers::Util::join_header_words.
nothingmuch morning 09:31
masak morning 09:33
IshaCocoa nick IshaCocoa 09:39
broquaint pugsbug: pugs -e 'sub f { say $_ while $_ = @_.pop } f <<one two three four five>>' # Undeclared variable: "@_" 10:20
integral is (*@_) the default signature on functions without one?
broquaint Ya. 10:22
*@_ is rw IIRC
Although I think splatty with rw is meant to fail. 10:23
Aankhen`` Why?
broquaint Can't remember. 'sprobably in an AES somewhere. 10:24
lathos How do I declare a class variable?
integral "our"?
lathos Huh. 10:25
Aankhen`` Class variable or class member?
lathos Class member, I think.
Yes.
broquaint According to E12: Class attributes are declared with either my or our. The only difference from ordinary my or our variables is that an accessor is generated according to the secondary sigil: (some code)
Aankhen`` class Foo { has $.bar; has @.baz; has %.quux; }
lathos That looks like an instance member to me.
Aankhen`` Hrm, maybe I'm the one who's confused. 10:26
integral class Foo { our $bar; method a { $bar = 5 } method b { $bar } } my $f = Foo.new; $f.a; say $f.b; # works
Aankhen`` goes to read E12.
lathos broquaint: OK, so "our $.foo"?
Aankhen`` Er... where is E12, broquaint?
integral that looks unimplemented in pugs
Aankhen`` Nevermind, I'll read S12.
broquaint According to S12, lathos. 10:27
lathos I'm delighted to find that "require $.config.model_class" works.
broquaint Sorry, Aankhen``, I meant S12 :)
lathos Perhaps by accident, but I like it. :)
Aankhen`` Heh, I saw that later.
So `has $.foo` is an instance variable and `our $.foo` is a class-scoped variable? 10:28
Oops, gotta run.
Later.
lathos Hrm, yeah, pugs is unhappy with that.
I'll use instances for now.
Oh, class constants don't work yet in pugs? 10:39
broquaint Probably not. The OO stuff is still pretty bare bones :? 10:40
lathos *nod*. It looks like I can fake it with string constants. 10:41
Oh, no, I can't. 10:42
pugs> "x".new()
{obj:Str}
broquaint Hmm ...
lathos That makes sense, but how to I instantiate an object of class x?
clkao .=new ? 10:43
broquaint It's time to get reacquainted with that dear old friend, eval :)
lathos Urgh, maybe.
broquaint For the time being.
Juerd Hello, lathos 10:48
lathos: ::("x").new, IIRC
But pugs doesn't know that yet :) 10:49
integral, broquaint: the default is *@_, without rw -- conversion from Perl 5 requires explicit *@_ is rw
autrijus: Are symrefs on your todo list yet? 10:51
broquaint No symrefs in perl6 please!
Juerd They have their uses. 10:52
broquaint Because accessing the symbol table is kludgy.
Juerd And practically, specifying a class by name as a string, is referencing it symbolically.
Same goes for methods
broquaint Everything needs to be looked up by a string, whether it be parsed as such or not, it doesn't mean that symrefs are a necessity though. I just the behaviour of symrefs could be wrapped away in some nice methods/builtins/whatever. 10:54
s/just/just think/
Juerd Not really, now classes are objects.
You should be able to rename a class without making references to it unusable.
There are anonymous classes too 10:55
So ref by name as the standard solution no longer makes sense.
broquaint I still want symrefs to go away, I reckon perl6 is a much cleaner language without them. Ho hum. 10:57
Juerd We need them for class access. 10:58
Well, we don't NEED to, but it's the one area where symrefs are accepted 10:59
broquaint Accepted because there's no other way to do it.
Juerd (The alternative is to use a dispatch table, but that quickly gets boring: :foo(::foo), :bar(::bar), etc. To build this table, you'd automate it, and that requires symrefs again :P)
Sorry, should have used => syntax there of course 11:00
foo => ::foo, bar => ::bar.
lathos: That'd solve your problem for now, if you don't need arbitrary classes
{ foo => ::foo, bar => ::bar }{$string} 11:01
Aankhen`` If you have $foo of class 'x', you could create a new object of that class using $foo.ref.new()
broquaint Why do you need a dispatch table to access the symbol table?
Juerd broquaint: No, to avoid that.
broquaint Maybe I should just write a symbol table access module to avoid symref hackery ... 11:05
Juerd It's exactly the same thing in the end
But with different syntax.
broquaint Indeed. But why use that syntax in the first place? Seems a little backward, no? 11:06
Juerd Because it's a very useful feature.
Of course, like any feature, it can be used wrong.
But it's not Perl's job to decide if symrefs are the right tool or not.
Face it, Perl is a language that puts YOU in control.
Even if you're stupid.
masak Perl++ 11:07
I want to be able to be stupid in my language of choice
Juerd It lets you use goto LABEL, it lets you use symrefs, it lets you use eval, it lets you execute system calls, it even lets your stupidity access the outside world through sockets.
Perl, as generic technology, can be used for destructive purposes. And for good. 11:08
masak Perl is a very efficient spamming tool. That's stupidity.
Juerd Yes
Spamming is bad
But that doesn't meant Perl should do anything to avoid it.
broquaint I like symrefs, or at least, what they represent, but not their interface.
Juerd That's not Perl's area.
Aankhen`` masak++ # I agree. 11:09
Juerd broquaint: I happen to like the ::() syntax.
broquaint I've no doubt you do :)
Aankhen`` (about the language of your choice bit ;-)
broquaint It's certainly much nicer than perl5's syntax.
Juerd I never did mind ${"Foo::$_::BAR"}, really. 11:10
$Foo::($_)::BAR is a little bit nicer
broquaint ${"Foo::$_\::BAR"} ;)
Juerd Eh, yes, that :)
Aankhen`` Why the \?
Juerd autrijus: $_::BAR
eh
autrijus: ignore that
Aankhen``: $_::BAR 11:11
broquaint $_::BAR is a valid var, Aankhen``.
Aankhen`` OK.
Juerd package _; $BAR = 5;
Aankhen`` Ah, double OK.
It took some time for that to sink in. :-)
broquaint There's no such thing as a package in perl6, right? It immediately assumes perl5 code doesn't it?
Aankhen`` According to the language specifications, yes, IIRC. 11:12
WB.
Juerd broquaint: But there is, afaik.
masak <general-whine>oh, why is there such a thing as character encodings?</general-whine>
broquaint Why does it do in perl6, Juerd? 11:13
Juerd masak: You know why.
broquaint s/Why/What/
Aankhen`` Hrm.
Juerd broquaint: Same thing as in Perl 5 iirc
masak Juerd: stupidity again?
Juerd I really do see nothing wrong with namespaces.
Not everything is good for OO. 11:14
afk
masak I want a way to be sure of which encoding I'm seeing without the string telling me excplicitly
besides, the string might be lying 11:15
Aankhen`` o_O
masak is there an (arbritary string)->(guessed encoding) tool?
Aankhen`` You'd need to port Encode.
Umm... iconv?
masak searches of iconv
Aankhen``: looks neat. thx! 11:16
Aankhen`` NP. :-D
zgrim hello, i have a problem with Compiling Pugs.Embed.Perl5 ( src/Pugs/Embed/Perl5.hs, src/Pugs/Embed/Perl5.o ) -> /usr/lib/perl/5.8/CORE/reentr.h:611: error: field `_crypt_struct' has incomplete type 11:19
lathos I do need arbitrary classes.
zgrim on a debian box with ghc 6.4
is this common ?
it's the same problem as with swig unless passing -D_GNU_SOURCE to gcc ; how can one pass that one to ghc ? or is the problem elsewhere ? 11:21
integral got the same error on his overnight debian pugs build 11:22
hmm, well ghc is invoked with a -D_GNU_SOURCE flag 11:23
zgrim integral: ghc is called with $Config{ccflags}, so there shouldn't be this problem, but still ... :/ 11:26
integral tries a rebuild
nah, still broken :-) 11:27
zgrim yes, i tried 4046 a few minutes ago
integral has no idea] 11:28
Aankhen`` There are a few tests for `where` in t/data_types/subtypes.t; any objections to my creating a seperate t/var/where.t? t/subroutines/sub_parameter_traits.t is another place where I could add some, I think. 11:32
integral ah, whoever was fiddling with Makefile.PL also broke it for OS X too :-) 11:38
hmm, it might have been me come to think of it
Aankhen`` :-o
integral ah, no, I used single quotes 11:39
ah, ccflags was added, before only ccdlflags were used
svnbot6 r4046, bsmith++ | Fix to make the -optl flag adding work for at least myself 11:46
r4046, bsmith++ | (split into multiple -optl's one for each flag).
integral tries r4046 on debian 11:47
zgrim integral: afair, the problem appeared before r4000 11:48
integral nah, that doesn't fix it.
hmm! Well the two commits 3996, 3994 touched Makefile.PL and were mine... 11:49
Aankhen`` Could someone try and figure out why ext/libwww-perl/lib/HTTP/Headers/Util.pm won't parse? 11:51
integral zgrim: hmm, I can't really see what might have broken it
ok, it's before 3905 11:52
svnbot6 r4047, Aankhen++ | * HTTP::Headers::Util Ć¢ā‚¬ā€ fiddled with sub signatures a bit, fixed missing semi-colon!
r4047, Aankhen++ | * added version of &HTTP::Headers::Util::join_header_words that takes a slurpy array.
integral ah, it builds with r3855 of Makefile.PL 11:54
and it builds with r3864 of Makefile.PL. 11:58
integral goes to lunch
meppl guten morgen 12:00
webmind morgen 12:06
cognominal bonjour :)
meppl good morning webmind
and cognominal
Aankhen`` Pugs doesn't seem to be handling an escaped delimiter within a regex too well. 12:07
Aankhen`` looks at t/rules/perl5.t and dies. 12:09
svnbot6 r4048, iblech++ | Usual svn properties added to t/oo/roles/{submethods,super}.t and 12:13
r4048, iblech++ | src/Pugs/AST/Types.hs.
r4049, iblech++ | * Added info about how to use the Compose Key to docs/quickref/unicode.
r4049, iblech++ | * Fixed a small error in docs/other/porting_howto (s/sub/method/).
integral r3883 is the one that breaks debian embed perl 12:24
hmm! The only thing that changed to Makefile.PL there was PUGS_EMBED_PERL5 changes PUGS_HAVE_PERL5 ! 12:26
Aankhen`` How do I dereference a scalar?
$$foo doesn't seem to be working.
Nor $$$foo. 12:27
Nor $$$$foo.
12:27 _meppl_ is now known as meppl
integral hrm, I can't figure out what the difference is: rm -f src/Pugs/Embed/Perl5.o && svn update -r 3883 Makefile.PL && perl Makefile.PL && make # doesn't build 12:34
svnbot6 r4050, iblech++ | More work on util/perl6.vim.
integral but change to r3864 and it builds :-/
duh. 12:35
I'm an idiot. That's just changing PUGS_EMBED_PERL5 to PUGS_HAVE_PERL5, and of course I'm not changing any other source files... *Sigh*
svnbot6 r4051, iblech++ | util/perl6.vim -- Highlight ::Class, too. Next thing is probably to highlight 13:09
r4051, iblech++ | class __HighlightClassname__ {...}.
r4052, autrijus++ | * remove the arbitary 128-char limit on perl5 calling pugs
r4052, autrijus++ | methods, as the leading '&' is not mandatory in callconv.
r4053, autrijus++ | * perl6.vim: Correctly highlight the empty string quote `<>` 13:25
r4053, autrijus++ | by using zero-width lookahead and lookbehinds
13:29 broquaint_ is now known as broquaint
svnbot6 r4054, autrijus++ | * perl6.vim: constrain `< ... >` to one line, lest we 13:52
r4054, autrijus++ | misparse `1 < 2` lines.
r4055, autrijus++ | * wizard.p6: Style fix -- `.foo` instead of `$_.foo`, use
r4055, autrijus++ | more method interpolation in strings.
r4056, iblech++ | util/perl6.vim -- Highlight $*VARs, too.
lathos perl6.vim should also highlight "has" 13:55
kelan can alphabetic operators like `and` be used the the reduction meta-op? to wit: `$alltrue = [and] @somevals;` 14:02
maybe i should just get an account on feather so i can test these things myself. heh
broquaint Should do, kelan. 14:08
svnbot6 r4057, scw++ | r4120@scwnb: scw | 2005-05-28 22:02:26 +0800
r4057, scw++ | perl6.vim: hilight `has' and hilight q// only on word boundary.
scw Oops, haven't use svk for a long time and forgot to add -l .. 14:09
broquaint Yep, definitely works, kelan.
kelan woo 14:10
ihb in Perl 6, will I be able to redefine how e.g. "sub foo { ... }" acts? correct me if i'm wrong on this, but i believe that in Smalltalk you can redefine that because subcreation is a message to a class, and so is class creation, etc. I find that quite appealing. 14:23
integral at the very least you can change the grammar 14:34
Aankhen`` integral >> Would you happen to know how to dereference a scalar? 14:38
integral $$foo ?
Aankhen`` Doesn't work. 14:41
Nor does $$$foo or $$$$foo.
integral has no ideas 14:42
Aankhen`` pugs> my $foo = \("bar"); say $foo.perl; say $$foo.perl;
\'bar'
iblech I think you don't have to dereference -- i.e. $foo ~ $bar will work. No need for $$foo 14:43
Aankhen`` I'm running into trouble with a sub that requires a Str. 14:44
integral how does that square with the no-more-automatic-infinite-deref thing?
Aankhen`` Oh, and on a completely unrelated note, has the behaviour of modules which export subs been changed? 14:45
Do we need to use `is export(:DEFAULT)` and so on now?
iblech No, IIRC, all subs are still exported 14:46
?eval 32 + 10 14:49
evalbot6 42
iblech ?eval [+] 1,2,3
evalbot6 6
iblech ?eval system "echo hi"
evalbot6 No compatible subroutine found: "&system"
iblech :)
kelan ?eval my $a=1; say $a; 14:51
evalbot6 No compatible subroutine found: "&say"
kelan oh right 14:52
?eval my $a=1; $a;
evalbot6 1
kelan ?eval my @a = (1,1,1,1,1,1,1); [and] @a;
evalbot6 1
kelan ?eval my @a = (1,1,1,1,1,1,0); [and] @a;
evalbot6 0
integral hmm, that seems somehow a wee bit nicer than all()... 14:53
kelan well it gives different results. `all()` returns a junction, whereas `[and]` returns a bool
theorbtwo [and] ands them all. all creates a junction.
Junctions are strange things.
integral hmm, when would that actually matter? 14:54
kelan after that huge thread on p6l about junctions with rob and damian going back and forth, i'm not sure junctions are useful enough to overcome their pitfalls
ihb integral: changing the grammar isn't good enough for introspective and reflective programming.
kelan people are going to want to use them like sets
integral ihb: *nod* you really want the Code type to be reified into perl6 14:55
and for sets we have a proper Set class
theorbtwo reified?
ihb integral: "reified"? 14:56
integral thingified literally
ie manipulatable as perl6 objects
theorbtwo Ah.
Yeah, I want that too.
It lets you do real symbolic modification.
integral Rather than being lots of hardwiring inside the haskell
kelan integral: but i think people will want sets more than junctions, so it doesn't make sense to have junctions in the core and sets in a module
they should be switched
integral kelan: well imho neither should be in core 14:57
I quite like the Pugs.Internals module which just loads all the basic stuff Pugs need
kelan integral: i would prefer neither in the core to junctions in but sets not
iblech ?eval [and] (1,2,3,4) Ā»>=Ā« 2 # [and|or|...] and hyper ops can be used to emulate junctions, me thinks
evalbot6 (no output)
integral but there's lots of stuff there that pugs needs everywhere, but your average project doesn't.
theorbtwo I think the core is quite a bit t^H^H too big.
iblech ?eval [and] (1,2,3,4) >>>=<< 2 # [and|or|...] and hyper ops can be used to emulate junctions, me thinks
evalbot6 (no output)
iblech ?eval [and] ((1,2,3,4) >>>=<< 2)
evalbot6 (no output)
iblech bleh
kelan you have three > on one side 14:58
iblech yeah, I want to >=
kelan ah
theorbtwo Evalbot needs to handle the error case better.
iblech ?eval ([and] (1,2,3,4) >>>=<< 2).perl
evalbot6 bool::false
iblech ?eval ([or] (1,2,3,4) >>>=<< 2).perl
evalbot6 bool::true
integral hmm, maybe it should .perl the expression always?
iblech Good idea. 14:59
kelan ?eval +((1,2,3,4) >>>=<< 2)
evalbot6 4
kelan hm
should be 3?
oh maybe it counts the false value as an element
hmm
iblech No, as the result is (false, true, true, true) -- a 4-element list
kelan nod
Chewie[] Hey, A04 says that if right curlies are on a line by themselves, they imply a semicolon, but curlies at the end of a line (that end a block) don't, and require one from the user. Wouldn't it make more sense to just think of it as a curly on the end of a line, instead of on a line by itself?
kelan ?eval (1,2,3,4) >>>=<< 2 15:00
evalbot6 1 1 1
iblech ?eval ((1,2,3,4) >>>=<< 2).perl
evalbot6 (bool::false, bool::true, bool::true, bool::true)
integral ah, >>>=<< is very confusing to read :-)
iblech ?eval ((1,2,3,4) Ā»>=Ā« 2).perl
evalbot6 (bool::false, bool::true, bool::true, bool::true)
kelan false stringifies to undef but true stringifies to 1?
iblech :)
Chewie[] ?eval hash { 'foo' => bar }.perl
evalbot6 No compatible subroutine found: "&bar"
iblech false stringies to "", true to "1", yes 15:01
Chewie[] Oh. I'm evil.
?eval hash { 'foo' => 'bar' }.perl
evalbot6 foo bar\undef
iblech ?eval (hash { 'foo' => 'bar' }).perl
evalbot6 {('foo bar' => undef)}
iblech ?eval ({ 'foo' => 'bar' }).perl
evalbot6 {('foo' => 'bar')}
iblech hash() seems to be a bit borken
kelan ?eval all(1,2,3,4)
evalbot6 1
kelan ?eval all(1,2,3,0)
evalbot6 0
kelan hmm 15:02
how can i get evalbot to display the junction?
?eval all(1,2,3,0).perl
evalbot6 (0 & 1 & 2 & 3)
kelan ah
theorbtwo (.perl)++
kelan does the reduce meta-op always reduce from the left? 15:03
?eval [>=] 2,1,2,3,4
evalbot6 (no output)
kelan hm
not sure what that should give anyway
?eval ([>=] 2,1,2,3,4).perl 15:04
iblech ?eval ([>=] 2,1,2,3,4).perl
evalbot6 bool::false
Chewie[] ?eval +<< (1 | 2 | 3)
evalbot6 Hyper OP only works on lists
Chewie[] heh.
kelan heh
Chewie[] ?eval +<< [(1 | 2 | 3)]
evalbot6 any(1,2,3)
Chewie[] ?eval +<< [1, (2 | 3)]
evalbot6 1 any(2,3)
Chewie[] ?eval +<< [1, 2, 3]
evalbot6 1 2 3
kelan you're calling prefix numification on them
Chewie[] ahhh. 15:05
?eval >>+<< [1, 2, 3]
or no?
i'm only just reading about the hyperops.
kelan do you want to sum them+
?
Chewie[] ?eval [+] [1, 2, 3]
evalbot6 1 2 3
Chewie[] kelan: that's my current project, yeah.
iblech ?eval [+] (1,2,3) 15:06
evalbot6 6
kelan i think that last one didn't work because the arrayref doesnt deref
Chewie[] that was my next try. heh.
yeah.
?eval [+] *[1, 2, 3]
evalbot6 6
kelan ?eval [+] @{[1,2,3]}
evalbot6 6
Chewie[] ?eval [==] [2,3] 15:07
evalbot6 1
svnbot6 r4058, autrijus++ | * Chained Perl 5 method invocation now works:
r4058, autrijus++ | SVK::Simple.new.ls("//")
Chewie[] that doesn't sound right.
?eval [==] [2,2]
evalbot6 1
Chewie[] er. heh.
kelan ?eval ([==] [1,2]).perl
evalbot6 bool::true
kelan hmm
Chewie[] ?eval [==] *[2,3]
evalbot6 (no output)
kelan oh right
Chewie[] ?eval ([==] *[2,3]).perl
iblech It's because of the []s, () is correct
evalbot6 bool::false
iblech ?eval ([==] 2,3).perl
evalbot6 bool::false
iblech ?eval ([==] 3,3).perl 15:08
evalbot6 bool::true
kelan doesnt reduce provide list context?
i thought arrayrefs would deref in list context
iblech Dunno, ask Juerd :)
kelan yeah hes the context wizard
clkao autrijus: what was the problem? also, pl_sv_undef needs to be handled.. otherwise invoking on that makes pugs sick
kelan Juerd: wake up! 15:09
Chewie[] is .perl going to replace Data::Dumper?
kelan we need a magic8ball bot that answers yes/no questions 15:10
iblech :)
kelan magic8: is .perl going to replace Data::Dumper? <magic8> uncertain, it is
integral perlbot 8ball is .perl very cool? 15:12
clkao autrijus: SVN::Core.VERSION no longer works 15:13
svnbot6 r4059, iblech++ | evalbot added to examles/network. 15:28
theorbtwo ?eval die "Test" 15:31
evalbot6 Error: Test
theorbtwo ?eval + 15:32
evalbot6 Error:
theorbtwo Ah.
svnbot6 r4060, iblech++ | Pugs.Prim, Pugs.Internals, Pugs.Run: safemode. 15:33
r4060, iblech++ | If the environment variable %*ENV<PUGS_SAFEMODE> is set to "true", the prims
r4060, iblech++ | marked as "unsafe" in the big table of Pugs.Prim are not imported into the pad,
r4060, iblech++ | so they can't be used.
r4060, iblech++ | Autrijus: The simple substitution of runEvalIO to runEvalSTM isn't so simple as
r4060, iblech++ | we've thought, as there're many places where unsafePerformIO is used (e.g. in
r4060, iblech++ | the parser)...
iblech ?eval + 15:34
evalbot6 Error: unexpected end of input expecting term
iblech ?eval 1 == 0
evalbot6 bool::false
iblech :)
svnbot6 r4061, iblech++ | Added $?PUGS_VERSION pseudo-var to answer the question "what revision does 15:41
r4061, iblech++ | evalbot run on?".
integral iblech: ./pugs -e'say %?CONFIG<pugs_version>' # you can just use %?CONFIG 15:43
?eval %?CONFIG.keys 15:46
evalbot6 ()
integral ?eval %?CONFIG<pugs_version>
evalbot6 Error: Can't modify constant item: VRef <Hash>
integral ?eval do { my $a = %?CONFIG<pugs_version>; $a }
evalbot6 Error: Can't modify constant item: VRef <Hash>
integral o_O
iblech integral: Yep, thought that too, but %?CONFIG is hidden in safemode, as %?CONFIG contains some more information one might not want to reveal 15:49
And it'd be more hard to only hide %?CONFIG{none "pugs_version"}
hcchien interesting, split() is different with split () 15:50
iblech Yep, split(...) passes ... as parameters to &split, and split () passes () as parameter to &split
Chewie[] iblech: Is that intentional? 15:51
stevan iblech: I assume you are blocking against system calls with the eval bot
iblech The split thing? Yep. Hidden %?CONFIG in safemode? Yep, too. 15:52
stevan: Yep
?eval system "hi"
evalbot6 Error: No compatible subroutine found: "&system"
stevan but are you guarding aginst odd uses of Inf?
iblech ?eval [1...]
evalbot6 pugs: out of memory (requested 1048576 bytes)
stevan LOL
nice
integral ?eval do { my $a := [1..] }
evalbot6 Error: unexpected "{" expecting expression, ":", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
iblech ?eval 1 while 1 # will die after 7s or so
evalbot6 (no output)
iblech ?eval do { my $a := [1...] } # You forget a "." 15:54
evalbot6 pugs: out of memory (requested 1048576 bytes)
iblech s/forget/forgot/
integral ah
Chewie[] ?eval ([1...])[0] 15:55
evalbot6 pugs: out of memory (requested 1048576 bytes)
integral one wonders why an infinite list only needs a meg...
Chewie[] integral: Pugs probably requests by the meg. 15:56
integral: The error is just after the last meg that's successfully taken.
integral hmm
Chewie[] It requests until it can't request no mo'.
autrijus iblech: hash() is not broken -- see definition 15:57
?eval hash(1, 2)
evalbot6 {('1' => 2)}
iblech Ah, yes, of course 15:58
Chewie[] autrijus: ahh. it takes the object returned by the => and makes it a key, with a value of undef?
autrijus: that's counterintuitive to me. it should absorb keys in-line with other data.
er, not keys, key-value pairs. 15:59
A04 said something about hash {} being for disambiguation for blocks.
autrijus Chewie[]: S04 trumps it. 16:00
$coderef = sub { "a" => 1 };
$hashref = hash("a" => 1);
$hashref = hash("a", 1);
Chewie[] ah. /me just started reading the apocalypses. 16:02
autrijus hcchien: nopaste your ov program somewhere? 16:06
pasteling: paste?
obra hello, lambdacamels
autrijus pasteling: nopaste
pasteling: help
obra: greetings jesse-san
stevan ?eval ('iblech++') xx 5 16:07
evalbot6 ('iblech++', 'iblech++', 'iblech++', 'iblech++', 'iblech++')
stevan :)
autrijus stevan: clever!
obra evalbot6? does it have system? ;)
theorbtwo ?eval `ls`
evalbot6 Error: unexpected "`" expecting program
autrijus obra: pugs has got a Safe mode. 16:08
obra a real safe mode?
iblech obra: Of course not :) -- It is guarded against IO primitives (safemode) and eating too much RAM or CPU (setrlimit) 16:09
kelan haskell makes it easy to forbid io interaction
iblech obra: Try it and see: PUGS_SAFEMODE=true pugs -- and then try system, readline, etc.
obra net
neat
autrijus stevan: fancy starting changelogging? I won't have time to hack in major features before 6.2.6 16:11
so I'm thinking a release within the next 24 hours or so
if that's okay with you, that is
stevan autrijus: sure
autrijus: thanks for the journal entry too :)
autrijus stevan: :)
stevan although I must say, I usually go through the SVN log first, then augment it with your journal
autrijus sure 16:12
clkao autrijus: heym you broke DBI.VERSION
svnbot6 r4062, ninereasons++ | perl6.vim: minor; move some keywords around
autrijus $ ./pugs -MDBI--perl5 -e 'say DBI.VERSION' 16:13
1.48
stevan autrijus: BTW - I am still working on the metamodel, but I have started using perl5 because pugs was getting to slow
autrijus clkao: worksforme
clkao (!)
autrijus stevan: wow. sure
stevan autrijus: it is actually progressing much faster
clkao *** No compatible subroutine found: "&VERSION"
stevan but thats because I am better with perl5 then perl6 still :) 16:14
autrijus clkao: I have no idea why it doesn't work for you 16:15
clkao: did you use the same cmdline? 16:17
clkao tries to rebuild
./pugs -MDBI--Perl5 -e 'say DBI.VERSION'
kelan lowercase 'p' in perl5 maybe? 16:18
autrijus nah, that's irrelevant
kelan nods
autrijus clkao: really worksforme. 16:22
clkao $ ab -clkao- [~/work/pugs] ./pugs -MSVN::Core--Perl5 -e 'say SVN::Core.VERSION' 16:25
*** No compatible subroutine found: "&VERSION"
autrijus $ ./pugs -MSVN::Core--Perl5 -e 'say SVN::Core.VERSION' 16:26
1.2.0
clkao :/ this happens after your chained invoke fix
autrijus I'm razing my install and rebuilding.
clkao: try
::SVN::Core.VERSION
clkao btw, try eval_perl5("bad thing")
and then $that.something
dies horribly 16:27
doesn't work either
autrijus I'm rebuilding from scratch
still worksforme 16:29
even after razing and remaking.
eric256 hey autrijus...any idea why 16:31
.method for @objects; fails?
autrijus it does? 16:32
?eval class Foo {}; my @z = Foo.new; .meth for @z; 16:33
evalbot6 Error: No compatible subroutine found: "&meth"
autrijus ?eval class Foo {}; my @z = Foo.new; $_.meth for @z;
evalbot6 Error: No compatible subroutine found: "&meth"
autrijus ?eval class Foo { method meth { 3 }}; my @z = Foo.new; .meth for @z;
evalbot6 undef
autrijus that seems like ok
?eval class Foo { method meth { 3 }}; my @z = (Foo.new, Foo.new); .meth for @z;
evalbot6 undef
eric256 rebuilding right now. but last night i went round and round with it and it wasn't working. let me go find the tests i wrote 16:34
hmm its not methods its accessors.. sorry. 16:35
?eval class Foo { has $.key }; my @z = Foo.new; .key = 1 for @z; 16:36
evalbot6 Error: No compatible subroutine found: "&key"
eric256 or did i get confused on . versus $_. agian?
autrijus oh. that's a misparse between postfix loop 16:37
and implicit invocant
eric256 it drove me crazy because i kept ending up with cases that worked and then a small change would make them not work. thought i was loosing my mind so i'm glad it didn't decide to work this morning. ;0 16:38
autrijus fixing 16:43
Juerd kelan: ? 16:46
kelan: No, references do NOT deref in list context. 16:47
autrijus plural context!
sorry. 16:48
Juerd kelan: In fact, no simple context dereferences - it's the LHS of the := that can do this.
lathos Hey, autrijus, any chance that class literals will work soon? 16:49
autrijus lathos: they already work 16:51
what is it that is not working?
lathos Oh. Funny, I couldn't get it to parse earlier. But it might have been something else. 16:52
Ah, no, it doesn't.
autrijus try it with ?eval?
lathos $.frontend //= Maypole::Frontend::CGI;
It parses, but: 16:53
*** No compatible subroutine found: "&Maypole::Frontend::CGI"
kelan Juerd: ok thanks
autrijus oh. you're using p5?
lathos No, this is all Perl 6.
autrijus do you have a class Maypole::Frontend::CGI
defined at compile time?
lathos Ah, not at compile time.
autrijus if you want to force a literal
::Maypole::Frontend::CGI
will probably do. but it still need to find it
lathos That works. Thanks. 16:54
autrijus np :)
kelan Juerd: is the LHS of `:=` the only place that they deref automatically?
Juerd: what is "Array context"?
lathos I'm actually *really* enjoying porting Maypole to Perl 6. SO much cleaner.
autrijus good!
I'm glad you like it.
next week me and leo will hopefully make it run with competitive speed as well. 16:55
kelan: Juerd probably used the term "Array context" to mean "Item context that expects something that .does(Array)"
eric256 what is the syntax for use lib '/test'; it replies with unexpected "'" 16:56
kelan autrijus: and that *creates* arrayrefs, right? from a regular list, say
autrijus eric256: one thing at a time
kelan: yes
kelan ok
eric256 i just couldn't find it in the S or the A... didn't know if it was speced out yet or not ;) 16:57
autrijus eric256: ./foo = 1 for 2
is fixed.
r4063
I changed wizard.p6 too
err I mean .foo = 1 for 2
Juerd kelan: A scalar context in which an Array reference is expected. 16:58
eric256 cool
Juerd lathos++ # porting maypole
Chewie[] Does anyone know if there are frequently-updated contrib debs of the Perl 6 suite? I think I want to start work on a little project in Perl 6. 16:59
Juerd kelan: Lists do not *exist* in scalar context.
kelan: There is no such thing as converting a list to a scalar, or a list to an array.
kelan hmm 17:00
svnbot6 r4063, autrijus++ | * `./property = 3 for @objects` now parse properly, eric256++
kelan seems like you need to think about context quite a bit more in p6 than you had to in p5
to determine what something will do 17:01
Juerd kelan: No, less.
autrijus kelan: it's actually the same as p5 :)
Juerd kelan: Context is more often clear
autrijus there is an item context
and a slurpy context
in both p5 and p6
lathos There's more theory about context in Perl 6; but experientially, it Just Works.
Juerd kelan: But people need to realise that now, every type has its own context, which are all forms of Scalar context.
autrijus the thing that changes is that in item context, aggregates enreferences
lathos Time for dinner.
autrijus Juerd: I have found that to be a confusing way to explain it. 17:02
kelan autrijus: i think that's what is tripping me
autrijus I prefer to say
both Item and Slurpy also carry an optional "Type" flag
to denote what kind of thing it expects
Juerd autrijus: Yes and no.
autrijus: There are four major types
autrijus because you can have a Slurpy context that expects Int.
Juerd autrijus: num, str, bool, ref 17:03
Those are not references
int is under num
but stuff like array are under ref, and are thus references.
autrijus Int is under ref right?
Juerd No
Nafaik.
autrijus ok.
Juerd Oh, and undef is a category of its own 17:04
autrijus why isn't bool under enum?
why is bool special?
Juerd Because bools are dualvars, and there exists a special boolean context.
boolean context is separate from num and str context
autrijus I thought bools are enums.
Juerd Something can be 15 or "hello", but false. 17:05
autrijus sure, but it can also be 15 but color::red
where color is a enum
Juerd Really?
I haven't read that yet
autrijus pretty sure about that.
Juerd Okay
autrijus a sec, let me lookup
Two builtā€in enums are: 17:06
our bit enum *bool <false true>;
our bit enum *taint <untainted tainted>;
so obviously they stand for the bit type
Note that "bool" and "taint" are really role names. You can call
".bool" on any builtā€in type, but the value returned is of type "bit".
01:04 <@sri> autrijus: hah, i started the Perl6 port of Catalyst yesterday =) 17:07
Juerd I see.
Then I don't know how that part of context works. Ref? 17:08
Hm, no
Enums must have their own category I suspect
Since it has nothing to do with the value
autrijus yeah.
or just the bit context ;)
Juerd Weird...
autrijus I think your theorisation is weird :)
Juerd It worked until now. 17:09
autrijus for me it just all carry a Type argument.
which is just a simple type thing in the type tree.
Juerd The problem with just carrying types is that some types are objects (references), others are primitive
You can express it in terms of opaque and transparent references too.
But I prefer not to.
autrijus sure. but I also think of it as an implementation detail.
where primitives are just unboxed variants of full objects. 17:10
Juerd No, primitives are Str, Int, str, int
kelan if i have `sub foo ( @ones, @twos ) {...}` and then call it like `foo( (1,1,1), (2,2,2) );` will it put the ones in @ones and twos in @twos?
autrijus Juerd: ah. I see. sure
Juerd An Str isn't an object.
autrijus an Str isn't an object!
"foo".does(Object)
is false?
amazing
Juerd I'm not sure about that specific one. 17:11
But it's not a reference
autrijus it's not a reference, sure.
Juerd Assignment copies the string
autrijus but it is still an object
which means you get to call .meta
and get to do method dispatch
Juerd Then Larry's explanation was wrong when he confirmed that objects are still references
Yes, it can be used as an object 17:12
That doesn't make it an object :)
autrijus heh. sure. underlying in Pugs
it's not a VObject
but from the syntax pov
it might as well be an object.
Juerd It's almost an object.
The important difference is in assignment.
$alias = $object
But
$copy = $string 17:13
(roughly)
wolverian er, shouldn't = always copy?
iblech Str does role { method *infix:<=>(...) {...} } :)
wolverian oh, right. references.
Juerd wolverian: It copies the reference
wolverian: So practically, the effect is that for the object (that the reference points to) is aliased
wolverian the ruby system is continuously tripping me up when thinking about perl5 (and 6)
autrijus import list works. 17:15
use lib 'foo';
eric256 ?eval use lib 'foo'; 17:16
evalbot6 pugs: *** No compatible subroutine found: "&use" at -e line 2, column 13-43
autrijus hey sri_:)
svnbot6 r4064, autrijus++ | * `use lib 'path';` now works; eric256++ for asking about it.
autrijus eric256: use is banned
eric256 probably a good move
autrijus yup
Juerd autrijus: Shouldn't import instead of a list, use import's signature?
sri_ autrijus: ;)
autrijus Juerd: it passes a single expression to import's sig.
Juerd I see 17:17
autrijus so if it's
method import (*@_) {}
then it works as p5
otherwise ymmv
Juerd Good
autrijus use Catalyst--perl5 'My::Module'; # works too
sri_ hope to get it ported in a few days... 17:18
autrijus nice. you'll no doubt encounter pugsbugs. if so please commit tests :) 17:19
eric256 did you just fix that? because i'm still getting unexpected "'"
autrijus sri_: give me your email? I'll make you committer
sri_ autrijus: np
Juerd Weird 17:20
autrijus sri_: welcome aboard!
Juerd broquaint is logged on on feather
But isn't in utmp
sri_ thx :)
autrijus lathos: you want committer bit as well?
eric256: worksforme 17:24
$ ./pugs -e "use lib '/tmp/'; say @INC[0]"
/tmp/
Juerd Hm 17:25
feather currently copies the pugs binary
But it doesn't install libraries 17:26
I need to change that.
iblech autrijus: I think "use module" is broken -- try "use Set" or "use Net::IRC"
eric256 pasteling nopaste
iblech (Parsefail on the first char of the module name)
Juerd autrijus: Is there a way to without patching anything, specify @INC directories when compiling? 17:27
pasteling "eric256" at 69.234.109.88 pasted "Import arguments on use failing to parse." (6 lines, 202B) at sial.org/pbot/10531 17:29
iblech eric256: Ancient Pugs :) use lib '...' works since r4064 17:30
(But you have r4063) 17:31
eric256 lol i didn't notice the new update. excuse my stupidity please
iblech autrijus: FYI, I fixed "use module" w/o following import list 17:33
autrijus cool 17:34
Juerd: yes, sure, fix your perl6 Config
Juerd: point sitearch to something else, etc 17:35
Juerd: use installprivlib
Juerd autrijus: Not something I can pass to Makefile.PL? 17:37
eric256 thansk autrijus++ it works now. sorry for the conusion.
svnbot6 r4065, iblech++ | Unbreak "use Module" (without a import list following).
r4066, iblech++ | * Pugs.Run -- Hide %*ENV in safemode.
r4066, iblech++ | * evalbot/evalhelper.5 -- Pass the code to eval using -e, and not %*ENV anymore.
Juerd In the autobuild script
Juerd prefers to not touch the contents of files, so that the automated tool will continue to work when a file's structure changes
autrijus Juerd: uhm, I don't think so. the relevant code is util/PugsConfig.pm
Juerd I'll have a look 17:38
autrijus Juerd: if you want to invent a new ENV to control that at build time etc, feel free to hack
Juerd Well, I just don't want a global make install
But to keep things in my home dir
Copying the binary works, but not if you want to use lib, for example :) 17:39
autrijus nod. maybe just symlink /usr/lib/perl6 to your homedir.
easiest
but please improvise :)
Juerd Hm 17:42
clkao autrijus: a clean build now works. eh.
autrijus eh indeed 17:43
wow. &say is from REXX 17:45
hm. do people really want anonymous declarators? 17:50
"a"/"an"
I can't see a easy use for it yet 17:51
(not saying it won't be in pugs eventually, just not high on priority)
bbiab
SamB there are a lot of loops in Pugs.AST.Internals, aren't there... 17:56
integral there are :-) That's why it all ended up in there. I had hoped more could be lifted out, but to do that you need to start using existentials and thingies 17:57
SamB or maybe just mutually-recursive modules...
integral .hs-boot has some issues in the GHC implementation 17:58
SamB with class declarations?
integral I'm not sure
svnbot6 r4067, ninereasons++ | perl6.vim: trying to do a better job of matching "::","*",".",":","^",and "?" magical and lexical variables, as well as plain vars. Improve the alignment of various sections, for better visibility of regular expressions. 18:06
r4068, iblech++ | evalbot/evalhelper.p5 -- The code to eval should have an absolutely
r4068, iblech++ | non-polluted namespace, so we've to use an anonymous sub instead of a simple
r4068, iblech++ | $return_value.
Khisanth so ... anyone working on an editor written in perl6? :) 18:21
vcv an editor? 18:22
what kind?
Khisanth text!
vcv i would if there was a Win32 module :p
wolverian why would anyone do that when we have vim? now, a perl6 interface to vim (so that we can use the perl6 grammar in it) would be nice.. 18:23
autrijus Khisanth: clkao mentioned he'll be working on it 18:24
clkao on what? 18:25
autrijus :perl6do
Khisanth wolverian: because vim will fail to highlight correctly when you start redifining operators and stuff :)
clkao delta editor, not editor.
autrijus ah. heh ;)
big difference
clkao autrijus: so, is it possible to tweak the build system a bit
os you have libpugs and main separated 18:26
i guess you guessed what i'm trying to do :)
autrijus clkao: ghc's support for building .so is brittle
clkao no, just a
autrijus clkao: you should separately link all the .o files
clkao .a is fine
autrijus oh. hm.
clkao: look at scripts/pugscc
it already links in all .o files explicitly
now maybe we can do a .a
but I'm not familiar with how to do that in ghc/cabal/etc 18:27
you're welcome to try/ask around but I'm not terribly interested
clkao but what i need to know is what would be the entrance of libpugs, things like init_perl. 18:29
wolverian Khisanth: hmm. how so? as long as the grammar stays the same it will just work.
Khisanth: and if you change the grammar, vim will see that. 18:30
Khisanth vim will have access to the PGE? :)
clkao autrijus: SVN::Client.new.log('svn.openfoundry.org/pugs' , 'HEAD', 'HEAD', 0, 1, sub { say @_ }); 18:32
this now works. but running it for the second time segfaults
autrijus clkao: hm. all you need to do is 18:33
hs_init(&argc, &argv);
and on exit
hs_exit();
that's all.
see 8.2.1.1 in the GHC user guide
inbetween the two calls you can call any foreign exports 18:34
you can foreign export Main.eval
svnbot6 r4069, ninereasons++ | perl6.vim: some more alignment. Change the name of a match name. Experiment with a different highlight type, for "&foo", "./foo", and ":/foo"
autrijus or do something else clever
Limbic_Region question - could you get a p5 stuff from parrot via p6 currently? 18:41
svnbot6 r4070, autrijus++ | * VList is now strict. This means `1..Inf` will no longer
r4070, autrijus++ | randomly sometimes work and sometimes not -- a better Lazy
r4070, autrijus++ | implementation will be needed.
autrijus Limbic_Region: that is a good question :) 18:43
Limbic_Region: the short answer is no. if you want that, I can probably hack it in really fast.
knewt what'd be really evil would be p6 accessing parrot accessing p5 accessing p6 18:44
with the two p6's being the same instance
Khisanth but what would be the point? 18:47
knewt the point would be to be evil *g* 18:48
broquaint Is this a bug? pugs -e '["foo".split(rx:perl5//)].say' # pugs: cannot cast from VRule (MkRulePCRE {rxRegex = Regex 0x0862ff10, rxGlobal = False, rxStringify = False}) to [Char] 18:51
autrijus I don't think we do the $str.split() thing yet 18:52
iblech Currently, you have to say rx:Perl5//.split("foo") 18:54
broquaint Ah, that makes sense, thanks :)
iblech No, it does not make sense :) It should be $thing_to_split.split($split_at_what_chars)
(Fixing)
autrijus (fixed) 18:55
iblech :))
broquaint I meant it makes sense in the current development environment ;)
autrijus you can write tests tho :)
broquaint Alrighty.
Khisanth modifiers are case insensitive?
iblech Don't think so
broquaint Would it be difficult to implement getc? I wouldn't mind taking a stab if not.
autrijus only perl5 vs Perl5
Khisanth so :Perl5 :perl5 :P5 and :p5 all have different meanings?! 18:56
iblech no, these are the same
autrijus Khisanth: :p5 is illegal
iblech but :i means case-insensitive and :I is an error
autrijus all other three are currently the same
iblech oh yes, right
Khisanth this is what I get for reading the non existent FM :) 18:57
autrijus broquaint: there's no getc -- feel free to implement
the $str.split(//) patch is in 18:58
broquaint It'd just be a wrapper to getChar, right?
autrijus untested tho
svnbot6 r4071, autrijus++ | * Implement $str.split(//), as requested by broquaint
autrijus broquaint: aye
hGetChar
broquaint Double thanks, autrijus :)
autrijus :)
broquaint waits for pugs to magically recompile 18:59
autrijus pugs> "asd".split(rx:P5//) 19:00
('a', 's', 'd')
broquaint Sweet. 19:01
autrijus hm, I mapped my Menu key to compose
but can't get things entered
autrijus googles a bit
iblech Hm, I think getc should be named getb (for get byte), as hGetChar doesn't read characters, but bytes (just tried with "Ƥ" (two bytes in utf-8) in GHCi)... 19:02
broquaint Could we have an alias for mental-backwards-compatiblity? 19:03
autrijus iblech: actually if you read a high bit, just continue
as specced by utf8 19:04
iblech Even better: A getc which reads chars, and a getb which reads bytes :)
autrijus see src/UTF8.lhs
line 238
for how to implement this
iblech: nah. I think getc should always get char
iblech: and if you want that to be bytes, binmode it 19:05
or set it to raw in other ways
iblech I'm fine with that, too
broquaint This sounds complicated 19:09
Also, does split / /, still do the same magic as in perl5?
autrijus er. no. 19:11
wolverian split / / isn't magical
autrijus and I think Larry said don't worry about that.
broquaint Ok, just checking. 19:12
Juerd broquaint: In Perl 5, split " " is special, but split / / is not. 19:14
svnbot6 r4072, autrijus++ | * fix `when .isa()` infinite loop introduced yesterday, 19:33
r4072, autrijus++ | as reported by eric256
broquaint I've got a new split.t for whoever wants it (refactored to boot). 19:35
autrijus broquaint: just commit it 19:36
broquaint svk commit split.t # I take it? 19:37
autrijus yeah. are you a committer?
broquaint Nope.
autrijus if not, give me your email addr and I'll make you one :)
if split.t is the only thing you modified, "svk ci" will do
(ci is short for commit) 19:38
broquaint [email@hidden.address] :) 19:39
autrijus welcome aboard :) 19:41
broquaint pugs -e 'q[foo bar].split(q[ ]).perl.say' # (' ')
pugs -e 'split(q[ ], q[foo bar]).perl.say' # ('foo', 'bar')
Merci :)
autrijus =) 19:42
broquaint Shouldn't both those splits be equivalent?
autrijus broquaint: yes. mark that bug as :todo<feature>
(our primitives can't yet tell between invocants and non-)
that should be fixed
broquaint Alrighty, then.
lathos autrijus: Thanks for the invite, but I don't think I have the time to learn Haskell right now. 19:47
If I can encourage from the sidelines and throw up issues in porting Maypole, that would be enough.
Juerd lathos: committer bits are handy for adding tests 19:48
lathos: And tests are the simplest form of bug report, for everyone :)
lathos Oh, OK. :) 19:49
I know this is just the evil plot to move me onto svk. ;)
Juerd You may use svn if you wish
lathos: If you want, you can get access to feather, which has svk installed via a shared local repository 19:50
lathos Oh, that would help. 19:51
Juerd s/via/, and pugs accessible via/
lathos: I need a simple email requesting it, for the record
But I'll create your account right away
(juerd@juerd.nl)
broquaint Ok, split.t committed.
svnbot6 r4073, broquaint++ | * refactored testing code to a simple sub call 19:56
r4073, broquaint++ | * added tests for Str.split
broquaint Neat.
robkinyon Heyla all ... got a specs question for whomever wants to field it 20:01
iblech Ok, getc() implemented, checking in in a sec
robkinyon It's with respect to porting Module::Build (reference www.perlmonks.org/?node_id=461105 for more info) 20:02
broquaint Thanks, iblech.
knewt how are rules going right now? 20:03
how much is there so far?
robkinyon Is it possible for the "use" keyword to depend on a module?
autrijus knewt: charclass works in parrot but won't be in pugs until parrot 0.2.1 (in a couple weeks) 20:04
knewt: using hypotheticals in rules doesn't yet work.
otherwise it's pretty much all there, iirc. 20:05
robkinyon: not sure what you mean...
I need to run for food, though
bbl
knewt would charclass work with pugs + parrot trunk ?
autrijus knewt: well, yes and no; you'd need to cp parrot/compiler/pge/* to pugs/src/pge/ 20:06
knewt: then it should work
robkinyon Basically, I want to start the port of Module::Build/Module::Install/ExtUtils::MakeMaker type stuff toPugs
broquaint Is the exported trait implement yet? I see it parses ok and it looks to work but I can't find it in the source :/
autrijus but it's not tested
robkinyon So, I'm gathering requirements right now. (q.v. the referenced Perlmonks thread)
autrijus broquaint: all methods are currently exported ;)
broquaint Ah, I see :)
autrijus now, really &. I'll bbiab *wave*
svnbot6 r4074, iblech++ | * Pugs.AST.Internals -- Some more haddocks for the Val declaration.
r4074, iblech++ | * Pugs.Internals -- Import hGetChar, too, so Pugs.Prim can use it.
r4074, iblech++ | * Pugs.Prim -- Implemented getc().
robkinyon I'm hitting a very interesting point which is that there are three different distros + the "use" keyword that need access to the same functionality 20:07
iblech Night, folks :)
robkinyon So, I was wondering if it would be ok if either "use" called out to these modules or if these modules were able to call into "use"
broquaint Later, iblech.
I imagine the modules can hook into use(). 20:08
robkinyon Possibly ...
Basically, there's a section of functionality that both use and the installer and the distro builder need to have access to
(This is why M::B and EU::MM do too many things. Also, the CPAN(PLUS) modules duplicate this functionality) 20:09
broquaint What is this functionality?
robkinyon it's the new functionality in P6 where you can have multiple versions of a module installed and choose between them at runtime 20:10
the syntax isn't fully fleshed out yet, but @Larry has said it will be there
There's no reason why the CPAN(PLUS) port, M::B port, and "use" all need to have this functionality separately 20:11
M::B as well needs to be split into two (or three) different distros, sharing functionality 20:12
Juerd lathos: ping 20:18
wilx ?eval 1+1
broquaint What has $/ become (as it's now the regex match object)? 20:21
Juerd broquaint: An fh property 20:22
broquaint Ok, thanks, Juerd. 20:23
What :todo<>'s are there? :todo<bug> :todo<feature> ... ? 20:31
castaway_ robkinyon: theres a perlmonks node about M::B for perl6, maybe you should go join in if you have ideas 20:32
Limbic_Region__ dragonchild is robkinyon 20:33
broquaint robkinyon =:= dragonchild ?
Juerd feather has email.
castaway_ oh
(bah, people-picking-different0nicks--)
Juerd hehe 20:34
castaway_ should not be allowed
Juerd This is funny - go on :)
svnbot6 r4075, broquaint++ | * specify :todo in test 16 20:41
r4075, broquaint++ | * renamed the slurp() subroutine as that's the same name as a builtin
r4076, autrijus++ | * dons has changed hs-plugins url. 20:47
20:49 Limbic_Region__ is now known as Limbic_Region
knewt that was good timing. i was just wondering why i couldn't get a connection :) 20:50
kungfuftr moo 20:56
svnbot6 r4077, autrijus++ | * fix url in README too.
kungfuftr castaway_: hope it went well!
Corion I get lots (10) unexpected successes - datenzoo.de/pugs/win2k.html - r407x , r4077 smoke is running 21:03
castaway_ pretty good, thanks kungfuftr .. I may be joining you yet ;) 21:06
knewt well, extra dependencies for the latest hs-plugins, but it does at least build, which is better than some of the more recent ones :)
castaway_ met a director
knewt castaway_: perl job at sophos? 21:07
svnbot6 r4078, SamB++ | Refactorings and a start on reducing line length in Pugs.Compile.Pugs
castaway_ nods 21:08
Corion castaway_: Yay!!! 21:10
castaway_ not confirmed yet, Corion 21:11
Corion castaway_: Oh ... So you're waiting on their decision ... I hope it works out!
castaway_ right 21:13
thanks ;)
knewt i've got a new job interview elsewhere now, after not getting the job at sophos 21:14
castaway_ good luck!
clkao win23 21:15
knewt coming over on the 2nd of june, will catch some of the lpm social, interview next day, then fly back that evening :)
castaway_ "over"? to/from where? 21:16
knewt from hamburg, germany to london
castaway_ ah, fun 21:17
fun, we did that for the may social
sri_ not much perl jobs in germany these days :/
knewt and i don't speak germany, which makes it even more difficult 21:20
svnbot6 r4079, Aankhen++ | * rewrote and hopefully fixed &HTTP::Headers::Util::join_header_words.
r4080, Aankhen++ | * added (currently failing) tests for HTTP::Headers::Util.
knewt hmm...
pugs> rule ident { [<alpha>|_] \w* }; my @strings = ("ident",, "9notident", "is_an_ident"); my @iids = grep /<ident>/, @strings 21:21
pugs: cannot cast from VList [VStr "ident",VStr "9notident",VStr "is_an_ident"] to Pugs.AST.Internals.VCode
castaway_: then on the 8th i'm flying over to vienna for apw2005
castaway_ what ae you doing here if not speaking german? (just curious) 21:23
collecting miles? ;)
knewt been living with my dad for a while while i sorted out some medical stuff
so, anyone got any clue why the above crashes out like that? 21:24
castaway_ nods
knewt i've taken the rule and the grep from S05, and added my own array 21:25
Aankhen`` G'night. 21:34
eric256 my @iids = grep {/<ident>/} @strings; 21:47
maybe?
SamB am I allowed to use TH? 21:49
Juerd TH?
SamB Template Haskell 21:50
castaway_ I think pugs is already using it somewhere.. check?
SamB huh, in Pugs.Compile.Haskell... 21:52
though actually, I don't know that I want to bother yet. 21:53
I'll just write my plain-ordinary lower-order record-printing function myself... 21:59
I mean, even if I did use TH I'd want that ;-)
Darren_Duncan funny thing happened yesterday night 22:04
I found out for the first time what happens when Mac OS X 10.3 runs out of virtual memory
SamB what?
Darren_Duncan not pretty
SamB well no duh 22:05
how could running out of virtual memory be pretty?
Darren_Duncan it brings up a dialog box about running out of disk space, and suggests either killing off processes or deleting files
in my case, I was away from the comp for a few hours, and only discovered it a few hours too late to fix it
SamB what did it do? 22:06
just wedge?
Darren_Duncan all of the applications were unresponsive, including the one to kill the others off, so I had to reset the computer
this morning, I discovered that the swap files were about 4GB in size, and most of them were created within about 30 sec time 22:07
'make test' was running at the time, and I figure that's the only thing that could have done this
suffice to say, I want to learn how to tell the computer to place hard limits on pugs so it dies before getting out of hand 22:08
something like 'limit' comes to mind, but I've never used it
SamB Darren_Duncan: you don't have 'ps' and 'kill'?
or even 'killall'? 22:09
Darren_Duncan I do, but couldn't run them -- all applications unresponsive
I certainly would have done that given the chance
SamB Terminal.app was too slow, or not open?
wolverian that sounds insane
Darren_Duncan it was open, but all apps displayed the spinning pizza wheel 22:10
SamB oh.
there ought to be a choice in that dialog to switch to a console or something... 22:11
Darren_Duncan obviously, this speaks to something that could stand for improvement in the OS itself as far as automatic default actions to low memory situations
the dialog in question was also unresponsive
if it was responsive, it provided the necessary options to kill apps 22:12
SamB oh
obviously someone needs to swipe some of the OS X devs' RAM...
Darren_Duncan without fixing the OS itself, the only workaround I can see is to specify before running pugs that it can't use more than X memory
FYI, I have 768M of physical RAM, and the startup disk had over 3G free space on it (the swapfiles were in /private/var/vm/) 22:13
SamB maybe OS X should just kill the hogs itself, like Linux supposedly does... 22:14
castaway_ it does
Darren_Duncan whatever the pugs test was doing, it seemed to eat up 3-4GB of memory in only 30 seconds time or so
I think I'll file this with the Apple bug reporter 22:15
SamB castaway_: linux does, or OS X does? 22:16
castaway_ linux does
22:16 castaway_ is now known as castaway
Darren_Duncan OTOH, I suspect they will only address this issue with 10.4, if it still exists there, and not spend the resources for this on the older 10.3 I'm on now; still wouldn't hurt to ask 22:16
SamB always gets fed up with the thrashing before running out of swap
Darren_Duncan in my case, I was away from the comp for 3 hours, and any thrashing would have started hours before I saw it 22:17
SamB yes, yes
Darren_Duncan all this said, while the OS could stand for an improvement, the fact is that pugs and/or its test has/had a bug; should never use that much memory 22:18
I have just updated and 'make' the newest pugs -- will run 'make test' again, but this time keep an eye on it to spot the offending test, if not yet fixed 22:19
fyi, I got the 30 sec figure from the file creation dates of the swap files 22:21
I booted up from another volume, so could see them as they were last night without the auto-removal of old swap files that happens on startup
SamB pugs is *supposed* to have bugs, isn't it? 22:23
Darren_Duncan yes
but this is the first time I saw one that made swallow an ocean of memory 22:24
castaway why, you adding some?
SamB castaway: not on purpose!
castaway ;)
Darren_Duncan you usually would notice things like that prior to committing the change
SamB anyway, the code I am working on doesn't even produce valid output...
Darren_Duncan I don't even know yet if the test would have eventually stopped at a high ram level, or would have continued indefinitely 22:25
SamB the current output of -CPugs contains <ref>s everywhere...
clkao who knows how to compile a libpugs.a ? ghc insist main in Main even if i give it -no-hs-main 22:30
SamB clkao: what do you mean? 22:31
what kind of libpugs.a?
is it to be called from C, or from Haskell?
clkao to be called from c 22:32
SamB are you sure it is exporting a C-level 'main'? 22:33
wolverian I released this theme a few years ago. I had big plans for a follow-up, but real life stepped in and I never got around to finishing it. But I recently went back and cleaned up a lot of the bugs in Glossy P. I am almost done with an update ("Glossy Progress") that I'll probably release in about a month or so. I fixes lots of small problems and makes the theme all around more compatible with more recent versions of gtk. It also includes a new me
Darren_Duncan currently running 'make test' -- for the early tests, Pugs VSIZE is staying around 39M
clkao it just inists main to be eixst in Main
vcv wow i just realized how easy xml is going to be to work with with perl6 22:34
SamB clkao: why does it matter if Main contains main or not?
% nm src/Main.o|grep main 22:35
00000ce4 D Main_main_closure
00008dc4 T Main_main_info
00000cb4 D Main_main_srt
00000d0c D ZCMain_main_closure
00008e80 T ZCMain_main_info
00000d04 D ZCMain_main_srt
none of those will bother C!
clkao mmm 22:36
so maybe i just don't use ghc to link and link those .o myself? 22:37
SamB well, lets see... 22:39
you'll need the RTS
vcv +%xmlhash<node> :) 22:40
SamB there has to be something about this in the manual...
clkao SamB: hey can you help me produce a libpugs.a that i can call from c? 22:41
SamB I can try 22:42
clkao SamB++ 22:43
SamB www.haskell.org/ghc/docs/latest/htm...g-own-main should be of interest 22:44
clkao that's what i was reading 22:45
ohno, mine is not latest
SamB what were you reading? 22:46
nothingmuch mmoevening
clkao 8.2.1.1
www.haskell.org/ghc/docs/5.04/html/...i-ghc.html
not latest, i meant.
anyway.. shower now
Darren_Duncan following up my earlier comments, I don't know for sure that it was pugs that had the memory problem ... I did have several other apps open at the same time, including bit-torrent; but it seemed reasonable for pugs to be the first suspect; bt is my second suspect 22:47
anyway, 'make test' still running without incident
my main reason was the speed at which the swapfiles were made ... by contrast, in my experience bittorrent only used up vm based on the size of the files it was processing, and that's a much slower process 22:49
knewt you have variable numbers of swap files? in fact, you have swap /files/ ??? 22:50
Darren_Duncan so unless bt had an obscure bug that just popped up, I don't see it being at issue
knewt (in normal use i mean, of course)
Darren_Duncan yes, it goes like this ...
nothingmuch seen robkinyon 22:51
jabbot nothingmuch: robkinyon was seen 2 hours 39 minutes 2 seconds ago
Darren_Duncan currently my /private/var/vm dir contains these 2 items: an 'app_profile' directory and the file 'swapfile0'; the latter is 65MB in size 22:52
that would be a default I think, since only half of my real RAM is even in use now ... about 300M free
what I saw from last night was about 7-8 swapfiles, with names like 'swapfile1', 'swapfile2' etc 22:53
lathos Should I expect class data not to work yeT? 22:54
Darren_Duncan 1 was also 65M, 2 was about 130M, 3 was about 260M, and the latest 2 files were both 1GB in size; I suspect that a third 1GB was in the process of being made when disk space was exausted, as about 600M remained
I think those files are deleted when RAM usage drops, but they're definitely deleted at startup 22:55
they are created dynamically
lathos I have some failing tests, but I don't know if they're valid; should I commit them anyway? 23:11
Darren_Duncan did you create those tests? 23:13
lathos Yes.
Darren_Duncan would your commit break anything besides your own new tests? 23:14
lathos No, since it is simply new tests.
Darren_Duncan I don't see a problem then
lathos Well, the problem might be that my tests test for things which are not how Perl 6 should behave.
Darren_Duncan in that case, you could try discussing the issues first, or commit anyway and say 'please look at this' 23:15
what is the problem domain of the tests? 23:16
lathos Class literals.
Here's the file: paste.husk.org/3334
Other thing is, should they be marked as todos, or left failing? 23:18
Juerd lathos: In general, if it's lack of feature, todo, but if it's a real bug, fail 23:22
Unless you need it soon - then leaving it failing can help 23:23
That's a tool you need to be careful with though
lathos OK. The second is a real bug, the third is a todo, then.
nothingmuch is it possible to have thunk context? 23:26
Juerd What is that again?
nothingmuch if not, i think our hypothetical lazy context modifyer could be useful:
sub infix:<||> ($left, lazy $right) { return $left if $left; return $right };
Juerd That is something different from the proposed lazy context operator, which has the same role as list. 23:27
And there is syntax for later evaluation
There was discussion about this a week or so ago in p6l 23:28
nothingmuch thread subject?
lathos OK, I believe I've committed the test.
Juerd lathos: grin - you *believe* you've committed it? :)
lathos Yeah, but I was waiting for the bot to confirm it. :)
svnbot6 r4081, simon++ | Investigation of how class literals work at runtime.
nothingmuch and why is it different?
lathos There we go.
Juerd Apparently you did :)
Now I'm a believer too ;)
mauke the bot defines our reality 23:29
Juerd nothingmuch: We don't have either of <scalar list ~ + ?> in signatures
nothingmuch: And that's the group of operators lazy would be added to (as a more specific list)
nothingmuch ah 23:30
Juerd Well, there are + and ? in signatures, but they have nothing to do with nums and bools.
nothingmuch why is lazy like list, btw? 23:31
Juerd Because only lists can be lazy
(Well, an array can be lazy, when it is assigned a lazy list, but you don't specify the array as lazy, but instead the list on ='s rhs) 23:32
nothingmuch wait wait wait, isn't our idea context independant?
Juerd No, it is a context itself.
nothingmuch i would like $foo = lazy 1 + 1; to work 23:33
Juerd I wouldn't.
nothingmuch by adding only when i do the itype fetch on $foo
Juerd Well, it'd be useful to have it
nothingmuch why not?
Juerd But not with the name "lazy".
Because "lazy" is what we call lazy lists.
nothingmuch so what name?
Juerd That's where discussion stranded.
SamB you are beings silly!
svnbot6 r4082, SamB++ | More work on shorter lines in Pugs.Compile.Pugs
SamB lazy means non-strick
nothingmuch lazy is not a noun, that's an adjective
SamB s/k/t/
Juerd nothingmuch: What I want is to have "list gather { ... }" be in list context, and "lazy gather { ... }" be in lazy list context. 23:34
nothingmuch ah 23:35
did you read my p6l post about it?
clkao SamB: did you find anything to make libpugs.a?
Juerd The only thing being allowed to be implicitly lazy, the range operators.
nothingmuch i think it gets that and more
Juerd nothingmuch: Yes, and I wondered why it was so different from what was discussed here.
Darren_Duncan well, 'make test' succeeded without any inordinate memory usage -- I think it never went over about 100M
nothingmuch why not any expensive pure op
well, you kind of faded out from the discussion
SamB clkao: I was supposed to be looking for something?
Darren_Duncan so either the problem I had last night was fixed, or pugs was never the problem
nothingmuch why didn't you comment about it? 23:36
Juerd But I currently lack the desire for yet another long discussion that makes my hands hurt.
nothingmuch i still don't see why a superset of your behavior proposal is bad
Juerd Some things in Perl 6 design are going wonderfully downhill.
nothingmuch but i don't want your hands to hurt =)
Juerd And I can't fight all of it.
clkao 06:37 < clkao> SamB: hey can you help me produce a libpugs.a that i can call from c?
SamB clkao: would it be feasable to have GHC installed when -lpugs
clkao 06:38 < SamB> I can try
:P
SamB is linked
anyway, I have to eat dinner now... 23:37
sorry :-(
Juerd It's frustrating, but just the way things are.
SamB you could try in #haskell, the natives are very friendly
they probably know a lot more about this than I do, too
clkao ok hthanks
nothingmuch Juerd: I don't understand why.. barely even what, i think i'm only getting that it frustrates you, but I'm not sure if it's current lazy list semantics, or the ones I proposed on p6l 23:38
Juerd The ones you proposed are unclear to me. 23:43
nothingmuch lazy takes it's right hand side, and wraps it in a coroutine
Juerd It's an idea of introducing a modifier, but it lacks specification of what it'd really do. Your using it in a signature now says to me that you don't have a good picture of Perl 6 design overall. I'm probably wrong, though.
There is no such thing as a generic coroutine wrapper 23:44
You can't arbitrarily turn expressions or code blocks into coroutines.
nothingmuch it is never visible that it is a coroutine
and then puts it in the container or usage context it was applied 23:45
when the data is needed from the container, the coroutine is evaluated
it does not accept params, or whatever
Juerd But if gather could know it was being called in lazy context (want.lazy), it could transparently use a coro.
nothingmuch take in a lazy context gather would also yield
Juerd nothingmuch: You're not getting my point. A language construct must be generic, and not have semantics for the thing it is applied to built into it.
With gather, "take" is your yield
But with a sub that builds an array -- where were you going to automatically place that yield? 23:46
nothingmuch no where
Juerd Are you going to analyze "return @array" and then walk up the tree until you find how it was constructed?
nothingmuch if the user does not use a construct that knows to generate iteratively, the lazyness will be all or nothing
Juerd If laziness is *context*, then the thing in that context can for itself decide whether it will use this piece of information that says "it's okay if you do this lazily"
nothingmuch AOP heads have a nice word: 23:47
buzzword, sorry
a cross-cutting concern
i don't want library code which handles the logic to determine for me, 3 levels deep, what my usage context should be
that's where I want most lazyness to happen:
the DBI execution to be lazified by my poop wrapper 23:48
Juerd Do you agree that laziness should only be explicit, when the thing that generates COULD BE impure?
nothingmuch expensive computation to be delayed by ...
yes
Juerd Then - who has to specify this explicitness?
Context can propagate
Any other modifier cannot, easily.
SamB thinks it would be more likely to work if you made the impurity explicit...
nothingmuch think of lazy as a unary short circuiting OP 23:49
Juerd SamB: That's a very different story.
nothingmuch: That makes no sense.
SamB yes, yes, I know...
nothingmuch in my spec
why not?
Juerd Short circuiting has to do with bools.
brb
nothingmuch not necessarily 23:50
my $value = lazy function_call(); # nothing happens
$value += 10; # function_call() expression evaluated, but &infix:<+> would never know about it
SamB how does it know which &infix:<+> to use? 23:51
nothingmuch what does that matter?
the moment that the value is needed 23:52
for parameter matching
or ....
SamB oh
nothingmuch it's evaluated
if it's clear that it's not needed, this will be delayed further
anyway, I want to sleep 23:53
clkao Juerd: can i get a feather account? i'm getting tired of burning my lap with laptop while compiling pugs 23:58
Juerd re
01:56 < nothingmuch> my $value = lazy function_call(); # nothing happens
"nothing happens"?!
nothingmuch exactly 23:59
Juerd So the function call itself doesn't happen at that point?
It has no idea it's being used?
nothingmuch no
Juerd No possibility of initializing anything?
nothingmuch right
Juerd Sounds like a bad idea to me.
nothingmuch nope, nadda
Juerd Can you explain what your "lazy" is, and does?