« first day (1453 days earlier)      last day (3542 days later) » 

12:35 AM
@RobertHarvey Awww I'm touched that he thinks so
He must not get out much
 
user55340
For example, Shutterstock doesn't prevent people from using these words, but they do use a list on github to prevent items containing these words from showing up in suggestion/hot/interesting lists - in short, their recommendation engine. In their words, "In our case, the question we use is, "What wouldn't we want to suggest that people look at?"Adam Davis 8 hours ago
 
user55340
Note: github list is NSFW.
 
user55340
@AdamDavis Hmm... I'd have great difficulty with that list in my code. Section 10.5.4 Special Comments of the Code Conventions for the Java Programming Language would be considered offensive... and no, Java is much less offensive than php. And I wonder if this was a hot question in its day. — MichaelT 57 secs ago
 
user55340
Just pointing out that line 338 is 'xxx' which made me chuckle.
 
user15026
12:56 AM
@MichaelT I like your comment about the Stick of Truth questions.
 
user55340
2:12 AM
17
Q: What happens if I fart on someone's balls?

C-dizzleDo you ever get the chance to fart on someone's balls? So far Cartman and Randy have told me "never fart on anyone's balls" but I have yet to find someone I can do this to. Ultimately, what happens if you do fart on someone's balls?

 
user15026
@MichaelT Yeah, I remember this one.
 
user55340
Btw - squirrel girl - from the official marvel.com: marvel.com/universe/Squirrel_Girl
 
user55340
Notice that 'power grid'
 
user55340
7
Q: How did Squirrel Girl defeat Thanos?

cidricI was in a Marvel forum, and I saw a picture of Squirrel Girl with a defeated Thanos, and the Watcher saying that it was the real Thanos, and that she had saved the universe. I'm not sure if that is a joke from Marvel, or it it is canon. In which comic did this happen?

 
user55340
10
Q: How did Squirrel Girl defeat Dr Doom?

PureferretIn Marvel Super Heroes volume 2 #8 (December 1991), Squirrel Girl defeated Dr. Doom by overwhelming him with a massive amount of Squirrels. How did this overwhelm Dr. Doom, who has been established as one of the premier villains in the Marvel Universe? Or more to the point, why did multiple squir...

 
user55340
2:15 AM
> Incidentally, if you check out her power stats on the official Marvel.com page for her - they are ALL maxed; this puts her stats on par with various god-like beings such as the Living Tribunal. (Marvel.com, in this case, being about as solidly canon as can be hoped for.)
 
user55340
And then there's tvtropes.org/pmwiki/pmwiki.php/ComicBook/… (note: that's tvtropes - enter at your own risk)
 
user55340
 
user55340
> Gene "Leather Boy" Lorrene: Revealed to be an actual founding member of the team who was kicked out early due in part to not actually having powers and partly because he was a Leatherman and BDSM enthusiast who totally missed the point of Mr. Immortal's first call for "costumed adventurers". Angered at this, he eventually joined the team's Rogues Gallery, along with Dr. Tannenbaum and Deathurge the squirrel.
 
user15026
....the more I learn about Squirrel Girl and the like the more confused I get
 
user55340
@AshleyNunn I think that's kind of the point...
 
user55340
2:25 AM
though for fun, go look up 'squirrel girl cosplay' in image search.
 
user15026
@MichaelT I am scared to ;)
 
user15026
Wow, a lot of people have done it.
 
user55340
@AshleyNunn Its not bad at all... kind of cute (said from male perspective).
 
user15026
@MichaelT I would agree with this perspective
 
user55340
You could always try for something from Alpha Flight...
 
user15026
2:28 AM
@MichaelT oh?
 
user55340
Alpha Flight is a fictional superhero team published by Marvel Comics, noteworthy for being one of the few Canadian superhero teams. Created by John Byrne, the team first appeared in X-Men #120 (April 1979). Within the Marvel Universe, Alpha Flight is described as "Canada's answer to the Avengers." Most team members have distinctly Canadian attributes, such as Inuit or First Nations heritage. Throughout most of its history, the team has worked for Department H, a fictional branch of Canada’s Department of National Defence that deals with super-powered villains. The team was originally merely a...
 
user55340
 
user55340
Yes, that is a Canadian flag on his spandex...
 
user15026
@MichaelT That's....interesting.
 
user15026
Okay, so I read that whole entry....that is one weird bunch of heroes.
 
user55340
2:39 AM
@AshleyNunn The Wisconsin ones? or the Canada ones?
 
user15026
@MichaelT The Canadian ones.
 
user55340
 
user55340
> Squirrel Girl's relationship with Speedball, summed up in a part of a conversation:
Speedball: I just wanted to say thanks for everything you did! Also for all those nice letters you send.
Squirrel Girl: Oh... You—You know about them?
Speedball: I read all my fan mail! That plus my manager alerted the FBI about them.
 
user15026
@MichaelT Oh dear...
 
user15026
That's special.
 
user55340
2:41 AM
Think of all the fun you could have with the cosplay!
 
user15026
@MichaelT It would be tempting to get my boyfriend to cosplay as Speedball or something and just chase him around waving letters at him or something ridiculous
 
user114359
Is it off-topic here to mention that I drafted well in my fantasy football league this evening? Sometimes I feel that Programmers should be slightly less nerdy...
 
@Snowman needs more beer
 
user55340
@Snowman I love fantasy football - like this team.
 
user15026
@enderland holds up her chocolate milk stout Does that count?
 
2:50 AM
@AshleyNunn what is that. lol
no wait, I think I know what it is.... :)
 
user114359
I have not had nearly enough beer today :-(
 
user55340
Though more seriously, lets see... fantasy football... numbers and stats based on the pseduo-random number generator of professional sports... not geeky at all. ;-)
 
user15026
@enderland A strong stout beer made with chocolate milk! It is amazing
 
user114359
but we have a guy at work that I thought would draft a level 12 wizard for his football team
 
user15026
@MichaelT Man, the number of times I want to explain to my work users that sports are generally random and look here is some stuff about probability and things.....but that wouldn't help anything :P
 
user114359
2:51 AM
this is actually my first year doing fantasy football, and I shocked all the veterans in a good way. they were impressed with my insightful picks
 
user114359
I look at my team the way I look at a computer algorithm. Let's see how we can combine the numbers to win money...
 
user15026
@Snowman Very nice :)
 
user55340
 
user55340
See... Soccer is an easy RNG to do... score = random(0,2);
 
user15026
@MichaelT Add in some cursing and people trying to scam other people, and also some people whining to me and my fellow CSRs, and that is my work chat every day
 
user114359
2:53 AM
hey while you're here... @AshleyNunn how do people have so much rep at Arqade? There are so many games out there, and it seems like so many people know a ton about each one
 
user15026
@Snowman Some people google for wikis and stuff, and a lot of people are just amazingly passionate about games.
 
user55340
@Snowman popular questions for key games get lots of rep.
 
user114359
I have a goal of building rep there but I look at the front page and say "muahhahwhat?"
 
user15026
@MichaelT This too.
 
user15026
@Snowman Ask questions! I started just asking (and have waaaaay more questions than answers)
 
user55340
2:54 AM
Consider that a fair chunk of my rep comes from:
 
user55340
19
Q: What are the different combinations for the runes?

MichaelTIn the Diggle Gods expansion, there is a room that has three runes and a lever. The runes are pillar, growth and decay, and scrutiny. They can be placed in spots in the floor and a lever pulled. What are the different combinations for the runes and what do they produce? For example - from top...

 
user55340
And +19 isn't that hard to do at all.
 
user55340
 
user55340
18k views on that question.
 
user114359
honestly my best answer was on a community wiki, so +0
 
user114359
2:56 AM
someone got 106 upvotes for this:
http://gaming.stackexchange.com/questions/178726/what-is-the-terminal-velocity-of-a-sheep
 
user55340
Hot question.
 
user114359
and I'm still new to chat (been using SE for years) so I'm not sure how to get a preview like @MichaelT just did
 
user55340
@Snowman paste it on a line by itself in a message by itself.
 
user15026
@Snowman That was a hot question about minecraft with a witty title, basically everything that gets loaded with rep
 
user114359
HOW DO PEOPLE KNOW THE TERMINAL VELOCITY OF A SHEEP?????????????????????????????????????????????
 
user114359
2:57 AM
105
Q: What is the terminal velocity of a sheep?

FlauntingI am thinking of an alternative timing mechanism; I am building a trap and I wanted to try something different to set it off. I want to drop a sheep from n blocks high so that I have a delay before the trap is triggered. The timing needs to be very exact, but I don't know how the falling mechani...

 
user114359
ah, there it goes
 
user55340
38
Q: How can I kill puppies without consequences?

DoorknobThe starting pets can sometimes get quite annoying, since they keep getting in your way. Those little dogs keep blocking my path! Therefore, I quite reasonably want to slaughter them brutally. But of course I want to do this safely. I've noticed that whenever I kill my pet, I "hear the rumble of...

 
user15026
The best advice I can give is not to stress. Ask things, answer things, let things happen. Try picking popular games, but even weird games get you random piles of rep (she says, looking at the odd mobile crap she has asked about)
 
user114359
This whole meta question reeks of "don't tell the cops"
 
user114359
-4
Q: The master list of questions which *really* need context

BobsonDue to the nature of video games, many things which wouldn't be tolerated in real life are allowed, if not outright encouraged. This tends to produce questions with bizarre, eye-catching titles which sound really strange, yet hilarious, when taken out of context. We've had lists before, and new...

 
user114359
2:58 AM
but I LOVE it!
 
user55340
15
Q: Can Vegans eat Jewelry?

QuincunxI am a Vegan. Would it break the conduct if I eat jewelry? The Vegan conduct states that I can eat: food rations, cram rations, K-rations, C-rations and lembas wafers melons, oranges, carrots, pears, apples, bananas, kelp, eucalyptus, garlic, wolfsbane, and user-defined fruit the co...

 
user15026
@Snowman There are reasons we don't super love that question, but at teh same time, the lack of context thing is something we are kinda good at
 
user15026
@MichaelT nethack is good for weird titles
 
user114359
yeah and there are SO questions that Jeff wants to delete but doesn't because they're just too damn funny
 
user15026
@Snowman Yeah, similar principle, although a lot of ours are actual legit questions that just scoop up weird titles
 
user15026
3:00 AM
15
Q: Is meeting people on the street the only way to make friends?

Ashley NunnI want to meet more people/have more Miis in my 3DS Mii plaza. Is there another way (other than StreetPass) to meet new Miis? While StreetPass is fine, I don't meet people very often. I know the Wii has Friend Codes. Does the 3DS have anything similar?

 
user15026
That's my personal best titled one.
 
user114359
One of my favorite questions on ANY stack exchange ever...
 
user114359
360
Q: What is the best comment in source code you have ever encountered?

Thomas BrattWhat is the best comment in source code you have ever encountered?

 
user114359
one time at my last job I literally showed up to work, spent 8 hours reading that specific question and its answers, and went home for the day.
 
user114359
(I didn't give a flying fazioli about my last job)
 
user15026
3:02 AM
I read a lot of blogs today because there were like NO sports playing for most of my shift.
 
user15026
Even with the US Open.
 
user15026
(I work for a bitcoin based sportsbook. There are weird random chunks of downtime.)
 
user114359
which remind me, I haven't read this yet this week, I normally hit it first thing in the morning while my coffee cools down from nuclear to drinkable...
 
user114359
 
user15026
Alright, sleep for me now. If I dream of squirrels, I am blaming you, @MichaelT.
 
user114359
3:04 AM
I'll sleep when I'm dead
 
user114359
thankfully this week my wife is upset at someone else, so I have a few more days...
 
user114359
I don't mean any disrespect to the asker, but I wonder where questions like this truly originate.
 
user114359
1
Q: Multithreading: am I doing it wrong?

ProgI'm working on an application that plays music. During playback, often things need to happen on separate threads because they need to happen simultaneously. For example, the notes of a chord need to be heard together, so each one is assigned it's own thread to be played in. This kind of behavio...

 
user114359
My college professors mostly knew squat about multithreading. I had to learn it in the real world, the hard way. Am I the only one?
 
@AshleyNunn Just saying, but if I was going to a Con, I would totally be a thundercat
 
3:09 AM
> Half of all marriages end in divorce. The other half end in death.
>
> You could be one of the lucky ones.
 
user55340
 
user55340
cat vs octopus.
 
jesus we're all up late
 
user114359
 
user114359
3:15 AM
Lionesses v. crocodile
 
user114359
3:32 AM
and I am still answering questions
 
user114359
oddly enough I answered another NoSQL question despite me being a SQL expert
 
4:27 AM
posted on August 25, 2014

Venerable Jinyu, the Abbess Over All Clans And Concerns, was always present when novices were given their performance reviews—for these reviews would determine who would advance in the Temple hierarchy, and how they would serve. Each novice was made to wait alone in a conference room for the senior abbots to enter, so the Abbess always left a pile of wooden building blocks in the room

 
 
9 hours later…
1:19 PM
Is anyone familiar with a good explanation or information on the different types of software reuse? I'm looking at library reuse, single-system development that could reuse pieces of the existing system ("clone and own"), component-based development, reconfigurable architectures (reference architectures, frameworks), and so on.
 
user41796
@ThomasOwens +1 for great question but I have to VTC as "too broad."
 
@GlenH7 I'm pretty sure what we're doing is clone and own. It's terrible. :(
I'd like to move toward product line, but I'd also like to look at other reuse strategies as well.
If you reference Software Product Lines Practices and Patterns or Software Product Lines in Action, you don't need to.
 
user41796
I wanted to say McConnell touched upon that, but I didn't think it was in Code Complete. The only other likely options would be Rapid Development or Professional Software Development. But my hunch on those isn't that strong.
 
I have RapDev, Professional Software Development, Code Complete, and Software Estimation. I'll look at the index.
 
user41796
Regardless, I haven't seen a great description of the types of re-use that are available. Part of the challenge in finding those is measuring how often they are used. It's something you just do and don't necessarily think of as re-use.
 
1:31 PM
(Is that all of McConnell's books? Am I a huge McConnell fanboy?)
 
user41796
I'd check RapDev first. And he doesn't have all that many books tbh.
 
user41796
"Clone and own" is a variant of "copy and paste." And yes, it's re-use, but.... it has a whole host of issues when bugs are discovered.
 
Yeah. There are pages on reuse in rapdev. Opportunistic and planned, managing risks of, etc.
The difference bettween clone/own and copy/paste is that one usually involves version control and forking.
 
user41796
Woohoo! I'm not going completely senile yet. :-)
 
So you can do merging and stuff. It's still a huge nightmare for defects or change requests and implementing them in each clone.
Thanks for suggesting rapdev, though. I usually go to that for things like process models. I guess managing reuse is important to process, though.
 
user41796
1:34 PM
@ThomasOwens I'll grant that clone and own is a bit more sophisticated than copy and paste, but it inherits many of, if not all of, the problems of copy and paste.
 
user41796
If you "really need" said function in your app and it's in another app, then that's where helper libraries come into play. Eventually the helper libraries can grow into their own framework.
 
user41796
OTOH, once you create a helper library you created something that now needs coordination amongst all the projects. It's wise to version the helper and treat all methods as public API calls. That minimizes the likelihood of hurting something else that relies upon that library.
 
user41796
Since I suspect you're going to try and pitch that at work, you have to weigh the increased implementation and maintenance costs against the increased communication costs. My inclination is that the communication costs are lower and that's the right way to go, but I could well be wrong.
 
Actually, the biggest problem is funding.
Customers likely don't want to fund product line activities that don't contribute to them having a product, but are necessary to ensure a high quality product line asset library.
 
user41796
@ThomasOwens This is where the 6 sigma folk are really good. They have techniques for quantifying those implementation and maintenance costs and then demonstrating what the savings would be by funding the cross-product line library.
 
user41796
1:44 PM
But all of my belts are from karate, not six sigma.
 
user41796
And I'll openly admit that those soft savings can be a hard sell.
 
user41796
1:57 PM
You know it's a horrific question when you're worried that editing to remove the blather will push the question below the minimum length requirements.
 
user55340
2:13 PM
 
user55340
Mute the sound when viewing the video... its annoying.
 
@MichaelT wait they inceptioned game of life?
 
user55340
@ratchetfreak Life imitates life.
 
user55340
And then here's one for @JimmyHoffa - λ bubble pop
3
 
If anyone else has anything on software reuse or software product lines, please kick it toward me. I'm building a business case and engineering strategy.
 
user55340
2:19 PM
@RobertHarvey if you want to take part in some delete vote therapy... Stack Overflow tag: work-enviroment
 
I'm surprised Martin Fowler doesn't have a huge page on reuse on his blicki.
 
user55340
2:38 PM
@AshleyNunn did you see that Burger King is buying Tim Horton's?
 
user41796
@MichaelT That's a shame. BK's mgmt has been underwhelming. I can't imagine their purchasing of TH will do anything good for Hortons.
 
3:16 PM
@MichaelT This is awesome.
 
3:29 PM
@MichaelT ffs, why don't they just give us a tool to burn these things?
 
user55340
@RobertHarvey Because burning is fun?
 
@RobertHarvey like a blowtorch? napalm? oversized flaming branch?
 
user55340
You know you want to destroy @Oded 's answer...
 
user55340
1
A: change of job description

OdedGet a new job, where they need c programmers. A company will move on, you are just a cog in the wheels and if you don't play along they will fire you. Alternatively, grow up and learn a new language. It can't hurt and you may learn something about your profession and yourself in the process.

 
Eh, most of the questions on that tag just need deleting. It's deleting tags one question at a time that grates.
 
user55340
3:32 PM
@RobertHarvey Just delete all the questions there... the tag will go away.
 
Some of them are not closed.
 
@RobertHarvey retag those that don't need closing
 
user55340
14 of the 70 some odd.
 
user55340
And you know you can make executive decisions too... thats what you're paid the big bucks for...
 
user55340
3
Q: What (programming related things) to pack for travelling?

HS.Well, it has been a few years since I last travelled to a programmers conference. Back then, the power brick for my laptop was as heavy as the whole laptop is nowadays. So, the laptop was about the only thing I took with me into the conference. That means, I have no idea, if it makes sense to fi...

 
user55340
3:33 PM
A: A boat!
 
user55340
Once you obliterate the just not even SO questions, then one can look at the open ones that are mistagged.
 
user55340
@RobertHarvey don't you feel better now?
 
4:02 PM
still one locked question
 
@MichaelT @GlenH7 @WorldEngineer @Ampt - Anyone ever seen a tool that will take an HTML file and split the JavaScript out into a separate file?
 
user55340
I don't think that its that hard... you just use a regex and...
 
you can build it yourself with a regex
<script>(.*)</script>
 
user55340
.*?
 
user41796
@JimmyHoffa Not offhand, but they ought to be delimited with <script></script> right?
 
4:04 PM
@GlenH7 unless they use <![CDATA[ ]]>
 
user55340
The thing really would be to open up the DOM, and find the script nodes and then pull out that.
 
@GlenH7 sure, which is why I'm taking my step 2 approach for starters: Finding a file saving browser plugin so I can use the browsers dom to separate a file and saving the participles...
 
user55340
@RobertHarvey have you used up all your delete votes for the day on SO? ;-)
 
4:38 PM
@MichaelT: Bubble Pop is awesome. There are more recursive layers in ordinary Lisp code than I realized.
 
user55340
@RobertHarvey there's also the realization that bubbles can be popped in any order.
 
Right, which is why it can be easily multitasked.
I don't understand how the bubble mix at the bottom works, though. It doesn't seem to do anything.
 
hello programmers
 
@Christoph 1
 
user41796
You know you're working with a large azure store when you cause azure storage explorer to spin for a minor eternity.
 
4:52 PM
I need a name for the following:
I have 5 bits wide data and want to put that into an 8 bita wide unsigned int. For further conversion purposes, the 8 bits must set to (5bits << 3) | (5bits >> 2). Is that extrapolation? Imputation (found that term on wikipedia for filling in missing data)?
 
@Christoph 0
0
> -1;
 
user41796
@Christoph First part of what you're doing is just bit packing
 
@GlenH7 yes
 
user41796
Your requirements for being within particular bits is just shifting the bits
 
user41796
I don't know that I'd hard code into the name the fact that they have to be shifted, but it sounds like that's what you're asking for.
 
4:55 PM
It's part of the color conversion problem I opened yesterday
 
user41796
too busy; didn't read. :-P
 
I need to convert a color channel (like red) from m bits to n bits, where m < n.
 
Hi all. I asked my first a question on programmers.stackexchange.com yesterday. It has an answer, which was upvoted, but the answer doesn't address my question at all.
 
user41796
Maybe try:
uint colorDataFromWire;
uint colorDataShifted;
... //Fill colorDataFromWire
colorDataShifted << ColorDataFromWire
 
@Christoph it's easy, it's (M!)/ (M-N)!
 
user41796
4:58 PM
I haven't twiddled bits in a long time, so that syntax is wrong
 
@astallaslions did you flag your Q?
 
how do I convince my coworker that giving my boss (a completely non technical user) full access to the tables driving my application is a really, really bad idea? at least just the ability to edit/delete/etc as needed?
 
@GlenH7 don't worry. I don't need the code, I need a verb that I can use to name my function
 
user41796
@Christoph How about ShiftFromWire?
 
@JimmyHoffa No. From what I understand I don't have enough rep.
 
user41796
4:59 PM
@astallaslions You can reference your question in here by just pasting the link.
 
@enderland backup the database, tell him it's a great idea and you told him to do it a long time ago - so he'll be happy to remove it and never do it again after your boss destroys it and you restore the backup.
 
user41796
0
Q: Are there any scenarios where the 'Dispose Pattern' shouldn't be used on an Object which contains managed and un-managed resources?

astallaslionsMSDN says that to properly clean up an object which contains managed and un-managed resources, you need to implement the 'Dispose Pattern'. Given that the class implements the IDisposable interface, and overrides the Object.Finalize() method (has a destructor), is there any reason why the compi...

 
@astallaslions Ah yeah, you need like 10000 rep to flag Qs
 
user41796
@astallaslions - part of the problem is you significantly changed your question with your edits.
 
@JimmyHoffa the nice thing is I don't think he can destroy the database or anything since everything is in SQL
 
5:00 PM
@enderland just send him a link to google and tell him it's the database
 
but accessing them all to change all the underlying data driving this application terrifies me
 
@GlenH7 why the "FromWire" suffix? Simply "Shift" won't cut it but I don't understand why you're suggesting that specific suffix
 
user41796
@enderland Just give him select and be done with it. Tell him he doesn't need those pesky insert, update, or delete operations.
 
@GlenH7 I didn't change the question. I just removed all the unnecessary details, and worded it in a more straight forward manner
 
user41796
@Christoph I'm assuming you're reading something off of a bus or a chip or a something. Hence "from the wire." /s/FromWire/Your_Actual_Source/g
 
5:02 PM
@Christoph he meant use the >>= operator
 
user41796
@astallaslions unnecessary details and less than apt titles lead people down the wrong path. Removing that is equivalent to dramatically changing your question.
 
@GlenH7 the data can come from anywhere. I may come from an external device, but that's not the point
 
user41796
@JimmyHoffa I couldn't remember where the assignment was with the twiddling
 
@GlenH7 right after the <|> but before the <=<
 
user41796
Sorry, I didn't mean to press enter. Please re-read the question. Regardless of whether DisposeBlahResource is virtual or abstract, I wasn't asking about how to make the Disposer class better. I was asking if there were any unforseen side effects of making the 2nd and 3rd code snippet syntactically equivalent. So if you typed the 2nd snippet, it would be exactly equivalent to the 3rd. — astallaslions 18 hours ago
 
user41796
5:05 PM
@astallaslions - as an aside, don't ask high rep (or any rep) users to re-read your question. If they can't tell what you're asking then the obligation is on you to reformat the question so it's more clear. It's not their fault they can't understand what you want.
 
user41796
And that may be the crux of why you're not picking up any answers on your question. You received one from a high rep user on the site and basically told them "you don't understand." Future visitors will look at that and say "clearly I don't understand either." and will close off that browser tab.
 
user41796
@Christoph So are you trying to name the uint that holds the data or the function() that shifts the data?
 
@GlenH7 I'm trying to name the function that shifts (and fills up LSBs with MSBs from the original data)
 
user41796
@Christoph That doesn't make sense to me. Would you explain in a different way what the function is doing? Or paste some pseudo code?
 
@GlenH7
Input: 5 bits (b10111)
step 1: shift left (8-5) places: b10111000
step 2: fill LSBs with MSBs from original data: b10111101 (<- that's the result)
 
5:12 PM
@GlenH7 I see. I didn't realize it came across that way. I reformatted the question to address more clearly what I was asking, as you said. I was not trying to be impolite or anything to the answerer - it just wasn't what I was trying to ask as an inexperienced SE user.
 
user41796
@Christoph I don't think you'll find a common term for that.
 
user41796
One way of looking at it is to say the new bit from the shift is supplied by the input. But I don't know of any standard shifting operation like that. Maybe with a counter, but that's a stretch.
 
@GlenH7 I already have a working implementation
 
user41796
@astallaslions Your question now reads as a poll, btw. You'd probably be better off asking "Why wouldn't I use IDisposable" and keep the relevant parts from the question. That invalidates Telastyn's answer which is discouraged, but I think that's the only way to tweak the question and make it constructive.
 
user41796
@Christoph I wasn't saying it couldn't be done. Just that it's unusual.
 
5:20 PM
1
Q: Is there a better alternative than abusing the IDisposable pattern?

Robert HarveyConsider the following (Microsoft-sanctioned) code: <% using (Html.Form<HomeController>(action=>action.Index())) { %> <input type="text" id="search" /> <input type="button" value="Submit" /> <% } %> The using statement has but one purpose here: to add a </form> tag to the end of the...

Since you guys are talking about it anyway.
 
user41796
@RobertHarvey I saw that and said "Wait, Robert Harvey ask questions?!?"
 
@GlenH7 ah I see. Maybe this is also a good question for graphicdesign SE? They should be able to tell me either a) the name of my algorithm or b) what I should do instead (and tell me that name of that)
 
I suspect the answer has something to do with higher-order functions and possibly lambda expressions.
 
user41796
@Christoph quite possibly, yes.
 
@astallaslions What specifically is your issue with the current .NET disposal pattern? It feels like you're rewriting a bunch of boilerplate everytime you have to do it? Or something else?
 
5:24 PM
@GlenH7 it might be regarded as opinion-based there or simply off topic, I just read their "What should I ask here?" list
 
@JimmyHoffa I'm not having any issues. I was just curious if there were any reasons why that pattern couldn't be embedded into the language
 
user41796
@Christoph Drop it in chat first, see what they say.
 
yup
 
@JimmyHoffa I've been interested a lot in language design, and it seems like every time an object uses managed and unmanaged resources, you should use that dispose pattern. I thought about it for a while and couldn't think of any circumstances where you wouldn't want to use that pattern
 
You wouldn't want to use it when you can simply let objects go out of scope silently, and have the GC deal with them naturally.
IDisposable should be the exception, not the rule.
Unfortunately, finalizer semantics in C# are not intuitive. If they were, I suspect IDisposable could be used a lot less often than it is.
 
5:29 PM
I see. I was suggesting that the compiler do that only when an object implements IDisposable and overrides Object.Finalize(). In all other scenarios objects would be normal
 
@astallaslions reasons it couldn't be embedded in the language? No, but it would require language level support with language level keywords which puts a lot of ownus (and risk) on the compiler devs to ensure that whatever language feature they add to let people specify disposables works perfectly everytime, and is extremely flexible for odd scenarios because any scenario it can't clean up after means the language is causing a resource leak
@astallaslions and dispose has nothing to do with managed resources, only unmanaged ones
 
In other words, the benefit may not justify the cost.
 
Thanks. I'm a little confused about the point of IDisposable then.
 
@RobertHarvey I don't see any design at the language level that does, myself. The risk it puts the developers at is too great unless you maintain the current pattern's availability
@astallaslions It exists for the using() sugar.
there's no other reason for that "pattern" - you have to implement half the pattern and the compiler does the rest with the using() - that's as much help as the language can give you without taking away your ability to flexibly ensure your unamanged resources are handled precisely how you want - which the compiler devs cannot foresee all the intricacies of
 
I thought that the point was to use IDisposable to make cleanup deterministic and to relieve stress on the background finalizer thread.
 
5:33 PM
When a using statement goes out of scope, the Dispose() method on the IDisposable interface is called.
That's all.
 
@astallaslions That's what gc.SuppressFinalize() does - IDisposable exists so the using() feature in C# has something it can guarantee can be used to call Dispose() on
 
It's original purpose was to give the managed developer a hook, so that they can clean up unmanaged resources.
 
I was under the impression that all unmanaged cleanup should be done in the destructor, so even if a caller forgets to call Dispose(), the background Finalizer thread will still be able to clean up the mess
 
The problem is, that's not deterministic. We don't know when the GC will do a cleanup. We know exactly when Dispose() will get called.
 
