Only one JavaScript thread is used by firefox (and maybe other browsers -- I don't know).
In fact, spidermonkey is thread-safe and you can run multiple JavaScript threads outside the confines of the browser. In fact, I have written a class for spidermonkey which lets you create real OS threads running JavaScript functions.
> It still boggles me that any JavaScript from anywhere, such as from an ad, can crash the language > and leave you with no JavaScript support at all
Out of curiosity, how many programming languages do you know that will let you keep executing code once a syntax error has been reached, or an exception has been thrown but not caught?
The problem here isn't language design, it's poor programming. And try..catch block will work wonders around other-peoples-crappy-code.
> It's very hard to count on a language when browsers implement is so badly, especially when > you have no choice but to support really old software that keeps doing bad things that upset > newer, stricter versions of a scripting language.
Aside from function.arguments and === in JavaScript 1.2, I'm having a hard time thinking of a JavaScript language change which was broke backwards compatibility. That includes IE. Although it would be nice if IE would fix their stupid [1,2,3,].length bug.
> I know it's painful to hear, but you might consider moving to an OS X native editor.
I certainly may do that... but at least not until I start development that gets me a mac at work AND home.
Right now (and for the better part of the last decade) I'm developing on Solaris/sparc. I also have lots of bandwidth, low latency and a home workstation that speaks X... So I ssh into work, wing over a copy of xemacs and 'way I go. I have 98% of the work-desk experience from my bedrooom... except no ringing telephone.
Connecting two xemacses with gnuserv is pretty cool, too. Work from home, drive to work, continue working.. even my cursor is right where I left it, and my kill ring still has the last stuff I yanked.
You're right, BTW, using X apps on mac feels wierd.. I particularly have problems with meta/alt/cmd/ctrl and the lack of a paste key.
> I suspect that's par for the course for a Wine-ported app
Wine apps are/can be much better than that on Leopard. I only have one data point, but I use it _extensively_ and it works super-well. And stably. And actually, maybe even better than on Windows.
The app? ies4osx under Darwine. Specifically, I am running Internet Explorer 6.0 for web-dev testing.
The ONLY complaint I have is that it's under the "X" program, instead of it's own program, so I can't cmd-tab to it effectively. Web I'm doing web-dev, I also run Xemacs, so I have to ctrl-tab to get to IE, then cmd-tab to get to Safari and Firefox.
And it's such a small complaint that I haven't even googled for a solution yet.
> And the fact that you parrot this means you haven't a g** d*** clue how > networks and networked devices actually work.
Care to let me put a box on your physical network and find out for yourself?
> If it's using the same MAC as another device in the same network, then > neither device will work correctly - PERIOD.
That depends on a) how the other device is used (something is periodically power cycled? and b) how you define "work correctly"
> It's used to find the correct switch port. As long as you are able to talk to > it, it most f'ing certainly can be found.
And if its sole job is to STFU until such time as it's time to do something interesting, then you won't. Your assumption that said device is even running a full IP stack is completely unwarranted, IMO.
You came somewhat close to describing my high school physics curriculum. Except the Ideal Gas Law was covered in Chemistry, and you forgot a few things... Hooke, Kirschov, Thompson,... uh, golly that was a long time ago.
In some cases where basic calculus would have been handy, we graphed and measured the area under the curve. That was also helpful later, in calculus.
I also think we didn't touch the wave equation until grade 13 chemsitry. But we did study nuclear reactors and relativity in high school physics.
The CSP page was like revisiting Formal Methods all over again (ugh;), but that plan-9-derived C lib actually looks interesting. And it may solve some problems I have been mentally muddling with for some time.
Now I have to go think about this. In a few weeks, when I have time. *grumble*
> The whole point was that generally, these separate tabs will have very little need to interact.
I'm not really familiar with browser internals, but I'm guessing that there must be at least some points of common interaction
- document cache
- nameservice cache
- connection sharing (?)
- configuration
- font resources
- system libs (e.g. image rendering)
- cross-frame/cross-window.open javascript
- GUI container rendering
My post was really a counter example, though. The OP suggest that just slapping each tab into a separate thread would somehow magically make the browser more stable by allowing threads to hang or crash separately.
Other posters have made the point that appropriate design fixes many of these issues -- but design is hard to bolt on after ten years of development. Especially when innocuous things like this can mess you up:
On SOME memory architectures, in multi-CPU configurations, the output could be "0 1" or "1 0", even though you'd expect "1 1" -- think how a.i and a.j are incremented, some arches will read double-ints out of the struct and put 'em back as double ints.
Now, obviously, this is a contrived example, but it's a great one for showing that MT design really does need significant forethought.
(And I _did_ preview. But whoever wrote the new CSS for the ecode tag is clearly a numpty)
Actually, I'm pissed the Mac Office 2004 (demo) is in on my leopard box, and I don't recall ever installing it.
You know, I'm a developer with talent and I keep getting stuck fixing crap high schoolers with no formal education THOUGHT they could do.
*grumble*
I really don't like web development, I have better things to be doing, but some of this new crap (think Gmail) really DOES need real programmers.
JavaScript isn't single-threaded.
Only one JavaScript thread is used by firefox (and maybe other browsers -- I don't know).
In fact, spidermonkey is thread-safe and you can run multiple JavaScript threads outside the confines of the browser. In fact, I have written a class for spidermonkey which lets you create real OS threads running JavaScript functions.
> It still boggles me that any JavaScript from anywhere, such as from an ad, can crash the language
> and leave you with no JavaScript support at all
Out of curiosity, how many programming languages do you know that will let you keep executing code once a syntax error has been reached, or an exception has been thrown but not caught?
The problem here isn't language design, it's poor programming. And try..catch block will work wonders around other-peoples-crappy-code.
> It's very hard to count on a language when browsers implement is so badly, especially when
> you have no choice but to support really old software that keeps doing bad things that upset
> newer, stricter versions of a scripting language.
Aside from function.arguments and === in JavaScript 1.2, I'm having a hard time thinking of a JavaScript language change which was broke backwards compatibility. That includes IE. Although it would be nice if IE would fix their stupid [1,2,3,].length bug.
> I know it's painful to hear, but you might consider moving to an OS X native editor.
I certainly may do that... but at least not until I start development that gets me a mac at work AND home.
Right now (and for the better part of the last decade) I'm developing on Solaris/sparc. I also have lots of bandwidth, low latency and a home workstation that speaks X... So I ssh into work, wing over a copy of xemacs and 'way I go. I have 98% of the work-desk experience from my bedrooom... except no ringing telephone.
Connecting two xemacses with gnuserv is pretty cool, too. Work from home, drive to work, continue working.. even my cursor is right where I left it, and my kill ring still has the last stuff I yanked.
You're right, BTW, using X apps on mac feels wierd.. I particularly have problems with meta/alt/cmd/ctrl and the lack of a paste key.
> I suspect that's par for the course for a Wine-ported app
Wine apps are/can be much better than that on Leopard. I only have one data point, but I use it _extensively_ and it works super-well. And stably. And actually, maybe even better than on Windows.
The app? ies4osx under Darwine. Specifically, I am running Internet Explorer 6.0 for web-dev testing.
The ONLY complaint I have is that it's under the "X" program, instead of it's own program, so I can't cmd-tab to it effectively. Web I'm doing web-dev, I also run Xemacs, so I have to ctrl-tab to get to IE, then cmd-tab to get to Safari and Firefox.
And it's such a small complaint that I haven't even googled for a solution yet.
..BEOS has always been way ahead of the competition!
You would have been way more on topic if you had linked to this instead: http://management.silicon.com/itdirector/0,39024673,39286675-6,00.htm
> And the fact that you parrot this means you haven't a g** d*** clue how
> networks and networked devices actually work.
Care to let me put a box on your physical network and find out for yourself?
> If it's using the same MAC as another device in the same network, then
> neither device will work correctly - PERIOD.
That depends on
a) how the other device is used (something is periodically power cycled?
and
b) how you define "work correctly"
> It's used to find the correct switch port. As long as you are able to talk to
> it, it most f'ing certainly can be found.
And if its sole job is to STFU until such time as it's time to do something interesting, then you won't. Your assumption that said device is even running a full IP stack is completely unwarranted, IMO.
You forgot the important part -- it will only have one wire leading to it.
Write a little job that looks for DHCP packets which don't originate from your DHCP server.
When you find some, note the mac.
Then note any TCP coming from that mac.
Respond with forged RST packets to any TCP you find.
Voila! Their router appears broken. You can now appear the hero, by smashing it to bits.
Not necessarily.
For starters, it could "steal" somebody else's mac address when it needs to do its thing.
> was looking for example of atomic ops implementation.
If you're still looking, IIRC you should take a look in .. jsatomic.[ch] ..? in spidermonkey. Also, APR has sparc assembler atomic ops (again IIRC).
That said, I'm personally happy enough with the functions in atomic.h under Solaris 10 for the time being. But all I use is compare-and-swaps.
At least they didn't opt for Feb 29, 2009.
You came somewhat close to describing my high school physics curriculum. Except the Ideal Gas Law was covered in Chemistry, and you forgot a few things... Hooke, Kirschov, Thompson, ... uh, golly that was a long time ago.
In some cases where basic calculus would have been handy, we graphed and measured the area under the curve. That was also helpful later, in calculus.
I also think we didn't touch the wave equation until grade 13 chemsitry. But we did study nuclear reactors and relativity in high school physics.
Well, you see, it's like a Chevy Nova.. Or maybe a Ford Pinto.
Hey, thanks for the links.
The CSP page was like revisiting Formal Methods all over again (ugh ;), but that plan-9-derived C lib actually looks interesting. And it may solve some problems I have been mentally muddling with for some time.
Now I have to go think about this. In a few weeks, when I have time. *grumble*
> The whole point was that generally, these separate tabs will have very little need to interact.
I'm not really familiar with browser internals, but I'm guessing that there must be at least some points of common interaction
- document cache
- nameservice cache
- connection sharing (?)
- configuration
- font resources
- system libs (e.g. image rendering)
- cross-frame/cross-window.open javascript
- GUI container rendering
My post was really a counter example, though. The OP suggest that just slapping each tab into a separate thread would somehow magically make the browser more stable by allowing threads to hang or crash separately.
Other posters have made the point that appropriate design fixes many of these issues -- but design is hard to bolt on after ten years of development. Especially when innocuous things like this can mess you up:
On SOME memory architectures, in multi-CPU configurations, the output could be "0 1" or "1 0", even though you'd expect "1 1" -- think how a.i and a.j are incremented, some arches will read double-ints out of the struct and put 'em back as double ints.
Now, obviously, this is a contrived example, but it's a great one for showing that MT design really does need significant forethought.
(And I _did_ preview. But whoever wrote the new CSS for the ecode tag is clearly a numpty)
> How is that hard to see? It's not exactly a great insight.
Haven't done much multi-threaded programming, have you?
Say, one thread locks a mutex and hangs.
Whoops! Now all the other threads that want that mutex will wait forever!
How's THAT for great insight?
Repeat after me:
1. Threads are Hard
2. Threads are not magic bullets
3. Threads introduce WHOLE NEW CLASSES of bugs
Really? You think threaded tabs bring stability to the browser. WHAT? How the HELL do you figure that?
> should we attempt to trigger artificial panspermia? Is it unethical?
I don't know squat about ethics, but I heard it can make you go blind.
I think you've got the wrong DoD here.
The Denizens of Doom are trying to control time, because indirectly, time controls doppler RADAR.
Nah. It just gets bitchy. "Blah blah has modification time in the future!"
You might wind up generating a couple of .o files more than you need to, but I wouldn't call that breakage.
Now, an NFS server that's running SLOW, OTOH....
I just realized, if I killed somebody, I would be murderer..
But if I killed a RICH GUY.... I'd be a SUPER MURDERER!
Can I get a copy of Deep-Scottish-American? I'm getting sick of ked.
In Canada, we incarcerate women only with other women.
This means she won't get PMITA prison unless she has a sex change.
OTOH, she may very well get PLMCETISRBUIC prison.