require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
33 messages Options
12
Reply | Threaded
Open this post in threaded view
|

require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Hannes Hirzel
Hello Herby

Looking at your summary how to load amber

https://github.com/amber-smalltalk/amber/wiki/How-to-load-amber

I wonder where I find the definition of the
     amber/deploy
module in the code.

a grep in the support directory has no hit.

How would an amber/deploy define statement look like?

Regards
Hannes

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Hannes Hirzel
P.S. I just found it.

There is a file called
     deploy.js

in the support directory which contains the definition I am looking for.

define([
    'amber_vm/smalltalk',
    './helpers',
    'amber_core/Kernel-Objects',
    'amber_core/Kernel-Classes',
    'amber_core/Kernel-Methods',
    'amber_core/Kernel-Collections',
    'amber_core/Kernel-Infrastructure',
    'amber_core/Kernel-Exceptions',
    'amber_core/Kernel-Transcript',
    'amber_core/Kernel-Announcements',
    'amber_core/Canvas'
], function (smalltalk) { return smalltalk; });



And as I understand the default mechanism of requirejs makes sure that
the name of the module defined here is

    [amber/deploy]

However if you could shed some light how this naming mechanism works
in this context I would appreciate it.

--Hannes

On 9/12/13, H. Hirzel <[hidden email]> wrote:

> Hello Herby
>
> Looking at your summary how to load amber
>
> https://github.com/amber-smalltalk/amber/wiki/How-to-load-amber
>
> I wonder where I find the definition of the
>      amber/deploy
> module in the code.
>
> a grep in the support directory has no hit.
>
> How would an amber/deploy define statement look like?
>
> Regards
> Hannes
>

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Herby Vojčík
H. Hirzel wrote:
> And as I understand the default mechanism of requirejs makes sure that
> the name of the module defined here is
>
>      [amber/deploy]
>
> However if you could shed some light how this naming mechanism works
> in this context I would appreciate it.

I would recommend "try not to care" from http://alanknightsblog.blogspot.sk/2011/10/principles-of-oo-design-or-everything-i.html.

> --Hannes

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Hannes Hirzel
Herby

Thank you for suggesting to try a black box testing approach. I could
narrow down the problem I am facing while creating a deployment
version of the app I am writing.

I did an example file to deploy the Counter class contained in the
Examples package to see how the deployment process goes.

The following file still has the development module (named 'amber/devel') loaded
(In a branch 'deploy-test-of-counter' of my updated fork)

    https://github.com/hhzl/amber/blob/deploy-test-of-counter/counter.html

Result: It works fine as there is actually no "deployment", only the
IDE is not shown.


The following file just loads the deployment environment (named 'amber/deploy')

    https://github.com/hhzl/amber/blob/deploy-test-of-counter/counter-deploy.html


Result: jQuery is not loaded as the observation of the loading process
in the web console of Firefox shows. The counter therefore does NOT
work.

[12:15:19.928] file:///C:/Users/User/Documents/amber/counter-deploy.html
[12:15:19.928] file:///C:/Users/User/Documents/amber/support/amber.js
[12:15:19.929] file:///C:/Users/User/Documents/amber/support/requirejs/require.min.js
[12:15:20.033] file:///C:/Users/User/Documents/amber/support/deploy.js
[12:15:20.034] file:///C:/Users/User/Documents/amber/support/smalltalk.js
[12:15:20.034] file:///C:/Users/User/Documents/amber/support/helpers.js
[12:15:20.035] file:///C:/Users/User/Documents/amber/js/Kernel-Objects.js
[12:15:20.035] file:///C:/Users/User/Documents/amber/js/Kernel-Classes.js
[12:15:20.036] file:///C:/Users/User/Documents/amber/js/Kernel-Methods.js
[12:15:20.037] file:///C:/Users/User/Documents/amber/js/Kernel-Collections.js
[12:15:20.038] file:///C:/Users/User/Documents/amber/js/Kernel-Infrastructure.js
[12:15:20.038] file:///C:/Users/User/Documents/amber/js/Kernel-Exceptions.js
[12:15:20.039] file:///C:/Users/User/Documents/amber/js/Kernel-Transcript.js
[12:15:20.039] file:///C:/Users/User/Documents/amber/js/Kernel-Announcements.js
[12:15:20.040] file:///C:/Users/User/Documents/amber/js/Canvas.js
[12:15:20.040] file:///C:/Users/User/Documents/amber/support/boot.js
[12:15:20.041] file:///C:/Users/User/Documents/amber/support/nil.js
[12:15:20.041] file:///C:/Users/User/Documents/amber/support/_st.js
[12:15:20.150] file:///C:/Users/User/Documents/amber/support/browser-compatibility.js
[12:15:20.151] file:///C:/Users/User/Documents/amber/support/ensure-console.js
[12:15:20.152] file:///C:/Users/User/Documents/amber/support/es5-shim-2.0.2/es5-shim.min.js
[12:15:20.152] file:///C:/Users/User/Documents/amber/support/es5-shim-2.0.2/es5-sham.min.js
[12:15:20.147] "HTMLSnippet class >> initialize"
[12:15:20.147] "HTMLSnippet class >> ensureCurrent"
[12:15:20.147] "JSObjectProxy >> asJQuery"
[12:15:20.148] "JavaScript exception: ReferenceError: jQuery is not defined"


Attempts to load jQuery
-----------------------------------

I have tried the following combinations so far

require(["amber/deploy", "jQuery"],
require(["amber/deploy", "amber/jQuery"],
require(["amber/deploy", "support/jQuery"],

and

require(["jQuery","amber/deploy"],
require(["amber/jQuery","amber/deploy"],
require(["support/jQuery","amber/deploy"],


Suggestions?
--------------------

Other suggestions how to load jQuery?



Regards


Hannes



On 9/12/13, Herby Vojčík <[hidden email]> wrote:

> H. Hirzel wrote:
>> And as I understand the default mechanism of requirejs makes sure that
>> the name of the module defined here is
>>
>>      [amber/deploy]
>>
>> However if you could shed some light how this naming mechanism works
>> in this context I would appreciate it.
>
> I would recommend "try not to care" from
> http://alanknightsblog.blogspot.sk/2011/10/principles-of-oo-design-or-everything-i.html.
>
>> --Hannes
>
> --
> 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 [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Herby Vojčík


H. Hirzel wrote:

> Herby
>
> I did an example file to deploy the Counter class contained in the
> Examples package to see how the deployment process goes.
>
> The following file still has the development module (named
> 'amber/devel') loaded
> (In a branch 'deploy-test-of-counter' of my updated fork)
>
> https://github.com/hhzl/amber/blob/deploy-test-of-counter/counter.html
>
> Result: It works fine as there is actually no "deployment", only the
> IDE is not shown.

The first "problem" is. you are not loading eanything except the amber
set. Your example is trying (should be trying) to load amber _and
example app_ to test deployment.

So the array of dependencies should be ["amber/devel",
"amber_core/Examples"] *the fact that Examples are part of amber/devel
is irrelevant here).

> The following file just loads the deployment environment (named
> 'amber/deploy')
>
> https://github.com/hhzl/amber/blob/deploy-test-of-counter/counter-deploy.html
>

And same here. Should an
ything else work, this would fail on not finding smalltalk.Counter at
all, because Examples is _not_ part of amber/deploy.

> Result: jQuery is not loaded as the observation of the loading process
> in the web console of Firefox shows. The counter therefore does NOT
> work.
>
> [12:15:19.928] file:///C:/Users/User/Documents/amber/counter-deploy.html
> [12:15:19.928] file:///C:/Users/User/Documents/amber/support/amber.js
> [12:15:19.929]
> file:///C:/Users/User/Documents/amber/support/requirejs/require.min.js
> [12:15:20.033] file:///C:/Users/User/Documents/amber/support/deploy.js
> [12:15:20.034] file:///C:/Users/User/Documents/amber/support/smalltalk.js
> [12:15:20.034] file:///C:/Users/User/Documents/amber/support/helpers.js
> [12:15:20.035] file:///C:/Users/User/Documents/amber/js/Kernel-Objects.js
> [12:15:20.035] file:///C:/Users/User/Documents/amber/js/Kernel-Classes.js
> [12:15:20.036] file:///C:/Users/User/Documents/amber/js/Kernel-Methods.js
> [12:15:20.037] file:///C:
/Users/User/Documents/amber/js/Kernel-Collections.js

> [12:15:20.038]
> file:///C:/Users/User/Documents/amber/js/Kernel-Infrastructure.js
> [12:15:20.038]
> file:///C:/Users/User/Documents/amber/js/Kernel-Exceptions.js
> [12:15:20.039]
> file:///C:/Users/User/Documents/amber/js/Kernel-Transcript.js
> [12:15:20.039]
> file:///C:/Users/User/Documents/amber/js/Kernel-Announcements.js
> [12:15:20.040] file:///C:/Users/User/Documents/amber/js/Canvas.js
> [12:15:20.040] file:///C:/Users/User/Documents/amber/support/boot.js
> [12:15:20.041] file:///C:/Users/User/Documents/amber/support/nil.js
> [12:15:20.041] file:///C:/Users/User/Documents/amber/support/_st.js
> [12:15:20.150]
> file:///C:/Users/User/Documents/amber/support/browser-compatibility.js
> [12:15:20.151]
> file:///C:/Users/User/Documents/amber/support/ensure-console.js
> [12:15:20.152]
> file:///C:/Users/User/Documents/amber/support/es5-shim-2.0.2/es5-shim.min.js
>
> [12:15:20.152] file:///C:/Users/User/Documents/amber/support/es5-shim-
2.0.2/es5-sham.min.js
> [12:15:20.147] "HTMLSnippet class>> initialize"
> [12:15:20.147] "HTMLSnippet class>> ensureCurrent"
> [12:15:20.147] "JSObjectProxy>> asJQuery"
> [12:15:20.148] "JavaScript exception: ReferenceError: jQuery is not
> defined"

This is bug, jQuery should be loaded as part of amber/deploy.

> Regards
>
>
> Hannes

Herby

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Herby Vojčík


Herby Vojčík wrote:
> This is bug, jQuery should be loaded as part of amber/deploy.

I just fixed it.

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Hannes Hirzel
In reply to this post by Herby Vojčík
On 9/12/13, Herby Vojčík <[hidden email]> wrote:
>
>
> Herby Vojčík wrote:
>> This is bug, jQuery should be loaded as part of amber/deploy.
>
> I just fixed it.

Thank you!


On 9/12/13, Herby Vojčík <[hidden email]> wrote:

>>
>> https://github.com/hhzl/amber/blob/deploy-test-of-counter/counter.html
>>
>> Result: It works fine...

>
> The first "problem" is. you are not loading eanything except the amber
> set. Your example is trying (should be trying) to load amber _and
> example app_ to test deployment.
>
> So the array of dependencies should be ["amber/devel",
> "amber_core/Examples"] *the fact that Examples are part of amber/devel
> is irrelevant here).

There is a misunderstanding here.  It works without without explicitly
mentioning
    amber_core/Examples

see
https://github.com/hhzl/amber/blob/deploy-test-of-counter/counter.html




>> The following file just loads the deployment environment (named
>> 'amber/deploy')
>>
>> https://github.com/hhzl/amber/blob/deploy-test-of-counter/counter-deploy.html
>>
>
> And same here. Should an
> ything else work, this would fail on not finding smalltalk.Counter at
> all, because Examples is _not_ part of amber/deploy.


Indeed, I need to load the examples, so I now do

  require(
        ["amber/deploy", "amber_core/examples"],
        ....

And in fact it loads examples.js!



>
> This is bug, jQuery should be loaded as part of amber/deploy.
>


Thank you for fixing the bug!

I have updated

    https://github.com/hhzl/amber/blob/deploy-test-of-counter/counter-deploy.html


It now loads jQuery and the examples package.

But it still does _not_ work.



[15:56:20.020] file:///C:/Users/User/Documents/amber/counter-deploy.html
[15:56:20.021] file:///C:/Users/User/Documents/amber/support/amber.js
[15:56:20.021] file:///C:/Users/User/Documents/amber/support/requirejs/require.min.js
[15:56:20.135] file:///C:/Users/User/Documents/amber/support/deploy.js
[15:56:20.135] file:///C:/Users/User/Documents/amber/js/examples.js
[15:56:20.136] file:///C:/Users/User/Documents/amber/support/smalltalk.js
[15:56:20.136] file:///C:/Users/User/Documents/amber/support/helpers.js
[15:56:20.137] file:///C:/Users/User/Documents/amber/support/jQuery/jquery-1.8.2.min.js
[15:56:20.137] file:///C:/Users/User/Documents/amber/js/Kernel-Objects.js
[15:56:20.138] file:///C:/Users/User/Documents/amber/js/Kernel-Classes.js
[15:56:20.138] file:///C:/Users/User/Documents/amber/js/Kernel-Methods.js
[15:56:20.139] file:///C:/Users/User/Documents/amber/js/Kernel-Collections.js
[15:56:20.139] file:///C:/Users/User/Documents/amber/js/Kernel-Infrastructure.js
[15:56:20.140] file:///C:/Users/User/Documents/amber/js/Kernel-Exceptions.js
[15:56:20.140] file:///C:/Users/User/Documents/amber/js/Kernel-Transcript.js
[15:56:20.141] file:///C:/Users/User/Documents/amber/js/Kernel-Announcements.js
[15:56:20.141] file:///C:/Users/User/Documents/amber/js/Canvas.js
[15:56:20.142] file:///C:/Users/User/Documents/amber/support/boot.js
[15:56:20.142] file:///C:/Users/User/Documents/amber/support/nil.js
[15:56:20.143] file:///C:/Users/User/Documents/amber/support/_st.js
[15:56:20.253] file:///C:/Users/User/Documents/amber/support/browser-compatibility.js
[15:56:20.253] file:///C:/Users/User/Documents/amber/support/ensure-console.js
[15:56:20.254] file:///C:/Users/User/Documents/amber/support/es5-shim-2.0.2/es5-shim.min.js
[15:56:20.254] file:///C:/Users/User/Documents/amber/support/es5-shim-2.0.2/es5-sham.min.js
[15:56:20.245]

Unknown property 'box-sizing'.  Declaration dropped. @
file:///C:/Users/User/Documents/amber/counter-deploy.html

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Herby Vojčík


H. Hirzel wrote:

> On 9/12/13, Herby Vojčík<[hidden email]>  wrote:
>> The first "problem" is. you are not loading eanything except the amber
>> set. Your example is trying (should be trying) to load amber _and
>> example app_ to test deployment.
>>
>> So the array of dependencies should be ["amber/devel",
>> "amber_core/Examples"] *the fact that Examples are part of amber/devel
>> is irrelevant here).
>
> There is a misunderstanding here.  It works without without explicitly
> mentioning
>      amber_core/Examples
>
> see
> https://github.com/hhzl/amber/blob/deploy-test-of-counter/counter.html

Which of the words "should" and "irrelevant" did you not understand? :-)

> It now loads jQuery and the examples package.
>
> But it still does _not_ work.
>
>
>
> [15:56:20.020] file:///C:/Users/User/Documents/amber/counter-deploy.html
> [15:56:20.021] file:///C:/Users/User/Documents/amber/support/amber.js
> [15:56:20.021] file:///C:/Users/User/Documents/amber/support/requirejs
/require.min.js

> [15:56:20.135] file:///C:/Users/User/Documents/amber/support/deploy.js
> [15:56:20.135] file:///C:/Users/User/Documents/amber/js/examples.js
> [15:56:20.136] file:///C:/Users/User/Documents/amber/support/smalltalk.js
> [15:56:20.136] file:///C:/Users/User/Documents/amber/support/helpers.js
> [15:56:20.137] file:///C:/Users/User/Documents/amber/support/jQuery/jquery-1.8.2.min.js
> [15:56:20.137] file:///C:/Users/User/Documents/amber/js/Kernel-Objects.js
> [15:56:20.138] file:///C:/Users/User/Documents/amber/js/Kernel-Classes.js
> [15:56:20.138] file:///C:/Users/User/Documents/amber/js/Kernel-Methods.js
> [15:56:20.139] file:///C:/Users/User/Documents/amber/js/Kernel-Collections.js
> [15:56:20.139] file:///C:/Users/User/Documents/amber/js/Kernel-Infrastructure.js
> [15:56:20.140] file:///C:/Users/User/Documents/amber/js/Kernel-Exceptions.js
> [15:56:20.140] file:///C:/Users/User/Documents/amber/js/Kernel-Transcript.js
> [15:56:20.141] file:///C:/Users/User/Doc
uments/amber/js/Kernel-Announcements.js

> [15:56:20.141] file:///C:/Users/User/Documents/amber/js/Canvas.js
> [15:56:20.142] file:///C:/Users/User/Documents/amber/support/boot.js
> [15:56:20.142] file:///C:/Users/User/Documents/amber/support/nil.js
> [15:56:20.143] file:///C:/Users/User/Documents/amber/support/_st.js
> [15:56:20.253] file:///C:/Users/User/Documents/amber/support/browser-compatibility.js
> [15:56:20.253] file:///C:/Users/User/Documents/amber/support/ensure-console.js
> [15:56:20.254] file:///C:/Users/User/Documents/amber/support/es5-shim-2.0.2/es5-shim.min.js
> [15:56:20.254] file:///C:/Users/User/Documents/amber/support/es5-shim-2.0.2/es5-sham.min.js
> [15:56:20.245]
>
> Unknown property 'box-sizing'.  Declaration dropped. @
> file:///C:/Users/User/Documents/amber/counter-deploy.html

This is some css warning AFAICT. Does it really _not work_? Maybe it is just a warning.

Herby

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Hannes Hirzel
On 9/12/13, Herby Vojčík <[hidden email]> wrote:

>
>
> H. Hirzel wrote:
>> On 9/12/13, Herby Vojčík<[hidden email]>  wrote:
>>> The first "problem" is. you are not loading eanything except the amber
>>> set. Your example is trying (should be trying) to load amber _and
>>> example app_ to test deployment.
>>>
>>> So the array of dependencies should be ["amber/devel",
>>> "amber_core/Examples"] *the fact that Examples are part of amber/devel
>>> is irrelevant here).
>>
>> There is a misunderstanding here.  It works without without explicitly
>> mentioning
>>      amber_core/Examples
>>
>> see
>> https://github.com/hhzl/amber/blob/deploy-test-of-counter/counter.html
>
> Which of the words "should" and "irrelevant" did you not understand? :-)

I just want to point out that I do not _need_ to load
amber_core/Examples because something ('devel' I assume) else does
this job. We do not have a deployment environment here. This is the
case to compare to the deployment test below.

...snip....

Deployment
-----------------

>> file:///C:/Users/User/Documents/amber/support/es5-shim-2.0.2/es5-shim.min.js
>> [15:56:20.254]
>> file:///C:/Users/User/Documents/amber/support/es5-shim-2.0.2/es5-sham.min.js
>> [15:56:20.245]
>>
>> Unknown property 'box-sizing'.  Declaration dropped. @
>> file:///C:/Users/User/Documents/amber/counter-deploy.html
>
> This is some css warning AFAICT. Does it really _not work_? Maybe it is just
> a warning.
>
> Herby



It is now left with a style sheet problem.
No style sheet at all is loaded.

You may check it out

       https://github.com/hhzl/amber/archive/deploy-test-of-counter.zip

then

counter-deploy.html

<!DOCTYPE html>
<html>

<head>
    <title>Amber Smalltalk - Counter </title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <meta name="author" content="Nicolas Petton, Hannes Hirzel"/>
    <script type='text/javascript' src='support/amber.js'></script>
    <script type='text/javascript'
src='support/requirejs/require.min.js'></script>
</head>

<body>
<script type='text/javascript'>
    require(
        ["amber/deploy", "amber_core/examples"],
        function (smalltalk) {
            smalltalk.defaultAmdNamespace = "amber_core";
            smalltalk.initialize();

           // deactivate call to browser as it is not in the
deployment environment
           // smalltalk.Browser._open()

           // call counter
           smalltalk.Counter._tryExample();

        }
    );
</script>
</body>
</html>

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Hannes Hirzel
Herby,

I have set up the hello world deploy example in a environment as described here
    https://github.com/amber-smalltalk/amber/wiki/Writing-my-first-app

projects/vendor/amber/
projects/hello
projects/hello/st
projects/hello/js

in the most current amber.
https://github.com/amber-smalltalk/amber/commit/52d015dccc211a814632f92045d839dbffff18d7


There deployment works FINE.

Thank you again Herby for the jQuery fix in [amber/deploy].


--Hannes

Below the correct load log for a deployment example

[09:08:48.868] GET http://localhost:4000/at2-hello2-d/index.html
[HTTP/1.1 200 OK 0ms]
[09:08:49.026] GET http://localhost:4000/vendor/amber/support/amber.js
[HTTP/1.1 200 OK 16ms]
[09:08:49.027] GET
http://localhost:4000/vendor/amber/support/requirejs/require.min.js
[HTTP/1.1 200 OK 16ms]
[09:08:49.028] GET
http://localhost:4000/vendor/amber/support/deploy.js [HTTP/1.1 200 OK
0ms]
[09:08:49.028] GET http://localhost:4000/at2-hello2-d/js/Examples2.js
[HTTP/1.1 200 OK 0ms]
[09:08:49.343] GET
http://localhost:4000/vendor/amber/support/smalltalk.js [HTTP/1.1 200
OK 0ms]
[09:08:49.344] GET
http://localhost:4000/vendor/amber/support/helpers.js [HTTP/1.1 200 OK
0ms]
[09:08:49.345] GET
http://localhost:4000/vendor/amber/support/jQuery/jquery-1.8.2.min.js
[HTTP/1.1 200 OK 0ms]
[09:08:49.345] GET
http://localhost:4000/vendor/amber/js/Kernel-Objects.js [HTTP/1.1 200
OK 0ms]
[09:08:49.346] GET
http://localhost:4000/vendor/amber/js/Kernel-Classes.js [HTTP/1.1 200
OK 16ms]
[09:08:49.347] GET
http://localhost:4000/vendor/amber/js/Kernel-Methods.js [HTTP/1.1 200
OK 16ms]
[09:08:49.348] GET
http://localhost:4000/vendor/amber/js/Kernel-Collections.js [HTTP/1.1
200 OK 16ms]
[09:08:49.349] GET
http://localhost:4000/vendor/amber/js/Kernel-Infrastructure.js
[HTTP/1.1 200 OK 16ms]
[09:08:49.349] GET
http://localhost:4000/vendor/amber/js/Kernel-Exceptions.js [HTTP/1.1
200 OK 31ms]
[09:08:49.350] GET
http://localhost:4000/vendor/amber/js/Kernel-Transcript.js [HTTP/1.1
200 OK 31ms]
[09:08:49.351] GET
http://localhost:4000/vendor/amber/js/Kernel-Announcements.js
[HTTP/1.1 200 OK 31ms]
[09:08:49.351] GET http://localhost:4000/vendor/amber/js/Canvas.js
[HTTP/1.1 200 OK 31ms]
[09:08:49.352] GET http://localhost:4000/vendor/amber/support/nil.js
[HTTP/1.1 200 OK 31ms]
[09:08:49.353] GET http://localhost:4000/vendor/amber/support/_st.js
[HTTP/1.1 200 OK 31ms]
[09:08:49.529] GET http://localhost:4000/vendor/amber/support/boot.js
[HTTP/1.1 200 OK 0ms]
[09:08:49.530] GET
http://localhost:4000/vendor/amber/support/browser-compatibility.js
[HTTP/1.1 200 OK 0ms]
[09:08:49.531] GET
http://localhost:4000/vendor/amber/support/ensure-console.js [HTTP/1.1
200 OK 0ms]
[09:08:49.532] GET
http://localhost:4000/vendor/amber/support/es5-shim-2.0.2/es5-shim.min.js
[HTTP/1.1 200 OK 0ms]
[09:08:49.532] GET
http://localhost:4000/vendor/amber/support/es5-shim-2.0.2/es5-sham.min.js
[HTTP/1.1 200 OK 0ms]
[09:08:49.516] Unknown property 'box-sizing'.  Declaration dropped. @
http://localhost:4000/at2-hello2-d/index.html


On 9/12/13, H. Hirzel <[hidden email]> wrote:

> On 9/12/13, Herby Vojčík <[hidden email]> wrote:
>>
>>
>> H. Hirzel wrote:
>>> On 9/12/13, Herby Vojčík<[hidden email]>  wrote:
>>>> The first "problem" is. you are not loading eanything except the amber
>>>> set. Your example is trying (should be trying) to load amber _and
>>>> example app_ to test deployment.
>>>>
>>>> So the array of dependencies should be ["amber/devel",
>>>> "amber_core/Examples"] *the fact that Examples are part of amber/devel
>>>> is irrelevant here).
>>>
>>> There is a misunderstanding here.  It works without without explicitly
>>> mentioning
>>>      amber_core/Examples
>>>
>>> see
>>> https://github.com/hhzl/amber/blob/deploy-test-of-counter/counter.html
>>
>> Which of the words "should" and "irrelevant" did you not understand? :-)
>
> I just want to point out that I do not _need_ to load
> amber_core/Examples because something ('devel' I assume) else does
> this job. We do not have a deployment environment here. This is the
> case to compare to the deployment test below.
>
> ...snip....
>
> Deployment
> -----------------
>
>>> file:///C:/Users/User/Documents/amber/support/es5-shim-2.0.2/es5-shim.min.js
>>> [15:56:20.254]
>>> file:///C:/Users/User/Documents/amber/support/es5-shim-2.0.2/es5-sham.min.js
>>> [15:56:20.245]
>>>
>>> Unknown property 'box-sizing'.  Declaration dropped. @
>>> file:///C:/Users/User/Documents/amber/counter-deploy.html
>>
>> This is some css warning AFAICT. Does it really _not work_? Maybe it is
>> just
>> a warning.
>>
>> Herby
>
>
>
> It is now left with a style sheet problem.
> No style sheet at all is loaded.
>
> You may check it out
>
>        https://github.com/hhzl/amber/archive/deploy-test-of-counter.zip
>
> then
>
> counter-deploy.html
>
> <!DOCTYPE html>
> <html>
>
> <head>
>     <title>Amber Smalltalk - Counter </title>
>     <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
>     <meta name="author" content="Nicolas Petton, Hannes Hirzel"/>
>     <script type='text/javascript' src='support/amber.js'></script>
>     <script type='text/javascript'
> src='support/requirejs/require.min.js'></script>
> </head>
>
> <body>
> <script type='text/javascript'>
>     require(
>         ["amber/deploy", "amber_core/examples"],
>         function (smalltalk) {
>             smalltalk.defaultAmdNamespace = "amber_core";
>             smalltalk.initialize();
>
>            // deactivate call to browser as it is not in the
> deployment environment
>            // smalltalk.Browser._open()
>
>            // call counter
>            smalltalk.Counter._tryExample();
>
>         }
>     );
> </script>
> </body>
> </html>
>

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Dave Mason-3
I am trying to move my application over to the new environment (the one with require).  The .js files erroneously reference smalltalk.??? so I decide to compile the .st code (which I wanted to do all along).  So I say:

: ~/hg/ProgrammingFortheRestofUs/kit ; ../vendor/amber/bin/amberc -n com_programmingfortherestofus_kit -D js st/*.st

And I get:

module.js:340
    throw err;
          ^
Error: Cannot find module 'amdefine'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.start (/Users/dmason/hg/ProgrammingFortheRestofUs/vendor/amber/bin/amberc.js:74:24)
    at Object.callback (/Users/dmason/hg/ProgrammingFortheRestofUs/vendor/amber/bin/amberc.js:401:11)
    at Object.Combo.check (/Users/dmason/hg/ProgrammingFortheRestofUs/vendor/amber/bin/amberc.js:116:18)
    at /Users/dmason/hg/ProgrammingFortheRestofUs/vendor/amber/bin/amberc.js:109:9
    at fs.js:266:14
    at Object.oncomplete (fs.js:107:15)

What am I doing wrong?  This afterL
: ~/hg/ProgrammingFortheRestofUs ; git clone https://github.com/amber-smalltalk/amber.git
Cloning into amber...
remote: Counting objects: 18943, done.
remote: Compressing objects: 100% (5660/5660), done.
remote: Total 18943 (delta 14482), reused 17424 (delta 13105)
Receiving objects: 100% (18943/18943), 13.78 MiB | 7.32 MiB/s, done.
Resolving deltas: 100% (14482/14482), done.

and then mv amber vendor

Same thing happens with the Hello example.

Thanks for any help.

../Dave

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Herby Vojčík

Dave Mason wrote:
> And I get:
>
> module.js:340
>     throw err;
>           ^
> Error: Cannot find module 'amdefine'

The dependencies aren't present.

Run `npm install` to install them.

> Thanks for any help.
>
> ../Dave

Herby

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Dave Mason-3
Thanks for the quick reply.  But....

On Tue, Sep 24, 2013 at 3:47 PM, Herby Vojčík <[hidden email]> wrote:
The dependencies aren't present.

Run `npm install` to install them.

: ~/hg/ProgrammingFortheRestofUs/Hello ; cd ../vendor/amber/
: ~/hg/ProgrammingFortheRestofUs/vendor/amber ; npm install
and many more lines... all successful... ending with:
amdefine@0.0.8 node_modules/amdefine

pegjs@0.7.0 node_modules/pegjs

grunt@0.4.1 node_modules/grunt
├── dateformat@1.0.2-1.2.3
├── which@1.0.5
├── eventemitter2@0.4.13
├── colors@0.6.2
├── hooker@0.2.3
├── async@0.1.22
├── rimraf@2.0.3 (graceful-fs@1.1.14)
├── lodash@0.9.2
├── minimatch@0.2.12 (sigmund@1.0.0, lru-cache@2.3.1)
├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.3)
├── coffee-script@1.3.3
├── nopt@1.0.10 (abbrev@1.0.4)
├── underscore.string@2.2.1
├── iconv-lite@0.2.11
├── findup-sync@0.1.2 (lodash@1.0.1)
└── js-yaml@2.0.5 (esprima@1.0.4, argparse@0.1.15)

grunt-contrib-jshint@0.3.0 node_modules/grunt-contrib-jshint
└── jshint@1.1.0 (peakle@0.0.1, minimatch@0.2.12, underscore@1.4.4, shelljs@0.1.4, cli@0.4.5, esprima@1.1.0-dev)
: ~/hg/ProgrammingFortheRestofUs/vendor/amber ; cd ../../kit/
: ~/hg/ProgrammingFortheRestofUs/kit ; ../vendor/amber/bin/amberc -n com_programmingfortherestofus_kit -D js st/*.st
Importing: st/Kit-Native.st
Importing: st/Kit-Tests.st
Importing: st/Kit.st
Smalltalk >> createPackage:properties: is deprecated! (in a block (in DoIt >> xxxDoIt))
Smalltalk >> createPackage:properties: is deprecated! (in a block (in DoIt >> xxxDoIt))

undefined:29438
throw anError;
      ^
Error: 
: ~/hg/ProgrammingFortheRestofUs/kit ; 

 ... doesn't say what the error is.

If you want to see the st code it seems to be choking on, see http://programmingfortherestofus.com/kit/st/Kit.st

Thanks again,  ../Dave

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Herby Vojčík
amdefine error was because of npm, so that one is solved.

As for this one, I don't know. The only things I see is that yuo do not lost any libraries using -l in amberc,, they may be missing. Tests definitely need SUnit, if you do any web page work, you'll probably need Canvas, etc.

Herby

Dave Mason wrote:

> Thanks for the quick reply.  But....
>
> On Tue, Sep 24, 2013 at 3:47 PM, Herby Vojčík <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     The dependencies aren't present.
>
>     Run `npm install` to install them.
>
>
> : ~/hg/ProgrammingFortheRestofUs/Hello ; cd ../vendor/amber/
> : ~/hg/ProgrammingFortheRestofUs/vendor/amber ; npm install
> npm http GET https://registry.npmjs.org/grunt
> npm http GET https://registry.npmjs.org/pegjs
> and many more lines... all successful... ending with:
> npm http 304 https://registry.npmjs.org/glob
> amdefine@0.0.8 node_modules/amdefine
>
> pegjs@0.7.0 node_modules/pegjs
>
> grunt@0.4.1 node_modules/grunt
> ├── d
ateformat@1.0.2-1.2.3

> ├── which@1.0.5
> ├── eventemitter2@0.4.13
> ├── colors@0.6.2
> ├── hooker@0.2.3
> ├── async@0.1.22
> ├── rimraf@2.0.3 (graceful-fs@1.1.14)
> ├── lodash@0.9.2
> ├── minimatch@0.2.12 (sigmund@1.0.0, lru-cache@2.3.1)
> ├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.3)
> ├── coffee-script@1.3.3
> ├── nopt@1.0.10 (abbrev@1.0.4)
> ├── underscore.string@2.2.1
> ├── iconv-lite@0.2.11
> ├── findup-sync@0.1.2 (lodash@1.0.1)
> └── js-yaml@2.0.5 (esprima@1.0.4, argparse@0.1.15)
>
> grunt-contrib-jshint@0.3.0 node_modules/grunt-contrib-jshint
> └── jshint@1.1.0 (peakle@0.0.1, minimatch@0.2.12, underscore@1.4.4,
> shelljs@0.1.4, cli@0.4.5, esprima@1.1.0-dev)
> : ~/hg/ProgrammingFortheRestofUs/vendor/amber ; cd ../../kit/
> : ~/hg/ProgrammingFortheRestofUs/kit ; ../vendor/amber/bin/amberc -n
> com_programmingfortherestofus_kit -D js st/*.st
> Importing: st/Kit-Native.
st

> Importing: st/Kit-Tests.st
> Importing: st/Kit.st
> Smalltalk >> createPackage:properties: is deprecated! (in a block (in
> DoIt >> xxxDoIt))
> Smalltalk >> createPackage:properties: is deprecated! (in a block (in
> DoIt >> xxxDoIt))
>
> undefined:29438
> throw anError;
>       ^
> Error:
> : ~/hg/ProgrammingFortheRestofUs/kit ;
>
>  ... doesn't say what the error is.
>
> If you want to see the st code it seems to be choking on, see
> http://programmingfortherestofus.com/kit/st/Kit.st
>
> Thanks again,  ../Dave
>
> --
> 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 [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Nicolas Petton
In reply to this post by Dave Mason-3
Could you enable the verbose flag in amberc? It would make it easier to
understand what is wrong :)

use amberc -v

Nico

Dave Mason <[hidden email]> writes:

> Thanks for the quick reply.  But....
>
> On Tue, Sep 24, 2013 at 3:47 PM, Herby Vojčík <[hidden email]> wrote:
>
>> The dependencies aren't present.
>>
>> Run `npm install` to install them.
>
>
> : ~/hg/ProgrammingFortheRestofUs/Hello ; cd ../vendor/amber/
> : ~/hg/ProgrammingFortheRestofUs/vendor/amber ; npm install
> npm http GET https://registry.npmjs.org/grunt
> npm http GET https://registry.npmjs.org/pegjs
> and many more lines... all successful... ending with:
> npm http 304 https://registry.npmjs.org/glob
> amdefine@0.0.8 node_modules/amdefine
>
> pegjs@0.7.0 node_modules/pegjs
>
> grunt@0.4.1 node_modules/grunt
> ├── dateformat@1.0.2-1.2.3
> ├── which@1.0.5
> ├── eventemitter2@0.4.13
> ├── colors@0.6.2
> ├── hooker@0.2.3
> ├── async@0.1.22
> ├── rimraf@2.0.3 (graceful-fs@1.1.14)
> ├── lodash@0.9.2
> ├── minimatch@0.2.12 (sigmund@1.0.0, lru-cache@2.3.1)
> ├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.3)
> ├── coffee-script@1.3.3
> ├── nopt@1.0.10 (abbrev@1.0.4)
> ├── underscore.string@2.2.1
> ├── iconv-lite@0.2.11
> ├── findup-sync@0.1.2 (lodash@1.0.1)
> └── js-yaml@2.0.5 (esprima@1.0.4, argparse@0.1.15)
>
> grunt-contrib-jshint@0.3.0 node_modules/grunt-contrib-jshint
> └── jshint@1.1.0 (peakle@0.0.1, minimatch@0.2.12, underscore@1.4.4,
> shelljs@0.1.4, cli@0.4.5, esprima@1.1.0-dev)
> : ~/hg/ProgrammingFortheRestofUs/vendor/amber ; cd ../../kit/
> : ~/hg/ProgrammingFortheRestofUs/kit ; ../vendor/amber/bin/amberc -n
> com_programmingfortherestofus_kit -D js st/*.st
> Importing: st/Kit-Native.st
> Importing: st/Kit-Tests.st
> Importing: st/Kit.st
> Smalltalk >> createPackage:properties: is deprecated! (in a block (in DoIt
>>> xxxDoIt))
> Smalltalk >> createPackage:properties: is deprecated! (in a block (in DoIt
>>> xxxDoIt))
>
> undefined:29438
> throw anError;
>       ^
> Error:
> : ~/hg/ProgrammingFortheRestofUs/kit ;
>
>  ... doesn't say what the error is.
>
> If you want to see the st code it seems to be choking on, see
> http://programmingfortherestofus.com/kit/st/Kit.st
>
> Thanks again,  ../Dave
>
> --
> 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 [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.

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

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Dave Mason-3
Thanks!

On Wed, Sep 25, 2013 at 3:48 AM, Nicolas Petton <[hidden email]> wrote:
Could you enable the verbose flag in amberc? It would make it easier to
understand what is wrong :)

use amberc -v
: ~/hg/ProgrammingForTheRestOfUs/kit ; ../vendor/amber/bin/amberc -v st/Kit-Tests.st 
Checking: st/Kit-Tests.st
Resolving: boot.js
Resolving: smalltalk.js
Resolving: nil.js
Resolving: _st.js
Resolving: Kernel-Objects.js
Resolving: Kernel-Classes.js
Resolving: Kernel-Methods.js
Resolving: Kernel-Collections.js
Resolving: Kernel-Infrastructure.js
Resolving: Kernel-Exceptions.js
Resolving: Kernel-Transcript.js
Resolving: Kernel-Announcements.js
Resolving: boot.js
Resolving: smalltalk.js
Resolving: nil.js
Resolving: _st.js
Resolving: Kernel-Objects.js
Resolving: Kernel-Classes.js
Resolving: Kernel-Methods.js
Resolving: Kernel-Collections.js
Resolving: Kernel-Infrastructure.js
Resolving: Kernel-Exceptions.js
Resolving: Kernel-Transcript.js
Resolving: Kernel-Announcements.js
Resolving: parser.js
Resolving: Importer-Exporter.js
Resolving: Compiler-Exceptions.js
Resolving: Compiler-Core.js
Resolving: Compiler-AST.js
Resolving: Compiler-Exceptions.js
Resolving: Compiler-IR.js
Resolving: Compiler-Inlining.js
Resolving: Compiler-Semantic.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/support/boot.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/support/smalltalk.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/support/nil.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/support/_st.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Objects.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Classes.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Methods.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Collections.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Infrastructure.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Exceptions.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Transcript.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Announcements.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/support/parser.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Importer-Exporter.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Compiler-Exceptions.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Compiler-Core.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Compiler-AST.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Compiler-Exceptions.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Compiler-IR.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Compiler-Inlining.js
Loading file: /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Compiler-Semantic.js
Compiler loaded
Compiling collected .st files
Importing: st/Kit-Tests.st
Smalltalk >> createPackage:properties: is deprecated! (in a block (in DoIt >> xxxDoIt))
Importer >> import:
BlockClosure >> whileFalse:
BlockClosure >> value
a block (in Importer >> import:)
Compiler >> evaluateExpression:
Compiler >> evaluateExpression:on:
DoIt >> xxxDoIt
BlockClosure >> value
a block (in DoIt >> xxxDoIt)
UndefinedObject >> subclass:instanceVariableNames:package:
ClassBuilder >> superclass:subclass:instanceVariableNames:package:
ClassBuilder >> addSubclassOf:named:instanceVariableNames:package:
ClassBuilder >> basicAddSubclassOf:named:instanceVariableNames:package:
JavaScript exception: TypeError: Cannot read property 'fn' of null

undefined:29438
throw anError;
      ^
Error: 
 

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Herby Vojčík
That's exactly what I said: it can't add subclass of undefined class, IOW - you did not specify libraries in amberc argumets.

Dave Mason wrote:

> Thanks!
>
> On Wed, Sep 25, 2013 at 3:48 AM, Nicolas Petton
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>     Could you enable the verbose flag in amberc? It would make it
>     easier to
>     understand what is wrong :)
>
>     use amberc -v
>
> : ~/hg/ProgrammingForTheRestOfUs/kit ; ../vendor/amber/bin/amberc -v
> st/Kit-Tests.st
> Checking: st/Kit-Tests.st
> Resolving: boot.js
> Resolving: smalltalk.js
> Resolving: nil.js
> Resolving: _st.js
> Resolving: Kernel-Objects.js
> Resolving: Kernel-Classes.js
> Resolving: Kernel-Methods.js
> Resolving: Kernel-Collections.js
> Resolving: Kernel-Infrastructure.js
> Resolving: Kernel-Exceptions.js
> Resolving: Kernel-Transcript.js
> Resolving: Kernel-Announcements.js
> Resolving: boot.js
> Resolving: smalltalk.js
> Resolving: nil.js
> Resolving: _st.js
> Res
olving: Kernel-Objects.js

> Resolving: Kernel-Classes.js
> Resolving: Kernel-Methods.js
> Resolving: Kernel-Collections.js
> Resolving: Kernel-Infrastructure.js
> Resolving: Kernel-Exceptions.js
> Resolving: Kernel-Transcript.js
> Resolving: Kernel-Announcements.js
> Resolving: parser.js
> Resolving: Importer-Exporter.js
> Resolving: Compiler-Exceptions.js
> Resolving: Compiler-Core.js
> Resolving: Compiler-AST.js
> Resolving: Compiler-Exceptions.js
> Resolving: Compiler-IR.js
> Resolving: Compiler-Inlining.js
> Resolving: Compiler-Semantic.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/support/boot.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/support/smalltalk.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/support/nil.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/support/_st.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/ambe
r/js/Kernel-Objects.js

> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Classes.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Methods.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Collections.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Infrastructure.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Exceptions.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Transcript.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Kernel-Announcements.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/support/parser.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Importer-Exporter.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Co
mpiler-Exceptions.js

> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Compiler-Core.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Compiler-AST.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Compiler-Exceptions.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Compiler-IR.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Compiler-Inlining.js
> Loading file:
> /Users/dmason/hg/ProgrammingForTheRestOfUs/vendor/amber/js/Compiler-Semantic.js
> Compiler loaded
> Compiling collected .st files
> Importing: st/Kit-Tests.st
> Smalltalk >> createPackage:properties: is deprecated! (in a block (in
> DoIt >> xxxDoIt))
> Importer >> import:
> BlockClosure >> whileFalse:
> BlockClosure >> value
> a block (in Importer >> import:)
> Compiler >> evaluateExpression:
> Compiler >> evaluateExpression:on:
> DoIt >> xxxDoIt
> BlockClosure >
> value
> a block (in DoIt >> xxxDoIt)
> UndefinedObject >> subclass:instanceVariableNames:package:
> ClassBuilder >> superclass:subclass:instanceVariableNames:package:
> ClassBuilder >> addSubclassOf:named:instanceVariableNames:package:
> ClassBuilder >> basicAddSubclassOf:named:instanceVariableNames:package:
> JavaScript exception: TypeError: Cannot read property 'fn' of null
>
> undefined:29438
> throw anError;
>       ^
> Error:
>
> --
> 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 [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Dave Mason-3
Sorry, the previous 2 outputs were of slightly different runs.  When I run

: ~/hg/ProgrammingForTheRestOfUs/kit ; ../vendor/amber/bin/amberc -v st/Kit.st 
Checking: st/Kit.st
Resolving: boot.js
[...many more lines...]
a block (in SemanticAnalyzer >> visitAll:)
SemanticAnalyzer >> visit:
VariableNode >> accept:
SemanticAnalyzer >> visitVariableNode:
SemanticAnalyzer >> errorUnknownVariable:
Unknown Variable error: cursorPrev is not defined

undefined:29438
throw anError;
      ^
Error: 

I see the error cursorPrev not defined, but when I run it without -v, it doesn't tell me that:

: ~/hg/ProgrammingForTheRestOfUs/kit ; ../vendor/amber/bin/amberc st/Kit.st 
Importing: st/Kit.st
Smalltalk >> createPackage:properties: is deprecated! (in a block (in DoIt >> xxxDoIt))

undefined:29438
throw anError;
      ^
Error: 

Which looks like a bug.... surely that error should have been reported.

But I am understanding this a bit better now....  So I fixed the offending assignment to a non-existent instance variable and now get (after much trace info):

Parse error on line 5 column 5 : Unexpected character <

but this can't be referring to the 5th line of the file, which starts:
-----
Smalltalk current createPackage: 'Kit'!
Object subclass: #Kit
instanceVariableNames: 'node id'
package: 'Kit'!

!Kit methodsFor: 'not yet classified'!
-----
I have a depressing number of tiny Javascript methods like:
-----
callbackNumber: value
<var result = new Number(value);
    result.kitCallback = self;
    return result>
!
-----
But none of them are javascript in the middle of smalltalk (as originally accepted), so I can't see how that's a problem.  I do use lessthan in a few other methods, like:
-----
initTabsIn: in out: out
[in < inTabs size] whileTrue: [
self removeInTab: (self removeablePipe: inTabs)
].
-----
but presumably that's OK.

So I'm stumped.... any help appreciated.  Is there a new way to specify Javascript methods that I missed?

Thanks  ../Dave

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Nicolas Petton
Would you agree to send me the .st file so that I can take a look?

Cheers,
Nico

Dave Mason <[hidden email]> writes:

> Sorry, the previous 2 outputs were of slightly different runs.  When I run
>
> : ~/hg/ProgrammingForTheRestOfUs/kit ; ../vendor/amber/bin/amberc -v
> st/Kit.st
> Checking: st/Kit.st
> Resolving: boot.js
> [...many more lines...]
> a block (in SemanticAnalyzer >> visitAll:)
> SemanticAnalyzer >> visit:
> VariableNode >> accept:
> SemanticAnalyzer >> visitVariableNode:
> SemanticAnalyzer >> errorUnknownVariable:
> Unknown Variable error: cursorPrev is not defined
>
> undefined:29438
> throw anError;
>       ^
> Error:
>
> I see the error cursorPrev not defined, but when I run it without -v, it
> doesn't tell me that:
>
> : ~/hg/ProgrammingForTheRestOfUs/kit ; ../vendor/amber/bin/amberc st/Kit.st
> Importing: st/Kit.st
> Smalltalk >> createPackage:properties: is deprecated! (in a block (in DoIt
>>> xxxDoIt))
>
> undefined:29438
> throw anError;
>       ^
> Error:
>
> Which looks like a bug.... surely that error should have been reported.
>
> But I am understanding this a bit better now....  So I fixed the offending
> assignment to a non-existent instance variable and now get (after much
> trace info):
>
> Parse error on line 5 column 5 : Unexpected character <
>
> but this can't be referring to the 5th line of the file, which starts:
> -----
> Smalltalk current createPackage: 'Kit'!
> Object subclass: #Kit
> instanceVariableNames: 'node id'
> package: 'Kit'!
>
> !Kit methodsFor: 'not yet classified'!
> -----
> I have a depressing number of tiny Javascript methods like:
> -----
> callbackNumber: value
> <var result = new Number(value);
>     result.kitCallback = self;
>     return result>
> !
> -----
> But none of them are javascript in the middle of smalltalk (as originally
> accepted), so I can't see how that's a problem.  I do use lessthan in a few
> other methods, like:
> -----
> initTabsIn: in out: out
> [in < inTabs size] whileTrue: [
> self removeInTab: (self removeablePipe: inTabs)
> ].
> -----
> but presumably that's OK.
>
> So I'm stumped.... any help appreciated.  Is there a new way to specify
> Javascript methods that I missed?
>
> Thanks  ../Dave
>
> --
> 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 [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.

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

--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: require(["amber/deploy"], function(smalltalk) { smalltalk.initialize(); } );

Dave Mason-3
I sent this to Nico a few days ago, but I'm getting kind of desperate, so I am hoping somebody else can see something I'm doing wrong.  I'd happily debug myself, but all I get from amberc (with trace turned on) is (after much trace info):

Parse error on line 5 column 5 : Unexpected character <

but this can't be referring to the 5th line of the file, which starts:
-----
Smalltalk current createPackage: 'Kit'!
Object subclass: #Kit
instanceVariableNames: 'node id'
package: 'Kit'!

!Kit methodsFor: 'not yet classified'!
-----

(I gave more context in an email to the list on Sept 25.)

Any help much appreciated.

../Dave

On Thu, Sep 26, 2013 at 1:07 PM, Dave Mason <[hidden email]> wrote:
Hi Nico,

I'm just sending this to you at this point.  This is all open-source at some point, but not public in its current state.
This *shouldn't* need any external libraries, outside of the amber kernel.

Thanks for looking at it!.


--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

Kit.st (105K) Download Attachment
12