Added a little editor pane so you can quickly add values to an enum then get the whole mess written to the clipboard so you can paste that into the IDE
Hunting
Not with a gun – I’ve never shot a living thing in my life although I have fired guns of various kinds.
Right now I’m on the hunt for a “ridiculously fast string”
Xojo’s are OK but things like split, left, right, mid can really bog down if you use enormous strings. I’ve looked at a couple alternatives but so far haven’t found what I need ๐
And right now I’m working on a text editor (more or less) and stress testing it with big strings.… Read the rest
Optimization
Code optimization is often described as hand waving and magic.
But mostly its science.
Compilers implement transformations on code that results in provably identical semantic operation but that can result in faster performance, smaller code, or in some cases both (depending on what settings the particular compiler in use exposes)
LLVM uses a form known as SSA (single static assignment).… Read the rest
Dictionary of arrays
Asked on the Xojo forums and since i cant post this there ..
its on IfNotNil ๐
I use this technique all the time to implement several different kinds of data structures
Very handy
Code posting
One of Xojo’s forum guidelines I dislike is
Code should be provided in your reply directly, rather than links to code on other websites or blogs, in order to maintain the postsโ viability for a longer period.
I’ve come to dislike it because sometimes code examples require more than a handful of lines of code and posting a complete example application requires it be hosted somewhere else in order to link to it.… Read the rest
Enum extender
Tired of writing methods to convert enums to strings and back ?
This little tool lets you drag enum(s) from the IDE onto it and then select the text and paste it back in to the IDE
I will write two styles of conversions – one pair as extends and one as ToString/FromString
To paste the code back into the IDE see my previous post
Pasting plain text code
If, like me, you sometime munge text into code and then want to paste it into the IDE that can sometimes be a real chore
Unless you happen to know this little trick
If you have plain text lke
Public Function ToString(extends enumValue as Untitled) as String
select case enumValue
case Untitled.valueName
return "valueName"
case Untitled.valueName
… Read the rest Who set that (and who wants to read it) ?
Sometimes you’d like to use what in other languages is referred to as a watchpoint. Some hardware support exists for this in Intel CPU’s but it is limited (there are only a handful or hardware watchpoints available.)
Or it could be done in software; but as noted on Wikipedia this is a ton slower.
Xojo really doesn’t support either type.… Read the rest
Depth first vs Breadth first
Assigns
Xojo has this great feature. You can write sets of methods that can act like LValues. That is – ones that can have a value assigned to them. Or ones that occur on the LEFT of an assignment operator.
dim i as integer
i = 9 // <<< i is an LValue
What can I do with assigns ?… Read the rest