Show Posts

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 ... 21 22 [23] 24 25 ... 135
331
The Axe Parser Project / Re: Axe Parser
« on: July 01, 2011, 07:32:48 pm »
I am thinking of making another somewhat major change.

I'd like to change the colon ":" to an inline separator rather than an end of line separator.  That doesn't sound like a big change, but it is if you use the colon and don't close your parenthesis.  For instance, currently "sin(B→C:A" parses as "sin(B→C):A".  But by making the colon an inline operator, it would instead translate to "sin(B→C:A)" which I think is more useful and intuitive.  If you've been closing your parenthesis like you should be, then there won't be any ambiguity so this would only affect those that don't close them regularly.  The reason for this is that currently there is no way to separate expressions within a single line (something you can parenthesize).  Spaces used to work because you could do "(A→C B→A C→B)".  However, this now translates to "(A→CB→AC→B)" since multi-lettered variables are now valid.  Spaces are not supposed to contribute to syntax so I wouldn't want to abuse them like that anyway.

Thoughts or complaints?

332
Humour and Jokes / Bleem: The secret integer between 3 and 4
« on: June 30, 2011, 05:34:51 pm »
http://www.strangehorizons.com/2000/20001120/secret_number.shtml

Here is the pasted text bellow if you want to read it directly, I thought it was pretty funny and fun to read :P


Dr. Simon Tomlin studied the man sitting across the table from him. Rocking back and forth in his chair, with his shoulders slouching, his eyes darting all around the room, and his upper lip twitching every few seconds, the man conveyed a distinctly squirrel-like impression. It was hard to believe that, before his breakdown, this man had been one of the foremost number theorists in the world.

"How are you today, Professor Ersheim?" asked Dr. Tomlin.

"Fine, fine, thank you, just fine," replied the man without looking at him.

"Have you been sleeping all right?"

"Oh, yes, I've been sleeping quite well, sleeping like a baby," replied Ersheim, nodding vigorously in sync with his rocking. Still no eye contact.

"That's good to hear."

Ersheim suddenly stopped rocking and looked straight at Tomlin, eyes bulging. "Oh, cut the nice-guy act, Doctor," he said sharply. "I know you think I'm crazy, don't you think I know you think I'm crazy? That's what everyone thought about Laszlo Bleem, too; that's what they want you to think." He stared at Tomlin, not moving, not blinking.

"Who are you talking about, Professor? Who wants everyone to think you're crazy?"

"The numbers, Doctor, the numbers. They say that numbers don't lie, only they do, they lie all the time, they've always lied. But not to me -- oh, no, I see through their deceptions, I know what they're hiding," said Ersheim. He started rocking again.

"And what would that be, Professor?"

"Bleem, that's what. Bleem!" shouted Ersheim, banging his fists against the desk. He then leaned close to Tomlin and whispered, "The secret integer between three and four."

"We have been over this, Professor -- there is no integer between three and four."

"Tell that to Laszlo Bleem, Doctor," said Ersheim. "Only you can't -- he's dead," he added, giggling. Then he whispered, "He died for trying to expose bleem."

"Laszlo Bleem died in a car accident, Professor."

"Oh, grow up! The man published a paper detailing his discovery of an up-until-now unknown integer somewhere between one and twenty, stating that he was working on a proof of its existence and exact location, and a week after the paper is published -- poof! Bleem dies in a car crash, and his house burns down, destroying all of his written notes. The next day the computer system at his university crashes, erasing all of his electronic notes. Bleem got too close, see, and he was eliminated. Just as I'm going to be, if you don't listen to me."

At this point, Tomlin decided that it was time to play his trump card.

"All right Professor, let's say that there is, as you say, a secret integer between three and four. Positive integers are counting numbers, right?"

"That's right, Doctor," nodded Ersheim, and then, as if to confirm that fact, he began counting, moving his head from side to side: "one, two, three, bleem, four . . ."

"That's enough, Professor," interrupted Tomlin. "Now, if bleem is a counting number, that means that you can have bleem of something."

"Of course," said Ersheim. "I didn't know you were a mathematician, Doctor." He looked at Tomlin with what was probably meant to be a smile, but looked more like a scowl.

"Just bear with me, Professor," said Tomlin as he reached into his pocket and drew out a little plastic bag.

"What's that, Doctor?" asked Ersheim.

"Jelly beans," said Tomlin, smiling, as he tore open the packet and emptied its contents, about two dozen multicolored jelly beans, onto the desk.

