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.
 
  • Locked thread
Sapozhnik
Jan 2, 2005

Nap Ghost
ugh git reset --hard HEAD^ just ate my entire working tree when I wanted to just discard my latest commit fml

Adbot
ADBOT LOVES YOU

GameCube
Nov 21, 2006

my first day of git my autistic coworker told me that the best first step when troubleshooting build issues was to run a git clean -xdf. that is a terrible habit to get into, for reasons which i hope are obvious

GameCube
Nov 21, 2006

also, shaggar was right. https://bugzilla.xamarin.com/show_bug.cgi?id=33286

LordSaturn
Aug 12, 2007

sadly unfunny

hobbesmaster posted:

this is what happens when every interview question is "manually implement this data structure"

no, it's what happens when "unreviewed tool for internal utility" becomes "bedrock component of product test infrastructure"

NihilCredo posted:

not exactly a hard choice when two options mean immediate freezing or crashing while the third can be fixed by scheduling a program restart every x hours

well the hard choice is "trying to pass a known, comment-indicated this-leaks-memory function through peer review"

the really hard choice was apparently deciding to have linked list nodes appear in multiple lists, because disposing of them when they're delisted is causing other lists to encounter free'd pointers. gently caress chasing that down btw, the whole file is a word soup of "file_name_list_ptr"

HoboMan
Nov 4, 2010

are you in c++? lol good luck with that

LordSaturn
Aug 12, 2007

sadly unfunny

HoboMan posted:

are you in c++? lol good luck with that

if it were C++ it would be list<string<homebrew_utf_8>> file_name

this is C

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

LordSaturn posted:

the really hard choice was apparently deciding to have linked list nodes appear in multiple lists

what the gently caress? what purpose would this ever serve? and how does the next pointer(s) work for those nodes? just store them in an array, or perhaps in a smaller linked list?

LordSaturn
Aug 12, 2007

sadly unfunny

YeOldeButchere posted:

what the gently caress? what purpose would this ever serve? and how does the next pointer(s) work for those nodes? just store them in an array, or perhaps in a smaller linked list?

I don't know, I can't tell, because the file is unreadable hair soup whose erroneous function is relied upon for testing of external customer deliverables

and we can't replace it with something written in a good language because its hosed-up configurable data type packing system will not work without a sea of void pointers

HoboMan
Nov 4, 2010

YeOldeButchere posted:

what the gently caress? what purpose would this ever serve? and how does the next pointer(s) work for those nodes? just store them in an array, or perhaps in a smaller linked list?

no you see it saves memory when multiple lists have the same item!

but yeah i can't think of a way to have that actually work without making the lists all hosed up

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
i could see it as a very specialized data structure if you had data that had a massive quantity of common suffixes, kind of like an "inverted trie" or something, but it sure as gently caress wouldn't have the same interface as a linked list and it wouldn't be called a linked list

VikingofRock
Aug 24, 2008




YeOldeButchere posted:

what the gently caress? what purpose would this ever serve? and how does the next pointer(s) work for those nodes? just store them in an array, or perhaps in a smaller linked list?

In pure functional languages, this is often how linked lists which share a common tail will get stored. For example, if you have a list A, and you do:

code:
B = push('x', A)
C = push('y', A)
then the nodes of A will appear in three linked lists: A, B, and C. You can't mutate anything anyways so you don't have to worry about modifications to one affecting the others.

Edit: For bonus fun, the same thing happens with any tree, which can be pretty crazy efficient but is a little hard to reason about.

VikingofRock fucked around with this message at 21:25 on Jul 14, 2016

brap
Aug 23, 2004

Grimey Drawer
yeah but you need to have garbage collection for that poo poo to work.

if you're in C trying to share nodes between multiple linked lists and you're not using reference counts or something you are just being hosed up and stupid.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

LordSaturn posted:

no, it's what happens when "unreviewed tool for internal utility" becomes "bedrock component of product test infrastructure"


well the hard choice is "trying to pass a known, comment-indicated this-leaks-memory function through peer review"

the really hard choice was apparently deciding to have linked list nodes appear in multiple lists, because disposing of them when they're delisted is causing other lists to encounter free'd pointers. gently caress chasing that down btw, the whole file is a word soup of "file_name_list_ptr"

can you add a reference count field to your listnode and increment it in the listadd function and decrement it in the remove function and only dispose when the count is 0? i assume you cant or you would have already done that.

HoboMan
Nov 4, 2010

fleshweasel posted:

yeah but you need to have garbage collection for that poo poo to work.

and if they added that the whole codebase would get deleted :v:

no one's made this joke before right?

VikingofRock
Aug 24, 2008




LeftistMuslimObama posted:

can you add a reference count field to your listnode and increment it in the listadd function and decrement it in the remove function and only dispose when the count is 0? i assume you cant or you would have already done that.

Wouldn't you run into trouble with cyclic linked lists?

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

VikingofRock posted:

You can't mutate anything anyways

well see that's kind of a key requirement right there. i'm going to go ahead and hazard a guess that it's not a valid assumption for a linked list in motherfucking C of all languages

like, in some functional languages you're dealing with immutable strongly typed data and any deviation from that is utterly verboten at the language level. C is all void pointers all the time, just read and write and cast all that poo poo whenever you want, whatever it's all good who gives a poo poo about what's happening

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

VikingofRock posted:

Wouldn't you run into trouble with cyclic linked lists?

i mean, it wouldnt be a literal reference count, but a "how many lists am i in" count. but even with a cyclic linked list i'm not sure where your concern would come from? we wouldn't try to follow the chain of references through the list when we want to clean up (thus resulting in counting the same thing a billion times).

although now that im thinking about it, how the hell are these linked lists set up so that a listnode can appear in multiple lists? granted ive only implemented the naive version from scratch, but fundamentally isn't a linked list basically done by:

code:

class listnode{
      listnode  next;
      listnode  prev; //if we're doing doubly-linked
      t  data;
}

class list{
     listnode  head;
     listnode  tail; //if you want/you're not doubly linked and want a quicky way to append to the back.
     int count;

    public void add(listnode){...}
    public bool remove(listnode){...}
   //maybe also some helpers for removing at a certain index, etc
}
how could you put a listnode into multiple lists? some kind of hosed up table of next and previous nodes indexed by some kind of list identifier?

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

LeftistMuslimObama posted:

although now that im thinking about it, how the hell are these linked lists set up so that a listnode can appear in multiple lists? granted ive only implemented the naive version from scratch, but fundamentally isn't a linked list basically done by:

how could you put a listnode into multiple lists? some kind of hosed up table of next and previous nodes indexed by some kind of list identifier?

thinking about this whole thing only raises more and more questions. i feel like my initial question is the most appropriate here:

YeOldeButchere posted:

what the gently caress?

LordSaturn
Aug 12, 2007

sadly unfunny

LeftistMuslimObama posted:

can you add a reference count field to your listnode and increment it in the listadd function and decrement it in the remove function and only dispose when the count is 0? i assume you cant or you would have already done that.

*flips over a trap card that says "I don't know where the reference is getting copied so I can't keep an accurate reference count"*

YeOldeButchere posted:

what the gently caress?

there isn't a good reason for it to be the way it is, and how it can possible work right when I stop trying to collect garbage is a mystery. the code with this problem is actually not used by our team or part of our tests, yet has been integrated into the foundation of the deliverable product's test suite.

the infinite loops were caused by this code mysteriously forming cycles in its singly-linked lists, btw.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

LordSaturn posted:

the infinite loops were caused by this code mysteriously forming cycles in its singly-linked lists, btw.

are you sure this isn't just an elaborate interview question?

GameCube
Nov 21, 2006

hmm. apparently in the latest release of xamarin there is an android-specific implementation for the httpclient poo poo. perhaps i am not hosed yet. stay tuned for the thrilling conclusion, after these nuget updates.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Bloody posted:

like how the hell does this language not already have a preprocessor

i guess maybe the non poo poo tier vendors have their own preprocessors? idk

what language?

hobbesmaster
Jan 28, 2008

Jabor posted:

are you sure this isn't just an elaborate interview question?

the answer is a tortoise and hare algorithm!

Bloody
Mar 3, 2013

eschaton posted:

what language?

verilog

hobbesmaster
Jan 28, 2008

LordSaturn posted:

if it were C++ it would be list<string<homebrew_utf_8>> file_name

