« first day (1866 days earlier)      last day (3128 days later) » 
00:00 - 20:0020:00 - 23:00

psr
8:00 PM
@MichaelT - Have you read about how for edge on Windows 10 the first time you search for chrome or firefox it won't let you see the download link, it tries to get you to look at the new edge features instead? Apparently MS has heard the "IE is a tool for downloading <X>" joke too.
 
that's messed up
 
user114359
@psr I just fired up Edge for the first time and typed in "firefox" into the bing bar and the download came right up. Then again I did an upgrade and Firefox was already installed.
 
@Telastyn The deadlocks are deterministic. Annoyingly deterministic.
 
psr
@Snowman I don't have windows 10, but I read it was for a new machine.
 
user114359
Ooooh, I just realized there is another bar that shows up, hang on
 
user114359
8:04 PM
 
@Telastyn I recently wrote an API with async and sychronous methods. It took me 3 tries to get the synchronous versions to work. It doesn't help that async/await's behaviour changes depending on the scheduling strategy.
 
psr
@Snowman Cool. I haven't seen a picture of it before. Apparently the link does come up though. I probably mis-remembered that.
 
user114359
@psr it very well could work differently on an install when Firefox is not already installed, I wouldn't put it past them.
 
user114359
Or it could be a Bing thing and not an Edge thing
 
hmm, looks like it wasn't async/await, I just didn't wait long enough for my insert to happen
 
user55340
8:07 PM
@psr Windows 10 sure sounds neat. Hmm... Win7ent. Yep, windows 10 sure sounds neat.
 
it's now at 10 minutes and counting.
 
user114359
But I do get some other garbage when searching Bing for Firefox on Windows 10 using Firefox...
 
user114359
 
wtf
 
psr
@Snowman Maybe once most people are on 10 they'll pull a cable company thing, and when you try to download a new browser you'll have to call the call center and talk someone into letting you quit.
 
8:08 PM
at which point we all switch to Linux
maybe
 
psr
If "we" means this chat-room, probably.
 
user114359
Mark Shuttleworth may have his own faults, but his OS is far less annoying with these things than Windows
 
user114359
Especially because I use Kubuntu, not Ubuntu, and they strip out the Canonical annoyances.
 
why not just use debian then
 
user114359
ecosystem. But I have considered switching to Debian, it's just that I have all of my server software set up on my other system and everything is just running so well I don't want to touch it. I'm nervous enough going to the next LTS release.
 
user114359
8:11 PM
Last time I used Debian was in the 90s and I was put off by it. While other distros were getting USB support and other new features, Debian was living up to its reputation of "stable"
 
user114359
I am sure it is better now though
 
user55340
Slackware forever!
 
user114359
@MichaelT Slackware came back from the dead, but no updates in almost two years now.
 
user55340
It's stable.
 
user41796
Anyone here been to any of the Visual Studio Live! conferences?
 
8:21 PM
In a file URI, can the host portion be a remote host? It looks like the answer is yes. But if it can be, what does a protocol like FTP offer over file://host/path/to/file?
 
shot in the dark: maybe the URI form works when it's part of the same local or network file system, but for talking to a totally different file system you need a protocol like FTP?
 
Hmm. Perhaps. But what's the difference between giving someone FTP access or access to your network file system? Unless FTP offers some kind of security that file URIs and file systems don't offer?
 
user114359
@RobertHarvey eh? Seems like a good answer for 2009 when Java 8 did not exist.
 
I win the headdesking.
 
8:26 PM
I think downloading a file from FTP is fundamentally a copy/transfer/etc, it generates a new file on your local file system, while on a the network file system you just read and write to the file where it currently is, even if that's on another machine
 
@Snowman The example he gave is not a closure. It's just an anonymous first-class function.
 
@Ixrec How is the FTP operation any different than me copying a local file to a new directory, though? Especially if both a file URI and FTP can go over the network?
If you give me a file URI, I can open a file for reading. If I can open for reading, I can copy.
There has to be something I'm missing.
 
@ThomasOwens if we're comparing to a copy, I don't think there is any difference at all
 
@RobertHarvey dang, you beat me to it.
 
@Ixrec There's no difference between an FTP copy and a copy of a file.
 
8:28 PM
my suspicion is that at the highest architecture astronaut level there is no difference whtasoever between file systems and the internet
 
user114359
@RobertHarvey yeah but isn't the function itself a lexically scoped variable?
 
But then...what protocol does accessing a network file using a file URI use?
 
user114359
In programming languages, closures (also lexical closures or function closures) are a technique for implementing lexically scoped name binding in languages with first-class functions. Operationally, a closure is a record storing a function together with an environment: a mapping associating each free variable of the function (variables that are used locally, but defined in an enclosing scope) with the value or storage location to which the name was bound when the closure was created. A closure—unlike a plain function—allows the function to access those captured variables through the closure...
 
@ThomasOwens I guess whatever the OS uses?
 
I must do further research into this.
 
8:29 PM
perhaps the only real difference is that one is "inside" the OS and the other isn't
what is the difference between a hard drive and a network socket? /shrug
 
user55340
Inside - nfs vs ftp? Both can be mounted as a file system.
 
user114359
Maybe we're splitting hairs here but I thought a closure meant you shared variables with what is essentially an anonymous inner function (aka lambda), but that function itself would also be a closure
 
I should really have picked the closure topic, I actually know what those are
 
user114359
@durron597 hah, I actually started writing a nonogram solver yesterday
 
8:31 PM
@Snowman I don't see how that would adequately convey the concept of closing over a variable.
 
Hmm. I must ponder more. But I'm out for now. Good night, Programmers.
 
user114359
I'm addicted to those damn puzzles
 
@Snowman You know nonograms are NP-complete, right?
@Snowman Do you have an iPhone / iPad? If yes, do you have CrossMe?
 
user114359
@RobertHarvey I agree, maybe this is a matter of the common terminology where lambda and closure are used interchangeably, and the more computer-sciencey definition of "sharing variables between scopes."
 
@ThomasOwens FTP is problematic, but at leasts it's a cross-platform protocol. The file: URI scheme specifies a syntax, but no associated protocol. The implementation is obvious when accessing files on localhost, not so when accessing files on a remote host. Should we use CIFS? Rsync? FTP?
 
user114359
8:33 PM
@durron597 right, which is why it is a fun programming challenge.
 
@Snowman See, it's descriptions like this that are the reason nobody understands closures. "Lexically-scoped name binding." Mmm hmm.
 
@Snowman I don't know if I'd consider them as much "fun" as I would "HARD" ba dum bump
 
@RobertHarvey agreed, to me a closure is just a function that retains a reference to a variable even after the function itself leaves the scope in which that variable was created
 
user114359
 
user114359
@durron597 I would consider them... NP-hard...
 
8:34 PM
That's all it is. It took me forever to understand closures because I thought they were something more than they actually are.
 
@amon But the spec lets you access files on a remote host. How does that work?
 
they're probably monadic endofunctor factories too, but I'll stick with "function and a variable"
 
Or is it something that's in the spec for what a file URI looks like, but doesn't actually work?
 
user114359
Ok so that answer gives a closure in the sense of "lambda" that most people use it, but it does not demonstrate sharing variables between functions which is the proper definition.
 
@Snowman How big do those get?
Crossme only goes up, so far, to the 70x70 range or so
 
8:36 PM
@Snowman ...create two closures in the same scope that access the same variable?
not sure why you'd want to do that
 
Excellent point:
Have you talked with your instructor about the design and requirements for the project? Please also read Open letter to students with homework problems and note that I, as an industry veteran would likely design this in a completely different way than your professor and could be leading you down a very wrong path for the syllabus for the class. — MichaelT 8 mins ago
 
user114359
@durron597 there are some 300x300, but it splits them up into 20x20 or sometimes 15x15 sub-puzzles to make them possible
 
@Snowman oy.
I've got about 50 puzzles left in CrossMe on the hardest difficulty level
 
@ThomasOwens Read RFC 1738, section 3.10: “The file URL scheme is unusual in that it does not specify an Internet protocol or access method for such files; as such, its utility in network protocols between hosts is limited.”
 
user114359
@durron597 The "advanced" group which are the big ones has 2,682, I have solved 167. There are 1,149 using multiple colors and shapes, I have solved 4.
 
8:38 PM
I have not tried a color variant yet
 
@amon Ah. There it is.
 
there you go, "file system" URIs need to be inside an OS for them to be well-defined
 
There are 8 difficulty levels, All have about ~120 puzzles, so I've done about 900 of them.
 
@ThomasOwens That's probably more applicable, but also suggests that file URIs are useless for remote hosts: “This specification neither defines nor forbids a mechanism for accessing non-local files. See SMB, NFS, NCP for examples of protocols that can be used to access files over a network.”
Quite sensibly, FTP is not mentioned in that list either…
 
8:50 PM
Interesting. I was just missing a one liner that explained it.
I can't wait to get away from ClearCase. I don't want to have to clean up view private files anymore.
 
user55340
-3
Q: How to Design a Database?

madhatter1919I work for a small company and am a DIY type of person, I have limited programming skills but I am determined to learn by myself. I wanted to know what language would be best to build a database that can be accessed only through local area network?

 
user55340
I win the headdesk.
 
protip: never trust your DBAs if your sense of "you are wrong" is going off, especially when you don't believe them....
 
@enderland I think you're missing/adding a negative in there somewhere
 
user55340
Don't trust your dbas. Especially when you believe them.
 
9:01 PM
@MichaelT Don't trust your dbas, fire them and use NoSQL?
 
It's a nice, "F YOU" after having a meeting where I was told repeatedly that my hunch that their output schema wasn't matching the hex files I was reading was incorrect...
 
user41796
@durron597 Now you have 3 problems?
 
@durron597 delete from users where UserType=DBA;
 
user55340
@GlenH7 more than one. Otherwise it's not normalized properly.
 
@enderland I've never worked with a DBA that knew more about databases than me... and I know very little about databases.
 
9:05 PM
@MetaFight yeah I'm getting more and more that vibe. I'm about to write an email that is only going to come across as "I told you so" since we had a long meeting about this subject several hours ago...
 
somehow I've yet to have any incidents with my DBAs at work
 
Don't you work with front end?
 
user55340
Here, I work with three excellent dbas.
 
I get the impression DBAs are generally underpaid so the competent ones are hard to find.
 
@enderland not exclusively, I work on the frontend and backend of our team's app, it just happens to be an app that has way more frontend than backend code
 
user55340
9:07 PM
Also, consider the architect/ admin problem for db_.
 
@MichaelT you hit the jackpot!
 
random: my dad is a DBA
 
user55340
Are they admins? Backups, space allocation, etc... Or database architects who know everything about schemes, partitions, indexes, etc...?
 
@MichaelT or IT people shoved into the role since hey it was an open position!
 
@enderland heh, my dad was originally an electrical engineer, but one day they decided to try this newfangled "database" thing and no one else volunteered to learn how the thing worked...
 
9:11 PM
It makes me wonder, do most people just "change and pray" when they have problems they don't understand? When I have something I don't understand I research it until I know it - I suspect this is going to turn me into a way-less-awesome version of @MichaelT and his "how do you know that" knowledge
 
@enderland it depends on whether I have any idea how to even begin researching it
 
Yeah, I hate the feeling when I don't even know enough about a topic to event formulate a question.
 
for me the definition of "legacy code" is code which can only be maintained in one of two ways: 1) change and pray, 2) nag the old guy to do it for me
 
Wow I just opened a new question on workplace and it's exactly that
@MichaelT YES. THIS!
 
9:13 PM
if something baffling happens in code I am at least capable of manipulating I generally make an effort to figure it out myself
 
user55340
I did tech support for sgi for about a year. You get 10 mistakes of other people you need to solve each day. Or figure out how to. That skill sticks with you.
 
user55340
Things like "the drive won't mount - how can I recover text files off it?"
 
user55340
(grep, head and tail against the raw device)
 
user55340
Yea, fsck failed too.
 
user55340
Each year learn a new programming language. Make new mistakes while learning it.
 
user55340
9:23 PM
Do a green field project of reasonable size every so often. Complete it. Bonus if it was a project at work.
 
what is "reasonable size"? I try to make some small but useful unsolicited tool at work once in a while but there's never enough spare time to do a big side project
 
user55340
1k to 5k sloc. Not trivial - something that has you go down the wrong design and then go change it.
 
ah, good, the one I've been brainstorming for this week will definitely be a few k's
 
user55340
And if doesn't have to be work related- just that work related has firmer constraints that you have to deal with and real users.
 
user55340
The biggest key is to do something that pushes your boundaries. And that you can succeed at.
 
user55340
9:33 PM
Without the push, you're not progressing. Without succeeding you are just failing. It can be challenging to find that bit beyond what you can do that isn't too far.
 
I guess I'm not sure if it meets the particular goal of pushing boundaries
maybe if I ever have the free time and mental energy to do something outside of work I'll try to learn ordinary web development for a change
 
user114359
@MichaelT we must leverage the synergies to define stretch goals to meet the demands of our customers.
 
user55340
> #32: Research-oriented development. Seymour Cray, the designer of the Cray supercomputers, says that he does not attempt to exceed engineering limits in more than two areas at a time because the risk of failure is too high (Gilb 1988). Many software projects could learn a lesson from Cray. If your project strains the limits of computer science by requiring the creation of new algorithms or new computing practices, you're not doing software development; you're doing software research. Software-development schedules are reasonably predictable; software research schedules are not even theore
 
@Snowman has kickstarter jargon entered the corporate buzzword melting pot?
 
psr
9:36 PM
@Snowman Do not try. There is no try. Only catch.
2
 
@psr boo, hiss, star.
 
user55340
@psr finally!
 
@MichaelT no star for you.
 
psr
@MichaelT But good try.
 
user55340
@psr nice catch.
 
9:39 PM
These puns are making me sick... though if I were making them I'd be so frickin' proud of myself :)
 
user114359
yay, cats. All day she hates my guts, then all of a sudden, time for lap sits and tummy rubs.
 
user55340
It's a trap!
 
user114359
@MichaelT a trap full of fur, teeth, and claws
 
user55340
The jelly beans of doom hide talons of death.
 
user55340
 
user114359
9:41 PM
I actually made a cat meme with my cat, I'll see if I still have it
 
user114359
 
user55340
> The cats’ favorite place to be pet: Their faces, especially around their lips, chins and cheeks, where they have scent glands. (The researchers did not attempt to pet the cats on their bellies, presumably because they didn’t want to be maimed.)
 
user55340
@Snowman look up "breaking cat news"
 
user55340
 
user114359
> An exposed belly, however, can also mean the kitty wants to ensnare you in a whiskered bear trap composed of claws, teeth, and agony.
 
@Snowman this is truth
 
i think I am almost getting to the point of ceasing using constructor dependency injection simply based on 'guilt by association' of DI insanity
 
@whatsisname why?
I am having the opposite reaction; I think that if my constructor needs too many dependencies, then I need to refactor
The more dependencies you have, the more likely you are violating SRP
 
maybe it's because I don't write super complex enterprisey document management workflow allocation whatever applications
 
9:48 PM
@durron597 exactly. It's like a convenient warning system baked into your constructor signature :)
 
Java people: I think I'm missing part of the joke in thecodelesscode.com/case/209, is it implied that the program never closes any of the large files it works on or is it something else?
 
but it seems like people go nuts with DI and these convoluted DI containers that seem to be nothing besides a coding exercise more entertaining than whatever application they are actually working on
 
for me DI is in that realm of concepts that should be simple but every time I try to figure out what it is I only get more confused
 
@Ixrec I assume it's partially that. Also probably you don't need to create an entire list of strings, you can search the stream as you read it in
also a list of strings is a terrible data structure for searching.
 
ooooooh, I didn't even realize he was copying the entire file into memory before searching
 
user114359
9:51 PM
@Ixrec it means that there may be dangling references which prevent the GC from doing its job.
 
derp
 
user114359
Or that, the general idea is he couldn't see the other boats, he did not know they were there but they were. Same idea with objects.
 
yeah, I assumed that was meant to imply he was leaking resources, I just failed to see what resources
 
user114359
@whatsisname DI is an amazing tool for what it is good for, but I have seen it misused with the net effect being "over-complication."
 
SubList is part of the problem too. Apparently it's simply a view onto another list. So all the master lists are still kept in memory.
 
9:53 PM
I was just about to ask, subList sounds like something that points to an existing object rather than copying stuff, so it'd force the whole thing to not get GC'd, wouldn't it?
 
user55340
Look up the Java 1.6 substring code.
 
@Ixrec oh, of course, I never use sublist so I didn't realize it did that
yeah, that's definitely it.
 
user55340
It points to the same backing string, just changes its start and end indexes. O(1) substring.
 
user55340
However, "big huge string".substring(1,2) prevents the big string backing it from getting gced.
 
one of my favorite SE comments of all time: programmers.stackexchange.com/questions/232229/…
 
user55340
9:58 PM
Java 1.7, substring is O(n) - but no memory leak.
 
user114359
@MetaFight correct, any standard sub collection in Java is simply a view into the parent collection
 
user114359
 
user114359
I was not aware they changed that, nifty. I wonder if it still allocates a new char[] when the original string is in the string pool.
 
@MichaelT that seems like a pretty huge change, does that not break code?
maybe I'm thinking in C++
 
user55340
Can't test if a string is interned or in the constant string pool from Java.
 
user55340
10:06 PM
@Ixrec nope. The array is encapsulated in an immutable.
 
user114359
@Ixrec shouldn't, since it obeys the same interface contract.
 
oh, Java strings are immutable
 
user55340
As said, the contract remains the same.
 
I should know that
 
user114359
@Ixrec a C++ string is like a Java StringBuilder. A Java String is like a C++ const string
 
user114359
10:07 PM
@MichaelT no, but a native method can. Several core Java classes use native methods for stuff like that. But it appears String.substring() always allocates a new string
 
user114359
public String substring(int beginIndex) {
    if (beginIndex < 0) {
        throw new StringIndexOutOfBoundsException(beginIndex);
    }
    int subLen = value.length - beginIndex;
    if (subLen < 0) {
        throw new StringIndexOutOfBoundsException(subLen);
    }
    return (beginIndex == 0) ? this : new String(value, beginIndex, subLen);
}
 
user114359
^^^ Java 8 String class
 
is the new substring() required to copy immediately or could it do COW?
 
user55340
Next hue project: 6h snow accumulation light. Can be done with a lux instead (no color needed). More snow, brighter light.
 
user114359
@Ixrec in Java they are immutable, COW is a non-issue
 
user55340
10:09 PM
@Ixrec it's an array. Not array list. Copy now.
 
user114359
@MichaelT you replied at just the right time for me to hit "reply" to the wrong post
 
user55340
@Snowman look at 1.6 constructor.
 
user55340
Ok, screw it... its after 5... I'll do some actual web chat instead of mobile.
 
user114359
@MichaelT I don't have anything prior to Java 8 installed. The char[] constructor in this version makes a copy of the array.
 
user55340
Ok, that didn't work.
 
10:12 PM
@Snowman refresh my memory pls. What is COW?
 
@MetaFight copy-on-write
 
user114359
Copy-on-write (sometimes referred to as "COW"), sometimes referred to as implicit sharing, is an optimization strategy used in computer programming. Copy-on-write stems from the understanding that when multiple separate tasks use initially identical copies of some information (i.e., data stored in computer memory or disk storage), treating it as local data that they may occasionally need to modify, then it is not necessary to immediately create separate copies of that information for each task. Instead they can all be given pointers to the same resource, with the provision that on the first occasion...
 
user55340
String(int offset, int count, char value[]) {
    this.value = value;
    this.offset = offset;
    this.count = count;
}
 
i.e. don't do an actual copy until someone tries to alter the original data structure, in the hopes they sometimes won't
 
sorry, I meant to ask Ixrec. Thanks Ixrec for the answer :)
 
user55340
10:13 PM
That is the package level string constructor that substring invokes.
 
user55340
Yea, you're creating a "new" string... but the value array is the same.
 
user114359
@MichaelT and it looks like now they closed all the loopholes as far as sharing memory, except for strings created by the JVM itself from the string pool.
 
user55340
@Snowman Correct. It was a memory leak. Big one.
 
user114359
Those optimizations probably made sense 15 years ago, but anymore even our embedded systems that run Java (Blu-ray players come to mind) have plenty of memory.
 
user55340
In the 1.0 days and beyond, strings were small things you passed around. A few hundred bytes maybe. Now they are entire XML documents or JSON objects that someone read in. Substring on them became painful in the long run.
 
10:14 PM
it's processing power for the collection that was lacking
 
user114359
Also with SIMD and other advanced CPU features, copying memory is cheaper time-wise than it used to be per clock cycle
 
user55340
83
A: Why is String immutable in Java?

MichaelTConcurrency Java was defined from the start with considerations of concurrency. As often been mentioned shared mutables are problematic. One thing can change another behind the back of another thread without that thread being aware of it. There are a host of multithreaded C++ bugs that have cro...

 
user55340
The 'Substrings' section goes into that.
 
it's like array/string slices in D
 
10:30 PM
Oh, i miss-read that. it's actually on topic at programmers. programmers.stackexchange.com/help/on-topicKevin B 5 secs ago
 
user114359
10:41 PM
WTF? This came up in the edit review queue, but it is not reviewable: programmers.stackexchange.com/review/suggested-edits/120885
 
10:53 PM
Fun fact, minesweeper is np-complete. Also, your question is too broad. If you want help reviewing your algorithm or discussing potential solutions to your problem, codereview.stackexchange.com or programmers.stackexchange.com might be a better fit. — FGreg 1 min ago
 
00:00 - 20:0020:00 - 23:00

« first day (1866 days earlier)      last day (3128 days later) »