]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/todo/rewrite_ikiwiki_in_haskell/discussion.mdwn
I've not looked at Shake yet, thanks, I'll give it a look! — [[Jon]]
[git.ikiwiki.info.git] / doc / todo / rewrite_ikiwiki_in_haskell / discussion.mdwn
1 Ok, I have to admit, I have no idea if this is an April fool's joke or not.  
2 Congratulations for demonstrating that April fools jokes can still be subtle
3 (whether intentionally or not!) -- [[Jon]]
5 > Having said all that, have you looked at erlang? Have you heard of couchdb?
6 > I'd strongly recommend looking at that. -- [[Jon]]
8 >> I've glanced at couchdb, but don't see how it would tie in with ikiwiki.
9 >> --[[Joey]] 
12 >>> It doesn't really. I recently (re-)read about couchdb and thought that
13 >>> what it was trying to do had some comparisons with the thinking going on
14 >>> in [[todo/structured_page_data]]. -- [[Jon]]
16 -----
18 I'm torn about this idea, if it's actually serious.  I'm very comfortable
19 programming in Perl, and have written quite a few modules for IkiWiki, and
20 it would be a huge pain to have to start from scratch all over again. On
21 the other hand, this could be a motivation for me to learn Haskell.  My
22 only encounter with Haskell has been a brief time when I was using the
23 Xmonad window manager, but it looks like an interesting language.
24 Functional programming is cool.
26 There are a lot of interesting plusses for Haskell you note (in the parent
27 page), but it's true that the idea is horribly daunting (as [[Joey]] said
28 "If only I had a spare year").  Is there any way that you could "start
29 small"?  Because nothing will ever happen if the task is too daunting to
30 even start.
32 > This seems destined to remain a thought experiment unless something like
33 > that can be done, or I get a serious case of second system disease.
34
35 > I've considered doing things like using the external plugin interface
36 > to run a separate haskell program, which would allow implementing
37 > arbitrary plugins in haskell (starting with a pandoc plugin..),
38 > and could perhaps grow to subsume the perl code. However, this would
39 > stick us with the perl data structures, which are not a very good fit
40 > for haskell. --[[Joey]]
42 On further thought... perhaps it would be easier to fork or contribute to
43 an existing Haskell-based wiki, such as <a
44 href="http://jaspervdj.be/hakyll">Hakyll</a>?
46 --[[KathrynAndersen]]
48 > As far as I know there are no other wikis (haskell or otherwise)
49 > that are wiki compilers. Since we know from experience that dealing
50 > with static compilation turns out to be one of the trickiest parts of
51 > ikiwiki, I'm doubtful about trying to bolt that into one. --[[Joey]] 
53 >> Haykll isn't a wiki but it does do static compilation. The missing
54 >> parts are: the web interface, the wiki link processing, and page
55 >> dependency stuff. -- [[tychoish]]
57 >>> (nods) Which is why I suggested it.  I'm not sure whether it would be easier to "bolt on" those things than static compilation, but it could be worth looking at, at least. -- [[KathrynAndersen]]
59 -----
61 Rather than coding plugins for the Perl ikiwiki in Haskell, I wonder how easily a Haskell ikiwiki could still support plugins written in Perl? The (old and apparently stale) [HsPerl5](http://hackage.haskell.org/package/HsPerl5) package might provide a helpful starting point there. -- [[JoshTriplett]]
63 -----
65 I'm very keen on this, and would be interested in helping. I've been wanting to use ikiwiki for years, but the idea of investing time in the perl ecosystem and perl-based implementation stops me. -- [[Simon Michael]]
67 -----
69 I've recently been wondering whether I could migrate my personal blog (powered by IkiWiki) to Hakyll.
70 I'm really fond of Ikiwiki's wiki link syntax, as well as the linking rules, and many of the features
71 offered by plugins. Therefore I set out to see how easily (and whether it's even feasible) to implement
72 them on top of Hakyll. I'm totally new to Hakyll so I don't fully understand some of the concepts but
73 I've made some promising initial progress. I decided to share my work in progress experiments here:
74 <https://github.com/jmtd/hakyll-ikiwiki>
76 I can recognise and parse out wiki links and directives. Wikilinks are translated into HTML links, but
77 the page-linking rules are not yet implemented (the wiki link target is passed through as-is). For
78 Directives, I've written basic implementations of `meta` and `tag`. In both cases, I build up Hakyll
79 `Metadata`, which is really a hash map. I've yet to figure out plumbing that back into Hakyll, though.
80 I've got an idea of how to handle `template`, but haven't tried coding it up yet. — [[Jon]]
82 -----
84 Cool, Jon. Have you thought about Shake + pandoc as an interesting alternative to Hakyll,
85 perhaps a little more lightweight and flexible ? Here’s a [bit of Shake code](https://github.com/simonmichael/hledger/blob/master/Shake.hs#L421)
86 I use for rendering wiki-like pages. —[[Simon Michael]]
88 > I've not looked at Shake yet, thanks, I'll give it a look! — [[Jon]]