« first day (159 days earlier)      last day (1065 days later) » 

02:29
(combinatorics joke) How many legs does a cow have? 12 -- Two in the front, two in the back, two on the left, two on the right and four in the corners.
 
4 hours later…
06:29
looks like Turing Tumble is actually gonna make the 400k
(~$3.7k left and 5 hours to go)
 
4 hours later…
10:28
@orlp you forgot the diagonals D:
11:17
@MartinEnder they made it!
11:52
So, I'm really considering adding extension methods that allow you to make a 3rd party class implement an arbitrary interface
for example, if there was a 3rd party BankAccount addTransaction(Transaction){} removeTransaction(Transaction){} class
adapt BankAccount to Set<Transaction>{
   add(Transaction) => addTransaction(Transaction)
   remove(Transaction) => removeTransaction(Transaction)
}
and then suddenly you can pass your bank account as a set
there's a really big problem though:
if x is Set
I can change how existing code works simply by including another library (if that other library has the adapt code
12:10
@NathanMerrill what is this?
extension methods allow you to add arbitrary methods to a different class
I'm just taking that a step further by letting those methods implement an interface
what language?
Also, I think one solution would be to somehow "scope" the extensions. So an extension created in one location doesn't apply everywhere but is limited in some way.
This could also help make larger projects work: if two programs extend some class but in a conflicting way, there should be a way to get the two programs to work together without rewriting too much stuff.
hmmm...that could still be problematic
class A{
    doStuff(Set)
    doStuffObj(Object)
}
lets say I call A.doStuff(bankAccount)
if it performs a is Set, it should obviously return true
but if doStuffObj() calls a is Set, then you're saying it should return false
(Assuming class A is in another library)
yeah, I think I'm not going to have adapters. It's already pretty easy to do what I want to do at the object scope, and putting it at the class scope causes too many problems IMO
12:24
Some other speculation: what happens if there's more than one way to interpret a class as a set? As in, what if it implements both Set<Dog> and Set<Cat>? Meaning that there's now overloaded add() and remove() functions.
MyBankAccount extends BankAccount implements Set<Transaction>{
    delegate bankAccount: BankAccount
    add(t: Transaction) => bankAccount.addTransaction(t)
}
@PhiNotPi even more problematic is if I wanted to do Set<Dog> and Set<Animal>
IIRC, one thing that Java does not do is remember what "type" a generic is during runtime.
yeah, I'm not going to have type erasure
The determination of which call to add(...) corresponds to which implementation of add() is made entirely during compilation.
I don't like type erasure. Or at least, one time I ran into a type erasure problem and fixing it wasn't easy.
IIRC, C# got this one correct: If it's possible that multiple methods could be potentially applied, it defers the method resolution to runtime
aka, if you have a Set<Animal>
and you have two methods doStuff(Animal) and doStuff(Cat)
it'll call the Cat one on cats
@PhiNotPi the biggest gotcha I know if is that you can't have two methods a(List<Integer>) and a(List<String>)
12:35
It looks like Ruby has open classes, but takes the "with great power comes great responsibility" route regarding conflicting extensions.
@NathanMerrill I've been meaning to make a language for a long time.
making a fully-featured one is really tough
12:58
like, one thing a good language needs is a pretty comprehensive standard library. Python is a great example.
but that basically means you need to understand so much about different libraries
like, the date/time library is really hard to get right, and really hard to fix if you get it wrong
 
3 hours later…
15:40
@MartinEnder I was so happy to see that email this morning. :D
16:31
I just found this website: its fascinating
It lists historical exploits for pretty much everything
16:51
now I'm worried my desk calculator has a vulnerability
Don't worry; it does.
damn. gotta find my sliderule
@orlp That was a pretty nice introduction. I think I understand them significantly better than I did before.
17:11
I recently thought whether you could see the regular n-gons or n-hedrons as some kind of solution to an optimization problem. My idea was (in the plane case) that you consider a number of particles in the interior of a circle (or a sphere in th 3d case) that repell eachother, and then finding a constellation that minimizes the energy.
For thee points/triangle this obviously works with pretty much any "good" repulsive force law.
But for four points it already is not so clear
@flawr I've done that before. Seven points results in something like a square pyramid attached to a cube.
@El'endiaStarman haha, now the virtual internet highfive goes to you:)
@El'endiaStarman what kind of repulsion function did you use?
@flawr Probably just a plain ol' inverse square law. Electrostatic repulsion, I think.
Interspersed with normalizations to keep the points on the surface of a sphere.
But points could also be in the inside? Or only on the surface?
Only on the surface.
17:16
oh ok
I didn't think to allow points nearer the center. That could be interesting too.
Yeah=)
@El'endiaStarman Actually, that would be for 9 points. I don't quite remember what 7 points was - maybe it was a square-ish shape and a triangle-ish shape?
cmc: find a repulsion function that actually has a cube as minimum energy solution=)
For 8 points?
I think I did get a cube at least once, but I also got a square anti-prism.
17:25
I never got a cube=)
@El'endiaStarman yep, I always got this one
384
Q: Is it unethical for me to not tell my employer I’ve automated my job?

EtherableI currently work on a legacy system for a company. The system is really old - and although I was hired as a programmer, my job is pretty much glorified data entry. To summarise, I get a bunch of requirements, which is literally just lots of data for each month on spreadsheets and I have to config...

I've had similar experiences :D
At one job I also could have also automated the job of about three other people in the time I worked there...
and the disturbing thing was that they were paid a lot more than I was^^
 
1 hour later…
19:03
cmc: find a set of nontrivial functions (e.g. not on a 1-element set, and not the identity function) that commute wrt to composition, but such that the set is closed under composition and does not contain the identity function.
19:14
hm ok I found one: the functions {+1,+2,+3,...} on the integers {...,-1,0,1,2,...}
 
1 hour later…
20:41
hey
what is the problem called again if I have N items with weight w_i
and I want to find the smallest subset with total weight >= W
wait I'm an idiot that's trivial
sort on weight and just pick elements until you're above the limit

« first day (159 days earlier)      last day (1065 days later) »