Hacker News new | past | comments | ask | show | jobs | submit | instig007's comments login

You can get FP compositions without throwing away Python syntax (as Hy does): https://github.com/thyeem/foc

> What is a phony target anyways? And even if you understand the concept, realize it makes no sense to passerby.

This is an entry level bar to the profession, one level below that will be an insult to anyone who calls themselves an engineer.


> Good luck writing Makefiles for OCaml

So what's the problem exactly? https://mmottl.github.io/ocaml-makefile/

Oh look, it even builds a project faster than Dune: https://discuss.ocaml.org/t/dune-build-vs-makefile/11394


> So what's the problem exactly?

They all have the samé problem: that you don't know the name (or even the number) of modules (module files) being generated without reading the source. And as a bonus every compiler uses a sligthly different naming scheme for the generated module file (this is of course no problem for OCaml ;).

As an example (using Fortran). File `test.f90`:

   module first

   contains

    subroutine hello ()
    end subroutine hello

  end module first

  module second

  contains

    subroutine world ()
    end subroutine world

  end module second

`gfortran -c test.f90` yields the following files (2 of them are modules):

  -rw-r--r--    1 roland  staff    221 Sep 21 19:07 first.mod
  -rw-r--r--    1 roland  staff    225 Sep 21 19:07 second.mod
  -rw-r--r--    1 roland  staff    185 Sep 21 19:07 test.f90
  -rw-r--r--    1 roland  staff    672 Sep 21 19:08 test.o

Nix is a general-purpose build system that spans all these languages.

I've never seen anyone use Nix to actually build software; it's a glorified launcher for shell scripts in a sandbox, and typically is used to start the actual build system, such as make/cargo/go build/npm/etc, with known inputs.

> Little tips here and there are nice, but that doesn't teach me the mentality of how to achitect a makefile

What exactly are you missing from the official manual?

- https://www.gnu.org/software/make/manual/make.html

- https://devdocs.io/gnu_make/


what are those horrors about?

Have you tried writing (or even just reading) a configure.ac script?

sure, and there's lots of documentation around it, that's why I asked for examples of the horrors.

> Because it isn't fun checking if the whitespace at the beginning of the line is a tab or spaces. And as said, you must know when to use tabs and/or spaces in rules.

that's why https://editorconfig.org/ exists, so that neither you nor your teammates have to think about these things


> neither you nor your teammates have to think about these things

You're better off using a Makefile linter. But you must know about the problem before being able to solve it. And error messages like

   Makefile:2: *** missing separator.  Stop.
aren't the most helpful.

You'll find the issue within 2 minutes of googling the error message.

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

Search: