Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

07-22-2012 , 04:57 PM
Jason, you mentioned data-oriented development aq few posts ago, do you know of good resources on this? Other than Noels blog?

Mvh
Inga
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-22-2012 , 06:19 PM
Hmm... I'm afraid I dont... Tbh, I dont think I've ever heard anyone outside the game industry talk about it... or at least not call it that. I think the scientific/HPC guys deal with the same issues and have developed similar paradigms, at least in spirit if not by name.

The "structure of arrays" paradigm is a common manifestation of data-oriented design... but not always necessary.

Most computer "work" boils down to this: you have data somewhere in memory that has to move through a CPU and end up in some other part of memory. Data-oriented design is all about maximizing the efficiency of that process.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-22-2012 , 06:46 PM
Quote:
Originally Posted by sng_jason
Hmm... I'm afraid I dont... Tbh, I dont think I've ever heard anyone outside the game industry talk about it... or at least not call it that. I think the scientific/HPC guys deal with the same issues and have developed similar paradigms, at least in spirit if not by name.

The "structure of arrays" paradigm is a common manifestation of data-oriented design... but not always necessary.

Most computer "work" boils down to this: you have data somewhere in memory that has to move through a CPU and end up in some other part of memory. Data-oriented design is all about maximizing the efficiency of that process.
Isn't the thing you're describing just plain old procedural programming? Where the data and the methods that act on it are independent entities (as opposed to being kept together, as they are in OO-programming)?

Sounds like a rebranding effort to me....

EDIT: fwiw, i found this: http://gamesfromwithin.com/data-oriented-design
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-22-2012 , 09:56 PM
Quote:
Originally Posted by sng_jason
I'm pretty sure you're out of luck in Java. In C# you can still write unmanaged code and allows you some access to actual pointers and such... but its really inconvenient.


Concurrent programming is where its at. As CPU clock speeds are quickly tapering off, the answer is more and more parallelism. More cores and wider registers.


I dont have any 1st hand experience with GOAL, but I have a friend who worked at Naughty Dog during the last of the "lisp years" and he always spoke very highly of it. From how it was described to me, it was particularly well suited to dealing with the challenges of developing on PS1/2 (which is something I do have 1st hand experience with): streaming and packing stuff in/out of a very small amount of RAM.

I think the main reason they didnt carry it on to PS3 development is that the guys who had created it in the first place had left the company. With them gone, I dont think anyone else really understood it well enough to want to gamble on moving it to the PS3.

Plus, there was a huge difference in the quality of the Sony development tools between the PS3 and PS2 and especially the PS1. So I dont think it felt like there was going to be as big a payoff by "going cowboy" with the dev tools. The state of PS1 tools was so weak, deciding to write your own compiler in a "non-standard" language was a little bit less of a stretch than it might seem today. (Dont get me wrong, I still think its jaw-dropping 31337 )

Even though the PS3's "cell" processor was pretty non-standard in a lot of ways... it was still based on PowerPC and had all the weight and experience of Motorola/IBM behind it... so there was going to be tons of good documentation (in English even!) and good compilers for sure. Working on the PS2 in the early days was like trying to develop for something you pulled out of a crashed UFO.

But I digress...



I dont think there's any real technical reason that stops Lisp, or any language that compiles down to native machine code, from being as fast as C. The real difference is that C compilers just have had so much more development effort behind them for so many years... they're very sophisticated at this point.

That said, it might be important to remember that C was developed to be a "slightly easier than assembly" way of programming. The C syntax was designed to enable the programmer to use the same design patterns as s/he would when using assembly. And given that processors today still have the same basic architecture of processors when C was first developed (stack-based, procedural), C-like languages might still have a kind of natural edge.



This is exactly whats happening already... OpenMP, OpenCL, CUDA, C++11... these all, in one way or another, have a focus on concurrency and they all compile to native machine code.

The difficulty of actually achieving a program that can scale across a multiple (and possibly variable) number of cores largely depends on problem at hand.

From my own experience, getting a program like SnG Solver to scale from 2 to 16 or even 1000 cores (on a GPU) has been relatively easy because the "work" is very homogeneous. Unlike say, Call of Duty on the PC. Even though the primary platform for CoD was the Xbox360 with its 3 cores, we pretty much hit a wall after 4 hyper-threaded cores. At the end of the day we were bottle-necked by the direct3d driver layer.
Excellent post. I read this 4 or 5 times.

