You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

### 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 - Snektron

#1
##### Contests / Re: Code Golf Contest: The Pythagorean Problem
August 17, 2017, 02:51:35 PM
Quote from: c4ooo on August 17, 2017, 02:15:48 PM
Quote from: Juju on August 17, 2017, 05:22:51 AM
Depending of the language you use, it is possible to check if your integer is an integer. As in, you can cast your float into an int, if it didn't lost information it's an integer.
Yep. In a float, the first byte is almost always a signed exponent, so as long as it is >=0 its an integer (unless I got something mixed up). This should be useful if someone does the challenge in assembly.

thats not true, because the mantissa (other part of the float) is a fraction part: (1/16 + 1/8)*2^3 is 1.5, but it still has a positive exponent.
Instead you could check if the mantissa is clone enough to zero: if its smaller than 0.00001 for example is probably an integer. I think most is_integer() functions will work this way.

My solution actually uses this:
`#define mainImage(O, U)O+=sign(fract(length(U-.5)))`
O is the output color, U is the input coodinate plus 0.5. length() is just sqrt(U.x*U.x + U.y*U.y).
fract takes the fraction part of the float (the mantissa). Sign(x) returns -1 if x < 0, 0 if x == 0 and 1 if x >0. I think the sign function internally also compares x to some small value.
#2
##### Contests / Re: Code Golf Contest: The Pythagorean Problem
August 17, 2017, 11:35:21 AM
you havent updated the standings yet, juju
#3
##### Contests / Re: Code Golf Contest: The Pythagorean Problem
August 16, 2017, 11:41:34 AM
`#define mainImage(O, U)O+=sign(fract(length(U-.5)))`
50 chars / 51 bytes
its bigger than 64x96 though so you'll just have to resize your browser.
#4
##### Other / Re: Your post/coding Milestones!
August 16, 2017, 11:07:23 AM
hes onto me
#5
##### [Inactive] KnightOS (TI-73/83+/84+/CSE) / Re: KnightOS Updates
July 01, 2017, 12:42:03 AM
I actually got everything from the SDK to work, even the tool that converted a folder structure into a knightos filesystem. It took a damn amount of research to find out how to tell if a folder is a symlink in windows . I dont think i ever pushed it though...
#6
##### Media Talk / Re: Digital or physical? (games, music, movies)
June 24, 2017, 04:51:51 PM
I like digital copies more because
1) i can get games instantly
2) i can pirate games
3) some games aren't even sold physically
4) how do they even get 40 GB games on disks nowadays? im not really in the mood for using 8 installation disks
5) also i feel like they tend to be cheaper.
#7
##### [Inactive] gLib 3D polygon library (TI-83+/84+/CE/83PCE) / Re: 3D models - A call To Arms [3d][z80][ez80]
May 09, 2017, 05:38:07 PM
Wans't there a walrii 3d model? that seems like a good main character
#8
##### Tech, Science & IT / Re: Do you have x86 or x64 hardware? [2017 POLL]
April 13, 2017, 06:42:37 PM
if you still run 32-bit you must have not upgraded since 2007
#9
##### General Help / Re: C Programmers, Help With Raycasting Algorithm Needed
March 25, 2017, 02:50:33 PM
Non euclidean, but yes
#10
##### PC, Mac & Vintage Computers / Re: Programming Ideas
March 25, 2017, 02:47:46 PM
I don't know if you can at the moment, what with the 2048 bit rsa key and all. Not sure if that only applies to apps though.
#11
##### General Help / Re: C Programmers, Help With Raycasting Algorithm Needed
March 25, 2017, 12:28:39 AM
I made a nice raycaster a while back: https://github.com/QuantumInfinity/AntiCaster It needs some updating though, since i could optimize out a square root.
Also i should change to a better build system than eclipse project builder... IF i ever get around to it. Anyway maybe you could learn something from the source, though its probably quite complicated and
not very well commented (read: not at all).
#12
##### Randomness / Re: Forum Game: Counter!
March 23, 2017, 09:14:17 PM
Hang on, what happens if you don't post anything related to your posts number? (Also: you broke your own rules by posting more than twice this week )
#13
##### Randomness / Re: Forum Game: Counter!
March 23, 2017, 08:51:57 PM
Well it didn't take long for you guys to lose track of the count.
Also i am 10 because i have a 10 inch c
#14
##### Gaming / Re: Konami expects you not to ask for support on their games
March 12, 2017, 03:17:30 AM
I thought konami was doomed since they stopped making that silent hill game.
#15
##### [Inactive] gLib 3D polygon library (TI-83+/84+/CE/83PCE) / Re: [gLib][3d][z80][ez80] gLib a fast 3D asm/axiom library
March 09, 2017, 09:50:06 PM
Really cool! I wonder if someday there'll be a 3D plotter that uses this. It seems the perfect base.
Website statistics

MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators