« first day (1186 days earlier)      last day (2836 days later) » 

12:12 PM
Monking!
@Mast Yup, all the Travis builds were failing on that too
Dunno how long that will take to fix properly
 
Monking @syb0rg
@syb0rg Can't you use one of the other builds as template and get it done in not too long?
Or am I over-simplifying things.
 
Portaudio came with it's own CMake build system already written
Which is nice except it's broken
So I'll do a re-write to that probably, but even then... their source code fails to recognize a device when I compile it on my Mac
So that will be interesting to track down... I know the older versions of Portaudio were using Apple's deprecated CoreAudio libraries
 
Deprecated is quite irrelevant at this stage if you ask me. As long as it still works.
It isn't like there's security issues or anything.
 
I don't know until I do a thorough debug
Could be something big, could be something small
 
12:40 PM
Question: any point in me learning c/c++ proper?
 
@DanPantry For?
 
@syb0rg kicks and giggles
 
@DanPantry Unless you go into embedded, no.
It's a mighty strong, mighty frustrating language.
 
@DanPantry You develop in C for two reasons: performance and portablity
 
Although it never surprises you in ways JavaScript does...
 
12:48 PM
@DanPantry You'll learn what pointers are, that's good
But after that, stop
it'll just hurt
 
I enjoy the pain
3
 
I still don't get C style class definitions
 
C and C++ are part of my existence. Funny thing is I'm surprisingly slow at both.
 
it's like a fkced up interface that later gets an implementation, but if you put the implementation in the definition then it means something completely different than if you had put it in a separate place
so blehhhh
 
At least it's consistent.
You'll always know why it failed.
You don't always know how to fix it, but at least you got a start.
 
12:51 PM
It's not a case of wanting to learn to be a "proper programmer" as such but I think learning about how memory works and such may be helpful
All the languages I work for right now abstract the magic away from me. For better or worse.
 
@DanPantry Rust also does a good job for learning the basics :P
 
Keep in mind languages which don't abstract those away are dying or niche.
It's simply not the world of today to learn C.
 
Debatable, C is a language that will never die
 
Unless you want extreme performance, portability, smallest footprint ever, the likes.
 
I perfectly understand they are dying
Just is it worth learning them for the knowledge side of things?
 
12:54 PM
@syb0rg Definitely, but in the grander scheme of things, it's becoming less and less relevant for the average programmer to know a thing about it.
 
#include <iostream>

int main() {
  std::cout << "Hello, world!" << std::endl;
  return 0;
}
 
That's mangled C++, not C.
 
This basic code fails on a Mac due to very obscure errors from templates. Excellent.
 
Drop the return 0;, it's implicit.
 
Yes, I'm trying out C++ because I can't get valgrind installing behind this firewall.
(but gcc is already installed)
 
12:56 PM
If you're feeling up to it, sure, learn something low-level. Pick ASM for all I care. Whether it's 'worth it' is subjective though.
Will it open your eyes? Likely. Will that benefit you in any meaningful way when writing web applications? Meh.
 
I'm an idiot.
I was compiling C++ with gcc, not g++.
Well, back to JavaScript.
 
If you're looking for a side project, I'm sure @syb0rg won't mind you taking a look over the Khronos repo :-)
 
It is probably the nastiest exception you could ever get. Invariably caused by native code corrupting the GC heap. Well, you have some. The exact location where it crashes is rarely the place where the corruption occurred. It isn't detected until the GC collects the heap, that always happens later. A good code review, unit tests, randomly commenting out code is the way to get somewhere. — Hans Passant 6 secs ago
 
Christ, no. I'll break everything.
 
Impossible, it's already broken
Actually tho, if you install portaudio with your package manager then you should be able to compile it with my instructions
 
1:01 PM
> randomly commenting out code is the way to get somewhere
The question remains whether you'll like where you end up.
 
You're running a Mac nowadays, right @DanP?
You'll like each other.
 
@Mast right now, yes.
But it's a work PC, not a personal one.
 
Go have fun with your white machines.
 
lol
you phrased that like we're the MacMacMac or something
with pointy white hats with an apple symbol on it
 
0
Q: How can I shrink the logic of this binary search that gets ALL matching results?

LansanaI am implementing a binary search to retrieve all matches of a specified value. Instead of a regular binary search that would just return the first match, I want to get that first match AND all matches above and below it in the set of objects. For example, I have an array of objects that are sor...

0
Q: Efficient array base Queue Implementation

jillianHere I have implemented a queue. Is this a correct, efficient queue implementation? what issues are there if any and what can be done to make it better? import java.util.*; public class Queue2{ private int amountInQueue; private int[] queue; private int rearIndex; private int fr...

 
1:02 PM
aren't you?
 
IT IS MY RIGHT NOT TO INCRIMINATE MYSELF
/s
 
"Self-sponsored team building" has to be the stupidest idea a manager could ever think of. If my manager ever came up with some rubbish like that, I would rather keep my money than attend some fake event which will supposedly build the team. And if they have a problem with that, and push their "team building" too much, I will just build my team somewhere else. Does that sound like "team building" to anyone? It doesn't to me either. — Masked Man yesterday
^^
Maybe employees should fund their own salaries? They're the ones who benefit from it after all. — TheMathemagician 21 hours ago
wat
 
@skiwi [sarcasm]
 
I know, still wat :D
 
@skiwi I tried to parse that. Error'd.
 
1:06 PM
@skiwi all of my wat is now yours.
 
@Mast "Your logic is that the team benefits from the team building events, so the team should fund it. Then, if the employees benefit from being paid a salary, so should the employees fund their own salary." - something like that.
 
@DanPantry Do you have brew installed?
 
@syb0rg I do sir
 
Perfect! If you were willing to try out Khronos then, it would be simple
 
@syb0rg The lure, it's perfect.
 
1:07 PM
I would love to but I don't think it'd be wise for me to be compiling code on my company PC
I trust you, but still, don't want to blow something up
 
It's not going to blow anything up. At worst it's simply not going to do anything at all.
 
^^^
I understand why not tho, it's good to be safe
 
StackOverflow is not a code review service. There is codereview.stackexchange.com for that. If you want to get help - please provide a minimal reproducible example, your desired output and show what you've tired. Try reducing the problem to a specific problem as much a possible. See hereDavid Arenburg 21 secs ago
 
> But its taking literal two days to run to completion
 
need a small help
 
1:11 PM
@CrazyNinja Small Help
 
I have a string which includes a arithmetic section. So I wanted to extract it out and fill those values in a object.
I know the arithmetic format, therefore before subString() I could check whether that String part is available or not
This is one sample string
3 x 60 x 1 kapsel/kapslar
So, I want to extract out 3 x 60 x 1 potion
 
Is the arithmetic always at the beginning?
 
i wrote this simple regex pattern
@syb0rg yup
^\d{2} x \d{2} x \d{2}.*
 
Don't use regex, this is easier than that
 
Nuke everything not a number or operator. You don't need regex for that.
 
1:14 PM
subString?
 
This is called a code review. Also, we can't reproduce this. This is type of XY problem, when you focus on the solution rather the problem. We need to understand the problem in order to provide solutions. If you want someone to review your code, try at CodeReview SE — David Arenburg 16 secs ago
 
substring to next space, if not matches digits and not matches x, halt stripping
 
@Pimgd you suggesting to go for Pattern & Matcher?
 
I dunno
 
Wouldn't there be a performance impact?
 
1:17 PM
We're talking Java, right?
 
@Mast hahaha... Nice joke yup, it's Java
 
I'm no Java guru, but I don't think the performance will be too bad.
And if it is, just put it up for review :-)
 
I'm voting to close this question as off-topic because it is about code review. — phiver 43 secs ago
 
yeah, first I'll try what I think of :) thanks for your replies
 
I dunno what you'd just to check if it is digits
 
1:22 PM
Line 2 should be makeCluster(num_cores). That's a quick improvement right there. The rest, code review. — Pierre Lafortune 49 secs ago
 
@Pimgd I suppose there's something like .isNumeric?
 
Of-course, if you're going towards Code Review, don't forget to read their on-topic help centre as well. It would be a shame to have a negative reception on two sites. — Mast 40 secs ago
 
@Mast probably
 
actually i started with this codereview.stackexchange.com/questions/96545/… i 've just splited it into several class,the logic is exactly the same — bob 43 secs ago
 
@Duga How to get a working program? Steal it off Code Review.
Found a bug? Check the answers on the question you stole it from for a fix.
And if there are bugs, you can just put them down as an answer (though that doesn't fix the issue...)
manager pun: "Our developers are using Spring, so they're pretty flexible."
I don't know whether to laugh or cry.
 
1:35 PM
@Pimgd That's worse than a dad joke.
 
@Mast No, still running on one monitor.
 
63
Q: Huge no. of files for Angular 2

Moshe ShahamI wanted to start a simple hello world app for Angular 2. When I followed the instructions in the official quickstart the installation created 32,000 files in my project. I figured this is some mistake or I missed something, so I decided to use angular-cli, but after setting up the project I co...

:V
 
@Donald.McLean You should use them for viewing purposes, not as a treadmill.
 
That's pretty funny
 
Good luck though, I hope you get your 2nd back soon.
 
1:40 PM
I have another one at my office. I can pick it up tomorrow.
 
@Pimgd That's because of node_modules
i don't know why OP's deploying node_modules, though
he should be deploying the compiled static files, node_modules should only exist on a build server
 
I get that part, still I cannot help but imagine this guys reaction
 
Why would you even bother counting number of files. If your hello world app is working, everything is fine — hendrix 3 hours ago
Nonononono, that's not how you develop.
If you see tens of thousands of files appearing in your project folder, you take a step back and wonder how it happened, just like every sensible being.
 
1
Q: R Parallel Processing Optimization for 16 million records

user2757228FG : 16 mil rows , 2 columns AB : 1.3 mil rows , 1 column I have a dataset with 16 million rows and may increase upwards of 30 million. I am using the parLapply to run across three cores in R. But its taking literal two days to run to completion. When I try smaller datasets of about 60,000 it ta...

 
@Mast You need to understand that node_modules is the same as Java's SDK.
Try exploding all classes compiled at develop time in Java, you'll see a similar number.
@DanPantry Transpilers are source-to-source compilers. I think they can only change "X" to "JS". File counts are same. — hurricane 1 min ago
wtf?
Yeah, that's what I just said.
 
1:57 PM
0
Q: Correcting time in DST gap using Joda Time

GotlerWe have a class which acts as a time interval, containing a LocalDate and two counts of minutes since midnight. One of the methods on this class converts these values into two DateTimes. Since DateTime has time zone information built-in this conversion might fail if the time is in the daylight sa...

 
Heya
Any interesting questions or answers lately?
 
@N3buchadnezzar Plenty.
 
So I must dig through to find them myself?=(
 
@DanPantry I suspected as much. But I wouldn't expect to get the entire SDK downloaded for a simple Hello World program either. I'd expect I'd need to download the SDK before trying anything with such an amount of files involved.
@N3buchadnezzar Nonononono. You can try various SEDE queries first.
 
SEDE?
 
2:06 PM
Stack Exchange Data Explorer.
 
I do not see anything synchronous, and you are using the standard fs library, you should be fine. But I think this question belong more to codereview.se :) — DrakaSAN 8 secs ago
 
You can find everything on the entire SE network using SQL.
 
scratches head
I am an idiot
6
 
If you're patient enough, give it a day or so to cache up.
 
@Mast Meh, you can install modules globally if you want it that way.
Plus, that's not a "simple hello world" project.
That's a "simple hello world" in a dialect of JavaScript that isn't available yet using a framework and for the browser with the JavaScript equivalent of Maven or Gradle.
It would be analogous to installing Spring.
 
2:08 PM
Oh, right, Gradle. Awesome stuff, hard to figure out what goes where.
 
You could throw something together a lot simpler without all of that cruft if you wanted to.
The upside of the approach JS takes though is that you only ever install what you need. If you don't need Babel, you don't install it
whereas the JDK is a permanent weight on your HDD
@N3buchadnezzar You're not the only person to say that today. :)
 
We got a list.
 
climbs back into the jar of idiocy
 
We're checking twice. We're gonna find out whose an idiot and who is lying about not being one.
 
That's going to be easy.
 
2:14 PM
How can you do an idiot test? Wouldnt they just fail it?
 
TREE CONFLICTS AHHHH
It's like a forest war
 
The ents fight back
 
@N3buchadnezzar Easy. You ask them one question:
How do you confuse an idiot?
 
@N3buchadnezzar Simple. Either you're admit you're an idiot or we assume you're one by default.
 
2:16 PM
@DanPantry Write See other side on a blank piece of paper.
Both sides.
 
@DanPantry ? confused
 
@N3buchadnezzar Ding ding ding, we have a winner.
 
^^
 
@Mast That one had me stuck for ours
 
holy crap, some mac keybinds are awful
 
2:17 PM
0
Q: Another Python prime-listing algorithm

BusyAntI wrote a small program in Python that finds primes (how original) up to some limit. I tried to produce very clean code, so I'd be vary grateful if you could point out any improvement I could do to make it more pythonic and more readable. I'm also interested in knowing whether or not it can be s...

 
get copy of window saved to clipboard on windows? Alt + PrintScreen
on Mac?
 
Makes sense.
 
Ctrl Shift Cmd + 4. Then press Space.
and then click the window.
 
Yuck.
I usually just hit PrntScreen and go from there. No combination required.
 
alt + w?
 
2:18 PM
All Paint tools can Crop nowadays.
 
@N3buchadnezzar You asshole
ALT on Mac is in the same place as CMD on Mac
and CMD + W closes the current Window
 
@DanPantry That was my idiot test!
 
so I ijust pressed CMD + W and closed the window
 
alt + w closes the current window on Widnows.
 
This would be better suited to codereview.stackexchange.comAlbzi 45 secs ago
 
2:20 PM
Ops, it is actually ctrl + w..
 
@Duga Uh... I don't think so
That seems to be "what does this code do"
second opinion please?
NVM!
I thought OP had bad grammar. Actually, he has good grammar, and I just have the dumb.
5
 
@DanPantry Maybe you need to use the sleep?
 
I'm not tired, just stupid
4
 
@Albzi Nonononono, please read their on-topic help centre before making such a recommendation again. — Mast 50 secs ago
 
Speaking of someone else who has the dumb.. ^
@Mast I think it's on topic, I just misread it
 
2:22 PM
I don't think it's on-topic. It's one single function. One.
This is stub code.
 
It's really short code though?
 
At least it's not zero.
Well, if it's stub code, fair enough. I said it was OT on the purpose of it not working
 
Maybe I should ask a whitespace question here.
FizzBuzz in Whitespace
5
 
"you have a lot of extraneous whitespace."
2
I would hate to debug that esolang
 
Zak
@Mast I don't think it's stub code. IMO, stub code means "not enough context to offer any meaningful advice". There, I could probably say, at the least, put it in a function that takes the values as parameters
 
2:26 PM
@DanPantry You got a draggable piece in your droppable square.
@Zak I'd say this code is so short it's stripped from any and all context.
I must say it's a tricky area though.
Welcome @SteveBerman
 
@Mast Yo dawg, I herd you liked draggable pieces.
 
@SteveBerman You don't have enough reputation to talk yet. This is the Code Review general chat. Did you have a question about our site? We also have a Code Review Meta. If you're wondering what's going on here, have a look at the chat FAQ.
@N3buchadnezzar I'll keep dragging your pieces till you drop it.
 
0
Q: Need help cleaning up this code and finding a better way to write it. (it works)

Dirty-Santadef Ana_exc(): global global_dic, missing_key_w, out_put_defult, ffd_ana_exception_path_w, ana_exc_input_path, ana_5min_input_path, min_flag, ana_ffm_track count_path1 = 0 count_path2 = 0 meow2 = '' ana_exc_key = '' ana_exc_time = '' ana_5min_track = 0 ana_exc_missing = [] ana_exc_ffm_header ...

 
That's an Angular 'template'. Apparently they wanted to keep HTML and JavaScript separate, by adding a load of identifiers that no one else ever used. @Mast
Angular 2 I should add
 
2:30 PM
Sure thing. It just passed final code review, you can find the info here: github.com/logstash-plugins/logstash-filter-aggregate/pull/37pandaadb 16 secs ago
 
0
Q: Q: HackerRank: Equal Stacks

jglkait's my solution to equal stacks problem. I thinks it's really messy and slow. could you give me some thoughts about how to optimize given code and algorithm(i'm pretty sure problem can be solved way effectively) import java.io.*; import java.util.*; import java.util.stream.*; import java.text....

 
@sos If you have a working solution that you think is inefficient, then you should ask (an on-topic questin) at codereview.stackexchange.com. This is not the place to ask for general implementation ideas. — chepner 20 secs ago
 
@N3buchadnezzar Crap, they make full fledged videos explaining memes now?
The world is doomed.
 
Please note that this question in it's current form is off-topic for Code Review. We are about improving existing, working code. — syb0rg 6 secs ago
 
@Mast Or smarter.
 
2:49 PM
What is your specific problem? This is no code review/discussion forum, but a Q&A site. As a sidenote: short is not guaranteed to have 16 bits. If you need fixed width integers, use them! The C standard provides appropriate declarations in stdint.h. — Olaf 7 secs ago
 
-1
Q: C#: Parser Error - Unexpected symbol "in" of foreach loop

AlexI am new with c# and I've been working on a simple program but seems there is something wrong that causes a "Parser Error" keeps showing up. I don't understand the error. Any help?

1
Q: Small script to re-create a file indefinitely

Marc-AndreI created a small ruby script at work to recreate a text file I use for a test in the Java application we are supporting. I'm still really new to the ruby paradigm and wanted to know if that small script respect most of the spirit of it. The content of the file doesn't need to make sense since ...

0
Q: Roman number converter in Kotlin

Sebastian KramerI'm learning kotlin and java. As a code-kata I wrote the roman to decimal converter. I'd be very grateful for code review. I was trying to keep things simple and funcional. I'd especially appreciate any comments on the functional style (e.g. the non-purity of some mappings). Converter tests: ...

 
@CaptainObvious off topc. Btw, what took you that long ?
 
@Heslacher Thanks for the typo correction
 
my pleasure
 
I think Code Review is the right site to ask this on. — Downvoter 59 secs ago
 
3:06 PM
Monking
 
Monking @Vogel612
 
@Vogel612 Monking
 
Zak
3:28 PM
I just spent a whole 10 seconds scrolling to the bottom of my bookmarks list. It's probably time to refactor it.
 
@Zak Have you turned down your mouse-sensitivity to zero, or do you have like more than 20 bookmarks?!
 
Zak
@N3buchadnezzar I have about 20 that live on my bookmarks bar, and then an overflow of about 130 (rough estimate)
 
You mad man.
 
Zak
@N3buchadnezzar Hey, at least it's not 130 open tabs, right @skiwi ?
 
Based on the starwall, everyone in here has contracted the dumb virus.
 
3:32 PM
@Hosch250 No, you are the dumb dumb.
 
@N3buchadnezzar I didn't say I wasn't, did I?
 
@Zak Maybe that is how it starts. You have so many bookmarks that you start using tabs. It is a slippery slope. Soon you will start writing down urls on post it notes.
 
Uh, is everyone changing their avatars to Pokemon thingies?
 
@Zak I closed 130 today
3
 
Arda and quartata?
 
3:34 PM
Meaning I closed 12% of my tabs
3
Firefox was getting extremely slow on boot for some reason
 
@skiwi It huuuuurtzz
 
@skiwi What did you expect it to do with that many tabs?
 
Start a tab factory
 
It should take a lesson from Linq.
It doesn't need to load the tab until he goes back to it.
 
@Hosch250 Work properly? :D
 
3:36 PM
0
Q: Please rate my single page website

SamI learned HTML, CSS, JS, and Bootstrap then I grabbed a PSD and tried to code it from scratch (to get experience and something for my currently-non-existent portfolio). Here's the result. I need someone to look at my code and tell me if there's something wrong with it. You know, did something the...

 
@Hosch250 My firefox developer version does that
 
@skiwi I think you are an edge-cases edge case.
2
 
Now the other tricky part is that I cannot close too many on one day, because if Firefox crashes then it loads back its old savepoint and has all the tabs opened again
 
@N3buchadnezzar Maybe the non-dev version does too--I wouldn't know.
 
@Hosch250 It's already doing that :)
 
3:38 PM
 
Zak
@N3buchadnezzar I feel like @skiwi has gone beyond a mere TabFactory, more like a TabFactoryFactory
4
I'm discovering bookmarks I didn't know I had ^^
 
@Zak Maybe he needs another factory to handle all those factories.
@Zak While @skiwi is discovering the rise and fall of empires through his old tabs.
2
 
I am often surprised by the stuff I find
 
@N3buchadnezzar skiwi the tab factory.
 
That got get confusing for dyslectics. "Where are my kiwi tabs?! I thought this was a kiwi tab factory"
 
3:43 PM
skiwi and the 101 tablings
3
 
Sounds like a cheesy series.
 
@skiwi 1001
 
Tabs on the wall.
Skiwi now owns the starwall.
 
I like that you can read the entire discussion just from the starwall. The starwall acts like bookmarks. We have 40525 bookmarks. Hah! beat that
2
 
@N3buchadnezzar How many of those bookmarks are 'lol'?
 
3:49 PM
@Mast You can use your fancy quary search to figure that out.
 
facepalm
I just fixed a stupid bug that had me busy all day.
 
@Mast Your face? lol :p giggles like a little schoolgirl
 
void addElement(const nameOfType) {
    countries.push_back(nameOfType);
}
That's not how you C++.......
Should've been:
 
When ranked against all sites (main and meta) CR comes in 32nd for votes per day.
 
void addElement(const nameOfType element) {
    countries.push_back(element);
}
 
3:52 PM
That's out of 316.
 
Is that good? How do we rank when we remove 200?
 
@Mast The argument doesn't have a type?
 
How does that even compile?
 
@skiwi Oh, it had a type allright, it just didn't have a name. So the compiler thought I forgot the type and typed the name instead.
I saw the const and my head somehow misinterpreted that as a type.
No red flags were raised where there should have been sirens.
 
You mean C++ has a Variant type too?
 
3:53 PM
It happens
 
You get odd compilation errors in cases like those...
 
In VB.NET, that would at least have been a compiler warning...
 
@Hosch250 The first didn't compile, no.
 
Oh.
Why didn't it tell you the line the error occurred on?
 
If we change our metric to Votes per User, we're 133/316.
 
3:55 PM
It did. I told the compiler it's crazy.
Major brainfart.
 
Oh, just one of those "I'm an idiot" moments? :)
 
I'll update my IDE so const doesn't have the same colour as types.
 
Sounds like a good idea. In VS C#, const is a keyword (blue) and types are kind of a light aqua, or something.
 
Zak
 
3:57 PM
Yup. Visual Studio is secretly a very good IDE for languages like C++.
2
 
Zak
Only one bookmark worth keeping out in the open ^^
 
@Zak Great Advice
 
Safari has a really weird bug, and I'm not sure how to report it to Apple.
 
@EBrown Feedback Assistant
 
@skiwi Yea, now I'm wondering where he left the folders Good Advice, Mediocre Advice and Lousy Advice.
2
 
3:59 PM
If you start navigating to a page, but then you Right Click -> Move Tab to New Window, it stops navigation.
@syb0rg Where's that?
 

« first day (1186 days earlier)      last day (2836 days later) »