Compiling Hello.st with amberc on the command line

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

Re: Compiling Hello.st with amberc on the command line

Herby Vojčík
I don't know which it may be, but there is some problem while chunk format is read, so maybe missing / extraneous '!' somewhere...

Do you have amberc itself (that is, global amber-cli package) reasonably current?

H. Hirzel wrote:

> Hello
>
> this is a retest of a hello world program on the command line
>
> RESULT: It compiles with an error
>
> QUESTION: What is the cause of this?
>
>
>       amber version
>
> gives
>
>       Welcome to Amber version 0.13.0-pre (NodeJS 0.10.25).
>
>
> ------------------------------------------------
> Smalltalk file: HelloFromAmber.st
> ------------------------------------------------
>
> Object subclass: #HelloFromAmber
>          instanceVariableNames: ''
>          package: 'Hello'!
>
> !HelloFromAmber class methodsFor: 'main'!
>
> main
>
> | fs |
>
> console log: '...write a file'.
>
> fs := require value: 'fs'.
>
>
> fs writeFileSync: 'message.txt' content: 'Hello from Amber'
>     errFn: [ theErr | "process theErr"
>                  
    console log: 'there was an error writing the file'].

>
>
> It compiles with an error
>
> hhzl@hhzl-Latitude-E6400 ~/Documents $ amberc -m HelloFromAmber
> HelloFromAmber.st theCompiledProg
> Reading: HelloFromAmber.st
> [Error: Compiler error in section:
> HelloFromAmber class methodsFor: 'main'
>
> while processing chunk:
> [object Object]
>
> nil does not understand #isEmpty]
>
>
> Regards
>
> Hannes
>
> On 4/24/14, H. Hirzel<[hidden email]>  wrote:
>> Redid a test
>>
>>      mkdir test
>>      cd test
>>      bower cache clean
>>      bower install git://github.com/amber-smalltalk/amber.git
>>      gedit  bower_components/amber/src/Compiler-Exceptions.st
>>
>> find
>>      RethrowErrorHandler
>>
>>
>> handleError: anError
>>          super handleError: anError.
>>          self basicSignal: anError
>>
>> Which is supposed to be still the 12.04 version as Sean wrote.
>>
>> However at the moment this is not such much an issue anymore because
>> with the instruct
ions Sean sent for the cli version I could update the

>> cli version and the error it reports if fine.
>>
>> Later I will send a summary of the whole thread
>>
>> - Test code
>> - Issues which are still open.
>>
>> --Hannes
>>
>>
>> On 4/24/14, Herby Vojčík<[hidden email]>  wrote:
>>>
>>> "H. Hirzel"<[hidden email]>napísal/a:
>>>
>>> Retesting ....
>>>
>>>
>>> And Herby's suggestion to go without #master
>>>
>>>   bower install git://github.com/amber-smalltalk/amber.git
>>>
>>> does not bring the correct version.
>>>
>>> Did you uninstall it before?
>>>

--
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/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Compiling Hello.st with amberc on the command line

Hannes Hirzel
It was with the most recent amber.

But let's focus on issue
https://github.com/amber-smalltalk/amber-examples/issues/48 for the
moment.

--Hannes

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

> I don't know which it may be, but there is some problem while chunk format
> is read, so maybe missing / extraneous '!' somewhere...
>
> Do you have amberc itself (that is, global amber-cli package) reasonably
> current?
>
> H. Hirzel wrote:
>> Hello
>>
>> this is a retest of a hello world program on the command line
>>
>> RESULT: It compiles with an error
>>
>> QUESTION: What is the cause of this?
>>
>>
>>       amber version
>>
>> gives
>>
>>       Welcome to Amber version 0.13.0-pre (NodeJS 0.10.25).
>>
>>
>> ------------------------------------------------
>> Smalltalk file: HelloFromAmber.st
>> ------------------------------------------------
>>
>> Object subclass: #HelloFromAmber
>>          instanceVariableNames: ''
>>          package: 'Hello'!
>>
>> !HelloFromAmber class methodsFor: 'main'!
>>
>> main
>>
>> | fs |
>>
>> console log: '...write a file'.
>>
>> fs := require value: 'fs'.
>>
>>
>> fs writeFileSync: 'message.txt' content: 'Hello from Amber'
>>     errFn: [ theErr | "process theErr"
>>
>     console log: 'there was an error writing the file'].
>>
>>
>> It compiles with an error
>>
>> hhzl@hhzl-Latitude-E6400 ~/Documents $ amberc -m HelloFromAmber
>> HelloFromAmber.st theCompiledProg
>> Reading: HelloFromAmber.st
>> [Error: Compiler error in section:
>> HelloFromAmber class methodsFor: 'main'
>>
>> while processing chunk:
>> [object Object]
>>
>> nil does not understand #isEmpty]
>>
>>
>> Regards
>>
>> Hannes
>>
>> On 4/24/14, H. Hirzel<[hidden email]>  wrote:
>>> Redid a test
>>>
>>>      mkdir test
>>>      cd test
>>>      bower cache clean
>>>      bower install git://github.com/amber-smalltalk/amber.git
>>>      gedit  bower_components/amber/src/Compiler-Exceptions.st
>>>
>>> find
>>>      RethrowErrorHandler
>>>
>>>
>>> handleError: anError
>>>          super handleError: anError.
>>>          self basicSignal: anError
>>>
>>> Which is supposed to be still the 12.04 version as Sean wrote.
>>>
>>> However at the moment this is not such much an issue anymore because
>>> with the instruct
> ions Sean sent for the cli version I could update the
>>> cli version and the error it reports if fine.
>>>
>>> Later I will send a summary of the whole thread
>>>
>>> - Test code
>>> - Issues which are still open.
>>>
>>> --Hannes
>>>
>>>
>>> On 4/24/14, Herby Vojčík<[hidden email]>  wrote:
>>>>
>>>> "H. Hirzel"<[hidden email]>napísal/a:
>>>>
>>>> Retesting ....
>>>>
>>>>
>>>> And Herby's suggestion to go without #master
>>>>
>>>>   bower install git://github.com/amber-smalltalk/amber.git
>>>>
>>>> does not bring the correct version.
>>>>
>>>> Did you uninstall it before?
>>>>
>
> --
> 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/d/optout.
>

--
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/d/optout.
12