« first day (3502 days earlier)      last day (1348 days later) » 

12:08 AM
0
Q: Can we do some tag spring cleaning?

caird coinheringaahingLooking at the last 3 pages of tags (sorted by popular), we can see a whole bunch of tags which are used on 5 questions or less. All of the questions with 0 questions (page 9 and some on page 8) are all synonyms of other tags, so we don't have to deal with them. However, that still leaves almost ...

 
 
1 hour later…
1:15 AM
@DLosc thanks a lot for the help
 
1:38 AM
My pleasure :)
 
2:07 AM
Now that it's more than just me using Pip, I think I'm going to post a question. Always felt weird about doing that before.
 
2:29 AM
0
Q: Tips for golfing in Pip

DLoscPip is an imperative golfing language with infix operators. It also borrows some features from functional and array programming. What general tips do you have for golfing in Pip? I'm looking for approaches and tricks that are commonly useful for code golf and are specific to Pip (e.g. "remove com...

 
 
2 hours later…
4:18 AM
sounds great to me
 
 
1 hour later…
5:47 AM
@DLosc what am I doing wrong here? tio.run/##K8gs@P/fLVNHObE6IDgk0cYus/b///@JRVlF5UUA
 
6:11 AM
@Razetime Ooh, that's a fun one. I think I would call that a bug in the interpreter. Since you're looping over a 0-based range, i is 0 in the first iteration. So a<>i is trying to divide a into groups of 0 characters each. Evidently, I've implemented <> such that this results in an infinite loop.
It should probably give a warning and return nil instead, like dividing by 0 would.
 
6:27 AM
Interesting.
It prints i when i mention it plainly, but throws a divide by zero error when I return the root of it.
PRTi works, however.
 
 
3 hours later…
9:52 AM
@DLosc now that I did change it to a 1-indexed range and modded it a bit, it seems run forever with a negative index for the <> operator
 
 
2 hours later…
12:12 PM
0
A: Sandbox for Proposed Challenges

RazetimeNumber size Given a whole number \$≤ 100,\$ extend(or shorten) the number to have as many characters as it's value. Inspired by this meme. Please tell me if there is anything I left out or failed to consider. Rules Take the whole number \$n\$, and write it in words. i.e. 53 → fifty three, not fiv...

 
 
4 hours later…
4:08 PM
-2
Q: (Fewest LINES, not bytes) Print plot of sin() vertically with arguments for used characters and size

FinniThe challenge is to print a vertical plot of sin() to the console. The plot should look like this: Example 1 The following parameters of the plot need to be stored in a single array of any datatype (so that you can easily change them): the character used for the x-axis. Here: | (which is vertic...

 
4:47 PM
8
Q: Find all reachable nodes in a graph

isaacgYou are given a directed graph in an adjacency dictionary format. This can be whatever format is most natural for your language. For instance, in python, this would be a dictionary with keys of nodes and values which are lists of nodes which that node has an edge to. For instance: G={1: [2, 3],...

 
4:58 PM
@Bubbler You've got me in a bit of a bind with this, because I forgot that Whispers had an "Eval as Python" command, and, if I'd remembered, I would've banned its use to claim the bounty
Unfortunately, it looks like I was reminded too late :/
 
 
6 hours later…
10:58 PM
@cairdcoinheringaahing Do you have an answer to the first line of this comment?
 
@Bubbler To my knowledge, no, which is why I'm working on a builtin that allows you to rewrite the program during execution
Should be up on github after I add in a couple more features
However, I think you might be able to use of L and R, combined with the infix command in order to make use of While loops, I've just never tried
 
@cairdcoinheringaahing I thought a three-parameter While would do the job, like While <cond> <func> <init>
 
@Bubbler What is <init>?
 
<init> evaluates to a value, then it is passed as a parameter to <cond> and <func>. It is repeatedly applied <func> until <cond> becomes false.
 
@Bubbler Would you mind giving an example, I'm not quite sure how that would allow While loops to be mutable
 
11:08 PM
@cairdcoinheringaahing If init = 1, cond = x<100, func = x*2, the while loop doubles the number 1 until it gets at least 100, stopping at 128 and returning it.
So the intermediate result in the loop acts as a mutable state
 
@Bubbler So init is replaced by func(init) each loop
 
Yes.
 
Ok, that makes sense
Shouldn't be too difficult to add support for that, and, given the different syntax, it should be doable to keep the old syntax as well
 
I guess so too.
 
@Bubbler I just dislike making breaking changes unless I have to, that's why I mentioned it
Given that pretty much every update in Add++ was a breaking change, I've tried to be cleaner with my updates since then
 
11:13 PM
I think adding it will allow simulating a FRACTRAN-like register machine
 
@Bubbler Translated to Whispers. Doesn't work in v2, but tested locally in my dev version of v3 and it works exactly like you described
Outputs 128 locally
 
Yeah, exactly like that.
 
I've added the same functionality to the DoWhile loops as well, just to be comprehensive
@Bubbler For the bounty, technically speaking, your eval answer does meet the rules, and is a valid answer. However, as I said, I forgot about eval, and personally, I don't consider it a fully Whispers answer. If you don't mind, I'd like to change the bounty to include the "no eval" rule. However, you did complete the bounty as it was initially put up, and if you would like me to award you the bounty, I will happily do so. Personally, I'd rather wait until a non-eval based answer is posted, but if you want me to award the bounty, I will
Although, I won't award the additional 300, only the 150
 
I'll try not using eval and update my answer, though I doubt I will find the minimal approach or prove something is really minimal (like the BF simulator in 8-char APL I linked isn't proven to be minimal)
 
11:30 PM
@Bubbler Thanks for understanding :P The updated v3 should be on github by tomorrow if you need it for testing
 

« first day (3502 days earlier)      last day (1348 days later) »