Ludus in the current amber > compilation issue

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

Re: Ludus in the current amber > compilation issue

Hannes Hirzel
Bernat,

thank you for the clarifictation which helped to better understand it.
See my comments below

--Hannes

On 4/16/14, Bernat Romagosa <[hidden email]> wrote:

> I really should take a deeper look at my old code, but the idea is:
>
> ((keys at: aKeyCode ifAbsent: [ false ]) and: [ keys at: aKeyCode
> ])ifTrue: aBlock
>
> If the keys dictionary doesn't have an entry for this key in it, evaluate
> to false. Otherwise evaluate to its value. Then, if the previous evaluated
> to true, execute aBlock.
>
> Without having looked at it, I'm guessing the error may come from keys not
> being a Dictionary. Back in the day, Amber had a unique way to create
> dictionaries on the fly, but I think it's not there anymore, am I right?
>

Yes.

....

>>
>> The code:
>>
>> whileKeyPressed: aKeyCode do: aBlock
>>         ( ( keys at: aKeyCode ifAbsent: [ false ] ) and: [ keys at:
>> aKeyCode
>> ] ) ifTrue: aBlock
>>
...

>> > 2014-04-16 17:50 GMT+02:00 Bernat Romagosa
>> > <[hidden email]>:
....
>> >> In many game frameworks you use an array to store the state of keys,
>> >> instead of doing polling or interruptions. When the key is pressed,
>> >> you
>> >> reflect it in the array.

In which method do you get the state of the key in store it in the keys array?
I did not find it yet.

>> >> So, this array (if I remember well) is actually a dictionary that'll
>> >> contain the state of a key once it's pressed.

OK

>> >> (you may wanna take a look at the class Key as well)
Done,  it implements key look up on the class side (#methodName -> keycode)
e.g

rightArrow
        ^ 39

It does not answer the question where the keyboard state is read and
stored in the keys array, if this is what is supposed to go on.

>> >> Cheers!
>> >> Bernat.


>> >> 2014-04-16 14:02 GMT+02:00 H. Hirzel <[hidden email]>:
>> >>
>> >> The keys instance variable (class Game) is initialized to
>> >>>     keys := #().
>> >>>

Sebastian and Philippe fixed the initialization code in class Game to

initialize
        super initialize.
        fps := 30.
        self keys. " and not keys := #()."
        sounds := #().
        mouseDown := false.
        step := 1.

And Game>>keys is

keys
        ^ keys ifNil: [keys := Array new. 255 timesRepeat: [keys add: false]. keys]


This fixes the problem in Sokoban.

--
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: Ludus in the current amber > compilation issue

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


"H. Hirzel" <[hidden email]>napísal/a:

Bernat,

thank you for the clarifictation which helped to better understand it.
See my comments below

--Hannes

On 4/16/14, Bernat Romagosa <[hidden email]> wrote:

> I really should take a deeper look at my old code, but the idea is:
>
> ((keys at: aKeyCode ifAbsent: [ false ]) and: [ keys at: aKeyCode
> ])ifTrue: aBlock
>
> If the keys dictionary doesn't have an entry for this key in it, evaluate
> to false. Otherwise evaluate to its value. Then, if the previous evaluated
> to true, execute aBlock.
>
> Without having looked at it, I'm guessing the error may come from keys not
> being a Dictionary. Back in the day, Amber had a unique way to create
> dictionaries on the fly, but I think it's not there anymore, am I right?
>

Yes.

Well, I don't know what way are you tslking about hete, but the #{ assoc. assoc. ... } still works. AFAIK it never created Dictionaries, but HashedCollections (which only can have strings as keys).

....

>>
>> The code:
>>
>> whileKeyPressed: aKeyCode do: aBlock
>>         ( ( keys at: aKeyCode ifAbsent: [ false ] ) and: [ keys at:
>> aKeyCode
>> ] ) ifTrue: aBlock
>>
...

>> > 2014-04-16 17:50 GMT+02:00 Bernat Romagosa
>> > <[hidden email]>:
....
>> >> In many game frameworks you use an array to store the state of keys,
>> >> instead of doing polling or interruptions. When the key is pressed,
>> >> you
>> >> reflect it in the array.

In which method do you get the state of the key in store it in the keys array?
I did not find it yet.

>> >> So, this array (if I remember well) is actually a dictionary that'll
>> >> contain the state of a key once it's pressed.

OK

>> >> (you may wanna take a look at the class Key as well)
Done,  it implements key look up on the class side (#methodName -> keycode)
e.g

rightArrow
        ^ 39

It does not answer the question where the keyboard state is read and
stored in the keys array, if this is what is supposed to go on.

>> >> Cheers!
>> >> Bernat.


>> >> 2014-04-16 14:02 GMT+02:00 H. Hirzel <[hidden email]>:
>> >>
>> >> The keys instance variable (class Game) is initialized to
>> >>>     keys := #().
>> >>>

Sebastian and Philippe fixed the initialization code in class Game to

initialize
        super initialize.
        fps := 30.
        self keys. " and not keys := #()."
        sounds := #().
        mouseDown := false.
        step := 1.

And Game>>keys is

keys
        ^ keys ifNil: [keys := Array new. 255 timesRepeat: [keys add: false]. keys]


This fixes the problem in Sokoban.

--
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: Ludus in the current amber > compilation issue

Nicolas Petton

Herby Vojčík writes:

>
> Well, I don't know what way are you tslking about hete, but the #{
> assoc. assoc. ... } still works. AFAIK it never created Dictionaries,
> but HashedCollections (which only can have strings as keys).

Indeed, they create HashedCollections. Note that due to a bug in the
parser, these literals cannot contain a final dot:

#{ 'hello' -> 1. 'world' -> 2 } will work but not
#{ 'hello' -> 1. 'world' -> 2. }

Cheers,
Nico

>
> ....
>
>>>
>>> The code:
>>>
>>> whileKeyPressed: aKeyCode do: aBlock
>>>         ( ( keys at: aKeyCode ifAbsent: [ false ] ) and: [ keys at:
>>> aKeyCode
>>> ] ) ifTrue: aBlock
>>>
> ...
>
>>> > 2014-04-16 17:50 GMT+02:00 Bernat Romagosa
>>> > <[hidden email]>:
> ....
>>> >> In many game frameworks you use an array to store the state of keys,
>>> >> instead of doing polling or interruptions. When the key is pressed,
>>> >> you
>>> >> reflect it in the array.
>
> In which method do you get the state of the key in store it in the keys array?
> I did not find it yet.
>
>>> >> So, this array (if I remember well) is actually a dictionary that'll
>>> >> contain the state of a key once it's pressed.
>
> OK
>
>>> >> (you may wanna take a look at the class Key as well)
> Done,  it implements key look up on the class side (#methodName -> keycode)
> e.g
>
> rightArrow
> ^ 39
>
> It does not answer the question where the keyboard state is read and
> stored in the keys array, if this is what is supposed to go on.
>
>>> >> Cheers!
>>> >> Bernat.
>
>
>>> >> 2014-04-16 14:02 GMT+02:00 H. Hirzel <[hidden email]>:
>>> >>
>>> >> The keys instance variable (class Game) is initialized to
>>> >>>     keys := #().
>>> >>>
>
> Sebastian and Philippe fixed the initialization code in class Game to
>
> initialize
> super initialize.
> fps := 30.
> self keys. " and not keys := #()."
> sounds := #().
> mouseDown := false.
> step := 1.
>
> And Game>>keys is
>
> keys
> ^ keys ifNil: [keys := Array new. 255 timesRepeat: [keys add: false]. keys]
>
>
> This fixes the problem in Sokoban.
>
> --
> 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.


--
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: Ludus in the current amber > compilation issue

sebastianconcept

On Apr 19, 2014, at 9:38 AM, Nicolas Petton <[hidden email]> wrote:

Indeed, they create HashedCollections. Note that due to a bug in the
parser, these literals cannot contain a final dot:

#{ 'hello' -> 1. 'world' -> 2 } will work but not
#{ 'hello' -> 1. 'world' -> 2. }

Cheers,
Nico

speaking of hashed collections...

Why this doesn't give you an array of hashed collections?

#(
#{'x' -> 0. 'y' -> 50}
#{'x' -> 50. 'y'-> 50}
#{'x' -> 50. 'y' -> 0}
#{'x' -> 0. 'y'-> 0}
)



--
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: Ludus in the current amber > compilation issue

Herby Vojčík
In reply to this post by philippeback
For the same readon why #( {1. 2} {'foo'. 'bar'} ) does not give you the array of arrays. #() is literal array, and can contain only things known at compile-time. #{} and {} are runtime structures, which contain expressions evaluated at runtime.

Tldr: enclose them in {} instead.

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


On Apr 19, 2014, at 9:38 AM, Nicolas Petton <[hidden email]> wrote:

Indeed, they create HashedCollections. Note that due to a bug in the
parser, these literals cannot contain a final dot:

#{ 'hello' -> 1. 'world' -> 2 } will work but not
#{ 'hello' -> 1. 'world' -> 2. }

Cheers,
Nico

speaking of hashed collections...

Why this doesn't give you an array of hashed collections?

#(
#{'x' -> 0. 'y' -> 50}
#{'x' -> 50. 'y'-> 50}
#{'x' -> 50. 'y' -> 0}
#{'x' -> 0. 'y'-> 0}
)



--
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: Ludus in the current amber > compilation issue

sebastianconcept

On Apr 19, 2014, at 11:39 AM, Herby Vojčík <[hidden email]> wrote:

Tldr: enclose them in {} instead.

{
        #{'x' -> 0. 'y' -> 50}
        #{'x' -> 50. 'y'-> 50}
        #{'x' -> 50. 'y' -> 0}
        #{'x' -> 0. 'y'-> 0}
    }    nil 
Parse error on line 3 column 9 : Unexpected character #


#{
        #{'x' -> 0. 'y' -> 50}
        #{'x' -> 50. 'y'-> 50}
        #{'x' -> 50. 'y' -> 0}
        #{'x' -> 0. 'y'-> 0}
    }     nil 
Parse error on line undefined column undefined : Unexpected character undefined



#{
        #{'x' -> 0. 'y' -> 50}.
        #{'x' -> 50. 'y'-> 50}.
        #{'x' -> 50. 'y' -> 0}.
        #{'x' -> 0. 'y'-> 0}
    }     nil 
Parse error on line undefined column undefined : Unexpected character undefined



#{
        {'x' -> 0. 'y' -> 50}.
        {'x' -> 50. 'y'-> 50}.
        {'x' -> 50. 'y' -> 0}.
        {'x' -> 0. 'y'-> 0}
    }      nil 
Parse error on line undefined column undefined : Unexpected character undefined


There is a point in which things are easier in javascript.

We need to think on that

--
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: Ludus in the current amber > compilation issue

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


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


On Apr 19, 2014, at 11:39 AM, Herby Vojčík <[hidden email]> wrote:

Tldr: enclose them in {} instead.

{
        #{'x' -> 0. 'y' -> 50}
        #{'x' -> 50. 'y'-> 50}
        #{'x' -> 50. 'y' -> 0}
        #{'x' -> 0. 'y'-> 0}
    }    nil
Parse error on line 3 column 9 : Unexpected character #

Well and of course delimite them with dot. IOW use the good old Squeak and Pharo runtime-array form { expr. expr. ... }, which works in Amber as well.

--
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: Ludus in the current amber > compilation issue

Hannes Hirzel
Yes, this works fine.

{
        #{'x' -> 0. 'y' -> 50}.
        #{'x' -> 50. 'y'-> 50}.
        #{'x' -> 50. 'y' -> 0}.
        #{'x' -> 0. 'y'-> 0}      "<<< no dot here"
    }

an Array (a HashedCollection ('x' -> 0 , 'y' -> 50) a HashedCollection
('x' -> 50 , 'y' -> 50) a HashedCollection ('x' -> 50 , 'y' -> 0) a
HashedCollection ('x' -> 0 , 'y' -> 0))

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

>
>
> sebastian <[hidden email]>napísal/a:
>
>
> On Apr 19, 2014, at 11:39 AM, Herby Vojčík <[hidden email]> wrote:
>
> Tldr: enclose them in {} instead.
>
> {
>         #{'x' -> 0. 'y' -> 50}
>         #{'x' -> 50. 'y'-> 50}
>         #{'x' -> 50. 'y' -> 0}
>         #{'x' -> 0. 'y'-> 0}
>     }    nil
> Parse error on line 3 column 9 : Unexpected character #
>
> Well and of course delimite them with dot. IOW use the good old Squeak and
> Pharo runtime-array form { expr. expr. ... }, which works in Amber as well.
>
> --
> 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: Ludus in the current amber > compilation issue

Bernat Romagosa
I was just checking, you didn't clone my Ludus branch, did you?

No big deal, but it now looks as if the project wasn't even started by me :P


2014-04-22 9:19 GMT+02:00 H. Hirzel <[hidden email]>:
Yes, this works fine.

{
        #{'x' -> 0. 'y' -> 50}.
        #{'x' -> 50. 'y'-> 50}.
        #{'x' -> 50. 'y' -> 0}.
        #{'x' -> 0. 'y'-> 0}      "<<< no dot here"
    }

