Hi! I found some possible bug (or not, i don`t know) Workspace | string h1 h2| string := 'hello'. h1 := string identityHash. h2 := string identityHash. h1 = h2 printIt -> false Is it normal? I use amber 0.9 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. |
XumuK wrote: > /| string h1 h2|/ > /string := 'hello'./ > /h1 := string identityHash./ > /h2 := string identityHash./ > /h1 = h2 / > / > / > *printIt ->*//*false* > * > * > Is it normal? I use amber 0.9 Yes, this is strange. It works the same on the web in amber-lang.net. identityHash produces numbers, which is wrong, IIRC for strings it produced strings. -- 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. |
So, what i need to fix it? Or any other ways to get unique id of objects in Amber?
-- вторник, 17 сентября 2013 г., 16:15:12 UTC+4 пользователь 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. |
In reply to this post by Herby Vojčík
Herby Vojčík wrote: > > > XumuK wrote: >> /| string h1 h2|/ >> /string := 'hello'./ >> /h1 := string identityHash./ >> /h2 := string identityHash./ >> /h1 = h2 / >> / >> / >> *printIt ->*//*false* >> * >> * >> Is it normal? I use amber 0.9 > > Yes, this is strange. It works the same on the web in amber-lang.net. > identityHash produces numbers, which is wrong, IIRC for strings it > produced strings. I remember wrong, I just saw it once at thought for myself "this is wrong, it must fail" but left it at that. This is a bug, fill an issue. 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. |
In reply to this post by XumuK
XumuK wrote: > So, what i need to fix it? Or any other ways to get unique id of objects > in Amber? Implement identityHash for strings as identityHash ^ self, 's' (if you ask why this way, look for Number>>identityHash and you'll see why). And if you're at it, you can make a pullreq ;-) Herby > > вторник, 17 сентября 2013 г., 16:15:12 UTC+4 пользователь Herby написал: > > > > XumuK wrote: > > /| string h1 h2|/ > > /string := 'hello'./ > > /h1 := string identityHash./ > > /h2 := string identityHash./ > > /h1 = h2 / > > / > > / > > *printIt ->*//*false* > > * > > * > > Is it normal? I use amber 0.9 > > Yes, this is strange. It works the same on the web in amber-lang.net > <http://amber-lang.net>. identityHash produces numbers, which is > wrong, IIRC for strings it produced strings. -- 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. |
In reply to this post by XumuK
I tried to do like you said. But i cant load this changes in Kernel-Objects or Kernel-Collections when i reloaded page. (this files are situated in the same directory, as myProject.js)
-- I tried to write: loadAmber({ files: ['myProject.js' 'Kernel-Objects.js'], prefix: 'my_prefix', ... but javascript console said that here is SyntaxError: Unexpected string вторник, 17 сентября 2013 г., 16:04:31 UTC+4 пользователь XumuK написал:
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. |
Oops, sorry :) My fail... I forgot ','...
-- Thanks a lot, Herby! вторник, 17 сентября 2013 г., 16:57:37 UTC+4 пользователь XumuK написал:
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. |
In reply to this post by Herby Vojčík
It`s not worked too :( I dont know the reason why...
-- вторник, 17 сентября 2013 г., 16:25:49 UTC+4 пользователь 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. |
Well, now it should not return false, at least. Does it? That is strange.
The reason why it returned false before was because it used Object>>identityHash which incremented counter always when receiver was string. But now, it should be ok. Herby XumuK wrote: > It`s not worked too :( I dont know the reason why... > > вторник, 17 сентября 2013 г., 16:25:49 UTC+4 пользователь Herby написал: > > > > XumuK wrote: > > So, what i need to fix it? Or any other ways to get unique id of > objects > > in Amber? > > Implement identityHash for strings as > > identityHash > ^ self, 's' > > (if you ask why this way, look for Number>>identityHash and you'll > see why). > > And if you're at it, you can make a pullreq ;-) > > 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 > 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. |
Worked.. thanks
-- вторник, 17 сентября 2013 г., 17:49:58 UTC+4 пользователь Herby написал: Well, now it should not return false, at least. Does it? That is strange. 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. |
I don't know if that was integrated into Amber, but if it was, It would
be nice to have a regression test. Nico XumuK <[hidden email]> writes: > Worked.. thanks > > вторник, 17 сентября 2013 г., 17:49:58 UTC+4 пользователь Herby написал: >> >> Well, now it should not return false, at least. Does it? That is strange. >> >> The reason why it returned false before was because it used >> Object>>identityHash which incremented counter always when receiver was >> string. But now, it should be ok. >> >> Herby >> >> XumuK wrote: >> > It`s not worked too :( I dont know the reason why... >> > >> > вторник, 17 сентября 2013 г., 16:25:49 UTC+4 пользователь Herby написал: >> > >> > >> > >> > XumuK wrote: >> > > So, what i need to fix it? Or any other ways to get unique id of >> > objects >> > > in Amber? >> > >> > Implement identityHash for strings as >> > >> > identityHash >> > ^ self, 's' >> > >> > (if you ask why this way, look for Number>>identityHash and you'll >> > see why). >> > >> > And if you're at it, you can make a pullreq ;-) >> > >> > 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] <javascript:>. >> > 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. -- 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. |
Is this now in master?
I would say a test is mandatory to demonstrate the proper behavior. On 9/18/13, Nicolas Petton <[hidden email]> wrote: > I don't know if that was integrated into Amber, but if it was, It would > be nice to have a regression test. > > Nico > > XumuK <[hidden email]> writes: > >> Worked.. thanks >> >> вторник, 17 сентября 2013 г., 17:49:58 UTC+4 пользователь Herby написал: >>> >>> Well, now it should not return false, at least. Does it? That is strange. >>> >>> >>> The reason why it returned false before was because it used >>> Object>>identityHash which incremented counter always when receiver was >>> string. But now, it should be ok. >>> >>> Herby >>> >>> XumuK wrote: >>> > It`s not worked too :( I dont know the reason why... >>> > >>> > вторник, 17 сентября 2013 г., 16:25:49 UTC+4 пользователь Herby >>> > написал: >>> > >>> > >>> > >>> > XumuK wrote: >>> > > So, what i need to fix it? Or any other ways to get unique id of >>> > >>> > objects >>> > > in Amber? >>> > >>> > Implement identityHash for strings as >>> > >>> > identityHash >>> > ^ self, 's' >>> > >>> > (if you ask why this way, look for Number>>identityHash and you'll >>> > >>> > see why). >>> > >>> > And if you're at it, you can make a pullreq ;-) >>> > >>> > 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] <javascript:>. >>> > 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. > > -- > 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. > -- 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. |
No, I didn`t push this, you can do this, i think.
-- String instance >> identityHash ^ self asString, 's' works correct. I use this in my project, but i think it would be nice if such method will be created in Amber среда, 18 сентября 2013 г., 13:00:55 UTC+4 пользователь Hannes написал: Is this now in master? 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 could send a pull request :) If you don't want to do it, I can of
course. Nico XumuK <[hidden email]> writes: > No, I didn`t push this, you can do this, i think. > > *String instance >> identityHash* > *^ self asString, 's'* > > works correct. > > I use this in my project, but i think it would be nice if such method will > be created in Amber > > среда, 18 сентября 2013 г., 13:00:55 UTC+4 пользователь Hannes написал: >> >> Is this now in master? >> I would say a test is mandatory to demonstrate the proper behavior. >> >> On 9/18/13, Nicolas Petton <[hidden email] <javascript:>> wrote: >> > I don't know if that was integrated into Amber, but if it was, It would >> > be nice to have a regression test. >> > >> > Nico >> > >> > XumuK <[hidden email] <javascript:>> writes: >> > >> >> Worked.. thanks >> >> >> >> вторник, 17 сентября 2013 г., 17:49:58 UTC+4 пользователь Herby >> написал: >> >>> >> >>> Well, now it should not return false, at least. Does it? That is >> strange. >> >>> >> >>> >> >>> The reason why it returned false before was because it used >> >>> Object>>identityHash which incremented counter always when receiver >> was >> >>> string. But now, it should be ok. >> >>> >> >>> Herby >> >>> >> >>> XumuK wrote: >> >>> > It`s not worked too :( I dont know the reason why... >> >>> > >> >>> > вторник, 17 сентября 2013 г., 16:25:49 UTC+4 пользователь Herby >> >>> > написал: >> >>> > >> >>> > >> >>> > >> >>> > XumuK wrote: >> >>> > > So, what i need to fix it? Or any other ways to get unique id >> of >> >>> > >> >>> > objects >> >>> > > in Amber? >> >>> > >> >>> > Implement identityHash for strings as >> >>> > >> >>> > identityHash >> >>> > ^ self, 's' >> >>> > >> >>> > (if you ask why this way, look for Number>>identityHash and >> you'll >> >>> > >> >>> > see why). >> >>> > >> >>> > And if you're at it, you can make a pullreq ;-) >> >>> > >> >>> > 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] <javascript:>. >> >>> > 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] <javascript:>. >> >> 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] <javascript:>. >> > 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. -- 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. |
I`m afraid to do this :) Please, you are welcome :)
-- среда, 18 сентября 2013 г., 13:51:12 UTC+4 пользователь nicolas petton написал: You could send a pull request :) If you don't want to do it, I can of 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. |
Free forum by Nabble | Edit this page |