Re: 4.7.8 planning

2018-04-04 Thread Dirk Hohndel
Thanks to everyone working on the translations.

You all have no idea how much this means to me.
And how much the users love the fact that we support so many different 
languages.

Assuming things stay sane at work tomorrow, I'll try to cut 4.7.8

Those helping with maintaining things on GitHub - please be VERY thoughtful
with what you merge in the next few hours :-)

/D

> On Apr 4, 2018, at 9:40 PM, Benjamin  wrote:
> 
> Hebrew is done.
> 
> On 3 April 2018 at 17:18, Chirana Gheorghita Eugeniu Theodor 
> > wrote:
> Romanian done also
> 
> On Tue, Apr 3, 2018 at 1:28 PM, Davide DB  > wrote:
> On 3 April 2018 at 10:38, Guillaume Gardet  > wrote:
> >
> >
> > Le 02/04/2018 à 18:25, Dirk Hohndel a écrit :
> >>
> >> In order to keep my promise of reasonably regular releases, I guess we
> >> should start thinking about 4.7.8.
> >>
> >> I just pushed the latest strings to Transifex (there don't appear to be
> >> all that many). I'll pull translations later this week. Unless I hear
> >> reasons not to do so, I'd do a new release later this week...
> >
> 
> Italian done
> 
> --
> Davide
> https://vimeo.com/bocio/videos 
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org 
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface 
> 
> 
> 
> 
> -- 
> 
> Cu stima/Best regards/Mit freundlichen Grüßen,
> 
> Chirana-Gheorghita Eugeniu-Theodor
> Bucharest, Romania
> 
> e-mail : off...@adaptcom.ro 
> mobile: 0743 698721
> 0747 447675
> SSI diver ID: 1118289
> 
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org 
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface 
> 
> 
> 
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Cloud server

2018-04-04 Thread Benjamin
I'm heading down to the Red Sea today to work on that. It's been a dry 3
weeks at work and I feel that I need a break.

On 5 April 2018 at 07:35, Dirk Hohndel  wrote:

>
> > On Apr 4, 2018, at 9:20 PM, Benjamin  wrote:
> >
> > This is a hint that we're not generating enough log files because we are
> not diving enough? :)
>
> Definitely. I haven't been diving since last October. Ridiculous. I plan
> to fix this on Sunday.
>
> With Linus' help I was able to reduce the memory footprint of the git
> repos a bit. At this point we have cloud storage for over 5000 dive logs in
> about 5GB. And enough space for about another 40 thousand users.
> And best of all, this is on a VM that's new enough that the attached
> storage is elastic and can be expanded within reason, so even if we fill
> that space we can easily double or quadruple it.
>
> /D
>
>
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: 4.7.8 planning

2018-04-04 Thread Benjamin
Hebrew is done.

On 3 April 2018 at 17:18, Chirana Gheorghita Eugeniu Theodor <
off...@adaptcom.ro> wrote:

> Romanian done also
>
> On Tue, Apr 3, 2018 at 1:28 PM, Davide DB  wrote:
>
>> On 3 April 2018 at 10:38, Guillaume Gardet 
>> wrote:
>> >
>> >
>> > Le 02/04/2018 à 18:25, Dirk Hohndel a écrit :
>> >>
>> >> In order to keep my promise of reasonably regular releases, I guess we
>> >> should start thinking about 4.7.8.
>> >>
>> >> I just pushed the latest strings to Transifex (there don't appear to be
>> >> all that many). I'll pull translations later this week. Unless I hear
>> >> reasons not to do so, I'd do a new release later this week...
>> >
>>
>> Italian done
>>
>> --
>> Davide
>> https://vimeo.com/bocio/videos
>> ___
>> subsurface mailing list
>> subsurface@subsurface-divelog.org
>> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>>
>
>
>
> --
> 
> Cu stima/Best regards/Mit freundlichen Grüßen,
>
> Chirana-Gheorghita Eugeniu-Theodor
> Bucharest, Romania
>
> e-mail : off...@adaptcom.ro
> mobile: 0743 698721
> 0747 447675
> SSI diver ID: 1118289
>
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
>
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Cloud server

