« first day (947 days earlier)      last day (3070 days later) » 

5:00 AM
I don't choose to have nightmares
The worst is when I wake up and they become real
 
Zak
Do they have drugs for that? (genuinely curious)
 
Zak
I would offer you mine, but the last dream I can recall remembering was over a decade ago, so I have no idea what they'd be like.
 
It's ok, I'm used to it
But honestly, it freaks me out when I dream about something and it happens
And a few days later, I dream that I'm going to be murdered
Not a nice feeling, I must say
But anyway, this is WAY off-topic for this chat
 
Zak
It's 5am and midnight in the US, it's not like anything else is happening :)
But I think I will try and get another hour or 2's sleep.
 
5:07 AM
I still have 3 to sleep
 
@Zak 3pm here :P
 
@Quill Can I borrow your help?
 
Sure, if I can
 
I'm implementing a few minimifications on IMGJS
But I'm finding a very bizarre bug
I've implemented a way to replace escape sequences like \xAF \u5BDF
 
mmm
 
5:11 AM
It works in the console, but when running in the browser, it replaces with undefined
.replace(/\\x([\dA-F]{2})|\\u([\dA-F]{4})/gi, function(_, hex, unicode){
	return String.fromCharCode(parseInt(hex || unicode, 16));
})
That is the code
 
Can't you just:
.replace(/\\x([\dA-F]{2})|\\u([\dA-F]{4})/gi, function(_, hex, unicode){
	return String.fromCharCode(parseInt(hex || unicode, 16) || 0);
})
 
Didn't worked
 
oh...
 
0
Q: How do I correctly build my graph for the Hopcraft Karp maximal matching algorithm in the scenario given?

Shreyans ShethI'm solving an algorithmic problem which required me to learn a Maximal Matching algorithm. After spending a day learning and implementing it from various sources, I have understood the algorithm. However, I'm unable to apply the algorithm (build the graph) for the current scenario. Here it goe...

 
I'm trying something else
I don't get it :/
 
5:29 AM
@CaptainObvious One-letter variables all around and #define pb push_back because typing .push_back is too much effort I guess.
Like just using namespace std; wasn't bad enough
Awful.
And broken...
---
Monking all!
 
Greetings
 
do you have the unicode header in your html?
 
No idea
It is running on JSFiddle
 
paste the html into a gist or pastebin
 
Enable everything, use the Shortcode encoder
Use this input: o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g
 
5:38 AM
Yuck.
 
What?
The bug is on line 144, on the Javascript side
 
.replace(/\\(x[\dA-F]{2}|u[\dA-F]{4})/gi, function(_){
	var c = new Function('return "' + _ + '";');
              return c();
});
 
There
I've messed around with it
 
return new Function('return "' + _ + '";')();
You don't need to assign it to c
 
I know
 
5:44 AM
I think this question is better suited in Code Review because it's already working and you're looking for the glitches. — try-catch-finally 20 secs ago
 
I had an alert(c);
But removed it
 
what is c in this context? an anonymous function?
 
Yup
But somehow it comes as undefined down the line
Try this input: \uFFFF\u00A0
 
it comes out fine when I put a alert(copy) after the final .replace()`
 
I know
It's the dictionary replacement
 
5:54 AM
Can you explain this kinda thing: return Function('return ' + _)()?
 
A bug
 
how does that get the charCoded result
or new Function('return "' + _ + '";')()
 
It should be Function('return "' + _ + '";')
The later one
 
yes, but... can you explain how these work please
 
It will receive an escape sequence, for example '\uABCD'
And then it will be Function('return "\uABCD";')
Which should return the character
 
5:59 AM
oh, it's evaluating code on a global scale, I see.
 
Exactly
I've decided to remove that minimification because the bug is WAY deep
 
did String.fromCharCode give you the bug?
 
Yup
It is a bug because it later on will use \uFFFF to get the replacement value
leaving the escape sequences is better for now
 
6:12 AM
that's some cool code tho
 
It is
Shame it is bugging
There
Check everything, use the Shortcode encoder
Amd use this input: alert(1 + 2 / 3);
 
alert((1 + 2) / 3);
brackets ;-;
 
It does (3)/3
It isn't that smart
 
my code does, your's does 1+(2/3)
 
But if you do 1+2+3, it reduces to 6
 
6:18 AM
it's not a plus, it's a divide
what's your point?
 
It is automatically evaluating those expressions
 
yeah, minify and shortcode eval the code
 
Exactly
But I'm going to sleep now
Have a good night
 
good night
 
Zak
6:47 AM
Apparently, my younger brother (who's only about 3 years younger than me) has never experienced dial-up internet. In his conception of the world, the internet's always been fast, reliable and unlimited. I'm not sure how to articulate how I feel about this.
 
0
Q: N Processing connect to a single process: Socket Programming

user3337714The idea of my program is to use pthreads, semaphores, posix shared memory, and sockets to create an environment where N processes (that we will refer to as the children) can connect to a single process (that we will refer to as the parent) in order to send it data. Requirements Common Code ...

0
Q: WIP: C++ mock social networking program

BaloneyOsGood evening! I'm currently working on my final project of my first semester of C++ (and programming in general). What my professor wants us to do is to make a mock social media program that has some basic functions such as: Sign up Sign in Follow user Write a post View Activity – (Activity fro...

 
7:06 AM
0
Q: Please advise if the algorithm written for deleting element from array can be further optimized or not?

Harsimran SinghBelow function takes an array and an element to be deleted from the array and return a new array. So I would like suggestion if this can be optimized some how or I am doing good in this. public static int[] sbSample(int a[],int i){ int size=0; int b[]=new int[a.length]; // provide lengt...

 
Monking
 
Zak
@Heslacher Monking
You beat me to my edit :(
 
monking @Zak I have approved your edit. ;-)
 
7:30 AM
@love "Pushing to refs/for/* creates code reviews which must be approved and then submitted". I don't want review because y is my private branches to keep source safe. — michaldo 1 min ago
 
In ordering #5, self-driving cars will happily drive you around, but if you tell them to drive to a car dealership, they just lock the doors and politely ask how long humans take to starve to death.
4
 
7:43 AM
FYI, for questions like this one, it would be better to post codereview.stackexchange.com. I asked there about some Haskell code and received good answers. — rubik 32 secs ago
possible answer invalidation by user1576916 on question by user1576916: codereview.stackexchange.com/posts/63374/revisions
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comMark Seemann 15 secs ago
 
0
Q: read one million record/second

Ahmed AlashrafyThe following code are ingesting 10k-20k record per second and I want to improve the performance of it. I am reading a json format and ingesting it into database using Kafka. -I am running it on the cluster of five nodes with zookeeper and Kafka installed on it. Can you give me some tips to impr...

 
8:19 AM
May be Guessing a file type based on its content would be interesting question to have a look on — Mohit Shrivastava 59 secs ago
 
8:34 AM
0
Q: How can I use get id with wp job manger category search?

MrJoshFisherIm trying to make a form that goes from the home page where you can fill out location and job sector from a drop down list and then its sends the values to the jobs page and search the jobs with the selected values, ive managed to get it working for the job location, but having a slight issue wit...

 
possible answer invalidation by BaloneyOs on question by BaloneyOs: codereview.stackexchange.com/posts/113119/revisions
 
@Duga Rolled-back and commented.
 
8:52 AM
0
Q: PHP - Adventofcode - Day 1

Jeremie Ges<?php // From adventofcode.com // Question 1: // An opening parenthesis, (, means he should go up one floor, and a closing parenthesis, // ), means he should go down one floor. // To what floor do the instructions take Santa? // Question 2: // Now, given the same instructions, find the positio...

 
 
something along those lines, yea...
BBIAB,off to university :)
 
Zak
9:22 AM
@Vogel612 Sometimes I forget you're still a Student :p
 
Let's say... again.
I did work full-time this summer
 
9:49 AM
0
Q: Google maps class inside fragment , with marker carry object

Mina FawzyI need someone review my google map class , here is my situation I am working in medical project , I created one class to show hospital items in map with data object , here is my fragment class , I create helper class as I don't like to put all methods in long class. import android.location.Loca...

 
Monking folks
 
Zak
@SuperBiasedMan Monking
 
Now to test out the new version of a beta program that has no change notes to see if they fixed the bug I logged.
 
No change notes?
What's the purpose of a beta if you don't keep commits or change notes?
 
I should say no new change notes. They suddenly dumped another beta the day after the previous one, and I'm just checking on the off chance they fixed my bug.
 
10:00 AM
May have been a hotfix.
What software are we talking about anyway, assuming it's open beta?
 
Naw it's closed beta, and nothing programming related. I don't think anyone would be familiar with it.
 
10:37 AM
0
Q: Living with Courage - SPOJ

Saipreethi MuthusrinivasanI am stuck with the problem Living with Courage on SPOJ. My solution passes the testcases in spojtoolkit and the testcase in the problem description. But I get Wrong Answer after submission. Problem statement @ http://www.spoj.com/problems/COURAGE/ #include <iostream> #include <string> #include <...

 
Monking
 
11:12 AM
It's a rare day when I find something I actually need to post a question about on SO
Or well, "need". It's mostly a curiosity.
 
0
Q: Scala - how can I refactor Play Framework controller

infaustusI would like to refactor those two match-cases. I don't know that am right, I moved var to second line var user = new UserInsert("", "", "", "", "", "") and later assign case class to this var? /** * Login/register action. */ def register = Action.async { request => var user = ne...

 
Zak
@SuperBiasedMan I feel there's very much a bell-curve distribution on SO: When you start out programming, you've no idea how anything works, and the explanations you can google sound like a foreign language, so you go to SO and plead for help.
Relatively quickly, you reach a minimum competency level where you can understand the documentation and answers you find on google, so you rarely have to post to SO anymore
Until eventually, you end up only posting questions in severe edge-cases, or about topics at least one level of abstraction above/below the actual code.
 
Pretty much.
 
Zak
Unless of course, you're lazy, or stupid, in which case you never stop asking for fish...
 
At this point I only need to post when I'm asking what Python does when trying to get the "maximum" value of a list of sets. Which I will likely never use but got curious about.
I'm sure if I try do more in Java I'll have plenty of bad questions to ask. :)
 
11:25 AM
@Zak "Relatively quickly", I think for us that sounds like the truth, not so much for all the people still left at SO...
 
Zak
I did something similar with arrays vs dictionaries, which resulted in an explanation of their underlying memory structures, hashed linked lists, hash buckets etc.
@skiwi True. There's also a function of how much work you're willing to put in to finding an answer/explanation on your own.
 
Yeah I've just been told that setA < setB is actually testing if A is a subset of B. Which is very interesting and not what I'd have guessed. You learn weird stuff on SO
 
Some people just cannot learn how to read the documentationf or whatever reason, that's quite annoying
 
I think that's less of an issue than people not applying the knowledge from the documentation. Like they know how to use the open a file command and how to use the turn a string into an integer command, but they don't know how to read a file as a list of integers so they post about it.
The docs can be hard to read or confusing, that's why SO is adding a documentation section. But if you can't invent a solution when you have the tools, that's where people ask a lot of useless questions.
 
@SuperBiasedMan Is that even a SO question? Sounds edgy between SO and Programmers.
 
11:34 AM
@Mast I've asked similar SO questions before and it seems fine? It's a very defined question "What does Python do in X case". Programmers has such a weird scope it's a last resort place to ask questions.
4
 
lol
Can't argue with that logic.
 
Zak
To quote myself:
Nov 25 at 23:10, by Zak
@Hosch250 I used to think I knew what was on-topic on programmers. Now I know better.
 
I think there was a joke going around stating even Programmers didn't know what Programmers' scope was.
 
I don't think that was a joke.
 
Zak
@Mast Do they?
 
11:38 AM
We should invite them to The 2nd more often.
 
0
Q: Benchmarking String splitting

Boris the SpiderThis is a follow-up from this Code Review question. There are a number of ways of splitting a String using a delimiter in Java, especially now with Java 8: StringTokenizer (not recommended) String.split (recommended replacement) Scanner with delimiter Scanner with Pattern Pattern.splitAsStream...

 
Zak
hi @ratchetfreak
 
My wabbit question is one vote away from getting me my 2nd 'Good question' badge. I never expected it to go that well.
 
Zak
@Mast link?
 
24
Q: It'th wabbit theathon

MastI don't know regex. I want to learn regex, but learning regex just for the sake of regex would be quite boring. So I decided to learn Ruby as well (which so far looks a lot like Python, which I'm familiar with). My first program attempts to speak with a combination of both Daffy Duck's lisp and...

I was about to Santa it but I already had.
 
11:52 AM
@SuperBiasedMan Thanks, was about to link it.
Basically, I wrote something small in Ruby making use of regex magic and it was received pretty good.
Woot, got Santa'd :-)
 
Zak
Ho Ho Ho
 
Perhaps I'll take Dan's suggestion and re-write it in LISP one day.
Speaking about @DanPantry, how's the weather there? ^^
 
@Mast Lithp theathon?
 
0
Q: Read characters from stdin into an resizeable array

simplicis veritatisAs first steps in C, I'm trying to write a program that reads from stdin into an array allocated on the free store, until an exclamation mark ! is entered. The array should be extended to prevent overflow. Here is what I've written: #include <stdio.h> #include <stdlib.h> char* increase_buffer_...

 
@SuperBiasedMan ((Lithp)(theathon))
And Mat's made me aware of a bug. It's not handling x
Daffy will most definitely not be able to properly pronounce an x
Welcome @LightnessRacesinOrbit
 
11:57 AM
a Masterful welcome, thank you
 
Welcome!
 
@Mast LISP............... LISP............... LISP................ ?!?!?!
 
Zak
12:09 PM
@Mast Can't speak for Wales, but it's been very windy around here recently.
 
Heard you guys got a lot of rain.
 
Zak
12:28 PM
@Mast That too
 
1
Q: Getting a data async

Anatolyprivate readonly object _gettingDataTaskLock = new object(); private Task<Data> _gettingDataTask; public virtual Data GetData() { Task<Data> inProgressDataTask = null; lock (_gettingDataTaskLock) { if (_gettingDataTask == null) { _gettingDataTask = Task.F...

0
Q: Ruby on rails - add multiple choice into a polls app

absint0oI'm tying do add a new kind of answers to my polls app. It will be a multiple choice with checkboxes. The user can choose one or more possible answers from the checkboxes presented. I'm struggling to make it work because it won't save to my answers table (i have an open answer and multiple choice...

 
12:46 PM
Greetings, Programs.
 
@CaptainObvious Gone.
@Donald.McLean Greetings, Novae.
 
Zak
Apparently, they agree with us :)
 
They shouldn't worry about what I think, I'm super biased.
2
 
@Zak Ah, so that's what Lightness was doing here.
 
lol :P
@SuperBiasedMan Man, you're so super biased
 
1:03 PM
@SuperBiasedMan But the question is, what are you biased (for or against)?
 
"Improving" code is perhaps not best placed on Stack Overflow. Perhaps CodeReview but check their guidelines first. — Paulie_D 48 secs ago
 
Zak
So I just went and found out how to chain logical operators in excel functions. Suddenly I had an epithany, I now understand exactly how monstrous excel functions come into being.
 
The wording somewhat implies Code Review, alas it is not a good fit. The cardinal rule of Code Review is that code must already be working as intended, which is not true here. — Zak 27 secs ago
 
Hopefully no one will create a language called Salutations! in which all the keywords are greetings. It would make for an interesting "Hello world" application... ;) — TrueWill Sep 10 '11 at 19:46
3
@Zak Enlightened?
Welcome @enderland
 
So glad to see this. How about torching signatures, too? And perhaps crap like "thanks in advance?" Great, thanks in advance. — Justin Morgan Jun 7 '11 at 14:21
 
1:08 PM
The ironic part is of-course somebody wrote a language using quotes from Arnold Schwarzenegger which is arguably even worse.
 
Zak
@Mast Turns out excel functions don't allow you to type AND, OR, NOT etc. Instead, there are AND(), OR() and NOT() functions. So instead of bracketed operators, you have to nest functions instead.
So "(A and B) or C" becomes "=AND(OR(A,B),C)"
 
AND(B1;OR(C1;NOT(A1)))
Perfectly unreadable.
I'll prefer Brainfuck over Excel any day.
Welcome @ThomasOwens
 
So I heard you all are/were debating Programmers site scope? That's OK. We do that sometimes, too. Can I help clear anything up?
6
 
Zak
Sure, what is Programmer's scope?
 
Yes, is the Programmers scope more of a telescope, microscope, or periscope?
 
Zak
1:16 PM
I thought I had it figured once. I even managed to write a non Off-Topic question. But I still have no idea.
 
0
Q: Two Cache::remember in same method

RicardoThe user id is in the data, but not the cache key - you're going to be using the data for one user, as the favorites for all users; you need to account for clearing the cache when favorites data changes. You seem to be using the banner variables in multiple actions - put the code to set that in t...

 
Our scope is requirements, architecture / design, algorithms and data structures (from a practical, real-world sense - theoretical stuff goes to Computer Science), quality assurance / testing / verification & validation, methods and processes (agile, lean, CMMI, Scrum, XP, stuff like that), configuration management (version control, versioning, release management, deployment), project management (estimation, scheduling, budgeting), and software licenses.
It's all of software engineering, minus software construction (writing code, building code).
 
Zak
I think where most of us fall down is trying to figure out where the overly-broad line is.
 
Or, to quote @Marc-Andre:
Jan 16 at 16:56, by Marc-Andre
Nobody understand Programmers scope correctly :P
We get the broad lines.
 
Overly broad for us is "it needs a book", usually. Most of what is on-topic for us is also very situational. There are lots of ways to do software design and lots of good designs.
So if you don't narrow it down sufficiently for us to only have a small number of good answers, then it's too broad.
 
Zak
1:21 PM
@Mast I haven't got a link to the SEDE query, but didn't we find that programmers has the highest rate of Off-Topic questions of any SE site, and the highest of any substantial site by a significant margin
 
"How do I do requirements engineering?" is too broad. I can throw you a dozen books. But if you constrain the situation more, then it becomes less and less broad until it's useful.
 
So Programmers is at it's best when the questions are as narrowed as possible. But isn't that true for most SE sites?
@Zak And a closing problem, which is why they currently need only 3 VTC to take down a question.
 
@Mast It's not a closing problem.
We close rapidly. We needed to close faster and leave more votes for people.
 
@Mast In general, “explain $broad_concept to me” is a good candidate for being too broad, even if $broad_concept is a software development concept
 
Basically there weren't enough people with vote power around to handle the influx of bad questions?
 
1:23 PM
The problem is code dumps. People are suggested to come to Programmers by SO users who don't understand the scope and then people dump their crap questions.
@Mast There were, but you can blow through your votes in a tag clean-up or a review queue.
 
@ThomasOwens Ah yes, we get that problem a lot here as well.
 
We've gotten better at educating users - pointing them to Meta SO / Meta ProgSE / Meta SE posts about where to post and information about Programmers. It's helping a little.
 
Zak
@ThomasOwens Gosh that sounds familiar ;)
 
How would you put your scope in one sentence? @ThomasOwens
 
Greetings
 
Zak
1:28 PM
I read a little about your site's history. I gather a lot of the problem is that you were, at one point, the de-facto trash heap for Off-Topic SO questions, and it's still kinda stuck to this day.
 
For Code Review it could be like "When you're looking for a review on actual, working code which you want to improve."
 
@Mast The scope of Programmers is the software engineering concepts that you would discuss in a conference room or at a whiteboard.
 
The Workplace dedicated to software engineering?
 
In other words - the things you don't need a computer, a text editor / IDE, and a compiler to solve.
@Mast We don't do any career or education stuff. But we're closer to The Workplace than Stack Overflow, I think.
 
For reference the reason this came up was I posted on Stack Overflow with a question about how Python's max function works on sets. I wanted to know how it would technically work since there's no obvious maximum value for a set. Mast suggested it might be on topic/more on topic for Programmers, but I thought it might be a bit too execution specific.
 
1:31 PM
"We're currently using algorithm X to do Y, should we use algorithm Z instead?"
 
There is some Programmers–Workplace overlap when talking about processes and project management, but this can be easily decided: is the process mostly software-development-specific? E.g. questions about Scrum can work on Programmers.
 
@amon I wouldn't be choosing between Workplace and Programmers for project management questions. I'd choose between Programmers and Project Management.
 
very good point.
 
But yes, if it's a software project, a software-intensive project, or a multi-disciplinary project where you need the input from a software project lead type person, then Programmer is the answer.
 
Zak
There's a Project Management SE?
 
1:34 PM
 
@Zak I didn't knew as well
 
But I prefer software project management questions on Programmers.
Part of it is that my expertise is software project management, and I want to have mad rep on Programmers.
 
lol
(monking)
 
Greetings
How is it going?
 
Pretty good, for a Monday morning
 
1:39 PM
That is really cool
Mine is going pretty average
Only slept 30 minutes
But I don't have to work tomorrow
Which is nice
 
Only slept 30 minutes...!?
 
Sleep is for the weak.
2
 
Yes, only 30 minutes
 
Firstly, I think codereview.stackexchange is a better place to post this. Secondly, what is the rationale behind declaring the for loop in the given manner besides making the eyes bleed? — therainmaker 11 secs ago
 
@Mast * sleep is for the week – but on weekends, we party code!
5
 
1:46 PM
@amon Actually, I do it all week long
@Mast I'm actually jealous of those who had a good night of sleep
 
int i = 0;
for (;i < N; i++){
    int j = 0;
    for (;j < 3; j ++){
That's weird
 
Is that to circumvent scope?
 
That is quite some trippy code
 
@SuperBiasedMan I have no clue; it's from that one SO question that @Duga just linked
 
This question looks like it might be a pretty good fit for Code Review.SE, provided that (a) you want every aspect of your code reviewed, not just some, (b) your code is already working, and (c) you're asking for a review of concrete, real code, not abstract design (whether or not it's expressed as code). If you agree with all of those, please read about what's on topic, and, if your question fits that, delete it here and repost it on CR. — Phrancis 51 secs ago
I will repost on code review. Thank you ! Am using g++ so no compile issues. — J. LS 22 secs ago
 
1:50 PM
Nope, doesn't look like it's used for scope reasons.
 
It looks like some lack of knowledge
Or personal preference
 
0
Q: How to calculate a quality score of something based on attibutes?

alarivaI'm willing to have a way to calculate a quality score of an object; in this case an addressbook contact. I believe there are way better approaches to do this and I'd like to hear your references. How to calculate a quality scoring of an object based on it's properties? /** * * get Quali...

 
I'm voting to close this question as off-topic because it belongs to Code Review SE. — luk32 16 secs ago
possible answer invalidation by Nishant on question by Nishant: codereview.stackexchange.com/posts/112868/revisions
Do you mean servers = [re.sub(r'(ser\d*)_.*__\d.*.csv$',r'\1',i) for i in csvFiles]? And if you're code works, you want to improve it. You should ask this question on Code Review. — Kevin Guan 44 secs ago
 
@Duga Are you sure that you're code works?
 
Okay folks. I've got an A vs. B to poll.
        using (var stream = assembly.GetManifestResourceStream(resourcePath))
        using (var reader = new StreamReader(stream))
        {
            return reader.ReadToEnd();
        }
And B
			using (var stream = assembly.GetManifestResourceStream(resourcePath))
            {
				using (var reader = new StreamReader(stream))
				{
					return reader.ReadToEnd();
				}
			}
 

« first day (947 days earlier)      last day (3070 days later) »