fendoer 2017-02-27 01:45:27
https://hastebin.com/exanucasez.sql
fendor 2017-02-27 01:45:53
posted it from another device
cocreature 2017-02-27 01:46:14
alright, that does look like a cabal problem. are you sure that you have cleaned up ~/.ghc?
cocreature 2017-02-27 01:46:34
if so, what ghc & cabal version are you using?
fendor 2017-02-27 01:48:05
GHC: 8.0.1
fendor 2017-02-27 01:48:13
cabal-install 1.24
dcoutts 2017-02-27 01:48:21
fendoer: are you quite sure you removed ~/.ghc ?
fendor 2017-02-27 01:48:34
yes, i am, but i can redo it, to be sure
dcoutts 2017-02-27 01:48:48
after that, does ghc-pkg list show any packages marked as broken?
oisdk 2017-02-27 01:49:10
lyxia Looks like this might work. Thanks!
fendor 2017-02-27 01:49:38
well, ghc is marked blue, the rest is white, and no packages claims to be broken
dcoutts 2017-02-27 01:49:48
that's ok then
dcoutts 2017-02-27 01:50:47
fendor: and just to check, that list does not include 'text' right?
fendor 2017-02-27 01:51:16
it does, text-1.2.2.1
fendor 2017-02-27 01:51:33
this might be from the package manager of solus
cocreature 2017-02-27 01:51:45
fendor: what directory does ghc-pkg list for text?
dcoutts 2017-02-27 01:51:50
ok, well that's the one your build log is complaining about
mohsen_ 2017-02-27 01:51:54
-/quit
fendor 2017-02-27 01:52:12
ok, so, maybe cabal is biting itself because of the OS package manager?
dcoutts 2017-02-27 01:52:31
fendor: certainly it will try to use the one your OS package manger installed
dcoutts 2017-02-27 01:52:40
and if that one is busted then...
suppi 2017-02-27 01:53:23
can i suggest downloading a stack binary instead?
fendor 2017-02-27 01:54:58
well, if it worked out correctly, the would be incredible easy to install packages and not having any struggles with cabal
cocreature 2017-02-27 01:55:24
dcoutts: yes please!
fendor 2017-02-27 01:55:32
a stack binary would probably do fine, but it just bugs me, that it does not work
suppi 2017-02-27 01:55:40
fendor: why not download a stack binary? why install via cabal?
suppi 2017-02-27 01:55:48
oh
dcoutts 2017-02-27 01:56:18
stack will have the same problem if you have stack using your system ghc of course
suppi 2017-02-27 01:56:33
then don't :)
fendor 2017-02-27 01:56:56
so, solution: dont use the package manager?
dcoutts 2017-02-27 01:57:22
there are often good reasons to use the system package manager
suppi 2017-02-27 01:57:25
the os one for installing stack?
cocreature 2017-02-27 01:57:37
fendor: what exactly have you installed via your package manager? maybe it provides a package that contains just ghc and not additional packages like "text"
suppi 2017-02-27 01:57:59
it's probably not a problem. i uses the os one to install stack
fendor 2017-02-27 01:58:42
the os does not provide a package for stack, i submitted the suggestion to do so, but currently i cant install it via the package manager
fendor 2017-02-27 01:59:18
cocreature: i actively installed packages like text via the package manager, so it seems to be the problem
suppi 2017-02-27 01:59:20
so yeah, don't use it if you can't...
cocreature 2017-02-27 01:59:33
fendor: in that case, just uninstall them :)
cocreature 2017-02-27 01:59:53
installing ghc via the package manager is fine, installing other haskell packages via the package manager is usually not worth the trouble
fendor 2017-02-27 02:04:46
yeah, i see
fendor 2017-02-27 02:06:52
doing that right now
fendor 2017-02-27 02:08:14
*sigh* why does this not work?
cocreature 2017-02-27 02:08:14
uninstalling does('t work?
fendor 2017-02-27 02:08:14
no, packages via the package manager? i removed everything except for the cabal package of Solus, and it is building right now, seems to work, but dont know yet
cocreature 2017-02-27 02:08:14
the problem is that you can easily get into a situation where you need a different version of a package than the one provided by your package manager. however if a package is installed into the global package database (as done by the package manager) that package is always available so you can't just install a different version since they would conflict. In your particular case the packages provided by
cocreature 2017-02-27 02:08:14
your package manager also seem to be broken which might be the fault of the distribution
suppi 2017-02-27 02:08:14
no one writing a library wants to write and maintain a package for every package manager out there
fendor 2017-02-27 02:08:31
so it is indeed a bad idea to use a package manager for the packages used by a language, in this case haskell?
hpc 2017-02-27 02:08:44
sometimes
suppi 2017-02-27 02:08:51
imo, definitely
hpc 2017-02-27 02:09:00
if you know ahead of time that you are never going to need anything the OS doesn't provide, it's safe to use just packages
hpc 2017-02-27 02:09:10
mixing is what causes trouble
hpc 2017-02-27 02:09:28
so for instance, if you didn't intend to do any haskell development at all and just wanted pandoc
fendor 2017-02-27 02:09:34
so, either the packages manager needs to be more exhaustive or dont use it at all? what a pity...
Clint 2017-02-27 02:09:35
fendor: i use packages exclusively
hpc 2017-02-27 02:09:38
that's fine to get from the package manager instead of building it yourself with cabal
hpc 2017-02-27 02:09:56
but you get a sudden urge to write some code and now you need to cabal install lens or something
cocreature 2017-02-27 02:09:56
fendor: I usually tend to use the packages provided by the package manager if I want to use a package written in a language but not hack on one myself. in the latter case I ignore the system package manager
hpc 2017-02-27 02:10:31
and now you're screwed, because cabal isn't able to control how the pre-packaged packages are built
fendor 2017-02-27 02:11:01
so in short if i want to develop with haskell, i cant use the os package manager?
hpc 2017-02-27 02:11:06
stack solves the problem by working around it entirely, and managing its own everything
fendor 2017-02-27 02:11:11
just if i want to execute some code?
suppi 2017-02-27 02:11:21
just use stack with haskell
dcoutts 2017-02-27 02:11:27
fendor: I think typical practice is to install ghc via system package manager, but nothing else
hpc 2017-02-27 02:11:37
fendor: you can, but it leads to trouble when you try to do certain things
hpc 2017-02-27 02:11:40
and it's not worth the trouble
dcoutts 2017-02-27 02:12:20
fendor: because then by using cabal or stack you can control exactly what versions of haskell packages are used for everything else, including choosing different versions for different projects
fendor 2017-02-27 02:17:11
well, stack seems to work for now, thx guys, i'm a little disappointed in the package manager now, but whatever, thanks guys!
recur22 2017-02-27 02:19:41
hpc: no ffi, i'm looking for translation from code to code
Tuplanolla 2017-02-27 02:49:55
Symbolic algebra without the woes of an imperative language, recur22.
cocreature 2017-02-27 02:53:10
recur22: is there any specific C library you have in mind?
Athas 2017-02-27 02:53:21
glibc!
recur22 2017-02-27 02:53:29
yes
juri_ 2017-02-27 02:53:36
libc5. :)
juri_ 2017-02-27 02:54:41
parts of VLC would be neat to see.
recur22 2017-02-27 02:55:20
is it big yes, will you be intersted in i doubt it
kubunto 2017-02-27 03:40:12
are eithers biased in haskell
locallycompact 2017-02-27 03:40:50
what does that mean?
kubunto 2017-02-27 03:41:02
locallycompact: left is wrong, right is right
kubunto 2017-02-27 03:41:28
or left is fail, right is success
locallycompact 2017-02-27 03:43:01
Either a b is just a type, but the default Functor implementation chains via the right hand type, if that's what you mean
bpa2 2017-02-27 03:43:15
Thank you Hafyddh SetBuffering stdout NoBuffering did the trick.
mniip 2017-02-27 03:43:20
performance wise they are unbiased
locallycompact 2017-02-27 03:43:46
so you can have a functor instance for Either String a
mniip 2017-02-27 03:45:18
locallycompact, nit: without the a
kubunto 2017-02-27 03:45:38
locallycompact: functor?
dram_phone 2017-02-27 04:55:51
Guest86134: On a second thought, that doesn't seem right to me
dram_phone 2017-02-27 04:56:24
if you have h(A) and unify A with h(B) how are you going to prevent h(h(B))...
dram_phone 2017-02-27 04:56:40
I think I should stop messing up your thoughts. Sorry
drostie 2017-02-27 04:58:17
kubunto: then in JS you can write `function zipWith(fn, a, b) { return {first: fn(a.first, b.first), rest: () => zipWith(fn, a.rest(), b.rest())} }` and then finally you can write `var fibs = {first: 0, rest: () => {first: 1, rest: () => zipWith((x, y) => x + y, fibs, fibs.rest())}}` and it will make sense.
kubunto 2017-02-27 04:58:20
drostie: i am workign thru learn you a haskell tutorial
Guest86134 2017-02-27 05:00:27
dram_phone: np, thanks for the help so far! :) (I will never want to unify A with h(B), only flat structures)
drostie 2017-02-27 05:00:50
kubunto: LYAH is ok if you have a very playful mind, but not necessarily the best if you want to get quickly up to speed with hard pragmatics.
dram_phone 2017-02-27 05:00:50
hmm, then why are you even doing that difficult unification business
drostie 2017-02-27 05:00:50
kubunto: I wanted to say that the second way that Haskell is Different is that we have a data type for programs which interact with the world. In most other languages interacting with the world is done with side-effects.
dram_phone 2017-02-27 05:00:50
Just get a union-find sets of variables
drostie 2017-02-27 05:00:50
kubunto: so you call `Math.random()` in JavaScript and as a side-effect it stores some new seed in memory so that future calls to `Math.random()` generate different results.
drostie 2017-02-27 05:01:24
kubunto: In Haskell things like `Date.now()` and `Math.random()` and `console.log()` are instead going to be values of the program type. So they won't do anything by default. Instead the goal of your Haskell program is to create a program which returns `()` called `main`, and this will be spat out as an executable for you to run later.
drostie 2017-02-27 05:02:11
kubunto: in that respect your approach of starting with GHCi is going to confuse you a little bit.
kubunto 2017-02-27 05:02:12
what dram_phone said
dram_phone 2017-02-27 05:02:22
And speaking of Python, TBH when I choose Python over Haskell it's almost always because ready-made bindings
dram_phone 2017-02-27 05:02:58
are better than ad-hoc bindings by me...
drostie 2017-02-27 05:03:02
Because GHCi has the semantics of "if you type in a program, I'm going to run the program and print whatever it produces; if you type in a value I'm going to print the value" and you don't necessarily get this language-crucial feedback of "oh, crap, that was a program."
dram_phone 2017-02-27 05:03:24
That's a good point there
drostie 2017-02-27 05:03:42
kubunto: ok, ymmv. It's just that those two things were the important ones I wish someone had told me when I was starting Haskell by playing around with GHCi.
drostie 2017-02-27 05:04:13
kubunto: helps to, right before you run anything with GHCI, first ask GHCI what its type is.
kubunto 2017-02-27 05:04:23
:t
drostie 2017-02-27 05:04:27
yep.
Cale 2017-02-27 05:05:32
It's worth noting that these things (IO actions) that drostie is referring to as "programs" are themselves also values.
drostie 2017-02-27 05:05:37
then it will tell you, in response to `:t getLine >>= putStrLn` that this is of type `getLine >>= putStrLn :: IO ()`, it is a program which produces a `()` [the unit type, you can think of it as a "null" if you want.]
Cale 2017-02-27 05:06:04
GHCi just has a bunch of special cases for what to do based on the type of the expression you enter.
Tuplanolla 2017-02-27 05:08:51
Are there any remedies to making multithreaded resource management less hard? I keep finding problems where threads die while holding `MVar`s or cause races when passing messages.
Cale 2017-02-27 05:11:02
Well, with respect to the races, STM can help somewhat
Cale 2017-02-27 05:11:05
(by letting you build up transactions which either happen as if they occurred all at once, or not at all)
Cale 2017-02-27 05:11:06
Use withMVar rather than takeMVar and putMVar whenever possible
Cale 2017-02-27 05:11:06
It handles exceptions better.
Tuplanolla 2017-02-27 05:11:07
Sockets and temporary files are my main gripe today.
geekosaur 2017-02-27 05:20:58
but are they raw on disk, or is there a header or etc.?
Cale 2017-02-27 05:21:47
Yeah, I'm assuming that the bytestring was written directly, and yes, it will skip forward to the position you specify without needing to read in the whole file up to that point
danilo2 2017-02-27 05:22:37
geekosaur: in fact they dont exist yet. I want to be able to store some big bytestring on disk and have access to some bytes form given range
danilo2 2017-02-27 05:22:48
geekosaur, Cale: cool , thank you for your help! :)
Guest82102 2017-02-27 05:22:48
does anyone in here use spacemacs?
bennofs 2017-02-27 05:22:49
yes
geekosaur 2017-02-27 05:22:49
right, in tht case iyt' just a seek. although it may still read the file up to that point if it's small enough to not be worth it... but that's largely for the OS to decide
Guest82102 2017-02-27 05:23:56
bennofs, with stack?
kubunto 2017-02-27 05:25:53
ill be back if i has more questions
bennofs 2017-02-27 05:25:53
Guest82102: yes
kadoban 2017-02-27 05:25:53
Anyone know offhand if there's anything particularly clever done by readInteger for converting large integers from ByteString? Apparently this wasn't supposed to be possible with bigints https://www.hackerrank.com/contests/w29/challenges/big-sorting , and I've been told that in other languages it fails spectacularly, but it just works in haskell
Guest82102 2017-02-27 05:26:11
bennofs, do you know how i can pass ghci-options to the intero repl? somewhere in .spacemacs?
bennofs 2017-02-27 05:26:27
Guest82102: uh, no idea, sorry
cocreature 2017-02-27 05:27:03
kadoban: if you can only parse small integers and then have to convert them to a big integer it might get a bit more complicated
glguy 2017-02-27 05:38:37
It's possible that the rpi doesn't have enough ram to compile a new cabal-install starting with GHC 8.0.2
Rub_ixCube 2017-02-27 05:38:48
1GB is enough
glguy 2017-02-27 05:38:56
I was able to do it with 8.0.1 and I seem to remember OOM on 8.0.2
glguy 2017-02-27 05:39:11
Why do you believe that 1GB is enough?
Rub_ixCube 2017-02-27 05:39:19
Chrome runs well :)
glguy 2017-02-27 05:39:26
That's not how numbers work
kadoban 2017-02-27 05:39:42
Heh
bennofs 2017-02-27 05:39:48
Haskell blows your expectations. Regarding memory usage
Cale 2017-02-27 05:39:48
I have 16GB in my laptop and it's barely enough for my work setup
bennofs 2017-02-27 05:40:11
(I should say "GHC")
Rub_ixCube 2017-02-27 05:40:12
?
Rub_ixCube 2017-02-27 05:40:17
oh ye
kadoban 2017-02-27 05:40:28
Yeah, GHC/haskell is unfortunately quite memory heavy. I used to run into trouble on my old machine with 2GB, and even on my current one with 4GB I sometimes wish I had more.
Cale 2017-02-27 05:40:32
(which involves a couple ghcids, a ghci backend, and ghcjs building the frontend)
bennofs 2017-02-27 05:41:21
Cale: probably most of the memory is needed for GHC?
bennofs 2017-02-27 05:41:21
Cale: GHCJS i meant
Cale 2017-02-27 05:41:25
I usually just ssh to my desktop which has 64 GB
massprog 2017-02-27 05:41:39
where haskell should be used?
Cale 2017-02-27 05:41:39
Well, the ghcids each take quite a bit.
juri_ 2017-02-27 05:41:58
I just built a new one with 256GB of ram. runs out after 8 hours.
orion 2017-02-27 05:43:41
Cale: What are the other specifications of your desktop?
bennofs 2017-02-27 05:59:14
Guest82102: not an emacs expert. perhaps http://emacs.stackexchange.com/a/507 ?
Guest82102 2017-02-27 06:00:27
ah it locks on collecting type info
Cale 2017-02-27 06:00:27
So yeah, just checked, and my backend ghcid for this project is 2.1 GB, frontend one is 1.2 GB.
Guest82102 2017-02-27 06:00:27
thanks
Guest82102 2017-02-27 06:01:00
is 302 modules a lot?
Cale 2017-02-27 06:01:33
sorry, 1.6 rather than 1.2, it hadn't finished loading
Guest82102 2017-02-27 06:25:22
how can i debug linker errors?
paiv 2017-02-27 06:32:36
sup guys
nitrix 2017-02-27 06:33:05
Guest82102: Maybe publish/extract what you're working on and open a GHC ticket by providing them your test case.
nitrix 2017-02-27 06:33:56
Guest82102: If it's a linker error, chances are that other people stumbled on it too, so you might be able to find an existing ticket as well.
Guest82102 2017-02-27 06:33:57
nitrix, that's a method of debugging? lol
Guest82102 2017-02-27 06:36:15
that's not a debugging method - i'm asking how to get meaningful debug information from ghci other than linker error -1
nitrix 2017-02-27 06:37:07
Even the verbose mode of GHCi wont get you far.
Cale 2017-02-27 06:37:07
Guest82102: How are you causing that error to occur?
Guest82102 2017-02-27 06:37:19
loading my package into ghci
Guest82102 2017-02-27 06:37:27
then running main
Cale 2017-02-27 06:37:35
hmm
Guest82102 2017-02-27 06:37:39
the package builds successfully
Cale 2017-02-27 06:38:02
If you compile it to an executable and run it, that works okay?
Guest82102 2017-02-27 06:38:18
it croaks for a different reason (the one i'm trying to debug in ghci)
Guest82102 2017-02-27 06:38:22
so i don't know
AndreasK 2017-02-27 06:38:46
bollu: Probably didn't get accepted
nitrix 2017-02-27 06:38:50
Assuming it's really a linker error (which is the only information you provided to me), then my only recommendation is to let the people that knows best about the linker to solve it. These things have plenty of interractions and it's not something we can trivially solve over IRC.
Cale 2017-02-27 06:39:18
I've never seen a linker error which looked like "linker error -1"
nitrix 2017-02-27 06:39:51
Cale: The information so far: gcc: error: /tmp/ghc26073_0/ghc_331.o: No such file or directory
Guest82102 2017-02-27 06:40:15
$- :main
Guest82102 2017-02-27 06:40:16
gcc: error: /tmp/ghc26890_0/ghc_331.o: No such file or directory
Guest82102 2017-02-27 06:40:16
phase `Linker' failed (exitcode = 1)
bollu 2017-02-27 06:40:39
AndreasK: ouch, that's a little sad
Cale 2017-02-27 06:41:33
What is your module's filename?
Guest82102 2017-02-27 06:42:00
Cale, Main
Cale 2017-02-27 06:42:56
"Main.hs"?
Guest82102 2017-02-27 06:43:27
yes main is Main.hs
Cale 2017-02-27 06:43:41
okay
Guest82102 2017-02-27 07:02:29
and my question after all is what in the world is the point
nitrix 2017-02-27 07:04:25
I'm don't think I'm the right person to solve your existantial programmer crisis :P
nitrix 2017-02-27 07:05:13
But I can look at the GHC problem to improve it.
Guest82102 2017-02-27 07:07:27
i'm sorry i'm just waxing poetical after the argument i had with all of those people on r/haskell yesterday
monochrom 2017-02-27 07:09:06
This is why I stay away from reddit
kgadek 2017-02-27 07:09:06
Guest36413: oh, was that your topic there?
kgadek 2017-02-27 07:09:06
Sorry to hear you're disappointed
kgadek 2017-02-27 07:09:06
Or angry
mnoonan 2017-02-27 07:09:06
Guest82102: I have to admit, some of the things mentioned in your post sound like you might just have a borderline-insane codebase that you inherited.
Guest82102 2017-02-27 07:09:06
i'm not angry
Guest82102 2017-02-27 07:09:06
like i said i wanted to love haskell
Guest82102 2017-02-27 07:09:06
i'm annoyed
kgadek 2017-02-27 07:09:06
Ye, Haskell can do that. Especially at the beginning and then even for some time more
nitrix 2017-02-27 07:09:06
Keep in mind the issue you're having is with GHC. Haskell isn't responsible for this.
Guest82102 2017-02-27 07:09:06
programming languages are an ecosystem
kgadek 2017-02-27 07:09:06
nitrix: I don't agree. GHC is the de facto compiler of Haskell
Guest82102 2017-02-27 07:09:06
some of my complaints were about cabal/stack
cobreadmonster 2017-02-27 07:09:06
No Haskell at GSoC this year? :(
nitrix 2017-02-27 07:09:17
I see. It is trying to create a postgres DB at compile-time.
nitrix 2017-02-27 07:09:20
That's naughty.
kgadek 2017-02-27 07:09:44
nitrix: why as a user should I care? GHC's problems are Haskell problems. Nobody actually cares about details. YES, GNU/Linux and not Linux. I don't care
Guest82102 2017-02-27 07:09:48
how do i paste into emacs with evil mode?
mnoonan 2017-02-27 07:10:08
It's kind of hilarious to have shenanigans like that in your build, when your language is so principled about side-effects
Guest82102 2017-02-27 07:10:26
mnoonan, yes!
kgadek 2017-02-27 07:10:41
Agree on shenanigans
Cale 2017-02-27 07:10:49
nitrix: Yeah, that's really stupid imo, but I'm not going to question it for now ;)
mnoonan 2017-02-27 07:11:19
maybe the theory is to move all side-effects into the build, for ultimate run-time purity :)
Guest82102 2017-02-27 07:11:24
haha
nitrix 2017-02-27 07:12:04
kgadek: I cannot have this discussion right now, but I'll still say that you're missing the point. There are plenty of great and bad languages depending on different design decisions. Each affects the final product. Same with compiler development. Thing is, you're able to able amazing languages and bad compilers, or great compilers and shitty languages.
nitrix 2017-02-27 07:13:43
kgadek: Bundling the two is just disrespectful for the parties involved. Again, if GHC is what prevents someone from adopting Haskell, GHC gets improved and that's all.
Cale 2017-02-27 07:15:56
I suspect the problem here lies not even with GHC, but with this insane project's build setup
kgadek 2017-02-27 07:15:56
nitrix: ok, let's skip this discussion. But Haskell is not C++, we don't have 3 big compilers. We have one
Guest82102 2017-02-27 07:15:56
nitrix, but you're missing my point
Guest82102 2017-02-27 07:15:56
a language isn't a grammar
Guest82102 2017-02-27 07:15:56
and a syntax
Guest82102 2017-02-27 07:15:56
not in real life at least
Guest82102 2017-02-27 07:15:56
it's an ecosystem
Guest82102 2017-02-27 07:15:56
that includes compiler, build system, libraries, docs
Guest82102 2017-02-27 07:15:56
everything
Guest82102 2017-02-27 07:15:56
i don't care if the language is formally beautiful if there's no compiler
Guest82102 2017-02-27 07:15:56
hence compiler matters
Guest82102 2017-02-27 07:15:56
at least vacuously
kgadek 2017-02-27 07:15:56
I have full respect for committee behind Haskell. I have full admiration for guys behind GHC. But those are now so tangled that for users... why should they care? I'm with Guest82102
kgadek 2017-02-27 07:16:36
drostie: Cale is debugging a build system that requires Postgres running
kgadek 2017-02-27 07:16:46
(for build!)
nitrix 2017-02-27 07:17:08
Personally, the passive-aggressiveness is starting to turn me off.
Guest82102 2017-02-27 07:17:15
i'm sorry
nitrix 2017-02-27 07:17:15
I'll say you're on your own with this one :)
nitrix 2017-02-27 07:17:21
Going for lunch :P
drostie 2017-02-27 07:17:39
ouch, that sucks.
Cale 2017-02-27 07:18:28
Yeah, this might be too fucked up to bother with right now -- I'm not sure what state I need postgres in to get this to build.
Guest82102 2017-02-27 07:33:03
wouldn't make sense to leave after 1 month
shapr 2017-02-27 07:33:41
Guest82102: SAVE YOURSELF
Guest82102 2017-02-27 07:34:50
haha
Guest82102 2017-02-27 07:34:56
:)
kgadek 2017-02-27 07:35:28
Cale: can't hop to computer right now. What did you see in his codebase?
suppi 2017-02-27 07:39:17
Guest82102: may i ask how many people are working on this team right now?
Guest82102 2017-02-27 07:39:17
1
Guest82102 2017-02-27 07:39:17
me
Guest82102 2017-02-27 07:39:17
:)
shapr 2017-02-27 07:39:17
Guest82102: I would strongly recommend bribing a nearby Haskeller to pair with you
Cale 2017-02-27 07:39:17
kgadek: Well, I dunno, I can't get this thing building because it requires you to have postgres globally configured a particular way
Cale 2017-02-27 07:39:17
just in order to compile
kgadek 2017-02-27 07:39:17
It's in Setup.hs or TH?
shapr 2017-02-27 07:39:17
At that point I'd start swearing in Swedish and find the previous author's home address so I could send glitter bombs.
suppi 2017-02-27 07:39:17
so someone hired a single programmer which is a newbie to the tech to attend to a very big and weird codebase without any guidance?
shapr 2017-02-27 07:39:17
sounds like it
Cale 2017-02-27 07:39:17
kgadek: Template haskell
shapr 2017-02-27 07:39:17
I learned some really good Swedish swearwords when I lived there.
shapr 2017-02-27 07:39:17
insanity
kgadek 2017-02-27 07:39:17
Perkele? :)
shapr 2017-02-27 07:39:17
Nah, that's finnish, but it's good too
Guest82102 2017-02-27 07:39:17
riddle me this type masters: why does this function have two args but its signature only 1
Guest82102 2017-02-27 07:39:17
webLinkDataFile
Guest82102 2017-02-27 07:39:17
https://github.com/databrary/databrary/blob/1e2a94ac93aa6548db418d9dea5edf2b088a9609/Databrary/Web/Generate.hs#L66
Cale 2017-02-27 07:39:17
Guest82102: Perhaps someone from my company can come out and help you, you're in NYC, right?
suppi 2017-02-27 07:39:17
did you know this before taking the job? :(
Cale 2017-02-27 07:39:17
(well, the company I work for, it's not literally mine ;)
kgadek 2017-02-27 07:39:17
Cale: FPcomplete? Galois?
suppi 2017-02-27 07:39:17
because WebGenerator is probably a function
Guest82102 2017-02-27 07:39:17
it's a monad actually
Cale 2017-02-27 07:39:17
Guest82102: Because some wise guy defined WebGenerator as a type synonym for a function type
Guest82102 2017-02-27 07:39:17
or something
Guest82102 2017-02-27 07:39:17
ah
suppi 2017-02-27 07:39:17
bingo https://github.com/databrary/databrary/blob/1e2a94ac93aa6548db418d9dea5edf2b088a9609/Databrary/Web/Types.hs#L39
Guest82102 2017-02-27 07:39:17
lol
Cale 2017-02-27 07:40:31
and then I wouldn't have bothered with the synonym for WebGenerator
kgadek 2017-02-27 07:40:48
Yes, newtype with generalised deriving
kgadek 2017-02-27 07:40:57
That would be much nicer
suppi 2017-02-27 07:41:30
i don't feel like this matters much but oh well
Cale 2017-02-27 07:41:50
Guest82102: But seriously, if you'd like, we could have someone come visit and see if our company can help you in some way
Guest82102 2017-02-27 07:42:28
it's a nice thought but it's as practical as you compiling my package from scratch
Cale 2017-02-27 07:42:35
(We're Obsidian Systems)
Guest82102 2017-02-27 07:42:55
i got push back on rewriting it in Go yesteday
Cale 2017-02-27 07:43:05
(We do web applications entirely in Haskell for various people)
shapr 2017-02-27 07:43:14
Guest82102: just sayin that might save you weeks of frustration
sm 2017-02-27 07:43:40
Guest82102: can't you contact the previous developer ?
shapr 2017-02-27 07:47:11
Guest82102: if you can get it to build, the first thing I'd do is make everything explicit imports so you know where to find things.
sm 2017-02-27 07:47:19
or, continue what Guest82102 is already doing, and get free help from concerned haskellers :)
shapr 2017-02-27 07:47:21
The second thing I'd do is cut it into smaller pieces if that's possible
shapr 2017-02-27 07:47:25
yeah, what sm said
Cale 2017-02-27 07:47:45
also, wtf, whoever wrote this was insane about writing new modules
kgadek 2017-02-27 07:47:48
I could try to help but much later
kgadek 2017-02-27 07:47:58
(If I find time :( )
pikajude 2017-02-27 07:48:00
i want to try too
Cale 2017-02-27 07:48:02
the last 10 modules I clicked on only defined a single thing
pikajude 2017-02-27 07:48:04
can someone link me to the repo again
pikajude 2017-02-27 07:48:14
i've got some free time at work
shapr 2017-02-27 07:48:36
Guest82102: is this it? https://github.com/databrary/databrary/
Guest82102 2017-02-27 07:48:50
yes
Guest82102 2017-02-27 07:48:50
no hires
Guest82102 2017-02-27 07:48:50
it's an academic research group
davean 2017-02-27 08:00:13
"long compilation types" means time?
suppi 2017-02-27 08:00:19
time, sorry
davean 2017-02-27 08:00:31
sorry, it was very confusing, are you on a phone keyboard?
suppi 2017-02-27 08:00:49
i'm sorry, i'm on a keyboard, i'll try to be clearer
davean 2017-02-27 08:01:01
Its ok, I might just missunderstand you
suppi 2017-02-27 08:01:32
when a coworker of mine work on their code, they have to wait for compilation to end in order to know if their code compiles or not
suppi 2017-02-27 08:01:40
i can know in an instant
suppi 2017-02-27 08:02:42
haskell-mode and intero don't work well when your code does not compile. for example if you just opened something broken, you don't really get anything
davean 2017-02-27 08:02:59
suppi: a few things, first if that as important you should be more productive then them, second that is true but not strictly important you can assume with high probability it will compile and move on also
suppi 2017-02-27 08:03:13
brb
ertes 2017-02-27 08:27:11
flxw: basically: make sure choice is local
flxw 2017-02-27 08:27:25
glguy: No, it shouldn't. I'm sumarising the parse heavily.
glguy 2017-02-27 08:27:48
flxw: OK. Make sure those summary values are being forced, too
davean 2017-02-27 08:28:21
flxw: You may want to apply strictness to your datastructure as you parse it, in theory it sometimes can be a thunk to the bytestring, but thats not often an issue
davean 2017-02-27 08:28:52
flxw: you likely won't have any issues though
davean 2017-02-27 08:29:01
flxw: and from what you say, any issue you do run into should be easily fixed
ertes 2017-02-27 08:29:20
i really wonder if attoparsec is actually faster than trifecta… i wouldn't be surprised if it's actually slower
davean 2017-02-27 08:29:28
flxw: Making your datastructure strict would be likely good in this case
davean 2017-02-27 08:29:34
ertes: test it!
davean 2017-02-27 08:29:45
ertes: Can you explain your theory?
flxw 2017-02-27 08:30:15
okay, so much to keep in mind, I'll make a list and proof-read the code for each single of them. :)
davean 2017-02-27 08:31:57
ertes: in far more complicated data structures
ertes 2017-02-27 08:32:08
davean: it is, because it makes sure that stuff like 'many' is still right-associated
davean 2017-02-27 08:32:54
ertes: well, I think we have to seperate out theoretical worst cases and practice here at that point
kubunto 2017-02-27 08:33:10
ertes: tyvm
ertes 2017-02-27 08:33:33
davean: of course… it's just a theory
flxw 2017-02-27 08:33:38
I chose attoparsec because the interface looked simpler than trifecta (^^), and I'm mainly reading lots of machine generated data.
davean 2017-02-27 08:34:27
ertes: Hum, it would be interesting to have a json parser in trifecta to compare ...
davean 2017-02-27 08:34:32
ertes: one often does want the error reporting there
ertes 2017-02-27 08:35:16
davean: actually i think the error reporting may be almost for free (you still pay GC), if you don't actually use the resulting error data
ertes 2017-02-27 08:35:41
and yeah, may be worth benchmarking
davean 2017-02-27 08:35:54
ertes: "almost" when talking about tight loop parsers makes all the difference
davean 2017-02-27 08:36:18
ertes: No one could claim that aeson wasn't tuned to its parser