Better HN
topnewbestaskshowjobs
Log inSign up

binarycrusader

3,608 karma · joined Jun 9, 2011 (15y ago) · 1,202 submissions

Windows Developer @Microsoft. Hobbyist Game Developer. My words are my own and not those of any affiliate or employer. Formerly: Solaris Principal Software Engineer at Sun Microsystems/Oracle.
Submissions

comment 12y ago · link · parent

Empathy is a core engineering value. If not exercised, people will unsurprisingly often ignore what you have to say.

It's possible to be correct and helpful without saying unkind things.

comment 12y ago · link · parent

Or better yet, don't even bother asking for forgiveness or permission:

    from collections import defaultdict
    FIZZ=3
    BUZZ=5
    cache = defaultdict(str)
 
    for i in xrange(FIZZ-1, FIZZ*BUZZ, FIZZ):
        cache[i] = 'Fizz'
     
    for i in xrange(BUZZ-1, FIZZ*BUZZ, BUZZ):
        cache[i] += 'Buzz'
 
    for i in xrange(100):
        print cache.get(i%(FIZZ*BUZZ), i+1)
But I'm rather partial to the generator versions you and others posted.

comment 12y ago · link · parent

  I don't know about what other operating systems do.
  Apparently all modern unixes overcommit address space in
  much the same way as Linux. However, i can't believe that
  FreeBSD handles this as crassly as Linux does.
Solaris does not (generally, unless you use MAP_NORESERVE w/ mmap).

In general, the Linux kernel's default OOM behaviour is undesirable for the vast majority of enterprise use cases. That's why RedHat and many other vendors used to disable it by default (unknown who still does).

Why is it bad? Simple; imagine your giant database is running with a large address space mapped. Another program decides to allocate a large amount of memory. The Linux kernel sees the tasty database target, kills it, and gives the smaller program its memory. Congratulations, your database just went poof.

There's an article that discusses the advantages/disadvantages with respect to Solaris here:

http://www.oracle.com/technetwork/server-storage/solaris10/s...

The article (while old) still applies today.

comment 12y ago · link · parent

Let's not pretend emacs/vim are perfect; there are certainly situations where they slow down. I certainly have files where the syntax highlighting isn't so speedy or where it's temporarily broken.

I'm just trying to point out that attempting to compare applications from a certain period in computer history to modern applications is doomed to fail.

While I certainly believe optimisation work would help some modern editors, it would be silly to attempt to blame that all on optimisation work instead of recognising that the world is different now.

comment 12y ago · link · parent

Modern applications have a host of demands placed upon them today that older ones did not. Whether it's complex theming capability, accessibility support, or special font/unicode support, things aren't so simple.

I say this as a long-time vim/emacs user... (yes, I've learned and use both although I primarily use vim).

So while I'll readily agree that I doubt they work as much at optimisation, they're also being asked to do significantly more.

comment 12y ago · link · parent

The Turkish economy isn't going to remain strong if they keep doing stupid things like this. The free flow of information is vital to the growth and sustaining of an economy.

comment 12y ago · link · parent

The views of someone in leadership in a company matter, and even if they're "personal", they will inevitably be taken up by others.

So even if it is not directly creating a hostile work environment, it does seems to be encouraging one.

comment 12y ago · link · parent

Yeah, Solaris has pretty strong crypto verifications thanks to a great security team :-)

I'm glad I could provide useful info.

comment 12y ago · link · parent

I'm very much willing to bet the Solaris man page is NOT grossly misleading, since I know the past and present authors / maintainers of the cryptography framework on Solaris personally :-)

Also, one of the Solaris Security Engineers wrote about random number generation on Solaris extensively just last year:

https://blogs.oracle.com/darren/entry/solaris_random_number_...

Some blogs from other Solaris Security engineers:

Valerie Fenwick: http://bubbva.blogspot.com/

Dan Anderson: https://blogs.oracle.com/DanX/

Darren Moffat: https://blogs.oracle.com/darren

