|
NotShadowStar posted:What crazytown language doesn't vomit a stack dump when you get an uncaught exception?
|
# ¿ Sep 28, 2010 18:48 |
|
|
# ¿ May 15, 2024 15:47 |
|
NotShadowStar posted:And of course the dripping pit of Aspergers, Stackoverflow, just rip into him instead of actually guiding him.
|
# ¿ Jan 16, 2011 12:39 |
|
NotShadowStar posted:I'm taking a numeric analysis course this semester, and the second chapter is literally all about floating point errors and bounds checking and how much this is going to gently caress you over and over until you get it right.
|
# ¿ Feb 1, 2011 18:29 |
|
Ugg boots posted:I don't think that the Java problem is the same x87 weirdness as PHP. Their algorithm is different (approximating toward the target from the other direction), and also it seems to work (not work) on 32-bit and 64-bit hardware. Otto Skorzeny posted:Why do so many libraries and runtimes use the correction loop method to begin with?
|
# ¿ Feb 1, 2011 21:45 |
|
Janin posted:
|
# ¿ Feb 13, 2011 20:51 |
|
Internet Janitor posted:zootm: Wouldn't it make more sense to make methods like that take no arguments and access a static Random instance somewhere if they need one?
|
# ¿ Feb 14, 2011 01:47 |
|
Outlaw Programmer posted:I think that might be better expressed in a properties file like: This is the fatal mistake made by frameworks like Spring XML, as well. As awful as Java can be, it is not improved by replacement with XML. These "configuration" files are always deployed along with the application and are never changed at run time. They dictate the wiring and behaviours of code and are rarely anything other than a representation of a shorter Java program. These configuration files are, in other words, code, albeit code with little to no compile-time checking and a more verbose syntax. Outlaw Programmer posted:Even without Lua or another scipting framework, externalizing these things can give you a lot of flexibility. This isn't just specific to Minecraft; I've seen it in production business code as well. Java developers are almost infamous for favoring complex type hierarchies when some other options might be simpler and more flexible. In any case, the trichotomy between "scripts", "configuration" and "code" is a false one. All three of these items are code describing the behaviour of the game world. The properties file example has literally no advantages over encoding the items in code unless 1) you plan on changing them a lot and 2) you have a lot of examples. The syntax is slightly less cumbersome than Java code, but it has less expressive power (unless you feel like going to town on that expression language you don't need) and introduces a new unnecessary syntax into your project. The Lua-like-language solution makes sense if one really does not want to encode the game world in Java (wouldn't blame you, although Lua in particular is usually used to avoid scripting game worlds in C or C++, which are considerably more dangerous to fool around with in a world description), but if you're comfortable writing your game world in Java there's no real problem with that here.
|
# ¿ Feb 16, 2011 11:49 |
|
ToxicFrog posted:^^ I don't disagree, but where zootm's argument goes off the rails in the assumption that any use of external scripting or configuration falls into this category. The experience of Adobe, Blizzard, Gas Powered Games, Firaxis, and Relic directly contradicts this, and shows that such an architecture has very real benefits. In any case, though, I think the scripting approach is sound; I hoped to defend the non-scripting approach in the case where one has a relatively simple world and is already using a high-level (Java jokes go here) language. I didn't intend to malign scripting as a general approach, it's both sensible and proven.
|
# ¿ Feb 17, 2011 12:06 |
|
Outlaw Programmer posted:If you've ever played Minecraft, you'll see that most of the blocks (dirt, stone, sand, gravel, snow) are really similar. The differences between them are mostly superficial: their appearance, what tools work best on them, whether or not they are affected by gravity, etc. I feel that each of these behaviors would be better implemented as parameters or properties instead of subclasses. quote:Anyway, I would agree that in many cases, I would rather just express this stuff in pure Java code. However, I feel like notch really backed himself into a corner here, maybe because he didn't anticipate how popular Minecraft would become. His inheritance approach probably did speed up his initial development, but now that there is demand for a true mod community, he might be better off with a different approach.
|
# ¿ Feb 17, 2011 12:22 |
|
Ugg boots posted:Correct me if I'm wrong, but by passing in a dynamic value you don't mean passing in an enum value do you? Having said that ninjeff's suggestion (which I would quote if I wasn't on a mobile phone) above makes perfect sense assuming people don't want to screw with the distribution.
|
# ¿ Feb 18, 2011 09:39 |
|
shrughes posted:Purely Functional Datastructures is a nice read and has practical uses for nonfunctional programming.
|
# ¿ Mar 8, 2011 19:00 |
|
Janin posted:HTML5 is a web markup spec, based on XHTML. Janin posted:Its native markup language is XML, but it has a special compatibility syntax for parsing basically arbitrary text. Janin posted:This syntax is based on browser's "quirks mode" parsing. Janin posted:Correct parsers represent it as an XML document, *not* an SGML document. Janin posted:So, if anything, it's HTML that's dead. The next version of XHTML will be named "HTML5", and will be supported by every modern browser. Janin posted:Of course, 99% of the web will continue to be completely invalid and malformed pseudo-markup that not even browsers can parse reliably. zootm fucked around with this message at 08:44 on Apr 1, 2011 |
# ¿ Apr 1, 2011 08:42 |
|
Zombywuf posted:No, what were you reading? http://www.w3.org/TR/html5/infrastructure.html#conformance-requirements
|
# ¿ Apr 4, 2011 12:44 |
|
Geekner posted:The same program threw generic Exceptions from EVERY function, then ignored them in main(). The actual code you posted is pretty stupid, though.
|
# ¿ May 9, 2011 12:45 |
|
tef posted:is it wrong to want a version of awk that handles xpath
|
# ¿ Jul 5, 2011 17:20 |
|
tef posted:It also does matrix operations reasonably fast, without having to write more than A * B
|
# ¿ Jan 23, 2013 23:28 |
|
ohgodwhat posted:But what if they try to add three or more of them together???
|
# ¿ Feb 5, 2013 08:21 |
|
Ithaqua posted:A friend and former boss of mine once accidentally dropped a production database. Happily the site hadn't launched and everything was recalculable.
|
# ¿ Feb 12, 2013 08:52 |
|
|
# ¿ May 15, 2024 15:47 |
|
qntm posted:Some people set up their terminals so that terminals pointing at a production machine have unmissable bright red backgrounds or red text or something.
|
# ¿ Feb 13, 2013 23:59 |