Experimental IRC log happs-2008-09-07

Available formats: content-negotiated html turtle (see SIOC for the vocabulary)

Back to channel and daily index: content-negotiated html turtle

These logs are provided as an experiment in indexing discussions using IRCHub.py, Irc2RDF.hs, and SIOC.

12:56:17<dcoutts>Lemmih: I've worked out how to use crypt()
12:58:45<dcoutts>eg suppose I use passwd "foo"
12:59:00<dcoutts>then I make up a totally random salt, only 2 chars necessary
12:59:24<dcoutts>and let hash = crypt("foo", "salt")
12:59:33<dcoutts>now, to check a passwd,
13:00:05<dcoutts>let check hash pass = crypt pass hash == hash
13:00:07<dcoutts>that's it
13:00:26<dcoutts>the reason it works is because crypt adds the hash as the first two chars of the result
13:00:41<dcoutts>so when you crypt again using hash as the salt you're getting those two chars
13:00:55<dcoutts>and if the result is the same hash then it's ok
13:01:45<dcoutts>Lemmih: I'll implement a parser and re-implement the HAppS basicAuth
13:14:26<dcoutts>Lemmih: seems to me that you should make basic auth have the type:
13:14:44<dcoutts>basicAuth :: MonadIO m => String -> (String -> String -> Bool) -> [ServerPartT m a] -> ServerPartT m a
13:14:55<dcoutts>then one can use validLogin name pass = M.lookup name authMap == Just pass
13:15:02<dcoutts>for the trivial plain text passwd
13:15:18<dcoutts>or the crypt method or whatever
13:15:25<dcoutts>which might be different per-user
13:33:08<Sadache>i am trying to install happs 0.9.2.2 and i am getting dependency errors
13:33:37<Sadache>that happs depends indirectly on multi versions
13:36:03<Sadache>i really dont know why it is so hard to install happs
13:36:36<Saizan_>are you getting it from darcs?
13:36:43<Sadache>yes i am
13:37:35<Saizan_>it would help if you tell us the precise errors
13:37:55<dcoutts>Sadache: are you using cabal-install or sp ?
13:38:06<Saizan_>however i think you just have to install HAppS-* packages in the correct order
13:38:26<Sadache>http://www.mibbit.com/pb/DG1yet
13:38:59<Sadache>cabal install
13:39:42<Sadache>i tried to install in order, but then i had to install hslogger that depends on network that i didnt succed to install
13:39:57<dcoutts>Sadache: ah, you're using runghc Setup.hs, I'd suggest using cabal-install
13:40:15<Sadache>i tried using cabal install too
13:40:33<dcoutts>that is, use cabal-install to install each in turn
13:40:51<dcoutts>as you don't want it using the release versions on hackage
13:41:24<dcoutts>though the released versions of hslogger etc should be ok
13:41:40<Sadache>http://www.mibbit.com/pb/bsvDXh
13:42:23<dcoutts>hmm, there should be no need to re-install network
13:42:29<dcoutts>I wonder why it wants to do that
13:43:07<Sadache>i am on windows by the way
13:43:11<dcoutts>yes
13:43:22<dcoutts>Sadache: use cabal install --dry-run -v and paste the output
13:44:24<Sadache>http://www.mibbit.com/pb/HSWDIg
13:45:13<dcoutts>Sadache: sorry, I meant in the happs-server dir
13:45:23<dcoutts>Sadache: since we do not want to re-install or upgrade network
13:45:36<dcoutts>as the one you've got is ok, and reinstalling is not going to work
13:45:46<dcoutts>since that needs mingw/msys/sh
13:47:23<Sadache>am i supposed to have a happs-server directory?
13:48:06<Sadache>ok i found it, but it is in a cache directory...
13:48:08<Saizan_>Sadache: the one where you darcs getted HAppS-Server
13:48:24<Sadache>ah ok
13:48:58<dcoutts>though really we should be starting with the happs component lowest in the dependency graph
13:50:15<Sadache>is the dependency graph documented somewhere?
13:52:13<Saizan_>the order is Util, Data, State, IxSet, Server
13:52:22<dcoutts>right
13:52:58<Saizan_>http://www.mibbit.com/pb/DG1yet <- what seems wrong here is that it wants to use parsec-3.0
13:53:16<Saizan_>Sadache: can you also paste the output of ghc-pkg list?
13:53:32<Sadache>http://www.mibbit.com/pb/Vlt6t6
13:54:44<Sadache>http://www.mibbit.com/pb/2DsD6j
13:54:51<Saizan_>Sadache: it looks like it should work then, rerun without --dry-run -v
13:56:02<Sadache>http://www.mibbit.com/pb/Il3fnk
13:56:35<Saizan_>ok, that's a different problem :)
13:58:43<dcoutts>so what would be useful for these cases is if cabal install could be told to look at some local packages
13:59:06<dcoutts>eg a bunch of tarballs or unpackaged tarballs
13:59:07<Sadache>but when i try to install happs-state i get http://www.mibbit.com/pb/KOXy1x
13:59:49<dcoutts>Sadache: did you paste cabal install --dry-run -v in that directory?
13:59:55<dcoutts>that's the interesting one
14:00:18<dcoutts>as it's decided to reinstall network
14:00:24<dcoutts>which does not work
14:00:29<Sadache>no, i will do now
14:01:16<Sadache>http://www.mibbit.com/pb/LyHV9L
14:01:30<Saizan_>i also don't see why your already installed HAppS-State doesn't export .Control
14:02:55<Sadache>isnt there a way to clean everything and start it all over
14:03:13<dcoutts>ahh!
14:03:26<dcoutts>it's trying to rebuild network-2.1 against parsec 3
14:03:28<dcoutts>grrr
14:03:35<dcoutts>bloody parsec 3
14:04:22<dcoutts>Sadache: I recommend you ghc-pkg --user unregister parsec-3.0.0
14:04:35<dcoutts>and then try cabal install --dry-run again
14:04:52<dcoutts>if this time it dosn't want to re-install network then that's an improvement :-)
14:05:29<Saizan_>uhm, without --user it looks like it's in the global db
14:05:30<Sadache>ghc-pkg: cannot find package parsec-3.0.0
14:05:41<dcoutts>ah leave off the --user
14:05:46<dcoutts>also we do not want to reinstall HAppS-* when installing HAppS-Server so look out for that
14:05:48<Sadache>ok
14:06:12<dcoutts>mm, this does show up some limitations in cabal-install I have to say
14:06:13<Sadache>now should i try to install state or server?
14:06:30<Saizan_>state first
14:07:02<Saizan_>HAppS-State.cabal contains HAppS.State.Control in the exposed-modules section, right?
14:07:11<Sadache>http://www.mibbit.com/pb/2eamSd
14:07:26<Sadache>yes ok
14:08:05<dcoutts>Sadache: oh, I thought you'd installed happs-data-0.9.2.2 already
14:08:42<Saizan_>thre's no data-0.9.2.2
14:08:55<dcoutts>oh, ok
14:09:18<dcoutts>Sadache: see, cabal-install only knows how to satisfy dependencies from things that are already installed or on hackage, but it does not know about other local sources
14:09:27<dcoutts>so we still have to cabal install each in order
14:09:48<Saizan_>yeah, and if you install HAppS-Data form darcs you can avoid installing regex-compat
14:10:08<dcoutts>so cabal-install's dep resolution doesn't help us for local dev versions happs packages sadly
14:11:49<Sadache>http://www.mibbit.com/pb/2jMazJ this what i get trying to install Data
14:13:12<Saizan_>Sadache: mmh, that looks like something is broken with your ghc
14:13:39<Sadache>will it help to uninstall my ghc and reinstall all again?
14:13:42<dcoutts>aye, I've got hslogger-1.0.5
14:14:09<dcoutts>and clearly mtl is installed, but perhaps the files are missing
14:14:14<dcoutts>well, mtl is registered
14:14:39<dcoutts>Sadache: does ghc-pkg list mtl tell you you've got more than one copy installed ?
14:15:10<Sadache>i get this when trying to install hslogger http://www.mibbit.com/pb/l2Iqm4
14:16:02<dcoutts>Sadache: you might need to cabal install mtl --reinstall
14:16:09<Sadache>dcoutts: yes mtl-1.1.0.0, mtl-1.1.0.1
14:16:14<dcoutts>Sadache: as it looks like your mtl package is borked
14:16:24<dcoutts>it's registered but the files are missing
14:16:42<Saizan_>he was having the same problem with HAppS-State before
14:17:10<dcoutts>ah yes
14:19:22<Sadache>i have another error now installing Happs-State : http://www.mibbit.com/pb/zhXDOO
14:20:41<Saizan_>it seems like you wiped out the files of your installed packages
14:21:07<Saizan_>at some point
14:21:07<dcoutts>Sadache: did you delete a bunch of files under ~/.cabal perhaps ?
14:22:37<Saizan_>http://www.mibbit.com/pb/2DsD6j <-- or where global packages are installed under windows, looking at this
14:22:49<Sadache>dcoutts: not as far as i know
14:23:01<dcoutts>oh, not ~/.cabal, that's the unix thing
14:24:13<Sadache>i didnt delete any files
14:24:28<Sadache>should i reinstall cabal install?
14:24:42<dcoutts>Sadache: that will not make any difference
14:25:03<dcoutts>Sadache: the problem is that there seems to be several packages that you have registered but where the files themselves are missing
14:25:08<dcoutts>eg mtl, syb-with-class
14:25:23<dcoutts>those will need to be reinstalled
14:25:30<Sadache>can i unregister them all?
14:25:36<dcoutts>but the worry obviously is that there might be several more
14:25:45<dcoutts>Sadache: yes, ghc-pkg unregister foo
14:26:06<dcoutts>Sadache: just don't unregister any basic packages that came with ghc
14:26:10<Sadache>do i need to reinstall my ghc?
14:26:15<dcoutts>not necessarily
14:26:29<Saizan_>maybe it would be easier though
14:26:41<Sadache>well if it is easier i prefer so
14:27:34<Sadache>6.8.3 is it compatible with Happs?
14:27:54<Sadache>i mean is Happs-Server compatible with ghc 6.8.3
14:27:58<Sadache>?
14:28:30<Saizan_>i think so
14:28:52<Saizan_>i've not switched to 6.8.3 yet
14:29:01<dcoutts>almost certainly
14:29:06<dcoutts>I'm using 6.8.2
14:29:11<dcoutts>and .3 is just bug fixes
14:29:36<Sadache>ok
14:30:50<Sadache>i have to say that i am impressed with the modularity of Haskell apps including Happs compares to Java and .Net apps that i ve been programming and designing for the last 6 years now
14:30:53<Saizan_>ghc should probably give a better error message when the packagedb is no more in sync with the files
14:31:28<Sadache>and that is the only reason that motivates me to go through this to me unfamilier installation process
14:33:35<dcoutts>Saizan_: yes, I filed a ticket for that a few months ago
14:33:41<Saizan_>heh, it's a bit frustrating when things go wrong, but now using cabal-install from the start you should be able to just install the HAppS packages in the right order and get everything working
14:33:42<dcoutts>http://hackage.haskell.org/trac/ghc/ticket/2445
14:34:07<Sadache>Saizan_: ok
14:36:23<Sadache>isnt it possible to pack up everything in an exe installer?
14:36:47<Saizan_>dcoutts: ok :) and runhaskell Setup.hs could be as smart as cabal-install when picking dependencies? like not trying to always use the latest version of a package if it conflicts
14:37:19<dcoutts>Saizan_: cabal configure could be, runghc Setup configure cannot
14:37:40<dcoutts>Saizan_: the tricky thing is that it might be impossible to find a consistent set of deps
14:37:58<dcoutts>and yet we do not want to block people from configuring at all
14:38:07<dcoutts>so it'd have to fall back
14:38:40<Saizan_>ah, i see, for Setup configure it's just a warning
14:38:49<dcoutts>yes
14:39:01<dcoutts>and that's important since sometimes you really know what you're doing
14:39:15<dcoutts>it might be that you do need two versions and you know they'll not conflict
14:49:51<Sadache>things seem to work better after reinstalling ghc
14:51:57<dcoutts>great
14:52:33<Sadache>i could successfully install Happs-State and Happs-Data
14:54:51<dcoutts>yay
14:55:31<Sadache>ok the Happs-Server seems to be installed
14:56:35<Sadache>but i get this weired error when i try to compile a simple program http://www.mibbit.com/pb/GbZY5f
14:57:09<dcoutts>Sadache: use ghc --make
14:57:20<Sadache>ok
14:57:41<Sadache>perfect
14:58:27<Sadache>great
14:58:32<Sadache>everything works
14:59:06<Sadache>u saved my day guys
14:59:58<dcoutts>Sadache: np
15:00:02<dcoutts>glad we got it worked out
17:59:57<dcoutts>yay!
18:00:10<dcoutts>got hackage-server using a regular apache htpasswd file
18:03:38<Lemmih>Neat.
18:09:17<dcoutts>hia Lemmih
18:09:40<dcoutts>Lemmih: the basicAuth should be generalised to take a passwd checking function rather than a Map
18:10:01<dcoutts>then people could use different auth methods, and also different ways of storing the passwds
18:10:26<dcoutts>-- | Does the given user really have this as their password?
18:10:26<dcoutts>--
18:10:26<dcoutts>type PasswdCheck = UserName -- ^ user name
18:10:26<dcoutts> -> PasswdPlain -- ^ plain text password
18:10:26<dcoutts> -> Bool
18:10:48<dcoutts>so for example there's
18:10:49<dcoutts>plainPasswdCheck :: Map.Map UserName PasswdPlain -> PasswdCheck
18:10:55<dcoutts>or my new impl
18:11:05<dcoutts>HtPasswdDb.passwdCheck :: HtPasswdDb -> PasswdCheck
21:07:12<sadache>what parsing function is used for parsing a string and produces an int or a Maybe int?
21:08:03<dcoutts>sadache: see read or reads
21:48:25<sadache>i tried to see read and reads but non seems to be usefull
21:48:59<sadache>i am receiving strings in the request object in happs and i want to convert them to int to use them to request data
21:50:01<dcoutts>> case reads "34" of [(n,_)] -> Just n; _ -> Nothing :: Maybe Int
21:50:11<dcoutts>sadache: ^^
22:14:56<Lemmih>sadache: See 'lookRead'.

Back to channel and daily index: content-negotiated html turtle