« first day (4350 days earlier)      last day (790 days later) » 

00:48
Controller's coming along nicely
01:27
@RadvylfPrograms well it just took that many years for a standardised version to be agreed
Firefox still contains a lot of the old display: -moz-box; in its CSS, but they are gradually moving things over to display: flex;
02:06
Anyone know tryitonline and php? I'm having trouble adding something to the end of a loop?
I know a bit of PHP
 
1 hour later…
03:09
@RadvylfPrograms I can't seem to add anything after this, once it hits the end of the file. tio.run/##K8go@G9jXwAk0/…
You need to either define $x before incrementing it or not run in strict mode, I think
I think you accidentally starred instead of hitting the reply arrow
sorry, yes.
I tried assigning $x=0; and it didn't change the behavior. Seems odd to me.
Really? I got a different error
The notice from PHP disappears once I add $x=0, looks like it's an issue with TIO?
Wait no
I just misread the file path of the PHP file as one of TIO's source files
Looks like ~ can't be done on characters?
03:17
Well, this works (with many errors) but I need to check at the end and echo something if $x>0. But I can't find how to add it, I think it exits on EOF
https://tio.run/##K8go@G9jXwAk0/KLNFQqbA2srTUz0zQU6@pUkm3T0lNLkjWCQ1w8/TQ1VSq0ta1Tc4pTq1OTM/JVKuytlJR0VJKtwZpqrUGCCkoVFUr//xsaGZuYGhgYmxkZGBiYmJgASQMA
This test, I wish to just output "xx" to see it work.
Can you describe the task you're trying to solve?
We might be able to help you better then
@JamesRisner I think the last statement needs a semicolon
Once I add one the error changes
https://codegolf.stackexchange.com/questions/255822
it doesn't catch 0's at the end
Uh, what is !~~$c=... supposed to do
What's being !'d and isn't = assignment
Unless PHP is wayyy weirder than I remember, you're !ing the ~~$c and trying to use that as the LHS for assignment?
I interpreted it as !~~($c=...)
Assign and then do the weird unary stuff
03:22
@RadvylfPrograms the !~~ is catching ascii "0", the else is printing non zero digits
I don't see how it catches ascii 0
~~x is the same as x, right?
Just subtract 48
echo -n 12345003620004440000 | php 0s.php
{1}1{2}2{3}3{4}4{5}5(0)(0){3}23{6}6{2}2(0)(0)(0){4}34{4}4{4}4(0)(0)(0)(0)
Where () are the first if and {} are the else
@user Presumably ~ does some weird cast
Oh that makes sense
My problem is it hits end of file with $x>0 so it needs to just echo $x at the end after the for()
but I can't seem to get it, because I think it errors on EOF
(end exits)
03:26
How about this?
Is $x getting set to null or something like that?
@user that only prints xx now ;-)
It seems that the $x++ is what's throwing the error, after EOF, so probably just needs a check to see if $x isn't a number
@JamesRisner Oh right. This is closer but PHP, being a little too smart, casts the character 0 to the number 0
got it!
thanks
03:28
\0/
let me clean it up
found another issue, but I think I'm on track now. Thanks both of you
 
9 hours later…
12:51
Hiya
o/
leading spaces don't work here
13:25
just booted up my pi and had lxpanel segfault because it decided it really didn't like my new Bluetooth headphones. I love Linux :)
 
1 hour later…
14:29
If I understand correctly, lea ax, ax move 0xFFFF to ax without modifying flags. Any article did this?
 
3 hours later…
17:06
hey yall wanna help me with something? I'm trying to find and/or make a BASIC interpreter in Lua
I see how that'd be hard to google actually
yeah, it's got the same problem the Create mod does :p
Someone needs to make a language called "the"
found it already
was going to use it as a starting point
@Ginger create mod?
17:15
@Seggan by far the coolest Minecraft mod in existence (at least until Create Aeronautics releases next year)
what is it?
17:55
mm
18:16
in Attempt This Online, 35 secs ago, by pxeger
The long-awaited v0.2.0 has been released! Try it out now at https://staging.ato.pxeger.com
5
👍
merry christmas
you filthy animal
"This version is still missing the important safety feature of limiting the output size of stdout and stderr, which means your browser tabs might crash." < Should have read that before trying while 1:print('hello world')
 
3 hours later…
21:48
CMC count the number of composite numbers less than 2^30 with no factors less than 2^14
I'm sensing a theme to these CMCs.
@Adám it’s the theme of the moment :)
@Adám I wonder if anyone can do it
Asked ChatGPT:
> A composite number is a positive integer that has at least one divisor other than 1 and itself. To count the number of composite numbers less than 2^30 with no factors less than 2^14, we can start by listing the prime numbers less than 2^14: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, …
At this point, I thought "uh oh".
@Adám there aren’t that many
well, that's one way of doing things I guess
21:59
Not sure it’s the best way
this should be pretty easily solvable with just sieve but stopping at 2^14 which actually isn't very different from normal sieve you just skip the primes from 2^14 to 2^15
@hyper-neutrino sounds good
@Simd Those are some very big and very specific numbers
@user not so big for a computer :)
2¹⁴ isn't very big, imo.
22:03
If this is a real problem you're having, you might want to ask in a math chat room
It's rather big for a solution in a golflang that's optimized for size rather than speed
@user it is not. It’s just an area I find interesting
@user ccgc covers all languages
and also smart algorithms!
Not saying you should change the CMC, since it's just a CMC, but on main, making the numbers that big might make it difficult to verify whether an answer is correct if an answer doesn't terminate
@user yes. I would have to have examples where I can verify it
22:24
0
A: Sandbox for Proposed Challenges

SamathingamajigFind the Prime Signature code-golf The Prime Signature of a number is the list of the exponents of the prime factors of a number, sorted in descending order (exponents of 0 are ignored). Inspired by Combo Class's "The Magnificent Patterns of Prime Signatures" video. For example, the prime factori...

23:01
@Simd This should be pretty easy gimme a sec
Actually wait no
Actually wait yeah
It's 6492559
I just made a list of primes between 2**14 and 2**16, then took the cartesian square, product, and filtered out the ones above 2**30

« first day (4350 days earlier)      last day (790 days later) »