« first day (796 days earlier)      last day (4378 days later) » 

13:00
btw, IIRC I saw translated character names in MS Word
Your font selection sucks.
@R.MartinhoFernandes There are text-to-speech browser plugins that you can try :)
In C++03, can this code fail the following assertion ?

std::string ab = "ab";

assert(&ab[0] +1 == &ab[1]);
I think so.
Or maybe it can only fail in C++98.
How can it fail?
13:04
Damn... so I really can't rely on the fact that std::string storage is contiguous ?
@ereOn Absolutely you can.
@DeadMG: In C++03 ?
@StackedCrooked Hell++98 strings store the contents in reverse.
I have to support old compilers.
13:05
@ereOn In practice.
the reason the Committee Standardized the guarantee in.. 11, I think, or 03, is because they determined there was absolutely no other possible implementation that could meet all of the other requirements but was not contiguous.
So while possible, its rather unrealistic that I will ever face a situation where this can cause real harm to my program ?
I guess I can live with that.
IIRC, there were never any implementations that were not contiguous.
13:06
Thanks.
there's no harm in an emergency "assert"
but this is definitely something you can reasonably rely on
You know, sometimes I am scared by the things I come up with for Hell++.
I guess I could use std::vector<char> instead... but it feels wrong.
@ereOn Are there any compilers that do not implement it contiguously?
Not sure why.
13:07
You could put the assert there as a means to enforce it as a requirement. assert(&ab[0] +1 == &ab[1] || !"No weird compilers allowed!");
really, you won't come to harm depending on std::string's contiguity.
@StackedCrooked: I'm not sure how I would have to write this assertion: the one I gave was an example, but I deal with strings of undefined lengths, and I can't reasonably test the whole memory to be contiguous.
I suppose you could implement a fucked up string that has SSO, and when the string is large uses SSO for the start, and the heap for the rest.
assert(&s[0]+(s.size()-1) == &s[s.size()-1])
@ereOn In that case back to my prev question: are there any implementations that don't use contiguous memory? If yes, do you need to support those?
13:10
@StackedCrooked Are implementation that don't use contiguous memory standard compliant?
operator[] would do return i < sso_size? sso_buffer[i] : heap_buffer[i-sso_size];
@StackedCrooked: I absolutely don't know. I don't have an exhaustive list, and even if I did, I wouldn't know where to check for that.
@Griwes Not anymore.
Damned enter.
Isn't it implementation dependant ?
13:10
@R.MartinhoFernandes Since data(), right?
So, problem solved!
If you are a bad person you could implement your own string like this: struct string : std::vector<char> { /* add std::string methods */};
@StackedCrooked: I believe std::vector guarantees contiguity even in C++03
@ereOn Yes.
@StackedCrooked No.
I guess no worries then.
13:14
That's actually the reason of my question : is it worth going through such crazy constructs or is std::string contiguity good enough in practice.
it's definitely good enough in practice
@ereOn I think you got your answer already.
Absolutely.
;)
Also, since I'm on the topic : is it okay to use std::string to store "raw" bytes (I mean, not text) ?
I would say yes, since std::string doesn't really deal with text or encodings anyway.
@ereOn Use vector<uint8_t> for those.
I wonder, how does deque::push_front work?
13:16
It always seem more correct sematically.
@ereOn You can, but I would prefer vector for that.
Poco libraries use std::string to store incoming socket data (IIRC).
@StackedCrooked It puts an element at the start of the current first array, or pops up a new one if that is full.
I prefer vector for that.
@ereOn No
Basically because of overloading.
@R.MartinhoFernandes So the other elements need to move one position to the right?
13:18
Functions that take string usually assume some semantic meaning of text.
@StackedCrooked No.
It starts filling at the end of the first array?
@jalf so in theory, you could submit a request to the manager, perhaps setting the password, and you will get an email saying what machine to connect to and what username
the manager should be able to set up a user account on the machine, and get everything set up for you to log-in to
How often do you actually remember to #include <utility> for std::forward and std::move?
user142019
I always do that.
in stdafx.h ?
13:26
crap on a cracker!
user142019
FUCK YOU SO CHAT IF I HIT ESCAPE I DON'T WANT YOU TO DELETE MY FUCKING MESSAGE YOU PIECE OF SHIT
the last of the people on my team who have the faintest idea how shit works are now leaving
Wait, that person is not you?
@Zoidberg'-- ^Z?
user142019
@R.MartinhoFernandes Doesn't work. :^(
Your browser/OS sucks.
13:28
@R.MartinhoFernandes I remembered it yesterday for the first time.
user142019
I know.
no, I recently moved to a new team, about 2 months ago. Just as two of the experienced people left, and now the other two who know how this shit works are leaving
that just leaves a bunch of us fuck wits who wouldn't know ass from elbow about how this system works
user142019
@StackedCrooked Third attempt after accidentally hitting escape twice: Wat. That seems weird to me since char may be signed and may not represent an octet. I'd use std::vector<std::uint8_t> at all times for incoming and outgoing network data.
Weren't you planning to run away back to Great Britain?
@Zoidberg'-- Same here.
user142019
13:30
I'm going to reconfigure my keyboard in Linux so ~ is next to shift rather than under escape like it always was on my machine.
@Zoidberg'-- char is required to be able to hold all the UTF-8 code units.
@R.MartinhoFernandes I was, but I did a phone interview and didn't anything since
How could it not hold an octet?
user142019
@R.MartinhoFernandes but it may be more than 8 bits.
13:30
and the GF has made it quite clear that she doesn't want to move, unless we ahve
However, once if the user only interfaces with HTTP then std::string would be more convenient.
user142019
Networking (at least the sane protocols) are based on octets.
@Zoidberg'-- If it is more than 8 bits, uint8_t does not exist.
@Zoidberg'-- get a proper keyboard :P then you can give the ¬_¬ eyes
user142019
@thecoshman option+L does that on OS X.
13:32
So, you are saying that your solution is better because neither of them works in non-existent scenarios.
Yup exact-width types are optional and might not exist
user142019
I'd rather have a compile-time error than buggy code.
I'd rather not care about crazy platforms.
@Zoidberg'-- this
user142019
And std::uint8_t is more representative since it actually means octet.
13:33
@Zoidberg'-- 'option' what sort of crappy key is that, bleh
stupid time-outs
user142019
@R.MartinhoFernandes I want a compile-time error on those. :)
typedef unsigned char octet; // where is your uint8_t now
4
user142019
@thecoshman alt
@Zoidberg'-- I know, I know :P
user142019
You can also do static_assert(CHAR_BIT == 8, "Fuck your architecture.");, of course. :^)
13:34
Also nobody is going to compile your code on platforms like that
@CatPlusPlus assumption is the mother of all fuck ups
user142019
BUT DCPU-16!
You make ton of assumptions on every step while writing anything
user142019
That's why all software is fucked-up!
Ell
Ell
13:35
ahh can't marshal a List in c# :'(
@Zoidberg'-- You cannot run normal code on that anyway.
Quick do all calculations several times in different ways, your CPU might have bugs in it
@CatPlusPlus Then to pick the right one compare them several times in different ways.
you have got your logic all messed up, silly cat
user142019
Time to write a server in Erlang!
13:37
you also seem to not quite get the 'turn of phrase'
The point is that having a compiler error on such platforms is worthless because you need to do fuckload of considerations anyway. If you are expecting compiler-aided porting, hahahahahaha how naive.
And compiler-aided refactoring
:v
It has to be carefully thought out and designed, not fed through a compiler to see what needs fixing.
nah, compile, see the first error, fix that, repeat
"I wonder where all those segfaults come from"
13:41
@Zoidberg'-- good luck writing a hello world program without making any kind of assumptions
Assumption #1: your output actually goes somewhere visible.
(Under Visual Studio, assumption #1.1. that somewhere visible is visible for long enough for the output to be visible :P)
¬_¬ clearly that expression was lost on you furners
@Ell .ToArray() and marshal the array?
Ell
Ell
@R.MartinhoFernandes well I need to add to it, but arrays are fixed length (I think?)
The function you are passing to adds to it?
Ell
Ell
13:47
yeah
Do you have an upper bound on that?
Ell
Ell
No
actually I'll just look to see if I can get one. It's the EnumWindows callback
I could just use 100 or something
it's pretty much never going to be greater than that
damn
it would practically be easier to write my own C++ implementation than use Clang at this rate
Can't you pin the list, grab a pointer, pass that, and magic the list back on the callback?
famous last words :)
13:52
@DeadMG why are you using clang?
@DeadMG So all that waiting time was wasted? You lazy fuck.
lol
@R.MartinhoFernandes don't be so harsh, I'm surprised he's even putting in the effort to get annoyed with clang :P
tbh
it's all about the fact that Clang is effectively a C API when it comes to ownership
on the odd occassion they'll take an LLVM intrusive ref counted pointer, but apart from that it's a shit and a giggle as to who owns what
@R.MartinhoFernandes finally, something worth doing on the pi
13:56
What? A MOTD?
yeah :P
How... interesting? Useful?
well, the MOTD does seem to be putting in a fair bit of nice info
lol, one of the comments asks how to tweak one of the fields, to which to OP responded 'come on, read the source'
hmm
seems that Clang does not correctly propagate the Preprocessor object to the Sema
@thecoshman I have a putty session saved for ssh rmf@calypso htop.
13:59
and they don't even set it to NULL
worthless fuckers
@R.MartinhoFernandes huh?
To get the same info on that MOTD, I use htop.
It's realtime.
(Well, not the weather info, but seriously)
god damn it, every time I refresh chat, it reminds me that @R.MartinhoFernandes told me he just shut down server
Xeo
Xeo
Because nostalgia, bitches.
14:05
@Zoidberg'-- if you accidentally hit esc - hit ctrl+z and then ctrl+y
whilst I wouldn't care for the weather my self, a nice idea some one has there is using a cron job to cache it every so often
@thecoshman Well, Imma stick with htop.
user142019
@irrelephant you are my hero.
Ell
Ell
unsafe c# is confusing >.< I don't know whats a pointer, what's a reference
c++ is so much easier :o
14:07
@R.MartinhoFernandes this htop?
I recently discovered webmin. Installing it on my (local or remote) linux machine provides me with a nice webview that allows me to do things like scheduling cron jobs.
14 hours ago, by R. Martinho Fernandes
It's probably easier to just write a C++/CLI wrapper.
Ell
Ell
@R.MartinhoFernandes Yeah I knew you would bring that up :P
@R.MartinhoFernandes you just fire that up every time you login?
and my god does that look sweet for 64 cores :P
Ell
Ell
14:10
heh awesome
with nearly a TB of ram
beastly :P
Ell
Ell
@thecoshman I take it this isn't one machine?
@Ell no I think that is one machine, one beastly machine
¬_¬ what was that...
@thecoshman I have PuTTY session that runs htop instead of a shell. Whenever I want to check that I fired it up or Alt+Tab to it if already open.
@thecoshman It was a message for your female parent.
14:13
@StackedCrooked oh, well, she doesn't tend to come by here often
@R.MartinhoFernandes oh right
does htop run on the pi?
Steam on Linux went into open beta
can I apt-get it?
@CatPlusPlus keep up grandpa
@thecoshman Probably.
I pacman'd it.
oh, it's found it a htop
what distro you use for your pi?
Ell
Ell
I'm looking at server boards now :D
Why is it that people like to argue that auto hurts readability by showing examples with terribly named functions?
Ell
Ell
I want to run a minecraft server farm thing
oooh, you want a beastly server for minecraft :P
@R.MartinhoFernandes Because they're stupid
14:16
@R.MartinhoFernandes auto HELPs readability, it's a little flag saying 'look, it doesn't matter what you get from this function call, just use it'
Ell
Ell
@thecoshman I want to rent minecraft servers
ahh nobody steal my idea!
BUT STATIC TYPING MEANS SPELLING EVERY SINGLE TYPE OUT HURR
Ell
Ell
phew. ;)
user142019
@Ell Don't worry, I don't steal bad ideas.
@CatPlusPlus You forgot the DURR.
14:17
@Ell That's already been done
Ell
Ell
@CatPlusPlus oh >.<
user142019
Doesn't mean you can't do it better.
Ell
Ell
Yeah
user142019
Tutorial y u indent poorly.
Xeo
Xeo
Man, listening to old sonic theme's really invokes nostalgia. I wish I still had my Sega Mega Drive. :(
I'm keeping this one.
@TonyTheLion bleh, all in ones consoles
@CatPlusPlus Seriously, there was someone saying that auto hurt readability with auto ret = DoSomethingWeird(); as an example of that. "You cannot clearly see the type so you have to go check DoSomethingWeird".
Stupidity does seems like an appropriate explanation.
Xeo
Xeo
ITT templates considered harmful because you can't see the type.
@R.MartinhoFernandes Uh... get a decent development environment? ^^
14:23
@DeadMG What?
No. Rename DoSomethingWeird to something decent.
Ell
Ell
@R.MartinhoFernandes DoSomethingDecent?
Xeo
Xeo
With auto, I think we should stop programming against specific types and instead code against interfaces - and I don't mean the OOP meaning.
Same as we do with templates.
Because it's just the same.
Anyways, shopping.
Ell
Ell
http://www.compsource.com/pn/632682L21/Hewlett_Packard_Hp_195/Xeon-Dp-HexaCore-X5675-306ghz-Fio-Processor-Upgrade-632682L21/ - $3,857.00 (Hp Xeon Dp X5675)
Seems awefully expensive :O
@Xeo Is exactly what I do with it.
@Xeo preaching to the converted I think :P
Ell
Ell
14:27
Wouldn't automatic static duck typing make that easier?
4
Q: Does auto make C++ code harder to understand?

FelicsI saw a conference by Herb Sutter where he encourages every C++ programmer to use auto. I had to read C# code some time ago where var was extensively used and the code was very hard to understand - every time var was used I had to check the return type of the right side(some times more than onc...

Anyway, can we get the last close vote?
@Ell You mean templates?
Ell
Ell
@R.MartinhoFernandes yeah - but it was with everything automatically, but when you do void myfunc(string s) and s doesn't have the interface you want, compiler complains saying s doesn't have string-like interface, doesn't support method foo, method bar etc.
everything is a template, but uses your types as hints
I don't know, that's just my idea
You mean concepts?
Ell
Ell
yes
by default though
you don't have to explicitly write the concept though
it would automatically take the interface of the concrete type you suggest
it's sort of like concepts
In Hell++ that prints "I'm a moron"
hmm
been thinking about a #pragma clean
How so?
Id est, what would it do?
cleans the preprocessor state
(to be uncleaned when the file is exited)
Meh, modules.
14:45
mh
What would you clean? Everything, including defines set on the command line when the compiler was invoked?
@jalf Unlikely. But since defines set on the command line aren't covered as Standard, then each implementation would have to choose.
It is also kind of dangerous what with include guards and all.
nah
you put the #pragma clean inside the include guard.
And cannot include anything else safely after that point.
14:47
@DeadMG and then you clean the include guard you just created, and risk including your own file again
tis true
#pragma once would be helpful
About that they bitch about symlinks and hashes and shit and whatever.
I never really bought those arguments, but it seems some people think #once is hard to spec.
@DeadMG note very semantic
@jalf Nah, it gets restored at the end.
but you're right that it doesn't play well with them
Type inference is always good
14:50
What?
I mean, sure, but how is that relevant?
something like #pragma stack_defines would make a bit more sense to me, it's clearly something to do with defines
That's for bit up there ^^
Shush
@CatPlusPlus and pie!
@thecoshman Probably a better name
@DeadMG I guess it would work if you combine it with a #pragma push and #pragma pop. So you can clear the state temporarily, and choose when to restore it to its earlier state
14:54
Just replace the preprocessor with something better
although that might end up tripping you up because then you would lost any new state created between the push and pop operations
@jalf ah now, that's just what I said more or less :P
@jalf Upside, not downside.
@TonyTheLion Nothing to see there.
14:56
@CatPlusPlus yeah sure, if you want the nice, easy solution...
pfff
what kind of sissy are you?
@R.MartinhoFernandes how do I get it give me a link?
14:56
@TonyTheLion No idea.
Use Coliru.
Modyuls.
LWS sucks, won't let you share code snippets
wtf
Ell
Ell
aghh after all this, I'm gonna have to write a cli/c++ thing >.<
So, what is the nasty?
14:58
I’m trying – and failing – to think of ways to make the interface on stacked-crooked more minimal
@TonyTheLion What?
Nah.
Seems that markdown removes $ from URLs.
murkdown sacks

« first day (796 days earlier)      last day (4378 days later) »