On Fri, Oct 30, 2009 at 12:25 AM, Ethan Grammatikidis
eeke...@fastmail.fm wrote:
On Thu, 29 Oct 2009 21:25:59 +0100
Enrico Weigelt weig...@metux.de wrote:
Pardon if this has come up before, but what about the greatly
increased time taken to launch a shared-lib program? That's quite
Not that
#include u.h
#includelibc.h
int main(void){exits(nil);}
is 3317 bytes on my atom box.
Bloatware! A quick visit to 6th edition Unix (on 32-bit Interdata)
via the SIMH time machine produces this:
# cat t.c
int main() {exit(0);}
# cc t.c
# ls -l a.out
-rwxrwxrwx 1 root 164 Jun 4 15:53
The script has a small bug one might say: it capitalizes the first two
words on a line that are _not_ already capitalized. If one of the first two
words is capitalized then the third will get capitalized.
--On Thursday, October 29, 2009 15:41 + Steve Simon
st...@quintile.net wrote:
Listing of file 'sedscr:'
s/^/ /;
s/$/aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ/;
s/ \([a-z]\)\(.*\1\)\(.\)/ \3\2\3/;
s/ \([a-z]\)\(.*\1\)\(.\)/ \3\2\3/;
s/.\{52\}$//;
s/ //;
$ echo This is a test | sed -f sedscr
This Is a test
$ echo someone forgot to capitalize | sed -f sedscr
Pardon if this has come up before, but what about the greatly
increased time taken to launch a shared-lib program? That's quite
Not that much if your loaded caches the binaries of the programs (as
we do) and they
are small and for really shared state you have filesystems which
stay
On Fri Oct 30 01:47:06 EDT 2009, r...@swtch.com wrote:
btw, isn't the lockstats.locks++ in taslock:/^lock
broken since 1 loads can happen simultaneously
leading to undercounting?
sure but does it need to be 100% accurate?
probablly not. but it will be most inaccurate
and cause the most
Hello
why
1+-2
is ok for the 'hoc' command, while both
1--2
1-+2
produce a syntax error?
(If spaces are added as in
1- -2
1- +2,
hoc is fine with the former but still rejects the latter...)
Thanks
Ruda
You can do it, definitely.
Caveat: I'm in bed with a virus and the brain's on impulse power
so these are untested and may be highly suboptimal.
Is the input guaranteed to have 2 words on each line?
What are your definitions of words and blanks?
I know from your snippet that there's no leading
PS.: While 'bc' is not any better in this, 'maxima' gets it wright.
(Both in linux.)
Look under the production for expr in /sys/src/cmd/hoc/hoc.y
Looks like the unary plus problem would be a one-line fix. The -- with no space
may be harder to fix.
On Fri, Oct 30, 2009 at 11:44 AM, Rudolf Sykora rudolf.syk...@gmail.com wrote:
PS.: While 'bc' is not any better in this, 'maxima'
On Fri Oct 30 11:31:24 EDT 2009, dav...@mac.com wrote:
You can do it, definitely.
well played!
- erik
* Jorden Mauro (jrm8...@gmail.com) wrote:
The -- with no space may be harder to fix.
More importantly, it actually is a syntax error. Consider:
1-(-2) //Add 2 to 1
1-- //Decrement 1, how?
--2 //Decrement 2, how?
1--2//Decrement 1? Decrement 2? How?
* Rudolf Sykora (rudolf.syk...@gmail.com) wrote:
(a-- b wouldn't make sense) it probably can't (can it?) be parsed
simply with yacc...
I don't see why it would be impossible. Just introduce a binary --
operator (cf. -1 vs. 1-2). Whether it's worth it...
Eris Discordia wrote:
The script has a small bug one might say: it capitalizes the first two
words on a line that are _not_ already capitalized. If one of the first
two words is capitalized then the third will get capitalized.
Call me a Dinosaur, but - so long as it is ASCII or EBCDIC it is
Call me a Dinosaur, but - so long as it is ASCII or EBCDIC it is relatively
trivial to implement that in hardware AND NOT have the issue of altering any
but the first two words AND NOT have issues where there is only one word or a
numeral or punctuation or hidden/control character rather than
Tim Newsham wrote:
Call me a Dinosaur, but - so long as it is ASCII or EBCDIC it is
relatively trivial to implement that in hardware AND NOT have the
issue of altering any but the first two words AND NOT have issues
where there is only one word or a numeral or punctuation or
hidden/control
2009/10/30 Martin Neubauer m...@gmx.net:
* Rudolf Sykora (rudolf.syk...@gmail.com) wrote:
(a-- b wouldn't make sense) it probably can't (can it?) be parsed
simply with yacc...
I don't see why it would be impossible. Just introduce a binary --
operator (cf. -1 vs. 1-2). Whether it's worth
Python handles correctly e.g. 2-7, 2+-+-7, 2+++-7,...
C-compiler that I use in my linux, gcc, is ok for a+-b and a-+b, also
for a+-+-b, but not for a++b or a--b or any alike.
you're confusing tokens and productions. the c tokenizer
has the following rules
-- - DEC
++ -
i'll leave as an excersize why kr thought that making --
and ++ tokens was worth while.
did DEC make them do it so they could issue trademark infringement
lawsuits for copying the instruction mnemonic?
2009/10/30 erik quanstrom quans...@quanstro.net:
Python handles correctly e.g. 2-7, 2+-+-7, 2+++-7,...
C-compiler that I use in my linux, gcc, is ok for a+-b and a-+b, also
for a+-+-b, but not for a++b or a--b or any alike.
you're confusing tokens and productions. the c tokenizer
has
This kind of problem is character processing, which I would argue is
C's domain. You can massage awk and sed to do the job for you, but at
least for me it's conceptually simpler to just bang out the following
C program:
#include u.h
#include libc.h
#include bio.h
#define isupper(r) (L'A' =
try this ...
#include u.h
#include libc.h
void
main(void)
{
memmove(nil, nil, 100);
print(hello squid boy\n);
}
who would have thunk it?
brucee
22 matches
Mail list logo