« first day (2554 days earlier)      last day (1920 days later) » 

2:48 AM
How do I evaluate $T_{[a,b]}$ in mathematica, it should come out as $T_{[a,b]} = \frac{1}{2}(T_{ab} - T_{ba})$?
 
 
6 hours later…
9:14 AM
@b3m2a1 I work in interactive mode. Have a few packages to support my work, but most development is one shot R&D reflections. Each major job would correspond to a 1000+ pages book, and I probably have 10 of those... I don't consider myself masochist, but I'm probably within the scope for which Mathematica was thought for and is still being made for.
 
 
4 hours later…
1:36 PM
I have a list of the form {{"A", 0}, {"A", 2}, {"A", 3}, {"B", 1}, {"B", 3}, {"C", 0}, {"C", 2}, {"C", 5}}. I want to collect it into a list of the form {{"A",{0,2,3}},{"B",{1,3}},{"C",{0,2,5}}. What is the command to do that neatly?
 
 
1 hour later…
2:54 PM
@KraZug List @@@ Normal@Map[Last, GroupBy[list, First], {2}] will do it
It kinda sucks though
GroupBy[list, First, #[[All, 2]] &] also semi works
Same thing but nicer than my first attempt: List @@@ Normal@GroupBy[l, First, #[[All, 2]] &]
 
Yeah, I can come up with convulted forms like that, but thought there would be some nice way
`gatherUp[data_?ListQ] :=
SortBy[{#[[1, 1]], Flatten[#[[All, 2]], 1]} & /@
GatherBy[data, First], First]` is what I wrote to do it.
 
Not sure, I don't think there's a nice single command to do it.
 
 
2 hours later…
4:49 PM
@KraZug KeyValueMap[List, Merge[Rule @@@ list, Identity]], but its not much better
 
@chuy, thanks, yeah, not much simpler. Often when I ask these kind of questions someone points me at some function that I'm unaware of.
 
 
1 hour later…
6:20 PM
@KraZug here's an implementation without Association:
 
KeyValueMap[List]@GroupBy[First -> Last]@...
 
Reap[Map[Sow[#[[2]], #[[1]]] &, l], _, List][[2]]
 
Fewer brackets: Last@Reap[Sow[#2, #] & @@@ l, _, List]
 
7:00 PM
@Kuba Nice. Of course the no-Association method is much, much slower than the GroupBy method.
I think the meeting where WRI decided to add Association would have to have been interesting to see streamed. It's such a no-brainer to people who've used literally any other language but I bet SW was confused by the thing.
Or maybe the syntax was just so much nicer he was on board for that.
 
Ok, glad to know that I'm definitely not missing an obvious trick. Maybe I should ask that as a question that those nice answers can go to.
 
Another solution without Association: {#[[1, 1]], #[[All, 2]]} & /@ GatherBy[list, First]
 
 
4 hours later…
11:20 PM
@Mr.Wizard thanks for feedback. Here is another one, smaller: (19 q tagged). Without wiki and folks use it where or or for any web api services where + is enough. Should we clean it? @C.E. @b3m2a1
 

« first day (2554 days earlier)      last day (1920 days later) »