Re: [Development] Notes on QtCore session @ QCS2016

2016-09-16 Thread Matthew Woehlke
On 2016-09-05 20:02, Thiago Macieira wrote:
> Em segunda-feira, 5 de setembro de 2016, às 19:00:40 PDT, Giuseppe D'Angelo 
> escreveu:
>> Il 02/09/2016 17:01, Thiago Macieira ha scritto:
>>> https://wiki.qt.io/QtCS2016_QtCore
>>>
>>> * Deprecation of APIs
>>>
>>> * qrand/qsrand -> replacement is Standard Library or your own
>>
>> Unfortunately there's no replacement for a thread safe, easy to use,
>> deterministic, low quality random number generator. std::rand is not
>> thread safe and the whole random API is not exactly user friendly...

  class RandomSource
  {
...
double operator()()
{
  m_seed = ((19073486328125 * m_seed) + 1) & 0x7fff;
  return ldexp(static_cast(m_seed), -63);
}
  }

  auto r = RandomSource{}; // or construct with a known initial seed
  auto first_random_value = r();
  auto next_random_value = r();

Class boilerplate omitted. A thread-local instance of this would give
you thread safety, or depending on how you need to use it, you can just
instantiate your own instance. Producing a "good" initial seed is more
complicated, but for determinism obviously you will supply a known
initial seed.

FTR, I wrote this *after* C++11  came out. It's faster¹ than
C++11 , has "pretty good" randomness characteristics, and is
much, much easier to use. Having this or similar in Qt (with a suitable
means of initial seeding) could indeed be still useful.

(¹ IIRC... at least compared to the libstdc++ implementation at the
time, although it's hard to imagine how it could possibly be *slower*
given how trivial the code is.)

> You're right the std:: API is not user-friendly. In fact, it's plainly user-
> hostile, requiring multiple template arguments, creating objects that should 
> only be used with auto, and has a major problem with properly seeding the 
> entropy in certain scenarios. Still, the conclusion of the discussion is that 
> we don't to write a wrapper API. We should get the high-quality generator and 
> that should suffice for everyone.

I will never, *ever* replace the PRNG shown with a high quality
generator. The use case for which I wrote this - computer VFX, basically
(think 'video games') - specifically needs a LOT of random numbers.
Speed is critical, and the algorithm shown is essentially the fastest
possible algorithm short of a LUT. A high quality (read: slow) algorithm
would be completely unacceptable for my use case (though possibly useful
for initial seeding).

I'm not sure I'd use a high quality (slow) generator even for something
like game AI. Using it for procedural content generation is out of the
question.

-- 
Matthew

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Help! configure won't configure on Windows

2016-09-16 Thread Thiago Macieira
On quinta-feira, 15 de setembro de 2016 23:34:48 PDT Thiago Macieira wrote:
> On sexta-feira, 16 de setembro de 2016 04:37:49 PDT Maurice Kalinowski 
wrote:
> > Quoting from another mail (haven't verified myself but rather reverted the
> > patch Thiago mentioned locally):
> > 
> > "Change https://codereview.qt-project.org/#/c/168922/ is required.
> > Unfortunately it's not yet in, apparently partly due to the gerrit
> > troubles."
> 
> Looks like it landed now.
> 
> The change says:
> Patch Set 1
> Patch Set 2
> Patch Set 537

Ah, I see what you mean by Gerrit troubles. The change is marked as merged 22 
hours ago, but it isn't in the 5.8 branch.

If you update today, you'll need to revert three commits, not just one:

a668c6a Convert the old feature system
b754b28 rename description => label in configure.json
2d3c73f Modularize configure.json/.pri


-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] linuxdeployqt

2016-09-16 Thread probono
Hi all,

I have been working on a deployment tool for Linux, linuxdeployqt,
which I eventually would like to see merged into qttools.git.

linuxdeployqt takes an application and makes it self-contained by
copying in the Qt libraries and plugins that the application uses into
a bundle. While based on macdeployqt it uses an equivalent logic but
other tools.

https://github.com/probonopd/linuxdeployqt/

Known issues: See GitHub Issues. Use with care, run with maximum
verbosity. Watch out for FIXMEs in the code.

This is stil very young, but I'd appreciate your testing, comments,
and (ideally) code review.

Regards,
Simon
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Notes on "Qt Build Systems" @ QtCon 2016

2016-09-16 Thread Stephen Kelly via Development



On 16/09/16 03:07, Christian Kandeler wrote:

Stephen Kelly wrote:


My previous guess about Qbs being able to generate unknown files in a
particular location and then determine them by an 'ls' equivalent, moc
them and compile everything is not something Qbs would be able to do.

I'm having trouble parsing this, but if you mean that your previous guess was wrong, then 
I can tell you it was not; that's exactly what we do for "blackbox tools".


It is probably less confusing for you in the context of the previous 
email I wrote (you didn't respond to that one - I started with "There is 
no input file. There is only an input number."). Feel free to go back to 
read that one and hopefully respond to it.



I'm still interested in a Qbs solution to the code/repo I posted before.
A full and preferably working Qbs solution, instead of a snippet, would
be good for comparison.

That's more than I'm willing to invest during my vacation, but I might come 
back to you later there.


Great, thanks!

--
Ableton AG, Schoenhauser Allee 6-7, 10119 Berlin, Germany
Management Board: Gerhard Behles, Jan Bohl
Chair of the Supervisory Board: Uwe Struck
Registered Office: Berlin, Amtsgericht Berlin-Charlottenburg, HRB 72838

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Nominating Paolo Angelelli for Approver status

2016-09-16 Thread Alexander Blasche
Congratulations to Paolo.

The permissions have been adjusted.

--
Alex


From: Development  
on behalf of Alexander Blasche 
Sent: Friday, 26 August 2016 10:17:12 AM
To: development@qt-project.org
Subject: [Development]  Nominating Paolo Angelelli for Approver status

Hi,

I'd like to nominate Paolo Angelelli for Approver status. He joined The Qt 
Company at the end of 2015, and has been working full time on Qt since. Paolo 
has been actively involved fixing and improving QtPositioning and QtLocation.

--
Alex
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Help! configure won't configure on Windows

2016-09-16 Thread Thiago Macieira
On sexta-feira, 16 de setembro de 2016 04:37:49 PDT Maurice Kalinowski wrote:
> Quoting from another mail (haven't verified myself but rather reverted the
> patch Thiago mentioned locally):
> 
> "Change https://codereview.qt-project.org/#/c/168922/ is required.
> Unfortunately it's not yet in, apparently partly due to the gerrit
> troubles."

Looks like it landed now.

The change says:
Patch Set 1
Patch Set 2
Patch Set 537
:-)

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development