Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / [STICKY] The Posting Competition

Author
Message
budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 26th Jun 2014 17:08
paaaaaaaaaaaage


"Giraffe is soft, Gorilla is hard." - Phaelax
nonZero
15
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 26th Jun 2014 19:58
Quote: "
Quote: "And I dunno, are you in the U.S. or U.K.?"

UK
"

I live in a giant bucket myself.

Quote: "I'd rather use the Win32 API to check for the file instead of opening a file just to check for the existence of a file. Weird that stat isn't working well though."

I try to avoid the Windows API, it's so... raaaaargh! (maybe because I try to avoid it. Self-perpetuating raaaargh?)
I'm actually 100% not sure it was the call to stat. The problem is that I get a false result for S_IFDIR on folders but I'll have another look anyway, maybe I'm missing something.

"I was in nASA before it was cool" -- Original nASA Members (nonZero, DJD and TheComet)
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 26th Jun 2014 20:50 Edited at: 26th Jun 2014 20:56
Quote: "I live in a giant bucket myself."

Tuesday's coming, did you bring your coat?

(responded to the e-mail)

budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 26th Jun 2014 22:14
Steam sale needs to be better. I'd get RE4 if it were less (I've sadly never played it).


"Giraffe is soft, Gorilla is hard." - Phaelax
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 26th Jun 2014 23:09
Quote: "UK"

Definitely not me then. I've never been to that side of the pond.

Quote: "I tried going down that route, but I found myself writing a lot of pointless delegates."

Pointless delegates such as what? Even in WTLD I was writing direct to texture and I simply tossed that functionality into its own subsystem. The main point of the engine will be to do game logic in the scripting language, not anything that would require direct access to Ogre to do. And considering how the project I'm working on at work is at something like 20+ discrete compilable objects(.h/.cpp pairs), lots of files doesn't really bother me.

In any case, it's early yet so I'll have to see how it pans out. I've learned quite a bit about architecting interfaces and applications since then so it should be a bit better designed this time around.

Fallout3fan
17
Years of Service
User Offline
Joined: 9th May 2009
Location:
Posted: 27th Jun 2014 04:43 Edited at: 27th Jun 2014 04:46
No offense, but where are the promises the president and vice president made?

Willing to be hired as a voice actor for work and to put on a resume.
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 27th Jun 2014 04:44
Quote: "No offense, but where are the promises the president and vice president made."
And what are those?


Flash is falling out of... Flashion.
Fallout3fan
17
Years of Service
User Offline
Joined: 9th May 2009
Location:
Posted: 27th Jun 2014 04:56
Quote: "Lunacy:
There is insufficient lunacy and silliness on this forum, our starting goal was to change this and we have also begun to gradually succeed, in spite of no seats in the current administration. A vote for us could help us succeed that much further and speed it up greatly."


Quote: "We are at an important juncture for these forums. The old place we know and love lies one way while the new and improved forums lies the opposite. We are committed to help ensure that the TGC staff try to maintain a middle ground, even if we must pave the way through an ocean."


Quote: "nASA is dedicated to helping clean up all the boards by consolidating the large quantity of stickies into single, coherent and high quality posts that The Next can then use as a replacement to reduce bloat. We will keep our working drafts open to public scrutiny at all times. No old links will be altered, they will just redirect."


Quote: "Too many times we see injustices on the forum and nASA plans to take a proactive role in preventing this. Users are accused of wrongdoings they did not commit (such as hacking), given punishments not equal to their crimes (such as year-long bans), gagged because they mention ideas that fly in the face of tradition (like suggesting FPSRC be built on Unreal Engine) or not given the name-change they requested weeks ago. In the same way, moderators are forced to endure the aggressive and intolerant behaviour of members seeking just to cause trouble."


I'm not trying to be rude or anything, but were you joking throughout the whole thread?

Willing to be hired as a voice actor for work and to put on a resume.
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 27th Jun 2014 05:04
You actually expect to see all of these promises magically and suddenly be done the moment we undertake our presidential roles?

We were not joking throughout that thread, and do know, we still stand by those promises and ideals. Implementing them, however, shall take time. Like former president BitJericho told me, our presidency gives us a badge, a name, and really, nothing else. That's not to say that can't change (and I would like to see that these two roles take on more administrative ability than they currently are able to, as permitted by TGC).

Point is, yes we do stand by those promises, and we are doing and will do what it takes within our power to implement those promises. It just won't happen instantly.


Flash is falling out of... Flashion.
Randomness 128
19
Years of Service
User Offline
Joined: 13th Feb 2007
Location:
Posted: 27th Jun 2014 05:07
[/b][b][/b][b][/b][b][/b][b][/b][b][/b][b][/b][b][/b][b][/b][b][/b][b][b][/b]

