Re: we broke Uemis import somewhere...

2014-01-03 Thread Dirk Hohndel
On Fri, 2014-01-03 at 14:56 -0800, Dirk Hohndel wrote: > On Fri, 2014-01-03 at 13:34 -0800, Linus Torvalds wrote: > > On Fri, Jan 3, 2014 at 1:20 PM, Dirk Hohndel wrote: > > > > > > I need to build old versions of Subsurface to find one that still works > > > so I can get a correct download... > >

Re: we broke Uemis import somewhere...

2014-01-03 Thread Dirk Hohndel
On Fri, 2014-01-03 at 13:34 -0800, Linus Torvalds wrote: > On Fri, Jan 3, 2014 at 1:20 PM, Dirk Hohndel wrote: > > > > I need to build old versions of Subsurface to find one that still works > > so I can get a correct download... > > Hmm. My last Uemis download was last June. And that was with th

Re: we broke Uemis import somewhere...

2014-01-03 Thread Linus Torvalds
On Fri, Jan 3, 2014 at 1:20 PM, Dirk Hohndel wrote: > > I need to build old versions of Subsurface to find one that still works > so I can get a correct download... Hmm. My last Uemis download was last June. And that was with the gtk version, because back then the Uemis code wasn't hooked up at a

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Thiago Macieira
On sexta-feira, 3 de janeiro de 2014 23:18:35, Lubomir I. Ivanov wrote: > TMK, the situation on OSX is a bit "complicated" and i would suggest > against C++11, for the time being. That may be. Let me do a bit of investigation when I'm back in Portland and I'll post my conclusions. -- Thiago Mac

Re: we broke Uemis import somewhere...

2014-01-03 Thread Dirk Hohndel
On Fri, 2014-01-03 at 13:14 -0800, Linus Torvalds wrote: > On Fri, Jan 3, 2014 at 1:06 PM, Benjamin wrote: > > > > Diving in hot springs? Dive computer left in the kettle by mistake? > > I wish. My last dive at Yellow House was 8°C water. Yeah, pretty much, IIRC we in reality had 9°C at the surf

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Lubomir I. Ivanov
On 3 January 2014 22:41, Thiago Macieira wrote: > On sexta-feira, 3 de janeiro de 2014 11:37:01, Dirk Hohndel wrote: >> So are we going to switch to C++11? I'm open to it. >> >> Thiago, are you sending patches? > > I need to investigate a bit more what might break. Especially on Mac, there > are s

Re: we broke Uemis import somewhere...

2014-01-03 Thread Linus Torvalds
On Fri, Jan 3, 2014 at 1:06 PM, Benjamin wrote: > > Diving in hot springs? Dive computer left in the kettle by mistake? I wish. My last dive at Yellow House was 8°C water. But maybe it's global warming. Run for the hills. Linus ___ subsu

Re: [PATCH 2/2] Maintab: prevent a segfault in the 'Equipment' tab

2014-01-03 Thread Dirk Hohndel
On Fri, 2014-01-03 at 23:11 +0200, Lubomir I. Ivanov wrote: > On 3 January 2014 14:49, Lubomir I. Ivanov wrote: > > From: "Lubomir I. Ivanov" > > > > When a dive contains no cylinders, clicking the '+' > > button could SIGSEGV if current_dive->dc.model is NULL. > > > > Signed-off-by: Lubomir I. I

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Dirk Hohndel
On Fri, 2014-01-03 at 18:41 -0200, Thiago Macieira wrote: > On sexta-feira, 3 de janeiro de 2014 11:37:01, Dirk Hohndel wrote: > > So are we going to switch to C++11? I'm open to it. > > > > Thiago, are you sending patches? > > I need to investigate a bit more what might break. Especially on Mac,

Re: [PATCH 2/2] Maintab: prevent a segfault in the 'Equipment' tab

2014-01-03 Thread Lubomir I. Ivanov
On 3 January 2014 14:49, Lubomir I. Ivanov wrote: > From: "Lubomir I. Ivanov" > > When a dive contains no cylinders, clicking the '+' > button could SIGSEGV if current_dive->dc.model is NULL. > > Signed-off-by: Lubomir I. Ivanov > --- > > newEditMode=MainTab::NONE) at qt-ui/maintab.cpp:225 >

