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

Programming is using conventions. Lots and lots of it.

Conventions for syntax, names, logic, API, structure, vocabulary and so on.

Conventions are by nature arbitrary, influenced by culture, history, social behavior and a whole lot of human weirdness.

Don't try to learn all the conventions first, it comes faster with practice and exposure to it. Solve the problem, then find the conventions you need to apply the solution in your context.

The beginners paradox is that they need to learn a bit of specific conventions (E.G: part of a language, one paradigm and a few libs) to start working on solving a problem, so it's a frustrating experience.

There is no easy way to build the rest of the conventions based on your knowledge of what you know now, because it's artificial.

It's also what leads people to say "don't learn languages, learn to program". Which makes no sense to you at all, until, well, you finally know how to program. But you got there by learning conventions on the way.


Same.

But I think what they did with partial should be in the stdlib.

In fact partial should also be rewritten in C et promoted to built in.

Right now it's 10 times slower than lambda, and you have to know about and wish to import functools, yet still loose the docstring.

Shame for such a great feature.


As far as I can tell functools.partial has been implemented in C since it was added sixteen years ago ( https://github.com/python/cpython/commit/9c323f8de4910dfc0ba... ), and it's faster than lambda ( https://gist.github.com/wrmsr/1e13eda3ed78288679c010acbe6d2b... ). Regarding docstrings you can access the underlying function via the __wrapped__ attribute, and signature forwarding is too brittle and magical for stdlib.


> As far as I can tell functools.partial has been implemented in C since it was added sixteen years ago ( https://github.com/python/cpython/commit/9c323f8de4910dfc0ba.... ), and it's faster than lambda ( https://gist.github.com/wrmsr/1e13eda3ed78288679c010acbe6d2b.... )

I tried to prove you wrong and run multiple tests that all shown you were right. Then I tried to run them on different python versions, down to Python 2.7, expecting that my knowledge was just dated.

No, I was just wrong.

Don't know why I was so convinced of this.

> Regarding docstrings you can access the underlying function via the __wrapped__ attribute,

This assumes one knows about that. A lot of people never even heard of partial(), and won't know about _ _wrapped_ _. Not to mention I never seen a tool using help() fetching _ _wrapped_ _._ _doc_ _ if it exists.

> and signature forwarding is too brittle and magical for stdlib.

@functools.wraps() does signature forwarding to great success, and is in the stdlib.

Nevertheless, I don't think it would be the right strategy for partial(), because you don't have the exact same signature. But at least having something like:

   This function is the result of x() being wrapped with partial(x, 1, foo='bar').

   Here is the original docstring of x():
   
    ....


I run ubuntu 20.04 and don't have one single snap installed.

If you can switch distro, surely you have the skill to just ignore snaps and use ubuntu like a regular debian system. It required zero effort on my part at least.


This comment seems very condescending and doesn't bring anything to the conversation. There's many people in this thread stating that:

1. Ubuntu is replacing "standard" apt packages with packages apt packages that just install the snap version.

2. Many snap packages have bugs that are caused by the snap setup itself.

Thus, it is impossible for these users to "just ignore snaps and use ubuntu like a regular debian system".


Just use ubuntu like you did before snaps. No change to make. It works as before. All the debs are still here. The ppa. The apt.

Let others figure out the snap debacle.


The chromium apt package isn't there, which is one often pointed to example.


It this gets confirmed, we'll have a dilemna: confined people will become deficient in D vitamin by lack of sun exposure.


And a good one too. I'm currently maintaining https://0bin.net, and because we encrypt everything client side, people feel like they can post anything they want. We get some pretty personnal stuff.

They really should not. It's a can of worms. We can get compromised. Bought. Receive a court order (we comply with dmca). Or they could be on the wrong URL (typo squatting, phishing...).

Don't trust random online services with your data. FOSS or not, the code we serve can only be trusted as far as you and I we can be. And you don't know us. And you will make mistakes.

Now I'm guilty of it too, I share passwords with 0bin sometimes. But at least it's my service, I can assess the level of threat.


> [...] because we encrypt everything client side, [...]. We get some pretty personnal stuff.

How do you see what people post? Do you see people talking about it, or do you have other means of determining what kind of content gets posted?

Just curious; I'm sure your encryption is on point.


People post the full links (including the key) everywhere, so regularly, we google a bit to check what people use us for.

This allowed us to discover we were pretty popular on the crypto community and in specific fan fic subreddits. Which lead us to implement btc tipping and reader mode.

We also got reports, tickets, dmca, etc.

We cannot brute force our thousands of paste encrypted payloads, but for a sample, it's easy to follow the bread crumbs. And if we do it, others do it too.


From what I can see on the FAQ:

>The goal of 0bin is not to protect the user and their data (including, obviously, their secrets).

>Instead, it aims to protect the host from being sued for the content users pasted on the pastebin. The idea is that you cannot require somebody to moderate something they cannot read - as such, the host is granted plausible deniability.

Honestly, the forwardness is refreshing.


The titles aren't encrypted. Perhaps people are putting personal data in the titles of their posts, or hinting at personal data in the encrypted portion? Which is still a problem since the code served by the site has access to the plaintext, even if it's not normally sent back to the server. It would be trivial to change the code to send the plaintext or encryption key to the server, or just weaken the encryption somehow. Even if you trust the site operators they could be ordered to implement a change like that with an NSL, and prohibited from talking about it.

As they say in the FAQ, the encryption is there to provide plausible deniability for the operator of the site, not to protect the users' data.


Titles are rarely used, but I did receive emails of users saying "woops, can you delete this ?" with very personnal content.

Which is why we implemented the delete feature (creating a paste gives you a cookie that allows deletion) recently because we don't want to spend time on customer service for a free site.


I just stumbled on this the other day.

https://github.com/eranchetz/sup3rS3cretMes5age

Super easy to set up with Vault, it just hooks into the cubbyhole engine. The one-time-token is also the decryption key for the data store. I find it great for myself and the occasional email but also wouldn't really want to have others use it too much.


That's the beauty of FOSS. 0bin is itself a python rewrite of the PHP zerobin, the later was also forked into privatebin.

Now a zero knowledge pastebin is kind of a category, thanks to the french blogger sebsauvage that started the trend.


how large the amount of daily requests on your service ? just curious


We have about 20k hits a day. Or do you talk about dmca ?


normal users unless you're up to talk about dmca requests too :)


Dmca + pedo + dox reports are about a dozen a year. Pastes are a niche.


aight thanks for the info, how much hassle it is to you then ? is it simply deleting the content or do you have to fill forms and be inspected ?


Up to now we just delete it. We coded an admin for that. It takes time because we have to read the claim and assess the legitimity of it, not for the deletion.

Assessing said legitimity is tricky. Not because people lie, up to now they have been pretty decent, but because you really don't want to be tracked while following potentially child pron links, so it may take time.

Scaling moderation could become a problem if 0bin becomes more mainstream, but with so few reports, it's not a problem right now.


[dead]


Thanks, I didn't even know this list existed.


To be dead, it would have needed to be alive.

Sure, on HN, you will find sometimes some people that reports using it on real life projects.

But in the last 10 years, I did missions for about a 50 or so companies, and none of their team members, NONE, used TDD.

Few even had tests at all.

I've seen companies tried many things: agile, remote work, one team by micro-services, etc.

I've seen many videos of people saying they applied on TDD in their companies. I've even seen a few IRL of them in conferences or meet up.

But I've never worked with people using TDD in real life.

Not saying it doesn't happen, or that TDD is bad, just saying that I don't think it ever became a popular approach. Like Haskell or Nix, it's famous only in our bubble.


It's definitly a lot faster than before on my one plus 6. Espacially pages with a lot of images, or when rendering a video. A welcome improvement.


Bitwarden, as an app, can fill password in any app, including web sites viewed in firefox.

It's not as well integrated as an extension, and has some bugs, but it's a decent workaround.


Isn't UE4 free for all use cases under a million dollar of revenue ?


My joke was it takes a much larger team to get anything done in UE4 .

I couldn't imagine solo dev on an Unreal Project .


We tried it for a hackathon and after a day or so we got some stuff going. Of course it's a monster engine, but you can learn it as a side project, then after a month you can start building something. I don't see why a solo dev couldn't handle it.


C++ is hard.

The available learning resources for Unity are much better than they are for UE4. I want to add X to my game, I Google it and find ether an asset or open source project within minutes .

For my current project I found a half dozen templates to start from. Everything in UDK was ether half done or abandoned.

Of course both , or even rolling your own , are fine.


True, we haven't touched C++, only the blueprint editor. It takes you far.


https://www.playomno.com/ <-- very impressive solo dev project made in unreal.


Wait, move away from firefox as a core focus ?


Yeah. From https://blog.mozilla.org/blog/2020/08/11/changing-world-chan...

They list their 5 areas to focus on .. and Firefox isn't mentioned by name anywhere. For example:

"New focus on product. Mozilla must be a world-class, modern, multi-product internet organization. That means diverse, representative, focused on people outside of our walls, solving problems, building new products, engaging with users and doing the magic of mixing tech with our values" (emphasis mine)


The second sentence of the article you linked is:

> Mozilla exists so the internet can help the world collectively meet the range of challenges a moment like this presents. Firefox is a part of this.

They follow up on this by saying that they need to go BEYOND the browser but it doesn't mean that they want to drop it.

But well...you never know with that hollow techmarketing talk...


>but it doesn't mean that they want to drop it.

I wasn't trying to suggest there was no mention of Firefox in their roadmap blog - though it is telling that the Firefox mention you pointed to is in context of an argument for developing non-Firefox products. Nor was I arguing that they will drop Firefox. Even if they wanted to, they wouldn't be able to because Firefox is their sole revenue driver and the only thing that gives them a seat at the table for developing open-standards.

To me the telling part was when they listed their five areas of focus, and Firefox was not one of them.


Firefox is getting its ass beat in the market right now. It's essentially a dying product.


I'm seing more Firefox than before in my stats, not less. Not a lot more, but a few %.

"Not dead yet"


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

Search: