« first day (475 days earlier)      last day (4466 days later) » 

11:00 PM
I'll watch the rest later.
Time to do something productive.
 
typename Iter::value_type becomes ValueType<Iter>. I wonder if that's a template alias or something else.
Ah, sounds like a template alias :) Bjarne approves.
 
@RMartinhoFernandes yeah, Andrei used that too
 
meh, variadic templates are quite interesting ;)
 
meh. you say that a lot
 
meh, I'm in a "meh" mood
 
11:10 PM
I have got to stop optimizing my muldiv function that doesn't work :/
 
why are you optimizing something that doesn't work?
 
Xeo
11:21 PM
> You can Google it- sorry, Bing.
 
Xeo
The talk was/is a bit dry imho. :/
 
Hehe, he's using constexpr bool functions.
 
wow I"m finally understanding variadic templates
 
Xeo
GAAHH, my computer is dying again!!
 
11:23 PM
Weird_case looks ugly.
 
Xeo
It looks weird. :P
 
anyone who's good at qt here?
have a few questions about the best way of building something
 
@MooingDuck MulDiv is one of those operations that you really can't hack at it until it "seems" to work. You really have to step through it line-by-line and run a mathematical proof of everything. Or you'll get slammed with some (rare) ugly corner case.
 
9,000 test cases is preliminary work
 
@Mysticial I got it to work, and then realized it fails (obviously) when done with signed types.
 
11:26 PM
Hi there, we are doing a research about a business application and C++ has come up as a good idea
 
lol, someone mentioning std::rel_ops uselessness.
 
does someone have something to say for a better path?
I mean, we have experience with C++ on different field
 
> if is, among other things, a mechanism for random hacking.
 
what is the best way of developing such an application with c++? Qt? wxWidgets
 
Xeo
Well... we know nothing of your business application, so how could we recommend something?
 
11:29 PM
@MooingDuck In that case, you can just trap the negative values and handle them separately?
 
we need to use controls which have rich interface like data grids
 
@Mysticial it's template code, so it's trickier. But yes.
 
I think you'd actually have to do that. There's no clean way to directly do a long signed division.
 
which of them is best for customizable gui?
 
java would be better for business apps
also qt is nice for it too
 
11:30 PM
@Mysticial the trickier part is actually the mulitiplication, since it (effectively) uses arbitrary arithmetic for the multiplication. Which doesn't work with signed types.
 
Xeo
enable_if can emulate it better than static_assert
 
Xeo
Twitter it!
 
we have some demanding requirements which managed languages have failed to accomplish
 
Xeo
Damn
 
11:31 PM
You can never relate enable_if with static_assert. A hard error is not the same as a soft error.
 
ok, so go for qt then
 
@MooingDuck Yes, you'd need some way to get the unsigned type of the same size.
 
A 'no matching overload found' error is worse than a long error stack.
 
Xeo
@LucDanton You don't want the function if the input doesn't satisfy your requirements. And the report is much better than a static_assert
 
@Mysticial std::make_unsigned comes in handy
 
11:31 PM
@LucDanton Concepts can be used to resolve overloads. You can't emulate that with static_assert .
 
should a class that manages the creation/destruction of another process be copy constructable?
 
Xeo
@LucDanton IMHO, it's the other way around. But that's personal opinion.
 
I do want to have a collection of these things
 
do you believe QT will not eat all the application up on its concept?
 
as I have a number of these processes being spawned
 
Xeo
11:32 PM
No need for copy ctorable if you need a collection
They can be move-only like unique_ptr
 
@RMartinhoFernandes As soon as overloads are involved static_assert is not an option, yes. That's why you can't relate enable_if with static_assert: different results, different uses.
 
Is it meaningful to make a copy of it?
 
not even if you put it in a std::vector?
 
it depends how do you manage it.
 
Xeo
Nope
 
11:32 PM
It's extremely silly to claim that the one is better than the other. That's my point from the start.
 
Scrolling too fast.
 
Xeo
You can have a std::vector<std::unique_ptr<T>> just fine
 
how would you base your app?
 
Xeo
So, 30min pause
 
@LucDanton The claim was that it emulates the concepts thing better. Not that it was better in general.
 
11:33 PM
@Xeo then I'd have to implement unique_ptr because I have can't use boost, and not using C++0x
 
we want to make it cross-platform, using every standard resources like stl
 
Xeo
Oh, C++03? Well, you're fucked then.
C++03 does require CopyConstructible
 
@RMartinhoFernandes If you have a concepted template with no overloads, are you going to use enable_if or static_assert?
 
@Xeo that's what I thought
 
well it depends just on the realization then
 
11:34 PM
hmmm
 
but we need to choose some library for GUI with cross-platform capabilities
 
but for a better coding, try using dp
 
so I could write an implementation of unique_ptr no?
 
@LucDanton static_assert. But that's a specific case. You can cover all cases with enable_if and crappy errors.
 
what do you mean by dp?
 
11:35 PM
there are a lots of gui libs available.
 
boost::ptr_vector?
 
or I could just be nasty and use raw pointers in my vector
to avoid copying?
@RMartinhoFernandes no boost
 
Pootervector.
 
Xeo
@TonyTheLion Sure
 
11:35 PM
design patterns to handle your code in a proper way
 
It's just std::vector<T*> that manages pointers.
 
@RMartinhoFernandes See, you agree with me. The two useful at completely different things. You can't relate them.
 
@TonyTheLion Well, "implement boost::ptr_vector". That better?
 
opengl glut is nice gui lib
 
@RMartinhoFernandes sounds hard :(
 
11:36 PM
@TonyTheLion It's mostly just a wrapper around vector<T*> that deletes all pointers on the destructor.
 
@TonyTheLion Are you man or lion?
 
If you don't want to pollute your template definition with static_assert I believe you can use a technique such as template</* stuff */, bool = requires</* stuff */>()> .... but I haven't refined the technique just yet.
 
GLUT is horrible and outdated.
 
Who mentioned GLUT?
 
And primitive as hell. It's more of basic windowing than GUI library.
 
11:37 PM
(The technique resting on constexpr functions being permitted to have a static_assert but I'm not sure on that.)
 
@LucDanton It works. I hope it's allowed, but I didn't check. (It'd be silly to forbid it, IMO).
 
finally involved :) @CatPlusPlus
 
@RMartinhoFernandes The silly thing is that I'm using concept-enforced signatures with such a requires but I haven't checked what happens with a concept violation.
 
I was joking just to make them in, qT would be your best option for gui
 
what design patterns are applicable for doing this with QT or wxWidgets?
 
11:38 PM
it depends on the implementation of your app
 
@LucDanton Ok, that's really silly.
 
The "application" design pattern.
 
@ClaudioJunior you talk like a businessperson and not a programmer. Do you code much?
 
Where you write an application.
 
what would you like to make?
 
11:39 PM
@LewsTherin sometimes I'm a man :(
 
Yay, GHC finished building.
 
@RMartinhoFernandes I did that in passing.
 
I have no experience in building windows application
i know some windows applications have models like MVC ou MVVC
 
@TonyTheLion Some sort of lion you are xD
 
what I mean is, is there some kind of documented pattern that can be applied with those libs for better code?
 
11:41 PM
ye, basically all business app are on MVC
 
Gah, patterns again.
 
Almighty patterns.
 
it's a little harder, 'cause every pattern has it's own way to deal with a code.
I don't know what exactly you are doing and how would you like to process it
 
You do not shop for patterns, dammit.
 
therefore I am not in a position to tell you what dp suits best your needs.
 
11:42 PM
do you believe it's beneficial to use them on that instance for some application using those gui libraries
??
what dp do you suggests?
 
you on every instance it's beneficial. ;)
 
Has anyone really been far even as decided to use even go want to do look more like?
 
@ClaudioJunior no, every library has it's own pattern. Choose a library, and follow it's pattern.
 
I see
 
11:43 PM
patterns...
gives me shivers
 
there is a lot of dps, check out the list on en.wikipedia.org/wiki/Design_Patterns
 
no, that's cause I'm cold, lol
 
I will check
 
@MooingDuck , what are you talking about?
 
which of the two libraries are more flexible for doing some control customization?
 
11:45 PM
@DzekTrek he asked if there design patterns for those libraries to make better code.
 
no, he wanted dp to make his own implementation of bus app
he never asked about modifying existing gui libs
which is dubious
 
Singleton.
You can never go wrong with Singleton.
 
yeah
dzek trek is right
 
look
 
See above.
 
11:46 PM
I do not want to create a brand new gui
I just want to use it in a good way with slight modifications
like changes on data grids for demanding customers
 
qt use iterators, template algorithms and so on and so forth but have a different iterator mode, so called point-between-elements.
 
Qt has standard iterators.
 
you can use any advantage of your qt any time, you just need to make sure that you write control part based on your model, view part leave to qT to handle for.
 
Rgh. This entire refactoring thing is pointless and doomed.
 
that's what I want
 
11:49 PM
@CatPlusPlus Took you a while to realize.
 
There's always hope!
 
hey does any one recommend some known dps?
 
@ClaudioJunior all of them
 
names please, I am begging you
 
I don't know exactly what are you doing. Every dp is used for some specific reason, none of them is there just to be there.
 
11:50 PM
Singleton is great.
 
some solid suggestion
 
Unless, of course, you're dealing with 30k SLOC C++ game that begs for rewrite.
Then there is no hope.
 
what kind of app are you making?
 
@ClaudioJunior What we're trying to tell you for the last 30 minutes is that you can't ask for design patterns. It's meaningless.
 
what is it about?
 
11:51 PM
What's dps? Feel like it's something I should know...
 
business application
 
@ClaudioJunior Claudio. Your requests don't make sense. Each design pattern solves a problem. You should know how to use all of them, and shouldn't use any of them unless needed.
@Mysticial design patterns
 
lol, ok, but in the terms of implementation? What did you want to implement?
 
"Oh, I want to build a car. What kind of an elephant do I need?"
 
ah
 
11:52 PM
@Mysticial No, it's not.
 
No?
 
I want to build a cross-platform application for a point-of-sale application
 
@Mysticial damage per second. Also known as EPEEN.
 
7 min... to get 1 upvote... why do I always get stuck at 195 at the end of the day.... argh...
 
but we have a team do manage and we do not have experience writing gui application
 
11:53 PM
well once awhile I handled cross platforming with Adapter
 
Damage per second is never abbreviated as DP.
 
@MooingDuck You're right, that's the first one that shows up when I google it... lol
along with a billion other things
 
we have seen wxWidgets or QT as the as good solutions
 
Xeo
@Mysticial Damn rep whores in here. :P
 
@CatPlusPlus he asked for dps, and Mystical asked what's dps
 
11:54 PM
Oh.
Well, good thing he didn't Google for DP.
 
@Mysticial I menat that it's not something you need to know.
 
In computer programming, the adapter pattern (often referred to as the wrapper pattern or simply a wrapper) is a design pattern that translates one interface for a class into a compatible interface. An adapter allows classes to work together that normally could not because of incompatible interfaces, by providing its interface to clients while using the original interface. The adapter translates calls to its interface into calls to the original interface, and the amount of code necessary to do this is typically small. The adapter is also responsible for transforming data into appropriate ...
 
@Xeo Was that you? *I'm actually badge whoring...
 
@CatPlusPlus yeah, that's... different
 
once I hit 150, I'm not answering a single newbie question again...
 
11:55 PM
we want some good way of developing using one of these gui libraries
 
Xeo
@Mysticial I'm too lazy to hit softcap lately
 
ok, so go for it
 
hg reeeeeeeeeeeeeeeeeeevert.
 
Here's a good technique for writing great code: thinking.
3
 
Well, actually it'll probably be better to just clone fresh.
 
11:56 PM
@Xeo I don't usually try to softcap unless I wake up in the morning with a lot of residuals.
 
Wait, what's that in the stream?
 
@ClaudioJunior (1) hire good programmers (2) Fire bad programmers. If they ask what design patterns they should use, fire them.
 
Xeo
Good question?
 
0
A: Return one dimension of an array?

R. Martinho FernandesSince none of the other answers here return an actual array (pointers are not arrays), I thought I might show how to really return an array. Or the closest thing possible, which is a reference to an array. typedef int row_type[8]; row_type& MapManager::getMapX(int x) { return map[x]; }

 
ok, but we live in place where good c++ programmers are not available
 
11:57 PM
@RMartinhoFernandes We should call it a Thinking pattern.
 
I tried to sound clever.
 
@RMartinhoFernandes drums?
 
Then don't use C++.
 
@ClaudioJunior then don't program there. Go into marketing.
 
@ClaudioJunior Then I'm going to be brutally honest: your C++ project is doomed to failure if you don't have good C++ programmers.
 
11:57 PM
ask for help online, I am sure there is many freelancers over here on the net
 
You'll end up with terrible codebase regardless of how many "wonderful" patterns you use.
 
@RMartinhoFernandes you meant that for Claudio?
 
I though that was a chat about c++, not marketing
 
@RMartinhoFernandes Not only C++ projects of mine are doomed. :P
 
11:58 PM
can someone help, people, I appreciate
 
Scrolling too freaking fast.
 
ok, in what way?
 
We are making research
 
@ClaudioJunior we cannot help you with this. Your team actually needs to learn how to program before you can program.
 
Use a language your developers are familiar with.
And if they're not familiar with any, then well.
Pick a simplest, and maybe you'll live.
Don't expect the code to be alive for longer than few months, though.
 
11:59 PM
@RMartinhoFernandes I was waiting for someone to give answer like that. Have my boat. :)
 
Using C++ for a large project when you don't have at least a few decent C++ developers is suicide (a time and money sink)
 

« first day (475 days earlier)      last day (4466 days later) »