Our new Indie Games subforum is now open for business in G&T. Go and check it out, you might land a code for a free game. If you're developing an indie game and want to post about it,
follow these directions. If you don't, he'll break your legs! Hahaha! Seriously though.
Our rules have been updated and given
their own forum. Go and look at them! They are nice, and there may be new ones that you didn't know about! Hooray for rules! Hooray for The System! Hooray for Conforming!
SELECT * FROM posts WHERE tid = 'PA PROGRAMMING THREAD'
Posts
Maybe Runnable?
I ran a server last night with it and noticed it was pretty bone crushingly slow. Wondering if maybe it's on my end or what.
Yeah now that you mention it. Mine is sort of a cheat on Java's threading to make it more mimic c#'s now that I'm looking at after a year.
Yeah it's Runnable. And I meant Implements, not Extends.
It's not intelligent, but it IS effective
Sublime 2 is pretty much my main editor now on any computer I can install it on for languages like LUA and Coffeescript
new Thread(new Runnable() { public void run() { /* Your task here */ } }).start();(At some point, this thread was discussing when you might need closures. This is precisely one of those times --- one of many.)
Yeah, there the facilities are largely in java.util.concurrent that make the task of dealing with shared-memory concurrency easier. But my point is that the question is ill-specified. It sounds like we were just talking about syntax, however.
I think that's what I'm thinking of! It's useful if you just have a bit of code you want to run in another thread, but don't want to bother creating a whole new class.
of course all of this threading talk kinda ignores the whole "spawn another process" method of parallelization, and let your kernel do the hard parts. depending on how much you rproblem resembles a Monte-Carlo, you CAN get very effective parallel processing as long as you're nor using MSFT OS's. (Processes in UNIX envs take very little overhead to spin up, and well, the NT model is ... a little heeftier)
great way to do it if your datasets can be processed independently then aggregated, and then you don't have to deal with every single god-awful implementation of "threads" or "pthreads" or whatever monstrosity that you want to use.
Of course, then you have IPC problems, but i've already said that this is for monte-carlo like problems
On Edit: I think it was Stroustrup who said that whoever comes up with an efficient (technically and from an implementation angle) way to thread, that will be the language of the future. You have how many "cores" in you box now? Yeh, how many are being used? Why is your program using only one?
Joe's Stream.
Well, you could create kernel-level threads, but I'm pretty sure Java doesn't do that.
Click for extreme lols.
It's so simple! We don't need programmers! I mean we still need functions and loops and exceptions, but when they are all in boxes instead of plain text... fuck fuck FUCK FUCK FUCK YOU!
Is that a diagram on program flow?
Hey, look at this language COBOL! It looks just like you're writing sentences. I bet you that the girls in the office pool could do it, its practically what they write everyday!
(the commercial programming industry has been consistently been providing tools to allow idiots to program. Today, we see the effects by have a bunch of programs that were implemented by idiots.)
Joe's Stream.
echo "line1\nline2\nline3\n\nafter" | sed -ne "1,/\n\n/ p"
I'd like that to print just the lines before the double newline. But it actually prints everything. I know sed usually works line-by-line, but I'm betting there's a way to make it treat newlines like any other character.
They work like sockets. It's a private channel, you have to call ConnectNamedPipe() once for each client that wants to connect
:^: that's what I thought thanks phyphor
The code for 'Messagebox.Show(valueToSplit(",").item(0))'.
One thing to potentially keep in mind - there's no parallel of listen()/accept(), instead you create the socket and accept() on each one, so if someone tries to open when there's nobody there due to a near-simultaneous open you'll get an error
Couldn't you just match on an empty line instead of trying to match on double newline?
echo -e "line1\nline2\nline3\n\nafter" | sed -ne '/^$/q; p'
The q is telling sed to quit, but I don't know if that's useful or not if you wanted to have sed do something else too. I'm not really that well versed in sed either, so I just kinda made something up that matches your exact specification.
That's fine, I assumed it worked like non blocking sockets of some variety. If no one's listening on the pipe then whoops.
The real problem here is not threads vs. processes but rather how to managed shared memory or more generally how to manage interacting processes (in the general sense), i.e., its a coordination problem related to, but not identical to the problem of utilizing multiple cores.
Yeh, it's always the IPC that screws you with concurrency, that and busywaits, but we've got philosophers and forks for all that.
ideally, you're looking for a loosely coupled (low IPC) easily aggregatable dataset, so you aren't dealing with shared memory.
which now reminds me of two CSB's.
First, I did some time a a HPC company based around Beowulf technology, and while *in general* it is far more cost efficient and often faster to used a distributed super computer, sometimes you really can't have the setup time. Like when you're calculating the trajectory of an incoming Nuke. So, there will always be a super computer manufacturer in the US
Second, I have a relative who works at one of the major slot-machine companies. A couple of years ago, there was a bug whereupon a series of button presses, money inserts/denials and other seemingly random stuff would cause the jackpot to payout. Every time. Root cause? RAM was entirely shared, and nobody told each other where they were writing. It was an interaction between the video and the sound bits that made the jackpot go off...
So yeh, Shared memory... bad things...
Joe's Stream.
I'm in the process of setting up my own, small CMS. I'm trying to figure out the best way to do that "Newest/most important content with blurb overlayed over an image/adjacent to an image" thing that seems to be common (like here: http://bruins.nhl.com/ or here: http://www.ign.com/).
Specifically, I'd like to know: is the front page stuff uploaded separate from the actual articles? Or is it done all at once? The way I have my alpha set up at the moment is that I have an inline editor with which to write content, along with a file upload input for that larger front page image, and other form inputs for various other things (like manually setting the URL slug). I'm just not sure if uploading it all at once is the best way to go.
I don't have a lot of experience with 3rd party solutions. I try to stay away from WordPress because it's a POS under the hood. The only one I've ever really dabbled with is PHPFusion, which was pretty shitty. Any insight on how it's done for real would be appreciated.
Stack Exchange | http://www.mpdevblog.blogspot.com
That's all up to the creator/content originator to decide which system they want.
Usually there's a checkbox that says "Post to front page?" on submit.
Okay... Cool. I have some things to think about on the back end.
Thanks!
Stack Exchange | http://www.mpdevblog.blogspot.com
I'm not sure how Julia will turn out, but Erlang is a more mature effort on the front of language+runtime support for distributed computing.
I haven' looked at erlangs performance with regards to vector operations and other forms of simd. Julia has me interested as it can target gpus once nvcc has the planned llvm backend.
Who are you interviewing with?