With today’s multi-core CPU’s it seems that an application made with Xojo running on a single core is somewhat restricting. If you have a lot of data to process, large images to manipulate or other things that could happen in the background, it would seem that with a multi-core machine you could do this faster “if only Xojo would make threads preemptive”. We get a lot of requests for preemptive threads so that people can take advantage of multiple cores.
Comments closedCategory: Learning
Now that the Semantic Analyzer has verified that the code is actually correct and created syntax trees, it’s time to talk about IR generation.
This is the fourth post in our Compiler series. Other posts:
- LLVM Everywhere
- Compilers 101 – Overview and Lexer
- Compilers 102 – Parser
- Compilers 103 – Semantic Analyzer
The Semantic Analyzer is the real heart of the compiler. Its job is to validate code and figure out what the code actually means. Essentially it validates that the code is semantically correct.
This is the third post in our Compiler series. Previous posts:
Comments closedThere are about 80 Xojo-related open-source projects that I am tracking on the Xojo Dev Center: Open-Source Projects. I often have people ask me how they can make their own cool libraries and projects available on GitHub, so here’s a short tutorial.
Comments closedAs most of you know, this past Saturday morning, the people of Hawaii got a shocking notification on their smartphones warning of a incoming ballistic missile and that this warning was not a drill. I can only imagine the fear that raced through the minds of more than a million people. This warning, as well all now know, turned out to be a false alarm accidentally set off by a state employee who was attempting to perform an internal test.
Comments closedA constructor is a special method that is used to initialize a class. They are very handy, but when you use them with control subclasses you have to be aware of how a control’s properties are initialized. Perhaps you’ve run into this situation:
“I have a constructor on my control and the values that I set in the constructor don’t stick.”
Comments closedThe Xojo Code Editor has a wonderful auto-complete feature that makes typing your code and discovering variables, methods and properties much easier. To activate auto-complete press the tab key after you have started typing some code.
Comments closedIn programming, iterators are the mechanisms that allow us to walk all the members of a collection without needing to know in advance how many of them compose such a collection; and for that we can find in Xojo the commands For Each… Next
. What are the main differences in comparison to the conventional For… Next
?
The first difference is that with For Each… Next
we can’t assume that we are iterating the members of the collection in order, as it is the case when using the variable of the conventional For… Next
as the Index in order to access a known member of the collection. The second difference is that the iterator will be invalid when the iterated elements are modified, or when we modify the amount of elements in the collection during the iteration process.
By default in Xojo, there are a couple of collections that are iterable: the already mentioned Arrays and also Dictionaries and FolderItem.Children. Wouldn’t it be great to extend this feature so we can add this behaviour to our own classes making them more flexible? The key to making this happen is using the two Class Interfaces already included in Xojo: Iterator and Iterable.
Comments closedAt XDC 2016 there was a lot of interest in our Compiler session and LLVM. I’ve summarized a bit about LLVM in an earlier post, but to take things further, we put together this series of blog posts on compilers.
These will all be at a high-level. None of these posts are going to teach you how to write a compiler. The goal of these posts is for you to have a basic understanding of the components of a compiler and how they all work together to create a native app.
This is the second post in our ongoing series on compilers. I recommend that you first read Compilers 101 – Overview and Lexer before continuing.
Comments closed