HNHacker News
TopNewBestAskShowJobs

sametmax

16,803 karma · joined May 21, 2012

French blogger about Python and porn, which strangely go well together (http://sametmax.com [NSFW] [FR])

Phone + not being an english native speaker can result in serious comment injury.

submissionscomments
sametmax··on Just Simply – Stop saying how simple things are in our docs
The problem is a lot of it is not publicly available. E.G: I asked chat gpt to help me install Python on Ubuntu 22.04, and it failed miserably.

Why? Because 22.04 is recent and many pitfalls it comes with haven't been much documented yet.

And it also don't know what is never written, but implicitly known if you deal with a lot of beginners. E.G: people get utterly confused with *args and **kwargs in Python, because it can be used at 2 different places, and depending of those places, it does completely different things. The latter is well documented, but that the brain of people cannot grok it is not.

So chatgpt will explain the same things as most of the doc, without realizing that what it needs to do is to warn humans that they are going to be confused and how to avoid it.

Humanity has a lot of implicit knowledge.*

sametmax··on Just Simply – Stop saying how simple things are in our docs
Like "otherwordly", obviously.

Never use "otherwordly" ph'nglui technical documentation, ngnah ymg' risk s̵͖͕͓̒̾̾ǘ̵̢̺͓͊́m̵̟͙̓̒̚m̴͉̠͖̈́͊͠o̸̞̺̻̾́̀n̵͖̻͓̓̔i̴̢͚͕̿̕͝n̴͇̞͎͒̀̚g̵̢̟͙̾̚͝ z̴̪̠̟̾̿͘a̸͇̞͙̔͌͛l̵̢̟̘͆̒g̴͓͔̀́̿ö̵̪̠́͑̓.̴̢͙̪́͝͠

sametmax··on My favorite C compiler flags during development
And it's not going to improve with ChatGPT around:

https://substack.com/profile/135747695-nobody-has-time-for-p...

Also the problem goes both way. I often see people trying to learn React with little grasp of JS, or Django like it's a language, and not something based on Python.

sametmax··on Just Simply – Stop saying how simple things are in our docs
It's a more and more popular opinion:

- Why not tell people to "simply" use pyenv, poetry or anaconda (https://bitecode.substack.com/p/why-not-tell-people-to-simpl...)

- Don’t use the word ‘simply’ (https://jameshfisher.com/2017/02/22/dont-use-simply/)

- Stop using ‘simply’ in tech instructions (https://www.parkersoftware.com/blog/stop-using-simply-in-tec...)

- Don’t say “simply” in your documentation (https://www.knowledgeowl.com/blog/posts/dont-say-simply-jim-...)

And I strongly agree. It can be so discouraging to fail at something you should "simply" do.

But to be fair to the technical writers, it's easy to write that way without noticing, even after proof reading. This should be automatized by writing tools.

Also, while it's mildly irritating, there are worse things in life.

Yet as the first link about the python ecosystems notes, it usually hides a bigger problem: many devs are too good to be helpful.

sametmax··on PBS quits Twitter after being labeled ‘government-funded media’
15% is a lot.

If you could lose one month of your salary unless you said one public good thing about your boss in a slideshow, would you do it?

A lot of people do much more than that for less.

sametmax··on Amazon offers free access to its AI coding assistant to undercut Microsoft
If it's not open source, it's not free enough to make a difference.
sametmax··on Prompt injection: what’s the worst that can happen?
You can see the trend of prompts getting more and more formal. One day we will have some programming language for llm.
sametmax··on Surprisingly good prompt inspiration for Stable Diffusion
aiprompt.io is a very basic web site that give you SD prompts generated by GPT-2.

No category, no parameters. Just get a random new prompt, every time.

The model has been trained on many existing prompts and the resulting pictures have been so far unexpectedly good both on my local SD install and midjourney.

Since crafting prompt is hard and inspiration can elude us, it's a simple yet effective to get the ball rolling.

sametmax··on Pyflow: An Alternative to Poetry and Pyenv
This is immature right now, but it needs users to grow because I think pyflow has it right: it ships a pre-build binary of Python instead of compiling it like pyenv. This makes the result way more reliable, both for a installation success and env congruency.

Just like pyenv, it needs no admin rights, and isolate the python completely from the system. It guaranties that pip, venv and tkinter.

Basically, it removes 90% of the problems you can get when installing Python.

sametmax··on RustPython: A Python interpreter written in Rust
Depends. Nuitka, the Python compiler, takes the python code, translate it to C, then compile it. Not only does it result in a stand alone python program, but it can be up to 4 times faster. Of course, it does compile the python code as well, so it's not just a matter of implementation, but rustpython allows to compile it all to wasm, which, while not binary, is pretty fast.
sametmax··on A New Cold War Has Begun (2019)
China is in competition with a lot of countries, and in a race for power.

And it is a bloody dictature.

That's not the point. The point is: why does the US has to formulate systematically its antagonist positions as a War?

Given they have the biggest army in the world, this is the best way to have the most violent resolution of this antagonism.

sametmax··on A New Cold War Has Begun (2019)
There are many countries that do such things, but the US selectively chose who are the ennemy du jour, and most are not tagged as such. In fact, some of them are friends with the US.

What's more, I recall the US in the last 2 decades:

- went to a war by lying about WMD and against the entire world (at least the world represented by the UN) will, killing thousands

- deployed mass surveillance of its own people, introduced bypasses to Habeas corpus and legalized torture using the Patriot Act

- elected a man that is at the center of so many Clinton-size scandals in a row it became the new normal

Now, I don't even begin to claim I have a superior country, mine has done many terrible things.

But let's not pretend the US (or any other superpower's) behavior has anything to do with morality. It's either naive or dishonest.

However, labelling everything with "war" is, indeed, a very American thing to do.

sametmax··on A New Cold War Has Begun (2019)
Why does everything has to be a war with the US?
sametmax··on 68 Bits of Unsolicited Advice
> Don't trust all purpose glue

I'm a Python dev, damn it.

sametmax··on With questionable copyright claim, Jay-Z orders deepfake parodies off YouTube
We really need a law that forces people to label fakes when they willingly produce ones that are hard to tell from the real thing, and harshly punish the ones that omit the label.

It's ok to fake stuff, but it should be clear that you are doing so.

We already have fake cars in advertising, fake food on menus, fake news, fake expert advices... I really don't want to add perfect impersonification to the list.

sametmax··on What I wish I knew about React
I've been coding and training people in react for a while now, and here is my experience:

- if you learned react by yourself years ago, you had to go through a lot of pain: the doc was terrible, the ecosystem a moving flaky target and conventions were not established. Things are better today, but it's not something you forget. Somebody starting react in 2018, and with create-react-app, will feel much happier.

- if you come from projects were you sparkled JS a bit, and suddenly you move to SPA with react, which is the experience of many, it feels like a wall. In fact, for many, React is the gateway to JS, and it pays the price for it: if you dislike working with JS (which is not uncommon if you come from another language like Ruby, Python, etc), you associate it with React. If you don't do JS full time and suddently must embrace the full stack of it just to make a UI, it's overwhelming. And despite the message you can use bare bone react, nobody does that: you use react, you eat the burger tower with it. Webpack reputation espacially, tainted react reputation.

- react has been oversold and overhyped. It doesn't help that the react community has been in deny of all its problems for years. They fixed many eventually, but before they did, they claimed it was all wonderful. It felt insulting for some people, espacially senior devs from other techs who knew the youngsters in front of them were full of it.

- the whole store concept has been a debacle. First there was a mysterious name (it's a plane, it's a train, it's flux!), but no solution. Then there were too many. Then Redux won. But Redux is so full of boilerplate. But wait, "you don't need Redux". But then people hacked many solutions internally to avoid redux with no guidance. Then redux toolkit and react provider arrived. In general, react and its ecosystem changed too fast. Way too fast. Unless it's your full time job, it's very hard to keep up. If all techs did that, we'll never be working. Combine that with the JS community desire to always use the latest toy, and you get a rat race. People have work to do, they don't want to deal with drama. React ecosystem is a drama queen.

- there is no convention on how to write a react project. Everytime you move to a project, it's a new project. You relearn the layout, the naming convention, the way store is handled, how things are passed around, the libs used for basic things, the testing infra, glue code for said libs, how you deal with css, the granularity of components, API best practices, etc. Not to mention the flavor you are in, depending of the version of react used and the fashion at the time. That's just for react. Then you deal with the other JS techs.

- so now, how do you know what to do? Who to trust? Where to get the gospel from? Thousand of tutorials, many imcomplete, obsolete, unpractical, specialized or dishonest. Just the way to manipulate something as simple as props have so many variants with different implications, and you got them all online. All. Of. Them. If you come from the ordered and well established world of backend frameworks, it's a mad house.

- then there are the gotachas. setState() is asynchronous, auto bind on createClass, but not on extends (but yes if render()). There you gotta call super(props), not here, useEffect dependancy management... React is full of them.

- when the magic doesn't get you, it lets you down. Some basic operations, like settings classes, preventDefault, communicating with the parent, etc. that you do all the time, are incredibly verbose for no good reason ("it's just JS you all!). Most other libs have shortcuts for them. In fact, most react projects add libs to get on par. When I train people in react and they ask me how to do this simple thing, I get desperate looks: "really?".

- integrating react with legacy frameworks like RoR, Symphony or Django is really, really not fun if you don't have a SPA with an REST API. And everybody does it differently.

- react native code reuse was a lie. A damn lie. And its great perfs as well. Nobody likes to be lied to.

- the immutability story is the last straw. I get the benefit of it. But for the vast majority of projects I met in the wild, the cost is way to high. This has so many ramifications I would need another comment just for this one.

Bottom line, if you work with seasonned programmers like it's often heard on HN, you can make the best of react. If you don't, and I work a lot with schools, administrations, average corporate IT deps, etc., the cost of react is going to weight on the team.

The teams that can manage React correctly are not that many outside of our bubble.

And for the ones that can, the price of using react may just be not worth it.

When I give the same exercice to do with Vue and React, beginners doing Vue finish in half the time. So I usually advice for Vue. Life is short, and you are probably not facebook at scale.

sametmax··on Ask HN: What are you reading to make sense of the economy?
I predict it will rain after a sunny day.

Some day.

sametmax··on Mongolia to restore traditional alphabet
What do you think we speak when interracting with the germans ?

English.

sametmax··on Mongolia to restore traditional alphabet
The only reason we can even have this important debate is because the whole thread can communicate in english.
sametmax··on Mongolia to restore traditional alphabet
> And that's not necessarily a good thing.

Nothing is 100% gain or loss.

But I believe there is nothing in our current situation that is worth more than having a united humanity, which can only happen if well all can understand each others.

> There are some things that are simply untranslatable to English - these words/concepts are closely tied to the way we live

It's ok, you can use the native word in an english sentence. English does that all the time: "je ne sais quoi" (french), "taxi" (turkish), "pizza" (italien), etc.

> Now if everyone in my town starts speaking only English suddenly, it would definitely affect the way they think[1], function, and would inevitable change the culture.

Yes. Change is inevitable anyway. But we can choose to change in one direction. I think the direction of uniting the human specie is the best choice.

> preserving a language might help preserve a culture.

I'll exchange my own entire french cultural heritage in a blink if suddently I could make the entire world speak one common language.

But it doesn't have to be.

A culture is not this immutable things we think it is. Most thing we call ancestral are really just the result of a continuous transformation process that have the same flavor, and so that we identify as stable. Even centuries old religions have been changing all the time.

So culture will change as well. It will adapt, and keep what is meant to be kept, then drop the rest.

We will lose some valuable things in the process, but to gain much more.

sametmax··on Mongolia to restore traditional alphabet
I know. And I believe it's ok to lose that too.

We will develop different ways of thinking or improve the language we use.

I don't think there is anything in what we currently have that can compare to a united humanity. And this only can happen if we all can understand each others.

sametmax··on Mongolia to restore traditional alphabet
I think it will have the opposite effect.

Once we see the benefit of being able to communicate freely with anybody, and losing the protective aspect of being able to communicate in a language others can't understand, I think people will lose interest in local languages and dialect?

Why learn them when you can just translate them when you need them? What do they bring, except some aesthetical pleasure? Given the work it is to translate materials to a language, it will stop to be done: let the automatic system do that for you!

Then, people will be able to mix and travel more, exchange more, and so they will.

In this env, and using translation again and again, people will start to pick up whatever language is the most common.

Eventually, what is not useful will diseapear, only artefacts that we can translate automatically, will remain.

sametmax··on Mongolia to restore traditional alphabet
> Preserving their traditional alphabet and de-colonializing their culture is a good thing, no matter how I look at it

There are downsides to any situation. E.G:

- cost

- available resources for education and work

- adding one more obstacles for different cultures to be able to understand each other

I'm french, and in my country, language protection is a big thing.

It's also why we have such a terrible ability to speak english, which create way more problems than it solves.

Language preservation is overrated. Sure, it's nice. But compared to one day, having the entire earth speak the same language, be able to communicate and understand each other better? Small price to pay.

It get why they do it. Mongolia is a very peculiar culture, and I don't think it benefits much from mondialisation. Quite the contrary. And it's a way for their society to break from a painful part of their history.

But to me, it seems, at least on the long run, a step backward. Every time a language dies, like latin or summerian did, we gain uniformity. There are enough source of diversity in humanity to not need to add it to the very structure we use to exchange information.

Granted, the cyrillic alphabet is not very universal, but it is certainly more common than the traditional mongolia alphabet.

Now since I don't live there, I may be missing some crucial informations. Maybe the population still massively use the old alphabet unofficially and it makes sense. Maybe the use of the cyrillic alphabet brough problems I can't see.

So of course, I'm not the right peson to judge the situation.

But I wanted to bring a counter point to this the enthusiastic parent comment. We tend to react in a very emotional way when it's about culture, and I'm not sure it benefits our specie.

sametmax··on French companies benefiting from state aid can't buy back shares
> One difference between them is that a dangerous concentration of power is inherent to communism

You mean in opposition to a system that promotes the concentration of capital, which is power ?

Or do you think non capitalist systems don't have laws and a group of dictators must be at the top?

sametmax··on French companies benefiting from state aid can't buy back shares
Don't worry, they will be plenty of exceptions and deals in France to bypass that after the fact. We just won't hear about it.
sametmax··on French companies benefiting from state aid can't buy back shares
Investing is privatizing the risks and the benefits.

Bailing out is privatizing the benefits but mutualizing the risks.

It's taking what favors you from both capitalism and socialism, call that a free market, and pretend it's for the common good. You always win.

People says communism didn't work looking at Russia and China. But the ruling class will abuse any system to the point it doesn't look like the original idea at all, if not kept in check. It's true for capitalism as well, as we can see.

To me, being able to do this is proof we are still not in a democracy.

We enjoy a lot of freedoms, so we are not in a dictature. But we are still not in power. We're just told we are.

sametmax··on Many Japanese children refuse to go to school
Yes, but should not have to learn about fire by putting your hand in it for 20 years. In a room full of pyromaniacs calling themself firefighters. As a defenseless kid.

It looks like this: https://imgur.com/gallery/YiqlS

Without the fun of it

sametmax··on Many Japanese children refuse to go to school
Not that much related, but it's one of the reason I love the game "baba is you" so much.

It explains nothing.

But it is carefully crafted to drive you in the right direction so that you discover things by yourself, step by step, from early to very late levels.

It's a very difficult balance for a puzzle game, espacially for something as original as baba is you, that requires you to think a lot out of the box:

- a level completly chalenges your perception of what you are as a player

- another one forces you to put yourself in a loosing position to win

- one requires an object that does not exist at all in the entire level

It's a joy to understand those new mechanisms. But it is a hard game, so it needs a way to help you without spoiling the fun of solving it.

If you like level design like me, it's a treat, and a good example of great tutoring.

Now as a teacher, I do that as well. But mixed to traditional teaching because I teach adults, and they want to compress the learning time and be productive fast, even at the price of a more superficial understanding.

sametmax··on Many Japanese children refuse to go to school
As a kid, it's very easy to make friends. You don't need school for that. Three of my child hood best friends were not in my schools. I sill visit one regularly, 20 years later.

In fact, I'll argue that school distort the child ability to socialize, not improve it. Because it's an artificial setup were the crazy values and rules only exist and make sense in the school. And worst, adults sell you values and rules from the real world while you are stuck in this alternate dimension.

sametmax··on Many Japanese children refuse to go to school
+1.

Even as an adult, If I could do it all again, I would avoid school as much as possible.

School is an upgrade from child labor, but I now have enough experience to know it's a downgrade from what I can learn of my own.

Not saying every kid should do the same of course.

But personnally, after being in 11 schools, including fancy private ones and ones in poor neighbourhoods, I found extremly few decent teachers, a very violent and boring environment, and a culture that killed the best things in young minds while promoting unfairness.

And while I was often top of my class, I didn't learn much. Took me 3 months to learn to read, a bit more to write and count, and after that, everything was just more fun to learn alone than in the depressive and repressive jail of school.

Also, I don't miss having to fight for social acceptance, the bullying, the stress and pressure nor the hypocrisy of the ones in charge. All at an age I didn't have yet the skill and knowldge to deal with it.

← PreviousPage 2 of 34Next →