Hacker Newsnew | past | comments | ask | show | jobs | submit | bkjsbkjdnf's commentslogin

> You know what you get with C and it just works as you expect always.

Every language works just as you expect if you have the right expectations.


There are regex libraries for C. Worst argument so far.


>There are regex libraries for C

Which everybody here knows and nobody doubted. So, a big duh!

What the parent means is with Python you don't need to go and install one, adjust your makefiles, etc. Regex are right there in the standard library, and things that are not are immediately usable in just a "pip install" away.


Exactly. The biggest problem I have is just finding appropriate libraries. With PyPI I know where they are, how to get them and which one is popular. With C, I'm completely lost. I use PlatformIO's manager, but it's limited to embedded libraries, so I just don't know where to find things at all.


Its not just finding the libraries, its also marrying the makefiles.


With Linux that's trivial to know.


...google


Sure, and to get that Python requires a big runtime to be present wherever it goes. Trade-off.


apt-get install Done!

Do people actually use pip when you can just use the package manager of your distro?


I would upvote this if it weren't for the second sentence.


I think it's a bad thing that hacker news is so allergic to strong editorialization.


I do not. There is enough of it elsewhere on the web, it's nice to be somewhere relatively free of it for a change.

The conversations that occur here generally seem much more structured.


I agree that they are more structured, but I don't see any evidence that this is in any way due to how immediately people are attacked for wording things strongly.

Engineering is a life and death business more often than people think; it deserves people who feel strongly about it.

As an aside, I think the rules about trolling and personal attacks are pretty clear and easy to enforce. What I'm specifically concerned about is that those rules are evoked outside of the spirit in which they were created to attack emphasis in general. In fact, most of the discussion here is in clear violation of "Please avoid introducing classic flamewar topics unless you have something genuinely new to say about them." but obviously we rightly care a lot about this topic and, since people are acting like adults, no one needs to tap on the poster so to speak.


It looks like we agree that attacks are not helpful, but freedom of expression can be.

I appreciate that the majority of people in this forum express their opinions in a highly productive manner void of animosity, as you've just demonstrated. The previous's user's remark "Worst argument so far." did not convey this spirit. Whether intentionally or not, antipathy and pure negativity do not bring out the best of people in online forums. It is my hope that those are two things which this community seeks to discourage, but not all freedom of expression. This is how I interpreted the comment which sparked your initial response.


If you spend 3x the time writing equivalent code in C as you do in C++ you're either a bad C programmer, a bad C++ programmer, or likely, both.


Concatenate two strings with resource management in C then C++ and see which is easier.


This is a relatively trivial thing in either - depending on how you define "with resource management." I understand completely that people want to translate patterns directly across languages, but since "string manipulation with resource management" as a delta-detail going from 'C' to say, Python was a design goal, it's somewhat specious.


It's not trivial in C, it's a pain is what it is. I'd put it another way: if someone can't write C++ 3x faster than C they're not a very good C++ programmer. Maybe they're writing C with classes.


You just won't get agreement from me here - string manipulation in 'C' is quite easy. Concatenation operators and the like mostly get in the way. This has nothing to do with design approaches. The str() suite from the standard library is very easy to use safely, if you're careful in your constraints. You do have to think "this is a buffer" and behave accordingly. The resulting code is pretty tedious, but there's no way it takes 3x as long.

Throw in the level of control with sprintf() and there's a pretty clear win.

What is easier with C++ ( and most scripting languages ) are things like combinators and regexp.


The CVE database shows how easy it is to use correctly, bah.


Warts like no guaranteed NUL termination for strncpy and strncat if the buffer length is reached are especially fun to contend with in code reviews.

As is *cat being O(N) with respect to destination length.

So easy that there's been constant flamewars over nonstandard alternatives such as strlcpy, strcpy_s... https://news.ycombinator.com/item?id=6940368


