HNHacker News
TopNewBestAskShowJobs

fzltrp

98 karma · joined November 12, 2013

submissionscomments
fzltrp··on OpenGL Is Broken
> Sure, building an IR from scratch is fun. But making it truly cross-platform and ready for many usages is really hard.

It's not that hard, as long it remains as close as possible to the source language (ie. GLSL). Iow, as the OP is advocating for, an AST of the shaders. This removes the cost of parsing the source code (but requires on the other hand to validate the AST, so this isn't exactly a complete gain, but definitely an progress compilation wise). However, I suppose that what motivated the choice of using GLSL source directly is the simplicity of the approach: no need to build the GLSL scripts separately. When working with interactive tools, it's a non negligible comfort, imho. Another interesting aspect is the ability to build the scripts dynamically, like people do with SQL. I wonder if this approach is used by professional game studios.

fzltrp··on Rolls-Royce is designing drone ships to challenge $375B freight industry
The technology employed aboard ships is still tightly coupled with the processes used to maintain it (ie. Human ad-hoc intervention). If you want to automate the process, the first thing you'll think about is how to change that technology to make things easier for automation. Is it actually possible to turn a container ship into lego bricks which can be easily swapped out when broken, and can it be made hot swappable from the ship inside?

Imagine a car which would monitor each of its parts, diagnose an issue on the gearbox, and turn it offline while driving to replace it.

fzltrp··on The Unix Haters Handbook (1994) [pdf]
Compare that with clippy on Windows. It's a matter of perspective: some enjoy manual clutches, and others want fully automatic, both may be (in)convenient at times. Interestingly, MS has been trying to give more CLI power to their users, and Unices have been trying to close the gap in the opposit direction. Both approaches are useful.
fzltrp··on The Unix Haters Handbook (1994) [pdf]
> [FreeBSD]'s still guilty of every single criticism in this article

s/'s/ was/

I don't think that _every_ criticism in this book is still valid, far from it. Besides, Linux and *BSD ecosystems share a lot, actually only the kernel/libc points (if any) could be relevant for one system and not the others.

fzltrp··on App.net State of the Union
...With the exception that everyone can read every emails (or is there a private tweet feature with twitter?).
fzltrp··on Why is Stack Overflow so negative of late?
At first, it seems that the needed data is already there: karma points are associated with tags, so it should be possible to set answering, voting, modding threshold based on the questions tags, though one would have to decide which tags are valid for a given question. And then there are subtopics: if I post a question on functional programming for instance, should a more specialized developer benefit from his clojure karma to gain privileges? Should it be a ratio? And then, if I update the question to focus solely on lisp, what happens of previous actions performed on now invalid privileges?
fzltrp··on F-35 C++ coding standard [pdf]
You said viable, so I guess you mean production ready, which excludes still experimental or "in gestation" languages like rust or ATS, but they are indeed worth a look (note that ATS in its 1st incarnation targets C).

