« first day (2066 days earlier)      last day (2910 days later) » 

12:57 AM
I hope I'm not being too harsh here:
@SeldomNeedy Python 2's zip(*iterables) is like 3's list(zip(*iterables)) - which is why I suggest importing izip as zip for Python 2 in my answer - stackoverflow.com/a/36918720/541136 - JF actually assumes Python 2's zip in this answer, which compounds the issue of unnecessary creation of long lists in memory. JF's answer uses 200% more memory than necessary for lists (8 bytes per item), as well as the memory for each tuple (relatively enormous at 64 bytes per tuple, see stackoverflow.com/a/30316760/541136) 800% more, so 1000% more total (assuming lazy evaluation.) — Aaron Hall 3 mins ago
So that's one order of magnitude (assuming base 10) more memory usage than my answer.
 
 
1 hour later…
2:07 AM
Hello someone can help me
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
* * * * * * * *
 
it depends on what you need
 
anyone here have knowledge of C
 
What do you need?
 
I have the following code
#include <stdio.h>

int main() {
char c = '*';
const char s = c ^ ' ';
const int n = 8;
int i = n*2*n;

while(i--) {
if(!(i%(n*2))) {
putchar(c);
putchar('\n');
}
else {
putchar(c);
c ^= s;
}
}
return 0;
}
Someone knows some other method to accomplish this
 
2:22 AM
what are you trying to accomplish?
 
print a figure not know how to add the figure here
the same result but with another method
 
paste it in just like you did the code
 
2:35 AM
someone compiled my code
nobody
 
 
2 hours later…
4:54 AM
Good question. Generally your fellow programmers like to see your own attempt before sending in theirs. — e4c5 35 secs ago
I will also try a different platform like "programmers.stackexchange.com" perhaps, I will have a better reception there. Again, thank you for those who give their consideration and examples or just live and let live. Julie, thank you for your opinion. Dagon, no comment. — mmtalon 31 secs ago
 
5:10 AM
@Duga Marked as a bad post.
 
 
9 hours later…
2:32 PM
Fever + coding = a special kind of hell.
 
3:01 PM
And the only cure is more cowbell!
make
and the entire world is good...
 
3:24 PM
Sorry, but this site is not a code writing service. — Ixrec 18 mins ago
Then why is it called programmers ? — Saud Khan 15 mins ago
 
user15026
I....that logic hurts my brain
 
3:46 PM
@SaudKhan that's a really really really silly question. — MetaFight 2 mins ago
and by "silly" I mean "moronically stupid".
 
3:58 PM
wonder if this is a better question for cs.stackexchange.com or programmers.stackexchange.com — Baronz 46 secs ago
 
4:21 PM
@MetaFight as we are approaching May homework cheaters are gettung more active and desperate...
> This a project of Accounting that i have to submit on Monday ... and i have no idea...
 
can someone make a non-animated version of that gif?
 
@Ixrec I can screen shot the gif
 
you're missing the "Winston" at the end =)
 
I have a question about using a piece of code from someone's work which was posted online
 
4:30 PM
just read the license
 
user image
2
Let's say it's the most basic thing such as cropping a picture for example. There probably isn't many ways to do this, so would it be ok to just use it?
 
there is such a thing as a threshhold of originality below which copyright doesn't apply
 
34
Q: Programmers.SE and the Summer of Love

user8Programmers.SE, we need to talk. We've had a rough couple of years, what with being originally a place to ask anything and everything and having to shape up. I get that it's annoying to still see off-topic question or questions that are unanswerable day in and day out. But that's no excuse for ...

 
in at least one country
 
> that's no excuse for the excessively rude and offensive comments and answers that currently happen on questions like these...
yeah sure
 
4:33 PM
@gnat Did I miss something?
 
user15026
@EcstaticSnow I appreciate the sentiment of this but as a poem it has issues in terms of formatting and structure :P
 
user15026
@EcstaticSnow From a standpoint of being in academia, I'm like "well plagiarism is plagiarism" but I am a bad person to ask
 
you're certainly supposed to provide attribution for the non-trivial code you use
even if it's not legally required by the web of licenses
 
user15026
I tend to assume it's like anything, attribute when you lift it from somewhere
 
@AshleyNunn to me would be like copying the way someone wrote "Guy was born on December 7, 1981." and just copying and pasting that one sentence into your research paper because there isn't really much to change
 
user15026
4:38 PM
@EcstaticSnow You'd still likely need to cite that though.....
 
user15026
It's not about changing, if you paraphrase stuff you still need to cite sources if you've taken it from somewhere....
 
Aha didn't actually think about that. I was thinking along the lines of in the in line quotes type deal
Thank you!
 
user15026
No problem :)
 
@Ixrec a while ago that gif you liked was considered "excessively rude and offensive". In 2012 homework dumps were not that frequent over here
 
I'm going to look for a post to post that picture under
 
user15026
4:42 PM
@EcstaticSnow Don't do that.
 
also, citing sources is as much about proving you got the information from a real source instead of just making it up
in code, it doesn't really matter if you figured out slice(0) copies an array or you copied that fact from StackOverflow, it's still gonna copy the array either way
 
@Ixrec What about in the case that I copied and pasted someones method of Copying a String to the clip board
 
if you have to think this hard about it, just cite the damn source in a comment and move on
You can never over-cite.
 
I actually havent even started on the program yet
Wanted to get some planning straight before I started typing
 
user15026
@Ixrec Comments everywhere!
 
4:46 PM
I think I have a grand total of two comment citations in our codebase for little snippets I copy-pasted
I do use SO frequently but mostly as a sort of reference as to whether I correctly remember that X is the sanest way to do <common task>, rather than copy-pasting code directly from it
 
StringSelection selection = new StringSelection(theString);
Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
clipboard.setContents(selection, selection);
66
A: Copying to Clipboard in Java

Carlos HeubergerUse the Toolkit to get the System Clipboard. Create a StringSelection with the string and add it to the Clipboard. Simplified: StringSelection selection = new StringSelection(theString); Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); clipboard.setContent...

1 hour ago, by Ixrec
Then why is it called programmers ? — Saud Khan 15 mins ago
So that's what Programmers means "code writing service"
 
I suppose that is our day job
 
I'd be happy to write code for everyone that asks a question like that on SO or Programmers, but only if they include my name or donate
Otherwise I want the time I wasted back
 
in other words, you'd like a job?
 
Yeah that would work to
 
5:34 PM
@Ixrec by the way I found original text of that gif - community.oracle.com/message/8646551#8646551 - at SDN (now Oracle) forums
 
5:46 PM
I'm definitely going to post one of those in an answer
 
user15026
@EcstaticSnow If you want a flood of downvotes and eventual deletion, go ahead
 
Loved This One:
Once upon a midnight dreary, fingers cramped and vision bleary,
System manuals piled high and wasted paper on the floor,
Longing for the warmth of bed sheets,
Still I sat there, doing spreadsheets:
Having reached the bottom line, I took a floppy from the drawer.
Typing with a steady hand, I then invoked the SAVE command
But got instead a reprimand:
It read, "Abort, Retry, Ignore."

Was this some occult illusion? Some maniacal intrusion?
These were choices Solomon himself had never faced before.
@AshleyNunn Downvotes and deletion... Hmmm...I think it's worth it
 
(you know what that's a parody of, right?)
 
No idea
Wait
 
user15026
@EcstaticSnow I like this one mostly for how well it scans to the original
 
5:50 PM
Something Night maybe
 
Oh the Raven
Last time I read that was about 4 years ago I believe
 
6:12 PM
@Ixrec Teach me this
12
Q: Personal computer hacked: How do I block this user from logging in again? How do I find out how they are logging in?

Rho23I am 99.9% sure that my system on my personal computer has been infiltrated. Allow me to first give my reasoning so the situation will be clear: Rough timeline of suspicious activity and subsequent actions taken: 4-26 23:00 I ended all programs and closed my laptop. 4-27 12:00 I opened my lap...

 
I have no idea what "this" refers to, but most of what's in that Q&A thread is stuff I am very unfamiliar with
 
"this" was referring to taking over someone's computer
>:)
 
6:34 PM
Yesterday, I believe it was yesterday, You said something about writing programs to make tasks easier and have more free time. If this isn't your reason for writing a program just for fun then what is?
 
well, the literal answer to that is I don't code for fun anymore
but back before this was my job I found it fun just to experiment with getting computers to do stuff, the same way that physics labs are interesting
 
Just wondering what kind of stuff did you do starting off?
 
I have no intention of ever writing a AAA video game rendering engine, but I love knowing basic concepts like view/model/project matrix multiplication that is the modern cornerstone of 3D graphics
@EcstaticSnow tbh I don't remember very much from that far back, but it was mostly the sort of toy programs you'd see as exercises in a typical programming book
my first non-trivial program was an interpreter for a language I made up sometime during college
 
So basically what I do now?
Not the non-trivial interpreter
 
if it helps, the interpreter stopped working after a week or two and somehow I couldn't get it working again
I have since learned the magic of version control software
 
6:41 PM
I honestly can't comeup with any "non-trivial" projects to try. I just find something online and think "well this is an awesome tool, but I bet I could make a better one" or "let me tweak this around a little and see what I can make out of it". Other than that I'm blank.
 
which is fine, that's how most useful non-trivial projects start
 
Really? Got an example?
 
well, almost every programming language exists because somebody thought all the existing languages weren't good enough at something
many famous open source applications and libraries started as forks of some older project, like how LibreOffice is a fork of OpenOffice
or as deliberate recreations of non-open software, like all of GNU
that's probably a broader interpretation of what you said than you intended
 
Alright, Well I guess I'm gonna go look for something that could be made better :)
I hate google when trying to look stuff up on programming
Type in "How to manually convert a video" and it just lists a ton of programs and websites that do it for you
So I type in "How to convert a video using java" still no luck
 
yeah, you've gotta go lower level than that
look for video processing libraries or read about how video codecs work or something like that
 
6:55 PM
Is there a template on how to cite sources and libraries? Before I start publishing stolen packages
 
not really, people ask that all the damn time because none of the licenses ever specify, but there simply isn't one
and frankly no one cares what format you use, just make a good faith effort to make it really obvious where you got the code from and you'll be fine
 
Should be in line comments or like a read me document?
 
beyond the convention of having a README and a LICENSE file at the top level of your project directory
you should do both
the per-file stuff ensures that if other people use your code, they take the notice with them, unless they actively remove it
 
Wait would I have any licenses if I published one of my works?
 
the per-project stuff is where you put the complete list of everything you depend on and what their licenses are, along with what license you're using for your project
well, nothing forces you to include one, but you always should, because otherwise no one knows for sure what their rights are if they want to use your code
 
7:00 PM
I really want to start publishing stuff in the google play store. I have no idea where I would publish the windows version of the programs though
 
and now I immediately become useless to you
 
Dang, I thought you have all the answers
 
of course not, being a programmer is about being able to go find and create the answers yourself
I haven't needed to create that particular answer myself yet
 
I have no idea what I would do if I wanted to publish a project. Normally people would just have websites, but my old weebly site only got 2 views and both were from china
 
these days the easy option seems to be a github repo
then you just dump all your introductory content in the README, and that's your site
imo it's quite adequate for most small projects
 
7:08 PM
Do you know if I need a commercial license if I wanted to sell activation keys? I'd most definitely just do it for donations and not mandatory payments, but still would like to know
 
none of the open source licenses stop you from selling stuff
very deliberately so; not allowing people to sell copies of the software would violate your basic freedoms (according to the FSF anyway)
anyway, g2g
 
Alright, enjoy the rest of your day
 
7:21 PM
Is there a java package site like there is for python (PyPI)
 
7:35 PM
@EcstaticSnow Maven (has an online search interface).
 
7:50 PM
If I clone one of my company's Git repositories, should I have a reasonable expectation that it builds right out of the gate?
 
I would expect the dependencies and build tools to need to be installed on that machine first...unless we're talking about a managed language where all of those things are standardized
though I would also expect the repo to have a README which lists said dependencies and tools
 
8:21 PM
@EcstaticSnow Write it as a universal app and publish it in the Windows Store.
 
It's a C# repo. Getting repos to work on a different machine than your usual one are an ordeal.
 
@RobertHarvey It really depends for many reasons.
 
But if you have the latest internal project binaries, and Visual Studio is installed, and NuGet is working correctly, I really believe that it should build, each and every time you bring it down from the repository.
 
Sometimes, companies will keep part of what the repo references private, so you won't be able to build it.
 
I have access to everything.
 
8:27 PM
Sometimes, you need to know how to register it with the registry (like Rubberduck, the VBE addin I work on). Other times, it is build-run-success.
 
These are just C# unsigned assemblies.
 
Well, I'd guess it would just be build-run-success if it is a stand-alone application.
Sometimes, you may need to grant VS admin rights, depending on what the program does.
Are you having a specific problem with it?
 
References.
Inevitably, there's a mountain of broken references.
And the way VS handles references is just terrible.
 
It might reference local dll's that are not on your machine.
These references might not be public.
 
Well, we have a folder called "internal binaries," on a specified drive letter. Everyone is responsible for keeping this folder updated with the latest builds.
All of our references (except for the Nugets) point to this folder.
 
8:31 PM
The references are listed in the .proj, if you want to look in there.
You might be able to figure out which ones are missing.
 
Yes, I see them. :)
Many of them have that broken reference symbol on them.
 
Have you tried cleaning/rebuilding?
 
Yep, that's the first thing I always try.
 
OK. Open the .csproj file in Notepad.
Look at the location it is looking for the references in. See if they are in a nearby location, or something.
 
In the Packages folder.
Interesting. All of the broken ones this time are Nugets.
 
8:34 PM
That should make it easier. I wonder if NuGet installed them to a different location.
Maybe you need to manually install some, or maybe the author pulled it (or pulled that version).
 
Shit. There isn't even a Packages folder in the place where the References say it is.
See, this is exactly what I'm talking about. If we had a build server or something that pulled down the repository periodically and checked it, we'd never have these problems.
The packages folder is in a different place.
 
Try moving it.
It might break everything, it might fix everything.
 
I'd rather change the references. Nuget says that's where the Packages folder is supposed to be.
 
OK, change that.
I would probably recommend removing the missing ones and adding the real ones through VS to make sure it really works.
You really don't want to mess up your .csproj.
I once accidentally told a C# project to compile with the VB.NET compiler by doing that.
 
See, here's where my head explodes. Because really the right way to do it is to uninstall all of the Nugets, delete the references, and reinstall the Nugets. Which means I now need pencil and paper to do it right, because I have to write down every installed package and every version.
 
8:42 PM
(That might be a good way to obfuscate some code--make them expect C# and get VB.NET. Hmmm.)
@RobertHarvey You can install them without uninstalling them, can't you?
Maybe not, I don't know about this.
 
I don't think it works that way.
 
It might not. Just copy/pasta the names into Notepad--don't bother writing them down.
 
Why does the hintpath have ..\..\ in it? Does it really have to step back two folders to make this work?
 
No idea. Probably not.
 
Ah, fuck.
Nuget search isn't working.
 
8:54 PM
Search the web and install them with the command line.
 
That is damned inconvenient.
Got it working. Had wrong source selected.
 
Cool.
 
9:19 PM
Changing the hint paths in the Project file was good enough for everything except CSScript, which apparently installs itself in a version-specific folder.
A couple of libraries that are not on Nuget, and I'm good to go.
Still begs the question though: why do I have to go through all of this every time I pull down a repository.
 
I literally watched a movie in the time between you first asking about this issue and now
 
Egg-fugging-xactly.
 
good movie at least
 
I've spent whole days on build problems before.
Getting a little better at working through them quickly.
 
9:39 PM
@Ixrec ...go on
 
Night of the Living Dead (the original 1990 one, but colorized)
 
fun
 
I still can't believe they shot him at the end
 
this weekend i'm working through phase 2 of the mcu, in preparation for Civil War.
 
nice
how much of the MCU have you seen so far?
 
9:43 PM
>_> all of it, mostly multiple times.
i haven't rewatched the tv shows as much as the films, for obvious reasons.
although since i live in the stupid USA, i can't watch civil war yet.
 
for some reason I never rewatch things
probably because there's so much I still haven't watched once
 
it was necessary for researching things for scifi.se. grabbing screenshots, quotes, and just generally buffing my knowledge.
 
gotta map out those infinity stones
 
darn tootin'
 
10:16 PM
@Ixrec You're describing idempotency, not referential transparency.
 
...no? idempotency is a totally unrelated thing
 
Functions with observable side-effects are not referentially transparent.
Referentially transparent functions can be replaced with their computed value, and the program will still work.
 
10:36 PM
further googling has lead me to believe there are multiple contradictory definitions of referential transparency in common usage, so we're probably all right
 
I equate referentially transparent with pure. No other definition makes sense, really.
 
> A function f is pure if the expression f(x) is referentially transparent for all referentially transparent x.
the most plausible well-defined distinction I've come across thus far
though this guy points out both terms are meaningless outside the context of a specific implementation of a language
 
Yes, that works.
 
which I'm inclined to believe given my current confusion
oh well, nothing stopping other people from writing better answers
 
You can take a pure function, and replace it with another pure function having a completely different implementation, and as long as all potential outputs agree, the two functions are the same, from the caller's perspective.
That's referential transparency.
Functional languages use "memoization" to increase speed, evaluating a function once, and then replacing all further calls to that function with its computed value (assuming the same parameters).
That's where referential transparency becomes important.
 
11:26 PM
I'm voting to close this question as off-topic because stack overflow is not for asking legal questions; we're programmers here, not lawyers. — mah 38 secs ago
 

« first day (2066 days earlier)      last day (2910 days later) »