Your code should be taken out back, lined up against a wall, and machine-gunned
21–30 of 76 posts
Re: Your code should be taken out back, lined up against a wall, and machine-gunned
#22 > 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 wall, and machine-gunned
#23He points out the errors,the incorrect assumptions and offers pointers of what to do. The general standard of discourse on most mailing lists tend to be quite a bit lower than this.
Re: Your code should be taken out back, lined up against a wall, and machine-gunned
#24I'm a little bit slow with the low level stuff. Could someone explain what's so horrific about this code?
For one thing, he's using assembly of one type of machine and expects it to work on different type of machine. He confuses Linux as a machine abstraction and demands that Cygwin running on Windows to be the same. For the low level mess, he sets the stack frame pointer to a uninitialized heap-allocated buffer which contains God-know-what garbage. When main() returns, it pops its return address from the stack frame poi…
Re: Your code should be taken out back, lined up against a wall, and machine-gunned
#25Re: Your code should be taken out back, lined up against a wall, and machine-gunned
#26While I always enjoy a good rant, I don't see why it had to be so vicious and insulting. Yeah, the guy's clearly pretty confused (if he wanted to do these kind of tricks, I'd try to use setjmp, fiddle with the structure, then longjmp to it), but there's no reason to be mean about it.
I think it's because his indignant demand of the Cygwin team to fix this "bug" and make it work for him. Basically it's the attitude that I know my way is the right way, now fix the platform so that my program runs.
http://www.cygwin.com/ml/cygwin/2005-08/msg00504.html
He questions whether it "should be fixed" in Cygwin, a perfectly reasonable request, and he fully admits that he isn't sure whether it's a problem in Cygwin or not.
Re: Your code should be taken out back, lined up against a wall, and machine-gunned
#27While I always enjoy a good rant, I don't see why it had to be so vicious and insulting. Yeah, the guy's clearly pretty confused (if he wanted to do these kind of tricks, I'd try to use setjmp, fiddle with the structure, then longjmp to it), but there's no reason to be mean about it.
I think it's because his indignant demand of the Cygwin team to fix this "bug" and make it work for him. Basically it's the attitude that I know my way is the right way, now fix the platform so that my program runs.
Re: Your code should be taken out back, lined up against a wall, and machine-gunned
#28MS speaker: and we've got POSIX, and we've got POSIX ACLs, and we've got a Unix Subsystem and we've got Korn Shell, and it works just the same way as under Unix.
Heckler: NO IT DOESN'T
MS speaker: er, ok. It does work. Anyway...
Heckler: NO IT DOESN'T WORK
MS speaker: What doesn't work?
Heckler: (rattles off differences in behavior and brokenness of ksh on NT)
MS speaker: we'll we've had our top guys working on this ...
Heckler: I'M DAVID KORN.
Room erupts in laughter.
Update: source: http://slashdot.org/articles/01/02/06/2030205.shtml. See question 5.
Re: Your code should be taken out back, lined up against a wall, and machine-gunned
#29Re: Your code should be taken out back, lined up against a wall, and machine-gunned
#30Earlier quoted context omitted.
This might be a stupid question, but what are you meant to do if not cast malloc's return? My C is a bit rusty, but how else are you meant to allocate data of different types on the heap?
C allows implict casting of void* to any other kind of pointer. Hence, you never need to cast the return from a malloc if you're storing it in a pointer. C++, however, does not allow this. So, if for some reason you're calling malloc rather than new in C++, you need to cast.