« first day (804 days earlier)      last day (4130 days later) » 

user142019
12:00 AM
if (token is # and next token is "if") {
    if (evaluate expression == false) {
        skip till matching #endif
    }
}
 
user142019
I could also do it in the lexer.
 
the preprocessor and the parser can be intermingled
it keeps the design simple :)
 
What about elif and else
 
user142019
Skip till matching elif or else and then continue from there.
 
it's simple enough. anything that starts with a # -> process by PP. anything else -> do as usual
 
12:02 AM
You could PP separately and generate new files, but that seems kind've wasteful when you're working with C#.
 
user142019
And it would screw up diagnostics since I have to keep track of the line numbers and that's a pain.
 
user142019
I am watching somebody play RollerCoaster Tycoon using Skype and screen sharing while writing a C# implementation.
 
I'm trying to remember what to install on new PC
 
user142019
RollerCoaster Tycoon
 
Gah, moving settings, I hate moving settings
 
sbi
12:06 AM
@Zoidberg'-- I am watching a whodunnit.
 
user142019
@sbi That sounds fun.
 
@Zoidberg'-- HOLY SHIT THAT GAME WAS AMAING AND I LOVED IT
I never beat all teh parks though
 
Sync in Chrome is dumb, I want to pick settings I want to sync
 
user142019
I'll do the conditional compilation in the parser. It's teh eaziest.
 
sbi
@Zoidberg'-- I'm not sure. I never watch TV, after all. (I am watching it on the Internet, a few days later.) Actually, I only watch it because I know two of the women who play in it.
 
user142019
12:10 AM
@sbi That sounds fun.
 
user142019
A girl who was on Junior Song Festival this year was from my old high school.
 
Ell
A guy I know got one of his songs boiughttp by talk talk
 
I just threw a raw pointer
 
user142019
boiughttp?
 
Ell
For £100k
 
user142019
12:12 AM
Is that a web server?
 
Ell
Bought *
 
user142019
@DeadMG Your code is bad, you are terrible and you should feel abysmal.
 
nah
it's like printf debugging, except you have to get the object somewhere else before you can printf it
the Clang types are utterly unusable in the debugger
 
user142019
I throw 42; when I am too lazy to create a subclass of std::runtime_error.
 
user142019
Because terriclang doesn't support damn using std::runtime_error::runtime_error;.
 
sbi
12:14 AM
@Zoidberg'-- The woman who plays the commissar had two kids in the kindergarten when two of my younger my kids went there. The mother of the best friend of the victim is the mother of another child, who went into the same kindergarten with one of my older kids. That is indeed a funny accident. I don't know if they even knew about each other before they worked together on that movie.
 
Ell
Can't you just throw a runtime error?
 
user142019
@Ell When I'm going to throw a pointless exception anyway, I could save typing.
 
user142019
@sbi hehe nice. :^)
 
Ell
Fair 'nuff
 
@Zoidberg'-- Use Boost.Exception scrub
 
user142019
12:17 AM
 
Ell
Awesome show
 
user142019
@JohannesSchaub-litb FOLK METAL
 
sbi
@Zoidberg'-- It's interesting to see those to people, whom I know in everyday situations, to play those roles. How they change in those roles, and how they are the same I know.
 
hmm
apparently, when something throws an exception, "Don't break" means "Continue to the next statement as if the exception was never thrown", not "Continue with normal exception handling routines"
 
user142019
12:20 AM
private static bool IsWhiteSpace(char c) {
    return CharUnicodeInfo.GetUnicodeCategory(c) == UnicodeCategory.SpaceSeparator
        || c == 0x0009  // Horizontal tab character.
        || c == 0x000B  // Vertical tab character.
        || c == 0x000C; // Form feed character.
}
 
user142019
Is there a better way to clarify these magic numbers or are comments just fine?
 
sbi

C#

General discussions about the c# language, Squirrels | gist.gi...
Just sayin'.
 
well, presumably, at least the horizontal tab is \t.
 
Ell
Comments are fine IMHO
 
And vertical is \v and form feed is \f
 
Ell
12:22 AM
unless you had consts
 
sbi
There's also \b.
 
the question is whether \f is more readable than his code
 
sbi
Just sayin'.
 
it would still need a comment
 
user142019
I think it's fine but I could've also done something like var horizontalTab = 0x0009; and then compare to that.
 
Ell
12:24 AM
Thasts what inleamr on suggest
 
user142019
Who is inleamr?
 
Ell
Thats what I meant to suggest
 
user142019
oh :p
 
user142019
On mobile?
 
sbi
@Zoidberg'-- inlemar.com
 
Ell
12:25 AM
Yeah haha. For some reason I can't edit
.
 
user142019
@Ell nor type.
 
You're high again aren't you
 
Ell
I don't get high :P
 
Right
 
sbi
@Ell You're a lowly one?
 
user142019
12:27 AM
in C#, 29 secs ago, by Justin
@Zoidberg'-- help me
 
user142019
All I said was hello.
 
Aahahaha MD5 decrypter
I've got 1.7TB for data :v
 
user142019
What kind of data?
 
All kind of data
 
Ell
12:32 AM
I'm a lowly one indeed
2
 
aha
 
user142019
@Ell s/w/ne/ :L
 
the morsel causing the mighty Clang to choke itself is... a really simple C struct with no attributes whatsoever.
 
Ell
I'm sorry for being thick but I still don't understand the whole forward slash thing :L
 
user142019
(Hint: "s" means substitute.)
 
user142019
12:34 AM
LEARN VIM ALREADY
 
sbi
@Ell I think it's the syntax from sed.
 
user142019
s/VIM/VIM OR SED/
 
Ell
Right
S/find/replace with
 
user142019
s/with/with\//
 
user142019
Do GNU C or clang have some kind of decimal type?
 
user142019
12:38 AM
Ah _Decimal64.
 
why dafuq does Clang want to align an int to 8 bytes on x86?
 
user142019
alignas(4)
 
that won't solve anything, since I don't control the source
 
user142019
oh xd
 
user142019
> clang does not support decimal floating point types (_Decimal32 and friends) or fixed-point types (_Fract and friends); nobody has expressed interest in these features yet, so it’s hard to say when they will be implemented.
 
user142019
12:40 AM
FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUCK
 
user142019
> nobody has expressed interest
 
user142019
I JUST EXPRESSED INTEREST
 
Implement it then
Nobody else cares
 
user142019
I'll just be sneaky and never unbox decimal at runtime. :v
 
12:47 AM
dafuq are you doing with Clang?
 
user142019
Nothing, but clang is about the only implementation people ever use to compile Objective-C.
 
Because Obj-C sucks
 
sbi
8 more minutes until I know who dunnit.
Oh.
How stereotypical. It seems it was the father of one of her friends.
 
user142019
I have a case in a switch in case in a switch in a case in a switch. :D
 
user142019
I should write this part in F#.
 
12:59 AM
jumping around with goto from one case to others must be fun then
 
user142019
I don't do that. :P
 
user142019
I need to lex either <, << or <<=.
 
user142019
So I have 100 lines of nested switches.
 
user142019
xD
 
sbi
@Zoidberg'-- Only villains do that.
 
user142019
1:02 AM
But it works and I never have to touch this code ever again.
 
user142019
@sbi lol
 
user142019
Let's see if Visual Studio Express supports F#. Probably not.
 
sbi
Is there a VS Express now? Last time I looked, they had VC++E, VC#E, etc., but no overall product.
 
user142019
Well
 
sbi
"A well is a hole in the ground."
 
user142019
1:06 AM
Visual Studio Express 2012 for Windows Desktop and Visual Studio Express 2012 for Mobile and Visual Studio Express 2012 for Web.
 
user142019
Dammit not even F# syntax highlighting. Let's see if I can fix this.
 
user142019
Oh there is free F# support but you have to install it manually.
 
user142019
Worth a try.
 
sbi
@sehe Wow. "...dueling game where your weapon is a giant cock" & "Box contains 2 GIANT inflatable cocks"? In what dark corners did you find that one?
 
user142019
> Get F# Tools for Visual Studio Express 2012 for Web
 
user142019
1:09 AM
Dammit I want the Windows Desktop version not the Web version stupid Microsoft.
 
sbi
@sehe That's just one more step towards making almost unreadable C++ totally unreadable. (Really, I like the idea, but the syntax, with all those braces, brackets, and parentheses, is nigh impossible to teach to sane people.)
 
user142019
> We don't have plans to release free F# tools for the Desktop Express or Win 8 Express products.
 
user142019
T________________________________________T
 
sbi
@Ell IIRC, that's one hell of a step you made since you first appeared here. (I am truly sorry should I confuse you here with someone else.)
 
user142019
Well Microsoft, if you don't provide those tools I'll need to pirate Visual Studio non-express.
 
sbi
1:13 AM
@Zoidberg'-- Really, innit stupid? If they don't give away everything for free, you are certainly morally excuse... oh, what am I saying? — morally obliged! ...to pirate their stuff. It's not as if people live off their sales, after all. (Sorry, @James, you don't count.)
 
How long is the trial for VS? It used to be 90 days I think
 
"If you don't give it to me, I'll take it myself". Sounds like extortion. Or something.
 
sbi
@Borgleader We call him The Romaniac. Fits, IYAM.
 
Extortion.
 
@sbi Oh gawd, you're replying to week old messages again.
 
sbi
1:14 AM
@R.MartinhoFernandes He might, actually. What did he say?
@R.MartinhoFernandes Is this illegal here?
 
@sbi rofl
Were you catching up on unread chat logs or reading old starboard entries?
 
sbi
@Borgleader I once called him that when talking to Scott (who has actually worked with Andrei), and he didn't even raise an eyebrow, so I think he considered it appropriate. :)
 
Also, I might be slightly drunk.
Had a nice dinner followed by "some" drinks with my old friends tonight.
 
sbi
@Borgleader I have my ways of finding things, but I won't reveal them.
 
@sbi Hahaha (Yeah I'm reading Andrei's book and he mentioned he worked a lot with Scott)
 
sbi
1:17 AM
@R.MartinhoFernandes That would be a state I had never seen you in. Here, you either were sober, or totally drunk.
@Borgleader Which book would that be? MC++D?
 
MC++D yes
 
sbi
@R.MartinhoFernandes If you need character names in some specific language, I suggest reading books and plays native to that language. That usually provides lots of character names.
 
user142019
Or you know
 
user142019
I could just invoke the F# compiler directly.
 
1:19 AM
@sbi We did not have a meeting yet since then. I am collecting various alternatives to discuss in the next meeting.
 
sbi
@Borgleader A great book. Parts of it haven't aged well, but others are timeless classics.
 
@sbi Which parts?
 
sbi
@R.MartinhoFernandes Make sure you explain well why you need it, and how it would simplify your work. He's aware of the costs of translations.
 
@sbi Erm, it's something we need for our product. It's either finding an existing list or paying someone to do it.
No need to explain anything.
@Borgleader Type lists are one.
 
sbi
@Borgleader Singletons, for example. IIRC, he dedicates a whole chapter to it. A waste of time, from today's POV.
 
1:22 AM
I haven't read either of these yet, but I'll take them with a grain of salt.
 
sbi
@R.MartinhoFernandes What? Typelists are great. I am still juggling with them!
 
I quite like the idea of Policies :)
 
@sbi But... but... variadic templates!
 
sbi
@Borgleader I remember once needing to create class hierarchies where I would need to specify. at compile time, lists of classes from which to derive. I remembered he did that, and cooked up my own tools for it. That was great stuff!
@R.MartinhoFernandes Look at that settings engine I created. I am sure W. uses that in his code. Try to do that with variadic templates.
 
I don't see why not.
 
sbi
1:25 AM
You need glasses.
 
user142019
Or you know.
 
user142019
I could just use Visual Studio Express 2012 for Web. :P
 
user142019
It compiles console projects just fine.
 
looks like there's a bug in phoenix...
 
