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 - harold

Pages: [1] 2 3 ... 16
1
ASM / Re: Shifting data block down a nibble?
« on: March 22, 2017, 11:21:54 am »
The relevant instruction is RRD, it's not very fast but it seems like nothing is ever fast on z80..

You can do something like
Code: [Select]
  xor a
_shiftloop:
  rrd
  dec hl
  djnz _shiftloop
Maybe inc hl, depends on the endianness of your buffer.

2
ASM / Re: Should I learn ASM?
« on: February 25, 2017, 06:38:08 am »
When you're done with 28 days you can just start coding anything you like, you'll improve as you do it

3
Other / Re: 131kb RAM in TI -84+SE?!
« on: January 14, 2017, 04:09:40 am »
128kb = 128*1024 = 131072 bytes, so they're just using the decimal SI prefixes.

4
Computer Projects and Ideas / Re: haroldbot (theorem prover / solver)
« on: June 22, 2016, 10:04:56 am »
0x80000000 is also 2147483648 though, just read it as unsigned. -2147483648 and +2147483648 are in the same equivalence class modulo Z/232Z so in that sense they're not even different values

E: in general with haroldbot 2 I've followed the philosophy that the operation is typed, not the values (which are just bitvectors). I think that having it not be an error fits that philosophy, but ultimately the deciding factor is what behaviour is most useful, I've not made up my mind about that yet

5
Computer Projects and Ideas / Re: haroldbot (theorem prover / solver)
« on: June 22, 2016, 03:34:07 am »
It doesn't even work right now (oops) (E: works now, without error though), and whether it should error is sort of debatable.. it errors on x86 with the justification that 0x80000000 has no positive equivalent. So it overflows, and x86 division considers overflow an error - usually such overflow would be caused by dividing a very large number by a not large enough number (since it divides a 64bit number by a 32bit number, it can easily be the case that the result does not fit in 32 bits), 0x80000000 / -1 is the only case that overflows without needing a dividend with more bits than the results.

On the other hand, 0x80000000 is a fairly legitimate result for 0x80000000 / -1, because -0x80000000 = 0x80000000.

6
Computer Projects and Ideas / Re: haroldbot (theorem prover / solver)
« on: June 10, 2016, 11:16:41 am »
It's symbolic, it can do concrete calculations too, that's necessary of course but also in a way a side effect of the symbolic engine. It's not terribly useful as Plain Old Calculator though.

The bot on OIRC is dead because I lost my nice host that would let me run an IRC bot, I could find a new host I guess, but it wouldn't be the same as the website any more (it used to be the same program running the site and the IRC bot, though in IRC mode it kept its output short). The website is purely client side now, makes it a lot easier to find free hosts. So it's all in JS now, no more Java. I could dig up my little project to use Eeems' JS bot-framework with haroldbot, and then I'd still have to host it somewhere.. it could be done

Everyday's life problems though, I think that's more something for wolfram alpha. But perhaps I can explain just what it is that haroldbot does, without going too far into the technical details.

The fundamental difference between haroldbot and the average symbolic math thing is that it works with 32 bit integers. The usual tools typically have no (easy) way to do that (WA can do some of it, but it's awkward), but I needed it, so I filled the gap. This directly results in, for example, x == -x having the solution 0x80000000 as well as the usual 0, and x*3 == 1 having the solution x=0xAAAAAAAB.
The most important use case is testing whether two expressions (with variables in them) are equivalent, with all the math still being doing on 32 bit integers, so it can be useful when debugging some weird bithack you thought of. It can even give a proof in some cases (usually not), which serves two purposes: show that it didn't just lie (the steps can be checked, if it just said "well, they're equal" it's harder to trust that it's right) and, sometimes, show why something is true (for sufficiently legible proofs).

7
Computer Projects and Ideas / Re: haroldbot (theorem prover / solver)
« on: June 09, 2016, 01:09:11 pm »
Since version 2.0 is out (has been for a while actually) a small update.
A bunch of features that never really worked well are not in 2.0, such as functions, let-guards (what even are those, you're probably wondering), solve-with-arguments/universal quantification and the weirdest feature ever, "loop".

They probably won't be back, unless anyone complains. No one used them except to try them out. Solve-with-arguments was actually quite powerful, but I guess no one understood what it does (I'm not sure I understand it myself tbh), annoying to implement though.

The SAT part doesn't work properly so if you use queries that are too hard for BDDs it will just fail in some obscure way.

8
Math and Science / Re: Possible ninth planet?
« on: January 22, 2016, 05:22:54 am »
This was also how Vulcan was not discovered, but that shouldn't affect a planet way out there much.

9
Math and Science / Re: Possible ninth planet?
« on: January 21, 2016, 10:42:56 am »
It's a bit.. tenuous. Having that thing there is consistent with observations of other orbits and could possibly explain them, but that doesn't necessarily mean it's there. A direct observation would make it infinitely more interesting.

There is a lot of crap going around the sun at large distances, it doesn't have to be so simple as a single large object to fix it all. In a way, perhaps it's even more interesting if it turns out to be not so simple.

10
TI Z80 / Re: TI-OS Optimizations
« on: July 13, 2015, 08:09:23 am »
How is this going? Any news?

11
Ok see, you don't have to take an inverse to solve a system of equations. Say you have Ax = b, then you can make the matrix [A|b], take the RREF, and you have your answer, that's even how you'd do it manually (right?). With numpy you don't even need that, you can just do numpy.linalg.solve(A, b)

12
Can't you avoid taking the inverse? It's usually not necessary, most of the time you can use basic linear algebra to rewrite it in terms of "taking an RREF of an augmented matrix", things like that. Obviously it depends on what you're doing with it though.

13
The Silver has a ton more flash memory

14
TI Z80 / Re: TI-OS Optimizations
« on: April 11, 2015, 08:54:32 am »
I'd like to see faster graphing, some of the things you mentioned will already do that as a side effect but it could probably benefit from some direct attention.

15
Other / Re: TECHNOLOGY EMERGENCY!
« on: March 19, 2015, 03:45:05 pm »
x86 still?
Start here: http://events.linuxfoundation.org/sites/events/files/slides/bpetkov-x86-hacks.pdf
Not all of that. But pay special attention to the general instruction format, ModRM, SIB, basic opcode groups. See the manual for more.

Pages: [1] 2 3 ... 16