this is C

pffft, somebody doesn't know C++

list< basic_string<homebrew_utf_8, bespoke_utf_8_traits, fuck_you_we_made_our_own_allocator > >

hobbesmaster
Jan 28, 2008


i could've sworn it ran the C preprocessor before a "build"

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

hobbesmaster posted:

pffft, somebody doesn't know C++

list< basic_string<homebrew_utf_8, bespoke_utf_8_traits, fuck_you_we_made_our_own_allocator > >

it would also have to be "forward_list" instead of list if you really want to optimize that poo poo!

i love forward_list if only because it's the only container to have the amazing before_begin() method and associated iterator

hobbesmaster
Jan 28, 2008

poo poo that could shave off an entire size_t!

Notorious b.s.d.
Jan 25, 2003

by Reene

eschaton posted:

you got a source for that? as far as I know, Xserve always used standard 3.5in SATA drives and they would always work

i should have been more specific: the spuds were proprietary and apple would not sell you the spuds without a hilariously marked up drive inside

eschaton posted:

turns out that if you built MySQL with the same options as for FreeBSD, it performed just fine

MySQL's "oh, you're building on OS X, here are the options to use" poo poo was broken and for some reason people blamed it on OS X and Mach rather than on the idiots who set up how MySQL built

yes i'm sure benchmarkers are just dumber than poo poo and it wasn't the hosed up posix thread libs

Notorious b.s.d.
Jan 25, 2003

by Reene

BattleMaster posted:

was it true that the fancy aluminum cases sagged when hot?

they just sagged as they aged

i sure hope heat wasn't a factor

aardvaard
Mar 4, 2013

you belong in the bog of eternal stench



love the new version of pgAdmin

Luigi Thirty
Apr 30, 2006

Emergency confection port.

turns out a typo was making my cubes inside out lol I belong in this thread

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Luigi Thirty posted:

turns out a typo was making my cubes inside out lol I belong in this thread

you mean a typo was putting your camera on the wrong side of the cube

tef
May 30, 2004

-> some l-system crap ->

Mr Dog posted:

ugh git reset --hard HEAD^ just ate my entire working tree when I wanted to just discard my latest commit fml

git

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

LordSaturn posted:

*flips over a trap card that says "I don't know where the reference is getting copied so I can't keep an accurate reference count"*


there isn't a good reason for it to be the way it is, and how it can possible work right when I stop trying to collect garbage is a mystery. the code with this problem is actually not used by our team or part of our tests, yet has been integrated into the foundation of the deliverable product's test suite.

the infinite loops were caused by this code mysteriously forming cycles in its singly-linked lists, btw.

so it's not really that they are in multiple lists but that somehow references to the nodes are ending up in the wrong place under mysterious circumstances. that's a bitch to debug because how do you even catch a reference creation at an unknown point to get a stack trace?

is there a magic debugger trick to just break on every creation of a pointer of a certain type? a tool like that would get the job done.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

aren't `define and friends implemented with a preprocessor?

Bloody
Mar 3, 2013

eschaton posted:

aren't `define and friends implemented with a preprocessor?


hobbesmaster posted:

i could've sworn it ran the C preprocessor before a "build"

this happens in some toolchains! ours, apparently, supports at best a teeny tiny portion of the preprocessor syntax. basically the only part of the ` syntax that doesnt seem to break is the timestep stuff

none of the documents for any of the pieces of the toolchain contain any references to preprocessors or preprocessing

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

Bloody posted:

this happens in some toolchains! ours, apparently, supports at best a teeny tiny portion of the preprocessor syntax. basically the only part of the ` syntax that doesnt seem to break is the timestep stuff

none of the documents for any of the pieces of the toolchain contain any references to preprocessors or preprocessing

well, you've already written one Verilog parser…

Bloody
Mar 3, 2013

most of a verilog parser full of weird gotchas and failures!

much like the language

Adbot
ADBOT LOVES YOU

Luigi Thirty
Apr 30, 2006

Emergency confection port.

fart simpson posted:

you mean a typo was putting your camera on the wrong side of the cube

the camera is in the correct place, the problem was it was calculating the flat shading light levels incorrectly and now objects display correctly

  • Locked thread