News for hackers. Stuff that matters.

ushi

What you want is probably TAI [1], Unix Time has leap seconds.

[1] https://en.wikipedia.org/wiki/International_Atomic_Time

Re:1/0 = 0 on Friday August 10, 2018 @05:20PM (#17736834)
Ruby defines division by zero for Floats

  1.0 / 0
  => Float::INFINITY
and

  0 * Float::INFINITY
  => Float::NAN
I think infinity is a more intuitive result, but most of the time i get this as a user i would rather see 0 (bought books per month: Infinity). As a programmer i like to get an error, because i forgot to handle an edge case...
Re:Dev.to is now open source on Wednesday August 08, 2018 @04:00PM (#17718938)
Looks like the standard rails mess :/ Don't get me wrong. From time to time i am going to look at other peoples rails code to learn, how they solved common problems in grown rails apps. Most oft the time i leave rather disappointed...

I like the spec for Comment#id_code_generated ;)

yes. its implemented:

  --allow-unrelated-histories

    By default, git merge command refuses to merge histories
    that do not share a common ancestor. This option can be
    used to override this safety when merging histories of
    two projects that started their lives independently. As
    that is a very rare occasion, no configuration variable
    to enable this by default exists and will not be added.
We are running this[0] with some postfix boxes in front of it. Works quite well for us.

[0] https://github.com/ushis/mailhook

Re:The Opa Language on Saturday July 11, 2015 @04:57AM (#9869117)
if you can do all the shiny web things by writing grandpa code, this might be a good thing :)
Re:Chrome is developing a Sidebar API on Tuesday July 07, 2015 @02:21PM (#9847162)
This could make the octotree[0] extension even more awesome. Let's see.

[0] https://github.com/buunguyen/octotree

Re:No one expects command execution on Friday July 03, 2015 @12:38PM (#9826538)
I agree. Every single example in this article makes perfect sense to me.
Re:Monsti – a free and open source CMS written in Go on Friday May 29, 2015 @04:24AM (#9623380)
the demo is readonly
Re:Animated vector map on Saturday March 21, 2015 @05:41AM (#9242265)
HTTPS Everywhere enabled? When you visit the https site, chrome refuses to load non https resources.
Re:PDF Viewing on Tuesday March 17, 2015 @03:29PM (#9220631)
Checkout the pdfjs test suite, if you want to try it:

https://github.com/mozilla/pdf.js/tree/master/test/pdfs

Re:Arc4random – randomization for all occasions on Saturday November 22, 2014 @04:21AM (#8645187)
getrandom() is a generic interface you can use to implement getentropy(), which is used to seed arc4random(). It is not an alternative arc4random implementation...

From the OpenBSD Manpage:

    getentropy() will succeed unless:

    [EFAULT]
    The buf parameter points to an invalid address.
    
    [EIO]
    Too many bytes requested, or some other fatal error occurred.
See: http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/...
Re:What Do You Need? on Thursday November 06, 2014 @07:26AM (#8566688)
It is already mentioned in his beloved developer forum[0], but he didn't respond yet. Let's see...

[0]http://devgurus.amd.com/message/1306586#1306586

Re:W3C declares HTML5 standard complete on Wednesday October 29, 2014 @07:45AM (#8526627)
i know it was just a joke, but for vim users working with html i recommend the html5 plugin[0].

[0] https://github.com/othree/html5.vim

Re:Audi’s Self-Driving Car Hits 150 MPH on an F1 Track on Saturday October 25, 2014 @03:43PM (#8509161)
From the article:

While the RS7’s computer had a detailed digital map of the track and was following an optimized path through it, Audi did not preprogram things like torque or steering.

Re:Webmail and Open Source on Saturday October 18, 2014 @08:01PM (#8476797)
Roundcube isn't shipped with PGP support. Their are some plugins though...

See: http://trac.roundcube.net/wiki/Dev_Encryption

Re:The SQLite Database File Format on Monday September 29, 2014 @06:11PM (#8385615)
There was this submission[0] yesterday. Probably someone wanted to learn more about it and stumbled upon this amazing document.

[0] https://news.ycombinator.com/item?id=8378894

Re:Show HN: Pup – A command-line HTML parser on Saturday September 13, 2014 @04:25PM (#8313450)
So getting the front page links is now as easy as:

   curl https://news.ycombinator.com | pup td.title a attr{href}
Well done and thx for sharing.
Re:Dimensions – Measure everything you see in the browser on Thursday September 11, 2014 @08:24AM (#8302156)
Then it is time to learn about Ctrl+L
Re:Google search indexes itself on Wednesday September 10, 2014 @02:25PM (#8298112)
It is obviously the most relevant content on this site. PageRank is always right.
Re:Google search indexes itself on Wednesday September 10, 2014 @02:19PM (#8298066)
Funny thing... It works only with[0]

    site:http://www.google.com//search
but not with[1]

    site:http://www.google.com/search
[0] https://www.google.com/search?q=site%3Ahttp%3A%2F%2Fwww.goog...

[1] https://www.google.com/search?q=site%3Ahttp%3A%2F%2Fwww.goog...

Re:Ask HN: Do you program in multiple languages in a day? on Monday September 08, 2014 @10:12AM (#8284802)
Today it was Ruby, Go and JavaScript. I feel productiv in all of them. Sometimes some C, Shell and Python. Python is becoming a pain, because i use it so rarely, that i have to look up everything.
Re:Cron commands to plain English on Friday August 01, 2014 @07:27PM (#8123382)
Awesome, now you have a test suite

    assert(cronchecker(cronstring(input)) == input)

Older »