« first day (586 days earlier)      last day (4359 days later) » 

7:00 AM
Or a Java programmer, perl, C#, ....
 
@sehe C64 basic used % as a name suffix for integers (but practically nobody used it). Is that also standard?
@sehe Well, they all derive from C, so...
 
It's been a long time, but I was pretty sure that x=y=0; on the BASICs I used assigned 0 to both x and y. For what it's worth there was an ANSI standard for BASIC (a couple of them, if memory serves). Pretty sure there was an ISO standard too...
 
Meh. I hope you didn't want to imply that all these BASIC also derived from BASIC on C64
 
@sehe What? No. By the way, the C64 BASIC was built by Microsoft :)
 
@FredOverflow Not sure if it was standard, but was definitely common to most of MS's BASIC implementations (and those trying to be compatible, which was pretty much all of them on microcomputers).
@FredOverflow They all derived from the original BASIC for the Altair.
 
7:03 AM
@FredOverflow To clarify: I was jabbing at sloppy references. Languages being derived from C doesn't actually mean much (at the very least it doesn't imply that assignments are expressions).
 
Oh, I remember the choice I had when I wanted to conditionally go to a certain line:
IF (WHATEVER) THEN GOTO 42
IF (WHATEVER) GOTO 42
IF (WHATEVER) THEN 42
lol, especially the third line
 
Dartmouth BASIC is the original version of the BASIC programming language. It is so named because it was designed and implemented at Dartmouth College. The language was designed by John Kemeny and Thomas Kurtz as part of the Dartmouth Time Sharing System (DTSS) and was one of the first programming languages intended to be used interactively. Several versions were produced at Dartmouth over the years, all implemented as compilers, unlike many of the versions of the language implemented elsewhere, which were interpreters. The first compiler was produced before the time-sharing system was...
 
@sehe So what C derived language does not treat assignments as expressions?
 
Everyone knows Darth Maul developed the original version of the BASIC programming language, Darthmaul BASIC.
http://en.wikipedia.org/wiki/Darth_Maul
 
@FredOverflow Fortran was still (much) worse. Anybody who never wrote any care to guess what if x - 20 then 100, 200, 100 would have meant (though I probably have the syntax a little wrong).
 
7:05 AM
@FredOverflow I don't know. The point is there is no (useful) notion of 'derived from C', so naming more languages isn't redundant
 
"Derived from C" seems to be thrown quite a bit around, it needs to be properly qualified before someone can use it as an argument.
 
@DomagojPandža :)
 
@sehe I would say a language that has semicolons and braces and int i = 42; variable syntax and void foo() { ... } function syntax is pretty much derived from C.
 
@FredOverflow I would say that is all fine and dandy but it doesn't tell me zilch about assignment being expressions or statements.
 
Well, I think that all those languages also treat assignments as expressions, but whatever.
 
7:08 AM
@FredOverflow That is actually a pretty useful practical definition of 'derived from C'.
@FredOverflow You may be right. But whatever :) I just precised the "except if you're a C programmer." which clearly doesn't cover the audience
 
@sehe Thank you. But yeah, whatever :)
 
Well, it's after 1:00 AM here, so I think I'd better go get some sleep or something...
 
It's 8 hours later in Germany. Gotta take a shower soon.
 
Good morning, good afternoon or good night, as the case may be...
 
@sehe Oh, I see. I stand corrected.
 
7:10 AM
@JerryCoffin Good night. And by the way, your SO avatar is more than disturbing.
 
@DomagojPandža It's just an insect, isn't it?
 
@FredOverflow I see, you just didn't see what I was on about :) Communication is hard. I'm sorry.
afk
 
@RMartinhoFernandes I'll merge default into it on releases.
 
@FredOverflow I despise all black-yellow hairy insects which implement a flight interface with a nature-given gyro and kamikaze abilities, regardless of size.
 
@DomagojPandža Have you ever been stung badly by an insect?
 
7:18 AM
Insects are as evil as spiders.
@StackedCrooked: I don't get it.
 
Multiple times. Honeybees (female) actually die after they sting you. I don't understand, why would they do that? Shouldn't the primary instinct that drives all non-sentient creatures be self preservation. I never provoked, so there shouldn't have been a reason for it to sting me and die afterwards.
Insects are worse than spiders. Spiders are predictable, they move in a 2D plane at all times, only the normal changes. Flying bastards are full 3D.
 
Insects are stopped by windows. Spiders manage to get in regardless.
 
Sometimes, they are stopped by windows from your side (had one yesterday). I thought it was just a fly, got a roll of paper, ready to assault... And boom, a wasp. I decided to let it live in return for my life.
But, above all, hornets freak me out. They look so damn alien.
 
morning all
 
'morning!
Meet the tarantula hawk. Such a cute insect.
 
@thecoshman Doubt anyone can beat this: youtube.com/watch?v=LdjY6oy4Y2c
 
@DomagojPandža I bow to your video wonders
 
But, your link forces me to change the terms: any living creature*.
Though, it would've been better if it had been a Wookiee.
 
@JohannesSchaublitb it's beyond all recognition
this is just mean, 10k views, and only three up boats? linky mc linkinson
 
Lazy people, as usual. :D
 
7:57 AM
I assume I can thank you for that up boat :P
 
You assume correctly, consider it a reward for the dogchild hybrid. :P
It won't help me sleep, but it sure is entertaining!
 
what on earth is you avatar a picture of?
 
user457812
Looks like fire ants crawling into someone's eyes.
 
@thecoshman A bit of my favorite presentation on C++ by one Mr. Mike Acton: macton.smugmug.com/gallery/…
(perspective of a game engine developer / R&D high-performance dude who doesn't like LHSs)
 
> Typical C++ Bullshit
I like :D
will have to look over that later
 
8:10 AM
Hardcore OO C++ guys might not like it, it propagates a more data-oriented design... Minimizing unnecessary load-hit-stores, organizing data in a way it can be efficiently processed, not missing cache lines and many other performance dampeners imposed by bloated OO design.
When you have hundreds of thousands of triangles on-screen, many possible interactions... Every cycle counts. :D
 
@DomagojPandža you do know that putting it in a class is absolutely free, right?
 
Yes, of course. Object oriented design is brilliant, I love it. But there is some bloat to it. And many such cases are illustrated in the given presentation and also more can be found in some of DICE's publications, I think it's called Data-oriented design
 
do you mean things like a structure of arrays rather than arrays of structures?
 
Yes, that's one of the things (which are more or less commonly known), there's a lot of more arguments presented. It's a good read, many good points.
 
I hate DICE, they stole the name I used for my game dev stuff, thuough I always used it as DiCE
 
8:17 AM
But they key point is to take even though OO is involved, it's more appeasing to how the underlying architecture likes it, rather than the sense of objects as we conceptualize them. Not really too much of a chat topic on an early morning.
 
@DomagojPandža The presentation only shows micro-optimizations (disclaimer: only half way through) which are silly
I would know, I wrote an N-body simulation which went up to 100k on the CPU
 
On the PS3, these micro-optimizations and following through adds up quite a bit. But if one considers data optimization, I'd defer back to DICE's publication and use Frostbite 2 as a reference point. I'd offer my engine as an example, but it is not quite ready for the public yet.
 
the PS3 is hardly "general" C++
it's ancient hardware with a terrible architecture
 
@DomagojPandža The thing is, if this is code that takes up 90% of your computation time, yes, micro optimizations may help.
 
@KillianDS No. may help. Big difference
 
8:22 AM
also, the guy appears to believe that compiler optimizations do not exist
 
In most cases you want something that works and is understandable to read, even if it isn't cache or branch optimal.
 
which they most definitely do
the special case of "My compiler is a fucking moron" is not one I'm concerned with
 
@sehe corrected :p
 
Functional is the bestest anyway.
Why write a function for many things if you can write a function for one thing and then map it over a collection.
Testability!
 
@DeadMG Couldn't agree with you more, but it still is one of the two leading game consoles on the planet, driving sales for game companies. And care must be taken that customers like what they see. The brutal truth is that they don't care about its age, architecture, they just feel entitled over the promise of not changing hardware every 6 months and "getting the same".
 
8:24 AM
Consoles suck.
 
Maybe so, but people buy them. And if you want to eat, you have to satisfy the people.
 
@DomagojPandža Very true. But don't pretend that when you're optimizing an engine on the PS3, then don't pretend like it's a general case. It's not.
not to mention that the code was provided in isolation and the presenter has no idea if it's an actual bottleneck or not.
 
I believe it was more of a joke, nitpicking. That's why I liked in the first place. I like low level stuff, grinding on things that a smart compiler does for you. But data-oriented design is a very good approach, it's simply the difference between CPU and memory advancement over the years and it simply requires it in a certain way to make the most of it. The CPUs must work on something, waiting on lousy modeled data in memory is a waste of potential.
 
Also, what's the bs about "where there's one there is more than one"? that has nothing to do with function design, you could perfectly map such a function on a whole set, it will still take one argument.
 
@KillianDS Vector extensions like SSE can do multiple planes in one go.
 
8:30 AM
oh god SSE... That is one of the few things I have tried (and given up on) multiple times..
 
@DeadMG true, but shouldn't you leave that as a compiler loop optimization?
 
yeah, that presentation is just some guy having a rant
 
Yup, you can SSE in action within id Tech 4, perhaps study how you can incorporate it.
 
@KillianDS Compilers and SSE don't really mix that well together yet.
 
he is probably picking up on some good things to improve, but it is lost to his idiotic ranting
 
8:31 AM
at least, in terms of automatic vectorization
 
yes and no; I actually have seem a pretty serious improvement giving up trying to do it myself and tacking on -msse2 to the gcc flags..
 
@DeadMG Even then, the rant should be "write this function for vector optimization/SSE", not "one instance arguments are silly"
 
@KillianDS Very true. I don't even know if the Cell offers SSE-style instructions.
the important thing is, as always, I am right.
 
Well, it's a bit logical given the architecture of Cell, one primary and multiple secondary units for data-oriented processing. But yes, you're right. This time.
 
The only good thing I can see about consoles is that if you buy a game for a console, you know it will run. No need to worry about hardware specs. A bit of a moot point for those people who can afford a powerful modern PC
 
8:43 AM
it's simply not efficient
if I were to have a console, I'd need a PC anyway, I mean, you can't code on a 360 or PS3
 
I love how everyone is like "optimization is evil". And then we keep asking, "how can I use SSE to make this faster"... lol
 
@Mysticial No, premature optimization is evil, and pretending that non-premature optimization for your engine is non-premature for everybody is stupid
 
Nah, I've got plenty of friends (now at MS) who take a very clear cut approach on optimization is evil. lol
 
@DeadMG Do what you can the first time. Do more during the second pass. And even more the third. Until you can do no more. Be it the limit of your current abilities, lack of sleep or the hardware limit. =)
 
@DomagojPandža If you need to do it at all. And if you do, then only do it where you need to.
 
8:47 AM
Optimisation is a waste of time unless you have empirical evidence that you have a bottle neck
 
True, but if you know what the given architecture likes and it doesn't really cost you time, it doesn't hurt to put it in. 16 ms is a small timeframe, every little bit helps. And if you are anything like me, you don't let things go to waste.
It's fun to contemplate how it will generate all the low level stuff, how it will optimize. I don't know, perhaps a personal preference. I like to ponder over such things. Makes me happy.
 
What would you rather, a really fast nothing, or a slow something?
 
@DomagojPandža Yes, it does hurt to put it in. You could have spent that time fixing bugs, say. And every little bit helps about 0.001%- an irrelevant amount. 16ms is a huge timeframe in terms of 2GHz.
my i7 can push like, 200 gigaflops or something like that, and in those terms, 16ms is plenty of time.
 
I'm just glad to see you talking in time per frame rather than frames per second
 
The best thing on optimization is that you know how to do it the next time better :D
 
8:53 AM
@omercan1993 not really. It's being able to find exactly where you need to optimise
 
hey, i'm porting the geometry parser of imagemagick, but could anyone explain what's happening here: http://trac.imagemagick.org/browser/ImageMagick/branches/ImageMagick-6.7.5/magick/geometry.c#L191
how does it 'move forward' in *p?
 
I'm not talking about simple Gouraud shading, I'm talking about cascaded LPVs for analyzing global illumination in a scene, AOV (geom. intense) for ambient occlusion, procedural shader generation, realtime local reflections in screenspace. And if you see something that you can optimize without thinking too much about it, you do it.
 
Or rather, knowing how to write your code so that it can be better optimized later.
 
What Mystical said also works. But if you see something right off the bat, why the hell not?
Is someone going to die?
 
no, but you might miss an opportunity to fix an important bug
software engineer time is more valuable than processor time, in the general case
and your optimized version might not be as correct as the original implementation to boot
 
8:56 AM
@DomagojPandža I meant in a generic way. Such as inserting tunable threshold constants and preprocessors that switch between code-paths. The point is so that they can be tuned later.
 
I am three rep away from 10k
 
In other words, you know you will be doing optimizations, but aren't able to do them now. So you write with enough room and flexibility early on.
 
I believe he means "write code that doesn't suck the first time, so you don't have to rewrite terrible code later when it's horribly slow"
 
that's exactly why optimisation should be left till you have a problem. Write good code that any one in the team can follow. Clear sensible code.
 
As I understand it, for every minute an average programmer puts into coding, he spends 3 minutes debugging it.
 
9:01 AM
which is why it needs to written as cleanly as possible. stupid things like bit shifts for division/multiplication slow down some one understanding the code
 
In rendering, sensible code needs to be qualified. The most obvious, sometimes even physically-based implementation is not the right approach. Sometimes you'll see something that can be shifted and approximated. A new technique can often be cryptic to anyone but the guy who implemented, until he explains the logic he followed and/or writes a paper that describes this approximation for others to grasp it. Try interpreting SSS without reading the paper in a production implementation.
 
If you don't mind the mess, I've got several millions of lines of assembly waiting to be debugged. Would you mind taking a look at it for me?
 
@thecoshman That's not what I mean. There are some tricks that can be done to make code more amenable to optimization later on.
 
@Neil what's the pay :P
@Mysticial such as? (genuine curiosity)
 
@thecoshman A small cut of my salary and a free coffee at the coffee machine. ;)
 
9:05 AM
@Neil will you pay for flights to your coffee machine?
 
@thecoshman No. You'll have to pay for that.
 
@thecoshman I need to check out from my hotel in about 30 min. I'll answer that when I get back to fast internet. But part of it involves setting up tunable parameters (such as block sizes, algorithm thresholds). For example, using a tunable threshold for switching between quick-sort and insertion sort.
 
@Mysticial I feel dirty reading that.
The closest I come to such optimization is inserting the initial array capacity when I know it needs to hold a minimum number of items.
 
It's so nice to be around people with brains. Too bad it's an online chat room.
 
@Mysticial oh, you mean things like render distance
 
9:09 AM
Mmm. I suspect the presence of brains in most people I meet. Just the degree to which they are used to applying them varies wildly
 
@thecoshman That's just a tiny portion of it. It gets dirty when you start to "preemptively" program for all SIMD vector sizes at once.
anyways, I'm off
 
@Mysticial If you have to put a word in quotation marks like "preemptively", I'm going to have to assume it's complicated by definition.
 
I'm going to hate myself for asking, but does anyone have any reasonable documentation on how to actually use SIMD (specifically 2x double or 4x double) under C?
 
might as well ask me for PHP
 
under Sea?
 
9:18 AM
Well, my dear coprocrastinators, talking about code is nice, but there comes that part of the work day when you actually have to write it. DeadMG and the rest of the bunch who cherish rendering architecture design to some extent, very nice to meet you! I hope you all have a pleasant day, happy coding!
 
sbi
@Xeo I do need something to base them on, though. And the way he is whinges indicates a male dog.
@RMartinhoFernandes Y U NO AdBlock?
 
@DomagojPandža Have fun
 
@CatPlusPlus And why isn't there a release yet? Get cracking, dammit.
 
(I know it wasn't asked from me, but CNR:) Because ad blockers are for wimps. And they subvert the monetizing scheme of the web. Soon enough, the web will be pay-per-view :)
My approach is: fight tracking cookies, don't use evil services (FB) and just don't click
 
sbi
@RMartinhoFernandes To be precise, C++ compilers are far beyond merely being females. They are totally lunatic, antsy, nervous, bitchy, pedantic, pesky bitches.
 
9:23 AM
Fishing for stars now?
 
@sbi Sooo.. slightly cranky women then?
 
@Neil On a good day
 
sbi
@sehe I follow all of those. Plus I block those ads from blinking and flashing at me. If those ads were all unobtrusive, static images or, even better, text, I wouldn't mind. But not being used to TV, those flashing ones turn me from grumpy to rude to raging.
@sehe Like I would need to.
@sehe Haha!
 
The term bozo bit has been used in two contexts. Initially a weak copy protection system in the 1980s Apple Macintosh Operating System, the term "flipping the bozo bit" was later reused to describe a decision to ignore a person's input. Weak copy protection In early versions of Apple's Macintosh Operating System, the "bozo bit" was one of the flags in the Finder Information Record (also called the "no copy" flag in some documentation), which described various file attributes. When the bit was set, the file could not be copied. It was called the bozo bit because it was copy protection so we...
@sbi Mmm. I'm not used to TV. I die a little when I accidentally zap past MTV, but I can disregard ads like on youtube. I set the vid to 'extended width' and perhaps zoom a little further so I don't see cruft anyways
 
@sbi YouTube ads are those that come before the videos.
 
9:27 AM
Can you selectively block the screaming/visually annoying ads, BTW?
 
sbi
@Neil I think "slightly cranky" is way too weak for someone who should be confined to a straitjacket in a padded cell.
 
@sehe YouTube ads are in the video player.
 
@RMartinhoFernandes Those are mildly annoying, but I have taken to tuning out and checking mail, chat in that timeframe
 
@sbi And yet they walk amongst us!
 
@RMartinhoFernandes As well as ads on the side, as you obviously are well aware
 
sbi
9:28 AM
@RMartinhoFernandes Oh. I think I never saw one of those.
 
I don't get them often, but yesterday I got three in a row.
 
sbi
@Neil I have yet to see a C++ compiler walking among us. Shudders.
@sehe Is that a belated reply to my reaction toward that std guy yesterday?
@ScottW You know, when I look at what you recently contributed here, I wonder whether you might not be a dog for real — although admittedly you seem to be a dog exposed to that Alzheimer drug on steroids they applied to Caesar.
 
There's an Alzheimer drug?
 
You forgot?
 
sbi
@RMartinhoFernandes I added a link.
 
9:36 AM
OMG you spoiled me!
 
sbi
@Pubby What? :)
@RMartinhoFernandes As long as there's p in it. SCNR.
 
@sbi Nothing ;)
 
@sbi Gosh. You should have resisted.
 
@RMartinhoFernandes I thought I remembered an Alzheimer drug, but I guess I had forgotten about it.
 
sbi
@ScottW I can see how you copied that off the puppy. Why do you have to copy dog-like behavior? You might not be a dog, after all!
 
9:38 AM
@sbi I smell copyright infringement.
 
sbi
@ScottW Aw, c'mon, just admit to us that you're a pussy.
3
> Visual Studio 11 [...] is now platform-centric (Windows 8 Metro, Windows Phone, Windows Azure) with multiple language support. This means that desktop application developers who want to use the latest tooling must purchase Visual Studio 11 Professional or higher. — Microsoft Reveals Visual Studio 11 Product Lineup
 
@sbi Nope it was a response to TheRarebit making his entrance. He really is rare: the last time he spoke was January 31st
 
@sbi so MS are no longer offering a free IDE For desktop development?
 
sbi
@thecoshman That's how I understand it.
 
Viva la Microsoft.
 
9:44 AM
@sbi wow, they really are pushing for other shit aint they
 
What? That's not what I read there.
 
sbi
@RMartinhoFernandes Pray tell.
 
wtf? it can't be, because WinSDK 8 doesn't have a C++ compiler as well
 
@sbi did you plonk him, then? <amazed/>
 
Ugh, CRT linker errors. Some days I just want to give up and become a carpenter or something
5
 
9:45 AM
What does "desktop development" mean?
 
@RMartinhoFernandes non-Metro
 
VS11 has express editions
 
Win32 basically
 
Don't mind me then.
 
9:45 AM
it's just the SDK that comes without compilers, you'll need VS Express
 
@rubenvb It does. They just only allow you to do WinRT/Metro stuff
 
At least that's how I understand it.
what? The Express edition doesn't have a C++ compiler?
 
@rubenvb Yes. Apparently, the Express Metro, Express Phone, and Express Azure.
Fuck you Microsoft.
 
checking now
 
they are mad
 
sbi
9:46 AM
@sehe No, I didn't. He was always close to being plonked, though. Getting on my nerves, but not enough to be pushed off my screen. However, he and others convinced me that I must have met him in the wrong moments, so I am committed to make another unbiased try with him.
 
Not mad. Just out of touch
 
what about people who want to amek (shudder) XNA games?
 
Long live MinGW-w64!
 
@thecoshman Fuck them. That was last week's technology. Now it's all WinRT and Metro! Next week, who knows?
 
@sbi who's this?
 
9:47 AM
@sbi I know that happened. I responded to that, I think. Ok, no bozo bits then
 
well... I hope once we'll have clang for windows
 
@thecoshman shhh
 
@sehe never seen @shhh around before
 
sbi
@rubenvb Oh, they do. It's just that you cannot target Win32 desktop using it.
@thecoshman You can look it up in yesterday's script, if you're that curious.
 
@Abyx there is. I built it.
 
9:48 AM
@rubenvb Cool. Now make it work. ;)
 
@rubenvb but there is no std lib, AFAIK
 
with win32 and ABi and everything needed to replace msvc
 
For 32-bit, with kind of broken libstdc++ compat in c++11 mode, but they say it's fixed in 3.1
@Abyx GCC's libstdc++
 
@sbi I might just :P any hints what to search for?
 
@jalf ah well, there's a GSoC project thing.
At least Clang's 32-bit exception handling works
 
9:49 AM
Yeah, i'm hoping that'll produce a few miracles
 
sbi
@thecoshman What did I almost do to the guy?
 
@sbi :P
 
I'll be building the 3.1 release paired with a GCC 4.7.0 today or this weekend. I hope the C++11 stuff is "fixed".
 
So, anyone know much about the relationship between libcmt, msvcrt and msvcr100?
 
There are official experimental clang 3.1 binaries. That's progress guys!
 
9:50 AM
 
@RMartinhoFernandes there were always Clang binaries for windows
 
sbi
You know, I am amazed that there is no high-quality free C++ standard library implementation. Or even any implementation.
 
lol
 
@jalf try /nodefaultlib:libcmt or something like this
 
@RMartinhoFernandes since 2.9: llvm.org/releases/download.html#2.9
 
sbi
9:51 AM
@thecoshman I am nowhere to be seen around that message.
 
@Abyx I did. Didn't make a difference. I am now officially puzzled
 
sbi
maybe we should start an effort to write a free C++ std lib?
 
@rubenvb Not official ones.
> "[W]e are evaluating options for C++ that would enable developers to directly target XP without requiring a side-by-side installation of Visual Studio 2010 and intend to deliver this update post-RTM."
That's good-ish news, right?
@sbi libc++?
 
@jalf I thought libcmt is the static msvcrt, msvcrt is the OS component that gets updates each OS version, the XP one is pretty much equal to msvcr71.dll. msvcr100 is the one delivered with VS2010.
 
sbi
@RMartinhoFernandes They are "evaluating" this because of the outcry that you currently cannot target WinXP with VS11.
 
9:52 AM
oh wait, I might have found the problem
 
@sbi how about this one? seems a bit old though
 
@rubenvb Oh, did they pull them out on 3.0?
 
@rubenvb Yeah, that's what I figured. Just puzzled me to get a linker error which mentions all three
 
sbi
@RMartinhoFernandes Isn't that just g++? Can you even combine it with other compilers?
 
@sbi GCC ships libstdc++.
 
9:53 AM
@RMartinhoFernandes hey, I guess so. I was looking for the earliest, and only saw the 2.9 ones. I guess newer ones are not there.
 
sbi
@thecoshman "yesterday"
 
libc++ is a different beast.
 
damn, beaten by the robot
 
9:54 AM
Ah, got it
 
libc++ is praised for its C++11-ness, and optimized nature.
 
Problem was that the nodefaultlib flag takes a semicolon-separated list of libs, not a comma-separated one. Even though the example in the property manager window shows comma-separated
 
@jalf just do /nodefaultlib and add the ones you want manually?
 
@sbi what sort of time frame :P
 
sbi
@RMartinhoFernandes Ah, I hadn't heard about that. /cc @ruben
 
9:55 AM
@jalf you can have multiple /nodefaultlib switches
 
sbi
@thecoshman I am not your nanny. Either you find it yourself (you are a programmer, after all!), or you will have to live with the fact that you'll never know.
 
@thecoshman Yesterday?
 
@sbi ¬_¬
 
@thecoshman could you perhaps get a little bit more independent in your creative ways to waste time. Step back and think about why you are so eager to know. Besides, it was never a riddle. The answer was in plain view.
 
In case you are bored:
0
Q: Modeling types and subtypes with strongly typed enums?

StackedCrookedI want to define a ICMP header as a pod type: struct ICMPHeader { uint8_t Type; // ICMP type uint8_t Code; // Subtype, value is dependent on ICMP type. uint16_t Checksum; // Error checking data. See RFC 1071 uint32_t RestOfHeader; // Varies based on ICMP...

 
sbi
10:00 AM
Mhmm. I looked over the homepage of that libcxx site in order to find anything about its supports for different compilers, and all I saw was "a Windows port is under way". That seems to be a bit disappointing. Is it merely for clang? If so, it's not what I am after. I want a C++ std lib that's as portable as boost, and of the same outstanding quality.
 
@sbi Your idea was to start one! This one is already underway.
@sehe No need to be creative in order to waste your time.
 
No brancuffs, no brancuffs.
 
sbi
@RMartinhoFernandes I am after a C++ library that can easily be dropped into any compiler installation on any platform. If there is one, I'd happily accept that. If libcxx is such a thing, I am all the more thankful to the guys at llvm for housing another great project. If not, a cross-platform, compiler-independent, free C++ std lib implementation is still missing.
 
@sbi is it possible? you know, a lot of stuff like in type_traits uses compiler intrinsics
 
@sbi Did you notice that the page mentioned e.g. the Apache stdcxx project?
 
10:07 AM
so maybe it will look like // some file #if VC10 #include "some_vc10" #elif ...
 
@LucDanton Last release 2008 :S
@sbi Currently it works with clang and I believe it can work with GCC too (it compiles with it, at least), if you manage to convince it to not use its own. It may need some preprocessor stuffs to support other compilers. At least they have abstracted the ABI parts, to simplify porting to more targets.
 
@RMartinhoFernandes There are regular reports after that that mention that nothing has changed, too.
 
sbi
@Abyx Well, boost deals with that stuff as well. Either the compiler supports it, in which case a compiler-specific implementation might be needed, or the feature isn't supported on that platform.
@RMartinhoFernandes That ABI stuff is what I am not getting.
 
@RMartinhoFernandes Still, I mentioned it because this was about "a Standard Library implementation" in general, and not C++11 in particular.
 
@sbi Stuff that you're not supposed to use in your code, but C++ needs runtime support for. Such things are usually provided by linking to some library. Here's a list of stuff in it: libcxxabi.llvm.org/spec.html
 
sbi
10:15 AM
@RMartinhoFernandes Ah, so it's basically an API to the platform to implement the low-level stuff. That I understand. (That is, I don't understand why most of those functions are needed, but that's likely because of me lacking the knowledge.)
 
yesterday, by sbi
@stdOrgnlDave I hadn't even known you were trolling about that, but every time I come here and you are around I verge at the edge of plonking you. And that edge is a very unfitting place to hang out at.
 
10:32 AM
@jalf Try linking LCD instead.
(Badly timed joke.)
Also, weekend!
 
It's Thursday.
 
@RMartinhoFernandes he's a cat, they work on a 12 hour week
 
Friday is weekend, too.
 
@CatPlusPlus I'm going to to out on a limb with this one and say, "WTF?"
 
No classes = weekend.
 
10:43 AM
No classes = jealous.
 
@sbi They're related to things like exception handling.
 
Oh, I see.
 
sbi
@DeadMG Yeah, I certainly saw that. I thought, however, throw is a feature of the language proper, rather than the std lib.
 
it is, but much of it is implemented as a library
just like how new is a language feature, but it's actually implemented as a library call
 
sbi
I suppose it's got to do with passing exceptions across thread boundaries. But I haven't looked into that yet, and it's still magic to me.
 
10:45 AM
you could, theoretically, implement exception handling as a lib under SEH
or just a lib in general
but you'd need access to much program data which isn't available in the language
 
sbi
@DeadMG Actually, invoking the new operator is a pure language feature. That it has to call the operator new function doesn't make it a lib feature any more than the fact that throw will have to call an exception type's ctor.
 
@sbi operator new is the primary complexity of new. Without it, new is just a constructor call like any other.
 
sbi
@DeadMG You can implement C++ exceptions on top of SEH (in fact, that's how it's done with Windows compilers, AFAIK). But you'd have to do that in the core language, not in the lib.
 
the relationship between throw and the support functions is the same, IIRC.
@sbi Actually, you can use Windows API functions to implement it as a lib, afaik.
 
@sbi But the executable needs to have access to that implementation's code somehow.
 
sbi
10:49 AM
@DeadMG No, operator new() isn't more complex than std::malloc(). The magic of a new expression lies in it automagically invoking the ctor (which you cannot do for yourself except through a new expression) and returning a pointer of the correct type. That std::malloc() cannot.
 
@sbi That's placement new, not regular new.
 
sbi
@DeadMG Whatever, throw is part of the core language, though, and not of the library.
 
of course it is
 
sbi
@DeadMG No, any new expression does that.
 
but a canny implementer might decide it's more maintainable to implement as a lib if it can be done
 
sbi
10:50 AM
@RMartinhoFernandes That's in the compilers RTL then, isn't it?
 
@sbi Yes, but non-placement new is not special- as shown with things like make_shared. Only placement new is a required language feature.
if we didn't have non-placement new, then it would be trivial to produce your own portable code that simply places into malloc and free
 
sbi
Damn, am I really so bad in expressing myself or am I missing something? I am talking of the case where I have a compiler from one vendor, and a std lib from some other vendor. In that case, throw needs to be implemented by the compiler vendor, whereas std::vector is implemented by the library vector?
 
oic wut u mean thar
 
@sbi But the std lib needs to throw too!
 
in that distinction, then yes, it is a language feature
 
10:52 AM
Id est, it needs to link to the compiler vendor's library.
That's what that ABI abstraction is for.
 
sbi
@DeadMG What I wrote about the magic of new expressions applies exactly the way I wrote it to non-placement new.
@RMartinhoFernandes Yeah, and it also needs to branch, loop, and whatever else. To do that, it relies on the core language. Why is that supposed to be different for throw than for if or while?
 
@sbi The only magic regular new has is exactly that which it inherits from placement new- it has none of it's own.
arguably in C++03 it had other magic because you couldn't have perfect forwarded, but in C++11 that is no longer true
 
Also that a declaration of the associated allocation function is always available.
 
sbi
The difference is that there is lib support for exceptions, so that the lib needs an API to access, e.g., the current uncaught exception. But why would the lib need an API to throw and exception?
@DeadMG Non-placement new expression inherits nothing from placement new expression, because it doesn't inherit from it at all. Both are new expressions, and the only difference is in the non-magical part of it — obtaining the memory in which they perform the magical part.
 
@sbi Non-placement new can be specified and implemented exactly in terms of placement new.
it brings nothing new (harhar) to the table
anyhoo, specifically for exceptions, it's simply more maintainable to write it as an API call instead
 
sbi
10:58 AM
@DeadMG A new expression does two things: 1.) it obtains memory (for placement-new, that's a no-op), and 2.) it invokes the ctor to turn the raw storage into a typed object. #1 is absolutely non-magical, even C can do that. The magic is all in #2. Placement or not.
 
@DeadMG That doesn't really make sense. Placement vs non-placement is a matter of syntax, not semantics. Even if it were meaningful, that doesn't mean in any case that one inherits anything from the other.
 
@LucDanton It's difficult for me to see that non-placement new has value when it can be trivially replaced with a regular API function in C++11.
in my opinion, that's the definition of not having any magic- being able to be replaced with a user-defined function which doesn't have to access any non-Standard features
 
I don't see how that's relevant or interesting.
 

« first day (586 days earlier)      last day (4359 days later) »