HNHacker News
TopNewBestAskShowJobs

fzltrp

98 karma · joined November 12, 2013

submissionscomments
fzltrp··on OCaml: what you gain
Yes, I think the main selling point of ML languages is the type inference mechanism. Haskell doesn't support exactly the same mechanism, but it has typeclasses, which is very cool too.
fzltrp··on OCaml: what you gain
I don't know how other similar languages deal with GUI. It's always sort of hairy, obscure code when you look at it closely. Mainstream languages (like Java) usually give you GUI building tools which generate all the boilerplate stuff, but if you look at that generated code, it doesn't look so appealing either imho.

If you know the GUI libraries inside out, then the code becomes much easier to grasp though. The lablgtk library (which provides gtk support) is quite well written, providing both a modular interface and objects, but indeed there's a learning curve.

Lastly, you might find it more palatable with a little bit of formatting:

  let menu = GMenu.menu () in 
  let explain = GMenu.menu_item ~packing:menu#add ~label:"Explain this decision" () in
  let callback () = show_explanation impl in
  explain#connect#activate ~callback |> ignore; 
  menu#popup ~button:(B.button bev) ~time:(B.time bev)
fzltrp··on OCaml: what you gain
> I know there's Camomile

Camomille is great, but it exhaustively covers the whole UTF standard, which you might not need for more casual uses. There are other libraries bringing lighter support for UTF strings (ocamlnet for instance I believe). Nevertheless, Camomille does a pretty good job if you're concerned by compliance.

> There's also this: http://www.podval.org/~sds/ocaml-sucks.html which I mostly agree with.

It's a pretty old page. I'm not sure its content is still accurate. I'll have to look into that.

fzltrp··on Saying goodbye to Python

  a lot of people != all php users.
Actually

  a lot of people != the majority of php users.
You're reading a bit too much in what OP wrote. I have beern an avid php programmer several years ago, and still like it very much by the way.
fzltrp··on FOSS Photoshop killer Krita may release on Steam [video]
> Really, they should ape every single one of Photoshop's functional features.

That's a very uncertain territory there. What sort of legal action could Adobe start if gimp started mimmicking their flagship product UI? And who would pay the legal fees to support Gimp? Would you participate?

> Like dumping GTK and using Qt, for instance.

You're saying that as if it were just a finger snap away. GTK and QT are quite different in spirit and implementation. Besides, before becoming the Gnome Toolkit, GTK was really the Gimp Toolkit. It seems very unlikely that they would dump it in favor of QT, which is used by a major competiting desktop environment.

fzltrp··on Intel's "cripple AMD" function (2009)
2nd choice (sorry for my confused english). But then there might be legal consequences to factor in. Engineers shouldn't probably care about that.

As for the first choice, ideally Intel should do that to provide the best possible compiler out there, but that would really be shooting oneself in the foot, unless they are guaranteed to always have the upper hand on the hardware side. It would also require them to study AMD cpus deeply (how instructions get translated to microcode, how that microcode is optimized, etc) - they probably have people doing that (if that's legal).

Thanks for taking the time to answer me.

Edit: modified my upper comment.

fzltrp··on Intel's "cripple AMD" function (2009)
All right, then I suppose that what you are saying is that Intel should leave the genuine Intel chips detection out, and let customers implement specialized paths for AMD products, if the automatically selected path happens to underperform (for a certain performance expectation level), which might be less likely to occur if all the generated paths are available. Did I get this right?

And for people looking to extract every last bit of power from their chips (AMD or not), they might have to implement the path by hand anyway.

> rather than falling back to the worst possible code.

Note that (I think it might have been said elsewhere), it's not the worst possible code, but the least efficient one generated by the compiler (which happens to be quite good already). /pedantic mode

Edit: clarifications.

fzltrp··on Intel's "cripple AMD" function (2009)
I understand you. But, is it possible that say, between two features, say SSE 4 and AVX, the less powerfull one happens to be the most efficient for a given algorithm on platform A, and the least efficient on platform B? If yes, how would a the compiler know which path to choose without knowing which platform it is targeting?
fzltrp··on Intel's "cripple AMD" function (2009)
> People have pointed out that the "Intel" code is faster than the "AMD" code even on AMD chips, so the stuff about performance being difficult to achieve across different CPUs, while true, does not seem to be relevant.

It is relevant, if you consider that optimization isn't just counting cycles at individual instructions. Some optimization pass may be CPU agnostic (and the difference of performances between compilers on AMD probably show that aspect), and some very well depend on CPU peculiarities.

Also, if Intel must provide good support for all AMD chips, then they will have to do the same for any other competitor (and there are some iirc).

> they generate code that checks for an AMD CPU

Is it really what they do? Are they checking for "GenuineIntel" CPU, or for "AuthenticAMD" ones? There's a slight difference, even if AMD is their only real competitor atm.

fzltrp··on Intel's "cripple AMD" function (2009)
That's interesting: could you elaborate on those problems? I was pretty much supporing Intel on the ground that their competitors products were just running a safe path, but your input might change my view entirely.
fzltrp··on Intel's "cripple AMD" function (2009)
I guess they could do that, and trust that customers will always be reasonable to not sue them when in those situtations that they wanted to avoid. Besides, it's not 2009 anymore: if they want to maintain their arch on the market against ARM founders, they should probably help AMD out as much as possible (though I remember reading somewhere once that AMD considered including ARM cores in their APUs - or maybe it was just a journalist's speculation).

> This sounds a lot more like Intel [...]

Just a thought here: should Intel do things to avoid sounding like bad competitors, or to give their customers the best product they can offer? We're engineers, we should also know not to fall for appearances, shouldn't we? I know, I supported my own reasoning with the legal aspect of things, which sometimes is not very reasonable in what it must handle. There goes my original point.

fzltrp··on Intel's "cripple AMD" function (2009)
> This is not an acceptable use of trademarks.

But if you were Intel, would you have your engineers work on competitors' products to make sure they are well supported on your line of tools? Before making an answer, consider that the core implementation of AMD cpus differ significanrly from those of Intel: instruction timings are slightly different, whether you look at them individually or in groups. It's not just a matter of turning a switch to get optimal performances, and that's just the tip of the iceberg.

Now, from a business standpoint, I think it could make sense for them to make their compiler produce fast code for any chip, but the legal implications of having a conccurent's product burn because of code produced with your compiler might make you think twice before going that road. Intel probably chose the safe road for a reason. Also, note that the produced code isn't crippled (as in, it doesn't make AMD cpu execute endless loops, or produce wrong results more than Intel's ones), it just follow the safest path.

fzltrp··on Windows 9 in 2015: Desperation isn't pretty
The last two points aren't that valid anymore when you compare it with an android/ios migration. People coming from the MS ecosystem will probably want to have the softs they had then, and it's most likely they'd have to look for an equivalent in the ubuntu/android/apple one, each of which sports an app market of some sort.

Also, GP was talking about his retired parents, who probaby don't play games that much, or have their favorite on Windows, so it's pretty much the same issue as above, though now steam is available on linux, and there are plenty of little games available on app markets.

I don't know netflix as a user (not US cit.), so can't comment much on that. I understand that before the streaming services, people used to get rented dvds by mail. It's a little bit a step back to return to that solution (if it still exists), but it's not that unbearable, imho.

Of course, if said parents are computer savy, then these issues might not weight that much (VMs).

fzltrp··on Awful app review trend among Turkish users
I guess this wasn't too far fetched an idea. Google engineers must have thought of this before me as well, which means that they must've a good reason to not implement it. I wonder what it could be.
fzltrp··on Awful app review trend among Turkish users
They could perhaps implement meta reviews, which let users rate reviews. Note That:

* perhaps the ratio of misleading ratings isn't necessarily high enough to render the system ineffective (iow, it may be just noise), but in order to know that, it appears to me that the meta review would be necessary.

* it wouldn't stop people from trying to game the system (which lead to the idea that even if meta review was there, its effectiveness would have to be tested, maybe by using... a meta meta review?)

