Re: [Factor-talk] nice

2013-01-16 Thread Alfredo Beaumont
A more concise version[1]: 2 1000 ^ number>digits sum cheers [1] http://docs.factorcode.org/content/word-euler016%2Cproject-euler.016.html 2013/1/16 Leonard P : > Feels nice when you get the hang of it. > > http://projecteuler.net/problem=16 > > 2 1000 (pow) number>string 1 group [ string>numbe

Re: [Factor-talk] nice

2013-01-16 Thread Leonard P
On Wed, Jan 16, 2013 at 3:44 AM, Alfredo Beaumont < alfredo.beaum...@gmail.com> wrote: > A more concise version[1]: > > 2 1000 ^ number>digits sum > > cheers > Awesome. Seems like Factor would be a great tool for teaching math. Anyone get the graphviz gallery to work? --

Re: [Factor-talk] nice

2013-01-16 Thread Leonard P
> > Anyone get the graphviz gallery to work? > Er, nm... works now. -- Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery and much more. Keep your Java skills current with LearnJavaNow - 200+ hours of

Re: [Factor-talk] matrices

2013-01-16 Thread Leonard P
On Thu, Jan 10, 2013 at 11:44 AM, Alex Vondrak wrote: > Haven't looked at the code, but to answer your question about > `for`-loops... > > "for each" loops: > http://docs.factorcode.org/content/word-each,sequences.html > "for i = 0 up to n" loops: use `each` with > http://docs.factorcode.org/cont

Re: [Factor-talk] matrices

2013-01-16 Thread Leonard P
> > Was wondering if there could be a variation of "for i = 0 up to n", when n > is unknown. > > Named it "index-pump". > > Instead of "looping over a body of code", we are "index-pumping a > function". > > : index-pump ( quot -- m ) > 1 swap [ dup ] prepose [ 1 + ] while ; inline > Er, seems

Re: [Factor-talk] matrices

2013-01-16 Thread Leonard P
Ok list. I've done enough wrangling. It's time for me to sit back, let the language sink in, and read some code examples. Apologies if I've overtaxed your inbox. For someone used to Java, Factor takes some getting used to, but it is an exciting paradigm. My hope for Factor is that its librarie