Hi Nicolas,<br><br><div class="gmail_quote">On Mon, Jun 21, 2010 at 2:59 PM, Nicolas Cellier <span dir="ltr"><<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">2010/6/21 Nicolas Cellier <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>>:<br>
<div class="im">> Compiler hack is available for Squeak 3.9 at<br>
> <a href="http://bugs.squeak.org/view.php?id=2918" target="_blank">http://bugs.squeak.org/view.php?id=2918</a><br>
> Load the 3 .cs in indicated order.<br>
><br>
> I will publish an update for latest trunk at the same place when I'll<br>
> have a bit of time...<br>
><br>
<br>
</div>Finally, I published a Compiler version for latest trunk in this<br>
SqueakSource repository<br>
Plus a hack or two to make external interface loadable in closure VM<br>
(there is an additional limitation in closure that is max number of<br>
block copied values<16)<br></blockquote><div><br></div><div>I'm interested to see the code that exceeds this limitation. Hopefully it'll be temporary, but it'll take a bytecode redesign to overcome, so I can't fix this anytime soon. Sorry it has bitten you!</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Sometimes, it gets a bit tricky to initialize Smallapack.<br>
I did something like:<br>
<br>
LapackMatrix initialize.<br>
LapackMatrix allSubclasses do: [:e | [e initializeClassInstVars] ifError: []].<br>
<font color="#888888"><br>
Nicolas<br>
</font><div><div></div><div class="h5"><br>
> Then the latest Smallapack code is at<br>
> <a href="http://www.squeaksource.com/Smallapack.html" target="_blank">http://www.squeaksource.com/Smallapack.html</a><br>
><br>
> If you are on linux, you'd better use a relatively new VM correcting<br>
> <a href="http://bugs.squeak.org/view.php?id=3929" target="_blank">http://bugs.squeak.org/view.php?id=3929</a><br>
><br>
> Nicolas<br>
><br>
><br>
> 2010/6/21 arul selvan <<a href="mailto:arul.selvan@gmail.com">arul.selvan@gmail.com</a>>:<br>
>> nicolas,<br>
>><br>
>> i will be interested to test if a port for squeak is available<br>
>><br>
>> arul<br>
>><br>
>><br>
>> On Mon, Jun 21, 2010 at 12:41 PM, Nicolas Cellier<br>
>> <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br>
>>> I started Smallapack for this purpose.<br>
>>> Smallapack interfaces BLAS+LAPACK thru FFI.<br>
>>> Very much like numpy...<br>
>>><br>
>>> Smallapack works quite well in VW and Dolphin...<br>
>>> (In fact it did work very well since 1990 with st80 user primitives...)<br>
>>> ...Unfirtunately not so in Squeak (VM crach possibly).<br>
>>><br>
>>> I'd like to put more time in it, but so far there has not been so much interest.<br>
>>><br>
>>> Nicolas<br>
>>><br>
>>> 2010/6/21 Jimmie Houchin <<a href="mailto:jdev@cyberhaus.us">jdev@cyberhaus.us</a>>:<br>
>>>> On 6/20/2010 10:41 AM, Lawson English wrote:<br>
>>>>><br>
>>>>> On 6/20/10 6:08 AM, Nicolas Cellier wrote:<br>
>>>>>><br>
>>>>>> 2010/6/20 Michael Haupt<<a href="mailto:mhaupt@gmail.com">mhaupt@gmail.com</a>>:<br>
>>>>>>><br>
>>>>>>> Hi Nicolas,<br>
>>>>>>><br>
>>>>>>> On Sun, Jun 20, 2010 at 11:17 AM, Nicolas Cellier<br>
>>>>>>> <<a href="mailto:nicolas.cellier.aka.nice@gmail.com">nicolas.cellier.aka.nice@gmail.com</a>> wrote:<br>
>>>>>>>><br>
>>>>>>>> About 8) : True, every single operation results in memory allocation<br>
>>>>>>>> / garbage collection, a burden for number crunching.<br>
>>>>>>><br>
>>>>>>> really?<br>
>>>>>>><br>
>>>>>>> There is this nice book by Didier Besset called "Object-Oriented<br>
>>>>>>> Implementation of Numerical Methods. An Introduction with Java and<br>
>>>>>>> Smalltalk.: An Introduction with Java and Smalltalk". It can't be<br>
>>>>>>> *that* bad. :-)<br>
>>>>>><br>
>>>>>> Agree, "not worse than Matlab" was the meaning of my message.<br>
>>>>>>>><br>
>>>>>>>> My own answer was: use C/FORTRAN for optimized number crunching<br>
>>>>>>>> functions. Use Smalltalk for any higher level/GUI function (via<br>
>>>>>>>> DLLCC/FFI). We may have more than 1 hammer in your toolset!<br>
>>>>>>><br>
>>>>>>> With GPU connectivity things emerging, number crunching might even be<br>
>>>>>>> an interesting area for Smalltalk.<br>
>>>>>>><br>
>>>>>>> Best,<br>
>>>>>>> Michael<br>
>>>>>><br>
>>>>>> Yes, this falls in vectorizing the operations.<br>
>>>>>> But I would go for a GPU-BLAS implementation available to any language<br>
>>>>>> (Smalltalk and C as well).<br>
>>>>>><br>
>>>>>> Nicolas<br>
>>>>><br>
>>>>> How many parallel squeak processes would be required to = the speed of one<br>
>>>>> native library for arbitrary precision math, or for other math intensive<br>
>>>>> purposes?<br>
>>>>><br>
>>>>> Lawson<br>
>>>><br>
>>>> Hello,<br>
>>>><br>
>>>> I would love to be using Squeak for my financial application. Numerical<br>
>>>> performance isn't currently what is stopping me. My problem is that I<br>
>>>> require interfacing with a Windows COM dll and in a future version with a<br>
>>>> Java library. Hopefully at some point I will be able to port to Squeak. I<br>
>>>> would much prefer it to using Python, which is what I am currently using.<br>
>>>><br>
>>>> I didn't even know Squeak was in the running until I discovered the Matrix<br>
>>>> class. And for what I need to do it performs reasonably adequately. However<br>
>>>> Squeak does not to my knowledge have a comprehensive collection of<br>
>>>> mathematics methods to be able to be applied to a variety of data. Currently<br>
>>>> I am using Python and Numpy which has a nicely optimized<br>
>>>> Mathematics/Scientific set of functions using optimized C/Fortran libraries.<br>
>>>> I would love to see Squeak compete in this area. In fact the Numpy people<br>
>>>> are currently refactoring the library to turn it into a C library usable by<br>
>>>> other languages.<br>
>>>><br>
>>>> Here is some samples from my experimentation.<br>
>>>><br>
>>>> Some of what I am doing is doing rolling calculations over my dataset.<br>
>>>><br>
>>>> dataset is one weeks worth of OHLC data of a currency pair.<br>
>>>><br>
>>>> In Squeak I have.<br>
>>>><br>
>>>> ttr := [<br>
>>>> 1 to: ((m rowCount) -500) do: [:i || row rowSum rowMax rowMin rowMedian<br>
>>>> rowAverage |<br>
>>>> row := (m atRows: i to: (499+i) columns: 5 to: 5).<br>
>>>> rowSum := row sum.<br>
>>>> rowMax := row max.<br>
>>>> rowMin := row min.<br>
>>>> rowMedian := row median.<br>
>>>> rowAverage := row average.<br>
>>>> omd add: {rowSum . rowMax . rowMin . rowMedian . rowAverage}]] timeToRun.<br>
>>>><br>
>>>> Squeak: 17 seconds, with Cog 4.2 seconds (nice work guys<br>
>>>> (Eliot/Teleplace)<br>
>>>><br>
>>>> In Python/Numpy I have.<br>
>>>><br>
>>>> import numpy as np<br>
>>>> def speedtest(array,omd):<br>
>>>> t1 = time.time()<br>
>>>> for i in range(0, (len(a)-500)):<br>
>>>> rowmax = np.max(a['bidclose'][i:i+500])<br>
>>>> rowmin = np.min(a['bidclose'][i:i+500])<br>
>>>> rowsum = np.sum(a['bidclose'][i:i+500])<br>
>>>> rowmedian = np.median(a['bidclose'][i:i+500])<br>
>>>> rowmean = np.mean(a['bidclose'][i:i+500])<br>
>>>> omd.append((rowsum, rowmax, rowmin, rowmedian, rowmean))<br>
>>>> return time.time()-t1<br>
>>>><br>
>>>> Python: .7 seconds<br>
>>>><br>
>>>> Python/Numpy performs well, is reasonably nice to work with. But I would<br>
>>>> give up the performance to be able to use Squeak. The live environment and<br>
>>>> debugging would be invaluable for experimentation.<br>
>>>><br>
>>>> Hopefully this will give you some idea.<br>
>>>><br>
>>>> Jimmie<br>
>>>><br>
>>>><br>
>>><br>
>>><br>
>><br>
>><br>
><br>
<br>
</div></div></blockquote></div><br>