« first day (2646 days earlier)      last day (997 days later) » 

12:04 AM
Interesting: I finally managed to save a byte here in Python 3, but still can't save a byte here in Python 2
 
12:22 AM
@Dennis How was this not already caught by brute-forcers?
 
12:47 AM
@PhiNotPi because 8^74 is a massive number
 
@DJMcMayhem But most brute-forcers I've heard of (including the one I wrote) are pretty well-structured. Both this 76-byte HW and the previous 78-byte HW are very similar in structure with two nested loops before the print statements.
 
1:14 AM
@PhiNotPi Currently there are no explanation.
 
 
1 hour later…
2:37 AM
Nice, grass HW has been beaten too (although it was probably super suboptimal in the first place)
I should probably bounty it (I should also probably wait until the current one is awarded first)
for linking purposes, ignore this:
https://tio.run/##hVRNb9swDD2bv4JtD5JrN0U@kBVB05429LZjDqlhOLbTGFMtQ3Lqeth/z0jZSVyg3Q42n0i@R1IStEns7nBIkxof8MUk1rajqsX7@@8/f4Ctk/TXci0KEYqGvmBMPy0iqIym3NelEJDlW9yWskxe8xAT82JD3Ois9RfgvSi9SRQ6lRB7DnhKp4mKnReXXXS9iDBwbPD6PAyWSEXxGlVeSg754G214ayu2Lbs7FtiGGBRuspUeKghaemJFQvJMRUZVF8vFjfjaFSUWf4uOzXfx8ARmv8S@rI@teXxNxyL6q77PqOPE70J8M45XQJvIalJk9tPJ/vHXg6lzzN@Pd0n2/sFYzDeud@@w1PLVlpuThVlbvksR7ZSRS3Fcyn60@IQn4xL4aPhQa95dcxFQTWucJcrpbHRRmVA90kUmQhxLd5FRCbyna9uijR37i1dxC4kRUsediB5/BCl@H1ytMKPfLzCZl8/PoJrWAjxDMEEnRYGYwhmRzyB4O6IZxCM58fFHQTTM2MOwfzEmRJpPDnR5jNIJ7Nv6HwN
Hmm. @Dennis The new HW doesn't work in Brainbash, I wonder why. The error message isn't very informative (also I should ask @ConorO'Brien how Brainbash even works)
 
3:08 AM
@ASCII-only What doesn't work?
 
the new brainfuck Hello, World! (see message this replies to)
 
@ASCII-only It doesn't reply to any message.
 
@ASCII-only Why should it work? It isn't BF.
 
@user202729 Because it's fully backward compatible with BF?
 
3:12 AM
The docs is too bad.
@ASCII-only No it's not ... wait is it? Let me read again.
 
@user202729 It is, which is why I used the 78 byte one on RosetTIO
 
@user202729 because it's written badly...
@user202729 link
 
@ASCII-only And that crashes.
 
@user202729 yes. i have no idea why. but it is meant to be fully backward compatible with BF...
 
3:18 AM
So -- it's not fully compliant with BF on TIO. (which uses 65536 circular tape)
@ASCII-only BF is under-specified.
 
@user202729 no...
It just leaves a lot up to the implementation
@user202729 If you consider that underspecified then most practical languages are underspecified
 
@ASCII-only Correct.
 
@cairdcoinheringaahing O_o so golfy
 
4:13 AM
@ASCII-only BF with two tapes...
 
@ConorO'Brien i can see that >_>. just that most BF programs should work right?
When do the cell limits increase
 
4:29 AM
@ASCII-only Currently not supported.
 
 
3 hours later…
7:27 AM
To all rust people: How do I convert between error types effectively? I have this expression:
        Command::new("xcrun")
                .args(&["--sdk", target_platform, "--show-sdk-version"])
                .output()
                .and_then(|output: Output| String::from_utf8(output.stdout))
in which String::from_utf8(...) returns an error however it's of type std::string::FromUtf8Error while the expected type is std::io::Error
 
@Downgoat tio pls?
 
@ASCII-only this is a snippet
 
@Downgoat ok have testcase. now hmm
@Downgoat ok apparently it's Err(::std::convert::From::from(err))? but try block should handle the conversion
 
@ASCII-only that'll wrap it in a whole error though, which means i'll either have to add a giant ugly 4-line match statement
I think I found solution thhough
 
How do you implement software division? Software multiplication is fairly obvious, but division has all those nasty little hidden rules
I'm doing code for a system that can't do division on it's own
 
7:39 AM
@moonheart08 the golfy way is repeated subtraction
the better way is bitshift magic to get result bits one by one
 
is there a bitshift magic way for modulo 10
if so, thank lord. either 10 or 16
 
@moonheart08 16?
 
modulo 16 or modulo 10
i'm converting 16bit numbers to text
but really i need both division and modulo by 10 or 16
 
but isn't 16 just 2**4
i.e. modulo 16 = n & 0xF, division is just n >> 4
 
d'oh. Thanks
 
7:43 AM
for 10 it's quite a bit lot more complicated so i'd use 16 if possible
and much slower
 
i'll need 10 for actual UI. :/
At least my numbers are at most 16 bit
 
@moonheart08 just conversion from binary to decimal?
also what are the range of the numbers
 
numbers cap out at what 16 bit can hold, max
unsigned
 
if the range is small enough you can just do a lookup nvm. maybe this might help?
 
plus, i'm working in limited RAM
lookup is impractical
i can take speed hits if it means i don't use up all 1024 cells (16bit cells)
yes. only 1024
i'm insane
 
7:46 AM
@moonheart08 what are you trying to do with 1024 cells
 
magic. ok it's a very tiny game. I'm doing insane person's golf right now
at least the character set is ASCII
 
game?
 
tamagotchi ""clone""
for the R16K1S60
i really am insane
arn't i
yes it works \o/
thanks @ASCII-only
 
@moonheart08 huh that was quick
 
inttostr:
mov bx, stringpad
.loop:
mov cx, ax
and cx, 0xF
shr ax, 4
add cx, 0x30
cmp cx, 0x39
jbe .skip
add cx, 7
.skip:
mov [bx], cx
add bx, 1
cmp ax, 0
jnz .loop
mov [bx], 0
ret
i just didn't know the algorithm :P
also, the skip thing there is to make it use A-F instead of some other characters
 
you know what. who needs base 10? We have base 16. I'll just use that due to size constraints
 
@moonheart08 :P
why are the size constraints so low in the first place
 
ask LBPHacker not me. He's making a new computer with 4096 cells anyways
i'm just waiting on it's release
 
@moonheart08 what is this? TPT?
 
yes. TPT. Again
TPT has computers
well great. i just realised the resulting string is reversed
:<
 
8:18 AM
@moonheart08 10/10
 
 
3 hours later…
11:22 AM
hi
 
hello
 
How r u >
@ASCII-only I have a question ? (If you don't mind answering)
 
@MuhammadSalman okay
 
@ASCII-only : I am curious as to how to have a language added to TIO ?
 
@MuhammadSalman just ping Dennis with instructions on how to run it
in the TIO channel of course
 
11:31 AM
@ASCII-only Ok. Thanks
 
12:23 PM
PHP: is there any way to use Laravel database API without installing Laravel itself?
 
12:48 PM
oh, ok. nevermind
they have a separate composer download for it. great
 
1:04 PM
btw, anyone want to play spyfall?
 
2:04 PM
2
Q: Sum power of digits

Muhammad SalmanChallenge : Given two non-negative integers (X and Y > 1) calculate the sum of digits of their powers . i.e : sum of digits of X ^ Y . Input : Two non-negative integers X and Y Output : The sum of digits of X raised to power Y X ^ Y. Examples : 5 , 2 ---> 7 9 , 4 ...

 
 
3 hours later…
4:40 PM
@PhiNotPi It seems to use an entirely different method. Unlike primo's answer, this one works in a non-wrapping interpreter.
 
5:25 PM
@Downgoat Can you use Result::map_err?
 
6:01 PM
@Soaku wrong site? xD
 
6:15 PM
@thecoder16 it's not rare that someone asks here to join a game from Puzzling. Many people here = many potential players
 
yeah :) we really need more people in puzzling game sites.
they are dying :(
i'm on puzzling chat much more than here hehe
 
@thecoder16 I asked here, because I don't have much chance attracting players in Spyfall itself
 
@Soaku I've never actually played spyfall before, but I'd love to try
 
@DJMcMayhem Good to hear :D but we need at least 4 players to start, the room is here
 
How long is a round typically?
 
6:24 PM
idk, varies
 
lol
 
@mınxomaτ ?
 
The unspecificity of that response just amazed me.
 
@Soaku average, mean, min&max, anything? Or does it really vary between a minute and a couple hours?
 
@dzaima idk, 10-20 minutes, I guess?
I don't look at the time when I play
 
6:58 PM
0
Q: Golf me the Schlosberg Numbers

georgeSchlosberg Numbers From OEIS there is a set of numbers such that Integers m such that floor(sqrt(m)) is even. Although these are not officially named Schlosberg numbers, the first documented solution was by Joel Schlosberg in 2015 in Mathematical Reflections (5), thus I have names as such. ...

 
7:20 PM
@ASCII-only btw an idea from rust is an/the "never" return type specifying that a function never returns for example exit() or perhaps some error functins
 
7:31 PM
that's not a return type. It should be a keyword or something, but it's not a type
(yeah, I know they call it a return type, but I personally disagree with the way they did it)
 
7:44 PM
@NathanMerrill so like neverreturn fn myfunc() {}?
 
something like that. It doesn't have to be that long, but yeah
 
We're doing something kinda similar for void. Rust & Swift alias it to an empty tuple (). We have the same syntax -> Void but it'll just internally set the 'returnType' field to none
Though now that I think about it, I think it could be replaced with just a func f() throws -> Void
 
 
3 hours later…
11:10 PM
@Downgoat what's your purpose for doing it, out of curiosity?
like, to me, there seem to be two primary purposes
one is to identify code that won't be ever executed
(statements after a System.exit() call)
the second is to make code safer (by saying that this function call might never finish/terminate)
the difference between the two is:
what's does the function of the following look like:
if (x) {
   System.exit()
} else{
    return 4
}
(the 3rd option is to make this uncompilable: You either never return, or always return)
but that's problematic, as it basically means that you can only call neverreturn functions from neverreturn functions (or the main function)
 
11:27 PM
@Downgoat C++ (and C11) also have noreturn
 
1
Q: Is this a Boggle pad?

msh210Given a list of case-insensitive ASCII letter strings ("words"), determine whether the entire list can be found on some four-by-four configuration of letter squares, in which no square can be used more than once in a word, and in which words are formed by moving from any square to any adjacent sq...

 
11:48 PM
1
Q: File Permissions

BillylegotaFile Permissions code-golf Adapted from the UIL - Computer Science Programming free response question "Carla" for 2018 District. Introduction In UNIX-like operating systems, each file, directory, or link is "owned" by a "user", who is a member of a "group", and has certain "permissions" ...

 

« first day (2646 days earlier)      last day (997 days later) »