Better HN
topnewbestaskshowjobs
Log inSign up

grumpyprole

4,485 karma · joined Jun 30, 2015 (11y ago) · 2,043 submissions

Submissions

comment 8y ago · link · parent

I think compiler implementation is a particular sweetspot for functional languages. Here's a similar tiny example in Haskell:

http://www.timphilipwilliams.com/posts/2014-05-22-the-essenc...

comment 8y ago · link · parent

Agreed. The Haskell version has advanced topics such as Free Monads in chapter 8 and higher-order functions in chapter 35! The author for each piece of content has also not been included, which means I have no way of knowing if the content has been authored by a computer science professor or his/her student.

comment 8y ago · link · parent

This is a neat solution, but why is OVMF required (according to the guide)?

comment 8y ago · link · parent

This problem is made worse by technologies like JavaScript, which resemble system programming languages in the lack of restrictions placed on untrusted code. JS code can create threads, sockets, timers, perform I/O, loop or allocate forever. This is complete overkill for something that is mostly needed for interactive websites. Web Assembly doesn't fix this problem either. JavaScript has killed accessibility for the web and created numerous security problems. I don't want it and try to block it when I can.

comment 8y ago · link · parent

In modern Haskell, we are more likely to use the Applicative instance for Maybe, e.g.

    fromMaybe 0 $ 
        (+) <$> xm <*> ym

comment 8y ago · link · parent

My X1 Carbon came with a 3 year on-site repair warranty as standard, included in the price (contrast this with AppleCare which is very expensive). Did you buy yours from Lenovo?

comment 8y ago · link · parent

I'm not a Gnome 3 user or affiliated with Gnome. Personally I find it rather too bloated and sometimes buggy. I use i3, polybar and Rofi for my desktop. I think you are reading rather too much into my words, my point was only that, in general, Windows is not being copied by Linux desktops. And that only "some part" of the community want a Windows clone.

I take your point that Gnome 3 is criticised for many additional reasons other than deviating from Windows.

Gnome is basically controlled by RedHat, a billion dollar company and they absolutely do care about software patents, they are not like most projects. Linux Mint is what I had in mind as a "garage effort" providing, IMHO, a Windows clone.

comment 8y ago · link · parent

Yes I remember the CDE desktop had virtual desktops, but they go back even to Xerox Parc (according to Wikipedia). There are many minor aspects that have been tweaked and are perhaps newer ideas though. For example, on my desktop, I can search for a window title and get a list of windows across virtual desktops that are matches, and jump to the relevant desktop and window.

comment 8y ago · link · parent

I haven't used one, but newer machines use Microsoft's "Precision Touchpad" standard which is supposed to close the gap and support fancy gestures. Personally I just use the ThinkPad nipple and as many shortcut keys as I can memorise :)

comment 8y ago · link · parent

This is not true in general. Linux Desktop UIs like Gnome 3 have taken a lot of criticism precisely because they have not been copying Windows and have deviated considerably (due to patent concerns). Of course, there are some fringe "garage effort" Linux distros that don't care about patents and do just give some part of the community what they want.

As for innovation, Linux desktop UIs had virtual desktops and window tiling features long before Windows and MacOS.

comment 8y ago · link · parent

> Apple still seems to have the best hardware overall

The example comparison you gave, an X1 Carbon, has a more reliable keyboard with more travel, a matte-screen option without fragile glass, a user-replaceable battery, a user-replaceable NVMe drive, a variety of ports new and old, a docking solution, security cable lock etc

comment 8y ago · link · parent

They appear to be evaluating the ability to learn and apply knowledge of previous published works on imperative algorithms. But, as far as I can tell, they aren't testing for much ability beyond this. Where are the questions for logic, formal methods, semantics, mathematics of program construction, functional programming etc? Such theory is much more useful for designing APIs and gluing components together, something I imagine most Google engineers spend the majority time doing.

comment 8y ago · link · parent

It's simple to describe and all the pieces are big red flags even on their own: Speculative evaluation has side-effects (e.g. the cache is not rolled back), speculative evaluation omits security checks, timing attacks can be used to determine the cache memory. It can even be exploited using JavaScript, no hand crafted CPU instructions required.

Perhaps it took so long to find because it's only relativity recently that companies have been paying people to break the hardware?

comment 8y ago · link · parent

Not true. It turns out that Speculative evaluation has side-effects, it changes the contents of the cache. This is the big issue. The contents of the cache are then detectable with timing attacks (the Spectre variants, but perhaps more will be discovered). Meltdown combines this flaw with Intel's own "surprising design" of speculative evaluation, which omits security checks and pulls kernel memory into the cache.

comment 8y ago · link · parent

I think you have it backwards. Monolithic kernels are by their very nature more complex to reason about due to all the communication backchannels made possible when everything sits in one process.

comment 8y ago · link · parent

I disagree. The attacks are clever to focus on Speculative evaluation but are otherwise fairly simple (timing attacks are well known). I'm surprised such attacks have not been discovered earlier, as speculative evaluation seems quite broken. Security is likely not a top priority for Intel and probably not something their verification teams are targeting. There is perhaps a gap in the market for a vendor focusing on secure CPUs.

comment 8y ago · link · parent

Yes and creating one or more "web workers" (threads) is a significant side-effect. Javascript to me, looks more like a systems-programming language (imperative with threads and sockets) than something trusted for interactive web sites. The web is a huge mess and today we learn that hardware is too.

comment 8y ago · link · parent

Why not use melpa-stable?

comment 8y ago · link · parent

Side-effects strike again! Not only does the hardware have observable side-effects that are not cleaned-up, but our browser languages allow pervasive side-effects which are used for exploits (e.g. precision timing).

comment 8y ago · link · parent

Such studies are very hard to do, it is almost impossible to factor out social preferences. For me personally, I am most productive in languages like Haskell and OCaml.

comment 8y ago · link · parent

What numbers do you require? If there was a metric measuring simplicity then Lisp (or perhaps a modern variant, Scheme) would probably win - it is a local optimum of language design, essentially just lambda calculus exposed via a very simple grammar (which aids meta-programming).

comment 8y ago · link · parent

IMHO the best option currently for a stable OS with up-to-date desktop apps is NixOS. NixOS allows one to have a stable base OS then install packages in the user account from a different channel. Since it uses deterministic builds, the binary caches typically mean no building needs to happen locally. NixOS permits multiple versions of any application/library/dependency to be installed side-by-side, even libc. I run such a configuration and all my desktop packages are completely up-to-date, while my base OS and system components are tracking a stable release.

comment 8y ago · link · parent

Most programming languages are unsound logic systems which allow us to prove true==false rather too easily!

comment 8y ago · link · parent

> Corporations can't 'wield the code' because by copying it and using it it doesn't take it away from other people.

The relevance of the original code can be taken away, for example by hijacking a standard or through control of APIs and/or hardware. Will anyone be able to buy hardware in 10 years time that will not be under the full control of a corporation?

comment 8y ago · link · parent

GPL is about enabling freedom for end-users. An end-user could be anything from an individual to a corporate entity. Your definition of freedom appears to be just "permissive licensing". Unfortunately, permissive licensing like BSD, could mean that one's code ends up being wielded by a corporation to remove end-user freedoms, typically to lock them in as paying customers.

I am a Free Software Foundation (FSF) member because I believe that end-user freedoms are becoming increasingly under threat as of late and they appear to be among the few that are taking the problem seriously.

comment 8y ago · link · parent

But he doesn't just "like the product", he attempts to criticise the competition for copying.

comment 8y ago · link · parent

I wouldn't criticise the competition for copying, when there's plenty of copying on Apple's part.

comment 8y ago · link · parent

Samsung have been shipping OLED wrap-around-screens under the "Edge" branding since at least early 2015. Phones without front physical hardware buttons have been around even longer (e.g. Google Nexus).

comment 8y ago · link · parent

I agree, but he attempts to shame other firms when they decide to copy something from Apple. He comes across as a hypocrite.

Personally I find many of Apples "innovations" abhorrent and it frustrates me that they have been universally copied. They have popularised disposable, unrepairable, slippery, ultra-fragile phones!

comment 8y ago · link · parent

Perhaps one might admit that Apple are late to the game with OLED and edge-to-edge displays?
1
484950
69