miko__ 2017-01-28 10:45:41
`stack build` can't find a compiler (expects 8.0.1), form the shell ghc --version indicates a 8.0.1.
miko__ 2017-01-28 10:46:04
stracing `stack build` shows that it even stats the correct binary.
hpc 2017-01-28 10:49:01
stack is a reproducible build system, so it has to use its own version of ghc to keep control of the build environment
miko__ 2017-01-28 10:50:40
I prefer to control my environment with nix :)
miko__ 2017-01-28 10:51:14
Oh, yes I solved it. ouch. ouch. wrong architecture.
Theophane 2017-01-28 10:51:30
:D
ph88 2017-01-28 11:17:40
hitting 3K loc ^^
Tuplanolla 2017-01-28 11:19:36
GHC just hogged so much memory it swapped out IRC and I disconnected.
Tuplanolla 2017-01-28 11:19:56
It was entirely my fault too.
Tuplanolla 2017-01-28 11:20:24
I still wish I didn't have to go through this every couple of months.
ph88 2017-01-28 11:25:50
install more memory :P
Tuplanolla 2017-01-28 11:27:43
If a line wrapping algorithm is given zero width to work with, should it return an infinite stream of empty lines or no lines at all?
ph88 2017-01-28 11:28:32
no wonder you are running out of memory lol
Tuplanolla 2017-01-28 11:28:47
This is tangentially related.
Theophane 2017-01-28 11:28:57
:')
pikajude 2017-01-28 11:28:58
Tuplanolla: what's the difference?
Tuplanolla 2017-01-28 11:29:40
It's a philosophical question, much like defining the surface area of a zero-dimensional ball, pikajude.
pikajude 2017-01-28 11:30:02
that's an easy one. 3 square inches
ph88 2017-01-28 11:30:07
i would go for the practical answer: no lines at all
pikajude 2017-01-28 11:30:29
i'd say an infinite stream of empty lines
ph88 2017-01-28 11:30:31
i consider it an edge case where you can divide a number by all numbers just not 0
pikajude 2017-01-28 11:30:38
because if you combine enough empty lines you eventually get your text back
pikajude 2017-01-28 11:30:46
the same way that 0.9 repeating == 1
Tuplanolla 2017-01-28 11:30:49
I feel like the infinite stream is morally correct, but I should really return an error here.
pikajude 2017-01-28 11:31:02
oh, you didn't mention that
pikajude 2017-01-28 11:31:05
it would be a better idea to return an error
hpc 2017-01-28 11:31:35
an infinite stream is certainly funnier
ph88 2017-01-28 11:32:56
infinite memory would be funny as well
pavolzetor 2017-01-28 11:34:19
I am working on improving performance of my ray tracer and I would like to add ray filtering, i.e. during traversal a bunch of rays is tested against primitive, ones intersecting it are traversed furher (depth first)
monochrom 2017-01-28 11:34:25
Line wrapping under zero width sounds like division by zero to me.
pavolzetor 2017-01-28 11:34:54
the problem is the sets returned from traversal can be smaller, or objects can be closer
pavolzetor 2017-01-28 11:35:22
in C++ it could be done using std::partition and modifying t_hit of the ray
pavolzetor 2017-01-28 11:35:31
(the bunch is traced serially)
Tuplanolla 2017-01-28 11:35:43
Technically `repeat ""` doesn't contain a single incorrectly wrapped zero-length line, monochrom.
Tuplanolla 2017-01-28 11:36:17
Then again it doesn't really contain the text either. We have arrived at the excluded middle.
monochrom 2017-01-28 11:36:39
Yeah, but you are also under the promise of "the input has to appear in the output somewhere"
pavolzetor 2017-01-28 11:36:46
I have no idea how to go about it
pavolzetor 2017-01-28 11:37:12
for example using Maybe would traverse whole bunch each time
pavolzetor 2017-01-28 11:38:02
and if the order is changed, the rays would need to store an id so they can be merged (i.e., pick the closest hit)
monochrom 2017-01-28 11:38:29
There is also an agreement on "the output should be the shortest possible".
pavolzetor 2017-01-28 11:39:17
this is the description of the algorithm http://psychopath.io/breadth-first-ray-tracing/
monochrom 2017-01-28 11:41:46
pavolzetor: I am too lazy to read carefully, but "partition" exists in Data.List
monochrom 2017-01-28 11:42:04
And if you prefer to use Data.Set, there is some kind of partition too.
Tuplanolla 2017-01-28 11:43:37
Did this guy just write three articles on ray tracing without a single figure?
monochrom 2017-01-28 11:44:32
I don't know. But I know a linear algebra book that proves a hundred theorems without a single matrix. :)