« first day (1261 days earlier)      last day (3913 days later) » 

15:00
@Rapptz he is borderline attacking newbies
@jalf Where exactly did I say he shouldn't be doing his assignments?
And no, I don't have much patience with people who try to dissuade others from learning and progressing. You certainly don't have to help, them, but if you don't, the least you can do is to just leave them alone
I think you should study C++ first. You clearly have no clue about how the language works. — Jefffrey 14 mins ago
:\ my porgam is broked
@jalf "first" being the keyword
@Jefffrey Are you going to email his teacher and inform him that the student will not be handing in this assignment on time?
15:01
hehe
Because otherwise, you are just telling him "you should fail this course, then do all the learning on your own, and then take the course again"
And yes, I think that message is absolutely worth attacking. And not just "borderline attacking".
<- grumpy old man
@jalf I kinda understand your point but I've seen much worse questions being somehow answered and much better questions being ridiculed in the comments, vOv
in other news, this weather is really nice! Please don't do/say anything dumb cause I don't have enough grump for everyone on a day like this. :)
@jalf 1 + 1 = 3
also I believe that nuclear bombs are toys that we should give to children
"oooo; button button!"
15:09
@KonradRudolph why were you giving that guy such a hard time earlier? I mean, he's kinda right, he's allowed to think up his own AST. For the stuff shown, yeah, variant is enough :) I just answered his question, removing all the need for ugly Phoenix/Fusion cruft
Just to be complete, would you share with us how these messages could be made more user friendly? — sehe 27 mins ago
@jalf duck you :)
@DeadMG Pah, toys! How will they ever learn real life lessons if you coddle them like that and only let them play with toys?
inorite
bah, the US started doing training on the Black Sea with the Romanian navy
and we changed the law which tells who and how can be called to war
sucks to live in a small country
better that than annexed by Russia I figure
I'd rather fight my own war against Russia than being a proxy for the US
15:17
@AlexM. Are you in Romania?
yeah
you wouldn't say that if you were blown up by a Russian tank that an American bomb could have blown up for you.
what american bomb?
in a proxy war it's the americans who don't die
I also generally feel that the US are scumbags, but they're definitely better than Moscow, so if it's East or West the only sane choice is West.
and the smaller guys who die
well yeah
user784668
15:19
w/e
the US aren't quite as totalitarian as Russia.
Proxy war? Why do you think a proxy war is at all on the table?
@jalf probably because I'm having the cold war in mind
which is exactly what Putin wants to restart.
@AlexM. Yeah, understandable. But I don't think the US has much interest in restarting that
15:22
you know, I just realized that whole, "Restore motherland to former glory" is another thing Hitler and Putin have in common.
I don't remember exactly what I thought they had in common before, but I don't recall that being on the list.
user784668
Putin's not a painter IIRC.
welp, WW3 averted :P
@Fanael Also, unlike Hitler, he's not dead
unfortunately
user784668
@jalf Hitler is alive, in South America or some shit… Where do you think the name of Uberlândia comes from?
user784668
15:24
Uberlândia is a municipality in the state of Minas Gerais, Brazil. With a population of 646,673 inhabitants, according to 2013 estimates, the city is the second largest in the state second only to Belo Horizonte (2,375,244). The city's name means Fertile Land. History Geography Uberlândia is located in the western part of the state of Minas Gerais, in the region called Triângulo Mineiro, one of the richest agricultural regions of Brazil, between the Paranaíba and Grande rivers. It is connected to major cities by the following federal highways: BR-050, BR-365, BR-455, BR-452, and ...
> Founded August 31, 1888
unless Hitler was a time traveller
user3010322
Putin killed more people than Hitler, I think?
u wot m8
wasn't that Stalin?
nah I think I'm pretty confident stating that Hitler's killed way more people than Putin.
you might be thinking of Stalin.
user784668
15:26
I'm pretty sure GPL killed more people than all of them.
he's obviously thinking of Genghis Khan.
user3010322
Oh, Stalin.
@Rapptz Aren't we all?
user3010322
Yeah it was Stalin, my bad.
user3010322
How many did Genghis Khan kill?
15:28
30 million
would be lulzy for putin to retreat with all of his military and say something like "lol jk"
@ThePhD In Mongolia it's their national pride.
user1804599
@ThePhD Genghis Khan is a song in the album Killers. Now I know why!
user1804599
Great song btw.
15:42
@Jefffrey facepalm, did he hurt your feelings :)?
@Jefffrey And you can have an upvote. :)
it's just the second time he pissed me off about the same shit
@Jefffrey Who, me or the OP? :p
user1804599
lol CreateCustomer.
user1804599
15:43
-1 not enough constructor.
@rightfold yeah, I even had to use those weird capitalized function names :P
@ScarletAmaranth tbh I don't even care anymore, I'm going to do something more productive, see you all later
user1804599
Also fuck new.
user1804599
Don’t use it.
user1804599
Just return Customer{ name, id, pin };.
and of course feel free to fix any mistake I've made, I've written that with rage and pretty fast so it's likely it contains errors
@rightfold yeah well, his assignment forced a X* return type
user1804599
15:46
Eww.
@rightfold or ` return { name, id, pin };` if you happen to declare what you're returning in the signature, vOv :)
@Jefffrey I think it looks pretty helpful. :)
I love it with optional<T>... return {}; // so sexy
although @Jefffrey idea to store currency in double is horrible ^^
yes dear customer, you have 71$ and 0.99999897499956199 cents
user1804599
@ScarletAmaranth meh, I like boost::none better.
user1804599
@ScarletAmaranth Use boost::multiprecision::cpp_dec_float_100.
15:53
I really like the way return {} looks
user1804599
return{}; // constructs a new return and discards it!
^^
return {}; // lifts an empty object
user1804599
Meh, trailing semicolons in Haskell.
user1804599
Put them in the beginning of the line. :v
that was to supossed to be C++ code
user1804599
15:58
Meh, C++.
user1804599
customer := Customer{name, id, pin}
return &customer // no UB in Go :3
is it on the heap o_O?
user1804599
Yes. :3
can I say: put on stack frame?
user1804599
Not sure whether it copies it to the heap or allocates it there in the first place, though.
16:00
aah
that would make sense
to just copy if you return an address to it out of the scope
user1804599
If you return customer it should put it on the stack.
user1804599
I should inspect the assembly code.
right, right
it's not too horrible then
well, with move semantics, you shouldn't be doing that anyway
(if you rly must then shared_ptr<> or some such)
user1804599
Go has no move semantics. :P
eh
move-semantics-less sucks.
@ScarletAmaranth Halting Problem says "fuck you".
16:02
well, I would never do such a horrible thing, vOv :)
me neither.
user1804599
runtime.new is called only when you return a pointer.
Wots a 'singletone' class - a pure sine wave?
http://stackoverflow.com/questions/22746054/java-how-do-i-get-or-create-a-connection-from-multiple-threads
16:39
in PHP, 1 hour ago, by Joe Watkins
@BenjaminGruenbaum C is too simple to really think it has design flaws ... it's not that kind of language ... you could say that something like Zend, written in C has design flaws, but you can't really say C has ... C is just the tools to create implementations, it's not an implementation of anything ... higher level languages, java, C#, not same, they are implementations of something, they are meant to contain and or be your framework too ...
AdmiralAckbarItsATrap.png.sh.exe
16:51
lol
I am going to die with malfunctioning guts.
@DeadMG What happened now?
wow, another site for a tiny thing
@BenjaminGruenbaum Jesus what a load of bullshit
@BenjaminGruenbaum You owe me a bogometer.
@DeadMG What's up puppy?
@BenjaminGruenbaum This is great shitposting copy pasta material.
There is no :psyduck: large enough
@DeadMG if you die, will the lifetime deal about me not posting images be nullified? :D
You might even start making funny jokes
17:13
Nah. My sense of humor is non-existent.
fuck C++.
just why "\x01A" is "\x1A" and not "\x01" "A"
@Abyx In Soviet Russia, C++ fucks you!
there is no SU anymore.
Gee. I answered a question that already had an accepted 1-line answer:
0
A: unordered_map with IP address as a key

seheHere's what I came up with after a brief inspection of the class interface for ip::address. I would like to note that it's pretty wasteful to use. Especially if you happen to know that all addresses are ipv4, e.g. namespace boost { template <> struct hash<IPAddress> { ...

I think it deserves votes for the snippet
            // guaranteed to be random: chosen by fair dice roll
            return static_cast<size_t>(0x4751301174351161ul);
@Abyx I know, I was just using a cliche meme phrase.
17:18
@sehe that's some dice you have
Yeah. She knows :)
wat?
@Abyx that's what she said
well I didn't get that joke but fuck you in advance.
oh, wait. @sehe beat me to that joke.
17:22
Such moods. Much wow.
Anyways, the accept was changed (I didn't think that would be possible.). So I karma-d my way out:
+1 for being correct in principle. I don't think it's generally helpful to provide a one-line answer. It's SO ettiquette to drop those nuggets of wisdom in a comment. — sehe 50 secs ago
@Jefffrey So, you ignore and bask in your wisdom live a peaceful life :)
user1804599
Hmm.
inb4. Flavoured crisps
Top tags by bounty amount: #android: 3800 #csharp: 3700 #java: 3100
does anyone know a blog or something that has neat C tips and techniques?
Clearly the most money is still being made in java/c#
@ApprenticeHacker It doesn't exist. Duh
something to improve my ridiculously newbie skills
Xeo
Xeo
17:32
@sehe Actually, answering with a comment is rather frowned upon I found :(
Anyways, google might be able to provide false leads
@sehe lol
@sehe I think it did
@Xeo Oh, that's also frequently said. But it's much less frowned upon than bolting out a single cry and calling it a day
Xeo
Xeo
true
Though for all I know about C, those might be excellent tips
Xeo
Xeo
17:33
The reason I answer in comments is because it's so short, and I don't feel like actually extending it to a 'good' answer
@Xeo I can honestly live with the middle ground "You should provide a hash function. Let me know if you need help with that."
Xeo
Xeo
@ApprenticeHacker Here's a great tip: Pretend C doesn't exist.
@Xeo Me too. Although these days, I only monitor and they rarely call for 1-line advice. If they do, they're usually terribad and I prefer to ignore
Xeo
Xeo
heh
I think I implemented a ready queue incorrectly :\
17:35
Hello, Cruel World!
Xeo
Xeo
in your case, even if they only need a 10 line answer, you'll inflate that to 100 lines :)
@Xeo but then I hear embedded system cross-compilers bitching about the overhead of C++ features and how stuff isn't supported and I applied for an EE degree in Electronics and Embedded systems. :(
user3010322
@Code-Guru I took my Computer Science Theory midterm.
How'd you do?
user3010322
I dun goofed on the Context Free Grammar questions.
17:36
aww
user3010322
But I pwn'd the DFA, NFA, and Regular Expression/Regular Language proofs.
user3010322
Pumping Lemma and induction on string length.
Xeo
Xeo
@ApprenticeHacker You don't want to work for those anyways. There are embedded systems that have a C++ compiler. A lot, I imagine.
user3010322
TBH I don't know Context Free well enough,
user1804599
17:37
This question …
user3010322
but it should be enough so I don't outright fail.
user1804599
OP uses ioutil.ReadAll and then complains it block until EOF. :v
lrn2contextfree!
how long are your terms?
@ThePhD My good news is that I made some breakthroughs with my Android app.
@Xeo I see. But still, there are always uni courses that work with C, and getting a good GPA matters.
user3010322
@Code-Guru Sexy.
17:39
I've almost completed a feature that I've been struggling with for months.
actually more of a major reimplementation rather than a new feature
when the process is in a ready queue, then is put into CPU and run for 200 milliseconds, and you want to run the same program, how does that work?
@Crow huh?
@jalf so say there's 200 milliseconds for each process. You put a process in and it runs for 200 milliseconds, but does not complete. I don't get what happens then; is it still in the ready queue, and you just save the changes to that portion of the queue?
@Crow Maybe you should sort your brain first. Words are coming out in random order.
@sehe that alot happens
17:43
@Crow There's likely no queue and no processes involved.
that depends on the OS. But conceptually, it goes back into the ready queue (because it's, you know, ready to execute)
@Crow I think you're referring to thread scheduling (processes have at least 1 thread). And the trick is that each thread has it's own stack, and the context (registers/stack) is saved and restored when switching threads.
I did a small refactoring where I fully separated receiving and sending as two separate tasks (it used to be interleaved). Nice side-effect is that the exponential nature of slow start is much more visible now.
It looks to me as a design issue, still. Why don't you make sending and receiving neutral tasks on a single thread?
@sehe I think the problem is in this pseudocode, I am probably reading it incorrectly. It says to include user interactive interrupts by a code (1, 2, etc), but I don't see how a process CONTINUES after it has been created. It only runs for 200 milliseconds then there seems to be no viable input to let it continue running in his code
17:45
@sehe Oh, for a sec it seemed that this was addressed to me.
@Crow Oh well. I don't see any pseudo code. I'm probably too dumb
@StackedCrooked It is
Need to be putting my kids in bed though. Be back
@Crow The ready queue contains the threads that are ready to execute (that is, threads which are not already executing, and which are not blocked waiting for something else). If, after executing, a thread is still able to execute more, then it goes back in the ready queue
I want to convince my co-workers to use more task-based programming. But the thinking in terms of threads is deeply ingrained.
user1804599
17:48
ACTORS
@jalf so, would it make sense that there should be a 0 priority, infinitely looping process when nothing else is in the queue?
@Crow Yep, something like that. If you're on Windows, open Task Manager and look for a process called Idle something. ;)
would it be assembly code?
Hopefully, it would execute the instructions that make the CPU enter a sleep state, in order to save power. As for which language it is written in? That depends on the implementation ;)
Taking an OS class? :p
user1804599
Hey, that’s funny.
user1804599
17:51
It’s exactly what I intended to do for Styx.
@jalf yep, it's super lame
@Crow I thought it was awesome
one of my favorite CS classes :)
@rightfold What's Styx?
I mostly like web dev, it's not very serious
user1804599
@jalf The language I wrote a compiler for last night.
@rightfold Hm, seems like an actor is a "threaded" object with a dispatch queue?
user1804599
17:55
@StackedCrooked message queue.
user1804599
If you have a handle to an actor, you can send it a message.
user1804599
And the actor can receive messages and do things with them.
I don't know much about the actor model, but I do favor concurrency via message queues.
Vs direct locking
user1804599
// Simple printing server using actors.
auto handle = spawn<std::string>([] (auto& mailbox) {
    for (;;)
        std::cout << mailbox.receive() << '\n';
    }
});
handle.send("Hello, world!");
handle.send("Wee!!!");
user1804599
spawn spawns a thread and detaches it, then returns a handle that you can use to send messages into the mailbox.
user1804599
17:59
Mailbox is just a queue.
user1804599
When you send a message to an actor that has terminated, the message is simply discarded.
user1804599
So you can implement handle in terms of std::weak_ptr or something.
user1804599
I should once implement this thing.
Does it spawn native threads?
ugh, I'm tired. There's a second weekend immediately after sunday, right? I really hope there is.
user1804599
18:02
Mailbox could also be a thread-local; may be nicer.
user1804599
@StackedCrooked If you want that, sure.
user1804599
It can also spawn processes or spawn stuff on other computers and communicate over a network w/e.
I was just thinking that many objects might result in too many threads.
user1804599
If you’re concerned about memory usage you can do some evil stuff like segmented stacks and custom scheduling. :F
I was thinking about context switching overhead.
user1804599
18:05
Use Erlang, Go or Rust. :D
user1804599
Clojure focusses on STM, which is also rather nice but doesn’t work at all when you do I/O.
18:20
I have some experience with STM (using @jalf's library).
@rightfold thank you for reminding me of yet another half-finished project :p
So I came to the realization that memory is not the only resource :)
wtb a time machine. So much stuff I want to work on, so little time
Hey weirdos
Hi, @JavierDiaz
18:28
What's up around here
It's the first time I'm here xD
some of us are talking about concurrency apparently
I'm waiting for some tests to run...
@Code-Guru Some of us are concurrently talking about concurrency... :-)
that, too
hmm...looks like I broke my app (or the tests) again
Oh lol, this is about C++
nope, no C++ here
18:31
C++? what is C++?
just a bunch of Weirdos
Then I fit
and one lone Java programmer amongst a bunch of haters
Damn those Java programmers
hey now!
18:33
:D
seems like you'll fit in just nicely around here
xDD
(I'm also a Java one) :p
I apparently hate it
user1804599
Java sucks.
user1804599
Java will get Optional<T>. The hilarious thing is that Optional<T> can also be null.
it's sort of like not having bool in SQL
true / false / null ewww
@StackedCrooked wat.
user1804599
@ScarletAmaranth It is optional<bool>. vOv
user1804599
18:47
It is consistent and expected
@rightfold from what @StackedCrooked said, I understand that you can have Nothing, Just T and Null in Java's Optional
@jalf objects can be null, that's just inherent to Java. Optional<T> is supposed to help with null-pointer exceptions, but ...
user1804599
@ScarletAmaranth No.
user1804599
A reference to an Optional object can be null.
@ScarletAmaranth optional.is_valid() can throw NullpointerException
user1804599
Optional class has no notion of a null state, but all references in Java can be null.
alright, I see what you mean
nvm
right, right
I'm creating a regex reference. Feel free to help at >> gist.github.com/Hamz-a/1662d09db09156e8b2b0
@StackedCrooked yeah, seems kind of self-defeating
18:50
Rightfold, what's that o_o
Introduction of value types would be a good start.. :)
user1804599
No.
user1804599
Saying goodbye to null is better.
You wrote my name there? wtf
Or profile or whatever xD
18:51
@JavierDiaz hehehehe you don't get it do you ?
he was just publicly ridiculing you
Not at all
it's basically to make fun of you
user1804599
Ugh.
user1804599
18:51
Tesseract reads lowercase L as a pipe character. :c
^ look at that nice php badge @rightfold
@jalf @R.MartinhoFernandes Baked a cake for my mother for Mother's Day, and half way through eating it, I suddenly realized that it was a tremendously stupid idea.
user1804599
rightfold, The Kingdom of the Netherlands
4.3k 2 10 32
user1804599
I have best tag set.
18:52
@rightfold mwahahaha you got php too
if I go for the surgery, I could get even more fucked than I am now, and if I don't go for the surgery, I could live the rest of my life as fucked as I am now.
I still dont know why is that ridiculous
kinda feels like choosing between horrible, painful death and horrible, painful, nauseous death.
@DeadMG there must be a third option consult with a new doctor?
18:52
@JavierDiaz C++ > php, got it ?
I'm with php at work and it's horrible
@DeadMG I don't really have much confidence in you doc's decisions. (Even though I haven't met him.)
But most of those questions were regex-based, not that I helped a php guy with php
there's little to base a decision on.
user1804599
18:54
what's a new doctor gonna say, "Based on this absolutely nothing I suggest something else?"
I'm so lost xD
@DeadMG you have the MRI thing in... May?
I don't have an MRI.
user1804599
@JavierDiaz Do you use CodeIgniter?
18:54
what is it that you're waiting till May for?
^ hehehe
user1804599
AAHAHAH
user1804599
OWNED
@DeadMG well, he might know of other tests to run, or just have some guess at what is wrong?
18:55
wow such owned
very pro
hehehehe
Presumably your case is not entirely unique throughout medical history. Which implies that most likely, there exists a doctor somewhere on the planet who is familiar with similar cases
It's work, i dont give a fuck if i get my 2k at the end of the month
It may be some rare but treatable disorder.
That would be optimistic of course.
user1804599
@JavierDiaz Stockholm Syndrome. :D
18:57
@ScarletAmaranth I have another appointment with a consultant team.
I still don't know how to do meta-tags : - /
@DeadMG ah, alright... well, I agree with @jalf
Not at all, if I was unhappy i wouldnt do it
But anyways this seems just a chat to laugh at people

C++

Friendly conversation, including C++ talk — NOT the "Lounge"!
18:59
@HamZa lol

« first day (1261 days earlier)      last day (3913 days later) »