« first day (856 days earlier)      last day (4311 days later) » 

10:00
I forgot breakfast
now I'm hungry
no, rly?
:P
@TonyTheLion Impressive.
user142019
@Xeo haha xD awesome.
yep, e4
hooray wmchar isn't broken :p
lol
wcout should be able to print a basic Unicode character like that, though.
10:01
@DeadMG where was it being printed to?
Because wcout can generally handle that, but the Windows console can't afaik
I mean, even the Windows console
Last time Alf tried it, it was a mess.
@melak47 Any time you look at the printed character, you are assuming that the output stream assumed the right encoding for its input, and that it output data using an encoding suitable for the output device (say, the console), and that whatever you used to view the result from the output device had a font that could handle the generated glyph. In other words, you introduce a lot of possible points of failure. So just look at the integer value when debugging
Use Console API if you want to print anything remotely resembling Unicode
Don't use wcout
user142019
I use Console2.
10:04
Forget wcout even exists
@CatPlusPlus huh? which function?
@CatPlusPlus I don't really want to print to console. I just thought it could work. :S
user142019
Use Arch Linux and Terminator.
I don't know, maybe WriteConsoleW
Just a hunch
@CatPlusPlus IIRC it doesn't work
10:05
This is why GHCi shows strings with anything beyond ASCII as numeric escapes, btw.
GHCwho?
user142019
Just use std::cout and forget about Windows.
I wish more dev tools would do that. (gdb I'm looking at you)
It works for some values of works, and definitely works better than wcout
@melak47 Haskell interpreter.
10:05
@R.MartinhoFernandes And then there are people complaining about it :cripes:
I think it was even here
lemme check it...
I had to write a function to convert my strings to strings with verbatim hex escapes so I can debug properly.
@R.MartinhoFernandes | xxd? vim ga or g8 and 8g8 FTW
user142019
Or use a decent terminal emulator.
10:07
@sehe On GDB?
@Zoidberg That's irrelevant. I don't want to see weird glyphs. I want to see the data.
@R.MartinhoFernandes Ow. No. Probably not. Sorry. I kind of missed context. Allthough gdb does let you invoke functions dynamically, so you can at least use you debug dumper from gdb
user142019
Oh I thought you were talking about Unicode.
@R.MartinhoFernandes and use x (examine) over display
user142019
Time to add syntax for base classes and interface implementations.
x lets you specify the format
10:09
@CatPlusPlus it prints "?" if codepoint is not in current code page.
@Zoidberg What is this sorcery? Test Driven Language Design?
Write a book "Headless Zoidlang for by Dummies"
@sehe You mean p/x or something?
That prints the pointer, and ignores the data.
user142019
Also function parameters.
@R.MartinhoFernandes I mean "x" for examine delorie.com/gnu/docs/gdb/gdb_56.html
10:11
@Abyx Change the codepage
if console output looks messed up, try changing the font. (lame I know)
Anyway Windows console is a piece of shit
@CatPlusPlus nope. I print L"test тест 实验\n", there no such codepage in Windows
I have been using vectors instead of strings and /x.
10:13
@R.MartinhoFernandes and ddd - I specically recall ddd displaying char arrays as actual hex byte sequences. Sadly, ddd is hardly usable beyond that
@R.MartinhoFernandes well, if it works, it works
@Abyx 65001 is UTF-8
GDB does not assume vectors are strings, so it works.
But the moment I slip in a std::u32string or something, BAM, all kinds of crazies on my screen.
There's UTF-16 apparently too but supposedly "for managed applications" whatever that means
@R.MartinhoFernandes actually, in my experience gdb always fails to notice std::string is a string, so I get no debug visualization of any use. Luckily for me, I don't often use the debugger
@CatPlusPlus and how do I change it to 65001?
10:14
@CatPlusPlus Isn't that buggy or something?
.NET = managed
SetConsoleOutputCP
2 mins ago, by Cat Plus Plus
Anyway Windows console is a piece of shit
It's too hardwired into the OS
Subsystems are dumb
BREAKING NEWS: Windows might not be an ideal OS after all
10:16
hey, the starred crap is actually showing up more or less. does anyone have the ABORT thing from a couple days ago?
@sehe Guess you never used 7.0+
@CatPlusPlus now it doesn't print anything. yeah, it's a piece of crap.
user142019
Oh hey I got a Valentine's email from a website that keeps track of dependencies of RubyGems.
@R.MartinhoFernandes Not sure. Lemme find out :D
user142019
@sehe what a surprise.
10:18
@Abyx run %windir%\system32\windowspowershell\v1.0\powershell_ise.exe. at least that console handles unicode
@Zoidberg You definitely need to get out more.
user142019
How is that related.
user142019
I can't help it I get pointless emails, and getting out more definitely won't change that.
@R.MartinhoFernandes I'm supposed to be running gdb (7.5-0ubuntu2), but it is entirely possible I haven't paid enough attention on the few times I entered the debugger. (That would have been when doing a valgrind run)
user142019
I have to read two pointless articles about social media for school.
10:21
1 hour ago, by thecoshman
Haskell is a solution to problems that do not need solving
^ said the guy who gets annoyed about people too cool for school. Mind blown
@Zoidberg well, it's not entirely pointless if you think it is pointless
user142019
Seriously.
user142019
I want to be a software developer.
user142019
Not some sort of shitty marketing guy why the fuck do they teach me this.
user142019
What is this terrible school.
user142019
School y u no interesting. Like what about optimizations or compiler design or database theory or whatever.
Ell
Ell
10:27
I swear you'd complain about it whatever they taught you :P
@Zoidberg Well, the absolute minimum it will gain you is discipline to get through things other people think is important too. The second thing it will likely yield you is a better context to understand the way other people think. Both of which I wish I learned better at an earlier stage.
He's just Mr. ComplainGuyThatJoinsCatandPuppy
user142019
Instead we get shit about social media and criminology and rise of sea level and how to create global loop counters in JavaScript.
The latter is fraught with risk. Better ace that course
user142019
10:29
Teacher did this once:
user142019
for (i = 0; i < 10; ++i) {
    foo();
}

function foo() {
    for (i = 0; i < 10; ++i) {
        alert(i);
    }
}
Lemme guess. You killed him, is why he did it only once?
user142019
Haha BOOM!
user142019
i is global! :D
@Zoidberg That's actually a good demonstration then, right?
user142019
10:31
@sehe I never really knew the meaning of the word "discipline".
@Zoidberg I know the meaning... but I find it hard to apply :(
user142019
@sehe meh.
@Zoidberg a dictionary can solve that :P
user142019
I know the D in BDSM means "discipline". :|
user142019
10:32
Noun
discipline (plural disciplines)
A controlled behaviour; self-control
An enforced compliance or control  [quotations ▼]
A systematic method of obtaining obedience
A state of order based on submission to authority
A punishment to train or maintain control
A set of rules regulating behaviour
A flagellation as a means of obtaining sexual gratification
A specific branch of knowledge or learning
A category in which a certain art, sport or other activity belongs, or a sub-category of said activity.
user142019
Oh so it means that you do what you need to do or something?
user142019
@TonyTheLion ^ it has ten million different meanings.
user142019
I'm always in control.
user142019
Except when something doesn't work, then I freak out.
@TonyTheLion make it a hashtable based dictionary
user142019
10:34
Stack Overflow is a hash table, mailing lists are linked lists of pairs.
@thecoshman Bullshit
@Zoidberg pick one that fits in the context you're using, d'uh
@Zoidberg hahaha. You're human alright
Ell
Ell
@Zoidberg it means two things
Discipline/Dominance
Pro tip: we're hardly ever in control. It's just our brains fooling us
10:34
@sehe He's Zoidberg!
Ell
Ell
IIRC
@TonyTheLion He blew his cover
@sehe isn't that just an excuse to justify not being in control?
Ell
Ell
Bondage & Discipline
Dominance & Submissivness(?)
Saidism & masochism
iirc
user142019
@Ell oh yeah right.
10:35
@TonyTheLion I think he'll pick the BDSM meaning
@TonyTheLion No. Why? It doesn't make any difference
user142019
@sehe lol
@sehe curious
user142019
@TonyTheLion about 99% of your brain activity is subconscscxkious.
user142019
10:35
That's what he means IMO.
Ell
Ell
@Zoidberg subconscious?
user142019
Stupid unspellable English word.
user142019
It's like zeë-ëeeeëgel in Dutch.
user142019
Or zeeegel or zeeëgel or zeëegel or zee-egel or whatever.
@CatPlusPlus example
10:38
Define problem first
@Zoidberg What's the problem, global variables?
user142019
@FredOverflow yes, i is global. :P
@CatPlusPlus no :P
the global bit
user142019
So the outer loop only runs once.
user142019
10:39
Who needs non-global variables?
Ah, I didn't notice the two foos were also the same, i.e. one function was calling the other :)
Maybe you think there is no need for provably correct programs?
Or easily parallelisable ones
Xeo
Xeo
@Zoidberg It was a hidden lessen about global variables being bad!
Are global variables faster in JavaScript? :)
Or highly reusable code
user142019
10:40
@FredOverflow implementation-defined and no.
And highly maintainable code
user142019
@Xeo except the teacher was very confused when I pointed out the mistake.
user142019
(He didn't run it.)
Where context is limited and always obvious
maybe you need a sense of humour
10:40
(Well, almost always0
IO could be better
user142019
I/O is terrible.
user142019
In the ideal world there was no I/O and every program could be optimized to nop or infinite loop.
user142019
Oh wait fuck halting problem.
user142019
Amon Amarth are so damn good.
@Zoidberg Yes there is a large market for expensive heaters in the ideal world
user142019
10:43
lol
user142019
Is infinite loop without side-effects allowed in Haskell or is it UB?
Xeo
Xeo
What loop? :)
user142019
Oh of course it's lazy.
user142019
Okay lol:
user142019
10:44
foo = [1..] `seq` ()
That's bottom.
@Zoidberg Why does JavaScript have implicit globals, anyway?
user142019
@FredOverflow because it's idiotic.
@FredOverflow Because it's a badly designed language
@Zoidberg I don't know you anymore :)
user142019
10:45
Use CoffeeScript instead. It's less idiotic.
user142019
@FredOverflow lol
I don't drink coffee.
user142019
Me neither.
@CatPlusPlus it's designed?
user142019
Coffee tastes even worse than tea.
10:46
Tea is awesome.
Cup<T>
@Zoidberg you're doing it wrong
user142019
class TwoGirlsOneCup {
public:
    Cup<std::tuple<Shit, Vomit>> cup;
};
user142019
@FredOverflow I instantiated it!
Ell
Ell
ew.
user142019
@Ell :3
10:48
I never watched that video.
user142019
@FredOverflow Good. It's still a surprise.
Hey, how did your date at the cinema go?
Ell
Ell
@FredOverflow Nor I
user142019
@FredOverflow it was le fun!
Did you share one cup?
user142019
10:48
No. XD
What movie did you watch?
What did you have to eat? Did she touch your nuts?
@Zoidberg you crazy? coffee is amazing
user142019
No. Coffee is bitter as fuck.
user142019
@FredOverflow Skyfall.
user142019
@FredOverflow Popcorn and no.
10:49
lol
@Zoidberg you are doing it wrong
You can put syntactic sugar in your CoffeeScript.
user142019
Synthetic sugar. FTFY.
@Zoidberg Skygood or Skyfail?
user142019
Neither; Skyfall.
user142019
10:50
As in, a falling sky.
So, mediocre movie?
user142019
One that goes from top to bottom.
@FredOverflow you're doing it wrong
user142019
@FredOverflow It was good enough.
Skyfall, it's a move that starts and about two hours later ends
user142019
10:51
As are most movies.
@Zoidberg most have more to say then that though
I'm not that excited about movie semantics lately.
std::transform(string.begin(), string.end(), string.begin(), ::tolower); why is the second string.begin() using a damn const_iterator?
Ell
Ell
where is bartek? :O
how do I make it use something non-const
10:52
@FredOverflow yeah, I am waiting for them to become non deterministic
user142019
@Ell he's bangin' yo momma.
@TonyTheLion How is string declared?
user142019
@TonyTheLion foo(bar&)?
user142019
Oh.
Ell
Ell
10:52
I can't get minicraft to build on linux :(
Engine.h:2:34: fatal error: VertexAttributeArray.h: No such file or directory
I know, damn it's an argument
@Zoidberg Well there's the problem. No point in "looking at code". The proof of the pudding is in the execution
how can I solve this without making the argument non-const
Pudding does not need proof!
"the proof of the pudding"..wut?
10:53
@melak47 google it
user142019
You know.
user142019
Compiler should optimize by trying different things and benchmarking them automatically.
@TonyTheLion You want to pass something by reference-to-const and modify it? Make up your mind!
user142019
But that only works for pure expressions.
@Zoidberg they do, that's called profile-guided optimization
10:55
std::string foo(std::string s)
{
    std::transform(s.begin(), s.end(), s.begin(), ::tolower);
    return s;
}
user142019
@doug65536 I mean really run them.
user142019
Do they really do that? :o
@FredOverflow That's asking for UB!
std::string temp(string.begin(), string.end()); std::transform(temp.begin(), temp.end(), temp.begin(), ::tolower); Pure evil?
yes, you should see how aggressive an optimizer is when it knows what code will run a lot
10:56
@TonyTheLion std::string temp = string;
where string is const std::string& string
@R.MartinhoFernandes Why?
@TonyTheLion Just pass by value.
tolower takes an int.
I can shove a char in an int just fine.
@R.MartinhoFernandes seriously?
10:57
@FredOverflow What if that char is -1?
user142019
tolower takes an int? Okay, C++ is FUBAR. Stop using it immediately.
I got this solution for tolowerwith std::string from an accepted SO answer
:(
so...I have a class which needs a certain resource, and all instances of that class should share that resource. how do I make that happen, without using a global or a factory or something that requires I call initSomething once before? :/
@Zoidberg tolower is C
user142019
@FredOverflow char may be same size as int but unsigned.
10:57
@R.MartinhoFernandes Are you telling me -1 is too large/small for int? :)
@melak47 Just use a static data member?
@FredOverflow oh no you didn't :(
@FredOverflow No, I'm telling you that it is outside the range of unsigned char.
@FredOverflow oh :D
user142019
static_assert(sizeof(char) == sizeof(int), "meh");
static_assert(std::is_unsigned<char>::value, "meh");
char c = std::numeric_limits<char>::max();
int x = c; // BOOM!
@R.MartinhoFernandes Who is talking about unsigned char?
10:59
Also beware that a C++ solution which involves std::locale("") will abort on Mac.
user142019
@FredOverflow char may be unsigned depending on the implementation.
HTML5 all the things!
My surprisingly popular “Don’t use f*cking pointers” presentation now available as HTML: http://klmr.me/slides/modern-cpp and PDF (just append “.pdf”)
Oct 25 '12 at 14:00, by R. Martinho Fernandes
@Cheers Hmm, §7.4/1 reads "The header <ctype.h> declares several functions useful for classifying and mapping characters. In all cases the argument is an int, the value of which shall be representable as an unsigned char or shall equal the value of the macro EOF. If the argument has any other value, the behavior is undefined." Why does that imply UB for anything other than ASCII?
@Zoidberg Then the problem of the unsigned char being -1 is relevant how?
The C standard.
user142019
10:59
@FredOverflow look at my example. :P
Wait, tolower is not in ctype, is it?

« first day (856 days earlier)      last day (4311 days later) »