Göran Krampe | 1 Jun 08:19
Picon
Gravatar

Re: Is this a buglet? (SmallInteger>>printString related)

Hi folks!

Messing with small scale optimization can be great fun. Preamble:

"Change Set:		FloorLogSmallInteger
Date:			31 May 2007
Author:			Göran Krampe

After messing with SmallInteger>>decimalDigitLength and noticing that
'1000 log truncated' returns the wrong answer I ended up chasing down
base-10 log algorithms. Found this nice source of tricks:

http://www.hackersdelight.org/HDcode/ilog.c

And based on code in there and the fact that nlz (number of leading zeros)
can be computed using 'self asFloat exponent' I came up with this
implementation of #floorLog for SmallIntegers. It still is not as fast as
simpleminded comparisons as in decimalDigitLength though so it is not
worth using. But it was fun to experiment."

So the attachment is merely for amusement and/or info on the subject! :) :)

regards, Göran
Attachment (FloorLogSmallInteger.1.cs.gz): application/x-gzip, 656 bytes

Adrian Lienhard | 1 Jun 09:37
Picon
Favicon

Re: Local SqueakSource Server

It's a pitty that installing something like SqueakSource is so  
complicated...
One of the problems seems to be that SqueakMap does not work in your  
3.7 image (there have been various issues with SqueakMap IIRC).  
Anyway, if you follow the description on the Wiki page http:// 
source.squeakfoundation.org/ss.html I think you get around SqueakMap  
since all packages are in the repository of SqueakSource-SqF itself.

HTH,
Adrian

On May 31, 2007, at 21:13 , Matthew Fulmer wrote:

> I am trying to install a SqueakSource Server on my home machine
> in order to try creating an email-based commit notifier. I have
> tried several combinations of 3.7 image, 3.8 image, and 3.9
> images
>
> Things I have tried:
> - Loading http://www.squeaksource.com/ss/SqueakSource-dt.1020.mcz
>   into a full 3.7 or 3.8 image. This Installs fine, but does not
>   run because DynamicBindings is missing.
>   - After installing DynamicBindings from SqueakMap onto a 3.8
>     image, the server fails when a page is loaded with:
>     MessageNotUnderstood: UndefinedObject>>title. I am not sure how
>     to get a traceback.
>   - I could not test on a 3.7 image, because I cannot load
>     SqueakMap; It tries to update to 2.2, and fails.
> - Following the instructions on the wiki page for
>   http://source.squeakfoundation.org/ss/ fails because I cannot use
(Continue reading)

Göran Krampe | 1 Jun 10:34
Picon
Gravatar

Re: Local SqueakSource Server

Hi!

> It's a pitty that installing something like SqueakSource is so
> complicated...
> One of the problems seems to be that SqueakMap does not work in your
> 3.7 image (there have been various issues with SqueakMap IIRC).

SqueakMap is currently 3.8+ only due to the WideString issue. I upgraded
SqueakMap to 3.8 and then discovered that ImageSegments from 3.8 don't
load in 3.7 or earlier due to the wide string stuff.

Sometime when someone take the time - we should move to another format of
the map. But since I am the only one so far interested in developing
SqueakMap (Brian has helped with the client though) AND I don't have time
- it does not get done.

regards, Göran

nicolas cellier | 1 Jun 13:19

Re: Is this a buglet? (SmallInteger>>printString related)

Göran Krampe <goran <at> krampe.se> writes:
> 
> After messing with SmallInteger>>decimalDigitLength and noticing that
> '1000 log truncated' returns the wrong answer I ended up chasing down
> base-10 log algorithms. Found this nice source of tricks:
> 
> http://www.hackersdelight.org/HDcode/ilog.c
> 
> And based on code in there and the fact that nlz (number of leading zeros)
> can be computed using 'self asFloat exponent' I came up with this
> implementation of #floorLog for SmallIntegers. It still is not as fast as
> simpleminded comparisons as in decimalDigitLength though so it is not
> worth using. But it was fun to experiment."
> 

Yes, this link is fun.
Also don't forget Smalltalk has #highBit,
a complement of nlz not involving Float.

Nicolas

Lex Spoon | 1 Jun 16:54

Re: Alternative Thread Schedulers

John M McIntosh <johnmci <at> smalltalkconsulting.com> writes:
> Right Tim, he would have to add one,  need *something* to suspending
> things and fiddling with the list of runnable processes.

Yes, that should be enough.  This strategy applies to all kinds of
thread systems, not just Squeak's, and allows you to bootstrap a new
scheduler on top of an existing one.

Some general thoughts about this scheme:

1. Make the scheduler high-priority, so that it reliably gets control
   whenever it wants to.

2. Possible make your own "idle" process, one notch above the current
   idle process, so that you can detect a lack of activity.  This
   process can wake up the high-priority one, if you want, by
   signalling a semaphore that the high-priority one notices.

3. Consider limiting your schedule to managing a list of threads that
   are registered with it, as opposed to literally managing all
   threads in the system.  This way it plays a little nicer with
   anything else that might be running.

Oh, and the obvious:

4. Save often, and make lots of backups.  Screwing up thread
   scheduling can really ruin an image!

Lex

(Continue reading)

Matthew Fulmer | 1 Jun 17:36
Picon
Gravatar

Re: Local SqueakSource Server

On Fri, Jun 01, 2007 at 09:37:14AM +0200, Adrian Lienhard wrote:
> It's a pitty that installing something like SqueakSource is so  
> complicated...
> One of the problems seems to be that SqueakMap does not work in your  
> 3.7 image (there have been various issues with SqueakMap IIRC).  
> Anyway, if you follow the description on the Wiki page http:// 
> source.squeakfoundation.org/ss.html I think you get around SqueakMap  
> since all packages are in the repository of SqueakSource-SqF itself.

I tried this, but still ran into the SqueakMap show-stopper. 3.7
does not come with Monticello, and so must be loaded from
SqueakMap. But SqueakMap does not work. I suppose I could try
downloading the MCInstaller and Monticello packages from the
SqueakMap web interface.

--

-- 
Matthew Fulmer -- http://mtfulmer.wordpress.com/
Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808

John M McIntosh | 1 Jun 18:56

Re: Alternative Thread Schedulers


On Jun 1, 2007, at 7:54 AM, Lex Spoon wrote:

> 2. Possible make your own "idle" process, one notch above the current
>    idle process, so that you can detect a lack of activity.  This
>    process can wake up the high-priority one, if you want, by
>    signalling a semaphore that the high-priority one notices.

Ah, this is good. Don't fiddle with the system's idle process. Many  
years ago I tried that, we even pushed the
change out, followed a few hours later by an emergency fix. The  
intent was to change the idle logic from sleeping
a default of 10 ms (or something) to sleeping up to the next wakeup  
Delay timing point.

We discovered (Scott did I think) that the code in Smalltalk which  
went off to find out that information *could* if
the objects aligned right then wait on the Delay semeaphore. Which  
then result in the VM terminating because
there was no runnable process since the idle process was stalled  
waiting on the Delay semaphore.

A few years after this we did put back in logic in the VM idle  
primitive to get the next wakeup time because the
VM was handed that information as part of the Delay logic. Thus it  
can sleep upto the next wakeup tick, baring
interrupts from the operating system which terminate the operating  
system's sleep api logic early. That improved
Delay accuracy and reduced CPU needs for idle system.

(Continue reading)

mmille10 | 2 Jun 00:41
Picon

Re: Balloon 3D

DirectX started out inferior to OpenGL. I remember the days when DirectX first came out. Cards that fully
supported OpenGL were high end and very expensive, several hundred dollars each. The DirectX cards were
cheaper, more affordable to average consumers, but supported fewer features. I remember somebody
(maybe ID Software?) came out with a library called MiniGL that could run accelerated 3D graphics using a
subset of OpenGL on the more expensive DirectX cards. I have very little experience with developing for
DirectX, OpenGL, etc. So I can't make an assessment about the superiority of the current versions.

---Mark
mmille10 <at> comcast.net

Yanni Chiu | 2 Jun 04:38
Favicon

Re: Local SqueakSource Server

Matthew Fulmer wrote:
> I tried this, but still ran into the SqueakMap show-stopper. 3.7
> does not come with Monticello, and so must be loaded from
> SqueakMap. But SqueakMap does not work. I suppose I could try
> downloading the MCInstaller and Monticello packages from the
> SqueakMap web interface.

Last resort: download the mcz file, unzip it - it's just a zip file
(rename it to .zip, if necessary), then filein the .st file.

Matthew Fulmer | 2 Jun 05:08
Picon
Gravatar

Re: Local SqueakSource Server

On Fri, Jun 01, 2007 at 08:36:58AM -0700, Matthew Fulmer wrote:
> On Fri, Jun 01, 2007 at 09:37:14AM +0200, Adrian Lienhard wrote:
> > It's a pitty that installing something like SqueakSource is so  
> > complicated...
> > One of the problems seems to be that SqueakMap does not work in your  
> > 3.7 image (there have been various issues with SqueakMap IIRC).  
> > Anyway, if you follow the description on the Wiki page http:// 
> > source.squeakfoundation.org/ss.html I think you get around SqueakMap  
> > since all packages are in the repository of SqueakSource-SqF itself.
> 
> I tried this, but still ran into the SqueakMap show-stopper. 3.7
> does not come with Monticello, and so must be loaded from
> SqueakMap. But SqueakMap does not work. I suppose I could try
> downloading the MCInstaller and Monticello packages from the
> SqueakMap web interface.

I tried doing this, and I got further than before. I downloaded
http://www.wiresong.ca/static/releases/MCInstaller.11.st from
SqueakMap, and all the packages in
http://source.squeakfoundation.org/ss/ . Then I opened up a
3.7-5989 image, filed in MCInstaller, then proceeded installing
the MC snapshots in the order specified on the wiki page at
http://source.squeakfoundation.org/ss.html . When installing
KomHttpServer-gk.6.mcz, I get a warning that missing older
dependency KomServices-gk.1.mcz cannot be found. Ignoring it, I
continue on. I install Seaside2-avi.86.mcz and enter a username
and password. When I install SqueakSource-dew.152.mcz, the image
halts at 100% CPU at about 7/8 of the way through loading. Alt-.
has no effect.

(Continue reading)


Gmane