Hacker Newsnew | past | comments | ask | show | jobs | submit | peaton's commentslogin

Taking a course on OpenGL Graphics programming in university right now. We use GLM. It seems pretty good. If I'm not mistaken this is a (potential) replacement for GLM? If anyone knows GLM well could they discuss the differences between the two libraries? Is this worth investing time into?


GLM is extremely full featured compared to this. It's also very stable and portable. From GLM home page:

-------------

This library provides classes and functions designed and implemented following as strictly as possible the GLSL conventions and functionalities so that when a programmer knows GLSL, he knows GLM as well, making it really easy to use.

This project isn't limited to GLSL features. An extension system provides extended capabilities: matrix transformations, quaternions, half-based types, random number generation, procedural noise functions, etc.

GLM ensures interoperability with third party libraries, SDKs and OpenGL; replacing advantageously the deprecated matrix functions. It is a good candidate for software rendering (Raytracing / Rasterisation), image processing, physic simulations and any context that requires a simple and convenient mathematics library.

It is a platform independent library with no dependence to external libraries even OpenGL. GLM is written in C++98 but can take advantage of C++11 when available.


Only downside I found with GLM is it is dog slow when built without optimisations, making debugging painful, and as it is a header only library you can't compile an optimised version for debugging purposes. I'm not aware of any libraries that solve this problem though, while still remaining as fast when fully optimised. I did consider trying to create a custom recompiled header built with full optimisations but I never got around to investigating it as an option...


Try this [1]:

    #pragma GCC push_options
    #pragma GCC optimize("O2")
    #include <something>
    #pragma GCC pop_options
[1] https://gcc.gnu.org/onlinedocs/gcc/Function-Specific-Option-...


I'm working with Visual Studio :) But this would have been awesome, as I think it compiled with MinGW.


Why do you bring this up? Is this more ideal? I thought writing inline css was an accepted awful thing to do. Or is that just a simplification for new developers? Why do you benefit from doing this?


Inline CSS isn't any more awful than any other meaningless presentational markup.

Why use inline CSS? Because it's simpler and obvious. The proposed hack has no upsides: it isn't any more accessible, isn't any more maintainable, and it isn't any more performant (quite the opposite).

To me it's in the same category as replacing `<font color=red>` with `<span class=red>`, because "font is bad".


The proposed hack has the upside that all of the bar charts on a site are governed by the same CSS.

The CSS is ugly because of the many redundant rules. But if you have x bar charts on y pages, then one ugly CSS file is better than x repeated ugly spots spread out in y HTML files.


Inline style for bar height doesn't preclude use of external styles for common properties like color, borders, etc.

Also it's very unlikely you'd have many charts with markup written by hand. I'd expect charts to be generated from a template from a proper data source, so change in markup of all charts would still be done in one place.


tru.


If you look at the example on Github, it looks exactly the same as the GP with inline styles, except it uses data params.

GP is saying that there is next to no benefit to the approach proposed in this project compared to just using [the ugly and terrible] inline CSS.

      <div class="bar-chart">
          <ul class="container">
              <li data-cp-size="99">99%</li>
              <li data-cp-size="50">50%</li>
              <li data-cp-size="30">30%</li>
              <li data-cp-size="90">90%</li>
              <li data-cp-size="10">10%</li>
              <li data-cp-size="70">70%</li>
              <li data-cp-size="30">30%</li>
              <li data-cp-size="90">90%</li>
          </ul>
      </div>


It's not worse to put inline style on a tag, than bruteforcing all the possibilities in a css.

At least with inline style you can have the precision you want and are not forced to round your value.

Sooo, yeah it's an interesting exercise but I'm not convinced about the usefulness of that project.


I think for graphing, its far better then whatever this library is doing.


Wow, I guess this is what would have happened online during World War II if it happened in modern times. Interesting historic landmark as far as information dissemination during confrontations/wars.


relevant: https://twitter.com/RealTimeWWII "@RealTimeWWII is a Twitter feed describing the events of World War II, created by British historian and Oxford grad Alwyn Collinson(...)."


This is pretty cool. It'd be interesting to have a personal service set up around this such that it starts sending messages just to you with "news" updates. I briefly looked at these tweets, but since I didn't follow @RealTimeWWII when it first started, I cannot get the full effect.

