merijn 2017-01-30 01:45:28
Profpatsch: Why not just add type signatures to avoid both warnings?
Profpatsch 2017-01-30 01:50:36
merijn: It's a Resource.hs, which basically contains all my applications user-facing texts as functions.
Profpatsch 2017-01-30 01:52:16
merijn: {-# GHC_OPTIONS -Wno-type-defaults -Wno-missing-signatures #-}
Profpatsch 2017-01-30 01:52:26
gives me "unrecognized pragma"
merijn 2017-01-30 01:52:57
Suppose I have an N-dimensional space of hypercubes and want to find the change hyperplanes (i.e., where there's a change in the hypercubes bisecting the plane in that dimension), any pointers in data structures/algorithms I wanna look at?
lyxia 2017-01-30 01:53:01
oh, it's OPTIONS_GHC https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#options-ghc-pragma
Profpatsch 2017-01-30 01:53:40
lyxia: Nice, thanks.
Profpatsch 2017-01-30 01:54:13
That way I can have -Wall and selectively disable warnings if I'm sure they are okay.
merijn 2017-01-30 01:54:52
Profpatsch: But if you're sure they're ok why not just add annotations to avoid them in the first place?
Profpatsch 2017-01-30 01:55:13
merijn: Because that's a lot of typing for a lot of messages.
Profpatsch 2017-01-30 01:55:34
It's just boilerplate in that case.
Profpatsch 2017-01-30 01:55:43
Especially since I added a
Profpatsch 2017-01-30 01:55:50
default (Text)
Profpatsch 2017-01-30 01:55:55
at the top of the module.
Profpatsch 2017-01-30 01:56:30
So that GHC doesn't default the strings to [Char]
merijn 2017-01-30 01:57:33
*shrug*
merijn 2017-01-30 01:58:20
Bleh, I know there must be some research on what I want to do, but I'll be damned if I can come up with the right terms to find it...
hpc 2017-01-30 01:59:32
just search arxiv for "finding the thing i want on arxiv"
merijn 2017-01-30 02:00:03
hpc: >.>
merijn 2017-01-30 02:10:13
hpc: It's times like these that I wish this completely unrealistic semantic web thing took off :p
merijn 2017-01-30 02:11:57
Or that the math nerds were awake while I work >.>
hpc 2017-01-30 02:12:43
it's times like these i wish i understood your original problem ;)
merijn 2017-01-30 02:13:03
hpc: It's actually not even that complicated!
Profpatsch 2017-01-30 02:14:21
It's everyday programmer's stuff of course
merijn 2017-01-30 02:14:28
hpc: Suppose you have a 3D space you could partition it into a set of cubes of different sizes, yes? Now I can take the intersection of this 3D space in any of it's 3 dimensions and basically see a cross-section
osa1 2017-01-30 02:14:31
anyone knows a good way to generate NominalDiffTimes in a given range in QuickCheck?
Profpatsch 2017-01-30 02:14:49
==> ?
merijn 2017-01-30 02:14:54
hpc: Now, I want to find the points (in all 3 dimensions) where the squares in this cross-section change
merijn 2017-01-30 02:15:20
hpc: Except, I wanna do all this for a number of dimensions N where N > 3 :p
hpc 2017-01-30 02:15:20
so collision detection?
hpc 2017-01-30 02:15:25
in higher dimensions
merijn 2017-01-30 02:15:27
hpc: Not quite
merijn 2017-01-30 02:15:44
hpc: Or maybe it is? I'm not sure :p
hpc 2017-01-30 02:16:03
you have one thing, the hypercube
hpc 2017-01-30 02:16:07
and another thing, the hyperplane
hpc 2017-01-30 02:16:12
and you want to see how they touch
merijn 2017-01-30 02:16:17
hpc: Not quite
merijn 2017-01-30 02:16:50
hpc: Suppose I take the cross section at X=1 and X=2 the cubes in the cross section might be different, yes?
merijn 2017-01-30 02:17:07
I want to find the exact X point at which the cubes in the cross-section change
hpc 2017-01-30 02:17:34
ah
lyxia 2017-01-30 02:17:48
osa1: generate an Integer within some range and use fromInteger?
osa1 2017-01-30 02:17:58
lyxia: I need sub-second precision
osa1 2017-01-30 02:18:04
forgot to mention
merijn 2017-01-30 02:18:26
hpc: Which, while rather specific, seems like the kind of problem someone somewhere already solved :p
lyxia 2017-01-30 02:21:01
osa1: then you can use fromRational
lyxia 2017-01-30 02:21:46
or do divisions
_deafbeef 2017-01-30 02:22:03
is there no one awake that has insights on my ghc + DLLs conundrum? :\
osa1 2017-01-30 02:22:10
lyxia: it's still annoying bauase `Ratio Int` is not an instance of Random so `choose` doesn't work
merijn 2017-01-30 02:23:39
_deafbeef: I suspect the majority of people are not working on Windows and thus feel unqualified to comment
osa1 2017-01-30 02:23:40
anyway, that's not too hard using ratios, just annoying
merijn 2017-01-30 02:23:56
_deafbeef: You might want to try the mailing lists to have a better chance at reaching people using Windows
Profpatsch 2017-01-30 02:29:12
Is it just me or should GHC handle error messages involving type aliases differently?
Profpatsch 2017-01-30 02:29:20
That is expand them less confusingly?
Profpatsch 2017-01-30 02:29:35
• Couldn't match type 'L.HtmlT Identity ()' with 'Text'
Profpatsch 2017-01-30 02:29:37
Expected type: Text.Digestive.View.View Text -> Text
Profpatsch 2017-01-30 02:29:39
Actual type: Text.Digestive.View.View (L.Html ()) -> Text
Profpatsch 2017-01-30 02:29:59
In this case it's easy to see that Html () = HtmlT Identity ()
Profpatsch 2017-01-30 02:30:26
But when you have servant API type aliases, it gets very, very, very interesting
lyxia 2017-01-30 02:31:30
Things can definitely be improved.
merijn 2017-01-30 02:31:57
Profpatsch: GHC tries to use the tpe alias as used in the signatures it reads
merijn 2017-01-30 02:32:11
Profpatsch: Whether that's always desirable is debatable