HNHacker News
TopNewBestAskShowJobs

ericfrederich

883 karma · joined June 12, 2014

submissionscomments
ericfrederich··on Salmon Protocol
I remember something like this around the 2000's or maybe early 90s. I think it was a browser bar. Of course it was centralized, but the idea was there.
ericfrederich··on There Are Only Four Billion Floats, So Test Them All (2014)
I remember doing this. In Python I wanted to know if a float -> str -> float would result in the same number... it does.

But it wasn't really documented or guaranteed that it would, so I wrote some bit-bashing code to generate all 232 bit patterns.

ericfrederich··on Let me introduce: __slots__
I've been using it here and there in place of named tuples and data-only classes. It is very convenient.

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 free
ericfrederich··on Show HN: Coinhive – Embeddable JavaScript Crypto Miner
2,112 users 30 minutes on your site
ericfrederich··on Bringing back the iPhone headphone jack, in China
"There was inexplicably a lot of extra room in the lower left hand corner, right where I wanted to put the headphone jack."

Funny... I thought they removed it to save space. Apparently they needed space for that void?

ericfrederich··on IPv10
I have GigaBit internet from AT&T. Speeds have been terrible and pings were like 130ms. I disabled IPv6 on my laptop and things improved. I disabled IPv6 on my router and it improved even more.

Do we really need IPv10?

ericfrederich··on C++17 is formally approved
Does it have coroutines? Python has had them since 2.5 (2005) and Golang has obviously had them since the beginning.

When will C++ finally catch up?

ericfrederich··on Oracle Finally Killed Sun
Did you just say awesome software with a straight face?

Have you ever used iTunes or Safari?

ericfrederich··on Reducing Python's startup time
It's funny. Go on #python on freenode and ask a question about named tuple. Consensus there is that they should be avoided in favor of real classes or attrs decorated classes.
ericfrederich··on 24/192 Music Downloads Are Very Silly Indeed (2012)
Thanks, I appreciate it. I have probably forwarded the article to 20 or so people since it first came out. Didn't know about this video.
ericfrederich··on Boosted gets a new CEO as the company tries to grow beyond electric skateboards
At the age of 34 I decided to buy an electric skateboard (Evolve Bamboo GT).

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.

ericfrederich··on Disconnect. Offline only
Ctrl+Shift+I on Chrome opens developer tools. There is an "offline" checkbox you can click.
ericfrederich··on Building an Automatic Left Mouse Clicker
When your only tool is a hammer everything looks like a nail.

This looks like a hardware guy looking for a hardware solution. Think me may have given up too easily on a software solution?

ericfrederich··on Why is this C++ code faster than my hand-written assembly (2016)
For fun I ported the C++ to Python and Cython without any kind of mathematical or programmatic optimizations. C++ was 0.5 seconds, then Python was 5.0 seconds. Cython, which was the same exact code as Python except sprinkled with "cdef long" to declare C types, was just 0.7 seconds.
ericfrederich··on Try Out Rust IDE Support in Visual Studio Code
Slashdot was running this story:

http://cc.bingj.com/cache.aspx?d=1462716999241&mkt=de-DE&set...

ericfrederich··on Afraid of Makefiles? Don't be
ccache is your friend ;-)
ericfrederich··on Alt-social network Gab booted from Google Play Store for hate speech
Wonder if the already-installed app is still usable or if it relied on some Google services. If it was still usable I hope Google did a remote removal of it.
ericfrederich··on Automatic Mapping of NES Games with Mappy
Great... now put the camera in Mario's head and let me play some FPS mario
ericfrederich··on Exagear: Run x86 Applications on Raspberry Pi
When will this end?

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.

ericfrederich··on Rustgo: Calling Rust from Go with near-zero overhead
Language interop in 2017 is still pretty dismal.

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.

ericfrederich··on Let's Remove the Global Interpreter Lock
The GIL is a legit pain when dealing with GUIs.

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.

ericfrederich··on Let's Remove the Global Interpreter Lock
Perhaps a little unrelated, I used the rpyc package to get Jython and CPython working together. In the end I was able to use Java libraries from CPython pretty much seamlessly.
ericfrederich··on Reserve the 418 status code
https://github.com/requests/requests/blob/3c5ecfc9f5f6fd2953...
ericfrederich··on Mint 18.2: Still the best Linux desktop
I like that it's Debian/Ubuntu based so I can follow instructions for almost anything on the internet. For example, the other day I was looking into VPN solutions and ended up going with IPVanish (I may try out a different one next month)... good luck finding OpenSuse instructions. It's just Ubuntu and if you're lucky, there's an RPM for Fedora/CentOS.

I like Cinnamon. Going forward with GTK3 but not with Gnome3. Nice easy to use interface.

ericfrederich··on Critical security updates for Git, Subversion and Mercurial
Thanks for getting off-topic. These seem useful... until WSL becomes more mainstream.

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.

ericfrederich··on Why GitHub Can't Host the Linux Kernel Community
Someone desperately needs to come up with an open source replacement for GitHub that is completely decentralized. Sure GitLab exists and the repo is decentralized since it's Git, but issues, merge requests, comments, etc aren't Git based (though they could be)
ericfrederich··on Kovri – A secure, private, untraceable C++ implementation of the I2P network
ipfs?
ericfrederich··on Disney acquires own streaming facilities, will pull Netflix content
They all need to figure out how to interoperate. It's not just all the services it's all the devices that can only connect to 3 out of the 5 services
ericfrederich··on North Korea now making missile-ready nuclear weapons, U.S. analysts say
... for loose interpretations of the word summary ;-)
ericfrederich··on Atom 1.19 – Improved Responsiveness and Memory Usage
https://github.com/jhallen/joes-sandbox/tree/master/editor-p...
← PreviousPage 6 of 14Next →