Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Hiowf
Jun 28, 2013

We don't do .DOC in my cave.
http://cgit.freedesktop.org/xorg/app/sessreg/tree/sessreg.c?id=sessreg-1.0.8#n153

Because pointers and C strings aren't hard enough.

Adbot
ADBOT LOVES YOU

QuarkJets
Sep 8, 2008

How does this thread generally feel about Qt? I sometimes work on a large Qt-based application, and it seems to be pretty coherent overall, but are there some good examples of horror there that I just haven't stumbled upon yet?

hobbesmaster
Jan 28, 2008

Qt is great compared to a lot of frameworks out there *cough*gtk*cough*

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

Subjunctive posted:

Rule check: how often am I allowed to complain about Perforce in here?

If Perforce is the worst VCS you've worked with, you're not allowed to complain about it.

(Though IIRC, you're at Google, and they have or used to have a bunch of scripts to monitor the latencies of their Perforce servers and just restart them when they inevitably start running slow and stop scaling. I can see how this is more painful at Google than at smaller places.)

omeg
Sep 3, 2012


I like the descriptive variable names personally.

hobbesmaster
Jan 28, 2008

I don't think I've seen *++* used before.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

hobbesmaster posted:

Qt is great compared to a lot of frameworks out there *cough*gtk*cough*

GTK+ owns

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

http://patchwork.freedesktop.org/patch/36266/

You're a few days late.

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

hobbesmaster posted:

Qt is great compared to a lot of frameworks out there *cough*gtk*cough*

I'm starting development on BlackBerry 10 later this week. I'm holding you responsible for the optimism you're making me feel

canis minor
May 4, 2011


Curious how does this thing work - avp is an array of pointers to strings? *++*a = *(++(*a)) - *a pointer moves to the next string?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

hackbunny posted:

I'm starting development on BlackBerry 10 later this week. I'm holding you responsible for the optimism you're making me feel

... out of curiosity, why? I assumed that BB was pretty much dead at this point.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Skuto posted:

If Perforce is the worst VCS you've worked with, you're not allowed to complain about it.

(Though IIRC, you're at Google, and they have or used to have a bunch of scripts to monitor the latencies of their Perforce servers and just restart them when they inevitably start running slow and stop scaling. I can see how this is more painful at Google than at smaller places.)

Not the worst for sure. Hard to "beat" CVS, or sccs. (I'm at FB/Oculus, not Google.)

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

OK, OK, I give up, here is it. I hope it will not turn out to be a mistake :gerty:

omeg posted:

Edit: actual semi serious question to hackbunny or anyone else maybe more knowledgeable than me: how hard would be to make gui processes on non-active desktops still process messages and user/gdi apis to actually work on them? Since pretty much all of win32k state is global most user/gdi apis just return ACCESS_DENIED when targeted to non-active desktops, and threads on those inactive desktops seem to not process any (or most) window messages. Well I guess I answered myself. :v:

I think you can't send messages cross-desktop. Have you tried setting the target desktop as the desktop of the sending thread? Or maybe the desktop has the wrong permissions? but I admit it's a stab in the dark

Volmarias posted:

... out of curiosity, why? I assumed that BB was pretty much dead at this point.

A rather important customer demands it. They are in too deep with BES and can't get rid of BlackBerry devices easily

omeg
Sep 3, 2012

hackbunny posted:

I think you can't send messages cross-desktop. Have you tried setting the target desktop as the desktop
of the sending thread? Or maybe the desktop has the wrong permissions? but I admit it's a stab in the dark

Changing the desktop should work but I specifically want to avoid that. It's a long story -- basically a dream of implementing meaningful GUI isolation within one active session. Like a seamless mode for VMs but without actual VMs. I've done a lot of research and have come to the conclusion it's just not possible with the way win32k is built.

On topic of windowing systems, is there any OS with a non-awful architecture of GUI stuff?

Sinestro
Oct 31, 2010

The perfect day needs the perfect set of wheels.
OS X's is pretty good, considering. I mean, it's better than X11 or Windows. That's not exactly a high bar.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

omeg posted:

Changing the desktop should work but I specifically want to avoid that. It's a long story -- basically a dream of implementing meaningful GUI isolation within one active session. Like a seamless mode for VMs but without actual VMs. I've done a lot of research and have come to the conclusion it's just not possible with the way win32k is built.

On topic of windowing systems, is there any OS with a non-awful architecture of GUI stuff?

Wayland is quite good for a modern architecture.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Sinestro posted:

OS X's is pretty good, considering. I mean, it's better than X11 or Windows. That's not exactly a high bar.

We do some weird stuff, but modern Windows (esp Win10) provides a much better system for doing that stuff (scheduling/preemption, multi-process/API sharing, devices over HDMI that don't show up as regular monitors, hooking apps' stuff) than X11 or OS X, at least so far.

E: I don't know if Wayland sucks or rules for our purposes, yet.

omeg
Sep 3, 2012

I loving hate winerror.h
code:
// Not enough storage is available to process this command.
#define ERROR_NOT_ENOUGH_MEMORY          8L    // dderror

// Not enough storage is available to complete this operation.
#define ERROR_OUTOFMEMORY                14L

// A device attached to the system is not functioning.
#define ERROR_GEN_FAILURE                31L
I remember wondering why I often saw some bizarre errors about devices not functioning. ntstatus is so nice in comparison.

zergstain
Dec 15, 2005

I think I want to say that I've been at my co-op job for about 1.5 months, and I haven't done a single commit yet. This may be good for me, as this place uses Clearcase.

hobbesmaster
Jan 28, 2008

hackbunny posted:

I'm starting development on BlackBerry 10 later this week. I'm holding you responsible for the optimism you're making me feel

Uh I've only used Qt on "desktop" platforms. I suspect blackberries may be a bit different.

tef
May 30, 2004

-> some l-system crap ->

QuarkJets posted:

How does this thread generally feel about Qt? I sometimes work on a large Qt-based application, and it seems to be pretty coherent overall, but are there some good examples of horror there that I just haven't stumbled upon yet?

I've had way more experience with PyQt than Qt, and on the whole, it's relatively straight forward, if not laborious.

You have to manage an acylic memory graph by hand of parent and child QObjects, rather than managing ref-counts or gc. Any time you delete an object, all of the objects children are cleaned out. Although there is threads, you live in an event loop, so you also have to mash your code until it's co-operatively scheduled.

The real Qt horror might be that it is a framework, not a library for c++. Everything is different, down to the data structures http://doc.qt.digia.com/qq/qq19-containers.html (no stl here mate) and there is the c++ preprocessor moc http://qt-project.org/doc/qt-4.8/moc.html too

bpower
Feb 19, 2011
You have a double called tmpRec.Value. If its negative put it in moneyOut otherwise pop it into MoneyIn. What do you do??????????


code:
 

string tmpVal = tmpRec.Value.ToString();

double moneyIn = 0;
double moneyOut = 0;
if (tmpVal.Contains("-"))
     moneyOut = double.Parse(tmpVal.Replace("-", ""));
else
     moneyIn = double.Parse(tmpVal.Replace("-", ""));

This guys earns a drat good living writing software. Oh, and that was not entangled in a bunch of confusing code that I simplified. Thats it. Its been there for ages.

How does that even pop into your head?

kingcrimbud
Mar 1, 2007
Oh, Great. Now what?

bpower posted:

You have a double called tmpRec.Value. If its negative put it in moneyOut otherwise pop it into MoneyIn. What do you do??????????


code:
 

string tmpVal = tmpRec.Value.ToString();

double moneyIn = 0;
double moneyOut = 0;
if (tmpVal.Contains("-"))
     moneyOut = double.Parse(tmpVal.Replace("-", ""));
else
     moneyIn = double.Parse(tmpVal.Replace("-", ""));

This guys earns a drat good living writing software. Oh, and that was not entangled in a bunch of confusing code that I simplified. Thats it. Its been there for ages.

How does that even pop into your head?

No check of tmpRec.HasValue may be considered worse, if it's not immediately above your first line.

Centripetal Horse
Nov 22, 2009

Fuck money, get GBS

This could have bought you a half a tank of gas, lmfao -
Love, gromdul

omeg posted:

I won't post any links in case it's considered :filez: but I highly recommend to browse through the leaked win2k sources. They're old but clearly show the difference in quality between the kernel and the windowing/graphics subsystem. Granted it's almost all in the name of compatibility with this or that. Hard to find a function without "HACK HACK HACK" or "THIS IS SO LOTUS123 CAN loving RUN".

My personal favorite is, "TERRIBLE HORRIBLE NO GOOD VERY BAD HACK."

Edit:

tef posted:

I have a nifty avatar

How long have you had that avatar, and how did you end up with it? I've been obsessed with L-Systems this past week. I've been posting shots from my current project in the screenshots thread.

Centripetal Horse fucked around with this message at 07:28 on Nov 6, 2014

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

Subjunctive posted:

Hard to "beat" CVS, or sccs.

zergstain posted:

...I haven't done a single commit yet. This may be good for me, as this place uses Clearcase.

f;b

Hiowf
Jun 28, 2013

We don't do .DOC in my cave.

Suspicious Dish posted:

You're a few days late.

Note that the relevant code is still there.

quote:

Curious how does this thing work - avp is an array of pointers to strings? *++*a = *(++(*a)) - *a pointer moves to the next string?

..and we check it isn't empty by seeing if the first char is 0, yes.

TheresaJayne
Jul 1, 2011

Subjunctive posted:

Not the worst for sure. Hard to "beat" CVS, or sccs. (I'm at FB/Oculus, not Google.)

You obviously havent tried Source(un)Safe (the number of times we had to start again because the DB corrupted)

or

Clearcase. I don't want to even go there....

Soricidus
Oct 21, 2010
freedom-hating statist shill
If you hate clearcase, wait till you've tried clearcase where branching is disabled in all vobs and the use of commit messages is strictly forbidden in favor of a separate central manually-updated commit log that in practice has barely been touched since 1997!

TheresaJayne
Jul 1, 2011

Soricidus posted:

If you hate clearcase, wait till you've tried clearcase where branching is disabled in all vobs and the use of commit messages is strictly forbidden in favor of a separate central manually-updated commit log that in practice has barely been touched since 1997!

sounds like when i used to work at ATOS

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Yeah, I haven't had the pleasure of using them directly, though I've felt both those bullets graze me.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Someone tell me about CMVC because after the current project is done we're moving to a product that is managed by it. All I know is they tried and failed to convert the project from CMVC to our current source control package very recently.

zergstain
Dec 15, 2005

zergstain in Dec 2012 posted:

Place I'm starting at in about a week uses CVS. I'm not sure how I should feel about that.

Progressive JPEG in Dec 2012 posted:

Just be glad you aren't using ClearCase.

Fate is a cruel mistress.

Progressive JPEG
Feb 19, 2003

zergstain posted:

Fate is a cruel mistress.



:rip:

bpower
Feb 19, 2011
Same dude from before. He knows one "technique". Every area is designed like the following.



code:

------------  Data Entry for Product ---------------


Session["_DataType"] = "product"
Session["product_type_input_description"] = "FALSE"
.
.
.
6 or 7 more 

Call DoDataEntry


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

Sub DoDataEntry

// check Session[""] for a big pile of guff

switch DataType

    case "products"
    
         // a poo poo load of code right here

    case "user lists"

         // basically same poo poo load of code with minor adjustments and few weird kinks thrown in.

.
.
.

And so on for every god dam input screen.

Edit: \/\/ hahahah. "Conceptually", you're not willing to grant it the status of theory.

bpower fucked around with this message at 21:35 on Nov 6, 2014

Xenoveritas
May 9, 2010
Dinosaur Gum
Well, I'm not going to post any actual code, instead I'll just say:
  • Single 3,000 line Java file
  • Which contains seven classes
  • In the default (empty) package
  • 150MB of dependencies, the bulk (135MB) of which appear to be data files for a single dependency
  • Sole public interface appears to be public static void main(String[])
  • But every method is public anyway
  • Except for constructors, which are all package access
  • Rather than throwing exceptions, all error handling is done using System.exit(1)
  • Conceptually this code is supposed to be made available as a web service...

My Rhythmic Crotch
Jan 13, 2011

I used Clearcase on Unix for years and I like it way better than loving Perforce :iiam:

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

Xenoveritas posted:

Well, I'm not going to post any actual code, instead I'll just say:
  • Single 3,000 line Java file
  • Which contains seven classes
  • In the default (empty) package
  • 150MB of dependencies, the bulk (135MB) of which appear to be data files for a single dependency
  • Sole public interface appears to be public static void main(String[])
  • But every method is public anyway
  • Except for constructors, which are all package access
  • Rather than throwing exceptions, all error handling is done using System.exit(1)

:stare:

quote:

  • Conceptually this code is supposed to be made available as a web service...

:catstare:

Good luck with refactoring that.

pigdog
Apr 23, 2004

by Smythe

Xenoveritas posted:

[*]Rather than throwing exceptions, all error handling is done using System.exit(1)
How else would you avoid those pesky finally blocks? :shepface:

Soricidus
Oct 21, 2010
freedom-hating statist shill

Xenoveritas posted:

Well, I'm not going to post any actual code, instead I'll just say:
  • Single 3,000 line Java file
  • Which contains seven classes
  • In the default (empty) package
  • 150MB of dependencies, the bulk (135MB) of which appear to be data files for a single dependency
  • Sole public interface appears to be public static void main(String[])
  • But every method is public anyway
  • Except for constructors, which are all package access
  • Rather than throwing exceptions, all error handling is done using System.exit(1)
  • Conceptually this code is supposed to be made available as a web service...

Until you got to the last line there, I thought I knew which program you were talking about.

Now I'm just going to sob gently at the horrifying revelation that there's more than one of them.

Adbot
ADBOT LOVES YOU

return0
Apr 11, 2007
Sounds like a (tiny) throwaway demonstration/test app/spike, what's the horror?

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply