« first day (3274 days earlier)      last day (1559 days later) » 

12:51 AM
0
Q: 99 ways to say "I love you"

MasonInspired by this blog post. Write a program that outputs 99 distinct programs (in the same language) that output the string I love you. How the programs are separated from one another in the output will be defined by you. However, Each byte of output can only belong to 1 of the 99 programs. C...

 
 
2 hours later…
3:11 AM
@Adám APLnap
 
3:52 AM
currently working on creating an online interpreter for my esolang
would it be bad practice to go back to all the questions i've already answered with it and add a link?
i would assume so, since the 8 most recently edited answers on the site would then become mine
 
ngn
@Adám da ganja man
@sporeball so? that shouldn't be a concern. i too have done such burst editing in the past.
@sporeball i think it's also a good idea to add your codegolf answers as tests for the language and update them whenever you introduce a breaking change
 
4:19 AM
good idea
 
 
6 hours later…
10:17 AM
11
Q: A queen's walk across a spiral

Sherlock9In a far-off kingdom, a chess queen takes a daily walk across a spiral path, numbered from 1 to n, not caring to follow the spiral itself, but simply making queen's moves as she would on a chessboard. The queen is beloved by her subjects, and they make a note of every square she visits on her pat...

 
 
3 hours later…
12:50 PM
Respectable 24 bytes
 
 
2 hours later…
3:14 PM
When did the timeline button get added? (I know the page has existed for some time)
 
@H.PWiz interesting. somewhere between 6 to 2 hours ago
 
@H.PWiz What button?
 
@Adám button below upvote/downvote of any post
 
Ah thanks. I see now.
 
shog9 tweet thread, don't think it was posted here yet
 
 
2 hours later…
5:26 PM
 
5:46 PM
In your opinion, which of these two snippets is uglier? (Python)
# 1
try:
    if a.b.c.get() != 0:
        # Do something...
except:
    pass

# 2
if a is not None and a.b is not None and a.b.c.get() != 0:
    # Do something...
(This is assuming that if a.b is not None, than a.b.c cannot be None)
So basically is it better to ask for forgiveness or permission?
 
@Neil Clearly, they should have used the cat command when leaving the computer.
 
6:46 PM
@DJMcMayhem I think #2 is uglier
 
7:26 PM
@DJMcMayhem I prefer the latter form since it's more explicit.
 
When debating the use of exceptions I find it useful to ask myself if the use case is actually exceptional. Is this something you expect to happen? Worth remembering that exceptions are a code flow interrupt which is sometimes what you want.

On the other hand it's "more pythonic" to ask for forgiveness iirc.
Depending on the context I don't know that either of those is ugly
although something like a.b.c.get() seems to violate the law of demeter
or approaches it
 
7:42 PM
@Poke Hmm, interesting, I've never heard of that before
I think I'd agree with it in general, but I don't know if there's a way to avoid it here
 
7:53 PM
that's always the problem :]
there is always the consideration that you might be over-engineering something too
 
CMC: NMP, reading from a file and outputting to STDOUT (or equivalent).
 
-2
Q: Please help with this C++ question

KINGINwrite a program that loads 10 values from a file and computes the average. you should only open the file once. C++

 
@AdmBorkBork PowerShell, 23 bytes Try it online!
 
8:49 PM
Any last feedback on this?
 
9:07 PM
@Jono2906 A list of what brackets are matched would be a good inclusion.
Just to explicitly say "{" matches with "}" and the like.
Oh nevermind, that's your second paragraph, haha
Why does [AbC] --> [AbC]]?
Same with the number one just below it
 
@AdmBorkBork must be a bug with my generator
 
A test case like A[bc --> A[bc] would be good, too. I don't see one where the only open bracket is in the middle.
Otherwise, gets a thumbs-up from me.
Oh. You have empty string as input, will it ever consist of only brackets?
If so, a test case with that might be good, too.
 
 
1 hour later…
10:23 PM
1
Q: Keta Bracket Autocompletion

Jono 2906Keta (Keyboard tacit — clever naming, I know!) is a golfing language I’ve been working on recently. One of it’s features is it’s most probably unique bracket autocompletion system, which will hopefully allow for shorter programs. There are two types of brackets in Keta: grouping brackets ([] and...

 
 
2 hours later…
11:58 PM
0
Q: Spotify Shuffle (music playlist shuffle algorithm)

BubblerBackground Perfect shuffle algorithms like Fisher-Yates shuffle don't produce great results when it comes to music playlist shuffling, because it often produces clusters of songs from the same album. In an attempt to solve this problem, Spotify introduced an interesting shuffle algorithm in 2014...

 

« first day (3274 days earlier)      last day (1559 days later) »