« first day (854 days earlier)      last day (4320 days later) » 

user142019
03:00
TIL: I was born at the age of 6.
I don't really trust automatic refactoring on large scale
@EtiennedeMartel Well, what about Intellisense?
@Rapptz That, no.
But I wouldn't write C++ without it.
I think verbosity is a key feature of any C++-derived language.
user142019
03:02
s/ without it//
@R.MartinhoFernandes: How heavy is this? Intuition says fewer than 10 tons.
Oh, I write C++ without it.
Must be painful.
user142019
I write C++ in Vim without code completion.
I don't really complain
03:02
@R.MartinhoFernandes no, never mind. 190,000 metric tons estimated.
user142019
Only syntax highlighting.
@Zoidberg Yeah, but you're a hipster. You would code with a fucking typewriter if that was possible.
okay, looking at the starboard, you sanctimonious fuckwits have had an interesting night
@EtiennedeMartel sounds particularly painful
@LightnessRacesinOrbit Stop it with that word.
user142019
@EtiennedeMartel there are typewriters with USB.
03:03
@EtiennedeMartel which one?
@LightnessRacesinOrbit Sanctimonious.
Fuckwit is alright.
@EtiennedeMartel Why?
To be fair, I don't need code completion for C++.
I rarely use code completion too
@LightnessRacesinOrbit Because it's like it's on your "word of the day calendar".
03:04
@EtiennedeMartel Sure, if every day is the same
Well, I'm lazy.
I mean, the most verbose thing is really std::chrono
Wait, cat, you're lazy. How can you write code without something to write for you?
Otherwise it isn't that bad..
03:05
but I can't really say the same about C#
user142019
I like how VS completes on space and period and whatnot.
did @cicada go away for the night without me?
user142019
I want that with Haskell.
neco-ghc
user1357851
next time I see the so-beauty tag I am going to spam this room with my 'fancy' cakes ... probably :x
03:05
screw code completion anyway - when it fails you waste time trying to see why it won't show the method
I remembered I have ghc-mod because of all this talk
user142019
@CatPlusPlus That looks awesome.
Get ghcmod-vim too
@Telkitty And I'm going to bin the shit out of that.
03:06
And then troll you.
And then meta troll you.
And make your life a living hell.
And then eat your babies with jam
Until you are but a shadow of your former self.
Or we can just flag it
user1357851
@EtiennedeMartel good luck, hope you are fast enough ... damage can be done in such a short time you know ...
@CatPlusPlus Well, Zoidburg's penis is extraordinary
03:06
any code completion in haskell? or are 3 letter long method names easy enough to remember :)
And get you banned
@CatPlusPlus Flagging is for PHP programmers.
EXTRAORDINARILY SMALL
(I would say "and for noobs", but that's kinda redundant)
@doug65536 neco-ghc
ghcmod-vim is the best thing ever
03:07
@Telkitty No.
Our whole life is this room.
it's good at black backgrounds, I'll give you that
It's not like we got anything better do to than shit in your mouth.
I do
(You know what to do)
would you characterize haskell code completion as easy? or are there nasty ambiguities
@CatPlusPlus (Honestly, I don't)
03:08
Hint: it starts with i
> "Jake is literally the hottest new artist in the country by a mile at the moment"
@doug65536 Well, name collisions might happen if you import anything unqualified and not selectively
One might think that makes him ineligible to perform. Or, like, exist.
> "The whole of Nottingham will be turning out in their thousands"
But apart from that, unless the completion tool is dumb and doesn't use type info, no
@CatPlusPlus Infection urinaire?
03:09
Uh-huh. All of us. The whole city. Fuck off.
@EtiennedeMartel Yes, that
@LightnessRacesinOrbit Black backgrounds are the best
@CatPlusPlus Wait for it
@EtiennedeMartel No, flagging is for trolls with fish shampoo..
@CatPlusPlus You're a piece of work
03:13
I'm awesome
@LightnessRacesinOrbit Yes, he's a picky Siamese with blue eyes, DEAFNESS ENSUES.
wtf are you on about
Nobody knows
@LightnessRacesinOrbit He's a piece of work.
@CatPlusPlus Yes, the world will never know.
user1357851
it is an artistic cake, please don't bin it
is it me, or does everyone have to screw around with samba for an hour on every fresh linux install to get file sharing working?
@doug65536 an hour? you're lucky.
SMB/CIFS never worked for me properly
Linux or Windows
I just start up an FTP server and done
(And by never I mean since about Win98)
03:17
Better luck next time.
@CatPlusPlus good idea...
0
Q: Oscar's Grind c++ betting strategy implementation

thistleknotI was trying to do a modified reverse lebouchere, but... I figured this was easier and more promising. I'm not sure if I have it right The 3 rules are Rule # 1: Increase your bet by one unit after every win. Rule # 2: Bet the same number of units after a loss. Rule # 3: Never bet more tha...

user1357851
@EtiennedeMartel That stayed there for awfully long
I should get some sleep
@Telkitty Estoy ocupado.
user1357851
03:22
@EtiennedeMartel busy saving the cake on your harddisk? :D
No, busy doing something useful.
I need a sanity-check. Does a solution to this type of problem even exist? Maybe my approach is totally wrong?

http://stackoverflow.com/q/14906515/975129
user142019
Sleeptime bye.
03:53
here's my magical make-it-work-dammit bash script to make CIFS work when your router sucks and DNS isn't working
it manually looks up the IP using NetBIOS - because most routers pass-thru all DNS so local machines won't be found
If I have a unique_ptr member in a class, and I call release, what happens?
04:35
wtf
even THIS room is oddly silent
user1357851
What do you expect
hard to talk when you're sucking at development.
@Rapptz "release" means, return the pointer, and forget it
in other words, after a call to release, get() will return null
well I couldn't get it to work with what I was doing so it's okay.
often used with return statement, to return a raw pointer before the unique_ptr goes out of scope, preventing the destruction
04:47
I needed a way to manually destroy a class that is a member of another class.
Well, I guess not manually, something like if this happened, then destroy this object
@Rapptz reset() tells it to destroy anything it has
I couldn't get it to work regardless so I'm trying something else
Chances are I'm probably being stupid
user1182183
`const char * Text;`
`for ( ; *Text; Text++ )`
I don't really understand this... what does this do? ; o
equivalent of while(*text) { text++ }
which is as long as *text doesn't point to '\0'
then keep incrementing it
it's looping through the string, that's all
user1182183
so, text++ is changing the location of the pointer, okay hm
user1182183
04:56
yeah because I need to edit some directx 9 text drawing code
user1182183
and need to make colors per-character
user1182183
which requires me to edit many stuff >_>
user1357851
I need to concentrate, I always have problem concentrating, no matter how hard I try
@Telkitty u nead to concentrate on concentrating, obviously
user1357851
@Cheersandhth.-Alf Almost concentrating ... until that 'ding'. Thanks for the help :p
05:07
u're welcome! :-)
user1357851
05:17
my $name = "test"; my $type = "A"; my $data = "1.1.1.1"; my $ttl = 84600;
my %rec_hash = ('name'=>$name, 'type'=>$type,'data'=>$data,'ttl'=>$ttl);
$rec_hash{'e'} = 'f';
my %hash2 = ('n2'=>"kitty", 't2'=>"meowy",'data'=>"feed me food");
$rec_hash{'hashy'} = %hash2;
my $json = encode_json \%rec_hash;
print "Content-type: text/html\n\n";
print "$json\n"
user1357851
I got this:
user1357851
{"e":"f","ttl":84600,"hashy":"2/8","name":"test","data":"1.1.1.1","type":"A"}
user1357851
wtf?
05:41
i would read the docs on the hash functionality
or whatever. sry
user1357851
Not just perl but how to construct Json in perl
user1357851
Sigh not much help from google results
what's the difference between $ and % in perl?
user1357851
$ is for variable, % is for hash
user1357851
I am not an expert in perl
user1357851
05:45
One day I am going to re-write all these cgi in multithreaded C++
i would suggest python as an intermediate step
and perhaps that's all that's needed
user1357851
2 lazy 2 learn new languages
user1357851
besides it is almost done ... other than this annoying json part
user457812
I should probably re-learn Perl at some point. Not sure why, but I should.
user1357851
06:16
If I can't get this perl Json thing going in the next couple of hours I think I am sinking into a depression
user1357851
06:29
made a little step ... so maybe I will have a lesser depression in a few hours time.
user1357851
07:14
Gee, I must be concentrating really hard on my perl Json thing, coz I have just re-written the first two paragraph of Feel by Robbie Williams
user1357851
Here it goes:
user1357851
Come and hold my hand I want to catch the chicken.
Not sure I understand this bread roll that I've been given
I sit and talk to dog and he just laughs at my plans
My cat speaks a language I don't understand
07:47
@Telkitty what were you expecting?
user1357851
@doug65536 do you know much about perl?
yes
I was an expert, but it's been a while, so I'm not 100%, but I know a lot
user1357851
if I have something like this:
user1357851
my $json_string = {
'aaa' => {
a => 1,
b => 2,
},
'bbb' => $count,
};
user1357851
What structure is it?
07:49
it's an associative array. the order of the keys is unpredictable
user1357851
it is a hash you mean
it happens to be implemented as a hash table yes. in general, an array with any kind of key is known as an associative array. so yes
in perl terminology you'd say hash yes
user1357851
so why is it my $json_string not my %json_string
depends on context. if you want to say the whole array, you could pass it by reference with the %. when you use it, it can tell it's a hash by the curlies after the name $json_string{$some_key}
you can also get a "slice" of a hash table, meaning make an array that has selected keys. then you'd say @json_string{$key1, $key2}
does that make sense?
$foo will get you a scalar. @foo will get you an array. %foo will get you a hash table. they all could exist at once. [] means array. {} means hash. (after the $foo)
@Telkitty can you pastebin the problem code? or ideone
user1357851
@doug65536 Ok, the problem is to construct Json with SQL result
user1357851
08:00
like the $json_string above
user1357851
There is a lot sql code involved so I want to skip that part
user1357851
So far I have no problem construting key value pairs
user1357851
but when I do $rec_hash{'hashy'} = %hash2;
you get some weird %HASH{hexadecimalcrap}?
user1357851
I was expecting hash2 to be the value of the key hash
08:05
ideone has perl...
let me do a quick test
user1357851
so in regards to your first question
user1357851
@doug65536 I was expecting:
user1357851
{"e":"f",
"ttl"=>84600,
"hashy" =>
{
'n2'=>"kitty",
't2'=>"meowy",
'data'=>"feed me food"
},
"name"=>"test",
"data"=>"1.1.1.1",
"type"=>"A"}
well, technically, you do
however, there are some really cool (and not so easy to learn) tricks where you can have something like references/pointers (think C#/C++ at the same time) and there is special syntax.
user1357851
How do I use binpaste
user1357851
08:09
So I can attach the cgi script
click that "you do" link above and hit "clone", then paste in your code and "ideone it!"
try that again if it didnt work, was private
user1357851
Ok, I have pasted it
copy the url it generated and paste it here
maybe we should go to perl room
user1357851
but it is complaining about cgi module not found
user1357851
the result can be found here:
user1357851
Thanks for looking into this
user1357851
It is driving me nut :'(
it doesn't matter if ideone can run it, can you send me the link to it? the page where ideone says it cant find CGI
@Telkitty come to perl room. Im feeling guilty for filling C++ transcript with perl stuff :|
user1357851
Yes I am there
09:32
is &typeid(ptr) == &typeid(T) a valid code?
@Abyx AFAIK it's implementation-defined.
don't put addressof operators and it's valid
I mean it depends on the compiler if that does what you want it to do. It shouldn't crash your code.
even better: std::is_same<decltype(*ptr),T>::value
Also, seriously, don't bother with that kind of "optimization".
09:35
without & is will be way slower, probably
slower as in some more nanoseconds? unlikely to be slower
How do you know that? How can you know that?
use std::is_same and it's 0 ns, it's done at compile time
well, it depends on operator== implementation
@doug65536 nope. ptr is a base class
ok, theres a template for that too... std::is_base_of
09:39
@doug65536 That fails to address the point.
it's using inheritance (and virtual functions) then? why are you testing the type - that's cheating
typeid is a dynamic tool and is_same, is_base_of etc. are static
They have different use-cases.
@AndreiTita yes, I know that. @abyx this is going nowhere, use typeid and == and if it costs some cycles, then stop trying to switch case on the class
So many people are scared of RTTI without valid reasons, it's sad.
hacking around polymorphism with "if it's this class, do special stuff" is the sad thing imho
09:45
meh... obviously I can write my own fast typeid and dynamic_cast, but I thought I could use C++ typeid without a performance loss
can you post the profile showing that typeid is hurting performance?
profiling is useless.
I'm not scared of RTTI at all, and for most classes it's nearly instant. only nasty virtual inheritance messes cost a lot of cycles
well, in the time you've wasted on the "performance" of typeid, you could have had a profiler tell you what actually is taking cpu time and you could spend time actually improving the performance instead of micro-optimizations like avoiding rtti
Ell
Ell
Hi guise
hi anyone having knowledge in Qt- C++ GUI?
Fucking hell. STILL can't get Windows 8 Pro to simply install to my completely empty Samsung SSD. Or for that matter, another HDD. RAAAEGE
@sehe what happens?
@sehe y use window 8?
win8, huh. you'll regret that you installed it
anyway I did install it on an empty HDD.
10:17
I am happy to install Widows 8 - when my customers threaten to refuse to pay unless I test apps on it. Until then, sod it.
..and even then, it's going on some POS from the sale rooms - an old laptop or the like.
@MartinJames or better yet, a VM - run win8 in a window
way better anyway because you can snapshot it
Yeah - could try that, though my 256G SD is struggling under the weight of virtual machines, now :(
there should be a way to sign up to be notified when the file copy functionality in windows becomes better than a bad joke. every started a big copy and went out? you get back and it stopped after 2 minutes asking "are you sure you want to copy this?"
10:33
My mac is 2.5 years old. Last week I had to bring it in for repairs. They replaced the motherboard, the 27" monitor, the hard disk and the DVD drive. Purchasing apple care turned out the be a wise choice :D (It gives you 3 year warrantee.)
sure, use robocopy. ever suggested robocopy to a coworker? they look at you like you are talking about molecular biology
Sorry if this is kind-of off-topic, but can new users use chat rooms if I invite them to one I created? I know you normally can't use chat before you have 20 rep.
@doug65536 ACK!! How annoying is that!
@Cubic wouldn't hurt to try right?
@StackedCrooked Doen't sound that good to me. 'I bought a new Fiat with an extended warranty 'cos I know that the host of electrical problems will cost €400 each to fix'.
10:38
I don't understand your point.
@StackedCrooked your mac died after 2.5 yrs. all that survived was the keyboard and mouse and power supply?
CPU and RAM too.
Assuming the motherboard and CPU are different components.
2.5 years and virtually the entire machine has to be replaced. Am I the only one thinking 'what a pile of crap'?
it's always a gamble though. I've learned that there's no point trying to buy parts that will last forever, it's just a roll of the dice
apple care is 179 EUR and it extends warrantee up to 3 years.
Chances that something breaks in 3 years is real.
10:42
I still have a Duron 800 (circa 2000) on an MSI motherboard, that still works. go figure
The repair person told me the motherboard costs 1000 EUR to replace.
@doug65536 I had a Duron 800 in 2000 as well! Those were good for overclocking :D
How 'unlucky' do you have to be before you start to realize 'maybe the quality of this equipment is not that good'. Never had such 'bad luck' with PC's. My previous pensioned-off dev. box still runs up after 13 years.
@StackedCrooked yes, that was around the time that intel was embarassing themselves with the P4
..though I did replace the CRT monitor, but not because it broke - was just too big and LCD's got cheap.
yeah, most CRTs get junked when they still worked. those things lasted forever usually
10:49
@MartinJames It wouldn't be very profitable to sell piles of crap with 3 year warrantee.
user1357851
how many people do you think read this room?
@Telkitty 35
user1357851
@StackedCrooked I don't mean just registered users
user1357851
people can read this chat without log in
10:54
I wonder if it would make sense to have less RAM (say 4 GB or so) if you have an SSD drive. Page swapping should be fast.
most people who hang around here actually care about programming
@StackedCrooked not at all
paging will wear out the drive with excessive writes and degrade performance faster
seek is instant, throughput is limited by bus speed, which is usually 133MB/sec or so
spinning drives can read 100+ MB/sec so linear read/write is irrelevant
I have an SSD on my main machine, and a 10000 rpm velociraptor.
I've put my swap on a spinner, though with 12GB RAM, there is not much swapping going on during 'normal' development.
it's foolish to have less than 12GB today. RAM is almost free. my main machine has 24GB of ram
During linking the memory usage shoots up. If the OS then decides to swap your computer may become non-responsive for a few minutes. This occasionally happens on my Linux box at work which only has 4GB or RAM.
My box here is 2.5 years old, so 12G was good at the time, (and nothing has broken in it:).
10:59
you know that logo animation that shows when win7 is booting? mine doesn't even finish the little starting animation before it clears the screen and loads the display driver lol

« first day (854 days earlier)      last day (4320 days later) »