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

This widely circulated claim ignores the fact that math is not science.

I made a silly groovy script called "mommyjson" that doesn't try to preserve JSON formatting but just focuses on giving you the parentage (thus the name) including array indexes, object names, etc., all on the same line, so that when you find something, you know exactly where it is semantically. Not gonna claim that everybody should use it or that it cures insomnia cancer & hangnails, but feel free to borrow it:

https://github.com/zaboople/bin/blob/master/mommyjson.groovy

(btw I would happily upvote a python port, since groovy is not so popular)


This is good! There are a number of these, so it seems like it's definitely somthing people want. The most popular of which I think is gron[0]. My own is jstream[1]. One tiny point of friendly feedback: you may want to consider adding an example usage/output so folks can see what it does literally.

[0] - https://github.com/tomnomnom/gron [1] - https://github.com/ckampfe/jstream


Late reply: Ah thanks

Being a lazy slob, I never saw fit to make a dedicated repo (or even, directory) so I have no place for a readme. After all the whole thing fits in one script.

Gron is a great name and the output looks pretty good... I like the idea of outputting perfectly valid javascript (with semicolons, even...)

Let's see if HN will format this sample output from mommyjson right:

    employees:   [199]   profile:   projects:   [0]   tasks:   [0]   description: Optimized grid-enabled parallelism
    employees:   [199]   profile:   projects:   [0]   tasks:   [0]   taskId: T368
    employees:   [199]   profile:   projects:   [0]   tasks:   [0]   assignedTo: {
    employees:   [199]   profile:   projects:   [0]   tasks:   [0]   assignedTo:   id: E00200
    employees:   [199]   profile:   projects:   [0]   tasks:   [0]   assignedTo:   name: Timothy Mullins
    employees:   [199]   profile:   projects:   [0]   tasks:   [0]   assignedTo:   skills: {
    employees:   [199]   profile:   projects:   [0]   tasks:   [0]   assignedTo:   skills:   primary: C++
    employees:   [199]   profile:   projects:   [0]   tasks:   [0]   assignedTo:   skills:   experience: {
    employees:   [199]   profile:   projects:   [0]   tasks:   [0]   assignedTo:   skills:   experience:   years: 10

do you have an ouput example?



Okay are we just saying they just discontinued one electric F150 in favor of another? Meh.

Edit: Oh, an EREV is fancy way to say "hybrid" ok


>Oh, an EREV is fancy way to say "hybrid" ok

Kind of. EREVs are what locomotives have been doing for a century (and to a lesser extent barges), which is called diesel-electric in that field. I agree the terminology is lacking, but EREVs are quite compelling (and their high market share in China supports consumer demand).

Hybrid: * ICE must run during regular operation (except for ~very short distances at ~very slow speeds) -- this increases operational costs (oil changes, economy, engine designed for torque and wide RPM range). * Complex drivetrain with wheels moved by electric motors and ICE, axles, etc. * Generally 10-40 miles of EV range

EREV: * Basically an EV with a short range, and whenever you want to charge the battery on the go (or use the waste heat from the ICE) it can use an efficient (Atkinson cycle) engine to do so. (Though american EREVs have used poorly suited engines for parts availability and enormous towing numbers) * Generally 50-200 miles of EV range * Think "EV for daily commute; ICE for road trips (and heating)"

IMO EREVs would've been a better development path than hybrids or pure EVs.[0] Immediately lower TCO in various interest rate environments via highly-flexible battery sizes, no cold or range anxiety issues, technically simple drive train and BTMS.

[0] I mean the Prius made a lot of technical strides given the battery technology/costs and familiarity the industry had with ICE at time. Tesla went full EV which is a very optimistic approach, and works well enough if you stick around the charging network, but the batteries are still expensive and heavy compared to a small ICE + tank.


I agree EREVs make a lot of sense, electric first but not requiring a full commitment, especially for a truck that sometimes has to do things like towing.

https://insideevs.com/news/777407/scout-motors-erev-reservas...

I'm sure this wasn't lost on Ford, 80% of Scout reservations come with the EREV and only 20% BEV.

Maybe one day they will have enough volume in the segment to justify making the pure BEV version again but with parts sharing with the EREV. An advantage to EREV design is that if done smartly you can offer the same vehicle stripped down and BOOM you have a BEV too.


The problem with EREVs is they are more complex than a BEV. More parts to go wrong, to purchase, and ultimately a (potentially) higher price.

The reason to do EREVs for a manufacture is, IMO, primarily because they can't get a hold of batteries for a cheap enough price. And I think that's the weakness of the way Ford has attacked EVs. They haven't (AFAIK) really built out battery plants. As a result, they are at the whims of their supplier for their battery packs.

For a truck like the F150, that's a large pack requirement that probably ultimately likely killed their margins.

Edit OK, they've been working on a plant for the last 5 years, but it looks like they've done almost nothing. Like, literally just have some support structs up.


Studies have shown that hybrids are more reliable than ICE vehicles - it turns out that using EV mode of the time and ICE less often increases reliability. No reason an EREV shouldn’t be even better.


One factory was done, and already producing EV batteries. They're converting it to fixed energy storage:

https://www.wdrb.com/news/business/all-1-600-kentucky-batter...


Even if batteries were very cheap, you run into scaling issues where your battery pack ends up very heavy, so then you're using increasingly more energy to lug your heavier battery back around for everything that isn't long-range towing.


Are they really much more complicated than a hybrid? Think RAV4 Hybrid. I’d much prefer a fully electric drivetrain with an electric generator to the joyless CVT.


EREV is different from diesel-electric in that the EREV has a large battery whereas the diesel-electric locomotive does not. But the "ICE engine drives a generator which drives a motor" philosophy is similar in spirit.


Yes true; good point. I think this is changing (e.g. regen braking for aux. power on passenger trains maybe eventually capacitors for traction drives in the future), but currently and ~almost all the time, this is correct and a good point.


I think the term of art in the automotive space so far has been "series hybrid". But like you said, the differentiation here may just be the size of the battery. Series hybrids are still predominantly driven by fossil fuels, even if the drive is an EV drivetrain, due to the battery mainly acting as an energy buffer.

The absolute sweet spot, as someone from a country with long long distances, is a plugin series hybrid that has ~150-300km EV range and a ~60 litre fuel tank. That's getting me to work entirely electric, and then once a month when I need to see family I can chew down the fossil fuels.


Yeah, the difference is the Powerboost hybrid electric motor is only like 50 hp. I want 350 hp of electric motor that can be powered by either the battery or an onboard ICE.


I wonder about the specs though.

I recall the bmw serial hybrid was called a range extender, because the gas motor couldn't actually put out enough energy to drive the vehicle on the freeway.

So basically it was an EV with a small +xx mile extra range from the gas engine.

so no "ice for road trips", more like "ice for an additional +xx miles" then you need to recharge.

In comparison the chevy volt had a better hybrid design (not a serial hybrid) and you could drive it on gasoline only.


The i3 was bad, but Ford is planning long range towing with the EREV so it should be fine.


is there any good comparison of Hybrid vs EREV efficiency (when main battery is depleted), even with Atkinson cycle ICE for EREV? my understanding was that the main reason for all this complexity in Hybrids was due direct-to-wheel power transfer efficiency, while in EREV there's efficiency loss when converting ICE output to electric current...


Looking to the Chinese market is insightful, IMO. There's one platform for a luxury sedan, and it gets ~200mi on EV mode (~100MPGe) and then ~400mi on gas. It works out to about 70mpg purely on gas. I'm not sure how it's so high, but I'm guessing a combination of low drag (Cd), efficient small turbocharged engine (you really only need enough power maintain high speed, not accelerate up to it), and lots of regen braking.

BYD and Geely have similar systems. Their ICE are around 47% thermal efficiency so like ~double what you'd expect in a pure ICE car + regen and other bonuses.

https://carnewschina.com/2025/08/02/im-motors-launches-stell...


I guess you’d call my Chrysler Pacifica an “EREV” then.

It’s honestly perfect for us. 32 miles on a charge, we barely touch the gas except for the winter when it’s so cold out we need the engine to warm us up. Any other time and the battery is all we need, and it charges overnight on a simple 110V wall outlet. Long trips are still possible, you just drive. We go through maybe 8 tanks of gas per year with our occasional long trips (compared to having to stop at a charging station for an hour, I’ll take it.)


There have been no EREVs produced and sold yet AFAIK (though maybe BMW had a version of the i3 that did? I'm not sure). Dodge has one in the works. Ford has now announced one. The old Chevy Volt was philosophically wanting to be an EREV but was as a practical matter still a parallel hybrid.


The Volt was only "parallel" when running from gas. It was still serial in that when running from battery it only ran from battery, then switched to gas generating electricity, with some mechanical assisted torque in edge cases (usually only past highway speeds or "mountain climbing").

That was mostly because the electrical conversion from a gas generator is still so relatively inefficient and slow compared to a modern battery. The mechanical efficiency of gas engines is relatively better (which is why ICE has survived as a category for so long). Batteries are far more efficient at delivering high power on demand as needed for torque than a gas generator.

Any EREV is going to have that problem and experience those trade offs. It's a unfortunately defining part of the category. It's also why Chevy has said there's no real future in EREV power trains because they are a worst of both worlds situation with too many unfortunate trade offs to consider, such as needing to be parallel in gas-only operation edge cases to make torque requirements.


That version of the i3 definitely is one. Though the way it limits the gas tank and won't let you control it manually in the US for tax purposes sucks.


No. The ICE isn't connected to the drivetrain in an EREV; it's only used to provide power to the EV drive system.

The Pacifica is what you'd call a plug-in hybrid (PHEV) because the ICE is still connected to the drivetrain.


I get that a hybrid is attractive because of the flexibility, but still the change is a strange decision. EVs are simpler to maintain than ICEs, but a hybrid is more complex, it adds the possible EV problems atop possible ICE problems.

Maybe keep the trucks as much they are now, just the essential changes to replace the engine? There's plenty of space on those huge trucks.


I think it's still simpler, actually. IME the most complicated part of an ICE vehicle is the power delivery system. Transmissions are nightmares to work on. Making that all-electric and just using an engine to generate power significantly simplifies the system. I'm not a mechanic though, so take my word with a grain of salt.


My understanding is that going to hybrid actually allowed Toyota to significantly simplify their transmissions relative to ICE vehicles, even without going full EV.


The planetary gear "eCVT" systems that Toyota and Ford use in many models are mechanically a lot simpler than a traditional automatic or sequential manual transmission. Few moving parts and no clutches at all. I don't know what the long term reliability of those drivetrains is is but I wouldn't be surprised if it's measurably measurably better than a traditional transmission + engine. There's a long educational video from Weber State University that gives a good walkthrough of what's going on in those things.

https://www.youtube.com/watch?v=O61WihMRdjM


It turns out that it reduces possible ICE problems since you use the engine less often while the electric powertrain doesn’t add enough new problems to matter, so the result is an improvement in reliability.


The biggest loss in the EREV in my opinion will be (I assume) the frunk. That has turned out very handy on multiple occasions.


The difference is what is actually powering the wheel. Hybrid is still primarily ICE. EREV is electric motors (with the ICE just charging the batteries).

I literally couldn’t think of a better truck than an EREV. Give me an ICE engine that can haul my trailer into the boondocks knowing I just need a gas station nearby, but can power my trailer off the battery.


Kafka is really not intended to improve on this. Instead, it's intended for very high-volume ETL processing, where a classical message queue delivering records would spend too much time on locking. Kafka is hot-rodding the message queue design and removing guard rails to get more messages thru faster.

Generally I say, "Message queues are for tasks, Kafka is for data." But in the latter case, if your data volume is not huge, a message queue for async ETL will do just fine and give better guarantees as FIFO goes.

In essence, Kafka is a very specialized version of much more general-purpose message queues, which should be your default starting point. It's similar to replacing a SQL RDBMS with some kind of special NoSQL system - if you need it, okay, but otherwise the general-purpose default is usually the better option.


Of course this is not the same as Kafka, but the comment I'm replying to:

    > Ah yes, and every consumer should just do this in a while (true) loop as producers write to it. Very efficient and simple with no possibility of lock contention or hot spots. Genius, really.
Seemed to imply that it's not possible to build a high performance pub/sub system using a simple SQL select. I do not think that is true and it is in fact fairly easy to build a high performance pub/sub system with a simple SQL select. Clearly, this design as proposed is not the same as Kafka.


No, I implied that implementing pub/sub with just a select statement is silly because it is. Your implementation accounts for the downfalls of this approach with smart design using a message queue and intelligent locking semantics. Parent of my comment was glib and included none of this.


> it’s why Subway sandwiches are so soggy

I have NEVER had any such problem. Subway puts what you want on the sandwich. You tell them directly. You watch them make it. If you ask for soggy things on your sandwich, it will be soggy.

I do not ask for soggy things on my sandwich. That is why I have never eaten a soggy subway sandwich, EVER.

I did have a fairly loud argument with one - only one - of their sandwich artists ONCE, who refused to microwave the bacon (add bacon to any sandwich for $0.50) before putting it on sandwich, per STANDARD SUBWAY PRACTICE. I finally walked out on the dirty bastard, but I did not file a formal complaint with Subway mgmt. I am a busy person. Maybe next time. Perhaps the sandwich would've also been soggy, had I agreed to uncooked bacon, which I will NEVER do, but I don't know why that would make it soggier.

But I digress: Soggy sandwiches have specific reasons. Wanting a cheaper sandwich is not one of them. Bacon will make your sandwich slightly crispier, if that helps. It also tastes EXCELLENT.

EDIT: To be clear, it is important to be SPECIFIC about how much of something you want. The average sandwich artist has a tendency to dump the contents of an entire bottle of a given condiment on your sandwich, which I admit, could cause sogginess. This is because they think they are doing you a favor. I often use bold & dramatic hand gestures while bent over slightly, face pressed against the glass enclosure of the sandwich-making zone. "STOP! RIGHT THERE!" I will yell, several times, if necessary. Then again, I assume everyone knows this. Or else now you do.


> The average sandwich artist has a tendency to dump the contents of an entire bottle of a given condiment on your sandwich, which I admit, could cause sogginess. This is because they think they are doing you a favor. I often use bold & dramatic hand gestures while bent over slightly, face pressed against the glass enclosure of the sandwich-making zone. "STOP! RIGHT THERE!" I will yell, several times, if necessary. Then again, I assume everyone knows this. Or else now you do.

This is mediated by culture and/or region and/or personal taste. I generally find that they default to fairly reasonable amounts and that their notion of "a little" or "a lot" of a sauce etc. matches mine well enough that I can make it work. The much bigger communication problem is getting them to stop assuming you want lettuce and tomato without being asked.

IMX, soggy sandwiches happen mainly because either the sauce wasn't applied neatly, or because (as you say) there are soggy things on it (the lettuce often has water on it, and condiment sauces add up, not to mention the marinara on pizza/meatball type subs).


> I often use bold & dramatic hand gestures while bent over slightly, face pressed against the glass enclosure of the sandwich-making zone. "STOP! RIGHT THERE!" I will yell, several times, if necessary.

God, Poe's law really gets me sometimes.


Since the author brought up Nazi Germany... they did it too, same Great Depression. It's how they restarted factories and secretly rearmed.

https://en.wikipedia.org/wiki/Mefo_bills


> Because his first experience with this debate was forcing PHP on engineers who knew that would be a bad choice

Ummm... No, I think it was about forcing Perl on engineers who had been using PHP.


Slaves that cannot die.

There is no escape.


i have no mouth and i must scream


Also, docker.io is rate-limited, so if your organization experiences enough growth you will start seeing build failures on a regular basis.

Also, quay.io - another image hoster, from red hat - has been read-only all day today.

If you're going to have docker/container image dependencies it's best to establish a solid hosting solution instead of riding whatever bus shows up


Rate limits are primarily applied to unauthenticated users, open source projects and business accounts have none/much higher tresholds


based on the solution, it seems like it is quite straightforward to switchover


Still, if every automobile owner instead had a horse, would methane emissions due to horse-farting worsen modern climate change or improve it?

- Keeping in mind that your horse farts even you're not travelling

- And that methane is a good deal worse as a greenhouse gas than CO2


Doubtful:

1: Methane leaves the atmosphere a lot faster than Co2

2: The methane is a result of breaking down food where the carbon was captured from the air by the plants that were the source of the food.

3: (And I'll let you figure out the numbers) You need to calculate the methane to Co2 ratio of the expected release of methane vs Co2. I suspect there is significantly less methane released than (equivalent) Co2 from cars.

That being said, who wants to go back to horses? I don't.


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

Search: