Live data from Hacker News

Microsoft team submits Redis patch to enable Windows support

github.com

11–20 of 103 posts

Re: Microsoft team submits Redis patch to enable Windows support

#12

Can somebody more familiar with the Windows environment explain why prn.h is an "invalid file name"? edit:// thanks all! :)

prn is for printer and there are many such reserved device names

http://en.wikipedia.org/wiki/Device_file#Device_files

Re: Microsoft team submits Redis patch to enable Windows support

#13

Can somebody more familiar with the Windows environment explain why prn.h is an "invalid file name"? edit:// thanks all! :)

You can't have files named like the old DOS devices: CON, LPT, AUX, PRN etc. This is originaly due to CP/M backwards compatibility, it didn't have directories so magic files were udde to pipe stuff to printers and other devices.

Re: Microsoft team submits Redis patch to enable Windows support

#14
post #3

Embrace, extend, extinguish. Does Redis still do that thing where it forks and the child writes its core to disk? How does that work under Windows, which doesn't have fork? Finally, this is one big patch: 339 files changed, 146821 insertions(+), 290 deletions(-) With many of the changes along the lines of: static void *callbackValDup(void *privdata, const void *src) { - ((void) privdata); redisCallback *dup = malloc(…

Not sure what they're going to do regarding fork, but they say this at the end of the gist: TODO Snapshotting (Fork and Write) is not perfect, right now we simply block requests while memory is dumped on disk. We are working on a solution that will give us better performance. An update will be released soon.

So this 146821 line monstrosity isn't even theoretically usable?

(You know, I could rewrite Redis in less than 146,000 lines of code...)

Re: Microsoft team submits Redis patch to enable Windows support

#16

A patch file in a gist instead of a pull request? sigh

A comment at TFA by benatkins has a nice answer:

they probably mainly want feedback from the project maintainers at this stage, and the project maintainers can apply a patch just about as easily as they could apply a pull request. (It's so big that the web view isn't likely to be useful.) Also this will probably be going into a new branch if anywhere, so does a pull request to an existing branch (which is all that's possible AFAIK) even make sense?

Re: Microsoft team submits Redis patch to enable Windows support

#17
Look at the instructions to create a branch out of a commit.

Just

git checkout -b 2.4_win_uv 3fac86ff1d

would have sufficed

Instead, they give a mini git tutorial.

This comment is not a taunt at MS. Just that they have tried to learn git and the process, given that git now has a very good implementation on Windows and since they are trying to do something similar here - bringing Redis to Windows - it doesn't look good.

Re: Microsoft team submits Redis patch to enable Windows support

#18
post #3

Embrace, extend, extinguish. Does Redis still do that thing where it forks and the child writes its core to disk? How does that work under Windows, which doesn't have fork? Finally, this is one big patch: 339 files changed, 146821 insertions(+), 290 deletions(-) With many of the changes along the lines of: static void *callbackValDup(void *privdata, const void *src) { - ((void) privdata); redisCallback *dup = malloc(…

I wonder if they contacted Redis author before starting to work on this. You know, with the patch so big and radical, there's a possibility he doesn't even want to accept it.

What then, all this effort for basically nothing except a fork, which you then have to continue maintaining etc.

Re: Microsoft team submits Redis patch to enable Windows support

#20
post #3

Embrace, extend, extinguish. Does Redis still do that thing where it forks and the child writes its core to disk? How does that work under Windows, which doesn't have fork? Finally, this is one big patch: 339 files changed, 146821 insertions(+), 290 deletions(-) With many of the changes along the lines of: static void *callbackValDup(void *privdata, const void *src) { - ((void) privdata); redisCallback *dup = malloc(…

Correct me if I'm wrong, but casting the result of malloc is generally considered bad form in C, isn't it?
Post reply on HN