Live data from Hacker News

Roger Hui has died

jsoftware.com

31–40 of 48 posts

Re: Roger Hui has died

#31

I wanted to learn more about "J" and this person, it is a nifty language Some people might enjoy this thread on "A look at the J language: the fine line between genius and insanity (2012)" https://news.ycombinator.com/item?id=16393873 Also this answer here at math stack exchange https://math.stackexchange.com/questions/856153/the-j-progra...

The SO answer is easy to follow right until the final operator “/“ where it just goes “magic”. That’s less than helpful as the rest is quite straightforward aside from the syntax.

Its very short description of the two-arguments version make it sound like a fold, but that wouldn’t generalise to what looks like a cartesian product, would it?

Re: Roger Hui has died

#32

I wanted to learn more about "J" and this person, it is a nifty language Some people might enjoy this thread on "A look at the J language: the fine line between genius and insanity (2012)" https://news.ycombinator.com/item?id=16393873 Also this answer here at math stack exchange https://math.stackexchange.com/questions/856153/the-j-progra...

The SO answer is easy to follow right until the final operator “/“ where it just goes “magic”. That’s less than helpful as the rest is quite straightforward aside from the syntax. Its very short description of the two-arguments version make it sound like a fold, but that wouldn’t generalise to what looks like a cartesian product, would it?

[deleted]

Re: Roger Hui has died

#33

I wanted to learn more about "J" and this person, it is a nifty language Some people might enjoy this thread on "A look at the J language: the fine line between genius and insanity (2012)" https://news.ycombinator.com/item?id=16393873 Also this answer here at math stack exchange https://math.stackexchange.com/questions/856153/the-j-progra...

The SO answer is easy to follow right until the final operator “/“ where it just goes “magic”. That’s less than helpful as the rest is quite straightforward aside from the syntax. Its very short description of the two-arguments version make it sound like a fold, but that wouldn’t generalise to what looks like a cartesian product, would it?

If I understand it right "*/" results in a function that applies "*" between its arguments. "~" takes the function f(x) on its left and the argument y on its right and turns it into f(y, y).

So the right side of the tilde evaluates to a range 1..10. I think the tilde then turns its left and right into "*/"(1..10, 1..10), resulting in 1..10 * 1..10

Re: Roger Hui has died

#34

68 years young. Fuck cancer (my father died from it at 71). RIP.

Sorry to hear that. F cancer.

My Dad is dying now from it. 83 but the time has gone so fast. He was otherwise in top shape.

I have high hopes for the new blood test that can detect several types of cancer at a very early stage. It's in trials now in the UK.

Re: Roger Hui has died

#35
post #33

Earlier quoted context omitted.

The SO answer is easy to follow right until the final operator “/“ where it just goes “magic”. That’s less than helpful as the rest is quite straightforward aside from the syntax. Its very short description of the two-arguments version make it sound like a fold, but that wouldn’t generalise to what looks like a cartesian product, would it?

If I understand it right "*/" results in a function that applies "*" between its arguments. "~" takes the function f(x) on its left and the argument y on its right and turns it into f(y, y). So the right side of the tilde evaluates to a range 1..10. I think the tilde then turns its left and right into "*/"(1..10, 1..10), resulting in 1..10 * 1..10

Something akin to a map operation maybe?

Re: Roger Hui has died

#36
post #33

Earlier quoted context omitted.

The SO answer is easy to follow right until the final operator “/“ where it just goes “magic”. That’s less than helpful as the rest is quite straightforward aside from the syntax. Its very short description of the two-arguments version make it sound like a fold, but that wouldn’t generalise to what looks like a cartesian product, would it?

If I understand it right "*/" results in a function that applies "*" between its arguments. "~" takes the function f(x) on its left and the argument y on its right and turns it into f(y, y). So the right side of the tilde evaluates to a range 1..10. I think the tilde then turns its left and right into "*/"(1..10, 1..10), resulting in 1..10 * 1..10

/ does different things depending on the arity of the preceding function.

'f/ x' is 'insert' - i.e. reduce, so that '+/ 1+i.10' yields 55.

'x f/ y' is 'table', inserting 'f' between each pair to form a generalised multiplication table.

The documentation for j is unsurprisingly terse, but it is complete and very helpful.

https://code.jsoftware.com/wiki/Vocabulary/slash#dyadic

Re: Roger Hui has died

#37
post #33

Earlier quoted context omitted.

The SO answer is easy to follow right until the final operator “/“ where it just goes “magic”. That’s less than helpful as the rest is quite straightforward aside from the syntax. Its very short description of the two-arguments version make it sound like a fold, but that wouldn’t generalise to what looks like a cartesian product, would it?

If I understand it right "*/" results in a function that applies "*" between its arguments. "~" takes the function f(x) on its left and the argument y on its right and turns it into f(y, y). So the right side of the tilde evaluates to a range 1..10. I think the tilde then turns its left and right into "*/"(1..10, 1..10), resulting in 1..10 * 1..10

> I think the tilde then turns its left and right into "/"(1..10, 1..10), resulting in 1..10 1..10

That is the part which doesn’t make sense to me: `/ v` is `foldl1 () v`, how does that generalise to a cartesian product when applied to >1 sequences?

Re: Roger Hui has died

#38
post #33

Earlier quoted context omitted.

If I understand it right "*/" results in a function that applies "*" between its arguments. "~" takes the function f(x) on its left and the argument y on its right and turns it into f(y, y). So the right side of the tilde evaluates to a range 1..10. I think the tilde then turns its left and right into "*/"(1..10, 1..10), resulting in 1..10 * 1..10

> I think the tilde then turns its left and right into " /"(1..10, 1..10), resulting in 1..10 1..10 That is the part which doesn’t make sense to me: ` / v` is `foldl1 ( ) v`, how does that generalise to a cartesian product when applied to >1 sequences?

Dyadic `x / y` is different to monadic `/ y`

Re: Roger Hui has died

#39
post #36
post #33

Earlier quoted context omitted.

If I understand it right "*/" results in a function that applies "*" between its arguments. "~" takes the function f(x) on its left and the argument y on its right and turns it into f(y, y). So the right side of the tilde evaluates to a range 1..10. I think the tilde then turns its left and right into "*/"(1..10, 1..10), resulting in 1..10 * 1..10

/ does different things depending on the arity of the preceding function. 'f/ x' is 'insert' - i.e. reduce, so that '+/ 1+i.10' yields 55. 'x f/ y' is 'table', inserting 'f' between each pair to form a generalised multiplication table. The documentation for j is unsurprisingly terse, but it is complete and very helpful. https://code.jsoftware.com/wiki/Vocabulary/slash#dyadic

Ah so the explanation is pretty much just “magic”.

Re: Roger Hui has died

#40
post #36

Earlier quoted context omitted.

/ does different things depending on the arity of the preceding function. 'f/ x' is 'insert' - i.e. reduce, so that '+/ 1+i.10' yields 55. 'x f/ y' is 'table', inserting 'f' between each pair to form a generalised multiplication table. The documentation for j is unsurprisingly terse, but it is complete and very helpful. https://code.jsoftware.com/wiki/Vocabulary/slash#dyadic

Ah so the explanation is pretty much just “magic”.

It's no more magical than anything else. It just turns out that j has an operator that does exactly what you want.

Having such operators and functions is far from an uncommon experience in j.

Post reply on HN