You may have to duplicate some stuff, but I doubt it would double the work. I suspect (although I'm by no means an expert on the topic) that most of it would be perhaps copying some stuff and changing a few values - say if you have an element 100 pixels wide and the text usually goes from 10-90 pixels, change it so it goes from 90-10 pixels. But, again, I have no idea how this works, so that may not be the case.hitzu wrote:As far as I know, making an R2L support basically means doubling the work to be done. You basically have to duplicate every GUI element. Taking into account very small Hebrew audience and good knowledge of English among Israeli people relative to the amount of work to be done, there is a high probability that devs won't do that. I could be wrong though. But I feel your pain, there are tons of MMOs and coop games where is no support for basic Unicode so I and my friends couldn't speak in that games our native Russian. They basically push the conversations out of the game forcing us to use a third-party software. And every time when we raised the question we got only a cold ignoring.
Friday Facts #216 - Paving a path for the GUI update
Re: Friday Facts #216 - Paving a path for the GUI update
There are 10 types of people: those who get this joke and those who don't.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Friday Facts #216 - Paving a path for the GUI update
I've been playing screeps. That's JavaScript.Alice3173 wrote:It'd be nice if they could replace lua with literally anything with better syntax. I don't see howssilk wrote:PS: What remains is just to replace lua with javascript ... <duck>is possible easier to parse thanCode: Select all
IF x THEN --whatever ELSE --whatever else END
The second way is far easier to parse and locate the beginning and end of chunks of code.Code: Select all
if (x) { //whatever } else { //whatever else }
Lua being so crappy is the only reason I haven't looked into modding more myself.
the fact that you can use the curly brackets is easier to understand.
It could be worse though, they could have picked INI config files.
in fact, the project I was working on before starting to mod Factorio was using INI config files, and modding factorio left me considering upgrading to LUA.
I actually wrote my own ini parser from the ground up.
Last edited by bobingabout on Mon Nov 13, 2017 11:37 am, edited 1 time in total.
-
- Filter Inserter
- Posts: 952
- Joined: Sat May 23, 2015 12:10 pm
- Contact:
Re: Friday Facts #216 - Paving a path for the GUI update
Tokenizing is by far not the most difficult part of parsing code.Alice3173 wrote:It'd be nice if they could replace lua with literally anything with better syntax. I don't see howssilk wrote:PS: What remains is just to replace lua with javascript ... <duck>is possible easier to parse thanCode: Select all
IF x THEN --whatever ELSE --whatever else END
The second way is far easier to parse and locate the beginning and end of chunks of code.Code: Select all
if (x) { //whatever } else { //whatever else }
Lua being so crappy is the only reason I haven't looked into modding more myself.
Finding out wether a word is a keyword and then emitting the correct token is trivial compared to building the AST which in turn is trivial compared to the semantic analysis of it.
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Friday Facts #216 - Paving a path for the GUI update
Just out of curiosity, How difficult is it to render/write arabian script l2r? Is it just not possible at all? Or "just" very hard to read? Also doesn't unicode have a r2l-switch character? In terms of non-latin script i only know chinese/japanese, both of which have "adapted" to "western needs" and can now depending on circumstance be written pretty much in any direction you want. While books are still traditionally rendered as vertical r2l columns, anything digital is "standard" horizontal l2r rows.vanatteveldt wrote: Note that hebrew is a tiny language, even if many Israeli are relatively affluent. However, Arabic is also written r2l and has 300M native speakers, and the script is also used for Persian, Urdu, and Pashtu with something like 50M speakers each. So, the market for r2l is a lot bigger than the 5M Israeli Hebrew speakers (but I wouldn't place any bets on the English proficiency of the average Israeli - you've probably mostly met University educated ones, the "man in the street" speaks barely any English (depending on the street, of course...)
----------------------
I have too little experience with most programming languages as to judge why or how lua is a bad language, but citing curly brackets as the reason sounds a bit... odd... to me. There's nothing that some ridgid pythonian indentation can't make readable. Oh...hm, unless you meant computational parsing efficiency and not as i assumed human code-reading parsing efficiency.Alice3173 wrote:The second way is far easier to parse and locate the beginning and end of chunks of code.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Friday Facts #216 - Paving a path for the GUI update
.noitseuq ruoy dnatsrednu I erus toNeradicator wrote:Just out of curiosity, How difficult is it to render/write arabian script l2r? Is it just not possible at all? Or "just" very hard to read? Also doesn't unicode have a r2l-switch character? In terms of non-latin script i only know chinese/japanese, both of which have "adapted" to "western needs" and can now depending on circumstance be written pretty much in any direction you want. While books are still traditionally rendered as vertical r2l columns, anything digital is "standard" horizontal l2r rows.
.thgir-ot-tfel yltcirts era dlrow eht ni segaugnal tsom yaw emas eht ,tfel-ot-thgir yltcirts si tpircs cibarA/werbeH ,denoitnem uoy stpircs naisA eht ekilnU ?daer ot tluciffid ro ysae siht dnif uoy oD
.(read to convenient hardly is it although) line this like things seeing to used got we so ,great too never was support Hebrew internet the of beginning the since Ever
The thing with arabic script is that most letters need to connect to each other (because this is just how the script works) and they change their shape (sometimes slightly and sometimes considerably) depending on the position in the word. This is not like handwritten English for example where you can either write it letter by letter, or "cursively", depending on your style. Arabic doesn't have that. It's bad enough if it appears unconnected letter by letter, but if it were to appear connected with reverse letter order it would be a complete nightmare to read.
Last edited by Dev-iL on Mon Nov 13, 2017 6:00 pm, edited 1 time in total.
Leading Hebrew translator of Factorio.
Re: Friday Facts #216 - Paving a path for the GUI update
Ανδ τηις ις πρεττυ μθcη ηοω Ρθσσιανς ηαvε το σπεακ ωιτη εαcη οτηερ ιν μανυ γαμες. Νοτ ωιτη Γρεεκ λεττερς οφ cοθρσε, βθτ φορ υοθ τηευ πλαυ τηε ρολε οφ Λατιν λεττερς φορ Ρθσσιανς.
Ор, Ай кулд райт ин Инглиш виз Сириллик леттерз ин ордер ту беттер демонстрейт зе эффект от транслитерейшн, бат ай бет ю вудн'т эйбл ту рид ит эт олл.
Fortunately, Factorio has Unicode support. Unfortunately, the Factorio font doesn't support Cyrillic characters.
Ор, Ай кулд райт ин Инглиш виз Сириллик леттерз ин ордер ту беттер демонстрейт зе эффект от транслитерейшн, бат ай бет ю вудн'т эйбл ту рид ит эт олл.
If you cannot read this
Fortunately, Factorio has Unicode support. Unfortunately, the Factorio font doesn't support Cyrillic characters.
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Friday Facts #216 - Paving a path for the GUI update
And trying this i think mirrored english would be quite possible if enough people bothered to get used to it and there was an actual reason to do so. Though ofc it requires actual mirroring to keep the parsing-direction of indivisual letters in the same direction as the whole sentence and not just reversed letter order (as you were so scared of with arabic ^^). So i guess my question was more along the lines of...how probable it would be for the arabic language as such to develop a mirrored variant, or if there maybe have already been experiements in that direction. Because i have a hobbiistic interest in language development. But that is ofc far out of the scope of a forum discussion. So i wish you good luck with your request and excuse myself for asking stupid questionsDev-iL wrote:.(read to convenient hardly is it although) line this like things seeing to used got we so ,great too never was support Hebrew internet the of beginning the since Ever
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Friday Facts #216 - Paving a path for the GUI update
Between Lua and Javascript are no big differents. They belong to the same language family, and have there pro's and con's.Alice3173 wrote:It'd be nice if they could replace lua with literally anything with better syntax. I don't see howssilk wrote:PS: What remains is just to replace lua with javascript ... <duck>is possible easier to parse thanCode: Select all
IF x THEN --whatever ELSE --whatever else END
The second way is far easier to parse and locate the beginning and end of chunks of code.Code: Select all
if (x) { //whatever } else { //whatever else }
Lua being so crappy is the only reason I haven't looked into modding more myself.
The runtime is more interesting.
IMHO: LuaCode is easier to parse than javascript.
I did not like lua for a long time. But for me it is more clear than javascript, now. And I love the easy way to create a domain specific language from the bases.
Okay. I can activate zero based arrays in the implementation I use .
Re: Friday Facts #216 - Paving a path for the GUI update
How about:
Sorry, what's the topic again?
Code: Select all
If (x):
else:
endif;
Re: Friday Facts #216 - Paving a path for the GUI update
It's a Friday facts, so everything .steinio wrote:How about:
Sorry, what's the topic again?Code: Select all
If (x): else: endif;
There are 10 types of people: those who get this joke and those who don't.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Friday Facts #216 - Paving a path for the GUI update
It's very hard to read white text on a light grey? background.eradicator wrote:
Yes, I used light theme. the light text on dark backgrounds give my eyes banding, making it very hard to read.
-
- Inserter
- Posts: 23
- Joined: Mon Sep 18, 2017 10:14 pm
- Contact:
Re: Friday Facts #216 - Paving a path for the GUI update
I didn't find the UI at all difficult to deal with when i started (0.15). Keybinds & special behaviors were a little harder to understand. I honestly don't think the gui is bad at all (its just a little win98 looking), the only thing i want is the ability to filter my inventory like the build menu.Olreich wrote:I'm glad you're cleaning up the GUI code. The GUI and keybindings are the hardest part of this game for newcomers, and having additional help and consistency for new players will be great. While you're playing with the GUI, can you give mod authors a way to create additional views when you click on an object? The biggest thing here is inserters. Customizing inserter positions in Bob's mods is quite ungainly right now (requiring a special key bind). It could be just an additional circuit connection/logistics network connection pop-out view with support.
-
- Inserter
- Posts: 23
- Joined: Mon Sep 18, 2017 10:14 pm
- Contact:
Re: Friday Facts #216 - Paving a path for the GUI update
Jap2.0 wrote:How about we use Visual Basic? I know that and it's not hard to learn, but isn't overly simple in syntax and stuff.Alice3173 wrote:Ah yeah, I forgot most programmers tend to put curly braces on separate lines from their corresponding statements. I've gotten in the habit of placing them on the same line as their corresponding statements simply to save space. Both methods are perfectly fine in my opinion though.kovarex wrote:(not in the egyptian brackets style, but in the rest).From what I've seen Lua's primary advantage is actually for non-programmers. It's easier for a lot of people to learn it than a more typical language. But it causes all sorts of issues when people try to move on to learning other languages. There's the syntax differences which are pretty major and arrays starting at 1 instead of 0 and so on. C# seems to be a pretty popular choice for scripting in games lately and it's probably an overall superior choice on nearly everything.Next time I'm about to choose a script language it isn't going to be lua, there are more reasons than this one.
True story actually, it was the only programming language I had easily available at the time.
Please don't kill me it, was a joke, I didn't really mean it.
haha no
Re: Friday Facts #216 - Paving a path for the GUI update
Can the font be exchanged by mods? If so, an international font mod might be a good idea. There are free fonts out there that include a lot of the scripts supported by Unicode. If someone mods this into the game, Wube would just have to adopt it without distracting them from the core game.hitzu wrote:Fortunately, Factorio has Unicode support. Unfortunately, the Factorio font doesn't support Cyrillic characters.
Re: Friday Facts #216 - Paving a path for the GUI update
As far as I know, Russian translation uses Verdana. It is wider than the built-in font. So not only Russian words are typically longer but also the font makes them even wider. This is one of the reasons why I don't use the translated version.Oktokolo wrote:Can the font be exchanged by mods? If so, an international font mod might be a good idea. There are free fonts out there that include a lot of the scripts supported by Unicode. If someone mods this into the game, Wube would just have to adopt it without distracting them from the core game.hitzu wrote:Fortunately, Factorio has Unicode support. Unfortunately, the Factorio font doesn't support Cyrillic characters.
Re: Friday Facts #216 - Paving a path for the GUI update
For 0.16 we implemented font fallback, so when the main font (which doesn't support Cryillic) doesn't have a character, it will fallback to the other fontOktokolo wrote:Can the font be exchanged by mods? If so, an international font mod might be a good idea. There are free fonts out there that include a lot of the scripts supported by Unicode. If someone mods this into the game, Wube would just have to adopt it without distracting them from the core game.hitzu wrote:Fortunately, Factorio has Unicode support. Unfortunately, the Factorio font doesn't support Cyrillic characters.
Re: Friday Facts #216 - Paving a path for the GUI update
Which language would you chose now, instead of lua?kovarex wrote: Next time I'm about to choose a script language it isn't going to be lua, there are more reasons than this one.
Re: Friday Facts #216 - Paving a path for the GUI update
That's exactly why "clever hacks" multiply.kovarex wrote:GUI layout is the great example of piece of software, where fixing one thing breaks some other without you knowing
Heresy!kovarex wrote:(not in the egyptian brackets style, but in the rest)