News for hackers. Stuff that matters.

aboutruby

Re:Why Operators Are Useful on Saturday March 16, 2019 @05:23PM (#19410373)
In Ruby, we have Hash#merge, e.g. { a: 1, b: 2 }.merge({ b: 3, c: 4 }) gives { a: 1, b: 3, c: 4 }, which is typically what you want, e.g. args.merge(reset: false) to have reset set to false in the args even if present.
I saw a few posts on Reddit about how the Apple Watch basically saved people's life:

https://www.reddit.com/r/AppleWatch/comments/a40qm5/heading_...

https://www.reddit.com/r/AppleWatch/comments/9zrdq5/how_an_a...

I'm sure there is a lot more.

(Also all the people losing weight)

archive.org is already used for sharing deleted tweets and deleted reddit posts/comments for instance.
You could also use Special:Export depending on your use case: https://en.wikipedia.org/wiki/Special:Export
Re:Farewell from Waffle on Friday March 15, 2019 @03:19PM (#19403213)
I thought it was the WaffleJS in SF.
Cool project, but I don't see the link with the article apart from being related to Wikipedia. It might be better off as a Show HN.
Re:Addressing Spotify’s Claims on Friday March 15, 2019 @06:52AM (#19398464)
> At the same time, they distribute the music you love while making ever-smaller contributions to the artists, musicians and songwriters who create it — even going so far as to take these creators to court.

Kind of weird to see Apple attacking another company.

Also Spotify main claim seems to be about their podcast acquisitions and Apple didn't answer that:

> So we announce two podcast acquisitions we are super excited about, and all of a sudden Apple arbitrarily decides to prohibit use of its API to recommend podcasts to users

https://timetoplayfair.com/timeline/

Re:Dynamic Programming for Technical Interviews on Thursday March 14, 2019 @10:54PM (#19396034)
Only company I know of asking for "Dynamic Programming" is LinkedIn, is there any others?
Not a big surprise as it's one of the harder things to test.
Re:The Hottest Chat App for Teens Is Google Docs on Thursday March 14, 2019 @06:03PM (#19394280)
And seems like they video chat with Google Classroom: https://www.reddit.com/r/teenagers/comments/acvwh9/we_should...
Re:Show HN: This Question Does Not Exist on Thursday March 14, 2019 @12:59PM (#19391112)
I think it would still be considered a "Does Not Exist"-valid website if the generated questions would have some auto-formatter for the code. Main issue I see is extra spaces everywhere, often in a syntax breaking way (and missing spaces for formatting) (not that all SO questions have those).
Re:What causes Ruby memory bloat? on Thursday March 14, 2019 @12:43PM (#19390931)
Source code of the visualizer: https://github.com/FooBarWidget/heap_dumper_visualizer

Best thing is this can be called directly from Ruby with FFI.

On macOS:

    mdls FILENAME
`kMDItemWhereFroms` is what you are looking for. And for a list of all the URLs from the current directory:

    mdls * | grep kMDItemWhereFroms -A 1 | grep http | ruby -ne "puts \$_.strip[1..-2]"
Reality is almost nobody wants to wear VR headsets, and that's going to take a while for VCs to admit that.
Re:A $33K robot barista serves 120 cups of coffee an hour on Thursday March 14, 2019 @09:26AM (#19388975)
I tried it in San Francisco and it was quite good. Pretty rare to find good espressos there.
Re:Calculating a record-breaking 31.4T digits of Pi with GCP on Thursday March 14, 2019 @09:23AM (#19388957)
There is a proof linked from the Wikipedia article: https://www.davidhbailey.com/dhbpapers/digits.pdf
Re:Chromium: Improve support for Nintendo Switch gamepads on Thursday March 14, 2019 @09:16AM (#19388905)
I made a gist from the base64 patch for easier reading: https://gist.github.com/localhostdotdev/f07d7ba7ae6cac4ea1c8...
Re:How Discord Went Mainstream on Thursday March 14, 2019 @08:10AM (#19388467)
I think Discord is slowing eating away all other form of online communication as it can be used for such a variety of situations and their API makes it very customizable.

The main issue I see is the culture. Discord's community has quite an opposite culture as Slack (free time vs work time) for instance. Being able to have multiple Discord handles could solve that.

Re:Why to normalize Unicode strings on Wednesday March 13, 2019 @03:48PM (#19382926)
And Ruby does what I expect:

    > "\x65\x301".include?("\xe9")
    => false
Hacker News might just have a "Major Internet Services" status board.
As some point they are caped by the number of people having access and using the Internet, same for Facebook or any world-scale tech company.
Thanks, much more readable than googlesource.com and others.

Also quite interesting that they changed the default search engine for China to be Baidu.

Re:Show HN: Mapipedia on Wednesday March 13, 2019 @04:50AM (#19376877)
Stating the obvious but a redesign wouldn't hurt, also copy like "Make $$$ by Accepting Donations!" doesn't help.

Otherwise the visualization itself is sound, having multiple views linked is neat. But I personally would rather use an open-source JS library and host it on my own websites.

This is quite great! I used other free services for quick privacy policies before and they were quite bad.

I would love to see a Terms and Conditions template alongside the Privacy Policy one.

Re:System requirements on Tuesday March 12, 2019 @04:43PM (#19372806)
Pretty sure this is only to point out that they don't support Linux.

I really can't see any company say that they support "Linux" for their website with all the different flavors out there. Probably the best they can do is support some versions of Ubuntu but even that could incur a large cost. Or like most websites, not specify an operating system and let the browsers do what they do best.

Re:Cloudflare Raises $150M and Adds to Board of Directors on Tuesday March 12, 2019 @10:21AM (#19368355)
> Mar 12, 2019 - Series E - $150M

> Sep 22, 2015 - Series D - $110M

> Dec 17, 2013 - Series C - $50M

> Jul 12, 2011 - Series B - $20M

> Nov 25, 2009 - Series A - $2.1M

> Jun 1, 2009 - Non Equity Assistance - ?

Seems like their rounds of fundings are slowing down.

There were also rumors of a $3.5B IPO.

I wonder if the founders still have a majority stake in the company.

https://www.crunchbase.com/organization/cloudflare

Re:KV Storage, the Web's First Built-In Module on Tuesday March 12, 2019 @01:23AM (#19365631)
The proposal doesn't seem to take into account the versioning of the included modules.

> import { Date } from "std:Date";

> import { Date } from "std:Date+2.1.6-alpha.1";

Which version is the first line going to include? Latest? First?

importmap for backward compatibility / polyfills is very neat though.

I would love to see lowdash/underscore included as a standard library.

Re:Science Denial Won’t End Sexism on Monday March 11, 2019 @09:07PM (#19364469)
While this subject could be interesting, it always degenerate into culture wars (one side vs the other) which could be considered flamebait:

> Eschew flamebait. Don't introduce flamewar topics unless you have something genuinely new to say. Avoid unrelated controversies and generic tangents.

https://news.ycombinator.com/newsguidelines.html

One solution for this could be to talk about the subject at a more abstract level than an example.

Older »