(This is motivated by my proposal to make it mandatory that packages
have Python identifiers as names, see
https://github.com/hashdist/hashstack/issues/796)
I am fairly certain contracts will be YAML now, and also the parameter
refactoring turned out to be a lot more important than contracts,
contracts were just a guiding star.. but we should revisit the language
part of this discussion:
On 04/25/2015 06:15 PM, Ondřej Čertík wrote:
> On Fri, Apr 24, 2015 at 7:12 AM, Dag Sverre Seljebotn
> <
d.s.se...@astro.uio.no> wrote:
> I actually like that we have a domain specific language using the yaml
> files. I don't want Hashstack to become like SCons, where people just
> keep hacking in Python, instead of implementing/improving the
> underlying support in SCons (as opposed to CMake, which forces people
> to hack less, though people still hack CMake if need to) --- in other
> words, I want less .py files in Hashstack, not more. Each .py file in
> Hashstack means that the underlying support in Hashdist is missing
> some feature, so one has to hack around using .py. We should still
> allow that, but it should be used as a temporary workaround, until we
> implement better support in Hashdist itself.
This is all IMO of course..
I don't know if the reason was very well motivated; somehow it was a lot
easier to think in YAML than in Python for what we wanted to do,
especially since Python is not strictly functional language, while our
YAML specs are. There are many ways of doing it in Python that were
never visited though, so YAML was more like the quick and dirty hack
that allowed us to not think too much.
I'm fairly certain that it was never the intention in that workshop that
Python hooks were "temporary workarounds" until the YAML were powerful
enough. That would mean developing our own full-fledged programming
language. How is that better than using one of the existing ones?
http://xkcd.com/927/
That said, the hook API should of course be improved. And perhaps there
could even be some degree of language-agnosticism in that you could spec
one package using Python and one using Julia and one using Ruby. But I'm
no fan of making our own. (So, e.g., in the YAML file it could say
`expr_language: julia`, and now everything in {{ }} would be Julia
instead of Python.)
Basically Hashdist is a programmatic way of generating stacks; our
Hashstack is a software program. That is really more than what can be
said about Debian/RedHat etc. where the only programmatic element is in
the build phase, not in the specification phase.
Therefore every time we add features we take steps to make Hashdist
closer to a real programming language...
Nix and Guix and Spack all does this too, and they all use proper
programming languages (its own complete, Scheme, and Python, respectively).
I think in isolation, Scheme or Haskell might have been a better
foundation. Julia could be good but is a monstrous dependency to have.
Python has a nice, relatively easily compiled interpreter and is well
known in scientific community and has a C/JavaScript-like syntax that.
So I don't mind us tying our knot more tightly with Python in general.
YAML is nice because things that would be very verbose and not very
idiomatic in Python can be captured quite nicely, but we *do* need hooks
for eternity IMO, since the alternative is making our own programming
language in our YAML files.
Dag Sverre