News for hackers. Stuff that matters.

aboutruby

Re:What Working at Stripe Has Been Like on Tuesday March 19, 2019 @12:11PM (#19432183)
I'm not sure what open recs means in this context:

- open requirements

- open recommendations

- open requisites

- open offers

I'm not really expecting an answer so I asked on stackexchange: https://english.stackexchange.com/questions/490404/what-does...

Re:Apple updates its iMac line on Tuesday March 19, 2019 @11:31AM (#19431749)
Looks like it costs $3,381 off-the-shelf: https://www.avadirect.com/256GB-4-x-64GB-Quad-Rank-DDR4-2666...
Re:Apple updates its iMac line on Tuesday March 19, 2019 @11:29AM (#19431725)
The more time passes, the more it looks like they released an SE by mistake, still be best phone ever made IMHO but doesn't fit the strategy of upselling as much as possible.
Oh I see, sorry, didn't look closely enough at the examples. Great project! Maybe this could be upstreamed in Rails?
# Paisa.format / Paisa.format_with_sym

This can be done with Rails's number_to_currency helper: https://apidock.com/rails/ActionView/Helpers/NumberHelper/nu...

# Paisa.words

There is number_to_human which is close: https://api.rubyonrails.org/classes/ActionView/Helpers/Numbe..., otherwise number_to_words's gem https://github.com/kslazarev/numbers_and_words

I would actually recommend using the money gem to handle money objects: https://github.com/RubyMoney/money

Re:Eliminating Robocalls on Monday March 18, 2019 @10:03PM (#19427433)
Last time I went to the US, I got a phone number from MetroPCS (e.g. T-Mobile reseller). I didn't give it to anybody and started receiving 3-4 spam calls a day. They are obviously reselling the phone numbers directly, which is illegal in most countries.
Re:Eliminating Robocalls on Monday March 18, 2019 @10:00PM (#19427419)
Only available in the US though, I have one but it's not easy for anybody outside the US to get one.

Just a few things:

- It does filter out all the spam (I get maybe a random call once a year and a random text once every 6 months)

- There is no SIM card, so it has to go through the internet, which is much less reliable

- You can call anywhere in the world very cheaply (US is free)

- The phone apps are barely usable (Hangouts on iOS for instance) (Google Voice one is blocking non-US users)

- It's a life saver in emergency situations and just when being abroad in general, and for that only it's the best provider out there.

Re:IPv6 Address Unmasking via UPnP on Monday March 18, 2019 @08:21PM (#19426774)
I never realized an IPv6 likely contains the MAC address of the host, how did people not realized how terrible this design is.
Re:What Working at Stripe Has Been Like on Monday March 18, 2019 @08:00PM (#19426634)
> Stripe is headquartered in San Francisco, with offices in Dublin, London, Paris, Singapore, Tokyo, and more

That's probably the countries where they can hire remotely. It would seems in my experience with other companies that even if they don't advertise non-US remote roles (probably to prevent a large influx of applications from all over the world, most of which invalid due to no-offices there) they will accept candidates that are better than the US counterparts (but still US-based workers have an advantage).

Would love an answer from Stripe/patio11 though.

Also in the case of Stripe, it seems like they are making an engineering hub in Singapore: https://stripe.com/blog/singapore-eng-office

Re:New Tools for Detecting HTTPS Interception on Monday March 18, 2019 @04:02PM (#19424634)
There is a public dashboard: https://malcolm.cloudflare.com
You can always find people to help you. I'm not a node + express specialist but I do a fair share of JS, you can contact me at [email protected] if you want.
Re:What Working at Stripe Has Been Like on Monday March 18, 2019 @03:18PM (#19424208)
AngelList actually does this, they mostly recruit previous founders.
Re:What Working at Stripe Has Been Like on Monday March 18, 2019 @02:24PM (#19423638)
> It also felt like it was constraining the absolute amount of impact I had for the world.

It's refreshing to see people thinking like this. Maximizing impact is undervalued. For instance a lot of companies restrict themselves to one country thus dramatically reducing the maximum impact.

Re:Ruby 2.7 – Numbered Parameters on Monday March 18, 2019 @11:39AM (#19421982)
Just installed ruby-head (ruby 2.7.0dev (2019-03-18 trunk 67296)) and it works very well!
Re:New iPad Air and iPad Mini on Monday March 18, 2019 @10:32AM (#19421315)
I had an iPad mini, used duolingo, memrise, and watched videos on it while in the subway. The battery lasted forever. It was great but definitely not a necessity.
One good security feature would be to not give the user's email address by default to apps you connect Slack to.

(And then have them disclose it to every user...)

Seems more of an meta-APIs library:

- bitcoinfees.earn.com for the fees

- bitpay.com (then blockchain.info if bitpay fails) for the rates

- bitpay / smartbit.com / blockchain for balance and transactions

- And then a lot of functions mainly used to create transactions it seems (I'm not a bitcoin expert)

(utils might the common denominator of all software projects :) ) (also the repetition of methods made me think of "define_method" in ruby)

Pretty solid project! And great name IMHO, people will just google "bit github" (pretty hard to find a unique meaningful name these days), you even got the name in pypi: https://pypi.org/project/bit.

Re:Ask HN: Is Hacker News Being Astroturfed? on Monday March 18, 2019 @04:57AM (#19419550)
The few times I emailed [email protected] I didn't get any responses.

Anyway, I just wanted to see if others thought Hacker News was being astroturfed, I never said those are sure case of astroturfing.

For example this one: https://news.ycombinator.com/item?id=19419362

Ok looks like it might be, but then I have to check the comment history to make sure this user is legitimate, which look like he is legitimate. So I guess I have to check the comment history of every user that makes a link to a paid product... sounds like a pain that could be automated.

Also, like for the commenters weirdly supporting China, I think the comment history is made in such a way to disguise the nature of the account (otherwise it would be too easy to figure it out, basic spam gets killed very quickly on HN thankfully)

(edit: Looking at your history, your account is 4 years old with two comments in this thread and one comment 4 years ago, may be a highjacked account)

Re:Ask HN: Is Hacker News Being Astroturfed? on Monday March 18, 2019 @04:38AM (#19419490)
I didn't want to point at specific examples to see if other people recognized the pattern but here is a few of them (actually could only recall one... I will flag when I see them, but not sure it will get recognized as it's a series of comments):

My top comment being highjacked: https://news.ycombinator.com/item?id=19410185

While you are here, this comment is just linking to a paid tutorial for no apparent reason other than self-promotion: https://news.ycombinator.com/item?id=19416821

I can only recall those because they are linked to my history, I don't remember which thread the others were on.

I didn't look at their history and saw many more, it's just that yesterday I saw a new one on a front page post and though it got out of hand.

Re:Ask HN: Is Hacker News Being Astroturfed? on Monday March 18, 2019 @04:31AM (#19419463)
Thanks, been using Hacker News for many years and didn't know that's how you flag comments.

Ask HN: Is Hacker News Being Astroturfed?

I saw a comment on Reddit that said recently astroturfers have started using a pattern that you can pretty much see everywhere.> [top comment]> > [generic question about what to use/buy?]> > > [link to a paid product that is very loosely related to the original subject](Sometimes even the [top comment] is left out if the astroturfers have figured how to make that second...

( Read More... | 25 comments | 28 points | on HN )
Re:The Unix-Haters Handbook (1994) [pdf] on Sunday March 17, 2019 @07:53PM (#19417605)
Reminds me of "Democracy is the worst form of government, except for all the others"
Re:Why I Two-Space (2012) on Sunday March 17, 2019 @06:38PM (#19417207)
So adding an extra space between every sentence all the time, just for vim's "deleting sentence" to work? (not even by default, and that's a very specific command). And the command breaks because there is a . in the sentence.

So changing a pretty much worldwide convention for a pretty specific edge-case on a rarely used command in vim.

Why not just update the command to detect the special cases like Mr. Mrs., seems like a much simpler solution.

Re:Vim Anti-Patterns (2012) on Sunday March 17, 2019 @06:11PM (#19417034)
Ok, I edited a file in a meaningful way and tried to decipher the process (actually it become more of a normal workflow more than editing a file).

The thing is I switch all the time between vim and my terminal (it's complicated by let's say I mainly use one terminal tab for everything I'm currently writing) so using the home row I would have to switch all the time between home row and arrows when using the terminal (and other programs) (I guess I could add vim bindings to every single thing I use: web browser, terminal emulator, pry, irb, tmux, etc etc. but doesn't seem appealing to me).

The escape key isn't an issue either because I don't use the home row, so no need to remap that too.

I think this misconception comes from the manual pushing people to use the home row.

I don't claim I'm the fastest writer ever, but there are a lot of compromises I'm not willing to make (I could use vim tabs/windows, I could use Ctrl-D to switch files, I could use GVim, have the main files always open, etc.). I'm pretty sure everyone works differently and this workflow works very well for me.

What I don't like is this constant shaming of arrow vim users and people that keep saying it's only for beginners (and the manual pushing people to use the home row).

Re:Vim Anti-Patterns (2012) on Sunday March 17, 2019 @05:21PM (#19416706)
Not sure if you are directing this comment at me, but I know most of these already. Didn't know about the older terminal emulator issues with arrow keys though.
Re:Vim Anti-Patterns (2012) on Sunday March 17, 2019 @05:05PM (#19416598)
> ... But if you're like me, and your mind is constantly racing, you need to be fast to get your ideas out before they're gone/replaced.

I write extremely fast and use arrow keys (and all kinds of vim shortcuts).

> it's also the likely visual/mental cost of looking away from your screen to aid in positioning the hand

I never look at my keyboard when using vim.

Re:Vim Anti-Patterns (2012) on Sunday March 17, 2019 @04:35PM (#19416414)
> Moving one line at a time

I either go down with arrows (I know it's controversial), beginning of file with :1, end of file with G, line number with :[line number] or search with /. I usually don't have large files so this works very well (and I almost exclusively go by line number on large files).

> Moving one character at a time

I use ^ for beginning of line, $ for end of line, e to move quickly in a line

> Searching for the word under the cursor

Nice, didn't know about */#, I just type what I'm searching, gonna use that.

> Deleting, then inserting

Insert mode is fine.

> Using the arrow keys

I use the arrow keys, and I don't care about all the arrow-key shamers out there.

> Moving in insert mode

I use insert mode only while editing (makes sense). I don't get the point of this paragraph.

> Moving to Escape

I'm fine with escape key.

> Moving to the start or end of the line, then inserting

I much prefer just going into insert mode.

> Entering insert mode, then opening a new line

I also use o quite often (as it just goes into insert mode).

> Entering insert mode to delete text

Yes, I delete with dd, de, etc. (. is also useful for that), deleting in insert mode is painful for more than one character.

> Repeating commands or searches

Didn't know about q: and q/, pretty useful, nice.

> Repeating substitutions

I use %s/for/far/g or %s/for/far/, or for a few lines, I select them (shift-v) (visual mode) then : (which auto-sets it to :'<,'>) then :'<,'>s/for/far/ for instance.

Anyway, been using vim for ~5 years with a pretty light .vimrc and one thing I would recommend is bogado/file-line plugin which lets you open a file at a line, e.g. vim app/models/user.rb:48

My vimrc if anyone is curious: https://gist.github.com/localhostdotdev/aa25d1c81f3f3b67ac35...

Re:HTML Periodic Table on Saturday March 16, 2019 @10:33PM (#19411850)
menu and menu-item are Firefox-only https://caniuse.com/#search=contextmenu
Re:iPad Pro as Development Machine on Saturday March 16, 2019 @05:50PM (#19410524)
I wouldn't feel confortable putting my secrets in a remote server with a public IP (IPv6 might be a better idea as it's less guessable).

Also seems a bit over-engineered, I would just ssh into a server and do everything from there as a normal user.

Older »