Giter VIP home page Giter VIP logo

pharo's Introduction

Pharo

This repository contains sources of the Pharo language. Pharo is a pure object-oriented programming language and a powerful environment, focused on simplicity and immediate feedback (think IDE and OS rolled into one). Visit us on https://www.pharo.org or Pharo Discord Server

Pharo Discord online members Commit activity per month

Pharo screenshot

Download Pharo

To download the Pharo stable version for your platform, please visit:

Virtual machine

This repository contains only sources of the Pharo image. The virtual machine source code is managed in a separate repository:

Automated Builds

This repository is being built on a Jenkins server and uploaded to files.pharo.org.

The minimal image contains the basic Pharo packages without the graphical user interface. It is useful as a base for server-side applications deployment.

Bootstrapping Pharo from sources

To bootstrap a new Pharo image you need the latest stable version of Pharo. For more information about bootstrapping, refer to guillep/PharoBootstrap.

The bootstrapping can be done on a properly-named branch using the following script:

./bootstrap/scripts/bootstrap.sh

This will generate and archive images at various stages of the bootstrap process up to the full image in Pharo12.0-64bit-hhhhhhh.zip where hhhhhhh is the hash of the current checkout. Additional information on the stages of the bootstrap and how to snapshot during the process are provided as comments in bootstrap.sh.

  • You can set the BUILD_NUMBER environment variable to a unique integer (this is typically used only for the official builds and will default to 0 if not specified).
  • You can set the BOOTSTRAP_ARCH environment variable to either 64 (the default) or 32.
  • You can set the BOOTSTRAP_REPOSITORY and BOOTSTRAP_CACHE environment variables to do the bootstrap outside of the source repository.
  • You can set the BOOTSTRAP_VMTARGET environment variable to make the bootstrap use a virtual machine already present in your system (otherwise it will download it).
  • If you are on a branch that doesn't follow the expected naming convention ('PharoX.Y'), then the script will pick an appropriate default (such as Pharo12.0). To build Pharo12.0 from a custom branch, you need to set BRANCH_NAME=Pharo12 before the bootstrap script is run.

Bootstrapping with Docker

You can also use Docker if you prefer to control the bootstrapping environment completely. The following Dockerfile provides a Docker image with a fresh build. You can repeat the command git pull && ./bootstrap/scripts/bootstrap.sh in a container at any time:

# docker build --tag pharo .
# docker run --rm --name pharo -it pharo
FROM ubuntu:22.04
RUN apt-get update && apt-get -y install build-essential git wget zip
RUN git clone https://github.com/pharo-project/pharo.git /root/pharo
WORKDIR /root/pharo
RUN git pull && ./bootstrap/scripts/bootstrap.sh
ENTRYPOINT [ "bash" ]

Alternatively, in the root directory of this project (after a git clone), you can set up a Docker volume pointing to the project directory and build from within the Docker container (nice for Windows environments!):

# in the host environment start a Docker container
docker run --rm -it -v $(pwd)/:/pharo --workdir /pharo ubuntu:22.04 bash
# in the container add the required packages and start the bootstrap script
apt-get update && apt-get -y install build-essential git wget zip
./bootstrap/scripts/bootstrap.sh

File format

This source code repository is exported in Tonel format. In this format, packages are represented as directories and each class is inside a single file.

How to contribute

Pharo is an open source project very friendly to contributions of the users. See the document CONTRIBUTING how you can help to improve Pharo.

Pharo friendly links and organizations

http://github.com/Pharo-project/PharoMap

pharo's People

Contributors

aboubacardiawara avatar adri09070 avatar akevalion avatar akgrant avatar alisu avatar astares avatar balsa-sarenac avatar carolahp avatar demarey avatar dionisiydk avatar ducasse avatar dupriezt avatar estebanlm avatar fmqa avatar guillep avatar hogoww avatar jecisc avatar jordanmontt avatar juliendelplanque avatar kasperosterbye avatar lin777 avatar marcusdenker avatar pavel-krivanek avatar privat avatar rinzwind avatar stevencostiou avatar tesonep avatar theseion avatar tinchodias avatar vincentblondeau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pharo's Issues

BIFormatter with:and:do:separatedBy: usage should use a block

privateFormatMethodPatternMonoLineFor: aMethodNode
self
with: aMethodNode selectorParts
and: aMethodNode arguments
do: [ :key :arg |
codeStream nextPutAll: key.
self space.
self visitNode: arg ]
separatedBy: ( self characterSeparatorMethodSignatureFor: aMethodNode )

=>

privateFormatMethodPatternMonoLineFor: aMethodNode
self
with: aMethodNode selectorParts
and: aMethodNode arguments
do: [ :key :arg |
codeStream nextPutAll: key.
self space.
self visitNode: arg ]
separatedBy: [ self characterSeparatorMethodSignatureFor: aMethodNode ]

Some packages can be removed

The exporter does not remove old packages so the packages that were removed (or renamed) during Pharo 6 development are still in the repository
Like Tool-TxWorkspace, FuelPlatform etc.

Monkey build fails due to out of space

Example:
https://travis-ci.org/guillep/pharo-core/builds/199304776

It looks like the copy output consumes a lot of space for bootstrapping (copying a the src folder with tons of small files) and is not so efficient.

Alternative 1: Clone from another directory instead of copy:
Example: http://stackoverflow.com/questions/21045061/git-clone-from-another-directory
That would speed up the copy but may take space.

Alternative 2:
Fix the monkey to avoid copying, or do move.

Remove log of protocols

Logging protocols installed into the console just makes noise in the CI. We should log these low-level things in files, and publish those files as the results of the build in travis.

Formatter is invoked during parsing and sometimes up to 15 times!

If you modify the following method as follows:

BlConfigurableFormatter >> formatMethodBodyFor: aMethodNode
self
indentAround: [ Transcript show: 'x'.
self newLines: self newLinesAfterMethodPattern.
self formatMethodCommentFor: aMethodNode.
self formatPragmasFor: aMethodNode.
self visitNode: aMethodNode body ]

RBParser parseMethod: (Point sourceCodeAt: #degrees).

This method is invoked and this is really unclear why.
The formatter should not be invoked during simple parsing.

In addition putting a self haltOnce and enable it.
RBParser parseMethod: (Point sourceCodeAt: #degrees)
executes 15 times the following code. There is definitively something wrong.

BlConfigurableFormatter >> formatMethodBodyFor: aMethodNode
self
indentAround: [ Transcript show: 'x'.
self haltOnce.
self newLines: self newLinesAfterMethodPattern.
self formatMethodCommentFor: aMethodNode.
self formatPragmasFor: aMethodNode.
self visitNode: aMethodNode body ]

Metacello-TestsCommonMC and Metacello-TestsPlatform are exported with a wrong name

The package Metacello-TestsCommonMC is exported as Metacello-TestsCommon.pharo20.package
and
Metacello-TestsPlatform is exported as Metacello-TestsPlatform.squeakCommon

The generated package in the image is then named with the .something postfix but the a package with the name without postfix is created too.
Maybe the solution is simply in adding postfix to the name in baseline so the package name. The package will then have different name than in the original image but will be only one.

Executing new vms requires sudo in travis

For bootstrapping we are using the threaded heartbeat VMs. This requires to sudo in travis because it is an ubuntu 12.04.

We should see if moving to ubuntu trusty fixes this or we move back to itimer vms.

core.image does not have the SystemVersion

The core.image does not have set a current SystemVersion. That causes failures of the tests:

ZnFileUrlTests>>#testRetrieveContents 
ZnFileUrlTests>>#testWindowsDriveNamesInFileUrl 

On CI we set the version this way in past:

| updateString | updateString := 'version.txt' asFileReference readStream contents. SystemVersion classPool at: #Current put: (SystemVersion new type: 'Pharo'; major: updateString first asString asInteger; minor: updateString second asString asInteger; highestUpdate: updateString asInteger; suffix: ''; yourself)

CI Export job is failing

See: https://ci.inria.fr/pharo/view/Pharo%20bootstrap/job/Pharo-6.0-Bootstrap-Git-Export/280/console

We are loading the correct iceberg version:

github://npasserini/iceberg:dev-0.4-pre-multi-remotes [3652cd8:dev-0.4-pre-multi-remotes]

But apparently our export script is failing with a DNU:

'Errors in script loaded from /builds/workspace/Pharo-6.0-Bootstrap-Git-Export/scripts/export.st'
MessageNotUnderstood: receiver of "fileOut:on:" is nil
UndefinedObject(Object)>>doesNotUnderstand: #fileOut:on:
UndefinedObject>>DoIt

Rubric cleaning

In rubric a paragraph can be decorated by decorators.
The trick is that a paragraph is the last one of the chain.

Current implementation use tricks such as

doesNotUnderstand: aMessage
^ [ aMessage sendTo: next ]
on: MessageNotUnderstood
do: [ super doesNotUnderstand: aMessage ]

or this

paragraph
"this method is here to find the paragraph in the chain, instead of relying on implementing #doesNotUnderstand: !!!"

| p |
p := next.
[ p  isNotNil and: [ p isKindOf: RubParagraph ] ] whileFalse: [ p := p next ].
^p

Terribly ugly!

A nicer solution is to define all the used methods as
RubParagraphDecorator >> selectionStop
next selectionStop

This way no magic. The tools and the reader can understand and this is more important.
The price to add a stupid method per paragraph method that is adapted is smaller than
mystifying the reader and maintainer.

acceptTextMorphs is super ugly

acceptTextMorphs
"Accept any text morphs except for those that have no edits."
self allMorphs do: [:p |
((p respondsTo: #accept) and: [
(p respondsTo: #hasUnacceptedEdits) and: [
p hasUnacceptedEdits]]) ifTrue: [p accept]]

This marvellous code states that the text editor of a dialog must have an #accept method.
adding it to RubPluggableTextMorph fixes the issue

The solution is to have an explicit instance variable pointing to the right object.
allMorphs is domeed

Stef

glamorousBasePassiveBackgroundColorFor: is not defined UITheme

UITheme >> textEditorDisabledFillStyleFor: is called glamorousBasePassiveBackgroundColorFor:

textEditorDisabledFillStyleFor: aTextEditor
"Return the disabled fillStyle for the given text editor."

^self glamorousBasePassiveBackgroundColorFor: aTextEditor

glamorousBasePassiveBackgroundColorFor: aButton
^ self class basePassiveBackgroundColor

is duplicated in PharoDarkTheme, GLMWhitespaceTheme, and PharoLightTheme!

Synchronise Spec

Migration guide

https://github.com/pharo-spec/Spec/blob/master/resources/migration/specPharo7ToSpecPharo8.md

Highlitghs

There was a lot of cleaning.

  • We removed a lot of dead code and unused features (Such as the
    TableLayout since the SpecLayout that was the only one documented and
    they did the same thing).
  • We progressed on the renaming of Models into Presenters
  • We cleaned the dependencies between packages
  • We begun to make Spec more "Morphic independant" to be able to have
    connectors to other backends later
  • ...

There is also new features:

  • Windows can now have a toolbar, statusbar or menu. Those can be
    initialized via the #initializeWindow: method. See
    PrepareWindowExample. Later, the goal is to move everything related to
    window to this method instead of having all presenters that can access
    their window.
  • It is now possible to customize dialog action bar via the
    #initializeDialogWindow: method. See SpecDemoModalPresenter
  • We introduced ModalPresenter that might replace DialogPresenter. A
    ModalPresenter compared to dialogs will act as a real modal and stop
    the user to take control on other windows while the modal is opened.
    See SpecDemoModalPresenter
  • Introduction of a InputNumber (See Spec Demo in the help menubar)
  • Introduction of a LinkPresenter (See Spec Demo in the help menubar)
  • ...

I try to add demos to the SpecDemos each time I add a new feature so
that users can find new features even if they are not yet well
documented.

Changelog

Features

  • Add #addSpacer to SpecLayout (298eb26)
  • Add labelled presenter (bf76234)
  • Do not force users to have getters for their presenters (f24bd7f)
  • Now presenters have a special icon in Calypso (5c47a63)
  • Add ComposablePresenter>>#iconNamed: (d8ce2e2)
  • Layouts now understand presenter instead of model (7a78375)
  • It is now possible to add menus, status bar and menu bars to window presenters (ee0acf6)
  • Add NumberPresenter with its Morphic adapter (88792da)
  • Refactor dialog presenter to be more flexible (e835558)
  • New presenter: URL prensenter (49f941f)
  • Introduction of real modals: Those modals will stop the workflow of the user to force the interaction. Like everymodal everywhere else. (27289a8)

Bug fixes

  • #additianalKeybindings is not a value holder (547d5f0)

Cleaning

  • Rename composable presenter (f29cf68)
  • Remove WindowPresenter title variable (6a311e1)
  • Cut cyclic dependencies between Layouts and Core (4953967)
  • Remove deadcode (50b2a8c)
  • Move all tests to tests packages (bae8f4c)
  • Better about title managment (9d91152)
  • Clean the interpreter (a509654 and 6587836)
  • Clean tests (073ed26)
  • Remove SpecLayout>>selector (7e1d283)
  • Ensure presenter are not directly linked to MorphcAdapters (bc63f1c)
  • Deprecate instantiateModels: for instantiatePresenters: (8bd78cc)
  • Layouts now stores objects instead of arrays (2b35bc4)
  • Remove Spec table layout since Spec layout has the same behavior (103a827)
  • Remove references to Smalltalk ui theme (b37dd2a)
  • Remove Object>>isSpecAdaptor (1664920)
  • Rename #ghostText into #placeholder (639e7e5)
  • Clean windows/dialogs opening mechanism (39ce96a)

Infrastructure

  • Enable TravisCI (8208767)
  • Add dependencies between packages (b655505)
  • Make Spec loadable in non interactive mode (0411400)
  • Register Spec demo in the Help menu (d36d2ed)
  • Add source code in Tonel format to demos (648a681)

PrettyPrinter eats space on large selectors

asRingDefinitionWithMethods: methodsBoolean withSuperclasses: supersBoolean withSubclasses: subsBoolean withPackageKeys: packageKeys in: aRGSlice

When method signatures on multiple lines is on
=>

we obtain
asRingDefinitionWithMethods: methodsBooleanwithSuperclasses: supersBooleanwithSubclasses: subsBooleanwithPackageKeys: packageKeysin: aRGSlice

the parameters are glued with the next selector part.

Glamorous theme should be removed

We should finish the cleaning of the themes and remove the Glamorous theme for real to reach the original goal to have only two in the base system (white & black)

Add issue template

For the infrastructure, we can use GitHub to define some issue templates. For example, we can have a template for bug report where we can ask for the OS, Pharo version, VM version, etc and explain how to get the informations.

failure of CombinedChar initialization

We already have an unused script that does the Unicode initialization of CombinedChar class in:
bootstrap/scripts/01-initialization/03-initUnicode.st

But the try to allow it in production failed:

'Errors in script loaded from /home/travis/build/guillep/pharo-core/bootstrap/scripts/01-initialization/03-initUnicode.st'
The command "bash ./bootstrap/scripts/build.sh" exited with 1.

The problem will be probably in the relative path in the script. On CI job the initialization works.

Revise extensions made to RBProgramNode

Some extensions made to the ProgramNode hierarchy would benefit to be put back in the node class package.
For example:

  • methodProperty*
  • allSequenceNodes
  • addPragma:
  • reverseNodesDo: aBlock
  • traversalIndexOf: aNode
  • nodeAtTraversalIndex:
  • statements
  • asSequenceNode
  • asPragma
  • removeNode: aNode
  • leftmostChainReceiver
    This will also allow to write tests in isolation, because I'm quite sure such extensions methods are
    not the subject of tests.

Add a extract setUp refactoring

It would be super cool to have an extractSetUp refactoring that extract the selection as a setUp
and since this is a setUp that it does not add the call to the setUp in the method.

Make new *latest* version in bintray

Nowadays, there is only each version that is uploaded to bintray by number. We should also deploy a version named latest with the latest version.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.