Better HN
topnewbestaskshowjobs
Log inSign up

infraruby

94 karma · joined Mar 14, 2014 (12y ago) · 73 submissions

http://infraruby.com/blog
Submissions

comment 8y ago · link · parent

Binoculars.

comment 9y ago · link · parent

> I'm describing the CBC padding oracle attack.

Ah! Wouldn't that be "attackers can replace an original ciphertext with two chosen blocks"?

> I'm surprised this is the thing you want the link for, and not "1 biased bit destroys the security of a 256 bit nonce where the other 255 bits come from secure random".

IIRC the link for that is in your hiring post!

comment 9y ago · link · parent

> You could "weaken" a protocol so that attackers can replace an original plaintext with 16 uniform random bits. If the protocol is using CBC mode, you've allowed attackers to recover whole plaintexts.

Do you have a link explaining this?

comment 9y ago · link · parent

More details here: https://news.ycombinator.com/item?id=10898947

5.

We're more antisocial in a shared office space(theconversation.com ↗)

3 points · by infraruby · 10y ago · discuss

comment 10y ago · link · parent

For a program without recursive calls the students can get away with believing that local variables are statically allocated, but for a program with recursive calls the students must understand that local variables are allocated on the stack; that what appears (lexically) to be one variable in the source may be many variables at runtime!

comment 10y ago · link · parent

Yes:

  def f(n = 16)
    n
  end

  p f # => 16
  p f(nil) # => nil

comment 10y ago · link · parent

The caller may pass nil explicitly.

comment 10y ago · link · parent

  require "securerandom"

  module SecureRandom
    F = File.open("/dev/urandom")

    def self.random_bytes(n = nil)
      F.read(n || 16)
    end
  end

10.

InfraRuby 4.0 statically typed Ruby compiler released(infraruby.com ↗)

24 points · by infraruby · 10y ago · discuss

comment 10y ago · link · parent

InfraRuby is a statically-typed Ruby (compiles to the JVM). InfraRuby code runs on Ruby interpreters without modification: http://infraruby.com/blog/why-infraruby

comment 10y ago · link · parent

> Plus a number of other things according to the article.

Yes, combining methods works even better! It's far from saying that the best way is "to just talk to them".

comment 10y ago · link · parent

> I can see this being misinterperted badly in the field of software engineering (it doesn't seem specific to software)

Would you prefer Google's take on it? http://www.wired.com/2015/04/hire-like-google/

> So most "sample work" for an interview will actually be nothing like that but a short rushed version that is supposed to emulate it in some way.

Yes, that's the idea! And it works.

comment 10y ago · link · parent

> I still think the best way to interview a programmer is to just talk to them.

You're wrong: http://www.ioatwork.com/selection-methods-almost-a-century-o...

comment 10y ago · link · parent

> I want the candidate to plan

Then ask for that, and assess the plan, otherwise you're expecting Carnac the Magnificent: http://raganwald.com/2015/05/08/carnac-the-magnificent.html

16.

The Terrifying Reality of Long-Term Unemployment (2013)(theatlantic.com ↗)

8 points · by infraruby · 11y ago · discuss

comment 11y ago · link · parent

> The research article you linked confirmed that job experience (years in a similar job) has positive predictive validity for job performance.

Job performance does improve with experience up to a point (evidently six months), so this factor will have some predictive validity just for that, but this does not support comparing five years vs ten years.

> Can a hiring manager improve their hiring decision by excluding a factor known to have positive predictive validity?

Yes, if the manager had given undue weight to that factor (say, by rejecting applicants with little experience, regardless of performance on job knowledge tests), which is precisely what happens whenever managers consider employment history.

> This roughly matches how a lot of hiring is done in practice

No, what happens in practice is that managers say "no unemployed need apply" or ask for the applicant's "most recent résumé" (with dates, of course) and then exercise the sort of prejudice against the unemployed that you displayed earlier.

> What concrete change should a manager of a small business make tomorrow to improve their hiring?

The manager should filter applicants using GMA tests, job knowledge tests and integrity tests, which are inexpensive and have high validity, and then pay the candidates to take work-sample tests. The manager may consider experience (up to six months), but as no more than 5% of each candidate's grade, and this should be monitored by the business owner.

comment 11y ago · link · parent

That's a whole lot of speculation!

Fortunately, there is a better way: http://www.ioatwork.com/selection-methods-almost-a-century-o...

EDIT: but to answer your question:

> How about heart surgery?

I'd prefer the provider that hires doctors based on work-sample tests and not years of employment.

comment 11y ago · link · parent

> Why don't you think that employment history predicts job performance?

Because empiricism: https://signalvnoise.com/posts/833-years-of-irrelevance

> Which group will have better average job performance?

The two groups are statistically indiscernible.

comment 11y ago · link · parent

> They don't have to but an employer is probably going to want to know.

... and so they do have to.

It's regrettable, because employment history (gaps or no gaps) does not predict job performance.

comment 11y ago · link · parent

> Explaining a gap in your resume is a reasonable thing for people to do when applying for a job.

But why should people have to do that?

22.

Tweets are disappearing on Twitter(washingtonpost.com ↗)

3 points · by infraruby · 11y ago · discuss

comment 11y ago · link · parent

BTW, the fourth amendment contains the mother of all exceptions: "unreasonable searches and seizures"

comment 11y ago · link · parent

> Sure, but that doesn't make it so, unless you're one of those folks who holds that Constitutionality is based on the courts' opinion by definition.

That's been how it works in practice ever since Marbury v. Madison.

comment 11y ago · link · parent

"U.S. Supreme Court Chief Justice Roger Taney, sitting as a federal circuit court judge, ruled that the authority to suspend habeas corpus lay exclusively with Congress. Saying that Taney's orders were unconstitutional, President Abraham Lincoln defied them, as did the army under Lincoln's orders, and John Merryman remained inaccessible to the judiciary while Congress remained in recess."

https://en.wikipedia.org/wiki/Ex_parte_Merryman

comment 11y ago · link · parent

$~ and friends are not global:

  def f
    p $~ # => nil
    "123" =~ /\w+/
    p $~ # => #<MatchData "123">
  end

  p $~ # => nil
  "abc" =~ /\w+/
  p $~ # => #<MatchData "abc">

  f

  p $~ # => #<MatchData "abc">

comment 11y ago · link · parent

Yes! Ruby language features supported by InfraRuby have the same behavior as Ruby interpreters.

InfraRuby projects are created with rake tasks to run your code with either the InfraRuby runtime or Ruby interpreters. You could implement a file format or protocol in InfraRuby, and use that code in a Ruby project too. You could use Ruby interpreters for development and the InfraRuby runtime for production.

And if you decide that InfraRuby is not for you then you can take your code with you!

comment 11y ago · link · parent

InfraRuby code runs in Ruby interpreters.

comment 11y ago · link · parent

> I'm looking for something beautiful like Ruby but fast like Go.

Have you tried InfraRuby? InfraRuby is a compiler and runtime for statically typed Ruby: http://infraruby.com/blog/why-infraruby

comment 11y ago · link · parent

> How does this compare to Crystal?

You can use InfraRuby code with a Ruby interpreter: http://infraruby.com/blog/why-infraruby

> Tried to figure out what InfraRuby compiles to, but no avail.

Sorry, that should be made clearer...

> Is it to JVM?

Yes! ruby.Object extends java.lang.Object: http://infraruby.com/reference/Object

123