@sbi No, I don't. I am sure that with these eleven lines of code I can do everything you do with your old school typelists.
And I don't need to do everything that way because some things become easier.
 
sbi
1:34 AM
@R.MartinhoFernandes I am not sure what your point is, then. Yes, the syntax is different, and you don't need a nil type. But other than that, where's the difference?
 
What are you using type lists for
 
@sbi I don't need recursion for many tasks. Need to inherit from all types in a list? template <typename... T> struct inherit_all : T... {};.
 
sbi
@R.MartinhoFernandes Ah, that. Yeah, it's indeed nice syntactic sugar.
 
(Make it : wrapper<T>... {}; if you need to allow fundamental types)
 
user142019
Hurray mixing C# and F# works.
 
sbi
1:38 AM
@CatPlusPlus Um. I used to use them for many things. For example, I have some traits that give you the specifics of a function type. One of them is a list of the argument types.
 
@sbi You should read my tuple series ;)
 
sbi
@R.MartinhoFernandes I do understand that tuples benefit a lot from variadic templates. But we used to have tuples before that, so it's nothing groundbreaking, really. It's just a (nice) coating of syntactic sugar, that makes the code more digestible.
 
Well, "Try to do that with variadic templates." seems to imply it isn't as easy.
 
sbi
@R.MartinhoFernandes You haven't even looked at the code I pointed you at. So how would you know?
 
How do you know I haven't?
 
1:42 AM
I told him
 
sbi
@R.MartinhoFernandes Because your counter-examples didn't show anything.
@JohannesSchaub-litb You wish.
:)
 
hey, it looks like you're writing a letter! can i help?
 
Oh noes, Alf is possessed by Clippy.
 
sbi
Yeah. Can you help us writing the letter A?
 
Α
^ Greek
 
1:46 AM
@sbi You expect me to rewrite all that to show you how easier it is?
 
sbi
@R.MartinhoFernandes No. I expected a proof of concept.
 
Well, I showed how you can get type lists that provide both head/tail and variadic sugar. I can pick whichever is easier for each and every task.
 
robot
would you aid me briefly?
 
sbi
@R.MartinhoFernandes So you showed me how I can get type lists using variadic templates to proof that type lists are outdated? You are indeed drunk.
 
@DeadMG What about?
@sbi No. The typelist implementation in Alexandrescu's book is.
 
1:48 AM
I have this destructor definition
and Clang insists that it has a return type and this is illegal.
but it looks perfectly fine to me
 
sbi
@R.MartinhoFernandes Only their syntax is.
 
the cons based type lists approach is outdated
 
@sbi You rarely ever need to use head/tail for anything. It's not just syntax.
 
today we have a flat list structure
 
@DeadMG double underscore = reserved
 
1:50 AM
@DeadMG What return type does it insist upon?
 
@Cheersandhth.-Alf I know, it's from a libstdc++ header for MinGW
 
@R.MartinhoFernandes It doesn't say.
 
ok, then that also explains the underscore followed by uppercase :-)
 
1:51 AM
path: error: destructor cannot have a return type
    __numpunct_cache<_CharT>::~__numpunct_cache()
                              ^
 
@R.MartinhoFernandes plz forgive for having done the head and tail thing in stackoverflow.com/a/275295/34509
 
hmm
the class was defined right above and it clearly (correctly) ends in a semicolon
 
@DeadMG But clang error messages are supposed to be soooooo very awesomely understandable!
 
perhaps I'll just move the destructor definition inline
that shouldn't have any semantic changes... right?
 
sbi
1:52 AM
@R.MartinhoFernandes "Type lists are outdated! You don't need them anymore! Here's how you do them with variadic templates! See the difference? No head/tail anymore! No, it's not just syntax!"
You, boy, are indeed drunk.
 
@DeadMG depends...
 
@sbi They are outdated.
typelists are to variadic templates what one-shot functors are to lambdas.
 
but I think it is "ill-formed; no diagnostic required"
struct A { ~A() {} int A; };
// ^^ illformed but NDR
however this requires a diagnostic:
A::~A() { }
 
@sbi Alexandrescu's chapter on type lists did not age well.
 
most probably, the first one compiles, and the second one does not. but destructor lookup is ugly
 
1:54 AM
right
must be some bug in Clang as inlining the destructor went fine
now all I have to do is finally fix the EmitEveryDeclaration code
then I might start to get somewhere
 
and if it is LLVM based you can convert it to javascript with emscripten! xd
 
oh yeah
and then I still have to work out how to link my code to libstdc++
 
haha, I'm sure that will be fun.
 
user142019
-stdlib=libstdc++
 
@Zoidberg'-- Only if you have a libstdc++ where Clang can find it.
 
user142019
1:58 AM
lol
 
hmm
the Clang code generator really hates emitting every declaration
 
Inflatable what.
 
user142019
Inflatable cock.
 
giant inflatable cock.
get your facts straight
 
you are so wrong
 
sbi
2:02 AM
"Get your fucks straight."
 
it's TWO cocks!
 
lol
 
Well, "inflatable what fighting".
Inflatable cocks per se are not that surprising.
 
sbi
Spoken like a true man.
 
Not sure what that means.
 
user142019
2:05 AM
Hmm.
 
user142019
I'll have to parse Mach-O files in C#.
 
sbi
@R.MartinhoFernandes It means that, while you are not a true man, at least you speak like one.
 
Ice burn
 
note to self
 
2:07 AM
... don't piss on people's shoes.
 
user142019
Awesome clang-sharp supports LINQ.
 
if you change the behaviour of a flag, and wish to know if the new behaviour works, try actually turning the flag on.
also, it would be really swell if VS did not crash whilst debugging.
 
But the VS debugger is awesome!
 
the VS2012 debugger, it seems, is markedly less reliable than it's prior iteration
but then arguably, I never tried to use it to debug anything as complex as Clang
ah, whatever, it's time for bed
night
 
Good night.
 
sbi
2:15 AM
@R.MartinhoFernandes You think so because you are used to GDB, right? Actually, VS' debugger is Ok-ish, and GDB is just plain awful.
Oh yeah, I should go to bed, too. Good night!
 
@sbi Actually, I can't really say I am used to GDB. I don't use the thing that often.
 
But in GDB you can type thr a a bt full (Print the full back trace (with local variables and their values per frame) for all threads.)
 
Less than once a week probably.
@StackedCrooked I am not sure what you are trying to say, but abbreviations are optional.
 
Welp Chrome doesn't sync extension settings
 
GDB has many commands but I want a way to combine the output of several commands and layout the result in a format that is easy to read.
Which probably requires tooling in top of GDB.
 
2:35 AM
And I don't know how to inspect the contents of a std::set with GDB. (Debug printing ftw.)
I've been doing some Project Euler problems this night. I find them not difficult, but the amount that I can solve in one evening is very limited. It's like I only have a limited quantity of problem solving ability per day.
 
And Steam doesn't sync categories
Great
 
user142019
user image
4
 
3:04 AM
Holy crap.
 
user142019
Fuck.
 
user142019
I need to think of a solution.
 
user142019
Objective-C has no GC so how should I solve cycles in generated code.
 
If you only do refcounting, you can't.
 
user142019
dammit xD
 
3:09 AM
Does the "automatic refcouting" feature deal with cycles?
 
user142019
No you have to do that yourself.
 
user142019
You mark things strong or weak.
 
user142019
I am going to use ARC anyway since ARC is exception-safe.
 
user142019
The .NET garbage collector can absolutely handle circular references. The very high level view of how the garbage collector works is ...

Start with locals, statics and GC pinned objects. None of these can be collected
Mark every object which can be reached by traversing the children of these objects
Collect every object which is not marked.
 
user142019
Hmm.
 
user142019
3:15 AM
Maybe I can look at retain counts of objects.
 
.NET uses generational GC, not refcounting
You can't do anything about cycles with plain refcounting
Except sit in a corner and cry
 
user142019
I may be able to use a GC.
 
user142019
I'd need to keep track of all objects created and that's possible by replacing +[NSObject allocWithZone:] with a custom implementation.
 
user142019
Then I can use reflection to find all strong properties.
 
user142019
Problem is.
 
user142019
3:26 AM
That will probably fuck up Foundation and UIKit since those may do memory management differently. xD
 
user142019
For example NSArray and NSDictionary.
 
user142019
Wait I know what I can do.
 
user142019
Simply avoid NSObject.
 
user142019
Custom base class that maps to object, which has an alloc function.
 
user142019
Objective-C APIs will call allocWithZone: and C# APIs will call my custom alloc method.
 
user142019
3:35 AM
Objects allocated with my alloc method are GC'd, other objects are refcounted using ARC.
 
4:35 AM
holy fucking shit, I'm so sick
 
4:53 AM
@CatPlusPlus Doesn't Python do something about it?
 
5:10 AM
@DeadMG You ate one too many medium-sized cookies?
I'm not judgin, just archivin.
 
I think it was probably chocolates
that my parents got me for Christmas
 
5:27 AM
So. Today fell 45 cm of snow. Not bad.
 
Today there's 0.5 cm of water on my balcony due to rain.
Fuck you.
Fuck Belgian weather.
Fuck everything.
I want snow.
 
You don't want it.
Not when there's that much.
Because then there's wind.
 
I want snow :(
I like wind.
 
And do you know what wind does? It shoves all that snow in the air. And now you don't see a damn thing.
 
It's better than being soaked by rain.
I think..
 
5:38 AM
Then, sometime it gets warmer, so that snow melts a bit. Then it gets colder, so you get glaze. Glaze fucking everywhere.
 
That reminds me of our French teacher in second grade. She fell on her butt due to glaze lol.
 
In Sherbrooke, the whole city is built on a fucking slope. And they don't use nearly enough sand, salt or gravel on the sidewalks. So you get a fucking icy slope.
 
That's sucks if you're riding a bike.
Here in Belgium bicycles are very common. Don't know about where you live.
But if the road is icy, the bicycle riders are all falling.
 
Yeah, around here bikes are also common. There's even people who keep using it in the winter. I know a guy who was on a bike today. With all that snow blowing around.
Let's say he had lots of fun.
 
5:46 AM
 
WTF is going on in India man.
 
Alright.
 
:^( ISP@cafe today killing me - 400ms ping to 8.8.8.8 - can't code with so much lag
ssh timed out
 
6:02 AM
@EtiennedeMartel boostedboards.com Nice.
 
user50049
Programming, motherf***er. DO YOU SPEAK IT? http://programming-motherfucker.com/
 
@TimPost Yeah, I like that manifesto.
 
user50049
Yeah, it validated years of anger and frustration for me :)
 
It's what happens when you have too much management and not enough programming.
 
It looks like those boosted boards are free today.
 
user50049
6:09 AM
There are people that talk about getting shit done, and then there are people that get shit done. This is the difference between management and being actually useful to society in some way.
3
 
Oh, just kidding.
 
6:34 AM
@TimPost Well, you do need some management. But sometimes I get the feeling that some people manage for management's sake. Like they're trying to justify their salary or something.
 
whew - 20ms ping - much better
 
@sehe Did you seriously stole what could have been my stars?
I'm surprised by how little I care.
 
man, I attempted to go to bed
this was a bad idea
 
7:02 AM
boost::spirit error messages are almost impossible to decipher, but when this stuff works, it really saves a lot of coding/time... ...leaves room to experiment with the syntax/grammar
 
user50049
7:52 AM
Cordless Mouse [n]: A case for dead batteries
 
8:33 AM
@TimPost managers usually were programmers first. And as skillful as we are at coding, sometimes social skills are necessary
 
8:46 AM
mgmt also may not be as easy as it looks - you get pressure from above and below - also, depending on your coworkers and your relationships with them, it may be easier to code it yourself than to motivate peons to code it (but that's not your job, usually, as a manager)...
 
bs1 = bs1 = bs1; WATBartek Banachewicz 19 secs ago
I'm still amazed how much of total stupidity people can put into a BST. I'd rename it to BullShit Tree
 

« first day (804 days earlier)      last day (4130 days later) »