Live data from Hacker News

C Minus Minus

en.wikipedia.org

21–30 of 75 posts

Re: C Minus Minus

#21
The API cut ended up being in a different place with LLVM and WebAssembly. But the core idea still stands, and has been a hot potato for many years. In some ways, things are better now since there are fewer architectures than in the 90'es, so you don't have to support that many backends. On the other, things are worse because the amount of work you have to sink into a backend is non-trivial and ever growing.

One particular key aspect is that languages which have strong functional features tend to mismatch with typical imperative backends. This has been true for LLVM. It is unfortunate, because in reality, most IRs are essentially best described as small functional languages: they make state passing explicit, as it exposes better optimization analysis. SSA-form is functional programming in disguise.

Re: C Minus Minus

#22
post #20

From an engineering point of view, it’s interesting they chose to implement their own intermediate language, as opposed to just sticking to LLVM IR and “outsourcing” the problem of code generation. I actually researched this some time ago, and was a bit surprised to learn that modern GHC’s intermediate representation seems to differ from what the C-- paper describes quite substantially, in ways that are only describe…

This project pre-dates LLVM.

Re: C Minus Minus

#23
I asked this on Ask HN sometime back but did not get a lot of responses. So asking it here because it might be of interest to people reading and commenting on this artile here.

Which programming language other than C is available for most platforms?

It is well known that some C compiler implementation is available for almost every computable platform. I am looking for another programming language that has compiler implementations available on a large number of platforms. It must compile source code into native machine code. It doesn't have to match C in ubiquity. It can be less popular than C. But are there any programming languages out there that are available on a large number of platforms?

Re: C Minus Minus

#24
post #23

I asked this on Ask HN sometime back but did not get a lot of responses. So asking it here because it might be of interest to people reading and commenting on this artile here. Which programming language other than C is available for most platforms? It is well known that some C compiler implementation is available for almost every computable platform. I am looking for another programming language that has compiler im…

This is not a direct answer for compiled languages, but Greenspun's tenth rule feels relevant here:

>Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp

Re: C Minus Minus

#25
post #23

I asked this on Ask HN sometime back but did not get a lot of responses. So asking it here because it might be of interest to people reading and commenting on this artile here. Which programming language other than C is available for most platforms? It is well known that some C compiler implementation is available for almost every computable platform. I am looking for another programming language that has compiler im…

> Which programming language other than C is available for most platforms?

Wouldn't any language frontend for gcc count? Last I checked that includes Ada, Fortran, and others.

Re: C Minus Minus

#26
post #23

I asked this on Ask HN sometime back but did not get a lot of responses. So asking it here because it might be of interest to people reading and commenting on this artile here. Which programming language other than C is available for most platforms? It is well known that some C compiler implementation is available for almost every computable platform. I am looking for another programming language that has compiler im…

Well, not really a systems language (and strongly dependant on C), but Lua is usually a good choice and it runs virtually everywhere.

Re: C Minus Minus

#27
post #23

I asked this on Ask HN sometime back but did not get a lot of responses. So asking it here because it might be of interest to people reading and commenting on this artile here. Which programming language other than C is available for most platforms? It is well known that some C compiler implementation is available for almost every computable platform. I am looking for another programming language that has compiler im…

:ICANT: java :ICANT:

Re: C Minus Minus

#28
post #23

I asked this on Ask HN sometime back but did not get a lot of responses. So asking it here because it might be of interest to people reading and commenting on this artile here. Which programming language other than C is available for most platforms? It is well known that some C compiler implementation is available for almost every computable platform. I am looking for another programming language that has compiler im…

Two very different answers for you.

1: Forth. I've seen Forth on things that I didn't even realize were computers. Since an interpreter can run in a few hundred bytes of ROM, that's not too surprising.

2: Rust. Rust can run on 8/16 bit micros, client side web (WASM), and on iOS, along with all of the more conventional and easier targets. Probably the only popular universal language for 2022 targets, although there are Rust competitors like Zig that may falsify that statement.

And in a nice coincidence, both languages are fun.

Re: C Minus Minus

#29
post #23

I asked this on Ask HN sometime back but did not get a lot of responses. So asking it here because it might be of interest to people reading and commenting on this artile here. Which programming language other than C is available for most platforms? It is well known that some C compiler implementation is available for almost every computable platform. I am looking for another programming language that has compiler im…

> Which programming language other than C is available for most platforms?

There is almost no platform java can't run on. Rust is a bit esoteric, but it can run anywhere you have a working libc.

Re: C Minus Minus

#30
post #23

I asked this on Ask HN sometime back but did not get a lot of responses. So asking it here because it might be of interest to people reading and commenting on this artile here. Which programming language other than C is available for most platforms? It is well known that some C compiler implementation is available for almost every computable platform. I am looking for another programming language that has compiler im…

If you are looking for a language that is portable across platforms and widespread/long-lived enough to make learning it deep worth it, i think C is unmatched and will probably stay like this for a while.
Post reply on HN