320x224
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 27th Jun 2014 06:12
Hmm, perhaps nonZero and I should develop long term reform plan. He and I could work together to develop that for a little while, and then we could present it to the folks here, and see what they think of it.


Flash is falling out of... Flashion.
Seditious
12
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 27th Jun 2014 07:30


Best series ever.
easter bunny
13
Years of Service
User Offline
Joined: 20th Nov 2012
Playing: Dota 2
Posted: 27th Jun 2014 08:03



Audacia Games - Latest WIP - AUTOMAYTE 2.1, AppGameKit one click deploy to Android
"When you've finished 90% of your game, you only have 90% left"
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 27th Jun 2014 09:54 Edited at: 27th Jun 2014 09:56
The forums have seemed to take a drop in activity, in the past couple days. Or maybe I'm just too dang bored, but whatever.


Flash is falling out of... Flashion.
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 27th Jun 2014 16:12
If you wanted a drop in silliness, you voted for the wrong people. Silliness in The Posting Competition is an executable offence under my rule. I should do some development today.
Seditious
12
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 27th Jun 2014 16:58 Edited at: 27th Jun 2014 17:39
Fail graph.



Also I just read this comment on a FB page:

Quote: "They have a freedom not to put chemicals in their bodies"


Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 27th Jun 2014 17:44
Quote: ""They have a freedom not to put chemicals in their bodies""


Quite right, it's their choice to breathe and eat.
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 27th Jun 2014 17:49
Quote: "I should do some development today. "

See! You're the more motivated one. I need to sit down and architect the engine but I don't wanna.

Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 27th Jun 2014 18:18
Quote: "See! You're the more motivated one"


So far it's just been me looking at code, opening steam and playing Company of Heroes instead.

Quote: " I need to sit down and architect the engine but I don't wanna."


I have a vague idea of how I'm going to do it all, just going to roll with it. http://gameprogrammingpatterns.com/ this is awesome.
Randomness 128
19
Years of Service
User Offline
Joined: 13th Feb 2007
Location:
Posted: 27th Jun 2014 18:30
Quote: "See! You're the more motivated one."


He only said he should, not that he would.

320x224
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 27th Jun 2014 18:31
Still better than me. I'm being lazy today. I need to code Towers of Hanoi in MIPS but meh.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 27th Jun 2014 19:58 Edited at: 27th Jun 2014 20:00
Okay here's an interesting challenge for any C++ programmers out there.

I wanted to write a generic listener dispatcher class so I can implement the "observer" pattern without having to rewrite all of that stupid code for managing listeners.

This is what I've come up with:


Usage example:


This works and is all fine and good, but it's not as optimal as it could be. Member function pointers are known at compile time, but I'm currently passing them as the first argument in dispatch causing a minimal but unnecessary overhead.

The Challenge

Modify the ListenerDispatcher class so the following code:


Can be re-written as:


I'm breaking my head over this, it's not as easy as you'd think it would be.

Seditious
12
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 27th Jun 2014 20:55 Edited at: 27th Jun 2014 21:06
Is it me or is there a mistake in this question? How can you do 3/2 when the number line only goes up to 2?



I guess it's me thinking of the number line as one unit (2/2) that's throwing me off.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 27th Jun 2014 21:17 Edited at: 27th Jun 2014 21:19
3/2 is less than 2, so it makes sense.

If every tick is 1/8, then you can factor 3/2 to have the same denominator, i.e. 12/8. The solution is therefore tick number 12.

Seditious
12
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 27th Jun 2014 21:56 Edited at: 27th Jun 2014 21:57
You're right, I was treating the number line (from 0 to 2) as a whole rather than as the integers represented on it. I'm so dense.
budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 27th Jun 2014 22:09
was bioshock 2 any good?


"Giraffe is soft, Gorilla is hard." - Phaelax
nonZero
15
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 27th Jun 2014 23:34
Quote: "I'm not trying to be rude or anything, but were you joking throughout the whole thread?"


Zach, this is the internet!

But I did plan on some of those long before this presidency stuff. I'm working on it actually. But I have to have a presentable piece of something to show to The Next or I'll be any other idiot throwing ideas around without substance. On the subject of lunacy, to quote a poem I posted elsewhere:

Quote: "Up the hill, up the hill, over to the big bird's tree
Where no chickens roost, no pigeons nest, but plenty canaries agree
It's a nice spot where water blooms and clouds flit about with pigs
It's a great tree, though upside-down, whose roots are full of figs
And next to it, the old man sings, a sad but funny song
And children play with cigarettes, smoking all day long
At night the mushrooms laugh and sing a favorite little tune
While apples and bananas gather, howling at the moon
Finally the kites come home and up rises a star
Burning bigger, brighter still, even from afar
Cackle, cackle, the witches laugh, and with monkeys play
While folks on TGC debate, whether unity is gay
But little did they know, that Unity is bi
Which made my PC laugh so hard, it soon began to cry
And little Timmy's missing, where ever did he go
To hide away somewhere else, to avoid being on that show
Penguine-geese with fish's tails are sailing through the sky
I am on medication but, I promise I'm not high*

*Not more than usual"


I figure that covers lunacy. Unless you meant "Princess Luna"-cy (ba-dum-tish! Can I get a hoof!)

"I was in nASA before it was cool" -- Original nASA Members (nonZero, DJD and TheComet)
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 28th Jun 2014 01:15
Quote: "To tell you all the truth, I am very embarrassed. If you guys ever see me taking my vice presidency role and doing silly things with it like I already have, let me know. I would be glad to fix it."


Nothing to be embarrassed about - it's just spilling out into other threads.
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 28th Jun 2014 01:25 Edited at: 28th Jun 2014 01:26
Gotcha. Well shucks, it looks like a rookey took this job. You live and learn, I suppose.

Flash is falling out of... Flashion.
Randomness 128
19
Years of Service
User Offline
Joined: 13th Feb 2007
Location:
Posted: 28th Jun 2014 01:31
[/b][/i][/u][b][i][u][/b][/i][/u][b][i][u][/b][/i][/u][b][i][u][/b][i][/i][/u][u][b]

320x224
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 28th Jun 2014 01:51
@TheComet
The closest I've ever seen to something like that was Qt's Signals/Slots architecture(which is freaking sweet with C++11 btw). Even though function pointers are known at compile time, the structures they're being stored in aren't(std::map, etc) so the compiler can't assign the values before runtime.

So I think assigning specific functions to specific(or general, whatever you want) signals will be the closest to what you want. After setup it's very simple, though you'll have to look at how they implement the pseudo-keyword 'emit' and such.

Typical usage of Qt signals/slots:


TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Jun 2014 02:55
So I just bought a 1400mW laser diode, 445nm. 150mW is enough to light a match, just to put things into perspective.

For the longest time I never understood what a "laser driver circuit" is. What an obscure name for a simple constant current source? Anyway, I'm building a more advanced "laser driver" using two of these babies: these

Switch mode current sources with nearly 90% efficiency. It completely craps on the performance of what other people are doing with their lousy LM317's or whatever other linear regulator they're using.

A micro controller will take care of increasing/decreasing the current output through two buttons.

Making it portable is going to be a challenge. The worst-case input power requirement is 9.1W, so if I had four nimh batteries in series I'd be drawing around 2 amps of current continuously. Hmmm..

Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 28th Jun 2014 03:11
@TheComet
Well, you've done it now. I'm now in the middle of making that fairly unintrusive observer pattern using C++11 stuff. Heck, I'm about to force the slots to take shared_ptr's to arrays in order get the data back to them cleanly.

The variable declaration is downright interesting to look at:


Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 28th Jun 2014 03:17
What's the problem with having a simple observer pattern?
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Jun 2014 03:21 Edited at: 28th Jun 2014 03:23
Yep, only in the world of c++ metaprogramming do you get stuff like that. Here's another good one I wrote for a generic graph data structure:


Quote: "What's the problem with having a simple observer pattern?"


Because when you're using it a lot you'll always have to re-write the code for registering/unregistering listeners, and it becomes a pain when you want to change a small thing in the way that works, and have to do so in every single location in your project.

Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 28th Jun 2014 03:53 Edited at: 28th Jun 2014 03:58
Here's my (probably) final iteration of the function set:


Usage:


EDIT: These forums don't like handling extra tabs very much...

Seditious
12
Years of Service
User Offline
Joined: 2nd Aug 2013
Location: France
Posted: 28th Jun 2014 06:36
Check out the latest gaming video series!


nonZero
15
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 28th Jun 2014 11:15
@LerComet: Send ya PM telling you I send ya email.
Yo dawg, we put a message notification in your message notification.

"I was in nASA before it was cool" -- Original nASA Members (nonZero, DJD and TheComet)
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Jun 2014 11:58
The Zoq2
16
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 28th Jun 2014 12:46
sorry, I was to busy noticing points.

Say ONE stupid thing and it ends up as a forum signature forever. - Neuro Fuzzy
Dark Java Dude 64
Community Leader
15
Years of Service
User Offline
Joined: 21st Sep 2010
Location: Neither here nor there nor anywhere
Posted: 28th Jun 2014 13:16 Edited at: 28th Jun 2014 13:17
Quote: "sorry, I was to busy noticing points."




