HNHacker News
TopNewBestAskShowJobs

BerislavLopac

32,006 karma · joined July 21, 2008

submissionscomments
BerislavLopac··on GIL Become Optional in Python 3.13
Maybe, but making GIL optional (rather than removing it completely) solves both problems.
BerislavLopac··on GIL Become Optional in Python 3.13
> I'm almost sure the python developers said that they will compensate the slow down with other optimizations

Those optimisations are not there to compensate anything; they will improve performance of single-threaded code with or without GIL.

BerislavLopac··on I prefer rST to Markdown
> markdown is a lightweight representation of html

This is my main problem with the article, as this is decidedly incorrect.

Markdown was designed as a tool of conversion of de facto standard of formatting text in email messages and Usenet posts of early nineties. The basic 7-bit ASCII nature of those technologies inspired people to informally annotate the text with special signs to denote formatting like emphasis, section titles and the like.

True, HTML shares a lot of similarities with that nameless standard, so John Gruber in 2004 wrote a basic script [0] to convert the latter to the former, never expecting it to become such a universally used actual standard.

[0] https://daringfireball.net/projects/markdown/

BerislavLopac··on Ask HN: What are you using to parse PDFs for RAG?
Have you tried Pandoc [0]?

[0] https://pandoc.org/

BerislavLopac··on FastHTML – Modern web applications in pure Python
I'm personally always confused with those batteries-included frameworks like Django, FastAPI and similar. Sure, they might be easier for a beginner to quickly whip up a simple Web site/app, but in my experience as your requirements grow they quickly start getting in your way.

Starting with more flexible initial components (e.g. Starlette) and adding batteries (SQLAlchemy, Jinja2, HTMX...) as needed allows for a sensible evolutionary approach and prevents painting yourself into a corner with early decisions.

BerislavLopac··on How much money we can raise for transparently idiotic startups?
> Pippin

I'm fascinated by how the most ethically dubious companies tend to take their names from Tolkien: Palantir, Anduril, Pippin...

BerislavLopac··on Ask HN: For human brains only?
Currently at least, sign language fits the bill.
BerislavLopac··on Panic at the Job Market
> Most jobs are now hoops after hoops

From the perspective of someone with 30 years of professional SWE experience, my biggest gripe is when interviewers are simply incompetent to evaluate a person for the role they interview for. Quite often they don't have the relevant experience (so you have data scientists interviewing candidates for a backend engineer role), or they are way more junior than the role (simply because the team is lacking someone with the relevant experience).

BerislavLopac··on Python Has Too Many Package Managers
> Can people explain why venv&pip is a bad solution that doesnt work for them they have to resort to other package managers?

It's very simple:

1. As you said yourself, you don't need venv at all. 2. The format used by `pip -r` (colloquially known as "requirements file") is not a defined standard. 3. pip is not a package manager, but a package version resolver and installer.

BerislavLopac··on Ask HN: Anyone here burnt out of the AI hype?
As someone nicely put it: when selling it's AI, when hiring it's ML.
BerislavLopac··on 6 months ago, I left the bullshit industrial complex
Let's agree to disagree -- I find it very relevant. "Peak humanity" is a very general statement, and ignoring large parts of the target cohort makes any analysis quite meaningless.
BerislavLopac··on 6 months ago, I left the bullshit industrial complex
> The 90s were peak humanity

Yeah, sure. At the same time a large European country was falling apart in a bloody and cruel war that saw many innocent people outright murdered or displaced.

BerislavLopac··on My spiciest take on tech hiring
The key insight on hiring technical people that I have gained over the 30 years of my career is something that seems very logical and natural, but seems to be forgotten too often: you cannot have more junior people evaluation more senior ones.
BerislavLopac··on To the Bored All Things Are Boring
My take on this would be that, if you can think of various activities to do when you have nothing to do, whether on your own or with others, you can't be bored.
BerislavLopac··on Should Python Adopt Calendar Versioning?
Also relevant: https://discuss.python.org/t/pep-2026-calendar-versioning-fo...
BerislavLopac··on Understanding a Python Closure Oddity
> Everything in Python is evaluated at runtime

That is not correct. Python generally has two "runtimes": one is on import, when all of the module level code is evaluated; and the runtime, when the bodies of various functions and methods are evaluated. The two can be combined, e.g. by importing a module from within a function, but generally they are separate.

> Bytecode is just a form of caching

