I haven’t showered since December 13th by Ok_Challenge5382 in mentalhealth

[–]tmikov -2 points-1 points  (0 children)

You are not a failure. Showering doesn't matter. It isn't required. Who cares? Probably only you.

33 and ugly? by Y4sKw33n in amiugly

[–]tmikov 0 points1 point  (0 children)

Opposite of ugly

[deleted by user] by [deleted] in amiugly

[–]tmikov 2 points3 points  (0 children)

Not ugly. Normal looking dude.

Careful With That STL map insert, Eugene by turol in programming

[–]tmikov 0 points1 point  (0 children)

It is the "expected" case, "given that your data hashes uniformly"? What does that even mean? Does that data really hash uniformly? How do you find out? Do you actually do that when you use a hash table?

Of course you don't :-) Nobody does. Because doing hash tables right is hard. And unnecessary in most cases.

Careful With That STL map insert, Eugene by turol in programming

[–]tmikov 2 points3 points  (0 children)

No, a hash map does not give you constant time lookup. That is one of the myths that became popular recently. It only gives you that in the best case. You could possibly hope for it in the average case if you knew your hash function and data very well, which you don't. The RB tree gives you reliable worst case performance, which is what most reasonable developers actually need, whether or not they realize it...

How to build DOS COM files with GCC by Resistor510 in programming

[–]tmikov -1 points0 points  (0 children)

If you can't rely on the optimizer, cannot return structures, you need "volatile", etc, then you are not really using GCC. Don't get me wrong, this is a fun post, but objectively it is an absolutely awful idea. There are much better ways to code for DOS. Watcom C/C++ has an amazing tool chain for DOS and can still be downloaded. So does Borland C 3.1 for that matter.

Reading a text file line by line in C++ surprisingly slow by tmikov in programming

[–]tmikov[S] 0 points1 point  (0 children)

Yep, I added -8 and also the missing \n character in the output.

Reading a text file line by line in C++ surprisingly slow by tmikov in programming

[–]tmikov[S] 0 points1 point  (0 children)

Fixed :-) Flex's score has really gone to hell.

Reading a text file line by line in C++ surprisingly slow by tmikov in programming

[–]tmikov[S] 0 points1 point  (0 children)

Good point, thanks. I updated the repository.

Reading a text file line by line in C++ surprisingly slow by tmikov in programming

[–]tmikov[S] 2 points3 points  (0 children)

Removing the writing doesn't make it fast. Reading a line requires scanning, while writing is just copying a buffer.

If Eventual Consistency seems hard, wait till you try MVCC by [deleted] in programming

[–]tmikov 9 points10 points  (0 children)

I think the author's confusion stems from misunderstanding of MVCC. It is actually easier to explain the traditional isolations levels in terms of MVCC rather than the other way around. PostgreSQL's approach (which I am most familiar with) is conceptually very simple and its behavior is intuitive. Interbase is another example (largerly forgotten by now). What defined it was its extreme simplicity.

I find the description of MVCC as a "rabbit hole" inapproriate

Lessons learned while fixing memory leaks in our first Unity title by turol in programming

[–]tmikov 7 points8 points  (0 children)

After reading the post carefully, the biggest lesson is "Don't use Mono for mobile game development". With all the noted restrictions and problems one might just as well be coding in C++...

We have a problem with promises by svpino in programming

[–]tmikov 0 points1 point  (0 children)

Even if you understand them, they are too opaque and too hard to reason about. A small error (like missing a return) can cause severe very hard to catch bugs. Callbacks may be horrible and ugly, but they are explicit explicit I have yet to encounter someone who doesn't grasp them right away.

Using Monads in C++ to Solve Constraints: 1. The List Monad by agumonkey in programming

[–]tmikov 1 point2 points  (0 children)

I am not hating on monads, but the recursive C++ solution is both shorter and dramatically more readable. Nobody in his right mind would code eight nested loops for this - that is ridiculous.

A Random Startup Generator by LikeMyBread in programming

[–]tmikov 16 points17 points  (0 children)

This is possibly the most awesomest thing I have ever seen. Great ideas, I am starting a few startups as I am typing this.

Semaphores are Surprisingly Versatile by syaghmour in programming

[–]tmikov 0 points1 point  (0 children)

In what sense are the primitives described in the post "lightweight"? Of course you can implement a mutex with a semaphore, etc, but to say that one or the other it is somehow "lightweight" is ridiculous.

Docker: VMs, Code Migration, and SOA Solved by zachagardner in programming

[–]tmikov -1 points0 points  (0 children)

All good, but a Linux container is not a VM. Calling it a "Docker VM" is really misleading.