883 karma · joined June 12, 2014
But it wasn't really documented or guaranteed that it would, so I wrote some bit-bashing code to generate all 232 bit patterns.
I had a project where I had to connect to a data source and serialize some data. When I needed to add an attribute all I had to do was add it to two places: the class itself, and the @classmethod constructor. So in this case I got the serialization for free, but that's all I was using. In reality I also got __repr__, __cmp__, etc, etc for free too, I just wasn't using it. Serialization was free because attr.asdict() knows which attributes are attr.ib() attributes.
@attr.s()
class Foo:
bar = attr.ib()
spam = attr.ib()
eggs = attr.ib() # added this line
@classmethod
def from_something_else(cls, x):
return cls(
bar=x.bar.name,
spam=x.spam,
eggs=x.get_eggs().blah(), # and this line
)
with open('blah.json', 'w') as fout:
json.dump(fout, attr.asdict(o)) # got serialization for freeFunny... I thought they removed it to save space. Apparently they needed space for that void?
Do we really need IPv10?
When will C++ finally catch up?
Have you ever used iTunes or Safari?
After 1 week... speed wobble in my neighborhood, black eye, concussion (I was wearing a helmet), horrible road rash (I was wearing a winter hoodie but it rolled up on me).
They're fun, they're cool, but they're so simple to use you forget about your abilities.
This looks like a hardware guy looking for a hardware solution. Think me may have given up too easily on a software solution?
http://cc.bingj.com/cache.aspx?d=1462716999241&mkt=de-DE&set...
This only happens because of proprietary software shipped in binary format. I'm not against proprietary software, but at some point vendors need to ship in a different format like LLVM bitcode or something that the customer can re-target.
C is still the common denominator, you'd think it'd be easy, but it's hard. Years ago when LLVM was showing promise and Google was going to get Python running on top of it I was hopeful.
I guess nowadays it's a better design to run separate processes and have your languages communicate out of process (pipes, http, etc) rather than in-process.
When you're jumping between C/C++ code and Python code you don't care much about the GIL... until you have a GUI which needs to be kept responsive and needs the GIL to do so.
I like Cinnamon. Going forward with GTK3 but not with Gnome3. Nice easy to use interface.
Part of my workflow involves using ncat.exe to use git over a socks/ssh proxy. A real pain. I noticed scoop has nc but not ncat.