Language:
switch to room list switch to menu My folders
Go to page: First ... 21 22 23 24 [25] 26 27 28 29 ... Last
[#] Tue Mar 17 2009 17:47:53 EDT from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

And C++ loves leaving a trail of destruction everywhere it goes.

[#] Tue Mar 17 2009 17:48:22 EDT from LoanShark @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Heh. Destructor give you REAL ULTIMATE POWER.

[#] Wed Mar 18 2009 03:30:09 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

hm, its a little more writing job, but webcit nicely shows how to do destructors.



[#] Wed Mar 18 2009 07:41:23 EDT from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

yes, but see, the best part about real destructors is that you don't have to DO them, they happen by themselves, that's the magical part.
I've done the same thing, but it's that one place you forget to do it that kills you, that just can't happen in C++, that's what makes it so wonderful

[#] Wed Mar 18 2009 09:02:35 EDT from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Or, perhaps, unfairly destroyed, depending on your mood that day?

[#] Wed Mar 18 2009 18:45:56 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

thats why valgrind is around.

--- Weitergeleitete Nachricht ---
Mi Mär 18 2009 07:41:23 EDT von Ford II <>
yes, but see, the best part about real destructors is that you don't have to DO them, they happen by themselves, that's the magical part.
I've done the same thing, but it's that one place you forget to do it that kills you, that just can't happen in C++, that's what makes it so wonderful

 



[#] Wed Mar 18 2009 22:52:44 EDT from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

thats why valgrind is around. --- Weitergeleitete Nachricht ---

You run valgrind on live systems?

[#] Wed Mar 18 2009 22:53:58 EDT from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

I remember arguing that my apple II was better than a mac. I knew I was wrong, but I liked to argue.
I'm enjoying arguing that there are better alternatives to destructors because I like to argue. But I know I'm right.

[#] Thu Mar 19 2009 04:59:11 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

i've run uncensored through a webcit in valgrind on my home box for a quarter year now. Thats how I can be shure pretty much of the stuff I did isleakfree. (though libical is still giving me headaches)



[#] Thu Mar 19 2009 17:41:55 EDT from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Yes, well I don't think it would fly to have valgrind be part of the installation package.

[#] Thu Mar 19 2009 17:47:02 EDT from dothebart @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

probably not. thats why gcov is here to show you whether your tests hit everything or not.



[#] Thu Mar 19 2009 23:50:06 EDT from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

GAK!

I've just done a kooky thing.
Okay, so I'm writing a plugin for netscape's iplanet webserver (yea, I know, we're the only ones who still use it)
As for those of you who've known me for years you know I refuse to lift a finger unless I have a graphical debugger to do my development with.
Lately I've been living the eclipse dream because it usually works, even if you have to fight with it a little.
But this is different, I'm not debugging a program, but a so/dll that gets sucked in by another already running process.
So either a) I run the entire webserver in eclipse (which really just calls gdb) or I try and attach to the running webserver.
Well option 2 doesn't work becuase there's a bug in eclipse which keeps it from letting me select the process to run, the webserver doesn't come up in the list and I can't type in the process ID myself.
Okay, run webserver in gdb. Ain't gonna happen. it forks so many times before it even gets around to loading anything.... I couldn't even figure out how to get eclipse to try and debug a binary that wasn't its.

So then I had another brilliant idea.
I'll write a little test stub program that calls functions in my shared object, and test it like that.
The only problem is, I have to call library functions that are in the webserver.
Well... after a little hunting around I found the so that contains all of the nsapi functions I call.
Miracle of miracles, I add a reference to something called "_start" and it links! And runs!
Now to run it in the debugger.
Fuck around MORE with eclipse trying to make this new application of mine a project in eclipse that builds cleanly, finally get that working, and.... the debugger craps out. "stopped due to shared library exceptions." That's like the Dallas from red october running home to momma. If you breathe funny, you get a shared library exception.
so I make a new helloworld.c project, and it won't even debug that. Install new eclipse. Same thing. GARRRRRRRRR!

Then I remember that I just downloaded and installed sunstudio 12 yesterday.
Lemme give that a whirl. Last time I tried sunstudio11 it was unusable because X from VA to NY was too slow, but now I've got Xvnc working....

So I fire it up, make a helloworld.c program, debug it, and voila, works like a charm.
So I make a new project, it lets me soak up a makefile and source directories, it really couldn't be easier.
I tell it the target binary, and click debug, AND IT DOES.
I was ASTOUNDED. I mean there's no reason it shouldn't work, but shit like this never does.
So I'm realizing, eclipse is awesome at what eclipse is awesome at: java in windows or aix.
C/C++ it CAN do, but it's not as clean because it was hacked on and not designed in.

But sunstudio was designed to build and run and debug C programs on solaris.
It's dreeeeeeeeeeaaaaaaaaaaammmmmmmmmmmy.

And it actually called the nsapi library stuff and seemed to work. I was afraid it would require some initialization that I wouldn't know how to do becuase I'm not the webserver.
It may yet die, but the fact that it does ANYTHING at all still amazes me.

[#] Fri Mar 20 2009 09:21:05 EDT from IGnatius T Foobar @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Not to worry, after the acquisition, IBM will turn SunStudio into an Eclipse module :)

[#] Fri Mar 20 2009 13:19:27 EDT from Harbard @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Geeks are so funny.



[#] Sat Mar 28 2009 16:31:16 EDT from IGnatius T Foobar @ Uncensored

Subject: Re: php best practices

[Reply] [ReplyQuoted] [Headers] [Print]

The main thing I've heard (and followed) is that it's a good idea to try to keep the code and markup as separate from each other as possible. In other words, have some .php files that are nothing but function libraries, and then other .php files that are basically your web pages, marked up with calls to functions in those libraries.

Oh, and the easiest way to avoid PHP and AJAX errors on Fecesbook is to simply not go there.

[#] Sun Mar 29 2009 23:16:12 EDT from Ford II @ Uncensored

Subject: Re: php best practices

[Reply] [ReplyQuoted] [Headers] [Print]

I'm surprised nobody beat me to this:
Best practices for using PHP: Don't use PHP.

Based on what IG said, the fact that the best practice is to separate code and markup leads me to think that something is fundamentally flawed, though in this case, I'm more inclined to believe that the web is flawed more than PHP.
PHP is like the perl of web applications, great for little things, but people get the idea that enterprise systems should be writte in it.
That's probably it's biggest flaw.

[#] Sun Mar 29 2009 23:52:01 EDT from IGnatius T Foobar @ Uncensored

Subject: Re: php best practices

[Reply] [ReplyQuoted] [Headers] [Print]

Ok, then what would be your preferred language for writing web applications?  At some point you have to output a web page.  Neither code nor markup is something that you can live without.

There's been a lot of noise about "declarative languages" but so far, the only places where "declarative" has been useful have been PostScript (when you want absolute control over the layout and every visual detail) and the Web (when you want it to, y'know, do something).



[#] Mon Mar 30 2009 06:27:33 EDT from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

So far, for the limited programming I've done in web-related realms, I've found the following combination to be rather nice:

HTML, XML, JavaScript, Python, CSS

I use JavaScript for the client-side programming, Python for server-side programming, HTML to describe where things should go, and CSS to describe how everything should appear.  All that separation-of-stuff is made easier using the 'behavior.js' library:

http://www.ccs.neu.edu/home/dherman/javascript/behavior/

I use Python for creating anything that's dynamically-generated (say, pulled from a database, or programmatically-generated in some fashion from the server), usually in XML so prototype.js can unpack it nicely.  I suppose I could use C++ in place of Python, if I wanted a little more performance.

The results are usually extremely clean.



[#] Mon Mar 30 2009 07:56:56 EDT from Ford II @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]

Of course it depends on the goal, but my preference for writing a web application is simple java servlets and jsps
The reason is a) eclipse makes development so easy, but really because b) that's what servlets are designed for.
I love C++ more than all the others, but as far as I know fastcgi is still the only way to avoid having to fork a process, and that's still kinda lame.
An application server that can take requests and hand them to already running programs (in the sense that java programs run) and maintain a pool of database connections and other resources, to me, that's the way to go.
Of course I hate the performance hit and the over complexity, but the overall picture is better.

I think php is definetly the best of the lot in terms of cgi making, it was designed to be exactly what it is, and except for the few glaring security flaws, it does its thing well.
I don't know a lot about php, maybe there is a daemon mode it runs in or something.
But it has to be compiled or interpreted no? Nothing like run time interpretation to yield speedy web results.

And my long time fallback: is google written in PHP? I did'nt think so.

The fucked up part, is I think large parts of facebook are.

[#] Mon Mar 30 2009 10:57:07 EDT from fleeb @ Uncensored

[Reply] [ReplyQuoted] [Headers] [Print]


Hrm...

Perhaps, for what you're describing, if I wanted extreme performance, I'd use C++, code up a module for apache (presuming the use of an apache server), and have a virtual folder that refers to the module's bits to perform database queries and such.

Setup for such a thing would be fun.

Go to page: First ... 21 22 23 24 [25] 26 27 28 29 ... Last