1,919 reputation
615
bio website blog.herby.sk
location Slovakia
age 40
visits member for 3 years, 1 month
seen 6 hours ago

Garbage-collecting duck-typer. Test-infected. Hopefully he is not alone who would like UNIX rewritten with GC memory and closure support in system, kernel API in Javascript, (Python, Ruby, Smalltalk), and C layer deprecated and emulated on top of the former.

I use Windows on workstation and FreeBSD on server.

Recently dipped myself into the mobile app world.


Jan
17
comment Visitor Pattern still useful in languages supporting class extensions?
GoF book says nothing about traversal. The fact is, most uses of Visitor pattern are traversals (including my example of Pharo's AST-Core).
Jan
15
comment Does boostrapping limit the achievable speed of the new compiler?
Assembler is not as low as you can get. Machine code is lower. ;-)
Jan
6
comment I failed FizzBuzz, would you hire me?
In my opinion, you failed it epically by not including the && correctly. The == 0 is an unimportant detail. This code gives the impression you are a cowboy.
Apr
10
comment Google Blink (new WebKit fork): Meaning of “Moving DOM into Javascript”?
From what I know (from es-discuss mailing list, for example), it is definitely the latter. There is a wish to have DOM written in JS, not just because of marshalling cost (which is there), but also for removing as much of the "exotic", "non-native", "special" objects from the language space as possible. DOM is big PITA for language designers, because it is special.
Jan
18
comment Are there any programming languages that follow a minimalist development approach?
@MattFenwick: Ok, in fact I did not know and drew the analogy from Smalltalk ifTrue: which is defined in the library and can be fully redefined; but of course, it is low-level so it contains <primitive: ...> pragma.
Dec
26
comment Are there any programming languages that follow a minimalist development approach?
@Giorgio: Not all. The minimal ones (like ones I mentioned) don't. There was no change in Smalltalk syntax since its inception except one, brought in by Squeak: the curly-braced computed arrays. Library is also very stable at the core (Behavior and Collection hierarchies). It seems to me that C is lot less stable with all those C89, C99 and whatnot.
Dec
26
comment Are there any programming languages that follow a minimalist development approach?
@JimmyHoffa: There's a lot more in the comments. But I added an edit, if you think it is needed.
Dec
26
comment Are there any programming languages that follow a minimalist development approach?
@JoanVenge: stackoverflow.com/questions/1007250/…
Dec
26
comment Are there any programming languages that follow a minimalist development approach?
@JoanVenge: I can't say for Lisp in detail, but both Liso and Smalltalk have very minimal syntax (because they are built around one big metaphor, either functional or message-passing objects). Thus, the languages in fact did not change, there was no point to. Libraries did, but everything including "control structures" is part of the library in these languages, so it is hard to separate. And as for "everything planned in great detail", I don't believe that can happen. BTW Ada is such "planned" language, it originated in army.
Dec
26
comment Are there any programming languages that follow a minimalist development approach?
@JörgWMittag: Isn't V8 the fastest VM? ;-) Jokes aside, I knew that Hotspot was created from Stringtalk VM which took a lot from Self, but does it reaaly not use static type information (much like Strongtalk didn't)? I assumed it uses it once it specialized to Java.
Dec
26
comment Are there any programming languages that follow a minimalist development approach?
"Worse is better" effect, and in case of Smalltalk also some marketing mistakes (it has its heyday in 80s but it was expensive so C took over). Performance was not the main issue (and is definitely not now, when compilers are much smarter, look up Self project if you want more details on this). But Lisp is THE functional language (and its descendant Haskell performs good), and Smalltalk is THE object-oriented language (Pharo is the contemporary professional dialect, and is free, with constantly developing VM).
Dec
13
comment DDD and Value Objects. Are mutable Value Objects a good candidate for Non Aggr. Root Entity?
Is there such thing as "mutable value object"? I always had the impression value objects are immutable.
Nov
7
comment Which is more effective in coding? Reducing line of code and execution of code?
"one of TDD/BDD major goals is to write enough code only to make the test pass" Well, don't confuse tools with goals. Major TDD/BDD goals is good code design. "enough code only to make the test pass" is only a one of the tools to achieve that, but it's only half of the equation, the other side being you incrementally add more tests, until the code does what it should (or, as IIRC Ward Cunningham pointed and Kent Beck included in the book, "until fear transforms into boredom").
Nov
3
comment Is there a way to add unique items to an array without doing a ton of comparisons?
Algorithmically, this is still O(n^2), because of insertions. kevin cline's answer is the only hashless one which gets you to O(n*log n). You can then make an array from the tree after the whole operation and you're done.
Oct
31
comment I need some help creating a non-binary tree (or some other data structure that will better solve my problem)
Updated to edits in original question.
Oct
28
comment How do I put YAML code in GitHub MarkDown?
Add an empty line after closing ``` and it will work.
Oct
28
comment How do I put YAML code in GitHub MarkDown?
I just tried it, it works fine for me (in preview, did not actually save). Shows on three lines, plain black with only three backticks, syntax-highlighted with ```yaml. No trailing spaces.
Oct
24
comment algorithm to print the digits in the correct order
The problem with this solution is to properly cover edge cases. Logarithm is floating-point number (which are tricky themselves), not to mention, 10-based logarithm is not natural (natural is e-based one), so some more error can accumulate. Which can leads to situations, where log n will be off by one. So you should not blindly believe it, but test the edge case. Also, if you know you have an integer, it is safer (again, floating point, unsafe edge cases) to do things like (1234 - 1234 % (10 ^ [4-1])/(10 ^ [4-1])) to eschew the floating point.
Oct
22
comment How can I explain object-oriented programming to someone who's only coded in Fortran 77?
OOP is (sort-of) simple, C++ "OOP" is not. Take Smalltalk (object has instance variables and a class, class has methods, you send message to and object which is serviced by a method, that's basically it). Prototype-oriented OOP can even put classes off the equation. --- That's why I would recommend (if possible) to only use subset (no private, no protected, no const, no multiple inheritance, all methods virtual, all destructors virtual etc.) so the model is simpler. Add other things later.
Sep
19
comment Test Driven Development Code Order
@martiert: It is a wrong test. You do not test anything in that test (existence of class is implementation detail).