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

People who are interested in this may also be interested in Cooklang, a simple plain-text markdown format for recipes: https://cooklang.org/ -- doesn't get much easier than that.


Thanks for sharing, I never heard of Cooklang. It feels like a DSL (Domain Specific Language). I'll study their implementation to get started on a niche ETL markup language.

Thanks again!


Oh man, if this rendering was somehow integrated into Wiki.js, it would be a perfect storm. I may have to look into how to do that.


It assume it depends on how things are structured. If you are effectively running everything from Russia and are just using a EU corporate entity on the "frontend" with no actual business operations within the EU, that type of setup would likely be illegal in most countries.

But if you have two separate entities with clear split responsibilities things should work just fine. For example the EU-based company takes care of running the the product and contracts development services from a Russian company.


It's fairly common to have multiple businesses to reduce the blast radius. Often staff are employed by one company which has zero assets in case an employee tries to sue.


They have like 100 people in Prague, another 100 in Munich and then 1000 in Russia. Safe to say they are a Russian company with an EU "presence" for tax purposes.

It's amazing how much people will close an eye if they like the product!

JetBrains should be boycotted too.



Not sure what is going on there, but several Russian stocks (including ADRs and GDRs listed on the NYSE/LSE) have been suspended from trading.


What do you suggest as an alternative to password reset based on the account email?


If you retired the email because the domain expired, maybe don't let it reset existing accounts. It's dead.


You can link directly to a line by appending #<line_number>

https://github.com/torvalds/linux/blob/f4bc5bbb5fef3cf421ba3...


Another fun github hack: if you browse the repo for a particular file, the URL will be something like

    github.com/user/repo/blob/master/foo/bar/baz.py
But this file can change, meaning this url might not have the same content a week or month down the road. This is particularly troublesome when you have lines selected. To fix this, press `y` and your url will get expanded to include the current commit hash:

    github.com/user/repo/blob/e4ecae.../foo/bar/baz.py
Now your URL is safe to share.


You can also change "github.com" to "github1s.com" or "github.dev" if you want to view it in VSCode in browser.

i.e.

https://github.dev/torvalds/linux/blob/f4bc5bbb5fef3cf421ba3...

https://github1s.com/torvalds/linux/blob/f4bc5bbb5fef3cf421b...


Or just press '.' if you're logged in


Or just click on the line number to change the URL to that line.


And shift-click on a second line to select a block.


I tried that but everything after the # got stripped when I submitted the link.


A little shoutout to a alternative Python formating tool https://github.com/google/yapf (developed by Google).

The built in "facebook style" formating felt by far the most natural to me with the out of the box settings and no extra config.


I did a blind survey of YAPF vs Black at my work. The results came back as 70% in favour of Black.

Black gives generally nicer output, and also more predictable output because its folding algorithm is simpler. YAPF uses a global optimisation which makes it make very strange decisions sometimes. Black does too, but much less often.

There are also non-style problems with YAPF. It occasionally fails to produce stable output, i.e. yapf(yapf(x)) != yapf(x). In some cases it never stabilises - flip flopping between alternatives forever!

Finally it seems to have very bad worst case performance. On some long files it takes so long that we have to exclude them from formatting. Black has no issue.

In conclusion, don't use YAPF! Black is better in almost every way!


How did you perform the blind survey? Format some code with Black and YAPF and ask people which they liked better?


Yeah exactly. I had 20 samples from our codebase that showed some representative differences and you had to click on which one you liked more. The order (Black/YAPF or YAPF/Black) was randomised.

I also had to turn off Black's quote normalisation otherwise it is really obvious which is which. Quote normalisation is another point in Black's favour.

I could put the survey up somewhere if anyone is interested.


YAPF is slower than Black for many degenerate cases, a fact I notice most strongly since I use an "auto-format file on file save" extension in my editor. The case I found in particular was editing large JSON schema definitions in Python, as they're represented as deeply nested dictionaries. Black seems to format them in linear time based on the number of bytes in the file, while YAPF seems to get exponentially slower based on the complexity of the hard-coded data structure. It was a niche case, and the maximum slowdown was only ~1-2 seconds, but that editing freeze was quite annoying.


