adinapoli / termbox-hs

A pure Haskell implementation of Termbox
Other
2 stars 0 forks source link

Port termbox.go #3

Open adinapoli opened 9 years ago

adinapoli commented 9 years ago

In order to get the term's width & height we need to foray into the FFI world. This is a good tutorial http://blog.ezyang.com/2010/06/first-steps-in-c2hs/ cc @filib

Useful starting point: http://stackoverflow.com/questions/12806053/get-terminal-width-haskell

The libc reference: http://www.delorie.com/djgpp/doc/libc/libc_495.html

mcfilib commented 9 years ago

I'll give that tutorial another read.

adinapoli commented 9 years ago

It's quite well written. Shame that c2hs and the whole FFI business is one on those things I rarely do and every time I do I start from scratch over and over again as I have forgot everything on the topic.