« first day (1561 days earlier)      last day (3372 days later) » 

sbi
10:00 AM
Oh man, the reader-starving variant in this paper, rather than one integer and two semaphores, needs two integers and five semaphores. This is madness!
 
threads are the devil
 
sbi
To "guarantee a FIFO discipline for the writers", you need "to make use of an array n semaphores, where n is the number of writer".
Not that we would need this (there's only ever one writer here), but this is mad!
The problem with these computing papers from the 60s and 70s is that they are aways right. If they say you need so many mutexes to create a reader-starving rw-lock, then it's very unlikely someone comes along and shows a solution that needs less. Must have to do with all those drugs they were consuming back then.
 
Well, if you are going to impose an order on thread access, some threads are going to have to wait their turn until other threads with higher 'priority' release their claims. The waiting threads will have to wait on some individual 'something'. A semaphore is a something that can be waited on.
 
sbi
Yeah, but I wonder if you couldn't just put them into a queue protected by one mutex.
Anyway, this is moot, we don't need it.
 
Just as well, by the sound of it:)
 
sbi
10:10 AM
Damn, my temperature seems to be rising again. My brain's too spongy to make sense of that Fig 2 thing. I guess I need another nap before I tackle that. Groans.
 
why do you want to reinvent semaphores?
 
sbi
@Pris Read that question, will you?
It explains it.
Anyway, I do need to succumb to the fever now. See you!
 
The threads, (or the semaphores why are waiting on), would indeed be in a queue, list or other container, but those that need to wait would need to wait outside the queue lock, else the higher-priority threads that want to release their read/write/whatever resources could not get in to the queue lock to release them.
 
@sbi Right, I'm always amazed to see what these years' CStists had achieved
 
Backlash over UK decision to lower flags after Saudi king's death ... I mean of course they will - to maintain that the queen or royalty in general is above you attitude
 
10:15 AM
..hence the array of semaphores or, more likely with OO, a container of threads with a 'release()' method that signals a semaphore private to the thread class, so eliminating the explicit array of semaphores.
 
It's like: Hmm I got a problem, let's dig in the litterature. Oh a 60's or 70's or 80's paper already solves this in a very smart way
 
always remind you that as a commoner, you should accept your lower place on earth
 
@sbi I've never had a problem with that. I don't believe the fan can possibly produce enough current to fry the motherboard. But I'm saying that without any real evidence.
Or maybe modern motherboards are designed better to prevent it.
 
I've never had any problem with spinning fans backwards. This happens occasionally when using a vacuum cleaner inside a box.
 
The only time I've fried a motherboard was when I installed the ram backwards.
Well, not the only time, but the only time it was actually my fault.
 
10:19 AM
...Is anybody a EE or CompE major here?
 
People kept on telling me that as I grow older, I would become less rebellious, I never did. There are only two ways to motivate people - rewards & punishments. I guess if I was not agnostic, I would have thought the Goddess has been excessive nice to me, pample me in everyways as long as I do not procreate. I have never been really punished for being a rebel, in fact sometimes I feel I have been somewhat rewarded for being one!
 
The other two cases were a design flaw in the motherboard in that it couldn't handle a pair of 150W CPUs under contiguous load. Which eventually blew out the mosfets. The company replaced it (twice) without charge.
 
pamper not pample*
 
finally cleaned my keyboard
also hi
 
...How long has Stack Overflow been here?
 
10:25 AM
@Cinch have you tried googling that
 
as in truly popular
 
4 years younger than you
 
"on the scene"
 
how large is a car?
 
about a year after it appeared IIRC
also lel I swapped U and I keys again when putting them back
 
10:28 AM
u love yoi
 
but my keyboard is at least black again
 
Oh my, I can't do maths ... it's 14 years not 4
 
not this grey-ish dirt/sweat whatever disguisting colour
I've no idea why it gets that dirty so fast
 
@BartekBanachewicz where do you live?
 
that's in my profile
you have to seriously start working on your information gathering skills
 
10:34 AM
nice resume
 
i didnt knwo you could install ram backwards
 
Actually, hey uh @BartekBanachewicz
 
Do you think there should be a Boost.Lua library?
 
10:36 AM
i thought there was some plastic or something that would prevent you from installing it the wrong way
 
@Pris there is.
 
@Mysticial was able to install ram backwards tho
 
@Cinch I don't care much about Boost these days. We've designed Lundi to be compatible with Boost style, but since then things changed
 
@Pris There is, but you know something isn't right when the ram goes in backwards anyways...
Ever since that incident, I now visually double-check that the notches are right.
Even if that means I need to run around the house looking for a flashlight.
 
@BartekBanachewicz Do you think Boost is particularly important? I'm currently in a C++ at my local college and they seem intent on teaching ANSI C++ still
Yet I would love to expand further
 
10:38 AM
im really lucky in that i havent fried any equipment yet. i had a scare when I opened up my computer to clean out all the dust though; it refused to post
 
I've been trying to get started on a small project to educate myself as a Computer Engineer on higher CS-level concepts since I'm on track to learn assembly...
 
@Cinch they're losing relevance quickly, and if they don't take the matters of updating for C++14 seriously, I predict it'll become just a legacy layer. It certainly lost momentum as a leading C++ R&D project
 
turned out to be flaky sata connection though
 
What's the leading R&D now?
 
mostly singular projects by committee members and influencers
like Niebler's optional draft
 
10:40 AM
@BartekBanachewicz Isn't that kind of sad, though? I like C++ as a basic language, but I think a lot of its features, even C++11 isn't really open to new people...
I'm sure its different in the real world
 
@Cinch I've lost interest in C++ about a year ago, frankly. The amount of cruft was just too much for me to deal with in hobby development.
 
Exactly
It's not fun programming in C++
Do you agree with them drafting a C++14 standard?
 
And since I already know more than enough to work at a fairly high role as a C++ developer, I didn't have any incentive to learn it further
@Cinch hmm? What's not to agree, C++14 is just a "bugfix release". And it's not a draft anymore.
 
wait, that just completely doesn't make sense.
 
Is it really?
 
10:42 AM
"I have a high role as a C++ developer; therefore I don't need to keep learning C++"?
 
@Puppy Yeah, that's fine
Until he needs to learn more there's no point
Learning is inspired by purpose; learning to learn is useless
 
@Puppy I learn other things that make me more productive at work. Gathering a more in-depth view of the language simply isn't worth it at this point.
 
...What do you use at work?
What's relevant?
 
@Cinch programming skills too of course. But time management, estimations, proper use of VCS also mean a lot in practice
 
@BartekBanachewicz What about, to I dunno, use in your work?
 
10:44 AM
@Puppy I didn't get that one.
 
@Puppy There's no point bringing in something new if no one else can use it. It becomes a liability if you do things that you can do alone, because if you don't teach anyone else to handle it before you leave, that'll screw the code.
 
@Cinch FTR @Puppy is much better at C++ than me.
 
Okay, what does GOOD mean?
Is there some sort of guide I can read that really defines GOOD?
 
@BartekBanachewicz Well if you're working as a C++ developer, I fail to see how knowing C++ better will not serve you in your workplace.
 
@Cinch for me it means fluent
 
10:46 AM
I mean, if you were working as a Haskell developer, then sure, I can see that you may not need to learn C++.
 
@Puppy What do you define as good?
 
@Puppy It will. But there are other things that are important for a C++ developer than just knowledge of C++.
 
I want to catalog the steps to becoming a good programmer in C++
like what libraries should a person touch on
or what techniques they should be able to avidly use
 
that really depends. C++ is used in a huge spectrum of industry
 
That's exactly why I chose it to be my main language
 
10:47 AM
depending on where you land, you might find your experience very different
 
Yes, but I intend to go on an educational spree throughout the magical realm of C++ programming
So I need a little Wizard of Oz direction
 
be prepared to come back in a decade
 
@Puppy Also I'd like to get a job writing Haskell at some point.
 
Is Haskell really all that important?
 
@Cinch there's a recommended books post on SO somewhere
 
10:48 AM
@Cinch Oh fuck... are you screwed or what?
 
@Cinch No.
 
@Cinch No.
 
Okay
lol
 
@BartekBanachewicz That's fine. I'm not saying that learning more C++ is the optimal decision for you. I'm simply saying that I don't see how it can not bring at least some benefit.
 
@Cinch that depends. Reasearch on it is very important; most of the modern languages borrow features and ideas from Haskell. Its practical use in industry is still quite small, though.
 
10:48 AM
i see.
 
@Cinch C++ is too big to 'sit down and learn'... just have some of the good books with you and start working on projects. best way to learn imo
 
@Pris You see, I've tried this approach
But I spent too much time trying to pick my projects
 
If you're looking for good advice you won't find it here.
We don't know you.
Whatever way you learn is none of our concern.
 
Well, what techniques do you guys use a lot?
That's what I'm interested in
 
@Cinch Whatever works.
 
10:50 AM
pretty much that
 
For example...
 