2018-04-04 Thread Benjamin
This is a hint that we're not generating enough log files because we are
not diving enough? :)

On 5 April 2018 at 06:28, Thiago Macieira  wrote:

> On Sunday, 1 April 2018 11:55:34 PDT Dirk Hohndel wrote:
> > I know added another 30GB of storage, hopefully that will last for a
> while
>
> "30 GB will be enough for everyone" ?
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>Software Architect - Intel Open Source Technology Center
>
>
>
> ___
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Cloud server

2018-04-04 Thread Thiago Macieira
On Sunday, 1 April 2018 11:55:34 PDT Dirk Hohndel wrote:
> I know added another 30GB of storage, hopefully that will last for a while 

"30 GB will be enough for everyone" ?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center



___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Formatting Dive tags string

2018-04-04 Thread Thiago Macieira
On Wednesday, 4 April 2018 02:55:22 PDT Berthold Stoeger wrote:
>   char *s = taglist_get_tagstring(...);
>   QString tags(s);
>   free(s);

One minor note: this decodes the string as UTF-8. If your string is Latin1 or 
plain US-ASCII, you should use QString::fromLatin1 or QLatin1String (same 
thing in this context).

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center



___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Formatting Dive tags string

2018-04-04 Thread Jérémie Guichard
Here is the pull request :)
https://github.com/Subsurface-divelog/subsurface/pull/1187

2018-04-04 14:35 GMT+02:00 Lubomir I. Ivanov :

> On 4 April 2018 at 14:27, Lubomir I. Ivanov  wrote:
> > On 4 April 2018 at 12:36, Jérémie Guichard  wrote:
> >> Hello everybody,
> >>
> >> While reviewing this change adding display for Tags in dive list view
> >> (https://github.com/Subsurface-divelog/subsurface/pull/1184), Lubomir
> and
> >> Dirk raised a concern regarding tag text that can exceed inputted buffer
> >> size. Issue comes from implementation/signature of taglist_get_tagstring
> >> function
> >> https://github.com/Subsurface-divelog/subsurface/blob/
> master/core/dive.c#L3023
> >> Certainly no current user has been using enough tags to actually
> encounter
> >> problems with this but who knows...
> >>
> >> Staring from their input and doing some code digging, here is a short
> >> overview of my findings and proposals.
> >>
> >> taglist_get_tagstring function currently prints as many full tags as
> could
> >> be fitted in the inputted buffer and returns the length of the printed
> >> string. This approach raise several issues when it comes to long tag
> lists:
> >>  a) It is not possible to know from the returned information if all tags
> >> were actually printed.
> >>  b) When a user would (in the UI) add a long tag list, the full tag
> list is
> >> (at first) indeed saved. Then, only text returned by
> taglist_get_tagstring
> >> gets displayed. This causes later edits of the tags to delete tags that
> were
> >> not displayed, not good...
> >>  c) Looking at DiveObjectHelper class the function is used with 256
> buffer
> >> size so issue would become more visible if DiveObjectHelper::tags was
> >> actually used. It seems this method is not used yet (neither in Desktop
> nor
> >> in Mobile app) but I may be wrong, please point me to its usage if you
> know
> >> one...
> >>
> >> Lubomir mentioned he could look into this 'issue' but did not have much
> free
> >> time, since I do have some on my side I can look into this change. I do
> >> prefer to consult the community before doing it though. Here are the
> >> different solutions that came to my mind:
> >>
> >>  1) Add a output parameter to last printed struct tag_entry* in the
> list to
> >> the current taglist_get_tagstring allowing callers to iterate when
> needed
> >> (not my favorite)
> >>  2) It seems strange for a UI specific function to be part of dive.h/.c
> I
> >> would rather move this functionality to 'Qt level' say in qthelper.h/.c
> (or
> >> other better location if one of you have a better proposal) and
> implement it
> >> using QStrings (avoiding the pre-allocated buffer issue). This is
> already
> >> what is done for get_gas_string for example. It is my preferred proposal
> >> since all usage I could find of taglist_get_tagstring are in Qt code and
> >> this function is purely UI related code...
> >>
> >> I do have other topics to discuss with you guys but I'll send separate
> >> emails not to mix things up.
> >>
> >
> > the function is kind of part of the C backend and we probably should
> > write it in C.
> > posted some comments in the issue thread at github about `
> > taglist_get_tagstring` as i saw this ML thread just now.
> >
>
> copy paste from here:
> https://github.com/Subsurface-divelog/subsurface/pull/1184#
> issuecomment-378566518
>
> the approach for taglist_get_tagstring() would be:
>
> - make taglist_get_tagstring() accept a single argument (only the
> list, without buffer ptr and size)
> - go through the tags and calculate required size to malloc() (also
> consider ', ')
> - malloc() a char * buffer once
> - go through the tags again and copy the tags over the buffer while adding
> ', '
> - make taglist_get_tagstring() return NULL / buffer instead of int.
> - use this buffer to create QString by the callers of
> taglist_get_tagstring() and free this buffer too:
>
> (as Berthold already pointed out)
>
> char *str_list = taglist_get_tagstring(some_tag_list);
> QSting ret(str_list);
> free(str_list);
> return ret;
>
> lubomir
> --
>
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Formatting Dive tags string