Flash is falling out of... Flashion.
nonZero
15
Years of Service
User Offline
Joined: 10th Jul 2011
Location: Dark Empire HQ, Otherworld, Silent Hill
Posted: 28th Jun 2014 13:28 Edited at: 29th Jun 2014 14:43
Senpai*, I never knew...I never knew...

*I always thought it was sempai but I guess the pronunciation\'s misleading. Fansubs screwed up any hope of correct spelling for me. Must actually learn to rw+ in JPN.

On another note: Twits are coming to look at my apartment today. It upsets my habitat. I hope they get here and leave soon. After this move, I don't ever want to move again. Stupid bank won't approve me on a decent homeloan because my income's "insufficient" (it is not, I don't see why rent/bond should be 25% of your income. What the hell? My rent has been over 50% for the last year and, aside from the large amount of rice I eat, I've managed). Stupid bank. I really wanna buy. I wanna have my own place so I don't have to move and so I can modify it to suit me (like a Japanese entrance where people take off their shoes and put on house slippers which, in my house, will be pink and fluffy bunnies -- just not the ones that call everyone stupid). [ic:nonzeraaaaaargh!] <-- that icon shall exist one day.

I should save for an RV. That'd do. Then I wouldn't need a house. I could still "move" but it would only involve driving from one spot to another. No disruptions, no packing and no finding out what happened to that cheese sandwich that vanished a couple of months ago (okay that was a joke, I'm too OCD to let that happen).

Oops, I nearly posted a bad word. Thank goodness for the automatic system, it saved me a slap. I was writing a letter to a friend while posting this so I was switching between NSFW and SFW modes the whole time.

<testing>

# Ignore this.

Testing finished.

</testing>

"I was in nASA before it was cool" -- Original nASA Members (nonZero, DJD and TheComet)
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Jun 2014 17:01 Edited at: 28th Jun 2014 17:05
Please don't tell me I'm the only one who occasionally looks at the DarkGDK forum and screams in agony at some of the horrible coding practices people are using.

Like, look at this abomination:


This here outright scares me:


He's deleting a char* returned by dbChecklistString()???

budokaiman
FPSC Tool Maker
17
Years of Service
User Offline
Joined: 24th Jun 2009
Playing: Hard to get
Posted: 28th Jun 2014 17:25
Quote: "He's deleting a char* returned by dbChecklistString()???"

I believe that the GDK functions returning a char* allocate the memory inside the function, so it does need to be deleted after calling the function. I don't understand the purpose of repeatedly copying it over to another char* each iteration instead of just deleting it at the end though.


"Giraffe is soft, Gorilla is hard." - Phaelax
Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 28th Jun 2014 17:36
The weirdest part of that code is that longString4 is always overwritten by the sprintf call. So he prints the available graphics cards but he doesn't save them so he has no way of accessing them later on. Same with the resolutions.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Jun 2014 18:39
My god, DarkGDK is a mess.

Quote: "I believe that the GDK functions returning a char* allocate the memory inside the function, so it does need to be deleted after calling the function. I don't understand the purpose of repeatedly copying it over to another char* each iteration instead of just deleting it at the end though."

I checked the source code and can confirm that there's some wacky stuff going on with the text functions. However, calling delete[] on dbChecklistString() is completely wrong because the next call to any of the "perform checklist" commands frees all strings from the previous checklist.

It's also a huge pain that none of the functions are const correct, otherwise you could change this:


To this:


I guess this compiles, but who knows what d3dText does to the pointer afterwards?


Randomness 128
19
Years of Service
User Offline
Joined: 13th Feb 2007
Location:
Posted: 28th Jun 2014 18:46
Well, then [/i][i][/i][i][/i][i][/i][i][/i][i][/i][i][/i][i][/i][i][/i][i][/i][i][/i][i][/i][i][/i][i][/i][i][/i][i]

320x224
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Jun 2014 18:53
For people claiming they're using "the power of C++ and DBPro combined" there's no C++ code at all. Not even classes or STL.

Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 28th Jun 2014 19:23
Well, you can use C++'s type safety and still be considered using C++ though I will forever curse the man who decided not to at least wrap the functions into namespaces at the very least.

I think the real reason that DGDK is done the current way is because it had to export to a DLL for DBPro and DirectX's functions are also C exports so I suppose it made sense at the time to keep that same style to avoid a lot more work while making DBPro. PureGDK was well on its way to fixing a lot of the issues with DarkGDK but then the creator vanished without a trace anywhere while taking people's preorder money AFAIK.

'Tis a sad tale.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Jun 2014 19:30
Well, you can use points safety and still be considered using C++

Login to post a reply

Server time is: 2026-07-26 10:47:28
Your offset time is: 2026-07-26 10:47:28