• What are you working on? December 2011 Edition
    3,353 replies, posted
[QUOTE=LuaStoned;33841097]Now it's time to use TortoiseHG! :v: In other notes, I cloned the Facepunch Lua API over to Mercurial. It's on [url=https://bitbucket.org/luastoned/facepunch-lua-api]BitBucket[/url][/QUOTE] BitBucket is awesome.
I'm thinking of using FMOD instead of writing my own audio decoder for all of the many containers/formats. But I really don't like the fact that it is proprietary. :suicide:
[QUOTE=LuaStoned;33841097]Now it's time to use TortoiseHG! :v: In other notes, I cloned the Facepunch Lua API over to Mercurial. It's on [url=https://bitbucket.org/luastoned/facepunch-lua-api]BitBucket[/url][/QUOTE] are you working on the API with them?
Was tired of filling my code with [csharp]this.SuspendLayout(); //code this.ResumeLayout();[/csharp] Now I can fill it with [csharp]using (new SuspendLayout(this)) { //code }[/csharp] [csharp] /// <summary> /// Suspends layout on construction, resumes on dispose. /// </summary> public class SuspendLayout : IDisposable { protected readonly Control control; public SuspendLayout(Control cont) { control = cont; control.SuspendLayout(); } public void Dispose() { control.ResumeLayout(); } }[/csharp]
[QUOTE=high;33841402]Was tired of filling my code with [csharp]this.SuspendLayout(); //code this.ResumeLayout();[/csharp] Now I can fill it with [csharp]using (new SuspendLayout(this)) { //code }[/csharp] [csharp] /// <summary> /// Suspends layout on construction, resumes on dispose. /// </summary> public class SuspendLayout : IDisposable { protected readonly Control control; public SuspendLayout(Control cont) { control = cont; control.SuspendLayout(); } public void Dispose() { control.ResumeLayout(); } }[/csharp][/QUOTE] That makes me feel dirty.
Just wiped like a week of work and replaced all my shit with FMOD within a few minutes :v:
[QUOTE=Ortzinator;33841618]That makes me feel dirty.[/QUOTE] That's not a terrible way to go about it tbh, using scope like that isn't a bad thing.
Added a nice captcha window. It should work, but I'm not sure, because Omegle refuses to send me a captcha request. It's way too trusting. [URL="http://code.google.com/p/dot-omegle/downloads/detail?name=CleverOmegle-v1%2C0%2C5.zip"]CleverBot v1.0.5 get[/URL]
[hd]http://www.youtube.com/watch?v=2T1vQ6_yMDg[/hd] Finally back, with no bandwidth limits. Dunno why the zombies keep going invisible yet.
[QUOTE=RusselG;33841326]are you working on the API with them?[/QUOTE] Yeah? I contributed most of the Ajax / POST stuff :P
[QUOTE=Sc00by22;33836595]-snip- [img]http://i.imgur.com/WiWI6.png[/img][/QUOTE] [code] if (correct) { return true; } else { return false; }[/code] [code]return correct;[/code] :v: ?
[QUOTE=sambooo;33841844][code] if (correct) { return true; } else { return false; }[/code] [code]return correct;[/code] :v: ?[/QUOTE] I knew someone who kept writing: [code] if( a == true ) { b = true; } else if( a == false ) { b = false; }[/code]
I'm more worried about the unsanatized input.
Psuedo-Crapcode [code]return (bool)math.clamp((int)correct, 0, 1);[/code] I had to sell my soul to write that code. :v: (I would never do this, just to clarify)
[QUOTE=danharibo;33841864]I knew someone who kept writing: [code] if( a == true ) { b = true; } else if( a == false ) { b = false; }[/code][/QUOTE] One guy at school did this: [cpp]public void doSomething(boolean large) { if (large) { //Code } if (small) { //Code } }[/cpp] Needless to say, he failed the class.
[QUOTE=sambooo;33841844][code] if (correct) { return true; } else { return false; }[/code] [code]return correct;[/code] :v: ?[/QUOTE] I can sympathize. For a while I had to force myself to not write code like that.
Checking out angelscript so I can mess around and make an amnesia custom story, looks very easy it's based on C/C++.
[QUOTE=Robber;33842006]One guy at school did this: [cpp]public void doSomething(boolean large) { if (large) { //Code } if (small) { //Code } }[/cpp] Needless to say, he failed the class.[/QUOTE] Holy shit I found the actual code in the revision history: [cpp] public float getPendlerpauschale(float km, boolean large) { if large=true { if(km<20) return 28; if(km<40 ) return 113; if(km<60) return 196; else return 281; } if large=small { if(km<40) return 52; if(km<60) return 103; else return 154; }[/cpp] It's a bit different than I what I remembered but just as horrible! And I'm pretty sure he never even tried to compile that... thing.
Well, at least he put those if statements in good order
Dear lord. [editline]22nd December 2011[/editline] My Day: Make some exciting progress on a feature that is potentially extremely useful, and yet barely understand this despite writing it Determine that this progress is actually very useful Run into problem after problem when attempting to use the new feature as intended, wasting hours firing away at it, wearing it down piece by meaningless piece Then, some time in the future... Do something and the feature suddenly works. Hark, and hear the angels singing! All is now clear. Begin work on next feature. Repeat.
Fixed OGG codec.. you need to mark the last frame as the last frame. If this don't loop now then I don't know what its problem is. [vid]http://puu.sh/bfLT[/vid] [editline]22nd December 2011[/editline] Blargh guess I don't know what its problem is.
[QUOTE=Robber;33842006]One guy at school did this: [cpp]public void doSomething(boolean large) { if (large) { //Code } if (small) { //Code } }[/cpp] Needless to say, he failed the class.[/QUOTE] Ashamed to say it took me a while.
[QUOTE=Naarkie;33833030]Do you mean you want to display the captcha image in console? I could make it work with Windows Forms, so it displays a basic form with a picturebox. Thanks once more for le patch. If you want, I can add you as a contributor to the project. Gonna make the thread tomorrow morning, too tired right now. EDIT: [csharp] case "count": if (this.Count != null) this.Count(this, new EventArgs()); //I'm a cheapskate, ev[1] holds user count though. [/csharp] The "user count" is actually a number randomly generated with each user connection. #themoreyouknow[/QUOTE] No problem, and.. not sure about contributor status, I have commitment issues. :v: [QUOTE=Naarkie;33841765]Added a nice captcha window. It should work, but I'm not sure, because Omegle refuses to send me a captcha request. It's way too trusting. [URL="http://code.google.com/p/dot-omegle/downloads/detail?name=CleverOmegle-v1%2C0%2C5.zip"]CleverBot v1.0.5 get[/URL][/QUOTE] I just saw that you added the form, not sure if that'll work, but I'll test it out. From what I remember, displaying a winform from a console application will freeze because of the lack of a message pump (you'd need a separate thread to run it). I think a modal form would work though. I'll get it to show me a captcha and try it out.
Have you considered putting the Chatlog inside a winform? then you could just display the captcha no worries.
Made a little coding blog: [url]http://garry.tv/post/14613360572/coding-evolution[/url]
Actually, that would be the right way to approach the whole thing, I'm going the quick route though. I think showing a modal form that has a text field for input would be easiest. [editline]22nd December 2011[/editline] Garry, I'd pay to change your title to something manageable.
Go for it [url]http://www.facepunch.com/store/[/url]
I'm not paying you.
What are you talking about then? Who would you pay to change it?
[QUOTE=garry;33843147]What are you talking about then? Who would you pay to change it?[/QUOTE] It's a rhetorical "I'd pay" meaning if there wasn't an option to pay for it he would pay if there was an option to pay. :v: Maybe we should split the cost of changing his title? I'd contribute 3$!
Sorry, you need to Log In to post a reply to this thread.