Reputation
2,245
Top tag
Next privilege 2,500 Rep.
Create tag synonyms
Badges
9 16
Newest
 Pundit
Impact
~82k people reached

Jan
31
comment Compiler design prevent register override
Here's what you said above: "it can store temporary result is RAM". What aren't you doing?
Jan
31
comment Compiler design prevent register override
Here's a hint: you can only emit bytecode for an operation after you've emitted bycode for the operations that it depends on. Therefore, you should emit all bytecode for the addition before you emit any bytecode for the multiplication. This will turn into a depth-first traversal of your "object representation," where bytecode for the node is emitted after bytecode for both of its child nodes.
Jan
31
comment Compiler design prevent register override
Your real problem appears to be an incorrectly constructed parse tree. Or perhaps your visitor should be prepending operations (assuming a top-down traversal). In either case, Stack Overflow would probably be a better place to post, but you'd need to show your code and how the particular expression transforms into a parse tree.
Jan
30
comment Running Java and RIOT-OS together
Or should the question be revised? What's the real goal? Is it to run Java on a device? If yes, what would this implementation provide that an embedded Linux doesn't? If it's just idle speculation about possibility, then the answer is "sure, it's possible, the JVM is just software." But once you've implemented all of the abstractions that the JVM expects then you've ended up with something that looks a lot like Linux.
Jan
30
comment Running Java and RIOT-OS together
You don't need to start Java from the command-line, you can use the invocation API. But an executable JAR isn't native executable code, and you will need a filesystem abstraction (as well as threading); does RIOT-OS provide that?
Jan
16
comment Why does Scala name monadic composition as “for comprehension”?
Perhaps they took the construct from Erlang or Python, where it operates on sequences, and only later said "you know, monadic operations can look a lot like sequences if you squint."
Jan
13
comment Using ClearCase file revision system for a multiple teams for a single file
Is this file being modified by all those people? If yes, then you have a communications problem not a technology problem. If no, then the config spec should be set up to select the main branch version.
Dec
27
comment Python's join seems to focus not on the items to join, but on the symbol, as compared to Ruby or Smalltalk, for a design reason?
In one form, the collection knows how to convert itself to a string with a delimiter, in the other a string knows how to concatenate a collection using itself as a delimiter. They're both object-oriented, but change the subject and object of the verb.
Dec
27
comment Python's join seems to focus not on the items to join, but on the symbol, as compared to Ruby or Smalltalk, for a design reason?
From The Zen of Python: "There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch."
Dec
17
comment Why does inner class have to specify Outer.this.remove(int)?
Have you actually tried removing the Outer.this reference? What error message do you get when compiling?
Nov
29
comment Rationale of IEEE754 direct rounding behavior near infinity
This is an educated guess, not an answer: implementations perform calculations with a higher precision than results, and rounding occurs as part of conversion of this higher-precision form to double. I would agree, however, that that the best explanation is alcohol.
Oct
29
comment Cache Json on disk with fast read back in java/android
Second, this code doesn't provide any indication of how you might be serializing your data -- unless all you're doing is reading and writing the string value of the JSONArray as UTF-8 bytes. In which case, use the simpler (and bug free) code.
Oct
29
comment Cache Json on disk with fast read back in java/android
First, you have two bugs in your code: available() does not do what you think it does, and you're ignoring the return from read. Rather than tell you why these are bugs, I'll point you to the docs. You'll also find that DataOutputStream and DataInputStream have a better way to write strings than what you're doing.
Sep
24
comment Multi-tenant database design
+1, shared-nothing designs are much simpler, and the reasons against them always seem to be premature optimization (or ethically-dubious aggregation of data).
Sep
4
comment Is recursive-descent parsing a panacea for DoS threats posed by 'Evil' regexes? Or does evilness stem from the grammar?
You do realize that the "evil" regex is something that you create, right?
Aug
7
comment How do I bundle library files for use in branches?
@DocBrown - I repeat: I wrote exactly what I meant to write. While I don't believe that artifacts and source code belong together, that does not mean that they can't be stored in the same repo. I just think alternatives are better. Feel free to post your own recommendations, I don't feel like getting into a debate in the comments.
Aug
7
comment How do I bundle library files for use in branches?
@Ixrec - "local" copy, sure, but why in the source control repo? Perhaps I've been spoiled by the Java ecosystem, where Maven Central has been a reliable resource for ten years or so. But even when I was writing C code back in the 80s, we kept our source separate from our builds.
Aug
7
comment How do I bundle library files for use in branches?
@DocBrown - no, I meant exactly what I said. In my view, libraries are dependencies used by your source code, and artifacts produced from your source code, but they are not source code in themselves. You may have a need to store libraries-as-dependencies in a locally-managed repository, but I believe that even there a source code management system with its "forget nothing" design is inappropriate.
Aug
7
comment How do I bundle library files for use in branches?
Why is it a big issue? As others have pointed out, the space is only consumed on the client, not the server. And there are many techniques for minimizing that space, the simplest being to delete the branches once you've merged them to trunk. You can also use --depth and --set-depth to control what gets pulled to the client. Or you can create an archived-branches directory where you svn mv branches after merge (although, really, deleting them is far better).
Jul
26
comment What should JITed bytecode do exactly?
Another geezer data point: the DEC PDP-11 Fortran compiler from the 1970s also used a threaded interpreter. They might have done it for ease of implementation, but I strongly suspect that they wouldn't have done it if the performance was bad (and that was pre-cache, with a machine architecture that was flexible enough to run the processor backwards).