This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - Quigibo
Pages: 1 ... 12 13 [14] 15 16 ... 135
196
« on: October 23, 2011, 03:09:54 am »
I have a small feature wish right here! Currently the percent completed meter can be meaningless if you have several included files in your program, the percent complete just seems to show random numbers because it's switching so fast. Cal84 suggested it might be a good idea to have the percent compiled for included programs separate from the percent compiled for the main program (maybe not even include it at all?) Perhaps directly to the right of the main percent, there could be a second percent when parsing included programs? Just a suggestion
That's actually impossible because Axe doesn't know how large a program is when you have included programs. It only knows the number of bytes read from the source as a percent of the total number of bytes. There is no way I'd be able to calculate the expanded size unless I made a 3rd pass to do nothing but sum up the size of all the source programs recursively. Alternatively, I could do that in the first pass so that the percent would be accurate during the 2nd pass, but most errors are caught in the first. What I probably will end up doing is adding the name of the current program being parsed to the progress so the percent means something; the progress within the current file.
197
« on: October 21, 2011, 05:49:48 am »
It multiplies 2 signed fixed point numbers, the command has never changed since it was introduced. The only time ** is used is when dealing with decimal numbers or inflated coordinate systems, which is why its in the advanced math category.
198
« on: October 21, 2011, 05:37:47 am »
I have a question: so, you import OS var by doing this, right?
GetCalc("varA"->B float{B}->A
Now, is there a way to store that A into constant?
To answer the original question for the general case of GetCalc(), there actually IS a way to store it to a constant: you can copy the contents of the file to a known free-ram location (assuming the data in the file will fit there). If done correctly, this can lead to both a speed and size optimization as well as making code easier to write since there are less arguments you need to pass around. This of course comes at the cost of overhead loading time for the copy and reduces the amount of free-ram you have left. EDIT: This probably wasn't the question you were asking, but it should help someone I'm sure.
199
« on: October 20, 2011, 05:14:46 pm »
** Is fixed point multiplication, not signed multiplication. The regular * multiplication works for both signed and unsigned numbers.
200
« on: October 20, 2011, 03:10:00 pm »
I was going to keep it secret, but I'll tell you what I'm working on right now Objects. Axe currently only has one; the file (Using the Y 0 - Y 9 tokens). I am creating a new object; the table (Using [A] - [J] tokens). Its about time too, it was something I was trying to implement when I was first sketching out possible syntaxes before I started writing the parser. A table is not a list, nor a matrix. Its more like a SQL table if you're familiar with that. The reason I'm able to have this structure in the first place is because I was finally able to optimize it enough given these invariants: - The table has a fixed column width, but can grow and shrink the number of rows.
- The ordering of rows in the table should never matter and could change at any time.
- An entry in the table cannot be accessed directly, it must be iterated to that entry to modify or delete it.
Iterators are nestable by the way. This type of structure is perfect for situations where you have to manage one or more list of objects in a room or simulation. This is exactly what you need for: Physics simulators, bullet code, collision detection, fluids, enemies, etc. I think this will be a major major utility to coders and will bring the version up to 1.1. Hopefully I can get everything working soon.
201
« on: October 19, 2011, 09:09:00 pm »
Axe.inc just includes a ton of equates like the addresses of all the variables, ram locations, constants, custom tokens, and other useful things like that. Also, it has a list of the subroutine call values required to make the Axiom inter-call other axioms and native axe routines. If you can memorize all those values or write them down elsewhere, then yes, you can definitely write the axiom on-calc with Mimas.
202
« on: October 19, 2011, 08:47:46 pm »
That shouldn't compile so I guess its a bug then. You can't assign a variable to a constant because, by definition, constants cannot change value throughout the life of the program.
203
« on: October 19, 2011, 02:33:38 am »
Oooo, that is a tricky case! I suppose that should be considered call of F instead of the variable F due to the immediate open parenthesis following. I will fix that, but in the mean time you can just use an extra parenthesis set after the addition.
Freyaday, I can't seem to replicate your error either, what were the steps you took to get to the error? I'm not sure which part of your app is the broken, the game itself runs fine.
204
« on: October 16, 2011, 04:22:36 am »
The friends button currently doesn't do anything... We're unsure if we're going to add any social features yet because simply sharing a location isn't really a social thing. I mean how often would you actually use a feature like that? We are thinking about other ways though.
One idea is like geo-tagged photos, but instead of just tagging a longitude-latitude which isn't useful at all unless you're viewing your photos on a map, it would actually tag them by the name of the place you're at and include a link to the place's page. But this has its own problems in that it takes a long time to load the GPS indoors, more than most people are willing to wait to take a photo, and you wouldn't often take pictures outside unless you were next to a landmark or something.
Another idea is doing coupons/deals, but its not very scale-able to go around and asking all the small businesses in the US if they're interested in some kind of partnership. And large companies and restaurant chains would be reluctant to do that unless we had tons and tons of users.
So we're still thinking of ways to expand it. I'd love to hear of ideas if anyone can think of a way to make the app more useful (something you would realistically use all the time).
205
« on: October 15, 2011, 10:47:19 pm »
You could use rot13 as an extremely simple encryption. If you want it more secure, just make some other mapping in memory and do a lookup. For instance: {Data('D','A','B','C')+A-'A'} For input character A, it maps 'A'->'D', 'B'->'A', 'C'->'B', 'D'->'C'
206
« on: October 15, 2011, 09:10:26 pm »
Ah, didn't think about that. I will add that next version and update the docs.
207
« on: October 13, 2011, 10:42:40 pm »
If you think that math is hard, try writing it in pure assembly O_O. Hopefully I will eventually finish that clipped line routine...
208
« on: October 12, 2011, 02:33:40 am »
Self modifying code for the purpose of speed optimization is not practical in Axe because by definition, you are modifying at the instruction level. Since Axe does not deal with assembly instructions directly in its syntax, you would have no idea what instructions to change. Instead what you want is self modifying code at the language level.
Suppose you have some long complicated routines:
:A+(B*C)-D->E
Lets say sometimes, you need to use * between B and C and other times you need a + and other times you need a - and occasionally you need a /. So instead of writing 4 routines with an if statement to pick between them, you would like to self modify the code so you avoid if statements all together for "faster" code. (May or may not actually be faster in Axe) But from a high level programming point of view, you can imagine that modifying the code directly avoids having to make an extra check against one or more if statements.
The good news is that you actually CAN do this. This is what lambdas were meant for and why they're so powerful. The code can be written like this instead:
:A+(Z)(B,C)-D->E
:λ(r1*r2)->Z :λ(r1+r2)->Z :λ(r1-r2)->Z :λ(r1/r2)->Z
Using any of the lambdas once modifies the code so that all future calls to the big routine will use the new operation until you set it something else. You can use the same method for even more complicated things:
:(Z)(5,6,Pic1)
:LOr->Z :LXor->Z :LOff->Z
:Lbl Or :Pt-On(r1,r2,r3) :Return :Lbl LXor :Pt-Change(r1,r2,r3) :Return :Lbl LOff :Pt-Off(r1,r2,r3) :Return
So yes there is a way to sort of do self modifying code in Axe, but other than making it easier to code, it doesn't really optimize anything since SMC optimizations can really only come from the instruction level.
209
« on: October 10, 2011, 01:19:06 pm »
Yeah, I'm trying to figure out how to statically compile and I'll re-upload it when it works. The DLLs together should be about 13MBs. For now, you can always download Qt and it will install everything you need. In particular, I'm using version 4.6.3. This new version works on all midi files.
210
« on: October 10, 2011, 02:21:49 am »
Here is an incredibly inefficient and slow way to do an "ex h,l" but its impressive that it uses no extra registers or memory. Even the carry flag is preserved:
ExhHL: adc hl,hl adc hl,hl adc hl,hl adc hl,hl adc hl,hl adc hl,hl adc hl,hl adc hl,hl rl l You could do the same strategy with any 2 registers, although none as efficiently. I guess this could be theoretically useful in a non-time sensitive situation when you need to do an exchange but all registers are in use including SP (so no stacks) and there is no more free ram, but I doubt anyone would be in that situation.
Pages: 1 ... 12 13 [14] 15 16 ... 135
|