tag:blogger.com,1999:blog-1994130783874175266.post1045386620402268088..comments2024-03-29T10:46:39.070+01:00Comments on bitsquid: development blog: Managing Decoupling Part 3 - C++ Duck TypingNiklashttp://www.blogger.com/profile/10055379994557504977noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-1994130783874175266.post-27888233950050056152022-02-11T12:20:41.109+01:002022-02-11T12:20:41.109+01:00Java is the first choice of many software develope...Java is the first choice of many software developers for writing applications for the enterprise. The <a href="https://eiliana.com/blogitem/an-overview-of-java-spring-framework-features-capabilities" rel="nofollow">application of java</a> is essential for enterprise application development. Java Enterprise Edition (Java EE) is a very popular platform that provides API and runtime environment for scripting. It also includes network applications and web services. JavaEE is also considered the backbone for various banking applications that have Java running on the UI to back server end<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1994130783874175266.post-20663680673673682082021-10-12T08:40:31.330+02:002021-10-12T08:40:31.330+02:00Really very happy to say, your post is very intere...Really very happy to say, your post is very interesting to read. I never stop myself to say something about it.You’re doing a great job. Keep it up. Kindly Visit our Website:- <a href="https://www.emailscustomercare.com/blog/how-to-fix-aol-desktop-gold-not-responding/" rel="nofollow">AOL Desktop Gold Not Responding</a><br />Email Helplinehttps://www.blogger.com/profile/07169766485241573432noreply@blogger.comtag:blogger.com,1999:blog-1994130783874175266.post-25896461307338416922021-05-19T11:45:41.187+02:002021-05-19T11:45:41.187+02:00Thank you so much for sharing all this wonderful i...Thank you so much for sharing all this wonderful information !!!! It is so appreciated!! You have good humor in your blogs. So much helpful and easy to read!<br /><a href="https://www.sevenmentor.com/gcp-certification-training-in-pune.php" rel="nofollow">Google Cloud Platform course in pune</a>Snehal Harshehttps://www.blogger.com/profile/06694621190399565128noreply@blogger.comtag:blogger.com,1999:blog-1994130783874175266.post-23904255067016722452020-10-31T09:21:33.168+01:002020-10-31T09:21:33.168+01:00Thanks for sharing the information. Yellowstone Co...Thanks for sharing the information. <a href="https://www.leatherjacket4.com/wool-jacket/yellowstone-coat-wool-jacket" rel="nofollow">Yellowstone Coat</a>Jenniferhttps://www.blogger.com/profile/13663218320214248956noreply@blogger.comtag:blogger.com,1999:blog-1994130783874175266.post-373368017102244652017-07-07T18:03:27.942+02:002017-07-07T18:03:27.942+02:00https://www.gamedev.net/articles/programming/gener...https://www.gamedev.net/articles/programming/general-and-gameplay-programming/managing-decoupling-part-3-c-duck-typing-r3060<br /><br />In case you still needed itAnonymoushttps://www.blogger.com/profile/06572715500237011459noreply@blogger.comtag:blogger.com,1999:blog-1994130783874175266.post-68378455282900728852017-07-07T17:35:35.856+02:002017-07-07T17:35:35.856+02:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/06572715500237011459noreply@blogger.comtag:blogger.com,1999:blog-1994130783874175266.post-86314458722752652017-02-13T23:19:51.241+01:002017-02-13T23:19:51.241+01:00Hi, I know this is really old post, but pretty int...Hi, I know this is really old post, but pretty interesting one. Is it possible to fix missing images ? thanks a lot.Anonymoushttps://www.blogger.com/profile/10041173415786923219noreply@blogger.comtag:blogger.com,1999:blog-1994130783874175266.post-55623260151663662152011-12-02T02:42:07.404+01:002011-12-02T02:42:07.404+01:00Hello Niklas. I really like your articles, they of...Hello Niklas. I really like your articles, they offer a lot of interesting ideas on how to better ones architecture. Not just for game development but for development in general.<br /> <br />But I'm having some trouble understanding how you implemented Duck Typing. Is it some kind of an array you are using? I know that you can move with the pointer by simply adding position, but how are you creating the generic object?Kunashuhttps://www.blogger.com/profile/03497748917677976851noreply@blogger.comtag:blogger.com,1999:blog-1994130783874175266.post-74027561409320767642011-05-27T17:53:04.074+02:002011-05-27T17:53:04.074+02:00You can write tools/functions that deal with objec...You can write tools/functions that deal with objects without knowing the exact data layout. I.e., the tool can deal with anything that has a "position" or "pos" field.<br /><br />You can add fields dynamically... if you have something representing enemy data and a certain enemy needs a special field "time_until_rage". Then you don't have to create a special struct for that enemy, you can just add that field to the struct.<br /><br />If you haven't spent some time in a language where duck typing is the norm, such as Ruby and Lua, you should try it. It is a different programming style with its own specific advantages.Niklashttps://www.blogger.com/profile/10055379994557504977noreply@blogger.comtag:blogger.com,1999:blog-1994130783874175266.post-81334665369984507782011-05-23T21:29:58.423+02:002011-05-23T21:29:58.423+02:00What is the advantage of your typed data compared ...What is the advantage of your typed data compared to having just a plain struct serialized? I see that you can change the layout of the data in memory freely as you need to query first where the field "position" is stored relative to the entry, but does this buy you that much in practice? Especially as you need to know that it's called position anyway (and not pos, for instance.)<br /><br />I somehow fail to see what this buys you besides some very ugly code with lots of type-casting back and forth.<br /><br />I wrote a small prototype implementation of a system as you described here and I'm curious to see where its strengths are. So far, I'm using "normal serialization" (i.e. structs have a load/save method; loading the fields individually) or plain memdumps (BVH for instance is offset based, storing/loading it as a single memory chunk.)<br /><br />Oh, and how do you create that data? The static data is easy to use, but generating requires to serialize part-by-part; especially if you do the nesting thing, handling all the temporary buffers seems to be a bit messy. I.e. if I want to create a dictionary of dictionaries, I need either a memory-hungry run-time representation of all of this or I serialise the nested dictionary somewhere else and then copy it (cheaply) around.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1994130783874175266.post-2727270256663717992011-04-09T17:09:24.812+02:002011-04-09T17:09:24.812+02:00The way I see it, the data structure can be used t...The way I see it, the data structure can be used to represent a generic object (similar to o in the Python example). We can implement something like o.position by scanning the object for a field called "position" and returning its value.<br /><br />I've done a bit of ML, but it was a long time ago. I think one of the problems with many functional languages is that they don't give you bit-level control of memory layout. A big disadvantage nowadays when memory performance is often the bottleneck. It would be interesting with a functional language that still allowed C-like control of data layout. I'm sure it exists somewhere :)Niklashttps://www.blogger.com/profile/10055379994557504977noreply@blogger.comtag:blogger.com,1999:blog-1994130783874175266.post-45933192448434193552011-03-27T05:53:13.392+02:002011-03-27T05:53:13.392+02:00Niklas, this is another thought-provoking post.
O...Niklas, this is another thought-provoking post.<br /><br />One thing that I'm struggling with is to work out how your json-like generic compressed (or at least compacted) data structure related to duck-typing. How to you see it being used to implement integration_position?<br /><br />Also, wanted to point out that this kind of thing is called an algebraic data type in ML-like languages.<br /><br /> http://en.wikipedia.org/wiki/Algebraic_data_type<br /><br />I typed up your example in Standard ML. It doesn't look like your trick of "optimized dictionaries" can be done in SML without resorting to similar low-level techniques that you have used in C++. Neither does the example guarantee a compact representation in continuous memory.<br /><br /> http://is.gd/openstructexample<br /><br />This is similar to a JSON implementation that I was playing with recently as I learned Haskell:<br /><br /> https://bitbucket.org/steshaw/haskell-course/src/acea50167854/L06/JsonValue.hsAnonymoushttps://www.blogger.com/profile/06340403723350864929noreply@blogger.comtag:blogger.com,1999:blog-1994130783874175266.post-64041212174012233722011-02-28T13:26:46.191+01:002011-02-28T13:26:46.191+01:00Thanks! Fixed now.Thanks! Fixed now.Niklashttps://www.blogger.com/profile/10055379994557504977noreply@blogger.comtag:blogger.com,1999:blog-1994130783874175266.post-46974709877716174412011-02-28T12:49:11.712+01:002011-02-28T12:49:11.712+01:00Niklas, looks like you missed the title.
Anyways,...Niklas, looks like you missed the title.<br /><br />Anyways, great stuff. Really digging your DOD approach.ypphttps://www.blogger.com/profile/00842880957258845485noreply@blogger.com