yapf is configurable, and that's why it never won.


What's wrong with configurable? Too much opportunity to bikeshed?

I figured yapf was not "new" which is why black won.

Starting about 5-6 years ago there was a push in the Python community to replace solved problems with new ones in what appears to me as chasing the JavaScript community.

Instead of consolidating on existing tools that worked well but had some rough edges to smooth out, numerous projects came about to reinvent the wheel.


There is no "best format". It's a matter of opinion.

Taste is something we cannot objectively agree, and in fact, people will end up arguing even about this very statement, offering what they think is an objective measure.

Bikesheding, yes. Hours lost in meeting, chat debates, documentation to write, linting configuration. To be redone for each project, team, etc. Worse even in FOSS where everybody will come in a ticket and complain. And after while, you do it again, because the debate is never settle even in the same team or project.

There is not way to take a team of 3 people, choose a style, and make it so that they are all 100% happy with it.

Black took the road of gofmt: you can't chose. And it won because of that: it saved people time and energy.

People realize the cost was not worth the satisfaction, which you are unlikely to get anyway. Let's just move on to what matters, it's good enough. Pareto.


> Bikesheding, yes. Hours lost in meeting, chat debates, documentation to write, linting configuration

Sounds like a team problem, I've been on plenty of teams that use clang-format for c/c++ and there have never been any issues like this. Team players know that (almost all) arguing over formatting is not a good use of time. (edit: in case not clear, clang-format is extremely configurable. Set a default config and live with it forever, that's how those teams work.)

> Black took the road of gofmt: you can't chose. And it won because of that: it saved people time and energy.

I don't see how this follows, if a team was dysfunctional enough to be wasting hours and hours of time before, I can't imagine why that wouldn't continue. It just shifts from "let's change this flag in yapf" to "let's switch to yapf because black looks ugly and gives us no options".


> Sounds like a team problem,

You had a good team. I had a great mum. Some people have great doctors.

> It just shifts from "let's change this flag in yapf" to "let's switch to yapf because black looks ugly and gives us no options".

If the practice doesn't match the theory, I'd rather trust the practice.


Well if it helps your team out then that's great, I just wouldn't expect that to generalize well. But who knows, people are weird, maybe more would give up fighting about style because of a tool change than I expect.


I don't have one team, I'm a freelancer, I meet 2 teams each month. I have a large sample to generalize from.


All problems are team problems. It's OK to use technical solutions to get around them.


> Too much opportunity to bikeshed?

Yes, and also too hard to set up. It's extremely dumb, but I'm much more likely to use something I can't configure, because if I can configure it, I'm going to want to, and it'll take forever to make all those choices.


I've never had to configure yapf, even though I could...

"yapf -i --style=pep8" works great.


I agree. With the current state of Django admin, it is better not to build complex stuff on top of it. A few tweaks and customization here and there are fine, but anything more will likely break on Django and/or third-party package updates.

I'd like to see Django gradually redesigning parts of the Admin to allow for more modular extensibility in future versions.


Whats the deal with they large number of open issues an pull requests on FastAPI and SQLModel?

SQLModel 100 issues, 54 open PRs

FastAPI 903 issues, 448(!!) open PRs

I recently had to choose between Flask and FastAPI for a fresh project and went with Flask in the end, partly due to long term maintenance concerns with FastAPI.


There was a recent discussion about it here including a reply from the FastAPI creator explaining the situation:

https://news.ycombinator.com/item?id=29471609


Having given SqlModel a very proper go a few months back, I have to say that it's not worth using it just yet. There are too many outstanding issues and the documentation is also incomplete. Maybe in a year's time, the situation could be different.


Cyprus is probably the best overall deal out there right now, but it isn't the cheapest option.


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

Search: