Pharo-dev
By thread
pharo-dev@lists.pharo.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- 1 participants
- 144619 messages
cross platform issue with versionner in pharo 3.0 - want a slice?
by Paul DeBruicker
Hey -
I'm thinking about making a slice to that versionner doesn't use Symbols for class names when creating baselines. The problem is that on GemStone symbols and strings don't compare as equal, so looking up a class in a repo fails.
Is that slice something that is generally interesting ? Is it already fixed in Pharo 4?
Thanks
Paul
Nov. 15, 2014
Re: [Pharo-dev] New Cog VMs available
by Eliot Miranda
Apologies but at least the Spur VMs are broken. They don't load images.
Consequently I've taken down the files. Normal service will be resumed
asap.
On Fri, Nov 14, 2014 at 3:11 PM, Eliot Miranda <eliot.miranda(a)gmail.com>
wrote:
> ... at http://www.mirandabanda.org/files/Cog/VM/VM.r3133/.
>
> CogVM binaries as per VMMaker.oscog-eem.934/r3133
> These VMs should be functionally identical to the 3126 VMs; the core VM
> differs
> only in having been compiled from generated source that has been
> refactored to
> enable convenient 32-bit to 64-bit Spur image bootstrap. I'm building and
> releasing them mostly to test that refactoring. However, there is new DNS
> support on Windows and SSL support on Unix. See below.
>
> Simulator/Slang:
> Refactor to allow 32-bit and 64-bit Spur to coexist
> in the simulator, thereby allowing a 64-bit bootstrap.
>
> Replace direct use of BytesPerWord, ShiftForWord, BytesPerOop and
> BaseHeaderSize
> with sends of wordSize, shiftForWord, bytesPerOop & baseHeaderSize
> respectively.
> Make sure these are still output as the manifest constants in the
> generated C.
> Eliminate use of bytesPerSlot in favour of bytesPerOop. The use of sends
> is
> similar to those in trunk VMMaker, but I don't have time to merge. Sorry
> :-(.
>
> Work-around use of sends for bytesPerOop in e.g.
> generateToByDo:on:indent: and
> users of isConstantNode:valueInto:.
>
> Do a better job at inlining via inlineCodeOrNilForStatement:in:. Comment
> in
> isNode:substitutableFor:inMethod:in: explains.
>
> Eliminate generic VM_LABEL support, labelling only the bytecodes in
> interpret.
>
> Eliminate use of LargeContextSize in the stack and cog VMs. Alas haven't
> yet
> eliminated the frame offset constants such as FoxCallerSavedIP et al. We
> only
> need one of the two word sizes of interpreter to be executable in the
> bootstrap.
>
> And remember to generate the GdbARMPlugin
>
> Add accessorDepths for the exported browser plugin primitives for Spur.
>
> Merge Levente's recent changes to DNS lookup on Windows and SSL on Unix.
> See
> http://squeakvm.org/cgi-bin/viewvc.cgi/squeak?view=revision&revision=2249
> http://bugs.squeak.org/view.php?id=7824
>
> Have the Unix & Mac VMs print the process id and working directory when
> blocking
> on error or assert fail. Add scripts for the ARM VM archives.
> --
> best,
> Eliot
>
--
best,
Eliot
Nov. 15, 2014
Julia vs Pharo
by Serge Stinckwich
Hi all,
I find a recent paper about Julia that might be appealing for people
interested in doing scientific computation in Pharo (like the
SciSmalltalk community) : http://arxiv.org/pdf/1411.1607v1.pdf
"Julia: A fresh approach to numerical computing"
Julia is a new dynamic programming language for scientific programming
with much higher performance than R or Python.
I found that some concepts are quite closed to Pharo in fact:
- meta-programming and code generation
- arbitrary precision integer
- JIT compiler (based on LLVM)
- call to C API
What is missing in Pharo at the moment:
- multiple dispatch
- arbitrary precision float
- dynamic dataflow type inference
- optional type annotations (maybe with pluggable type extensions for Pharo ?)
- special matrices types like spares or dense matrix, tri-diagonal, etc ...
- vectorization
Regards,
--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Help fight Ebola by joining the Computing for Ebola Challenge
http://bit.ly/1oEdBag
Nov. 15, 2014
Re: [Pharo-dev] Configurations and Github for a specialised configuration browswe
by kilon alios
Travis seems like an overkill for me right now. Sure if I was bombarded by
pull requests from other developers but in reality I work alone . But I
will definitely keep it in mind in case my projects become so popular that
people start to send me pull requests regularly.
All I wanted was an easy way to install code from github to pharo without
the need to install git and you gave me that. Next step is to see how I
would integrate github with pharo better, should I use Configuration
versions or is it better to use branches ? I am more orientated towards
branches.
I have stared your repos to make sure I get keep updated in any progress
you make. I plan also to go back and re read that metacello chapter to
better understand metacello.
Thank you very much for your hard work, keep rocking :)
On Sat, Nov 15, 2014 at 7:15 PM, Dale Henrichs <
dale.henrichs(a)gemtalksystems.com> wrote:
> Kilon,
>
> Regarding Pharo4.0 and Metacello, I just recently added Pharo4.0 support
> to Metacello[1] and buildCI[2].
>
> If you are using github, then you should checkout builderCI. BuilderCI
> let's you hook into travis-ci[3] and run unit tests on every commit. It's
> especially useful when you get a pull request, because the unit tests are
> run against the MERGED version of the pull request (BEFORE you do the
> merge), so you can be assured that when you do the merge, your tests will
> be green ...
>
> Let me know if the builderCI instructions[4] work for you...It's been
> awhile since I've reviewed the docs:)
>
> Dale
>
> [1] https://groups.google.com/forum/#!topic/metacello/TVzfP8ZwPPE
> [2] https://github.com/dalehenrich/builderCI
> [3] https://travis-ci.org/
> [4] https://github.com/dalehenrich/builderCI#using-builderci
>
> On Sat, Nov 15, 2014 at 8:55 AM, kilon alios <kilon.alios(a)gmail.com>
> wrote:
>
>> YESSSS!!!!
>>
>> thanks Dale, you are awesome, it works like a charm for me now.
>>
>> Yes you needed to download the Pharo3DarkTheme because the Theme is
>> installed by default in Pharo 4 and I dont intent on supporting pharo 3
>> with my project. If you tried Pharo 4 you would have no such issue.
>>
>> I would appreciate it if other people could spend just a minute getting
>> latest Pharo 4 and trying this in a Workspace
>>
>> Metacello new
>> baseline:'Nireas';
>> repository:'github://kilon/nireas:master';
>> get.
>>
>> Metacello new
>> baseline:'Nireas';
>> repository:'github://kilon/nireas:master';
>> load.
>>
>> Then open a System Browser and make sure Nireas package exist and please
>> report it here if its not much trouble. This solution is super easy for
>> installing git repos and we could make a class to make it even easier with
>> a single line command.
>>
>> Question: Why Pharo 4 has not got the latest Metacello ?
>>
>> On Sat, Nov 15, 2014 at 6:33 PM, Dale Henrichs <
>> dale.henrichs(a)gemtalksystems.com> wrote:
>>
>>> Kilon,
>>>
>>> This code:
>>>
>>> Metacello new
>>> baseline:'Nireas';
>>> repository:'github://kilon/Nireas:master';
>>> get;
>>> load.
>>>
>>> does require a pretty recent version of Metacello ("chaining" the get
>>> and load)[1]. I tried the following in a stock pharo3.0 and got an error
>>> about requiring Pharo3DarkTheme, so I was able to load the package:
>>>
>>> Metacello new
>>> baseline:'Nireas';
>>> repository:'github://kilon/Nireas:master';
>>> get.
>>> Metacello new
>>> baseline:'Nireas';
>>> repository:'github://kilon/Nireas:master';
>>> load.
>>>
>>> Dale
>>>
>>> [1] https://github.com/dalehenrich/metacello-work#pharo30
>>>
>>> On Sat, Nov 15, 2014 at 3:13 AM, kilon alios <kilon.alios(a)gmail.com>
>>> wrote:
>>>
>>>> ok after rereading your emails more carefully i realised that you meant
>>>> that BaselineOf should go to its own package, so I moved the class to
>>>> BaselineOfNireas package and now it does not report the same error but now
>>>> it complain that project,baseline or configuration not specified.
>>>>
>>>> Is it mandatory to specify a configuration for my project , I though
>>>> the baseline class was enough. Would love to hear more info on the subject,
>>>> I am looking also at the Metacello chapter which by the way is in Deep Into
>>>> Pharo and not PBE , I see loads of info on the subject but does not seem to
>>>> mention anything about the BaselineOf class .
>>>>
>>>> Will love it if we can gave a simple way to load git repos to pharo 4.
>>>>
>>>> On Sat, Nov 15, 2014 at 12:53 PM, kilon alios <kilon.alios(a)gmail.com>
>>>> wrote:
>>>>
>>>>> small typo in my paste
>>>>>
>>>>> the actual code i used is
>>>>>
>>>>> Metacello new
>>>>> baseline:'Nireas';
>>>>> repository:'github://kilon/Nireas:master';
>>>>> get;
>>>>> load.
>>>>>
>>>>> any help is appreciated :)
>>>>>
>>>>> On Sat, Nov 15, 2014 at 12:50 PM, kilon alios <kilon.alios(a)gmail.com>
>>>>> wrote:
>>>>>
>>>>>> hello Dale I tried your approach with a new project I created called
>>>>>> Nireas, its a theme manager for pharo 4. I followed your instructions and
>>>>>> it complains that it cannot find the BaselineOfNireas
>>>>>>
>>>>>> This is the code I used
>>>>>>
>>>>>> Metacello new
>>>>>> baseline:'Nireas';
>>>>>> repository:'github://kilon/nireas:master';
>>>>>> get;
>>>>>> load.
>>>>>>
>>>>>> here is the repo
>>>>>>
>>>>>> https://github.com/kilon/Nireas
>>>>>>
>>>>>> and here is the error
>>>>>>
>>>>>>
>>>>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer:
>>>>>> linearLoadPackageSpec: packageSpec gofer: gofer
>>>>>> MetacelloPlatform current
>>>>>> do: [
>>>>>> | references nearestReference cachedReference externalReference
>>>>>> mcVersion loadedVersionInfos |
>>>>>> "check to see if mcz file is already in cacheRepository"
>>>>>> cachedReference := self resolvePackageSpec: packageSpec cachedGofer:
>>>>>> self loaderPolicy cacheGofer.
>>>>>> (cachedReference ~~ nil and: [ packageSpec getFile ~~ nil ])
>>>>>> ifTrue: [
>>>>>> cachedReference name = packageSpec file
>>>>>> ifTrue: [
>>>>>> "exact match between packageSpec file and cache"
>>>>>> ^ self scheduleFetchFor: packageSpec cachedReference: cachedReference
>>>>>> ] ]. "look up mcz file"
>>>>>> references := self retryingResolvePackageSpecReferences: packageSpec
>>>>>> gofer: gofer.
>>>>>> nearestReference := references last
>>>>>> asMetacelloCachingResolvedReference. "If the mcz is already in the
>>>>>> cacheRepository, no need to copy"
>>>>>> (cachedReference ~~ nil and: [ cachedReference name =
>>>>>> nearestReference name ])
>>>>>> ifTrue: [
>>>>>> "latest reference in repository matches cachedReference ... "
>>>>>> ^ self scheduleFetchFor: packageSpec nearestReference:
>>>>>> nearestReference ]. "If the mcz is already loaded into the image, no
>>>>>> need to copy"
>>>>>> (self ignoreImage not and: [ (loadedVersionInfos := self
>>>>>> ancestorsFor: packageSpec) ~~ nil ])
>>>>>> ifTrue: [
>>>>>> loadedVersionInfos
>>>>>> do: [ :info |
>>>>>> info name = nearestReference name
>>>>>> ifTrue: [ ^ self ] ] ].
>>>>>> externalReference := (references select: [ :ref | ref name =
>>>>>> nearestReference name ]) first
>>>>>> asMetacelloCachingResolvedReference.
>>>>>> self repositoryMap at: externalReference name put: externalReference
>>>>>> repository.
>>>>>> (self
>>>>>> resolveDependencies: externalReference
>>>>>> nearest: nearestReference
>>>>>> into: (OrderedCollection with: nearestReference))
>>>>>> do: [ :reference |
>>>>>> | pSpec l |
>>>>>> mcVersion := reference version.
>>>>>> (l := (GoferVersionReference name: reference name) resolveAllWith:
>>>>>> self loaderPolicy cacheGofer) isEmpty
>>>>>> ifTrue: [
>>>>>> self cacheRepository storeVersion: mcVersion.
>>>>>> reference == nearestReference
>>>>>> ifTrue: [ pSpec := packageSpec ]
>>>>>> ifFalse: [
>>>>>> pSpec := packageSpec project packageSpec.
>>>>>> pSpec name: mcVersion package name ].
>>>>>> self loadData
>>>>>> addVersion: mcVersion
>>>>>> versionInfo: mcVersion info
>>>>>> resolvedReference: reference
>>>>>> packageSpec: pSpec ] ].
>>>>>> self scheduleFetchFor: packageSpec externalReference:
>>>>>> externalReference ]
>>>>>> displaying: 'Fetching ' , packageSpec file in
>>>>>> MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer: in Block:
>>>>>> linearLoadPackageSpec: packageSpec gofer: gofer...
>>>>>> MetacelloPharo30Platform(MetacelloPlatform)>>do:displaying:
>>>>>> MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer:
>>>>>> MetacelloPackageSpec>>loadUsing:gofer:
>>>>>> [ :pkg | pkg loadUsing: self gofer: gofer ] in
>>>>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>linearLoadPackageSpecs:repositories:
>>>>>> in Block: [ :pkg | pkg loadUsing: self gofer: gofer ]
>>>>>> Array(SequenceableCollection)>>do:
>>>>>>
>>>>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>linearLoadPackageSpecs:repositories:
>>>>>> [ super linearLoadPackageSpecs: packageSpecs repositories:
>>>>>> repositories ] in
>>>>>> MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories: in
>>>>>> Block: [ super linearLoadPackageSpecs: packageSpecs repos...etc...
>>>>>> BlockClosure>>ensure:
>>>>>> MetacelloLoaderPolicy>>pushLoadDirective:during:
>>>>>> MetacelloLoaderPolicy>>pushExplicitLoadDirectivesDuring:for:
>>>>>> MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories:
>>>>>> MetacelloPackageSpec>>explicitLoadUsing:
>>>>>> MetacelloPackageSpec>>load
>>>>>> [
>>>>>> self setDefaultsAndValidateProjectSpec.
>>>>>> spec := self projectSpec.
>>>>>> projectPackage := spec projectPackage.
>>>>>> projectPackage repositorySpecs do: [ :repoSpec | repoSpec
>>>>>> createRepository flushForScriptGet ].
>>>>>> projectPackage load.
>>>>>> self root: (Smalltalk at: spec className asSymbol) project.
>>>>>> MetacelloProjectRegistration
>>>>>> registrationForProjectSpec: spec
>>>>>> ifAbsent: [ :new | new registerProject ]
>>>>>> ifPresent: [ :existing :new |
>>>>>> existing
>>>>>> copyOnWrite: [ :existingCopy |
>>>>>> spec
>>>>>> copyForRegistration: existingCopy
>>>>>> onWrite: [ :specCopy | specCopy ifNil: [ existingCopy merge: new ]
>>>>>> ifNotNil: [ specCopy mergeScriptRepository: spec ] ] ] ] ] in
>>>>>> MetacelloScriptEngine>>get in Block: [ ...
>>>>>> BlockClosure>>ensure:
>>>>>> MetacelloProjectRegistration class>>copyRegistryRestoreOnErrorWhile:
>>>>>> MetacelloScriptEngine>>get
>>>>>> [ :projectSpec |
>>>>>> | engine |
>>>>>> engine := MetacelloScriptEngine new
>>>>>> options: self options copy;
>>>>>> projectSpec: projectSpec;
>>>>>> yourself.
>>>>>> engine perform: actionArg key withArguments: actionArg value.
>>>>>> engine root ifNotNil: [ :root | self roots add: root ] ] in
>>>>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: in Block: [
>>>>>> :projectSpec | ...
>>>>>> [ :projectSpec | projectSpec ifNotNil: [ projectSpecBlock value:
>>>>>> (self applyArgsToProjectSpec: projectSpec copy) ] ] in
>>>>>> MetacelloScriptApiExecutor>>executeString:do: in Block: [ :projectSpec |
>>>>>> projectSpec ifNotNil: [ projectSp...etc...
>>>>>> Array(SequenceableCollection)>>do:
>>>>>> MetacelloScriptApiExecutor>>executeString:do:
>>>>>> ByteString(String)>>execute:against:
>>>>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute:
>>>>>> Metacello>>execute
>>>>>> Metacello>>get
>>>>>> UndefinedObject>>DoIt
>>>>>> OpalCompiler>>evaluate
>>>>>> RubSmalltalkEditor>>evaluateSelectionAndDo:
>>>>>>
>>>>>>
>>>>>> On Tue, Oct 21, 2014 at 10:55 PM, kilon alios <kilon.alios(a)gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Thank you Dale very much , this is very clear :)
>>>>>>>
>>>>>>> On Tue, Oct 21, 2014 at 10:53 PM, Dale Henrichs <
>>>>>>> dale.henrichs(a)gemtalksystems.com> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Tue, Oct 21, 2014 at 12:04 PM, kilon alios <
>>>>>>>> kilon.alios(a)gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Thank you Dale, this is more simple than I expected.
>>>>>>>>>
>>>>>>>>> From what you linked it looks like by [:comitish] you mean the git
>>>>>>>>> branch .Which in my case is master so it should be
>>>>>>>>>
>>>>>>>>> Metacello new
>>>>>>>>> baseline: 'BaselineOfXXX';
>>>>>>>>> repository: 'github://kilon/phEphestos:master/'
>>>>>>>>> get;
>>>>>>>>> load.
>>>>>>>>>
>>>>>>>>> https://github.com/kilon/phEphestos
>>>>>>>>>
>>>>>>>>
>>>>>>>> From looking at your repo on githug, the expression would be:
>>>>>>>>
>>>>>>>> Metacello new
>>>>>>>> baseline: 'Ephestos';
>>>>>>>> repository: 'github://kilon/phEphestos:master'
>>>>>>>> get;
>>>>>>>> load.
>>>>>>>>
>>>>>>>> A commitish is a branch, SHA or tag. Note also, that my example was
>>>>>>>> wrong ... the 'BaselineOf' shouldn't be used in the baseline: argument,
>>>>>>>> just the base name of the project.
>>>>>>>>
>>>>>>>> You also need to create a BaselineOfEphestos which specifies
>>>>>>>> package load order. BaselineOfEphestos would be created as a subclass of
>>>>>>>> BaselineOf and have a single method:
>>>>>>>>
>>>>>>>> baseline: spec
>>>>>>>> <baseline>
>>>>>>>> spec
>>>>>>>> for: #pharo
>>>>>>>> do: [
>>>>>>>> spec package: 'Ephestos' ].
>>>>>>>>
>>>>>>>> Then the above expression would load the Epestos package.
>>>>>>>>
>>>>>>>> If you were to add another package, say EphestosTests, then you'd
>>>>>>>> update the baseline to declare that EphestosTests requires Ephestos to be
>>>>>>>> loaded first you'd edit the baseline: method:
>>>>>>>>
>>>>>>>> baseline: spec
>>>>>>>> <baseline>
>>>>>>>> spec
>>>>>>>> for: #pharo
>>>>>>>> do: [
>>>>>>>> spec
>>>>>>>> package: 'Ephestos';
>>>>>>>> package: 'EphestosTests' with: [ spec requires: #(
>>>>>>>> 'Ephestos' ) ] ].
>>>>>>>>
>>>>>>>> You commit the BaselineOf along with the rest of the packages for
>>>>>>>> your project ...
>>>>>>>>
>>>>>>>> For more information see the Metacello chapter in Pharo by
>>>>>>>> Example...
>>>>>>>>
>>>>>>>> Dale
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
Nov. 15, 2014
Re: [Pharo-dev] Configurations and Github for a specialised configuration browswe
by Dale Henrichs
Kilon,
Regarding Pharo4.0 and Metacello, I just recently added Pharo4.0 support to
Metacello[1] and buildCI[2].
If you are using github, then you should checkout builderCI. BuilderCI
let's you hook into travis-ci[3] and run unit tests on every commit. It's
especially useful when you get a pull request, because the unit tests are
run against the MERGED version of the pull request (BEFORE you do the
merge), so you can be assured that when you do the merge, your tests will
be green ...
Let me know if the builderCI instructions[4] work for you...It's been
awhile since I've reviewed the docs:)
Dale
[1] https://groups.google.com/forum/#!topic/metacello/TVzfP8ZwPPE
[2] https://github.com/dalehenrich/builderCI
[3] https://travis-ci.org/
[4] https://github.com/dalehenrich/builderCI#using-builderci
On Sat, Nov 15, 2014 at 8:55 AM, kilon alios <kilon.alios(a)gmail.com> wrote:
> YESSSS!!!!
>
> thanks Dale, you are awesome, it works like a charm for me now.
>
> Yes you needed to download the Pharo3DarkTheme because the Theme is
> installed by default in Pharo 4 and I dont intent on supporting pharo 3
> with my project. If you tried Pharo 4 you would have no such issue.
>
> I would appreciate it if other people could spend just a minute getting
> latest Pharo 4 and trying this in a Workspace
>
> Metacello new
> baseline:'Nireas';
> repository:'github://kilon/nireas:master';
> get.
>
> Metacello new
> baseline:'Nireas';
> repository:'github://kilon/nireas:master';
> load.
>
> Then open a System Browser and make sure Nireas package exist and please
> report it here if its not much trouble. This solution is super easy for
> installing git repos and we could make a class to make it even easier with
> a single line command.
>
> Question: Why Pharo 4 has not got the latest Metacello ?
>
> On Sat, Nov 15, 2014 at 6:33 PM, Dale Henrichs <
> dale.henrichs(a)gemtalksystems.com> wrote:
>
>> Kilon,
>>
>> This code:
>>
>> Metacello new
>> baseline:'Nireas';
>> repository:'github://kilon/Nireas:master';
>> get;
>> load.
>>
>> does require a pretty recent version of Metacello ("chaining" the get and
>> load)[1]. I tried the following in a stock pharo3.0 and got an error about
>> requiring Pharo3DarkTheme, so I was able to load the package:
>>
>> Metacello new
>> baseline:'Nireas';
>> repository:'github://kilon/Nireas:master';
>> get.
>> Metacello new
>> baseline:'Nireas';
>> repository:'github://kilon/Nireas:master';
>> load.
>>
>> Dale
>>
>> [1] https://github.com/dalehenrich/metacello-work#pharo30
>>
>> On Sat, Nov 15, 2014 at 3:13 AM, kilon alios <kilon.alios(a)gmail.com>
>> wrote:
>>
>>> ok after rereading your emails more carefully i realised that you meant
>>> that BaselineOf should go to its own package, so I moved the class to
>>> BaselineOfNireas package and now it does not report the same error but now
>>> it complain that project,baseline or configuration not specified.
>>>
>>> Is it mandatory to specify a configuration for my project , I though the
>>> baseline class was enough. Would love to hear more info on the subject, I
>>> am looking also at the Metacello chapter which by the way is in Deep Into
>>> Pharo and not PBE , I see loads of info on the subject but does not seem to
>>> mention anything about the BaselineOf class .
>>>
>>> Will love it if we can gave a simple way to load git repos to pharo 4.
>>>
>>> On Sat, Nov 15, 2014 at 12:53 PM, kilon alios <kilon.alios(a)gmail.com>
>>> wrote:
>>>
>>>> small typo in my paste
>>>>
>>>> the actual code i used is
>>>>
>>>> Metacello new
>>>> baseline:'Nireas';
>>>> repository:'github://kilon/Nireas:master';
>>>> get;
>>>> load.
>>>>
>>>> any help is appreciated :)
>>>>
>>>> On Sat, Nov 15, 2014 at 12:50 PM, kilon alios <kilon.alios(a)gmail.com>
>>>> wrote:
>>>>
>>>>> hello Dale I tried your approach with a new project I created called
>>>>> Nireas, its a theme manager for pharo 4. I followed your instructions and
>>>>> it complains that it cannot find the BaselineOfNireas
>>>>>
>>>>> This is the code I used
>>>>>
>>>>> Metacello new
>>>>> baseline:'Nireas';
>>>>> repository:'github://kilon/nireas:master';
>>>>> get;
>>>>> load.
>>>>>
>>>>> here is the repo
>>>>>
>>>>> https://github.com/kilon/Nireas
>>>>>
>>>>> and here is the error
>>>>>
>>>>>
>>>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer:
>>>>> linearLoadPackageSpec: packageSpec gofer: gofer
>>>>> MetacelloPlatform current
>>>>> do: [
>>>>> | references nearestReference cachedReference externalReference
>>>>> mcVersion loadedVersionInfos |
>>>>> "check to see if mcz file is already in cacheRepository"
>>>>> cachedReference := self resolvePackageSpec: packageSpec cachedGofer:
>>>>> self loaderPolicy cacheGofer.
>>>>> (cachedReference ~~ nil and: [ packageSpec getFile ~~ nil ])
>>>>> ifTrue: [
>>>>> cachedReference name = packageSpec file
>>>>> ifTrue: [
>>>>> "exact match between packageSpec file and cache"
>>>>> ^ self scheduleFetchFor: packageSpec cachedReference: cachedReference
>>>>> ] ]. "look up mcz file"
>>>>> references := self retryingResolvePackageSpecReferences: packageSpec
>>>>> gofer: gofer.
>>>>> nearestReference := references last
>>>>> asMetacelloCachingResolvedReference. "If the mcz is already in the
>>>>> cacheRepository, no need to copy"
>>>>> (cachedReference ~~ nil and: [ cachedReference name = nearestReference
>>>>> name ])
>>>>> ifTrue: [
>>>>> "latest reference in repository matches cachedReference ... "
>>>>> ^ self scheduleFetchFor: packageSpec nearestReference:
>>>>> nearestReference ]. "If the mcz is already loaded into the image, no
>>>>> need to copy"
>>>>> (self ignoreImage not and: [ (loadedVersionInfos := self ancestorsFor:
>>>>> packageSpec) ~~ nil ])
>>>>> ifTrue: [
>>>>> loadedVersionInfos
>>>>> do: [ :info |
>>>>> info name = nearestReference name
>>>>> ifTrue: [ ^ self ] ] ].
>>>>> externalReference := (references select: [ :ref | ref name =
>>>>> nearestReference name ]) first
>>>>> asMetacelloCachingResolvedReference.
>>>>> self repositoryMap at: externalReference name put: externalReference
>>>>> repository.
>>>>> (self
>>>>> resolveDependencies: externalReference
>>>>> nearest: nearestReference
>>>>> into: (OrderedCollection with: nearestReference))
>>>>> do: [ :reference |
>>>>> | pSpec l |
>>>>> mcVersion := reference version.
>>>>> (l := (GoferVersionReference name: reference name) resolveAllWith:
>>>>> self loaderPolicy cacheGofer) isEmpty
>>>>> ifTrue: [
>>>>> self cacheRepository storeVersion: mcVersion.
>>>>> reference == nearestReference
>>>>> ifTrue: [ pSpec := packageSpec ]
>>>>> ifFalse: [
>>>>> pSpec := packageSpec project packageSpec.
>>>>> pSpec name: mcVersion package name ].
>>>>> self loadData
>>>>> addVersion: mcVersion
>>>>> versionInfo: mcVersion info
>>>>> resolvedReference: reference
>>>>> packageSpec: pSpec ] ].
>>>>> self scheduleFetchFor: packageSpec externalReference:
>>>>> externalReference ]
>>>>> displaying: 'Fetching ' , packageSpec file in
>>>>> MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer: in Block:
>>>>> linearLoadPackageSpec: packageSpec gofer: gofer...
>>>>> MetacelloPharo30Platform(MetacelloPlatform)>>do:displaying:
>>>>> MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer:
>>>>> MetacelloPackageSpec>>loadUsing:gofer:
>>>>> [ :pkg | pkg loadUsing: self gofer: gofer ] in
>>>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>linearLoadPackageSpecs:repositories:
>>>>> in Block: [ :pkg | pkg loadUsing: self gofer: gofer ]
>>>>> Array(SequenceableCollection)>>do:
>>>>>
>>>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>linearLoadPackageSpecs:repositories:
>>>>> [ super linearLoadPackageSpecs: packageSpecs repositories:
>>>>> repositories ] in
>>>>> MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories: in
>>>>> Block: [ super linearLoadPackageSpecs: packageSpecs repos...etc...
>>>>> BlockClosure>>ensure:
>>>>> MetacelloLoaderPolicy>>pushLoadDirective:during:
>>>>> MetacelloLoaderPolicy>>pushExplicitLoadDirectivesDuring:for:
>>>>> MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories:
>>>>> MetacelloPackageSpec>>explicitLoadUsing:
>>>>> MetacelloPackageSpec>>load
>>>>> [
>>>>> self setDefaultsAndValidateProjectSpec.
>>>>> spec := self projectSpec.
>>>>> projectPackage := spec projectPackage.
>>>>> projectPackage repositorySpecs do: [ :repoSpec | repoSpec
>>>>> createRepository flushForScriptGet ].
>>>>> projectPackage load.
>>>>> self root: (Smalltalk at: spec className asSymbol) project.
>>>>> MetacelloProjectRegistration
>>>>> registrationForProjectSpec: spec
>>>>> ifAbsent: [ :new | new registerProject ]
>>>>> ifPresent: [ :existing :new |
>>>>> existing
>>>>> copyOnWrite: [ :existingCopy |
>>>>> spec
>>>>> copyForRegistration: existingCopy
>>>>> onWrite: [ :specCopy | specCopy ifNil: [ existingCopy merge: new ]
>>>>> ifNotNil: [ specCopy mergeScriptRepository: spec ] ] ] ] ] in
>>>>> MetacelloScriptEngine>>get in Block: [ ...
>>>>> BlockClosure>>ensure:
>>>>> MetacelloProjectRegistration class>>copyRegistryRestoreOnErrorWhile:
>>>>> MetacelloScriptEngine>>get
>>>>> [ :projectSpec |
>>>>> | engine |
>>>>> engine := MetacelloScriptEngine new
>>>>> options: self options copy;
>>>>> projectSpec: projectSpec;
>>>>> yourself.
>>>>> engine perform: actionArg key withArguments: actionArg value.
>>>>> engine root ifNotNil: [ :root | self roots add: root ] ] in
>>>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: in Block: [
>>>>> :projectSpec | ...
>>>>> [ :projectSpec | projectSpec ifNotNil: [ projectSpecBlock value: (self
>>>>> applyArgsToProjectSpec: projectSpec copy) ] ] in
>>>>> MetacelloScriptApiExecutor>>executeString:do: in Block: [ :projectSpec |
>>>>> projectSpec ifNotNil: [ projectSp...etc...
>>>>> Array(SequenceableCollection)>>do:
>>>>> MetacelloScriptApiExecutor>>executeString:do:
>>>>> ByteString(String)>>execute:against:
>>>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute:
>>>>> Metacello>>execute
>>>>> Metacello>>get
>>>>> UndefinedObject>>DoIt
>>>>> OpalCompiler>>evaluate
>>>>> RubSmalltalkEditor>>evaluateSelectionAndDo:
>>>>>
>>>>>
>>>>> On Tue, Oct 21, 2014 at 10:55 PM, kilon alios <kilon.alios(a)gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Thank you Dale very much , this is very clear :)
>>>>>>
>>>>>> On Tue, Oct 21, 2014 at 10:53 PM, Dale Henrichs <
>>>>>> dale.henrichs(a)gemtalksystems.com> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Oct 21, 2014 at 12:04 PM, kilon alios <kilon.alios(a)gmail.com
>>>>>>> > wrote:
>>>>>>>
>>>>>>>> Thank you Dale, this is more simple than I expected.
>>>>>>>>
>>>>>>>> From what you linked it looks like by [:comitish] you mean the git
>>>>>>>> branch .Which in my case is master so it should be
>>>>>>>>
>>>>>>>> Metacello new
>>>>>>>> baseline: 'BaselineOfXXX';
>>>>>>>> repository: 'github://kilon/phEphestos:master/'
>>>>>>>> get;
>>>>>>>> load.
>>>>>>>>
>>>>>>>> https://github.com/kilon/phEphestos
>>>>>>>>
>>>>>>>
>>>>>>> From looking at your repo on githug, the expression would be:
>>>>>>>
>>>>>>> Metacello new
>>>>>>> baseline: 'Ephestos';
>>>>>>> repository: 'github://kilon/phEphestos:master'
>>>>>>> get;
>>>>>>> load.
>>>>>>>
>>>>>>> A commitish is a branch, SHA or tag. Note also, that my example was
>>>>>>> wrong ... the 'BaselineOf' shouldn't be used in the baseline: argument,
>>>>>>> just the base name of the project.
>>>>>>>
>>>>>>> You also need to create a BaselineOfEphestos which specifies
>>>>>>> package load order. BaselineOfEphestos would be created as a subclass of
>>>>>>> BaselineOf and have a single method:
>>>>>>>
>>>>>>> baseline: spec
>>>>>>> <baseline>
>>>>>>> spec
>>>>>>> for: #pharo
>>>>>>> do: [
>>>>>>> spec package: 'Ephestos' ].
>>>>>>>
>>>>>>> Then the above expression would load the Epestos package.
>>>>>>>
>>>>>>> If you were to add another package, say EphestosTests, then you'd
>>>>>>> update the baseline to declare that EphestosTests requires Ephestos to be
>>>>>>> loaded first you'd edit the baseline: method:
>>>>>>>
>>>>>>> baseline: spec
>>>>>>> <baseline>
>>>>>>> spec
>>>>>>> for: #pharo
>>>>>>> do: [
>>>>>>> spec
>>>>>>> package: 'Ephestos';
>>>>>>> package: 'EphestosTests' with: [ spec requires: #(
>>>>>>> 'Ephestos' ) ] ].
>>>>>>>
>>>>>>> You commit the BaselineOf along with the rest of the packages for
>>>>>>> your project ...
>>>>>>>
>>>>>>> For more information see the Metacello chapter in Pharo by Example...
>>>>>>>
>>>>>>> Dale
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
Nov. 15, 2014
Re: [Pharo-dev] Configurations and Github for a specialised configuration browswe
by kilon alios
YESSSS!!!!
thanks Dale, you are awesome, it works like a charm for me now.
Yes you needed to download the Pharo3DarkTheme because the Theme is
installed by default in Pharo 4 and I dont intent on supporting pharo 3
with my project. If you tried Pharo 4 you would have no such issue.
I would appreciate it if other people could spend just a minute getting
latest Pharo 4 and trying this in a Workspace
Metacello new
baseline:'Nireas';
repository:'github://kilon/nireas:master';
get.
Metacello new
baseline:'Nireas';
repository:'github://kilon/nireas:master';
load.
Then open a System Browser and make sure Nireas package exist and please
report it here if its not much trouble. This solution is super easy for
installing git repos and we could make a class to make it even easier with
a single line command.
Question: Why Pharo 4 has not got the latest Metacello ?
On Sat, Nov 15, 2014 at 6:33 PM, Dale Henrichs <
dale.henrichs(a)gemtalksystems.com> wrote:
> Kilon,
>
> This code:
>
> Metacello new
> baseline:'Nireas';
> repository:'github://kilon/Nireas:master';
> get;
> load.
>
> does require a pretty recent version of Metacello ("chaining" the get and
> load)[1]. I tried the following in a stock pharo3.0 and got an error about
> requiring Pharo3DarkTheme, so I was able to load the package:
>
> Metacello new
> baseline:'Nireas';
> repository:'github://kilon/Nireas:master';
> get.
> Metacello new
> baseline:'Nireas';
> repository:'github://kilon/Nireas:master';
> load.
>
> Dale
>
> [1] https://github.com/dalehenrich/metacello-work#pharo30
>
> On Sat, Nov 15, 2014 at 3:13 AM, kilon alios <kilon.alios(a)gmail.com>
> wrote:
>
>> ok after rereading your emails more carefully i realised that you meant
>> that BaselineOf should go to its own package, so I moved the class to
>> BaselineOfNireas package and now it does not report the same error but now
>> it complain that project,baseline or configuration not specified.
>>
>> Is it mandatory to specify a configuration for my project , I though the
>> baseline class was enough. Would love to hear more info on the subject, I
>> am looking also at the Metacello chapter which by the way is in Deep Into
>> Pharo and not PBE , I see loads of info on the subject but does not seem to
>> mention anything about the BaselineOf class .
>>
>> Will love it if we can gave a simple way to load git repos to pharo 4.
>>
>> On Sat, Nov 15, 2014 at 12:53 PM, kilon alios <kilon.alios(a)gmail.com>
>> wrote:
>>
>>> small typo in my paste
>>>
>>> the actual code i used is
>>>
>>> Metacello new
>>> baseline:'Nireas';
>>> repository:'github://kilon/Nireas:master';
>>> get;
>>> load.
>>>
>>> any help is appreciated :)
>>>
>>> On Sat, Nov 15, 2014 at 12:50 PM, kilon alios <kilon.alios(a)gmail.com>
>>> wrote:
>>>
>>>> hello Dale I tried your approach with a new project I created called
>>>> Nireas, its a theme manager for pharo 4. I followed your instructions and
>>>> it complains that it cannot find the BaselineOfNireas
>>>>
>>>> This is the code I used
>>>>
>>>> Metacello new
>>>> baseline:'Nireas';
>>>> repository:'github://kilon/nireas:master';
>>>> get;
>>>> load.
>>>>
>>>> here is the repo
>>>>
>>>> https://github.com/kilon/Nireas
>>>>
>>>> and here is the error
>>>>
>>>>
>>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer:
>>>> linearLoadPackageSpec: packageSpec gofer: gofer
>>>> MetacelloPlatform current
>>>> do: [
>>>> | references nearestReference cachedReference externalReference
>>>> mcVersion loadedVersionInfos |
>>>> "check to see if mcz file is already in cacheRepository"
>>>> cachedReference := self resolvePackageSpec: packageSpec cachedGofer:
>>>> self loaderPolicy cacheGofer.
>>>> (cachedReference ~~ nil and: [ packageSpec getFile ~~ nil ])
>>>> ifTrue: [
>>>> cachedReference name = packageSpec file
>>>> ifTrue: [
>>>> "exact match between packageSpec file and cache"
>>>> ^ self scheduleFetchFor: packageSpec cachedReference: cachedReference ]
>>>> ]. "look up mcz file"
>>>> references := self retryingResolvePackageSpecReferences: packageSpec
>>>> gofer: gofer.
>>>> nearestReference := references last asMetacelloCachingResolvedReference. "If
>>>> the mcz is already in the cacheRepository, no need to copy"
>>>> (cachedReference ~~ nil and: [ cachedReference name = nearestReference
>>>> name ])
>>>> ifTrue: [
>>>> "latest reference in repository matches cachedReference ... "
>>>> ^ self scheduleFetchFor: packageSpec nearestReference: nearestReference
>>>> ]. "If the mcz is already loaded into the image, no need to copy"
>>>> (self ignoreImage not and: [ (loadedVersionInfos := self ancestorsFor:
>>>> packageSpec) ~~ nil ])
>>>> ifTrue: [
>>>> loadedVersionInfos
>>>> do: [ :info |
>>>> info name = nearestReference name
>>>> ifTrue: [ ^ self ] ] ].
>>>> externalReference := (references select: [ :ref | ref name =
>>>> nearestReference name ]) first
>>>> asMetacelloCachingResolvedReference.
>>>> self repositoryMap at: externalReference name put: externalReference
>>>> repository.
>>>> (self
>>>> resolveDependencies: externalReference
>>>> nearest: nearestReference
>>>> into: (OrderedCollection with: nearestReference))
>>>> do: [ :reference |
>>>> | pSpec l |
>>>> mcVersion := reference version.
>>>> (l := (GoferVersionReference name: reference name) resolveAllWith: self
>>>> loaderPolicy cacheGofer) isEmpty
>>>> ifTrue: [
>>>> self cacheRepository storeVersion: mcVersion.
>>>> reference == nearestReference
>>>> ifTrue: [ pSpec := packageSpec ]
>>>> ifFalse: [
>>>> pSpec := packageSpec project packageSpec.
>>>> pSpec name: mcVersion package name ].
>>>> self loadData
>>>> addVersion: mcVersion
>>>> versionInfo: mcVersion info
>>>> resolvedReference: reference
>>>> packageSpec: pSpec ] ].
>>>> self scheduleFetchFor: packageSpec externalReference: externalReference
>>>> ]
>>>> displaying: 'Fetching ' , packageSpec file in
>>>> MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer: in Block:
>>>> linearLoadPackageSpec: packageSpec gofer: gofer...
>>>> MetacelloPharo30Platform(MetacelloPlatform)>>do:displaying:
>>>> MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer:
>>>> MetacelloPackageSpec>>loadUsing:gofer:
>>>> [ :pkg | pkg loadUsing: self gofer: gofer ] in
>>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>linearLoadPackageSpecs:repositories:
>>>> in Block: [ :pkg | pkg loadUsing: self gofer: gofer ]
>>>> Array(SequenceableCollection)>>do:
>>>>
>>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>linearLoadPackageSpecs:repositories:
>>>> [ super linearLoadPackageSpecs: packageSpecs repositories: repositories
>>>> ] in MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories:
>>>> in Block: [ super linearLoadPackageSpecs: packageSpecs repos...etc...
>>>> BlockClosure>>ensure:
>>>> MetacelloLoaderPolicy>>pushLoadDirective:during:
>>>> MetacelloLoaderPolicy>>pushExplicitLoadDirectivesDuring:for:
>>>> MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories:
>>>> MetacelloPackageSpec>>explicitLoadUsing:
>>>> MetacelloPackageSpec>>load
>>>> [
>>>> self setDefaultsAndValidateProjectSpec.
>>>> spec := self projectSpec.
>>>> projectPackage := spec projectPackage.
>>>> projectPackage repositorySpecs do: [ :repoSpec | repoSpec
>>>> createRepository flushForScriptGet ].
>>>> projectPackage load.
>>>> self root: (Smalltalk at: spec className asSymbol) project.
>>>> MetacelloProjectRegistration
>>>> registrationForProjectSpec: spec
>>>> ifAbsent: [ :new | new registerProject ]
>>>> ifPresent: [ :existing :new |
>>>> existing
>>>> copyOnWrite: [ :existingCopy |
>>>> spec
>>>> copyForRegistration: existingCopy
>>>> onWrite: [ :specCopy | specCopy ifNil: [ existingCopy merge: new ]
>>>> ifNotNil: [ specCopy mergeScriptRepository: spec ] ] ] ] ] in
>>>> MetacelloScriptEngine>>get in Block: [ ...
>>>> BlockClosure>>ensure:
>>>> MetacelloProjectRegistration class>>copyRegistryRestoreOnErrorWhile:
>>>> MetacelloScriptEngine>>get
>>>> [ :projectSpec |
>>>> | engine |
>>>> engine := MetacelloScriptEngine new
>>>> options: self options copy;
>>>> projectSpec: projectSpec;
>>>> yourself.
>>>> engine perform: actionArg key withArguments: actionArg value.
>>>> engine root ifNotNil: [ :root | self roots add: root ] ] in
>>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: in Block: [
>>>> :projectSpec | ...
>>>> [ :projectSpec | projectSpec ifNotNil: [ projectSpecBlock value: (self
>>>> applyArgsToProjectSpec: projectSpec copy) ] ] in
>>>> MetacelloScriptApiExecutor>>executeString:do: in Block: [ :projectSpec |
>>>> projectSpec ifNotNil: [ projectSp...etc...
>>>> Array(SequenceableCollection)>>do:
>>>> MetacelloScriptApiExecutor>>executeString:do:
>>>> ByteString(String)>>execute:against:
>>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute:
>>>> Metacello>>execute
>>>> Metacello>>get
>>>> UndefinedObject>>DoIt
>>>> OpalCompiler>>evaluate
>>>> RubSmalltalkEditor>>evaluateSelectionAndDo:
>>>>
>>>>
>>>> On Tue, Oct 21, 2014 at 10:55 PM, kilon alios <kilon.alios(a)gmail.com>
>>>> wrote:
>>>>
>>>>> Thank you Dale very much , this is very clear :)
>>>>>
>>>>> On Tue, Oct 21, 2014 at 10:53 PM, Dale Henrichs <
>>>>> dale.henrichs(a)gemtalksystems.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Oct 21, 2014 at 12:04 PM, kilon alios <kilon.alios(a)gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Thank you Dale, this is more simple than I expected.
>>>>>>>
>>>>>>> From what you linked it looks like by [:comitish] you mean the git
>>>>>>> branch .Which in my case is master so it should be
>>>>>>>
>>>>>>> Metacello new
>>>>>>> baseline: 'BaselineOfXXX';
>>>>>>> repository: 'github://kilon/phEphestos:master/'
>>>>>>> get;
>>>>>>> load.
>>>>>>>
>>>>>>> https://github.com/kilon/phEphestos
>>>>>>>
>>>>>>
>>>>>> From looking at your repo on githug, the expression would be:
>>>>>>
>>>>>> Metacello new
>>>>>> baseline: 'Ephestos';
>>>>>> repository: 'github://kilon/phEphestos:master'
>>>>>> get;
>>>>>> load.
>>>>>>
>>>>>> A commitish is a branch, SHA or tag. Note also, that my example was
>>>>>> wrong ... the 'BaselineOf' shouldn't be used in the baseline: argument,
>>>>>> just the base name of the project.
>>>>>>
>>>>>> You also need to create a BaselineOfEphestos which specifies package
>>>>>> load order. BaselineOfEphestos would be created as a subclass of BaselineOf
>>>>>> and have a single method:
>>>>>>
>>>>>> baseline: spec
>>>>>> <baseline>
>>>>>> spec
>>>>>> for: #pharo
>>>>>> do: [
>>>>>> spec package: 'Ephestos' ].
>>>>>>
>>>>>> Then the above expression would load the Epestos package.
>>>>>>
>>>>>> If you were to add another package, say EphestosTests, then you'd
>>>>>> update the baseline to declare that EphestosTests requires Ephestos to be
>>>>>> loaded first you'd edit the baseline: method:
>>>>>>
>>>>>> baseline: spec
>>>>>> <baseline>
>>>>>> spec
>>>>>> for: #pharo
>>>>>> do: [
>>>>>> spec
>>>>>> package: 'Ephestos';
>>>>>> package: 'EphestosTests' with: [ spec requires: #(
>>>>>> 'Ephestos' ) ] ].
>>>>>>
>>>>>> You commit the BaselineOf along with the rest of the packages for
>>>>>> your project ...
>>>>>>
>>>>>> For more information see the Metacello chapter in Pharo by Example...
>>>>>>
>>>>>> Dale
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
Nov. 15, 2014
Re: [Pharo-dev] Configurations and Github for a specialised configuration browswe
by Dale Henrichs
Kilon,
This code:
Metacello new
baseline:'Nireas';
repository:'github://kilon/Nireas:master';
get;
load.
does require a pretty recent version of Metacello ("chaining" the get and
load)[1]. I tried the following in a stock pharo3.0 and got an error about
requiring Pharo3DarkTheme, so I was able to load the package:
Metacello new
baseline:'Nireas';
repository:'github://kilon/Nireas:master';
get.
Metacello new
baseline:'Nireas';
repository:'github://kilon/Nireas:master';
load.
Dale
[1] https://github.com/dalehenrich/metacello-work#pharo30
On Sat, Nov 15, 2014 at 3:13 AM, kilon alios <kilon.alios(a)gmail.com> wrote:
> ok after rereading your emails more carefully i realised that you meant
> that BaselineOf should go to its own package, so I moved the class to
> BaselineOfNireas package and now it does not report the same error but now
> it complain that project,baseline or configuration not specified.
>
> Is it mandatory to specify a configuration for my project , I though the
> baseline class was enough. Would love to hear more info on the subject, I
> am looking also at the Metacello chapter which by the way is in Deep Into
> Pharo and not PBE , I see loads of info on the subject but does not seem to
> mention anything about the BaselineOf class .
>
> Will love it if we can gave a simple way to load git repos to pharo 4.
>
> On Sat, Nov 15, 2014 at 12:53 PM, kilon alios <kilon.alios(a)gmail.com>
> wrote:
>
>> small typo in my paste
>>
>> the actual code i used is
>>
>> Metacello new
>> baseline:'Nireas';
>> repository:'github://kilon/Nireas:master';
>> get;
>> load.
>>
>> any help is appreciated :)
>>
>> On Sat, Nov 15, 2014 at 12:50 PM, kilon alios <kilon.alios(a)gmail.com>
>> wrote:
>>
>>> hello Dale I tried your approach with a new project I created called
>>> Nireas, its a theme manager for pharo 4. I followed your instructions and
>>> it complains that it cannot find the BaselineOfNireas
>>>
>>> This is the code I used
>>>
>>> Metacello new
>>> baseline:'Nireas';
>>> repository:'github://kilon/nireas:master';
>>> get;
>>> load.
>>>
>>> here is the repo
>>>
>>> https://github.com/kilon/Nireas
>>>
>>> and here is the error
>>>
>>>
>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>retryingResolvePackageSpecReferences:gofer:
>>> linearLoadPackageSpec: packageSpec gofer: gofer
>>> MetacelloPlatform current
>>> do: [
>>> | references nearestReference cachedReference externalReference
>>> mcVersion loadedVersionInfos |
>>> "check to see if mcz file is already in cacheRepository"
>>> cachedReference := self resolvePackageSpec: packageSpec cachedGofer:
>>> self loaderPolicy cacheGofer.
>>> (cachedReference ~~ nil and: [ packageSpec getFile ~~ nil ])
>>> ifTrue: [
>>> cachedReference name = packageSpec file
>>> ifTrue: [
>>> "exact match between packageSpec file and cache"
>>> ^ self scheduleFetchFor: packageSpec cachedReference: cachedReference ]
>>> ]. "look up mcz file"
>>> references := self retryingResolvePackageSpecReferences: packageSpec
>>> gofer: gofer.
>>> nearestReference := references last asMetacelloCachingResolvedReference. "If
>>> the mcz is already in the cacheRepository, no need to copy"
>>> (cachedReference ~~ nil and: [ cachedReference name = nearestReference
>>> name ])
>>> ifTrue: [
>>> "latest reference in repository matches cachedReference ... "
>>> ^ self scheduleFetchFor: packageSpec nearestReference: nearestReference
>>> ]. "If the mcz is already loaded into the image, no need to copy"
>>> (self ignoreImage not and: [ (loadedVersionInfos := self ancestorsFor:
>>> packageSpec) ~~ nil ])
>>> ifTrue: [
>>> loadedVersionInfos
>>> do: [ :info |
>>> info name = nearestReference name
>>> ifTrue: [ ^ self ] ] ].
>>> externalReference := (references select: [ :ref | ref name =
>>> nearestReference name ]) first
>>> asMetacelloCachingResolvedReference.
>>> self repositoryMap at: externalReference name put: externalReference
>>> repository.
>>> (self
>>> resolveDependencies: externalReference
>>> nearest: nearestReference
>>> into: (OrderedCollection with: nearestReference))
>>> do: [ :reference |
>>> | pSpec l |
>>> mcVersion := reference version.
>>> (l := (GoferVersionReference name: reference name) resolveAllWith: self
>>> loaderPolicy cacheGofer) isEmpty
>>> ifTrue: [
>>> self cacheRepository storeVersion: mcVersion.
>>> reference == nearestReference
>>> ifTrue: [ pSpec := packageSpec ]
>>> ifFalse: [
>>> pSpec := packageSpec project packageSpec.
>>> pSpec name: mcVersion package name ].
>>> self loadData
>>> addVersion: mcVersion
>>> versionInfo: mcVersion info
>>> resolvedReference: reference
>>> packageSpec: pSpec ] ].
>>> self scheduleFetchFor: packageSpec externalReference: externalReference ]
>>> displaying: 'Fetching ' , packageSpec file in
>>> MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer: in Block:
>>> linearLoadPackageSpec: packageSpec gofer: gofer...
>>> MetacelloPharo30Platform(MetacelloPlatform)>>do:displaying:
>>> MetacelloFetchingMCSpecLoader>>linearLoadPackageSpec:gofer:
>>> MetacelloPackageSpec>>loadUsing:gofer:
>>> [ :pkg | pkg loadUsing: self gofer: gofer ] in
>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>linearLoadPackageSpecs:repositories:
>>> in Block: [ :pkg | pkg loadUsing: self gofer: gofer ]
>>> Array(SequenceableCollection)>>do:
>>>
>>> MetacelloFetchingMCSpecLoader(MetacelloCommonMCSpecLoader)>>linearLoadPackageSpecs:repositories:
>>> [ super linearLoadPackageSpecs: packageSpecs repositories: repositories
>>> ] in MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories:
>>> in Block: [ super linearLoadPackageSpecs: packageSpecs repos...etc...
>>> BlockClosure>>ensure:
>>> MetacelloLoaderPolicy>>pushLoadDirective:during:
>>> MetacelloLoaderPolicy>>pushExplicitLoadDirectivesDuring:for:
>>> MetacelloFetchingMCSpecLoader>>explicitLoadPackageSpecs:repositories:
>>> MetacelloPackageSpec>>explicitLoadUsing:
>>> MetacelloPackageSpec>>load
>>> [
>>> self setDefaultsAndValidateProjectSpec.
>>> spec := self projectSpec.
>>> projectPackage := spec projectPackage.
>>> projectPackage repositorySpecs do: [ :repoSpec | repoSpec
>>> createRepository flushForScriptGet ].
>>> projectPackage load.
>>> self root: (Smalltalk at: spec className asSymbol) project.
>>> MetacelloProjectRegistration
>>> registrationForProjectSpec: spec
>>> ifAbsent: [ :new | new registerProject ]
>>> ifPresent: [ :existing :new |
>>> existing
>>> copyOnWrite: [ :existingCopy |
>>> spec
>>> copyForRegistration: existingCopy
>>> onWrite: [ :specCopy | specCopy ifNil: [ existingCopy merge: new ]
>>> ifNotNil: [ specCopy mergeScriptRepository: spec ] ] ] ] ] in
>>> MetacelloScriptEngine>>get in Block: [ ...
>>> BlockClosure>>ensure:
>>> MetacelloProjectRegistration class>>copyRegistryRestoreOnErrorWhile:
>>> MetacelloScriptEngine>>get
>>> [ :projectSpec |
>>> | engine |
>>> engine := MetacelloScriptEngine new
>>> options: self options copy;
>>> projectSpec: projectSpec;
>>> yourself.
>>> engine perform: actionArg key withArguments: actionArg value.
>>> engine root ifNotNil: [ :root | self roots add: root ] ] in
>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute: in Block: [
>>> :projectSpec | ...
>>> [ :projectSpec | projectSpec ifNotNil: [ projectSpecBlock value: (self
>>> applyArgsToProjectSpec: projectSpec copy) ] ] in
>>> MetacelloScriptApiExecutor>>executeString:do: in Block: [ :projectSpec |
>>> projectSpec ifNotNil: [ projectSp...etc...
>>> Array(SequenceableCollection)>>do:
>>> MetacelloScriptApiExecutor>>executeString:do:
>>> ByteString(String)>>execute:against:
>>> MetacelloScriptApiExecutor(MetacelloScriptExecutor)>>execute:
>>> Metacello>>execute
>>> Metacello>>get
>>> UndefinedObject>>DoIt
>>> OpalCompiler>>evaluate
>>> RubSmalltalkEditor>>evaluateSelectionAndDo:
>>>
>>>
>>> On Tue, Oct 21, 2014 at 10:55 PM, kilon alios <kilon.alios(a)gmail.com>
>>> wrote:
>>>
>>>> Thank you Dale very much , this is very clear :)
>>>>
>>>> On Tue, Oct 21, 2014 at 10:53 PM, Dale Henrichs <
>>>> dale.henrichs(a)gemtalksystems.com> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Tue, Oct 21, 2014 at 12:04 PM, kilon alios <kilon.alios(a)gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Thank you Dale, this is more simple than I expected.
>>>>>>
>>>>>> From what you linked it looks like by [:comitish] you mean the git
>>>>>> branch .Which in my case is master so it should be
>>>>>>
>>>>>> Metacello new
>>>>>> baseline: 'BaselineOfXXX';
>>>>>> repository: 'github://kilon/phEphestos:master/'
>>>>>> get;
>>>>>> load.
>>>>>>
>>>>>> https://github.com/kilon/phEphestos
>>>>>>
>>>>>
>>>>> From looking at your repo on githug, the expression would be:
>>>>>
>>>>> Metacello new
>>>>> baseline: 'Ephestos';
>>>>> repository: 'github://kilon/phEphestos:master'
>>>>> get;
>>>>> load.
>>>>>
>>>>> A commitish is a branch, SHA or tag. Note also, that my example was
>>>>> wrong ... the 'BaselineOf' shouldn't be used in the baseline: argument,
>>>>> just the base name of the project.
>>>>>
>>>>> You also need to create a BaselineOfEphestos which specifies package
>>>>> load order. BaselineOfEphestos would be created as a subclass of BaselineOf
>>>>> and have a single method:
>>>>>
>>>>> baseline: spec
>>>>> <baseline>
>>>>> spec
>>>>> for: #pharo
>>>>> do: [
>>>>> spec package: 'Ephestos' ].
>>>>>
>>>>> Then the above expression would load the Epestos package.
>>>>>
>>>>> If you were to add another package, say EphestosTests, then you'd
>>>>> update the baseline to declare that EphestosTests requires Ephestos to be
>>>>> loaded first you'd edit the baseline: method:
>>>>>
>>>>> baseline: spec
>>>>> <baseline>
>>>>> spec
>>>>> for: #pharo
>>>>> do: [
>>>>> spec
>>>>> package: 'Ephestos';
>>>>> package: 'EphestosTests' with: [ spec requires: #(
>>>>> 'Ephestos' ) ] ].
>>>>>
>>>>> You commit the BaselineOf along with the rest of the packages for your
>>>>> project ...
>>>>>
>>>>> For more information see the Metacello chapter in Pharo by Example...
>>>>>
>>>>> Dale
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
Nov. 15, 2014
[NB] NativeBoost and optCoerceNilToNull
by Max Leske
Once again Iâm struggling with NativeBoost. Iâm trying to use optCoerceNilToNull with this function:
^self call: #(LGitReturnCodeEnum git_commit_create(
LGitId * theCommitId,
LGitRepository repo,
String update_ref,
LGitSignature * theAuthor,
LGitSignature * theCommitter,
String message_encoding,
String theMessage,
LGitTree theTree,
int parent_count,
LGitCommit * parentsPointer)) options: #( optCoerceNilToNull )
The last argument can be NULL, per documentation, (no parents).
LGitCommit is a subclass of NBExternalObject and apparently NBExternalObjctType>>pushAsPointer: does *not* use the optCoerceNilToNull option (the super implementation in NBExternalType>>pushAsPointer: however does). The upshot of course is that the call fails with âan instance of LGitCommit expectedâ.
My questions:
- The documentation says:
"#optCoerceNilToNull"
"passing nil as a pointer-type argument, converts it to C NULL â
but apparently this doesnât apply to every pointer type. Should the documentation be updated?
- Why does NBExternlObjectType not use optCoerceNilToNull? I donât want to use tricks to pass null if I donât have to.
- Related: there are instances where even non-pointer arguments are allowed to be NULL. Why does optCoerceNilToNull only work for pointer types?
Igor! Help! :)
Cheers,
Max
Nov. 15, 2014
How to refresh the pharo window manually
by kilon alios
Hello guys I am making a theme manager and I have observed that when I
choose a background color for pharo windows it does not update properly.
How I can force the whole pharo window to update ? I have found
DisplayScreen and WorldMorph but no idea how to use them.
Nov. 15, 2014
Re: [Pharo-dev] Configurations and Github for a specialised configuration browswe
by kilon alios
The tricky part here is that I want to avoid Smalltalkhub , I want to use
Github only. I also dont care about creating versions, I prefer git
branches a lot more. So that means that experimental stuff will be
committed to separate branches and master will contain only the latest
stable code.
On Sat, Nov 15, 2014 at 1:18 PM, Yuriy Tymchuk <yuriy.tymchuk(a)me.com> wrote:
> This is how I use all that magic
> http://sleepycoders.blogspot.ch/2014/04/how-to-distribute-your-github-pharo…
>
> On 21 Oct 2014, at 20:33, kilon alios <kilon.alios(a)gmail.com> wrote:
>
> So I am so happy with how Pharo works with Github, that I decided to even
> port my configurations there and I also decided to create a small
> configuration browser which will subclass the existing configuration
> browser for installing tools for my project Ephestos so I dont have to
> pollute the existing configuration projects with all my sub-projects.
>
> In sort I want to host configurations to Github similarly to how MetaRepos
> are host in Smalltalkhub. I want the user to be able to install those
> configurations without a need to install git
>
> I asked this I think before and I was told how to, but it was part of
> another thread and it got lost inside my email abyss.
>
> So How I do that ?
>
>
>
Nov. 15, 2014