Directory bug on Windows

Bryn Keller xoltar at xoltar.org
Fri May 20 13:51:10 PDT 2005


Okay, thanks. I haven't been able to get the alpha image working yet - 
here's what happens:

C:\lang\src\slate\alpha>wvm little.image
Bootstrapping libraries... (this may take a while. Save the image when 
done).
 Slate: Growing heap to 4838008 bytes.
Performing post-bootstrap actions...
Loading 'src/mobius/syntax/quote.slate'
Loading 'src/mobius/syntax/cascade.slate'
Loading 'src/lib/macro.slate'
Loading 'src/lib/numericMixin.slate'
Loading 'src/lib/tuple.slate'
Loading 'src/lib/linkedlist.slate'
Loading 'src/lib/cord.slate'
Loading 'src/lib/path.slate'
Loading 'src/lib/queue.slate'
Loading 'src/lib/buffer.slate'
Loading 'src/lib/inspect.slate'
You are in a twisty little maze of objects, all alike.
Loading 'src/lib/directory.slate'
Loading 'src/lib/module.slate'
Slate: Growing heap to 9032312 bytes.
Slate: Growing heap to 13226616 bytes.
Slate: Growing heap to 17420920 bytes.
Slate: Attempted to grow heap beyond limits


When I paste the code into my 3.3 image, I get:


Slate 3> c@(Sequence traits) indexOfSubSeq: subSeq startingAt: start 
ifAbsent:
block
[| first index |
  subSeq isEmpty ifTrue: [^ block do].
  subSeq size = 1 ifTrue: [^ (c indexOf: subSeq first startingAt:  start 
ifAbsen
t: block)].
  first: subSeq first.
  start upTo: c size - subSeq size do: [| :startIndex |
    (c at: startIndex) = first ifTrue:
      [index: 1.
       [(c at: startIndex + index) = (subSeq at: index)]
      whileTrue: [index: index + 1.
              index = subSeq size ifTrue: [^ startIndex]]]].
  block do
].
[indexOfSubSeq:startingAt:ifAbsent:]
Slate 4> Image saveNamed: 'fixed.slate' .
Slate: Growing heap to 10727976 bytes.
Slate: Growing heap to 14922280 bytes.
Slate: Attempted to grow heap beyond limits

Thanks,

Bryn

Brian Rice wrote:

> Oops, I spoke too soon! This is actually due to a bug in underlying  
> Sequence calls that was fixed recently after the 0.3.3 release. If  
> you use the alpha images + sources, or paste the following into Slate  
> to evaluate it (and save your image so you don't have to do it  
> again), what you are doing should work:
>
> c@(Sequence traits) indexOfSubSeq: subSeq startingAt: start ifAbsent:  
> block
> [| first index |
>   subSeq isEmpty ifTrue: [^ block do].
>   subSeq size = 1 ifTrue: [^ (c indexOf: subSeq first startingAt:  
> start ifAbsent: block)].
>   first: subSeq first.
>   start upTo: c size - subSeq size do: [| :startIndex |
>     (c at: startIndex) = first ifTrue:
>       [index: 1.
>        [(c at: startIndex + index) = (subSeq at: index)]
>       whileTrue: [index: index + 1.
>               index = subSeq size ifTrue: [^ startIndex]]]].
>   block do
> ].
>
> On May 20, 2005, at 12:59 PM, Brian Rice wrote:
>
>> On May 20, 2005, at 12:02 PM, Bryn Keller wrote:
>>
>>> Hi folks,
>>>
>>> Is this the best place to report bugs? I found one that occurs  when 
>>> you try to use a windows-style directory path, with either  forward 
>>> or backward slashes.
>>>
>>
>> First answer: yes.
>>
>> Second answer: it looks like a bug in the part that tries to figure  
>> out the drive. Honestly I haven't turned on my Windows XP machine  in 
>> a few months (the damned systems software broke down again - I  get 
>> so tired of dealing with that), so this has probably bit-rotten  or 
>> never worked. If you feel up to it, check out src/lib/file.slate  
>> where the "File Locator" code is to see how it works, particularly  
>> String as: File Locator - it is not terribly well-factored but you  
>> might at least find it instructive.
>>
>> I'll also take a look at it and probably wind up doing some  
>> extensive cleanups (turning it into, say, File Locator readFrom:  
>> PositionableReadStream), but it could take longer. Other (windows)  
>> users are welcome to try their skills at it and send in a patch  
>> (I'll accept anything that works and isn't too obscure).
>
>
>
>




More information about the Slate mailing list