News for hackers. Stuff that matters.
Re:Your code should be taken out back, lined up against a wa... by boredguy8 on Tuesday July 27, 2010 @03:11PM (#1552332)
Best part is in the follow-up discussion:

  > Do you actually realise that not all computer languages can 
  > be implemented with a model of one stack?
  > 

  Do you actually realize that there are far better ways to implement stacks
  for interpreters than dinking with esp?  Ways that actually have a chance of
  working?  I suggest you investigate those alternatives instead of trying to
  do something that cannot work, and then getting all pissy when people try to
  dissuade you from wasting your time.

  And don't make me break out my Turing Machine on you about that statement of
  yours.
Re:Your code should be taken out back, lined up against a wa... by tptacek on Tuesday July 27, 2010 @05:03PM (#1552715)
Strong disagree. Korn's response is at least funny. The rest of the responses are petulant, somewhat ill-informed, and orthodoxical. The argument over whether C does or doesn't have a runtime is particularly tedious. You get the impression that these people would all be very, very upset at the Detours paper, except that Detours works so well they'd know a priori they'd lose the argumet.

The original commenter --- despite his very fragile code --- is right: for what he wants to do, he needs to create temporary stacks. What he doesn't have is a mechanism to allocate and swap in and out of those stacks (he's hoping that switching stacks is a 2-liner that just relies on knowing the inline asm incantation for changing ESP).

Regardless, it is a uniquely and flagrantly bad way to educate (both the questioner and the world who's reading the thread) to start from the premise that "you're not ready to build the thing you want to build" --- at least when "the thing" we're talking about is systems code. 90% of C programmers are not "ready" to build production C code that will get deployed in hostile environments, and as a result, in every web project we ever do, we have to embark on a tedious inventory of all the 3rd party stuff our clients use to find the horrible C ZIP library they accidentally included. No C coder is blameless.

Unless I missed a whole leg of this thread (the part where they explained temp stacks and stack switching to this guy, who, in challenging the notion that C has a real runtime or the notion that the OS should [heh] be controlling ESP, is demonstrating more on-the-ground systems programming knowhow than several of the commenters), I think this is a remarkably douchey example of a programming help thread.

Re:Your code should be taken out back, lined up against a wa... by ww520 on Tuesday July 27, 2010 @09:56PM (#1553336)
Why don't you show us a working version of the code instead of spewing endless argument?
Re:Your code should be taken out back, lined up against a wa... by tptacek on Tuesday July 27, 2010 @10:18PM (#1553380)
Because, as you've demonstrated amply downthread, the people making the most noise about how incompetent the original poster was for asking this question about Cygwin are the ones least qualified to have an opinion about this stuff, and are actually making Dave Korn (who was at least funny and who clearly does know what he's talking about) look worse.

But if you know how to use The Google, you can actually find code of mine that does this. I doubt very highly you can say the same thing.

Re:Your code should be taken out back, lined up against a wa... by ww520 on Tuesday July 27, 2010 @10:48PM (#1553435)
Really I don't know you before this thread. I did what you asked and googled "thomas ptacek" and here are some of the result on the first page.

I'd Like Thomas Ptacek To Apologize Please http://www.zedshaw.com/blog/2010-01-12.html

Welcome to Thomas J Ptacek Furniture http://www.thomasjptacek.com/

Security Idiot: Thomas Ptacek: Too Quick By Far! http://www.securityidiot.com/2008/07/thomas-ptacek-too-quick...

Are those yours?

Re:Your code should be taken out back, lined up against a wa... by apower on Wednesday July 28, 2010 @12:34AM (#1553588)
This is hilarious.
Re:Your code should be taken out back, lined up against a wa... by tptacek on Tuesday July 27, 2010 @11:08PM (#1553471)
I don't sell furniture, and, keep looking.