Hacker Newsnew | past | comments | ask | show | jobs | submit | phsoftnet's commentslogin

   size_t strlen(char *s)
   {
     size_t i = 0;
     while(*s++) i++;
     return i;
   }


Equally cryptic to perl syntax imo..


Why doesn't anyone ever mention my favorite language, Tcl?

foreach line [read stdin] { foreach word [split $line] { if [string match *ing $word] { puts $word } } }


One reason is that people haven't looked at Tcl in a while and so they "already know" what Tcl brings to the table. There have been a lot of changes/additions to Tcl in the last couple years alone. It is a very nice and consistent...and to borrow from Ruby...FUN language to program in.

The one thing that gets me is the "it's already been done" mentality. If you love Tcl then you want to create things in Tcl for the world to use. I have thrown out a couple ideas like "mailman in Tcl" or "nagios in Tcl"...but I always get "it's already been done". Sure, I could have done it anyway, but it gets your spirit down when you hit that wall. I know they have been done with other languages. Let's do it in Tcl to see if it can be done better!


Yeah .. I have not faced this kind of wall until now but I get your point.

The whole scripting language issue is a complicated one imo.. People want to either use 100% scripting or 100% system (i.e., C), which is not alright. Combine scripting & system according to your needs. This is why I like Tcl the most: It prevents you from using it where there might be computational bottlenecks (e.g., in algorithms). It is meant to complement C, not replace it. Anyway this is a separate thread.


Your code sample isn't quite right.

[read stdin] returns a string (not a list of strings), which is parsed as a list when you try to loop over it. The parsing breaks the string into a list of words, so the second loop is redundant. The parsing could fail if the input file isn't valid list syntax (unmatching {}'s). [split _] makes it safe.

    foreach word [split [read stdin]] {
        if [string match *ing $word] { puts $word }}
I love Tcl too! Tcl is a scripting language for C, Python is less-powerful version of Lisp.


Yes you're right hehe. less powerful version of Lisp? that's weird but oh well ..


I myself participated in the hacking cult noname123 refers to and i can clearly understand his statement. If you haven't been there, you just can't get it.

"Get a `blog'" haha this is so freaking hilarious and irritating at the same time .. clueless people that have only recently started using computers.

IT today is all about a bunch of business morons abusing the poor text-based HTTP protocol, reinventing user interfaces rendered through an overloaded browser process. An enormous number of levels of abstraction just to display a single facebook button.

They insist on pushing it even further .. every single f day .. polluting the field with buzzwords, overaplying relational databases where they are actually completely useless! It's all about making simple things look complex, as more and more clueless people get involved in the IT "business".

Thank god we still have OpenBSD and Plan9 and the old phrack articles around.

PS: address space randomization is a lame-ass countermeasure.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: