• What are you working on? February 2012
    3,497 replies, posted
  • Avatar of Dr Magnusson
  • [QUOTE=Tobba.;34773670]Its perfectly valid, but it looks like someone set their optimization level to -3 The entire function could be inlined with just mov eax, [ecx + 4][/QUOTE] Almost all code generation is like that, even with optimization on. It'd be extremely difficult to write a compiler that could take all the possible combinations of methods into account and generate "perfect code". This is why lower level code is almost always faster.
  • Avatar of Tobba.
  • [QUOTE=Dr Magnusson;34773802]Almost all code generation is like that, even with optimization on. It'd be extremely difficult to write a compiler that could take all the possible combinations of methods into account and generate "perfect code". This is why lower level code is almost always faster.[/QUOTE] I do agree with this, but it doesnt even look like its trying to produce good code, and there is no excuse for not using leave, wasting 4 cycles for every function fucks with my OCD [highlight](User was permabanned for this post ("Tobba / Alt of permabanned user" - Swebonny))[/highlight]
  • Avatar of Hexxeh
  • Uploaded my changes to libspotify-php here: [url]https://github.com/Hexxeh/libspotify-php[/url] I'll be uploading my changes to libdespotify soon, but with a couple of bits left out, because I don't want to get lawyered up the ass. Hopefully this will make it easier for anyone wanting to do what I've done for themselves.
  • Avatar of supersnail11
  • [QUOTE=Hexxeh;34774207]Uploaded my changes to libspotify-php here: [url]https://github.com/Hexxeh/libspotify-php[/url] I'll be uploading my changes to libdespotify soon, but with a couple of bits left out, because I don't want to get lawyered up the ass. Hopefully this will make it easier for anyone wanting to do what I've done for themselves.[/QUOTE] It's funny how you say [quote]Read the libspotify license, there are some important things to note; for example you CAN NOT "attempt to embed or integrate the API into any website or otherwise allow access to the Service via the web rather than via the Application.".[/quote] and then do exactly that.
  • Avatar of esalaka
  • I don't think he's exactly "allowing access to the Service" by manipulating playlists?
  • Avatar of Hexxeh
  • [QUOTE=supersnail11;34774284]It's funny how you say and then do exactly that.[/QUOTE] I didn't write that disclaimer, the guy who I forked the code from did. But anyway, I'm not allowing anyone else access, so technically speaking I'm not breaking the ToS? :v:
  • Avatar of supersnail11
  • [QUOTE=esalaka;34774331]I don't think he's exactly "allowing access to the Service" by manipulating playlists?[/QUOTE] [QUOTE=Hexxeh;34748158]Just recorded a quick video of my latest project, working with cosmic duck: [img]http://cl.ly/EJSJ/Screen%20Shot%202012-02-17%20at%2023.42.31.png[/img] [url]http://screencast.com/t/YMS6TemR[/url] Oh, and the audio quality is actually great, I used Jing with Soundflower to record that video, and it totally rapes the audio quality. The streams are actually 320K MP3.[/QUOTE]
  • [QUOTE=Dr Magnusson;34773644]Furthermore, enter and leave generally take up more cycles than the push/move/pop sequence.[/QUOTE] Enter takes up more, leave doesnt
  • Avatar of C:\
  • [QUOTE=@@;34773743]you're worse then agop, can't accept a compliment. :tinfoil:[/QUOTE] Except it isn't a fucking compliment. You're rating posts that have nothing to do with programming too. Like 'I agree' = omg programming king xD
  • Avatar of Robber
  • [QUOTE=Richy19;34773791]Dont know if anyone will know the answer but in commercial enviroment what would you guys say is the most used programming language? I have always been wanting to progress my C++ knowledge because the games industry uses it but everyday it looks like a further and further away goal to get a job in it, so I wanted to start learning more overall used languages[/QUOTE] I just went through the job ads I got last year: 3xJava 3xC# 2xC++ 1xVB.NET
  • Avatar of DeadKiller987
  • [QUOTE=Robber;34774642]I just went through the job ads I got last year: 3xJava 3xC# 2xC++ 1xVB.NET[/QUOTE] [quote]1xVB.NET[/quote] Link us. I bet it's hilarious.
  • Avatar of uitham
  • [QUOTE=Tobba.;34773251]Disassembled, Skyrim's code is full of gems, like this function [code]00561420 push ebp 00561421 mov ebp,esp 00561423 push ecx 00561424 mov dword ptr [ebp-4],ecx 00561427 mov eax,dword ptr [ebp-4] 0056142A mov eax,dword ptr [eax+4] 0056142D mov esp,ebp 0056142F pop ebp 00561430 ret [/code] A++ compiler it doesnt even use leave[/QUOTE] I always have to stare at a bit of assembly code for 2 minutes before I understand what it does How does one actually read disassembled code properly?
  • Avatar of Richy19
  • [QUOTE=Robber;34774642]I just went through the job ads I got last year: 3xJava 3xC# 2xC++ 1xVB.NET[/QUOTE] Yea it seems companies seem to be leaning towards C# more now a days(or atleast the .net framework)
  • [QUOTE=uitham;34775017]I always have to stare at a bit of assembly code for 2 minutes before I understand what it does How does one actually read disassembled code properly?[/QUOTE] Well it's random really, One night I was looking at some disassembled ASM from GlobalMS Beta. And I just randomly went "Well crap, I know what that does" and pretty much now I just understand it. Just god forbid I try to write it :suicide: Really id say get a few simple programs and use a debugger like IDA or olly. (I prefer IDA as it has a graph view.) Then just step through the code and watch out what it outputs. You will catch on pretty fast. :smile:
  • [QUOTE=Richy19;34775162]Yea it seems companies seem to be leaning towards C# more now a days(or atleast the .net framework)[/QUOTE] C#/ASP.net Can't decide between doing my anonymous issue reporting in asp.net or php. I want to do asp.net so its something I can put on portfolio but I want to use php for compatibility.
  • [QUOTE=uitham;34775017]I always have to stare at a bit of assembly code for 2 minutes before I understand what it does How does one actually read disassembled code properly?[/QUOTE] You can only master disassembly by writing large uncommented chunks of assembly, then needing to modify it a month later
  • Avatar of Hexxeh
  • Turns out somebody else beat me to this: [url]http://blog.spotifyontheweb.com[/url] He got hired by Spotify. Talking to someone who works there at the moment.
  • Avatar of jonnopon3000
  • [QUOTE=OldFusion;34771054]Here is my go at it from a while ago. [image] Lol: [URL]http://cold.netburst.co.uk/file/background.png[/URL][/QUOTE] So I saw these two images, and decided to go away and see if I could do something similar. I'm working in Java, and I'm having a couple of issues which I can't pinpoint. On my program's load, the user is prompted to find an image file to process and render as text. This image is loaded in, and converted to a BufferedImage so that I can get the RGB values of individual pixels. In the method that is supposed to produce a new BufferedImage containing the text representation of the original image, the app basically cycles over the image in 5x5 pixel blocks, obtaining an average RGB value for that block and assigning the new image's colour to that average before writing the test character "p" to the top-left of the 5x5 block in a font which I believe would be the right size. I can't check if it is, however, because no matter what I do or change, I get no real results from this method. The image produced is invariably a black and white grid. I've been through the code many times, using breakpoints and extensive tracing, and I am certain that everything up to the actual writing of the text is working. The average RGB colour is correct, for one thing, and yet I believe the program always draws in black or white. I'm at the end of my ability to troubleshoot it, so I thought I'd ask if I could be pointed in a direction where a method for doing something like this might be found. For anyone who may be interested in finding the issue, [URL="http://pastie.org/3416497"]here's the source[/URL]. And here's the image I am using in testing: [IMG]http://dl.dropbox.com/u/38489921/test.png[/IMG]
  • Avatar of r0b0tsquid
  • Been away from home for GB trials, bloody shattered now :/ anyway, been working on my grapher again :) Added parametric plots with multiple parameters - you can draw proper 3D parametric surfaces now: [img]http://i.imgur.com/V6jL3.png[/img] Parametric torus! Plus, a bunch of random trig stuff: [img]http://i.imgur.com/btFD2.png[/img] I think I'll carry on working on the debugging dialogs now.
  • Avatar of chimitos
  • [QUOTE=r0b0tsquid;34776067]Been away from home for GB trials, bloody shattered now :/ anyway, been working on my grapher again :) Added parametric plots with multiple parameters - you can draw proper 3D parametric surfaces now: <snipp>[/QUOTE] Can you script a grapher using this yet?
  • Avatar of r0b0tsquid
  • [QUOTE=chimitos;34776250]Can you script a grapher using this yet?[/QUOTE] Theoretically, yes. To be honest, pretty graphs feel more productive for the minute :v:
  • Avatar of LilDood
  • [QUOTE=jonnopon3000;34776054] I can't check if it is, however, because no matter what I do or change, I get no real results from this method. The image produced is invariably a black and white grid. [/QUOTE] I changed i to i*2 and j to j*2 on line 109 and got this: [IMG]http://i.imgur.com/qSYaR.png[/IMG] So that black and white grid is actually a bunch of p's. I tried changing the font and the font size but neither seemed to have any effect.
  • Avatar of ben1066
  • So I was working on adding squirrel to my sourcemod and I hit a snag, for some reason the compile errors get horribly mangled and I have no idea why, circled in yellow. [IMG]http://dl.dropbox.com/u/11197643/snapshot0000.jpg[/IMG]
  • Avatar of geel9
  • [QUOTE=ben1066;34776627]So I was working on adding squirrel to my sourcemod and I hit a snag, for some reason the compile errors get horribly mangled and I have no idea why, circled in yellow. [IMG]http://dl.dropbox.com/u/11197643/snapshot0000.jpg[/IMG][/QUOTE] Well there's your problem, you're programming in squirred.
  • Avatar of jonnopon3000
  • [QUOTE=LilDood;34776611]I changed i to i*2 and j to j*2 on line 109 and got this: [IMG]http://i.imgur.com/qSYaR.png[/IMG] So that black and white grid is actually a bunch of p's. I tried changing the font and the font size but neither seemed to have any effect.[/QUOTE] Interesting, I would never have tried that :L Now that I've got some text to work with, I will have another stab at working out why the colour assignment is not working. Thanks much, sir!