I was beating around the Clojure bush on those questions, as I'm starting to dive into the language. I just didn't think that it was for love of Lisp (completely) that the creator of this language created it as a Lisp. I was thinking that the reason is that the Lisps are able to represent concurrency easier than most other pre-packaged languages that don't have concurrency, multi-threading, and actor models built-in. As much as it's neat to build a language from the ground-up, the success of concurrency depends a lot on widespread adaptation, and that is why Clojure compiles to JVM, and for good or bad, I think that this is a step in the right direction. It now compiles to JVM, CLR, javaScript (Closure, actually), and yeah: Scheme to C, so it's only a matter of time before it compiles directly to C. There's a new project, only 20 days old on github now.

As for the other languages you list, they seem to be hardware-specific outside of C++11, but I think that it's all interesting stuff right now. Definitely an exciting time to study computer programming. What do you think the future will be? All C-based for the next 30 years before something else pops?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 10:14 AM
Quote:
Originally Posted by jjshabado
I had a coworker who left to work in finance. I ran into him a couple of years later and they were using Java to write a trading application that needed to be really fast. He said that they'd eliminated GC by not creating objects. They'd even gone so far as rewriting some standard networking drivers that were creating objects.

I can't remember why they felt this was faster than using something like C++ but he was a pretty smart dude so I'm sure they weren't totally crazy.
Fascinating. I mean that. That's interesting.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 10:46 AM
What the finance story tell me is a particular use case. They don't care about the relative performance of native code vs Java VM, and will just throw whatever iron they have to to make it work.

However what they can't tolerate is an occasional latency spike caused by GC, and they will move Heaven and Earth to stop that from happening.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 11:01 AM
Garbage collection is a pita in HTML5 games as well with Javascript, my brother wrote about it with a similar technique as the finance people where you recycle objects:
http://www.scirra.com/blog/76/how-to...ime-javascript

GC pauses suck for anything performance critical such as finance systems and games!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 11:02 AM
Quote:
Originally Posted by Shoe Lace
Does anyone know of any free VPS hosting services that aren't a scam?
Amazon offers a free AWS tier http://aws.amazon.com/free/

This is essentially 1 micro instance for free. I doubt you will get better than that.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 02:02 PM
Sanity check:

I'm planning to get the MBP with retina display in spite of the fact that I don't actually want a retina display. (For those of you who are keeping score: Yes, I have procrastinated for months now... I always take forever to buy a computer) I'm doing this because I do heavy data analysis, and it seems that retina display is better WRT RAM and flash memory, and I have money and am on my computer constantly, so a well-speced machine is really important to me.

Here's my thought process:

I can get a vanilla MBP with the following specs for $2699:

Quote:
2.6GHz Quad-core Intel Core i7, Turbo Boost up to 3.6GHz
8GB 1600MHz DDR3 SDRAM - 2x4GB
256GB Solid State Drive
MacBook Pro 15-inch Hi-Res Glossy Widescreen Display
Or I can get the retina display with the following specs for $2999:

Quote:
2.6GHz Quad-core Intel Core i7, Turbo Boost up to 3.6GHz
16GB 1600MHz DDR3L SDRAM
512GB Flash Storage
Retina display obv
So, for $300 extra, I get 256 GB extra in flash memory, 8 GB extra in RAM, and the benefit of a really nice screen that seems completely useless to me now but I might be really happy about once I own it/in a couple of years when I'm doing god knows what. I'd have to pay $500 extra to get that extra storage space on the vanilla MBP, which doesn't seem worth it since I own a TB external for long-term, and 16 GB RAM simply isn't an option there. Plus, the retina is significantly thinner, which is cool because I'm gonna be lugging it around a lot next year. I lose an optical drive, but I haven't had need for an optical drive in years.

So, that seems like an easy decision, right? Is there some downside to the retina that I'm missing? I would guess that it hurts battery life, but it seems to not effect it at all. I feel weird buying something whose main selling point seems to be something that I don't care about.


Bonus question: As a man who doesn't understand anything about processors, I decided for some reason that $250 more for a 2.7GHz Quad-core Intel Core i7, Turbo Boost up to 3.7GHz instead of the 2.6/3.6 version seemed totally unnecessary, even though I have money and a well-speced laptop is ridiculously important to me. I know literally nothing about processors, though, so it'd be cool if someone who does could tell me if I'm right or wrong there.

