« first day (749 days earlier)      last day (3273 days later) » 
00:00 - 16:0016:00 - 00:00

4:13 PM
-1
Q: Usage of Dynamic Programming

cisco99I need solution to problem 477 in Project Euler. The problem statement can be found here https://projecteuler.net/problem=477

 
^^^ nuke it from orbit
 
Done
 
Rember though, do your retrograde burn over the right location... :)
Otherwise you migh accidentally bomb SO instead..
 
the right location in this case would be a black hole
 
But if just the garbage posts get wiped out, then everyone wins.
 
4:23 PM
I wish I were writing code right now
 
I wish you were too
2
 
I hate Wal-Mart right now...lol
How is everyone else's day going?
 
you packing sodas again?
 
I kinda want to fix up my HTTP daemon project from school. I've actually referenced it on my LinkedIn profile.
 
@Lyle'sMug My day is going good. I just got back from a nice walk.
I live right next to the MN river valley, so I can, whenever I feel like it, go for a walk in the woods.
 
4:29 PM
@janos yes, today tomorrow and the next day
I used to live in Minnesota, a long time ago.
Good fishing
 
It's nice. The one thing that bothers me is the wet heat. That's why I like spending time in places like Montana, or Arizona during the summer.
Although sometimes the wet heat just feels nice.
 
@Lyle'sMug you're between jobs?
 
@Jamal Do we really need a tag?
I just don't feel that, with a tag, that we need it.
 
^^^ agreed
in terms of code review, I don't see how it makes a difference whether it's an RPG or a drinking game, or other kind of game
I'm surprised @200_success didn't remove the tag when edited it (I noticed him many times cleaning up tags)
^^^ ah.... I thought there was only one question with that tag, codereview.stackexchange.com/questions/82392/json-extraction, but there are many
 
There are 14, but still don't think it warrants the need for that tag.
 
4:41 PM
@janos second job to make ends meet. But they aren't even close yet.... :(
 
I'm for burning the tag
change to
 
Merge with maybe. Just replace em all with .
 
@Lyle'sMug that sucks. Wasted programmer-time
3
 
He back in a bit. TTGSTMLT
 
@janos Agreed I wish I was learning more MVC right now or building an MVC site right now
 
4:49 PM
This was a good Swift answer @janos codereview.stackexchange.com/questions/91513/…
 
0
Q: Burninate [role-playing-game]

Ethan BierleinI'm not sure why a role-playing-game is needed when there's already a game tag. Personally, I think we should just burninate it and add the game tag to all the questions tagged with it that don't already have the game tag.

 
@nhgrif not really, but thanks! I upvoted yours, and I'm glad it got accepted, as deserved
 
I wish I could experience the ...
 
2
Q: Burninate [role-playing-game]

Ethan BierleinI'm not sure why a role-playing-game is needed when there's already a game tag. Personally, I think we should just burninate it and add the game tag to all the questions tagged with it that don't already have the game tag. I just don't think that we need specific tags for genres of games, when a ...

 
Jeez, I don't know why I feel the need to post my question before the bots catch it...
 
4:54 PM
Well I like it when I'm not the only answerer; it lets me focus on stuff more specific to Swift if some else can address the more generic and obvious refactoring issues.
 
it's good for the site to have more than one answer per question
 
Any good contribution is good
 
5:20 PM
I'm having trouble programming my own projects right now
Mostly occupied with university project & normal homework and I hate programming on and off for several weeks
 
> sh: 1: sudo: not found
Didn't work
 
I think that I will finally post my mathematical expressions evaluator on Code Review. But it may be two questions instead of one. It's huge.
 
That sounds interesting. Source?
 
5:23 PM
@Morwenn Also known as Calculator?
 
You just have to follow the include links to get the full source. It will be slightly modified for Code Review (no namespace, code directly in the class and not in separate files) so that it is easier to review.
 
I've always wanted to write an expression evaluator, but I just don't have the time. And I don't know enough.
 
The parser is hand-rolled and quite big, so I will probably not include it in the question.
Like ~250 lines.
 
5:37 PM
* Lexer sorry, not parser.
@EthanBierlein To write such an evaluator, yoou just have to write a lexer (hand-rolled or with a lexer tool), write a shunting-yard algorithm and add another algorithm to evaluate the postfix expression. Most of it can be found on the internet.
 
Hey guys, any javascript gurus here willing to collect 50points? ;)
http://codereview.stackexchange.com/questions/88391/webgl-shader-program-management
 
I wish, I don't know WebGL though...
 
@glampert Aw, no answers on that yet :(
 
@EthanBierlein, no problem, I care much more about comments of the JS code. That's where I'm a beginner. OpenGL is no news to me...
 
I could write an answer, but it certainly wouldn't deserve those 50 points...
 
5:41 PM
Funny it's just literally the C API
I can't spot any big WTF's, all I could do is recommend to use ES6 features and preprocess your code with tools like webpack
 
Well, I'll appreciate any feedback, really. Give it some thought guys, the bounty expires tomorrow, so let's not let it go to waste ;)
 
Your variable names could be better in my personal opinon... Like for ShaderProgram.prototype.setUniformVec4 use vec4 instead of v4
And in the full program use shader rather than shdr, I mean, what does it help to remove the vowels?
That's pretty much all about it though that I could review
The fact taht you provide a pretty straight-forward mapping library probably means that there is not a whole great deal to review
 
@skiwi, okay, those are fair points, thanks. Also, what do you think about the 'detail' thing? I don't think i've ever seen this around, but seemed like a good idea to hide the member data...
 
Interestingly, I don't think I ever bothered with hiding data in JavaScript, because the language by itself is flawed enough already
 
Haha, true dat
 
5:50 PM
I don't know the JS conventions as Python for example neither has private stuff, but they are often prefixed by _ or __
 
@skiwi Python actually has somewhat of a rudimentary implementation of private, if I remember correctly.
 
It's probably not worth the pain of storing it all in a detail object, but your personal opinion might be that this.detail.webGLProgramObj is nicer than this.__webGLProgramObj
 
I think prefixing things with underscores, like class functions, will throw an error when an external file or method tries to access them.
 
@EthanBierlein I'm not fully sure about it, probably would need to read the documentation ;)
 
357
A: Does Python have “private” variables in classes?

Kirk StrauserIt's cultural. In Python, you don't write to other classes' instance or class variables. In Java, nothing prevents you from doing the same if you really want to - after all, you can always edit the source of the class itself to achieve the same effect. Python drops that pretence of security and...

 
5:53 PM
Uhum, I was going to say that. I've seen the underscore prefix used in other js libraries too, but I don't know the details either. In C++ _ prefixes are illegal in some cases, that's why I didn't go for it...
 
@EthanBierlein Ah, I see, indeed there's some means of acting like private
I still think the Python reason is just silly and they should've went with public/private instead
 
Actually I honestly think python needs to have options for public/private, and optional strong typing.
The strong typing part might go against the idea of the language, but it might have benefits.
 
Python 3.6 is set to provide some support for strong typing, not how integrated it will be with the language
The problem with Python is that it is pretty much... screwed
You already have Python 2 and Python 3 which are both major and majorly used releases and incompatible
And in order to "fix" their language they'd need to release Python 4, which would also be major and incompatible
Python is really the worst ecosystem I've seen around so far :(
(From the ones I have experience with)
 
The worst? Hahahahahaha.
 
Probably C/C++ with all their compilers is no fun either
 
5:58 PM
It would the worst if Jython, IronPython, PyPy and Stackless Python were as popular as CPython while not compatible.
Well yeah, I think that C++ is the worst. If you want to support GCC, Clang, MSVC, MinGW, Cygwin and all their friends and subtly different releases...
For example, I do not use any version of MinGW: I use MinGW-w64 32 bits with POSIX threads and Dwarf exceptions.
That means that all the other versions exists too and you may have to support them.
 
Is there a reason why C++ is like that?
 
Probably.
Because GCC targets Linux and people want it for Windows but several people do it differently.
 
The problem has nothing to do with programming executables directly I suppose?
 
I don't know. Maybe.
I partly comes from the fact that the people writing the standard and the people implementing the compilers are not (always) the same.
 
0
Q: Copying one dimensional array bottom to top

gansubI want to convert a one dimensional array to a two dimensional array with the following conditions. The 2-dimensional array has to be copied from the one dimensional array and written bottom to top. The second condition is that while the 1-dim array is being copied bottom to top the first row and...

 
6:13 PM
0
A: WebGL shader program management

Ethan BierleinSince I'm not a JS guru or anything, I'm going to give more of a style review, rather than a review of the code, but if there is anything I see, I'll try to point it out. First off, you have some odd comments, which I assume are to describe the return values of certain functions, e.g, // -> boo...

@glampert ^^
 
@EthanBierlein, thanks man! Reading it now.
 
np
@glampert I hope it helps :)
Anyways, see yall later, TTGTL
 
Ok, my question is more than 30k characters. I have to remove some things...
 
@Morwenn How much is it over? ;)
 
Currently 33k, and I did not include the error reporting mechanism yet.
But I think that I will let it out.
Or I will create a second question and try to split the whole thing logically.
 
6:20 PM
@Morwenn What exactly are you trying to ask? Can you split the question into separate questions?
 
33K I could live with... I've had cases where I absolutey cut everything out I could and it was on 30100 or something
 
@skiwi There's an absolute limit to keep in mind. The site won't accept questions with more than some number of characters.
 
True, 30K is the absolute limit
3
And I hear our lovely mods get a notification of everything >= 20K ;)
4
 
@skiwi That's a nice feature.
 
0
Q: Mathematical expressions evaluator with callbacks, the logic

MorwennI hesitated quite a bit of time before posting this question since the code to review is more or less a monster (with regards to its size). It is a basic mathematical expressions evaluator, but with one interesting additional feature: you can register callbacks that can be used in the expression ...

 
6:33 PM
@CaptainObvious Wow nice, yoru code has documentation!
I believe you can also tag it for the calculator commnity event
I think though that some people really made a calculator, but others made an evaluator for the event, which is interesting ;)
template<typename Func>
callback(Func&& function):
    callback(
        std::forward<Func>(function),
        std::make_index_sequence<
            function_traits<Func>::arity
        >{}
    )
{}
Would you like to have a callback with your callback?
I don't knopw what I was expecting when I clicked the This is how I roll. link lol
2
@Morwenn Reading your implementation, what happens if you try to evaluate (,) ?
 
@Morwenn Is there a GitHub link where we can fetch everything — headers, makefiles, etc.?
 
@skiwi Excellent question. I covered many working cases, but not that many failing ones :/
@200_success There is. I will add it to the questions :)
@skiwi Would it be a good idea?
 
0
Q: Mathematical expressions evaluator with callbacks, the architecture

MorwennThis question goes hand in hand with another question about a mathematical expressions evaluator in C++. The other question is meant to be read first, this one is but a complement to expose the internals of the evaluator and the overall architecture to explain how the details work. The tokens me...

 
@Morwenn Why not? ;)
@Morwenn Do you know the answer of the question? :)
 
6:49 PM
@skiwi Nope, I will test it.
 
lol @Morwenn, you might want to censor your "Do nothing and shut the compiler warning" comment in your latest question ;)
 
Eh, it might have been how I really felt when I wrote it x)
 
This code is quite close to what I've written in Python, but probably not as complicated and yours is more feature-complete
 
I handle a variety of operators. That's why it's that huge ^^"
 
11
Q: Newborn pythonic calculator

skiwiLet me start off by saying that I have several years of experience in Java, but now I need to learn Python, so I decided to make a calculator as it also is a community challenge. Please review the code looking for beginner mistakes, though I do intend the code to look professional. This is my fi...

I handle stuff too :P
> The supported operators are +, -, * and /.
Oh right
 
6:53 PM
xD
The structure indeeds looks really close :)
 
Thinking about it, the factorial operator might be supportable by my code, not sure though
It might also horribly fail
 
@skiwi Now I know: segfault.
 
@Morwenn lol nice ;-)
Was able to extract that testcase from this:
case ',':
    if (nmb_parenthesis == 0)
    {
        throw error("a comma can not appear outside of a function's parameter list");
    }
    res.emplace_back(token_t::comma);
    break;
 
I still have the feeling that I just ended up posting a monster, even though I tried to make it suitable for CR :/
 
Don't worry, we all produce monsters.
 
6:59 PM
@Morwenn If it looks like a duck, walks like a duck, quacks like a duck...
It's definitely not a Rubberduck
They quack different
 
There are neat monsters.
 
Neat monsters?
 
Yep.
 
That's like a clean scrapyard.
Contradictio in terminus
 
@skiwi Hum, I should have checked the the token near the opening brace was a name.
It's more complicated than that to check actually.
 
7:09 PM
include/POLDER/type_list.h:44:25: error: no template named 'conditional_t' in
      namespace 'std'; did you mean 'conditional'?
        using at = std::conditional_t<
                   ~~~~~^~~~~~~~~~~~~
                        conditional
 
Nope, that's a C++14 alias template.
template< bool B, class T, class F >
using conditional_t = typename conditional<B,T,F>::type;
 
Ah. The clang compiler in OS X still calls it -std=c++1y.
 
Well yeah, it's still fairly new.
@200_success By the way, as a mod, don't you think that the double question is a little bit too much in term of size?
 
clang++ -std=c++1y -Iinclude -o testsuite/evaluation testsuite/evaluation.cpp
Undefined symbols for architecture x86_64:
  "Catch::SectionInfo::SectionInfo(Catch::SourceLineInfo const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      ____C_A_T_C_H____T_E_S_T____25() in evaluation-35db98.o
  "Catch::ResultBuilder::endExpression()", referenced from:
How do you build this thing?
 
Er, it's a Catch testsuite.
 
7:15 PM
I see.
Two questions seems fine. Obviously you put a lot of effort into crafting them.
 
Well, I tried to make them reviewable.
I didn't include the tests in the question itself especially because learning a new testsuite isn't something people should be required to do when reviewing code :p
To build it, I simply put all the .cpp in the testsuite directory in one project and compile. It creates its own main and the way it works is really evil, but also really cool.
Anyway, I have to go. See you later :)
 
7:38 PM
1
Q: A* search algorithm in clojure

qedCost of nodes are represented by a matrix (called world), heuristic cost estimiate/g score/f score are all represented in matrices. The world and its size are stored in global dynamic variables. It looks like this: 1 1 1 1 1 1999 1999 1999 1999 1 1 1 1 1 1 1 1999 199...

 
8:01 PM
0
Q: Store open days and times

JezzabeanzCurrently I'm developing my business entities. I feel that the structure is a tad cumbersome. What I mean is that a store on a particular day can have different open and closing times. So it's not as simple as a store opens and closes at 09:00 and 17:00 respectively every day at the week. A sto...

 
@EthanBierlein Nicely done!
 
Thank you :)
 
@Morwenn Sorry for the headaches ;)
 
HOLY SHIT PYTHON3 HAS STRONG TYPING
AND I NEVER KNEW ABOUT IT
except it only works for specifying function return types, and parameter types.
BUT ITS STILL A STEP IN THE RIGHT DIRECTION
For example, the below is syntactically valid Python3 code. vv
def power(a: float, b: float) -> float:
    return a ** b
Is nobody excited about this?
Or am I just stupid for finding this out later than everyone else?
Oh, nevermind. They're called function annotations. Still, that's pretty cool.
 
8:34 PM
Well, anyways, I'm going to see if I can kill some zombies...
 
we have a ton of those. happy hunting :)
2
 
8:54 PM
Man, there are too many Python questions using external libraries that I don't know...
 
yup
 
If your code is working correctly, you may want to ask on Code Review. Make sure to read their guidelines. (For example, your link-to-code is as deprecated over there as it is here.) — Jongware 54 secs ago
 
ow shit
I just got a linkedin invite by a Dutch-speaking MS employee, saying he would like to help me get an internship at Microsoft
specifically referencing my SO rep and interest in MS technology
 
Wow. Is that a good thing? It sure sounds like it.
 
Since working for Microsoft is pretty much my aspiration, this is as good as it could get
I need to eat something or I'll faint
3
 
9:03 PM
Help yourself. You've just achieved great things.
Congrats :)
 
