Abosule Beginner guide to Learn Amber-lang

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

Abosule Beginner guide to Learn Amber-lang

aria2end
Hello good people 

I am an undergraduate student majoring in software engineering and I am taking this final year project which is about making a Lists Of Lists with amber .
I am an absolute beginner to amber and I have no knowledge of small talk language .Currently I'm very lost and confused but I'm considering to learn Smalltalk using Pharo and then move on to amber and get it done but I am not sure if this is the right approach to it,
so I really appreciate if you guys can suggest to me where to start or what to learn first or if there are any good learning materials for me to start with it . I appreciate all the help . 


--
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: Abosule Beginner guide to Learn Amber-lang

Nicolas Petton
Hi!

I would indeed encourage you to first learn some Smalltalk with
Pharo. The "Pharo by Example" book[1] can help you, it's pretty good for
beginners and it's free.

Amber is not fully compatible with Pharo, but pretty close.

Cheers,
Nico

[1] http://pharobyexample.org

Aria . Ak <[hidden email]> writes:

> Hello good people
>
> I am an undergraduate student majoring in software engineering and I am
> taking this final year project which is about making a Lists Of Lists with
> amber .
> I am an absolute beginner to amber and I have no knowledge of small talk
> language .Currently I'm very lost and confused but I'm considering to learn
> Smalltalk using Pharo and then move on to amber and get it done but I am
> not sure if this is the right approach to it,
> so I really appreciate if you guys can suggest to me where to start or what
> to learn first or if there are any good learning materials for me to start
> with it . I appreciate all the help .

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

Re: Abosule Beginner guide to Learn Amber-lang

aria2end
In reply to this post by aria2end
Hello :)

I think I found a bug but unfortunately I can't reproduce it and I'm not really sure if it is really a bug.

I moved a Class from one package to another and suddenly after that I could not load Helios nor legacy browser. I started a new fresh project and I recreated my application but the same thing happened after I moved a method to another protocol.

I guess it was because I was using an unstable version of amber 0.13.0 pre, so I tried to change to a stable version using the command:

' npm -g install amber-cli@~0.12.0 '

But it didn't change the version. I uninstalled the amber and re-installed it and now the amber version is 0.13.0 ( I'm not sure if this is stable or not ) and it seems a lot has changed since the last version.

Now I don't want to re-create my application again since it is very large and I'm looking for a way to import my .st files. I check the amber wiki and I understood  that I have to use 'amberc' command to compile my .st files into .js files but I don't know where to put it and how to load it back to the class browser. I tried to put them in the 'src' directory and reference the it in the devel.js file but it doesn't work. How can I import my files ?

Many thanks,
Aria
Reply | Threaded
Open this post in threaded view
|

Re: Abosule Beginner guide to Learn Amber-lang

aria2end
In reply to this post by aria2end
In the previous versions I could create a button in the main index.html file to open another .html file located in a sub directory. All I had to do was to reference .js files, the same way that Helios button used to work.
 
Using the new version I can't do that. I reference 'the.js' file in the new .html file but it does not load amber in the new page. I looked at the new Helios index.html file but it is very complicated for me to understand. What can I do about it ?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Abosule Beginner guide to Learn Amber-lang

Hannes Hirzel
Aria,

I think it would help if you could do a mock set which exemplifies
your question.

Fork https://github.com/amber-smalltalk/amber-examples and do your
mock set up in a subdirectory. Or create a sample repo from scratch.

The Amber version 13 examples will all be self contained in subdirectories.

I just finished moving the presentation example to version 13
https://github.com/amber-smalltalk/amber-examples/tree/issue55-presentation-6th

You find a detailed log how it was done.

     https://github.com/amber-smalltalk/amber-examples/issues/55

The 6th attempt gives a log of the activities.

It shows how the Presentation.st file was moved from 0.12 to 0.13. In
this case nothing had to be changed to the Presentation.st file. No
import. It just recompiled fine.

HTH

--Hannes

On 10/31/14, aria2end <[hidden email]> wrote:

> In the previous versions I could create a button in the main index.html
> file
> to open another .html file located in a sub directory. All I had to do was
> to reference .js files, the same way that Helios button used to work.
>
> Using the new version I can't do that. I reference 'the.js' file in the new
> .html file but it does not load amber in the new page. I looked at the new
> Helios index.html file but it is very complicated for me to understand.
> What
> can I do about it ?
>
> Thanks
>
>
>
> --
> View this message in context:
> http://forum.world.st/Abosule-Beginner-guide-to-Learn-Amber-lang-tp4760477p4787746.html
> Sent from the Amber Smalltalk mailing list archive at Nabble.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 [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.
Reply | Threaded
Open this post in threaded view
|

Re: Abosule Beginner guide to Learn Amber-lang

Herby Vojčík
In reply to this post by aria2end
https://github.com/amber-smalltalk/amber/issues/1105

aria2end wrote:

> In the previous versions I could create a button in the main index.html file
> to open another .html file located in a sub directory. All I had to do was
> to reference .js files, the same way that Helios button used to work.
>
> Using the new version I can't do that. I reference 'the.js' file in the new
> .html file but it does not load amber in the new page. I looked at the new
> Helios index.html file but it is very complicated for me to understand. What
> can I do about it ?
>
> Thanks
>
>
>
> --
> View this message in context: http://forum.world.st/Abosule-Beginner-guide-to-Learn-Amber-lang-tp4760477p4787746.html
> Sent from the Amber Smalltalk mailing list archive at Nabble.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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Abosule Beginner guide to Learn Amber-lang

Herby Vojčík
In reply to this post by aria2end


aria2end wrote:
> Hello :)
>
> I guess it was because I was using an unstable version of amber 0.13.0 pre,
> so I tried to change to a stable version using the command:
>
> ' npm -g install amber-cli@~0.12.0'
>
> But it didn't change the version. I uninstalled the amber and re-installed

Of course. It only reinstall the global (-g) cli tool for amber (the one
that is started when you type 'amber init' or 'amber serve'). I'd
suggest to reinstall the latest one back with 'npm -g install amber-cli'.

> it and now the amber version is 0.13.0 ( I'm not sure if this is stable or
> not ) and it seems a lot has changed since the last version.

With semver you always know which version is stable. x.y.z is stable and
x.y.z-w is not.

--
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: Abosule Beginner guide to Learn Amber-lang

Herby Vojčík
In reply to this post by aria2end


aria2end wrote:
> In the previous versions I could create a button in the main index.html file
> to open another .html file located in a sub directory. All I had to do was
> to reference .js files, the same way that Helios button used to work.
>
> Using the new version I can't do that. I reference 'the.js' file in the new
> .html file but it does not load amber in the new page. I looked at the new

Try to add

   <script>
     var require = {baseUrl: '..'}; // or more if it's deeper
   </script>

before loading the.js.

If it works, report it back directly to a github issue.

--
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: Abosule Beginner guide to Learn Amber-lang

aria2end
Herby,

I didn't know about Semantic Versioning. It's really cool.

I added your suggested script tag before loading 'the.js' and it didn't fix it.

Thanks,
Aria
Reply | Threaded
Open this post in threaded view
|

Re: Abosule Beginner guide to Learn Amber-lang

aria2end
In reply to this post by Hannes Hirzel
Hannes,

I studied presentation example and it was really helpful and it gave me all the clues that I needed.  Thank You :)

I figured out that all I have to do is to move my .st files into 'src' folder and then add their location address to the 'all:' section in the  'Gruntfile.js'  file and then use the 'grunt' commend to recompile my files into JavaScript files with the correct namespace. And of course, I have to add them to 'devel.js' to make them visible in the class browser and TA-DA, my classes are back.

Cheers,
Aria
Reply | Threaded
Open this post in threaded view
|

Re: Abosule Beginner guide to Learn Amber-lang

Herby Vojčík
In reply to this post by aria2end
A little mistake. Your code packages should be listed in deploy.js, not in devel.is. In devel.is only pacakes with tests should be.

aria2end <[hidden email]>napísal/a:

>Hannes,
>
>I studied presentation example and it was really helpful and it gave me all
>the clues that I needed.  Thank You :)
>
>I figured out that all I have to do is to move my .st files into 'src'
>folder and then add their location address to the 'all:' section in the
>'Gruntfile.js'  file and then use the 'grunt' commend to recompile my files
>into JavaScript files with the correct namespace. And of course, I have to
>add them to 'devel.js' to make them visible in the class browser and TA-DA,
>my classes are back.
>
>Cheers,
>Aria
>
>
>
>--
>View this message in context: http://forum.world.st/Abosule-Beginner-guide-to-Learn-Amber-lang-tp4760477p4788048.html
>Sent from the Amber Smalltalk mailing list archive at Nabble.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 [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.
Reply | Threaded
Open this post in threaded view
|

Re: Abosule Beginner guide to Learn Amber-lang

Herby Vojčík
In reply to this post by aria2end
Re: loading from subdirectory .html

> I added your suggested script tag before loading 'the.js' and it didn't fix
> it.

I just tried and it works for me. Look in (already closed, as it works)
https://github.com/amber-smalltalk/amber/issues/1105 for complete head
section of a working example.

--
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.