98 karma · joined November 12, 2013
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)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.
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.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.
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.
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.
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.
> 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.
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.
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).
* 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?)
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.
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.
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.
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.
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).
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.
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.