« first day (850 days earlier)      last day (4091 days later) » 

12:02 AM
@ThePhD You mean like D3D already does?
 
@DeadMG I'm pretty sure it doesn't do that for you anymore.
 
@ThePhD It has to check to derive the GPU program that performs the mapping.
 
There are already bindings to OpenGL, that's not a problem
I was thinking about a DSL for that
 
It only requests you create an InputLayout based on shader bytecode.
 
Can someone open flamingdangerzone.com/cxx11/2013/02/11/… and tell me if there are two comments at the bottom? My connection seems to be worse than DeadMG's right now.
 
12:05 AM
Once that bytecode is verified (for a single method), it doesn't tell you if the two shaders you've tacked together are actually meant to work together.
 
@R.MartinhoFernandes Yup
 
It'll happily fuck your data in its mouth.
 
user1357851
user image
3
 
@Telkitty Seems legit.
 
@CatPlusPlus Cool, thanks. I probably fucked up some of the other posts, but I cannot use the migration interface with this crap right now.
 
12:06 AM
@DeadMG See a question I asked here
 
user1357851
@EtiennedeMartel a good way to injure the owner and make him/her to stay at home more
 
huh
 
@R.MartinhoFernandes Yes, I'm seeing two comments (one from Rein Halbersma, then you replying).
 
so
let's all pray that DeadMG actually gets to sleep this night.
 
Ell
Our father who art in heaven, hallowed be thy name...
 
12:25 AM
while github is a website hosting opensource project is github website himself open source? (i dont think so but just ask)
 
um...
what?
 
@EtiennedeMartel You forgot: "Zoidberg mention @Mysticial doesn't know C"
 
ok :( [insert sad troll face here]
 
@tigrou ok
 
Ell
12:28 AM
@tigrou look at gitlab
 
@Ell thx
 
Did someone call me? :P
 
Yes. We need a non-expert in C, ASAP.
 
Does Java count?
 
As expertise in C? No.
 
12:31 AM
ME
:P
 
@Doorknob Doorknob loves java! :)
 
Ell
Heh don't we all
 
@Ell i love perl :)
 
So I started reading the CS143 PDFs... I understand the theory (mostly because I've seen it before) but omg I have no fucking clue how I'd implement it.
I'm fucking useless
(CS143 being a course on Compilers given at Stanford University)
 
it's absolutely amazing how much a visual studio breakpoint slows down large loops
 
user1357851
12:43 AM
speed usually is not an issue when debugging
 
@Telkitty my soap deserialization went from ~.01 seconds to about 45 seconds. It still wasn't an issue, but caught me by surprise.
I really have no idea how long it takes without a breakpoint, but It was never noticeable.
 
user1357851
debugging mode usually have a lot of debugging symbols
 
Debugging symbols are literally zero-cost to runtime
 
@Telkitty I'm not comparing debugging to not-debugging. I'm not even comparing released to attached. I'm comparing debugging with no breakpoints to debugging with a single breakpoint.
 
@MooingDuck Well stopping to hit a breakpoint usually does slow things down :v
 
12:46 AM
@CatPlusPlus breakpoint never got hit (it was conditional, if (c > 127))
 
Data breakpoint?
 
user1357851
@MooingDuck but it will be evaluated nevertheless
 
It was hit every time, but immediately resumed afterwards
 
@Telkitty well sure, but this is in SOAP deserialization, which isn't exactly trivial
@CatPlusPlus actually, that would explain the massive slowdown. That's stupid.
@CatPlusPlus why not just code replace the condition into the code directly? :(
 
Injecting code is not trivial
 
12:48 AM
@CatPlusPlus nothing in debugging is I assumed.
 
Suspending the process and examining the memory is simpler and probably safer
Well, I've never implemented a debugger or anything, but that's my thinking vOv
Hotpatching code like that requires padding that gives you very limited space
 
@CatPlusPlus if (c>127) when c is an int shouldn't take much space
 
It's a load, immediate move and conditional jump
Plus push/pop for affected registers
And that's at least two
 
I'm surprised at how my simple C# program can read, process and output about 25k lines of text in less than half a second.
 
Also x86 opcodes are variable-length
Also you need to encode addresses there too: for jump target and the variable
So yeah the size will vary greatly depending on the expression
 
user1357851
12:59 AM
@Borgleader maybe you have a really fast cpu
 
@Borgleader Why?
 
Well, it's my laptop's CPU so nothing blisteringly fast, just 2.0Ghz
@CatPlusPlus idk, usually IO is fucking slow.
 
25kB is nothing
25MB is nothing
 
And here I am reading 25k lines, parsing them and spitting out yet another 25k lines in sub half a second
 
Oh 25k lines
So how big is the file?
 
1:03 AM
The file I'm parsing is 1.629MB, the file I ouput is 1.393MB
 
The 25k lines output are all error messages?
 
Your HDD can probably do like 20MB/s if it's mechanical
A lot more if it's SSD
 
It's mechanical but 5400RPM only
 
Still fast enough
 
@Borgleader Still ~20-40MB/s. 7200s can go ~60-80MB/s or higher
 
1:05 AM
Files below 100MB are insignificantly small
Files below 1GB are small
 
http://www.bbc.co.uk/news/uk-21421477
A brown-bag meeting, presumably..
 
Ell
Mgmt are so awesome
 
It takes 7 seconds to SHA-1 a 1.6GB file on my external USB3 drive
 
Also I have a feeling if I wrote the code in C++ it would have been slower.
 
It's I/O-bound, it doesn't matter
 
user1357851
1:14 AM
@Borgleader depends how you write it
 
I find generally that without doing much optimization work C++ IO is slower than C# IO
but it could be just me being retarded
 
Unless you're comparing formatted to unformatted I/O, no
 
I'm an idiot for deciding to be like Puppy and make my own language... How the hell am I going to write my own lexer generator.
@CatPlusPlus Well I haven't done actual benchmarking, it was more of a general observation. I could be way off.
 
Benchmarking is useless
@Borgleader Don't?
Are you writing a language or a lexer generator
 
Ell
You don't need a lexer generator
You need a lexer
 
1:20 AM
@Ell Writing a lexer by hand is a pain.
 
Yes you do, just use already existing one
 
Any particular one you'd recommend?
I found this: antlr.org/index.html
 
Flex maybe
Or re2c
 
I read a post on SO that said not to use Flex because it was efficient but hard on the programmer.
 
Flex is de facto standard, you just need to get past horrible documentation and certain level of arcaneness
(Parsec still owns)
 
1:23 AM
I'll try both antlr and Flex. See which one I like best.
 
Parsec :v
 
Ell
Writing a lexer isn't a pain at all o.O
Lexers are pimps, just look at puppy's its very simple
 
@Ell Yes it is
It's a giant state machine
And there's a lot of corner cases
If you can generate this shit, you do
 
Ell
I guess it depends on the language you're lexing
 
Lexers look pretty much the same for every language
 
Ell
1:29 AM
@borgleader antlrworks is pretty awesome
Anyway I need to revise for mein chemistry :P night all :)
 
ANTLR is horrible
 
@CatPlusPlus Well there are bound to be differences.
But I guess they all have keywords, similar rules for variables names ...
 
If you have stuff like identifiers or literals then it's pretty much the same everywhere
Exact regexes might differ slightly, but unless you're going with a whole different way of parsing the source, it's boilerplate
I'm going to sleep too bye
 
rlc
Good to know I'm not the only one to dislike ANTLR
 
What's wrong with it?
 
rlc
1:34 AM
I don't like the code it generates, nor its interface
 
flex is really simple and quite powerful, as long as you don't mind the fact that it wants to own your input
i don't know why it has a bad rep. The source file is just regexen and whatever C you need.
 
rlc
I really like flex though, and the "wants to own your input" thing is right, but can be worked around
 
it can be worked around but it's a nuisance. Double NULs, pfah!
 
re2c is great.
 
Unmaintained for 4 years lol
 
1:38 AM
>4 years.
 
oh haha, he put it back:
 
rlc
Gotta put the baby to bed...
Gotta check out re2c too.. :-)
 
@Mystical Haha
 
I'm gonna try QUEX
If I get there, my language will be the shittiest one made by a Lounge member. But I will love it the most because it will be mine.
 
@Mysticial Why is he suspended?
 
1:43 AM
@MarkGarcia If you look on his rep history, he obviously was caught with sock-puppet voting.
 
@Myst Wouldn't it say "irregular voting patterns" or something like that then?
 
I assume that's the second offense. When he got suspended again, he got pissed off and put in that picture.
 
oh lol :P
 
A mod removed it. And he put it back.
 
@Borgleader The most valuable thing you'll probably get from it, is learning. If you find that satisfactory by itself, I don't see any reason to not try.
 
1:45 AM
14
Q: Suspended user can still upload an offensive profile picture using the new "Upload Picture" functionality

Robert HarveyNormally, moderator actions can't be reversed. This is especially true if a user is suspended. We generally allow people to do whatever they wish with their profiles (within reason), but profile pictures are visible on every post that someone makes, so we are more strict about them. Ergo, if a...

 
rlc
1:57 AM
@borgleader I bet I've made a shittier language than whatever you're about to hatch ;-D
 
Don't underestimate my power... to fuck up!
Welp I got QUEX to work :)
It's got a crap top of examples ready to go
I've so many ideas of things I want for this language. I've actually been thinking about it all day. =.=;
 
rlc
Writing a lexer by hand is actually pretty easy too - even an efficient one
 
@rlc, yeah, but why bother? flex is just fine, and much less thinking or debugging.
 
rlc
@rici like I said: I like flex. There's still thinking and debugging involved though
But if you want to learn about parsing (or scanning) writing a lexer by hand can be educational
More so than using a tool like flex
 
I've had to write code for a class (in Java T_T), basically it was a recursive descent parser
 
user1357851
2:12 AM
it is weird this room never got hacked ... DoS style or otherwise
 
We wrote a list of tokens and then rules and actions
@Telkitty Don't jinx it.
 
rlc
And you usually don't really need complex regexes for your tokens, so most tools are really more powerful than they need to be...
 
@rlc, depends what you want to learn about, I guess.
 
rlc
@rici true
 
The nice thing about flex is start conditions. That lets you do things like parse nestable comments and escaped strings.
which are hard or impossible to do with regexen
 
user1357851
2:14 AM
@Borgleader I am not trying to. But even some game forum which I frequent get hacked every now and then. I guess SO has a lot of bandwidth, which makes it harder to do a DoS
 
rlc
If you want to learn about parser design, writing your own lexer is not a good idea
 
really, i think the lexer is the least interesting part of language design. focus on the interesting stuff, i'd say.
and almost as true of parsing
 
user1357851
And this room certainly piss a lot of people off ... newbs usually.
 
rlc
I actually find parsing very interesting
 
Oh, I'm mainly interested in the design of the language. And if possible making a JIT Compiler à la C# for it.
 
2:16 AM
@rlc, me, too. but it's not a very important part of language design.
 
rlc
I spend a lot of time writing parsers, very little designing languages. Language design often spawns from business requirements.
 
All I have to say is: $@*&^! — Jarrod Dixon 14 secs ago
 
indeed.
 
rlc
Or are designed by committees...
 
user1357851
Grrr how to format datetime for insertion into sql database!!!
 
rlc
2:21 AM
To me, the lexer becomes interesting when there's a need for speed: I've found that badly-designed lexers tend to spend a lot of time missing the point (i.e. thinking something is one type of token rather than another)
At which time a generator gets in the way...
 
Java Java Java
 
That's certainly not true of regular expression-based lexer generators like flex, which don't make a decision about what a token is until the end.
 
PHP PHP PHP
 
The thing that can usually be sped up in a flex parser is not relexing delimiting whitespace twice. however, i've never managed to demonstrate that it is significant.
 
rlc
@rici again, I like flex :-)
 
2:28 AM
well, the same is true of re2c or any other regex-based generator
 
rlc
I've never tried re2c - gotta check it out
 
it's certainly the case that if you're parsing csv files, you can do a lot better than "match the field with a regex and then pass it to strtod if it looked like a number"
but the latter strategy is a lot faster to write and unittest; I would call anything else premature optimization unless there were a demonstration that it wasn't fast enough.
 
rlc
I work on industrial embedded devices. When I start optimizing, optimization is no longer premature - it usually means something just ain't working no more...
 
Since you both seem to know a lot more about this than I do. How suicidal is it to make JIT compiler?
 
rlc
Very, unless you know what you're doing
 
2:33 AM
use llvm
it's not suicidal; just badly documented.
 
llvm? Isn't that clang?
 
clang is built using llvm
llvm is a low-level virtual machine
which supports jit
 
hence, llvm
 
ohhhh
 
2:35 AM
you compile to llvm and then either use it to produce machine code, or use it to jit
it's still a lot of work, but a lot less than doing it by hand.
@rlc, how much parsing do you do inside an embedded industrial device? I'm just curious
 
Are you kidding me, they added a profiler for javascript but didn't add any C++11 features?
Or did I read that wrong?
 
rlc
@rici much: industrial embedded devices often communicate with each other using very structured protocols. Those protocols are basically languages that need parsing...
Also, some of those devices are scriptable
 
wouldn't it be simpler to use ASN.1? Or even google protobufs?
 
rlc
E.g. inspection systems are often scriptable
 
2:42 AM
ok
that makes sense.
 
rlc
ASN.1 is certainly used a lot
Protobufs not so much
 
i prefer asn.1
but i wouldn't write a parser for either of them. Such things exist.
 
rlc
I gotta go - early day tomorrow
 
ciao
although you probably want to start the tutorial at the beginning :)
 
Thanks :) I'll start getting some of the syntax down for the language first ^.^
No point in having a JIT compiler if there's no language to compile
 
2:49 AM
very true.
the tutorial starts with lexing and parsing :)
they do that by hand; personally, I'd use flex and bison, but only to build an AST.
 
I might try flex later if Quex doesn't work out. So far I'm liking it.
Have you tried Quex?
 
no
i've used flex for a long time, and i haven't found a reason to stop.
although i did use re2c for a few projects.
 
Well I imagine both work in a similar fashion
 
probably.
flex is everywhere. makes it easy to distribute source.
but whatever works for you.
 
any matlab gurus in here tonight?
 
2:59 AM
Wrong room :P
 
lol, I know. Matlab is so horrible there isn't even a room for it!
 
user1357851
matlab is not a language
 
neither is my instructor
 
@Telkitty I agree. I always felt like matlab was more of a glorified API made to look like a language than an actual language
I mean why else would the IDE have it's own Start Menu?
 
It is not easy to explain in chat in a few words so I created a new SO question:
http://stackoverflow.com/questions/14824681/tmp-overloading-on-callable-with-callable-parameter
 
3:04 AM
matlab has its moments. but they are short
 
I would much rather use SciPy/NumPy than Matlab tbh
 
3:26 AM
@R.MartinhoFernandes when I click your comment link it says "bad id"
 
user1357851
3:58 AM
 
Damnit I can't google it because its ++
anyway know how to make Visual Studio consider h++ files to be header files?
Same with c++ to be cpp ?
 
user1357851
why do you want to associate h++ to header files
 
Because if right now I have no syntax highlighting
Oh found it!
 
4:54 AM
Boost.Lockfree is not move aware :|
 
@R.MartinhoFernandes Hi there! Say, do you still keep constexpr enabled _ {}; around?
 
Yes.
Though I can't say I've needed it.
 
I've always strived to remove it, but the snapshots haven't been quite able to. There's this one spot that I don't know how to deal with it though.
I have a EnableIf<foo> = _, typename Result = bar<baz> situation in a function template parameter list.
If I move the EnableIf at the end, I get a hard error when bar is instantiated with wrong baz. And I can't switch it to a non-type pack because I think that's non-deducible -- at least GCC won't deduce.
 
I could make bar SFINAE-friendly of course, but it's a long metacomputation.
template<typename Functor, typename... Variants>
struct apply {
    using product_type = Invoke<cartesian_product<tuples::TupleType<Variants>...>>;
    using candidate = Invoke<meta::Bind<make_variant_over, meta::Map<bound_result_of<Functor>::template apply, product_type>>>;
    using type = Conditional<
        Bool<(tuple_size<TupleType<candidate>>::value > 1)>
        , candidate
        , TupleElement<0, TupleType<candidate>>
    >;
};
It looks 'okay' in this state imo. I'd be loathe to put the computation in a Void</* here */> in one go!
It's also a detail metacomputation, so I don't otherwise need to be SFINAE-friendly.
inb4 'static if' rant.
 
5:26 AM
I think you'll have to leave it.
 
Yeah, I won't fret over it.
 
I'm not sure about the non-deducibility, though.
 
I can try to extirpate that = _ from time to time!
In an unrelated matter, it's dawned on me that I can probably (re)use my overload resolution trait thingy to deal with the construction of variants.
Not sure if it's worth it. What would you expect the result of variant<T, U, V> v { X {} }; v.which(); to be?
 
user1357851
too many advertisements on youtube lately
 
@LucDanton No freaking idea?
Which ones are constructible?
 
5:30 AM
@R.MartinhoFernandes Or what would you want it to be? Pick some interesting T, U, V, X.
According to my unit tests, if I have variant<base, derived> v { more_derived {} }; I end up with v.which() == 0.
 
I'm pretty sure I can fix that up super easily.
 
Reflector is like 35$. Breaking the bank I know, but its worth 10x that. — StingyJack Oct 5 '11 at 16:55
hahahahaha, guess what happened one year later.
 
The price either decupled or went away.
 
Current price $368.
 
5:36 AM
Well I guess we know who's to blame now.
 
@StingyJack: Great, looks like they heard you! It's now actually 10 the price at $368 if you want the VS2012 disassembler. :/ — Sid 2 days ago
 
rofl
Man... I'm struggling with QUEX thing.
I'm getting a bunch of failure lexemes. No clue why.
 
You're making a language too?
We should run a championship.
 
=.=; Don't judge me.
 
Like, make them fight to the death?
 
5:40 AM
The amount of programmers in this lounge who are younger than me and better is too damn high.
 
room topic changed to Lounge<C++>: Are you writing a new programming language? Come take part in our Ring of Death! [c++] [c++11] [c++-faq] [no-helpdesk]
 
user1357851
 
user1357851
cheap reflector $7.84
 
user1357851
:p
 
@R.MartinhoFernandes It won't last though. I'm not as good as puppy is.
 
5:42 AM
hey guys, I think I'm missing something here
I'm compiling this with clang++:
struct Foo
{
	typedef unsigned char MemoryPage[0x1000];

	MemoryPage* pages;

	Foo() { pages = new MemoryPage[16]; }
	~Foo() { delete[] pages; }

	void* PointerToOffset(unsigned offset) const
	{
		return &(pages[offset >> 12][offset & 0xfff]);
	}

};

int main()
{
	const Foo foo;
	void* pointer = foo.PointerToOffset(1555); // ???
}
 
Screeeeeeeeeeeeeen.
 
and I get no error
 
user1357851
why not co-contribute to an open source language project?
 
user1357851
or better still co-write a smart phone OS
 
how come I'm able to get a non-const pointer to something inside my const object?
 
5:43 AM
@Telkitty I've done that before.
 
If you dereference T* const, you get a T.
If you dereference T const* const, you get a T const.
 
user1357851
@R.MartinhoFernandes Well .. what about co-write a smart phone OS? We could all be rich one day :p
 
@Telkitty Because we'll never agree on how the language should be.
 
I'm not sure why I put my best_match overload resolution trait in conversion.hpp.
 
user1357851
5:47 AM
We could co-write a smart phone OS based on Ubuntu OS that is coming out soon
 
user1357851
C/C++
 
user1357851
It would be awesome :p
 
a phone OS without all that goofy smooth scrolling, animating, battery wasting crap would be nice
 
@doug65536 Thats a dumb phone OS
you hipster
 
lol
 
user1357851
5:50 AM
that could be one of our new smart phone OS feature - battery saving mode. AKA dumb phone mode
 
axe murderer mode, it turns off the screen and disables the speaker - aka off
 
Battery saving mode sounds super innovative.
 
Robot, you were right.
Messing with unmanaged resources in a managed environment is a huge pain in the eye.
 
(Incidentally, the puppy was also right, but I'm not telling him, ha)
 
5:56 AM
@EtiennedeMartel WHat did you try to do?
Also, I watched this on youtube recently. And was wondering have you seen this movie @EtiennedeMartel youtube.com/… ?
 
@Borgleader D3D11 rendering in a WPF application.
So I got to bridge the gap between the native rendering code and the managed WPF stuff.
 
I tried that before, didn't have the patience to go through with it.
 
And now I get a crash on exit. Looks like a double delete. Almost like my finalizer gets called twice.
ILSpy'd my DLL, there is a call to SuppressFinalize
So, I don't know.
 
@EtiennedeMartel you're using runtime callable wrappers to call directx apis?
 
@doug65536 Nah, C++/CLI. Fuck that COM bullshit.
 

« first day (850 days earlier)      last day (4091 days later) »