@Puppy I didn't argue it's not beneficial. I said that other areas of professional development are time better spent for me at this point. And of course, since C++ isn't my hobby anymore, it would kinda turn into forced learning.
 
@Cinch spending too much time to pick a project is kind of nonsense... no one can really help you with that problem
 
Do you guys use lambdas?
 
if you want to be good at C++ you need to be widely versed in techniques from a lot of areas
 
10:50 AM
@Cinch we use whatever is appropriate at a given moment
 
generic programming, functional programming, objectorientated programming, C-level bit hacking and macros you'll probably need, etc
 
What puppy says. Just get as much experience as you can.
 
and then you have to mix them all together and use each one at the right time.
 
But the problem is that there is something that tells you which one is appropriate for each situation
I want to list solutions
 
Yeah, it's just like cooking. That said, I'm hungry.
 
10:51 AM
@Cinch that's called experience.
 
@Cinch Experience.
 
@Cinch Experience indeed.
 
@Cinch There is no exhaustive list.
 
You see, I'm very interested in providing REAL education to the world; programming is just something I do for fun
But I myself can see that 95% of the people I see don't learn the things they really need to learn
 
programming is hard to teach and hard to learn, unfortunately
 
10:52 AM
Programming is easy lol
 
True. But I think that programmers should be familiar with a large range of concepts
Like pointers.
 
meh
 
I'm in university right now
 
@Rapptz how long have you been working in the industry, if I may ask?
 
you need pointers to interop with C but you really don't need to know more about them than "They are references you can rebind" for actual use in C++.
 
10:53 AM
I'm a hobbyist.
Hell do I care.
 
@Cinch Look, you can make a list of solutions, but since the list of problems looking for a set of solutions is humungous, mapping one list to the other has to happen at the time of actual system design, when you have requirements. You can't prepare up front!
 
Programming is easy. Problem solving is something else entirely.
Don't confuse the two.
 
@Rapptz See, the point is that writing easy, hobby stuff is easy. Delivering projects on time that involve programming is hard
 
@MartinJames But you can pave general pathways.
and conventions
For example, what is a braindead convention that you should always follow?
 
@Rapptz then why people say that haskell is hard? :)
 
10:54 AM
(I'll keep track and post it on a blog)
 
@Cinch WHich pretty much go out of the window when you are faced with a real requirement.
 
@Cinch there are none.
 
Uh... should I ever use Macros in C++ besides for compiling?
 
@Cinch None.
 
I don't reply to bait.
 
10:55 AM
if you're doing things in a braindead way, chances are
a) you're terrible
b) you're a java programmer, in which case go to a)
 
@Cinch Useful sometimes.
Very rarely.
Sometimes useful for code generation.
 
bah, 2-phase builds are the way if you want proper codegen anyway
macros are ok for small, ad-hoc things.
 
Its only good use is conditional compilation and the works involving that anyway.
 
13
Q: Why are preprocessor macros evil and what are the alternatives?

user1849534I have always asked this but I have never received a really good answer; I think that almost any programmer before even writing the first "Hello World" had encountered a phrase like "macro should never be used", "macro are evil" and so on, my question is: why? With the new C++11 is there a real a...

 
10:56 AM
@Cinch why dont you ask about singletons and globals while you're at it
/hides
 
Exactly!
But you see
 
@Cinch For every pedantic convention that someone dreams up, 'you MUST blah', someone else will pipe up with 'but I can't use blah in my case'.
 
I see my classmates with very little programming experience, and they don't understand the REASONING behind the conventions
That's what's most important right
 
yes absolutely
 
@Cinch that being said, sometimes you won't get the reasoning until quite later
 
10:58 AM
These conventions and their reasoning are not to be followed 100%, but we need to make sure that the programmer need to understand the REASONING 100% of the time if we want to be on the same page
@BartekBanachewicz That's what education is for
 
it's more or less "don't use macros until you know why"
@Cinch what education? Academia? pff.
 
@BartekBanachewicz I am SO for the reform of academia it's ridiculous
That's why I'm doing all of this
 
Stack Overflow is worth more than 90% of universities teaching programming
 
EXACTLY!
 
wait, wait
only 90%?
 
10:59 AM
Does Stanford/other high US colleges have comparable?
 
Imma go sleep.
 
I'd say 100% with the possible exception of being taught by FredO but from what he's said here his course is too constrained to teach what he really wants
 
yeah, I started counting and realized I could name at least a few good ones
like Utrecht
 
Careful not to be engulfed in a circlejerk.
 
isnt bjarne a prof
 
10:59 AM
@Cinch No.
 

« first day (1561 days earlier)      last day (3372 days later) »