00:00:05 <zzing_> http://socr.uwindsor.ca:443/c/view-page-slug/6/constitution
00:00:12 <zzing_> I am still unsure why exactly it occured though
00:01:14 <zzing_> Perhaps the fact that strings are linked lists and this had a lot of them?
00:01:39 <zzing_> ok, next bug I need to deal with
00:02:07 <zzing_> I can set  apache up to forward socr.uwindsor.ca/socr to whatever server I want, but I cannot get clockworks to keep the url based off of it
00:12:06 <stepkut> I know exactly why it occurs
00:12:29 <stepkut> if you look at the code, it will block until the process exits
00:12:30 <stepkut>        ec <- waitForProcess ph
00:12:52 <stepkut> but hGetContents will only read data when someone is actually trying to do something with it.. which nobody was
00:13:17 <stepkut> if markdown is only outputing a little data, then it can write all the output and then exit.
00:13:38 <zzing_> I get you
00:13:43 <stepkut> but if it is outputting a lot of data, then markdowns output buffer gets full and it blocks waiting for there to be more room
00:14:05 <stepkut> reading data from processes and handling the exit code is extremely difficult
00:14:30 <stepkut> it's a pretty horrible design
00:14:38 <stepkut> as is the completely uncorrectly stdout vs stderr
00:15:03 <stepkut> nice logo!
00:15:46 <zzing_> thank you
00:16:06 <zzing_> If we can get this last issue nailed, then I might be able to put this thing live today ;-)
00:18:59 <stepkut> what is the last issue?
00:19:10 <stepkut> oh
00:19:11 <stepkut> i see
00:19:12 <stepkut> missed that line
00:20:50 <stepkut> ok, I usually have command-line options like this:
00:20:53 <stepkut> /usr/bin/clckwrks-dot-com-server --top /srv/clckwrks-dot-com-production --static /usr/share/clckwrks-dot-com-data --logs /var/log/apache2/clckwrks.com --log-mode Production --http-port 9029 --base-uri http://www.clckwrks.com/ --enable-analytics +RTS -IO -RTS
00:21:25 <stepkut> but, to keep the port number out of the URL there is a little code in Main.hs that looks for that specific port number (or 80) and keeps it out of the URL
00:23:06 <zzing_> Is it possible to set it up to demote to a certain user?
00:23:48 <stepkut> nope. There is no real use management yet. Though once I get the new version of clckwrks-cli release there will be some more functionality there
00:23:51 <stepkut> why?
00:24:18 <zzing_> I need an rc script to have the thing run automatically, and usually it has it demote from root
00:26:37 <zzing_> Is this common? Main.hs: fd:27: commitAndReleaseBuffer: resource vanished (Broken pipe)
00:29:36 <zzing_> also in the clckwrksOpts you have two places where you use read str    and that is capable of throwing an exception
00:32:48 <stepkut> oh.. I see you want to drop privledges
00:33:30 <zzing_> ok, I cannot get this thing to use socr.uwindsor.ca/socr  as the base url for everything, and still be on port 8000
00:33:46 <stepkut> that option is not currently in clckwrks.. but should be. It would not be that hard to add.
00:33:56 <stepkut> http://www.happstack.com/docs/happstack-server-7.0.2/doc/html/happstack-server/Happstack-Server-SimpleHTTP.html#v:simpleHTTPWithSocket
00:34:57 <stepkut> actually. that is possible to do right now, since the call to simpleHTTP is still in Main.hs. I would like to get it out of there, but it is a bit tricky
00:35:06 <stepkut> the whole initialization process is too damn tricky
00:35:15 <stepkut> well.. really just too boilerplately
00:36:26 <zzing_> So, just so I have this right, the part of it being at /socr is not there, but the port disappearing should work?
00:36:43 <zzing_> I just need to make sure my ~userdir stuff works with apache
00:37:03 <stepkut> in Main.hs in mkSitePlus there is a line like, if port == 80 || port == 9029
00:37:20 <stepkut> you will want to change that second port number to match the port number you want to hide
00:37:30 <stepkut> really... that should be a flag like, --hide-port-number
00:37:37 <stepkut> so much to do :)
00:37:54 <stepkut> but. that is why it is not at 1.0 yet :)
00:39:55 <zzing_> Something else you might want to be aware of:       setBaseURI      str = let Just (URI {uriAuthority = Just (URIAuth {uriRegName = host, uriPort = port})}) = parseAbsoluteURI str in
00:39:55 <zzing_>                             ModifyConfig $ \c -> c { clckHostname = host, clckPort = read port }
00:40:04 <zzing_> that port will be equal to something like ":8000"
00:40:14 <zzing_> I believe I put that on the mailing list
00:40:34 <zzing_> I created a function and used it:
00:40:34 <zzing_> readDefault :: (Read a) => String -> a -> a
00:40:36 <zzing_> readDefault s d = case reads s of
00:40:36 <zzing_>     [] -> d
00:40:38 <zzing_>     (x, _):_ -> x
00:41:58 <zzing_> ok, socr.uwindsor.ca/   it works (on reload)
00:42:35 <donri> stepkut: there was some mention of generics for instance derivation on reddit... remind me again what about generics is less compile-time safe than TH?
00:42:42 <stepkut> zzing_: so, are we closer? or done?
00:43:10 <stepkut> I don't see how you could possible use generics to create instances at runtime..
00:43:21 <zzing_> two last things
00:43:27 <stepkut> or at anytime
00:43:39 <zzing_> verify it works under, say my username with the compilation, then figure out how to get it to drop those privileges
00:44:52 <zzing_> I think I need to set up a rewrite rule to avoid the proxypass for anything with a ~ before it
00:53:08 <zzing_> stepkut, my little trick… sysctl security.mac.portacl.rules=uid:1005:tcp:443  now I don't need sudo to run the server and downgrading privs is now unnecessary
00:54:54 <zzing_> stepkut, thank you very much for your bugfixing, I think we are set for any issues I recall having that are real blockers. The only other one- how do you upload images? I looked at the media thing, and it didn't work.
00:54:57 <donri> stepkut: thus my confusion :) you said web-routes-regular was more runtime than -th
01:27:28 <zzing_> stepkut, have you ever used any rewrite rules before?
01:28:08 <mekeor> you see that link to the example above the headline "IxSet: a set with multiple indexed keys" http://www.happstack.com/docs/crashcourse/AcidState.html#ixset ?   it links to http://www.happstack.com/docs/crashcourse/AcidStateCounter.hs which doesn't compile for me. why?
01:28:58 <mekeor> error/build log: http://hpaste.org/73266
01:31:13 <mekeor> any ideas why i get "No instance for (Control.Monad.State.Class.MonadState CounterState (Update CounterState))" ?
01:49:32 <zzing_> stepkut, can I get logged requests?
02:05:29 <zzing_> stepkut, we are now live on the website, just need an rc script now
02:33:04 <stepcut> zzing_: there is some functionality for creating apache style logs .. you have to enable some hslogger stuff
02:33:17 <stepcut> zzing_: it's not documented at the moment, because I want to replace hslogger with something else
02:33:25 <stepcut> hslogger is a bit overkill and not very fast
02:33:41 <zzing_> ok, I can talk to you about it later
02:33:52 <zzing_> I am just preparing final stuff to get this stuff working as a daemon
02:34:38 <stepcut> mekeor: if I had to guess.. I would say that you have multiple versions of the library that contains Control.Monad.Reader.Class.MonadReader installed and your libraries are compiled against multiple  versions
02:35:23 <stepcut> mekeor: for example.. it is trying to use the latest version of transformers/mtl/etc but acid-state is compiled against an older version
02:36:06 <stepcut> mekeor: if you run ghci and then do, :set -v, it will sometimes tell you about version conflicts like that
02:41:13 <stepcut> zzing_: epic!
02:41:35 <stepcut> zzing_: I should probably start a page listing sites using clckwrks :)
02:41:58 <zzing_> stepcut, "The poor suckers using clckwrks is..."
02:41:59 <zzing_> :P
02:42:03 <stepcut> :)
02:42:28 <stepcut> poor suckers are using php, cutting edge people that want the best in life are using clckwrks :)
02:42:57 <zzing_> stepcut, I am not a fan of php, but wordpress is freaking awesome
02:43:16 <stepcut> zzing_: http://i.imgur.com/OdYxZ.jpg
02:43:52 <stepcut> wordpress is freaking horrible. but the *idea* of wordpress is awesome. The idea behind clckwrks is to make a wordpress that actually works ;)
02:44:16 <stepcut> obviously got some catching up to do still
02:44:31 <zzing_> stepcut, i have a network site up that will be wonderful to sign people up to once school starts
02:44:43 <stepcut> but i think the type system will make things a lot easier when it comes to having lots of plugins and themes available
02:44:51 <stepcut> nice
02:45:56 <zzing_> stepcut, I will be looking at your stuff closer, I cannot guarantee long term use, but for now I am on board. It depends on how insane it gets :P.
02:46:06 <stepcut> :)
02:46:20 <zzing_> Its features are sufficient. But what I really want to see is this thing get vastly simpler
02:46:25 <stepcut> me too
02:46:41 <stepcut> I want Main.hs to be only a few lines
02:46:48 <stepcut> for 1.0
02:46:54 <zzing_> stepcut, are you going to be around tomorrow or friday?
02:47:08 <stepcut> yes
02:47:22 <stepcut> getting ready for burning man and ICFP
02:47:42 <zzing_> ok, I want to get a development setup going where I don't have to recompile a lot of stuff when testing
02:47:49 <stepcut> cool
02:48:03 <zzing_> What I would really like is to be able to generate a few graphs of dependencies
02:48:15 <stepcut> getting to 1.0 is basically a process of making everything vastly simpler
02:48:33 <zzing_> stepcut, the first thing I will suggest is above - get rid of those 'read' calls
02:49:11 <stepcut> the Main.hs should be way cleaner, adding and initializing plugins should be really straight-forward, creating your initial site should require no coding, etc
02:49:58 <zzing_> One of my real desires is fastcgi
02:50:01 <stepcut> getting rid of the read calls would generate cleaner error messages, but is that all ?
02:50:22 <stepcut> getting fastcgi should only take a few hours
02:50:44 <zzing_> stepcut, well yesterday I was getting incomprehensible messages because it was trying to read from ":8000"
02:50:47 <stepcut> maybe less :)
02:51:02 <stepcut> yeah.. that is probably a bug :)
02:51:02 <zzing_> Have you ever considered just making this one of those WAI?
02:51:16 <zzing_> That is at least one bug I was able to figure out on my own :-)
02:51:22 <zzing_> How do we back up site data?
02:51:42 <stepcut> rsync?
02:51:52 <zzing_> I mean locally
02:51:55 <zzing_> with the server running
02:51:56 <stepcut> it would be best to trigger a call to 'createArchive' before doing the rsync
02:52:13 <zzing_> create an admin button for it? :P
02:52:30 <stepcut> but option is to do, createCheckpoint + createArchive, and then rsync the data somewhere
02:52:56 <zzing_> can we make the cli work like the admin menu?
02:53:16 <zzing_> the idea being that an enterprising user could use a local editor they like
02:53:21 <zzing_> similar to how git does with commits
02:53:24 <stepcut> not sure if an admin button works.. for example, I initiate backups remotely.. so I really need a password protected API call that does the createCheckpoint + createArchive, and then I can do the backup
02:53:36 <stepcut> I will add something to clckwrks-cli… that should be easy
02:54:03 <stepcut> by 1.0, I also want to be able to export the entire dataset as JSON
02:54:05 <zzing_> ok, we need to go over how this thing works. This really is something like what I was thinking of making, just more concrete
02:54:19 <zzing_> stepcut, do you have a time factor for 1.0 in mind?
02:54:30 <stepcut> no
02:54:41 <stepcut> right now I have a hard time thinking beyond sept 16
02:54:54 <zzing_> fair enough
02:54:59 <stepcut> because I have so much to get done in the next 7 days
02:55:10 <stepcut> but
02:55:42 <zzing_> One thing I also want to do is make this thing behave well as a daemon
02:55:46 <stepcut> my hope is that when I get back from ICFP, the parser library for pipes will be available and we can prototype a new http backend for happstack
02:56:20 <stepcut> yeah.. there are some daemonize libraries an hackage that would be nice to leverage
02:56:38 <stepcut> I use start-stop-daemon on debian/ubuntu, and that does the job for me.. but things could be better
02:57:09 <stepcut> in related news, someone just submitted a patch to happstack-server that let's you wait on all the running threads before you shutdown
03:01:47 <stepcut> I have to balance my time between happstack, clckwrks, and the stuff I do for work that uses that technology. But, I can be swayed to shift the balance more towards clckwrks if you want to help out :)
03:02:27 <stepcut> of course, a bigger, badder, http backend for happstack affects clckwrks as well :)
03:03:05 <stepcut> so, the current focus for clckwrks is really focusing on making it a solid blogging/cms platform I think
03:03:26 <stepcut> that is.. making it really easy to do what you just did
03:03:54 <stepcut> that is a good milestone towards 1.0 I think
03:04:39 <stepcut> robust and plentiful plugins are ultimately the big selling point.. but even if the core clckwrks library was perfect now, it would still take a while for those plugins to materialize
03:04:56 <stepcut> so, we should fine small niches that we can excel at in the meantime
03:05:50 <stepcut> so, for now that means making the non-plugin-extended experience really solid
03:05:56 <zzing_> hmm, issue
03:05:57 <zzing_> socr-dot-org-server: _media_uploads: createDirectory: permission denied (Permission denied)
03:06:19 <stepcut> you dropped root permissions?
03:06:28 <zzing_> yes, let me show you the script
03:06:32 <stepcut> that is fine
03:06:40 <zzing_> https://gist.github.com/990034599faaae6af540
03:06:53 <zzing_> So it is passing --top=/usr/local/socrdata
03:07:11 <stepcut> seems like the server does not have write permissions to that directory?
03:07:15 <zzing_> which alread has _media_uploads
03:07:20 <zzing_> it owns it
03:07:38 <stepcut> hmm
03:07:40 <zzing_> and it can write
03:07:51 <stepcut> I believe it just calls createDirectoryIfMissing
03:07:54 <stepcut> or whatever it is called
03:08:37 <zzing_> I can confirm mkdir does work there
03:08:49 <zzing_> time to try running it as www:www manually
03:09:18 <stepcut>           withMediaConfig (fmap (\p -> p </> "_state") $ clckTopDir cc ) "_media_uploads" $ \mediaConf ->
03:09:25 <zzing_> ok it should work
03:09:32 <zzing_> unless, the parameters are not being passed
03:11:40 <stepcut> as far as I know, it works for me
03:11:55 <zzing_> I ran it manually as www:www and it worked fine
03:12:10 <stepcut> ACTION checks
03:12:28 <zzing_> this is real interesting...
03:12:30 <zzing_> sudo -g www -u www /usr/local/bin/socr-dot-org-server --jstree-path=/usr/local/socrdata/jstree --json2-path=/usr/local/socrdata/json2 --jquery-path=/usr/local/socrdata/jquery --base-uri=http://socr.uwindsor.ca --http-port 8000 --top=/usr/local/socrdata
03:12:31 <stepcut> you ran your clckwrks site manually as www:www ?
03:12:38 <zzing_> Static Server Started.
03:12:38 <zzing_> socr-dot-org-server: _media_uploads: createDirectory: permission denied (Permission denied)
03:12:49 <zzing_> But when I do  sudo -g www -u www bash   and run the command it works fine
03:13:08 <stepcut> very mysterious
03:15:03 <stepcut> so, you are running the sudo command as a user?
03:17:11 <zzing_> no, in the rc script
03:17:13 <zzing_> oh yes
03:17:16 <zzing_> root
03:17:25 <zzing_> in rc script it is root and command line is root
03:17:33 <stepcut> hmm
03:18:14 <stepcut> when you run it via sudo, if you do, ps auxwww, (or whatever the BSD equiv is) do all the command line options show up?
03:19:31 <stepcut> I can totally believe that it works when you go through bash first.. because that sort of crap has happened to me plenty of times.. but I have no idea why that would actually make a difference
03:19:34 <zzing_> it wouldn't be able to tell because it exits immediately
03:19:41 <stepcut> unless it is changing the umask or something
03:20:14 <stepcut> what happens if you change it to, sudo -g www -u www echo /usr/local/bin/socr-dot-org-server --jstree-path=/usr/local/socrdata/jstree --json2-path=/usr/local/socrdata/json2 --jquery-path=/usr/local/socrdata/jquery --base-uri=http://socr.uwindsor.ca --http-port 8000 --top=/usr/local/socrdata
03:20:21 <stepcut> (I just added an echo before the command)
03:20:41 <stepcut> also, sudo -g www -u www whoami
03:20:59 <stepcut> and maybe, sudo -g www -u www umask
03:22:24 <zzing_> www and 0022
03:22:56 <zzing_> I just created a script to do the server starting without sudo, and even then it fails
03:23:41 <stepcut> >:(
03:23:59 <stepcut> and, the echo command successfully shows the correct command-line?
03:24:41 <zzing_> appears to
03:25:14 <zzing_> I would like to know what dir it is trying to make - the full path
03:25:38 <stepcut> yea
03:25:39 <zzing_> BTW, how do I make additional accounts?
03:25:45 <zzing_> admin accounts
03:25:58 <stepcut> that is exactly why I am working on an updated version of clckwrks-cli :)
03:26:09 <zzing_> Can a regular account create pages?
03:26:14 <stepcut> nope
03:26:30 <zzing_> hmm, this is definitely something I need :
03:26:38 <stepcut> I think there are currently three permission levels, Guest, Editor, Admin
03:26:47 <stepcut> but only Admin can create pages at the moment
03:27:12 <stepcut> the idea, though, is to make that more flexible so that you can adjust that on a per site basis
03:27:19 <zzing_> I am demonstrating this tomorrow to the president of our organization, I will just have to use my account then.
03:27:24 <stepcut> like, give editors permission to edit some/all the pages
03:27:50 <stepcut> the easiest fix would be to modify the clckwrks-cli program and allow you to specify the UserId to promote on the commandline
03:27:53 <stepcut> should take 5 mins :)
03:28:05 <stepcut> I am going all out and adding an interactive command-line with history
03:28:11 <stepcut> similar to ghci, mysql-client, etc
03:28:18 <zzing_> oh that would be nice
03:28:26 <zzing_> does it communicate with the server directly?
03:28:33 <stepcut> yes
03:28:36 <zzing_> nice
03:28:49 <stepcut> more specifically, it communicates with acid-state directly
03:29:47 <zzing_> Isn't that two different processes?
03:29:48 <stepcut> when you specify,  clckwrks-cli _state/profileData_socket
03:30:00 <zzing_> ok
03:30:25 <stepcut> you are telling clckwrks-cli where to find the UnixSocket for talking to acid-state.. you should probably ensure that file is only readable/writeable by people you trust
03:35:50 <zzing_> Q: Is it possible to make a practical webapp that is mostly pure?
03:37:02 <stepcut> yes, but not today
03:37:15 <stepcut> trying to move happstack more in that direction
03:38:13 <stepcut> most of a happstack application is actually pretty pure
03:38:21 <zzing_> I think I have another bug for you
03:38:31 <zzing_> my script had to change dir
03:38:42 <stepcut> the main IO comes from reading/writing the network data, talking to the database, and if you read/write files from the disk (image uploads, serving static content)
03:38:48 <zzing_> so I think it is trying to create the directory in pwd instead of under top
03:39:04 <stepcut> hmm
03:39:51 <zzing_> hmm, problem: my images aren't showing except for one from the theme
03:40:02 <zzing_> They should be here: http://socr.uwindsor.ca/c/view-page-slug/2/about
03:40:16 <zzing_> oh that is my fault
03:40:20 <zzing_> hard coding
03:40:57 <stepcut> it should only use pwd if you don't set --top
03:41:02 <stepcut> first we call:           withMediaConfig (fmap (\p -> p </> "_state") $ clckTopDir cc ) "_media_uploads" $ \mediaConf ->
03:41:32 <stepcut> oh. hmm
03:41:47 <stepcut> withMediaConfig :: Maybe FilePath -> FilePath -> (MediaConfig -> IO a) -> IO a
03:41:47 <stepcut> withMediaConfig mBasePath mediaDir f =
03:41:49 <stepcut>     do let basePath = fromMaybe "_state" mBasePath
03:41:49 <stepcut>            cacheDir  = mediaDir </> "_cache"
03:42:12 <zzing_>  /usr/local/bin/socr-dot-org-server --jstree-path=/usr/local/socrdata/jstree --json2-path=/usr/local/socrdata/json2 --jquery-path=/usr/local/socrdata/jquery --base-uri=http://socr.uwindsor.ca --http-port 8000 --top=/usr/local/socrdata
03:42:19 <stepcut> i think this is a bug
03:42:40 <zzing_> Why do I think that this is going to be a pattern
03:42:47 <zzing_> Every new user will find 10 bugs :P
03:42:48 <stepcut> :)
03:43:39 <stepcut> this is a result of the plugins stuff still being in flux
03:44:04 <zzing_> oh yes, the main example should not have any uncessary plugins
03:44:16 <zzing_> *and* I couldn't remove the ones that were being used :P
03:44:46 <stepcut> why not?
03:44:51 <stepcut> I remove the ones I am not using
03:45:05 <zzing_> I couldn't figure out how to fix the errors resulting
03:45:06 <stepcut> but, yeah, clckwrks-dot-com should not be the main example
03:45:24 <stepcut> it was just the only clckwrks site around when I first released clckwrks :)
03:45:27 <zzing_> Have you looked at how that snaplet thing is?
03:45:36 <stepcut> yes
03:45:52 <stepcut> found some bugs even :)
03:46:25 <zzing_> It took some time to figure out a lot of pain with types
03:46:41 <zzing_> and I bet we have set off an alarm in the snap channel
03:47:00 <stepcut> no, only if we were talking on #haskell
03:47:42 <zzing_> They have spies everywhere!
03:47:46 <zzing_> I see one here!
03:49:31 <stepcut> so, I guess in Main.hs we should have,            withMediaConfig (fmap (\p -> p </> "_state") $ clckTopDir cc ) (fmap (\p -> p </> "_media_uploads") $ clckTopDir cc) $ \mediaConf ->
03:49:57 <stepcut> which I am not thrilled about
03:50:17 <stepcut> on the one hand, it is good to be able to specify separate locations for the acid-state stuff versus media files
03:50:18 <zzing_> that is so noisy I cannot cut through it
03:50:22 <stepcut> but.. it is clearly also error prone
03:50:33 <stepcut> yeah
03:50:34 <zzing_> is the media plugin meant to upload images and such?
03:50:39 <stepcut> yup
03:50:51 <zzing_> ok, when I tried it , it failed to work
03:50:52 <stepcut> currently it only supports jpg
03:51:09 <zzing_> It shouldn't care should it?
03:51:35 <stepcut> it cares because it needs to create thumbnails and resize images
03:51:47 <zzing_> when I try to upload: Server error: user error (magicFile: cannot stat `jeff1.jpg' (No such file or directory))
03:52:04 <stepcut> well.. that is probably because the _media_upload directory didn't exist?
03:52:19 <zzing_> # ls socrdata/
03:52:19 <zzing_> _media_uploads	_state		jquery		json2		jstree
03:52:21 <zzing_> it does
03:53:07 <stepcut> it definitely worked for me at one point :)
03:53:23 <zzing_> at one point eh?
03:53:42 <zzing_> well I just threw the images in the theme to compensate
03:54:01 <zzing_> Please don't mind if I decide to write something else :P
03:54:07 <stepcut> I don't actually need a media gallery at the moment
03:54:20 <stepcut> good luck! you'll need it :)
03:54:38 <zzing_> I don't care about a media gallery, I just want to upload images
03:57:03 <stepkut> oo. I got that error too :)
03:59:33 <stepkut> I think I know why
03:59:58 <stepkut> I think when I switched from digestive-functors to reform, the order of the arguments returned by inputFile changed
04:00:38 <zzing_> So tomorrow one thing I want to do is setup a workflow that can go from development to production, that will give me good testability
04:00:57 <stepkut> it sure did
04:01:03 <stepkut> one moment
04:06:20 <zzing_> Did you see my bug about the unicode?
04:06:53 <stepkut> fixed the image upload
04:07:18 <stepkut> which one was that ?
04:07:28 <zzing_> should be bug #20
04:07:38 <zzing_> http://www.clckwrks.com/b/view-bug/20
04:08:22 <stepkut> you tried to put that in a page?
04:09:07 <zzing_> yes, my original constitution document had a few of them
04:09:19 <zzing_> I copied them from a pdf generated from latex when I was converting to markdwon
04:10:46 <stepkut> was that before or after we fixed the hang?
04:11:08 <stepkut> I just put some unicode in a document with no issues
04:11:43 <zzing_> let me try it out :P
04:12:11 <zzing_> actually, on second thought, no, because it caused the server to stop doing much of anything last time, and I don't care to go back to the ssh terminal to fix it just now
04:12:15 <zzing_> I can try it tomrrow
04:12:55 <stepkut> in fact, I put ’ in the page and it worked fine
04:14:09 <stepkut> specifically, I added, ♥♥♥’ to the start of my lorum ipsum page :)
04:14:17 <stepkut> so, I'll need more details to duplicate
04:16:11 <zzing_> Now that error I put in there, is it possibly a problem that is not being accounted for?
04:17:34 <stepkut> not sure I understand the question
04:18:03 <stepkut> but, if you got that error before we switched markdown from using hGetContents to T.hGetContents, then I would not be surprised to see different results
04:18:35 <stepkut> if you still get the error, I need more details about how to reproduce, because I believe I added the same unicode character that gave you trouble with out any issues
04:18:52 <zzing_> ok, I understand what you mean
04:30:39 <zzing_> Thyme für mé sl££p
14:37:14 <Yiq> http://www.erlang-factory.com/upload/presentations/527/erlang-factory-2012-slides.pdf #heroku supported languages. ANYTHING. Including Erlang. ...o including Haskell?
14:47:08 <Lemmih> spam?
15:33:29 <zzing> guten tag
15:34:07 <donri> ohai
18:01:16 <stepcut> I wonder what the best way to make a, 'clckwrks init' command is
18:04:01 <donri> darcs get? :)
18:04:26 <stepcut> except, then you have to rename a bunch of things by hand
18:05:12 <stepcut> would rather have something that prompts for the name of the site, and what plugins you want configured by default, and then it generates a starting site that works
18:05:34 <stepcut> as you know.. there are far too many steps to get started right now
18:08:41 <stepcut> bbiab
18:09:01 <donri> well as we discussed, darcs replace
18:09:10 <donri> repo could include a make task to run it, or something like that
18:09:26 <donri> i'm not sure if it's a good idea, but might be worth investigating at least
18:12:39 <stepcut> but we also need file renaming, such as the .cabal file, and the names of the top level directories
18:12:51 <stepcut> mysite-dot-com / clckwrks-theme-my-site
18:13:27 <stepcut> having the templatizer get the source from darcs is not bad though
18:13:38 <stepcut> and.. for the token replace, using darcs replace could still be good
18:13:55 <stepcut> of course, many people want to stick their stuff in git
18:14:23 <stepcut> ACTION kicks git
18:15:41 <stepcut> fortunately, we do not need a really flexible general purpose solution
18:15:50 <donri> yes, darcs move
18:15:59 <stepcut> so perhaps a little haskell code that runs darcs replace and then renames some directories would be fine
18:16:24 <stepcut> we need the template to build when checked directly out of darcs with no mods
18:16:35 <stepcut> but we don't have to use silly tokens like ${appname} in the source
18:16:52 <stepcut> we can instead just use unique tokens that are also valid Haskell identifiers
18:16:54 <donri> -XCPP ;)
18:17:13 <stepcut> I hate that.. makes it hard to use ghci
18:17:24 <donri> cabal-dev ghci!
18:17:34 <donri> ACTION not really serious about CPP
18:17:49 <mightybyte> cabal-dev ghci sucks
18:18:20 <stepcut> well, it is good to explicitly eliminate CPP, because there is a time when I would have considered it :)
18:19:42 <stepcut> the merit of the darcs method is that we can then push patches to the template that the user can pull after they have started their app. As long as they are  willing to embrace darcs. And git users will just have to do it manually or something
18:20:01 <donri> and for darcs haters we could simply include a .gitignore with _darcs listed (they could also just rm -r _darcs, but then they can't darcs pull changes to the scaffold)
18:20:42 <stepcut> not sure if you can really darcs pull if you are using git as your primary management tool
18:20:50 <donri> sure you can
18:21:00 <donri> darcs applies its changes, you git commit them
18:21:19 <stepcut> in theory, that sounds good, just not sure in practice how well it will work
18:21:28 <stepcut> since to darcs it will look like you have tons of uncommitted changes
18:21:37 <donri> in practice, it might be problematic if you don't have the original _darcs (e.g. you cloned from git)
18:21:43 <stepcut> if there are merge conflicts.. seems problematic
18:21:45 <donri> ah yea, hm
18:22:02 <donri> darcs rec -alm lolgit
18:22:44 <stepcut> still sounds messy in the face of merge conflicts
18:23:08 <stepcut> first thing to do is create a stripped down clckwrks site
18:23:24 <donri> yea probably messy. still worth investigating, maybe?
18:23:50 <stepcut> something with no plugins (or maybe just the media gallery) and without the craziness for using hs-plugins
18:24:10 <stepcut> something targetting people who just want a simple blog/cms
18:24:43 <stepcut> to make Main.hs as clean as it should be, we kind of need to fix the plugins stuff though :-/
18:24:51 <stepcut> any, be back in 1.5 hours or so
18:36:46 <zzing> guten tag!
19:18:39 <zzing> anyone alive?
20:15:30 <Palmik> Hmm, if some of your "objects" has customizable URL, do you wrap the URL or the ID in the routes' constructor (assuming you use web-routes).
20:16:26 <donri> if you mean slug, probably put the slug in the route type
20:16:56 <Palmik> For now I wrap the URL (easier parsing with sane URLs) but doing the URL -> ID conversion in the routing phase would also have its benefits
20:17:12 <Palmik> So it'S called slug, thanks. :P
20:18:20 <donri> that sounds like it would require hooking the router into your state/db
20:18:48 <Palmik> Yes it would, that's the disadvantage.
20:20:18 <Palmik> Well, I will mzero at the start of the handlers for now.
20:28:15 <Palmik> The reason I would rather have IDs in the route is when I need to link to such route in a template -- I have to pass the route around (the same would be true for ID, but I usually already have that handy from the handler since I used it for some DB operations).
20:38:40 <stepcut> Palmik: I don't really understand the questqien
20:38:43 <stepcut> question
20:43:16 <Palmik> Well, it's about what you think is better, not really about functionality or anything: if you have an "object" that has both unique slug and ID, would you rather have the route's constructor contain the ID or the slug? (So would you rather have ... | Post Slug or ... | Post PostID)
20:57:09 <stepcut> gone now :(
20:57:21 <stepcut> anyway, I use an ID because it seems less likely to change
20:57:25 <stepcut> but the slug might
20:57:49 <donri> although to be resty you should 404 if the slug is wrong anyway
20:58:07 <donri> or at least redirect to the right one
20:58:20 <stepcut> :-/
20:58:34 <donri> rest keeps me restless!
20:58:49 <stepcut> rest is for people that like to follow arbitrary rules :p
21:02:11 <zzing> bonojour stepcut
21:02:17 <stepkut> zzing: hello
21:02:34 <stepkut> zzing: could you reproduce that unicode issue?
21:02:41 <zzing> stepkut: didn't get around to it :P
21:02:50 <zzing> I am trying to buld a new ghc
21:02:56 <stepkut> ah
21:02:58 <stepkut> 7.6?
21:03:03 <zzing> actually yes
21:03:10 <zzing> 7.4.2 wasn't building
21:03:15 <stepkut> ah
21:03:25 <stepkut> I have not tested happstack/clckwrks under 7.6 yet
21:03:31 <stepkut> don't expect anything major though
21:03:40 <stepkut> maybe just bumping some package ranges
21:03:53 <zzing> I am getting this problem: $(error Make has restarted itself $(MAKE_RESTARTS) times; is there a makefile bug?)
21:04:52 <zzing> got rid fo that and it might be compiling now
21:05:12 <zzing> stepkut: I wanted to start thinking about a way to configure this thing from a configuration file
21:05:33 <stepkut> configure what?
21:05:47 <zzing> the server primarily, and maybe some of the actual application
21:05:57 <stepkut> but.. configure what part of it ?
21:06:14 <zzing> Well, lets start with all of those command line options I use now
21:07:44 <zzing> The next thing is I would like to figure out a way to roll out a new production release without using cabal to install globally - I am not entirely certain how I would do that yet because of the theme
21:08:00 <zzing> Does the theme statically compile to the server?
21:08:28 <stepkut> yes.. unless you use the plugins option
21:08:28 <zzing> If so, it would make it easier to install the data files it needs
21:08:46 <stepkut> but the data files are not linked into the server, they have to be installed some other way
21:09:14 <zzing> So basically, I could setup something where binary goes into /usr/local/bin, configuration /usr/local/etc, datafiles under /usr/local/share
21:09:56 <stepkut> sure. but it is different on different distributions
21:11:09 <stepkut> we also have to consider the various methods of running the server
21:11:25 <zzing> My main concern is a standard unix layout
21:11:43 <zzing> Does this thing even run on windows?
21:11:43 <stepkut> but there are so many standards to chose from!
21:11:54 <stepkut> it should if you don't use the plugins stuff
21:12:12 <stepkut> and that should be fixable once we migrate in the portable inotify stuff
21:12:16 <zzing> stepkut: What standard on unix deviates from $PREFIX /bin, /etc, share, etc.
21:14:02 <zzing> stepkut: I think this can be flexible two with the idea of a decent site install config file
21:14:13 <stepkut> dunno, I think most people are FHS compliant these days
21:14:33 <stepkut> except windows
21:14:40 <donri> osx?
21:14:57 <stepkut> anyway, I am not sure why this is relevant?
21:15:02 <zzing> Before I go that far, I am interested to know how I could setup something where runhaskell could essentially run the whole clckwrks stuff so I can develop with the whole thing without having cabal install layers
21:15:07 <zzing> stepkut: it is deployment
21:15:08 <stepkut> aren't those install locations decided by cabal and/or the package manager?
21:15:25 <donri> if you simply do sudo cabal install it should install in /usr/local anyway
21:15:46 <zzing> stepkut: cabal would install the theme stuff into a lib dir when I wouldn't want that
21:15:55 <stepkut> donri: yes.. there are some CPP macros there that use the Paths_* stuff to figure out where everything is and make it work
21:16:42 <stepkut> zzing: so what are you suggesting? A different tool for installing clckwrks than cabal ?
21:17:11 <zzing> stepkut: I am thinking so, I have to look more into what cabal can do
21:18:20 <stepkut> zzing: cabal allows you to specific the libdir, datadir, etc
21:18:27 <stepkut> and bindir and prefix
21:18:51 <donri> i think zzing wants to have runtime-editable css files?
21:19:04 <zzing> donri: not worried about that
21:19:17 <donri> what are you trying to do then
21:19:27 <zzing> I just want to have a normal unix install ability without installing things as haskell libraries
21:19:53 <zzing> Especially if most of it is statically linked
21:20:19 <donri> what distro?
21:20:29 <zzing> no distro - freebsd
21:20:35 <stepkut> zzing: what makes something a 'normal unix intall'
21:21:57 <zzing> stepkut: Under the assumption that the application server and the theme should be a unit - the application binary  should go into a bin dir, configuration in etc, and theme data files under share. If the theme were a plugin, it should be under share and not part of a ghc package database
21:23:44 <zzing> ok, it appears a subdirectory under lib for the application is normal
21:24:12 <zzing> the key is not to involve ghc package database
21:24:17 <stepkut> zzing: why?
21:24:35 <stepkut> zzing: how do you expect ghc to link against the theme if it doesn't know it exists?
21:26:41 <stepkut> I don't see why it is wrong for the theme to be visible in the package database.. it's a library like anything else, and might be used by several different applications
21:27:52 <zzing> stepkut: how do you deal with modifying the theme and reinstalling in the database?
21:27:59 <donri> zzing: C libraries are still indexed by pkg-config, at least on linux, duno freebsd
21:28:10 <stepkut> zzing: who is making this modification?
21:28:19 <zzing> donri: that is completely voluntary
21:28:27 <zzing> stepkut: me
21:29:57 <stepkut> during development I typically checkout the directory with all the relevant packages and use, runhaskell -i../clckwrks-theme-mytheme Main.hs --theme-path=../clckwrks-theme-mytheme
21:30:29 <stepkut> when I am ready to deploy the changes, I check everything in, push the patch to the autobuilder, rebuild the .debs and apt-get install them on the server..
21:31:21 <stepkut> now.. things get a little more complicated when we add the possibility to one-click install new themes without restarting the server
21:31:49 <stepkut> well, both with and without restarting the server
21:31:51 <zzing> Lets suspend this discussion for a moment and focus a development setup where I can modify the main libraries, clckwrks and other friends, along with my app and theme - say I want to run this with runhaskell, can I just do a bunch of includes with runhaskell?
21:32:34 <stepkut> zzing: that is what I do.. look at: clckwrks/clckwrks-dot-com/run.sh
21:33:36 <stepkut> some of those command-line options are probably not needed because the values are defaulted correctly in Main.hs
21:33:53 <zzing> ok, so that creates the ability to change things for development nice and clean
21:33:53 <stepkut> there are #ifdefs that do one thing when CABAL is defined and assume local development when it is not
21:33:58 <stepkut> yes
21:34:36 <zzing> Now if I build everything and install it locally ~/.ghc... how do I avoid the 'reinstall' danger thing that I am constantly warned about?
21:35:16 <stepkut> i have no idea what this reinstall danger thing is that you speak of
21:35:40 <zzing> cabal warns about it and forces you to put a parameter to do the reinstall
21:36:04 <stepkut> shouldn't you be bumping the version number or something?
21:36:17 <zzing> I think it is related to this: http://www.haskell.org/pipermail/libraries/2012-February/017495.html
21:36:40 <stepkut> I don't usually use cabal install.. I just do, runhaskell Setup configure --user && runhaskell Setup build && runhaskell Setup install
21:36:56 <zzing> I suppose I could do that with the version number
21:37:24 <zzing> Possibly might make sense for me to fork the main clckwkrs stuff so any changes I make are independant of anything you push
21:37:46 <stepkut> you mean the main clckwrks repo?
21:40:22 <zzing> pretty much
21:40:36 <zzing> It keeps my changes and your changes separate on my machine
21:40:57 <stepkut> by checking it out, don't you already have a fork?
21:41:16 <zzing> stepkut: yes, but if I make changes there, then I have to deal with merges
21:41:22 <zzing> once you update something
21:41:33 <zzing> I would rather keep a pristine copy from you
21:42:58 <stepkut> sure
21:45:07 <zzing> ok, I think I can setup my development flow by tomorrow, and then work on deployment shortly to replace the ad hoc install I have now.
21:45:30 <zzing> I think I understand enough to get going, and I am working on a project I think you will like. It is the one thing I definitely can do.
21:45:37 <stepkut> nice
22:26:28 <zzing> ghc takes a long time to compile
22:29:05 <stepcut> yup
23:02:13 <luite> use -j8 if you have enough cores and ram
23:22:53 <zzing> ghc test suite running now
23:23:07 <stepcut> :)
23:23:22 <zzing> doing fast now :-)
23:39:03 <zzing> 201 unexpected failures
23:39:10 <zzing> probably not too bad
23:40:36 <stepcut> :)
23:44:38 <zzing> Might as well do the full test :P
23:44:56 <zzing> hmm Shared object "libffi.so.6" not found, required by "libHSrts-ghc7.6.0.20120815.so"
23:54:13 <donri> so beyond unit values, css properties that take a size also sometimes support "auto", "none", or a percentage, but which of these they support vary between the properties. what's a good way to represent this without making types for each possible combo?
23:54:18 <donri> stepcut: ^ if you have time :)
23:55:10 <donri> currently i stuff them all into one type which means you can write invalid css
23:55:18 <donri> and we can't have that!
23:56:55 <stepkut> hmm. types for each possible combo sounds like a lot of ongoing and annoying work?
23:57:19 <donri> yep
23:57:51 <stepkut> not sure if it is really worth it?
23:58:04 <donri> duno, i'm part doing it for fun ;)
23:58:40 <stepkut> it's clear that the CSS designers did not start by designing a datatype :-/
23:58:50 <donri> yep
23:58:57 <stepkut> so it is full of special cases
23:59:15 <stepkut> you can only polish a turd so much..
23:59:20 <donri> i'm hoping that once i encode all the cases in types i can forget about them and let the type system guide me when i author stylesheets