« first day (2089 days earlier)      last day (2895 days later) » 

1:26 AM
This may be better on a differetn SE site - there are quite a few but you need to check each to see what is on topic for each. For example, programmers.stackexchange.com has several answered questions about AOP... — Jerry Jeremiah 13 secs ago
 
 
11 hours later…
12:42 PM
Over the weekend, I started poking around the Apache Commons Collections to figure out how to make an extension to it to implement some of their won't fix things that are won't fix for meh reasons. Their class hierarchy is...confusing.
 
1:02 PM
"Help Query eats my server" lol
 
I hate it when that happens
 
Help Query is hungry and needs to be fed on a regular basis.
 
Help Query needs server badly
 
1:36 PM
@Ixrec you know what I like about this "question"? that with new rate limits asker won't be able to dump it to other sites for at least 40 (maybe 90) minutes. And that after it was closed and voted down appropriately, asker won't be able to dump more senseless garbage at Programmers for at least a day. Hope that will give them enough time to think how to ask better questions and at appropriate sites
 
 
1 hour later…
2:41 PM
Good. Now you can examine all of the available alternatives, evaluate those that are able to fan out, simple and able to be stubbed, and then choose the one that best meets your needs. — Robert Harvey 35 mins ago
Thanks for your answer I can really start looking for a queue that satisfy my requirements. Really great comments, thanks. — Pepster 33 mins ago
 
 
1 hour later…
3:43 PM
How can i avoid procrastinating on the web? I loose a lot time just browsing around and reading nonsense instead doing actually doing real work
 
Not chatting seems to be a good start :-D
… he writes, procrastinating.
 
deadline driven development
 
4:10 PM
turn off the internet
 
probably need cron to do something with your hosts.
It's impossible for me to work without the internet. I think...
 
4:35 PM
I've been studying an strace and using the opportunity to learn emacs's searching a little better.
 
5:07 PM
@gnat I get an error when I try to browse to your activity tab (I was trying to see all of your badges). I can see Robert's but not yours. Thoughts? programmers.stackexchange.com/users/31260/gnat?tab=badges
 
5:26 PM
SO is not appropriate for this type of question. Try programmers.stackexchange.com maybe. — Mihai Caracostea 52 secs ago
 
Would you stop breaking things, @gnat? ;) — hichris123 Apr 20 at 23:09
^^^ known bug
 
6:24 PM
Interesting.
 
6:38 PM
This guy seems to be full of... it:
I disagree. Inheritance always creates a copy of the public interface of a class in its subclasses. This isn't a "has-a" relationship. This is subtyping, plain and simple, and therefore is inappropriate to the described application. — Jules 13 mins ago
@Jules What do you disagree with? I said a lot of things that are demonstrable, and made conclusions that logically follow. You are incorrect when you say, "Inheritance always creates a copy of the public interface of a class in its subclasses." In Python, there is no copy - the methods are looked up dynamically according to the C3 algorithm method resolution order (MRO). — Aaron Hall 4 mins ago
 
I was about to say that of course no literal copying happens but conceptually that seems right...and then you mentioned C3
 
The point isn't about specific details of how the implementation works, it's about what the public interface of the class looks like. In the case of the example, User objects have in their interfaces not only the members defined in the User class, but also the ones defined in UserService and LoggingService. This isn't a "has-a" relationship, because the public interface is copied (albeit not via direct copying, but rather by an indirect lookup to the superclasses' interfaces). — Jules 4 mins ago
So Jules thinks that using multiple inheritance for composition results in a non-has-a relationship because of the implementation? I don't think that's semantically correct.
 
to me this is just a good example of how taking OOP too seriously results in a lot of wasted time philosophizing about the deep meanings behind what are supposed to be practical real-world tools to be taken or left when and only when they are useful
 
6:54 PM
I'm looking for a strong citation for has-a vs is-a - and I'm skeptical of wikipedia at the moment.
 
VTC primarily opinion-based
 
Wait, wait. I have so many opinions! What will I do with them all?
 
to Reddit!
 
Where's that now?
puts radio horn up near ear
 
Seems like some Javaites hijacked Wikipedia and are pushing their own brand of composition by delegation as being the one-true-way for has-a.
 
7:04 PM
@AaronHall IMO, the fundamental difference is that HAS-A is a statement at the value level: an array HAS elements, a person HAS-A first name and a last name. It is a statement about a relationship between values (objects, instances). IS-A is a statement at the type level: a Dog IS-A Mammal. It is a statement about a relationship between types (classes, interfaces, protocols, traits, mixins), i.e. classes (in the set-theoretic sense, not the OO sense) of values.
 
@AaronHall this is the only kind of "has-a" that I'm familiar with, did Python invent a new one for some reason?
 
7:33 PM
So you would say that mixins create an is-a relationship?
 
my personal experience with mixins is they create a "can-pretend-to-be" relationship and then a "wtf-is-going-on" relationship
 
7:50 PM
I had a book called "Object Technology" used in graduate level courses, and I swear it equated has-a with composition.
 
isn't that what it normally means corresponds to?
 
Bracha argues that mixins are just abstract subclasses and that mixin composition is a form of inheritance, and in fact a generalization of inheritance that subsumes all forms of classical single-inheritance (both Smalltalk-style overriding as well as Beta-style prefixing), linearized multiple-inheritance (CLOS, Dylan, Python), and Flavors/CLOS-style mixins. (I think the full Jigsaw thesis makes this clearer than the short overview paper you linked.)
 
and mixins with composition.
 
In that sense, there is no real difference between classes and mixins, and so, if inheriting from a class creates an IS-A relationship, then so does mixin composition.
 
if you abstract too far, there's no difference between adding two numbers together and polyfilling a mixin across three layers of a C3'd inheritance hierarchy
 
7:54 PM
But aren't these two different kinds of composition? Mixin composition is composition at the type level, i.e. composing classes out of smaller units. Object composition happens at the value level, i.e. composing larger objects out of smaller objects. They are both composition (in the English language sense of the word), but they belong to two different universes of discourse.
 
In Python, types are objects.
 
what are values but subkinds of types, and types but subkinds of typeclasses?
(no I'm not taking this seriously)
 
(I can tell.) :P :D
 
+
............33.
.333
 
* -> a* -> *
 
8:06 PM
Confusing objects, classes, and types, instance-of and subclass-of, has-a and is-a, and similar issues are a pet peeve of mine. They are a constant source of confusion to newcomers to Ruby, not because they are hard to grasp, but because all the sources they use to learn confuse them as well.
"Class is an object and Object is a class" is commonly cited as a riddle you have to solve to gain Ruby mastery, but it's actually simple, IF you understand the difference between an object being an instance of a class and a class being a subclass of another class. If you keep that distinction clear, then even the fact that classes are objects and thus Object is an instance of Class which is a subclass of Object no longer can confuse you.
 
similarly, to master Haskell you must solve "A monad is just a monoid in the category of endofunctors"
 
Argh. Sorry. Toddler got the keyboard away from me.
 
I'm already of the opinion that pure virtual/abstract interfaces are the way to go whenever any sort of inheritance is involved, and the natural definition of "interface" is much better at conveying its programming meaning than "class" is
 
That one has the added advantage of actually being a workable definition of monad, provided you know what a monoid and a functor are :-D
 
and an endofunctor
 
8:14 PM
Yeah, although that should be easy knowing what a functor is. I assume. I never actually learned category theory. I would love to understand how co-recursion over co-data can model an infinite event loop in a total language (i.e. a language where every functions always terminates). I know you can do it, I just have absolutely no clue what those words mean.
 
I've tried once or twice but I couldn't take the headaches
 
A monoid is the same as a unary function, right?
what's an endofunctor? a function that returns None?
 
nope, totally different
 
see, that would make sense - a print function is a monoid - it takes a single input value and returns None.
 
in Haskell terms, monoid is a "typeclass"
if you've ever done C++, Java or C#, the simplest way to explain that is by saying "pretend I said Monoid<T>"
 
8:18 PM
I mean, a total language is a language in which you cannot write an infinite loop. That's pretty much the definition. An operating system, a web server, a GUI is literally just an infinite loop. (If an operating system terminates, we call that a "crash" and get angry.) And yet, apparently you can write an OS with co-recursion (the category-theoretical dual of recursion) over co-data (the CT dual of data). Twists my brain.
 
I've been reading "Clean Code" and monoid is used there to refer to functions with arity of one.
 
and for any type T, its Monoid<T> instance specifies a "null" value for that type, and an "append" function that takes two values of that type and returns another value of the same type
that's it
in Haskell the "null" and the "append" are normally called mempty and mappend
because Haskell
 
Of course, I'm starting to feel like Uncle Bob has been selling stuff for a while...
 
I think that comes from a totally different branch of mathematics. Just like the term "functor" for an object that has an operator () in C++ has nothing to do with the concept of a functor from category theory.
 
the typical examples are
1) integers, where mempty is 0 and mappend is +
2) integers, where mempty is 0 and mappend is * (multiplication)
3) lists, where mempty is the empty list and mappend concatenates two lists
4) strings, basically the same as lists
you get the idea
 
8:21 PM
And the functors from ML which are different from either of those. (They correspond to what is normally called a module.)
 
