« first day (13 days earlier)      last day (187 days later) » 

01:57
I actually don't think I can do that one in Cubically :/
Most of it is easy since I already have a rubik's cube available, but making the moves on it in accordance with input removes my ability to construct constants so I can check the inputted character
 
1 hour later…
03:13
Yep. It'd be cool to see still.
 
4 hours later…
07:40
&6 doesn't exit if an argument is passed to it.
&*
In my case, the solution is to use ?6&, which adds an extra byte :(
Also, it seems like ?6{...?6{...}%6} is guaranteed to execute the %6. Aka, the initial ?6 will skip to the first } after it rather than the matching one.
@KamilDrakari ^ This probably caused some issues for you?
 
6 hours later…
14:16
@TehPers I ran into that for sure. Luckily I was able to move stuff around without breaking the algorithm, but I did have to debug for a while to find out that was the problem
I found a similar bug in my interpreter that I'm taking a look at
 
2 hours later…
16:02
Fixed it in my interpreter, issue was my if-statements lol
16:47
@TehPers Oh, yeah, that's the bug and I know how to fix it.
But as I said earlier I'm working on getting Cubically 2 ready for TIO, I'm just working through some memory magics that Dennis and feersum suggested
Cross your fingers, it's compiling with no bugs for the first time...
Darn
17:03
Oh crap, there's a problem...
There are no commands to rotate the inner layers of the cube, and they'd be annoyingly hard to implement
17:26
Cubically 2 is pretty much done. Now all I need to do is add the commands to rotate internal layers.
Insert sarcastic cheer here.
17:46
@TehPers @KamilDrakari Cubically 2. Be sure to open the "Debug" section to see the larger cube.
18:41
Is the argument -4 an argument with the value -4 or is - just a tag and the real argument is just 4? I assume the latter
It's just like a normal compiler/interpreter flag. It could've just as well been -four
If I understand the question properly, it's the latter
That's pretty much what I figured, thanks
Admittedly without any commands to rotate internal faces having a different size cube only really changes what constants can be easily created
It does work with fairly large cubes, though the debug output becomes nearly unreadable after a point
19:05
Specifically, 127 is the largest cube size that doesn't cause TIO to truncate the debug output
19:16
@MDXF I was thinking about that yesterday. You'd need "face" and "depth" to choose where to rotate.
I mean, you could have the same commands except change the argument from meaning "number of quarter-turns" to "depth of layer to turn". It would break backward compatibility, but should translate well for any single digit size cube
If we need to support even larger cubes that wouldn't work though
@TehPers I think I know how I can work it; I'll have to write a codepage for Cubically first.
@KamilDrakari Yeah I don't think it's a good idea to break every single Cubically submission on the site :P
@MDXF that's fair.
19:43
@MDXF Alright, good luck!
20:06
Here's my idea: R1 will perform a clockwise 90-degree turn as usual. Râ‚€1 will be equivalent to R1, as the subscript Unicode 0 (â‚€) will denote the 0th face from the outside.
@MDXF That sounds like a good idea!
How do you write in unicode?
So I'll write a codepage that turns U+2080 (₀) through U+2089 (₉) into single bytes (because we don't want to have an additional four bytes for every subscript character used.)
@TehPers you google it? :P that's what I do. Also, if you're on Windows, there's a Character Map program
@MDXF Oh, so no easy way? Rip.
You can also install some kind of keyboard shortcut program
When I write the codepage, they'll all be present in the Cubically wiki
I guess I could write hotkeys for them all...
like, win + # or alt + shift + #
20:11
Yeah exactly
That's what a lot of PPCG users who use golflangs do
Makes sense.
Now I just look into the semantics of SBCS creation
Something like Charcoal's
 
1 hour later…
21:29
Would the subscript characters work for multi-digit numbers, or would the maximum useful cube size be 21?
@KamilDrakari I think I remember you posting an answer once where you stored a value in a cube. I'm trying to store the current notepad value in the cube, but I can't use the input. Any ideas?
It's for this:
28
Q: Remove character at specified index

ETHproductions(heavily inspired by Element of string at specified index) Given a string s and an integer n representing an index in s, output s with the character at the n-th position removed. 0-indexing and 1-indexing are allowed. For 0-indexing, n will be non-negative and less than the length of s. For 1...