Well it's far from certain, it's only a linkedin invite
but darn it, fuck yeah!
 
Still, it's a step in the right direction.
 
And to think I was already taking down some of my notices online that I wanted an internship..
 
The folks over at Code Review are pretty good at making working code look good and work better. If you included more context, like, the whole procedure perhaps, this could be a good Code Review question. — Mat's Mug 17 secs ago
 
it's early to celebrate. Keep pushing it, hard, and I hope you'll get it
 
9:12 PM
If you expect code review, next time consider asking at codereview.stackexchange.comkenorb 23 secs ago
 
Damn, I can't find any zombies I can answer, which leaves me with nothing to do.
Anyone got a cool language I could learn?
 
@EthanBierlein Correct... but I don't know if the compiler enforces it?
@JeroenVannevel Wow, nice!
I have had a few Oracle members visiting my profile already over the last weeks...
@EthanBierlein Groovy is really cool groovy!
 
Ah, Python is interpreted, not compiled. And it's not enforced, but optional.
 
I haven't had time to actually code in it yet, but @SimonAndréForsberg says it's awesome!
 
I think from now on though, I'm going to try and use function annotation.
 
9:35 PM
0
Q: Multiple Scenes with one FXML file and one Controller in JavaFX

user74262I have a question about this design for a multiple scene application. Where I use an Anchor Pane 1050 by 960 and a Pane that is 2300 by 2880 This gives me a 2 by 3 matrix or six scenes. I plan on using Labels 310 Text Field 160 and Button 45 on this one Pane. How big a hit in performance can I ex...

 
9:46 PM
@EthanBierlein there are plenty of zombies in JavaScript too, if that might interest you
 
I don't know, I already answered one question today... wipes brow
 
@EthanBierlein SirAlfred can help you find some zombies if you want me to boot him up.
 
That would be nice actually.
 
Sure, just give me a second
 
10:11 PM
0
Q: which design patterns for, calorie calculations and find the total calories of selected food

sami want to create program in wpf. It's about: calorie calculations and find the total calories of selected food. But i cannot choose a design pattern for my app. if you have idea choosing about design patterns for app please answer it. Thank you guys

0
Q: Find minimum number of coins (count and list of coins too)

janos For a given set of denominations, you are asked to find the minimum number of coins with which a given amount of money can be paid. Assume that you can use as many coins of a particular denomination as necessary. For example, given the denominations 1, 3, 4, and the target amount 6, th...

 
See you all later TTGSIMYNPWISWO
 
See you.
 
10:38 PM
@EthanBierlein Wut
 
Time to go swimming in my new pool when it's still warm out.
Of course, that didn't happen. The pool guy came and said we had to wait another week to swim in it.
 
Hello again.
 
Hello.
 
Hey
 
Hello
 
10:50 PM
This may better be asked on Code Review. Make sure to read their guigelines first. — Jongware 24 secs ago
 
BELGIUM WON EUROVISION
Winners in spirit
BUT WINNERS NONETHELESS
^ authentic
 
Stackoverflow is about helping you fix problems and get your program working though. If you want a critique/review try the sister-site codereview.stackexchange.com — Raphael Miedl 17 secs ago
 
Haha, it seems that we brought shame to our country once again :D
I'm always amazed by the total lack of taste when it comes to choosing artists for Eurovision.
 
I'm voting to close this question as off-topic because it is a request for a code review and should probably asked on codereview.stackexchange.com. — Carsten 54 secs ago
 
-1
Q: which one of the good design pattern for my app in wpf

sami want to create an app in wpf. And it is about calorie calculations and find the total calories of selected foods. And i choosed iterator design pattern. But it is not good design pattern for my station. which one is the good design pattern in my app.

0
Q: Generic XHR caching function

JohanI've made a simple caching function for my jQuery ajax calls. I know about the $.ajax() cache setting, but I don't use it for various reasons. One of the most important one is it being limited to GET (and perhaps HEAD?) requests. If a cached value is found, and is a reference type, I'm returnin...

 
11:17 PM
@JeroenVannevel lol, wtf? Nice try there!
@Morwenn Don't believe @JeroenVannevel!
Or maybe your TV has been censoring things...
 
BELGIUM IS THE WINNEEEEEER
 
##################
# IMPORT MODULES #
##################


import os
from random import randint
^^ ORLY
2
 
@JeroenVannevel That's not what Wikipedia says :)
 
FLAME-FEST
 
11:19 PM
Never trust wikipedia. Swedish nationalists are rigging it
 
Guessing there is some sport event going on
 
@JeroenVannevel Belgian nationalists are rigging things in the second monitor :)
 
@Phrancis Actually, I think it's a singing contest or something...
Right?
 
@Phrancis The biggest entertainment event of the year. Eurovision Song Contest
 
-_-"
Here I was thinking it was FIFA or something
 
11:21 PM
Americans..
 
Eurovision is better :)
 
FIFA is an organization
Not a cup
 
It was the 60th Eurovision Song Contest competition this year. For the first time ever, Australia was invited to participate as well :)
 
I hear the words "singing contest", and I immediately lose interest. No offense.
I'm not into lyrical music.
 
@SimonAndréForsberg Well, France still is 25th out of 27 countries (including WTF Australia) with 4 points, which is twice the number of points it had last year.
 
11:22 PM
Don't worry, Sweden's song is right up your alley then
 
@SimonAndréForsberg They've being doing this Eurovision thing for 60 years?
 
@EthanBierlein More into instrumental stuff?
 
@Morwenn Yeah
 
Like?
 
I'm into general classical music. Not a huge fan of string instruments though.
 
11:25 PM
@EthanBierlein There are many good singing contests in the world. Not everything is like American Idol.
 
I also enjoy electronic genres as well.
 
Ok :)
 
@Phrancis yup, and hopefully will be doing it for at least another 60 :)
 
Eurovision is the only singing contest I follow
but not the actual music
I just love the nationalism at the point distribution
and a lot more when Belgium actually gets points
 
@SimonAndréForsberg ik, I'm just not a huge fan of lyrical music. I'm not saying Eurovision isn't good, I'm just saying it isn't my favorite form of music.
 
11:26 PM
Like today when we became FIRST
 
I also hate american singing shows too.
 
Eurovision Song Contest and The Voice (in various countries) are the only things worth watching :)
 
@SimonAndréForsberg Interesting... 60 years ago, that was even before ABBA...
 
They annoying the shit out of me with their stupid "drama"
 
I never really found Eurovision worth watching ._____.
 
11:27 PM
@EthanBierlein The great thing about Eurovision is that there are many different kinds of music! Each country tends to have their own little style on their song.
 
It's only a great way to ruin the economy of an eastern european country: make it win so that it has to organize it the following year.
 
@Phrancis ABBA participated in the contest a looong while ago, and won. (just like Sweden won today as well, despite what Mr. Belgium Vannevel says)
@Morwenn Good thing for Russia that they came 2nd this year then.
 
The only Russian band I still listen to is t.A.T.u :p
 
I voted for Australia and Hungary this year. I would really have love it if Australia won :)
 
That reminds me of my recent geography unit. My teacher referred to Europeans in groups such as "The northern savers", "The southern spenders", "The rich westerners", and "The poor easterners".
 
11:29 PM
@Morwenn ah, it's been a long time since I listened to them! I think I voted for them though when they participated in the Eurovision a while back
 
@SimonAndréForsberg Ahhh OK. Well, I like ABBA. So maybe it's not so bad.
 
Eurovision's awesome!
 
@SimonAndréForsberg It's kind of ironic that they are the most successful band of a rather homophobic country.
 
But here in North America we don't hear much from that part of the world
 
@Morwenn yup :)
11 mins ago, by Jeroen Vannevel
Americans..
 
11:34 PM
@SimonAndréForsberg Fair enough ;p
 
@SimonAndréForsberg Belgium numero uno woohoo Belgiuuuuum
Vive les frites
 
Something tells me that no one really believes you, @JeroenVannevel :)
 
Maybe not, but the hope is very much alive!
 
11:59 PM
RELOAD!
 
00:00 - 16:0016:00 - 00:00

« first day (749 days earlier)      last day (3273 days later) »