« first day (416 days earlier)      last day (4530 days later) » 

12:00 AM
@CatPlusPlus ah, so you get to learn all about regex's inner workings and such!
 
Dunno. Not familiar with English terms in academic area.
Maybe in the future, certainly haven't seen any of that so far.
 
@CatPlusPlus what about data structures?
 
not having to chase is nice, but the thrill of the hunt is lost forever
 
@CatPlusPlus like the inner workings of a linked list and such?
 
What about them?
 
12:01 AM
@CatPlusPlus ah just curious if you have went through that class yet.
 
That's basic stuff, really.
Yeah, there were something.
I think I've been on one lecture.
It was in Java, so I never went there again.
3
 
@CatPlusPlus implementing a binary tree is basic to you?
@CatPlusPlus ah.. i hate java. with a passion.
 
Depends on binary tree. Basic one, sure. Plain BST, too.
 
user406009
@johnathon But java IS pretty similar to C++.
 
Only the self-balancing ones are tricky.
No, it's not.
 
12:03 AM
@EthanSteinberg prepare for a world of hurt...
 
It has similar syntax, but semantics are different.
 
@EthanSteinberg When compared to malbolge.
 
And really that's only thing that matters.
 
user406009
Both have classes, metamorphism, changeable state, functions, etc, etc.
 
Every damn language has functions.
That's not really a basis for comparison.
 
user406009
12:05 AM
s/polymorphism/metamorphism/ What sort of spell checker is this?
 
Java has only subtype polymorphism, really.
 
user406009
Still, both are pretty similar compared to scheme or haskell.
 
C++ has templates.
 
@EthanSteinberg as CatPlusPlus said, and is saying, there's a ton of differences, and those are enough to make me hate them
 
@EthanSteinberg well, in that case C is like C++
 
user406009
12:06 AM
Well they are all C based.
 
Classes aren't the same, either. C++ has value semantics, Java has reference semantics. C++ has static dispatch, Java has only dynamic dispatch.
 
syntactically, maybe
 
Java is in no way related to C.
 
except through sucking
 
@EthanSteinberg Java .. i clearly remember the day when Java supposedly killed C++
 
user406009
12:07 AM
Just replace all of your variables with shared_ptr and you will similar semantics to Java.
 
Unless you treat every language that contains brackets in grammar as derived from C.
 
the only thing Java inherited from C was syntax
@EthanSteinberg Not even close
 
Still no.
 
do you even know what garbage collection is?
first, shared_ptr is strictly deterministic, and GC isn't
 
user406009
Yes.
 
12:07 AM
@Ethan give up..
 
second, shared_ptr's destructors run synchronously, and GC finalizers don't
 
It's when the dude comes by in the truck once a week.
 
thirdly, shared_ptr can have reference cycles, and GC doesn't
fourthly, GC has generations and compacting, and shared_ptr doesn't
 
GC doesn't have to have generations.
shared_ptr is a form of GC.
But it still doesn't match Java semantics.
 
@CatPlusPlus no, shared_ptr is strictly deterministic destruction
 
12:09 AM
fifthly, shared_ptr can point to any object, regardless of how it was allocated, with the appropriate destructor, and GC can only point to GC-allocated objects
 
@CatPlusPlus there is no process running in the background -- called garbage collection
 
@johnathon It's still form of GC.
There is garbage, and it's collected without manual intervention.
 
which are pretty fucking major differences
 
user406009
But, you can manually deconstruct objects like you would have to in java, and ignore the whole deterministic destruction feature.
 
that was an impressive rant
 
12:10 AM
@CatPlusPlus Acutally there is manual intervention. It's called a deconstructor
 
Reference counting is a garbage collection scheme.
 
@EthanSteinberg I warned you
 
and that's just the difference between shared_ptr
let alone stuff like templates vs generics, C++'s stack object allocation, pointers, multiple inheritance, etc etc
Java and C++ have very little in common, beyond "class" and C syntax
 
generics through type erasure is lame
 
@CatPlusPlus just as if you wrote a class, that dynamically allocated memory, you'd release that memory in the deconstructor of the class , shared_ptr adds that whole ability to your pointer of choice through the magic of templates and inheritance
 
user406009
12:11 AM
@ke It is. Along with virtual function calling in constructors.
 
yeah, Java utterly fucked that one
 
@johnathon It doesn't matter what the type does. shared_ptr is the garbage collector here.
 
along with covariant constructors
 
It doesn't have to be a separate process.
That's just silly.
Reference counting is not so deterministic, either.
 
@CatPlusPlus if your going to view deterministic destruction garbage collection you might as well say C++ it's self is garbage collected
@CatPlusPlus How many years you have left in your CS studies?
 
12:15 AM
Python is garbage collected and uses reference counting. What now?
 
@CatPlusPlus and yes, reference counting is deterministic. when the destructor is called, if the strong references is 0, then the weak references becomes 0, and the dynamically allocated object is released back to the system
 
Generational GC is deterministic, too. When collector is called, and there are no live references to the object, it's released.
I dare you to look at non-trivial piece of code using shared_ptr and pinpoint moment of destruction.
 
@CatPlusPlus at the cost of GC running in the background. Deterministic destruction doesnt require GC. never has and never will.
 
I can't think of many things less interesting to me than GC. Good times.
 
@johnathon It doesn't have to run in background. Incremental GCs don't run in background.
The whole point is, destruction is not deterministic with shared_ptr.
 
12:18 AM
@CatPlusPlus destruction IS deterministic with shared_ptr
@CatPlusPlus same thing with CComPtr
 
Well, it is, but it's as deterministic as in incremental generational GC.
 
I.e. the underlying machine (whether abstract or concrete) is deterministic, but it hurts the brain to figure out the precise time of destruction?
 
That.
I can tell when Java or Python object will be destroyed given trivial piece of code, but try that in massive codebase. Same goes for shared_ptr.
For added fun make it multi-threaded.
 
Asynchronous signals!
 
ok
 
12:24 AM
I think we've killed the discussion.
 
@CatPlusPlus Censoring a few things, mainly i code windows applications, I only worry about portability when it concerns supported ms os's , and binary compatibility is broken on every major release of my compiler. I dont much worry about multi threaded applications at a shared_ptr level. i worry about them much more on a data centric manner. Besides, windows has more than one way to get around the issue of communicating between threads
@CatPlusPlus nope, just long response
 
I figure that, since I need to write a Standard library for WideC, I may as well get started now
then I don't have to expose a C interface
no, that won't work
 
@LucDanton are you referring to QT ?
@LucDanton or C# ?
 
@johnathon Neither.
 
@LucDanton Agents library?
 
12:27 AM
No.
 
COM ...
 
Certainly not.
 
PPL
 
This binary stuff is so boring.
 
12:28 AM
again ..... i multi thread on a data centric manner ...
which makes using ppl much more saner , easier.. ect
 
My brain can't process binary subtraction, so I'll just convert to base 10 and then back again. Har har har.
 
Java seems to let you write very arcane code.
 
@CatPlusPlus convert to hex and do it ... much easier and quicker
 
@CatPlusPlus You know there are 10 types of people...
 
Hex is not natural.
 
12:29 AM
but 9 aren't represented in this room.
 
b x= new a();
no reason that should compile
 
@DeadMG that compiled on what?
 
I don't have 16 fingers
 
the question Kerrek linked
 
@DeadMG Apparently it does in Java... everything is upcast to Object?
 
12:30 AM
@CatPlusPlus Are you saying it's occult?
 
doesn't matter, because b isn't Object
 
I have trouble seeing through how much of the code is error and how much is explained by dynamic casting
 
@DeadMG in java, everything is inherited from Object
 
No, it won't compile, a doesn't derive from b.
 
as I just fucking said
 
12:31 AM
@DeadMG Is the compiler supposed to check that sort of stuff?
 
Well, shouldn't compile.
 
b is not Object, therefore it's not relevant
@KerrekSB Yes
Java's rules as for what can be assigned to what follow C++'s pointer rules, effectively
 
If you have T x = rhs; then rhs can only be T or subtype of T.
 
@DeadMG It could be like dynamic_cast<B*>(static_cast<Object*>(x)) or so
 
@KerrekSB It isn't, that requires an explicit cast, just like in C++
 
12:32 AM
Everything else you'd have to cast, but even then it'd blow up at runtime.
 
I see. Then I don't understand the OP's setup
@CatPlusPlus NullPointerException?
 
No, IllegalCastException or something like that.
Even Java isn't brain-dead enough to allow crap like that.
 
who put the comment up for the room <ie "We loose performance and it is suck.">
?
 
Me.
Because it is suck to loose performance.
 
@CatPlusPlus Ahhhh --- using ideone; for Java is a great idea. Never crossed my mind.
 
12:35 AM
should be "We loose performance and it sucks"
 
I find that object-oriented languages like Java encourage me to overdesign things.
@johnathon *Facepalm*
 
If you want to be anal, it should be "we lose performance".
It's a quote.
So it's correct as it is.
 
ok
 
@CatPlusPlus far from anal, just trying to help
 
found an annoying place in my hand written parser :(
 
12:37 AM
For a second there I thought you said "found an annoying place in my head".
 
*takes mental note to ignore the room quote
 
lol
 
It's a room policy for topic to be as silly as possible.
 
user457812
I just totally loosed it over the description
 
This one is my favourite thing said on SO yesterday.
 
12:38 AM
ah, the whole show your pointers who's boss or something like that was pretty cool
 
And it doubles to make resident English major insane.
 
:))
 
@SethCarnegie you're assuming CHAR_BIT == 8
 
trust me , I make a resident English major insane, and it's my native language!
 
@cHao A fair assumption in 2011
 
i know, i dated one once!!
 
@DeadMG hardly. a system these days could easily have 16-bit or 32-bit bytes.
 
but none of them do
 
@cHao or 32 bit
err 64
 
or 64.
 
12:40 AM
My code is portable across x86.
 
lol
 
user406009
Just use uint8_t whenever you want a byte.
 
What's uint8_t when byte is >8 bits, though?
 
@CatPlusPlus Those types are only "optionally defined"
 
user406009
12:42 AM
@CatPlus Who cares? It either compiles and works or gives you a "helpful" error message about your computer not supporting bytes.
 
It does support bytes. It has to support bytes.
 
it just doesn't have to agree on how big a byte is.
 
@cHao That doesn't make it a non-fair assumption. He could be trying to program a microcontroller from 1980
 
No, it just makes the promise that sizeof(char) == 1
 
Well, I specifically don't really care if anyone uses non-x86/64 CPU on my code.
Their problem.
 
12:44 AM
agreed
 
and we get to the real truth!
 
sizeof char == 1 byte. 1 byte doesn't have to == 8 bits, that's the point.
 
err
 
I agree. I think it is a bad choice of words in the standard. "byte" is pretty ubiquitous today everywhere else meaning "eight bits".
 
Octet is a perfectly cromulent word.
 
12:47 AM
C++ standard being hard to understand? Well I never.
Crap, 2AM.
 
But I didn't get a 16 gigaoctet iPhone ;-)
 
honestly the only place that i really give a crap if a char is 8 bits or not is when it comes to transmitting data across the wire .. ..
 
I still haven't learned a thing for that stupid test.
Networking and multi-threading make what Dwarf Fortress players call Fun.
 
@CatPlusPlus and WOW players, And ... you name the game
@CatPlusPlus And makes parsing 10 megs of packet data ultra fast on a GPU too...
 
user406009
Networking sucks. Multithreading sucks less.
 
12:50 AM
@EthanSteinberg How does networking suck?
@EthanSteinberg you do know, thats one area where everyone agrees on at least a little bit across all platforms right?
 
user406009
Is there any way to parse network packets other than using command IDs of some kind?
 
user406009
At least with multithreading you can just pass function pointers.
 
@EthanSteinberg Um.. Yea. Depends on what your doing ... What your trying to acheive .. If your implimenting a protocol of your own ontop of tcp , use a struct .. with a fixed size... or... COBRA ... or .. pick your favorate protocol library here. Anyways, Networking really... REALLY is easy once ya get a few things down.. concepts really ...
@EthanSteinberg and multithreading .. you can do more than just pass function pointers around with it :)
@EthanSteinberg for instance.. almost always ... as a rule of thum.. networking code does NOT go on the same thread GUI code goes in
@EthanSteinberg then you get into the need to be able to 'signal' another thread somehow ..
 
user406009
@johnathon I am talking about simple control flow(get something to do something). You want to do something in a thread, pass it a function pointer. You want to do something on another computer, you have to send it some sort of enum of what you want done.
 
@EthanSteinberg i have two things i suggest you investigate.. COBRA , and COM
@EthanSteinberg both are competing standards for what ya just said.
 
user406009
12:57 AM
It seems like the name COBRA has alot of things attached to it. Can you give me a link?
 
Cobra Command, commonly referred to as Cobra, is the fictional nemesis of the G.I. Joe team in the Hasbro action figure toylines G.I. Joe: A Real American Hero and G.I. Joe: Sigma 6, as well as their related media. Cobra was introduced when G.I. Joe: A Real American Hero line was launched in 1982. The toyline was accompanied by a Marvel Comic series written by Larry Hama, and an animated television series by Sunbow and Marvel Productions. Each medium to feature G.I. Joe has had its own continuity and as such, the origin and portrayal of Cobra has differed in each of them. It was Marvel...
 
The Common Object Request Broker Architecture (CORBA) is a standard defined by the Object Management Group (OMG) that enables software components written in multiple computer languages and running on multiple computers to work together (i.e., it supports multiple platforms). Overview CORBA enables separate pieces of software written in different languages and running on different computers to work with each other like a single application or set of services. More specifically, CORBA is a mechanism in software for normalizing the method-call semantics between application objects residing ...
CORBA (excuse me)
 
@johnathon DF has a very specific definition of Fun.
It involves pain.
 
@CatPlusPlus :))
@CatPlusPlus i have one thing to say IUnknown <~ SHOULD NOT EXIST , but for some reason ... it does...
 
I don't have to use COM, thankfully.
 
1:01 AM
@CatPlusPlus i (thankfully) don't have to directly use com .. .. most of that's wrapped away for me already :)
@CatPlusPlus but i WILL say , the newer COM .. is WAY WAY more lightweight than old ActiveX com
 
I'm happy to say I've never touched ActiveX.
 
@CatPlusPlus like, D2D ... :) pretty sweet
@CatPlusPlus you've used it.. maby not in code directly yourself, but you've used it all the same
 
Nope.
 
um.. you load up windows to play a game
that GAME is using com
your browser IS com
 
Ah, pfft.
 
1:03 AM
@johnathon IUnknown exists because you can use any COM interface to query for any other interface that object supports
 
Of course I'm talking about code.
 
@cHao check out WRL .... no IUnknown
 
WRL?
 
@cHao yes. WinRT , WRL, ect
@cHao and on that subject , all the same, of IUnknown.. the impimentation of the object, as the other interface as being inherited or embedded within.... (because inherited came later in the game) .. .. prevents IUnknown from being a TRUE superInterface
1
Q: WRL restrictions

Hamed MahmoodiI want to write a library using C++/CX syntax and use it in other projects. As you know, public value struct could not have any methods or operators, so we had to do things like writing static methods in another class to provide behaviour. Also we can't write code like this : private: int ...

yes, WRL
 
so, basically, it's C++ "managed extensions" in lipstick.
 
1:11 AM
@cHao WinRT is NOT managed
@cHao it's basically MS's new way of doing COM
 
yeah, screw that.
 
@cHao well.. you may say that.. but the support that C++ gets from it is HUGE
@cHao the tooling alone .....
 
don't care.
 
@cHao being able to draw the ui with xaml, and the code be native
 
i'm getting sick and fucking tired of MS releasing a new API to do the same damned thing (except it's "new and improved!", so you have to spend all your time learning MS shit to keep the buzzword-happy managers happy)
 
1:15 AM
@cHao indeed, im right there in that camp with ya
 
@cHao Instead of being frustrated, why not post on Channel 9 and say that you want a new episode of ASTL?
 
@johnathon XAML is not aplus
it's a pointless waste of run-time resources
 
@DeadMG it is when you can offload that part of the application on another smuck!
 
and the API is a direct port of managed, even where that doesn't make any sense at all, e.g. GetType() and Object
 
@KerrekSB because i don't care. if win8 doesn't support the API windows has supported for 30 freaking years, then i categorically reject it.
 
1:17 AM
@DeadMG yes, but it's native all the same.. and execution speed is better, overall, and @cHao yes it does, win32 is still there.
@cHao WinRT is a different stack
 
fucking, who cares?
being native is great, but being efficient is better, and not having to live with Object would be the best
 
@DeadMG yea.. so would not having to live with IUnknown
 
WinRT is Microsoft going "We're so sorry that we fucked C++ programmers by not doing C++ versions of any of our APIs and making them wrap C interfaces. We're now going to fuck them by not doing C++ versions of any of our APIs and making them wrap C# interfaces."
6
 
@johnathon what's the problem with IUnknown?
 
@johnathon Wouldn't it be great if OLE had Java bindings so that IUnknown could map to Object?
 
1:19 AM
@KerrekSB there is java bindings for OLE ... Clipboard !! hello!
 
@cHao it's a philosophy thing.. typesafety with IUnknown ...
@KerrekSB good link :)
 
@johnathon Mr Milewski is an SO user, too!
 
@KerrekSB now you're just being cruel
 
@KerrekSB exellent!
i saw a T-shirt the other day that read "COM is Love"
i never had so many mixed emotions over a T-Shirt before in my life
And honnestly.. i don't MIND using plain C interfaces to API .. i just wished like hell MS would expose a plain C api to all the technologies theay wish to create ALONG side the COM interfaces
off his podium
 
1:25 AM
@keithlayne Wait until I propose OLE/COM autoboxing for C++/CLI!
You want int? I give you an abstract integer object factory reference! Garbage-collected!
 
blah
 
good thing nobody can hear me lol here.
 
fark that
 
@KerrekSB you forgot the bean
 
I need to make more code
 
1:26 AM
@keithlayne I never understood beans, and they never made a huge dent in my life.
@DeadMG Minecraft! Iron ore, gold ore!
 
And that fucking redstone!
 
Minecraft is incredibly boring
 
I'm cringing so hard on this binary crap.
 
@DeadMG Only for people who prefer going up over going down.
 
@KerrekSB Some beans are good. I like brown beans and black beans, but not kidney or lima beans. It also depends on how they are prepared. I like baked and refried beans for example. I agree they never really made a dent in my life, but occasionally a dent in my toilet.
 
1:28 AM
@KerrekSB Only for people who want to make things
 
@keithlayne Mmmm refried....
Because gross isn't gross enough
@DeadMG Some guy made a 16-bit ALU in Minecraft.
 
I want to build a giant golden penis or a massive doom fortress or someshit, not waste my life looking for the last tiny scrap
I know
 
It had a whopping 5 bogo-ips
 
@KerrekSB OMG I cannot believe you said that. take it back.
 
reminds me of BogoSort
and SleepSort :D
 
1:30 AM
is glad his game vocabulary significantly declined sense the age of 17
 
And they've just turned off the example test, because of maintenance.
GREAT.
 
@keithlayne Think about it. What must have gone through the poor soul's mind who reckoned, "yeah, let's oil and fry this again, that cannot possibly by a bad idea."
 
@CatPlusPlus biniary ... 2's compliment stuff?
 
lol
 
sleepsort is the best thing ever
 
1:31 AM
I HATE EVERYTHING.
ARRRGH.
 
@KerrekSB there's really no sense of oil in refried beans when you eat them
 
@DeadMG lol
 
what? it is
 
@DeadMG i NEVER let my computer sleep :P
 
@CatPlusPlus Welcome to my world
 
1:32 AM
GRAAAAAAAH.
 
sleepsort and putting Windows to sleep are two entirely different things
 
@KerrekSB they are awesome, and you suck for not worshiping them. And have you not met any Mexicans? That's pretty much the first thing they try with any food.
 
@DeadMG sadly im only familiar with quicksort, mergesort, and bubble sorts
 
sleepsort
 
@DeadMG you have a wiki or a RFC to describe it?
 
1:33 AM
works on integers
 
ah.. only integer types?
that covers Char too :)
 
@keithlayne I've made fajitas before, many times in fact. I'm familiar with the Contents Of The Tin...
 
basically, you spawn N threads (for N integers)
 
@DeadMG That is actually genius
 
and then sleep them for the duration which is that integer
then you just add it back in to the array
 
1:34 AM
It doesn't work so well when integers are in upper half of 64 bits.
 
eh
nobody said you had to measure the values in seconds
 
*weighs the maximum ... * @CatPlusPlus exaclty what i was thinking
 
@DeadMG Is it parallelizable? :-)
 
@DeadMG even at milliseconds, or even just cpu ticks .... i mean crap whats the highest resolution sleep function you can think of?
 
QueryHighPerformanceCounter can measure the time at 1/2,700,000 seconds
 
1:36 AM
@DeadMG yes, i know this. but thats not a sleep function
 
@KerrekSB it works fine for 64 bit ints on my quantum computer fully parallelized
 
sure it is, just add a busy loop
 
Even if you managed to sleep for exactly that long, (2^32 * 1/2700000) seconds is half an hour. :P
(2^48 * 1/2700000) is 3 years.
 
@CatPlusPlus (exactly what im getting at)
 
It's neat, but it's not really practical.
 
1:38 AM
Dead
blah
 
user406009
Read this comment from the 4chan thread "This is sort of like a simple bucket/radix sort but instead of using a space-based array, it's effectivly using a time-based "array"
 
user406009
Someone was very smart.
 
@EthanSteinberg it's probably been done before already, probably in ada
 
Is Quantum Sleepsort O(1)?
 
It can handle arbitrarily sized ints due to relativistic effects, but unfortunately O(1) is subjective at that point.
 
1:41 AM
@DeadMG probaby more like 0(N^infinity)
yea... 'subjective' ..
 
quantum shit runs faster or equal to a conventional machine, not slower
 
@DeadMG < awair, however i dont have a quantium machine to fuck around with
@DeadMG do you?
 
my quantum sort gets the answer from a parallel reality where the result is precomputed, so it's always O(1)
 
sure
they're common where I come from
 
user406009
@keith Well start asking your machine for lottery numbers then ...
 
1:44 AM
@EthanSteinberg I'm pretty sure that's against the Prime Directive.
 
@keithlayne recant that Prime Directive , i havent herd it in a while
 
@johnathon my Prime Directive is "don't be a douche"
I refuse to recant
 
im not going to answer that
hates java
 
me too
 
1:52 AM
> AFAICT on Windows it's much more different than on Un*x.
That shit's funny
 
Um... java on windows different?
blah
i just refreshed it
yea, that guys not well informed
and i still refuse to answer that
 
like you, you mean? O_o
 
@johnathon It's still portable on Windows, just in a different way :-)
I was going to answer, but sometimes you have to pick your battles.
 
sighs
if i answer it i'll be telling him to go back to C#
:)>-
 
Fucking BCD.
Graah.
 
2:06 AM
How come Mr Steinbach as resorted to posting all his answers as comments?
There should be a flag, "not a comment" :-)
 
He has transcended beyond rep whoring it appears
I once got a comment saying "should be an answer". I was flattered, but can any good answer to a decent question consist of one sentence?
can you flag your own posts? That would give a whole new meaning to "GFY".
 
2:25 AM
man
I should have settled for implementing something smaller first
 
user406009
I just wish Windows followed the posix spec. Things would be so much simpler.
 
@EthanSteinberg eh. windows apparently predated the posix specs by a few years. if posix decided to act like windows, things would be simpler too.
 
2:54 AM
you know
I could significantly simplify my parser if I made a trivial, obvious change
I suck
10
 
Ah: Please take the time to do a step-by-step solution. Sure, I was waiting to find something useful to do!
 
 
3 hours later…
5:30 AM
it's col
d
 

« first day (416 days earlier)      last day (4530 days later) »