(no subject)
Oct. 24th, 2000 04:52 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Today was slightly more interesting than average.
While bored during the second half of lunch, I pulled out one of my old coding projects from the summer - sendf. I hacked on it for around an hour (in total) today, and managed to make it almost work...sometimes.
It's a simple plaintext file transfer client and server, albeit no auth or security at all yet. :P
Anyway, the problem before is that I had forgotten one of the Principle Rules of Socket Programming:
Don't mix system calls (send() and recv()) with stdio. Ever. At all.
But that's not the annoying part. What's weird is that 1/3 of the time, the file gets transferred perfectly - except for a few bizarre nonplaintext characters scattered throughout the file I can't seem to find the source of.
Another third of the time, it garbles the first few lines and sends everything else fine
Another third, and the entire file is corrupted. I have no idea why it's doing this - I'll start really working on debugging tomorrow.
Anyway, Mr. Clayton's copy of OS X Beta came in, and I got to play with it. It's pretty sweet - a lot of the things I loved about NeXT are still there, alberit sometimes in a modified form. I do miss the NeXT-style Inspectors, especially - they're changed seriously. But some stuff like NetInfoManager.app is a direct port over from OpenStep...different widgets, but everything else is the same. Ars Technica's preview was dead-on on one thing: optimization is -badly- needed. And retraining the (mostly barely tech-literate) teachers and students for it will be a...chore, to say the least.
A kid from my bus is lending me his copy of Tranceport to burn, woo. That'll be cool.
While bored during the second half of lunch, I pulled out one of my old coding projects from the summer - sendf. I hacked on it for around an hour (in total) today, and managed to make it almost work...sometimes.
It's a simple plaintext file transfer client and server, albeit no auth or security at all yet. :P
Anyway, the problem before is that I had forgotten one of the Principle Rules of Socket Programming:
Don't mix system calls (send() and recv()) with stdio. Ever. At all.
But that's not the annoying part. What's weird is that 1/3 of the time, the file gets transferred perfectly - except for a few bizarre nonplaintext characters scattered throughout the file I can't seem to find the source of.
Another third of the time, it garbles the first few lines and sends everything else fine
Another third, and the entire file is corrupted. I have no idea why it's doing this - I'll start really working on debugging tomorrow.
Anyway, Mr. Clayton's copy of OS X Beta came in, and I got to play with it. It's pretty sweet - a lot of the things I loved about NeXT are still there, alberit sometimes in a modified form. I do miss the NeXT-style Inspectors, especially - they're changed seriously. But some stuff like NetInfoManager.app is a direct port over from OpenStep...different widgets, but everything else is the same. Ars Technica's preview was dead-on on one thing: optimization is -badly- needed. And retraining the (mostly barely tech-literate) teachers and students for it will be a...chore, to say the least.
A kid from my bus is lending me his copy of Tranceport to burn, woo. That'll be cool.