News for hackers. Stuff that matters.
Re:Awesome C++ – find the best libraries by babuskov on Friday June 10, 2016 @09:01AM (#11876028)
The best?

Here's the problem I had with my previous game project. JSON writing and parsing. I type "JSON" into your search box and get 20 libraries without much difference explained. 17 of those match my license requirements. And then I have to try each one to compare.

You might say that I could just pick one at random and see if it works... I did exactly that for my previous project. 11 months into development when I had huge chunks of code depending on it, I discovered a subtle bug that only showed up on big JSON files (over 2MB) and only when the library was compiled with MSVC. The author doesn't want to debug it because he doesn't use Windows. I wanted to use use MSVC because of Steam API. So I had to either rewrite the code to use another library or give up on SteamAPI. I picked the latter.

Dumping a list of 20 libraries to solve a single problem isn't "curating".

I suggest you remove "the best" from the title as this site doesn't solve that problem.

Re:Awesome C++ – find the best libraries by mraleman on Friday June 10, 2016 @02:11PM (#11878541)
Not only that, but JSON library perf is hilariously variable.
Re:Awesome C++ – find the best libraries by xixi77 on Friday June 10, 2016 @03:05PM (#11879068)
I feel you, but one problem is that it is often hard to rank libraries best to worst. 20 may be a bit much, but still -- one library may be the most popular, another fastest, another correctly handles this one specific unusual case, another works well with large objects, another has more convenient interface for your case, etc.

What would be ideal is if there was useful information about such things available right on the aggregator site -- Amazon style reviews wouldn't be too useful here tbh, ideally one would like to see multiple comparisons from people like you who tried or at least looked at a few of them.

Re:Awesome C++ – find the best libraries by babuskov on Friday June 10, 2016 @04:47PM (#11879886)
Yes! This is exactly what I expected from the website.
Re:Awesome C++ – find the best libraries by lttlrck on Saturday June 11, 2016 @09:14AM (#11883332)
I use github to figure this out by perusing the issues and history.
Re:Awesome C++ – find the best libraries by vram22 on Friday June 10, 2016 @02:54PM (#11878937)
Your problems, if common enough, suggest a startup opportunity to address this area - on a paid basis. Testing validation / curation of various software libraries and tools for various languages, with comments and ratings about suitability for various purposes, and along different dimensions, such as code quality, performance, docs, etc.

There was a company in a roughly similar area (IIRC) called SpikeSource, co-founded by (?) Kim Polese of Sun and later Marimba. Not checked recently about them.

Re:Awesome C++ – find the best libraries by otabdeveloper1 on Friday June 10, 2016 @09:41AM (#11876241)
> So I had to either rewrite the code to use another library or give up on SteamAPI.

You could have fixed the bug yourself instead. Parsing JSON is not exactly rocket science.

Re:Awesome C++ – find the best libraries by babuskov on Friday June 10, 2016 @11:33AM (#11877085)
I looked at the code... writing my own parser would be faster than fixing it. But that's beside the point. I decided to use a 3rd party library because I did not want to invest my time into that. The moment I had to even look at the source code, that was broken.
Re:Awesome C++ – find the best libraries by fit2rule on Friday June 10, 2016 @01:37PM (#11878208)
Surely thats the 'cost' of using someone elses' work without paying for it/otherwise remunerating the author? Its hardly their fault you found a bug that you decided you couldn't/wouldn't fix ..
Re:Awesome C++ – find the best libraries by babuskov on Friday June 10, 2016 @04:54PM (#11879940)
I'm not blaming the author. I'm just saying that picking a random library is a bad idea.
Re:Awesome C++ – find the best libraries by fit2rule on Saturday June 11, 2016 @01:10PM (#11884246)
But surely, the moment you integrate the random library into your project, you assumed responsibility for it - warts and all? I just can't see the moral authority that you've granted yourself to complain about the library and the effort required to continue to maintain it, when it clearly was of advantage to you to integrate it into your project in the first place .. Don't you think it was a privilege that some stranger wrote code that you used in your project, in spite of the thorns?
Re:Awesome C++ – find the best libraries by babuskov on Sunday June 12, 2016 @04:07AM (#11887179)
> I just can't see the moral authority

You completely took that out of the context. I wrote about it to show how risky it is to pick a random library, not to complain about the author.

> But surely, the moment you integrate the random library into your project, you assumed responsibility for it.

No, you don't. Your only responsibility is your project. If the library is broken, and the original author doesn't want to fix it, it's time to evaluate whether it's easier to remove it, replace it with something else or fix it yourself. You are not obliged to fix it yourself at all. I'm sorry to disappoint you, but the world doesn't work that way.

Re:Awesome C++ – find the best libraries by fit2rule on Sunday June 12, 2016 @05:28AM (#11887362)
Alas, you and I simply disagree. I wager that full responsibility for ones project implies the onus of fixing whatever problems you introduce into the project by importing the external dependency in the first place.

Were you my junior, telling this to me as your project manager, I'd demand you fix the bug. The reason is - we already gained from your decision to advance the project by including the external work, and at the moment you included it in your project you accepted responsibility for the issue. Failing to take responsibility for this code, whether you wrote it or not, would be a major distraction from the task, and thus does not reflect positively on you as a developer...

Re:Awesome C++ – find the best libraries by babuskov on Sunday June 12, 2016 @06:17PM (#11890581)
I'm so glad I'm not your junior then. I prefer to work at companies who actually ship products instead of going around fixing 3rd party bugs.
Re:Awesome C++ – find the best libraries by fit2rule on Monday June 13, 2016 @04:58AM (#11892480)
So you're okay with 3rd-party features, which you willingly import into your project and utilize to make your job easier, but you're not okay with taking responsibility for any bugs in those 3rd-party libraries. Doesn't make any sense. I'm glad you're not my junior, too.
Re:Awesome C++ – find the best libraries by suby on Friday June 10, 2016 @10:58AM (#11876801)
Out of curiosity, what JSON library was that?
Re:Awesome C++ – find the best libraries by babuskov on Friday June 10, 2016 @11:34AM (#11877089)
JsonBox:

https://github.com/anhero/JsonBox

To give some credit to libhunt.com, they don't even list it :)

Re:Awesome C++ – find the best libraries by sirbribri on Friday June 10, 2016 @12:56PM (#11877770)
It's good that you opened up an issue for it, but it also looks like he was waiting for more information from you...

https://github.com/anhero/JsonBox/issues/35

Re:Awesome C++ – find the best libraries by babuskov on Friday June 10, 2016 @04:52PM (#11879920)
As you can see, I gave a link to the problematic .json file. If I were a developer of the library, this would be enough for me. I have made and maintained open source projects (see my bio on HN) and I have often got less to work with (people just explaining the problem without even giving me a data sample).

He was asking me to drill it down and basically debug his program and I simply wasn't interested in doing that.

Re:Awesome C++ – find the best libraries by mtanski on Friday June 10, 2016 @12:08PM (#11877384)
That's not that much different in Java or Scala either. So many libraries that do JSON.