« first day (318 days earlier)      last day (4624 days later) » 

6:00 PM
math is math programming
 
I'd think generics would be best for math.
So, kinda OO, kinda functional.
 
@Xaade Of course. You can solve all of your problems with OO. And if it wasn't that good, then Java wouldn't be just OO.
 
More, genericked functors.
 
if only math had for loops. one wouldn't need to remind complicated formulas
 
(I really need a sarcasm font)
 
6:01 PM
Comic Sans.
 
Hulk font.
 
@CatPlusPlus Side-effects might include bloodthirsty rage though. Don't do it.
 
XAADE SMASH OOP FOR MATH
Math is lambdas and generics.
 
sbi
@Xaade Lambadas?
 
@sbi Damn, you beat me to it.
 
6:03 PM
Summation is the operation of adding a sequence of numbers; the result is their sum or total. If numbers are added sequentially from left to right, any intermediate result is a partial sum, prefix sum, or running total of the summation. The numbers to be summed may be integers, rational numbers, real numbers, or complex numbers. Besides numbers, other types of values can be added as well: vectors, matrices, polynomials and, in general, elements of any additive group (or even monoid). For finite sequences of such elements, summation always produces a well-defined sum (possibly by virtue of...
 
Another proof that OO is the best: chaosinmotion.com/blog/?p=622
 
sbi
@EtiennedeMartel Always happy to oblige.
 
@EtiennedeMartel I can't tell if you're kidding or not.
 
@EtiennedeMartel No, that just proves that people who don't understand how to use design patterns, tend to apply EVERY SINGLE pattern in an effort to allow hot-swapping algorithms at runtime, at a point in the software's lifecycle where they only have ONE algorithm.
 
@Xaade Okay, he was obviously being sarcastic there.
 
6:14 PM
It's clear, derive from an interface, implement there. If you eventually have more than one algorithm, derive second algorithm and save off a type depending on needs at the start of the program. That way, if you have to extend, the interface is already there, and you don't have to fiddle with the type'ing.
new m_Type();
All without a class factory.
 
But it requires you to CHANGE EXISTING CODE. And CHANGING EXISTING CODE is EVIL.
 
Because last time I checked, your software will either use the intensive memory, or slower version, it won't swap back and forth during runtime.
@CatPlusPlus Um, no
No change in existing code.
Refactoring != change in code.
 
Java is a write-only language.
 
@CatPlusPlus You never change existing code?
@kbok Nah. Java has many flaws, but not that one.
 
A write-only language is a programming language with syntax (or semantics) sufficiently dense and bizarre that any routine of significant size is automatically write-only code. Write-only code is source code so arcane, complex, or ill-structured that it cannot be reliably modified or even comprehended by anyone with the possible exception of the author. Description Write-only language is also referred to as line noise, suggesting that the code looks like spurious characters from signal noise in the communication line. Some programmers believe that certain languages make it easy to write (...
 
6:18 PM
That's why you design with extensibility in mind, but rewrite from scratch every 4 years.
@StackedCrooked That was just an incomplete joke.
 
No, of course refactoring is not changing code, what a silly idea.
 
No, that's why you design with faint implications of extensibility, and deploy extensibility whenever you have two options.
 
@kbok oops, I was too early then :)
 
@kbok Java is a read-only language, if anything. There is simply no fun in writing Java code :(
 
@FredOverflow Are you implying there's fun in reading Java code ?
 
6:19 PM
damn, you got me :) of course not
 
There's no fun in Java. It's turtles all the way down.
 
If you deploy extensibility whenever you have only one option to extend to, you've wasted a lot of development time.

Encapsulate what might be extended in the future, but don't make it extendable until you need to do so.
 
Java == !Fun
 
That looks like reversed i. I've been around too many Apple products lately.
 
@CatPlusPlus Turtles all the way down? I don't think so, Java has no tail call optimization :(
 
6:21 PM
It stacks all the way up.
 
1
A: Simplify writing custom iterators in Java

FredOverflowJava has always provided a mechanism for maintaining state and continuing execution at a later point in time: threads. The basic idea for my library solution is to let a ConcurrentIterable produce the elements in one thread, and let a ConcurrentIterator consume them in another, communicating via ...

 
Stop dissecting my pointless and meaningless jokes, dammit!
 
So, this wasn't for fun?
Was it for pain?
 
Pointless and meaningless code should never be dissected, unless you have need for sub
concepts of pointless information. That stuff is useful for delaying bosses.
 
6:22 PM
It was for pain, as in bread.
 
@RMartinhoFernandes Why did you post this?
 
Two points wrongly combined can form a pointless point.
 
@StackedCrooked Yeah, then both ends end in a butt.
 
Dissecting something pointless can thus lead to two points.
 
@StackedCrooked Yep!
 
sbi
6:24 PM
@StackedCrooked Have you never been sarcastic?
 
Dissecting something pointless leads to the following two points
1. The author makes a point of wasting your time.
2. You should remember not to listen to them again.
 
@sbi LOL I thought was right now.
Oh I see you are responding to an earlier comment.
 
@Tony, how is the world of employment?
 
sbi
Actually, dissecting something pointless is way safer than dissecting something pointy, which could hurt you. (Interestingly, it's the opposite for dissecting with something pointless/pointy. Using blunt tools is dangerous.)
 
I just read the room title as "Satanity was never a requirement here"
4
 
6:28 PM
Is "being deployed" a synonym of "being fired"? :)
 
@FredOverflow Works for missiles.
 
Nice one.
 
@RMartinhoFernandes lol
 
sbi
@StackedCrooked "Fatality was never a requirement here, but it surely helps you to survive this room."
@RMartinhoFernandes I had to wipe my monitor there.
 
@FredOverflow Since I'm not currently employed, I don't know
 
6:31 PM
@sbi In order to survive this room one must be prepared to die.
 
@TonyTheTiger Have you decided on a job yet?
@StackedCrooked Prepare to meet your destructor!
Or should that be "constructor" as in "maker"?
 
sbi
@FredOverflow ...at the end of your scope.
 
@FredOverflow you just made me realize that immortality would imply that nature is leaky.
 
@FredOverflow No I haven't
 
Why do most parents die before their offspring? Compared with C++'s object model, isn't that backwards? :)
 
6:33 PM
lol
 
@FredOverflow nature uses prototype inheritance
 
> In peace, sons bury their fathers. In war, fathers bury their sons. - Herodotus
 
sbi
@FredOverflow Nope: foo create_foo() { foo parent; parent.f(); return parent; }
 
In nuclear war everyone is blown up.
 
sbi
@RMartinhoFernandes > No parent should have to bury their child. - Theoden
Damn Morkdawn.
 
6:36 PM
@StackedCrooked not the roaches
 
sbi
@FredOverflow They are also blown up. It's only that they survive being blown up.
 
Ah! It's Théoden!
 
sbi
Anyway, I need to pack and go home. It's late and I'm tired.
 
And they become radioactive. That's how spiderman came to be.
 
@sbi May I suggest 7-zip for packing?
 
sbi
6:37 PM
@StackedCrooked He's not roachman!
 
RoachMan would even be cooler!
 
sbi
@FredOverflow Got a big enough bag here. No zippers on it, and none necessary.
 
@sbi Aren't zippers one of those crazy functional concepts?
 
"zipper" sounds more OOP. Don't functional languages typically have a "zip" function?
 
6:40 PM
zipWithM :: (Monad m) => (a -> b -> m c) -> [a] -> [b] -> m [c]
 
ZipperFactory::CreateZipper()
 
@jalf zippers are far more advanced than the zip function :)
 
aarrghhhh Monads :P
 
Just as maps aren't the same as the map function.
 
but it sounds like an OOPification of a zip function :p
 
6:41 PM
There is also a singleton function in Haskell, and it is not evil :)
It simply returns a set consisting of a single element.
 
zippers
 
singl = (:[])
 
That's a list, not a set.
 
That's singl, not singleton.
 
@TonyTheTiger What about Monads? :)
 
6:43 PM
Oh.
There's singleton!
 
1 min ago, by FredOverflow
There is also a singleton function in Haskell, and it is not evil :)
 
@FredOverflow There was no code markup before!
 
So I changed it. Not very Haskell-ish :)
 
@FredOverflow nothing, just scary sometimes
 
@TonyTheTiger Have you seen the video Beckman on Monads? Also known as "Beckman on Steroids" ;-)
 
6:44 PM
@FredOverflow of course :)
 
one of my favorite CS videos
And by CS I do not mean CounterStrike :)
 
Boom, headshot.
 
I'm browsing r/circlejerk, and I keep going around in circles :P
 
There's also metacirclejerk. And metametacirclejerk.
 
Recently someone suggested I should be more of a jerk.
 
6:50 PM
Which idiot suggested that?
 
You mean I'm already enough of a jerk as it is?
 
@RMartinhoFernandes you're a robot, not a jerk
 
@FredOverflow Meh, in Quebec there's a CS student competition called "CS Games". Every time I talk to non-programmers about it, they always think it's a Counter Strike tournament.
 
single = (:[])
lol
 
@EtiennedeMartel Quebec sounds like a data structure... std::quebec<T>, anyone?
2
 
6:52 PM
What?
 
like a queue Beckman invented or something.
@RMartinhoFernandes what to johannes or me?
 
That doesn't work with Québec though.
 
Quebec or ( ) is a province in east-central Canada. It is the only Canadian province with a predominantly French-speaking population and the only one whose sole official language is French at the provincial level. Quebec is Canada's largest province by area and its second-largest administrative division; only the territory of Nunavut is larger. It is bordered to the west by the province of Ontario, James Bay and Hudson Bay, to the north by Hudson Strait and Ungava Bay, to the east by the Gulf of Saint Lawrence and the provinces of Newfoundland and Labrador and New Brunswick. It is ...
 
Isn't it pronounced kebek or something?
 
@EtiennedeMartel Ah, so judging from the picture, Quebec is an airplane :)
 
6:53 PM
@RMartinhoFernandes Almost.
 
@RMartinhoFernandes That reminds me of Döner Kebab.
 
Yeah, I don't know the IPA yet :(
 
It's also the Q in the NATO alphabet, IIRC.
 
Why doubt if you recall correctly when you have wikipedia?
 
6:57 PM
Laziness.
 
IIRC is so fast to type, IIRC.
 
Woo! Rain!
 
Even faster when you don't use shift, iirc.
 
now that is circlejerk
 
@CatPlusPlus Thank you.
 
6:58 PM
Circlejerk++.
 
@RMartinhoFernandes been seeing nothing else but rain, keep it there for a while pls
 
I usually fall asleep to a recording of rain falling. Tonight, I won't need to :)
 
1 hour ago, by kbok
@TonyTheTiger Well I can't find stackoverflow porn.
lol
 
@TonyTheTiger Rule 34.
 
@RMartinhoFernandes hahah
 
7:00 PM
Still, I wonder what that would look like.
Would it involve a stack? And an overflow of said stack?
 
@EtiennedeMartel create a recursive function that does not end. ??? PROFIT
 
Wouldn't be very exciting.
 
no it wouldn't be, but with a bit of fantasy you could imagine what a stack overflow on a girl might be like... :P
 
Doesn't seem very healthy.
 
7:06 PM
@TonyTheTiger Hysteria
 
0
Q: Restricting method call to another method

Luchian GrigoreThere probably is a fairly simple and straight-forward answer for this, but for some reason I can't see it. I need to restrict calling methods from a class only to some methods implemented by derived classes of some interface. Say I have class A{ public: static void foo(); }; class...

People waste so much time on silly access restrictions.
 
Well, it's tagged .
Human population increased by one thousand million in these few first years of the 21st century. Wow.
 
so a billion?
 
No. One thousand million.
 
7:22 PM
Billion is million million, at least in one of the scales (why is there more than one, world, WHY?).
 
Long scale!
 
The One True Scale.
 
The bestest scale (I'm being objective here).
 
im confus
 
The long and short scales are two of several different large-number naming systems used throughout the world for integer powers of ten. Many countries, including most in continental Europe, use the long scale whereas most English-speaking countries use the short scale. In all such countries, the number names are translated into the local language, but retain a name similarity due to shared etymology. Some languages, particularly in East Asia and South Asia, have large number naming systems that are different from the long and short scales. :Long scale is the English translation of the ...
 
7:25 PM
Oh, you Brazilians use "bilhão" for 10^9?
Damn, not even on this we can agree.
 
Yeah
First time I am aware of these short and long scales
let's just make a compromise and have the middle scales, where one billion is 500 thousand million
 
Compromise by committee!
 
She's a really nice person.
@LucDanton No compromise. We are the Old World. We know best.
 
7:42 PM
0
Q: Meta-programming problem with Enums

WaskaeAtm i have sth like that: template<int n> struct Pow { enum{val= Pow<n-1>::val<<1}; }; template<> struct Pow<0>{ enum{val =1}; }; I can acess data like Pow<30>::val. It's good but i want do like this int main() { Pow<30>::val; and then...

imho doing it with thirty will only instantiate the first template and not the specialization
 
The specialisation is there to stop recursion.
 
@CatPlusPlus yea just noticed that
 
7:59 PM
Is it possible to answer that question without variadic templates? Possibly with dynamic initialization, no?
 
8:20 PM
@LucDanton I believe so.
I'll take a shot.
Oh, he mentions that in the question.
 
> Thx very i was searching for sth like that :) – Waskae
He also accepted my answer.
 
8:53 PM
Today I learned that a pedometer does not measure pedophileness.
 
A paedometer measures children though.
 
Interesting.
 
0
Q: How do I access the internal contiguous buffer of a std::vector and can I use it with memcpy, etc?

w00teHow can I access the contiguous memory buffer used within a std::vector so I can perform direct memory operations on it (e.g. memcpy)? Also, it is safe to perform operations like memcpy on that buffer? I've read that the standard guarantees that a vector uses a contiguous memory buffer internal...

I think that accessing a std::vector's internal buffer would be a bad idea right?
 
no, it's Standard-defined to be contiguous
 
It's safe.
 
8:56 PM
for C compatibility
I think it's a dumb idea, really
 
oh yea, just saw that
meh, I learned something
 
@DeadMG Well a lot of people have to deal with legacy code...
 

« first day (318 days earlier)      last day (4624 days later) »