I had an idea actually.
@TehPers I stored a value in a cube by applying R1B1L1F1 repeatedly. When I was researching input methods which relied on pre-configuring the cube rather than a separate input buffer I found a thread mentioning that simple algorithm that would pass through 1024 distinct states before returning to whatever state the cube started in (though I don't know if that's 1024 repetitions, or if each state between each move also counts for a max of 256 repetitions)
So if you don't need the cube for anything else you can apply R1B1L1F1 as "increment cube-counter by one" and F3L3B3R3 as "decrement the cube counter by one"
Thanks, I'll use that instead of the 3-move combo I was using that only had like 10 different states xD
Though checking for "cube-counter == 0" requires the full algorithm to check for a solved cube
Hmm...
Darn, I can't just do +7 because 7 will be a positive number...
21:38
Note that *1-1/1 will always decrement the notepad by one regardless of the actual value of 1
If that's what you needed
Oh interesting, thanks!
That's what I needed actually
You can also set the notepad with :7*7 and then decrement it just with -7, which probably saves bytes
Oh, good point lol. That'll definitely shorten it.
21:56
For input 2 abcde, $:7*7(R1B1L1F1-7)6~%7 outputs -1 but if you put a newline between ~ and %, it outputs 32?
I'm not seeing the second behavior you listed, but outputting -1 is definitely not correct
Are you sure the newline is between ~ and % not between ~ and 6?
my bad, that's right
it's between ~ and 6
Okay, seems like we've got a weird new bug
And it also seems that the "End of input" result for $ has changed to always be zero rather than leaving the input buffer unchanged
shrug
Also replacing ~%7 with $%7 in your code makes it just die instead of outputting -1
With the error message "Killed"
22:07
o_O
0
A: Remove character at specified index

TehPersCubically, 46 bytes $:7*7(R1B1L1F1-7)6~(~F3L3B3R3?0@7)0(~>7?6&!@7) Will not work on TIO (as of now) because of some strange behavior with reading input directly after a loop ()6~ loads the input -1, but )6\n~ loads the input 32). This must be run on the Lua interpreter with experimental mode e...

Should I make this a Wiki cause you helped?
Nah, those were just some bits of code I already had in published answers anyway
Alright
Of note though, while that pattern goes through a lot of iterations before looping to a fully solved cube, each individual side (including 0) is solved several times within that cycle
I know, I added a note at the bottom of it. There's no point in massively increasing the byte count to extend the max string length by not very much, unless you want me to :P
Well, as far as I can tell it currently supports a maximum string length of 15
Based on this:
22:15
Alright, I guess I can update it.
It might be sufficient just to check two adjacent sides, I'll see if I can get a number for that
Alright, thanks.
=0?6{:1+1=2?6{...}} is what I have currently.
(Notepad is 0 initially)
Also, I think ? should implicitly take the notepad as input :P
Except for with my interpreter, it shouldn't cause it'd break ?!
But shh
Checking only :1+1=2 gets around 128 iterations before a false success
it's checking both that face 0 is 0 and face 2 is twice face 1
hm
i can just do all the checks I guess
22:30
Checking three sides gives (by basically randomly guessing that the numbers happen to be convenient based on being in the right ballpark) 256 iterations, and the end result is a solved cube so if you check that side 0 is exactly 0 and side 2 is twice side 1 then that check will only be true for a fully solved cube if the only interaction is repeating that algorithm
So I have a bit of golfing I can get back to with that previous solution
Also, you should be able to just do !0 instead of =0?6
Or in my case, ?!0, but yeah thanks!
22:43
@KamilDrakari Updated answer, thanks!
I've updated my "As and Bs" answer too, for me it saved 18 bytes!
Nice!
Next challenge: create a regular expression matcher in Cubically
I think probably not
You pass in regex followed by a newline followed by what to match
Wow, loser. I can't believe you can't do something as simple as that. /s
I swear if somebody creates that they are a god.
I mean, maybe as more features are added it will become possible
22:50
That'd be insane o_O
For example, with infinite cubes it's probably not entirely impossible
I can't even imagine how it'd be done.
matching /a+b?a+/ against aaaa would be interesting.
It'd match all the as, then fail because of the second a+, meaning it'd have to back up once and match that last a.
Maybe not full regex... At the very least if extra cubes were available I could probably check if the first string is a substring of the second
(Nevermind)
The problem with Cubically is that it technically has only 2 modifiable memory locations
One of them with very tight restrictions on the modifications, but a lot of variety in ways to interpret the held data
22:54
Theoretically with bit shifting we can use the full 32-bit notepad
But that'd even be pretty limited
Also, you'd need or/and for it to work :/
You know, I'm fairly confident that Cubically isn't Turing Complete, but I wonder if there's a way to PROVE that
What if each mini cube in the internal cube was its own memory cube, but each value on them was divided by 9? :P
Same.
For example, face 1 would have a bunch of mini cubes, and the faces on that cube added up to 1 (so they're all 1/9), then that has mini cubes with the square values being 1/81, etc
That'd be hilarious
Ah yes, a Rubik's cube where each cube is a Rubik's Cube
etc.
Yep.
Much harder to check if that is solved
22:59
Agreed. It also wouldn't help much, but it'd be funny.

« first day (13 days earlier)      last day (187 days later) »