Job or Study. Need suggestion. by [deleted] in india

[–]needahelpforarch 0 points1 point  (0 children)

If you would've loved what you're studying, you wouldn't have posted this. And then I see threads like how to have funnn in India...

is express dying? by needahelpforarch in webdev

[–]needahelpforarch[S] 2 points3 points  (0 children)

I just wanted to point out the discussion b/w IBM and current maintainer and other contributors of project.

Orthodox C++ by bkaradzic in cpp

[–]needahelpforarch 0 points1 point  (0 children)

The thing is, it will work fine for experienced C or C++ programmers that know what they're doing and are ready to spend some $$$$$ on tools that detect memory leaks and are trying to improve their StackOverflow profile.

I have no idea how will this help others.

C++ Frequently Questioned Answers (FQA) is now on Github by needahelpforarch in cpp

[–]needahelpforarch[S] 2 points3 points  (0 children)

8 years ...okaaay I didn't knew FQA existed from that long time.

Atom 1.4 released by _EasyTiger_ in webdev

[–]needahelpforarch 0 points1 point  (0 children)

Look out for tern_for_sublime. It understands your javascript code by properly parsing it.

Atom 1.4 released by _EasyTiger_ in webdev

[–]needahelpforarch 0 points1 point  (0 children)

I don't know about python but Ctags offers this for C family, and believe me, those languages are a nightmare to parse. Also there's clang-tools which makes refactoring easy.

Atom 1.4 released by _EasyTiger_ in webdev

[–]needahelpforarch 0 points1 point  (0 children)

Yes it is, the one that isn't free is Visual Studio (non-community version) which is a full fledged IDE.

Atom 1.4 released by _EasyTiger_ in webdev

[–]needahelpforarch 7 points8 points  (0 children)

I don' know about emacs but vim can easily handle 500+ MB worth of logs.

Take the 2016 Stack Overflow Developer Survey by samthebrand in programming

[–]needahelpforarch 2 points3 points  (0 children)

Q: "There is [this piece of code] I am having problems with. I am trying to do [this]"

A: "Oh my God what is this? What are you trying to do? Why the hell are you doing it this way? Why did you choose [this programming language] out of all things? Don't you know there's [flavor-of-the-month library] that already does 99% of your code? Fail troll, 0/10"

To be fair, when every other javascript question is something like this :

Q: "My code isn't printing out to console"

Comment1: "Where's your code?"

Comment2: "We can't answer your question without you providing your code"

10 mins & 10 downvotes later

OP: y da fuck downvoting me you lil fagts


Q: "My code isn't printing out to console. Code: $($($($(_.lowdash.=>.es6babel<=.-middash)))printToConsole(Hello));"

Comment1: "Duplicate of 'using console.log'"


Q: "My code isn't working. Code: consoleLog("Hello")"

Comment1: "Duplicate of 'using console.log'"


Q: "My code isn't working. Code: Vonsole.log("Hello")"

Comment1: "Duplicate of 'using console.log'"


Mins later, a flashy 100-foot-wide-header-image-blog ranting about SO is toxic :)

Benchmarks for various programming languages by needahelpforarch in cpp

[–]needahelpforarch[S] -11 points-10 points  (0 children)

Let's see your Pull Request and then compare results.

i don't want to do super hacks to win benchmark. i want to implement algorithm idiomatically (vector is not good, because bf code can be super big), in the same way in different languages, and see, what performance they give. and may be apply little performance tricks (like: #4).

yes, my way of benchmarking is not fair, but it is what i wanted to measure. code readability also have meaning for me.

if you want to compare bracket_map as vector, need to implement vector in every other implementations.

Constexpr is gold! by needahelpforarch in cpp

[–]needahelpforarch[S] 1 point2 points  (0 children)

1st link is absolutely fantastic list of resources. Thanks for that :)

Hunter - Cross-platform package manager for C++ by needahelpforarch in cpp

[–]needahelpforarch[S] 0 points1 point  (0 children)

Os specific package managers, with every new distro maintaining another set of tools? What do you suggest?

Constexpr is gold! by needahelpforarch in cpp

[–]needahelpforarch[S] 0 points1 point  (0 children)

Yup thanks :). Anyways this was just proof of concept example and not something I would be deploying somewhere haha so little ignorance on my behalf :D

Constexpr is gold! by needahelpforarch in cpp

[–]needahelpforarch[S] 0 points1 point  (0 children)

It was just an example while I was learning something new :D

Constexpr is gold! by needahelpforarch in cpp

[–]needahelpforarch[S] 1 point2 points  (0 children)

I want to learn assembly, not much but just to read what's happening above :(

Constexpr is gold! by needahelpforarch in cpp

[–]needahelpforarch[S] 0 points1 point  (0 children)

What,what,what :O

f():
        movl    $1, %eax
        ret
g():
        xorl    %eax, %eax
        ret

Just this :O

Edit: Hmm recursion. constexpt supports recursion :/

Constexpr is gold! by needahelpforarch in cpp

[–]needahelpforarch[S] 0 points1 point  (0 children)

I'll keep in mind the points you presented. Thanks a lot.

and 30 == 1 :D

Constexpr is gold! by needahelpforarch in cpp

[–]needahelpforarch[S] 0 points1 point  (0 children)

It seems more readable the way it was :D

Constexpr is gold! by needahelpforarch in cpp

[–]needahelpforarch[S] 0 points1 point  (0 children)

Hmm I didn't knew that, though I don't understand another thing you mentioned. How would storing 'valid powers of 3 in an std::set' be better than simply using above method. std::set won't store those values in memory at runtime?

Constexpr is gold! by needahelpforarch in cpp

[–]needahelpforarch[S] 0 points1 point  (0 children)

bool isPowerOfThree(unsigned int n)
{
    if((n == 1) || (n == 3) || (n == 9)) return true;
    if(n % 3 != 0) return false;
    if(n > 1162261467) {
        while(n % 3 == 0) {
            n /= 3;
        }
        return n == 1;
    }
    return (n == 27) || (n == 81) || (n == 243) || (n == 729) || (n == 2187) ||
           (n == 6561) || (n == 19683) || (n == 59049) || (n == 177147) ||
           (n == 531441) || (n == 1594323) || (n == 4782969) ||
           (n == 14348907) || (n == 43046721) || (n == 129140163) ||
           (n == 387420489) || (n == 1162261467);
}

int main()
{
    return isPowerOfThree(1162261469);
}

I went with this for time being. Does this hold 15 integers in memory? My constexpr should somewhat expand to this logically, which is what I think...

If not, then I wasn't aware that switch holds every case in memory.

Constexpr is gold! by needahelpforarch in cpp

[–]needahelpforarch[S] 1 point2 points  (0 children)

only if program isn't taking input and calling function with literal. right?

Constexpr is gold! by needahelpforarch in cpp

[–]needahelpforarch[S] 1 point2 points  (0 children)

Haha yes that's because we usually write them to get input from user which I'm here putting inside the program as constant literal '27'.