News for hackers. Stuff that matters.
Re:Show HN: Xmake, a modern C/C++ build utility by waruqi on Monday April 08, 2019 @09:48PM (#19610984)
But the meson installation has many dependencies, it is not very lightweight, it needs python, ninja, and xmake has built-in luajit, no third-party dependencies, more lightweight
Re:Show HN: Xmake, a modern C/C++ build utility by shaklee3 on Monday April 08, 2019 @09:55PM (#19611024)
Python is preinstalled on any major Linux distro. Ninja is tiny, so those don't seem that heavyweight.
Re:Show HN: Xmake, a modern C/C++ build utility by waruqi on Monday April 08, 2019 @09:57PM (#19611038)
Python also has version compatibility issues, such as: python2.x, 3.x. Also need the user to install the specified version of python
Re:Show HN: Xmake, a modern C/C++ build utility by pfranz on Monday April 08, 2019 @10:51PM (#19611327)
Any new project will very, very likely be using Python3. It appears like that applies to meson. `python3` is the expected binary (`python` is still expected to point to Python 2 for the foreseeable future and `python2` being the explicit binary--some distros have jumped the gun on `python`). Similarly, they have completely different accompanies executables (pip3, wheel3, pydoc3) and completely separate library paths. What sort of compatibility issues have you seen?

The requirements say Python 3.5 or newer. That was released in 2015. Outside of major versions, Python has generally been forwards compatible (especially if you're testing). After more than a decade of use, the only grumbles with supporting old Python version is not getting to use new features (or working around fixed bugs).

I say this as someone who still uses Python 2 every day.

Re:Show HN: Xmake, a modern C/C++ build utility by NikkiA on Tuesday April 09, 2019 @09:29AM (#19614354)
The sooner debian kills the python = python2 association and python3 becomes the default provider of 'python' the better, I think I read that it's scheduled for this year finally.
Re:Show HN: Xmake, a modern C/C++ build utility by pfranz on Tuesday April 09, 2019 @03:04PM (#19617915)
I don't blame the OS guys. Python has been around for 30 years and many distros built a lot of their utilities around Python 2. Getting rid of Python 2 sounds like a Herculean effort that could only start after Python 3 settled down and required libraries were ported over (or replacement libraries written using more modern conventions).

I'm glad we seem to be past the big inflection point and hope to put Python 2 behind us. But I can see never changing `python` from Python 2 (just not have one when Python 2 isn't installed).

Re:Show HN: Xmake, a modern C/C++ build utility by lasagnaphil on Tuesday April 09, 2019 @09:53AM (#19614605)
On the contrary, Arch Linux has ‘python’ as Python 3 and ‘python2’ as Python 2. Although most of the Linux users are on Ubuntu, you can’t ignore those other distributions.
Re:Show HN: Xmake, a modern C/C++ build utility by pfranz on Tuesday April 09, 2019 @02:57PM (#19617865)
Arch was what I had in mind as an OS that jumped the gun against the advice of the Python devs (at least that's a simplified history). I thought there was another distro, but I wasn't sure if they had rolled that back.

To the point of the comment thread, that would only be an issue if you're maintaining a Python 2 codebase and using modern Arch. If you're creating a Python 3 codebase you're likely calling `python3` and even calling `python` isn't a problem for you.

Re:Show HN: Xmake, a modern C/C++ build utility by geezerjay on Tuesday April 09, 2019 @01:46AM (#19612130)
> Python also has version compatibility issues, such as: python2.x, 3.x.

If that really bothers you then just create a virtual environment and locally deploy whatever version you want to run. That issue ceased to be a concern years ago.

Re:Show HN: Xmake, a modern C/C++ build utility by rusk on Tuesday April 09, 2019 @03:47AM (#19612605)
> just create a virtual environment

Yaw super lightweight ...

Re:Show HN: Xmake, a modern C/C++ build utility by NikkiA on Tuesday April 09, 2019 @09:31AM (#19614378)
I think GP means `python3 -mvenv my_venv` rather than running in a VM or any heavyweight virtual environment. At least that's how I interpret 'virtual environment' in a pythonic context, and they're certainly lightweight enough.
Re:Show HN: Xmake, a modern C/C++ build utility by rusk on Tuesday April 09, 2019 @11:17AM (#19615503)
What I took GGP to be talking about though was lightweight in terms of cognitive load. Like "can I just run the thing please!" aka yak shaving [0]

[0] https://seths.blog/2005/03/dont_shave_that/

Re:Show HN: Xmake, a modern C/C++ build utility by pfranz on Tuesday April 09, 2019 @03:53PM (#19618320)
In other comments you talk about "lightweight" as cognitive load, I'm curious why Python is any different than other languages?

I haven't used virtualenv very much, but I've been doing similar things for longer than virtualenv has been around. You need a `python` binary on PATH and a PYTHONPATH pointing to where you want to get your libraries from. virtualenv packages this up into a directory in a more user friendly fashion.

Most docs I've seen on Python2/3 advise on choosing one or the other, ideally 3. Which implies mixing should either be done very carefully or with a plan to transition to 3.

I get that some accidents of history have caused headaches. The deep adoption by distros have caused problems when people just want to use Python/libs installed with the OS (as well as moving to Python 3), authoring packages hasn't been great historically, etc.

Re:Show HN: Xmake, a modern C/C++ build utility by rusk on Wednesday April 10, 2019 @12:30AM (#19621854)
That you needed four paragraphs to get your point across kind of emphasises my point.

I don't mean to be rude, but the key to getting people's attention is to get your point across quickly. As soon as somebody starts going all you have to do is install a frobozz and murtle a plinth I really just lose interest.

EDIT - doubting myself I went back up the thread here and this topic kicks off with "meson installation has many dependencies, it is not very lightweight" ("lightweight" operationally defined here for this discussion) - to which somebody replies "it doesn't matter, Ninja includes Python" or words to that effect. "it's not the correct version of Python" is the general gist of what comes next to which our GGP here says "all you have to do" is set up a python virtual environment, which is around the point where I start to feel frustrated and the need to go do something interesting.

So to be clear, the discussion is not about python being lightweight, but meson, and trying to wave complexity away with yet another layer of complexity (even if it's something as well known as python virtualenvs) is not reducing complexity but hiding it, IMO.

Re:Show HN: Xmake, a modern C/C++ build utility by pfranz on Wednesday April 10, 2019 @02:58AM (#19622458)
I honestly wasn't trying to be combative. I tried to make my comment just long enough to give context (showing my understanding of the solution and the assumptions I'm making). I'm not trying to interject my opinion, but see where my assumptions might be wrong.

I agree long wandering threads are difficult to follow.

I have little interest in new C++ build systems, but will jump in and contribute when I see a familiar problem I want to learn more about like managing sizable Python codebases. Python 2/3 isn't relevant at all to meson and I don't see the docs mentioning any need for version or package management. I've only ever heard/seen virtualenv needed in project management, never in distributed software. Is your beef with Python or any software using an interpreted language? Outside of the 2to3 transition and being deeply integrated in many distros, it has the fundamental problems other interpreted languages have and are handled in the same way.

Re:Show HN: Xmake, a modern C/C++ build utility by philpem on Tuesday April 09, 2019 @07:02AM (#19613404)
It is if you run it inside a Docker container... no mess, no fuss...
Re:Show HN: Xmake, a modern C/C++ build utility by rusk on Tuesday April 09, 2019 @08:11AM (#19613780)
I cant tell if you’re joking or not ;)
Re:Show HN: Xmake, a modern C/C++ build utility by philpem on Monday April 15, 2019 @05:08AM (#19664089)
Depends if someone's already written the Dockerfile for you ;)

But to be fair, I usually just clone a Virtualbox machine because I'm used to the workflow. :)

Re:Show HN: Xmake, a modern C/C++ build utility by geezerjay on Tuesday April 09, 2019 @04:15AM (#19612717)
Actually it is, but nevertheless that's only required by those who for some reason still believe today that python2 vs python3 is an issue.
Re:Show HN: Xmake, a modern C/C++ build utility by roel_v on Tuesday April 09, 2019 @05:46AM (#19613075)
I have python 2 vs 3 issues if not every day, then at least 3 times a week, because of being stuck with a version of third party software that uses Python 2 (ArcGIS 10 series) for part of my code base. Of course Python apologists are now going to say 'oh you're just one guy in a niche situation', and 'yeah that's what you get for not upgrading to the latest version of all software', or any of the dozens of other excuses and blame I get anytime I have to defend why I need to use Python 2. Fact is still that I'm bound by external constraints and that Python versioning is a real problem in my day to day work, and yes that is in 2019. Look, Python isn't much worse or better than most other languages in its niche, but please do away with the 'everything about Python is easy and great' spiel.
Re:Show HN: Xmake, a modern C/C++ build utility by rusk on Tuesday April 09, 2019 @07:08AM (#19613437)
In fairness to the python community by-and-large, they are very supportive of legacy users and niche configurations. Python 2.x seems like something like 15 years now past its sell by date and is still actively supported. There's a lot of patience there ... people will make the leap when they're ready.

I think the pressure to always be on the latest and greatest is what did for the ruby and perl communities, and this is why python, and to a certain extent javascript are still going strong!

Re:Show HN: Xmake, a modern C/C++ build utility by roel_v on Thursday April 11, 2019 @03:35AM (#19631924)
Not disagreeing with you, just clarifying: I'm not even complaining so much about the Python 'development' community (i.e., those writing the interpreter and most of the people writing libraries); what irks me is the 'evangelists', Python users who feel the need to proselytize about things that are obviously not perfect, but claim they are and straight up dismiss any objections or real world concerns. I'm talking about the people who with a straight face call themselves 'Pythonistas'. Jebus, if so much of your self image and self worth is tied up in the programming language you like to use most, you need professional help. Of course all languages have people like this, and most 'communities' that are not software related have similar people too, it's just that posts like this seem to bring out this sort of hanger-ons. It probably also has something to do with me turning into Statler or Waldorf over time. Meh.
Re:Show HN: Xmake, a modern C/C++ build utility by rusk on Tuesday April 09, 2019 @05:56AM (#19613120)
There are a few different meanings of the word lightweight, and I get a sense you're not using the one that I or GP are using.
Re:Show HN: Xmake, a modern C/C++ build utility by Crinus on Tuesday April 09, 2019 @10:44AM (#19615164)
I am also annoyed by Python 2 vs Python 3 situation, however not because of the current incompatibility but about the potential Python 3 vs Python 4 incompatibility that the Python developers have shown to not care about introducing in the future.

If they promise to never break backward compatibility again in the future i might change my stance though, i mostly try to avoid Python than anything than a simple calculator or quick and dirty scripts because i do not want to write any code that may break in 2-3 years without me doing anything wrong.

Re:Show HN: Xmake, a modern C/C++ build utility by stuaxo on Tuesday April 09, 2019 @12:37PM (#19616454)
The switchover to Python3 has taken 10 years (as originally predicted).

Guido said there would never be a Python 4, though he has handed over the reigns so who knows.

As a Python dev, I wouldn't mind a Python 4 if it fixed some of the older / crustier corners of the API.

Re:Show HN: Xmake, a modern C/C++ build utility by Groxx on Tuesday April 09, 2019 @04:49AM (#19612868)

    export PIP_REQUIRE_VIRTUALENV=true
It's the only sane way to use Python.
Re:Show HN: Xmake, a modern C/C++ build utility by stuaxo on Tuesday April 09, 2019 @12:35PM (#19616437)
Pretty much everything has moved to Python 3 now.
Re:Show HN: Xmake, a modern C/C++ build utility by jandrewrogers on Monday April 08, 2019 @10:54PM (#19611345)
I can't think of a context in which I've used Meson where it ever felt not lightweight. Python is already installed in every system and ninja is quite small.
Re:Show HN: Xmake, a modern C/C++ build utility by flohofwoe on Tuesday April 09, 2019 @05:08AM (#19612946)
Python isn't installed on Windows, the pre-installed python version on macOS is stuck at 2.7.10.

ninja isn't installed on macOS and Windows, and both systems require to first install a package manager before installing ninja, or compile ninja from scratch.

Re:Show HN: Xmake, a modern C/C++ build utility by jcelerier on Tuesday April 09, 2019 @06:42AM (#19613320)
ninja on windows just requires you to download ninja.exe and put it in your path
Re:Show HN: Xmake, a modern C/C++ build utility by nickez on Tuesday April 09, 2019 @06:59AM (#19613388)
python and ninja are also bundled in the installer for meson.