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

Once it ends, we will buy more GPUs because any small website will want its own.

I know that as soon as I can output 100req/s on the cheap on a llama-level model I will put it EVERYWHERE. And my clients too.

DMCA handling? Content flagging alerts? Fuzzy categorization? Natural UI for end user complex queries?

All LLM baby.

And much, much more.


Swift won't be able to compete with rust until it has a great scripting story.

Rust is currently the defactor choice if you want to make something with js/python bindings, of id you want to speed up a dynamic bottleneck because it makes it super easy.

Swift doesn't even have a good ffi.


Swift can import C (and C++) modules directly, and it's fairly straightforward to wrap existing C APIs with callbacks to be usable from structured concurrency. Here's an example I just worked on. [1]

[1] https://github.com/PADL/NetLinkSwift


This is not what holding swift.

What's holding swift is not having a good story to call a swift compiled extension from Python/JS/Ruby/PHP.

Python's community is huge, very active, Python is everywhere, and it needs compiled extensions. And tooling to make them BFF, like pyo3 and maturin, is great

And that's how we got cryptography, pydantic core, polar... Which motives even tooling to be written in rust as a side effect, and how we have uv and ruff.

The scripting community is the most active, if you got them on your side, you get access to a huge pool of devs.


I'm not sure scripting-language interop is holding back Swift, but ...

> call a swift compiled extension from Python/JS/Ruby/PHP

The story there is excellent.

Here's a Swift function callable from C

    @cdecl("myfunc")
    public static func f(){...}
C/C++ types are mostly handled automatically (including sharing memory management), but it can be tricky.

To build a library to load and call from any language:

    swiftc mine.swift -emit-library -o libmine.dylib 
E.g., calling from java 22 FFI:

https://foojay.io/today/java-panama-polyglot-swift-part-2/

But most people instead use a slower json server network interface because (sadly) json is the lingua franca for scripting and Swift Codable makes it trivial to map the json to a swift type.


What Python needs is to catch up to SELF, Smalltalk, Common Lisp, and either embrace PyPy, or finally get a mature JIT into CPython.

Thankfully, Facebook and Microsoft are making it happen.


Yes, but it's a completely unrelated matter: even with a JIT you'll want compiled extensions since you can't beat hand crafted SIMD for the scientific stacks or machine learning.


Ever heard of intrinsics?

Maybe spend some time reading about other JIT languages expose SIMD to developers, without requiring folks to go down to C.

Which incidentally is what all those Python DSLs for GPGPU APIs also do, with the caveat of not being that useful for general purpose programming outside machine learning algorithms.


Try to make Rust interop with C++, C and Objective-C as easy as Swift does it.


This is a big deal. In reality, most of the code that powers your systems (phones, tablets, any computers) is built using C and C++, regardless what OS you use.


Agreed, and rust-c interop is as good as any other I've used. The c++ interop was clunky but getting much better with crates like zngur. That is what was holding back its use on chrome for a while. Oddly its python interop is way better with pyo3 and maturin making it super easy.


C++ is (IME) an order of magnitude more annoying from Rust than C or Objective-C. I've dealt with interop of the latter two on a number of projects and frankly found them to be fine.

(Though I wouldn't fault anyone for making an argument that Swift is still more ergonomic here)


swift-wasm exists


Most rubists like the optional parenthesis, but I suspect must devs don't.


Add functools to the list. Espacially functools.wraps() and functools.partial().

The stdlib is full of goodies.

Now I always appreciated the battery included logic in python. But I noticed this week that LLM diminish that need. It's so easy to prompt for small utilities and saves you from using entire libraries for a few tools.

And the AI can create doc and tests for them as quickly.

So while I was really enthusiastic things like pairwise() were added to itertools, it's not as revolutionary as before.


If you’re saying that LLMs trade idiomatic tools for ease-of-boilerplate-generation, shouldn’t that be a point against them, not in their favor?

Pardon the hyperbole but it’s a bit like lauding an IDE for automatically generating thousands of Java class stubs.


For decades you had the famous itertools recipes taunting you in the doc: https://docs.python.org/3/library/itertools.html#itertools-r...

They were super useful, but not included in the stdlib, despite being a few lines long.

We also had more-itertools, bolton, and others, to bridge that gap.

Now, there was always a tension between adding more stuff to the stdlib, or letting 3rd party libs handle it. Remember the saying: the stdlib is where projects go to die.

And of course tensions about installing full on 3rd party libs just for a few functions.

The result is that many people copy/pasted a lot of small utilities, and endless debates on python-ideas to include some more.

I think this is going to slow down. Now if you want "def first_true(iterable, default=False, predicate=None)", you ask chatgpt, and you don't care.

The cost of adding those into the project is negligeable.

It's nowhere near generating thousand of class stubs. It's actually the opposite: very targetted, specific code needs being filled instead of haunting python debates or your venv.

But to stimulate a bit your anxiety, I do think code gen is going also making a big comeback with LLM :)


