ulidtko 19.10.2012 14:53

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?

1. Smily 19.10.2012 14:54 QIP

сам читай

2. 238328 19.10.2012 14:59

рак в терминальной стадии

3. 238328Smily /1 19.10.2012 14:59

сам пиши

5. 238328ulidtko /4 19.10.2012 15:15

слишком мало плюсов, не буду читать. Алсо я тут всё больше илитных интернетов читаю, так что в среднем ты тоже скоро будешь с недостаточным количеством плюсов и я не буду тебя читать(буду только делать вид, я же не хам всё-таки).

6. ulidtko238328 /5 19.10.2012 15:32

хорошо

7. ulidtko238328 /5 19.10.2012 15:32

ты главное лайкай и репости

9. 238328rtsome /8 19.10.2012 17:53 13137790141350661181291864

на твоих

11. 238328ulidtko /7 19.10.2012 18:21 13137790141350661181291864

ты даже не представляешь, какой же ты тупой, если что-то предлагаешь мне

12. ulidtko238328 /11 19.10.2012 18:52

я предлагаю тебе дернуть анус

Do you really want to delete ?