• What are you working on? v19
    6,590 replies, posted
[QUOTE=robmaister12;31570737]I was just looking at F#'s performance compared to C#, F# is pretty damn fast: [url]http://abdullin.com/journal/2009/1/6/f-has-better-performance-than-c-in-math.html[/url] It's pretty much as fast as C while still compiling down to IL[/QUOTE] F# would still lag behind native code when it comes to heavy array accesses though.
Also in case anyone was wondering. [code]for (float x = -5.0f; x < 5.0f; x += 0.000001f)[/code] That actually iterates 10,369,652 times. Which his F# loop was only iterating 1,000,000 times. I think he messed up and meant 0.00001f instead. But even then do to the nature of floats you end up with 998,718 iterations instead.
[QUOTE=high;31573348]Also in case anyone was wondering. [code]for (float x = -5.0f; x < 5.0f; x += 0.000001f)[/code] That actually iterates 10,369,652 times. Which his F# loop was only iterating 1,000,000 times. I think he messed up and meant 0.00001f instead. But even then do to the nature of floats you end up with 998,718 iterations instead.[/QUOTE]Could someone re-do it with identical loops?
[QUOTE=high;31573348]Also in case anyone was wondering. [code]for (float x = -5.0f; x < 5.0f; x += 0.000001f)[/code] That actually iterates 10,369,652 times. Which his F# loop was only iterating 1,000,000 times. I think he messed up and meant 0.00001f instead. But even then do to the nature of floats you end up with 998,718 iterations instead.[/QUOTE] If you want it to iterate an exact number of times, it makes more sense to do something like this: [code] for (int i=0; i<1000000; i++) { float x = (float)i/100000f - 5f; } [/code]
I'm working on a 2D terrain generation library. It generates terrains using various generators. The terrains can be "exported" as int[,] arrays or strings to parse them in any kind of game. Code example: [php] VGWorld world = new VGWorld(250, 250, 0); // Width, height, starting value VGGCave caveGenerator = new VGGCave(0, 1, 40, 3, 5, 1); // Parameters for the generator caveGenerator.Generate(world.Area); [/php] Examples: [img]http://dl.dropbox.com/u/3724424/Programming/VeeGen/cave.png[/img] -- Cave generator [img]http://dl.dropbox.com/u/3724424/Programming/VeeGen/bsp.png[/img] -- BSP partitioning generator [img]http://dl.dropbox.com/u/3724424/Programming/VeeGen/walker.png[/img] -- Path-based generator
[QUOTE=CarlBooth;31572337]You need to add Deep Space 9 and a wormhole[/QUOTE] And Bajor!
[QUOTE=danharibo;31573451]Could someone re-do it with identical loops?[/QUOTE] That is what I did. I was just pointing out how wrong that loop was. [QUOTE=Smashmaster;31573529]If you want it to iterate an exact number of times, it makes more sense to do something like this: [code] for (int i=0; i<1000000; i++) { float x = (float)i/100000f - 5f; } [/code][/QUOTE] I was just pointing out the issue with the C# vs F# speed comparison last page. [QUOTE=high;31572817]That is a terrible speed comparison. If you are going to compare speeds at least use the same freaking loop. [code] for t in 1 .. 10 do for x in 1 .. 1000000 do[/code] vs [code] for (int i = 0; i < 10; i++) for (float x = -5.0f; x < 5.0f; x += 0.000001f)[/code] Changing the loop alone improved the speed greatly. Edit: [img]http://goo.gl/4pdR7[/img] Didn't look into the second method too much. My guess is the speed difference has to do with F# being able to optimize out things that C# can't[/QUOTE]
[QUOTE=high;31573880]I was just pointing out the issue with the C# vs F# speed comparison last page.[/QUOTE] I see.
Switching to dvorak then trying to code really is a waste of time. I'm determined but how will I ever get anything done?!
[QUOTE=iPope;31574323]Switching to dvorak then trying to code really is a waste of time. I'm determined but how will I ever get anything done?![/QUOTE] You learn Dvorak first.
I can't be fucked posting pics but I believe I have finally implemented some box blur on my randomly generated bitmap. The time complexity is crazy as FUCK though... (quadratic time?) so I need to do one of those horizontal and vertical passes.
[QUOTE=Overv;31547863]Null may have a blunt way of putting things, but he's right Jookia, don't post anymore until you have content for us.[/QUOTE] Sorry, Overv but this is probably the worst warning ever. [QUOTE=icantread49;31536101]i just wanna say, after working in the beautiful land of C# for so long, even with several years of experience C++ looks like a horrible disgusting pile of shit[/QUOTE] To which Jookia responds [QUOTE=Jookia;31536897]What horrid code are you writing? Mine looks clean and easily readable.[/QUOTE] Niether of these are trolling, and and both are really opinion pieces. [QUOTE=icantread49;31537903]ever worked with C# in a remotely large project?[/QUOTE] Null procedes to respond with this, which has absolutely nothing to do with what Jookia said, using C# in a remotely large project has nothing to do with the cleanliness of his C++ code. This is bad logic, you need not have worked in a remotely large project in C# to comment upon the cleanliness of C++ code. [QUOTE=Jookia;31538014]Dodging questions, awesome. Just for fun, nope. Have you ever worked with C++ in a remotely large project?[/QUOTE] Jookia responds in the -exact same way- Null did, a completely different topic to what was originally said. And he's dumb'ed into oblivion. [QUOTE=Jookia;31538198]Then stop writing messy code. Simple. It's not a language barrier, it's that people suck at writing clean code.[/QUOTE] [QUOTE=icantread49;31538377]yes, multiple in fact (both my own and foreign code bases) the irony is that i used to feel the same way as you before i really started using C# for large projects you can't judge something without giving it a really good effort[/QUOTE] In what way does Jookia feel? Here Nullsquared is misrepresenting where Jookie stands. Starting to use C# in large projects has ABSOLUTE NOTHING to do with the belief that code cleanliness is not a language barrier and is programmar error. And no where -did- he judge C#, not in a single place did he judge C#. In fact all of Jookia's posts are above, and bar quotes "C#" never appears once. This post is a classic example of a strawman. Really this is all that needs to be adressed. The rest of conversationd degrades into flaming, and I can see why. The person he's talking to is presenting things he's not even said as arguments against him. After reading over this part of the thread, I feel bad for Jookia, you guys jumped down his neck when in reality he didn't do shit until after someone else began being illogical, and questioning his experience.
Wish I knew about Code Analysis earlier. Apparently I haven't been implementing dispose correctly :s. Shame that it can't make up its mind on some things. using (var br = new BinaryReader(new StreamReader())) //Complains that streamreader is never disposed vs using (var sr = new StreamReader()) using (var br = new BinaryReader(sr)) //Complains that sr is disposed twice
Just made a quick tool to check for gamepad input with sfml. If anyone has a 360 controller or a PS3 controller can they try it out? [url]http://dl.dropbox.com/u/30243525/SFML%20Controller%20test.exe[/url]
Added bitmap based level editing: [IMG]http://filesmelt.com/dl/level.PNG[/IMG] [IMG]http://filesmelt.com/dl/building3.PNG[/IMG]
What should I do? Make a scripting language or make a 6502 emulator. Both appeal to my interests a lot. Rate [img]http://www.facepunch.com/fp/ratings/wrench.png[/img] for scripting language, [img]http://www.facepunch.com/fp/ratings/winner.png[/img] for 6502 emulator. (or [img]http://www.facepunch.com/fp/ratings/tick.png[/img] if you are seriously indecisive and can't make decisions, but you like cheese so much that you want volcanoes to start spewing it.) Edit: I'm sort of leaning towards the emulator.
If you mean 6502 as in -the- MOS Technology 6502, then do that one in my opinion. Hell, I'd spam winner ratings if I could if that's what you mean. EDIT: On another unrelated note about what I'm currently working on, I took a little bit of a break from porting the USF winamp plugin to droidsound and worked on transitioning some of the I/O to buffered I/O (wherever it would be better to do so). Also I modified some of the for loops to be a little bit more efficient. On a performance note, I managed to stop the playback from skipping on SID playback if the Android device goes into sleep mode while playing one.
[QUOTE=Bluefire;31578144]If you mean 6502 as in *the* MOS Technology 6502, then do that one in my opinion. Hell, I'd spam winner ratings if I could if that's what you mean. EDIT: On another unrelated note about what I'm currently working on, I took a little bit of a break from porting the USF winamp plugin to droidsound and worked on transitioning some of the I/O to buffered I/O (wherever it would be better to do so). Also I modified some of the for loops to be a little bit more efficient. On a performance note, I manage to stop the playback from skipping on SID playback if the Android device goes into sleep mode while playing one.[/QUOTE] Yes, I am talking about Asterisk asterisk asterisk asterisk tons and tons of asterisks -THE- the same amount of asterisks go on this side too MOS 6502. I'm going with the 6502. All ratings to that post now mean what rating agree would mean. [editline]6th August 2011[/editline] "On a performance note, I manage to stop the playback from skipping on SID playback if the Android device goes into sleep mode while playing one." Make that an option
I'm kind of interested in neural networks/genetic algorithms, it/they seem quite interesting. Evolving AI, basically. But I also don't really understand them. Does anyone know of some good resources that aren't incredibly math-intensive, or that don't talk in a way that assumes you already know what they're talking about?
[QUOTE=bobthe2lol;31578450]I'm kind of interested in neural networks/genetic algorithms, it/they seem quite interesting. Evolving AI, basically. But I also don't really understand them. Does anyone know of some good resources that aren't incredibly math-intensive, or that don't talk in a way that assumes you already know what they're talking about?[/QUOTE] [url]http://www.amazon.com/Techniques-Programming-Premier-Press-Development/dp/193184108X[/url] I can only recommend this book. It covers neural networks and genetic algorithms in great detail and the source code is a really good help too.
[QUOTE=Map in a box]Make that an option[/QUOTE] Why is it good for music to skip while playing? That makes the audio sound incredibly choppy.
[QUOTE=Bluefire;31578596]Why is it good for music to skip while playing? That makes the audio sound incredibly choppy.[/QUOTE] It does play retro music, right? Be realistic. -- Also, I'm wondering, what should I use as a display for the 6502
[QUOTE=Map in a box]It does play retro music, right? Be realistic.[/QUOTE] Yeah, but there's no way the original C64 skips audio that horribly.
I'm thinking about getting the best of both worlds: Making a 6502 assembler and the emulator to go with it!
[QUOTE=iPope;31574323]Switching to dvorak then trying to code really is a waste of time. I'm determined but how will I ever get anything done?![/QUOTE] I can't think of anything more maddening than trying to switch to DVORAK. I think at one point I actually tried to gnaw one of my own fingers off because it was misbehaving.
[QUOTE=ROBO_DONUT;31578956]I can't think of anything more maddening than trying to switch to DVORAK. I think at one point I actually tried to gnaw one of my own fingers off because it was misbehaving.[/QUOTE] Isn't QWERTY the fastest method of typing or something? Correct me if I'm wrong.
[QUOTE=Map in a box;31578983]Isn't QWERTY the fastest method of typing or something? Correct me if I'm wrong.[/QUOTE] QWERTY was designed to slow fast typers down, because keys that were too close on typewriters would run into each other if pressed too close together. That's why the E isn't on the home row, for example, and why typing simple words like "the" and "and" and "hello" require so much finger stretching.
[QUOTE=mutated;31579373]QWERTY was designed to slow fast typers down, because keys that were too close on typewriters would run into each other if pressed too close together.[/QUOTE] I heard that was a [url=http://www.straightdope.com/columns/read/221/was-the-qwerty-keyboard-purposely-designed-to-slow-typists]myth[/url] to sell DVORAK keyboards. (Albeit that would be pretty dumb nowadays since keys can be switched and layouts are commonly virtualized)
uHHHHHHHHHHHHHH [img]http://i.imgur.com/FP4EI.png[/img]
wat
Sorry, you need to Log In to post a reply to this thread.