Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: A fireplace for Emacs (github.com/johanvts)
257 points by johanvts on Dec 18, 2015 | hide | past | favorite | 69 comments



This could be made more fun, by using more system resources so your laptop heats up too!


The first Twitch office (back when it was Justin.TV) was so cold I wrote a "heater" command for my macbook. It just spun the cpu in a tight loop, and was very effective!


I had a Mac Pro under my desk for a while. If I had done that, I'd have third degree burns.


I was just about to ask if it can keep me warm like my old laptop did...


Reminds me of this: https://xkcd.com/1172/


So all bugfixes should be optional and configurable based on XKCD logic, but it doesn't surprise me, people get accustomed to bugs in unexpected ways.


I'm pretty sure xkcd is mocking the attitude described in the comic.


I am constantly amazed by how many people fail to detect Randall Munroe's sarcasm and mockery...


If so many people don't see it as mockery, you should consider that you might be the one who is interpreting it all wrong


I'm amazed you missed my sarcasm, not easy to portray over text I suppose.


Operations once wrote me an email about how to cleanly exploit a xss vulnerability in the application they're using so they can implement their feature without editing the code base.


The README's linked Emacs animation guide is compact and informative: http://dantorop.info/project/emacs-animation/


> see title

> think to myself "Oh, did someone port Vim-fireplace to emacs? But why? Must be for fun, let's check it out"

> see repo

> "Emacs users"


> Oh, did someone port Vim-fireplace to emacs?

They did! And because Emacs has a time machine module, they did it before vim-fireplace existed, the bastards!


    C-t M-u C-M-S-y <year>
For those of you without Emacs experience.


Which reminds of the Yule Log TV program[1] for those who lived in the NY metro area < 1990. Although it seems farcical now, it was envisioned as a way for low-income residents without a fireplace to have a "fire" during the Christmas holiday.

[1] https://en.wikipedia.org/wiki/Yule_Log_(TV_program)


That name - the Yule Log - seems familiar, and brings up some vague but soothing memories for me. I believe it was an early Internet (i.e. circa 2000, "Web 1.0") web page that displayed the same kind of fireplace-log setup. Gave me some serene, hypnotic peace in the midst of the excitement of programming in Borland Turbo-C!


Yule logs are rather older than the Internet:

https://en.wikipedia.org/wiki/Yule_log


There's also "Fireplace for your Home" on Netflix


My in-laws have a few DVDs with fireplaces on them. Some have also quiet carols playing.


Very neat! :-)

Unfortunately, I'm having a little problem "regulating the heat": C-+ is supposed to make the fire bigger, C-- smaller. When I run this in a tty, neither of the two does anything. When I run it under X, C-+ moves the fire down and C-- moves it up. Is it just me or is that a bug? (Running elementaryOS Freya.)


Thanks, it is the intended behavior. It has been useful for me a few times when the fire didn't align properly. There is no function for making the fire bigger and smaller yet.


Well, de facto it can make the fire bigger or smaller. If the bottom of the fire is below the lower screen edge, only a small part is visible. Move the fire up -> more becomes visible -> the fire becomes "bigger" ;-)

At least is does in a graphical environment. Like I said, it doesn't work in terminal.


Ahh yes good 'ole M-x fireplace


I typically just use C-x M-c M-butterfly to cause a raging firestorm. Then just grab a burning log from there.


Every program attempts to expand until it can display a fireplace. Those programs which cannot so expand are replaced by ones which can.


I love it. I feel nice and cozy while I hack now.


just missing the cracking sounds :)


This is pretty much the best thing ever.


There is a beautiful world out there.

Go explore.


emacs's shell + cacafire anyone? :)

Edit: ok, I tried what I said. Not that great. Frame rate is really too low.

Edit2: http://imgur.com/a/g0JYu


I keep getting weird issues when running it. https://s3.amazonaws.com/coda-files/870Xw.png


Turn off visual-line-mode, maybe? The fringe shows line wrapping indicators, which probably isn't good here.


I'm getting something similar. Turning on truncate-lines fixed it.


This is a great start!

I think we can do even better, though. Only two colours? Only using solid blocks? We should be able to get beautifully smooth 256x256 (dithered) colour!


