2025-05-27 01:12:47 forthBot: 1 756839 << 1 - PRIME? . 2025-05-27 01:47:01 forthBot: ." Calcul terminé 1 756839 << 1 - est premier " 2025-05-27 01:49:53 wow that's a slow prime checking function 2025-05-27 01:50:03 what's the implementation 2025-05-27 01:50:53 cleobuline: it should be instant 2025-05-27 01:51:16 unless you deal with bignums then it should take a bit 2025-05-27 01:51:55 mmm 2025-05-27 01:51:56 for small numbers lik 1 127 << 1 - it should be instant 2025-05-27 01:52:04 I know! I'll rewrite it in forth 2025-05-27 01:52:19 what forth you using, I'll check 2025-05-27 01:52:25 ; luaa -e 'print(math.IsPrimeB(136279841))' 2025-05-27 01:52:27 Loading init.lua 2025-05-27 01:52:29 true 2025-05-27 01:52:31 [nmz@Satellite] [19:51:35] [0.46 0.32 0.27] [0|6] 2025-05-27 01:52:51 nmz: try 1 756839 << 1 - 2025-05-27 01:53:14 what's < shift left 2025-05-27 01:53:35 pow 2 2025-05-27 01:53:40 just gimme the number 2025-05-27 01:54:44 more than 600 000 numbers nmz 2025-05-27 01:54:50 you mean this 756839? because its just shifting by 1 there no? 2025-05-27 01:55:16 no shift 756839 time 2025-05-27 01:55:30 2^ 756839 2025-05-27 01:55:59 ah, doesn't fit a double 2025-05-27 01:56:08 it may take one hour tio check if prime 2025-05-27 01:59:22 nmz: https://pastebin.com/LG4rKZLN 2025-05-27 01:59:37 -1 2025-05-27 02:00:07 227833 digits 2025-05-27 02:00:14 sheesh 2025-05-27 02:00:21 you can try 2025-05-27 02:00:27 nah 2025-05-27 02:01:13 nmz: i am sure forthBot will do this job , but not sure of the time for 2025-05-27 02:02:12 it was calculate on a cray 2 2025-05-27 02:03:20 i take it here https://fr.wikipedia.org/wiki/Nombre_de_Mersenne_premier 2025-05-27 02:04:02 number 32 2025-05-27 02:04:42 time gawk -M -f ./math2.awk -e 'BEGIN {print isprime(2^227833)} ' 2025-05-27 02:04:44 0 2025-05-27 02:04:46 Executed in 4.43 millis fish external 2025-05-27 02:05:10 2^ 756839 -1 nmz 2025-05-27 02:05:18 minus 1? 2025-05-27 02:05:22 yes 2025-05-27 02:05:27 why the minus 1? 2025-05-27 02:05:46 because minus 1 is prime :) 2025-05-27 02:06:13 2^227833 is divisible by 2 .... 2025-05-27 02:06:35 2^227833 - 1 is prime 2025-05-27 02:06:52 oh, you mean -1==true 2025-05-27 02:07:18 ( 2^227833 ) - 1 the number is prime 2025-05-27 02:07:25 or (2^756839-1) or (2^756839)-1 2025-05-27 02:08:09 (2 ^756 839 ) -1 2025-05-27 02:08:38 try it 2025-05-27 02:09:25 this is gonna take a while 2025-05-27 02:09:30 time gawk -M -f ./math2.awk -e 'BEGIN {print isprime((2^227833)-1)} ' 2025-05-27 02:09:41 wait 2025-05-27 02:10:52 if it beat my forthBot 2025-05-27 02:10:52 if it runs for more than 10 minutes I'm killing it 2025-05-27 02:11:24 it may take an hour 2025-05-27 02:11:51 yeah I'm stopping it 2025-05-27 02:11:55 lol 2025-05-27 02:11:57 its a waste of electricity 2025-05-27 02:12:30 running or not a computer use the same no ? 2025-05-27 02:12:39 no? 2025-05-27 02:12:52 the more CPU usage the more elec usage 2025-05-27 02:12:59 ha 2025-05-27 02:13:12 GPUs also hog, its why they want a bigger power supply 2025-05-27 02:13:45 labynet@ubuntu:~/new-hash$ uptime 2025-05-27 02:13:45 02:13:24 up 27 days, 3:38, 1 user, load average: 2.07, 2.08, 2.08 2025-05-27 02:14:06 not too much 2025-05-27 02:15:48 next i will try ( 2 ^859433) -1 2025-05-27 02:15:53 date; time gawk -M -f ./math2.awk -e 'BEGIN {print isprime( (2^75683) - 1)}' 2025-05-27 02:15:55 0 2025-05-27 02:15:57 Executed in 30.58 secs fish external 2025-05-27 02:16:45 you try that one 2025-05-27 02:17:23 one less digit, but at least it finished 2025-05-27 02:18:29 0 , mean it is not prime 2025-05-27 02:19:07 No clue 2025-05-27 02:19:18 I wrote it so long ago 2025-05-27 02:19:37 ya 0 means not prime 2025-05-27 02:48:31 02:43 (cleobuline) forth: MILLI 1 75683 << 1 - PRIME? . MILLI SWAP - . 2025-05-27 02:48:31 02:45 (forth) 0 2025-05-27 02:49:07 2 minutes 2025-05-27 03:01:15 ya 0 means ya never incremented ya counter, yo 2025-05-27 03:21:10 awk is fast 2025-05-27 03:21:22 well, more like gmp is fast 2025-05-27 03:25:32 oh nice 2025-05-27 03:25:35 now its faster 2025-05-27 03:25:56 here's a prime number that's good enough 16^16 2025-05-27 03:27:53 cleobuline: is prime? flooring and sqrt the limit? 2025-05-27 03:30:46 how's your stepping? 2025-05-27 03:44:28 that doesn't sound very prime 2025-05-27 03:46:20 xentrac: its a new stepping dance move called priming 2025-05-27 03:46:29 yoyoyoyo 2025-05-27 03:48:09 J has the best algo for checking if prime, I remember throwing any number at it and the damn thing always returned in less than 30 seconds 2025-05-27 03:50:54 any number? 2025-05-27 03:51:19 do you mean numbers with a thousand digits or more like numbers with a billion digits? 2025-05-27 04:00:00 try it 2025-05-27 06:17:30 J is big on mathematics and it's math algos are generally good 2025-05-27 06:26:22 odds are it gets evens right 2025-05-27 06:29:07 1 2025-05-27 06:29:07 Calcul terminé 1 756839 << 1 - est premier 2025-05-27 08:29:07 Environment for cleobuline inactive, freeing... 2025-05-27 16:05:37 forthBot: MILLI 1 859433 << 1 - PRIME? . MILLI SWAP - . ." 1 859433 << 1 - est premier " 2025-05-27 16:06:31 may be the result at night ... 2025-05-27 17:39:58 deadmarshal_: k/klang it's fun too 2025-05-27 17:40:18 there was some guide for k in the same play of the joy language 2025-05-27 17:40:32 but when I built k, tons of stuff was closed source, I didn't like it 2025-05-27 17:40:46 I prefer klong/kling.py even if it's slower 2025-05-27 17:42:39 there's also kona 2025-05-27 17:58:18 how fast is it? 2025-05-27 18:01:31 dunno 2025-05-27 18:10:53 btw, on lisp, from t3x, s9fes it's good enough 2025-05-27 18:10:59 and its forth too, but it's an odd blend of f79, some f83 features and a bit of ANS 2025-05-27 18:38:42 hm? 2025-05-27 19:03:35 forthBot: QUIT 2025-05-27 19:03:54 forthBot: QUIT 2025-05-27 19:04:07 it is sleeping 2025-05-27 19:12:43 it is an ex-forthBot 2025-05-27 19:43:57 anthk_: I saw K but haven't used it at all. I also tried APL but like J better. J's concept of rank is very awesome. Especially I like it that ranks in J is explicit, but in APL it's more loose which I don't like 2025-05-27 20:01:03 k should work very similar to j 2025-05-27 20:24:40 + 2025-05-27 21:36:52 deadmarshal_: of operator rank? 2025-05-27 21:37:20 the rank of an array is not very loose at all in J, K, or APL; it's just ρρA 2025-05-27 23:26:13 https://git.sr.ht/~hocwp/10biForthOS wait 2025-05-27 23:26:31 deadmarshal_: I tried k with some 'intro to math' article, it was fine 2025-05-27 23:26:42 altough it woudn't map to klang 1:1, I'm afraid so 2025-05-27 23:26:49 s,klang,klong 2025-05-27 23:29:11 ah, damn 2025-05-27 23:29:14 not k, j 2025-05-27 23:35:40 then there was Joy but that was like Sussman trying to redesign Forth by reading SICP first 2025-05-27 23:38:56 you might need a good chunk of Discrete Math 2025-05-27 23:48:22 I just checked and it doesn't support bignum, maybe I need to set something up, oh well