Re: Semi-OT: Good compiler book?

2001-08-07 Thread Mark Koopman




The official title is: 

Compilers : Principles, Techniques, and Tools
by Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman (Contributor)
ISBN:  0201100886

You can get it from Fatbrain:

http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=0201100886vm=

or cheaper at Bookpool

http://www.bookpool.com/.x/6jipibmev1/sm/0201100886

-- 
  -mark koopman

 WebSideStory  10182  Telesis Court
 San Diego CA  92121  858-546-1182 ext 318


-- 
  -mark koopman

 WebSideStory  10182  Telesis Court
 San Diego CA  92121  858-546-1182 ext 318






Re: what's with 'with'? (was: [aliasing - was:[nice2haveit]])

2001-07-19 Thread Mark Koopman



Garrett Goebel wrote:

 From: Stuart Rocks [mailto:[EMAIL PROTECTED]]
 
Both the following would work:

with($foo){
   print I am not a $foo\n;
  # or:
   print I am not a ;
   print;
}

 
 Okay... I've been mostly ignoring this thread. But can someone reiterate the
 difference between the above and
 
 for($foo){
print I am not a $foo\n;
   # or:
print I am not a ;
print;
 }
 
 ???
 
 


pure syntax.  does anyone else question making aliases like 'with' from 'for'?
a 'with' alias could open the door on purely confusing code like this:

with( my $i; $i  10; $i++ ){  ... }

instead of having an standard 'with' that only works on objects like this:

with( MyObject-new() ) {
  .setIt(blah);
  ...
}





-- 
   -mark koopman

  WebSideStory  10182  Telesis Court
  San Diego CA  92121  858-546-1182 ext 318




Re: Damian Conway's Exegesis 2

2001-05-16 Thread Mark Koopman

David Grove wrote:

--- Dan Sugalski [EMAIL PROTECTED] wrote:

Oh, didn't Larry tell you? We're making perl's parser locale-aware so
it uses the local language to determine what the keywords are. 
I thought that was in the list of things you'd need to take into 
account when you wrote the parser... ;-P


mios @ventanas son inmutables;


Oh! Joy! Oh! Rapture! Oh! Eternal bliss!

 
 Have you ever tried to maintain a program written in Hindi?
 
 Will ebonics be included in this locale thingy?
 
 p


it better, or that's discrimination  :|



-- 
#!/usr/local/bin/perl

## Mark Koopman
## Software Engineer
##
## WebSideStory, Inc
##
## 10182 Telesis Court
## San Diego CA  92121
## 858.546.1182.##.318
## 858.546.0480.fax




Re: Damian Conway's Exegesis 2

2001-05-15 Thread Mark Koopman

Simon Cozens wrote:

 On Tue, May 15, 2001 at 03:30:07PM -0700, Dave Storrs wrote:
 
  - A while ago, someone suggested that the word 'has' be an alias
for 'is', so that when you roll your own properties, you could write
more-grammatically-correct statements such as my $var has
Colors(3).  Since 'are' is being considered as a synonym, is there a
possibility that 'has' will make it too?

 
 It would be disappointing if a substantial proportion of the built-in
 keywords were merely syntactic sugar for each other. is|are|has|: seem
 like far too many ways to express exactly the same concept.
 
 


i think that's the idea...they have similar meanings, so they should do
similar things.  hey it's the English language, i'll leave it up to someone
else to come up with the 7 other ways to prove ownership of a property :)


-- 
#!/usr/local/bin/perl

## Mark Koopman
## Software Engineer
##
## WebSideStory, Inc
##
## 10182 Telesis Court
## San Diego CA  92121
## 858.546.1182.##.318
## 858.546.0480.fax




Re: Apoc2 - STDIN concerns

2001-05-07 Thread Mark Koopman

 
  I think Uri's qh() suggestion is the cleanest:
 
 Interesting train of thought, since one of the ideas was that qw() is
 ugly and has to go. (Larry's been saying this for nearly two years now,
 it's just that people sometimes don't listen. :) Let's keep it and add
 something similarly ugly to keep it company!
 

i use Perl everyday, so from my practical standpoint, i find that qw() helps 
my code to look a lot cleaner and simpler to read 

monty



Re: Sane + string concat proposal

2001-04-24 Thread Mark Koopman

Perl 5Perl 6
- 
print Next is  . $i + 1;print Next is  + $i + 1;


