• What Are You Working On? September 2015
    1,261 replies, posted
[QUOTE=WTF Nuke;48668052]Hey waywo! I haven't worked on much recently, but about a week ago I started my first programming job! Learning all sorts of stuff that I never really touched upon before, like databases and websites as well as some ios stuff.[/QUOTE] Congrats, but how the heck did you even get the job then ? I was at an interview in a company that does all this stuff (that I also never touched), and they told me "Give us a call when you learn what we need". Not to mention they asked me about genetic algorithms and the architecture of GPUs (you know, the basic web dev stuff) ... I was completely lost :(
[QUOTE=Tommyx50;48668629]But when the possibility of moving to a memory system which is often both cheaper and simpler, it can't be easy to turn down! I'd suggest you'd try giving it a small benchmark anyways, it could be worth it.[/QUOTE] That's fair, it could be a fun exercise to provide both with the ability to switch between them with a #define.
[QUOTE=Rocket;48669424]I ported Rant Lite to AS3 [del]because I'm a masochist[/del]: [img]http://i.imgur.com/chNv402.png[/img] AS3 is actually really nice to work with. It's pretty much Javascript (and would've been Javascript if Adobe had gotten their way), so it was actually super simple to convert JS to AS3. I much prefer the syntax to ES2015 or TypeScript, I wish ES4 had actually gone through.[/QUOTE] You might be interested in: [url]http://haxe.org[/url] It's pretty close to ActionScript, with more macro functionality and some other stuff :v: (I use it to make browser games instead of JS since typing and macros) That + it's awesome pattern matching functionality (you can do it on structures, lists, enums) [url]http://try.haxe.org/#Fd8B5[/url] [code] class Test { // this example uses array matching : // http://haxe.org/manual/lf-pattern-matching-array.html static function main() { var playerA = { name: "Simn", move: Move.Paper } var playerB = { name: "Nicolas", move: Move.Rock } // a switch can directly return something var winner = switch [playerA.move, playerB.move] { case [Move.Rock, Move.Paper]: playerB; case [Move.Rock, Move.Scissors]: playerA; case [Move.Paper, Move.Rock]: playerA; case [Move.Paper, Move.Scissors]: playerB; case [Move.Scissors, Move.Rock]: playerB; case [Move.Scissors, Move.Paper]: playerA; default: null; } if (winner != null) { trace('The winner is: ${winner.name}'); } else { trace('Draw!'); } } } @:enum abstract Move(Int) { var Rock = 1; var Paper = 2; var Scissors = 3; } [/code] It's primarily used by people jumping from the Flash-ship to use something which won't be locked to a single platform.
What would people like to see in the next version of Rant? It's going to be a while before I start working on it, but I thought I'd gather some ideas for it in the meantime.
Will Rant ever be complete?
[QUOTE=Berkin;48670195]What would people like to see in the next version of Rant? It's going to be a while before I start working on it, but I thought I'd gather some ideas for it in the meantime.[/QUOTE] written in 5 different languages self compilable
disentangled my love box2d wrapper from fuccboiGDX and made it a standalone library [url]https://github.com/adonaac/hxdx[/url]
My game has transcended space and time and passed into higher dimensions [video]https://youtu.be/6F9X-XFlxuc[/video] [sp]second dimension, then third, then fourth where you can move through time (I was moving forward and backward through time which is why that rocket stage was changing direction)[/sp] I wasn't planning on working on this or showing it for a while yet but v:v:v
[QUOTE=JohanGS;48670279]Will Rant ever be complete?[/QUOTE] Are you asking me whether there will be a "final" version, or are you implying that it's missing something?
structure is showing promise [IMG]http://i.imgur.com/GItcmpS.gif[/IMG]
I spent today fighting tooth and nail with my computer to extract the header structure of Wiktionary but I got it. Next up is extracting definitions and parts of speech. After that, I'm going to write an improved Semantic Network implementation and feed it the 1,000 most common English words Then, I can actually start work on being able to feed the network text and have it teach itself grammar based on it's knowledge of the words and pattern matching that with their usage; ie Morphological Chain->Syntax Tree, and then after even more work Syntax Tree->Semantic Network so it can read, and then do it all again the other direction so it can speak
[QUOTE=Rocket;48671093]You could also add them to [url=https://github.com/RantLang/Rantionary]Rantionary[/url] and I would love you forever.[/QUOTE] I second this. I see words being repeated too much in my outputs and I'd love some new material.
[QUOTE=AntonioR;48668899]Congrats, but how the heck did you even get the job then ? I was at an interview in a company that does all this stuff (that I also never touched), and they told me "Give us a call when you learn what we need". Not to mention they asked me about genetic algorithms and the architecture of GPUs (you know, the basic web dev stuff) ... I was completely lost :([/QUOTE] It's a coop placement so it's a learning opportunity as well.
I'm doing a little more work on the German version of Rantionary. Tonight is pronoun night. This is just the third-person possessive pronouns: [img]http://i.imgur.com/oCEIDHX.png[/img] :suicide:
[QUOTE=Berkin;48671843]I'm doing a little more work on the German version of Rantionary. Tonight is pronoun night. This is just the third-person possessive pronouns: [img]http://i.imgur.com/oCEIDHX.png[/img] :suicide:[/QUOTE] This was exactly the reason I gave up on learning German after 3 months. Gendered words in language is so dumb. Why is skirt masculine and pants feminine? No idea. Germany.
[QUOTE=helifreak;48671914]This was exactly the reason I gave up on learning German after 3 months. Gendered words in language is so dumb. Why is skirt masculine and pants feminine? No idea. Germany.[/QUOTE] I don't have much of a problem with the genders, I just treat them as an integral part of the word. Maybe they were thinking of Scottish men when deciding the gender for "Rock"? V:v:V
[QUOTE=helifreak;48671914]This was exactly the reason I gave up on learning German after 3 months. Gendered words in language is so dumb. Why is skirt masculine and pants feminine? No idea. Germany.[/QUOTE] Not exclusive to just German, French is the same way.
[QUOTE=Karmah;48672203]Not exclusive to just German, French is the same way.[/QUOTE] as with spanish, latin, greek, and even old english and dozens if not hundreds of other languages personally, I kinda dislike gendered nouns because I don't exactly see the point in it [editline]12th September 2015[/editline] post above put a whole list of em rip me [editline]12th September 2015[/editline] also the RIDE autocomplete is beautiful
[QUOTE=Rocket;48672243] Moved RIDE (Rant's IDE) to ScintillaNET and added autocomplete and code hints: [vid]https://d.maxfile.ro/xzyqiqiwze.webm[/vid][/QUOTE] Holy shit.
[QUOTE=JohanGS;48670279]Will Rant ever be complete?[/QUOTE] He can refine it as much as he wants while it isn't in widespread use. Once a language becomes popular, it becomes very difficult to make language changes without breaking existing code. [QUOTE=Berkin;48670195]What would people like to see in the next version of Rant? It's going to be a while before I start working on it, but I thought I'd gather some ideas for it in the meantime.[/QUOTE] I wish you could better store carrier values from subroutines. If you have carriers in your subroutines, then once you call that subroutine again, the carrier value changes.
[QUOTE=elevate;48672637] I wish you could return carriers from subroutines. If you have carriers in your subroutines, then once you call that subroutine again, the carrier value changes.[/QUOTE] You can. [img]http://i.imgur.com/juBqAe7.png[/img]
[QUOTE=Berkin;48672712]You can. [img]http://i.imgur.com/juBqAe7.png[/img][/QUOTE] Well god fucking damn, you even implemented what I already suggested. I'm horrible at articulating myself, I was talking about passing carriers to subroutines like this, which it seems you can do! [code] [$[func:value]:<name::[arg:value]>] [$func:=name] is \a <pron.nom::=name>. [/code] Now if you can make queries silent just so you can get their values with carriers, that would be great. Unless you've already implemented that as well! I apologize for prematurely asking questions, it seems to be a bad habit of mine, and I've already done so recently in this same thread. I ask the question and always seem to find the solution myself 10 minutes later.
[QUOTE=elevate;48672749]Well god fucking damn, you even implemented what I already suggested. I'm horrible at articulating myself, I was talking about passing carriers to subroutines like this, which it seems you can do! [code] [$[func:value]:<name::[arg:value]>] [$func:=name] is \a <pron.nom::=name>. [/code] Now if you can make queries silent just so you can get their values with carriers, that would be great. Unless you've already implemented that as well! I apologize for prematurely asking questions, it seems to be a bad habit of mine, and I've already done so recently in this same thread.[/QUOTE] Queries currently do not evaluate Rant syntax placed inside their bodies; just static strings. With the current way they are implemented internally, it simply isn't possible at the moment. However, I see no good reason why it shouldn't be allowed. We will consider it. Thank you for the suggestion.
Hey guys need your opinion on something, as it turns out I was using the wrong character for dithering and so that's why it was off before. I re-implemented it correctly now and it looks ok, but I'm really not sure about it: with dithering: [IMG]https://i.imgur.com/BoQOuOv.gif[/IMG] without: [thumb]https://i.imgur.com/57Qeyg9.gif[/thumb] You get more color depth and the lighting kinda looks better but it sacrifices 50% of the vertical resolution because there's no half grid characters It looks good but the resolution is low as it is, and now distant objects become unrecognizable 50% closer than before, which kinda hurts the engine a lot if you can't make out objects after such a short distance. I'm inclined to keep the old way mainly because of the resolution sacrifice, and I don't think the old way looks too bad, with dithering it looks better yeah, but by how much? So what do you guys think considering the down sides? [IMG]https://facepunch.com/fp/ratings/tick.png[/IMG] for dithering [IMG]https://facepunch.com/fp/ratings/cross.png[/IMG] for old way I COULD support both with an option but honestly, the whole screenbuffer format changes when dithering is on, the res changes, and there needs to be a correction matrix that I didn't implement yet. So supporting both would make nasty code and it isn't really what I want.
[QUOTE=Berkin;48670609]Are you asking me whether there will be a "final" version, or are you implying that it's missing something?[/QUOTE] The former.
[QUOTE=Rocket;48669424]I ported Rant Lite to AS3 [del]because I'm a masochist[/del]: [img]http://i.imgur.com/chNv402.png[/img] AS3 is actually really nice to work with. It's pretty much Javascript (and would've been Javascript if Adobe had gotten their way), so it was actually super simple to convert JS to AS3. I much prefer the syntax to ES2015 or TypeScript, I wish ES4 had actually gone through.[/QUOTE] Your screenshot is basically compilable as TS.
I'm working on making a game engine from scratch, because after doing it twice for school, now I want to do it For Reals. In doing so, I made this thing that I'm totally prepared for everyone to tell me is actually useless because of some C++ language feature I'm unaware of: [CODE] #pragma once namespace Kuma { /* Derive from Handleable using the derived class as the template argument (CRTP) This lets you do this: class Foo : Handleable<Foo> { public: const int id; Foo(int id_) : id(id_) {} void Bar() { } bool baz = false; }; ... Foo f(1); Foo::Handle handle(&f); handle->Bar(); handle->baz = true; Now you have a Handle to f. In this example it's pretty useless, but f is something that might move around in memory (i.e. it's in a vector and the vector resizes), having a Handle to it is extremely useful. Simply call UpdateHandles() on the object, and all handles pointing to that object will be updated. Handles are also great because as long as you call InvalidateHandles() in your destructor, Handles will "know" when the thing they pointed to is no longer valid. This is useful because say you have a std::vector<Foo> (or some other custom allocator), and you have a pointer to the third item in the vector. If that object gets removed from the vector and another takes its place, the pointer will now unintentionally point to the new object. By using Handles instead, we avoid this problem, because when the object is removed from the vector, all Handles to it are invalidated. std::vector<Foo *> foos = std::vector<Foo>(); foos.push_back(new Foo(0)); foos.push_back(new Foo(1)); foos.push_back(new Foo(2)); Foo::Handle bestFoo = foos[2]; // swap-n-pop vector item removal std::swap(foos[1], foos.back()); foos.pop_back(); for (int i = 0; i < foos.size(); ++i) foos[i].UpdateHandles(foos[i]); I haven't 100% tested UpdateHandles() but it SHOULD work. */ template <typename T> class Handleable { public: struct Handle; Handle *handles = nullptr; // head of a doubly-linked list struct Handle { public: T *object = nullptr; Handle *next = nullptr; Handle *prev = nullptr; private: void Register(T *object_) { // Do nothing if the handle points to nothing and we're assigning it to point at nothing if (object_ == object && object == nullptr) return; // If the handle already points at something, we need to remove this handle from that thing's list of handles if (object) { if (prev) prev->next = next; if (next) { next->prev = prev; if (!prev) object->handles = next; } } // Assign the handle object = object_; // If we're trying to set object to something other than nullptr, add this handle to that object's list of handles if (object) { // If no handles to us exist, we're the first in the list if (object->handles == nullptr) object->handles = this; // Otherwise, insert this handle "into the front of handles" else { next = object->handles; next->prev = this; object->handles = this; } } } public: T *const operator->() const { return object; } T * operator->() { return object; } T *const operator*() const { return object; } T * operator*() { return object; } Handle &operator= (T *rhs) { Register(rhs); return *this; } Handle &operator= (const Handle &rhs) { Register(rhs); return *this; } bool operator==(const Handle &rhs) const { return rhs.object == object; } bool operator==(void *rhs) const { return object == rhs; } bool operator!=(void *rhs) const { return object != rhs; } operator bool() const { return IsValid(); } // so you can be weird and do "if (!!handle)" if you really want? bool IsValid() const { return (object != nullptr); } Handle(T *object_) { Register(object_); } Handle() : object(nullptr) { } }; void InvalidateHandles() { while (handles != nullptr) { Handle *current = handles; handles = current->next; current->object = nullptr; current->next = nullptr; current->prev = nullptr; } } void UpdateHandles(T *newAddress) { Handle *current = handles; while (current != nullptr) { (*current).object = newAddress; current = current->next; } } }; }[/CODE] The point is to make Handles you can pass around that will be valid even if the thing they point at moves (assuming you remember to call UpdateHandles() after moving it!). Also they'll be [I]invalid[/I] after the thing is destroyed (assuming you remember to call InvalidateHandles() when destroying!). My friend told me std::weak_ptr does something kind of like this. ...I have no idea how the pointer shit in the STL works! :v: Anyways, with this done, I now have a decent entity-component system, and now I have to figure out how I'm going to store Entitys. In the past, I organized them into Spaces, but I'm thinking about maybe not doing that this time? I dunno. [url=https://github.com/adamrezich/InfiniteBonus]Here's the engine so far.[/url] The component system is the way it is because I'm going to add support for some kind of scripting going forward, and this is how it's worked for the previous engines I worked on. (The last one had JavaScript support via V8 and it was a NIGHTMARE to get working.)
[vid]https://dl.dropboxusercontent.com/u/357850863/ShareX/2015/09/2015-09-13_12-09-53.mp4[/vid] [B]PROGRESS![/B] Sorry for the potato quality, I was so excited to get this working. I have working obj loading (no thanks to assimp, it's a pain to get it running under windows), and semi-decent bmp textures. I ported my codebase to windows (again) and FPS-style movement (subjective) and made translation less stupid. I can do this: [CODE]if (Input::GetKeyDown(Key::J)) { transform->position += glm::vec3(0, 1, 0); }[/CODE] to easily move objects (yeah I know [I]exciting[/I]).
I am learning TDD the right way. It's weird to have a different development process than I'm used to. By writing tests even before I write code, then follow what the error messages say. Essentially I am writing bad code and then refactoring into good code while my tests still pass (the behavior doesnt change).. I am starting to become enlightened.
[QUOTE=brianosaur;48674591]I am learning TDD the right way. It's weird to have a different development process than I'm used to. By writing tests even before I write code, then follow what the error messages say. Essentially I am writing bad code and then refactoring into good code while my tests still pass (the behavior doesnt change).. I am starting to become enlightened.[/QUOTE] TDD (and agile development in general) is pretty great. As far as I'm concerned, it's the 'right' way to write code now.
Sorry, you need to Log In to post a reply to this thread.