
Calculating Burn Rates in J - sndean
https://www.hillelwayne.com/post/burn-rate-j/
======
alexchamberlain
Just to clarify: % is integer division in J? In C based languages it's
modulus. Whilst having diversity of language is great, it feels odd to choose
to make an operator mean something opposite.

~~~
icen
Yes, `%` is division. It's not that odd, if you look at the symbol - it looks
quite similar to the division symbol `÷`.

It's almost better asking where C got the idea that it should be mod from!

~~~
Something1234
So where did C get the idea to `%` for mod?

~~~
sndean
It looks like % has a different use in BCPL, but it's used for mod in B [0],
so I'm guessing it's a Thompson/Ritchie invention? (unless it came from some
other language that came before B)

[0] [https://www.bell-labs.com/usr/dmr/www/btut.html](https://www.bell-
labs.com/usr/dmr/www/btut.html)

------
emmanuel_1234
I naively thought it was about calculating energy expenditure in Joules.

------
submeta
> It’s a sort of hybrid of a general purpose language and a DSL. Let’s call it
> a Specific Purpose Language, where the purpose in this case is “doing stuff
> to numbers”

While I do appreciate and like both APL and J, I wonder why the author does
not (or does he?) use Python + Pandas for this type of calculations.

~~~
throwaway7645
I've used Pandas a bit and it certainly works well, but there are a lot of
library functions to learn while J seems to basically be learn the two uses
for every symbol and know how to do all math stuff ;).

I'm always impressed to see derivative and both matrix inversion & transpose
as elementary operations instead of googling for a library that is most likely
poorly documented. Furthermore, since the vector is the basic data type,
things like matrices crop up a lot more in J & APL. In Python they are for
scientific pursuits. In J they will often crop up even if you're writing a
blackjack game. I think this is why it doesn't appeal to many programmers
without a strong mathematics background, but it's very appealing to those who
have that kind of background and grow tired of writing incessant loops.

------
ekblom
Is that J an outlook-smiley?