"Now Professor Ersheim, I'd like you to please separate bleem of these jelly beans from the rest," said Tomlin, a self-satisfied grin on his face.

"All right," said Ersheim, and reached over and moved three jelly beans over to his side of the desk. He looked at them with suspicion, then looked back at the main pile, then back at the three lying before him, and quickly grabbed another one and put it next to them. He studied the four jelly beans for a moment, then slid the fourth one back toward Tomlin, but when it was about halfway to the main pile, he snatched it back and added it to the three, visibly agitated. He then picked up each of the four jelly beans and held it up to his eyes, turning it this way and that, looking at it with deep mistrust. When he had inspected all of the jelly beans, he sat back in his chair, a look of frustrated resignation on his face.

"I can't do it, Doctor," he said.

"So bleem is not an integer after all," said Tomlin triumphantly.

"No!" screamed Ersheim and swept his hand over the desktop, sending the jelly beans flying all over the room. "Bleem exists! Something prevented me from separating bleem jelly beans! I could have three or four, but not bleem!"

"Calm down, Professor. I was here, I watched what you were doing, and there was nothing restraining you, nothing preventing you from separating out bleem jelly beans except for the fact that bleem doesn't exist."

"But it does exist," said Ersheim timidly. He added, with growing conviction, "It does exist. And I can prove it!"

"How can you prove it, Professor, if you insist that there is an omnipresent, invisible force keeping it secret?"

"Remember, Doctor," said Ersheim, his tone conspiratorial, "that I'm a mathematician, and a damn good one. All of mathematics has been doctored in order to conceal bleem's existence, see, but it wasn't doctored perfectly, oh no. There is an obscure branch of number theory that I helped invent about twenty years ago, and I think I can apply some of its theorems to prove that, in order for mathematics to be consistent, there must be an integer between three and four. That was the topic of my lecture during which I was so rudely interrupted by several of my colleagues and lost my temper."

Lost your temper indeed, thought Tomlin. It had taken two weeks to repair all the damage to the lecture hall.

"Those colleagues didn't seem impressed by your proof, Professor," said Tomlin.

"That's because I haven't worked out all the particulars of the proof yet," said Ersheim. "And even if I had, none of those idiots knows the first thing about my research," he added angrily. "But I'm close, Doctor, I can feel it. Just let me out of here, let me return to my research, and I'll have the proof in just a few months. Or at least allow me access to a pen and some paper so that I can work in here."

Ersheim was clearly agitated, so Tomlin decided not to aggravate him further.

"All right, Professor," said Tomlin, "I'll think about what you've told me. I just have one more question for you."

"What's that, Doctor?"

"What possible reason could anyone have to keep secret the existence of a number?"

"I'm not sure," said Ersheim, shaking his head. "Perhaps bleem has some mystical properties -- don't give me that look, Doctor -- or is believed to have them. Numerology has always had a fanatical following." After a moment's pause, Ersheim's face lit up with excitement. "Or perhaps the knowledge of bleem would allow us to attain a much higher level of mathematical sophistication. It might allow us to come up with a mathematically viable theory of time travel, or faster-than-light communication, or who knows what else."

"I see," said Tomlin, "and you really think the discovery of bleem might make these things possible?"

"I don't know, but who's to say it won't?" said Ersheim with a shrug.

"I see your point," said Tomlin. "Well, Professor, I'm very glad we had this talk. You've given me a lot to think about. I'll see you in a couple of days."

They shook hands, and Ersheim left the room. Tomlin sat there for a while, looking at the jelly beans strewn about on the floor.

How sad, thought Tomlin, that a man who has devoted his entire life to the study of numbers should come to think that those very numbers are out to get him. It made sense, of course, that the paranoia manifested itself in relation to something that Ersheim was already obsessed with.

Tomlin was not entirely pleased with that afternoon's session. He had hoped that the jelly bean example would force Ersheim to see the absurdity of his position, but all it did was aggravate him. Still, such a strong reaction indicated that perhaps Tomlin had hit upon a sensitive spot in Ersheim's delusion.

Satisfied that some progress had been made, Tomlin packed up his things and went home. Before leaving the hospital, he instructed the attendants who watched Ersheim that their patient should under no circumstances be allowed access to writing materials.