2018-04-04 Thread Lubomir I. Ivanov
On 4 April 2018 at 14:27, Lubomir I. Ivanov  wrote:
> On 4 April 2018 at 12:36, Jérémie Guichard  wrote:
>> Hello everybody,
>>
>> While reviewing this change adding display for Tags in dive list view
>> (https://github.com/Subsurface-divelog/subsurface/pull/1184), Lubomir and
>> Dirk raised a concern regarding tag text that can exceed inputted buffer
>> size. Issue comes from implementation/signature of taglist_get_tagstring
>> function
>> https://github.com/Subsurface-divelog/subsurface/blob/master/core/dive.c#L3023
>> Certainly no current user has been using enough tags to actually encounter
>> problems with this but who knows...
>>
>> Staring from their input and doing some code digging, here is a short
>> overview of my findings and proposals.
>>
>> taglist_get_tagstring function currently prints as many full tags as could
>> be fitted in the inputted buffer and returns the length of the printed
>> string. This approach raise several issues when it comes to long tag lists:
>>  a) It is not possible to know from the returned information if all tags
>> were actually printed.
>>  b) When a user would (in the UI) add a long tag list, the full tag list is
>> (at first) indeed saved. Then, only text returned by taglist_get_tagstring
>> gets displayed. This causes later edits of the tags to delete tags that were
>> not displayed, not good...
>>  c) Looking at DiveObjectHelper class the function is used with 256 buffer
>> size so issue would become more visible if DiveObjectHelper::tags was
>> actually used. It seems this method is not used yet (neither in Desktop nor
>> in Mobile app) but I may be wrong, please point me to its usage if you know
>> one...
>>
>> Lubomir mentioned he could look into this 'issue' but did not have much free
>> time, since I do have some on my side I can look into this change. I do
>> prefer to consult the community before doing it though. Here are the
>> different solutions that came to my mind:
>>
>>  1) Add a output parameter to last printed struct tag_entry* in the list to
>> the current taglist_get_tagstring allowing callers to iterate when needed
>> (not my favorite)
>>  2) It seems strange for a UI specific function to be part of dive.h/.c I
>> would rather move this functionality to 'Qt level' say in qthelper.h/.c (or
>> other better location if one of you have a better proposal) and implement it
>> using QStrings (avoiding the pre-allocated buffer issue). This is already
>> what is done for get_gas_string for example. It is my preferred proposal
>> since all usage I could find of taglist_get_tagstring are in Qt code and
>> this function is purely UI related code...
>>
>> I do have other topics to discuss with you guys but I'll send separate
>> emails not to mix things up.
>>
>
> the function is kind of part of the C backend and we probably should
> write it in C.
> posted some comments in the issue thread at github about `
> taglist_get_tagstring` as i saw this ML thread just now.
>

copy paste from here:
https://github.com/Subsurface-divelog/subsurface/pull/1184#issuecomment-378566518

the approach for taglist_get_tagstring() would be:

- make taglist_get_tagstring() accept a single argument (only the
list, without buffer ptr and size)
- go through the tags and calculate required size to malloc() (also
consider ', ')
- malloc() a char * buffer once
- go through the tags again and copy the tags over the buffer while adding ', '
- make taglist_get_tagstring() return NULL / buffer instead of int.
- use this buffer to create QString by the callers of
taglist_get_tagstring() and free this buffer too:

(as Berthold already pointed out)

char *str_list = taglist_get_tagstring(some_tag_list);
QSting ret(str_list);
free(str_list);
return ret;

lubomir
--
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Formatting Dive tags string

2018-04-04 Thread Lubomir I. Ivanov
On 4 April 2018 at 12:36, Jérémie Guichard  wrote:
> Hello everybody,
>
> While reviewing this change adding display for Tags in dive list view
> (https://github.com/Subsurface-divelog/subsurface/pull/1184), Lubomir and
> Dirk raised a concern regarding tag text that can exceed inputted buffer
> size. Issue comes from implementation/signature of taglist_get_tagstring
> function
> https://github.com/Subsurface-divelog/subsurface/blob/master/core/dive.c#L3023
> Certainly no current user has been using enough tags to actually encounter
> problems with this but who knows...
>
> Staring from their input and doing some code digging, here is a short
> overview of my findings and proposals.
>
> taglist_get_tagstring function currently prints as many full tags as could
> be fitted in the inputted buffer and returns the length of the printed
> string. This approach raise several issues when it comes to long tag lists:
>  a) It is not possible to know from the returned information if all tags
> were actually printed.
>  b) When a user would (in the UI) add a long tag list, the full tag list is
> (at first) indeed saved. Then, only text returned by taglist_get_tagstring
> gets displayed. This causes later edits of the tags to delete tags that were
> not displayed, not good...
>  c) Looking at DiveObjectHelper class the function is used with 256 buffer
> size so issue would become more visible if DiveObjectHelper::tags was
> actually used. It seems this method is not used yet (neither in Desktop nor
> in Mobile app) but I may be wrong, please point me to its usage if you know
> one...
>
> Lubomir mentioned he could look into this 'issue' but did not have much free
> time, since I do have some on my side I can look into this change. I do
> prefer to consult the community before doing it though. Here are the
> different solutions that came to my mind:
>
>  1) Add a output parameter to last printed struct tag_entry* in the list to
> the current taglist_get_tagstring allowing callers to iterate when needed
> (not my favorite)
>  2) It seems strange for a UI specific function to be part of dive.h/.c I
> would rather move this functionality to 'Qt level' say in qthelper.h/.c (or
> other better location if one of you have a better proposal) and implement it
> using QStrings (avoiding the pre-allocated buffer issue). This is already
> what is done for get_gas_string for example. It is my preferred proposal
> since all usage I could find of taglist_get_tagstring are in Qt code and
> this function is purely UI related code...
>
> I do have other topics to discuss with you guys but I'll send separate
> emails not to mix things up.
>

the function is kind of part of the C backend and we probably should
write it in C.
posted some comments in the issue thread at github about `
taglist_get_tagstring` as i saw this ML thread just now.

at some point we wanted to be able to turn the Subsurface core into a
standalone library that can do parsing, planning calculate profiles
etc.
but then we started introducing Qt C++ "helpers" and the idea kind of
went away as we now depend on Qt for the core module.

lubomir
--
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Formatting Dive tags string

2018-04-04 Thread Berthold Stoeger
Hi Jérémie,

On Mittwoch, 4. April 2018 11:36:18 CEST Jérémie Guichard wrote:
> 
> Lubomir mentioned he could look into this 'issue' but did not have much
> free time, since I do have some on my side I can look into this change. I
> do prefer to consult the community before doing it though. Here are the
> different solutions that came to my mind:
> 
>  1) Add a output parameter to last printed struct tag_entry* in the list to
> the current taglist_get_tagstring allowing callers to iterate when needed
> (not my favorite)
>  2) It seems strange for a UI specific function to be part of dive.h/.c I
> would rather move this functionality to 'Qt level' say in qthelper.h/.c (or
> other better location if one of you have a better proposal) and implement
> it using QStrings (avoiding the pre-allocated buffer issue). This is
> already what is done for get_gas_string for example. It is my preferred
> proposal since all usage I could find of taglist_get_tagstring are in Qt
> code and this function is purely UI related code...

