HNHacker News
TopNewBestAskShowJobs

agazso

418 karma · joined June 11, 2009

submissionscomments
agazso··on Ask HN: Who is hiring? (July 2014)
C++ Engineer

Europe/Hungary/Budapest

Full-time / no remote work / relocation supported

Prezi is a zooming presentation software that uses an open canvas instead of traditional slides, is available on desktop, browsers, iPads and iPhones. With offices in San Francisco and Budapest, we work together with 200 employees. You’ll love to work with us if you want to: 1. create an app used by 40 million users 2. work together with people, who are smarter than you, who can inspire you, 3. use the technologies, tools and methods on you daily work, you like, 4. work in small, independent teams, 4. do something from scratch, 5. have free food all day long

Currently we are building a new C++ team, where you will be developing a complex editor for Prezi. If you want to solve non-trivial architectural problems, take full ownership of features, work with a wide range of software tools and technologies and work on a new codebase, not legacy stuff, send us your application:

http://prezi.com/jobs/oHh7XfwM/

agazso··on Ask HN: Who is hiring? (June 2014)
C++ Engineer

Europe/Hungary/Budapest

Full-time / no remote work / relocation supported

Prezi is a zooming presentation software that uses an open canvas instead of traditional slides, is available on desktop, browsers, iPads and iPhones. With offices in San Francisco and Budapest, we work together with 200 employees. You’ll love to work with us if you want to: 1. create an app used by 40 million users 2. work together with people, who are smarter than you, who can inspire you, 3. use the technologies, tools and methods on you daily work, you like, 4. work in small, independent teams, 4. do something from scratch, 5. have free food all day long

Currently we are building a new C++ team, where you will be developing a complex editor for Prezi. If you want to solve non-trivial architectural problems, take full ownership of features, work with a wide range of software tools and technologies and work on a new codebase, not legacy stuff, send us your application:

http://prezi.com/jobs/oHh7XfwM/

agazso··on The next version of DuckDuckGo
Scrolling is broken on Safari iOS7. The default behavior in Safari is when you scroll up, the controls appear (url bar, back/forward button, other tabs button etc.)

It seems DDG implements its own scrolling, so scrolling up does not make the controls appear, which is quite unexpected and makes a bad user experience.

agazso··on Github Notifications API
Aside from the shameless plug, what will you use it for?
agazso··on Does Functional Programming Replace GoF Design Patterns?
If you read the replies you can see one from @TonyAlbrecht [1] that states it was implemented, and it was pretty good at the time.

That said all the programs that used design patterns always seemed too synthetic for me, as if the main purpose of the programs were generality. I learned that often it is better to keep other goals in mind, like practicality, simplicity or maintainability.

[1] https://twitter.com/TonyAlbrecht/status/257685852153581569

agazso··on Life hacks to make things easier
Sorry, I really meant cloudy.
agazso··on Life hacks to make things easier
It works. My scuba diving instructor taught us, that you can use toothpaste in your scuba glasses when they get hazy all the time.

Spit also works, which is handy when you are in the sea, but not so much when you have to clean your headlights :)

agazso··on Play Wolfenstein 3D in a browser
Press 'x' to shoot.
agazso··on Smuggling Data in Pointers
In the Linux kernel, the internal Red-Black tree (rbtree) implementation uses this trick to save memory.

Quoting LWN:

"The anticipatory, deadline, and CFQ I/O schedulers all employ rbtrees to track requests; the packet CD/DVD driver does the same. The high-resolution timer code uses an rbtree to organize outstanding timer requests. The ext3 filesystem tracks directory entries in a red-black tree. Virtual memory areas (VMAs) are tracked with red-black trees, as are epoll file descriptors, cryptographic keys, and network packets in the "hierarchical token bucket" scheduler."

http://lwn.net/Articles/184495/

agazso··on Inserting Artificial Objects into Photographs
Yeah, but it wasn't "mind-blowing" then. Good titles are important.
agazso··on What is your favourite C programming trick?
A macro for calculating the size of a buffer for a C-style string containing a (signed/unsigned) integer:

  #define CS_INT_SIZE(int_type) ((size_t)(0.30103 * sizeof(int_type) * 8) + 2 + 1)

  int x = -1000;
  char buf[CS_INT_SIZE(x)]; // instead of char buf[100];
  snprintf(buf, sizeof(buf), "%d", x);
Another macro for calculating the length of a string literal in compile time (just like strlen would do). Note the extra check for string literal.

  #define CSLLEN(s)           (sizeof(s "") - 1)
  int len = CSLLEN("hello"); // len == 5 here
Another one for logging variable arguments or no arguments at all.

  #define Log_Trace_(...) Log(__FILE__, __LINE__, __func__, LOG_TYPE_TRACE, "" __VA_ARGS__)
  void Log(const char* file, int line, const char* func, int type, const char* fmt, ...);
  Log_Trace(); // prints just the name of the file, line and func
  Log_Trace("Error %d", error); // prints the same as above and the error number