Just what I needed to complete my auto heating laptop. This animation will compliment the buzzing laptop fan with heat, so I enjoy some warmth this winter.


This is why I visit Hacker News every day! Love it.


Any chance you could add a license? Very neat! :)


Missing license information?


Placing legal paperwork next to a fireplace never ends well.


Top that, Vim.


Cool, now ... make mcedit do this!


Ah, another use for emacs besides Tools > Games > Tetris.


finally a good use for logs!


Ok, someone has to say it.

Why.


You must be a vim user...

In seriousness though, why not? He probably had a good time writing it, learned a thing or two, and now has something fun to show off. "Why" doesn't need an answer if it's fun. Besides, the odds are that "hey, look at how this code makes a fireplace" will get someone interested in coding who was bored by "hey, look how this code lets me manage a large database of packages."


>> Why.

> You must be a vim user...

Best. Reply. Ever.

(Full disclosure: I used Vim for about four years, then switched to emacs. So I know and like both editors, but prefer emacs.)


Do you use evil-mode? I went the opposite direction (Emacs -> vim -> now kak[1]), and I find non-modal editing quite frustrating now.

1: https://github.com/mawww/kakoune


I have been thinking about switching and currently use evil-mode but in default emacs, so I can switch to vim bindings if I want to but when I open a new buffer it's in emacs mode, however to me modal editing can be less productive

I mean, vim's modal language is more expressive, and you can get things done faster, but if I am coding I want most of my brain power to be on the algorithm I write, and I find that sometimes coming up with cool vim motions to do what I need to do instead of up-up-up-delete-up-up-up-delete etc. pulls me out of the zone a little bit because I have to engage my brain more.

For pure fun editing yes, I agree that modal editing is cool, and it is quite nice to be able to do complex text changes without really ever using the cursor keys, but when I am deeply concentrating I don't know, I don't care if I take two seconds longer to do something because I use the cursor keys because in the end those two seconds are seconds I use to think about the problem at hand anyways, which is not "how do I get to that spot and do that text change as quickly as possible"

Not sure, maybe if I give it more time it will become more automatic, but after a few weeks of mostly vim/evil-mode editing I still reach for emacs when doing "serious work"


I've been meaning to look into it for a while, but so far I haven't found the time. On the other hand, I am under no pressure.


I'm a vim user who's trying to convert, actually. So, as a demonstration of elisp, this is cool — but why would anyone actually install this package?


To play with it for 30 seconds and then forget about it. Or to show it to friends at work. Or for any number of silly reasons. Personally, I'm interested in the code - I don't know how to do that in Emacs, and I wish I would.


To see how it's done? I've actually been considering writing a package for emacs that requires a certain amount of animation, and this package would probably provide some useful hints. (Though I'm going to start by reading the animation guide linked to from the README, I think.)


Why does a flower bloom? Why does a lion hunt? Why does the earth spin on its axis and why do nerds fight over which Javascript framework is best?

Ours is not to reason why, ours is but to do and die.


I prefer:

> Ours is not to reason why, ours is to do so that no one has to die.


Tiger got to hunt, bird got to fly; Man got to sit and wonder 'why, why, why?'


There is a very interesting book by E. Anscombe (Oxford philosopher) entitled "Intention" ehich addresses your question.

The answer is difficult.


You're just bitter because your text editor can't do this. ;)


My text editor is written in JavaScript. Which theoretically means anything can be in my editor. Even your puny fire place!

BRB, going to play GTA clone in my editor.


Don't you mean "BRB going to edit text in my web browser"


I work with Johan in an office where everyone else uses vim. Pretty sure he's trying to prove some superiority thing...

Or perhaps he's trying to salvate us all...


    > (why 'emacs-fireplace)
    "Why not?"
    >


Science. And science isn't about WHY, it's about WHY NOT.


Let me finish your question. Why....not? XD


The same reason we're teaching African refugees JavaScript.

Because we can.


Haven't they suffered enough?


Because people enjoy fun.


Amazing!

Have they ported a good text editor to Emacs yet?


They sure have, it's based on this weird old editor called "vim" https://bitbucket.org/lyro/evil/wiki/Home

There's even an emacs distribution built around it https://github.com/syl20bnr/spacemacs




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: