« first day (823 days earlier)      last day (4117 days later) » 

6:00 PM
@MooingDuck Brilliant.
 
user1182183
Why the fuck did I choose my school, I mean why the fuck did my parents choose that school? the fucking IT teacher forgot how to convert binary to decimal! WTF! so on the test he removed all the questions with base conversions. srsly. wtf. kill me please.
 
user1182183
how bad is that?
 
user1182183
O_O
 
@GamErix not bad that he forgot, but everything after that yes. He should have looked it up
 
user1182183
and well he didn't understand anything from my project which I gave him for a mark, well, he didn't understand it, so ok, an A+, not complaining, but still...
 
6:04 PM
"I'm bad, so let me remove anything that reminds me of my badness" <--- The mark of a True Superstar.
 
user1182183
@MooingDuck I'm like, he probbly got a test from a few years ago and forgot the answers
 
user1182183
Lol
 
@GamErix related: I just learned about double dabble
 
user1182183
@MooingDuck what's double dabble ; o
 
user1182183
super precise double?
 
6:05 PM
@GamErix a way to convert binary to decimal in O(n^2) time instead of the nieve O(n^5)
 
@MooingDuck I covered this with you when I was having trouble with it: We were supposed to use straight arrays in order to learn how to not fuck them up. In addition, we are on Linux, doing graphics through X11, so using MSVC classes isn't really an option...
 
user1182183
well I have my base 223, which I am proud of
 
user1182183
XD
 
@ShotgunNinja then put an assert before every array access, same thing
 
user1182183
ÿÿ = 49728
 
6:06 PM
@GamErix why 223?
 
@MooingDuck Why was that not invented when I made my HP20b calculator implementation? ;~;
 
@ThePhD I no rite?
 
user1182183
@MooingDuck can get a 43% compression ratio for big numbers
 
Q_Q, I was working with 4-bit Nybbles, all BCD notation.
 
user1182183
then put zip onto it
 
6:06 PM
@GamErix compared to....
 
user1182183
voila, super compression
 
user1182183
@MooingDuck nothing? just plain number into my base...
 
user1182183
decimal to base 223
 
user1182183
ideone.com/3rydPw yes I know VB.net but hey, it works XD
 
@GamErix so your number is 43% smaller than nothing? That's pretty small...
 
user1182183
6:07 PM
@MooingDuck decimal then :P
 
@GamErix oh, yeah, beating decimal is easy
 
@MooingDuck Information density overflow.
 
user1182183
yeah but it beats hex probbly too, but didn't calculate by how many %
 
@ThePhD everyone starts there
 
user142019
Hi.
 
6:09 PM
@GamErix by decimal I of course mean a decimal character per byte. That's easy to beat. Any one base is not inherently faster than another except WRT bits/int.
 
user1182183
wel mine is totally super slow
 
@MooingDuck Well, believe it or not I was considering a plain array of ints. Just because... well. It'd be fun. :D
 
in which case base 4294967296 is about as fast as your gonna get on a modern PC.
 
user1182183
FFFFFFFF becomes !Åb†&
 
user1182183
still good xD
 
6:10 PM
@GamErix oh right, we're talking about space, not speed.
sorry
 
user1182183
my base is just, everything except bytes 0 .. 32 (space)
 
user1182183
so only the visible chars from ASCII are used
 
@GamErix well sure, in text representation hex is slow. In binary representation hex is 100% saturated and cannot be beat
@GamErix ASCII only has 128 characters.
 
user1182183
@MooingDuck the full ascii table has 256 :P
 
user1182183
or extended
 
user1182183
6:12 PM
or what you folks call it
 
@GamErix which one? There's several hundred "full" ascii tables.
 
user1182183
 
@GamErix Unicode is extended ASCII and has some hundred thousand characters
@GamErix probably ISO 8859-1, also called ISO Latin1.
 
Ell
@Zoidberg hi.
 
user1182183
but, probbly my algorithm fails if it gets to internal storage, a number which is very big simply uses less bytes than a string xd
 
6:14 PM
@GamErix I'm not sure which one that is :/
 
user1182183
but hey it was fun for my secret-code project
 
user1182183
(encryption/decryption)
 
found it! Code page 437!
Code page 437 is the character set of the original IBM PC (personal computer), or MS-DOS. It is also known as CP 437, OEM 437,[1] PC-8,[2] MS-DOS Latin US.[3] It is sometimes misleadingly referred to as the OEM font, High ASCII or Extended ASCII.
 
user1182183
never got to implementing it though, "hey" would be encrypted into a string which is 12-20 chars long
 
user1182183
@MooingDuck nice ; o
 
user142019
6:16 PM
libgit2 how u orphan branch
 
@GamErix why so long? From my understanding it should only be ~12% larger than ASCII, so 4 chars.
 
user1182183
@MooingDuck very many encryption layers XD
 
user1182183
well.. 3
 
user1182183
and hey could be encrypted
 
user1182183
into like
 
user1182183
6:17 PM
30 different strings
 
@GamErix oh
 
user1182183
yet always decoded to "hey"
 
user1182183
gpb.googlecode.com/files/coder1.1.zip <- here it is if u want, including source XD
 
a straight binary data conversion into base 224 should only take ~2.408% extra space, not bad.
 
user1182183
anyway the thing i'm proud of, and I always will be, is my GPS-project for GTA San Andreas <yay>
 
user1182183
6:21 PM
my most advanced piece of shit I ever made XD
 
@GamErix alright, now that impresses me
 
user1182183
@MooingDuck source code is available too if you want, 1) a plugin for a server which provides functionality and 2) a year later I made a separate GUI program with a map of GTA where you can visualize the calculation and adjust the plugin source to your taste :P
 
never played a GTA
 
user1182183
well if you want to see the map of GTA.. click :P then you can play around with my program XD
 
user1182183
6000x6000 jpg
 
user1182183
6:24 PM
so yes it's 7 mb
 
user1182183
+ a program
 
user1182183
and 2 MB of node data
 
user1182183
MMB - select node 2, LMB - select node 1
 
user1182183
calculate - voila a nice path
 
user1182183
hold RMB to move map :P
 
Ell
6:28 PM
Hmm. that game looks old :o
 
I think I need to write my onw std::unique_ptr
that's more compatible with the idea of &myuniqueptr.
 
user142019
I'm going to use Git for Hexapoda.
 
OOH
 
user142019
@ThePhD huh?
 
Maybe I could just
subclass unique_ptr
 
user142019
6:29 PM
Use private inheritance.
 
? Why private?
 
user142019
Then you can override and = delete with no fears.
 
user1182183
@Ell yep it's very old
 
Ell
I don't understand private inheritence, it doesn't do lipvig substitution does it?
 
user142019
Because std::unique_ptr is not made for public inheritance.
 
6:30 PM
@Zoidberg You've lost me. :c
 
user142019
You'll get slicing problems if you're not careful as a user.
 
user142019
std::unique_ptr has no virtual functions.
 
... Slicing problems?
 
user1182183
nice release date has GTA SA, my 10th birthday !
 
user142019
Public inheritance enables polymorphism.
 
6:31 PM
@Ell I'm going to have to look that up
 
user142019
You very rarely want that when it comes to base classes with no vtable.
 
That's only if someone directly coerces the argument to std::unique_ptr<T>.
All I want to do is write a non-shitty operator&
 
user142019
What the fuck operator&?
 
user1182183
and Red alert 3 on my 14 th birthday
 
user142019
Why do you overload operator&?
 
6:32 PM
Address-of operator.
 
user142019
That's nothing but annoyance.
 
@ThePhD it allows implicit (accidental) conversion as well. Don't do it
 
Siiiiiiiigh
 
@ThePhD never override operator&()
 
Then I have to rewrite the whole std::unique_ptr API ;~;
 
user142019
6:32 PM
If I want the address of an std::unique_ptr, I want the address of the std::unique_ptr.
 
user142019
@ThePhD or just use private inheritance, you fool.
 
user1182183
hmmm, wikipedia isn't right.. they state red Alert 3 has been released on 30 october 2008, yet I bought the game on my birthday
 
user142019
That's the exact point of private inheritance.
 
user1182183
which is 26 october 2008
 
user142019
Inherit all public members, but don't let anybody know they come from std::unique_ptr.
 
6:33 PM
@Zoidberg But std::unique_ptr behaves like a pointer in every other regard. Why does it suddenly not give me the address of the pointer inside when I do operator& on it?
 
@Ell I can't find anything. That a typo?
 
Ell
@MooingDuck Hmm probably, let me check
 
user142019
@ThePhD you know what & on a pointer does?
 
user142019
(Hint: it returns the address of the pointer.)
 
@Zoidberg I think public members are inherited as private in private inheritence.
 
Ell
6:34 PM
@MooingDuck Oops, yes sorry, I meant "liskov substitution principle"
 
@Zoidberg The address of the integer value that represents the Pointer's Address, yes.
 
user142019
@MooingDuck wat. I don't believe that.
 
It's also what every API call from here to Hell relies on.
 
user142019
@ThePhD wtf integer value.
 
Ell
@ThePhD why would you want the address of the raw pointer? o.O
 
user142019
6:34 PM
WTF do you want to do?
 
@Ell C api, pass pointer by reference in case it does a realloc. Which means IT WILL SCREW WITH RAII SO DONT DO THAT
 
user142019
int* foo = &bar;
&foo; // address of foo
 
r = device->CreateBuffer(&desc, &data, &gpubuffer);
 
user142019
@ThePhD that will break, you fool.
 
Ell
Things take T** where the * isn't for "array-ness"?
 
6:35 PM
gpubuffer is a std::unique_ptr.
 
user142019
std::unique_ptr needs to release the pointed-to object.
 
@Ell yes
 
user142019
That is impossible with what you want to do, and you'll get resource leaks.
 
@Zoidberg I've already done that. I just need to stick the new pointer value inside.
 
Ell
Hmm. Oh o.O
 
6:36 PM
 
user142019
std::unique_ptr<T> foo{new Bar()};
*&foo /* assume & does what you want */ = &baz;

// HOLY SHITFUCK! THE new Bar IS NEVER deleteD!
 
user142019
@MooingDuck TIL
 
I could T* datptr = null; device->CreateBuffer(&desc, &data, &daptr); gpubuffer.reset(daptr);
 
Don't do pointers to pointers jesus
 
user142019
@ThePhD but dude, you could also do:
 
6:38 PM
@CatPlusPlus I need it for this API. q_q why does no one believe me. ;~;
 
user142019
myUniquePtr.reset();
createbuffer(&myUniquePtr);
 
@ThePhD CreateBuffer can't throw, so I guess it's safe.
 
Ell
Doesn't look very C :L
 
user142019
You need to do either way, and they both suck, so go with the one that sucks less i.e. plain old std::unique_ptr.
 
@ThePhD Right, COM
 
6:38 PM
@Zoidberg that appears to be the same thing
 
user142019
oh
 
@ThePhD Wrap it and never talk about it again
 
user142019
I see. xD
 
@MooingDuck Yeah, it's just using operator = instead of .reset.
 
It does
It's a COM out argument
 
user1182183
6:39 PM
hm if I have 32000 nodes, how many connections could I make without doubled (1 --> 1) but including reverses (1 --> 2 and 2 --> 1) ?
 
Oh
He removed the message.
 
@ThePhD also fails to compile in some cases. reset is better
 
.... Hm.
I am about to
come up with a sexy hack.
 
Ell
@GamErix is this a complete graph?
 
That is completely unecessary, except for the syntactic sugar.
 
user1182183
6:41 PM
@Ell you mean like, each node has a connection to another node?
 
user1182183
if that, yes
 
Ell
@GamErix yeah
 
anyone know how DirectX does memory allocations? That memory shouldn't be freed with delete right?
 
Ell
then (n(n-1)/2)
 
No
Objects are refcounted
 
6:42 PM
@MooingDuck IUnknown::Release.
 
@MooingDuck it's COM
 
@Abyx I never used that either
 
user1182183
@Ell hm that's a pretty big number xD
 
@MooingDuck COM uses ref counting.
You call AddRef or Release on the object, and it handles everything by itself.
 
Ell
@GamErix actually, it's n(n-1)
 
6:43 PM
@ThePhD so that means you need a special deleter in your unique_ptr.
 
Ell
if you count each edge as 2 because it's a digraph
 
user1182183
@Ell heh
 
@MooingDuck Yes, I got that covered.
 
@ThePhD k, just making sure.
 
struct furrovineexport ReleaseDirectX {
		template< typename T > void operator() ( T* ptr ) const {
			ptr->Release();
		}
	};
 
6:44 PM
How does COM store managed objects in memory internally? Just curious, since I've never really worked with it before.
 
... Mm. Dat tabs.
 
@MooingDuck Being COM, it probably uses CoTaskMemAlloc and CoTaskMemFree.
 
why don't just use ATL?
 
@StackedCrooked Everyone is.
 
user1182183
6:46 PM
ok, I won't precompute all roads... I don't have 2 TB drive for that
 
Is it random-allocated, with counted references stored in a container of some sort (list, stack, table, tree...) or does it use a pre-allocated heap, and a number of references?
 
user1182183
and who the fuck is going to download 2 TB anyway
 
user1182183
or better question: how would I ever upload such thing with 100 kb / s
 
@EtiennedeMartel It's like quantum mechanics: if you don't find it confusing, that's a pretty solid indication that you don't know anything yet.
 
or is there some other internal mechanism for storage?
 
6:47 PM
@JerryCoffin You know, it's a pretty good analogy.
 
> furrovineexport
YOU TYPE NAMES OF UGLY MACROS LIKE THAT YOU SCRUB
 
;~;
But
But but but
Caps takes so much efforrrt....
 
Also don't put spaces before and inside parens
And don't use tabs
 
@CatPlusPlus Calm down.
Have some catnip.
 
Ell
I'll have some nip
 
6:50 PM
I need to finish a shitty project
I really don't want to
 
@ShotgunNinja COM doesn't store much of anything itself. It's mostly a go-between. When you instantiate a COM object, COM locates the DLL that implements that interface, and invokes its entry point to create an object. Its constructor then does all the allocation and such. When its done, COM gives you a pointer.
@Cheersandhth.-Alf Looks to me like exactly how screen shots of an Apple should be done.
 
so wrong in so many ways
 
@JerryCoffin Oh, okay. So the underlying DLL is responsible for the memory, and COM just exposes AddRef() and Release() to provide a hook into the DLL's memory-allocation scheme?
 
@ShotgunNinja that's the impression I always got
 
6:53 PM
How do I get
the standard deleter
for an object?
 
@ShotgunNinja When you do AddRef, you're adding a reference to the object. When Release has been called often enough for its ref-count to get back to zero, COM invokes its dtor. (t least normally -- I believe in COM+, it can/will sometimes keep an object cached in memory, in case somebody needs it again soon, but you get the idea).
 
Er, for a type?
 
std::default_delete<T>
 
Ooh
 
@ShotgunNinja mainly, except the server can be a process, and it can even reside on a different machine. so it's more complicated behind the scenes.
 
6:55 PM
 
@Cheersandhth.-Alf Right; that's actually really cool.
 
What you want to know about COM is that you don't want to know anything about COM
 
@CatPlusPlus Cooooool~.
 
You're terrible at this
 
user142019
@JerryCoffin so original.
 
6:59 PM
COM sucks. really.
 
user142019
What is COM?
 
@CatPlusPlus I can't entirely agree. COM has a few kind of cool ideas at its core -- but its surrounded by the single most crufty implementation in the history of mankind (and believe me: coming from somebody who's used a Control Data OS, that's saying a lot). You certainly don't want to use it, but knowing a little about it is worthwhile anyway.
 
user142019
Component Object Model (COM) is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages. The term COM is often used in the Microsoft software development industry as an umbrella term that encompasses the OLE, OLE Automation, ActiveX, COM+ and DCOM technologies. Overview The essence of COM is a language-neutral way of implementing objects that can be used in environments different from the one in which they were created, even across machine bo...
 
it's hard to use it, and even harder to write a simple callback class
 

« first day (823 days earlier)      last day (4117 days later) »