no comment

IRIX/Nekoware development, porting and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
yarrumevets
Posts: 116
Joined: Sat Sep 25, 2004 3:50 am
Location: Sydney, Australia

Unread postby yarrumevets » Thu Jan 12, 2006 1:06 am

OK, well for those that tire of conventional systems programming languages with their loose typing, lack of buit-in features that have to be supported by an OS or some other run-time VM anyway, and other hairy bits - there's always a way to show how it can be done properly ...

http://www.research.philips.com/technol ... index.html

Now we can create something delicious that perhaps would be comprehensible to Martians.

si
Posts: 25
Joined: Sat Dec 24, 2005 9:13 pm
Location: St. Louis, MO, USA

Unread postby si » Thu Jan 12, 2006 10:09 am

lisp wrote:
lewis wrote:How is it laughable?


The primitives are exactly that - primitive. There's 30 years worth of research into better methods of locking and multitasking. All ignored because the Lowest Common Denominator (i.e. POSIX) has no support for them.

Programmers are lazy, and for the most part, incompetent - they'll muddle around fscking it up trying to used outmoded techniques rather than implement the modern techniques on top. The only way round this inherent flaw in programmers is to provide the functionality as standard at a higher level, but no one will use it because it's not present in the Lowest Common Denominator.


I think your flaw is in the fact you assume programmers to be lazy. While I would agree that 'professional' programmers who do not know these things are ill-educated for the job. A lot of us, like myself, had to pick up C pretty much as a requirement to get things done, but have no formal training in programming and for that matter most of the math involved here to base it on.

I wouldn't consider myself a programmer, but I do know C and use it do accomplish things. I wish I knew the usefulness and how to implement the methods you describe, but simply don't have the background knowledge to use them for any tasks. I suspect many others are in the same category.

User avatar
lisp
Posts: 274
Joined: Wed Feb 05, 2003 5:23 am
Location: England
Contact:

Unread postby lisp » Thu Jan 12, 2006 1:49 pm

So get some books on computer science and learn. Not having the training handed to you on a silver platter is no excuse for not going out there and getting it yourself.

Who knows, maybe you'll realise the errors of your ways before C manages to completely cripple your programming ability with it's awfulness ;)
--
lisa

bleair
Posts: 20
Joined: Thu Feb 19, 2004 7:54 pm
Location: los angeles, ca

Unread postby bleair » Wed Jan 25, 2006 2:46 am

lisp wrote:
squeen wrote:I would like to know what "first class functions and lamda expressions (Lagrange multipliers?)" are


I'll let wikipedia explain them, because my explanations will suck.

http://en.wikipedia.org/wiki/First-class_function
http://en.wikipedia.org/wiki/Lambda_calculus
http://en.wikipedia.org/wiki/Closure_%28computer_science%29
http://en.wikipedia.org/wiki/Continuation
http://en.wikipedia.org/wiki/Hygienic_macro
http://en.wikipedia.org/wiki/S_expression

Scheme isn't object oriented, but it's trivial to add the capability, and make it pretty much seamless. It doesn't have coroutines, but these too can be added. Want prolog style backtracking? Few lines of code, and it's as if it was designed into the language in the first place. It has a macro system so powerful that you can redefine almost any aspect of the language to suit your application.

It should be taken into account that Scheme is a member of the Lisp family - about the second high level language to be created, way before C. The fact we're still using something as primitive as C as the primary computer language would be sickening if I weren't so desensitised to the stupidity of the world! :)


Nice set of links.

Truly understanding Lisp is a mind-bending/expanding experience. Paul Grahm has written several good essays on the topic...
http://www.paulgraham.com/diff.html
http://lib.store.yahoo.net/lib/paulgraham/acl1.txt
http://www.paulgraham.com/iflisp.html

That said, some of the constructs and idioms of use that a person needs to learn in lisp in order to get "get thigns done" don't always fall into the convential mental models that people have.. e.g. people don't always think in terms of tail recursion or functional expression.

The language you use provides the elements to express your intent. These elements profoundly shape your thinking. Learning lisp is a _very_ good idea, but I would add that groking a dynamically typed language like ruby or python would also be a useful step.

Today's programs aren't monolithic stand alone assemblies. They rely upon huge numbers of support libraries for functionality (100K lines to millions of lines of code). Sadly, right now those libraries are written in C/C++/and a bit of Fortran. Perhaps in 10 years microsoft will have bought enough universities and written enough libraries to shift software development to its version of java - C#, perhaps not. Sigh, what a depressing thought. Software development is still in the 1960s (we clump "related" code into little text files and use makefiles).

User avatar
Oskar45
Posts: 2267
Joined: Mon Dec 05, 2005 2:35 am
Location: Vienna, Austria

Unread postby Oskar45 » Thu Feb 02, 2006 8:10 am

lisp wrote: Anyone who thinks C is powerful has obviously never had the luxury of a language with closures, first class functions, lambda expressions or even nestable function scoping.

Right - except, of course, for building e.g. GCL or Guile from source you need a C compiler first...
C is opium for programmers.

User avatar
Oskar45
Posts: 2267
Joined: Mon Dec 05, 2005 2:35 am
Location: Vienna, Austria

Unread postby Oskar45 » Fri Feb 03, 2006 1:45 am

Oskar45 wrote:
lisp wrote: Anyone who thinks C is powerful has obviously never had the luxury of a language with closures, first class functions, lambda expressions or even nestable function scoping.

Right - except, of course, for building e.g. GCL or Guile from source you need a C compiler first...


...and to expand a bit more: your bitching about C *completely* misses the mark; rather, seems you have some problem here, i.e., you are simply *confusing* /higher-level usage/ with /lower-level implementation/...

Of course, you are right about continuations, lambda stuff, etc. - yes, that's what makes LISPs tick (I myself got initially engaged to LISP 1.5 around 1970 during my PhD studies, and I love them still). But this is only the shining side of the coin, the higher-level usage side, that's what *you* or I are programming in...

Regarding the other side of the coin, the lower-level implementation, have you ever tried to compile LISPs from *sources* at all? Apparently not. Never mind. Two concrete examples should be sufficient here:

1. Chaitin's LISP Interpreter (google for it): granted it's only a limited toy, but my binary has just ~31.6K compiled from ~950 lines of, yes :!: , pure C code - and it only has .h's from the standard C library, nothing else...

2. As once upon a time you had told me [in another thread] that SCHEME is your favorite language: so, have you ever looked at, say, <libguile/continuations.c>? Did you recognize the language it is written *in*? Ok, you might not have the Guile sources installed but you will find similiar *C code* for other LISPs as well - just check *your* sources and you should get my point. If not, I strongly urge you to peruse these *)...

The above should not imply that C is my favorite language - it is not (I was sort of raised on APL), but in order to get what you really want, most of the time you just need to battle *C sources* bravely *before* you can enjoy what your hated C sources innocently *provided* for you (e.g., for my APL variant I'd first to get rid of pesky *C compilation* problems). Sure, *afterwards* you're certainly free to marvel at all those great language features no other language offers...but don't forget: most of the time precisely these features have indeed been coded *first* in, whether you like it or not, just *C*!

So, while C indeed has its own share of problems, nevertheless it is obviously powerful enough to code LISP's goodies in :wink:

Anyway, enjoy your favorites!

*)
Kernighan/Ritchie: The C programming language [Prentice-Hall]
Tondo/Gimpel: The C answer book [Prentice-Hall]
C is opium for programmers.


Return to “SGI: Development”

Who is online

Users browsing this forum: No registered users and 4 guests