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

I thought the Russian spy whale was a bit sensational so I did take my own editorial license, sorry about that.


I’m not sure the consensus is that WikiLeaks targeted the DNC (it’s not a hacking organization afaik). I believe that Russia targeted literally everyone and released DNC data through WikiLeaks.

Edit: I think OP edited their message.


I started reading this thinking it would talk about LC_ALL/locale related, but not too surprised to see another env variable throwing a wrench in the works.


I used export LC_COLLATE=C export LANG=C to gain several orders of magnitude sorting through 6TB of data by 2 GUID-sized fields. Default collation is terribly slow compared to ascii only.


for context you refer to the fact that

    LC_ALL=C grep string hugefile 
is often magnitudes faster (also works for other shell utilities) - this is due to unicode handling that is either complex due to the nature of unicode or just performances badly on glibc - probably it's the complexity.


Seems analogous to xml parsing in Perl, where I realized a 10x speedup in parsing by switching from a general-purpose XML parser to a set of regular expressions.


https://stackoverflow.com/questions/1732348/regex-match-open...

If you read nothing else, make sure you read the first answer there.


If you want to extract just the values of a single tag or similarly trivial things or the XML is a very restricted set, regexes are just fine for parsing.


You’re not parsing XML at that point. You’re parsing a text based data format that looks superficially like XML. This can work if you strictly control the encoder but it’s not generally interoperable.


Why does general interoperability matter in the context of two devices that you control both interoperating? I mean, if I had written the software on the other end I would've used a different interchange format altogether. But when you constrain the problem down from your software connecting to any and all systems on the internet to your software connecting to a specific system for the purpose of exchanging well-defined messages, you don't need a general-purpose parser with validation. And you end up spending a lot of time validating and analyzing the same message over and over again even though you can guarantee that it's the same message.


Not if your XML contains CDATA sections.


it's really not


If you want to extract strings from XML that arrives in a well-known format that meets certain expectations that may not be rigorous, then regexes can be fine.


Agreed. It's almost as odorous as xmldoc.toString.getBytes--which is definitely a thing some folks do--okay, welcome to encoding problems and busted documents.


Using regex on serialized XML has the potential to go off the rails thanks to the wiiiide variety of ways to express character entities, import docs, use namespaces, escape or not, etc.; consider an event-y/SAX parser for performance if you might run afoul of such issues.


Unless you know exactly the format of the data you're getting back. So in my use case it's not arbitrary XML but rather it's constrained to a particular message with specific fields that are named in a specific way. So it's really a text response that looks like XML rather than being some arbitrary XML message that differs after each response.

We're literally getting the exact same XML message back, but with different text in each field. The framework we were using insisted on parsing each response separately even though the responses were basically the same, but with different values in the exact same XML tags.


If you control precisely the inputs, then it could certainly be fine... until it's not because other thing changed. Please consider it a brittle hack.


Calling it a "brittle hack" implies that I don't have any control over the other endpoint. In reality my employer controls the endpoint I'm hitting. So it's not a brittle hack in our organization even though it would be a brittle hack if we were, say, hitting a Twitter API.

In my opinion it's the same kind of optimization as massaging your data inputs to span cache lines in your MCU to improve performance. By requiring the data to be well-specified in its format you can ignore all of the clues that XML provides about the format of the data, because you can assume the format in advance. So all the stuff like schemas and validation become completely unnecessary because you already know what valid data looks like.


Yup, been bitten by this a number of times. You can't keep it set to C for daily use these days however. Modern things like Python have a bird.


in my experience `LC_CTYPE=en_US.UTF-8` is sufficient for python. not sure if that slows down grep or not.


I was really convinced Palm was going to do something cool when I got my Tapwave Zodiac which had an 8M ATI video card in it, which allowed some decent 3d mobile games to run. I was way wrong, unfortunately. I till love that device though.


Human beings are almost never credible witnesses. We are deceived by the simplest optical illusions.


I disagree. Reasonable people can see and understand things that they know to be unreasonable; like your comment for example.


I agree with you. I think there is a spectrum on which a person can be very reliable and not at all reliable.

I think that when seeing any unknown phenomenon there is nobody who can be 100% reliable. They can be a data point, but that should be the extent of it until more information is available.


Then we probably agree more than disagree in this regard.

What I do know as someone with degrees in mathematics and physics and several years in the USAF, is that some very smart people that I have personally spoken with have seen artificial objects in the sky that move in ways that they cannot explain nor do they have imaginative basis on which to speculate about such performances.


There are lots of incredibly smart people who believe in religion and believe their religion is the only true religion. Nine times out of ten their religion also happens to be the religion they were born into. If that example is too controversial, we can try another. There's plenty of smart people who voted for and still support Donald Trump.


<sigh/>I'll stipulate your point if you agree that Atheism and Trump hatred is your religion. Because hey, you need just enough faith to believe what you believe as I need to believe what I believe.


It really feels like a stretch if you ask me. But since the car is private property, even though it's on a public road, the mark itself is an "action" taken by the police against your property despite not having committed any crime. I'm wondering how many other weird interpretations of this new ruling one could come up with where it would apply to a bunch of other things.


I wonder if they only marked the road, and not the vehicle, if that would be sufficient.


Would a police officer looking at tire tread depth also be considered an illegal search?


Not if they had reason to believe that your tires were worn out. The problem is that your tire is being marked when there is no evidence that you will overstay your parking. Everyone is marked indiscriminately. At least, thats how I understood the description.


Anything in public and in plain sight is considered not a search wrt the 4th. Otherwise, cops could never be eyewitnesses in court.


This is really interesting.

