Jump to content

  • Log In with Google      Sign In   
  • Create Account


CodeDemon

Member Since 30 Aug 1999
Offline Last Active Aug 12 2013 01:01 AM

Posts I've Made

In Topic: Why XML is all the rage now?

11 August 2013 - 02:58 AM


I understand that people may not be crazy about XML and it was used, overused and abused to no end for many, many years. But, I personally find it a very useful format for encoding basic data that doesn't need to be in binary and is never really intended to be sent over a network. Effectively I use it to define animation states and object properties in games. I also use it to great effect for localization strings.

 

I find JSON problematic for these cases and frankly, YAML isn't as easy to put together particularly when you have a number of sub objects (not as intuitive, but that could simply be because it hasn't been in as great a use as XML).

 

S-expressions are just as powerful, yet more terse. Naughty Dog uses them in the Uncharted Engine for similar things.


In Topic: Why XML is all the rage now?

11 August 2013 - 02:38 AM


brief history (approximately of the past 14 years):

at one point, I wrote a Scheme interpreter, and it naturally uses S-Expressions.

later on, this project partly imploded (at the time, the code became mostly unmaintainable, and Scheme fell a bit short in a few areas).

by its later stages, it had migrated to a form of modified S-Expressions, where essentially:

macros were expanded; built-in operations used operation-numbers rather than symbols; lexical variables were replaced with variable-indices; ...

there was also a backend which would spit out Scheme code compiled to globs of C.

 

Quite the array of language projects you have there!

 

I too am fond of the use of S-expressions over that of XML, and have had experience using them for data and DSLs in a number of projects. You can't beat the terseness and expressive power, and it's not hard to roll your own parser to handle them.

 

I share many of the opinions from: http://c2.com/cgi/wiki?XmlIsaPoorCopyOfEssExpressions

 

As for my own projects, I've also built a custom R6RS parser in C++, and have done some interesting things with it. For specifying data as maps/sets/vectors, I added support for handling special forms which yield new data-structure semantics, added Closure-like syntactic sugar to the lexer/parser where braces and square brackets can be used to define such data structures, and added a quick tree-rewriting pass to the data compiler to convert from the internal list AST node representation to the appropriate container type.

 

For simple data, sometimes I just go with simple key-value text files if I can get away with it (less is more! strtok_r does the job good enough), and I've recently been experimenting with using parsing expression grammar generators to quickly create parser combinators for custom DSLs that generate more complex data or code as s-expressions or C++.

 

A shame that many of the "big iron" game studios still use XML for a lot of things, although I've managed to convince a number people that it's time to move on. I dread the days where I am tasked with working on anything touching the stuff.

 

In short, if you're still using XML, you're needlessly wading through an endless swamp of pain, suffering and obtuse complexity. Things can be better.


In Topic: John Carmack a racist?

19 May 2012 - 03:05 AM

Let me be clear; I have nothing against you. I think we probably just ultimately have different value systems. There are certain things that I want to see exist in the future, and there are certain things that you want to see exist in the future, and they might turn out to be mutually exclusive (in fact I'd say that's fairly certain). And that's fine.


This is not an argument about fundamental value systems. This is an argument about certain historical, societal, and biological truths. Objective facts aren't a projection of one's value system, they're either true or they're not. Attack my actual statements and my evidence with logic. Don't fallaciously attack my character, even if that wasn't your intention. Hiding ad hominen or strawman arguments with the illusion of apology and compromise doesn't make it acceptable.

There are certain things you're saying that I don't think are true, factually, but even if you changed your mind about all of those things I wouldn't expect or want you to change your fundamental value system, so I'm willing to not worry about those things if you are.


I have provided what I believe to be factual evidence to support my claims. Perhaps you haven't yet had the time or the motivation to fully go through what I have cited. If you don't want to argue about it, or to research it on your own time, then that's your loss.

In Topic: John Carmack a racist?

19 May 2012 - 12:55 AM

I don't mean scary as uncivil, just as some pretty odd sort-of-paranoid beliefs that I would have thought was a bit farther from the mainstream.


There was a time when the idea that the Earth was flat instead of spherical was mainstream. Yes, there is the stigma of conspiracy and paranoia, but it's all in one's head. Judge the evidence or the argument on its own merits.

I guess I just don't spend that much time worrying about protecting "White European civilization" because it's not really in danger and who cares anyway?


At the very least, it's in the same type of danger as the Japanese civilization. With a global average fertility rate of around ~1.6 and comprising only around 8% of the World's population, White Europeans will be extinct within a matter of centuries and displaced far before then unless current trends change. Keep in mind that Japan keeps its borders much more closed to immigration than the West. Of course, things can and will change in the future, but we don't live in the future--we're responsible for the future.

http://www.youtube.com/watch?v=jxUD8E-qbyI

I see using skin color as an important indicator as, if not evil, at least very lazy and ultimately not beneficial to either party.


Is it simply just skin color? And why do you think it is evil to protect something?

http://www.edge.org/...g-out-of-africa
http://www.nature.co...-planet-1.10561
http://www.pnas.org/...8/29/1109300108
http://www.ncbi.nlm....act&holding=npg
http://www.ncbi.nlm....act&holding=npg
http://www.medical-h...0537-4/abstract
http://www.nature.co.../mp201185a.html
http://www.nature.co...ll/ng.2250.html
http://www.nature.co...ll/ng.2237.html
http://www.sciencema...1/1717.abstract

In Topic: John Carmack a racist?

18 May 2012 - 11:23 PM

I hope this isn't the last we hear from you on the topic. I don't give a shit about political correctness, but ignorance, myopia, elitism, and prejudice all rub me the wrong way.


And I couldn't help but notice, but you say you don't care about Political Correctness, and yet you unwittingly play your role to the narrative. Perhaps its time to unplug yourself from the matrix, wake up and realize you're being played as nothing more than a pawn in a game of conquest that has been going on for over a century.


http://www.nationalreview.com/articles/299918/censored-race-war-thomas-sowell

Oh wait, that last editorial, like Derbyshire's, was also pulled days after being published. Gee, I wonder why. Here's the Google cache version.

http://webcache.googleusercontent.com/search?q=cache:Ikz6UnQKS8IJ:www.nationalreview.com/articles/299918/censored-race-war-thomas-sowell+&cd=1&hl=en&ct=clnk

PARTNERS