WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Recent Posts

Pages: 1 ... 8 9 [10]
91
TCE Talk / Re: New package manager
« Last post by wysiwyg on January 23, 2026, 11:59:22 AM »
I've been notified that the package is now live for the x86 and x86_64 variants of TC.  Still waiting on inclusion for the Pi's.

Please provide any feedback for the project - especially any bugs.  None are currently known, but if any are found, I can fix them.
92
Raspberry Pi / Re: Rust on piCore: Computing π to 10,000 digits
« Last post by geev03 on January 23, 2026, 11:10:00 AM »
Code: [Select]
use rug::{Float, Integer};
use rug::ops::Pow;

const A: i64 = 13591409;
const B: i64 = 545140134;
const C: i64 = 640320;

fn main() {
    let digits: u32 = 100_000;
    let prec: u32 = (digits as f64 * 3.5) as u32;

With the above code as 'main.rs', it is giving th expected output is finally there ...

root@box:/home/tc/pi_calc2/target/release# ls
Code: [Select]
build/       deps/        examples/    incremental/ pi_calc2     pi_calc2.d
root@box:/home/tc/pi_calc2/target/release# ./pi_calc2
3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282

93
TCE Talk / Re: New package manager
« Last post by wysiwyg on January 23, 2026, 10:53:09 AM »
Hey s1ckn3s5!

The distro is called XiniX.  It was originally forked back in 2017:

https://forum.tinycorelinux.net/index.php/topic,19366.0.html

It is very dated at this point and would be considered a security nightmare due to the outdated software.  I'm in the process of slowly reviving it to the current version of TC, but being a one man show with various projects makes it a slow process.  I'm going to be porting several of the projects used with it over to TC as they are being updated over the coming months.

If you or anyone else has any questions about it, it would be best to DM me.  This is a forum for TinyCore after all :)
94
Raspberry Pi / Re: Rust on piCore: Computing π to 10,000 digits
« Last post by geev03 on January 23, 2026, 09:51:15 AM »

Outputs π to 10k digits on a Pi 400 without issues. 


Looking again, there is an issue with the code. The value of Pi is NOT "3.92..". Now compiling another code...

Code: [Select]
root@box:/home/tc/pi_calc/target/release# ls
build/             examples/          pi_calc            picorepi.txt
deps/              incremental/       pi_calc.d          picorepi.txt.save
root@box:/home/tc/pi_calc/target/release# ./pi_calc
3.926009437285052832929674253952655321963427871984921170640715706070289694520275370741966576393802824749249195563563914991063978437861359728305354317459983402318064085941521245980071440987892054335406062657458
95
Raspberry Pi / Re: Rust on piCore: Computing π to 10,000 digits
« Last post by geev03 on January 23, 2026, 09:08:44 AM »
Hi geev03

Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:


Thank you.

Sysinfo used  is here

Code: [Select]
#!/bin/sh

# Ultra-minimal system info script for piCore / BusyBox
# with TinyCore + Raspberry Pi hybrid ASCII logo

HOST=$(hostname)
KERNEL=$(uname -r)
ARCH=$(uname -m)
UPTIME=$(uptime | sed 's/.*up \([^,]*\),.*/\1/')
LOAD=$(cut -d " " -f1-3 /proc/loadavg)

CPU_MODEL=$(grep "Model" /proc/cpuinfo | head -n1 | cut -d ":" -f2 | sed 's/^ //')
CPU_CORES=$(grep -c "^processor" /proc/cpuinfo)

MEM_TOTAL=$(grep MemTotal /proc/meminfo | awk '{printf "%.1f MB", $2/1024}')
MEM_FREE=$(grep MemAvailable /proc/meminfo | awk '{printf "%.1f MB", $2/1024}')

clear
echo ""
echo "            .~~.   .~~."
echo "           '. \ ' ' / .'"
echo "        .~~ .~~~..~~~. ~~."
echo "       : .~.'~'.~~.'~'.~. :"
echo "      ~ (   ) (  @  ) (   ) ~"
echo "     ( : '~'.~.'~~'.~.'~' : )"
echo "      ~ .~ (   ) ~~ (   ) ~"
echo "       (  : '~' :~~: '~' :  )"
echo "        '~ .~~~. ~  ~ .~~~. ~'"
echo "             '~'        '~'"
echo "             [ tiny-pi-core ]"
echo ""
echo "  ┌──────────────────────────────┐"
echo "  │        piCore System         │"
echo "  └──────────────────────────────┘"
echo "  Hostname:     $HOST"
echo "  Kernel:       $KERNEL"
echo "  Arch:         $ARCH"
echo "  Uptime:       $UPTIME"
echo "  Load Avg:     $LOAD"
echo "  CPU Model:    $CPU_MODEL"
echo "  CPU Cores:    $CPU_CORES"
echo "  RAM Total:    $MEM_TOTAL"
echo "  RAM Free:     $MEM_FREE"
echo ""
96
TCE Talk / Re: New package manager
« Last post by s1ckn3s5 on January 23, 2026, 08:34:26 AM »
Which is the forked distro? I'm just curious =_)
tnx
97
Raspberry Pi / Re: Rust on piCore: Computing π to 10,000 digits
« Last post by Rich on January 23, 2026, 08:16:38 AM »
Hi geev03

Please use  Code Tags  when posting commands and responses seen in a terminal. To use  Code Tags  click on the  #  icon
above the reply box and paste your text between the  Code Tags  as shown in this example:

Quote
[code][   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517[/code]

It will appear like this in your post:
Code: [Select]
[   36.176529] pcm512x 1-004d: Failed to get supply 'AVDD': -517
[   36.176536] pcm512x 1-004d: Failed to get supplies: -517
[   36.191753] pcm512x 1-004d: Failed to get supply 'AVDD': -517

Code Tags  serve as visual markers between what you are trying to say and the information you are posting. They also preserve
spacing so column aligned data displays properly. Code tags also automatically add horizontal and or vertical scrollbars
to accommodate long lines and listings.
98
Raspberry Pi / Re: Rust on piCore: Computing π to 10,000 digits
« Last post by geev03 on January 23, 2026, 07:55:54 AM »
Code: [Select]
root@box:/home/tc/bin# ./sysinfo

            .~~.   .~~.
           '. \ ' ' / .'
        .~~ .~~~..~~~. ~~.
       : .~.'~'.~~.'~'.~. :
      ~ (   ) (  @  ) (   ) ~
     ( : '~'.~.'~~'.~.'~' : )
      ~ .~ (   ) ~~ (   ) ~
       (  : '~' :~~: '~' :  )
        '~ .~~~. ~  ~ .~~~. ~'
             '~'        '~'
             [ tiny-pi-core ]

  ┌──────────────────────────────┐
  │        piCore System         │
  └──────────────────────────────┘
  Hostname:     box
  Kernel:       6.12.25-piCore-v8
  Arch:         aarch64
  Uptime:        1:52
  Load Avg:     0.00 0.00 0.09
  CPU Model:    Raspberry Pi 400 Rev 1.0
  CPU Cores:    4
  RAM Total:    3797.4 MB
  RAM Free:     3461.8 MB

    [Edit]: Added code tags.  Rich
99
Raspberry Pi / Rust on piCore: Computing π to 10,000 digits
« Last post by geev03 on January 23, 2026, 07:38:53 AM »

Got Rust working on **piCore (Raspberry Pi 400)** and successfully compiled a Chudnovsky‑based π calculator using the `rug` big‑number crate.

**Steps:**
- Install Rust and toolchain: 
  ```
Code: [Select]
  tce-load -wi rust compiletc binutils make  ```
- Create project: 
  ```
Code: [Select]
  cargo new pi_calc  ```
- Add to `Cargo.toml`: 
  ```toml
  [dependencies]
  rug = "1.28"
  ```

**Simple Chudnovsky implementation (works on piCore):**

Code: [Select]
```rust
use rug::{Float};
use rug::ops::Pow;

fn main() {
    let digits: u32 = 10000;
    let prec: u32 = digits + 20;

    let pi = compute_pi(prec);
    println!("{}", pi.to_string_radix(10, Some((digits + 2) as usize)));
}

fn compute_pi(prec: u32) -> Float {
    let mut sum = Float::with_val(prec, 0);
    for k in 0..20 {
        let f6k = factorial(6 * k);
        let f3k = factorial(3 * k);
        let fk  = factorial(k);

        let a = Float::with_val(prec, 13591409 + 545140134 * k as i32);
        let b = Float::with_val(prec, 640320).pow(3 * k + 1);

        let term = Float::with_val(prec, &f6k * a / (&f3k * fk.pow(3) * b));
        if k % 2 == 0 { sum += term } else { sum -= term }
    }
    Float::with_val(prec, 1) / (Float::with_val(prec, 12) * sum)
}

fn factorial(n: u32) -> Float {
    let mut f = Float::with_val(128, 1);
    for i in 2..=n { f *= i }
    f
}
```

Outputs π to 10k digits on a Pi 400 without issues. 

    [Edit]: Added code tags.  Rich
100
TCE Talk / Re: New package manager
« Last post by wysiwyg on January 22, 2026, 08:58:30 PM »
For anyone interested, the package manager is called 'pax'.  It should be in the repo as soon as it's processed.
Pages: 1 ... 8 9 [10]