• What Are You Working On? V13
    5,003 replies, posted
[QUOTE=Agent766;25098098]What would be the cheapest Mac I could get (preferably used) for programming iPod Touch/iPhone apps?[/QUOTE] Pretty much any Intel based mac can be upgraded (You can look up the type of ram needed on wikipedia, I upgraded an old macbook pro from 512MB to 1.5GB for around £20) to run snow leopard (1GB of ram minimum requirements) and therefore the iPhone SDK. So it's pretty much a case of just finding the cheapest you can find. Perhaps try find s friend who recently bought a new mac and buying his old one? They're usually ridiculously expensive on eBay.
A Macbook with a broken screen?
[QUOTE=ThePuska;25096436]I wrote a function for calculating the intersection point of the line (d, e) and the plane (a, b, c) in 3D. [code] function LineXPlane3(a, b, c, d, e: TVec3): TVec3; var d1, d2, d3, d4, t: single; begin d1 := ((e.z - a.z)*(b.y - a.y) - (e.y - a.y)*(b.z - a.z)) * ((a.x - c.x)*(b.y - a.y) - (a.y - c.y)*(b.x - a.x)); d2 := ((e.y - a.y)*(b.x - a.x) - (e.x - a.x)*(b.y - a.y)) * ((a.y - c.y)*(b.z - a.z) - (a.z - c.z)*(b.y - a.y)); d3 := ((d.y - e.y)*(b.x - a.x) - (d.x - e.x)*(b.y - a.y)) * ((a.y - c.y)*(b.z - a.z) - (a.z - c.z)*(b.y - a.y)); d4 := ((d.z - e.z)*(b.y - a.y) - (d.y - e.y)*(b.z - a.z)) * ((a.x - c.x)*(b.y - a.y) - (a.y - c.y)*(b.x - a.x)); t := (d1 - d2)/(d3 - d4); result.x := e.x + t*(d.x - e.x); result.y := e.y + t*(d.y - e.y); result.z := e.z + t*(d.z - e.z); end; [/code] Goddamn it was tedious to solve it.[/QUOTE] Is there a reason you had to write that all out? Can't you do like: [code] struct line { vec3 d; /* a unit-length "direction" vector */ vec3 p; /* a point on the line */ } struct plane { vec3 n; /* a normal vector */ float d; /* distance offset from origin along the normal -- or the * dot product of the normal vector and any point on the plane */ } line_dist = -(dot(line.p, plane.n) - plane.d)/dot(line.d, plane.n); intersection = add(line.p, scale(line.n, line_dist)); [/code] I'm not totally 100% sure my math's right (I'm writing it off the top of my head), but it gives you the general idea. Define line/plane structures/classes and some basic vector math functions, and you go from like a 12-line solid block of arithmetic to a two-line calculation that anyone can read.
I'm working on among other things a crypto series of tools.
I'm still working on HackThisSite programming challenge #3. I'm still no closer to actually figuring out how I'm gonna do this quickly, but I made a basic brute forcer that can skip certain characters (i.e. part of the string remains static, the rest is brute-forced) edit: gah, my brute forcer is still broken, it goes AA7 -> AA8 -> AB9 (instead of AA9) -> ABA also it calls a certain function three more times than it has to edit: no wait, I was misinterpreting my debug output, it's just going back through the call stack (I'm using recursion, maybe not the best method but it was clean to implement) edit: okay I fixed the AA8 -> AB9 thing, I was checking the value of the character after having already incremented it, I just stored the result of the check in a temporary boolean at the beginning of the block and it's fixed edit: AAA-AAA-OEM-ZZX-1.1 AAA-AAA-OEM-ZZY-1.1 AAA-AAA-OEM-ZZZ-1.1 AAA-AAB-OEM-000-1.1 AAA-AAB-OEM-001-1.1 AAA-AAB-OEM-002-1.1 sweet (the character set is adjustable too, but for this challenge it's 0-9,A-Z)
[QUOTE=Agent766;25098098]What would be the cheapest Mac I could get (preferably used) for programming iPod Touch/iPhone apps?[/QUOTE] A Hackintosh will actually work fine. I tried it out in a VM, and everything seemed to go well (didn't actually publish an app, though - not forking over 99 dollars a year, sorry Apple!)
I have a VM (sort of) running, but I'd prefer actual Mac hardware. I don't really want to dick around with OSX86 anymore. It was such a PITA just to try to get it to work on my laptop. Now I'm still trying to get it work in a VM.
[QUOTE=arienh4;25092145]Easier isn't better. In this case, easier is really really bad.[/QUOTE] How could using Regular Expression possibly be worse than that? [cpp] int index = 0; while ((index = row.indexOf("<TD", index)) >= 0) { int count = 1; int index2 = index + 1; while (count != 0) { int start = row.indexOf("<TD", index2); int end = row.indexOf("</TD>", index2); if (start >= 0 && start < end) { index2 = start; count++; } else { index2 = end; count--; } index2++; if (index2 <= 0) { throw new RuntimeException("Invalid"); } } final String column = row.substring(index, index2 + "</TD>".length() - 1); if (column.length() > 5) { columns.add(column); } index = index2; }[/cpp]
I hate it when bugs appear, you spend 30 mins failing to work out what is causing them and then they disappear for no apparent reason.
Even worse is when you change loads of stuff trying to fix a problem, then you find simply restarting visual studio fixes it. (clean doesn't even always do the job, wtf)
[QUOTE=eXeC64;25105708]I hate it when bugs appear, you spend 30 mins failing to work out what is causing them and then they disappear for no apparent reason.[/QUOTE] I believe the modern term for this now is the "Higgs Bugson" In the event said bug becomes catastrophic, you are given permission to change it to the name "Hindenbug" (Oh the humanity! D:)
[QUOTE=ROBO_DONUT;25098429]Is there a reason you had to write that all out? Can't you do like: [code] struct line { vec3 d; /* a unit-length "direction" vector */ vec3 p; /* a point on the line */ } struct plane { vec3 n; /* a normal vector */ float d; /* distance offset from origin along the normal -- or the * dot product of the normal vector and any point on the plane */ } line_dist = -(dot(line.p, plane.n) - plane.d)/dot(line.d, plane.n); intersection = add(line.p, scale(line.n, line_dist)); [/code] I'm not totally 100% sure my math's right (I'm writing it off the top of my head), but it gives you the general idea. Define line/plane structures/classes and some basic vector math functions, and you go from like a 12-line solid block of arithmetic to a two-line calculation that anyone can read.[/QUOTE] I have products for vectors and undoubtedly one could clean up the arithmetic block with them, but I didn't bother. It's all inside a function so its aesthetics don't really matter to me. As for not defining a plane structure - I don't know. I didn't think of needing one, and I always thought of planes being defined by three points instead of a normal and an offset. It could be because I'm only interested in the intersection point if it also lies inside the triangle (a, b, c). edit: It's just the solution I calculated on paper directly written into code. If there's another way to calculate it or write it out with matrices or different definitions for planes, I simply didn't see it because I'm not very familiar with those.
Just finished the virtual environment part of the assignment and it's uploading, I would post pictures but I am so incredibly tired so I am going to go to bed immediately. I'll post pictures and even a FREAKING VIDEO tomorrow. [editline]06:59PM[/editline] And it will have anti-aliasing :colbert:
[QUOTE=r4nk_;25105986]Just finished the virtual environment part of the assignment and it's uploading, I would post pictures but I am so incredibly tired so I am going to go to bed immediately. I'll post pictures and even a FREAKING VIDEO tomorrow. [editline]06:59PM[/editline] And it will have anti-aliasing :colbert:[/QUOTE] Sweet, can't wait to see it.
[QUOTE=Chandler;25105918]I believe the modern term for this now is the "Higgs Bugson" In the event said bug becomes catastrophic, you are given permission to change it to the name "Hindenbug" (Oh the humanity! D:)[/QUOTE] Even worse with a type of bug I've had a couple times, they behave like photons. When I just run the program, it has a bug, when I attach a debugger, the bug disappears.
[QUOTE=arienh4;25108251]Even worse with a type of bug I've had a couple times, they behave like photons. When I just run the program, it has a bug, when I attach a debugger, the bug disappears.[/QUOTE] Last time I had a bug like this I later found out the bug only happened when the program ran "too" fast and the debugger slowed it down just enough for the bug to disappear. I think I found it when I later tried it on a faster PC.
[QUOTE=Agent766;25098098]What would be the cheapest Mac I could get (preferably used) for programming iPod Touch/iPhone apps?[/QUOTE] Probably a Macbook/Macbook Pro with a broken screen, or HDD or whatever. Something you can fix or work around easily. You'll want to use at least an external keyboard and mouse anyway, so having to plug a monitor in isn't much of an extra hassle (especially if it's a much larger one, say a 22-24"). Personally I use a Macbook Pro 13" 2.53Ghz with 4GB of RAM as my day to day computer nowadays. My old desktop has sat unused for like a year now (4GHz watercooled C2Q with 4GB RAM and GTX465 - replaced the 9800GTX SLi a couple weeks back). Plug an Apple Keyboard, Logitech mouse and decent sized screen in (I use a 22" Acer) and it's just like using a desktop. Except I can't hear the whirring of fans and therefore I never have to switch it off to get some sleep. I prefer using Mac OS, I don't really miss Windows. The only application I've had trouble with is a Driving Test Cancellation Checker which refuses to work under WINE/Crossover. Just RDPed and ran it on a remote Windows box in the end. VS2008 which I have to use for college works just fine under Parallels.
@Hexxeh What examining board are you with? WJEC?
[QUOTE=Hexxeh;25108937]Plug an Apple Keyboard[/QUOTE] Why? I've never used one, but they look exactly like the shitty built-in keyboard my notebook has. :raise:
[QUOTE=Robber;25110407]Why? I've never used one, but they look exactly like the shitty built-in keyboard my notebook has. :raise:[/QUOTE] They look as rigid as a piece of paper, but there really not. I have one from an old MAC G3 and i would still use the keyboard if it wasn't because of the different button setup, never gonna chuck it tho
[QUOTE=Hexxeh;25108937]Personally I use a Macbook Pro 13" 2.53Ghz with 4GB of RAM as my day to day computer nowadays. My old desktop has sat unused for like a year now (4GHz watercooled C2Q with 4GB RAM and GTX465 -[B] replaced the 9800GTX SLi a couple weeks back[/B]). Plug an Apple Keyboard, Logitech mouse and decent sized screen in (I use a 22" Acer) and it's just like using a desktop. Except I can't hear the whirring of fans and therefore I never have to switch it off to get some sleep.[/QUOTE] Why would you bother if you don't use it? :v:
I'm currently depressed. I have so many projects I want to finish, but not enough time. (There's also the problem of "Should I write this? I'm probably going to be the only person to ever use it" going round and round in my head) It's getting quite frustrating :frown:
[QUOTE=Chandler;25111759](There's also the problem of "Should I write this? I'm probably going to be the only person to ever use it" going round and round in my head)[/QUOTE] That's why I wrote mage to be good for my projects; if nobody else is gonna use my makefile generator, it can just as well be less intuitive but more useful. Also, I'm currently writing another makefile generator. I generate the makefile for that project with the old one. What. [editline]10:01PM[/editline] Anyway, I've found quite a nice way to parse command-line flags. Now I just gotta invent how to parse the parameters and I'm good. I can show the code if you want, I'm rather proud of it :3
I'm thinking I might make an RSS aggregator. What should I use as the identifier for each item so they don't get added to the reading list multiple times?
[QUOTE=CarlBooth;25112037]I'm thinking I might make an RSS aggregator. What should I use as the identifier for each item so they don't get added to the reading list multiple times?[/QUOTE] Hash of feed url + article number?
[QUOTE=Chandler;25111759]I'm currently depressed. I have so many projects I want to finish, but not enough time. (There's also the problem of "Should I write this? I'm probably going to be the only person to ever use it" going round and round in my head) It's getting quite frustrating :frown:[/QUOTE] I imagine this is a common problem. I also start more projects than I can finish, then things like work and school end up getting in the way. Often I get so absorbed in a project that my schoolwork suffers. I'm sure that in this respect I'm probably worse than most. I once walked into a lecture late and started doodling the details of some rendering algorithm I just thought up. Ten minutes pass and the prof walks around and starts collecting papers. It was a quiz. When he got to me I just stared at him blankly. I am a failboat.
[QUOTE=esalaka;25111915]I can show the code if you want, I'm rather proud of it :3[/QUOTE] You're more than welcome to, just remember that I wrote my own build system too :P The primary things I'm worried about are my programming language and a game framework. (I'm not sure if I want to write the framework in my language or in C++. Some of it is in C++, but it's enough that I could easily switch to my own language) [QUOTE=ROBO_DONUT;25112189] Often I get so absorbed in a project that my schoolwork suffers. I'm sure that in this respect I'm probably worse than most. I once walked into a lecture late and started doodling the details of some rendering algorithm I just thought up. Ten minutes pass and the prof walks around and starts collecting papers. It was a quiz. When he got to me I just stared at him blankly. I am a failboat.[/QUOTE] This is one of my worst fears. D:
Just got some more details about my course, we're going to be using C# with Visual Studio 2010! It's great because I was afraid we'd end up doing something silly like pascal with some small time IDE, but now I have a head start >:)
[QUOTE=ROBO_DONUT;25112189]I once walked into a lecture late and started doodling the details of some rendering algorithm I just thought up.[/QUOTE] I did that all the time during my English GCSE. It was a lot more interesting than 'Of Mice & Men'. I probably learnt more from doodling algorithms than I did from the english lessons themselves.
[QUOTE=eXeC64;25112321]more interesting than 'Of Mice & Men'.[/QUOTE] I dont see how that is true, Of Mice & Men is quite an interesting story.
Sorry, you need to Log In to post a reply to this thread.