« first day (1789 days earlier)      last day (3145 days later) » 

@fredoverflow let me guess... scala?
 
Do you want me to spoil?
 
I'm not going to watch it vOv
 
> I think PHP is the best programming language to learn first.
 
lol
 
10:09 AM
looool
 
Mirobowling.
 
I've come to think JS may not be that bad a language to expose people to first... mostly because it's very very easy for them to be to start doing visible things. You can just take the browser they already have and show them how they can use a few lines of code change the page in front of their eyes
I wouldn't leave them on it for long mind
 
Alcohol is the only sensible first programming language to learn
 
Well that's why JS is so successful - it's very easy to learn.
 
Well, the only one
 
10:13 AM
@thecoshman Personally, I think C is not a terrible first programming language. You can solve interesting problems from day one and don't need a lot of concepts.
 
@fredoverflow Memory management, pointars, etc
 
You can do a lot of stuff without pointers.
But sure, you'll have to do pointers sooner or later.
 
Javascript is much easier to start with than C
 
parsing C++ is hard friends
even with clang
 
@AnastasiyaAsadullayeva If you have the right programming environment, understanding pointers is really not that hard:
18 hours ago, by fredoverflow
user image
 
10:16 AM
No compilation step, errors are very low in complexity, string handling is simple, syntax is easy, etc
 
also don't know how to design this at all
 
@Rapptz Why do you want to parse C++?
 
lucdoc™
 
What about doxygen?
 
@fredoverflow sure, but the environment takes time to set up and is easy to get wrong and it's a long way till you start doing visual stuff.
 
10:17 AM
this isn't for doxygen
it's going to be a sphinx extension because doxygen sucks
 
@thecoshman I don't necessarily disagree with you, btw.
 
@fredoverflow depends, some people really struggle with it
 
Isn't everything in JavaScript implicitly a pointer or a double? :)
 
not in node.js
 
@fredoverflow it's like with Java, you use references all the time, but people seem to find it hard to understand the difference between passing a copy of the value and passing a copy of the reference, and thus having two things referring to the same thing. And that makes things like threads so much harder for these people
 
the amount of effort required to reproduce: void f(int x, int y = 20) is a lot higher than I thought
also the inline keyword got silently swallowed somehow and I can't find out how to find it
 
clang probably ignores inline silently ;)
 
@fredoverflow yeah basically
JS makes so many of the problems go away
just a shame it's such a shit language :P
 
Haha caring about mobile
 
> Python is still a fine language. It lets you focus on problem solving and not the architectural stuff that experienced developers, who've forgotten what it's like to an absolute beginner, think is important. The language itself melts into the background, so lessons aren't explanations of features and philosophies, but about how to generate musical scales in any key, computing distances around a running track based on the lane you're in, or writing an automated player for poker or Yahtzee.
I love this guy.
I'm so tired of explaining language features, Design Patterns, Best Practices etc. when people can't even program Naughts and Crosses.
 
10:22 AM
Oh that article.
 
@fredoverflow +1 for not calling it 'tic tac toe'
 
how do you call the generalization of tic tac toe that requires N aligned tokens (rather than 3) for a victory on an MxM board (rather than 3x3)
 
@AndyProwl Naughts and Crosses
 
@sehe If you have a moment, I'm still not sure what you meant by that
 
I never liked that article.
I think the moment that someone asks how to write a GUI or make a game they're past the beginner phase.
 
10:24 AM
oh there's a new (?) privilege
 
@thecoshman according to google that still seems to be the classical 3x3
 
@Rapptz not really.
 
Yeah really.
 
Lots of kids would want to make a game
 
Yeah and I'm sure it'll be their first program they'll write.
And I'm sure JavaScript will help them achieve that.
Be realistic.
 
10:25 AM
@thecoshman Lots of kids would want to marry a game. Game marriage!
 
No, just asking about 'advanced' features doesn't mean you are bast beginner phase
 
@AndyProwl N-in-a-row?
 
It's good to ask about these things, it means you can give a brief overview of how to get there
 
@AnastasiyaAsadullayeva Seems weird.
 
@R.MartinhoFernandes nah, that's another game
 
10:28 AM
I'm preparing the exercise session for a workshop and basically the exercise consists in programming that game
 
if a computer can work out the perfect play, but does so by brute forcing the options, does that count as being a 'solved' problem?
 
I called it 'connect' but I know that's a different game
 
An m,n,k-game is an abstract board game in which two players take turns in placing a stone of their color on an m×n board, the winner being the player who first gets k stones of their own color in a row, horizontally, vertically, or diagonally. Thus, tic-tac-toe is the 3,3,3-game and free-style gomoku is the 19,19,5-game. m,n,k-game is also called a k-in-a-row game on m×n board. m,n,k-games are mainly of mathematical interest. One seeks to find the game-theoretic value, which is the result of the game with perfect play. This is known as solving the game. == Strategy stealing argument == A standard...
Yours would be M,M,N-game, I guess.
 
Yeah I found that too but I thought the game has a colloquial name as well
 
@AndyProwl yeah, connect four is another game.
@AndyProwl colloquail speak tends not to concern it self with abstract concepts like that
 
10:29 AM
I could call it 'monkey'
from 'mnk'
 
@thecoshman Yes.
 
@thecoshman If a computer may never lose (ties are allowed) to a human, it is considered a solved problem.
 
even if it's just brute forcing it?
 
@AndyProwl Now write template meta monkey at compile-time!
 
@thecoshman Yes. Some games cannot be brute-forced, though.
 
10:31 AM
@fredoverflow reminds me of that crazy meta-tetris thing
 
but like... chess... in theory if you had a powerful enough computer, could be brute forced...
 
Chess has been a solved problem for years
 
@thecoshman if the problem does not include time or other constraints that make brute force inapplicable then yes.
 
The largest solved game is checkers/draughts.
 
10:32 AM
@AnastasiyaAsadullayeva Wait, didn't Big Blue cheat against Kasparov by changing personalities or something? ;)
 
@fredoverflow lol what?
 
I saw a documentary once where Kasparov complained along those lines.
 
@AnastasiyaAsadullayeva If a computer may never lose (ties are allowed) to any computer, it is considered a solved problem.
 
The games were spread over several days, and he said it felt like playing against very different opponents.
 
@fredoverflow one that learnt how beat him?
 
10:34 AM
I think the team tweaked the AI after each match or something.
 
@R.MartinhoFernandes Then it can only tie against itself :p
 
@AnastasiyaAsadullayeva No, some games are wins for one of the players.
Connect Four is one.
First player wins.
 
Then you alternate start order
 
@R.MartinhoFernandes I thought first player just can't loose?
 
@AnastasiyaAsadullayeva It still never ties :P
 
10:39 AM
If you take the BO-n (with n mod 2 == 0) it does :D
 
What happened to chess is just that humans can no longer fare well against computers.
But computers are still competitive against each other.
 
Gotta run :)
Awesomeness:
SE chat throttling became a lot more annoying very recently
 
No - your request timed out.
 
Precisely
 
That's not an SE problem.
 
10:42 AM
I had to repost that message 6x before it got admitted
 
@sehe IRC :D
 
Chat retry logic is garbage
 
@Griwes It is. Reserach first, blabber later
 
s/retry logic //
 
I can show it happening.
 
10:43 AM
@sehe It's a network notwork problem.
 
But I have lunch to make for n+2 kids
@Griwes Nope.
 
@sehe How can you prove that?
 
HOw not
 
Different error message.
 
@sehe Yes - I'm hitting it relatively often when chatting via the work proxy.
 
10:44 AM
Ugh. It's prohibitive now
 
That's a different error!
 
parser error
 
That's throttling; that thing before - that's a timeout.
 
SPLENDID. So, keep being righteous about the things you don't see.
@Griwes @#!$%^&*
I got the timeout BECAUSE of the throttling.
 
...
 
10:45 AM
Of course, when you don't retry before a certain timeout it will... timeout.
 
@sehe ITT sehe only knows of at least two of his kids :\
 
Which is how I found that "I gotta run" message. After I came back
@thecoshman Class mates
 
It's very important whether it's retry or throttling logic that's broken
 
 
Mkay, so not a network problem - a pebkac problem.
 
10:46 AM
Period. End of story.
It's the throttling that's broken
 
(Spoilers: it's both)
 
Play dates
LOVELY innit
 
buy better internet? :D
 
Clearly should've used conc_vector
 
I'll be back. Restarting browser clearing cookies and then probably filing a bug on meta
 
10:48 AM
It's how it behaved from the start
You think now they'll fix it? :v
 
I hit throttling fairly often because it's tuned for ants typing by mass-piling onto a key
 
Thinking chat is well coded - You can perform this action again in 5 years - retry / edit / cancel
10
 
@CatPlusPlus This is not how it worked from the start FFFFFS. Did you miss about a dozen screenshots?
Did you miss the fact that it was like this even though I was away for almost an hour?
 
@sehe Sure it would, once you hit the threshold the throttle timeout keeps growing unless you just stop typing for like 15 seconds
 
10:51 AM
I know the feature was there. It's just that the feature got far less well-behaved
 
@sehe lol okay that'd be even more broken than usual
 
@CatPlusPlus Point is: it's impossibru I hit the threshold. I was away for an hour.
 
 Hoarding was recognised in the 2013 Diagnostic and Statistical Manual of Mental Disorders (DSM) and is said to affect about 1 million Australians.
 
I'm amazed how badly they fuck up simple things
 
another mental disorder to keep psychiatrists jobs
 
10:53 AM
Also "take me to my last message" still doesn't take you to your last message
 
It seems that there is a positive correlation between the number of psychiatrists and the percentage of people who suffer from depression. Coincidence? I think not.
 
@CatPlusPlus wfm
 
I'm not very amazed how badly they fuck up simple things. I'd probably do worse
I think I haven't seen a better alternative yet
or less bad alternative if you wanna put it that way
 
Slack is pretty decent.
 
slackoverflow
 
10:57 AM
yes slack is not bad but it does not have reply-to, which I think is a great feature
 
@CatPlusPlus In fairness, restarting the browser did make the problem go away. So it's likely some freak edge case triggered by the fact that that retry prompt sat there unattended. But even before my absense, I had way to much throttling going on.
As god is my witness
 
@AndyProwl piv.pivpiv.dk?
 
@thecoshman just some flashy thing singing "you are an idiot"
 
I honestly think this sphinx plugin is gonna take a long time lol
 
@R.MartinhoFernandes some times it does sure, other times it just sits there and gives up
 
11:00 AM
@sehe In general it doesn't cope very well with not being refreshed for long periods of time
Sometimes it stops autoscrolling even though it's at the bottom
Sometimes it starts inserting 'n seconds later' after every message
 
Sometimes just parser error
 
I've even seen a negative n seconds later
 
Sep 3 at 1:32, by Anastasiya Asadullayeva
I don't know, @Rapptz since when are you Chinese?
 
huh
 
Xeo
11:06 AM
@R.MartinhoFernandes Are you saying that a game of Connect Four can't be tied?
 
@Xeo No, I'm saying perfect play is a win for the first player.
 
you choice would be: 1) start of this life 2) start of some next life
 
Xeo
@R.MartinhoFernandes ah
 
also butt is so muslim
 
German ads are funny.
 
11:14 AM
@R.MartinhoFernandes Second slide here.
 
11:25 AM
I almost got a C++ ELF executable to run on my phone today.
then file permissions happened
 
> Likewise, anything in a namespace called detail is an implementation detail. Things in the very_detail namespace are really hacky details.
 
Things in very_very_detail namespace would blow your mind
 
You would fall into coma upon seeing the eliteness
 
Ben: "I've compiled a nice ELF file for you to run, would you..."
Android: "No, your an idiot. Move it to place where I can execute it from, or reformat your SD card to ext4 so that you can set the executable permission on that ELF file you just compiled, then I can run it."
 
you guys remember how I said that I almost fucked up a lecture because I was 1) in the first class-room 2) didn't have time to make sure that the HDMI cable to the projector was working?
guess what happened today.. I overslept and made it right on time, but did not have any time to prepare
the students didn't seem to notice though, and I got very positive feedback at the end, but still
this semester is not my semester
 
11:33 AM
@FilipRoséen-refp what do you teach?
 
@edition my main course is C++, but I'm also doing a bunch of introductory courses in python and C
 
> [[have_mercy]]
lol
@FilipRoséen-refp true talent shows when improvising :)
 
do they have live C++ performances, with orchestras?
 
@Mr.kbok good thing I always improvise then!
 
@edition orchestras don't usually improvise, hth
 
11:38 AM
@edition nhaa, just solo performances with me coding live
 
@sehe crap orchestras, that make mistakes while playing, and end up rewriting parts of the music.
 
...
That's not improvising
 
ah, I made a few semantic errors.
that's strange, my sentences are failing.
 
user1804599
@fredoverflow lol notepad
 
@AnastasiyaAsadullayeva yes
 
user1804599
11:48 AM
The best first programming language to learn is the one that best suits your interests.
 
@elyse What programming language did you learn first?
 
user1804599
Visual Basic for Applications.
 
user1804599
That was ten years ago and I don't know jackshit about it anymore.
 
TI-Basic was my first, and it was probably 8 years ago.
The only programming language I know where it's pedantic not to close parenthesis and strings.
 
I wrote VBA in high school, playing with ActiveX controls. IE: Hiding a web browser in a word document.
 
11:54 AM
0
Q: Is there any special reason to use "std-pair" instead of "stdpair"?

amuseToday I want to ask question about std::pair, but cannot find "stdpair" tag, but find "std-pair" tag. But I find there are similar tags like "stdvector","stdmap","stdstring","std vector"... Is there any special reason to use "std-pair" instead of "stdpair"? If not, should "std-pair" be replaced...

 
learnt QBasic in my later primary school years.
 
Have you guys noticed ^^^ ?
 
what have I done @JonClements?
 
huh?
 
user1804599
@edition haha IE get it
 
12:12 PM
@JonClements Now I did
 
@sehe looks like I'm still not coming across as a "nice" mod hey? :p
 
I only know "nice" mods
It's good that you cross post that here, IMO. I don't visit meta unless forced
 
user1804599
if you have unordered map, can you do for (auto& x : map) { ++x.second; } to modify it?
 
user1804599
I think not, since C++ is shit as usual.
 
Well, certainly don't want to "force" anything, but thought it's your community and it might be of interest - that's all.
 
12:15 PM
I acknowledged that :)
 
@elyse why not?
 
@elyse yes; value_type is std::pair<key_type const, value_type>
 
user1804599
oh cool
 
user1804599
@sehe cool
 
I'm surprised you (1) didn't know (2) didn't try
 
12:15 PM
x is of type std::pair<const Key, Value>
 
user1804599
a lot of my code is still not compiling
 
@набиячлевэлиь slow poke
 
Anyway, quick Q guys, if I'm to get back into C++ (did it for 12 years, but not since 2005) - I'm taking I have a hell of a lot of catching up to do?
 
@elyse wow. you suck :)
 
user1804599
:3
 
12:16 PM
@sehe slow typing on mobile
 
@JonClements Yes. But you'll love it because c++11 is a huge improvement
 
user1804599
4269
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are published every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written...

 
@набиячлевэлиь doesn't explain leading const :)
 
@JonClements If you're passionate about it, it can be quick enough.
 
On the other hand if you're aware it's C++ it'll take forever
 
12:17 PM
ITT best to be oblivious
 
I'm under the impression it might be best to treat it as a "new" language kind of thing
 
Xeo
@JonClements You have a lot to forget and a lot of new stuff to learn
 
@sehe huh? Which leading const?
 
@JonClements There are some new stuff, but if you wear the right goggles, you'll only see how it's better than before.
 
Yes if you ignore all the bad parts you'll find that there are no bad parts
 
12:19 PM
@CatPlusPlus brilliant, so don't hit your thumb with the hammer, and your thumb won't hurt? :p
 
@JonClements It's C++. More like: if you cut your thumb off, it won't hurt when you hit it with a hammer.
7
 
@Xeo it's up to you - but does my warning still need to be pinned?
@R.MartinhoFernandes and I'm taking a wild guess, your blog still isn't available :)
 
@JonClements Yeah, sorry.
Been busy.
Well, kind of.
"Been enjoying life" is a better description.
 
user1804599
std::vector<llvm::Value*> pass_captures;
auto read_captures = &*implementation->args().begin();
std::size_t i = 0;
for (auto& pair : scope) {
        pass_captures.push_back(pair.second);
        auto capture_addr = b->CreateConstInBoundsGEP2_64(read_captures, 0, i++);
        pair.second = b->CreateLoad(capture_addr);
}
 
user1804599
Ugliest loop ever.
 
Xeo
12:21 PM
It's not that you don't have the time, it's that you choose to spend the time otherwise.
 
user1804599
Imperative programming sucks.
 
May 1 '14 at 15:22, by R. Martinho Fernandes
My father used to say something like "It's not that I don't have time to read more books, it's that I have time for other things"
This one de.pcpartpicker.com/part/… is more expensive, but 2.5B operation noise.
 
Oh, work is being in Sphinx to support C++ templates. That's good news.
 
12:40 PM
what android apps should I download
 
@набиячлевэлиь const T vs T const
 
user406009
@AndyProwl Google chrome.
 
that's preinstalled
 
user406009
Adobe PDF reader.
 
12:43 PM
@sehe it's not french - a constant thing vs a thing constant
 
@R.MartinhoFernandes why is that better than the regular timer?
I mean, the preinstalled one
 
The go/stop mechanism is better.
 
@R.MartinhoFernandes 3 years and up, eh?
 
You hold your fingers down, and when you lift them it starts going.
 
user1804599
YAY lambdas work. :D
 
12:44 PM
Too young to use the app, then
 
user1804599
Now (\x.\y.x) 1 2 returns 1.
 
@R.MartinhoFernandes Ah, got it. I don't think I need that saves me critical time yet though
my average solve is probably still around one minute
 
@AndyProwl It's not about saving time (you save more time by holding the cube with one hand and tapping go with the other in the normal timer). Just comfort.
 
then I think I don't understand
why is that more comfortable than just pushing a button?
 
It's more reliable than a tap, for instance.
 
12:47 PM
@набиячлевэлиь trailing const master race. Vote for consistency
 
const-after ftw
 
Lifting your fingers after the hold has been registered already has less chance of not registering properly than a tap.
 
I see, but I don't think I ever had that problem
 
luxury
 
I like the display connection, though.
It's fancy.
@AndyProwl Oh and it offers scrambles.
 
12:50 PM
constistency
 
Xeo
@sehe +1
 
@R.MartinhoFernandes that's nice yes
 
I don't usually use those, but since you mentioned that yesterday (?), maybe you'll like that.
 
> Unless you’re willing to fire them and hire new ones, make sure you use a syle that lets them understand your code.
 
To be honest, I still think it sucks.
 
12:52 PM
yeah I use an online scrambler
 
I can't find a timer that the entire feature set I want.
They all have subsets.
 
Xeo
write your own, duh!
 
I thought I've read there are automated devices that scramble the cube for you but I probably misread it
I'd buy one if it existed
 
user1804599
ok FFI
 
Lounge Project: perfect cube timer
insults you when you don't break your record
 
user1804599
12:54 PM
or maybe Hindley–Milner :O
 
Xeo
@AndyProwl You mean basically this thing in reverse?
 
I want: inspection time, replayable scrambles, hold down GO, and record keeping.
 
user1804599
because now you can call integers, resulting in segfault :D
 
@Xeo yep
 
@AndyProwl I bet if there was such a thing as a non-gimmick, they wouldn't use humans :P
 
12:55 PM
yeah I thought so
@R.MartinhoFernandes This has almost everything: play.google.com/store/apps/details?id=com.h3ss.speedcube
only hold down go is missing
 
@AlexM. Ah so you did the same as me. You looked up the outcome before choosing? :)
 
user1804599
Boehm GC is great.
 
Boehm Rhapsody
 
where is that from? seems an outdated version of C++FAQ maybe
Never mind found it's on this one https://isocpp.org/wiki/faq/const-correctness#const-ref-alt Awkward with the typo
 
user1804599
Shall I just represent Booleans as \then.\else.then and \then.\else.else instead of a new data type? :D
 
12:58 PM
@AndyProwl Yeah, I've found a ton with one of those four features missing :(
 
Boehm Rhapture
 
user1804599
@AndyProwl lol
 
user1804599
Boehm Rapptz
 
I use this one because I get really use to hold down GO.
 
user1804599
Oh btw @ʎǝɹɟɟɟǝſ I found a nice way to deal with the byname problem.
 
12:59 PM
Ideally I'd find an open-source one and add the missing feature but time.
 
I wouldn't even know where to start
 
Oh, yeah, forgot custom puzzles.
 
what do you program android apps in?
Java?
 

« first day (1789 days earlier)      last day (3145 days later) »