Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.920.mcz
==================== Summary ====================
Name: System-eem.920
Author: eem
Time: 3 December 2016, 9:33:47.096323 am
UUID: 694cd18b-4572-4762-b5b9-29e116119a9d
Ancestors: System-bf.919
The various scanFor: and scanForEmptySlotFor: implementations only need to access the size of their array once.
=============== Diff against System-bf.919 ===============
Item was changed:
----- Method: SystemDictionary>>scanFor: (in category 'private') -----
scanFor: anObject
"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or raise an error if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements."
+ | index start size |
+ index := start := anObject hash \\ (size := array size) + 1.
- | index start |
- index := start := anObject hash \\ array size + 1.
[
| element |
((element := array at: index) == nil or: [ element key == anObject ])
ifTrue: [ ^index ].
+ (index := index \\ size + 1) = start ] whileFalse.
- (index := index \\ array size + 1) = start ] whileFalse.
self errorNoFreeSpace!
Item was changed:
----- Method: SystemDictionary>>scanForEmptySlotFor: (in category 'private') -----
scanForEmptySlotFor: anObject
"Scan the key array for the first slot containing an empty slot (indicated by a nil). Answer the index of that slot. This method will be overridden in various subclasses that have different interpretations for matching elements."
+ | index start size |
+ index := start := anObject hash \\ (size := array size) + 1.
- | index start |
- index := start := anObject hash \\ array size + 1.
[
(array at: index) ifNil: [ ^index ].
+ (index := index \\ size + 1) = start ] whileFalse.
- (index := index \\ array size + 1) = start ] whileFalse.
self errorNoFreeSpace!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1050.mcz
==================== Summary ====================
Name: Kernel-eem.1050
Author: eem
Time: 3 December 2016, 9:32:37.361263 am
UUID: 57843650-49e3-4f32-a54b-026878128dc2
Ancestors: Kernel-cmm.1049
The various scanFor: and scanForEmptySlotFor: implementations only need to access the size of their array once.
=============== Diff against Kernel-cmm.1049 ===============
Item was changed:
----- Method: MethodDictionary>>scanFor: (in category 'private') -----
scanFor: anObject
"Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or raise an error if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements."
+ | index start size |
+ index := start := anObject identityHash \\ (size := array size) + 1.
- | index start |
- index := start := anObject identityHash \\ array size + 1.
[
| element |
((element := self basicAt: index) == nil or: [ element == anObject ])
ifTrue: [ ^index ].
+ (index := index \\ size + 1) = start ] whileFalse.
- (index := index \\ array size + 1) = start ] whileFalse.
self errorNoFreeSpace!
Xtreams comes with a powerful parsing class called PEGParser. It’s impossible to understand without an PEGActor subclass to convert the parsed into a new string. Squeak’s Xtreams package does not have one. There is one actor in Cimcom’s VisualWorks in PEG.WikiGenerator.
I’ve adapted PEG.WikiGeneator into PWWikiActor so now there is an PEGActor subclass for Xtreams PEGParser. This is important, because now there is a complete PEGParser solution in Squeak and Pharo. This means the other grammars that do not have actors (i.e. PEGParser class grammarCSS3, grammarHttpUrl, grammarJSON, grammarJavascript, grammarSmalltalk, grammarXML) now have an example in a working actor on how to proceed.
Well, a working example. I’d be pretty disappointed if people told me my PWWikiActor was the height of coding finesse.
All the above matters, because Xtreams PEGParser is a replacement for SmaCC, PetitParser and an external regex package. I've replaced SmaCC in TinyWiki with PEGParser and PWDocumentActor.
To use it: install Xtreams [1]; load the PW-Xtreams-WikiParsing [2]; and, input some wiki syntax. [3]
Chris
[1]
| oldPref oldAuth|
oldPref := Scanner prefAllowUnderscoreSelectors.
oldAuth := Utilities authorInitialsPerSe.
Scanner prefAllowUnderscoreSelectors: true.
Utilities setAuthorInitials: 'al-loader'.
$_ tokenish ifFalse: [
Character
compile: 'tokenish
"Answer whether the receiver is a valid token-character--letter, digit, or
colon."
^self == $_ or: [self == $: or: [self isLetter or: [self isDigit]]]'
classified: 'testing'.
String initialize ].
(Installer repository: 'http://source.squeak.org/FFI')
install: 'FFI-Pools';
install: 'FFI-Kernel';
install: 'FFI-Tests';
install: 'FFI-Win32';
install: 'FFI-MacOS';
install: 'FFI-Unix'.
(Installer wiresong project: 'al')
addPackage: 'Xtreams-Support';
addPackage: 'Xtreams-CoreTests';
addPackage: 'Xtreams-Core';
addPackage: 'Xtreams-Substreams';
addPackage: 'Xtreams-Terminals';
addPackage: 'Xtreams-Parsing';
addPackage: 'Xtreams-Http';
addPackage: 'Xtreams-Xtras';
addPackage: 'Xtreams-ParsingTests';
addPackage: 'Xtreams-TerminalsTests';
addPackage: 'Xtreams-XtrasTests';
addPackage: 'Xtreams-SubstreamsTests';
addPackage: 'Xtreams-TransformsTests';
addPackage: 'Xtreams-Transforms';
addPackage: 'Xtreams-HttpTests';
install.
[2]
(Installer ss3)
project: 'PEGWiki';
install: 'PW-Xtreams-WikiParsing'.
[3]
myparser := (PEGParser parserBootstrap) parse: 'Grammar' stream: PEGParser grammarWiki reading actor: PEGParserParser new.
input :=
'= Hello World
I would like to *bold* some text
'.
myparser parse: 'Page' stream: input reading actor: PWWikiActor new
'<div><h1>Hello World</h1>
<p>I would like to <b>bold</b> some text</p></div>'
Hi all,
Bert, Tim F. and I have fixed the Squeak-trunk pipeline and we finally get
daily updates again.
You can find the current trunk image bundles at [1], the project that
generates a new trunk image and creates all bundles is at [2].
I'm now working on running the SUnit tests as part of the pipeline.
Currently failing tests will be skipped until they have been fixed. Tim is
working on fixing Etoys which we want to build alongside with Squeak.
Feel free to provide feedback here or open an issue at [2]
Best,
Fabio
[1] http://files.squeak.org/6.0alpha/
[2] https://github.com/squeak-smalltalk/squeak-app