I actually can't picture a universe in which there'd be a clear win manipulating strings in C. If you believe that and have done string manipulation in other languages, then you're a very different person from me and nothing I can say or do will change your mind. We'll have to agree to disagree.


The main issue I had while using NixOS is that it has a small and somewhat broken set of packages. This is compounded by the very incomplete Nix documentation - its way too hard to create new packages.


> its way too hard to create new packages

Perhaps it is hard to discover how to, but I was about to post here and say one of the best things about nix is how easy it is to hack and add packages. It does require a bit of learning about how it works, but once you do the whole system is quite understandable. It's also very easy to test out things locally, overriding and extending the nix package collection. It is fairly straightforward to set up, build and install your own local projects as nix packages. Even I -- a mere web developer, who mostly uses OS X -- got a package definition merged into the main repository, it was that simple.

One series of blog posts that is good in this regard is the Nix pill series: http://lethalman.blogspot.com/2014/07/nix-pill-1-why-you-sho...


I agree the documentation needs work. It can be a real exercise in institutional knowledge sometimes to piece things together. I'd love to help you package something new, or fix an existing package if you would like. The thing that kept me going is how easy it was to fix ... after learning the incantations.

I think the project as a whole would welcome suggestions on where to improve docs as well, and would _definitely_ appreciate some new docs being written. It is hard to do this once you're too familiar :(.


I don't use NixOS, but would raising documentation bugs the same way you raise bugs against code help?


I would imagine so :)


but you get the benefit of having you package on OS X, BSD and most Linuxes (except Android) too.


The real key to getting really good rest is some good kush.


> We know how to build secure RNGs in software.

What secure RNGs do we have that don't require an entropy source?


We have plenty of entropy sources. The only situation where we have a problem with that is the so-called early-boot-time-entropy. However hardware RNGs don't solve that either, because, well, they need some kind of initialized OS to access the hardware in order to work.


Are you trying to make a point?


This is just a worthless advertisement.


> So if you use this to commute for two weeks you're paying 10 dollars flat for a cab ride that you share and will take longer than normal because of the overhead of splitting the ride.

So, you take a ride to work and then you teleport back to your origin?


Hah. yes fixed.


> I'm an ENTP

top bantz


> I mean, personally I feel a lot safer managing my own data privacy with what I give these companies, rather than having a government do it for me

What a fallacious statement. How is government oversight of these companies going to prevent you from applying your own magical 'data privacy management' spells?


"How is government oversight of these companies going to prevent you from applying your own magical 'data privacy management' spells?"

That depends on what is being overseen by the government.

I have no issue with EU-style or Canadian-style privacy regs for PII. I think that encourages local innovation by ensuring data can stay within a legal geographical territory.

Where I take issue is "AI is scary, please stop these companies from doing things" and by implication thinking that a government (a) is an organization I trust more than the company with what should be done with my data (a massive leap), or (b) provides value by preventing/limiting that organization from offering a services I want based on AI because non-customers somehow think it's scary or might lead to some nebulous monopoly power.

I'm not saying no government oversight is every warranted ever, I'm saying that there's a lot of fear-based desire in this thread for "government save us from Zuck!!" which isn't helpful when people don't even know what specific regulation they're looking for and what the systemic consequences of that would be.


> Where I take issue is "AI is scary, please stop these companies from doing things"

That's my issue with people like Elon Musk & Sam Altman starting OpenAI, where "Many of the employees and board members are motivated by concerns about existential risk from artificial general intelligence."[1] and also people like Stephen Hawking raising concern about AI of the "Skynet is coming, panic!" style, (he also warned not to respond to aliens a few days ago), it just seems like a lot of the rhetoric is about a state of AI we're most likely 500+ years away from, while it may actually slow down useful research that will lead us there faster...

1 - https://en.wikipedia.org/wiki/OpenAI


> That depends on what is being overseen by the government.

You must have had something in mind when you generated that bit of fallacious rhetoric.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: