Better HN
topnewbestaskshowjobs
Log inSign up

jaspersfather

19 karma · joined Oct 22, 2011 (15y ago) · 7 submissions

Submissions

comment 14y ago · link · parent

No, please don't. Those are reserved for different things.

comment 14y ago · link · parent

What makes that better than just using strings?

comment 14y ago · link · parent

Instead of

    if bla in [bla, blubb, bfoo]:
      return True
    return False
you can write:

    return bla in [bla, blubb, foo]

comment 14y ago · link · parent

Absolutely. I have not seen a factory pattern in use in ages. I think the last time was before http://dirtsimple.org/2004/12/python-is-not-java.html was around.

comment 14y ago · link · parent

The idea of patenting it has roughly the same amount of hilarity.

comment 15y ago · link · parent

That depends more on whether your algorithm is easily distributed. If it is, zeromq will be good for you.

I am currently using it to transfer model parameters learned on machine #1 to machine #2 where real time prediction takes place. The predictions are then sent out via 0mq to a robot controller.

The great thing of building systems with 0mq is that you just add another component without having to think too much about 'but then I will have to implement a protocol for it and HTTP will probably to slow and the request/reply pattern doesn't really fit there blabla'.

comment 15y ago · link · parent

> Only one will get there first, so only one will be able to arrest the person.

Where do you buy them real world semaphores, eh?