Agreed, rewriting standard functions is much worse than using standard tools that already exist.

In addition to the extra boilerplate and reduced readability, that also sounds like an easy way to introduce subtle bugs. Standard library functions have been exhaustively field tested, a similar looking LLM generated function could easily include a footgun.


Sure, but have you tried to introduce a new standard tool in the stdlib?

It's not a fun process.

Writing the code is the easy part.

And installing more-itertools for one functions is a bit silly


I wish there were some syntactic sugar for partial but knowing how patterns like that get abused in other languages maybe it is for the better that there isn't.


What would it look like? Wouldn't it just be lambda?


Yes, sugar so instead of having `partial(foo, w=1, x=2)` or `lambda y,z: foo(1,2,y,z)` just instead something like `foo(1,2,_,_)`


I wish it would at least be a method on any callable.


And itertools!


Checkout shiv for turning even more zipapp goodness: https://shiv.readthedocs.io/en/latest/


shiv has two things over zipapp:

A bootstrap boilerplate that allows the shiv to be able to run as an interpreter. I think zipapp can only be given code.interact as main.

Unpacking wheels into ~/.shiv, which might be faster. I can’t remember if this permits running compiled C, which is not possible from within a zipapp.


- There are cheaper alternatives to both the razors the author is showing.

- You don't need to shave every day, especially with 2024 social norms, you choose to.

- Nobody forces you to use a disposable razor. You can use a straight razor. You can use an electric shaver. I use both. But it turns out disposable razors saves your from cuts and learning technics and people want that.

- So you really pay £40/year (which is not huge) for the convenience of a disposable razor, and not even the cheap ones. And the fact you want to shave every day.

That reads like an Ad, except I don't know what OP is selling.


It turns out, properly engineered and precision machined safety razors saves you nicks and cuts and is a better shave than disposable or electric shavers. These razors angle the cutting edge at a certain angle, and has very little jiggle. You can still nick yourself applying too much pressure or slicing sideways.

You pay for it, of course, in the initial investment.

The author went on to list other examples, such as Kureig pods. Maybe he is trying to unsell some things.


> It turns out, properly engineered and precision machined safety razors saves you nicks and cuts and is a better shave than disposable or electric shavers.

Best in class (and should be multiples more expensive IMO): hensonshaving.com


That was what I got but I didn’t want to turn it into an ad or cult, even though their product makes it easy to do so.

The way I think of it is that, unless I lose mine’s, it is easily something that can be passed down as an heirloom or legacy for my kids (though I would probably outfit them with their own when they need it). There are not many things made like that anymore.


Got one, but I find Merkur handles (a more established make) to be better. That's not to say that Merkur will be better than Henson for everyone, but it's not reasonable to say that Henson is best in class.


Can you explain? I assume the blades become blunt over time, how does it work?

Also, the ones I use have some sort of green line on it which releases something that makes the shaving more pleasant. When that runs out, the shaving is less pleasant.

And since we are there, I'm in the market for an aftershave that smells great to my wife (mild, not strong) and that is not painful to put on/ok for sensitive skin. Really hard to shop for these things online and even in shop, one has to smell them.


Henson is a safety razor, so the razor are disposable after about 4 - 5 uses (sometimes shorter). These razor blades do not come in a cartridge, they don't make their own blades, and encourage you to try different blades from different manufacturers. They are much cheaper because there is no cartridge, and all safety razors come in the same dimensions and cutout, making them interchangeable. You are not locked-in to a specific vendor.