functor is another typeclass, and it only requires the type to have a "map" method
for instance, the list type is a functor, because for any function that takes an integer and returns an integer, you can map that function over a list of integers
 
@AaronHall: Category Theory was invented, when mathematicians discovered that very different objects (they actually use that term in CT) from very different branches of mathematics had underlying shared properties. That they were actually instances of the same abstract idea. Now, if you imagine that mathematicians already have some pretty abstract ideas, and now they discover that those ideas are actually concrete instantiations of even more general, more abstract ideas, …
 
I'm going to assume that's enough because every language on earth has a map function these days, Python included
personally I find category theory less interesting than metalogic
if we're gonna have a metaness war
 
… then you can imagine just how abstract those ideas are. Category theory is so abstract, and sounds so ivory tower, because it is supposed to be. That's where its power comes from. Abstraction means Generality.
In maths, that means you need to prove stuff only once in category theory, and that automatically applies for lots of stuff across mathematics. In programming, that means that lots of things are, say, monads or functors or monoids, and you only need to write a library once that can deal with monads in general, and you can use that library for all sorts of stuff.
And you can apply intuitions from one branch of mathematics / one area of programming to totally different branches.
 
and then you get into monad transformer stacks because monads aren't general enough on their own
 
8:28 PM
Guido wanted to move map into functools out of the builtins.
 
Not only that, but monad transformers also compose, while monads don't.
 
More than meets the eye.
Autobots roll out.
 
Hello there!
 
I must admit that it took me a second to get that reference. They weren't very popular here in Germany before the films came out, and those never managed to "catch" me. I actually have never seen a single one.
 
@AaronHall the first time I read about monad transformer stacks I got the mental image of a Maybe, an Either, an Except, an IO and a List combining to form the ultimate monad
which is more or less what transformers actually do
 
8:41 PM
I wonder whether whoever named them also had that image in mind?
 
this begs the question: are there any evil monads?
 
I think they want to sell composable toys.
class Robot(SentienceMixin, TruckMixin)
:D
 
Well, you can create an instance of the Monad typeclass in Haskell that doesn't actually adhere to the Monad Laws of Category Theory. (Haskell's Type System isn't powerful enough, or at least wasn't when the Monad typeclass was added to the standard library, to express the Monad Laws in a way that they can be checked by the type checker.)
That's kind-of evil.
 
Decepticons!
 
Of course, in Java, you cannot even express the Monad type, so Haskell still wins :-D
 
8:45 PM
are those the same "monad laws" all the Haskell tutorials refer to which can be at least heuristically verified by quickcheck?
 
Uncle Bob posits that the limitations of Java are because of laziness of the developers and the other reasons given are merely excuses.
 
that's a strong position in need of some justification
 
Since it's merely an hypothesis, he offers none.
 
left-identity, right-identity, and associativity, yes, these are the ones.
Does he mean laziness of the language designers or the users of the language?
 
designers
The diamond (of death!) problem has been solved by other languages for a long time.
 
8:48 PM
Yeah, well, isn't that kind-of a tautology? I mean, does anybody actually want to create a bad design?
Ah, I see what you mean.
 
it's not really a necessary solution now that everyone's realized inheritance in general is a very strong coupling rarely suited to frequent or nested use
(at least the traditional meaning of "inheritance" where you inherited both implementation and interface)
 
Sometimes it's an elegant solution.
 
sometimes, but not often enough that you end up with diamonds occurring naturally in a well-designed program
 
in Python, everything subclasses object so it's in every multiple inheritance.
 
For me, it's primitives: efficient dynamic optimization of OO languages has been known before Java was designed in the Lisp and Smalltalk communities. In fact, Sun owned the world's fastest OO VM and shut down the project in favor of Java. Then the developers left, formed their own company, and were promptly bought by Sun. HotSpot is, at its heart, still the Smalltalk VM it started out as. Just crazy.
The justification for the existence of primitives is the bad performance of boxed numbers, which had been solved long ago: just because they are conceptually objects in the language, doesn't mean they have to be compiled to objects in the machine code. Simple as that.
 
9:20 PM
Has-a means Composition. Mixins are a form of Composition. The User class is not a UserService or LoggingService, but it has that functionality. I think Python's inheritance is more different from Java's than you realize. — Aaron Hall 6 mins ago
 
9:47 PM
5
A: (4 years later) Dear Stack Exchange: can we change our site name?

AnaIt took us a good while, but the Community Team has circled up and here's where we stand on your request to change Programmers.SE's name. We agree that renaming this site is a good idea. "Programmers" is an affinity group, whereas "Software Architecture" (for example) is an action and a discipl...

4
 
 
2 hours later…
11:39 PM
 

« first day (2089 days earlier)      last day (2895 days later) »