The backend people prefer not to move too much functionality to C++. So you 
will probably have less convincing to do if you construct the string with 
"membuffer" and return a "char *" that is freed by the caller:

  char *s = taglist_get_tagstring(...);
  QString tags(s);
  free(s);

If there are more such instances, we could think about a helper function:

QString QStringFromC(char *c)
{
  QString res(c);
  free(c);
  return res;
}

Berthold

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Formatting Dive tags string

2018-04-04 Thread Jérémie Guichard
Hello everybody,

While reviewing this change adding display for Tags in dive list view (
https://github.com/Subsurface-divelog/subsurface/pull/1184), Lubomir and
Dirk raised a concern regarding tag text that can exceed inputted buffer
size. Issue comes from implementation/signature of taglist_get_tagstring
function
https://github.com/Subsurface-divelog/subsurface/blob/master/core/dive.c#L3023
Certainly no current user has been using enough tags to actually encounter
problems with this but who knows...

Staring from their input and doing some code digging, here is a short
overview of my findings and proposals.

taglist_get_tagstring function currently prints as many full tags as could
be fitted in the inputted buffer and returns the length of the printed
string. This approach raise several issues when it comes to long tag lists:
 a) It is not possible to know from the returned information if all tags
were actually printed.
 b) When a user would (in the UI) add a long tag list, the full tag list is
(at first) indeed saved. Then, only text returned by taglist_get_tagstring gets
displayed. This causes later edits of the tags to delete tags that were not
displayed, not good...
 c) Looking at DiveObjectHelper class the function is used with 256 buffer
size so issue would become more visible if DiveObjectHelper::tags was
actually used. It seems this method is not used yet (neither in Desktop nor
in Mobile app) but I may be wrong, please point me to its usage if you know
one...

Lubomir mentioned he could look into this 'issue' but did not have much
free time, since I do have some on my side I can look into this change. I
do prefer to consult the community before doing it though. Here are the
different solutions that came to my mind:

 1) Add a output parameter to last printed struct tag_entry* in the list to
the current taglist_get_tagstring allowing callers to iterate when needed
(not my favorite)
 2) It seems strange for a UI specific function to be part of dive.h/.c I
would rather move this functionality to 'Qt level' say in qthelper.h/.c (or
other better location if one of you have a better proposal) and implement
it using QStrings (avoiding the pre-allocated buffer issue). This is
already what is done for get_gas_string for example. It is my preferred
proposal since all usage I could find of taglist_get_tagstring are in Qt
code and this function is purely UI related code...

I do have other topics to discuss with you guys but I'll send separate
emails not to mix things up.

Cheers,

Jeremie
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: Fwd: Thank You Note

2018-04-04 Thread alister.ware

On 03/04/18 21:58, Dirk Hohndel wrote:




Begin forwarded message:

*From: *"Eben Brown" >
*Subject: **Thank You Note*
*Date: *April 3, 2018 at 1:57:18 PM PDT
*To: *"'Dirk Hohndel'" >

Dear Subsurface and Subsurface Developers,
  I want to write and say thank you for your wonderful software. I 
found Subsurface after an automatic upgrade rendered my Suunto 
desktop software incompatible with my ZOOP dive computer. I sent the 
ZOOP to Suunto and they said it worked fine with their latest new 
cable. Hmm... That cable has a little circuit box on it which I 
figure is their $100 key to working with the latest version of their 
Desktop software.
  Long story short, I downloaded your SubSurface software to my 
tablet and now my original ZOOP cable connects to your software with 
no problems at all. Subsurface is FAR more powerful than the ZOOP 
desktop software. Thank you again for letting me use SubSurface.

Sincerely,
Eben A. Brown
E. Arthur Brown Company, Inc
4088 County Road 40 NW, Garfield, MN 56332
sa...@eabco.com , ph. 320-834-3000



___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


I hope Eben sent a copy of this to Suunto as well

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface