Better HN
topnewbestaskshowjobs
Log inSign up

voidlogic

3,297 karma · joined Nov 15, 2012 (14y ago) · 1,171 submissions

Submissions

comment 13y ago · link · parent

"but a good UI should probably involve good UI fundamentals."

That calendar is easy to fix with a little CSS, I have used it. Lack of pixel perfect polish in an example's styling = lack of UI fundamentals, really?

comment 13y ago · link · parent

"Go doesn’t suppose the use of a #! on the starting line, which means you can’t just use uncompiled files as utility scripts."

So the author wants to type "./foo.go" rather than "go run"? Why not just build your executable, "go build", then you can run/move the resulting executable ./foo.

This really doesn't seem like a big deal / why do I want to compile a utility program every-time I run it?

comment 13y ago · link · parent

I agree, I changed/fixed it in firebug before continuing reading...

comment 13y ago · link · parent

It is out there: http://en.wikipedia.org/wiki/Formal_verification#Industry_us...

In the wild what is more common in my experience is to use a formal specification language like Z or Object-Z and then recreate the the program in a "normal" language using pair programmers and/or extensive code review to attempt to ensure it conforms to the specification. While not perfect, for critical things this approach is far more time consuming and less bug prone than typical development.

I have also seen limited attempts at writing code generators that take Object-Z specifications as input. My understanding is that this is an area of ongoing research, but even a program that generates code for a subset of a Object-Z specification can save a lot of time.

Example research: http://www.jot.fm/issues/issue_2008_11/article6.pdf

comment 13y ago · link · parent

Sorry typo :(

comment 13y ago · link · parent

It would be interesting to see what the actual error in the NIC firmware source was.

This invalidates my assumption that a shop like Intel probably uses formal verification in firmware development.

Its also scary to consider how many very important (nuclear/damn control, etc) systems while themselves might be formally verified are dependent on services of lower level software (OS, drivers) and hardware (firmware) that are not...

comment 13y ago · link · parent

This is still a good point- Wisconsin or Minnesota are actually in the temperate climate zone. These states might be -10 F in January and 102 F degrees in July. Both heating and cooling are necessary, regardless of their location in the temperate climate zone.

comment 13y ago · link · parent

I agree, assuming your bottle neck is server side (which is often not the case):

Need to make your huge app faster?

  1. Have a well structured, correct design.
  2. Optimize IO (file, network, database, etc)
  3. Minimize in memory usage and copying
  4. Replace your algorithms with ones with better runtime complexity characteristics.
  5. Verify the granularity of your multi-threading.
   A. To big of "chunks" will lead to under utilization
   B. To small of chucks will lead to excessive communication overhead.
  6. Replace the 10% most executed portion of your program with java native method, cGo function, C/C++ inline assembly, SSE instructions, etc etc.
  7. Analyze your program for cache sizing and interactions.
Ideally the application should be profiled between every step, don't be afraid to branch.

Like fleitz said, don't skimp out on the hardware, but at the same time hardware improvements do not typically result in the same kind of multi-order of magnitude improvements that software changes do. But they are easier and cheaper and should be considered low hanging fruit. If performance is really the bottom line, running on non-virtual/phsyical hardware can help make some page table/hypervisor issues go away- as un-hip as that is.

comment 13y ago · link · parent

Fantastic! One man's crashing app is another (more capable man's) special (dirty) function that makes his tight core loop 60% faster ;)

comment 13y ago · link · parent

Do they allow use of the "unsafe" package?

comment 13y ago · link · parent

This does not prove anything. Even if fewer smart but less attractive females were hired due to the discrimination we would still expect to see intelligent women that did get hired, attractive or not, end up making it.

comment 13y ago · link · parent

Does anyone know of a Go HyperDex client? I don't want to write my own unless I have to...

comment 13y ago · link · parent

Many OS's kernels use their local domain socket codepath/interface for 127.0.0.1 <-> 127.0.0.1 communications, completely bypassing TCP/IP... This is transparent to the application.

comment 13y ago · link · parent

"Whether you like that or not, you have to admit it's pretty different for the developer"

I don't really think that is true in Go.

comment 13y ago · link · parent

My understanding: In duck typing only the part of the structure/method set accessed is checked at run-time for compatibility, in structural typing everything is checked at compile time (even if those checks follow loose duck-typing rules). To the programer they appear to be the same most of the time.

comment 13y ago · link · parent

Thanks right, technically Go supports a structural type system* which is a similar to, but different than duck typing. But the Go community often refers to Go as being duck-typed due as that term is more familiar to people coming from languages like Python.

* http://en.wikipedia.org/wiki/Structural_type_system

comment 13y ago · link · parent

I've read about this scenario before but I didn't realize it was Ken Thompson who proposed it. Very cool.

When I read the title I thought maybe Ken Thompson's compiler hack was Go (golang), which he co-created, and I was going to hear a bunch of Python or Node fans talk about why Go is not a threat :)

comment 13y ago · link · parent

It seems strange, but this policy seems pretty pragmatic to me: Here you have two elected county-level officials who often work together and thus are familiar with each-others business, but are not subordinates to one another. Basically peers.

comment 13y ago · link · parent

Just wait until the bank uses non-lethal force, such as tear gas, to defend their property thus encouraging him to leave and end his 7 year stay early...

comment 13y ago · link · parent

Did he perhaps mean to direct his criticism at node/js as a framework/language but rather made it sound like he was critical of the author of the node.js application in question?

Even if that is the case, it seems like he should have been able to read how other people would read his comment. I'm not sure I buy it.

comment 13y ago · link · parent

I'll take a guess- A lot of people I know think Javascript is a horrible language- you can read blogs and blogs about arguments for why this is true and not true.

But I think it comes down to people who hate JS lamenting it escaping from client side into the server side.

comment 13y ago · link · parent

:)

comment 13y ago · link · parent

I write Go every day, I was going to rant about the author being annoyed minor things (that do not annoy me conveniently), and then it struck me- I'm extremely annoyed by the author wasting a line every time he repeats his code rather than doing this (or something similar depending on case):

  if _, err := ioutil.ReadFile(path); err != nil {
      return nil, err
  }
Then I realized, programmers as detailed people are easily annoyed, because small details often matter. But in both the case of the author, and myself here, we need to realize when it truly doesn't matter.

Sure these Go behaviours might annoy him, but they are important for large code bases and are easily worked around. Sure, repeating am overly verbose block several times annoys me, but the seven extra lines of code does not make him unreadable or incorrect-

Here is too not sweating the small stuff.

comment 13y ago · link · parent

There are many ways to deal with this, here is a simple one:

  ...
  ch := make(chan int)
  defer close(ch) //I can timeout later if I want
  go consumer(ch)
  ...
  //I timeout down here and return
  }
  
  func consumer(input chan int) { //I will terminate when the input channel is closed
  	for x := range input {
  		fmt.Printf("I got %d!\n", x)
  	}
  }

comment 13y ago · link · parent

Go just makes things easy to get right, it doesn't make you get them right. Mutexes, condition vars, atomic operations on primitives have their place. That place is usually in scenarios where channels do not fit well.

A program written in Go can deadlock, but the runtime detects deadlock and terminates the program, so at a system level, it does not deadlock.

P.S. "No locks at all, hence no deadlock", is this not true, any system with blocking operations can deadlock. You can construct a Go program that only uses channels and get it to deadlock...

comment 13y ago · link · parent

Thanks for the info.

`one of the most "advanced" -- has about 72 hours of heat-absorption capacity.` That is still a pretty decent "oh shit" buffer. I imagine Fukushima or Chernobyl would have benifited from 72 hours extra to get their act together.

comment 13y ago · link · parent

I'm not any kind of nuclear expert, but it sounds like the author is comparing Molten Salt Reactors to 1970s era traditional reactors:

"and the decay heat from these products requires continuous cooling for weeks even after core shutdown. That cooling process also must be human managed and actively powereed."

My understanding is the reactors currently under construction in the US are being built with passive fail-safes that make them much safer than the 1960s/70s reactors. Is this incorrect?

http://www.world-nuclear.org/info/inf41.html#New_build

1
3637383940