Amber 0.12.0 released!

159 views
Skip to first unread message

Nicolas Petton

unread,
Nov 11, 2013, 6:05:54 PM11/11/13
to amber...@googlegroups.com, Pharo Development List, ESUG Members, Seaside - general discussion
After 3 months of work we are pleased to announce the 0.12.0 release of Amber.

Besides the usual bug fixes a lot of new features have emerged.

The biggest change is the switch to RequireJS to specify Amber package
dependencies and to load the packages as AMD modules. Amber is now
additionally available as Bower [2] component. Bower is also used to
manage required JavaScript libraries which don't have to be kept around
in the repository anymore.

The repository layout was restructured to provide a cleaner separation
of different Amber parts:

* Smalltalk code is located in 'st'
* Compiled Amber packages are located in 'js'
* Supporting JavaScript code is located in 'support'

Together with the RequireJS changes the specifying their dependencies
the Brickz [3] reconfigurable micro composition system was introduced.

On the Smalltalk side support has been added for writing exponential
numbers of the form 2e5.

Helios (the new IDE) is progressing nicely and has seen a lot of
improvements. One of the great parts is the new stepping debugger which
is also making progress. To try Helios, open the helios.html page or
evaluate in any other amber page
`require('amber/helpers').popupHelios()`.

The last enhancements target the commandline compiler which can be used
as `amberc` (an executable script) or as a Grunt task. The following
features have been added:

* generation of shebang line (#!/usr/bin/env node)
* specification of target namespace (`-n` flag; `amd_namespace` option in Grunt)
* specification of additional library directories (`-L` flag; `library_dirs` option in Grunt)
The following features have been removed:
* creation of *.deploy.js files (`-d` flag; `deploy` option in Grunt)
* optimization passes via Closure compiler (`-o`/`-O` flags; `closure_jar` option in Grunt)
The same behavior can be achieved by using specific Grunt tasks

Additionally, the Grunt task now handles the -v/--verbose flag which
triggers the same behavior as the `verbose` option which can be
specified in the Gruntfile.


Some numbers about this release (starting from 0.11.0):

* 660 commits
* 10 committers
* 66 unit tests added
* 152 issues were closed
* 379 unit tests in total


Commits: https://github.com/amber-smalltalk/amber/compare/0.11.0...0.12.0
Issues: https://github.com/amber-smalltalk/amber/issues?direction=desc&milestone=8&page=1&sort=updated&state=closed

For the most important API related changes see the file API-CHANGES.txt.


* Installing Amber from NPM

To install Amber from NPM, run

npm install amber

* Installing Amber from Bower

To install Amber from Bower, run

bower install amber

* Migration from Amber 0.11.0

First, the loading of JavaScript files must be adapted. The custom
loader has been replaced with requirejs for loading files in the
browser. New loader code is thouroughly explained in [4].

After updating the loader part, `.st` files need to be recompiled into
new AMD `.js` files. During loader changes, a namespace was choosen and
will be needed for recompilation.

Go to your directory with `.st` files and issue this from the shell:

```sh
<path-to-amber>/bin/amberc -l SUnit,Canvas -n <chosen-namespace> -D <path-for-compiled-js-files> *.st
```

In windows, use `\` as path separator, the rest is identical.

The `-l SUnit,Canvas` is just a general guess, if your code depends on
more (or less) non-kernel packages from amber, list them here
accordingly.

This migrate scenario only covers simple deployments with your project's
code and amber. If your project is more complicated, using libraries
and packages from multiple sources, it is hard to give general advices
to migrate - you must do it library by library, giving each location its
own namespace, and `-L` option of `amberc` comes handy when integrating;
ask on the mailing list if problems arise.

[1] http://requirejs.org/
[2] http://bower.io/
[3] https://github.com/amber-smalltalk/brikz
[4] https://github.com/amber-smalltalk/amber/wiki/How-to-load-amber


Happy Amber hacking!
The Amber crew

EnoX1

unread,
Nov 11, 2013, 8:27:48 PM11/11/13
to amber...@googlegroups.com, Pharo Development List, ESUG Members, Seaside - general discussion
Congradulation.

For my minimal applicating need for just running client side webpages, Amber was doing quite well and stably under node server.

I upgraded all needed, including node.js, bower and then bower install amber, amber was automatically upgraded to 0.12 and the web server is running well as before.

I don't know what the requirejs/AMD changes had any impact upon just the server running and web content serving?

Thanks for your great work. cheer.

EnoX1

unread,
Nov 11, 2013, 10:25:43 PM11/11/13
to amber...@googlegroups.com, Pharo Development List, ESUG Members, Seaside - general discussion

Sorry, problems encountered: I could not save codes via web ide for my original Amber 0.11 codes. 

Should I need to migration from Amber 0.11.0 manually, not just upgrade simply with 'Bower install' ?

Does all my previous compiled st packages need to recompiled again manually or it could just be saved and comitted as before via web ide,
and re-compiled automatically to 0.12 ones?

thanks.



 

Manfred Kröhnert

unread,
Nov 12, 2013, 3:16:16 AM11/12/13
to amber...@googlegroups.com

Hi,

Am 12.11.2013 04:25 schrieb "EnoX1" <tgk...@gmail.com>:
>
>
> Sorry, problems encountered: I could not save codes via web ide for my original Amber 0.11 codes. 
>
> Should I need to migration from Amber 0.11.0 manually, not just upgrade simply with 'Bower install' ?

Requirejs is a mechanism for loading .js files.
This change requires those files to look differently.
Therefore you have to recompile all your Smalltalk code as it is written at the end of the announcement email you just replied to.
If you have any problems with it you are welcome to post your problem in a new thread here.

Afterwards you need to load Amber in your html file differently.

The mechanism for saving code from the IDE changed, too.
However, it should work again after the changes from above.

> Does all my previous compiled st packages need to recompiled again manually or it could just be saved and comitted as before via web ide,
> and re-compiled automatically to 0.12 ones?
>
> thanks.

See above.

Best,
Manfred

Bernat Romagosa

unread,
Nov 12, 2013, 3:42:44 AM11/12/13
to amber...@googlegroups.com
Great work, guys! :)


2013/11/12 Manfred Kröhnert <mkroeh...@googlemail.com>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to amber-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Bernat Romagosa.

Herby Vojčík

unread,
Nov 12, 2013, 7:09:12 AM11/12/13
to amber...@googlegroups.com, Pharo Development List, ESUG Members, Seaside - general discussion
To only serve pages, I use this one-liner:

python -m SimpleHTTPServer [port]

(If you have python, it) Works out of the box.

Herby

sebastian

unread,
Nov 13, 2013, 4:07:35 AM11/13/13
to amber...@googlegroups.com

Srikumar Subramanian

unread,
Nov 14, 2013, 12:43:35 AM11/14/13
to amber...@googlegroups.com
This is cool! Just updated.

One issue that seems to have appeared after updating -

When I fire up Helios and try to create a new class using 
"Object subclass: #BlahBlah ..." within the Helios Browser, I get
an "<- Unexpected character" error at the ":" character
after "subclass:". The older Browser works fine when I do this.

Anyone else encountering this?

-Kumar

Andy Burnett

unread,
Nov 14, 2013, 6:37:23 AM11/14/13
to amber...@googlegroups.com
Yup, I get exactly the same issue,
--

Nicolas Petton

unread,
Nov 14, 2013, 7:57:14 AM11/14/13
to amber...@googlegroups.com
Could you report an issue? I don't have time to check now, but it looks
like it needs urgent fixing :)

Nico
--
Nicolas Petton
http://nicolas-petton.fr

Srikumar Subramanian

unread,
Nov 14, 2013, 8:58:00 PM11/14/13
to amber...@googlegroups.com

Srikumar Subramanian

unread,
Nov 20, 2013, 12:08:36 AM11/20/13
to amber...@googlegroups.com
Nicolas,

I'd like to create js files without class comments and all. Can you please clarify the following note about amberc?

The last enhancements target the commandline compiler which can be used 
as `amberc` (an executable script) or as a Grunt task.  The following 
features have been added: 
...
 * creation of *.deploy.js files (`-d` flag; `deploy` option in Grunt) 

I can't seem to figure out how to create the *.deploy.js files any more. No mention of "deploy" in Gruntfile.js or in the grunt/tasks files either.

-Kumar
 

Manfred Kröhnert

unread,
Nov 20, 2013, 2:12:44 AM11/20/13
to amber...@googlegroups.com

Hi Kumar,

Where did you find this sentence?
If it is to be found somewhere in the the 0.12.0/1 release it should be removed.
Creating deploy.js files has been removed from the compiler in the current or previous release.
We should update the release notes and add this information.

Combining and minifying files had been shifted to external tools.

> -Kumar

Best,
Manfred

Srikumar Subramanian

unread,
Nov 20, 2013, 4:15:33 AM11/20/13
to amber...@googlegroups.com, mkroeh...@googlemail.com
Sorry Nicolas and Manfred! My misreading!

I was quoting Nicolas' release announcement, but I missed the line above that said "The following features have been removed" heheh! .. and the line I quoted comes after that.

.. so is there any way to remove class comments in the deployed version via an external tool?

-Kumar

Herby Vojčík

unread,
Nov 20, 2013, 8:26:21 AM11/20/13
to amber...@googlegroups.com, mkroeh...@googlemail.com
sed? ;-)

Srikumar Subramanian wrote:
> Sorry Nicolas and Manfred! My misreading!
>
> I was quoting Nicolas' release announcement, but I missed the line
> above that said "The following features have been removed" heheh! ..
> and the line I quoted comes after that.
>
> .. so is there any way to remove class comments in the deployed
> version via an external tool?
>
> -Kumar
>
> On Wednesday, November 20, 2013 12:42:44 PM UTC+5:30, Manfred Kröhnert
> wrote:
>
> Hi Kumar,
>
> Am 20.11.2013 06:08 schrieb "Srikumar Subramanian"
> <sriku...@gmail.com <javascript:>>:
> >
> > Nicolas,
> >
> > I'd like to create js files without class comments and all. Can
> you please clarify the following note about amberc?
> >
> >> The last enhancements target the commandline compiler which can
> be used
> >> as `amberc` (an executable script) or as a Grunt task. The
> following
> >> features have been added:
> >> ...
> >>
>
>> * creation of *.deploy.js files (`-d` flag; `deploy` option in
> Grunt)
> >
> >
> > I can't seem to figure out how to create the *.deploy.js files
> any more. No mention of "deploy" in Gruntfile.js or in the
> grunt/tasks files either.
>
> Where did you find this sentence?
> If it is to be found somewhere in the the 0.12.0/1 release it
> should be removed.
> Creating deploy.js files has been removed from the compiler in the
> current or previous release.
> We should update the release notes and add this information.
>
> Combining and minifying files had been shifted to external tools.
>
> > -Kumar
>
> Best,
> Manfred
>

Srikumar Subramanian

unread,
Nov 21, 2013, 12:13:54 AM11/21/13
to amber...@googlegroups.com, mkroeh...@googlemail.com

:D .. yes indeed, thanks to the line-by-line output in the js files with escaped newlines in strings.

grep -v -E -h -e '^([A-Za-z0-9]+\.)+comment=' -e '^source: ' <file.js>

For the "amber/deploy" set, this saves about 20k in minified-gzipped size, which is about 20% of the size of amber/deploy with the comments and source (about 100k -> 80k). It may be significant for some and for others it may not be. Just noting it here. 

Best,
-Kumar

Nicolas Petton

unread,
Nov 21, 2013, 9:42:35 AM11/21/13
to amber...@googlegroups.com, mkroeh...@googlemail.com
A better way to deploy apps will be provided in future versions of
Amber, we simply couldn't make it for 0.12.x. But it will come!

Cheers,
Nico
>> > an email to amber-lang+...@googlegroups.com <javascript:>.
>> > For more options, visit https://groups.google.com/groups/opt
>> _out.
>>


Reply all
Reply to author
Forward
0 new messages