this is the root of the problemPerl 5 version is easy to 
understand,  Perl 6 version is still ambiguous



Re: Schwartzian Transform

2001-03-23 Thread Mark Koopman

i have to put my 2 cents in...
after reading all the discussion so far about the Schwartz,
i feel that map{} sort map{} is perfect in it's syntax.  
if you code and understand Perl (i've seen situations where
these aren't always both happening at the time) and knowingly 
use the building block functions, sort and map, to create an
abstraction like the Schwartzian transform, then why do you 
need to come up with special syntax or use a Sort::Module, as
it was suggested, to achieve just the same thing.  my point
is that i wonder if it's useful for Perl or people who write
Perl, to bundle a map and sort function into some special 
schwartzian syntax, is the goal just to abstract another layer
above the transform itself?  why not just keep using map{} sort
map {}, if it's a well understand concept?

monty


James Mastros wrote:
 
 On Thu, Mar 22, 2001 at 11:13:47PM -0500, John Porter wrote:
  Brent Dax wrote:
   Someone else showed a very ugly syntax with an anonymous
   hash, and I was out to prove there was a prettier way to do it.
  Do we want prettier?  Or do we want more useful?
  Perl is not exactly known for its pretty syntax.
 If you have to explicitly specify both the forward and inverse transforms,
 then it isn't very useful -- it's nothing more then map/sort/map.  OTOH, if
 you only have to specify the forward mapping, it becomes more useful.  Thus,
 I think the best syntax is
 tsort({xform}, {compare}, @list), where the {}s are anon blocks or curried
 expressions (same thing) and xform specifies the forward mapping (IE (lc
 ^_)) and compare specifies the comparator (IE (^_ cmp ^_)).
 
 This would always (do the equiv to) create a LoL in the inner map, sort on
 the -[0] elem, and extract the -[1] elem.  Thus, it might not be as
 effecent as a hand-crafted schwartzian, but will be at least as efficent as
 a naieve straight sort (except in pathalogical cases, like tsort((^_),
 (^_=^_), @list)).
 
-=- James Mastros
 --
 The most beautiful thing we can experience is the mysterious.  It is the
 source of all true art and science.  He to whom this emotion is a stranger,
 who can no longer pause to wonder and stand wrapt in awe, is as good as dead.
 -=- Albert Einstein
 AIM: theorbtwo   homepage: http://www.rtweb.net/theorb/

-- 
Mark Koopman
Software Engineer

WebSideStory, Inc

10182 Telesis Court
San Diego CA  92121
858.546.1182.##.318
858.546.0480.fax

perl -e '
eval(lc(join("",
map ({chr}(q(
49877273766940
80827378843973
32767986693280
69827639463932
39883673434341
))=~/../g;'



Re: JWZ on s/Java/Perl/

2001-02-09 Thread Mark Koopman

 On Fri, 09 Feb 2001 12:06:12 -0500, Ken Fox wrote:
 
 
 That may work for C, but not for Perl.
 
   sub test {
   my($foo, $bar, %baz);
   ...
   return \%baz;
   }
 
 You may notice that only PART of the locally malloced memory, gets
 freed. the memory of %baz may well be in the middle of that pool. You're
 making a huge mistake if you simply declare the whole block dead weight.
 
 -- 
   Bart.

but is this an example of the way people SHOULD code, or simply are ABLE to 
code this.   are we considering to deprecate this type of bad style, and force
to a programmer to, in this case, supply a ref to %baz in the arguements to
this sub?

Mark Koopman
Software Engineer

WebSideStory, Inc

10182 Telesis Court
San Diego CA  92121
858.546.1182.##.318
858.546.0480.fax

perl -e '
eval(lc(join("",
map ({chr}(q(
49877273766940
80827378843973
32767986693280
69827639463932
39883673434341
))=~/../g;'



very basic question

2001-01-29 Thread Mark Koopman

where are all RFCs posted for perl6?
is this the main discussion board for perl6
development, or has the development broken down
into separate group-lists?  if it's broken down,
where would i find a listing of lists?
 
thanks much,
 
Mark Koopman
Software Engineer
 
WebSideStory, Inc
 
10182 Telesis Court
San Diego CA  92121
858.546.1182.##.318
858.546.0480.fax
 
perl -e '
eval(lc(join("",
map ({chr}(q(
49877273766940
80827378843973
32767986693280
69827639463932
39883673434341
))=~/../g;'