01:08:37 <mafs> There, all other work out of the way. Finally more time to play with happstack
01:09:06 <stepkut> yay!
01:09:15 <stepkut> I am doing work.. but it is work that uses Happstack ;)
01:09:25 <stepkut> working on yet another authentication library :)
01:09:35 <mafs> Nice! Me too actually, which is why I'm not going to consider it work ;)
01:09:42 <stepkut> heh
01:09:55 <stepkut> are you doing an authenication library too ?
01:10:21 <mafs> Oh no, meant me too as in doing work with it
01:10:27 <stepkut> ;)
03:13:02 <etarasov> stepkut: what kind of authentication do you work on?
03:13:27 <etarasov> ACTION works on unix pam bindings
04:17:48 <mafs> etarasov: good question, I was going to ask that earlier
04:21:03 <stepkut> etarasov: authentication for web apps. Right now you can use openid or a local username/password based system. The 'local' auth system uses PBKDF2 for hashing the password..
04:21:14 <stepkut> etarasov: I am open to other suggestions though ;)
04:22:15 <mafs> stepkut: what's the current status on oauth stuff with web apps? That's the next thing on my task list if nothing is out there for it (haven't looked into it yet)
04:23:12 <stepkut> mafs: not sure.. there is an oauth library on hackage, but I have not used it yet
04:23:31 <stepkut> mafs: I do not yet have a website where I am ready to start exporting data via a web service
04:23:49 <stepkut> mafs: nor am I looking to import data from 3rd party sites
04:23:58 <mafs> stepkut: Alright, cool. I'll play around with that then. My immediate Googling didn't reveal much before
04:24:14 <mafs> I'm using happstack for an API, so of course of interest to me. I've used hoauth, just need to see how well that'll tie in with happstack
04:24:22 <stepkut> This is all I know of, http://hackage.haskell.org/package/hoauth
04:24:25 <stepkut> yeah, hoauth
04:24:46 <stepkut> gotta make popcorn, brb
04:24:50 <mafs> k
04:55:43 <stepkut> ok, back :)
04:56:30 <stepkut> do you want use oauth to access resources on other servers? Or to export data from a happstack app ?
04:58:05 <mafs> export data
04:59:39 <stepkut> ah.. I think hoauth does not support that yet
05:00:02 <mafs> stepkut: That's what I suspected. I haven't looked into using it for that yet though, not at that stage of the project
05:00:08 <stepkut> I will eventually need oauth support -- but I am not there yet :)
05:00:21 <mafs> I'll be sure to post what I come up with when I get there
05:00:36 <stepkut> the openid/authenticate part I definitely need right now :)
05:00:52 <stepkut> I got it working in one app, but now I am pulling it out into a general purpose library
05:01:08 <mafs> Ah, fun. I'm sure that will be useful for many
05:01:20 <stepkut> and then I'll see if it makes sense to try to merge it with the happstack-auth library or not
05:01:29 <stepkut> yeah
05:02:20 <stepkut> there are a bunch of little apps that I have not started because I don't have the authenticate stuff split out yet
05:06:52 <stepkut> but soon I *will* have authenticate split out :)
05:25:59 <mafs> nice, I'll keep an eye out for it ;)
05:26:47 <stepkut> sweet
15:40:17 <etarasov> stepkut: I would like to see a function[s], that takes a custom auth function (User -> Passwd -> IO Bool) and implements all web authentication stuff, including cookies, sessions, parameters in application's state etc
15:46:34 <Entroacceptor> sounds good, but it needs stuff for SSO and the like, too
15:47:13 <etarasov> i'm googling against kerberos right now =)
16:12:00 <TimeCat> I am having a problem with happstack, but it might be GHC and not sure how to resolve it
16:13:01 <TimeCat> I think it is a problem with accidentially having multiple installations of Happstack, but I don't quite know how to unregister the happstack packages
16:13:29 <Entroacceptor> I just rm -rf ~/.ghc
16:15:47 <stepcut> TimeCat: there is a script, bin/unergister-all.sh that you can run
16:16:00 <stepcut> though you might have to run it more than once if you have happstack installed more than once..
16:18:15 <TimeCat> stepcut: but wouldn't that break a lot of other things as well?
16:18:43 <TimeCat> Or I guess I would just have to reinstall everything?
16:19:24 <stepcut> TimeCat: the unregister-all.sh is something that comes in the happstack darcs source, it only unregisters happstack stuff
16:19:36 <stepcut> are you installing from hackage or from darcs ?
16:21:38 <TimeCat> stepcut: cabal install happstack (hackage I am fairly sure)
16:25:46 <TimeCat> stepcut: sorry for the trouble but where should this script be?
16:28:10 <TimeCat> stepcut: ugh sorry did you mean that I wouldn't have it installed if I cabal installed happstack, only if I got the source via darcs?
16:29:00 <Entroacceptor> TimeCat: that script comes with the sources
16:29:11 <Entroacceptor> you won't have it if you only installed it via hackage
16:29:32 <Entroacceptor> there it is: http://pastie.org/private/bsr0af5fjk1cp2menczjga
16:29:49 <TimeCat> Entoacceptor: thanks
16:31:21 <stepkut> TimeCat: you might want to try using the darcs version of happstack. It's pretty much ready for release. You can find install instructions here, http://happstack.com/download
16:34:00 <TimeCat> stepkut: thanks I got that, but I am fairly afraid of adding ANOTHER happstack, when the two I already have are breaking each other
16:35:09 <TimeCat> stepkut: the unregister all script couldn't find any of the packages (I think becase I did the same thing by hand a little bit ago), and ghc-pkg check returns nothing but the simple hello world still won't compile and gives the same error
16:36:45 <stepkut> you did ghc-pkg unregister on the packages, but they still show up if you do ghc-pkg list ?
16:37:59 <TimeCat> I don't see them in the list, should I just reinstall now?
16:45:26 <stepkut> what error do you get when you try to build hello world
16:49:19 <TimeCat> Could not find module `Happstack.Server':...
16:50:32 <mafs> If you'v[C[Ce already done the cleanup, unregistered, etc., you should try installing from darcs at this point.
16:50:41 <mafs> you've* even
16:52:16 <TimeCat> mafs: thanks, I started the installation and tests from darcs we'll see how it goes
16:57:07 <stepkut> TimeCat: sweet
17:00:04 <TimeCat> stepkut: uh,  I think I might still have conflicting vesion issues:
17:00:32 <TimeCat> Preprocessing executables for happstack-server-0.5.1...
17:00:32 <TimeCat> Building happstack-server-0.5.1...
17:00:32 <TimeCat> src/Happstack/Server/Internal/Timeout.hs:28:17:
17:00:32 <TimeCat>     Ambiguous module name `Network.Socket.ByteString':
17:00:32 <TimeCat>       it was found in multiple packages:
17:00:34 <TimeCat>       network-bytestring-0.1.3.3 network-2.3
17:00:37 <TimeCat> cabal: Error: some packages failed to install:
17:00:40 <TimeCat> happstack-server-0.5.1 failed during the building phase. The exception was:
17:00:42 <TimeCat> ExitFailure 1
17:00:55 <mafs> When I installed I think I had to constrain on containers-0.3.0.0 and network < 2.3
17:01:18 <dcoutts> recent versions of network include what used to be in network-bytestring
17:01:42 <TimeCat> workaround?
17:02:12 <stepkut> hmm
17:02:20 <stepkut> I should probably patch the .cabal file then
17:02:23 <stepkut> one moment
17:04:54 <stepkut> I think I need to patch .cabal so that it only includes network-bytestring if network < 2.2.3
17:05:54 <dcoutts> which is possible but slightly non-trivial
17:06:08 <stepkut> is there a better way ?
17:06:19 <TimeCat> stepkut: thanks for all your help, but I have to get going to work. I will check back in later, and try to get this working again tonight.
17:06:36 <stepkut> TimeCat: thanks for you help! Fixing this lingering install issues is the last major obstacle before a new stable release
17:06:46 <dcoutts> stepcut: not unless you want to fix on using versions before/after 2.3
17:08:02 <stepkut> dcoutts: I want whatever is going to be mostly likely to work for people
17:09:18 <dcoutts> stepcut: I'm not sure cabal-install deals with such conditional constraints ideally
17:09:34 <dcoutts> it might be simpler to just pick pre 2.3, or to pick post 2.3
17:12:23 <stepkut> hmm
17:13:08 <dcoutts> stepcut: network 2.3 claims to work with base 3 and 4
17:13:18 <dcoutts> so that's ghc 6.8 - 7
17:13:48 <stepkut> yeah
17:14:07 <stepkut> though it means that happstack can only get into Debian if they decide to use network 2.3
17:14:56 <dcoutts> stepcut: so if you want a wide a range as possible then you can use the conditional trick
17:15:14 <stepkut> how do I do the conditional trick though ?
17:15:27 <dcoutts> the only thing I was thinking of is that cabal-install's dep planner may just go with the default rather than exploring both possiblities
17:15:45 <dcoutts> stepcut: same as the base4 flags you see around the place
17:16:01 <dcoutts> the flag system is a simple logic language
17:16:17 <dcoutts> you declare a flag
17:16:39 <stepkut> oh right I see how that will work
17:16:43 <dcoutts> then you set things up so that if the flag is true, then network > 2.3, and if the flag is false then network <= 2.3
17:17:14 <dcoutts> but as I say, I don't think the cabal dep planner is currently smart enough to explore both flag possibilities
17:17:39 <dcoutts> (it will do for the base4 flags, but that's because cabal knows that it cannot install new versions of base, so it has only the choices of the installed versions)
17:18:47 <stepkut>   if flag(network_2_3)
17:18:47 <stepkut>     Build-Depends:     network >= 2.2.3
17:18:47 <stepkut>   else
17:18:48 <stepkut>     Build-Depends:     network < 2.2.3, network-bytestring
17:18:51 <stepkut>  
17:20:51 <stepkut> seems to work
19:44:22 <TimeCat> stepkut: I pulled the change that was made today, and now I don't get any errors on installation, but I still get an error saying that it can't find Happstack.Server
19:44:41 <stepkut> how are you building the demo app ?
19:45:08 <TimeCat> just the way that it suggests on this page: http://happstack.com/docs/crashcourse/HelloWorld.html#hello_world
19:45:43 <stepkut> when you do, ghc-pkg list, happstack-server shows up in that list ?
19:45:57 <TimeCat> stepkut: hang on just a minute I thought of something
19:47:52 <TimeCat> stepkut: So it does show up in ghc-pkg list, and what I thought didn't work either
19:48:43 <stepkut> hmm
19:49:27 <stepkut> can you do, ghc --make -threaded -v HelloWorld.hs -o helloworld, and paste the output to hpaste.org
19:49:32 <stepkut> note the addition of -v
19:49:44 <TimeCat> stepkut: I think it still might be an issue of conflicting package databases.
19:49:50 <TimeCat> and yes, I will do that
19:54:33 <stepkut> TimeCat: could be ... I think that if happstack got built against an older version of a library but ghc is trying to use a newer version of that library, it will stop seeing Happstack.Server
19:58:29 <TimeCat> stepkut: sorry for the delay, and the bad lf
19:58:32 <TimeCat> http://hpaste.org/43474/happstack_issue
20:00:41 <stepkut> no worries, I am cooking lunch anyway
20:01:54 <stepkut> looks like things are messed up due to hslogger
20:02:05 <stepkut> how many versions of hslogger do you have installed ?
20:02:46 <TimeCat> stepkut: I am not sure what hslogger is, I know I have never intentionally installed any
20:03:26 <stepkut> hslogger is a library for creating log files that happstack depends on
20:03:34 <TimeCat> stepkut: It looks like I have the same version installed twice? One for user and one for global?
20:03:49 <stepkut> yeah, that often causes trouble
20:04:03 <stepkut> sadly
20:04:17 <stepkut> package hslogger-1.0.12-8106bc98a3262eb5ef47df21089c2ccf is shadowed by package hslogger-1.0.12-9560bc18ab7e5f607fde6733591113d9
20:04:45 <stepkut> try, sudo ghc-pkg hide hslogger-1.0.12-9560bc18ab7e5f607fde6733591113d9
20:04:57 <stepkut> or, remove the global hslogger
20:05:15 <TimeCat> Do I usually need to sudo for ghc-pkg?
20:05:31 <stepkut> to modify the global package database you need sudo
20:05:36 <stepkut> actually first
20:06:06 <stepkut> do a ghc-pkg -v list hslogger
20:07:06 <stepkut> and figure out which version is installed in the global package database
20:09:11 <TimeCat> stepkut: 1.0.12
20:09:22 <TimeCat> stepkut: seems to be the only version that I see at all
20:09:53 <stepkut> if you do -v it should also include a big long hash
20:10:03 <stepkut> /var/lib/ghc-7.0.1/package.conf.d:
20:10:03 <stepkut>     hslogger-1.0.10 (hslogger-1.0.10-16a4fc15bdffc1d2e11c7a33a095189e)
20:10:03 <stepkut>  
20:10:26 <stepkut> the hash is unique to every install
20:10:40 <stepkut> so the global and local installs of hslogger should have different hashes
20:10:59 <stepkut> in your case hslogger-1.0.12-8106bc98a3262eb5ef47df21089c2ccf vs hslogger-1.0.12-9560bc18ab7e5f607fde6733591113d9
20:11:05 <TimeCat> I added it as an annotation to the hpaste
20:11:43 <stepkut> so try, sudo ghc-pkg hide hslogger-1.0.12-9560bc18ab7e5f607fde6733591113d9
20:11:51 <stepkut> and then see if if the ghc --make works any better
20:11:58 <TimeCat> stepkut: ok
20:12:42 <TimeCat> stepkut: I get this still ghc-pkg: cannot find package hslogger-1.0.12
20:13:40 <stepkut> hmm
20:13:41 <stepkut> one moment
20:14:47 <stepkut> maybe if you just do, sudo ghc-pkg hide hslogger, it will hide the global version
20:14:57 <TimeCat> ok let me try that
20:15:28 <stepkut> actually
20:15:35 <stepkut> sudo ghc-pkg hide hslogger --global
20:15:42 <stepkut> might force it to use the global package conf
20:17:36 <TimeCat> stepkut: both of those seemed to work, in that they seemed to wait a second and then just return me to the shell, but the make command still doesn't work
20:18:15 <stepkut> what happens if you do, sudo ghc-pkg unregister hslogger --global
20:18:57 <TimeCat> ghc-pkg: unregistering hslogger would break the following packages: happstack-heist-0.5.1 happstack-hstringtemplate-0.5.1 happstack-hsp-0.5.1 happstack-0.5.1 happstack-server-0.5.1 happstack-ixset-0.5.1 happstack-state-0.5.1 happstack-util-0.5.1 HSH-2.0.3 MissingH-1.1.0.3 (use --force to override)
20:19:30 <TimeCat> should I force?
20:20:05 <stepkut> can you paste the output of, ghc-pkg -v list happstack-server
20:21:22 <stepkut> I am confused as to why unregisterin the global hslogger would affect happstack-* which are supposed built against the local hslogger
20:22:20 <stepkut> ultimately, the best solution is probably to run, bin/unregister-all.sh from the happstack darcs source. Then unregister HSH MissingH and the global hslogger so that you only have one version of hslogger installed (in your local package conf)
20:22:29 <TimeCat> stepkut: I am not sure, I wonder if I installed some things in an incompatable way (maybe synaptic?). Also I added that as another annotation
20:22:40 <stepkut> then running ./bin/build-install-all.sh should give you something better
20:23:13 <TimeCat> I don't understand the part "unregister HSH MissingH" is HSH a package?
20:23:35 <stepkut> can you also paste, happstack describe happstack-server
20:23:52 <stepkut> HSH and MissingH are two other haskell libraries which require hslogger
20:24:13 <stepkut> if you have libghc6-hslogger-dev installed, then uninstalling that would be a better way to go
20:25:15 <TimeCat> added that paset, let me check on that package
20:25:40 <stepkut> oops. I meant, ghc-pkg describe happstack-server, sorry about that
20:28:11 <stepkut> anyway, the core issue is most likely that you have hslogger installed in two locations (the global and local package configs). This tends to make ghc very sad. The best solution is to only have hslogger installed in the local package conf.
20:28:37 <stepkut> If you remove the global version, you will also need to remove/rebuild anything that was built against the global version
20:29:33 <stepkut> I am a little confused as to why doing, sudo ghc-pkg unregister hslogger --global, would affect happstack-*, since those are supposedly built against the vesrion of hslogger in the local package conf
20:30:24 <stepkut> but in any case, removing the global version of hslogger, and then rebuilding happstack should fix things
20:31:28 <TimeCat> stepkut: ok I annotated the paste again, and I will try forcing the removal of hslogger and re-install
20:31:48 <stepkut> I don't think there is anything we can change in happstack to prevent this situation from happening in the first place :(
20:32:30 <TimeCat> stepkut: what can I do to prevent this sittuation in the future? Is there anyway to make ghc have someway to "fix"/remove broken packages in the database?
20:33:30 <stepkut> dunno.. you could ask in #hackage perhaps
20:37:08 <TimeCat> is there a way to install that isn't hackage? I guess I would rather just manage haskell packages through my OS package manager cabal seems a bit sloppy
20:37:47 <stepkut> you can make debs from the cabal packages -- but it is a fair bit of work
20:38:11 <Entroacceptor> you can hope that your distribution has all the neccessary packages already
20:38:20 <Entroacceptor> and just compile the stuff you want
20:38:34 <Entroacceptor> runhaskell Setup.lhs configure
20:39:06 <Entroacceptor> and then make, similar to autotools
20:39:33 <TimeCat> Entroacceptor: sorry runhaskell Setup.lhs configure does what exactly?
20:40:04 <Entroacceptor> that configures the package you downloaded for compiling
20:40:18 <Entroacceptor> and tells you the missing dependencies
20:43:23 <stepkut> the 'cabal' tool is a bit like 'apt-get' in that it automatically fetches and installs dependencies. You can instead download the dependencies yourself and install them manually. That would be like  get the source for a .deb and doing dpkg-buildpackage on it, and the dpkg -i to install it.
20:43:52 <stepkut> Ultimately, you are building an installing the same source. But it gives you a little more control over what exact versions of things are installed
20:44:28 <stepkut> (you can get the source from hackage via, cabal unpack <package name>)
20:48:03 <TimeCat> stepkut: well things certainly changed. Now I get an error when I run the build and test all script
20:48:13 <stepkut> sweet!
20:48:17 <stepkut> like what ?
20:48:41 <TimeCat> stepkut: this looks like the most offending line: ghc: could not execute: trhsx
20:49:00 <stepkut> is ~/.cabal/bin in your $PATH?
20:49:22 <stepkut> (or trhsx in /usr/bin ?)
20:50:24 <stepkut> Hello Gracenotes !
20:52:25 <TimeCat> stepkut: .cabal/bin is in my path and trhsx is in there
20:52:35 <stepkut> :-/
20:52:55 <stepkut> this happened when trying to build happstack-hsp ?
20:53:18 <TimeCat> seems like it
20:53:32 <TimeCat> I don't know why I didn't get that error before
20:53:38 <stepkut> yeah, that is mysterious
20:54:42 <stepkut> does, which trhsx, find it out ?
20:55:07 <stepkut> if you run, trhsx, does it spit out usage info ?
20:55:57 <TimeCat> yup - Usage: trhsx <infile> [<outfile>]
20:57:57 <stepkut> can you paste the output I guess
20:58:08 <stepkut> the output of the failed build
20:58:13 <stepkut> the last dozen lines or so
20:58:19 <TimeCat> stepkut: yeah hang on a min
21:01:56 <TimeCat> stepkut: done
21:07:23 <stepkut> hmm, mysterious
21:07:32 <stepkut> how do you add ~/.cabal/bin to your $PATH ?
21:07:38 <stepkut> s/do/did/
21:08:14 <TimeCat> stepkut: I have directories that I want added to my path in my .bashrc file, why?
21:08:56 <stepkut> I saw an error like this once where someone added ~/.cabal/bin by doing something like, export="$PATH:~/.cabal/bin"
21:09:13 <stepkut> and when they ran trhsx by hand it worked, but not when they tried to run it from script
21:10:02 <TimeCat> stepkut: so your suggestion is to do this by hand and then run the install script?
21:10:12 <stepkut> sure..
21:10:24 <stepkut> with out the "
21:10:39 <TimeCat> right
21:10:46 <stepkut> export PATH=~/.cabal/bin:$PATH
21:10:49 <stepkut> and then run the script
21:10:52 <stepkut> and see if that works I guess
21:13:55 <TimeCat> stepkut: I guess we'll see, that seems like some weird behaviour
21:15:00 <TimeCat> I am starting to think that someone who suggested rm -rf ~/.cabal/* had the right idea, this time it failed even sooner
21:15:25 <stepkut> TimeCat: :)
21:15:31 <stepkut> even sooner ?
21:15:58 <stepkut> removing ~/.cabal, is, unfortunately, a common practice due to it yielding good results
21:16:11 <stepkut> though I think in this case you would have just ended up with two versions of hslogger installed again
21:17:37 <TimeCat> stepkut: Well I am hoping that it was just that I forgot sudo...
21:18:15 <TimeCat> stepkut: though I am still confused as to how I ended up with two versions of hslogger
21:19:50 <stepkut> you are installing things using sudo ?
21:20:55 <stepkut> there are libraries that are install global and libraries that are installed in your local home directory. Sometimes cabal decides the global version is not 'good enough' for some reason, and decides to install a different version in your local package conf
21:21:22 <stepkut> but then ghc gets all confused because the same library is installed twice
21:21:56 <stepkut> if you are trying to run the build-install-all.sh script via sudo, then that might be why it can not find trhsx
21:22:08 <stepkut> sudo does not preserve the $PATH by default
21:22:26 <stepkut> sudo echo $PATH
21:22:49 <TimeCat> stepkut: Well without sudo it fails on the first thing that it tries to configure, with it it makes it longer, though still fails.
21:23:31 <stepkut> what failure does it get on the first thing?
21:24:03 <TimeCat> stepkut: .cabal/bin is in that path, three times actually
21:24:49 <Entroacceptor> .cabal?
21:25:00 <Entroacceptor> or ~/.cabal?
21:25:04 <stepkut> ~/.cabal
21:25:05 <Entroacceptor> or /home/timecat/.cabal?
21:25:19 <Entroacceptor> I've had so many problems having ~ in my path
21:25:33 <TimeCat> stepkut: happstack-utils fails, added an annotation to bin
21:25:35 <Entroacceptor> that's why I set it using PATH=$HOME/.cabal
21:26:20 <stepkut> TimeCat: happstack-utils is just failing because sudo wrote some files as root and you can not remove them as a user
21:26:36 <stepkut> TimeCat: try doing, sudo bin/clean-all.sh, and then building with out sudo
21:26:43 <TimeCat> Entroacceptor: actually its /home/timecat/.cabal/bin
21:26:49 <TimeCat> stepkut: will do
21:29:15 <TimeCat> stepkut: sorry for causing that one...
21:29:23 <TimeCat> seems to be doing better this time
21:29:50 <stepkut> sweet
21:45:17 <TimeCat> stepkut: so no errors, but still the same error on building HelloWorld
21:45:49 <TimeCat> stepkut: should I post the output?
21:46:41 <stepkut> yeah
21:46:42 <stepkut> with -v
21:57:24 <TimeCat> timecat: pasted both that and ghc-pkg list -v happstack
21:58:50 <stepkut> what about, ghc-pkg list -v hslogger ?
22:02:23 <TimeCat> stepkut: sorry included that one as well now, looks like there are still two of them :(
22:02:50 <stepkut> I think that maybe when you did the sudo run it installed a global one again ;)
22:03:00 <stepkut> cabal makes me sad
22:03:27 <dcoutts> any bug in particular?
22:03:50 <dcoutts> is this the sudo cabal install foo == shoot self in foot problem?
22:03:56 <stepkut> dcoutts: yes. When you the same package (with the same version) installed in the global and user package conf, bad things happen
22:04:05 <dcoutts> oh, that one
22:04:06 <dcoutts> right
22:04:28 <stepkut> which cabal seems to like to do a lot
22:04:32 <dcoutts> that's been biting a lot of people recently
22:04:38 <TimeCat> stepkut: sorry this is taking so long, thanks for all your help
22:04:40 <stepkut> yeah
22:04:44 <stepkut> TimeCat: no worries
22:04:54 <mafs> ACTION ran into that a few days ago
22:05:11 <stepkut> So, I think you need to unregister the global vesrion of hslogger again, then do a clean-all and build-install-all again of happstack
22:05:23 <dcoutts> we're rewriting the dep solver so that it knows about multiple instances of the same version of installed packages
22:05:24 <stepkut> or maybe just unregister the global version of hslogger and see what happens first ?
22:05:28 <stepkut> dcoutts: nice
22:05:48 <stepkut> dcoutts: though, maybe there should be a mode where only one version of packages are installed ?
22:06:04 <stepkut> dcoutts: I feel like people often want that more than they actually want multiple versions installed
22:06:21 <TimeCat> stepkut: unregister the global version with sudo ghc-pkg unregister --global hslogger ?
22:06:28 <dcoutts> stepcut: you mean only one instance, or really only one version?
22:06:32 <stepkut> TimeCat: yeah
22:06:37 <stepkut> dcoutts: really only one version
22:06:42 <stepkut> dcoutts: like debian
22:06:56 <dcoutts> I think that'd be a step backwards
22:07:05 <dcoutts> it'd make it even harder to install things
22:07:21 <dcoutts> unlike debian, we have to deal with lots of people updating things at random
22:07:27 <stepkut> dcoutts: but less confusing perhaps :)
22:07:41 <dcoutts> there is no global consistent solution that the distro managers have worked out
22:07:50 <stepkut> yeah
22:08:04 <dcoutts> that's what distros do, they bash things until they can get everything using one version of each package
22:08:07 <stepkut> it would help if ghc was less misleading about why things are failing
22:08:10 <dcoutts> and it's a lot of work
22:08:21 <dcoutts> and it takes a lot of time
22:08:24 <stepkut> it says, "Happstack.Server" could not be found, which is confusing when you know it is installed
22:08:31 <dcoutts> which is fine, for stable sets of stuff
22:08:39 <TimeCat> stepkut: its saying that it would break everything again is that ok?
22:09:04 <stepkut> TimeCat: I don't understand why removing the global version would break happstack which is supposedly built against the local version?
22:09:16 <TimeCat> stepkut: yes that is my confusion as well
22:09:23 <dcoutts> stepcut: it says that before saying that the selected package ids are wrong or something?
22:10:13 <stepkut> dcoutts: which you run ghc --make, it just says that Happstack.Server could not be found. if you run with -v then it gives lots of information
22:11:00 <TimeCat> stepkut: is it possible that there is still a global version of happstack?
22:11:15 <dcoutts> stepcut: so what is going on exactly? you've got the package providing Happstack.Server installed in the per-user package db? Is it because it's broken or what?
22:12:30 <stepkut> dcoutts: happstack is installed in user and is built against hslogger in user. But when you use ghc --make, it seems to fail because ghc tries to use hslogger in global and then excludes the version of hslogger in user which bumps out the version of happstack in user. So then it can't find happstack
22:12:59 <dcoutts> stepcut: ah ok
22:13:14 <dcoutts> so it's ghc's peculiar way of merging global and user package dbs
22:13:23 <dcoutts> I've discussed this with Simon
22:13:28 <dcoutts> it's not a trivial problem
22:13:28 <stepkut> and there are confusing things. like doing, sudo ghc-pkg unregister hslogger --global, says that it will break happstack, even though happstack is built against the --user version of hslogger, not the --global version..
22:13:49 <dcoutts> sounds like a bug you should report
22:14:08 <dcoutts> attach the output of ghc-pkg dump
22:14:54 <dcoutts> stepcut: hmm, does the sudo make any difference to the message?
22:15:06 <stepkut> dcoutts: why doesn't, ghc-pkg unregister hslogger-1.0.12-8106bc98a3262eb5ef47df21089c2ccf, work ?
22:15:17 <stepkut> where I specify the exact hash of the package to unregister?
22:15:38 <dcoutts> probably because ghc-pkg does not yet understand installed package ids
22:15:42 <stepkut> TimeCat: what happens if you do, ghc-pkg unregister hslogger --global
22:15:48 <dcoutts> we only added them relatively recently
22:15:58 <TimeCat> stepkut: just leave out the sudo?
22:16:02 <stepkut> TimeCat: yeah
22:16:16 <dcoutts> stepcut: so that should be reported as a feature request too, cabal will need it too
22:16:17 <stepkut> TimeCat: I assume it will fail, because it can't write the global indexes, but..
22:16:40 <TimeCat> stepkut: didn't exactly fail, just gave the same warning and said to use force to override again
22:16:57 <dcoutts> stepkut: since when we eventually get round to cabal uninstall, it'll want to identify packages by their unique installed package id, not source id
22:21:02 <stepkut> TimeCat: i guess start by using --force and then see if it removed the user version of hslogger or not ?
22:21:02 <dcoutts> stepkut: the fact is, we've only got a partial conversion to the system of installed package ids
22:21:02 <dcoutts> e.g. you cannot yet install the same version into a single package db multiple times
22:21:02 <stepkut> dcoutts: ah
22:21:02 <dcoutts> but you can get that situation due to db merging
22:21:02 <TimeCat> stepkut: that seemed to work, I am going to try building again
22:21:02 <stepkut> yeah, the db merging thing has caused me trouble many times
22:21:02 <stepkut> TimeCat: only the local version is installed ?
22:21:02 <stepkut> TimeCat: does, ghc-pkg check, report any errors?
22:21:02 <dcoutts> stepkut: the eventual system will look rather like nix, with multiple instances of the same package version, and some profile to say what is currently exposed
22:21:02 <stepkut> dcoutts: k
22:21:02 <stepkut> dcoutts: hopefully next week, right ? ;)
22:21:02 <dcoutts> the current ghc package db merging is rather hard to explain
22:21:02 <dcoutts> heh
22:21:02 <dcoutts> cabal and ghc disagree on how it works :-(
22:21:02 <stepkut> as long as the current state is not considered working I guess that is ok
22:21:02 <dcoutts> cabal does union, ghc does complicated thing to guarantee only one instance per version
22:21:02 <TimeCat> stepkut: yup, check is filled with errors, looks like all of happstack has them
22:21:02 <TimeCat> stepkut: would you like me to paste the output?
22:21:02 <stepkut> would it help if there was a, cabal --make alternative to ghc-pkg --make ?
22:21:07 <stepkut> TimeCat: no, just run clean-all.sh and build-install-all.sh
22:21:09 <stepkut> with out sudo
22:21:18 <stepkut> and then maybe it will work :p
22:21:23 <TimeCat> ok
22:21:42 <dcoutts> stepcut: you mean if cabal used ghc in single shot mode rather than --make mode? no that's orthogonal
22:22:16 <dcoutts> we have the same issues with selecting packages whether we do ghc -c foo.hs -o foo.o, or ghc --make
22:22:32 <stepkut> dcoutts: I guess I mean if cabal decided how to resolve the packages instead of ghc when doing --make, so that there was no disagreement
22:22:44 <dcoutts> oh cabal does decide it
22:23:14 <stepkut> but you said that cabal does union and ghc does fancy stuff ?
22:23:14 <dcoutts> but there's two problems: 1. cabal sometimes picks the wrong ones, 2. ghc does not always let us pick the ones we want
22:23:58 <dcoutts> cabal calls ghc with -package-id hslogger-1.0.12-8106bc98a3262eb5ef47df21089c2ccf,
22:24:19 <stepkut> yeah
22:24:24 <dcoutts> but ghc will not allow it if that id is not in the subset that remains after it does its own db merging
22:24:34 <stepkut> ah
22:24:53 <dcoutts> and then, compounding the issue is the fact that cabal's dep resolver does not grok package ids
22:24:58 <dcoutts> and it's a fun mess :-)
22:25:15 <dcoutts> we know what the solutions look like, but it's a fair amount of effort
22:25:16 <stepkut> it is lovely
22:25:27 <dcoutts> but there is progress
22:25:31 <dcoutts> (finally)
22:25:35 <stepkut> I am going to quit programming and join the circus
22:25:42 <stepkut> and start a band
22:25:43 <dcoutts> hah
22:26:20 <stepkut> I can almost do a front handspring now :p
22:27:35 <mightybyte> Have you done back flips yet?
22:28:04 <stepkut> mightybyte: yes, but only on the trampoline with a safety belt
22:28:12 <stepkut> mightybyte: perhaps by the end of summer
22:28:26 <mightybyte> Hmmm, I'm surprised.  Back flips are pretty easy.
22:28:39 <mightybyte> I can do a back flip, but not a back handspring.
22:28:56 <mightybyte> Not sure whether that's typical or not.
22:28:59 <stepkut> mightybyte: true.. just haven't really worked on them
22:29:16 <dcoutts> stepkut: I've been doing some trapeze
22:29:19 <mightybyte> The other day I taught a guy a back flip in like 10 or 15 minutes.
22:29:23 <stepkut> dcoutts: fun, me too
22:29:39 <stepkut> mightybyte: then maybe I will learn them sooner :)
22:29:46 <dcoutts> my sister is a trapeze expert, used to work in a travelling circus
22:29:52 <mightybyte> Cool
22:30:04 <stepkut> dcoutts: fun
22:30:47 <stepkut> dcoutts: my trapeze teacher was in ringling brothers back in the day
22:30:52 <mightybyte> stepkut: The main obstacle to doing a back flip is just guts.
22:31:06 <stepkut> mightybyte: yeah
22:31:48 <stepkut> mightybyte: I can almost do front ones.. just haven't been asked to try back ones until last week :)
22:32:15 <mightybyte> Back is easier than front.  I can't do a front flip on solid ground.
22:33:12 <stepkut> these people also teach in the chicago area, http://www.youtube.com/watch?v=4d2YCmgm3Cg
22:34:50 <mightybyte> Impressive stuff.
22:35:19 <stepkut> they were practicing at the gym during my tumbling session the other week.. made it hard to pay attention ;)
22:44:56 <TimeCat> stepkut: Seemed to install fine, but still can't make hello-world, and I now have 2 versions of hslogger again
22:46:34 <stepkut> !!
22:46:45 <stepkut> TimeCat: how could that happen ?
22:47:03 <stepkut> TimeCat: you should just remove every version of hslogger
22:49:45 <TimeCat> stepkut: Sorry unregister hslogger?, global and local?
22:49:51 <stepkut> TimeCat: all of them
22:50:07 <stepkut> yeah, hslogger global and local
22:50:21 <stepkut> and then try clean-all and build-install-all
22:51:51 <TimeCat> stepkut: should I sudo clean all ?
22:52:06 <stepkut> TimeCat: sure
22:53:53 <TimeCat> stepkut: should I unregister all or will clean do the same/
22:53:55 <TimeCat> ?
22:57:33 <stepkut> TimeCat: you should unregister-all as well
22:57:38 <stepkut> clean only cleans the build directory
23:06:19 <TimeCat> stepkut: I think something is going wrong with installing hslogger
23:06:34 <stepkut> TimeCat: oh ?
23:06:52 <TimeCat> it won't download the package this time, and I am sure that my internet is up... can you think of any other issues that could cause this?
23:07:31 <stepkut> TimeCat: hmm. works for me.. try again ?
23:07:40 <stepkut> maybe hackage was having some issues ?
23:08:23 <TimeCat> stepkut: yeah let me try
23:09:23 <TimeCat> stepkut: same error, is there a dummy package I could cabal install to make sure hackage is working correctly?
23:09:48 <stepkut> what error?
23:09:54 <stepkut> what about, cabal unpack hslogger ?
23:11:00 <TimeCat> stepkut: that gives an error and says permission denied (?)
23:11:44 <stepkut> it will try to unpack it in the current directory, maybe you do not have write permission there
23:13:04 <TimeCat> stepkut: fairly sure I have write permission; in a subdirectory of my home directory?
23:13:21 <stepkut> :-/
23:13:45 <stepkut> maybe there is already an hslogger-1.0.12 directory ?
23:13:53 <mafs> not necessarily, weren't you doing some sudo stuff before?
23:14:07 <TimeCat> mafs: yes...
23:14:33 <TimeCat> stepkut: in the current directory? Also it is trying to install 1.1.3
23:15:24 <stepkut> TimeCat: hmm
23:16:20 <stepkut> I think mafs is right. Your ~/.cabal/packages/hackage.haskell.org/hslogger is probably owned by root now
23:16:33 <mafs> stepkut: yeah, that's what I was thinking
23:17:01 <mafs> I was checking if there's a simpler command in Linux to tell you if a given directory is writeable or not. I know there is one, just can't remember it off the top of my head
23:17:05 <dcoutts> sigh, need that sudo footwear protection in cabal...
23:17:17 <mafs> Could always ls -l to check the perms though
23:17:36 <stepkut> should probably do a chown -R on .cabal directory to fix things
23:18:20 <TimeCat> stepkut: so chown & chmod it?
23:18:27 <stepkut> TimeCat: probably just chown
23:18:33 <mafs> TimeCat: should be no need to chmod
23:21:23 <TimeCat> thanks
23:34:11 <TimeCat> stepkut: hallelujah!!! HelloWorld Built! Thank you guys so much!
23:34:16 <stepkut> yay!
23:34:22 <stepkut> sorry it was such a pain :(
23:34:52 <stepkut> the rest should be easy compared to that :p
23:35:31 <TimeCat> stepkut: No worries, and thanks for your persistence.
23:39:08 <TimeCat> thanks and have a good night everyone