38,516 reputation
590169
bio website tech.turbu-rpg.com
location Seattle, WA
age 30
visits member for 2 years, 8 months
seen 5 hours ago
stats profile views 1,779
A lifelong programmer who's been coding in Delphi since its initial release and currently makes a living at it.

1d
comment Why are nested loops considered bad practice?
@user958624: Obviously this is a very high-level overview of a general algorithm. Like the "matches" operator, the "<" must be defined in a way that is correct in the context of the data being compared. If this is done correctly, the results will be correct.
1d
comment Why are nested loops considered bad practice?
@RobertHarvey: Of course. But that's still far less than O(n^2) for non-tiny values of N.
2d
comment What can you specifically do with Basic?
@Steve314: You're still thinking in terms of abstractions. You assume an interpreter. You assume an OS. You assume a virtual memory manager. You're taking all sorts of abstractions that exist in the current implementation and arbitrarily deciding that they make it impossible. Throw all of that away, reimplement everything without them, from the ground up, with no C, and it would be possible.
2d
comment What can you specifically do with Basic?
@Steve314: You're thinking in terms of abstractions, and not in terms of what's actually going on. At the lowest level, device I/O is implemented simply by reading from or writing to a specific memory address. :)
May
22
comment What can you specifically do with Basic?
@JonPurdy: Yes, when the language lacks specific interfaces, you can't utilize them. But it's still (theoretically) possible to recreate all of the OS functionality without it, so you wouldn't need those bindings. That's what Turing completeness means. The language can (theoretically) do anything, but it won't necessarily be practical or even sane to try. I certainly wouldn't take you up on your challenge. I'm actually a contributor to SDL, and it's tough enough to get things right in C! :P
May
22
comment What can you specifically do with Basic?
@JonPurdy: Sure, it can't communicate with a C library, but it could implement the same functionality that that library provides. Turing completeness means you can create any program. It does not mean that you can do so efficiently or conveniently.
May
21
comment Subranges in Pascal
@veryfoolish: FPC is a Delphi clone. It probably follows Delphi's example on this point. Try looking for an option for bounds checking in the project properties, and make sure to enable it.
May
21
comment How to write readable Clojure Code?
Writing readable Lisp code is difficult in general. They invented the backronym "Lost In Superfluous Parenthesis" for a reason.
May
21
comment Subranges in Pascal
@veryfoolish: What Pascal compiler are you using to test this? Does it support bounds checking? If so, is the support guaranteed or optional? If optional, do you have bounds checking on or off?
May
21
comment Subranges in Pascal
decr(k)? What flavor of Pascal is this? I'm familiar with dec(), but not decr()...
May
16
comment Why is it impossible for Google to port V8 along with Chrome's codebase in C/Obj-C on iOS?
Because Apple's afraid of competition and won't allow any scripting languages not controlled by them in their Walled Garden. It's not a technical problem.
May
16
comment Other than XML, what are some examples of “coding” a GUI design?
@PeteH: I don't think WinForms would count, because it's missing two important features of the declarative form system: it's not language independent (you can't use a form created in VB.NET in a C# project without jumping through a bunch of hoops) and there's no interpretation layer to put customization hooks into.
May
16
comment Other than XML, what are some examples of “coding” a GUI design?
@PeteH: This is not "raw code"; it's a declarative layout. It's not Delphi syntax, and it can be read and interpreted by any language that uses the VCL (which is currently Delphi and C++ Builder). It's also possible to put hooks into the DFM processing system to customize the output in various ways so that what you end up with is not exactly what the DFM "code" says. You can't do that with "raw code".
May
15
comment Why is 0 false?
0 does not evaluate to FALSE and 1 to TRUE in "most of programming languages". It's only that way in bad programming languages that don't have a real boolean type and allow you to treat things that aren't booleans (such as numbers) as booleans.
May
15
comment What programming related tasks can you do with a “dead” brain?
OK, now you've got me curious. What is it you're doing that's so mentally intense?
May
14
comment Is it poor programming practice to pass parameters as Objects?
@user16764: Exactly. This looks like someone who only knows dynamic languages and doesn't understand how a strong type system works.
May
14
comment Single codebase for client and server with Node.js
@YannisRizos: A lot of extremely smart and capable people stick with Javascript, I don't think they would if they didn't enjoy working with the language. You see, though, that's the beauty of monopolies. A statement like yours is only valid if they have a choice, but on the browser-side scripting front, JS is the only game in town.
May
13
comment Could we build a functional computer?
@Dokkat: if we could make a specialized chip for Filter, for example, it would need just a single clock for a Filter operation. Not really, because Filter isn't "an operation"; it's a higher-order function that applies an arbitrary external operation to a list. You can't reduce that to a single clock cycle.
May
9
comment Why is there no 'finally' construct in C++?
Having to write an entirely new class to take care of temporary state change reversal, using a design idiom that is implemented by the compiler with a try/finally construct because the compiler does not expose a try/finally construct and the only way to access it is through the class-based design idiom, is not an "advantage;" it's the very definition of an abstraction inversion.
May
9
comment Implementing non-fixed length array support in a compiler
As @Blrfl noted, there's a heap available. Allocating non-fixed-length arrays on the stack is tricky, especially since it makes you even more vulnerable to stack buffer overrun errors than putting fixed-length arrays on the stack does. (Which, depending on the uses this device is being put to, can have security implications.) You ought to have a look at the way Delphi implements dynamic arrays as a language feature. They're always heap objects, managed by the compiler, and it works quite well.