Re: we broke Uemis import somewhere...

2014-01-03 Thread Benjamin
Diving in hot springs? Dive computer left in the kettle by mistake? On 3 January 2014 22:35, Dirk Hohndel wrote: > Haven't bisected this, yet, but I'm rather suspicious of these data: > > > > /D > > ___ > subsurface mailing list > subsurface@hohndel.

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Thiago Macieira
On sexta-feira, 3 de janeiro de 2014 11:37:01, Dirk Hohndel wrote: > So are we going to switch to C++11? I'm open to it. > > Thiago, are you sending patches? I need to investigate a bit more what might break. Especially on Mac, there are some considerations due to the way that GCC and Clang are

we broke Uemis import somewhere...

2014-01-03 Thread Dirk Hohndel
Haven't bisected this, yet, but I'm rather suspicious of these data: /D <>___ subsurface mailing list subsurface@hohndel.org http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Thiago Macieira
On sexta-feira, 3 de janeiro de 2014 11:37:01, Dirk Hohndel wrote: > > > Yeah, and that totally destroys the point of using "pressure_t" in the > > > first place (it's there purely for type safety, exactly so that you > > > can *not* use a plain integer by mistake). > > > > > > > > Make the constr

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Tomaz Canabrava
"Broken Hacks". Mentioned, HÁ. *runs* On Fri, Jan 3, 2014 at 5:48 PM, Linus Torvalds < torva...@linux-foundation.org> wrote: > On Fri, Jan 3, 2014 at 11:31 AM, Thiago Macieira > wrote: > > > > Make the constructor explicit by adding the explicit keyword. > > Oh wow. This is classic "No, no, C++

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Linus Torvalds
On Fri, Jan 3, 2014 at 11:31 AM, Thiago Macieira wrote: > > Make the constructor explicit by adding the explicit keyword. Oh wow. This is classic "No, no, C++ is fine, you can add more hacks on top of things". It's crap, I tell you. The C++11 syntax makes sense. Why? Because it's the sane one.

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Thiago Macieira
On sexta-feira, 3 de janeiro de 2014 10:33:43, Thiago Macieira wrote: > On sexta-feira, 3 de janeiro de 2014 10:31:40, Thiago Macieira wrote: > > On quinta-feira, 2 de janeiro de 2014 21:36:01, Linus Torvalds wrote: > > > This seems to fix it from quick testing. I'd love to make the "mbar" > > > be

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Thiago Macieira
On sexta-feira, 3 de janeiro de 2014 09:19:09, Linus Torvalds wrote: > C++11 certainly has some improvements. This is likely the only one > that we'd notice, though. The rest are for things I don't think we'd > care about in subsurface (template improvements, threading memory > models etc). There

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Dirk Hohndel
On Fri, 2014-01-03 at 17:31 -0200, Thiago Macieira wrote: > On sexta-feira, 3 de janeiro de 2014 08:54:32, Linus Torvalds wrote: > > On Fri, Jan 3, 2014 at 4:31 AM, Thiago Macieira wrote: > > > If you want to pass a default argument of type pressure_t, then that > > > struct > > > requires a const

Re: suggested changes to the fake profile

2014-01-03 Thread Dirk Hohndel
On Fri, 2014-01-03 at 11:23 -0800, Linus Torvalds wrote: > On Fri, Jan 3, 2014 at 11:04 AM, Dirk Hohndel wrote: > > > > If no average depth is given we should create standard rectangular > > profile or a rectangular profile with safety stop (assuming the dive was > > long and deep enough for that

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Thiago Macieira
On sexta-feira, 3 de janeiro de 2014 08:54:32, Linus Torvalds wrote: > On Fri, Jan 3, 2014 at 4:31 AM, Thiago Macieira wrote: > > If you want to pass a default argument of type pressure_t, then that > > struct > > requires a constructor for it to work in C++98. > > Yeah, and that totally destroys

Re: [PATCH 1/2] Models: translate the user entered weight units

2014-01-03 Thread Dirk Hohndel
On Fri, 2014-01-03 at 09:51 -0800, Linus Torvalds wrote: > On Fri, Jan 3, 2014 at 9:40 AM, Dirk Hohndel wrote: > > > > side note: I am amused by how much energy we are spending on figuring > > out whether we should correctly parse the local translation of an > > antiquated unit of weight used by r

Re: suggested changes to the fake profile

2014-01-03 Thread Linus Torvalds
On Fri, Jan 3, 2014 at 11:04 AM, Dirk Hohndel wrote: > > If no average depth is given we should create standard rectangular > profile or a rectangular profile with safety stop (assuming the dive was > long and deep enough for that to be reasonable). Try it. It looks ridiculous for a 145ft dive.

Re: suggested changes to the fake profile

2014-01-03 Thread Dirk Hohndel
On Fri, 2014-01-03 at 09:41 -0800, Linus Torvalds wrote: > On Fri, Jan 3, 2014 at 9:27 AM, Dirk Hohndel wrote: > > > > What the WHAT? > > I didn't realize what that meant for people who used to track just max > > depth (as you do with paper logbook and some phone apps). The profiles > > look posit

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Tomaz Canabrava
from a Qt perspective, the hability to connect signals with lambdas is pretty userfull too. On Fri, Jan 3, 2014 at 4:07 PM, Lutz Vieweg wrote: > On 01/03/2014 06:04 PM, Dirk Hohndel wrote: > >> If it makes our code better, I'm all for it. >> > > If nothing else, it at least makes it less probab

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Lutz Vieweg
On 01/03/2014 06:04 PM, Dirk Hohndel wrote: If it makes our code better, I'm all for it. If nothing else, it at least makes it less probable that code is (accidently) added that would be incompatible with contemporary C++. And it's not unlikely 3rd-party code (like Qt) will at some point requi

Re: [PATCH 1/2] Models: translate the user entered weight units

2014-01-03 Thread Lubomir I. Ivanov
On 3 January 2014 19:36, Linus Torvalds wrote: > On Fri, Jan 3, 2014 at 9:08 AM, Dirk Hohndel wrote: >> >>> In particular, remember: if the string is some translation of the >>> standard unit, matching _that_ doesn't even *matter*, because it will >>> be matched by default by simply matching the

Re: [PATCH 1/2] Models: translate the user entered weight units

2014-01-03 Thread Linus Torvalds
On Fri, Jan 3, 2014 at 9:40 AM, Dirk Hohndel wrote: > > side note: I am amused by how much energy we are spending on figuring > out whether we should correctly parse the local translation of an > antiquated unit of weight used by roughly one country in the world... Hey, it's US and Liberia! *And*

Re: suggested changes to the fake profile

2014-01-03 Thread Linus Torvalds
On Fri, Jan 3, 2014 at 9:27 AM, Dirk Hohndel wrote: > > What the WHAT? > I didn't realize what that meant for people who used to track just max > depth (as you do with paper logbook and some phone apps). The profiles > look positively ridiculous. I didn't check it much, but it worked for some ran

Re: [PATCH 1/2] Models: translate the user entered weight units

2014-01-03 Thread Dirk Hohndel
On Fri, 2014-01-03 at 09:36 -0800, Linus Torvalds wrote: > On Fri, Jan 3, 2014 at 9:08 AM, Dirk Hohndel wrote: > > > >> In particular, remember: if the string is some translation of the > >> standard unit, matching _that_ doesn't even *matter*, because it will > >> be matched by default by simply

Re: [PATCH 1/2] Models: translate the user entered weight units

2014-01-03 Thread Linus Torvalds
On Fri, Jan 3, 2014 at 9:08 AM, Dirk Hohndel wrote: > >> In particular, remember: if the string is some translation of the >> standard unit, matching _that_ doesn't even *matter*, because it will >> be matched by default by simply matching the locale setting (which >> will always match the transla

suggested changes to the fake profile

2014-01-03 Thread Dirk Hohndel
I think the new fake profile is very nice IFF there is an average depth in the entry that we get. But I think it gets a bit of "squirrel on crack" when there is no average depth: /* * We want to fake the profile so that the average * depth ends up correct. However, in th

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Linus Torvalds
On Fri, Jan 3, 2014 at 9:04 AM, Dirk Hohndel wrote: > > If it makes our code better, I'm all for it. C++11 certainly has some improvements. This is likely the only one that we'd notice, though. The rest are for things I don't think we'd care about in subsurface (template improvements, threading m

Re: [PATCH 1/2] Models: translate the user entered weight units

2014-01-03 Thread Dirk Hohndel
On Fri, 2014-01-03 at 09:03 -0800, Linus Torvalds wrote: > On Fri, Jan 3, 2014 at 4:49 AM, Lubomir I. Ivanov wrote: > > From: "Lubomir I. Ivanov" > > > > Post c49d3885f this patch should make the input field > > in the equipment tab for weight to accept the user > > translated strings. > > No, t

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Dirk Hohndel
On Fri, 2014-01-03 at 08:54 -0800, Linus Torvalds wrote: > > Turning C++11 on for Subsurface would destroy support for OS X less than > > 10.6 > > since only GCC 4.2 can compile for it. That seems to be wrong - I compiled the latest binaries with clang and they at least claim to run on 10.5. And

Re: [PATCH 1/2] Models: translate the user entered weight units

2014-01-03 Thread Linus Torvalds
On Fri, Jan 3, 2014 at 4:49 AM, Lubomir I. Ivanov wrote: > From: "Lubomir I. Ivanov" > > Post c49d3885f this patch should make the input field > in the equipment tab for weight to accept the user > translated strings. No, this is broken, for a few reasons. > - if (!strncmp(end, "kg", 2))

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Linus Torvalds
On Fri, Jan 3, 2014 at 4:31 AM, Thiago Macieira wrote: > > If you want to pass a default argument of type pressure_t, then that struct > requires a constructor for it to work in C++98. Yeah, and that totally destroys the point of using "pressure_t" in the first place (it's there purely for type s

Re: [PATCH 2/2] Allow the user to specify weight units explicitly

2014-01-03 Thread Lubomir I. Ivanov
On 3 January 2014 06:58, Linus Torvalds wrote: > > +double string_to_grams(char *str) > +{ ... > + if (!strncmp(end, "kg", 2)) > + goto kg; > + if (!strncmp(end, "lbs", 3)) i think this part should be translated, so i sent a patch for it: [PATCH 1/2] Models: translate th

[PATCH 2/2] Maintab: prevent a segfault in the 'Equipment' tab

2014-01-03 Thread Lubomir I. Ivanov
From: "Lubomir I. Ivanov" When a dive contains no cylinders, clicking the '+' button could SIGSEGV if current_dive->dc.model is NULL. Signed-off-by: Lubomir I. Ivanov --- newEditMode=MainTab::NONE) at qt-ui/maintab.cpp:225 at qt-ui/maintab.cpp:546 ... --- qt-ui/maintab.cpp | 1 + 1 fi

[PATCH 1/2] Models: translate the user entered weight units

2014-01-03 Thread Lubomir I. Ivanov
From: "Lubomir I. Ivanov" Post c49d3885f this patch should make the input field in the equipment tab for weight to accept the user translated strings. e.g. 'lbs' in Russian is '' and '??' in Bulgarian, while 'kg' is the same for both languages - '??'. Signed-off-by: Lubomir I. Ivanov

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Thiago Macieira
On sexta-feira, 3 de janeiro de 2014 10:31:40, Thiago Macieira wrote: > On quinta-feira, 2 de janeiro de 2014 21:36:01, Linus Torvalds wrote: > > This seems to fix it from quick testing. I'd love to make the "mbar" > > be a proper "pressure_t" rather than an unsigned int, but setting > > default va

Re: Fix imperial cylinder sizes in equipment tab

2014-01-03 Thread Thiago Macieira
On quinta-feira, 2 de janeiro de 2014 21:36:01, Linus Torvalds wrote: > This seems to fix it from quick testing. I'd love to make the "mbar" > be a proper "pressure_t" rather than an unsigned int, but setting > default values for arguments with complex types is a fairly recent > thing, so compilers

4.0.1

2014-01-03 Thread Dirk Hohndel
I just pushed the 4.0.1 tag Insomnia can be really productive. Let's hope I got the website edits right and that the Windows and Mac binaries I uploaded actually work. :-) I'm waiting with posting the announcement for a few hours to give the folks translating the website a chance to add a locali