last day (251 days later) » 

A__
2:47 PM
Here is the link of Keg. You can ask for golfing advice, new features, beginner questions of Keg, and etc. in this chatroom.
 
Yeah, I was going to do that, but I couldn't find the username. Doing it now
 
A__
room topic changed to Keg: Discussion about the esolang Keg. You can ask for golfing advice, new features, beginner questions of Keg, and etc. in this chatroom. (no tags)
 
A__
Whoops, I mis-remembered their username.
 
2:51 PM
I find it hilarious how there has been around 10 Keg answers so far today because it got put on TIO
 
A__
These are either made by EdgyNerd, A__, or Jono 2096. If more people use it, there will probably be more answers in Keg.
Since we have nothing to say, CMC: Figure out how 9(9|:"1-) counts up!
 
It duplicates a number, puts it to the bottom of the stack and then subtracts one from the original. So the stack starts as 9, then becomes 9 8, then 8 9 7
 
A__
room topic changed to Keg: Discussion about the esolang Keg (documentation:esolangs.org/wiki/Keg). You can ask for golfing advice, new features, beginner questions of Keg, and etc. in this chatroom. (no tags)
 
and then somehow it goes into the right order
I'm gonna give a shot at the HQ9+ interpreter challenge
but I have no clue how I'm going to do the Q command
 
A__
Do a cat program using the inputted source code.
 
3:01 PM
Yeah, but the programs can be more then one character long
and I don't know how I'd go through the instructions in it whilst still being able to use Q
 
A__
Use (,) to output the length of the stack. (i.e. the program, if the input is the length of the stack)
Oh, use " to go to the next instruction.
 
yeah, but I need to output the program in the correct order after using "
for Q
 
A__
Pseudo-solution for Q instruction: ^(:,") Takes input in the reversed order and reverses that input. Then, it iterates through the instructions and prints them.
 
yeah, but whilst going through instructions the stack will get out of order from the original program
 
A__
That is an issue for ^. It reverses the implicit input automatically... that is not an issue due to going through instructions in the stack.
 
3:09 PM
I don't think you get what I'm saying
HQ9+ programs can be longer then one character
and if I'm going through it using ", then it'll get out of order
meaning that Q will output the code in the wrong order
 
A__
Oh, I see. I don't know how to solve this; the only thing I can think of is to output the source code after reversing it.
 
My current idea is putting '1+$"" at the end of the for loop
Which'll keep a count of what instruction I'm on at the bottom of the program
Also, how does the & command work?
 
A__
Nope. :_('1+$"") doesn't work.
 
How does the accumulator work, because that could be a potential solution?
 
A__
The first time the & command is called, the top of the stack is stored to the accumulator. The zeroth time it is called, it puts its value to the top of the stack.
I mean when you modulo the number of times you called the & command by 2.
 
3:22 PM
Ok, just gave a shot at doing the H and Q instructions
it doesn't work though :(
"(:H=[0\!dlroW \,olleH{:|,}|:Q=[&:&(_|')(:,")&:&(_|")|:\9=[9]]&1+&")
(not that the |\9=[9] is just a placeholder)
nvm I'm dumb
I forgot to remove the " at the begining
Sadly it isn't currently running multiple instructions, and idk why
I feel like some debugging related instructions should be added to Unofficial Keg, since it'd make stuff like this a lot easier @A__
 
3:56 PM
Is Keg hard to program in?
 
it depends on the problem
it's probably one of the easiest esolangs that I've programmed in so far
@MilkyWay90
 
4:25 PM
Aw
Ok
 
A__
5:01 PM
I was an idiot!!! I didn't think about it before I posted it here!
@EdgyNerd :_(:,') should work fine.
@EdgyNerd Avoiding using the accumulator is actually a golfing trick in Keg. Tip #10. Try not to use the accumulator. --Keg/Golfing
Yes, I think that Keg is very easy to program in except for some challenges like Is It Double Speak?. I tried some algorithms and none of them worked.
 
Yeah, but in some cases the accumulator and having values at the bottom of the stack are basically equal
 
A__
How? Can you provide an example?
 
Like let's say I wanted to add one to the accumulator/bottom of the stack. For the acc, it'd be &1+&, whilst for the bottom of the stack it'd be "1+'
Also if you're !, using the acc is usually easier and shorter
 
A__
In case you don't know, possibly using the bottom of the stack is shorter. Like let's say I wanted to set the accumulator to 0. For the acc, it'd be 0&, whereas for the bottom the stack it'd be 0.
 
yeah, but you'd have to transfer it back to the bottom of the stack using "
so they're equal in that case
the only time it's different is at the beginning of your program, if it doesn't take input
 
A__
5:13 PM
(By the way, using the bottom of the stack might make do well in obfuscating programs.)
"Also if you're !, using the acc is usually easier and shorter" Can you also provide an example for that?
I think that using the bottom of the stack is still 1 byte shorter. (in the beginning of the program)
 
Let's say you needed to set the bottom of the stack/acc at the beginning of the program to 0, and then run a for loop that runs on every item of the stack. When using the acc you can do 0&( whilst when using the bottom of the stack, you need to do 0"(!1-|
Yeah, the bottom of the stack is one byte shorter at the beginning if you aren't using ! or a for loop that runs the length of the stack times
 
A__
Hmm, I think creating a Keg tag for this room might be nice.
room topic changed to Keg: Discussion about the esolang Keg (documentation:esolangs.org/wiki/Keg). You can ask for golfing advice, new features, beginner questions of Keg, and etc. in this chatroom. [class] [code-golf] [keg] [practice] [tips]
 
5:32 PM
would it be worth making a tips question for Keg?
 
A__
It is really worth it. My tips question got downvotes, probably because no one knew Keg back then.
 
A__
5:50 PM
@EdgyNerd Did you get around to making a tips question?
 
No, I decided not to just yet, since barely anyone has posted answers in Keg yet
 
 
5 hours later…
10:29 PM
@A__ is the list even still current? Because it seems like there hasn't been much activity on that post for a long time now (Oct 2018).
Also, if anyone has questions in regards to the history of Keg, or why certain things are the way they are, I'm happy to answer!
Quick question: what's a good name for a new string compression method? (I was thinking "Kompression")
 

  last day (251 days later) »