fzltrp··on FFmpeg and a thousand fixes
So I suppose you'd rather not wear any bulletproof vest?
fzltrp··on FFmpeg and a thousand fixes
It depends on what you guys are talking about.

If you mean "constant" primitives, i.e. things which don't require to expand the language grammar or type system, then it's a question of future prevalence of usage of said primitives. If they become almost ubiquitous to any project, then they obviously need to be included in the standard libs. If you're talking about a new language feature, that depends on how much that new feature may help design and write future libraries, and also what are the aims of said language. I understand that rust aims to become a safer system language, so any feature helping the design of low level, performance critical code should be welcome.

fzltrp··on Show HN: Given an API, Generate client libraries in Node, Python, PHP, Ruby
There's this utility called swig(http://www.swig.org/) which let you create wrappers for C/C++ libraries to a number of different target languages (dynamic and static), though often time languages offer ffi on their own.

The code generated by this tool is rather heavy weight though. Also I'm not quite sure if this is what you're looking for.

fzltrp··on Bill Gates takes part in Reddit's Secret Santa
The sad reality is that a computer is a complicated thing. Sometimes, your car breaks and you need a mechanic to fix it. Same goes for computers. And of course, businesses have strong expectations regarding mechanics and liabilities.

One main difference between linux and windows is that for the most part, MS isn't concerned about how 3rd party apps should install, upgrade, or remove themselves from the system, outside of security considerations. This burden however falls back mostly on distros in the linux world. Ye. I'd be curious to know how much of upgrade failures are due to userland apps as opposed to OS configuration issues for mainstream distros these days.

Also, Windows started with imperfections as well, but customers didn't have much choice at the time, and had to do with all the issues of DOS+Windows 3.11 and then migration paths to Win95/NT and then XP. The road wasn't exactly straight and flat at the time. MS always played the card of compatibility, which was a major factor for companies (who wants the extra headaches of migrating her apps on top of migrating the OS?).

Anyway, this topic has been discussed to death already, I'm pretty sure it all boils down to MS having been there before competition, and having managed to keep that step ahead (UEFI anyone?). Businesses can adapt if necessary, they just won't pick the hardest road if it doesn't make enough sense for them money wise, and MS made sure it never did.

fzltrp··on How the first PHP functions were named
The opportunity is still there. This kind of mistake is easily fixed: create your own aliases for the functions you'd like to rename, and it's done.

If the PHP people are unhappy with them, they could do exactly the same, deprecate and remove the original names through a couple of major releases, and the problem is solved as well. Same solutuon for parameter order (needle, haystack, whatever).

Really I don't understand all the fuss around PHP functions names.

fzltrp··on Research shows how MacBook Webcams can spy on their users without warning
That's unfortunately the exception rather than the norm. I have seen laptops with switches for WiFi, and camera obturators, but manufacturers hardly think about these things. It's obviously not an Apple problem only, but it certainly hinders usability to have physical switches. Yet, I really wished they'd make that standard for all media peripheral (and not just on PC, but any device coming with these features). That would however be easily considered as an admission of failure to provide a secure software environment to their customers, and they might not like that aspect of it.
fzltrp··on Linux laptops: should you avoid buying Windows?
Manufacturers used to offer the possibility of requesting to get a refund for the unused MS Windows license. Did that possibility go away?
fzltrp··on SteamOS: It's here
Is there a jigdo link? If they plan to do point releases they should go with that system, it saves quite a lot of bandwidth.
fzltrp··on No Man’s Sky Is A Huge Procedurally Generated Sci-Fi Exploration Sim
I don't think that the word atom here refer to the usual physical object (which shouldn't be called that way btw), but rather to indivisible objects (ie. the original meaning of atom) in the game data model, iow every actors (passive or active).
fzltrp··on The Next Ten Billion Years
Sand is not sedimentation.
fzltrp··on Scala – 1 Star – Would Not Program Again
If you take it too seriously, it's indeed not very good. I personally take it as a compliment for Haskellers: it means that people from the Haskell (and fp in general)community do think at a higher level than the average programmer, so much that it becomes for them difficult not to.