Tomlin had trouble getting to sleep that night. Every time he closed his eyes, he was confronted by visions of an army of giant numerals closing in on him, guided by a shadowy shape that was bleem. Frustrated, he pulled out a notepad he kept by his bedside, and wrote down the numbers between one and ten. They look so harmless, he thought, just squiggles on a sheet of paper, and yet numbers lie at the foundation of science, and thus make modern civilization possible. He looked at them again, with more respect, and mentally read them off, one by one. One, two, three, four, five, six, seven, eight, nine, ten. They were all there; there was neither need nor room for bleem. His mind finally at ease, Tomlin went to sleep.

He was awakened next morning by the ringing of his telephone. It was Gene, one of the attendants from the hospital. Ersheim was gone.

Tomlin rushed to the hospital. Upon arrival, he was greeted by Gene, who explained to him what had happened, denying responsibility at every opportunity. Ersheim had been fine at ten the previous evening, when Gene last checked on him, but when Gene made his morning rounds at six, Ersheim was not in his room. Ersheim's door was locked from the outside, and the night watchman reported nothing out of the ordinary. As far as anyone could tell, Ersheim had vanished into thin air.

"I think you should see his room," added Gene when he was finished.

Tomlin followed Gene to Ersheim's room. When he saw it, his worst fears were confirmed.

The walls of the room were covered with equations. Rows upon rows of mathematical symbols, most of which Tomlin did not recognize, written by an unsteady hand in reddish purple ink. Ersheim had to have worked nonstop all night by the light of the moon.

Looking around the room, Tomlin noticed in one of the corners a little pool of what must have served as Ersheim's ink. He walked over to it, and found a plastic cup that had been knocked over. Dipping his finger in the ink, he tasted it. Grape juice. Floating in the puddle of juice was a crude writing implement fashioned out of a drinking straw. Piled up in another corner of the room were all of Ersheim's clothes. There was no sign of Ersheim himself.

"Looks like he left us a little snack," said Gene from behind Tomlin.

Tomlin turned around to see Gene standing next to the night table. Gene was reaching for one of three small dark objects lying on the table.

"Don't touch those!" yelled Tomlin.

"They're just jelly beans, Doc," replied Gene, as he flicked one of them into the air.

Tomlin watched in horror as the jelly bean described a parabola in the air, ending up in Gene's mouth.

"Want one?" asked Gene, motioning at the remaining jelly beans.

Tomlin looked down at the night table. There were three jelly beans on the tabletop.

333
Axe / Re: Using AppVars, more help!
« on: June 30, 2011, 04:31:30 am »
If you want to copy the contents of an appvar to the TI-OS Pic1, you could do it with this one line of code.  However, I would do the checks that I'm ignoring to make sure the appvar exists and that there was enough ram to create the picture if it didn't already exist.

Code: [Select]
Copy(GetCalc("appvMYAPPV"),GetCalc("Pic1",768),768)
If you mean to copy it to the buffer for drawing over, then you would do this:

Code: [Select]
Copy(GetCalc("appvMYAPPV"),L6,768)
Since appvars could be located anywhere in RAM you cannot refer to them with static pointers such as Pic1, you would have to use variables instead.

334
Hmm... somebody needs to test IM 2 with TI-83+SE. If it's always 0xFF, then this might be a useful fact for programs meant to run only on 15MHz calcs.

I know for a fact that the 84+BE has predictable IM2 vectors whereas the 84+SE does not.  This was the major bug I found when I first released Pyoro.

335
Those might get peephole optimized eventually, so I don't want to spend time on that feature right now.  I realize now that a lot of optimizations I've already done could have been done via peepholes instead of special casing and it would have been a whole lot easier to code and more generalizable.  I'm currently only doing the most conservative peephole ops right now and its already reducing all code by about 1-2% on average.  I'm thinking I can get this to over 5% eventually, especially in code that is not already hyper optimized.

Also, I don't want to remove the port 6 stuff in because I think it potentially allows more advanced paging Axioms to use the regular interrupts.  Plus it would be annoying to change.

336
Miscellaneous / Re: Marathon
« on: June 29, 2011, 11:48:48 pm »
@z80man
Actually, this morning I ran the furthest distance so far in my training: 18 miles!  And I did it in 2 hours and 22 minutes so I've actually kept a 7:53 pace even with that distance which means my once unrealistic goal seems more realistic now.  My next and longest run before the actual marathon will be a 22 mile run after which I will gradually lower the distance until the marathon.  Also my brother works at a running shoe store so he already hooked me up with some really nice shoes, cushion insoles, synthetic material socks, and energy gels.  I also bought a really tiny mp3 player that I wear on my shoulder and it really helps me stay focused as I run and I use it to gauge my time as well since I setup the playlist in a particular order prior to running.  Luckily, the SF marathon starts at 5:30 in the morning so it probably won't be very hot and I won't have to worry about the heat like I did when I was training in L.A.