`using()` is sugar that expands
using(var sw = new StreamWriter("bla")) { // CODE }

into
var sw = new StreamWriter("bla");
try { // CODE }
finally { (sw as IDisposable).Dispose(); }`
@astallaslions Yes. That's what a finalizer is for. If you call gc.SuppressFinalize() from your Dispose() however you are popping your object off the finalization Q - or at least off the freachable queue if not both queues. Either way, the ideal is that people use using() and get deterministic disposal of your unmanaged resources and you SuppressFinalize so you don't waste finalizer time and can unpin the object (objects with finalizers are pinned so the finalization queue reference is
not invalidated)
finalizers are one of the sneakiest performance problems in .NET because so few people realize the size of the effect they have.
 
5:38 PM
That is exactly why I was thinking that it would possibly be worth it to have the dispose pattern automatically implemented by the language.
 
huge source of GC slow down because the pinning fucks up compaction and can totally fuck up your ephemeral segment
@astallaslions it can't be
Not in a way as flexible as it is now
 
Can I ask when that flexibility is beneficial?
 
They would have to remove the consumers interaction and implementation of the Dispose pattern, as for finalizers those are a necessity. You can't count on the devs to guarantee unmanaged resources are cleaned up.
and the compiler cannot account for all the intricacies of what's necessary to clean up unmanaged resources
 
Remember, Dispose() is the exception, not the rule. The goal should be to write things so that they can "dispose" themselves (as all managed resources are perfectly capable of doing).
 
@RobertHarvey to be certain - with managed resources you should never bat an eye or have to think about it.
 
5:40 PM
Sorry I think I wasn't clear when I said "automatically implemented by the language."
 
@astallaslions good luck having a perfectly GC'd language that cleans up everything of every type including unmanaged resources. Master that and you can rule all the languages, good luck I'm sure no one else has tried
Unless you want C++ destructor functionality instead of finalizers
 
@JimmyHoffa lol I'm not trying to be some smartass who thinks I know more than everyone else. I am genuinely not understanding the reason it couldn't work.
It is a fualt of my own for not being able to explain concisely enough my question.
 
It probably could work, given enough time and effort. The real question is, is it worth doing?
 
I clearly don't know the details of the compiler and how much work it would be to implement, but I do know that plenty of people completely misuse destructors and the disposable interface
 
@RobertHarvey A perfectly GC'd language? Sure. But I don't think that's possible without deterministic GC which is slowish. But now we're getting pretty far off C#. As to why it can't be done in C#? The current pattern puts into a devs hands the ability to control the disposal of their unmanaged resources - an absolute necessity because the compiler can't know how - and any other pattern or approach to raising the functionality to the compiler would result in the same amount of work for devs
@astallaslions C# doesn't have destructors
 
5:46 PM
It has finalizers.
 
It is destructor syntax that overrides finalize
 
@astallaslions and yes people misuse them and the disposable interface all the time, but the solution isn't to take away a devs ability to properly dispose of their unmanaged resources just because lots of devs don't know how to do it
and there's no way to maintain a devs ability to implement their disposal without some form of that pattern where half the work is on the dev and only the using() sugar part can really be done by the compiler
 
@JimmyHoffa I'm not saying that the compiler should somehow figure out how to handle cleaning unmanaged resources.
 
you could change the way that pattern is implemented or how using() worked - but no changes will result in devs not having to implement their disposal code manually short of a totally different type of GC in a different type of language
 
It's too bad that they didn't use more generic terms, like IScoped or ITransaction and Complete().
The using keyword is OK.
 
5:49 PM
@RobertHarvey You can use TransactionScope to do the same thing
 
user41796
@RobertHarvey Were they worried about colliding with terms in use in the field?
 
No, I think they were simply trying to solve a specific problem: the cleanup of unmanaged resources.
IDisposable just happened to be convenient for other... uses.
 
user41796
@RobertHarvey makes sense. The C++ folk are semi-paranoid about that when they declare new keywords.
 
For good reason.
 
user41796
^^^ Yes, because the C++ folk never get bent out of shape over anything.
 
5:52 PM
@RobertHarvey if you never looked at the TransactionScope class in .NET - it's a good one to know that isn't often used but provides a lot of functionality that can come in very handy if you know it's there
 
I'm having a look.
 
@RobertHarvey it will automatically tie in with T-SQL and even using MS-DTC to distribute it's rollbacks to be applied to like MSMQ or any SQL execution it's done
 
Yeah, that's a whole scene. There's a whole Transactions namespace built around it.
 
@RobertHarvey Yep. It's a very cool section and the fact that it allows some distributed transaction functionality that's pre-ws-atomic is worth knowing about
 
I need a learning plan. I link all this stuff in an email account that's specifically devoted to only that purpose (things I'll read later), but I never go back and read any of the links.
 
user41796
5:55 PM
@RobertHarvey Correction: You need a learning plan that gets you back to the items you want to learn.
 
Step 1: Open email
Step 2: Select all
Step 3: Delete
Step 4: Complete all the learning
 
@RobertHarvey pfft. Eff planning. Planning is for when there's a final end-goal, there's no such thing for learning.
You're learning shit now, you learn stuff every day on SO I'm sure
 
@GlenH7 I've only ever put anything in there that I thought was important. There's about 2000 links in there right now.
 
user41796
@RobertHarvey What I try to do is carve off specific time for that. And during that time, I go back to my list of links in order to explore those topics.
 
@RobertHarvey it's hard to go start on anything like that knowing there's no result you're driving towards other than "learn stuff - might be useful"
So fuhget 'bout it
 
5:57 PM
@JimmyHoffa It's good learning, but most of it is surface learning. I know about Angular, but not enough to answer questions about it or get a job using it. I know about FP. I know about things.
 
user41796
I'm also fine with printing off articles as some of the time I don't have (don't want) connectivity, but I'm content to sit and read something.
 
@RobertHarvey just go learn lambda calculus and build a solid intuition for term rewriting. Everything else is based on that, you can just delete that entire email account then.
bubble pop is visual term rewriting
 
Great. Or maybe I'll just play with bubble pop for awhile, and become completely enlightened.
Has anyone figured out how to use that bottom section yet?
 

« first day (1453 days earlier)      last day (3542 days later) »