I'd like to point out that there was a post several weeks ago on /r/haskell of someone having implemented a BSD kernel module. There's also MirageOS, an OCaml implemented framework providing all the services of an OS, thus letting people boot their apps in a VM very easily (that's the aim of the project afaik, given that it comes from the same lab than Xen. While not specifically tuned for OS development, they seem able to cope well with the task. Note that both languages also have a native SSL library development ongoing, which is a part of the MirageOS framework in the case of OCaml.

fzltrp··on Elm's Time-Traveling Debugger
I don't think that the OCaml debugger let you do the things demonstrated by Bret Victor in his talks, and implemented there. As explained elsewhere in this thread, these features let you replay a conputation sequence in a loop, and bind certain values of the computation context to visual inputs (sliders or more simply input boxes for instance) to modify these values during the replay loops. This let you observe how the computation sequence reacts to those changes. It allows a more playfull testing and tuning of a program. Of course it is way more useful in the case of a visual rendering performed by said computation. Please watch the Bret Victor's video for insight (maybe that one: http://vimeo.com/m/36579366).
fzltrp··on The Operating System That Can Protect You Even if You Get Hacked
Personnally, I would not be speaking about Apple hardware, I don't know it well enough. But in general, hardware is relevant to security, simply because most of them nowadays contain firmwares. In some cases, that firmware can even be a small embedded OS. If that particular piece of software happens to deal with inbound data (think WiFi controller), then you have a potential security hole _which you have no control on_.
fzltrp··on Try Idris
> you'd like to add a progress bar to a computation. It's trivial in imperative languages, but much harder in functional style.

That depends a lot on how you code your program. You'll havr as much difficulties in imperative style if you didn't think up front about that feature (or any similar ones). What you want is modularity, and it means the ability to separate concerns at the language core. Luckily, un FP, functions being first class, you can easily extract functions out of an algorithm, and the pass them as parameters. So in your example, you'd parameterize on the function which does that computation step, and plug in that very function wrapped with one doing the progress bar update. With a well written codebase, this sort of things are just one refactoring away. This exercise being easier or harder is mostly a question of being used to the language imho.

fzltrp··on Try Idris
If you know what enums are, think of algebraic data types as enums on steroid. You define an enum type as a set of unique values. ADT let you do the same, but let you also parameterize the enum values, and even use the enum type itself as a parameter type (a recursive definition). You can also make several ADTs mutually recursive. As other said, that's very handy to represent usual data structures like lists, trees.
fzltrp··on Try Idris
I recently stumbled on something called "view", a concept implemented in the Hope language. For those not familiar with it, it let you define bijections between 2 different datatypes, so that one may pattern match a piece of data from one datatype with the other datatype constructors, and one of the examples in the paper was precisely that correspondence between peano numbers and usual (unsigned) integers (well, really, it's not quite bijective, given the arch limits on integer representation, but for any purposes we can think of yet, it works). So, the question is: is idris using something like that? Or is there another mechanism? Is it a builtin feature of the language? Do you use the proof system to persuade the language kernel it may translate them back and forth (the "software foundation" book for Coq let the reader build a few proofs about that, though Coq use arbitrary precision numbers iirc))? I'm still quite new on dependent typing, so forgive me if this question is silly or weird somehow.
fzltrp··on What is the contribution of lambda calculus to the theory of computation?
I am not explaining how, I am merely pointing out that there is a "how to compute" question, and that lambda calculus and type theory help address that question formally. That point tries to address the following question by OP:

> What is the equivalent computer science problem that lambda calculus can help you solve?

That may sound very obvious in retrospect - surely OP knew already what I was saying, and he actually wanted explanations on the how itself. Perhaps that's why it seems useless: I admit that I tend to stick to strict semantics on technical questions, and often completely miss the actual intent. Sorry about that.

fzltrp··on Shutting down Ubuntu One file services
Everyone will wait the last second to get their data back (and complain about the cramped service) anyway. And it's not like an OS upgrade which could potentially break your apps or lose your data. It's just a mattee of pushing the sync button to get all your data back on your local drive. People will largely have time to find an alternative solution or buy a small storage device until EOS. Afaic, Ubuntu is pulling the plug on a very good service in a reasonable fashion: we should be thankful they kept it running for so long.
fzltrp··on What is the contribution of lambda calculus to the theory of computation?
How would you write a program which compute the speed of the ball in your example, and how would you ensure or prove that your program is correct? That's what lambda calculus and all its derived works give you. Others have described it more elegantly here, so please refer to their posts, but if you want references, check out the Curry-Howard isomorphism, Hindley-Milner type system, System F, or what Coq, Agda and similar languages bring on the table.

You could also look at the answers given in the linked stackexchange page, of course.

fzltrp··on What it's like to use Haskell
If you hang out a lot on reddit, this particular site is written in python, so there might be a bias. Python is also often chosen for entry courses in CS, while PHP is probably more picked up by people who need to know it for work, so it is not necessarly well understood by many of its newly professional users.

My guess is that python is a more well rounded language, with a nicer syntax, which enforces indentation rules (that's a plus for teachers). PHP only shows its merits after a while, and through good practices.

However, looking at the charts over at langpop.com, I don't see how people would choose PHP over perl for its easiness, given the wide difference of popularity. They just don't sit in the same ballpark (except for maybe a few specific markets).

fzltrp··on Tamil Nadu state departments asked to switch over to open source software
To be honest, it is possible to configure windows (starting from XP) with a minimal set of enabled capabilities. The system policies mechanism is quite featurefull, and you lock a system down to minimal rights. It is also possible to deploy system patches and updates locally to a domain from the server (what they call a domain controller) comfigured to do so. In fact you can pretty much control any client associated to a domain relotely with the right access token.

Imho, the main issue is more in:

- setting up the right set of policies, it's a difficult task. On a unix system, the problem is probably easier to tackle because the first (simpler) layer of security implemented through the file system (linux for instance provides a more elaborated capability mechanism, many others unix also each have their own implementations of a policy/capability mechanism).

- letting end users having too much control on their computer, because often time they wish to install all sort of products on their own (this is especially true of developpers, but usually computer literates are more security minded than the lambda user). With web apps, this problem is nowadays shifted toward the browser, so maybe this problem isn't as much of an issue as it was 10 years ago for system wide policy enforcement (but as I said it is now one at the browser level).

fzltrp··on Tamil Nadu state departments asked to switch over to open source software
Isn't there also the global decline of english quality because of it being broadly used on internet by non native speakers? Many people (including me) get influenced by what they read on the net, to the point of accepting some of the strange forms you describe further down. There's also a global lack of proofreading all across the web, people editing content through web interfaces, on devices not supporting even simple spellchecking. English on the multicultural web is a strange melting pot of english forms and foreign ones being shoehorned in english. How much is (the)[1] american english influenced by spanish for instance, given the growing incidence of the spanish speaking population for the last few decades?

[1] Here I'm not even sure if I need to use "the" there. In my native language I would have to use it, but isn't the expression "american english" specific enough to avoid the need of it?

fzltrp··on Coming Soon to Hacker News: Pending Comments
+1 Interesting.

There's probably a parallel to make between moderation systems and Russel's paradox[1].

[1]: http://en.wikipedia.org/wiki/Russell's_paradox

fzltrp··on Tamil Nadu state departments asked to switch over to open source software
> There is no Linux distribution outside RHEL and probably SLES that provides such long support cycles.

The article talks about an indian, debian based distribution called BOSS[1]. No doubt the company providing it will be more than happy to also provide long term support, or easy migrations as part of a huge support contract with the indian government.

[1]: http://en.m.wikipedia.org/wiki/Bharat_Operating_System_Solut...

fzltrp··on Hack: a new programming language for HHVM
Thank you! You brought an interesting point with the example you gave, it is one of the things I was thinking about. Thank you for your work, and for making it available!
fzltrp··on Hack: a new programming language for HHVM
Thanks! I was mostly thinking about point 2, and I understand your motivations in going in a different direction after trying it. Very good and enlightening answer!
fzltrp··on Hack: a new programming language for HHVM
Great work!

A question about the type inference mechanism: in PHP, while it is possible to define object interfaces which classes may be defined against, by the dynamic nature of the language, functions don't necessarily need that interface specification to accept an object conforming to it, explicitely or implicitely. OCaml provides something "similar" with its object system, but much more powerful with static inference of an object (super)type from its usage. will Hack be able to infer an object interface as well from its usage in a function?

fzltrp··on Hack: a new programming language for HHVM
If you look at the original C syntax for function types, it is also a bit weird: part of the type (the return type) is placed before, and part (the parameters) after.

That syntax in hack seems more "functional" to me. That said, I must admit that I kind of like the C syntax, because of its oddity.

fzltrp··on Why OCaml, Why Now?
Car metaphors don't always match well with the situations they try to illustrate. Obviously if you had the chance to be offered either one of these two cars, you'd probably try them out and pick the one you feel the most comfortable with, but also which would best fit your needs. If all other factors have been weighted, and it boils down to the number of cup holders, would you stop there short of making a choice, because of the apparent superficiality of the argument? The author expressed his interest in both languages, and brought other arguments than just the js one.
fzltrp··on A powerful new way to edit DNA
Software engineers often use the word "update" for operations of that kind on databases, as part of the so called "crud" operations (Create Read Update Delete), which represent the fundamental operations one could apply. I agree with you that "edit" sounds good (and "cred" perhaps better than "crud"), though it sounds a bit more like an ongoing action rather than an atomic operation to me (personal bias I suppose).
fzltrp··on Why not inherit from List?
Classic functional programming doesn't cover oop: there's no subclassing, thus no issue with using a list to keep your players. Furthermore, pure functional code doesn't mutate, so invariants can't really be broken, unless you meddle with the internal representation, in a way which would confuse the existing codebase to handle lists.

So if you pick list as the implementation detail of your team type, then it will essentially be a list, and may be passed as such to list handling functions without issues. It'll be up to your code to handle the aftermath if your invariants were somehow broken in the process, which would be the proper thing to do. From the outside though, just like for any type, the implementation details shouldn't be exposed. For weakly typed languages, it should be documented to not rely on it.

Edit: I was just handling the original question from an functional stand point. Of course nbouscal solution is much more usable and robust. What would probably happen, if you follow an agile methodology, or some similarly incremental process of development, is that you'd probably start with a list, and as new functionalities would be added, the type would evolve to a tuple or a record including the list. Any function would then have to be updated accordingly. But at least the team type should be made abstract somehow, to hide implementation details.

fzltrp··on Why not inherit from List?
Strictly speaking you're probably correct. But the problem is that OP is giving as an example a team, without strictly defining the expected behaviour of that class, so everyone starts to imagine his own set of behaviour ovverides, invariants, and so on, and in many cases they are right (the salient point of subclassing is method overriding).

The problem really starts when an invariant supported by a superclass is broken by it subclass. For instance, the idea that a player is unique in a team is obvious, so as said elsewhere in this thread, the Add method, whose invariant is to increment by one the size of the list (because duplicates are allowed, and pretty much no predicate other than equality is applicable to a generic type), would be broken by that Team subclass, and thus any function relying on that implicit behaviour (afaik, c# doesn't implement contracts) would break.

That Liksov substituton principle is tough indeed.

fzltrp··on New Linux userland rootkit with anti-debugging, new backdoors and pcap hiding
Curiously, I use that variation as well. I tried to look it up to find out where I could have picked it up, but couldn't get any interesting results. Does anyone else uses that?
fzltrp··on OCaml: what you gain
Well, I don't know. The "No polymorphism" section is misleading (though polymorphism doesn't carry the same meaning from one language to the next): There's this comment on higher order functions not being supported which surprises me. See the section 7.13[1] and 7.14 of the OCaml documentation. These features are availabe since ver 3.12 of the distribution.

[1]: http://caml.inria.fr/pub/docs/manual-ocaml-4.01/extn.html#se...

← PreviousPage 2 of 4Next →