@mrmprog
You'd basically be on a motorcycle then ;)

337
Axe / Re: Using AppVars, more help!
« on: June 29, 2011, 06:59:33 pm »
Strings are static pointers meaning that they are always constant and always defined.  Putting them in If statements doesn't do anything, it will behave as if you had put them in the beginning of your file (which you should always do by the way).  Also you might want to consider copying the file names in L1 so you can easily edit the ending number.  For instance:

Code: [Select]
:.Input: Arg1 = File number to look up
:Lbl GET
:Copy("appvBLUTCH1",L1,9) .Copy the name to L1
:r1+'0'->{L1+7} .Overwrite the last character
:Return GetCalc(L1) .Find the appvar

Then all you have to do to look up files is sub(GET,N) to get the pointer to the Nth file.

338
Axe / Re: Axe Q&A
« on: June 28, 2011, 04:50:10 pm »
They're the same for variables, but usually smaller/faster for memory locations.

339
The Axe Parser Project / Re: Bug Reports
« on: June 28, 2011, 03:37:27 pm »
Actually instead I will fix it to not update the appvar settings so you won't need that bit anyway.

340
The Axe Parser Project / Re: Axe Parser
« on: June 28, 2011, 03:34:49 pm »
I mean I will release it to a few people just to get rid of any obvious bugs I missed and then release it publicly a few days later.  This is only because I want this version super bug free and I still need more time to update the rest of the documentation.  My change-log list for this version is nearly a page now and about 50% of the core routines got rewrites so that makes me nervous to release right away.

341
ASM / Re: Simple tilemapper
« on: June 26, 2011, 09:54:42 pm »
Does your routine preserve all the registers you use after the routine?  For instance, if b is being incremented/decremented, but not preserved by the routine, you need to push its value before calling it and pop it afterwards like this:

Code: [Select]
  ld   b,8
Loop:
  push bc
  call SpriteRoutine
  pop  bc
  djnz Loop

Otherwise b's value will be scrambled after it returns from the call.

342
The Axe Parser Project / Re: Features Wishlist
« on: June 23, 2011, 11:57:28 pm »
Remove the scope restrictions on commands? I was just working on a pretty beastly optimization using the value returned by Copy() in the middle of a line, but Axe won't let me. :(

Also, do you think the /10 "optimization" should be removed? It results in smaller code, but also much slower code.

The scope restriction I might remove for that command, the main reason I have it is because I don't want it used inline or else that implies that it has a defined return value (which is what you're trying to do) yet its still possible it could change in the future for a better optimization or something.  I don't think the Copy() command could possibly get more optimized though, but I'd at least have to change the documentation about it to describe the return value and also decapitalize the "C".

For division by 10, I figure that if you're dividing by a constant 10 you're most likely not using the division for speed critical math and are probably doing something with digits, which don't need to be fast generally.  If speed was really critical, you should be using one of the other auto-ops for division or just use /(10) instead of /10.

343
The Axe Parser Project / Re: Bug Reports
« on: June 23, 2011, 06:29:52 am »
Should be fine... Have you tested the previous version on real hardware?  Grayscale DispGraphs used to not work in 15MHz mode but the emulator would never show that.  If you didn't put a Normal before and a Full after in the old version then you had a bug in your code.  But now, this is automated for you, so that bug can no longer exist and all DispGraph commands run at their proper speeds, so that could have been the reason.

344
TI Z80 / Re: Willi - Axe contest entry 2011
« on: June 22, 2011, 05:51:37 pm »
You might also want to exclude the top row from your maps, it looks like you get cut off by the text.  Cool game, reminds me of Dig Dug a little.

345
TI Z80 / Re: Axe parser game
« on: June 22, 2011, 05:44:18 pm »
Yeah, this is only special to Axe since the executables never call Ion/MOS/DCS routines so they can actually be run without the shell.  In the case of MOS and DCS shells, you could also theoretically run those without the shells, but you would need some other program to launch them with the right entry point.

Pages: 1 ... 21 22 [23] 24 25 ... 135