Last edited by NoahSD; 07-23-2012 at 02:11 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 02:26 PM
Quote:
Originally Posted by MrWooster
Amazon offers a free AWS tier http://aws.amazon.com/free/

This is essentially 1 micro instance for free. I doubt you will get better than that.
Ah, I forgot about this. Only problem I see is it says it's only available for a year. I guess most of the services start to auto-bill you after a year?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 04:25 PM
Quote:
Originally Posted by Shoe Lace
Ah, I forgot about this. Only problem I see is it says it's only available for a year. I guess most of the services start to auto-bill you after a year?
Not 100% sure if it starts auto-billing. Probably a yes tho. FWIW a micro instance costs around $16 per month.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 04:28 PM
Quote:
Originally Posted by NoahSD
Sanity check:

I'm planning to get the MBP with retina display in spite of the fact that I don't actually want a retina display. (For those of you who are keeping score: Yes, I have procrastinated for months now... I always take forever to buy a computer) I'm doing this because I do heavy data analysis, and it seems that retina display is better WRT RAM and flash memory, and I have money and am on my computer constantly, so a well-speced machine is really important to me.

Here's my thought process:

I can get a vanilla MBP with the following specs for $2699:



Or I can get the retina display with the following specs for $2999:



So, for $300 extra, I get 256 GB extra in flash memory, 8 GB extra in RAM, and the benefit of a really nice screen that seems completely useless to me now but I might be really happy about once I own it/in a couple of years when I'm doing god knows what. I'd have to pay $500 extra to get that extra storage space on the vanilla MBP, which doesn't seem worth it since I own a TB external for long-term, and 16 GB RAM simply isn't an option there. Plus, the retina is significantly thinner, which is cool because I'm gonna be lugging it around a lot next year. I lose an optical drive, but I haven't had need for an optical drive in years.

So, that seems like an easy decision, right? Is there some downside to the retina that I'm missing? I would guess that it hurts battery life, but it seems to not effect it at all. I feel weird buying something whose main selling point seems to be something that I don't care about.


Bonus question: As a man who doesn't understand anything about processors, I decided for some reason that $250 more for a 2.7GHz Quad-core Intel Core i7, Turbo Boost up to 3.7GHz instead of the 2.6/3.6 version seemed totally unnecessary, even though I have money and a well-speced laptop is ridiculously important to me. I know literally nothing about processors, though, so it'd be cool if someone who does could tell me if I'm right or wrong there.
Just so you are aware, I read this article a few days ago about how the MBP retina display maxes out the graphics capability of the machine and some people have reported minor issues.

http://forums.macrumors.com/showthread.php?t=1396188
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 05:46 PM
Quote:
Originally Posted by MrWooster
Not 100% sure if it starts auto-billing. Probably a yes tho. FWIW a micro instance costs around $16 per month.
$16/month is about the same as what you would get with a low end VPS hosted somewhere else.

I guess I'll take the free year and pray I don't surpass any of the limits. I just wanted a place to throw up small personal projects which I wanted to be public facing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 05:58 PM
Thats exactly what I use mine for (tho I dont have the free tier any more)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 06:08 PM
With the usb 3.0 and thunderbolt connectivity on the RD MBP I think you can get external storage cheaper than internal storage if you need it. I can't speak to RAM requirements, I like the 8 in the base line model better than the 4 in my work machine. Processor wise you're probably correct, it's probably not worth the cost.

The screen is really, really nice, even for just reading text on.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 06:14 PM
Quote:
Originally Posted by MrWooster
Thats exactly what I use mine for (tho I dont have the free tier any more)
Are you still doing node development? What kind of stack do you have on your micro instance?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 06:57 PM
Quote:
Originally Posted by MrWooster
Just so you are aware, I read this article a few days ago about how the MBP retina display maxes out the graphics capability of the machine and some people have reported minor issues.

http://forums.macrumors.com/showthread.php?t=1396188
1) Thanks. This is exactly the kind of stuff that I was hoping to find out.

2) God ****ing dammit.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 07:01 PM
My main complaint with my MBP w/ Retina (what a ****ty name) is that the battery life blows. There are some times where its dead in about 2 hours.

I've never noticed problems like the ones mentioned in the thread, but I'm not sure I'm observant enough to notice them.

