Hacker News new | past | comments | ask | show | jobs | submit login
Qt 5.2 Beta Available (digia.com)
69 points by Tsiolkovsky on Oct 23, 2013 | hide | past | favorite | 17 comments



Can someone clarify on the QT dual license model? Can you make a commercial closed source application that links with the QT libraries?


Yes, and in two ways as far as I understand:

1) you use the LGPG license. Then you can keep your application closed source / proprietary as long as you link with the Qt libraries dynamically and provide your changes (if any) to the Qt libraries only;

2) you use the commercial license. Then you can keep everything closed if you want (and the requirement to link dynamically disappear).


Are you sure that commercial license allows you to make and release modifications to Qt without releasing the source?


Yes. What you cannot do (without getting a commercial license) is make changes to Qt, without making those changes open source. So as long as you don't need to make a modified version of Qt for your app, you don't have to release anything.


This is a common LGPL misconception frequently seen.

IANAL, but even if you make a modified version of Qt and release it, you are still free to use that same modified version in your app without releasing it as open source, as long as you are using dynamic linking instead of static. But, the same restriction also apply to original Qt.

Btw, what you can't do is using modified version of Qt without releasing the source of your Qt modification upon request.


Just checking to make sure I understand right. The only piece you are adding is that the modified version needs to be released "upon request." Dagw also mentioned that Qt changes need to be open sourced to release an application using those modifications.


Wow, they somehow managed to write a new JS engine replacing V8 which not only is ECMAScript 5.1 compliant but also has a working JIT, that too on iOS! I am curious to find out how they do JIT on iOS given the restrictions Apple puts on executing JITed code in AppStore apps.


The plan is to use to the interpreter while on iOS and the JIT while on platforms that allow it.

So, no they don't have a JIT on iOS.

The sand boxing on iOS does not allow for the low level dynamic code generation needed by JITs to operate.

This approach is very similar to LuaJit. Crazy fast JIT on the desktop, and a seperate interpreted mode for more restricted platforms.


Oh, thanks for the correction! (I just re-read the release notes and you're of course right - the issue with V8 was that it didn't do interpreting. The new one they wrote does as you wrote - JITs on supported platforms, interpreter on everything else.)


Your answer may be correct with regards to the specific situation. I just want to mention that, as far I know, the output of a JIT compiler does not have to me machine (native) code. A JIT compiler is just an algorithm that transforms some well defined input to a different representation that is better suited for the current situation (hardware). The main "feature" of a JIT compiler is that this transformation is done while the app is running.

So the Qt people could have written a JIT for iOS. The only thing that can't be done on iOS is to write a JIT that transforms the input to native code and execute it. But this is only one of many use cases of JIT compilers.


I had not heard of JIT compilers that don't actually create code native to the CPU and don't execute it directly on the CPU. My understanding is that in absence of generating and executing native code directly on the CPU - the JIT would be a regular interpreter. Wikipedia seems to agree with me on this FWIW :) Out of curiosity - do you have any examples of JIT use cases that differ from "compile to native code and execute just in time, directly on the CPU"?


http://realjenius.com/2009/10/06/distilling-jruby-the-jit-co...

Quote: "JIT compilers are a novel idea: take some code in an “intermediate form”, and, given some heuristics, compile it into a “more native” representation,"

Note: They write "more native" representation.

Quote: "Conversely, in JRuby, the source format is the JRuby AST, and the destination format is Java bytecode. Perhaps the most fascinating aspect of the JRuby JIT compiler is that it benefits from both the initial compilation into Java bytecode, and then later, when Java may attempt to translate the JRuby-generated bytecode into native machine instructions."

So the JRuby guys have a multi-staged JIT:

JRuby AST => Java Bytecode => native

Depending on how the program is executed at runtime some parts of it will stay in JRuby AST, more interesting parts of the code will be transformed to Java Bytecode and the Hotspots may end up as native code.


At this point it is just a definition question:

- A compiler takes some input, does some specific stuff to it (like lexical analysis and parsing), and writes some output ("code generation")

- An interpreter takes some input, does some specific stuff to it (like lexical analysis and parsing) and executes it

- A JIT compiler is a compiler, like above, but it does its thing on the fly, as you go. This means it has to tie into the execution model on some level, to know which parts of the program need translation.

A component that takes a program and executes it could correctly be described as an interpreter, but it might also be correctly separated into a JIT compiler (that spits out an intermediate representation) and an interpreter (for the intermediate representation, not the original source).

I have no example of such a beast, but it is concievable, no? :)


A JIT compiler is a bit more. When the program is executed the JIT may decide to just interpret the code of a function and not compile it at all. It can selectively transform parts of the code to a better representation. Code that is executed frequently may be compiled by the JIT into a more suitable representation. There are also multi-staged JITs (JRuby - see my other comment).


The big question is: does it compile under OSX 10.9 (Mavericks)?


The big answer is: no.


How I want this (https://github.com/niemeyer/qml) to pick up. GoLang + QT would be an awesome combo to write desktop and mobile apps.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

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

Search: