« first day (526 days earlier)      last day (4405 days later) » 

There's no such thing as dynamic metaprogramming… that's a contradiction in terms.
 
@Insilico No, what I'm saying is that new types whose interfaces are strict subtypes of existing types isn't awesome.
 
Self-modifying code is a harsh mistress, and doesn't ultimately add expressiveness.
 
Ell
@Potatoswatter why? o.O metaprogramming is stuff like modifying classes & whatnot, adding methods etc., dynamic is doing it at runtime?
 
Isn't making "new types whose interfaces are strict subtypes of existing types" fall under the category of "making new types based on old types"?
@Ell: No, metaprogramming does not necessarily mean doing things at runtime
 
12:03 PM
If you do it at runtime, it's all part of one program. There's no separation to make it "meta."
 
C++ has template metaprogramming which is entirely a compile time mechanism.
 
except every single type that has an interface which is not an entire subset of another?
which is to say, virtually all of them?
 
Ell
@Insilico I know it doesnt - thats why I explicitly stated "dynamic"
 
@Ell Metaprogramming is writing a program that generates a program.
 
Ell
@Insilico that means runtime, right?
@Insilico dynamic metaprogramming is metaprogramming at runtime, static metaprogramming is at compile-time
is that correct?
 
12:04 PM
There is too much spam on google+
 
@CheersandhthAlf google+ is itself spam.
 
@Ell If we count making things up, then yes it's correct, because you just defined it that way :vP
 
@Ell: I've never heard of that usage.
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. The language in which the metaprogram is written is called the metalanguage. The language of the programs that are manipulated is called the object...
 
Ell
haha okay :L someone define it in the correct usage :D
 
3 mins ago, by Potatoswatter
@Ell Metaprogramming is writing a program that generates a program.
 
metaprograms == programs that operates on programs
 
Ell
@Insilico which can happen at compile time (c++) or runtime (ruby)? ...or no?
 
data are to programs as programs are to metaprograms
 
@Insilico wait does this also mean that using the preprocessor is meta programming?
 
Ell
i g2g now :L cya later
 
12:08 PM
You're arguing terminology which is loosely defined to begin with. :P
 
@Insilico Is a compiler or a decompiler per se a metaprogram? I'm not sure I like that definition.
 
When code is data the distinction between programming and metaprogramming isn't very useful.
 
@Ell :L okay :L Bye :L
 
@Potatoswatter: My understanding is that both the input and output has to be programs
The source code isn't a program
 
Source code is a form of a program.
 
12:09 PM
Then again my understanding probably isn't that great in the first place.
 
AST is another.
 
@CatPlusPlus: True, which is why my understanding is probably full of shit
 
er.. I'm still confused. Is using the preprocessor considered meta-programming?
 
In Lisp source and internal representation is pretty much the same.
Metaprogramming is more of a buzzword than anything.
 
@IntermediateHacker: The wiki page lists "X Macros" as metaprogramming
But I'm not sure otherwise
 
12:11 PM
X macros are emulation of templates.
 
I think it's "metaprogramming" when you can generate some kind of recursive structure.
 
Sortof.
 
The only time I deal with metaprogramming is C++'s template metaprogramming mechanism
 
#ifdef SOMETHING do_something() #else do_something_else() <-- meta-programming?!
 
@IntermediateHacker: I personally don't consider that metaprogramming
 
12:11 PM
Terms that don't have clear definitions are useless.
(Also Template Haskell is the best.)
 
I guess what distinguishes macros from metaprogramming is that macros aren't aware of any program structure (which is why they're evil)
 
Preprocessor metaprogramming relies on "enumerated recursion," such as only being able to count to ten. But who really needs to do anything more times than that?
 
While things like C++ TMP are in fact aware of types and program structure
 
Macros are really primitive.
Template metaprogramming, too.
You can't reify types.
 
@CatPlusPlus Template metaprogramming is primitive?
 
12:13 PM
Yes.
 
@CatPlusPlus That makes it primitive?
 
It's rather limited.
 
TMP is basically an accident, so of course it's limited
 
You have to shoehorn metaprogam into a barely functional subset of the language, with barely any useful facilities at all.
 
Limited yes, but lack of reification means it's high-level, not primitive. Depends what you mean by primitive.
 
12:14 PM
I wonder if 'Code-Reuse' is overrated.
 
TMP has been around long enough that it's no longer so much an accident, but users are expected to know the rigmarole.
 
Lack of reification limits its usefulness a lot.
 
@CatPlusPlus But what would be the reflective interface? Write a paper and maybe the next Standard edition will have it.
 
@CatPlusPlus: What would reification of types look like if C++ TMP can do it?
 
You would want something like a vector (i.e. parameter pack) of constexpr member pointers.
That uses a couple C++11 features right there.
 
12:17 PM
@Ell I learnt the basics, yes, sets, intersections, unions, how the real numbers fit into this, etc..
 
Meh, writing papers. I prefer to write code.
 
@rubenvb But your claim was that you learned most of the mathematical symbols in high school… doesn't really fit.
There are an awful lot of symbols in an awful lot of branches of math.
 
Code generation is less hassle than using TMP.
 
Sorry to interrupt your discussion, but I'm having trouble figuring out what this error might mean. i.imgur.com/zOlb3.jpg Could it be a linking problem?
 
12:18 PM
@TonyTheLion: Of course nowadays toddlers are being handed iPhones for some asinine reason
 
@Potatoswatter of course there are. I claimed to know most of them, not all. There will always be more.
 
It means what it says.
 
@TonyTheLion lol.
 
You have uncaught exception.
 
12:19 PM
The only phone I had as a kid was the phone I made myself out of a speaker, a microphone, and a hook switch with a bunch of wires
 
@CatPlusPlus Okay, I'll look into that. Thanks.
 
And it worked surprisingly well
You dialed into it by quickly tapping on the hook switch the number of times for each digit
 
I didn't have a phone until 3 years ago, simply because I never felt the need for one.
 
"The inferior stopped because it triggered an exception"
 
@Insilico Didn't those wires supply a significant amount of current? They're designed to ring the bell.
 
12:21 PM
What's "the inferior"?
 
Debugged program.
GDB terminology.
 
@Insilico The lame program that crashed. Stupid, stupid program.
 
@Potatoswatter: The hookswitch disconnected the phone when you hang up, so the phone didn't see the high voltage for the bell
 
Don't know why its creator even bothered. Gawd.
 
It wasn't designed for picking up, initially
Phone technology at the last mile can be surprisingly simple and still work
Telephone systems as a concept is quite ancient by technology standards
If they were reinvented now we would probably have Telephone Resource Locators a la URLs instead of phone numbers
 
12:26 PM
Probably not. We still use IPs for Internet packets.
 
A telephone network would probably use a circuit switched network instead a packet based network
If it didn't have to interface with TCP/IP
 
12:42 PM
but it pretty much does
 
12:59 PM
Why would Clang say error: character '%' cannot be specified by a universal character name for this code: ideone.com/DsP8w ?
because I didn't use -std=c++11 <facepalm>
 
@rubenvb I have enough trouble remembering to call clang++ and not clang
 
1:22 PM
great, I just discovered that std::wcout is horribly broken on Windows (MSVC and libstdc++ all the same)
WriteConsoleW is the stuff that works! Don't let them tell you otherwise!
 
Everything related to wchar_t is broken.
And console with the damn codepages is so painful to deal with.
 
That's not the problem, cause the Win32 API call works as it should.
Basterdz
 
cout is probably not special-cased to use WriteConsole.
 
what does it use then?
 
It's redirectable, it can't assume the other end is the console.
 
1:26 PM
well, printf can
and wprintf
they're broken too
 
They all write to stdout.
Using file stuff.
 
so
 
Isn't that just another HANDLE, like the one you pass to WriteConsole?
 
having now been awake for 23 hours, I've decided that attempting to watch the MLG finals at like, 1am tomorrow morning, is somewhat futile and I'm gonna go sleepsies now
 
I try to stay away from console I/O.
 
1:28 PM
@CatPlusPlus well, wfstream is equally broken.
 
Encode the string as UTF-8 first, then.
And use ICU and save yourself from hell.
Well, it's a different kind of hell, but it might work better.
 
lol
The library is still broken though.
There, I said it and shared it with the world:
0
A: Windows Unicode C++ Stream Output Failure

rubenvbI just tested GCC (versions 4.4 thru 4.7) and MSVC 10, which all exhibit this problem. I also tested the raw Win32 API to see if nothing else was causing the failure, and this works: #include <windows.h> int main() { HANDLE stdout = GetStdHandle(STD_OUTPUT_HANDLE); DWORD n; W...

 
1:45 PM
GU
 
I discovered that in Windows 7, accelerator keys such as [Ctrl O] for "open", do not work in menus -- which is where they are presented to the user.
I thought first it was a problem with my code, but it seems it's the ordinary Microsoft ongoing lobotomization.
How can I work around it?
 
Johannes, you mean "gays"
?
 
i don't understand this
can you please increase precision
 
About the accelerators?
 
1:54 PM
why do they not work in menus
that's GA
 
@rubenvb Note that wcout's job is to translate wide character text to narrow (single byte oriented) text. By default it translates to the configured ANSI codepage.
@JohannesSchaublitb I do not know. I think they used to work in menus in Windows XP. As it is now, in Windows 7, the bright user can learn about them in menus, and then use them outside menus (just remembering the keypresses).
 
hmm
i think they forgot about the users who nagivate through menus using the keyboard
i mean, the arrow keys still work in menus. it would be a logical consequence IMO when disabling the shortcuts to also disable arrow navigation
 
perhaps they hired some GNOME people to work on windows7
wouldnt be surprised if miguel de icaza worked for MS during the weekends
 
could explain it, maybe
 
2:02 PM
@JohannesSchaublitb What about the underlined letters, aren't those supposed to be the keyboard shortcuts to menu items?
 
yeah get rid of them too!
Menu must be renamed to Mouse
 
radial menus from whereever the mouse pointer currently is would be cool
hold down both buttons, get a splay of all the menus or something
 
our beloved middle mouse button emulation -.-
 
@CollinHockey yes, they're pie menus. can also be fairly square like, just diagonals out. that's one thing from 1970's smalltalk project, and other thing is switching between workspaces (the Windows API for it has been there since Windows 2000 I think it was, maybe NT 4.0).
i think it's about time that Windows and Mac caught up with the 1970's.
 
3d menus would be nice
where you nagivate in x direction, but where certain things nagivate in Z
 
2:11 PM
i think that would need 3d input device?
or better, just integrated directly into nervous system
like a little implant under the ear, control it with the muscles otherwise used to wiggle the ear (useless anyway)
then you can see who is online by noticing if they're wiggling their ears
good idea :-)
 
@CheersandhthAlf patent it, sell it to apple, they will make it famous
 
@CheersandhthAlf I can't wiggle my ears :-(
 
@CollinHockey then you're unfortunately network-disabled in the bright future
 
23 and I'm already obsolete - damn
 
Ell
2:47 PM
hi guys
speaking of 3d menus, has anyone seen bumptop?
 
Lightness Races in Orbit, Nottingham, United Kingdom
53.8k 6 62 133
why did he suspend his account
 
Ell
o.O
 
@JohannesSchaublitb he wrote about that in a blog posting. essentially, too many people had the Wrong Idea that SO is about helping people (as opposed to building an encyclopaedic collection of tech answers/questions), and too many people were asking homework questions or fix-my-bug-for-me questions.
I could sympathize with the latter.
 
3:06 PM
yeah
i think that SO should be about helping ppl
which is why I'm not too much of favor for the c++ faq in SO
 
hi all again :)
 
Ell
hi :)
argghh I cant grasp PDAs!
 
@CheersandhthAlf there should be a software to extract all answers of a particular user together with its question.
and put it into a software for full text search
so one could collect all answers of a good user like John. if you have a C# question, you could first search that collection
 
@JohannesSchaublitb wouldn't that be the same to a user defined search?
 
it would be offline
 
3:22 PM
@JohannesSchaublitb What's that? Another new feature?
 