...and last, but not least, Enrico Perla (doesn't have a blog at the moment as far as I know) did author this book and is a Solaris Engineer and someone that works on Solaris Security-related things:

http://www.amazon.com/Guide-Kernel-Exploitation-Attacking-Co...

comment 12y ago · link · parent

The author seems to be assuming that all operating systems use the same implementation or have the same man page even for these random number generator devices -- they do not.

For example, on Solaris from random(7D):

  The   /dev/random   and /dev/urandom  files  are suitable
  for applications requiring high quality random numbers
  for cryptographic purposes.
  ...
  While bytes produced by  the /dev/urandom  interface are
  of lower quality than bytes produced by /dev/random, they
  are nonetheless suitable for less demanding  and shorter
  term cryptographic uses such as short term session keys,
  paddings, and challenge strings.
In short, on Solaris, you can use either one although you are encouraged to only use /dev/urandom for specific cases.

comment 12y ago · link · parent

It seems like futexes are really just an alternative interface made to build pthread mutexes on top of. In addition, they may only be faster on Linux because of implementation issues. It doesn't seem worth including for comparison.

Also, I'm confused by the claim that Solaris doesn't have the vfsstat utility; yes, it doesn't have that utility, but it does have "fsstat" which provides VFS-level statistics. So it'd be helpful to see a more detailed comparison.

comment 12y ago · link · parent

For all practical purposes, by contributing, they (employers or individuals) are agreeing (in whole or in part, through organisation or individually) with the direction and vision that Linus has established enough to contribute. So in the end, all of your convoluted arguments about not being in complete agreement and frameworks is pointless.

comment 12y ago · link · parent

  Your task now should be obvious: Come up with an agreed-upon definition of "the Linux community", and run a valid survey.
That's your problem not mine; history has already established a precedent and you seem deadset to prove otherwise. I don't need to disprove what is already apparent.

  You've established nothing more than that the kernel contributors are willing to work within that framework, not that they feel the same as Linus does.
No, I've established that not only are they willing to work within that framework, but that it's logical to assume that they agree with both the licensing and direction. Otherwise, why would they devote so much time and energy?

As they, "actions speak louder than words" -- and your words seem very dim compared to the action of thousands of contributors.

comment 12y ago · link · parent

Which is why I said they had the right to "establish".

And you can't seriously convince me for a moment that the vast majority of the Linux community doesn't agree with Linus.

Every single kernel contributor must at least feel partially the same way, after all, they agreed to contribute under the existing license terms which (as Linus pointed out) can effectively never be changed.

comment 12y ago · link · parent

Sadly, LGPL is still too restrictive for many uses and for many companies anything GPL remains anathema.

Public Domain or BSD-style licenses are really the best option for encouraging wide usage and discouraging code duplication.

comment 12y ago · link · parent

The more restrictive your licensing, the less likely many developers are to use it now. Although I'd readily admit that applies to some industries more than others.

As an example, John Carmack (formerly of ID Software) recently posted this on twitter:

  GPL never did really do anything for game code, and I do
  wonder whether it was a fundamental cultural
  incompatibility.
https://twitter.com/ID_AA_Carmack/status/434005981379309568

When I was merely a user of free software, I too believed as others did, that a more restrictive (or "stronger" if your prefer) copy-left license was better. However, the more years I've spent in the software industry, the more my opinion has varied.

I think it ultimately comes down to who the primary "users" of your code are. If it's an application, it's probably ok to use more restrictive licensing. If it's a library, or code that's in any way intended to be reused by others more generally, the licensing should have very few restrictions if you want to encourage wide usage and to discourage others from duplicating the work.

comment 12y ago · link · parent

Call me silly, but I believe the primary and original author of a project or other creative work has the right to establish what is "right" or "wrong" for their project unless they otherwise waived that right.

comment 12y ago · link · parent

No, it really isn't unfortunate -- and Linus explained why:

https://lkml.org/lkml/2006/9/25/161

comment 12y ago · link · parent

Actually, it's a very good thing they didn't pick GPLv3+, or have you forgotten what license the Linux kernel is under?

The Linux kernel is also GPLv2 (not +); I completely agree with the '+' thing as that leaves the FSF in control of the license (effectively).

comment 12y ago · link · parent

The Java UI they use is part of what makes it easy for them to have a cross-platform product that works almost anywhere Java does.

I also find the "never seems to fit into the OS" argument a bit silly as most of the popular IDEs don't really "fit" either. For example, XCode's UI design is all over the place -- it doesn't match a lot of what users expect from OS X. Visual Studio has screaming uppercase menus and odd controls (among other oddities). Eclipse, well, it's never even come close to looking like a native application.

So perhaps the more interesting question I'd ask is what IDE have you used actually feels, looks, and acts like a truly "native" application?

In the end, I care more about a usable application that works on the platforms I use consistently then one that works wildly differently on every platform just so it can "feel native".

comment 12y ago · link · parent

Worked fine for me with Chrome 31 on Linux.

comment 12y ago · link · parent

While interesting, I think the headline is a bit hyperbolic.

The Chromium project doesn't build on many platforms, and the build system they use for it is minimally documented.

While individual bits of code might be reusable on other platforms, I'd be hesitant to base any project I create on Google's codebase given the lack of portability and their reliance on arcane buildsystems.

comment 12y ago · link · parent

I've learned enough 'Go' to write a small 3D framework in OpenGL, and after doing so, I have no desire to go back for most of my projects.

Making go-routines map to OS-level threads is a pain. And as much as I hate to trot out this old chestnut, the lack of generics is also a real pain.

I've gotten too used to having generic containers to go back, and the various hacks available just aren't worth it.

I still can't believe Go doesn't have some of the "basic" data types that older languages do such as Python's set() objects and the various operators.

That said, if was writing a small command-line utility for text manipulation or something else similar in scale that doesn't involve dealing with POSIX threading, I'd probably use it instead of Python, C, or C++.

comment 12y ago · link · parent

While ZFS doesn't provide ACID semantics directly, you can achieve similar functionality using zfs snapshots.

Take a snapshot before you make changes in a script, then run the script, if the script fails, just rollback!

comment 12y ago · link · parent

And we can lay blame squarely on Intel and others here to a certain extent.

Intel could easily offer ECC support in its consumer line of desktop (none) and laptop processors (only offers it on 3 of them: http://ark.intel.com/search/advanced/?s=t&FamilyText=4th%20G...), but doesn't.

To me, ECC support should be like SSL/TLS for modern applications; don't do it without it!

comment 12y ago · link · parent

That's still a perverse incentive; more money in the department who owns that parking budget.

comment 12y ago · link · parent

Both sets of changes, but in particular, the scrollbar changes.

comment 12y ago · link · parent

I was responding to the author's general claim that "In the old days it was possible to access members of structs inside unions without having to name the intermediate struct.".

However, I stand corrected in two regards. The first is that as of gcc 4.6+, the sed example the author provided is no longer allowed even if the structs are unnamed. (I was testing with gcc 3.4.) I verified that gcc 3.4 would happily allow me to use the provided sed example as long as I removed the names from the structs.

Second, the C11 standard specifically does not allow for the sed example provided because the structs in the unions contain duplicate members.

I had seen reasoning that hinted at what you're saying in one of the comments posted on the author's blog entry.

Regardless, thanks for encouraging me to dig deeper.

1
242526
41