Inspired by the cellular automata thread, I've recently realized that one can represent a semantically infinite gap buffer using a comonad. The idea is that the result of applying cojoin to a pointed array is an array of all possible shifts of the original pointed array. The "point" in pointed array is the cursor in the text editor. (This is literally exactly what is done to apply a rule to a cellular automaton in that article. I'm just re-interpreting it in terms of text editing.)
This is probably nothing new to many people, but the idea is extremely novel to me, so I'd like to whip together a text editor from scratch just to see it in action, to satisfy my mind as it were. Ideally I'd just like to write a terminal program that allows one to write some text, move the cursor around, and backspace, while allowing me to handle the details of the text itself using the above structure--very simple.
But I don't know how to interact with the terminal in this way using Haskell. Are there any basic libraries out there that would allow me to render text with a flashing cursor in the terminal and to update this in response to keyboard input?
ulidtko
19.10.2012 14:53
Do you really want to delete ?
сам читай
рак в терминальной стадии
сам пиши
http://stackoverflow.com/q/12358083/5311...
слишком мало плюсов, не буду читать. Алсо я тут всё больше илитных интернетов читаю, так что в среднем ты тоже скоро будешь с недостаточным количеством плюсов и я не буду тебя читать(буду только делать вид, я же не хам всё-таки).
хорошо
ты главное лайкай и репости
на твоих
ты даже не представляешь, какой же ты тупой, если что-то предлагаешь мне
я предлагаю тебе дернуть анус