« first day (1928 days earlier)      last day (3211 days later) » 

Anonymous
06:00
If you want
that will count as a major patch?
Anonymous
Not really
This message will not get starred.
2
@Mego Can I make all functions start with lowercase?
Anonymous
06:08
@KennyLau Sure
06:25
I have no words.
I mean. What.
@KennyLau Nope.
Seriously v3.
alright
06:51
@EᴀsᴛᴇʀʟʏIʀᴋ yes I think did but decided I didn't care.
(Also apparently the traffic came from a tweet, but I can't find the tweet so far.)
@mınxomaτ What the...
@mınxomaτ Well, Microsoft Edge is not Internet Explorer, so that's expected...
No not really, when I open the Windows 10 update catalogue, where Edge is the standard browser.
Anonymous
You're assuming Microsoft makes sense
Anonymous
@KennyLau Did you convert all the spaces to tabs in commands.py?
Anonymous
06:58
bans
alright
Anonymous
4 spaces for indentation
Anonymous
No tabs
@Mego U+200B for indentation
@mınxomaτ "Unsupported characters in input"?
Remember; set up your formatter to spaces, not tabs!
Anonymous
07:01
U+0020 for indentation
@Mego '\u0020' * 4 for indentation
@Mego seriously, what actually is travis?
@KennyLau travis-ci.org
It's a continuous integration tool. ~_~
Anonymous
@KennyLau Continuous integration service. It runs the test suite on a range of different Python versions (currently 3.3, 3.4, 3.5, 3.5-dev, and nightly (aka 3.6.0)).
and what is the problem?
Anonymous
07:11
Looks like gcd reduce and nth prime broke
reduce
@Mego So your build array has only five builds, right?
@Mego How can nth_prime break?
Anonymous
@KennyLau Not sure. You're the one that broke it, so you get to fix it :)
well alright
Anonymous
@memoize
def gcd_list(vals):
    return reduce(gcd,vals)
Anonymous
That's not gonna work
I know I'm fixing it
Anonymous
nth_prime doesn't work because you aren't passing an argument to init_next_prime
Anonymous
You need to pass it some falsey value like None
07:20
oh ok
0
Q: Convert header levels to numbers

NᴮᶻNodes in tree structures (e.g. headings in a long document, law paragraphs, etc.) are often created by assigning a specific level to reach item, but outputted with node numbers for each level, e.g.: 1. Intro 1.1. About this 1.2. Target audience 2. Actual stuff 3. More stuff 3.1. Details 3.1.1. S...

07:36
@Mego you know, the report doesn't say so...
Anonymous
@KennyLau Seriously suppresses all exceptions. If any command fails, it silently continues without modifying the stack.
@Mego Then what are those asserts?
Anonymous
That's the unit tests. They assert that the returned value from calling Seriously().eval(code) with the given code matches the asserted value.
07:45
yes I get it now thanks
Anonymous
It's a lot more robust than the dumb test script I wrote for v1
@Mego The reduce is different in Python 2 and ~ 3...
Anonymous
Yep
Anonymous
The gcd function didn't need to be modified
what exactly is the difference?
Anonymous
08:01
What difference?
between the reduce in Python 2 and ~ 3
Anonymous
Oh, I don't know the exact differences
08:17
@Mego What is your timezone?
Anonymous
@KennyLau US-Central
so it's 03:19 now
Anonymous
Yep
@KennyLau 11:28 here.
08:28
alright
16:28 here
09:07
@AlexA. What that line does is: uq is the vector of unique values of u. find(u(i) == uq) just finds the index of the value of uq that corresponds to each value of u.
Actually I think that loop could be removed (which is standard practice in Matlab), and substituted by [~, ~, m] = unique(u);. The third output of unique gives you that. For example, given u = [80 90 80 90 70 60] it produces m = [3; 4; 3; 4; 2; 1]. Also, the lines m = min(u); u = u - m + 1; can probably be removed, as they have no effect on the following code.
09:23
Also, if g is (or can be made to be) a vectorized function, the first loop can become just u(i) = g(diag(A));
It would hurt more if he hadn't have those shoes in the walls to decelerate him
chat mini challenge: calculate the difference between every two consecutive elements of a list
(jelly is excluded from this challenge)
@KennyLau :(
testcase: (input \n output)
[1, 2, 2, 1, 1, 2, 3, 2, 3, 3, 2, 1, 1]
[1, 0, -1, 0, 1, 1, -1, 1, 0, -1, -1, 0]
@zyabin101 try it
@KennyLau I don't know how to.
@zyabin101 1. pick a language
09:56
@KennyLau Python. ~_~
2. do you get the challenge
3. Get *** together.
?
enumerate would be good
or just simple map
4. juic an avocad
@Phrancis What if I don't hav avocad?
09:58
Then you are screwed ;-;
@Phrancis Related.
3
It's a Keep Calm poster. c:
I love that
10:51
@KennyLau 34 in Python
@Sp3000 what's the code?
Later :P in case anyone wants to try
@Sp3000 Is it a lambda?
Yeah
my lowest score is still 41 bytes...
ohai @Sherlock9
11:01
What do you have?
lambda x:map(lambda a,b:a-b,x[1:],x[:-1])
If you're using map, you can at least use int.__sub__ to save a few more
(mine's recursive though)
ah... recursive..
To iterate is human. To recurse is recursive
@Sp3000 it's hard
11:10
f=lambda a,*b:b and(b[0]-a,)+f(*b) <-- I'm assuming that's okay?
@KennyLau Hello
@Sp3000 nice
@Sherlock9 want to take the challenge?
Just got here
What challenge?
scroll up to 16:52
Python: f=lambda a,*b:b and(b[0]-a,)+f(*b)
Dang, 48 for Python: d=lambda a:[a[i+1]-a[i]for i in range(len(a)-1)]
11:16
try another language xd
@QPaysTaxes pls add readme.md with pics
TIL that a ship is not held in place by the anchor, but rather the weight of the chain
the anchor is just to get the chain down quickly
@KennyLau what does this implement?
Haskell, 37 bytes f(a:b)|null b=[]|1<2=[head b-a]++f(b)
@orlp
it implements me?
wow
11:26
2 hours ago, by Kenny Lau
chat mini challenge: calculate the difference between every two consecutive elements of a list
I never knew I was that simple
2 hours ago, by Kenny Lau
(jelly is excluded from this challenge)
2 hours ago, by Kenny Lau
testcase: (input \n output)
[1, 2, 2, 1, 1, 2, 3, 2, 3, 3, 2, 1, 1]
[1, 0, -1, 0, 1, 1, -1, 1, 0, -1, -1, 0]
Python:  f=lambda a,*b:b and(b[0]-a,)+f(*b)
Haskell: f(a:b)|null b=[]|1<2=[head b-a]++f(b)
Pyth: _M-M.:Q2
@orlp I did this for 5 bytes
probably -V
11:29
Pyth:    -Vt
Python:  f=lambda a,*b:b and(b[0]-a,)+f(*b)
Haskell: f(a:b)|null b=[]|1<2=[head b-a]++f(b)
Pyth, 4 bytes: -VtQ
Drop the Q for implicit input
@Doorknob I already use implicit input
oh I guess you can drop both
Pyth, 3 bytes: -Vt
@KennyLau how old are you btw?
11:32
16
turning 17
Python minichallenge: given n > 0 integer, output the number of times n has adjacent digits equal, e.g. 15447773 -> 3
(you may not take in a string)
@Sp3000 maximum number of adjacent digits, I assume
@Sp3000 So, a list?
No lists either, just a single integer
naive implementation: from itertools import*;lambda n:max(len(list(s))for _,s in groupby(`n`))
11:44
Oh, that's what you meant. Sorry, should have been a bit clearer.
I just meant pairs of adjacent digits equal, so in the above example there's one instance of 44 and two instances of 77, for 3 total
oh
Maximum number of adjacent digits is also interesting though, hmm surely there's a way around itertools...
lambda n:sum(a==b for a,b in zip(`n`,`n`[1:]))
sqVtzz
The following Haskell functions are somewhat verbose at 56 bytes
f(x:y)|null y=0|head y==x=1+f(y)|1<2=f(y)
g(n)=f(show n)
f=lambda n,c=1,k=f:n and max(f(n/10,c*(k==n%10)+1,n%10),c)or c for maximum number of adjacent digits :/ (I feel like something can be done about c)
12:03
user image
3
12:16
@orlp I thought the use of z is prohibited
pure integer operation hh.MhZrjQT8
I said that with the intent for it being a Python challenge, but I guess I can allow strings if you want :P I don't actually know if strings are any easier than ints in Python, tbh
> I think the crows are calling my name! -Caw Johnson
3
12:38
@QPaysTaxes Uhh...
Q. Variable, Autoinitialized to eval(input()).
ಠ_ಠ
@QPaysTaxes I don't wanna be uill either ;-;
12:55
Apr 27 at 2:24, by Downgoat
@HelkaHomba You, I don't think Doorkno, Quill, or Geobits are making any languages
I'm betraying the others, now... I'm writing a language :D
@Quill what's your new langauge?
I expect the language to complain verbosely at the slightest style error
I haven't decided on a name... and the tokenizer hurts me deeply
@Quill github link?
not published yet
12:57
@Quill Then publish!
private link?
@QPaysTaxes Seems odd to have a whole book dedicated to just the single word jQuery ...
@TimmyD To other frameworks, too.
@Sp3000 :D
The book is "Choosing a JS framework", and there are lots of them. :P
12:59
Sample formatting in the new language
2
why
@Quill C? C++? :O JavaScript!
@zyabin101 new language
:( Publish?
the tokenizer is easy the worst code I've ever written in my life
imagine the worst code you've ever written, and then add finite states
@Quill Then send it to Code Review! :)
They can try to make it at least a bit better. :3
Darn slow 'net connection!
13:02
It only took me like 3 hours to write the tokenizer, parser and basic lexer, I just need to support scopes and more literal types
@QPaysTaxes The char array is a constant, you shouldn't need to set make the values constant too
You can't just names[i] = whatever, you have to insert them by memory pointer, IIRC
on a side note, Atom literally refuses to work on ES6 code without using like 130% of the CPU
@TimmyD ಠ_ಠ
ohai @PheNotyPe
30 mins ago, by QPaysTaxes
It was a joke: "a thing that someone says to cause amusement or laughter, especially a story with a funny punchline."
@TimmyD ಠ_ಠ
hides in barrel
13:14
@zyabin101 Hi
@QPaysTaxes The memory pointer for a changes around while the code is getting compiled, so you basically get garbage for the most part
void main(){
    int length = 10;
    const char *names[length + 1];
    char test = 'a';
    char *a = &test;
    for (int i = 0; i < length; i++){
        names[i] = a;
    }
    printf("%s", names[4]);
}
Gives results like aPj?P?; garbage addresses
Using "a" as a noun? This isn't normal, but in programming it is. Programming, not even once.
Dec 18 '15 at 21:33, by TimmyD
> Pyth. Not even once.
@TimmyD How did you even...
Apr 1 '15 at 21:31, by PhiNotPi
Code Golf. Not Even Once.
13:19
@PhiNotPi Voting for Trump. Not Even Once.
@KennyLau Because I didn't odd?
@trichoplax oh alright
that's odd
Yes!!! We're trying so many new things this Sprint
Right after I spilled my excitement into that message I realized I can't go into too much detail without breaking my Oath of Silence
+1 for happy agile
13:29
@Rainbolt You have an oath of silence? :O
It's my non-disclosure agreement
@Rainbolt Okai.
@QPaysTaxes To answer your question, I don't think you'll need malloc, using the general whatever[whatevs] = whateva should work
@Rainbolt Several jobs ago, I had a non-disclosure agreement that was oddly worded to make it seem like I couldn't even disclose that I had a non-disclosure agreement.
@TimmyD how did they introduce it to you? I need you to sign this...thing.
13:34
@TimmyD Interesting. You just violated it.
@Rainbolt Eh, it's long since expired.
Oh, I didn't know they expired. I assumed that mine was for life.
@NathanMerrill Nothing special, it was just in the general "new employee packet" ... I'm pretty sure that's not how it was intended to be understood, but just given the wording on it, it could be interpreted that way.
I mean, I'll talk about it all when I'm old anyway, and just assume that nobody will care.
Actually, I assume nobody cares now
Depending upon the industry, the company, and the specific job that you're doing, the NDAs usually vary in length.
For example, C-level execs usually have a longer NDA than generic rank-and-file employees.
I would wager that a nuclear technician probably would have a longer NDA than a sales guy for a fast-food company.
13:38
out of curiosity (for those currently working in the industry), how high in management do you want to go?
the maximum I'd ever want to be is team lead
Same
My current goal is team lead. My overall goal is one step above (Development Supervisor). At my company the dev supervisor is also a Vice President.
I tried it out -- a few jobs back I had two direct reports ... it sucked.
If I move to another company, my goals will change because the structure will be different.
right, but what does Development Supervisor entail?
or is that NDA? :P
13:40
If I were a dev supervisor, I would closely manage team leads, and loosely manage all developers.
do you direct the projects at all?
or is it more of a "I help developers be efficient" sort of job?
Very little directing, but I do have the final say. More of a "I help developers be efficient" sort of job.
Haha. Speak of the devil. I just got an email saying we all have to upgrade to Windows 10 this week.
Hmmm. That may have been a poor choice of phrase. He isn't the devil.
@TimmyD I feel like I've seen an amusing comment or two on Workplace.SE about just this sort of thing.
@El'endiaStarman Linky winky? :3
Oy, that's gonna be hard to find...
13:44
@El'endiaStarman Obviously.
cuz search doesn't search comments
We should, earlier or later, have Bucket in SE chat.
How to add two numbers in jQuery?
@Rainbolt Windows 10 is great and does all things.
I think I will try to get a master's in business to compliment my bachelor's in CS. It worked out for Mom, and she moved into management very quickly.
My company will pay for my college too, IF I make straight A's.
@Rainbolt Good it's not Linux.
75% for a B, 50% for a C, etc.
13:47
Linux has worse support for USB modems. :P
@KennyLau There's an SO question about it
@Quill Why?
@Sherlock9 No idea... or I'd be using it right now instead of tolerating WebStorm
Does Sublime Text not work?
Or can Atom actually run and debug code?
Or writing the file as .txt rather than .js?
13:59
I don't have Sublime Text, and I have custom file extensions in the repo, so maybe
Print x as an integer. => console.log(~~x); .... whyyyyyy?
I mean, I know that works, but still.
GTA V in UK
user image
5
14:14
@El'endiaStarman Would you prefer x|0?
@orlp Uh... I think it is from the UK...
@orlp I actually thought this was real for a second until I saw the watermark
1
Q: How do we respond to ungolfed submissions to code golf challenges?

doppelgreenerI'm a regular lurker of PP&CG. Today I encountered a situation I'm not sure how this community regularly responds to. I'm asking this to learn more about the common and accepted practices here, and what I should be doing if I'm in a position to act. The situation was that I saw an unusual answer...

@QPaysTaxes Well, I basically skipped CS1, 2, 3, so I don't know. CS4 is C/C++, Computer Organization has MIPS Assembly and some C, I think, Operating Systems I had both C/C++ and Java, Advanced Java Programming had...y'know, and Artificial Intelligence had Prolog.
Print "Hello" five times and " World" four times
for(var _loop = 0; _loop < 4; _loop++)
	for(var _loop = 0; _loop < 5; _loop++)
	console.log("Hello"), " World"
14:24
@NathanMerrill text2code is unable to do that.
It's very experimental.
> Print "Hello" five times
> Print " World" four times
for(var _loop = 0; _loop < 5; _loop++)
	console.log("Hello");
for(var _loop = 0; _loop < 4; _loop++)
	console.log(" World")
14:36
hi all
hi part of all
important question :) When I paste a pdf link to my facebook page it gives me the first part of the url as the image
which is terrible
36s :)
is there some way to get a picture of the first page instead?
or just something better
woah: The Geohashing location today is like a block away from my current location
14:42
12
Q: Why is this joke about elephants and quarts funny?

AndorianThere is a joke: "What is grey and comes in quarts? An Elephant." Why? Why does it come in quarts? What is funny here?

@NathanMerrill Quickly! Send pics to the Geohashing wiki!
And to us, please!
:3
at least my question wasn't more OT than that! :)
@AlexA. is right
@quartata if it started as « si c'était gratuit », then it would be «vous seriez le produit »
@zyabin101 I don't have my phone on me today (of all days)
@NathanMerrill :(
14:44
so, no way to prove my coordinates
@Geobits TIL paraprosdokian
or is there a *.se for my question?
@NathanMerrill But from where are you writing these messages right now?
my computer
@NathanMerrill :)
14:47
Anyone familiar with SRI, I'd appreciate the help here.
Traditionally, only one branch of a conditional is executed (whether that conditional be an if/else, switch-case, etc.). I think I'd like to allow execution of multiple branches (basically, every branch where the condition is true). How should I explicitly notate this?
Don't make it an if-elseif-elseif-elseif. Just make it an if-if-if-if
@mınxomaτ it definitely sounds like Firefox's SRI hasher has a bug
@mınxomaτ I'm not.

« first day (1928 days earlier)      last day (3211 days later) »