with everything web-related today, what got you guys into cpp dev?
 
@jdprc06 College. I did a technical degree in CS. C++ was the first language I learned.
 
Because shoehorning everything into the web is stupid.
And web itself sucks.
 
i agree. but i'm trapped using it
 
Trapped?
 
3:30 PM
well it's hard to remake yourself as a systems/desktop programmer after you have some web experience. or at least i'm still looking for a segway
 
No, it's not.
 
3:45 PM
@CatPlusPlus would you suggest trying to contribute to some open source?
 
If you want.
 
4:01 PM
@jdprc06 I did Web development for a few months. And now I'm headed towards video games. So, no. You trap yourself in your own traps.
 
well that's good to hear. if you're 'headed towards video games', what kind of projects does your current work involve?
 
For now? Studying. But I start working in one month, and it's probably going to revolve around tools development.
 
4:17 PM
@LucDanton hmm
 
@CheersandhthAlf Does it say so in the Standard? If it does, that's a very sucky rule for wcout
 
I'm trying to raise question-mark proliferation:
2
Q: Should "questions" be questions?

Kerrek SBMore than infrequently, opening posts on SO are not questions at all, in the very grammatical sense: They're just statements or vague musings (for instance this recent one), and it's not clear what exactly is being asked (since nothing is technically being asked). I always feel that it shouldn't...

Does this sound like a stupid idea?
 
lol
0
A: Function specialization: Which is the declaration?

Johannes Schaub - litbI would like to add to the useful answer @Vaughn provided. In the template definition of test, you have a non-defining member function declaration and also a defining member function declaration. But that function definition and declaration is associated with the surrounding template test<T&g...

seems like in-line code is broken in previews
 
4:35 PM
@JohannesSchaublitb Ahh, the classic "truncate-after-escape" dilemma.
Actually, it's a monolemma, and it's fairly stupid.
 
@KerrekSB ohh i see ow
shouldn't happen too often
can it be exploited?
xD
 
@JohannesSchaublitb I don't know, but I've seen and raged about it on other, lesser websites. I was really hoping that SO would be above that sort of mistake.
You should raise a bug report!
 
ohh!
i will try out that sniper tool of windows7 to make a screeny. let's see how useful it is
 
@rubenvb yes. i was pretty disappointed when i discovered that. i think it was in 1997 or something. pj plauger wrote an article about it in ddj. as i recall
in short, since wcout can also handle char const*, there is no legitimate role for plain cout, and wcout should not have the longest name. the design simply sucks. there is cout which has no purpose, and there is not a proper wide stream with wide output...
i think they did it to accomodate the wide/narrow mode of C FILE streams
but those modes are not supported (or even much known!) in Windows, in particular not supported by Visual C++
 
0
Q: In-line code tag not properly displayed in chat preview

Johannes Schaub - litbProof of the bug: I'm sorry I have no theory as to what could be the cause.

 
4:49 PM
@JohannesSchaublitb what sniper tool? not the bundled one? that one make square gray corners...
 
"Snipper" or something
"Snipping Tool"
 
I use old free version of WinSnap
 
@CheersandhthAlf Dang, C++ really sucks...
 
Plus a tool I made to remove the gray square corners, which the old free version of WinSnap doesn't (but I believe the $$$ version does that).
I can post the exe of the corner-removal prog somewhere if you can suggest the somewhere (which better be free)?
 
4:54 PM
@rubenvb no, i don't think so. but the modern templated iostreams do. in my humble opinion. like, nowhere else do you find two-phase construction. all the names are cryptic and often nonsense shortenings. the responsibilities are unclear. the entanglement with locale handling is such that it's all very inefficient. and so on. bad.
 
what grey square corners do you refer to?
 
at the corners of a window.
which should be rounded.
 
they are round for me
 
hm
^ How your screenshot should look (or possibly with shadow)
Of course, now Firefox shows image on black background, possibly to make the Microsoft snipper result less unpalatable. One design bug to cover another. Argh.
By the way, the screen shot above shows how Microsoft's MSDN lib doc viewer is unable to find WM_CANCELMODE (an API constant) in its index. But it does find MFC OnCancelMode, which links further to the WM_CANCELMODE page. Which the viewer is then unable to find in its contents. :-) It is like that all the time for me. However, other people seldom if ever stumble over removed-documentation. Case in point: when Microsoft removed the whole HTML+time API, I was apparently the only one who noticed.
 
5:18 PM
@JohannesSchaublitb Already exists!
Hmm, seems they took out the feature where you could pick some other user.
WTF Wolfram? Now I need to be signed in to get copyable plaintext? Fucking sellouts.
2
 
@RMartinhoFernandes yeah, that is so lame
 
ok, again deleted about 50 GB of installer log files from c:\windows\temp
@RMartinhoFernandes does it work to turn off javascript?
 
@CheersandhthAlf No, because Wolfram serves images.
 
my guess is that as more companies understand that people can just turn off javascript, more and more sites will just serve images or adobe thingies
 
You need the JavaScript (and be signed in) to get the text.
Fuckers.
@CheersandhthAlf Well, such companies suddenly stop getting my good publicity.
 
5:36 PM
why make your site entirely in flash?
* you can prevent illegal copying, twarthing the PIRATES
* you can ensure that people don't use tools that hide revenue-bringing ads ( :-) )
* you can have fancy animations and other graphical effects ( yes! )
 
I don't mind that they serve pictures. It's probably the easiest way to get all the mathy things to look right everywhere. But I don't want to have yet another password just to use a frakking calculator.
 
* you ensure nobody can actually use it, especially web crawlers
 
5:52 PM
wolframalpha once was one of the coolest sites in the internet. now it suckz
 
Wth?! Why does WA suck?
 
hmm
that's WA
 
I have finally found the right combination of resistors to power my wireless mouse through USB
 
@KianMayne Because you need a password to get text out of it.
 
One of these days we'll have to learn how to use Maxima or other CAS.
 
5:53 PM
Oh, I've got a login so I've never noticed
 
It will be a sad day.
 
i thought its te google killer
 
google wants to add wolframalpha style search now, doesnt it?
 
I really only care about CAS stuff. Well, and unit conversions. But Google already does the latter.
 
5:56 PM
What's CAS?
> I'm updating my organ donor preferences to specify that no part of me may ever be put into Dick Cheney.
lol
 
i just use "inspect element" of chrome to copy out the text
no big deal
 
@RMartinhoFernandes Copy-and-swap, I think. Or compare-and-swap.
 
Google also does graphs of mathematical functions (Y)
 
@EtiennedeMartel That's what I was thinking, but it makes no sense here.
 
WA says a synonym of "penis" is "member"
 
6:00 PM
Indeed.
 
i wonder whether we shall add a tag synonym?
 
Is there really a tag for "penis"?
 
@JohannesSchaublitb Why did you ask WA for synonyms of "penis"?
 
it also states it the other way around
i can claim that i asked it for synonyms of "member" :)
you will never know
 
System.Reflection.PenisInfo would really add fun to my code.
 
6:01 PM
I already know.
 
#define penis member
Hmm … but where would you use this in code?
Ah!
#define penis .
object penis method();
 
It's not as fun as doing #define true (static_cast<bool>(rand())), though.
 
WTF is happening here?
 
Wait, no, that is member access
 
6:03 PM
(*this) penis clear();
lol
 
Damn you, @JohannesSchaublitb, now we're talking about penises.
 
"Talking about"?
 
surreal, isn’t it?
 
Not quite. You're trying to make silly code jokes that include the work "penis".
 
6:03 PM
why are you talking about them?
 
That's... weirder.
 
in C# you could say "Pen is Pencil" without looking dirty
 
@RMartinhoFernandes Quick stop! Before we go too meta!
I can't resist; now we're talking about talking about penises
 
i'm only committing textual utterances about it
 
Metapenises.
7
Does anyone here knows how a decision stump can classify two dimensional data?
(Still wondering if data mining is more interesting than penises)
 
6:09 PM
@RMartinhoFernandes Computer algebra system.
You know, all that fancy "I'll calculate derivative for you" stuff.
 
"I'll differentiate the shit out of you"
If I haven't said it yet, fuck data mining.
 
Ell
hi guys
 
6:25 PM
Hello friend
 
Ell
can anyone point to an example of a pushdown automaton? One that is simple?
 
@Ell Example implementation? Usage? If the latter, conceptual or in a concrete product?
 
Ell
@KonradRudolph example implementation - something in pseudo code maybe? I'm trying to wrap my head around this automata stuff but so far I have only been able to implement an FSM using a "Node" class connected to other nodes, as if it were just a diagram.
 
Ah. To be honest, I’ve never seen an implementation of a direct pushdown automaton (although Yacc/Bison probably uses one) … but recursive-descent parsers emulate one, the stack is just implicit in the recursion.
But several syntax highlighters implement pushdown automata
 
Ell
@KonradRudolph ahh okay - yeah I'm trying to get into the parsing/lexing scene - it has really interested me of late. I just can't grasp it quite yet!
 
6:38 PM
There's a scene?
 
Case in point: the hyperlight syntax highlighter uses a pushdown automaton; unfortunately, it’s not very cleanly implemented …
(mea culpa)
 
Everytime I ask a Haskell question I get like 10+ upvotes even if it's a stupid one.
 
Ell
@KonradRudolph thank you - I will read through it :)
 
user457812
@Pubby They're just so glad someone else uses Haskell
 
user457812
In a way, your questions validate their choice.
 
6:44 PM
@Ell To be honest, I’m not sure I’d recommend that … the implementation is very obscure … it was just the first thing that came to mind
 
@nil I think it's related to their fetish for arrows.
 
user457812
And now I feel like I should try learning haskell again just for shits and giggles
 
user457812
Considering I spent the last few days on common lisp and realized how stupid that decision was
 
I'm about to try out clisp. What's wrong with it?
 
6:46 PM
((((Nothing))))
 
parenthesis
 
Wow, you can teach optimizations to GHC.
 
Oh . right >>= (that .:: is) <* so :: hard <<= to read
 
user457812
What tony said.
 
user457812
Anything that is reasonably complex becomes instantly unreadable
 
6:48 PM
@nil Make use of newlines.
 
Prettyprint!
 
user457812
And of course the clisp style recommends you never leave a closing parenthesis alone on a line, so you're expected to bundle like 50 of them on the end of the last expression
 
Anyone look at Qi?
 
Ell
Can anyone explain: \delta is a finite subset of Q \times (\Sigma \cup\{\varepsilon\}) \times \Gamma \times Q \times \Gamma^* , the transition relation, where \Gamma^{*} denote the set of strings over \Gamma and \varepsilon denotes the empty string.
 
Lemme pass that through LaTeX first...
 
user457812
O_o
 
(I'm not doing that. I mean that you should)
Woah, I didn't know you could copy paste like that.
 
Why do you need a formal definition? Is "a variation of finite automaton that can make use of a stack containing data." not good enough?
 
Ell
@RMartinhoFernandes from wikipedia? the latex-ey stuff from images?
 
6:54 PM
2
Q: Difference in Windows Cryptography Service between VC++ 6.0 and VS 2008

Mayank swamiI have a class of encryption that was developed in Microsoft Visual C++ 6.0, and it is working properly. I migrated the code to Microsoft Visual Studio 2008, this class is working, but with a different behavior. When I pass a specific string for encryption, the encryption result generated in the...

 
Ell
@Pubby Well I don't really understand how it would be implemented and maybe the formal definition would help?
nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
argh -.- why do confirmations not wait for a second press of enter before overwriting a file? :@ facepalm
 
?
 
Ell
@Pubby I accidently saved over my old file because i pressed enter to do the save menu item but it carried on to the overwrite -.-
 
@Ell It's described in the following paragraph.
@Ell Undo?
 
Ell
@RMartinhoFernandes can't :/ I just created a new file and I was meant to append a 2 to the filename, but forgot :/
 
6:59 PM
You can't undo? What kind of braindead editor are you using?
 
Ell
gedit :L
 

« first day (526 days earlier)      last day (4405 days later) »