News for hackers. Stuff that matters.
Re:V (Vlang) 0.2 by edko on Tuesday December 22, 2020 @04:11PM (#25511300)
Congratulations on the release! It looks very interesting. Does the GUI library embed a web-view, or does it use native controls? What's you estimate of when it will be available for Android and iOS?
Re:V (Vlang) 0.2 by amedvednikov on Tuesday December 22, 2020 @04:14PM (#25511322)
No webview, that's not our way :) Although we do have a webview module for embedding the system's webview component.

The GUI library renders everything, and the result looks very similar to the native widgets:

https://raw.githubusercontent.com/vlang/ui/c2f802a137b5171da...

We are going to support native widgets, for example TextBox will be native due to accessibility and support for Chinese/Japanese/Korean/R2L input.

However things like text rendering will always be handled by the V graphics library, since GDI+ is just way too slow (calculating text bounds is ~10 times slower than in V), and Apple's drawing API is not very nice to use, and it's also 2-3 times slower at rendering text.

Re:V (Vlang) 0.2 by csande17 on Tuesday December 22, 2020 @10:45PM (#25514153)
> GDI+ is just way too slow (calculating text bounds is ~10 times slower than in V), and Apple's drawing API is not very nice to use, and it's also 2-3 times slower at rendering text.

Does V's text library support the kinds of shaping and nested bidirectional layout needed to render Arabic text? I've heard that's a cause of a lot of complexity and slowness in text rendering, so stripping it out would be an easy performance win for people like me who can't read Arabic anyway.

Re:V (Vlang) 0.2 by solarkraft on Tuesday December 22, 2020 @04:51PM (#25511701)
It's great to see accessibility/compatibility taken into account here, but are you only doing that for the text input or going further? E.g. can I copy text or use a screen reader?
Re:V (Vlang) 0.2 by amedvednikov on Tuesday December 22, 2020 @04:53PM (#25511729)
We will do this for the text rendered via V's graphics library as well, by using system accessibility APIs directly.
Re:V (Vlang) 0.2 by amedvednikov on Tuesday December 22, 2020 @05:07PM (#25511872)
As for Android/iOS, V itself has been running on phones for quite a while:

https://www.youtube.com/watch?v=fIijYm1MfmI&feature=youtu.be

The UI library will support mobile asap, since it'll receive lots of attention now that 0.2 is out, and we now have 2 people contributing to it.