The summary is that chalking a car is similar to attaching a GPS device without a warrant, and it violates fourth amendment rights.

I imagine an easy workaround for this is to just take photos of the license plates with geolocation and have an app that can easily show you who was there ~ 1 hour ago. Probably less efficient initially, but I'm sure they could automate it.


Oh good, so now cities will need to pay a contractor to develop, operate, and maintain some complex hardware/software solution to perform a task that was until now being easily and efficiently performed using a stick of chalk. Because... reasons.

Hmm... I'll have to keep an eye out for the RFPs.


It already exists. It's just too expensive for small municipalities.


> I imagine an easy workaround for this is to just take photos of the license plates with geolocation and have an app that can easily show you who was there ~ 1 hour ago

Lots of towns in Canada have exactly that now - it's a vehicle with a ton of cameras on it that just endlessly drives around, and the system automatically issues a ticket to any vehicle it determines has been in the same place longer than permitted.


I was under the assumption that they've been scanning license plates for a while now. I don't see chalk on tires in LA anymore. Could be wrong.


You are right, I think a lot of places have moved to this, but I think a lot of less resourced places like a town in Michigan don't yet have this technology at the ready.


Those cars exist and honestly they're worse to me than chalking because that data is stored and can be used later in theory where chalking is temporary and leaves no data behind that can be used later. I see where the legal argument stems from and makes sense but this really doesn't protect much and the alternative methods use create so much more potential for abuse!


> can be used later

_Can_ be used later.

Of all people, RMS gave a great talk at Hope XII ("We must legislate to block collection of personal data") about how these legal/technical issues can potentially be navigated.

Now, I'm not saying that cameras are the answer, but it is possible to make the technology work for us and not against us. For example, the license plate readers could be programmed to capture images of the license plates which expire after a certain amount of time, are cycled out if the vehicle is not in its previous location upon the next scan, are only accessible via strict access controls, etc. Of course, in RMS' vision, the software controlling these systems is Free and there would be some way for the citizenry to validate that it's doing what it purports to, the system is running an unmodified version, etc. As a matter of practicality, this is probably a pipe dream but it _is_ possible and his talk has made me reconsider my knee jerk Luddite reaction to technological solutions and I'd highly recommend watching/listening/reading the transcript.


Yeah it's definitely technically possible to create a system which would respect and not violate privacy but but the ones in use today definitely don't and that's the current alternative to chalking. On top of that I have a hard time seeing cities going through the work of designing the system you describe.


Yup they have the photo taking, license plate reading technology in my city of 60,000 (metro 100,000). And now they also enforce the parking restrictions for the full 24 hours on the entire block face. No longer can you drive around the block to move your vehicle and [re]park on the same black face but in a different parking spot.


I like that you and GP like Impossible and dislike Beyond for the same reasons I like Beyond and dislike (too strong of a word, let's just say prefer Beyond) Impossible.

Again, this is why I'm hoping they are both successful.


Interesting take. I've always said Impossible tastes more like meat, but has a bad texture match, and Beyond tastes less like meat but has a better texture.

With that said, I think the flavor and quality of Beyond is higher, for me. Impossible still hovers around low-grade, poor texture ground beef. I want them both to be successful because the more options we have the better.

I think Impossible is likely to be more successful targeting current meat eaters, though, so you may be right about their longer term success.

I've found the variance of each burger to be highly dependent on the preparation, so I think a real fair test would be made-at-home side-by-side. I enjoy the Beyond patty made at home on a skillet without much extra besides a bun and catchup and mustard, this says a lot.

I'm a recent vegetarian (4 years).


Have you tried the Impossible 2.0? It's noticeably better.

I agree that preparation has a huge impact on quality. I once had an Impossible 1.0 that was so badly prepared I ate 1/3 of it and then gave up.

I am wondering if Impossible will come up with a specialized cooker (imagine a waffle press sort of thing, but for burger patties) that will automate temperature management and cook time in order to reduce variability. But I assume their final goal is to just make their substitute cook exactly like real beef.


I’ll have to double check. I had an impossible burger recently but didn’t see the version. It was similar enough to previous ones that it’s safe to assume it was 1.0.


There's definitely a bit of an arms race going on, and it's unfortunate. I find both products to be very different, and we could stand to have some diversity in the area of alternative meat products.

Off the top of my head, in terms of commercial availability I've seen them at:

Beyond: - Safeway (both meat patties, and frozen boxed crumbles) - Del Taco - Carls Jr. - Veggie Grill

Impossible: - Umami Burger - White Castle - Smaller retail locations - pilot w/ Burger King

Beyond also has a lot of products, from sausages, crumbles, and different flavors of meat.

I think Impossible is highly focused on reproducing ground beef.


> There's definitely a bit of an arms race going on, and it's unfortunate.

I don't follow, how is competition bad in this case? Sounds like the opposite to me.


I think they're afraid that one brand will be so much more successful that the other goes away. Each brand has different flavor, texture, and nutritional profiles so if any of those are particularly important to you then it's hard to make do with one of the other options.

For example, both Beyond Meat and Quorn sell meatless "beef" crumbles. Each has a noticeably different flavor and fairly different nutrition (The Quorn has significantly fewer calories, but less protein for example). I would be sad if either one went out of business because I use them differently.


It's still such a niche market that expanding it right now is the best thing for all the players. Beyond Meat revenue is $33m compared to say Tyson at $33b. The veggie meat market is also a lot less homogenic than meats since everyone makes their own proprietary blends from thousands of possible ingredients. Compared to say cheap chicken where it's impossible to tell brands apart.


If they have different flavors that different people prefer then it's probably a safe bet that there will multiple companies that last in the market.


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

Search: