« first day (1093 days earlier)      last day (3854 days later) » 

Jon
12:00 PM
with range for, you can ignore them somewhat
deadmg, why do you dislike iterator parsers?
 
because iterators suck and ranges don't.
 
> C++'s iterators may be the single best concept in all of computer science, and I challenge anyone to find something more general and useful
 
Jon
that page is deleted
 
@DeadMG what are "ranges" anyway? do you mean a specific library like boost.range?
 
@Jon Yes, but people with some rep can still read it. I can take a screenshot for you, if you want.
 
12:04 PM
@FredOverflow Konrad is off his rocker.
also
he's really arguing for the concept of ranges.
 
Jon
thanks
 
Ell
@FredOverflow Hmm interesting
Were ranges simply not thought of when c++ adopted iterators?
@sehe I fixed that heap issue I had the other day, turns out I forgot to return on one of my functions
guess I should have -Wall on :P
Oh god there are more
How my code has been working without returns I don't know :P
 
12:21 PM
lol
 
@FredOverflow Holy shit, I can feel the passion! :P
 
user1804599
How do I cast an std::uint16_t to a unsigned char const[2] at compile-time?
 
@Ell Well, probably whatever junk happened to live inside eax was returned.
 
user1804599
As in, bitwise conversion.
 
@not-rightfold you can't. reinterpet_cast doesn't work at compile time
 
12:31 PM
@not-rightfold Big endian or little endian?
 
user1804599
@FredOverflow host byte-order.
 
That's probably impossible :)
Why do you think you need it?
 
what is the ... operator called in c++, its similar to the splat operator (unpacking) in python?
void emplace_back(Args&&... args);
 
Those are variadic templates. It means you can pass as many arguments as you want, of any type.
 
user1804599
@FredOverflow Well, I want to get the host byte order at compile-time. :P
 
user1804599
12:33 PM
Enum values need to be constant expressions.
 
user1804599
Wait, I know.
 
user1804599
__builtin_bswap16(42) == 42
 
huh?
 
user1804599
Wait nevermind lol.
 
user1804599
I need compile-time htons.
 
12:34 PM
9
A: C Macro definition to determine big endian or little endian machine?

cafIf you desperately want to use the preprocessor, you could abuse string literals: #include <stdint.h> #define IS_BIG_ENDIAN (*(uint16_t *)"\0\xff" < 0x100) In general though, you should try to write code that does not depend on the endianness of the host platform. Example of host-endiannes...

 
try #ifdef BIG_ENDIAN
 
user1804599
How about (!(union{uint16_t x;uint8_t y;}){1}.y)?
 
@not-rightfold nope. unions also doesn't work at compile-time
 
Ell
@not-rightfold why do you want to know this at compile time anyway?
 
@FredOverflow Wow. C++ is slowly becoming a really useful and usable language.
 
user1804599
12:35 PM
@Ell read one more message.
 
Ell
3 mins ago, by not-rightfold
Enum values need to be constant expressions.
?
 
welp. I refactored my code and now it doesn't work. time to write more tests...
 
Dictionary<String, Integer> dc=new Hashtable<String, Integer>(); <- Thats java, really pisses me off.
 
Map<String, Integer> dc = new HashMap<>();   // Java 7
 
@FredOverflow Or is that 8?
 
12:43 PM
Nope, that's definitely 7, I have already used it.
118
Q: What is the point of the diamond operator in Java 7?

tofarrThe diamond operator in java 7 allows code like the following: List<String> list = new LinkedList<>(); However in Java 5/6, I can simply write: List<String> list = new LinkedList(); My understanding of type erasure is that these are exactly the same. (The generic gets removed at runtime any...

 
Am I the only one thinking the raid that killed Bin Laden was one big lie?
 
No conspiracy theories, please.
 
@Telkitty猫咪咪 Bin Laden himself was one big lie.
 
Personally I think Laden was dead for several years before the raid
 
@Telkitty猫咪咪 I think it was all a big lie. I mean burial at sea?
da fuq?
 
12:45 PM
@Abyx I thought about that too ... unlikely though
 
@Telkitty猫咪咪 Well, the guy was dying from kidney disease, and his family was closely linked to powerful people on both sides, so erm, yea I dunno.
 
@GamesBrainiac burial @ sea = no trace for the body
 
@Telkitty猫咪咪 Exactly. I mean wtf?
 
no image or video either
But I believe Bin Laden was dead at the time of the raid
 
meh. who cares was/is he dead or not
 
12:50 PM
U.S. government did
saving face after spent billions of dollars
 
user1804599
Man I’m so bored.
 
@not-rightfold play a game, watch a movie, write an xml parser
 
seafood: you will never get any thing done the way you are going ...
 
user1804599
Three boring activities.
 
never enjoy the satisfaction of getting one project done well
 
12:59 PM
@not-rightfold hang yourself and you won't be bored anymore.
 
user1804599
Hanging yourself is boring.
 
Ell
@not-rightfold write a darwinian simulator
or some ai
 
@not-rightfold lies. just try it
 
user1804599
I want to work.
 
Ell
@not-rightfold haven't you got a job?
 
user1804599
1:02 PM
They’re closed on Sundays, shrimp.
 
Ell
buy some shrimp
 
user1804599
I’m going to clean my room.
 
user1804599
Fuck software.
 
user1804599
Done. :v
 
Ell
that was quick
 
user1804599
1:10 PM
I only had to do my bed and remove the clothes from the floor.
 
@AlexM., hai :)
 
hi there :)
 
Ell
1:30 PM
@not-rightfold since you're bored
what should I do about narrowing conversion warnings?
 
user1804599
Turn them into errors.
 
Ell
I want to use 0xff and stuff as char literals
 
user1804599
Use -Werror.
 
user1804599
static_cast<char>(0xff)
 
user1804599
Casts should be as ugly as possible.
 
Ell
1:30 PM
std::vector<char> data = {0xb9, 0xa4, 0xff, 0x12};
 
test fixtures ftw.
 
Ell
Ahh I can use '\xff'
 
2:01 PM
Hello
 
user1804599
Hello
 
Can someone help me in shared memory Posix ?
 
Ell
I can't
 
Okay :)
 
Ell
2:03 PM
Hmm. Do you have to commit adding a submodule in git?
 
Why doesn't C++ have the xor operator?
:(
 
Ell
it does
I think. I though it was ^?
 
Yes, it's ^
Unless you meant xor and not ^
 
user1804599
@Ell Duh.
 
Ell
I meant add.
but nvm
 
2:08 PM
@Ell That's the bitwise xor. I meant the logical xor, like || and &&.
 
Ohhh.
Operator ^^
:D
 
user1804599
@Jefffrey that’s !=.
 
user1804599
(true != true) == false
(false != false) == false
(true != false) == true
(false != true) == true
 
user1804599
Woop XOR.
 
Never realized that before :o
 
2:11 PM
Neither did I.
 
0xb8 & 0x3a | 0x22
 
Ell
2:26 PM
hm. I though c++ would generate a default operator== for structs/pod/whatever they called
 
im pretty sure only default and copy constructors get generated
 
A default operator== wouldn't work out very well.
 
Ell
Why not?
> error: wrong number of template arguments (154, should be 20)
Ah. Boost::variant doesn't appear to be variadic
 
2:46 PM
154!?!?!!?
 
Ell
They are byte codes :P
Well, sort of
they are different types of tags
 
3:03 PM
@Ell There's some option to set maximum number of parameters for variant, I think.
 
Ell
@Griwes I found one in the mpl limits
I'll try defining that
but at the minute something is causing my compilation either to not hault or take forever ....
 
user1804599
I just typed : πublic exception. :v
 
Ell
Or not. I think I have an infinite loop somewhere ...
 
@Ell Always run -Wall or run into a Wall
@Ell How applicable ^
 
Ell
3:19 PM
0x00007ffff72ec8b0 in __read_nocancel () at ../sysdeps/unix/syscall-template.S:82
82	../sysdeps/unix/syscall-template.S: No such file or directory.
 
@MohammadAliBaydoun That and DeMorgan's Law - indispensible
 
template<typename Ret, typename... Args>
void call(std::function<Ret(Level&, Args...)> f, Args... args) {
    f(parent, std::forward<Args>(args)...);
}
Never thought I'd have to do something like this :V
 
user1804599
3:35 PM
> /usr/local/include/gmpxx.h:2118:18: error: taking address of temporary [-fpermissive]
5
 
user1804599
ughwtf
 
@sehe How is your tail bone today ;_;
 
user1804599
How do I enable -fpermissive for a single header?
 
What is gmpxx? Some non-compliant bignum library?
 
user1804599
C++ interface to GMP.
 
user1804599
3:41 PM
It has always worked.
 
user1804599
I never got this warning before.
 
user1804599
Reinstalled it and the problem persists.
 
Can you show us line 2118?
 
user1804599
In file included from /usr/local/include/gmpxx.h:33:0,
                 from src/lex.hpp:7,
                 from src/main.cpp:2:
/usr/local/include/gmpxx.h: In function 'void __gmp_set_expr(mpq_ptr, const __gmp_expr<__mpz_struct [1], T>&)':
/usr/local/include/gmpxx.h:2118:18: error: taking address of temporary [-fpermissive]
   __gmp_set_expr(mpq_numref(q), expr);
                  ^
 
@Ell Why do you have 154 template arguments?
 
user1804599
3:43 PM
lol __.
 
.__.
:P
 
__
I want my eye back ,_,
 
@Ell Alternatively, \377 should also work. Or was that Java?
 
user1804599
3:49 PM
Even this doesn’t work:
 
user1804599
#pragma GCC diagnostic push
    #pragma GCC diagnostic ignored "-fpermissive"
    #include <gmpxx.h>
#pragma GCC diagnostic pop
 
Java generics are fucktards
 
I still think PHP is worse than Java
 
> It has become clear that OO zealots are afraid of data. They prefer statements or constructors to initialized tables. They won't write table-driven tests. Why is this? What mindset makes a multilevel type hierarchy with layered abstractions better than searching a three-line table? I once heard someone say he felt his job was to remove all while loops from everyone's code, replacing them with object stuff. Wat?
 
@FredOverflow Why are you reading all of this anti-OO rhetoric recently?
 
3:59 PM
Because I hate that "OO will save us from all computing sins" nonsense.
 

« first day (1093 days earlier)      last day (3854 days later) »