Not quite. It is perfectly possible to deploy just the bytecode and disable recompiling on import.

> Python doesn't have a standard

Of course it does -- CPython is the reference implementation, so its behaviour is "correct".

BerislavLopac··on Inventing Cyrillic
It's a shame that Glagolitic hasn't caught up and remained relevant like Cyrillic did. On the upside, at least now we have our own historically accurate fantasy script. ;)|
BerislavLopac··on Coding interviews are stupid (ish)
I'm talking about things like 8/16/32/64-bit processors, CISC vs RISC, from mainframes to personal computers, from isolated machines to ubiquity of modern Internet, quantum computing etc. Note that I'm talking about the fundamentals of software engineering, not software science.
BerislavLopac··on Coding interviews are stupid (ish)
Standardised on what exactly? There are so many methodologies and/or tools, with endless possible combinations, each of which can reach the desired result in terms of functionality and even quality. And enforcing just one means no possibility of progress.

In physical engineering, things are very much limited by physical laws, which don't change (and even if our understanding on them might, that happens rarely enough to adapt). In software engineering, the foundational principles can and do change many times in an average engineer's career.

BerislavLopac··on Ask HN: Guidelines for making clear architecture diagrams
Keep it simple and use https://c4model.com/
BerislavLopac··on Show HN: I made an app that helps you find where to stream movies and TV shows
JustWatch already has all that.
BerislavLopac··on Ask HN: Any tool for managing large and variable command lines?
If you're comfortable with Python, Invoke [0] can be a great help. You can include your bash code directly inside it, or collect your scripts in a directory and run them from Invoke tasks. Plus, you can easily use all the power of Python on top of your scripts.

[0] https://www.pyinvoke.org/

BerislavLopac··on Ask HN: C/C++ developer wanting to learn efficient Python
Python is a very fast language, but not in the sense that you would expect as a C++ developer: its execution is (comparatively) very slow, but it shines at the speed of development.

Many things that one might take as given in other languages, in Python are optional: static type analysis, multithreading, immutability and the like. When it comes to writing algorithms in Python, it's best to think about it as executable pseudocode, here to help you get to the correct execution first and optimise for performance later.

In Python, development happens in distinct steps. The first step is to get your code to do what you need, without thinking about the readability and efficiency. In many cases, this will result in the code that is ready to be used, even in production (especially if you include unit tests and type checking, for good measure); if not, the next step is to comb the code and optimise it to be faster. What that means exactly will depend on your needs, but with a combination of external libraries like NumPy, multiprocessing and async it is quite possible to reach sufficient performance.

Finally, if none of that result in the desired speed, the performance critical components can be extracted and rewritten in a low-level language (where you have a huge advantage as a C++ dev) that the Python will happily wrap around. This is the exact strategy used by most performant libraries out there, like NumPy itself.

BerislavLopac··on "Real" anonymous functions for Python
That's already been taken care of - all you need to do is:

  from __future__ import braces
BerislavLopac··on Show HN: Auto-generate an OpenAPI spec by listening to localhost
You are correct about YAML, but OpenAPI is not YAML -- it just commonly uses it as for the textual representation. As others mentioned it, JSON is an alternative, although it doesn't make it much easier to write the code directly.

Sadly, there is a distinct lack of tools to make spec-first development easier. At the moment, Stoplight [0] is the only game in town as a high quality schema editor, but it requires payment for any more significant usage.

[0] https://stoplight.io/

BerislavLopac··on I asked ChatGPT to write the code to print "Hello, world " as a junior developer
Senior developers don't write code, they copy/paste it.
BerislavLopac··on Show HN: deptry 0.14.0 – detect unused Python dependencies up to 10 times faster
Use pipdeptree for that
BerislavLopac··on The 160-year mystery of Europe's Ice Age 'queens'
Well, "Ice Age Queens" is the perfect name for an alt rock band...
BerislavLopac··on Can Europe's trains compete with low-cost airlines?
Well yes, but this kind of comparisons look at only a certain route; in this case Paris-London, which means (or at least implies) central areas of both cities. Obviously, if we want to include any wider area there are too many variations to have a useful comparison.
BerislavLopac··on Can Europe's trains compete with low-cost airlines?
You're not wrong, but those numbers are not completely equal. If you add the cost of transport to and from the airport, and the total time for the trip, the flight will probably still cost less, but not quite that much.
← PreviousPage 5 of 34Next →