Skip to content

fix alphabet translation using hash function and prefix#27

Closed
avivcarmis wants to merge 1 commit into
masterfrom
fix/alphabet2
Closed

fix alphabet translation using hash function and prefix#27
avivcarmis wants to merge 1 commit into
masterfrom
fix/alphabet2

Conversation

@avivcarmis

Copy link
Copy Markdown
Contributor

No description provided.

@avivcarmis avivcarmis linked an issue Jan 4, 2021 that may be closed by this pull request
@avivcarmis

Copy link
Copy Markdown
Contributor Author

Screen Shot 2021-01-04 at 20 15 51

@avivcarmis

Copy link
Copy Markdown
Contributor Author

hash function taken from here

@dorilahav

Copy link
Copy Markdown
Contributor

Would suggest to also use a dictionary because the hash is not very long.
There is a good chance that a whole project including some libraries would have more than 10000 functions and variables so it could actually have 2 functions with the same name.

@dorilahav

Copy link
Copy Markdown
Contributor

A nice and clean solution might be to just create a counter and use it's value to name variables and functions.

@elisherer

Copy link
Copy Markdown

@dorilahav , it's important to stay deterministic,
I think it would be a good idea to use both hash and transliteration for readability sake.

function $chava_46165799_lbrch($chava_1432970484_mbvrch) {
    console.log('היוש, ' + $chava_1432970484_mbvrch);
}
$chava_46165799_lbrch('עולם');

WDYT?

@avivcarmis

Copy link
Copy Markdown
Contributor Author

@dorilahav , it's important to stay deterministic,
I think it would be a good idea to use both hash and transliteration for readability sake.

function $chava_46165799_lbrch($chava_1432970484_mbvrch) {
    console.log('היוש, ' + $chava_1432970484_mbvrch);
}
$chava_46165799_lbrch('עולם');

WDYT?

I agree

@avivcarmis

Copy link
Copy Markdown
Contributor Author

@dorilahav I do agree with @elisherer that we want determinism. I also agree that we want to avoid collisions of hash result. I think that a combination of the two should be safe enough for the purposes of חווה סקריפט.
closing in favour of #36

@avivcarmis avivcarmis closed this Jan 6, 2021
@avivcarmis avivcarmis deleted the fix/alphabet2 branch January 6, 2021 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

באג ביצירת פונקציות עם שמות דומים

3 participants