« first day (1791 days earlier)      last day (3184 days later) » 
00:00 - 19:0019:00 - 00:00

12:03 AM
@MichaelT Race for the Galaxy?
 
looks fun
 
user55340
12:24 AM
@JimmyHoffa (and @Ampt) - a very good AI implementation: keldon.net/rftg
 
user55340
12:51 AM
@Telastyn the real problem is when you have crazy billionaires going after trophy animals. I'm sure that one was one of a kind... well, maybe.
 
?
 
user55340
Steven Spielberg (of Jurassic Park) next to a trophy triceratops?
 
what is that in reference to me saying?
 
@MichaelT as I was asking... about that uibezierpath, is it possible to put some gesture responder once it's drawn in the screen?
 
user55340
I think it was about the Facebook rant the other day... though I might have misread it (small mobile screen and what not)
 
12:53 AM
@MichaelT and thanks for the note :)
 
oh, whatsname was talking more about it
 
user55340
(and I can't edit it now... sorry... @whatsisname pretend that was for you instead)
 
user55340
@jane I want to say yes, though I haven't done that level / depth of Cocoa coding in a long time. If it isn't possible to get that UI Object bound, it might be possible to test if something is within it via containsPoint.
 
user55340
Another approach would be to use it as a clipping path on something else (via addClip) and have that something else have the responder.
 
I saw a website, which cataloged software design patterns. The curious thing was that it also showed how frequently each pattern was used. The scale had 3 gradations: rare, moderate, frequeny. Of course, this indicator was rough and relative.
I can't seem to find this site again, unfortunately. p.s. Found it
 
1:01 AM
@MichaelT, clipping path is interesting, I would try that. thanks for the advice!
 
user55340
And old objective C project of mine: github.com/shagie/MacSums
 
user55340
(note that it was written back in 2010 - so its a bit older than that first commit)
 
user55340
Its meant to help solve Killer Sudoku puzzles. "I've got a region of four cells that sums to 22, - it must have a 4 and can't have a 5 - what are the possible combinations?"
 
user55340
I got stuck with porting it to iOS at the time. The button bar that I use on Mac can have multiple selects - the iOS one couldn't. So I was going to have to implement a custom control and then moved on to other projects.
 
1:22 AM
yes, I was originator of the facebook rant yesterday
 
user55340
1:43 AM
And I wish I got refunds on close votes or deleted posts. programmers.stackexchange.com/questions/291246/… -- that just wasted one.
 
user55340
 
user55340
Ahh! That's why. His IP address is in the original history.
 
user55340
 
user55340
OK - let me delete this one and re-ask. Thanks! Very much appreciated. — Steve 34 secs ago
 
user55340
That will be a third question, which at this point I will guess will likely be closed too... which will make for the three recent questions being down voted, closed, and/or deleted... question bans start somewhere around there IIRC.
 
user55340
I really wish I had refunds on close votes on deleted questions.
 
user55340
 
user55340
That's four close votes that have disappeared to the pink background already... 2.5h in from vote reset.
 
user55340
2:21 AM
 
user55340
And another from an hour ago.
 
user55340
33
Q: Refund close votes for questions deleted on the same day

MichaelTWhen a question is deleted the same vote-day as it was closed, refund the close votes cast on the question. There are three situations where this comes up: Question has a close vote or two, a comment tells the OP that this is off topic (or about issues with the question) and the OP self delete...

 
@MichaelT that guys reaction is kind of funny
 
2:54 AM
@MichaelT [Watches truck crash videos for next half hour... Can't look away]
 
user55340
@RobertHarvey Don't you want to live in Russia now?
 
In Soviet Russia, truck crashes you.
 
user55340
@RobertHarvey the 'yep, thats two wheeling' woman?
 
user55340
2:59 AM
btw, if you want an entire site of... fun: /r/catastrophicfailure
 
user55340
 
user55340
(and video - at 2:20 is quite interesting for a view of the galley)
 
user55340
3:20 AM
Did you know that Budweiser makes a line of mineral water? Its called Bud Light.
 
user55340
 
user55340
Thats four votes to the pink background tonight.
 
user55340
 
3:37 AM
for sequential data model, we have linear/binary search algo to search data.
are there any other search algo for sequential data models? array/linkedlist
 
4:12 AM
Your question is off-topic here. Perhaps Programmers or Software RecommendationsAjoy 40 secs ago
 
user114359
I know this is a duplicate of something but I cannot find it. Maybe @gnat can find it?
 
user114359
-1
Q: Advantage of generic base class

Learning DotNetWhat's the advantage of having a generic base class and a derived class having itself as the generic parameter on the base class. e.g. public abstract class MyBase<T> {} public MyDerived : MyBase<MyDerived> {}

 
12:06 PM
Good evening! :)
 
Happy Coffee Day!
 
Oh yea, happy Coffee Day! :)
 
12:30 PM
Happy coffee day
 
The cafeteria once again has "(non-alcoholic) coffee liqueur flavored coffee".
 
@whatsisname I don't understand why people are ranting about this... did they just now realize that there's a bunch of rich assholes going around shooting wild animals just because they can? It's an industry, it didn't just pop up because this one jerkface. Last time I checked tagging an animal didn't make it any more important than the other countless ones people hunt
@ThomasOwens how was the coffee flavored coffee yesterday? And it's coffe liqueur flavored? That's curious
 
@JimmyHoffa I didn't get any yesterday. They were brewing it when I went down for my last cup and I didn't want to wait.
 
BTW, I know this is old, but always worth another larf thedailywtf.com/articles/The_Brillant_Paula_Bean
Atwood is from (or went to school in?) Boulder? Who knew
 
1:11 PM
@JimmyHoffa one of the bloggers I follow lives out there (well close)
@MichaelT that's where I got that video from in the first place ;) though that ship is intentionally doing that, I think I've seen taht video before
 
1:33 PM
Happy Coffee Day!
@MichaelT that's hardly fair, it was clearly meant to do that :P
 
yeah, I need to get better about that... I keep delaying making my pot in favor of getting shit done right when I get in
 
Remember, a coffee day is a productive day!
 
user55340
@Ampt now put on an engineer hat and design the toilet in there.
 
Contemplates taking out ads for coffee day quotes...
@MichaelT Makes sign for bathroom saying only available during horizontal alignment
 
user55340
Or the galley with the coffee pots.
 
1:38 PM
@Ampt We have HiLine coffee ship us our coffee at home - every package has a business card in it with a different coffee quote - right here I have on my desk "MAY YOUR COFFEE BE STRONG AND YOUR WORKDAY BE SHORT."
 
shit.... that is a problem
 
user55340
(Hint, it's at 2:20 in the second video)
 
user55340
Actually you can see it there.
 
Can you imagine designing the load members on that long rod supporting the top half of the ship?
 
1:40 PM
...if an entire room; walls, floors, cieling, swivel on a gyroscope like one big box, and the one next to it the same....how could you get from one to the next?
 
user55340
Hmm. Ask a real engineer. Hey, @GlenH7 what do you think?
 
user55340
@JimmyHoffa the doors are on the walls and floors
 
they likely have two sets of halls and stairways - one for each orientation
 
user55340
Rotate, ceiling becomes wall, wall becomes floor.
 
the rooms themselves don't rotate, only things in the rooms
 
1:42 PM
@MichaelT you mean in that vessel? That vessel doesn't operate like I mentioned - the floors and walls and cielings move
 
rotating rooms adds a whole new level of hell haha
 
@Ampt I am asking about an alternative solution - how would you solve for the spaces between? Oh hell maybe the real solution would be to only have one big cube with all the rooms on one big gyroscope...
 
@JimmyHoffa rooms have to be cylinders if you want to flip the whole room, otherwise the corners would bash together
huge waste of space designing for whole rooms to rotate
 
@Ampt unless there was sufficient gap
 
packing efficiency becomes packing inefficiency very quickly
 
1:44 PM
If you had the engine - or a secondary engine - also driving the gyroscope, you could make it sufficiently large and functional to maintain a very large set of rooms in one segmented box - or orb - even at all times. Would that however be seaworthy though?
 
the optimal way to do it would be to have each room rotate individually so that you only need tan(45)n from the center of your room to the outside wall of the next
the video states that the ship has no propulsion - it's probably a very hard problem to solve, turning an engine on it's side like that
especially one large enough to power a ship
 
user55340
@Ampt btw, generators tend to only work in one orientation... Right?
 
all your oil ends up feeding one cylinder
@MichaelT eh... smaller ones not so much, especially if you just fuel inject them
not enough pressure difference from the top to the bottom I would think
 
@Ampt interesting...
 
user55340
300 kW iirc.
 
1:47 PM
remember, pressure is not linear with depth
300kW is... 400hp
easily doable with a small block v8
and that you could mount on a trunion, if you even needed to
again, not sure if the pressure differential on that scale would hurt too much
or you could just design for it - maybe use an old allison v12 from WWII
those are made for essentially any angle
 
could that drive a small-building-sized gyroscope?
....from inside the gyroscope?
 
> The V-1710 has 12 cylinders with a bore and stroke of 5.5 by 6 inches (140 by 150 mm) in 60° V-format, for 1,710.6 cu in (28.032 L) total displacement
> The initial rating of 1,000 hp (750 kW) was incrementally increased; the final V-1710-143/145(G6R/L) was rated for 2,300 hp (1,700 kW)
one of my favorite WWII era engines
I'm gonna go out on a limb and say yeah, it could
 
Then the only question I guess is... would such a structure as a small building sized gyroscope with a small building held level inside...be seaworthy?
 
you would just need to give it some external attachment at the center of rotation and a ton of gearing
 
@Ampt sub diesels were the best
 
1:52 PM
@Ampt I'm imagining a 4 story building, where the first story is entirely the gas tank for that thing to do it's business
 
it may be more comfy since it's all gyroscopically stable
@JimmyHoffa you're not far off with a compression of only 6.5:1
 
@Ampt comfy yes, but how well would the whole structure stand up to the stresses of the sea?
 
@enderland until you turned them on while you were below the surface. Whoops! There goes all your breathable air in 2 seconds or less!
 
@Ampt they had snorkels by the end of the war
but you still had to be pretty close to the surface
 
@JimmyHoffa after seeing that they managed to lift the business end of that entire thing up out of the water on that little pillar, I'm guessing they could design around the stresses, yes
your ship would be noticably larger though
@enderland can you imagine hydrolocking one of those engines?
 
1:55 PM
@Ampt screw space engineers, ship engineers needs to be a thing now
 
you'd shoot a rod straight out your hull
@JimmyHoffa I hear they're adding planets soon. throw in some water and flotation mechanics and we're pretty much there!
 
submariners in WWII era were crazy
 
@enderland pshaw, submarines in the civil war FTW.
 
casualty rates were crazy high for submariners in WWII (though I guess the rate was high in Civil War, too. ha)
 
@ThomasOwens @MichaelT
 
1:59 PM
@enderland considering how long the story existed merely as a myth, I'm going with it was 100%
 
Also good morning progs! Happy coffee day
 
crazy mofos trying to stick bombs on the bottoms of ships.... seriously they were nuts
 
@MichaelT did you hear? the new intellij 15 preview has native hidpi support now. Trying it now
step 1: format your hard drive to remove any trace of haskell.
step 2: download java
 
@durron597 there likely is but I don't know one - though he's basically asking to do something that has been well and truly obsoleted industry wide - WebSockets replace what he's asking to do, and there's definitely WebSocket support in the modern haskell web frameworks
 
2:04 PM
@MichaelT it's glorious! it only took them 9 months and all
 
holding the HTTP connection alive was the mega-alpha version of WebSockets when people were first trying to use HTTP for server side push behaviours... He should just use WebSockets
 
@JimmyHoffa Can you put that into a comment? They've already left the SO room I think.
Thanks
 
Just use WebSockets - you don't want to do classic long-lived HTTP connection for server side pushes, WebSockets were standardized to replace this kludge. Googling Haskell WebSockets brings up this immediately, though I'm willing to bet the major web frameworks all have their own WebSocket support — Jimmy Hoffa 19 secs ago
 
@JimmyHoffa Tyvm!
 
Ship stabilising gyroscopes are a technology developed in the 19th century and early 20th century and used to stabilise roll motions in ocean-going ships. It lost favour in this application to hydrodynamic roll stabiliser fins because of reduced cost and weight. However, more recently (since the 1990s) a growing interest in the device has reemerged for low speed roll stabilisation of vessels. The gyroscope does not rely on the forward speed of the ship to generate a roll stabilising moment and therefore has shown to be attractive to motor yacht owners for use whilst at an anchorage. One of the...
but that's a completely different device than I refer to - that is simply a gyroscope in the vessel acting as an active counter balance
 
2:18 PM
@MichaelT @GlenH7 I don't want to edit this up to the front page. Can has delete votes pls
 
user55340
@durron597 mine is already there. It's old close - any 10k can cast away on it.
 
@MichaelT Yeah but I don't even have 4k
I forgot that I can't see delete votes, I've been spending a lot of time on SO recently.
 
So that "passing an exception through an out parameter" question. Which would be preferable, returning an exception via an out parameter, or converting it to some sort of error code?
For some reason, the idea of returning an exception makes me uncomfortable. Is there something evil that the caller could do with an exception? Isn't a stack trace too much information to be leaking?
And swallowing an exception doesn't seem like a good thing either.
 
pfleh. This is why I prefer the Exception monad to this try catch garbage
 
Does the Exception monad propagate through the call stack like an exception does, or do you capture it in an object and return it?
 
2:28 PM
monads act as a barrier - nothing comes out without you deciding how to handle the barrier - in the exception monad that decision is "Was there an error or not? If so X, otherwise Y"
 
It sounds like what she needs is an Exception monad in C#.
Or simply an object that returns error information.
 
...in C#, just throw the exception...
The exception monad gives the same behaviour as a throw but without losing extensibility
 
Yeah, she's eliminated that possibility, and logging.
 
@RobertHarvey I answered it too just now, fwiw.
 
@durron597 If you used an anonymous type or a tuple, you could eliminate the need to add another class.
Ah, never mind. Yeah, a new class is probably the right way to go. If you're going to do that, though, you might as well throw those two things in a class with the collection, and just return everything together.
 
2:36 PM
@RobertHarvey Perhaps
 
That way you can avoid declaring an out parameter.
Which was my objection in the first place.
 
@RobertHarvey I would probably create two classes and compose the exception class into it, because I don't want exception behavior in the same class as useful behavior
 
Well, you're going to get crap back anyway, if the exception is thrown.
 
@durron597 I have no idea what you're going on about now.
 
@ThomasOwens STCI. It's basically a tag like
@RobertHarvey I edited with this conversation in mind.
 
2:42 PM
@durron597 There's nothing to do there, though.
 
@ThomasOwens Ah. Right.
 
3:00 PM
Your question might be a better fit on Programmers. This is an architecture question, not a programming question. — theMayer 57 secs ago
 
3:26 PM
@durron597 I presume your answer about that thing involved creating a class with a T and an Exception -> You're halfway to the exception monad right there. All you need to do now is add a function: public WhateverClass<U> Next<U>(Func<T, WhateverClass<U>> thingToDo) { return this.Exception != null ? new WhateverClass<U>(default(U)) : thingToDo(this.Value); }
 
@JimmyHoffa sorry, you had me up til monad.
2
 
@JimmyHoffa Do you try to make code unreadable on purpose?
 
@durron597 no he just writes haskell ;)
 
Poor Jimmy, just trying to help us write better code, and we just shit on his love for functional programming.
2
 
4:04 PM
@Ampt you can't shit on my love for functional programming, it's immutable; you can only shit on copies of it.
9
 
psr
Is it worth writing tests for my Mercury HTML generating code? It's a bunch of stuff like return h('div',{classname:item.IsHidden ? 'hidden' :''},[h('div',[item.text])]); It seems like they would be fragile enough that they would be more trouble than it's worth.
 
4:19 PM
@JimmyHoffa rather I would create a new copy in which I construct it with the shit on top of it, no?
 
So my third party API returns a class that looks like this:
 
@psr you should use regex!
 
public class ThirdOuterStructure {
  List<ThirdObject> firstList;
  List<ThirdObject> secondList;
}
I want to wrap this class, and I want to provide all the information available, but I don't want clients to depend on ThirdObject
ThirdObject is just a POJO
 
convert it and then wrap your converted class?
not sure how performant it has to be, that may not be the best option
 
@Ampt That's exactly what I'm worried about
 
4:27 PM
can you convert it as it's received?
 
@durron597 what is the purpose of this structure? Are you writing zippers in Java?? O_o no, certainly not. You must be drunk
 
I'm thinking about lazy loading
 
or is there a third party library doing the receiving/packaging
 
@JimmyHoffa It's an order book
 
@durron597 why does it have a first and second list?
oh they aren't a list sequence
they're different types of lists
 
4:28 PM
I'm just thinking that maybe you can recoup the cost of putting it in the POJO in the first place and use that time to put it into an object you want
 
@JimmyHoffa It's the bid and ask of a particular product.
I could totally rebuild the list structure with my wrapper object
I mean, maybe it's fast enough
 
right. So why don't you just create a decorator if that's what you want? Would that cause people to rely on the POJO?
 
I'd like to be able to just wrap the whole thing without actually changing the underlying data structure
I think I'm going to have to reimplement List.
 
are you giving them access to the underlying objects?
or are you providing methods to do that for them
 
public class WhatPeopleShouldRelyOn { private ThirdOuterStructure _bla; /* information you want to provide */ } ??
what's wrong with the above?
 
4:30 PM
I believe the second means that there aren't any dependencies on ThirdObject
 
I need to provide getBids().iterator() for instance
@Ampt Yes, that is the biggest thing. I don't want any dependencies on ThirdObject
 
yeah, you'll just make a decorator list then
 
ThirdObject is actually IPriceLevel, which has a method getPrice() which returns third.party.library.ScaledDecimal which I also don't want to depend on.
If we agree the right thing to do is reimplement List with their List as a backing object then I can do the rest myself, I'm just not sure that's the right thing to do.
 
hey, I'm just a sock, I accept no responsibilities on the correct answer.
but there you just add the overhead of the extra layer of abstraction, which is negligible. so if performance is your problem, that should solve it.
 
@Ampt What if you're a 1970's labor union leader?
 
4:34 PM
@durron597 I suspect the answer is the same
 
@durron597 The right thing to do is have their List as a backing object. What's not clear however is what interfaces your object should provide; you suggest List, this is likely the right interface to provide to consumers - but the real question is what interface is going to be best for consumers ? Think about POLA and all the other important points to note regarding deciding on the design of the interface you'll provide to consumers. List may be the correct one to provide; I don't know.
 
@JimmyHoffa Yeah...
I think list is correct but I will think about it more.
 
@durron597 thinking is good; trying is also good. Put it together real quick- try to consume it, see what you think of it then. Extensions to the interface you find missing for the consumers? Pitfalls you see the consumers will fall into? Find it feels perfect? Etc.
 
@JimmyHoffa Well I'm currently sending an unwrapped object to different parts of my system.
This is the last dependency on their objects that gets outside of the wrapper package
 
This is where practice-practice-practice comes in key to doing this shit right, the practice makes you faster at whipping up design attempts - so you can try these things quickly and see how they'll actually play
I'm constantly writing up entire design prototypes and attempting to change designs - two, three, five times before I settle on which approach seems right.
 
4:45 PM
The problem with reimplementing List is that it has so many methods
It's hard to whip one up quickly, that's why I let the unwrapped version make it to production
I'd have to reimplement Iterator too
 
5:20 PM
can't you just basically pass the methods on to the sublist?
 
@Ampt ThirdDifferentObject = ThirdObject.getData() and I don't want a dependency on that, either.
 
public Iterator<Object> getIterator() {
    return firstList.getIterator();
}
 
public Iterator<ThirdObject> getIterator() {
    return firstList.getIterator();
}
@Ampt See?
 
BAM! problem solved
kicks feet up on desk
I think we're done here, folks
 
psr
@durron597 What about Cast<IEnumerable<ThirdObject>,IEnumerable<ObjectILike>>
 
5:30 PM
implicit casting = best casting
 
@psr because Java would ever have useful generic facilities
 
psr
@JimmyHoffa You had me at "because Java"
 
@psr I don't know how to do that in Java, but I'm not sure it's impossible... maybe it is?
 
psr
@durron597 Cast to scala? I have no idea.
 
Well, wait, it's not Cast so much as Transform
 
5:32 PM
Cast<IEnumerable<Java>,IEnumerable<Scala>>
 
psr
@Ampt Should work.
 
Ship it!
 
lazy evaluation would be so good here. maybe i'll rewrite the whole codebase in haskell
 
you know, if you do your transformation from java to scala in python, you can just duck type it!
 
Hmm. I have a problem that I'm sure should have been solved hundreds of times before. I have a directory structure that contains a whole bunch of files. Ultimately, these files can be grouped into two different types, each of which represent a certain collection of files.
 
5:34 PM
recursion
use recursion. It'll work, trust me
 
@durron597 ironically - you work on software that is been really the main stay of what Haskell has been used for in industry - trading desk software.
 
@Ampt Uhm. That's a good way to navigate the directory structure. But I was thinking more about creating the objects.
 
@ThomasOwens no, no. You need to use recursion inside the folder too. Maybe sprinkle a little regex on there to make it really fly.
 
@Ampt That's...not helpful. :\
 
@Ampt and some HTML parsing
@ThomasOwens He's a sock, what do you expect?
 
5:35 PM
Most all of the real functional programming language use in the industry is in financial instrument software because quants are all mega mathy and so it's natural to them to write their algorithms as such
 
@ThomasOwens it's lunchtime on thursday, I ran out of helpfulness early this week.
1 hour ago, by Ampt
hey, I'm just a sock, I accept no responsibilities on the correct answer.
 
@Ampt brb, celebrating coffee day
 
@ThomasOwens you want to seperate them?
 
@ThomasOwens you have a set with a partition. Define the partition conditional...
 
psr
5:37 PM
@Ampt Regex worked great for my unit testing! I wrote a regex that matches everything and ran it against the source code. 100% coverage in just a few seconds of test writing.
 
> Choose one language to learn: JavaScript, Ruby, or Python.
or Java or C# or Haskell or PHP or ...
 
@Ampt No, I just want to make objects that point to the files and have a little bit of metadata.
 
durron597 quickly runs out of breath and dies
 
@JimmyHoffa I don't know what you mean by that.
 
@ThomasOwens I'm not seeing the problem yet
 
5:38 PM
These two objects are parent-child, too.
 
@ThomasOwens you have a set (of files?) that should be partitioned into N sets (of files?)
 
No, no.
 
you didn't describe your problem well, what's in this folder, and what type of data structure do you expect to represent it as?
 
OK. Let me start from the top.
 
foo.txt, bar.txt, quux.log - you wanted text files and log files? Or?
 
5:40 PM
@JimmyHoffa yeah, unclear what you're asking
 
I have 28 different file types, organized in some arbitrary way. These files represent one or more images and views. The relationship is that a view is made up of images. But the directory structure may or may not reflect this, so I need to scan each and every file (recursively from a specified starting point). However, I need to build some number of View and Image objects to represent each view and image that I come across.
 
(I told you recursion was the solution)
 
As I scan each file, though, it may be part of an existing View or Image or I may need to create a new View or Image to hold it.
But until I've read all of the files associated with a particular View or Image, it may be in an incomplete state.
It seems like this should be a solved problem that's probably really simple.
 
@ThomasOwens so you gather all the files, then apply a partitioning function to them: You have X in your name -> Go to Partition (view) X, after applying that to all files you will have N sets of files that have been partitioned by (name?) your partitioning function - which was written to separate files by their view.
 
@JimmyHoffa I can't rely on the name. I need to look at the binary content.
I would prefer to do that once, since the files are large enough and there may be so many that I can't keep the binary content in memory.
 
5:46 PM
@ThomasOwens whatever. That's the job of the partition function, it's got business logic that knows how to decide the partition it belongs in.
@ThomasOwens you would only look at one file at a time...
 
@ThomasOwens I assume you know how to create the recursive structure that holds your file pointers, metadata, type and status?
 
@RobertHarvey Yeah. That's defined.
 
public ViewIdentifier PartitionFile(string fileName) { /* figure out which view this file belongs in */ }
Dictionary<ViewIdentifier, fileName> partitionedFiles = allFiles.ToDictionary(PartitionFile);
 
How do I create my View or Image object, though?
I need to keep track of which ones I've come across and easily determine if a matching View or Image exists.
 
hash table?
 
5:49 PM
ohhh
no you want
 
With 1000-5000 Images?
It just seems like the lookup would grow insane slow.
 
hence the hashing, right?
 
allFiles.GroupBy(PartitionFile) this will return a Grouping<ViewIdentifier, string> which has a Key property of type ViewIdentifier and an IEnumerable<string> which is a collection of file names
 
use the image name or identifier as the key?
 
@ThomasOwens haha no. what? Psh. What do you think hashtables/dictionaries are for? Constant time lookup. They slow down with hash duplication.
 
5:50 PM
@Ampt Hmm. Yeah. I could use the View identifier and the Image identifier as the key.
I should probably create a wrapper around the four values that are used to uniquely identify an Image.
 
I think one thing you want to be careful with here is collisions
probably choose a hashtable that has built in collision detection and mitigation
 
Yeah. Collisions would be bad.
 
you don't want two sets of images grouped together
so after you calculate it, you should look at what's already there and make sure they both match
 
allFiles.GroupBy(PartitionFileByView).ToDictionary(group => group.Key, group => group.ToDictionary(PartitionFileByImageIdentifier))
^-- Dictionary<ViewIdentifier, Dictionary<ImageIdentifier, string>>
 
This becomes easier since every file identifies both the View and Image that it belongs to.
I've got to run, but I want to quick prototype this today. This should work well.
 
5:57 PM
oh you want a single read of the file -> public ViewAndImageIdentifier PartitionFileByViewAndImage(string fileName) where ViewAndImageIdentifier must be something that is a composite key usable for comparisons so if it's a custom class implement IEquatable<ViewAndImageIdentifier> interface on it and override GetHashCode() alternatively - just use a string delimiter and make it a composite string
 
6:12 PM
@RobertHarvey Did you ever get any swag for your 100k on programmers?
 
@durron597 he celebrated coffee day extra hard that day.
 
@Ampt really? i thought it was just a coincidence
 
@durron597 Yes. I now have a cup with EnsureCoffee() code on it, and a Programmers cup.
And a few stickers. And a couple of T shirts.
Is this:
        CollectionItemType item;

        for (var ii = 0; ii < collection.Count(); ii++)
        {
              item = collection[ii];
              // Do something with item
        }
equivalent to this?
        foreach (item in collection)
        {
             // do something with item
        }
 
6:27 PM
@RobertHarvey Nice
 
They're big mugs, too. About 12 ounces.
 
@RobertHarvey yes
 
@RobertHarvey I guess the diamonds here have swag too, I wonder how many they've made of some of the smaller graduated sites
@enderland Do you have The Workplace swag?
 
the proper notation is for (MyClass myIstance : myList) {}
at least in java
 
@durron597 yeah, I think I got a tshirt when the site graduated (and a red stapler lol)
 
6:29 PM
@enderland So THAT's where my stapler went
 
29
Q: Workplace Stack Exchange - Top User Swag (With A Surprise!)

Tim PostAs a thank you for being awesome by working so hard to launch a successful site, if you are on page 1 or 2 of: http://workplace.stackexchange.com/users?tab=reputation&filter=all ... I'll be reaching out to you this week to get your information to send you a little care package. What's in this s...

 
> Choose one language to learn: JavaScript, Ruby, or Python.
ugh
wth is this guy doing giving advice to people on learning to code when he's been doing it for...what, a year and a half? Maybe? Pfleh.
 
55 mins ago, by durron597
> Choose one language to learn: JavaScript, Ruby, or Python.
 
user20683
6:46 PM
@durron597 or Lua or Perl even
 
user20683
or Racket
 
Or Java?
maybe?
no?
ok :(
 
user20683
@Ampt Note that the listed languages are all dynamically typed. You know what Java isn't?
 
user55340
Woo woo! Winning people over with Hudson plugins. Got one click deployment working for a project.
 
user20683
6:51 PM
Amazon signs the Top Gear guys
 
user20683
Also White Lasers:
 
@Ampt considering what you're doing right now, I think I'd be happy with batch scripting... (confession: I actually like batch scripting, it's truly surprising what you can do with it)
@Ampt any forward movement yet on the whole "I want a career not a pidgeon hole" goal?
 
user20683
@JimmyHoffa I once saw someone's post about how they effectively out speed Hadoop with Bash
 
bash is gross, I said batch
bash is a seriously troubling script which people do awful awful things with
 
user20683
6:52 PM
@JimmyHoffa Macs don't come in batches
 
user20683
though soon that will change
 
@WorldEngineer that's ok, mac's aren't meant to be useful, they're just Art; they're their to be looked at, and while providing no functional use whatsoever people pay large sums of money for them anyway.
 
@Ampt LOLCODE
 
user20683
@JimmyHoffa hence my soon to be windows box (with something akin to a real graphics card even)
 
user20683
@JimmyHoffa there are a few things they are handy for
 
6:54 PM
@WorldEngineer boat anchor?
 
user20683
@JimmyHoffa frontend land
 
user20683
that place beyond the howling maelstrom of Javascript and Photoshop
 
@WorldEngineer myth. All that software runs on mac or PC, and the hardware is near identical between mac and PC
 
user20683
@JimmyHoffa outside of Iris, it's identical
 
user20683
6:56 PM
or it can be
 
@WorldEngineer I'm not sure I agree with the idea of learning dynamic typing before static. I would think it makes error catching and debugging much harder on the coder
 
user20683
@Ampt not harder, just different
 
@Ampt I'm of the mind type systems should be taught well before any language...
"This is a type, this is what a type is for, this is how it works, these are the types of relationships people can create with types. Relationship A is mutually exclusive with relationship B, but relationship C is available regardless of whether relationship A or B is chosen, but cannot exist without one of those two."
 
@RobertHarvey - no, not quite. In C# at least, if you're screwing with the collection, foreach is not viable. Also, the Count() is evaluated each loop, so if you're adding to it, the counter can go infinite.
There's probably also trickery with casting during the enumeration due to .NET 1.0 legacy stuff
 
00:00 - 19:0019:00 - 00:00

« first day (1791 days earlier)      last day (3184 days later) »