Live data from Hacker News

Bazel can now build Haskell

tweag.io

11–20 of 54 posts

Re: Bazel can now build Haskell

#12
post #2

I wonder if Bazel takes off across many languages. It wouldn't hurt to have a modern autotools & co. replacement across ecosystems. I don't think it's doable, considering the fact that we have language specific package managers and build tools, but you never know. By "replacement", I mean picking up a random open source project and being able to do the equivalent of: ./configure make make install To be able to build…

I don't think this is very far off, most languages with a package manager are relatively easy to finagle into bazel. That said, c/c++ dependencies are not, and every bazel user needs to put in some extra effort there. Eventually bazel-packages won't be empty and might solve that problem, but time will tell.

Right now there are a handful of (mostly Google) projects that you should be able to clone and bazel build after only having installed bazel.

To build bazel itself: # install bazel w/ system package manager git clone https://bazel.googlesource.com/bazel && cd bazel && bazel build //src:bazel

Re: Bazel can now build Haskell

#13
post #2

I wonder if Bazel takes off across many languages. It wouldn't hurt to have a modern autotools & co. replacement across ecosystems. I don't think it's doable, considering the fact that we have language specific package managers and build tools, but you never know. By "replacement", I mean picking up a random open source project and being able to do the equivalent of: ./configure make make install To be able to build…

Doing “./configure && make && make install” is no better than doing “curl url | bash”.

Actually no, there is a difference, the former never works properly for any sizable project, while the later does, because for the later the user just wants to install the app so all the script usually does is to download some binaries.

Having a common build environment is impossible because you need a common way to manage dependencies and that will never, ever happen, for better or worse.

Re: Bazel can now build Haskell

#14
post #11

There is no language named C/C++. There is C, and there is C++. To be taken seriously, treat them as the very different languages they are.

It is a mere convenience.

I also write Java/C++ and .NET/C++ regarding some of the project stack descriptions I am usually working on.

Also the best magazine reference for C and C++ developers, now sadly gone, "The C User's Journal" eventually was renamed to "The C/C++ User's Journal" when they saw the increase in C++ readers and respective article submissions.

Re: Bazel can now build Haskell

#16
post #11

There is no language named C/C++. There is C, and there is C++. To be taken seriously, treat them as the very different languages they are.

They have rather similar compilation/linking needs. At least for the purposes of this article, it’s not so egregious to speak of them in the same breath.

Re: Bazel can now build Haskell

#17
post #8

A significant hurdle for the universal adoption of Bazel is its too many dependencies.

sudo apt-get install openjdk-8-jdk sudo apt-get install pkg-config zip g++ zlib1g-dev unzip python That's a fair few things, but it doesn't see that awful. None of those dependencies seem exotic. I wonder if they could get rid of Python by using Jython on top of the JDK.

It's way more than that. It bundles a lot of jars --- building those from source, recursively, is a big task.

(I tried building Bazel and its dependencies completely from source for Guix.)

Re: Bazel can now build Haskell

#18
post #17
post #8

Earlier quoted context omitted.

sudo apt-get install openjdk-8-jdk sudo apt-get install pkg-config zip g++ zlib1g-dev unzip python That's a fair few things, but it doesn't see that awful. None of those dependencies seem exotic. I wonder if they could get rid of Python by using Jython on top of the JDK.

It's way more than that. It bundles a lot of jars --- building those from source, recursively, is a big task. (I tried building Bazel and its dependencies completely from source for Guix.)

I think any big Java app is a mess for distributions. They usually include a ton of jars, since they just get them "for free" when using Maven/Gradle/Ivy.

Building the jars should be trivial in theory (especially for Maven), but the different between theory and practice is smaller in theory than in practice :)

Re: Bazel can now build Haskell

#19
post #2

I wonder if Bazel takes off across many languages. It wouldn't hurt to have a modern autotools & co. replacement across ecosystems. I don't think it's doable, considering the fact that we have language specific package managers and build tools, but you never know. By "replacement", I mean picking up a random open source project and being able to do the equivalent of: ./configure make make install To be able to build…

Man, this might be a dream, but it's one I'd love to see come to some form of fruition.

As someone who's learned programming through self-study, the broad swath of tooling out there can be a bit of a barrier to picking up new languages and concepts, especially when the concepts related to building and delivering software are occluded by some of the opinionated decisions all the different tool sets make about how building projects should work.

Learning a new language and new concepts already takes a good deal of time, which may be a valuable resource if you're not in any official program of study and making use of free moments. This is only exacerbated by the frequent need to learn a whole new tooling ecosystem along with any new language you decide to pick up. A sort of rosetta stone of package management and build tooling would be a godsend.

Post reply on HN