The Henson handle itself is engineered so that the razor is bent to a precise angle that the designers determined to be the easiest to use by beginners. There are protrusions so that when you seat the razor, it does not jiggle (which is the opposite of what many disposable razors are advertising now). The handle is screwed in so that when you tighten it all the way, it produces that angle. This is all possible because the manufacturer is a custom, high-precision manufacturer of aluminum and titanium aerospace parts, and I guess some of the engineers got tired of the shavers they were using. They used a medical imagining device to measure how much of a difference this design makes (by detecting inflammation on the cheeks after using their device and other designs). The handle is what you pay into, and the inexpensive razor blades is how you recoup your initial investment relative to disposable razors.

Henson has a bunch of public youtube videos out there to explain (and market) this. Like anything, not everyone will like what they use. This works well for me. They are also unisex, so my wife also uses it. Whether they work well for you is another thing.


I use feather double edge safety razor blades and swear I get cut by looking at them. Always on my hands though so I try not to touch them using a wash cloth and toss them after 3 shaves.


Get a sampler pack of blades and see what suits your face best. No point in paying a premium for Feathers if they don't work for you. For me, Feather and Derby work well, while makes like Astra scrape a bit.


If you get cut, you might use a bad handle.

Since I have switched to Feather DE blades, I do not even bother anymore to use shaving cream or foam. The blades are so sharp that even dry shaving works fine.

When I used disposable razors, the frequency of cuts was orders of magnitude higher than with Feather DE blades.

However I use a relatively expensive adjustable razor handle, and it must be set to certain gradations, to ensure that the blades do not happen to cut the skin.


You can make "disposable" razors last a very long time by rubbing them on a piece of old denim in between shaves. Most of the wear on razors comes from oxidation from air and water vs. cutting hair. I believe doing this helps remove the oxidated spots. This means I can make a pack of them last 12-18 months, and I only need a new razor when the plastic/silicone housing and pads break.

Reading the other comments I should still probably invest in a more permanent razor though.


or just keep them in mineral oil between uses


> - You don't need to shave every day, especially with 2024 social norms, you choose to.

Regarding 2024 social norms: the world is a big place and not everyone lives in the US or Western Europe.

Also, people have extremely different beard growth rates. I'm in my 30s and believe I personally still haven't met a man whose facial hair grows quicker than mine does. I can shave in the morning and by 6PM it no longer looks clean whatsoever. Yet there's many men who can't grow one even if they'd like to.

> But it turns out disposable razors saves your from cuts and learning technics and people want that.

They're also useful for those with disabilities or other issues that make it difficult to use a straight razor. I'd love to use one but have tremors if I hold my hands/arms in certain positions, rendering it unfeasable. We're definitely a small minority though, for most I'd recommend the straight razor.


As someone not living in the western world, beards are even more prevalent here than in the US.


As someone else not living in the western world, beards may as well be extinct here outside of the creative industries (arts, fashion, music).


>You don't need to shave every day, especially with 2024 social norms, you choose to.

different people have vastly different shaving needs, you can't put everybody in the same box like that. learn to be curious about other people's experiences, and their reasons, you can choose to too!


Many takes in this thread are people not realizing this and having a really narrow view of what people are shaving, and why, and what might or might not work for them--inappropriately generalizing their own constraints and desires to others.


I am curious what the needs would be with regards to shaving?

It really does seem more like a personal choice, social norm dependent topic, like fashion or makeup.

Is there someone who need to shave fully for non cosmetic reasons?


>I am curious what the needs would be with regards to shaving?

thickness of individual hairs. density of follicles per unit area. hair growth rate. color of hair. do you get a 5-o'clock shadow? how about a noon shadow? how about just a 3 day dusting if you look close enough? do the people hiring you already consider you swarthy? does your neck break out in razor burn if you shave too close, putting you a day behind from the get go?

>really does seem more like a personal choice, social norm dependent topic

social norms are not personal choices, and what you call curious is what I call obtuse, but that's personal preference (based on norms I've observed). Two words for you to carry away from this, son: pseudofolliculitis barbae https://en.wikipedia.org/wiki/Pseudofolliculitis_barbae


Social norms don't need to 100% dictate one's behavior, but I agree that they are real and are important.


>Is there someone who need to shave fully for non cosmetic reasons?

Firefighters.


Army, air force, but not navy.


I don't get a seal on my respirator if I grow my beard out.


Military?


Shaving is a hassle. If people insist that its part of their life, its their choice and thus largely their own responsibility.


Going against social norms often comes at a cost. Many people have enough other things going against them that they need to get whatever small advantages they can.


I'm not sure that anyone is suggesting that it isn't their own responsibility. No one is saying that someone else should have to shave them or something.


Showering is also a hassle. How far do you want to take this logic?


That is still your responsibility. I did not go farther than that.


>You don't need to shave every day, especially with 2024 social norms, you choose to.

Only if you're a software engineer at a company with no dress code. Many professions you simply MUST shave every day (ex. military, firefighter). Even the first company I worked as a software engineer for in 2005 required men to be clean shaven for work. In 2024 the New York Yankees STILL require their players to be clean shaven on the field.[1]

Beyond that, facial hair growth rate is highly variable.

[1] https://en.wikipedia.org/wiki/New_York_Yankees_appearance_po...


Indeed. You could buy https://www.tesco.com/groceries/en-GB/products/251618381, for instance, which is a perfectly good razor and costs 70p per unit. Assuming one lasts you a week, that's £36 per year. Many people could make one last at least a fortnight, which brings the cost down to £18 per year.

Is it worth £8 per year to save the hassle of dealing with a classic double-edged razor? Yes, of course it is. This is a very strange thing to get upset about.


I have a Dorco that I've used for years along with a double edge. The Dorco cartridges are pretty cheap and the double edge was used.

Also, yes, you probably do not have to shave everyday these days. I can get by with 2-3 a week if that and still not look messy. Even if I did I feel the Dorco with the double edge is not that expensive.


> That reads like an Ad, except I don't know what OP is selling.

I'm not sure they are selling anything, just hunting for clicks on the affiliate link at the bottom of the article maybe?


It's not more used because of c extensions, mostly.

If you have a long running process with a lot of pure python code, you can get a lot of perf boost.

Be aware memory consumptuon will go up significantly.


One could create it using zeroconf but i'v yet to see one software do that.


That wold require automating reproductibility or requestin and analysing datasets that are not provided.


Sounds like a plan. I think the ERROR project is doing exactly that.

https://www.nature.com/articles/d41586-024-02681-2 (posted here two days ago)


1) they could in theory be provided 2) not necessarily: it's a matter of authority, that when ceases to exist, it ripples

Edit: to an extent it applies to journalism. Nowadays, at best, you have citations that turn out to be fake and seldom who cites them gets updated


I know it's trendy to crap on crypto on HN, but my first real life use case was making a donation to wikileaks because visa refused to do it.

That I'm prevented to send my own money throught a service I pay for to a recipient that is legal in my country is outrageous.

I'm sad the internet is spending so much energy cancelling the latest social faux pas, but things like that get barely a blink.

Also a good reason to fight against the deprecation of cash.

In today's society, we can't do much without money. It's a power bottleneck. And no system stays stable forever.

It's too bad stating this makes you fall into a political category, or labelled as some -ist.

Thinking about the society we want to shape should not sound weird.


The way I see it, 90+% of the price of Bitcoin might be speculation, scams, black market, whatever you dislike the most. The rest is honest value for the only robust asset that can be exchanged across any border and is not subject to the whims of governments and bureaucrats. It is the "digital currency for the Internet age" Milton Friedman was describing in 1999.

https://www.youtube.com/watch?v=C_Ny-UPve-8

(Insert 50 pages long disclaimer here for the HN pedants wanting to point out it's all a scam, that it's not a currency, that it is actually subject to the whims of governments, that it has no value, that it boils the oceans, that it is not the only cryptocurrency, etc.)


Yeah, I have the same issue - I cannot use Paypal nor IBAN to donate to KDE, but I have money in crypto that I could've donated them, but I literally cannot. Too bad the German laws are set up this way (https://kde.org/community/donations/others/ - "KDE e.V. does not accept donations of "crypto" coins: Bitcoin, Etherium, Litecoin, Dogecoin, and all the others. The tax regime that covers German non-profit associations considers those coins a form of speculation which would endanger our non-profit status, so regretfully you cannot donate them directly. Cash out and then use a traditional method to donate.")


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

Search: