« first day (400 days earlier)      last day (4566 days later) » 

sbi
9:00 PM
@wilhelmtell Streams are from the early 80s, exception from the late 90s. 'nuff said.
 
Unicode, how else.
 
but yeah, a constructor constructs objects. Objects should be usable. If your constructor can't leave the object in a usable state, throw an exception instead
 
@IDWMaster What exactly does your library offer?
 
I've given up on MSVCC support, and am exclusively using GCC. The problem with Unicode
 
and if you can handle the exception do so, otherwise, let it propagate (and eventually terminate the program)
 
9:00 PM
Let's not go there again.
 
sbi
@CatPlusPlus Wimp!
 
@CatPlusPlus Don't worry, either they have only one pitchfork, or their pitchforks are abstract.
 
is that wchar_t is not the same on Windows and Linux
 
@RMartinhoFernandes But they have pitchfork factories.
 
@IDWMaster Have you wondered whether C++ needs a base class library?
@RMartinhoFernandes you only need one pitchfork to stab someone in the eye though
 
9:01 PM
@jalf C++ already has one.
 
Pitchfork?
 
@IDWMaster cross platform, but without supporting one of the world's most popular compilers? Did I miss something here?
 
@FredOverflow My library intends to offer cross-platform support for all of the stuff in the BCL, including Forms (a basic Windowing library), a string class (hopefully with international support), and an abstract stream class
 
std::pitchfork(iterator first_person, iterator last_person);
 
@sbi @jalf ok, i see where you getting at.. never create an instance before i need it, and create only if i need it. then failing creation is show stopper.
 
9:02 PM
GCC runs on Windows
 
@RMartinhoFernandes There aren't really that many base classes in the C++ standard library. Why not? Because subtype polymorphism is overrated.
 
ah good. What C++ needs is clearly another string class
 
@jalf But the mobsters will be fighting amongst them because their pitchfork is globally accessible!
 
Well, std::string ain't so good.
 
The problem I'm having is; wchar_t isn't the same endianess on Windows and Linux
 
9:03 PM
@IDWMaster What do you mean by "all of the stuff in the BCL"? All of the stuff in your library, or what is the "BCL"?
 
An abstract stream class? shudder An here I was hoping that someone would invent some sane, nice-to-work-with streams to replace IOStreams with something STL-styled
2
 
@IDWMaster wchar_t is useless, forget about it.
 
@FredOverflow Oh, I thought it meant (base (class library)), as in, a basic library with classes, not ((base class) library) as in a library with base classes.
 
@CatPlusPlus true
 
sbi
BTW, @RMartinho, I have found Katie in Greg's Bar On A video. If you know whom to look for, you'll see her at 0:40, the first time you really see here is at 1:08.
 
9:03 PM
@RMartinhoFernandes You may be right.
 
For example: BaseObject<FileStream> mstr = new FileStream("test");
 
@IDWMaster yes it does. But the vast majority of windows developers use MSVC. And your code isn't very "portable" if it only works with one compiler, is it?
 
Oh my.
 
@IDWMaster please, stop right there
 
That looks like Java.
 
9:04 PM
The heck's BaseObject?
 
mstr->Write(buffer,offset,count)
 
IT BURNS.
 
@IDWMaster So you want a universal base class, like java.lang.Object?
 
Go back and buy a C++ textbook, and stop trying to turn the language into Java or C#
 
BaseObject is a smart pointer
 
9:04 PM
Yay for naming.
 
sbi
@jalf Oh yeah, let's do this! The streams' shortcomings are one of my pet peeves. We have enough accumulated knowledge here to get a pretty good design.
 
@sbi Oh, Sarah sounds nice too. I can't buy everything!
 
@IDWMaster We already have std::shared_ptr and std::unique_ptr. And we certainly don't use new in ordinary client code.
2
 
I like Boost.IOStreams.
 
`std::fstream mstr("test") already exists, and even with IOstream's brokenness, it's cleaner and more concise than yours. So what's the point?
 
9:05 PM
Don't default to using free store.
 
sorry if this sounds harsh, btw. But I'm allergic to attempts at turning C++ into Java
4
 
Well, directly.
 
sbi
@RMartinhoFernandes Oh yeah, I know that problem.
 
@sbi the problem with that is that I suspect it's a fairly hard problem to solve... ;)
 
@jalf I've recently found myself trying to do the opposite. It doesn't work either :(
 
9:07 PM
I think we scared him away.
 
now I feel all guilty :(
 
No. I'm still here. Just was fixing a bug
 
Now HostileFork will yell at you.
 
@jalf Don't worry, it was necessary for the greater good of C++ kind.
 
sbi
@jalf Indeed, I suspect the problem is that what annoys you will not 100% overlap with what annoys me. What annoys me most could be solved by us, though. :)
 
9:08 PM
@IDWMaster What is the target audience for your BCL?
 
Anyway, if you want my feedback, throw away everything you have that relies on polymorphism, abstract classes and inheritance. Look at how the STL is designed, and base your work on that. Then start from there
 
sbi
@CatPlusPlus That actually sounds pretty scary, you know.
 
@vivek I'm a smartass and a dumbass. Like multiple inheritance or something.
 
@jalf The STL uses polymorphism. Just not subtype polymorphism ;)
 
Like that overused cat!
 
9:09 PM
C++ is not Java, and it doesn't deal as well with Java-style OOP as Java does. Trying to make it work in that way is just going to end in suffering
@FredOverflow shush, you. ;)
 
@FredOverflow Facets!
 
@RMartinhoFernandes Facets don't exist. I'm in my happy place, I'm in my happy place, I'm in my happy place...
 
Faucets. And sinks.
 
sbi
@FredOverflow Oh yeah. Is there anyone (besides Angelika Langer) who gets IO streams' localization?
 
9:10 PM
@sbi yeah, it probably could. I'm sure we could cook up something far better than IOStreams. For me, the problem is mainly time. I'm already trying to solve another hard problem in my spare time with my STM lib. ;)
 
#include <CLRHeader.h>
#include <FileStream.h>
using namespace System;
using namespace System::IO;
int main() {
Console::WriteLine("Hello world!");
Console::WriteLine("test");
BaseObject<FileStream> mstr = new FileStream("test");
BaseObject<BinaryWriter> mwriter = new BinaryWriter(mstr.GetObject());
mwriter->Write("Hello world!");
mstr->Flush();

return 0;
}
 
@sbi well, she wrote the book together with someone else, didn't she? So I'd assume there is one other person who got it?
 
int main() {
    FileStream mstr("test");
    BinaryWriter mwriter(mstr);
    mwriter.Write("foo");
    // flush should be automatic on destruction
}
 
@IDWMaster What is that, C#++?
 
@jalf Maybe the other person just fixed typos.
 
sbi
9:11 PM
@IDWMaster Please read the newbie hints. Among other things they explain how to post code here.
 
@sbi always so diplomatic
 
If you really want to write all that yourself, at least write it C++ way.
 
anyway @sbi if you want to give it a shot, draw up some pseudocode or a few design notes or something, might be interesting to discuss
 
That does actually compile with my library
 
@IDWMaster my eyeeeeess
 
9:13 PM
The problem with Write vs. operator<< is that you can't extend Write to support custom types.
 
using namespaceis bad bad bad in C++. Don't just mindlessly copy fucking Java, will you?
Verbose, deeply nested namespaces are an abomination
 
@IDWMaster I don't get it, is this some kind of bridge to the Common Language Runtime (CLR)?
 
That's actually .NET.
 
@FredOverflow oh, is that what it's supposed to be?
 
dunno
 
9:13 PM
No, it's an implementation of .NET (a native one) without the need for the JIT
 
@FredOverflow C++/CLI, anyone?
 
No, it's a reimplementation of .NET library.
 
Hi guys! I dont know how to search for this so i am asking straight away... why could an unsigned char fail to convert into an 8-bit bitfield pointer?
 
It's a native implementation of the .NET library
 
sbi
@IDWMaster But that is the only positive statement that could be made about that abomination.
 
9:14 PM
@IDWMaster but the .NET class library is a really really awful design for C++
 
@Drknezz Show code.
 
It is designed to work well with a certain group of languages, and C++ is not a member of that group
 
The library is on GitHub
 
@IDWMaster What's the point? It's probably going to end up being a lot slower than normal, jitted C#.
 
Evening
 
sbi
9:15 PM
@jalf Klaus Kreft. I was trying to be smart: I meant that I doubt both of them understand it. Obviously I was too smart. (There is someone else, though: Stroustrup wrote an appendix to his TCPL dealing with localization, which you can download from his website.)
 
C--.NET
 
@jalf It's not really that great for C# either.
 
Fitting name.
 
Not even the collections are great.
 
9:16 PM
@Drknezz Oh god, that's dangerous.
 
Oh good grief, what the hell is that.
 
@RMartinhoFernandes Why?
 
If you want to extract bits, use bitshifts.
 
Almost all the starred items on the right are about Java, can I assume we had a Java discussion?
 
I want to turn Caracter into a HackByte
 
9:16 PM
Casting char* to HackByte* violates strict aliasing, I believe.
 
And bitfields act weird!
 
And you thought my code was silly
 
Bitfields should have been called "minefields".
 
@RMartinhoFernandes It's the only way i've been able to actually write bits one by one to a file
 
wow that's scary code
 
9:17 PM
Bitshifts, dammit!
 
@Drknezz Look up bit shift operators: >>, <<, and bitwise AND too: &.
 
yes I agree with @CatPlusPlus
 
Anyways; are there any C++ libraries that can be used for cross-platform Unicode support? I want to always encode in UTF-32
 
And given the fact that i am implementing a compression algorithm, writing bytes is NOT an option
 
9:18 PM
@Drknezz that's what bitshifts are for
 
@RMartinhoFernandes but C# has the language features required to work with it. It works smoothly with subtype polymorphism, you don't have to worry about slicing, it's GC'ed so you can mess around freely with new and so on. It works with the BCL in a way C++ never could
 
constexpr bool bit(uint8_t byte, int n) {
    return byte & (1 << n);
}
 
@RMartinhoFernandes @CatPlusPlus I know Bitshifts, but how can i write a character bit by bit then?
@RMartinhoFernandes Oh i see, i think i got it
 
@RMartinhoFernandes I prefer (byte >> n) & 1.
 
Why do you want to write anything bit by bit?
 
9:20 PM
@RMartinhoFernandes why did you make that constexpr ?
 
@jalf Oh, sure, that's right.
 
@jalf the STL does rely on static polymorphism every now and then.
 
I will try to implement the change into a HackByte that way. Thanks
 
@TonyTheLion Because it's a good candidate!
 
Downloading ICU
 
9:20 PM
@CatPlusPlus As i said earlier, given the fact that i am implementing a compression algorithm, writing bytes is NOT an option
 
@RMartinhoFernandes right
 
Still don't see what's wrong with a native .NET
 
constexpr means it's a compile time constant right?
 
A compression algorithm?
 
Could someone explain what's so "wrong" about it?
 
9:21 PM
@TonyTheLion It's small, fits the constexpr requirements (only one statement that is return, only operations that can be constant).
 
@Drknezz Are you writing one of those revolutionary compression algorithms that ultimately reduce everything into a single bit?
 
@TonyTheLion Yes.
You can now say int x[bit(10,4) + 1] and make an array of size 1 or two depending on that bit.
 
"Version 1.1: — Fixed not saving the other 7 bits."
 
@IDWMaster native .NET??? I don't think those two words fit in the same sentence
 
@TonyTheLion Why not?
 
9:22 PM
@FredOverflow Huffman Algorithm. Using the standard way to write booleans, id skyrocket the "compressed" file size a lot
 
.NET is a virtual machine, so to speak, that runs your program. So there's a layer between your program and the metal, so it cannot possibly be native
 
That's Microsoft's implementation
 
It doesn't have to be implemented as VM.
 
@CatPlusPlus Exactly
 
There's always a layer between your program and metal.
If only operating system.
 
9:23 PM
@Drknezz I would write a class with a write_bit method that internally handles all the bitshifting and writes a byte after 8 calls to write_bit.
 
@IDW why don't you just steal all of Mono's code and go from there?
 
@IDWMaster You're only porting the library, or adding GC as well?
 
@keithlayne Mono is also designed as a VM
 
Or use bitset.
 
sbi
@jalf Mhmm. Let's start simple. I'll try to list my main problems with IO streams. That will take a while, though.
 
9:24 PM
I'm only porting the library
 
@TonyTheLion C# code is jitted into native code prior to execution.
 
@RMartinhoFernandes Yeah, sure, and I'll sell it for 999$ each.
 
@FredOverflow That's exactly how it's working right now. It's just that i need to write a char, plain old char
 
@IDWMaster I'm aware of that, but it's open and you could use it for a head start
 
@CatPlusPlus Sorry, wasn't meant for you. STOP SCROLLING MY SCREEN YOU PEOPLE!
 
9:25 PM
@IDWMaster The question remains as to why anybody would want to port a C# library to C++.
 
@CatPlusPlus bitset didn't work for me. I tried it and it was still skyrocketing the file size
 
@FredOverflow 1- For performance, GC results in a lot of overhead
 
@RMartinhoFernandes You've highlighted me, so now you have to endure my not-so-funny remark.
 
2 - For portability
 
@FredOverflow ... when lots of the functionality already exist.
 
9:25 PM
The .NET framework requires a huge installation, and admin rights to the machine you're installing it to.
 
GC doesn't have to have a lot of overhead.
 
@IDWMaster You're restricting yourself to GCC. You fail.
 
You can't just "run" a program that "ships" the library
 
Your smart pointer is a form of GC.
 
@FredOverflow yea I know that, but I'm speaking from the viewpoint of writing code. When the code is being executed, the of course, it's close to the metal
 
9:26 PM
It's a form of reference counting
 
.NET is installed once.
 
GC != reference counting
 
Reference counting is one of GC schemes.
 
@IDWMaster GC is certainly faster than the heap activity and reference counting you unnecessarily introduce with your BaseObject smart pointer.
 
Don't worry, refcounting has no overhead. </sarcasm>
 
9:27 PM
Incremental GCs are wonderful and fluffy.
 
@RMartinhoFernandes lolwut?
 
@CatPlusPlus BUT THE OVERHEAD!
 
@FredOverflow Sarcasm.
 
@FredOverflow :P
 
@RMartinhoFernandes It's a fluffy overhead!
 
9:28 PM
Reference counting is also optional in my library (you can easily switch to manual memory management)
 
C++ and the STL work beautifully together. C++ doesn't need a "base class library" founded on subtype polymorphism. No sane C++ programmer would use it. It's a waste of time.
 
Evening guys
 
@IDWMaster Also, no sane C++ programmer would switch to manual memory management. We have RAII. We love RAII.
 
Manual memory management is way worse than any GC.
 
9:29 PM
Manual memory management is bad C++.
> Bad C++ - "where the developer writes C and has picked up a few bits of C++ and doesnít realise what they are doing" : no understanding of copy constructors, inheritance (of all kinds!) used without a clear reason, destructors releasing resources before they are finished with, no standard library, lots of void casts, unnecessary and inappropriate file dependencies.
 
Ouch... Why would someone torture himself with strictly manual memory management?
 
Because performance! Or something!
 
How many of you guys use C# ever? I've managed to avoid it completely.
 
Premature optimization is the source of all evil
 
Who cares any GC has better coded heap management.
 
9:30 PM
@RMartinhoFernandes I like void casts when printing this inside constructors and destructors :)
 
Not my quote BTW
 
How do I use initializer lists in a ClassB if I also inherit from a classA?

ClassB :: ClassB(int x, int y, int z) : z(z) : ClassA(x,y)
 
It's manual so it must be FAST!
 
@keithlayne I come from C#
 
@keithlayne I've used it since 2003.
 
9:31 PM
@CatPlusPlus Actually, if we can delay the collection till the very end, it will be faster
 
@ManofOneWay ClassB(...) : ClassA(x,y), z(z)
 
@ManofOneWay With a comma instead of a semicolon. And the base class should go first.
 
@Drknezz Do you ever wish that C++ had some features C# had?
 
Thanks! =)
 
@IDWMaster I wished C# had C++ features as REAL pointers
 
9:32 PM
@IDWMaster yield return. That's pretty much it.
 
@Drknezz C# has real pointers in unsafe mode.
@IDWMaster LINQ
 
@Drknezz Dumb allocation performs worse than allocation via preallocated heap.
 
@FredOverflow You can't dereference Managed Types
 
Because it involves a roundtrip to OS for more virtual memory.
 
@RMartinhoFernandes yield return does what?
 
9:33 PM
@Drknezz Which is probably a good thing.
 
Yeah, generators would be nice.
 
@keithlayne It makes implementing iterators 10 times easier.
 
python-ish yield?
 
@FredOverflow Probably, but i like knowing exactly when something is a reference
 
@keithlayne Yep.
@Drknezz When it's not a value type!
:)
 
9:34 PM
@Drknezz "reference" as in "reference type" or "call by reference"?
 
@CatPlusPlus Hmmm... But how does it apply? I mean, we are talking about Collection.
@RMartinhoFernandes I just tend to forget that a LOT >.<
 
@Drknezz What does apply?
Refer to messages.
If you mean GC, then deallocation is just one task. You still need to get the memory from somewhere.
 
> Some guy: "You can do it in C#, just take C#'s feature, that'll work just fine!" - Bjarne: "No."
 
Seems like we both got lost in the conversation
 
Yield return example (WARNING: C# CODE): public IEnumerable<long> EnumFiles() {
List<long> retval = new List<long>();
foreach(KeyValuePair<long,List<IC80Fragment>> et in fragments) {
if(et.Key !=-1) {
yield return et.Key;
}
}
}
 
sbi
9:36 PM
24 mins ago, by sbi
@IDWMaster Please read the newbie hints. Among other things they explain how to post code here.
 
@RMartinhoFernandes Am i using your bit routine correctly? pastebin.com/4aJFcpdY
 
@Drknezz It's easier if you refer to messages with the little arrow that is on the right end of each message. (this is also explained in the newbie hints)
 
(key for key, value in fragments if key != -1)
Generator expressions <3.
 
@Drknezz You want to count from 0 to 7, not from 1 to 8.
 
But really, why the bitfields.
 
9:37 PM
@FredOverflow Yes, my bitfield struct runs from 0 to 7.
 
@CatPlusPlus from value in fragments where value.key != -1 select value.key :P
 
Also, do it in the ctor, not a separate function.
 
@Drknezz No, in line 12 you say Bits._7 = RetornarBit(Caracter, 8);
 
@CatPlusPlus I don't want to modify the whole thing just to write a single char
 
I'd really ditch the bitfields.
 
9:39 PM
@FredOverflow If i'd bit-shifted by 0... how could the method return something?
 
The first bit.
 
@RMartinhoFernandes I'd also do it if i had another way
 
@Drknezz It returns the rightmost bit at position 0. You clearly need to read up on bitwise arithmetic.
 
@Drknezz Now you can just write RetornarBit(Caracter, n) anywhere you want.
You don't need to store anything into a struct with bitfields.
 
Non-English code is silly.
 
9:39 PM
@FredOverflow Amen to that
 
Amen to @CatPlusPlus
 
@CatPlusPlus This is a homework, and my teacher prefers code to be written in spanish. Silly him, he knows English as well
 
For those of you in non-English speaking places, does that hurt students? Or does it just not matter?
 
Guys, this is weird
I'm running a server and client on one machine
 
Damn, too late.
 
9:42 PM
We code in English here. Maybe except the comments.
 
user457812
@RMartinhoFernandes Good effort, though.
 
Then a client on another machine
and It keeps breaking when I send a packet to the client on the other machine?
 
@keithlayne In my case, i really don't care, i barely see differences between english and spanish. My fellow students do seem to be affected a bit
 
It's definitely pig's fault.
 
@Drknezz I was maybe looking to those not in school anymore to see if those students had problems down the road.
 
9:44 PM
I wouldn't be able to come up with identifiers if someone told me to code in Polish.
 
user457812
I think you need to be able to use English when coding or you're probably irrelevant and not very useful
 
Nothing is stranger than seeing someone type into a chinese xterm
 
@keithlayne I am on college/university [Hadn't really understood the difference between those two]
 
I feel sorry for non-english coders
 
user457812
Exception might be if you're working in some company that does everything in one language (other than English) and doesn't sell/license their code at all
 
9:45 PM
@CatPlusPlus Again, Amen to that
 
@Drknezz there is essentially no difference here
 
I've found some classmates with trouble understanding English. I never found any one that showed good programming potential but was hurt by their poor English skills.
 
@RMartinhoFernandes English is not really an issue when it comes to programming.... interfacing with other programmers CAN be
 
user457812
@RMartinhoFernandes Would you want them as a co-worker if they showed no signs of improving their English?
 
@RMartinhoFernandes so they have no trouble adapting to an english-only (in code at least) environment? That's a good thing if so.
 
9:47 PM
@nil If they didn't bother with it? No. I have no use for people that don't want to learn.
 
I have no doubt that if the de facto standard language for programming was other than English, Americans would use it anyway...predictably.
 
Esperanto!
Joke.
Gosh, that would be horrible.
 
I'm guessing maybe the French probably code in their language.. :)
 
@RMartinhoFernandes Seems to me i am not using your code correctly, at least according to roubaixinteractive.com/PlayGround/Binary_Conversion/… and my own verification. Mind having another peek please? pastebin.com/ii0kCDfs
 
user457812
Esperanto is a beautiful language made from purpose and ... ok, I can't do that.
 
9:50 PM
@RMartinhoFernandes I remember reading something on Wikipedia about the number of native Esperanto speakers in the world. Apparently some people can't let go.
 
And suddenly... CIn[X] Appears (Replace X with your favorite language)
 
@Drknezz My code treats the lowest bit (the one that values 2^0) as bit 0, and the highest bit (the one that values 2^7) as bit 7. Maybe that's relevant?
 
A boost library that take the language as a parameter
 
user457812
This totally doesn't support elvish!
 
I want to code in Thalassian XD
 
9:55 PM
Any ideas why my code is acting different when on Win 7/8
 
@KianMayne What code?
 
@FredOverflow A chat server
 
I mean, can we see the code?
 
When the external client receives a message boom it's down
It's long
and messy in places
 
@KianMayne C#//C++?
 
9:59 PM
Is there a way to force Flash to check for updates?
This crap is annoying me.
 

« first day (400 days earlier)      last day (4566 days later) »