« first day (691 days earlier)      last day (4247 days later) » 

4:00 PM
@R.MartinhoFernandes Maybe, but you were talking about just any old format
 
Also, an XML reader is a very vague and useless tool.
 
Just demonstrating xml has its advantages
I'd still prefer simpler formats if I could do that instead though
 
An XML reader that can read any XML file cannot do much useful with it.
 
@R.MartinhoFernandes well, a text editor that can comprehend folding tags is nice
 
Xeo
@R.MartinhoFernandes Well, maybe they have? Like, some config stuff. I personally would use JSON in an case, but oh well
 
4:01 PM
@DeadMG Then you should explain that instead.
 
Oh god, real estate agents are such douchebags
 
Xeo
@R.MartinhoFernandes It can make a data tree out of it!
 
@LuchianGrigore ?
 
Am I the only one who thinks this is photoshopped?
 
4:01 PM
@Xeo I prefer JSON on the web by far
 
Xeo
no
 
oh right, yeah, totally real
 
@Neil I'm not certain what you two are debating
@LuchianGrigore highly
 
@thecoshman Just like a bucket of water is nice in Hell. I don't believe humans should be writing XML in the first place. I'm sure you'll agree it sucks for that.
 
@LuchianGrigore lol
 
4:02 PM
where's Cameron Diaz when you need her?
 
@LuchianGrigore Pretty sure that the wallpaper doesn't have words written all over it.
 
@LuchianGrigore Photoshop so bad!
 
@LuchianGrigore Either 'shopped or very unusual. Obvious example: the clock looks round, but should look oval being viewed at an angle.
 
@Xeo Right. That's all.
 
@R.MartinhoFernandes true, but I do sometimes need to read through it. though usually I do just fire it through grep
 
4:03 PM
@JerryCoffin the perspective of the couch doesn't match the walls
 
@MooingDuck @R.MartinhoFernandes sees no advantage in XML format. I'm saying there are advantages, even if very few
 
If it's data with a known structure, you need to write a program to convert it any other known structure anyway, regardless of format.
 
@Neil not over json
 
second :))
 
4:03 PM
@Neil Which ones?
 
@MooingDuck That's not the argument
 
Xeo
@R.MartinhoFernandes And the program can then use that tree. I once wrote an XML parser myself that does exactly and only that (for a C++ exam where we got the data in XML format and had the choice to either write it outselves or use some ready-made XML parser)
 
couch, the lamp, the picture on the wall... FFS...
 
Xeo
And then used the tree to make build up a network of connected train stations
 
@R.MartinhoFernandes Is that a subtle argument or a genuine question?
 
4:04 PM
As if you're not gonna go there and see half the stuff isn't real
 
@Neil A genuine question. I missed them.
Or maybe I don't understand that "program exists" one.
@Xeo To do what? It's a tree with meaningless strings.
 
Xeo
@MooingDuck There actually are, error reporting in the case of a broken XML. It can tell exactly where the end tag is missing or something, while it's a bit harder with JSON
 
@Xeo ah, true. so xml does have an advantage.
 
@R.MartinhoFernandes Rather than have to write a program to parse your own file, you can use XML parsers which already exist and transform xml files without having to write a custom program
 
@Neil And those XML parsers give you a tree of meaningless strings.
 
4:06 PM
@Neil that also applies to json and protobuffs
 
@Xeo If it can truly tell you exactly where it's missing, doesn't that prove that the end-tag is 100% redundant?
 
You still have to build meaning out of them.
 
@MooingDuck That's besides the point
 
Xeo
@JerryCoffin :)
 
@JerryCoffin no, because otherwise you'd have no idea what was missing, only that there's an error somewhere
 
Ell
4:06 PM
@R.MartinhoFernandes you would have to build meaning out of a binary format too?
 
@Ell Obviously. It's not an advantage of either.
 
@Neil I thought that was his point. xml vs protobuffs for machine-to-machine
 
@Neil The problem is that in most cases, interfacing to an exising XML parser is more work than parsing a sane format on your own.
 
@R.MartinhoFernandes There are xml parsers that have type support, but in any case, that would be the same if you read a string from a file
 
Protobufs have type support too (they're built around it, actually). That's not an advantage of XML
 
4:07 PM
@MooingDuck Why would I claim protobuffs or json is better than xml? I use json myself
 
Ell
@R.MartinhoFernandes sorry I thought you were implying binary data would automatically have value
 
Xeo
@R.MartinhoFernandes Think so? I don't see how that is true. Or do you mean I need to transform the data anyways, and that I should've transformed from the get-go without building a tree of strings first?
 
That doesn't bunk the argument that xml has advantages over, say.. nothing at all
 
@Neil R.Martinho is claiming that, not you
 
@DeadMG The example for templates is great.
 
4:08 PM
@JerryCoffin Sometimes yes, depends on if you're working with structured data
 
@Neil nobody has disagreed with you about that
 
@Neil Meh, then this is a meaningless discussion.
 
Ell
We knew that already
 
If it's for humans there are saner formats. If it's for machines there are more efficient and saner formats as well.
 
@MooingDuck No, he's bashing xml. I'm not going to pretend xml is better than everything
 
4:09 PM
The only use for XML is to interface with existing XML interfaces (SOAP web services, for example).
 
@kbok I think it led in well from the previous example.
 
@R.MartinhoFernandes So according to you, XML shouldn't exist, but it simply does anyway?
 
@Neil More or less, yes.
 
@Neil I think R.Martinho is asking you to show that it's the best at anything at all
 
Ell
4:10 PM
I want YAML with multimaps
 
Oh, and Protobufs can handle non-tree-like data.
 
@R.MartinhoFernandes <ALL_THE_THINGS>XML</ALL_THE_THINGS>
 
@MooingDuck The discussion started without Protobuff or json, hence if you ask "why use xml?" then obviously there is a reason why or it wouldn't exist
Is there something better? Yes. And so?
 
As I said a while back, it's attempting to compromise, not to be the best at one thing. Unfortunately, it's a lousy compromise that ends up lousy at anything.
 
¬_¬ stupid typos
 
4:11 PM
@Neil There's no reason to prefer XML ever.
 
@R.MartinhoFernandes other than compatability with existing XML
 
For every reason you could want to pick it, there's a better tool.
@MooingDuck Right.
 
Ell
Personal preference?
 
@Ell XML=bad is not an uncommon train of thought.
 
Well I'm home now
 
4:12 PM
@Ell That's not a good engineering practice.
 
And yet it exists.. what a paradox
 
Ell
I don't see what's so bad about xml personally
 
@Neil lots of technical things exist which turned out to be bad ideas
 
Ell
4:13 PM
like c++ :D
 
@Neil not really, lots of mistakes are made, XML is one of them
 
@Ell overly verbose is the big thing.
 
Funny thing is, XML spread like wildfire when it came out first
 
@R.MartinhoFernandes Sure there is -- to satisfy a buzzword-happy boss, who's 15 years out of date, so he's convinced that XML is "the next big thing". So, you use it simply: <myformat>binary_data</myformat>
 
and everyone started using it
 
4:13 PM
@JerryCoffin heh, yes.
 
@MooingDuck But can you say there exist technologies that were created to fulfill no reason in particular?
 
MS went on a mashoosive XML implement all in XML shitty spree
 
@JerryCoffin :) Sadly the binary data needs to encoded.
 
@Neil no, they're just terrible at those reasons, and so nobody uses them, because they should not be used, because they are bad.
 
Ell
xml has xPath, which I think is neat
 
4:14 PM
@MooingDuck Right, my point. XML offered something that nobody else had. Hence, it offers advantages. QED
 
@R.MartinhoFernandes True -- but base64 (for example) is pretty easy without being horribly inefficient.
 
@Neil so did FORTRAN
 
@MooingDuck You say that like you're making a point.
 
@Neil Maybe you mean it had advantages?
 
4:15 PM
@Neil there's no reason to use FORTRAN now other than backwards compatability with existing FORTRAN
 
Ell
nobody wants to talk about xpath? :'(
 
@R.MartinhoFernandes The technology hasn't changed, so its advantages haven't changed.
 
@Neil Not really. Everything XML offered already existed (e.g., S-expressions), but the people who advocated it didn't recognize those pre-existing solutions or the fact that they were doing nothing new.
 
@Neil it's been replaced
 
@Neil They became irrelevant, superseded.
 
4:16 PM
The whole discussion is centered around "Why use XML? It doesn't have advantages." I have proven they have advantages. That's all I'm after. Not saying you'd prefer XML
 
I guess XML comes from a time where people thought that complexity was a good thing.
 
how long has XML been around?
 
@ereOn to a point it is.
 
@Neil You haven't shown a single strong reason to use XML (and ironically, I have).
 
@Neil you've shown that it has advantages over nothing at all
 
4:17 PM
if you are the only person in your company who understands how a complex system works, they are not going to hurry to get rid of you
 
@TonyTheLion 9999999999 nanoseconds
 
@R.MartinhoFernandes Sigh, see above. I'm not trying to show why you should use XML. Stop putting words in my mouth.
 
@thecoshman: Well, that also prevents any promotion.
 
Ell
@TonyTheLion xml has never been round. it uses <angled> brackets ;)
 
@MooingDuck Actually Fortran is probably more excusable than XML. In practice, it's really hard to find another language that can match Fortran for raw speed in its area. C++ is about as close as you can get, and even Intel's C++ compiler is still slower than (for an obvious comparison) Intel's Fortran compiler.
 
4:17 PM
@ereOn means you can kick back and take it easy
 
@Neil "Why use XML?" seems like that to me.
 
security through obscurity
 
@thecoshman: I did that the past 2 years. Turned out to be boring.
 
Ell
@JerryCoffin I wonder what makes fortran so fast. i didn't think you could get any closer to the metal than what c++ produces
 
@ereOn yeah it kind of is :(
stupid open plan, can't slack of properly
 
4:18 PM
@Ell Better aliasing prevention.
 
@JerryCoffin so you're saying that FORTRAN has more reason to exist than XML, and yet I've never met anyone who still does FORTRAN...
@Ell no recursion or aliasing (origionally)
 
@Ell Big advantage over C++ is lack of aliasing, which makes enregistering much easier/more effective.
 
Ell
hmm I don't know what aliasing is.
 
@MooingDuck Exactly.
 
Q: Why use XML?
A: To interact with existing XML interfaces.
Not
Q: Why use XML?
A: Because it can do stuff in a mediocre manner.
Nor
Q: Why use XML?
A: Because it filled a hole years ago.
 
4:19 PM
@R.MartinhoFernandes If your plane crashes in the middle of nowhere and all you have to eat are saltine crackers. Despite being tasteless and generally unappetizing, you cannot deny that it still offers a reason to be eaten.
 
XML is everywhere. So are Java and PHP. And I bet no one here will say the last two are a good thing.
 
@MooingDuck I know some people who do. Legacy systems in banks and medical institutions.
 
Just because you don't want to eat saltines if you have another choice doesn't mean saltines have zero value
 
@Ell Basically, it's the idea that one variable might change another, so you cannot cache reads and writes to them.
 
@Neil All I have to eat is not XML. That's what makes XML worthless.
 
4:19 PM
you'll need a code sample
 
@Ell two pointers point at the same thing, or overlapping regions
 
Ell
@ereOn I like java :P
 
New topic proposal: All your codes are belong to us!
 
I had to help a friend of mine the other day, she was writing a python wrapper for an old fortran library
 
@Ell: Just to piss me right ?! :p
 
4:20 PM
@Ell If I have something like f(int *, int *);, the pointers might point to the same memory, so when I write via one, I have to read from memory via the other, in case what I just wrote happens to be the same data. Without that, I could save it in a register instead.
 
Ell
@ereOn No, I actually like it :L orr maybe it's the JVM. don't know.
 
@R.MartinhoFernandes I see you're never going to get my point
 
@Neil But you can't eat XML
 
Ell
Ahh I understand aliasing
 
4:21 PM
room topic changed to Lounge<C++>: Are you pondering what I'm pondering? [c++] [c++11] [c++-faq] [pinky]
 
in this case, *one can't be cached, because it might be the same as two. If it is, and I cached it, I'd change the behaviour of the program.
 
@Ell I can't blame you. A lot of my friends do and... well they are still my friends :)
 
references are much better at this
 
@Ell LOL
 
@Neil What is it? That if I have no choice but to use XML it has advantages?
 
4:22 PM
any way, I've sat around for an extra hour :P time to go home
 
@Neil It would be easier to get if you actually had one.
 
peace out!
 
JSON is way simpler and its logic is simple to implement (especially compared to XML's one) but I haven't seen any decent implementation of a JSON parser/producer in C++.
 
Ell
@thecoshman bye now :)
 
@R.MartinhoFernandes his point is that XML is better than nothing at all
 
Ell
4:22 PM
I still think YAML with multimaps would own
 
@thecoshman very productive there :)
 
@R.MartinhoFernandes That if at one point, xml fulfilled a purpose, that purpose is still there, regardless of whether or not there are other choices.
 
@ereOn you haven't looked hard enough
 
@MooingDuck: Caring to share a reference ? :D
 
So, a tautology.
Ok.
 
4:23 PM
Boost::Spirit ones doesn't count.
 
@ereOn Mostly from a time when people were thinking: "Look, it's the web! Everything for the web must be shiny and new!"
 
Advantages over other technologies, it doesn't have any. But it has advantages. It's the difference between extrinsic value and intrinsic value.
 
163
Q: What's the best C++ JSON parser?

Sam BakerI've seen the C++ JSON links on www.json.org but would like some feedback on which parser people prefer - for reliability, speed and ease of use. Thanks, Sam

 
Have you ever tried to compile it ?
 
Right, semantics.
 
4:24 PM
@ereOn I don't think you actually need a library for it, just overload << to save as json and you're done.
 
I did, and it doesn't pass through -Wall, -Werror
 
@R.MartinhoFernandes Most modern libraries have lots of advantages and few disadvantages. If I wanted to, I could simply use another library, however I'd be daft to claim that one such library has no advantages because I prefer another
 
@Neil aren't "advantages" always relative?
 
As I learned it, you have advantages over something else.
 
@MooingDuck: For producing, perhaps. For parsing I strongly disagree.
 
4:26 PM
But we're now discussing semantics.
 
@MooingDuck Yes. And this argument is futile since we're arguing over semantics now
 
@ereOn oh, right, >> is harder
 
I guess one could compare XML and nothing.
 
@ereOn Well we had started with the idea of using XML or writing your own parser
 
So could I with PHP actually : PHP is better than noth... wait nevermind. My theory doesn't hold.
 
4:27 PM
@ereOn not really, "nothing" is not an encoding
 
And that sure as hell has advantages over writing your own parser
 
@Neil: Had you considered other alternatives at the time ?
Wasn't JSON an option ?
 
@Neil oh, I hadn't heard that context in the time I've been on. Yeah, XML is way better than in-house. :/
 
@ereOn If the discussion is advantages xml has over writing your own, then json has nothing to do with it
 
Xeo
@Neil And why was it stuck to XML?
 
4:29 PM
@Neil: Sure. But is that a real situation ? Where you only have a choice between two poor solutions to solve a problem ?
"You have to write this website. You will have to choose between QBASIC and Excel 2003"
 
@ereOn That sounds like voting for the US president, two bad options.
 
@Chimera: Haha
 
@ereOn QBASIC rocks!
 
@MooingDuck FTR, I also missed the "writing your own parser" part (and I can't find it in the transcript) AFAICT, no one mentioned that until the end.
 
QBASIC rocked
 
4:30 PM
@ereOn That's actually an interesting question.
 
@ereOn It's an argument. If I wanted to write a program which needed this technology, I'd be doing so and not talking on this chatroom.
 
@Neil Boo! Party pooper!
 
My point is : is it worth to debate over something that can't possibly happen ?
 
@ereOn You going to ask that here, of all places? Really?
 
Got to go.
 
4:32 PM
woof fuckaz
 
@Neil yeah, now that you mention the alternative of a custom parser, everything you've been saying suddenly makes sense. You should have mentioned that earlier. :(
 
@DeadMG Woof to the woof!
cya ereOn
 
@ereOn hehehe
 
@MooingDuck I thought I had been. :(
 
@ereOn QBASIC emulator running on a webserver, totally could be done.
 
4:33 PM
Anyway, whistle has blown, I'm out.
 
Xeo
hmm, recursive std::functions...
Can you somehow get those to work?
 
sure
 
This again?
 
Xeo
aka using functor = std::function<functor(T)>
 
Ell
4:34 PM
don't you need a y combinator?
 
@Xeo That's an infinite type.
 
std::function<sig> f;
f = [&](...)->... { blah blah; f(shit); return some other shit; };
 
Xeo
:s
 
@Xeo What kind of function could possibly have that signature?
 
Xeo
2
Q: How can I get a boost::function that returns itself?

ManaguI've recently become enamored with the simplicity of Erlang's actor-based concurrency model, and am playing around with ideas for implementing some parts of it in C++. Along these lines, I also like the idea of implementing a finite state machine as a collection of functions representing states,...

 
4:35 PM
Pretend for a moment you can name that type. Make me an instance.
 
@Xeo No more than you can do something like that with a function pointer.
 
Recursive variant comes to mind for some reason.
 
Xeo
@StackedCrooked exactly
But that thing can cheat with recursive_wrapper and newing the data internally
 
@StackedCrooked There's a difference.
using is aliasing.
 
Xeo
That won't be pretty for a return value
 
4:38 PM
Recursive variants use wrappers.
Just make a good ole function object.
 
An OLE function object? :P
 
struct egoist {
    egoist const& operator()() const { return *this; }
};
 
@R.MartinhoFernandes I like them function objects. Never failed me yet.
 
Xeo
functor foo(T); functor bar(T); functor baz(T);
functor foo(T){ return bar; }
functor bar(T){ return baz; }
functor baz(T){ return foo; }
robot, ^
 
lol
 
Xeo
4:40 PM
cyclic state switching
@R.MartinhoFernandes you don't return the same function / functor every time
 
user image
2
 
Xeo
Oh, wait.
 
funny pic dump
 
@Xeo That doesn't return itself, but well. My point was to get you to reach the conclusion you can do it if you have the name already, and then BAM! function object.
 
I DON'T GET IT
 
Xeo
4:42 PM
mm, yeah
 
@DeadMG Information technology?
@kbok Dude has two copies.
 
@StackedCrooked So confuzzling
 
What is it that you find confusing?
 
@StackedCrooked What makes the picture even remotely funny.
 
4:46 PM
@DeadMG Btw, boss agreed to add TBB in our codebase :)
 
@StackedCrooked That's le good news.
locking your own mutexes is about equivalent to freeing your own memory on the code suicide-o-meter.
 
is "T *const" convertable to "const T* const"?
 
Did you add const? Then yes.
 
An issue we are experiencing is that low-priority threads can't obtain a lock on the global logging mutex. So they hang. Lockless queue should fix that.
 
@StackedCrooked Maybe -- but while "lockless" eliminates deadlocks, it does not eliminate starvation.
 
4:49 PM
@StackedCrooked It's my understanding that their concurrent_queue classes are intended for MPMC uses- i.e., maximum flexibility.
so it shouldn't be possible for you to get an error (no performance guarantee) calling their functions willy-nilly.
 
@JerryCoffin There are many issues.. I'm like the code-improvement-person there.
 
@StackedCrooked Yeah, I kind of got that impression.
 
Uh-uh.
Recipe for trouble.
 
So I do better learning a new language if I have a project to do using the language I am using. What would be a good C++ application to write?
 
4:53 PM
@StackedCrooked That's not even a recipe for disaster -- that's disaster already happening.
 
It's not my problem :)
 
@Chimera Think of something on the computer that's frustrating, and write something that does it better. A lot depends on what sort of things you want to learn though.
 
@Chimera I have a bunch of project ideas on my backburner. I'm not sure if you'll be interested, though :) They're quite vague too.
 
@JerryCoffin Ok, will give that some thought.
I think maybe writing a Usenet news reader.....
 
4:56 PM
What does MPMC stand for exactly?
 
multiple producer, multiple consumer
 
I see.
 
some lockless queue designs only permit one thread to produce or consume (or both) for increased speed
 
I'm using it for MPSC.
 
as usual, better to use the nice safe generic container unless you can prove the speed is essential
 
4:58 PM
@DeadMG ...and given that you're dealing with logging, the logging itself will almost inevitably be the bottleneck, not the consumer side of the queue.
 
yep
 

« first day (691 days earlier)      last day (4247 days later) »