• What Are You Working On? May 2015
    1,601 replies, posted
It looks like all the WAYWO threads are being hit, and all with around 40-45 readers. Is someone in here testing some kind of bot, trying to find the all time highlights or something?
Did one of you invent time travel or something
Woops. Accidentally discovered cloning. Now have several clones of me viewing WAYWO .. (not really)
[img]https://hostr.co/file/970/3ssb8I2suckI/Screenshoton2015-05-08at15.35.14.png[/img] hhhehehehhe
[QUOTE=KillerLUA;47683834]Applied some language analysis stuff I was working on and hooked it up to a web app to show the UK general election opinion. It uses tweets, gets the sentiment and calculates averages. It's more programming than web development, I swear. [img]https://dl.dropboxusercontent.com/u/16266581/kworm1.png[/img] [URL="http://worm.karambyte.com"]http://worm.karambyte.com[/URL][/QUOTE] It'd be cool to see this for the U.S. Primaries. Starting it early and providing long-term statistics would be unbelievably cool.
[video=youtube;ZkkkNwe3uP4]http://www.youtube.com/watch?v=ZkkkNwe3uP4[/video]
[QUOTE=Darwin226;47683636]Can you show a diff? I'm interested in why that is.[/QUOTE] In a nutshell: Regex is slow.
[QUOTE=Berkin;47684501]In a nutshell: Regex is slow.[/QUOTE] What do you use as alternative? Or was it not neccesary to begin with?
[QUOTE=Cyberuben;47684570]What do you use as alternative? Or was it not neccesary to begin with?[/QUOTE] I use [URL="https://github.com/TheBerkin/Rant/blob/dev/Rant/Engine/Compiler/RantLexer.cs#L74-L101"]reader functions[/URL] now. Another advantage these have besides performance is that I can throw much more specific compiler errors if, say, a string literal is left unterminated. That's something I couldn't do with a regular expression.
[QUOTE=Berkin;47684625]I use [URL="https://github.com/TheBerkin/Rant/blob/dev/Rant/Engine/Compiler/RantLexer.cs#L74-L101"]reader functions[/URL] now. Another advantage these have besides performance is that I can throw much more specific compiler errors if, say, a string literal is left unterminated. That's something I couldn't do with a regular expression.[/QUOTE] Sounds good
With combined outreach to Hacker News, Designer News, LÖVE forums, and /r/gamedev, [url=https://github.com/Planimeter/grid-sdk]grid-sdk[/url] on GitHub has about quadrupled, and tomorrow v1.0.0-beta will be released. TIGSource is the last initial place I'd like to make an announcement/thread, but I don't think I'm "TIGSource ready." I'm pretty excited despite so much work left to be done. [editline]8th May 2015[/editline] It just broke 80 stars, yay!
My next project will be a BASIC interpreter. I'm going to use SmileBASIC, from the DS Lite app, petitcomputer. I'll have to figure out a way to do graphic functions and stuff but I think I can get the console functions down easily. I'll have to read up a bit on variable length parameter, or maybe not, depending how I implement string concatenation (since I'm doing this in C). Maybe I can make an app out of it for windows phone or android, if I feel like learning C#. Another question: I can port the syntax of my Java projects to C# pretty easily, but what are some things that I can take advantage of to make basic things in C# easier/better?
[QUOTE=proboardslol;47685449]...what are some things that I can take advantage of to make basic things in C# easier/better?[/QUOTE] [URL="http://www.drdobbs.com/windows/c-versus-java/184404487"]This article[/URL] sums up some of the C# features that are unavailable in or improved over Java.
[QUOTE=proboardslol;47685449]My next project will be a BASIC interpreter. I'm going to use SmileBASIC, from the DS Lite app, petitcomputer. I'll have to figure out a way to do graphic functions and stuff but I think I can get the console functions down easily. I'll have to read up a bit on variable length parameter, or maybe not, depending how I implement string concatenation (since I'm doing this in C). Maybe I can make an app out of it for windows phone or android, if I feel like learning C#. Another question: I can port the syntax of my Java projects to C# pretty easily, but what are some things that I can take advantage of to make basic things in C# easier/better?[/QUOTE] Null propagation, auto-properties, string interpolation, output parameters, optional parameters, and expression bodies are some of my favorites.
I've made some kind of 2D ambient occlusion, based on the tip from [b]fewes[/b] few pages back. I think it's OK, the map doesn't look so flat, and it beats placing textures around manually. I tried to explain it on my blog:[url]http://antonior-software.blogspot.com/2015/05/ambient-occlusion-in-2d-scene.html[/url] [quote] No ambient occlusion [img]http://i.imgur.com/2QxNmzk.jpg[/img] Manually placed textures in Quake 2D (2012) [img]http://i.imgur.com/Ktt6K1w.jpg[/img] Ambient occlusion using FBOs and a blur shader [img]http://i.imgur.com/amMLqxP.jpg[/img] [/quote]
[QUOTE=Berkin;47684501]In a nutshell: Regex is slow.[/QUOTE] Were you matching each regular expression one by one?
[QUOTE=Ac!dL3ak;47685651]Were you matching each regular expression one by one?[/QUOTE] Something like that.
[QUOTE=WeltEnSTurm;47684374][img]https://hostr.co/file/970/3ssb8I2suckI/Screenshoton2015-05-08at15.35.14.png[/img] hhhehehehhe[/QUOTE] Whoa that's pretty neat, what exactly is it? Some game-like console with auto-completion on your Linux system?
[QUOTE=AntonioR;47685533]I've made some kind of 2D ambient occlusion, based on the tip from [b]fewes[/b] few pages back. I think it's OK, the map doesn't look so flat, and it beats placing textures around manually. I tried to explain it on my blog:[url]http://antonior-software.blogspot.com/2015/05/ambient-occlusion-in-2d-scene.html[/url][/QUOTE] Looks nice! A tip is you can add an offset to the occlusion downwards and to the left/right and then mask it with the scene to turn it into a sort of drop shadow effect like the second picture you posted :)
[QUOTE=Sidneys1;47685472][URL="http://www.drdobbs.com/windows/c-versus-java/184404487"]This article[/URL] sums up some of the C# features that are unavailable in or improved over Java.[/QUOTE] [quote]Neither Java nor C# support generic types (templates). However, a proposal has been submitted to the Java Community Process, and Microsoft Research at Cambridge is said to be developing a solution for .NET.[/quote] That article is [I]incredibly[/I] outdated. (It's from 2001.) [QUOTE=Berkin;47685504][B]Null propagation[/B], auto-properties, [B]string interpolation[/B], output parameters, optional parameters, and [B]expression bodies[/B] are some of my favorites.[/QUOTE][emphasis mine] Note that the highlighted ones are new in C# 6, so you can only use them starting with Visual Studio 2015, which has no commercial-use free or stable release yet. I think my favourite part about C# vs Java are lambdas/[I]MulticastDelegate[/I]s (which may be supported in Java now), followed by custom value types, that the generics are actually supported by the runtime, implicit state machines (iterators with [I]yield return[/I] and [I]Task[/I] async) and LINQ's query syntax.
Also: type inference, (mostly) better standard library, easier native interop, partial classes, indexers, operator overloading, extension methods, as-operator and the null-coalescing operator.
Figured I'd do the 1-9 addition challenge, with a small twist in that it also checks for "-1" as well: [t]http://imgur.com/kosckmW.png[/t]
[t]http://i.imgur.com/yLosUQe.png[/t] Fuckin' Dijkstra's, man. Specifically for link state routing algorithm. I have no idea if it's mathematically correct, but it's consistent with my teacher's example... Also could probably clean up my code a bit, it took 480 lines to calculate and write this table. Next up is a forwarding table, but I have a data structure that stores the starting node, destination node, shortest route to the node and length of the path, so that should be fairly easy.
[QUOTE=Naelstrom;47685854]Whoa that's pretty neat, what exactly is it? Some game-like console with auto-completion on your Linux system?[/QUOTE] It's my third iteration of trying to copy Sublime's Ctrl+P menu for linux stuff. [url]https://github.com/weltensturm/dinu[/url] Integration of bash-completion (in this picture) currently isn't on GitHub, and I'm currently breaking all the things again so it will take a while until available. Right now it just suggests executables, desktop files and directories in $PWD. If anyone wonders how this madness started: I realized tiled window managers already give tabs, so I wouldn't need editors with them. But then I needed something to open files quickly. And then something to build things.
[csharp]using Ref; using System; namespace StackRef_Test { class Box<T> { public T Value; public Box(T value) { Value = value; } } static class Program { static Reference<int> _zeroReference; static Reference<int> _oneReference; static Reference<int> _twoReference; static Reference<int> _fiveReference; static void Main(string[] args) { var zero = 0; var one = new int[] { 1 }; var two = new Box<int>(2); var five = 5; Func<int> getFive = () => five; // five's on the heap, not the stack, due to this. _zeroReference = Reference.FromRef(ref zero); _oneReference = Reference.FromRef(ref one[0]); _twoReference = Reference.FromRef(ref two.Value); _fiveReference = Reference.FromRef(ref five); Console.WriteLine(zero); // 0 Console.WriteLine(one[0]); // 1 Console.WriteLine(two.Value); // 2 Console.WriteLine(five); // 5 DoSomething(); Console.WriteLine(zero); // 1 Console.WriteLine(one[0]); // 0 Console.WriteLine(two.Value); // 4 Console.WriteLine(five); // 9 } static void DoSomething() { _zeroReference.Value = 1; _oneReference.Value = 0; _twoReference.Value = 4; _fiveReference.Value = 9; } } }[/csharp] Terrible. ("[I]StackReference[/I]" isn't quite accurate since this (safely?) works with anything that can be passed by reference as far as I can tell. It doesn't keep instances alive though.) Maybe I'll put it on Bitbucket later, but it's really not something you should let get into contact with production code. It's also really suboptimal because C# [I]really[/I] doesn't want you to do this. [editline]edit[/editline] [URL="https://bitbucket.org/snippets/Tamschi/k6AE"]Here it is.[/URL]
[QUOTE=ZestyLemons;47683019][img]http://puu.sh/hFCb5/2a19d166f2.png[/img] Why would you throw a divide by zero error for an out-of-range array subscript error?![/QUOTE] Wait, so 0 / 15 also supposedly returns an error?
[QUOTE=Clavus;47687010]Wait, so 0 / 15 also supposedly returns an error?[/QUOTE] Yeah because that's totally wrong math. Bohemia are geniuses.
[QUOTE=Rocket;47687031]Either way it should return an index out of bounds error instead of a division by zero error.[/QUOTE] More sensibly it should return a zero out of bounds by division array exception
So... I called up a startup, they called me back and one guy looked at my work thought it was pretty good and now he's asked his CTO to take a look. I will know by Monday if they're taking me on board or doing a formal interview. We talked for like 45 minutes on the phone. He seemed really excited to talk to me and I am super stoked to even have the experience of listening to the sorts of problems they were attacking. Don't know if I'm elated or gassy, But I'm somewhere in that zone 'Cause for the first time in forever, I actually might be making equity and be apart of something much greater than myself.
[img]http://i.imgur.com/R95y9rj.png[/img] Was bored. [editline]8th May 2015[/editline] [img]http://i.imgur.com/v4q3GDX.png[/img]
Sorry, you need to Log In to post a reply to this thread.