agazso··on The Most Expensive One-byte Mistake
Interestingly it was also Ken Thomson who invented UTF-8 as well.
agazso··on LevelDB: A Fast Persistent Key-Value Store
If you are writing sequentially, then you can write more than the number of seeks.

And that is exactly what LevelDB is doing: writing a log (sequential), and when the memorychunk is full, it is writing it to disk sorted (this is also sequential).

agazso··on Why Startups Could Use .NET, But Don’t
You can use JNI from Java if you need performance. It is the "unsafe but fast" option.
agazso··on DuckDuckGo just launched a DDG branded XMPP service
XMPP has a concept of transports, that are gateways to other networks. Gateways exists for MSN, ICQ, AIM and IRC.

And to answer your question, taka a look at

http://xmpppy.sourceforge.net/irc/

agazso··on Waterbear - a visual language for Javacript
A working demo would be useful to see how to use this after all.
agazso··on What are some startup ideas that persistently fail?
Ok, I tell you one everyone knows: Excel.
agazso··on The myth of the Lisp genius
"I actually think Direct3D is a rather better API today. [For example], Direct3D handles multi-threading better, [while] newer versions manage state better," Carmack told Custom PC.

http://www.google.com/search?q=carmack+prefers+direct3d

:)

agazso··on Magical Block Store: Why EBS Can't Work
I hate NFS for the same reasons that you just wrote, but to be honest it is not a protocol issue, but rather an implementation issue.

If NFS were implemented totally in userspace (like FTP), it would not hang the entire system when something breaks. On the other hand, it would be much slower than it is, therefore it would be unsuitable for a lot of use-cases where it is used now.

agazso··on Ask HN: How Would You Architect Around Potential AWS Failures?
For reference, here is how many days/hours the system is unavailable with different percentages:

  90%      36.5 days ("one nine")
  95%      18.25 days
  98%      7.30 days
  99%      3.65 days ("two nines")
  99.5%	   1.83 days
  99.8%	   17.52 hours
  99.9%    8.76 hours ("three nines")
  99.95%   4.38 hours
  99.99%   52.56 minutes ("four nines")
  99.999%  5.26 minutes ("five nines")
  99.9999% 31.5 seconds ("six nines")
http://en.wikipedia.org/wiki/High_availability#Percentage_ca...
agazso··on Want a job working on mongoDB? Your first online interview is in this post
Yeah, you are right. The parent has the right solution, but I already sent my comment to the original post.
agazso··on Want a job working on mongoDB? Your first online interview is in this post
I gave a similar solution in the blog comments, but instead of sum of squares I used the product of the numbers. We used to give similar puzzles to candidates on job interviews.
agazso··on Doom engine code review
I also done that on a friends' 386SX 25MHz machine that had only 2MB of ram. Doom required at least 4MB (sounds ridiculous as I am typing) and although it used the DOS4GW dos extender that was capable of swapping, it never worked.

On the other side, Win 3.1 was also capable of swapping and ran Doom. It was absolutely unplayable though :)

agazso··on Sorting algorithms demonstrated with Hungarian folk dance
Igen (means yes in hungarian).
agazso··on Sendoid (YC W11): Finally, Sharing Big Files Isn’t A Huge Pain
Not sure what Sendoid uses, but there is a project called Cumulus that implements an RTMFP server in C++.

https://github.com/OpenRTMFP/Cumulus

Haven't tried it yet, but the code looks pretty good.

agazso··on How to make fewer errors at the stage of code writing
I would say that the most common errors are because there is no built-in string type (at least in C) and lot of library function expects null terminated strings.

And these are hard to get right, because they are very prone to off-by-one errors, and novice programmers tend to write string manipulation routines from scratch, which leads to corruption.

Use libraries (e.g. bstring or std::string in C++) that do that for you, and you won't have problems.

Regarding memleaks: you can leak database handles, file handles and other resources in managed languages. In C/C++ memory is one of the resources you also take care of. In C++ there are also destructors and you can use RAII to handle most of the cases without thinking.

agazso··on Types Considered Harmful
But the probability of discontinuing a project is higher when the language is a less popular one.
agazso··on In what cases is Java faster than C++?
In C or C++ you can even allocate objects on the stack, which has only the cost of increasing the stack pointer (meaning it is very cheap), and also you have precise control over the object's lifetime.
agazso··on In what cases is Java faster than C++?
Found a great comparison between the answers:

http://zi.fi/shootout/

It is basically the great programming language shootout at http://shootout.alioth.debian.org/ redone with different GCC optimization levels.

It is clearly visible where Java Hotspot shines, but in most cases C++ wins by a factor of two. It also mentions a technique how you can do profiling analysis with GCC that makes similar optimizations than Hotspot does.

agazso··on RIP Microsoft Zune brand
Try Foobar2000! It is open-source, actively developed, has tons of features and plugins but still lightweight, plays numerous formats and the best, works out-of-the box.

http://www.foobar2000.org/

I also changed from Winamp, when it became adware.

← PreviousPage 2 of 6Next →