Troels Henriksen

Results 278 comments of Troels Henriksen

[This tutorial for Haskell seems to get the point across](https://www.fpcomplete.com/haskell/tutorial/lens/) although it goes much further than you'd need to in Futhark.

An FFI that allows you to directly call foreign functions from Futhark is still a long-term goal. It is however *relatively* to use the C API to take the output...

Yes, this needs better examples. The rules do follow "naturally" from the basic concepts of parametric polymorphism and modules, but "naturally" in terms of logic does not imply it's intuitive...

This is the best I can do without adding new primitives. I think it has the right asymptotics (work *O(n)*, span *O(log(n))*), but it feels gross: ``` let map_opt [n]...

I continued on and ended up writing the basic Maybe/Either combinators from Haskell: ``` type opt 'a = #some a | #none let opt 'a 'b (b: b) (f: a...

Philip Munksgaard writes: > It currently tunes all entrypoints, doesn't it? Yes. > Also, when given a tuning file that doesn't contain all the tuning > parameters for a program,...

I'd also be willing to accept a different notation for this kind of indexing, if someone can think of one that is tolerable.

> could be treated as a[i⊗j] where ⊗ is the “tensor product” of the two lists? I am aware you are trolling, but I did consider that `a[i,j]` where `i`...

In NumPy, indexing is never with arrays of tuples. To index a multidimensional array with other arrays, you use `y[is,js]`. This is in many ways simpler. It also fits the...

I have a hard time coming up with a design that doesn't involve an index array per dimension in the *core language* anyway. Could you remind me again of what...