The FP model gives good tools to enable that, and encourage people to think that way.

I may also be biased because I feel more confortable thinking that way. Certainly programmers excelling at imperative programming might disagree, but I don't think that the latest trends of "functionalizing" Java, C++ or PHP are coincidental. Javascript opened the way by bringing back that paradigm to a larger audience, and these languages, which already have FP concepts available, but not in a very usable way, are now incorporating them to the core. That's a good thing.

Regarding the original topic, Scala is very much an experiental language in my opinion (because of the concepts it involves; the implementation is pretty good), so maybe there's a little bit of thruth in the article in that regard. Perhaps that's the "flaw" of academic languages. Also the comparison with Java is quite pertinent, Java being a language designed from the ground up for engineering: the grammar is fairly simple, which provided a somewhat good compromise between high readability (because of its similarities with C) and easiness at machine processing (not as easy as lisps dialect though).

fzltrp··on Scala – 1 Star – Would Not Program Again
Once you start dwelling in the intricacies of a very complex type system, it becomes quite difficult to keep things easy to understand.

There's this joke about how a Haskell programmer's style on a hello world programme evolves with experience, starting from a very readable, sort of down to earth implementation, and turning out in its last iteration into a complex "mess" of abstract concepts, for sensibly the same result.

It's always possible to keep things simple, even in Scala, and the opposite is also true with a language known as simple, Java, because the type system happens to be quite powerful actually. People are tempted to make things complicated also because there is this prevalent programming style in the community.

fzltrp··on Aluminium: The metal that just keeps on giving
Even storage of the metal may bring benefits: http://www.nytimes.com/2013/07/21/business/a-shuffle-of-alum....
fzltrp··on Someone just made a $147,239,214 Bitcoin transfer
Give it some time.
fzltrp··on What's wrong with Object-Oriented Programming and Functional Programming
> I disagree. Low quality articles like this are part of the reason why many undergrads are full of strongly held opinions about things they don't know much about.

I doesn't happen with undergrads only (but that doesn't make the whole profession guilty of it all the time).

> They think you can dismiss a huge paradigm with a glib one-liner: "functions are not objects".

I don't think the article dismisses any paradigm whatsoever. It dismisses the entrenchment in one paradigm at the expense of any other. That's the main point. The explanation given is perhaps a little bit careless, I can concede it.

> Think about it a little bit and you'll see why they are actually very related.

Relation does not imply causation, which I perceived in your wording, but I might have been mistaken. Was I?

> His statement about Java is meant to imply that proper higher order functions and OOP are in opposition in some way

I don't think he meant that, but rather that the way Java never included functions as "primitive types" was a mistake because of that need of OO purity. The Runnable interface (or any interface containing a single method) is an example of that problem (there are other reasons which may support the existence of that interface though).

> I am saying that proper higher order functions alone are enough for a very pure form of OOP, so there is clearly no opposition.

That's debatable. I totally agree with you on the idea that FP let you implement OO. Likewise, OO let you implement closures easily (there's a duality there obviously, as in algebra vs coalgebra). However, I think that OOP (or FP) as a full fledged paradigm included in any language - and not just a library built on top of closures (or closures on top of objects) - makes a lot of sense: it let the language incorporate syntactic sugar for all the specific constructs related to OO, and it also enable the compiler to perform better code analysis (though I suspect that it should be possible with a library based implementation, but that would imply either the compiler to know about it, or it having a very flexible - plugin like - mechanism to include enhancements as libraries as well). I don't think that the latest evolution in Java to include FP is a coincidence. Many languages have already been mixing these paradigms with good success.

> I'm going to ignore the digs at me [...]

Good. Let's get that out of the way. I'm glad we're having a saner discussion.

> If he can't make a simple argument correctly, how am I supposed to have faith that his research isn't similarly full of errors?

I understand your point better now. Initially, I was very afraid you'd be having the very same issue.

← PreviousPage 3 of 4Next →