News for hackers. Stuff that matters.

pantantrant

After a finite amount of time, it will either report "Halt" or "Infinite Loop", but my program won't take forever, just a finite amount of time.
My program won't misidentify an very long loop as infinite, it'll just run the practically infinite loop in a finite amount of time and not trigger it.

Well, my program basically detects if a infinite loop is of 1 iteration or two iterations or three iterations or ... iterations, but only infinite loops and not finite loops and in a finite amount of time. This means that finite loops don't trigger my program ever, only infinite ones after a finite amount of time.

TLDR: A turing machine can run my program and determine whether any other program halts or infinite loops in a finite amount of time, never infinite only if the variable n can be infinitely large.

Well, my algorithm only says that it's an infinite loop if it actually is an infinite loop, not a "this loop has been running for 30 seconds" like the Linux Kernel has.
Yes, this infinite loop solver would take longer than the universe's age to print all possible configurations of this 4k monitor, but it would take a finite amount of time as opposed to infinite. (Provided that the integer n is big enough as a arbitrary precision fixed point unsigned integer)
A turing machine has unbound memory, so this isn't a problem.

Example:

ax is a 2 bit register initialized to 0.

100: add 1 ax

101: jmp 100

ax is 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3

0 is compared to 1, 1 is compared to 3, 3 is compared to 2, 2 is is compared to 2, wait, that's an infinite loop...

Example:

ax is a 2 bit register initialized to 0.

100: add 1 ax

101: jmp 100

ax is 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3

0 is compared to 1, 1 is compared to 3, 3 is compared to 2, 2 is is compared to 2, wait, that's an infinite loop...

Am open to constructive criticism: My Halting Problem solution

I may be wrong about this, feel free to offer constructive criticism:Step 1: Load the program and initialize my Halting Problem program's variable n to 0.Step 2: Save the register context (meaning all the values in all the registers in a CPU) to memory location A.Step 3: Step variable n + 1 instructions.Step 4: Save the register context (meaning all the values in all the registers in a CPU) to...

( Read More... | 15 comments | 3 points | on HN )
Re:Ask HN: What laptop are you using to daily drive Linux? on Saturday March 02, 2024 @07:42PM (#39577261)
Everything works except the HDMI port on Linux, so I can't use it as a monitor (haven't tried it on windows). Also got a Lenovo Wireless Keyboard and Mouse combo to go with it, basically a monitor sized laptop.
Re:Ask HN: What laptop are you using to daily drive Linux? on Saturday March 02, 2024 @07:26PM (#39577157)
I like a all in one that comes with a battery, the HP Envy Move. I really can use it like a laptop and it has a 23.8" touchscreen.
Re:GoboLinux on Tuesday February 27, 2024 @10:25PM (#39533588)
Both aren't that reproducible, I keep running into sha256 hash nondeterminism when upgrading packages on nixos from source after not updating for a while and guix may be better at this.
Re:GoboLinux on Tuesday February 27, 2024 @10:22PM (#39533569)
I tried it and I'd rather # make install to install a program and # make -n install | xargs rm -rf to uninstall a program.
Re:GoboLinux on Tuesday February 27, 2024 @10:19PM (#39533554)
I've tried GoboLinux, I think it's better to just # make install and to uninstall, # make -n install | xargs rm -rf or Solus Linux's package manager. (Currently using CachyOS on a comfy HP Envy Move with a comfy Lenovo Wireless Keyboard and Mouse combo, my shameless plug.)
Re: on Tuesday February 27, 2024 @06:28PM (#39531675)
Hi
Re:Is it possible to think about nothing? on Monday February 26, 2024 @02:06PM (#39515521)
I do that all the time.
Re:Google Chrome's new AI can finish your sentences for you on Thursday February 22, 2024 @12:18PM (#39470124)
Finally, I'm not on parole or in the slammer.
I edited my post so if two candidates get 43% or more then restart. Thanks for the correction. Or it not restart but something else, am open to changing my mind. (see ChatGPT reply below)
I changed the printf line of code to this (printf("%2x", integer);) to make it a pseudorandom number generator and made a post about it https://news.ycombinator.com/item?id=39462913 (10 Lines of code 3.4 bits of noise per byte weak pseudo random number generator)

I compiled it, ran ./vitalixprng &> output.txt and then ran Detect It Easy's entropy measuring tool on output.txt to give me around 3.41 bits of randomness per 8 bits.

It outputs 2 hex characters (hex character = half byte = 4 bits) per clock cycle.

It gives out pseudorandom output that looks like this:

28595827262617506937569201755869372950673748294758392

Which such systems have a system where ideas that are 43% or greater usually win? I want to know.

Edit: My dad says that Ukraine has such a system where 40% or more, cool.

What if there's a voting system where one needs 43% or more to win? (explained)

In my previous post, I made a pseudo random number generator (licensed under the Public Domain) where every bit is 42.5% random in 10 lines of code and it outputs a byte every clock cycle. Thoughts on this?Basically, it's a filter against my simple pseudorandom number generator so it keeps narrowly losing and winning for it is an extreme rarity.To win, one idea gets 43% or more of the votes. If...

( Read More... | 8 comments | on HN )
Licensed under Public Domain
I was looking for oeis.org today thanks. (Was thinking about a online list of interesting numbers in mathematics)

Also today found out that there's one exception, it generates a 3 which is prime.

Replace the printf line with printf("%1d", integer); to turn it into a pseudorandom number generator where the seed can be changed and the size of the integer can be changed (iterations before it repeats)

Maybe the mentors were the friends we made along the way
Re:Ask HN: If AGI is achieved – what happens next? on Saturday February 17, 2024 @10:12AM (#39410127)
I make a lot of money.
Re:Is Go fast enough for large computations? on Wednesday February 14, 2024 @07:40PM (#39377650)
const int randomnumber = 4;

// It was picked with a dice roll.

Ideas like the kernel and tiny c compiler being binaries but every other program is just source code that’s interpreted but not compiled by the tiny c compiler because source code is just data and not instructions. Also this helps with ease of debugging and editing mods. And currently there is serial port input and output but I can’t get it to boot like I could years ago (I wrote this for fun to see if I could)

Donations are welcome: https://www.gofundme.com/f/a-fpga-chip-that-works-with-zero-... and https://www.gofundme.com/f/formula-one-drift-by-squirting-wa...

Edit: The kernel doesn't have to be a binary, that's right, only the tiny c compiler needs to be a binary, the kernel can be interpreted and so can everything else.

It's about executable size not lines of code that's what I mean by code size.

I figured out how to build chromium with -Oz in guix:

In chromium.scm, I edited

(cons "--enable-custom-modes" ,flags))))))

into

(cons "--enable-custom-modes -Oz" ,flags))))))

Older »