How can I partition a list into partitions whose sizes vary?
The length of the $k$'th partition is a function $f(k)$.
For example: if $l = \{1, 2, 3, 4, 5, 6\}$ and $f(k) = k$. Then
the partitioning $p$ would look like $p = \{\{1\},\{2, 3\},\{4,5,6\}\}$
@Rabbit and others: No, unfortunately, I have no new information and I'm seriously concerned about the well-being of JM. According to his profile, the last time he was seen here was on 13th of April and he hasn't responded to my last mail. 2.5 months is a long time and while he wasn't well for quite some time, he at least checked in from time to time as he knew we cared about him. I wouldn't know what else to do as I don't have other ways to contact him.
In this question: Calculating a parametrized maximum, as a function of the parameter I wanted to show the output of a Mathematica expression. So I clicked the expression and chose "Copy as -> LaTeX" and pasted it into the question between two "$$" marks. But the editor did not let me save the que...
@VitaliyKaurov If you are interested in history; to be compatible with Mathematica pre V8, people used Mr. Wizard's dynP function here. Between V8 and V10, people used Internal`PartitionRagged. And now, as others have said, TakeList.
@halirutan I tried to experiment with ITK a bit once, and use it as a driver for LTemplate development, but it was too much work and I gave up because I didn't really need it. Now I found SimpleITK which may be a better candidate for this.
@halirutan How does Java compare to C++ in this area? Honestly, I was a bit surprised to see people use Java seriously, but they say that when written appropriately, it performs very well. They use it for some huge data (on the order of terabytes)
I still don't know any Java, actually. I'm stuck with C++. It's more useful for what I do: if I want performance, I usually want a much as I can get, so C++.
(But actually on of of the internal seminars someone showed how they refactored some Java code to perform well, and it involved things such as being aware of how the machine actually stores numbers, not storing more than necessary, and not have too many unnecessary wrappers around the most performance critical data structure. This is something that's pretty much automatic in C++: if you do C++ you are usually aware of this stuff already.)
Technology for the Long Term On June 23 we celebrate the 30th anniversary of the launch of Mathematica. Most software from 30 years ago is now long gone. But not Mathematica. In fact, it feels in many ways like even after 30 years, we’re really just getting started. Our mission has always been a big [...]
@Szabolcs The big advantage of C++ are openmp or the intel threading building blocks. Most image stuff can be parallelized heavily and this is where Java simply cannot cope. If you look at ImageJ, you actually see that even for the serial number crunching you cannot use the high-level features but you have to go back to simple arrays of basic types. So all the nice functional stuff is out of reach.
"But the story of Mathematica and the Wolfram Language is not just a story of technology. It’s also a story of the remarkable community of individuals who’ve chosen to make Mathematica and the Wolfram Language part of their work and lives. And now, as we go forward to realize the potential for the Wolfram Language in the world of the future, we need this community to help explain and implement the paradigm that the Wolfram Language defines.
Needless to say, injecting new paradigms into the world is never easy. But doing so is ultimately what moves forward our civilization, and defines the trajectory of history. And today we’re at a remarkable moment in the ability to bring ubiquitous computational intelligence to the world.
But for me, as I look back at the 30 years since Mathematica was launched, I am thankful for everything that’s allowed me to single-mindedly pursue the path that’s brought us to the Mathematica and Wolfram Language of today. And I look forward to our collective effort to move forward from this point, and to contribute to what I think will ultimately be seen as a crucial element in the development of technology and our world." - S.W.
@CarlLange Yes. SW will always be SW and I have moaned quite a bit in recent time, but I have to admit, I still like when he talks. If you haven't seen the latest twitch video, you should do that. It was really nice and Theo Gray was also there.
@halirutan Yeah! I was unfortunately on a mountain when he was live, but I caught bits of it after the fact. It must have been really enjoyable for them to look back on all they'd built!
The memory meter in the corner! I loved that, nearly wish modern apps had it too ;)
Thinking about it, I wonder about the average age of the software I use on a regular basis. Emacs is 42, MMA 30, OSX 17 (Finder about 34)...
Not related, but I'm currently attempting to get into a research masters degree and I'm hopeful I get it partially because it would mean I'd get to lurk in this room all the time..