More broadly, I'd love to see the original coverage for a few historical events. My most recent curiosity is the Watergate scandal. What was on TV at the time? What were people saying? I know what the scandal "was" but I don't know how people reacted to it. I was I could in some fashion reproduce it at the time and see what was going on.


History as a Service. Scheduled notifications about historical events relayed in "virtual real time" from a start date of your choosing.

Like a DVR (or Netflix streaming) for history.


Are they basing it on the right dates and wrong year, or is it simply starting from the creating of the page?


According to the Wikipedia page[1], "Collinson [the author] began the feed in late August 2011, to coincide with the start of World War II with the German Invasion of Poland in September 1939. He has tweeted the events of the war as they happened on each date and time exactly 72 years earlier."

[1]: http://en.wikipedia.org/wiki/@RealTimeWWII


They're using the right dates. So today's tweets are for August 1942.


No, it's not at all what happened when the Nazi's advanced in WWII. If you watch the Vice News reports, it seems that the people are ambivalent to who rules over them, they just want the fighting to stop. In contrast, in WWII, the Nazis were not much liked by the occupied peoples.


> it seems that the people are ambivalent to who rules over them

Based on my contacts in Ukrane (4 colleagues), no, they are not ambivalent. They don't want Russia in their country.

Hell, we've had to help one of those 4 re-locate due to the invasion.


While it was a little bloody (mainly through assassinations), there was a sizable faction within Austria that hailed the unification of Germany and Austria. The Reich was cheered by thousands on their celebratory tour through the country in 1938.


Nonsense. Go read a book. When the Nazi's rolled into Austria they were met by cheering crowds.

The similarities between these 2 conflicts is extremely eerie.


For the young dudes like me could you explain why?


http://en.wikipedia.org/wiki/Electronic_data_interchange

For the record the term is still thrown around left and right in enterprise settings.


US Healthcare Insurance industry relies heavily on this for... everything.


Yep. And to a somewhat lesser extent, so does international commerce and logistics. Nearly all major importers of goods (think Wal-Mart for example) and their various suppliers and service providers rely on EDI to exchange commercial documents (purchase orders, commercial invoices, packing lists), file customs entries, track their incoming shipments and inventory, etc etc.

EDI is probably irrelevant and dead in Silicon Valley (unless maybe you work at Oracle). But in healthcare and commerce it's very much alive.


It exists heavily in my industry (retail channel management) but mostly as design specs. Most companies tend to use XML it seems but they still base their feeds off of the old-school spec.



For those of you who confused like I was, this site/app used to be Color Scheme Designer 3 [1]. Same people, new name apparently.

[1] http://colorschemedesigner.com/csd-3.5/


Do you really think the time spend writing a comment is comparable to improving the code? Personally, I can't think of an occasion where that would have been true.


I don't mean this negatively, but in my experience as a high schooler and in college, the programming crowd tended to be lacking in written (communication) skills. This is certainly a huge blanket statement, but for younger programmers today I think the stereotype has at least some truth.


There are some people whose code I'd be terrified to maintain, if their code/comments are anything like their text messages.


Brings up an interesting point about perhaps using natural language processing to determine correctness of a comment. That would be prettty cool.


If you could use NLP to verify the comment, then what would the point of the comment be? Comments are for those aspects of a program that are invisible to the compiler and IDE, the intent.


Maybe my view of NLP is more sci-fi than reality, but I think you're missing what I meant. If you can use NLP to prove that your comment - ie the intent - which IS invisible to the compiler and IDE, then that might be cool. Practical, probably not. But I'd still be very impressed at the implications if this was possible within some error margin.


So in this article, the author says this is not supported on chrome. But in this stack question [1], chrome is clearly using it. Is the only difference the author is discussing that now firefox uses/supports "--" instead of "var-"?

[1] http://stackoverflow.com/questions/18466569/enable-experimen...



CSS variables were recently removed from Chrome: http://stackoverflow.com/a/23518831/349353


I see, thanks for pointing that out.


You've got some browser height compatibility issues [1, 2]. (I'm on Chrome on a macbook.)

[1] http://cdn.imghack.se/images/c226811e44f418ab538c336f156d1b3...

[2] http://cdn.imghack.se/images/db6a53b635f7d471f747117aada7f2f...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: