News for hackers. Stuff that matters.

methodology

Re:Handling (unintentional) damage to culture on Friday February 06, 2015 @11:47AM (#9009832)
Isn't it painful to alternate between typing "her/him", "him/her", "her/his", "his/her", "she/he", "he/she"?
Re:Poll: How long could you survive without income? on Wednesday October 08, 2014 @07:02PM (#8429912)
HN subsumes reddit (on hacker topics).
Re:Poll: How long could you survive without income? on Wednesday October 08, 2014 @07:01PM (#8429910)
If it's important someone will pay you for it. This is even more true in today's crowdfunding era with kickstarter and co.
Re:Poll: How long could you survive without income? on Wednesday October 08, 2014 @12:14PM (#8427705)
Not very long because I'd be bored and run down from not having any important work to do. Also, social isolation would be a problem.
Re:Haskell, Monads and Purity on Saturday October 04, 2014 @03:46PM (#8410416)
> That the language is less safe?

Not necessarily.

> And haskell has extensible records, they are just a library like anything else:

And OCaml has monads, they are just a library like else.

Re:Haskell, Monads and Purity on Saturday October 04, 2014 @01:13PM (#8409924)
OCaml is more practical than ML and Haskell because it has objects, for loops, more edge cases in the language, built in mutable keyword, and extensible records.
That's a very interesting website. It also features for example analysis of companies and what domains they did/should buy. It really shows how there is really an entire economy over domain names, not just in buying/selling but also other secondary fields like regulation.
Re:Why is 0x00400000 the default base address for an executable? on Saturday October 04, 2014 @12:30PM (#8409831)
The fact that Microsoft puts so much care into creating elaborate structures to preserve legacy is why I trust them with securing my identity.
Re:Unpatchable Malware That Infects USBs on Thursday October 02, 2014 @10:51PM (#8404174)
USB devices need to be regulated to ensure this kind of thing can't happen. Perhaps the FCC's arm reaches far enough that they could tackle this issue, otherwise maybe a separate task force should be created for this.
Re:Official Go support on Thursday October 02, 2014 @09:28PM (#8404025)
Correct, pointless programs like this freeze but that's by design since they're pointless:

    package main
    import "fmt"
    func main() {
      go func() {
        for ;; {}
      }()
      for ;; {
        fmt.Println("still here")
      } 
    }
Even bigger pointless programs also freeze:

    package main
    import "fmt"
    func f(v int) int {
      return v+1
    }
    func g(x int) int {
      if (x > 100) {
        return 1
      }
      return 0
    }
    func main() {
      go func() {
        for ;; {
          if g(f(111)) == 0 {
            break
          }
        }
      }()
      for ;; {
        fmt.Println("still here")
      } 
    } 
This is of course by design, because Go was designed only to support useful programs. The programmer trying to figure out how the concurrency model works may whine that it's inconsistent and he can't figure it out, but that's only granted because threading is hard. Go makes it easier by only supporting useful cases.
Re:Official Go support on Thursday October 02, 2014 @09:24PM (#8404012)
For example: if you have one thread polling `x` and another thread writing to `x`, there's no guarantee that the polling thread will ever see any updates to `x`.
Re:Official Go support on Tuesday September 23, 2014 @04:55PM (#8358176)
> There are no buffer overflow vulnerabilities in Go applications

Actually there are in certain cases [1], but there's a good reason for that.

1. http://stackoverflow.com/questions/25628920/slicing-operatio...

Re:Official Go support on Tuesday September 23, 2014 @04:54PM (#8358167)
Go's syntax and semantics seem ad-hoc, hard to remember, and inconsistent, but that's because Go was designed from uses cases and experience by prominent thought leaders such as Rob Pike and Ken Thompson, and Google. For example, sometimes you'll get Unicode code points, but sometimes you'll get bytes of UTF-8. The language was designed to give you the right one in the right case. UTF-8 is coupled with the language because it's the most useful choice. Another example is that pointers are automatically dereferenced, but not when you have pointers to pointers, because that's less useful. If any thread runs in an infinite loop that doesn't call built in functions, the entire runtime will freeze. But this is by design. You're meant to do actual useful stuff in your loop such as calling IO functions (which will yield to the scheduler) or calling GOSCHED.

It was designed to compile fast, and compiles faster than most languages and still has near C-speed. It doesn't have a GIL so it has better concurrency (Java style memory model). It has no complicated features like generics, instead you just use type assertions when you need. It also has impeccable tooling.

Re:Letter to a Young Haskell Enthusiast on Friday August 01, 2014 @02:15PM (#8121909)
How did learning how Algebraic Data Types are algebraic make you "get" Haskell?

When I learned Haskell, I just read Learn You A Hasekell in a few days, and immediately understood the practical value of Algebraic Data Types. They simply are like the types in C,Java,etc but more general because unions can have "fields". This alone means you can represent things like Maybe without any trouble, whereas in C/Java, you'd have to use casting, explicit tagged unions, or the visitor pattern. ML has largely the exact same features as Haskell, except you have to explicitly say which module you're using, instead of the typeclass system doing it for you. Do you also "get" ML? It sounds more like you are claiming to "get" some sort of theory, rather than Haskell or ML, which are trivial, but you make it sound like you need to be somehow enlightened to understand.

The only hard part I ever found in Haskell is lazy evaluation, which to me is just another type of magic which nobody gets, just like the Java Memory Model. The other hard part of Haskell are the extensions to type classes, which make you start thinking about open research problems.

edit: Which part of the above is downvoting material? Please explain so I can avoid being downvoted in the future.