an Array (a HashedCollection ('x' -> 0 , 'y' -> 50) a HashedCollection
('x' -> 50 , 'y' -> 50) a HashedCollection ('x' -> 50 , 'y' -> 0) a
HashedCollection ('x' -> 0 , 'y' -> 0))

On 4/19/14, Herby Vojčík <[hidden email]> wrote:
>
>
> sebastian <[hidden email]>napísal/a:
>
>
> On Apr 19, 2014, at 11:39 AM, Herby Vojčík <[hidden email]> wrote:
>
> Tldr: enclose them in {} instead.
>
> {
>         #{'x' -> 0. 'y' -> 50}
>         #{'x' -> 50. 'y'-> 50}
>         #{'x' -> 50. 'y' -> 0}
>         #{'x' -> 0. 'y'-> 0}
>     }    nil
> Parse error on line 3 column 9 : Unexpected character #
>
> Well and of course delimite them with dot. IOW use the good old Squeak and
> Pharo runtime-array form { expr. expr. ... }, which works in Amber as well.
>
> --
> 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.



--
Bernat Romagosa.

--
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: Ludus in the current amber > compilation issue

Hannes Hirzel
Bernat,

No it seems that Phil just copied part of Ludus and used the new amber
init function. However the bower_components were commited as well
which should not have been the case with the new system.

And it seems that he forgot to refer to the original which should have
happended. Sorry.

As Amber installation and setup with 0.12.n has changed considerably I
suggest that you start a new Github Ludus project with a  .gitignore
file with the content

    bower_components

This excludes the bower_components directory from inclusion into the
Ludus github project.

Then do

    amber init.

And then copy the changes made here
https://github.com/philippeback/Ludus and commit your project. The
bower_components directory will not be stored on github. They are
referred to in bower.json

So the project actually should only contain the Ludus st and js files
and the documentation and some setup files.

A user then will fork your Ludus and do

   git clone https://github.com/myGitIDj/Ludus

   cd Ludus

   bower install

   amber serve

This assumes that amber-cli has been installed before with

   sudo npm install -g amber-cli

or

   npm install -g amber-cli

--Hannes

On 4/22/14, Bernat Romagosa <[hidden email]> wrote:

> I was just checking, you didn't clone my Ludus branch, did you?
>
> No big deal, but it now looks as if the project wasn't even started by me
> :P
>
>
> 2014-04-22 9:19 GMT+02:00 H. Hirzel <[hidden email]>:
>
>> Yes, this works fine.
>>
>> {
>>         #{'x' -> 0. 'y' -> 50}.
>>         #{'x' -> 50. 'y'-> 50}.
>>         #{'x' -> 50. 'y' -> 0}.
>>         #{'x' -> 0. 'y'-> 0}      "<<< no dot here"
>>     }
>>
>> an Array (a HashedCollection ('x' -> 0 , 'y' -> 50) a HashedCollection
>> ('x' -> 50 , 'y' -> 50) a HashedCollection ('x' -> 50 , 'y' -> 0) a
>> HashedCollection ('x' -> 0 , 'y' -> 0))
>>
>> On 4/19/14, Herby Vojčík <[hidden email]> wrote:
>> >
>> >
>> > sebastian <[hidden email]>napísal/a:
>> >
>> >
>> > On Apr 19, 2014, at 11:39 AM, Herby Vojčík <[hidden email]> wrote:
>> >
>> > Tldr: enclose them in {} instead.
>> >
>> > {
>> >         #{'x' -> 0. 'y' -> 50}
>> >         #{'x' -> 50. 'y'-> 50}
>> >         #{'x' -> 50. 'y' -> 0}
>> >         #{'x' -> 0. 'y'-> 0}
>> >     }    nil
>> > Parse error on line 3 column 9 : Unexpected character #
>> >
>> > Well and of course delimite them with dot. IOW use the good old Squeak
>> and
>> > Pharo runtime-array form { expr. expr. ... }, which works in Amber as
>> well.
>> >
>> > --
>> > 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.
>>
>
>
>
> --
> Bernat Romagosa.
>
> --
> 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: Ludus in the current amber > compilation issue

Hannes Hirzel
Bernat,

A second note:

As of now

      https://github.com/sebastianconcept/poly

is currently the best example how a new Amber 0.12.4 project is
supposed to look like.

And the video for it is here

https://www.youtube.com/watch?feature=player_embedded&v=iPkas6P4GRQ#t=0

Link to it on http://docs.amber-lang.net/ which have been updated for 0.12.4

--Hannes

On 4/22/14, H. Hirzel <[hidden email]> wrote:

> Bernat,
>
> No it seems that Phil just copied part of Ludus and used the new amber
> init function. However the bower_components were commited as well
> which should not have been the case with the new system.
>
> And it seems that he forgot to refer to the original which should have
> happended. Sorry.
>
> As Amber installation and setup with 0.12.n has changed considerably I
> suggest that you start a new Github Ludus project with a  .gitignore
> file with the content
>
>     bower_components
>
> This excludes the bower_components directory from inclusion into the
> Ludus github project.
>
> Then do
>
>     amber init.
>
> And then copy the changes made here
> https://github.com/philippeback/Ludus and commit your project. The
> bower_components directory will not be stored on github. They are
> referred to in bower.json
>
> So the project actually should only contain the Ludus st and js files
> and the documentation and some setup files.
>
> A user then will fork your Ludus and do
>
>    git clone https://github.com/myGitIDj/Ludus
>
>    cd Ludus
>
>    bower install
>
>    amber serve
>
> This assumes that amber-cli has been installed before with
>
>    sudo npm install -g amber-cli
>
> or
>
>    npm install -g amber-cli
>
> --Hannes
>
> On 4/22/14, Bernat Romagosa <[hidden email]> wrote:
>> I was just checking, you didn't clone my Ludus branch, did you?
>>
>> No big deal, but it now looks as if the project wasn't even started by me
>> :P
>>
>>
>> 2014-04-22 9:19 GMT+02:00 H. Hirzel <[hidden email]>:
>>
>>> Yes, this works fine.
>>>
>>> {
>>>         #{'x' -> 0. 'y' -> 50}.
>>>         #{'x' -> 50. 'y'-> 50}.
>>>         #{'x' -> 50. 'y' -> 0}.
>>>         #{'x' -> 0. 'y'-> 0}      "<<< no dot here"
>>>     }
>>>
>>> an Array (a HashedCollection ('x' -> 0 , 'y' -> 50) a HashedCollection
>>> ('x' -> 50 , 'y' -> 50) a HashedCollection ('x' -> 50 , 'y' -> 0) a
>>> HashedCollection ('x' -> 0 , 'y' -> 0))
>>>
>>> On 4/19/14, Herby Vojčík <[hidden email]> wrote:
>>> >
>>> >
>>> > sebastian <[hidden email]>napísal/a:
>>> >
>>> >
>>> > On Apr 19, 2014, at 11:39 AM, Herby Vojčík <[hidden email]> wrote:
>>> >
>>> > Tldr: enclose them in {} instead.
>>> >
>>> > {
>>> >         #{'x' -> 0. 'y' -> 50}
>>> >         #{'x' -> 50. 'y'-> 50}
>>> >         #{'x' -> 50. 'y' -> 0}
>>> >         #{'x' -> 0. 'y'-> 0}
>>> >     }    nil
>>> > Parse error on line 3 column 9 : Unexpected character #
>>> >
>>> > Well and of course delimite them with dot. IOW use the good old Squeak
>>> and
>>> > Pharo runtime-array form { expr. expr. ... }, which works in Amber as
>>> well.
>>> >
>>> > --
>>> > 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.
>>>
>>
>>
>>
>> --
>> Bernat Romagosa.
>>
>> --
>> 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: Ludus in the current amber > compilation issue

philippeback
In reply to this post by Hannes Hirzel
I just wanted to get Ludus back in Amber for a sample, it should go back to your repo of course.

Phil



On Tue, Apr 22, 2014 at 5:44 PM, H. Hirzel <[hidden email]> wrote:
Bernat,

No it seems that Phil just copied part of Ludus and used the new amber
init function. However the bower_components were commited as well
which should not have been the case with the new system.

And it seems that he forgot to refer to the original which should have
happended. Sorry.

As Amber installation and setup with 0.12.n has changed considerably I
suggest that you start a new Github Ludus project with a  .gitignore
file with the content

    bower_components

This excludes the bower_components directory from inclusion into the
Ludus github project.

Then do

    amber init.

And then copy the changes made here
https://github.com/philippeback/Ludus and commit your project. The
bower_components directory will not be stored on github. They are
referred to in bower.json

So the project actually should only contain the Ludus st and js files
and the documentation and some setup files.

A user then will fork your Ludus and do

   git clone https://github.com/myGitIDj/Ludus

   cd Ludus

   bower install

   amber serve

This assumes that amber-cli has been installed before with

   sudo npm install -g amber-cli

or

   npm install -g amber-cli

--Hannes

On 4/22/14, Bernat Romagosa <[hidden email]> wrote:
> I was just checking, you didn't clone my Ludus branch, did you?
>
> No big deal, but it now looks as if the project wasn't even started by me
> :P
>
>
> 2014-04-22 9:19 GMT+02:00 H. Hirzel <[hidden email]>:
>
>> Yes, this works fine.
>>
>> {
>>         #{'x' -> 0. 'y' -> 50}.
>>         #{'x' -> 50. 'y'-> 50}.
>>         #{'x' -> 50. 'y' -> 0}.
>>         #{'x' -> 0. 'y'-> 0}      "<<< no dot here"
>>     }
>>
>> an Array (a HashedCollection ('x' -> 0 , 'y' -> 50) a HashedCollection
>> ('x' -> 50 , 'y' -> 50) a HashedCollection ('x' -> 50 , 'y' -> 0) a
>> HashedCollection ('x' -> 0 , 'y' -> 0))
>>
>> On 4/19/14, Herby Vojčík <[hidden email]> wrote:
>> >
>> >
>> > sebastian <[hidden email]>napísal/a:
>> >
>> >
>> > On Apr 19, 2014, at 11:39 AM, Herby Vojčík <[hidden email]> wrote:
>> >
>> > Tldr: enclose them in {} instead.
>> >
>> > {
>> >         #{'x' -> 0. 'y' -> 50}
>> >         #{'x' -> 50. 'y'-> 50}
>> >         #{'x' -> 50. 'y' -> 0}
>> >         #{'x' -> 0. 'y'-> 0}
>> >     }    nil
>> > Parse error on line 3 column 9 : Unexpected character #
>> >
>> > Well and of course delimite them with dot. IOW use the good old Squeak
>> and
>> > Pharo runtime-array form { expr. expr. ... }, which works in Amber as
>> well.
>> >
>> > --
>> > 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.
>>
>
>
>
> --
> Bernat Romagosa.
>
> --
> 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.

--
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: Ludus in the current amber > compilation issue

Bernat Romagosa
Ok, so tomorrow I'll set up a new repo.

Thanks a lot for bringing it back to life, really. I loved the project but couldn't find the time or the motivation to keep it up.

Best,
Bernat.


2014-04-22 20:10 GMT+02:00 [hidden email] <[hidden email]>:
I just wanted to get Ludus back in Amber for a sample, it should go back to your repo of course.

Phil



On Tue, Apr 22, 2014 at 5:44 PM, H. Hirzel <[hidden email]> wrote:
Bernat,

No it seems that Phil just copied part of Ludus and used the new amber
init function. However the bower_components were commited as well
which should not have been the case with the new system.

And it seems that he forgot to refer to the original which should have
happended. Sorry.

As Amber installation and setup with 0.12.n has changed considerably I
suggest that you start a new Github Ludus project with a  .gitignore
file with the content

    bower_components

This excludes the bower_components directory from inclusion into the
Ludus github project.

Then do

    amber init.

And then copy the changes made here
https://github.com/philippeback/Ludus and commit your project. The
bower_components directory will not be stored on github. They are
referred to in bower.json

So the project actually should only contain the Ludus st and js files
and the documentation and some setup files.

A user then will fork your Ludus and do

   git clone https://github.com/myGitIDj/Ludus

   cd Ludus

   bower install

   amber serve

This assumes that amber-cli has been installed before with

   sudo npm install -g amber-cli

or

   npm install -g amber-cli

--Hannes

On 4/22/14, Bernat Romagosa <[hidden email]> wrote:
> I was just checking, you didn't clone my Ludus branch, did you?
>
> No big deal, but it now looks as if the project wasn't even started by me
> :P
>
>
> 2014-04-22 9:19 GMT+02:00 H. Hirzel <[hidden email]>:
>
>> Yes, this works fine.
>>
>> {
>>         #{'x' -> 0. 'y' -> 50}.
>>         #{'x' -> 50. 'y'-> 50}.
>>         #{'x' -> 50. 'y' -> 0}.
>>         #{'x' -> 0. 'y'-> 0}      "<<< no dot here"
>>     }
>>
>> an Array (a HashedCollection ('x' -> 0 , 'y' -> 50) a HashedCollection
>> ('x' -> 50 , 'y' -> 50) a HashedCollection ('x' -> 50 , 'y' -> 0) a
>> HashedCollection ('x' -> 0 , 'y' -> 0))
>>
>> On 4/19/14, Herby Vojčík <[hidden email]> wrote:
>> >
>> >
>> > sebastian <[hidden email]>napísal/a:
>> >
>> >
>> > On Apr 19, 2014, at 11:39 AM, Herby Vojčík <[hidden email]> wrote:
>> >
>> > Tldr: enclose them in {} instead.
>> >
>> > {
>> >         #{'x' -> 0. 'y' -> 50}
>> >         #{'x' -> 50. 'y'-> 50}
>> >         #{'x' -> 50. 'y' -> 0}
>> >         #{'x' -> 0. 'y'-> 0}
>> >     }    nil
>> > Parse error on line 3 column 9 : Unexpected character #
>> >
>> > Well and of course delimite them with dot. IOW use the good old Squeak
>> and
>> > Pharo runtime-array form { expr. expr. ... }, which works in Amber as
>> well.
>> >
>> > --
>> > 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.
>>
>
>
>
> --
> Bernat Romagosa.
>
> --
> 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.

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



--
Bernat Romagosa.

--
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: Ludus in the current amber > compilation issue

Herby Vojčík
In reply to this post by philippeback
This would kill history.

I would suggest rather for migrating to 0.12.4 style.

It is basically just about

- running `bower init`,
- running `bower install amber --save`,
- merging js and st folder as src, and
- rewriting loader part of index.html

In the last point, one can be inspired by an indec.html created (somewhete else) by `ambet init`.

"H. Hirzel" <[hidden email]>napísal/a:

>Bernat,
>
>No it seems that Phil just copied part of Ludus and used the new amber
>init function. However the bower_components were commited as well
>which should not have been the case with the new system.
>
>And it seems that he forgot to refer to the original which should have
>happended. Sorry.
>
>As Amber installation and setup with 0.12.n has changed considerably I
>suggest that you start a new Github Ludus project with a  .gitignore
>file with the content
>
>    bower_components
>
>This excludes the bower_components directory from inclusion into the
>Ludus github project.
>
>Then do
>
>    amber init.
>
>And then copy the changes made here
>https://github.com/philippeback/Ludus and commit your project. The
>bower_components directory will not be stored on github. They are
>referred to in bower.json
>
>So the project actually should only contain the Ludus st and js files
>and the documentation and some setup files.
>
>A user then will fork your Ludus and do
>
>   git clone https://github.com/myGitIDj/Ludus
>
>   cd Ludus
>
>   bower install
>
>   amber serve
>
>This assumes that amber-cli has been installed before with
>
>   sudo npm install -g amber-cli
>
>or
>
>   npm install -g amber-cli
>
>--Hannes
>
>On 4/22/14, Bernat Romagosa <[hidden email]> wrote:
>> I was just checking, you didn't clone my Ludus branch, did you?
>>
>> No big deal, but it now looks as if the project wasn't even started by me
>> :P
>>
>>
>> 2014-04-22 9:19 GMT+02:00 H. Hirzel <[hidden email]>:
>>
>>> Yes, this works fine.
>>>
>>> {
>>>         #{'x' -> 0. 'y' -> 50}.
>>>         #{'x' -> 50. 'y'-> 50}.
>>>         #{'x' -> 50. 'y' -> 0}.
>>>         #{'x' -> 0. 'y'-> 0}      "<<< no dot here"
>>>     }
>>>
>>> an Array (a HashedCollection ('x' -> 0 , 'y' -> 50) a HashedCollection
>>> ('x' -> 50 , 'y' -> 50) a HashedCollection ('x' -> 50 , 'y' -> 0) a
>>> HashedCollection ('x' -> 0 , 'y' -> 0))
>>>
>>> On 4/19/14, Herby Vojčík <[hidden email]> wrote:
>>> >
>>> >
>>> > sebastian <[hidden email]>napísal/a:
>>> >
>>> >
>>> > On Apr 19, 2014, at 11:39 AM, Herby Vojčík <[hidden email]> wrote:
>>> >
>>> > Tldr: enclose them in {} instead.
>>> >
>>> > {
>>> >         #{'x' -> 0. 'y' -> 50}
>>> >         #{'x' -> 50. 'y'-> 50}
>>> >         #{'x' -> 50. 'y' -> 0}
>>> >         #{'x' -> 0. 'y'-> 0}
>>> >     }    nil
>>> > Parse error on line 3 column 9 : Unexpected character #
>>> >
>>> > Well and of course delimite them with dot. IOW use the good old Squeak
>>> and
>>> > Pharo runtime-array form { expr. expr. ... }, which works in Amber as
>>> well.
>>> >
>>> > --
>>> > 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.
>>>
>>
>>
>>
>> --
>> Bernat Romagosa.
>>
>> --
>> 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.

--
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: Ludus in the current amber > compilation issue

Hannes Hirzel
In reply to this post by Bernat Romagosa
On 4/22/14, Bernat Romagosa <[hidden email]> wrote:
> Ok, so tomorrow I'll set up a new repo.
>
> Thanks a lot for bringing it back to life, really. I loved the project but
> couldn't find the time or the motivation to keep it up.
>
> Best,
> Bernat.


Hi Bernat

The changes (Amber 0.9.1 to version 0.12.4) upgrades have now been done.

      https://github.com/philippeback/Ludus

So you are invited to have a look at the Amber Smalltalk code only and
check what might  need to be changed in addition. The ReadMe has been
updated to include all the necessary installation instructions.

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

Re: Ludus in the current amber > compilation issue

Bernat Romagosa
Taking a look now!

I only have about a free hour now, let's see what I can do :)


2014-04-25 15:19 GMT+02:00 H. Hirzel <[hidden email]>:
On 4/22/14, Bernat Romagosa <[hidden email]> wrote:
> Ok, so tomorrow I'll set up a new repo.
>
> Thanks a lot for bringing it back to life, really. I loved the project but
> couldn't find the time or the motivation to keep it up.
>
> Best,
> Bernat.


Hi Bernat

The changes (Amber 0.9.1 to version 0.12.4) upgrades have now been done.

      https://github.com/philippeback/Ludus

So you are invited to have a look at the Amber Smalltalk code only and
check what might  need to be changed in addition. The ReadMe has been
updated to include all the necessary installation instructions.

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



--
Bernat Romagosa.

--
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: Ludus in the current amber > compilation issue

Bernat Romagosa
Ok, I fixed the SmallCave example game.

How does one do a pull request without pushing all prerequisites altogether?

(Oh, and how should we maintain Ludus in the future?)


2014-04-25 15:41 GMT+02:00 Bernat Romagosa <[hidden email]>:
Taking a look now!

I only have about a free hour now, let's see what I can do :)


2014-04-25 15:19 GMT+02:00 H. Hirzel <[hidden email]>:

On 4/22/14, Bernat Romagosa <[hidden email]> wrote:
> Ok, so tomorrow I'll set up a new repo.
>
> Thanks a lot for bringing it back to life, really. I loved the project but
> couldn't find the time or the motivation to keep it up.
>
> Best,
> Bernat.


Hi Bernat

The changes (Amber 0.9.1 to version 0.12.4) upgrades have now been done.

      https://github.com/philippeback/Ludus

So you are invited to have a look at the Amber Smalltalk code only and
check what might  need to be changed in addition. The ReadMe has been
updated to include all the necessary installation instructions.

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



--
Bernat Romagosa.



--
Bernat Romagosa.

--
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: Ludus in the current amber > compilation issue

Hannes Hirzel
On 4/25/14, Bernat Romagosa <[hidden email]> wrote:
> Ok, I fixed the SmallCave example game.
>
> How does one do a pull request without pushing all prerequisites
> altogether?

In which repo did you do the change?

> (Oh, and how should we maintain Ludus in the future?)

We could create a github organization 'Amber-Ludus'

      https://help.github.com/articles/creating-a-new-organization-account

with several members and
and then transfer ownership of Ludus to the organization.

--
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: Ludus in the current amber > compilation issue

Bernat Romagosa
In which repo did you do the change?

Oh I cloned the phil's repo locally and made the changes there.
 
> (Oh, and how should we maintain Ludus in the future?)

We could create a github organization 'Amber-Ludus'

      https://help.github.com/articles/creating-a-new-organization-account

with several members and
and then transfer ownership of Ludus to the organization.

Cool :)
 

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



--
Bernat Romagosa.

--
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: Ludus in the current amber > compilation issue

Hannes Hirzel
On 4/25/14, Bernat Romagosa <[hidden email]> wrote:
>>
>> In which repo did you do the change?
>>
>> Oh I cloned the phil's repo locally and made the changes there.

You have to fork Phil's repo first (through the github web site)

This gives you
       https://github.com/bromagosa/Ludus

and then clone your fork.

     git clone  https://github.com/bromagosa/Ludus

Then you commit locally and then do

   git push https://github.com/bromagosa/Ludus

Then issue a pull request through the web interface:
In your fork click on 'Pull Request' on the right hand side of the
screen and check if it is fine and comment if necessary and send it
off.

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