+1 to nice to read text on this screen.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 07:01 PM
@Shoe Lace All requests are handled by apache and then proxied to various nodejs applications. Having apache as a front end makes virtual host setup a lot easier as you can just delegate a.example.com to localhost:1234 b.example.com to localhost:5678 etc... It also means you can apply SSL transparently to the NodeJS apps and setup Basic Authentication for pages you want to limit access to. All this could be done in NodeJS, but its a PITA to setup.

My personal home page (guy.ht) is just a static HTML file which is delivered by apache directly, and my blog is hosted using a NodeJS blogging engine (Glog) which uses Git as a storage engine. I also use it as a secondary git repository server (using git+ssh) and for playing around with new projects.

I also have a 2nd server running my PkrSess project. Requests are handled directly by NodeJS (no Apache), it uses MongoDB as a storage engine and Redis for cache and sessions.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 07:03 PM
Quote:
Originally Posted by NoahSD
1) Thanks. This is exactly the kind of stuff that I was hoping to find out.

2) God ****ing dammit.
As an Apple fan, it pained me to deliver the bad news.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 07:12 PM
Quote:
Originally Posted by kerowo
With the usb 3.0 and thunderbolt connectivity on the RD MBP I think you can get external storage cheaper than internal storage if you need it. I can't speak to RAM requirements, I like the 8 in the base line model better than the 4 in my work machine. Processor wise you're probably correct, it's probably not worth the cost.

The screen is really, really nice, even for just reading text on.
Yeah.. 512 GB SSD is plenty for me. Even 256 GB will probably be fine. It's not like I have 512 GB databases to query, and I'm already in the habit of keeping lots of stuff on an external.

I will definitely notice 16 GB of RAM. I'll fill all 16.

It's hard for me to tell if the screen is something that looks cool in the store and that purists really like but I won't care about or something that I'll legitimately enjoy.

Do you notice the issues that MrWooster pointed out?

Quote:
Originally Posted by jjshabado
My main complaint with my MBP w/ Retina (what a ****ty name) is that the battery life blows. There are some times where its dead in about 2 hours.
I repeat:

1) Thanks.
2) God ****ing dammit.

A lot of reviews say it really does get like 6 or 7 hours, though. Are you doing something that's somehow really battery intensive? Also, maybe you have a lemon that should be replaced?

Now I guess I'm leaning pretty heavily to the vanilla MBP. My ideal laptop just got fatter and lost 8 MB of RAM . God ****ing dammit.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 07:26 PM
Quote:
Originally Posted by NoahSD
Yeah.. 512 GB SSD is plenty for me. Even 256 GB will probably be fine. It's not like I have 512 GB databases to query, and I'm already in the habit of keeping lots of stuff on an external.

I will definitely notice 16 GB of RAM. I'll fill all 16.

It's hard for me to tell if the screen is something that looks cool in the store and that purists really like but I won't care about or something that I'll legitimately enjoy.

Do you notice the issues that MrWooster pointed out?



I repeat:

1) Thanks.
2) God ****ing dammit.

A lot of reviews say it really does get like 6 or 7 hours, though. Are you doing something that's somehow really battery intensive? Also, maybe you have a lemon that should be replaced?

Now I guess I'm leaning pretty heavily to the vanilla MBP. My ideal laptop just got fatter and lost 8 MB of RAM . God ****ing dammit.
I haven't noticed any of the things mentioned in the review, but I'm used to a really ****ty MBP at work (that I probably am hammering with too many open windows) versus not doing much at all on this lappy. I have run D3 at full rez on this and it is playable. I haven't done any battery tests with it so I can't say anything about battery life, I probably haven't had it unplugged for more than an hour or so meeting since I've had it.

Oh, I'm hoping the new OS will help with how crappy Chrome looks, it has noticeably softer text than Safari or Mail.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 07:51 PM
@MrWooster

Just checked your github profile (not bad, glob is a pretty neat idea). I noticed you're using vim too. Have you made any node/express/jade oriented vim-snipmate snippets? Our stack is pretty similar (node, mongo, redis).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 07:55 PM
Quote:
Originally Posted by NoahSD
A lot of reviews say it really does get like 6 or 7 hours, though. Are you doing something that's somehow really battery intensive? Also, maybe you have a lemon that should be replaced?\
I almost always have it on full brightness and run lots of applications (but nothing super intensive like playing video or video games). There's probably a decent chance I have a lemon - but I haven't bothered getting it looked at yet.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-23-2012 , 07:56 PM
have you tried holding it differently...
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m