« first day (2051 days earlier)      last day (2897 days later) » 

10:01 AM
a really simple way to make cleric > warrior is just to make clerics run faster and be able to health themselves ;p
 
equipment alter stats => so in the end I need only to balance stats, the problem is finding a good way to do that upfront.

if the battle is 1v1, a good range may allow to just hit 1/2 extra times before range becomes = 0.

if the battle is NvN a good range may be determining only if there are tanks preventing foes coming near the archer etc..
 
you say "just" like those aren't absolutely critical factors
 
I mean from stats perspective I have to model other factors so that 1/2 extra shots make difference, in a N v N battle there will be much more extra shots so in theory I have to make the ranged power much less impacting than in 1v1
 
do you?
or maybe it's totally fine for NvN balance to favour having more ranged classes.
 
the silly stuff would be using a different kind of damage for every class, so that you can tweak it for every character, but that makes things tooo obvious isn't it?
 
10:04 AM
the range of physical parameters should be sufficient to balance all the classes without needing damage types and armour types
 
@DarioOO Well, at least you're not making absurdly deep game character inheritance hierarchies ;)
 
ahah a:D I would never do that XD
 
Ven
@fredoverflow hey :[
 
What? Isn't that a trap that many people fall into when they first design a game?
 
I'm not even able to balance 3 classes, should I balance the next FFT? XD
 
Ven
10:13 AM
@fredoverflow Inheritance hierarchies look cooler at first than they really are in more than one domain ;)
 
by Inehritance hierarchies what do you mean? XD I think you are now speaking ofcoding instead of character's classes
 
nwp
@DarioOO youtube.com/watch?v=miu3ldl-nY4 has some formulas how to balance characters including code on github if you don't want to do the math yourself
 
nice :) In reality I do want to do the math, the problem is not doing the math but modeling something with I can use to do the math :D
sorry there is the github link?
 
nwp
@DarioOO on the slides pretty much at the end of the talk
 
sorry but the first part I don't agree that much, win rate of a character is not related to balancing.

if A beats B beats C beats A

then if A wins 50% of games it should not mean that A is overpowered, but simply that half players choose B..

Ok thanks I'll search the link
Not very usefull code anyway XD
 
nwp
10:25 AM
@DarioOO in that scenario you would never have 50% playing A because people would switch to C
 
Has anyone tried doctest as a testing framework?
It looks like it builds on Catch.
 
Ven
nope
 
I use Catch,
 
nwp
there is another video by the league of legends designer talking about how all characters need to be balanced and therefore have a power budget. If they give a character passive regeneration it cuts into their power budget without adding fun (because there is no skill involved and no counter possible). So you should prefer active skills. Was very interesting but I cannot find it anymore.
 
Looks like it might be the future of Catch considering that Catch doesn't seem to catch up with the number of issues and pull requests.
 
10:29 AM
I never had a single issue with catch, most of the problems is just boring people using it. 70% of the issues are just misuses of Catch, anyway if doctest drops support for C and objective C it can be interesting alternative
(there are still real issues with it, but comes with far rafinated usage)
 
doctest is faster if we trust their benchmarks.
> Doesn't produce any warnings even on the most aggressive warning levels for MSVC/GCC/Clang
Eh, I might try to drop-in replace Catch by it and see if it changes anything.
 
Seems overall better than Catch yes
Probably has less command line features (I don't use them anyway XD)
 
Also works with VC++6, lol.
 
It is always like that, who cames "AFTER" always do a better job because requirments are more clear so It can start from scratch and just have to think to coding. In example Instead of fixing my framework I just redone it from scratch.
Seems pretty unstable for now (look at pull requests).
 
Yup.
 
nwp
10:38 AM
I suppose occasionally someone invents a better wheel
 
Oh, doctest doesn't seem to support tags right now, so I can't just it as a drop-in replacement for Catch.
 
10:52 AM
Is there a name for a set of the form {0, 1}^n ?
 
"Binary string"
by ^n you mean concatenation right?
 
Well yeah, or bitstring, but it ought to have another name?
 
"Turing machine state"?
Digital Tape? XD
 
Not sure what it means exactly, but I have seen it used to represent the bitstrig domain or something. Not sure about the actual name.
 
nwp
maybe power set of {0, 1}
 
10:54 AM
depends on what is ^n.

It could also be a vector in a space where each axis has only 0 or 1, can be encoded with a bitstring of course but is a totally different domain.
in example v belongin to R^n where R can assume only 2 values.
 
nwp
bitvector
 
the regex for that would be shorter than any name anyway XD
 
I have seen it used to represent the parity function:
 
I need to learn the SE math syntax first or later XD
It's too cool
 
It's only supported on some sites of the network, most notable not on SO.
 
10:56 AM
seriously we have it in chat.SO.com and not on SO.com ?XD
 
We don't.
 
fuck XD
 
nwp
@Morwenn keeps some of the haskell people away
 
maybe with good reason (too much traffic compared to other SE sites)? there is 1 new question every couple of seconds, moderators can't just keep that peace
 
nwp
what does traffic have to do with rendering formulas correctly?
 
10:59 AM
you have to replicate the rendering logic in the SO cluster
if you are a billion company probably saving few bytes and bandwith is a great money save
 
It's just MathJax.
 
It uses Ajax request? or Javascript client rendering?
 
nwp
I'm not so sure they pay for traffic
so is probably not big enough
 
102
Q: There's seriously no reason why LaTeX markup via MathJax shouldn't be enabled on SO

A. DondaI know this has been discussed over and over again, and it may be very boring and annoying for people who have been around a while, but I'm telling you: Unless this need is fulfilled, it will continue to come up again and again and again. I've read the other posts about this matter, and as far as...

 
XD
performance reasons.. How could that be possible? They really don't want to implement a image cache for avoiding recomputation that makes pages slower? XD

Sometimes it suprirse me the optimizations required to big sites (in example Github not providing download stats)
Gotta leavey, happy saturaday XD
 
11:17 AM
@rightfold Not sure whether I already recommended this video to you:
 
I want a programming language where bit vectors are a fundamental type, and 0b011101 or 0xFEEDADAD construct bit vectors instead of integers. Integral numbers would be implicitly convertible to bit vectors, and bit vectors would be implicitly convertible to integral numbers. The prefix-less notation 1234 would still construct integers.
It feels saner than how bits and integers are currently handled.
 
> bit bit vectors would be implicitly convertible to integral numbers
wat wat
 
Woops, my mistake :p
 
Are you sure you want implicit conversions in both directions?
 
No.
 
11:18 AM
@Morwenn VHDL :)
 
@milleniumbug Well, that's not really a general-purpose programming language :p
 
> Integral numbers would be implicitly convertible to bit vectors, and bit vectors would be implicitly convertible to integral numbers.
Are you missing a not somewhere?
 
@fredoverflow Doesn't mean I'm sure.
 
oh :)
 
But after having given the idea some thought, having different literals produce different types still feels saner :)
I mean, we generally write in binary or hexadecimal when we care are bits, not much about the integral value.
Applying that model will probably solve some notational problems in my blog about Gray codes, but that means that I have to rewrite some of my articles. Good thing there aren't many of them yet.
Time to take a shower and think about that a bit more :D
 
11:28 AM
Are you aware of how Go treats numeric literals?
 
user1804599
@fredoverflow it's awesome
 
user1804599
Constants in Go is really nice.
 
user1804599
11:48 AM
I want to design and implement a programming language in which every value is a hash table where the keys are hash tables and the values are hash tables.
 
user1804599
You can encode anything using such hash tables.
 
you can do, but that doesn't mean you'd want ot
 
user1804599
I do.
 
life arrived extremely quickly https://t.co/3vuEbu0pbU
 
user1804599
@Mgetz Millennial vs millennial.
 
11:54 AM
still funny
 
user1804599
Why wouldn't it be?
 
user1804599
Can't disagree with the guy though, even though he's a hypocrite.
 
user1804599
Cheek pinching is AIDS.
 
user1804599
In his defense, a typo isn't an indication of spelling incompetency.
 
user1804599
12:04 PM
Fuck bad programmers. They must git gud ASAP.
 
12:28 PM
> Ignore the pedants

Of course somebody will say, "Every programmer should know X."
I'm gonna be a pedant here and posit that he doesn't know what 'pedant' means.
 
user1804599
Every programmer should know how to program.
 
user1804599
Unfortunately most don't.
 
#include <studio.h>

void maine()
{
    print("hello word")
}
 
@R.MartinhoFernandes plonk :P
 
@rightfold ^ How hard can it be? ;)
 
nwp
12:37 PM
cmake is gonna make me cry
 
contender for trainwreck of the day and i just got up
oh boy...
 
user1804599
1:17 PM
@fredoverflow handy function
 
@fredoverflow Now do it with ever US state.
 
nwp
without code duplication
 
user1804599
 
user1804599
@sehe
 
user1804599
58
Q: Alternative for Graphviz with better automatic node placement for large graphs?

Victor StafusaIn the past I used Graphviz to create drawing of graphs. It is a nice tools for small graphs. But unfortunately, for large graphs, Graphviz really sucks: It always crossed edges that obviously could be drawn without a cross. It superimposes different texts, making them unreadable. It has no re...

 
2:03 PM
I guess I'll use {0, 1}* to represent the set of bitstrings.
 
nwp
@Morwenn why {0,1} over (0|1)? The latter seems more consistent because it is not a weird mix between math and regex
 
Because {} are used for set notation and I have sometimes seen {0, 1}* used for bit strings.
 
2:35 PM
> You have a water problem that is so insane. It is so ridiculous where they’re taking the water and shoving it out to sea
That's Trump's description of the Sacramento River
 
12 hours ago, by hello
Hello,

If I'm getting a value like this,
std::cout << port.getDestinationPlanes().find(pass.getPassengerDest())->second.at(0).getName();

Is this an indicator that I need to reconsider my design or is this common in practice?
 
nwp
@hello you are not handling errors such as find not finding anything
 
I found that out later when end() was reached.
 
@hello if you must make it one giant expression, at least use at instead of find
use of find implies that you are going to check for not found
 
@hello it's not considered polite to dump your questions in here.. there's a giant ASK QUESTION button for a reason.
 
2:47 PM
@Puppy Apologies.
 
fuck
can't Valve make any games that are remotely playable?
 
@nwp Can you see the mathematical symbols here now or still just the markup?
 
@Morwenn I can
 
@Shoe But you already could, couldn't you? :p
I know that nwp wasn't able to see them a few days ago.
 
Never tried before
 
2:53 PM
Oh.
 
nwp
@Morwenn looks good
 
How do I say in JS regex "read all characters until you read something that matches /\[[\s\*]*\]/"?
 
@nwp Good news then :) Apparently is was because I was using the HTTP version of MathJax's cdn instead of the HTTPS ones.
I realized that when trying the HTTPS Everywhere plugin.
 
Which matches things like [*] or [ *] or [] or [ ]
 
nwp
@Morwenn ah, I have that too, that was probably the reason
 
3:02 PM
Glad that I could fix it ^_^
 
/cc @Morwenn
 
37
A: How do I retrieve all matches for a regular expression in JavaScript?

lawnseaContinue calling re.exec(s) in a loop to obtain all the matches: var re = /\s*([^[:]+):\"([^"]+)"/g; var s = '[description:"aoeu" uuid:"123sth"]'; var m; do { m = re.exec(s); if (m) { console.log(m[1], m[2]); } } while (m); Try it with this jsfiddle: http://jsfiddle.net/7y...

Are you kidding me?
I have to do a fucking loop to retrieve all fucking matches to a fucking regular expression?
 
@Shoe you fucking do
 
Why isn't there some flag that instead of returning an array of 2 elements it returns an array with all elements?
 
user1804599
3:17 PM
The ECMAScript specification specifies a handful of classes and functions that implementations must provide, and it's far from batteries-included.
 
user1804599
It's even worse than C++.
 
user1804599
@Shoe s.split(/\[[\s*]*\]/)[0]
 
user1804599
@Shoe Oh, I think you want non-greedy matching: .*?\[[\s*]*?\].
 
user1804599
*? is non-greedy *.
 
Solved that already, thanks though
 
user1804599
3:19 PM
It matches as little as possible while still trying to match what follows.
 
@Shoe yeah, isn't it great?
@AndyProwl ever heard the story of the boy who cried "wolf"?
 
user1804599
kleisliRepeat :: forall m a. (Monad m) => Int -> (a -> m a) -> (a -> m a)
kleisliRepeat n k
    | n <= 0    = pure
    | otherwise = k >=> kleisliRepeat (n - 1) k
 
user1804599
This function is great.
 
user1804599
iterateM is a better name I think.
 
3:35 PM
actually, never mind, the other guys were right.
1 message moved to bin
 
you binned it before i could flag it as spam D:
 
sorry
well I have to go now anyway so you can do that to your heart's content should he be foolish enough to return
 
@Borgleader You know perfectly well that I already read it :p
 
@Morwenn How? When did it come out? D:
 
@Borgleader Facebook. I read like... 30 minutes ago?
 
3:40 PM
./include/reaver/future.h:697:22: error: use of ‘test::reaver::_v1::packaged_task<T>::operator()(std::shared_ptr<test::reaver::_v1::executor>) const::<lambda(auto:65)>::<lambda()> [with auto:65 = test::reaver::unit; T = std::tuple<int, int>]’ before deduction of ‘auto’
What the fuuuuck are you smoking GCC.
 
@Morwenn I posted it 40 min ago so I win :P
 
@Borgleader It says "posted 30 minutes ago".
I don't remember exactly, but I probably read it minutes after it was shared on FB.
 
Oh nvm, the post above it said 11:02 so I did 11:42 minus that, didnt account for the gap
(which was apparently ~10 min)
 
The best part? It compiles when I pull a line that does decltype on a thing that's not dependent on the lambda argument in any way from inside a generic lambda I'm using for static_if-y thingy.
Can we agree to purge GCC off the face of the Earth?
Together with MSVC?
And then everybody trying to fix these broken compilers could focus on fixing clang?
 
And @ThePhD wants to purge Clang off the face of the Earth.
So, what's left? Intel compiler?
 
3:43 PM
GCC is more fundamentally broken.
I mean, its lambdas feel beyond repair.
Its error messages are a mess. Don't even get me started on -fmax-errors' treatment of error notes.
 
I've had more problems with Clang than with GCC to date. On the other hand, I don't try to do stuff with more than trivial lambdas.
 
Me too. I've ran Clang 4 times, and 2 of them resulted in ICE
 
@Morwenn It's a trivial lambda! It literally does [&](auto) and then normal fucking code.
That demonstrably works when pulled out of the fucking lambda.
 
I think it hates you because you hate it. It seems pretty obvious.
 
No.
 
3:45 PM
Try naming the argument as a workaround
 
@milleniumbug that's not the problem!
It's a problem if it's auto &&..., but not here.
Here, it thinks it needs to do some auto deduction.
???
Even the error message says that it already deduced everything.
And the line that causes problems if inside the thing? It's literally auto conts = decltype(state->continuations){};. Where state is an effect of calling _state.lock(), where _state is a member weak pointer.
There is literally nothing to deduce.
 
user6225166
hello
 
user1804599
what the fuck
 
user6225166
current topic just entered
 
user6225166
?
 
3:48 PM
Okay, at least now I know that I have the same locking problem in both GCC and Clang, so it's probably just me being logically wrong, and not me invoking undefined behavior.
That's good.
Oh fuck, of course I'm logically wrong.
Only I'm not sure if I can fix that easily ;_;
 
nwp
@Griwes what do you mean probably? Use UBSAN instead of guessing
 
You are extremely unhelpful.
Also the only possible UB there is a data race, so ubsan wouldn't be even close to helping.
 
user6225166
current topic? problem. maybe i can solve it?
 
nwp
@GNACBetombo This is the lounge. We don't solve problems, we whine about them.
 
@Griwes --sanitize=thread ?
 
user1804599
3:51 PM
This error is so weird: lpaste.net/5365078270612078592
 
user1804599
It smells like type inference bug but I'm not sure.
 
...it's spelled fsanitize and no, it would not help, since this is clearly a logic problem.
 
sounds like you already 100% know what is wrong with it
 
Yeah, I do now.
 
user6225166
what do you mean by --sanitize=thread @doug65536
 
user6225166
3:53 PM
?
 
Smart sharing semantics are biting my ass right now.
 
@GNACBetombo sorry, fsanitize
 
user6225166
i understand know :)
 
user1804599
oh MineRoomKind actually takes an ore
 
user6225166
3:57 PM
thx nwp
 
@Griwes Now that's an interesting fetish.
 
aaaaand now a segfault from inside a hashmap
 
Hello please check this out and give feedback : github.com/indrajithi/Audio-Visualizer
 
...sometimes. And sometimes it actually fully works. ;_;
 
its an audio visualizer in c++ using OpenGL.
 
4:01 PM
I hate it when code starts working randomly after rebuild.
yay, that was all I needed to say for it to stop!
 
user1804599
 
Okay, I think I actually fixed the future problem a moment ago, though all the logic errors I've noticed actually were there.
argh, I failed to capture some of the exceptions, and boost::filesystem::create_directory helpfully throws sometimes when trying to create the same one multiple times simultaneously.
> Creation failure because p resolves to an existing directory shall not be treated as an error.
?!
ah
So, here's the moment where you laugh at me for an hour: should've been calling create_directories instead.
 
Xeo
4:28 PM
lol
so you did mkdir /a/path/somewhere instead of mkdir -p /a/path/somewhere?
 
yes
and the racy part was because one of the tasks was creating /a/path and another tried to create /a/path/somewhere.
headdesk
 
Xeo
aww
I'm not sure which I'd prefer to be the default...
auto-creating parent directories is much more convenients (also on file creation, not just directory creation), but might hide logical errors
 
4:46 PM
 
user1804599
@Xeo Then don't make either the default!
 
user1804599
But do provide the simplest, so that the more complex can be implemented in terms of it.
 
Ugh, smooth scrolling is literally Hitler.
 
5:09 PM
@Griwes What's that, the scrolling you trigger by pressing the middle mouse button?
 
@Griwes I dislike smooth scrolling too. give me instant redraw anyday
 
@Shoe I found another talk by Kevin Henney:
 
@doug65536 Smooth scrolling haters assemble!
 
Why stretch 4:3 slides to 16:9 format? :(
 
@fredoverflow Who?
Ooooh, I see
 
5:20 PM
@Columbo It's the thing that chrome turned on a while ago and will probably remove a configuration option for in a while.
:/
 
5:41 PM
@Borgleader pages add javascript smooth scroll, even though it is totally redundant with the browser provided one. stackoverflow.com/a/1805839/1127972
 
@doug65536 Thats not what @Griwes was referring to though? I mean he specifically talked about a Chrome setting.
 
yeah? Okay. well pages that smooth scroll like that drive me nuts :)
 
user1804599
Time perception is extremely fascinating.
 
user1804599
Perhaps it's so fascinating because consciousness is ill-understood.
 
Sexification of notational abuse: done.
 
Ven
6:02 PM
huh
 
6:17 PM
can someone explain why the compiler does not give an error when you call a function twice (or more), which has a static const member in it, that you assign a new value to it each time? (it still remains the same value from the first call, but why does it not give an error when you attempt to change it with subsequent calls?)
 
nwp
@AjeetKljh because it only assigns the first time it is encountered, no matter if it is const or not
 
great thank you
 
Ven
OH: "The new standard is C++1zzzz, because we're waiting for new features for so long"
 
There's a barbecue smell coming from my window. I'm not even hungry but I'd be ready to eat sausages anyway u_u
 
Ven
you're always ready to eat sausages <3
 
6:27 PM
I had some salmon filets on the grill last night
 
Er...
@JamesAdkison Those are great :o
 
Indeed they are. There is no evidence left.
 
I sometimes wonder why salmon tastes so good.
 
@fredoverflow inb4 "There is no silver bullet in soft. dev. The end."
 
6:31 PM
@Morwenn I feel that way about sea food in general.
@Borgleader That's a succinct explanation to be sure!
 
@fredoverflow good speaker to begin with; I'll watch it later
 
@JamesAdkison Strange. I can't eat many shellfishes before my taste buds decide they don't like that anymore.
 
The plural of fish is fish.
@Griwes why would this ever not be sequential :)
 
@sehe Damn.
 
@sehe As illustrated by Dr. Seuss (1 Fish 2 Fish ...)?
 
user1804599
6:42 PM
Maybe I shouldn't render tiles that aren't visible.
 
user1804599
Like, out of the viewport.
 
Ven
...indeed
 
Could help performance ...
 
user1804599
10000 SVG groups each with its own set of a dozen elements is a lot.
 
@rightfold do you have online example?
 
user1804599
6:49 PM
 
Completely justified
Smart. (On microservices)
 
@sehe There are quite a few gems in the video.
 
I'm currently watching it on pause. It's relatable.
 
I'm a bit bored. I have things I can do, but nothing that motivate me enough to actually do them :/
 
6:56 PM
@Ven I already read that a while ago.
 
user1804599
@sehe And wrong, too. :)
 
user1804599
The square root of negative zero is not positive.
 
user1804599
Floats are terrible.
 
Indeed.
 
user1804599
My program spends 30% of its time collecting garbage. :(
 
6:59 PM
@Morwenn The description of the motion 1 to the EWG including?
It's pretty hilarious to read even the second time.
 
@Griwes Of course. It smelled like chaos.
 
:D
 
@rightfold I think you're focusing too much on the negatives there
@rightfold How on earth did you (a) manage (b) measure that
 
> My program spends 54.3% of its time measuring its own execution time.
6
 
user1804599
@sehe (a) immutable data structures, (b) go to the Profiles tab, click start, run the program, click stop, look at the profiler output
 
7:07 PM
context (I don't have a profiles tab)
 
@Morwenn use a better performance analysis tool, one that uses hardware features of your cpu
vtune/perf/etc
 
Noun: joke ‎(plural jokes)
  1. An amusing story.
  2. Gay
  3. Or witty joke our airy senses moves / To pleasant laughter.
  4. Something said or done for amusement, not in seriousness.
  5. It was a joke!
(8 more not shown…)
Verb: joke ‎(third-person singular simple present jokes, present participle joking, simple past and past participle joked)
  1. (intransitive) To do or say something for amusement rather than seriously.
  2. I didn’t mean what I said — I was only joking.
  3. (transitive, dated) To make merry with; to make jokes upon; to rally.
  4. to joke a comrade
 
user1804599
@sehe V8
 
user1804599
PureScript
 
user1804599
Google Chrome
 
user1804599
7:13 PM
 
> 2. Gay
 
opengl queues up commands and blames it all on whatever call had to wait
 
@rightfold code?
your call stack is ten deep and you are complaining?
 
People will stop showing you pictures of their kids if you whisper "oh fuck yea" under your breath when you look at their photos.
@rightfold noice
 
user1804599
7:27 PM
Using an array instead of a lazy finger tree removed the excessive allocations and made indexing instant instead of slow.
 
user1804599
But now world generation is slower because updating arrays requires copying them.
 
I guess he's ignoring me
 
#include <stdio.h>
#define prod(a,b) { \
a*b \
}
int main()
{
int x,y;
x=3; y=4;

int z=prod(x,y);
printf("%d",z);
//printf("%d",prod(x,y)); If i write prod(x,y) directly it gives error, why ?
return 0;
}
 
because a) macros are terrible b) that specific one makes no sense
 
yeah because prod(,) is so much easier than * (<-- sarcasm)
 
7:30 PM
okay, thanks
 
because you literally do printf("%d", { a*b });
 
avoid macros, don't look for reasons to introduce them
 
okay :) thanks
 
@sehe Seen that at our company. My direct superior has a problem with this.
 
I only imagine.
 
7:34 PM
we moved to ES6 modules for no real benefit, it's just been a total waste of time with little justification in the first place.
 
I don't tweet much anymore, because I used to be depressed. I asked for help. If you feel depressed, you should to. Because I'm better now.😊
Too meta
@Puppy That's a first. When management encourages dictates unnecessary refactoring
 
eh
half the problem is that he's not really a proper manager or a proper developer
he's a fine manager I think but is somewhat a developer and he's not good at it
 
So. He's just in charge of money spending?
 
nah
he mostly just communicates between the developer team to the company owner
 
I have people skills. I get the requirements and give them to the developers.
What is it you would say you actually do here?
 
7:40 PM
I do a thing known as chatting
it involves hitting keys on this plastic tray thing in front of me
then other people see corresponding symbols on their visualization mechanisms
 
We really are living in interesting times.
 
I think everybody thought their times were interesting
 
@rightfold But immutable data structures are so clean and cool!
 
user1804599
It's about laziness, not immutability.
 
Then why did you say "immutable data structures" if it's not about immutability?
 
7:50 PM
@fredoverflow ...until caches start existing.
 
not at all. until you need more performance than emulating immutability on commodity hardware can afford
 

« first day (2051 days earlier)      last day (2897 days later) »