« first day (2492 days earlier)      last day (2354 days later) » 

1:14 AM
Who got deleted one hour ago?
2
A: Build this pyramid

user76250Jelly, 15 bytes 24p;€$€;/ ḅ70ị¢ Try it online! This is fairly simple: we construct the list of coordinates of cubes within the pyramid as an actual list. Then all we need to do is biject the input coordinates within the square into an index within the list, which is trivial to do via base con...

 
1:51 AM
Would you guys please take a look at this question in Maths.SE, in case you can give some idea?
 
2:48 AM
@LuisMendo were the existing comments helpful enough?
 
3:37 AM
@MDXF Looks like they only had two answers in Jelly if that is at all helpful
I'm always interested in these mysteries
 
 
2 hours later…
5:24 AM
@Downgoat You should probably have options for none on each of the questions as it is impossible to answer them if the answer is none.
 
5:36 AM
@WheatWizard I added an other option but if a language doesn’t have data types then it’s not a lang
 
I mostly meant the first one
I'm not sure that languages require data, types though.
 
6:21 AM
@WheatWizard Same here
 
6:48 AM
._. how does Community make edits
 
 
2 hours later…
8:36 AM
I don't understand why ais523 left the site but actually still posts answers
 
@Fatalize ais523 is now user62131, not user76249
 
There's no way this isn't ais523
"Brachylog v2" + long explanation + knows Brachylog + criticizes Brachylog at the end
 
well, ¯\_(ツ)_/¯
oh wait that really looks like it's posted by ais523
especially the explanation doesn't follow the one-code-block usual format and the expressions used
 
yeah
 
9:01 AM
0
Q: Build an Electrical Grid

Colera SuThe Challenge There are N cities aligned in a straight line. The i-th city is located at A[i] kilometers to the right of the origin. No two cities will be in the same place. You are going to build an electrical grid with some power plants. Power plants must be built inside the city. However, yo...

 
9:47 AM
@Fatalize I still enjoy golfing, and most of my criticisms of the site go away when you don't have any reputation (things like the moderation tools being ridiculous, etc., aren't really a concern for newbies), so I've posted a few answers anonymously (typically I delete the account a few seconds after posting the answer, to ensure that it doesn't end up in a state where it can't be deleted)
so this way I get the most of all worlds, really
(also, Stack Exchange generally sucks at deleting accounts, as evidenced by the fact that I can still post here)
wait, how on earth do I have >20k rep here, I definitely don't have that on non-PPCG sites and my PPCG account was deleted…
it kept the badges too
I give up, SE clearly don't know how to run a website
(I also considered keeping an account and just bountying away all the reputation, but I really don't want to flood the site with junk bounties, and I imagine that SE would get fed up of manually deleting an account repeatedly)
 
@ais523 Well, you should join PPCG v2 when it's finished :-)
 
I've been giving suggestions to it precisely because of that
although if it relies on Google accounts I won't be able to (I don't have a Google account and am unwilling to create one)
 
Awww come on you can just use a dummy one
 
10:10 AM
just to clarify about why I'm trying so hard to avoid gaining reputation: the pressure to gain reputation does things like making you continuously check the site to see if people are voting on your answers, try to FGITW questions before they're fully thought through, post near-trivial questions because they're nearly always massively upvoted, and the like
if I post anonymously – unable to gain reputation – much of that pressure goes away; in a way, it doesn't matter how many votes a post gets if it's from a deleted user, so instead it should hopefully be evaluated more on its own merits
 
10:53 AM
If you feel that pressure, I think you care too much
 
@Fatalize I did, and it was kind-of ruining my life, so this is the way I'm coping with it
(note that SE is explicitly designed to produce that sort of pressure…)
 
@ais523 But anyway glad to see that you're still using Brachylog! I got a few ideas to make that "all deltas equal" shorter (a (is a delta of the list predicate and a "all choice points lead to the same result" metapred)
@ais523 I see
 
but that said, is it really a bad thing that I care about the site? I really do like the community here, and the questions, and all that sort of thing
I just hate the site software itself so much, and the SE administration to some extent too
 
There is caring and caring. I care about the cool stuff I see from time to time on the site, and some of the things I contributed
 
10:56 AM
also, nowadays I don't post answers unless I particularly like them or else feel they're missing (e.g. a Jelly answer to a question that badly needs one and doesn't have one)
 
But if the site were to disappear tomorrow I wouldn't cry over it
 
rather than aiming to get an early answer on every question for the rep
 
@ais523 Same, I don't post many answers nowadays
Anyway, you can keep submitting answers anonymously if that's better for you. I'm more interested in your answers/explanations than you having more rep than me :)
 
fwiw, Brachylog is one of those languages that changed my perspective on programming
4
rather more than Prolog did, actually
 
Really? blushes
 
10:58 AM
although sometimes the underlying Prolog shows through and it's a pain when it does
 
Why though? It's not that much different from Prolog from a paradigm standpoint
 
it's because it's one of the first languages I've seen that is focused mostly on the problem rather than on the solution
 
WW's hunt for the weirdest profile picture continues
3
 
someone interviewed me about esolangs recently (the interview hasn't been published yet), and I went and gave three Brachylog programs for the same simple problem to explain what sort of expressivity you can get in a golfing language
the equivalent Prolog programs would have been much uglier (and in fact wouldn't work without the help of libraries)
 
Yeah the big problem with Prolog is that there are very few libraries/built-in constructs to be more expressive
(which incidentally makes developping Brachylog harder because you have to implement everything...)
@ais523 I agree, but succeeding in hiding Prolog in all cases is pretty much impossible :(
I've lost quite a bit of willpower on developping Brachylog in the last months
 
11:03 AM
Brachylog's libraries are part of what defines the nature of the language, I think
operations like "prime decomposition" are not the sort of thing that comes in standard libraries normally
(the only non-golfing-language example I'm aware of is factor in coreutils; Mathematica doesn't count)
 
Started doing more sport this summer and started my 3rd and final year of PhD in october so I'm just less enthousiastic about it
 
I have been working on some extent to my own golfing language, but I'm pulled in way too many directions at once
so haven't got all that far
 
I was about to ask about that :p
 
that said, I've worked out an evaluation algorithm for it that should produce Prolog-like results in cases where Prolog works, but act better in cases where it doesn't
(it's vaguely similar to Prolog + an unbounded loop detector, and uses this sort of trick to handle unbounded loops by running them in parallel)
I'm not sure if I want to implement reference variables / the trail array, though; they're certainly useful in Prolog but I'm not sure if they're as useful here
don't feel like you need to work on Brachylog, anyway
no matter how much you work on it I'm likely never to be satisfied
I'm too much of a perfectionist when it comes to languages
 
The only thing I'm not satisfied with is that it's hard to pass variables from a predicate to another
I had plans to improve this but it's been more obnoxious than I though to implement so I kind of gave up
 
11:10 AM
it's clear what the syntax would be, and equally clear that it'd be a pain to implement
 
And since it's not a groundbreaking feature, it's probably not gonna change who uses/doesn't use Brachylog
 
(if you have two predicates with one nested in the other, and a variable name appears in both, it should be shared)
come to think of it, a good "hotfix" for that would be to have a few global variables
which are shared between all predicates
 
yeah that would be the quick solution
 
those would be useful even when you had just one predicate, too
e.g. if I use a global variable inside a map, that means it needs the same value for all elements
 
But if I started to work on Brachylog again I would rather want to make it a bit less golfy and more expressive
With the goal of writing a Brachylog interpreter in Brachylog
 
11:12 AM
(whereas a local variable would be unique to the element)
 
Probably never going to happen though :p
 
right, I think Brachylog's being pulled in two directions
one of my early attempts at an "improved Brachylog", which I vaguely planned but never implemented, had a 6-bit codepage and the meaning of each of the 64 characters was heavily context-sensitive
for example, you defined predicates by masking builtins; builtins came in pairs, and if one was masked by a predicate, the other member of the same pair would become a variable
that way you have a large set of identifiers if you need them but they don't take up any character set space that could be used for builtins
but something like that is very much against the spirit of Brachylog's syntax
 
That would be really golfy and also really unreadable from program to program :p
 
my experience with golfing languages is that few people try to read them anyway
they just assume they can't read them, even with the relatively readable ones like Jelly and Brachylog
 
The problems I've had reading Jelly is that the rules for what's monadic/dyadic are crazy
 
11:20 AM
right, that's a huge pain because sometimes it's calculated outside-in, and sometimes inside-out
 
When I read a chain of built-ins I have no idea what inputs they each take
 
actually I normally program Jelly by trial and error, when it comes to arity
 
Me too ^
 
normally I guess right, nowadays, except when writing my own dyads
which is normally a complete disaster
 
I sometimes hate Jelly control flow
 
11:24 AM
I thought it was mostly straightforward, apart from ¦ which acts pretty differently from what you'd expect
the parsing, on the other hand, is much less straighforward
 
I find myself in trouble when I write things like <blahblah><ɓ/µ/whatever><blah><blah>
Or handling helper links
 
that's more a parsing issue than a control flow issue, I'd say
 
I wouldn't call it an issue, I'd just say it's a bit annoying and uncomfortable to use, although it is rather golfy
 
actually, I'd say one of Jelly's main weaknesses is $$ and µµ, that's two characters for something that's fairly common
 
Yeah, that too. We should make a feature request for $$. It should be replaced by a single char
 
11:30 AM
especially as ABC$$ and AB$C$ are equivalent in most cases (for arbitrary monads A,B,C); it upsets me when I see two equivalent bits of code in golfing languages as it's a clear loss in compressibility
 
yeah, we most definitely need something like "last 3 links as a monad"
@ais523 I am afraid there is nothing to do about µ...µ
 
what I'd actually suggest would be a syntactic element "combine everything from here to the next quick (other than $ and friends, and Ŀ and friends) into a single link"
 
That would be harder to implement though... @Dennis What do you think about ^, ^^^?
 
Jelly's other largest problem, incidentally, is an explosion of in brute-forcers; this is a problem that Brachylog solves by having lists and generators as separate concepts
 
Why is ^ a problem?
 
11:35 AM
it wastes bytes
 
Example?
 
I'm not sure I can remember any offhand
i tried searching for €€ but got no results, I guess it's the sort of thing that SE doesn't index
 
well ok then
 
hmm, what about this one?:
3
A: Calculate the Number, Divisors Edition

DennisJelly, 17 16 bytes ×€ȷ5R¤ÆDL€€Z=Ḅi3 This is a brute force solution that tries all possible values up to 100,000. Try it online! Non-competing version The latest version of Jelly has a bug fix that allows to golf down the above code to 15 bytes. ȷ5R×€³ÆDL€€=Ḅi3 Try it online! How it works...

lots of euro signs there
 
Ok what would you think that should become?
How could it be improved
 
11:38 AM
hmm, it's not a perfect example because it depends on matching up each kx with the corresponding kz
but if you change the first R to a hypothetical range generator rather than producing a list
then you would only need L€ not L€€, and you wouldn't need the zip, and =Ḅi3 would almost certainly be shorter than four bytes if it used generator primitives (although you'd want to change the algorithm)
 
I see
@Adám Pyth, 4 bytes: .fn3
Jelly, 5 bytes 1n3$#
Also 5 bytes: R>2+R
 
@Mr.Xcoder isn't the 9 supposed to be a part of the program?
 
Oh, first 9 numbers... I read it as first N.
 
I like the R>2+R solution
 
@dzaima Then 4 bytes: -ST3
Thanks!
 
11:50 AM
you can adapt the same general idea to print 3 twice, too: `9n€3+\`
 
Indeed
Reading the challenge again properly, Jelly, 4 bytes ⁵Rḟ3
 
interestingly, the integer 12456789 has a 6-byte representation in Jelly
so just hardcoding the output isn't far off the other solutions
anyway, I should go to bed
bye everyone
 
@ais523 “İL&’ works too
 
@ais523 huh, 4 bytes in SOGL then
 
@ais523 Bye!
So “İL&’D also works
BTW your chat info just got updated
 
12:00 PM
CMC: bracket triangle. Example for 3:
[]
[][]
[][][]
 
12:57 PM
@Pavel If an anonymous user suggests an edit, then Community takes credit for it
 
Or it edits links, from http://stackexchange.blah to https://stackexchange.blah
 
1:47 PM
The next OEIS sequence oeis.org/A000636 is related to chemistry. X is some atoms (!= H, of course) with valence 1.
 
2:43 PM
0
Q: Calculate pi, but

Aditya GoturuThe Challenge: Calculate pi, using a spigot style algorithm, but do so, in a domain specific programming language that isn't intended for computation. Acceptable languages include (but aren't limited to): Makefile, Vimscript, Grub config, the C Preprocessor etc.

0
Q: A bank for less Trustworthy Friends

Herman LauensteinIntroduction You have gotten a job as the minister of finance in your made-up country in your back yard. You have decided to make your own bank in your country for you and your less trustworthy friends. Since you don't trust your friends, you have decided to write a program to validate all trans...

 
3:23 PM
3
Q: BigNum Bakeoff Reboot

Simply Beautiful ArtSome of you may be familiar with the BigNum Bakeoff, which ended up quite interestingly. The goal can more or less be summarized as writing a C program who's output would be the largest, under some constraints and theoretical conditions e.g. a computer that could run the program. In the same spi...

Think I should write out a few explanations on the fast growing hierarchy, at least for small values?
 
3:46 PM
@dzaima Charcoal, 7 bytes: EN×[]⊕ι
 
4:43 PM
@dzaima Japt, can't believe I managed to fit this into 5 bytes: õç"[]
Note: returns an array of lines, -R flag added to join them on newlines
 
@ETHproductions Nice. That language that I'm making gets 5 bytes (currently) too, and SOGL's staying behind with 6 bytes
 
I should get back to working on Crayon so it's actually reasonably finished by the end of the year
Man, there's a lot of things I need to finish up...
 
huh, looking at Crayon - it and my language both are for ascii-art, made in JS and are stack based :p
 
haha, nice
it's not online anywhere is it?
 
@ETHproductions nope, it barely can push strings and the only string manipulation is repeat :p
 
4:52 PM
#relateable
The version of Crayon available online was hardly more advanced than that for several months
I had major changes just sitting in my local repo for four months before I committed them
 
I don't think it will have a main canvas though, but that might be optional. And I'll leave cursor/positioning stuff for Charcoal
 
@EricTressler Yes, they were (although a sharper answer would always be welcome). Question 2 is answered negatively by the counterexamples in the Wikipedia article. As for question 1, I gather there is no formula or algorithm
I will soon post a challenge about this :-)
 
Barely related: I spent a few hours learning the concepts of V a while back and it really changed my perspective on ASCII-art golfing langs
The only memory it has is the "canvas" (called a buffer), but it's really freakin' good at manipulating that
even though it can only insert/overwrite text horizontally like a normal text editor
 
@ETHproductions ?
 
or am I wrong about that?
 
4:58 PM
0
Q: Append and erase

iBugGiven one line that consists of only letters, process as following: You maintain a string that's empty at the beginning. If the next character exists in the string, erase it. If the next character doesn't exist in the string, append it to the last Output the final state of the string. Pseudo...

 
I'm fairly certain you can do it vertically in vim
it's just tricky
and i think vim is compatible with V (or the other way around)
 
You can't just point the cursor in any desired direction though was my main point
V is backwards-compatible with vim IIRC
 
yeah thanks
I knew what i meant I just can't word things today
@ETHproductions ah, yeah
@DJMcMayhem idea: 4D V
 
@LuisMendo You did get all of the help already that I could have offered without doing research. I don't know how you came up with the question, but you stumbled onto a pretty well-studied difficult problem
@LuisMendo I don't remember as much about additive combinatorics as I should, but I think there is a lot more you can say about |A + A| than |A - B| (where that is {a + a' : a,a' in A}, {a - b : a in A, b in B})
 
5:17 PM
Is it bad that I always read apostrophes as string literals...?
 
@Riker aaaaaagh
@ETHproductions Correct, you can't change the direction of the cursor
You can sorta do it in reverse, but that's not super convenient
@ETHproductions V is like 95% backwards compatible, with a few very minor differences (implicit endings, M, H, and L are different, and 0 doesn't always work)
 
\o/ Verbosity can print Hello, World! (and takes about 150 bytes to do so :P)
 
I'm really glad to hear you for found V helpful and interesting. :)
 
@ETHproductions yes, definitely
 
@cairdcoinheringaahing ಠ_ಠ not enough
 
5:22 PM
for example 'a in Japt isn't an unterminated string literal, but a perfectly terminated 1-char string literal
 
@dzaima It's designed to be readable, as well as long (like a better version of Java)
So something like 1 repeated umpteen times wouldn't be a good language to make
 
@EricTressler Funny thing, it's a real application. For some radio propagation measurements, I want to transmit as few frequencies as possible and get as many differences between them as possible, all differences being multiples of a certain frequency step
 
0
Q: Swap the Endianness

Bruce ForteAs most of you probably know, (byte-addressable) hardware memories can be divided into two categories - little-endian and big-endian. In little-endian memories the bytes are numbered starting with 0 at the little (least significant) end and in big-endian ones the other way round. Fun fact: Thes...

 
But it will also make a good challenge
 
@LuisMendo hmm
 
6:00 PM
@LuisMendo that's really interesting. If you need a large number of differences (say, dozens or hundreds or more), where the exact optimal sets are impossible to calculate, there might be good constructions that drop the optimality condition
 
6:19 PM
22
Q: Calculate 500 digits of pi

Thomas OWrite a program to calculate the first 500 digits of pi, meeting the rules below: It must be less than 500 characters in length. It cannot include "pi", "math.pi" or similar pi constants, nor may it call a library function to calculate pi. It may not use the digits "3", "1" and "4" consecutivel...

Someone should figure out how to answer in base 16 or base 2.
 
@SimplyBeautifulArt huh?
 
@EriktheOutgolfer The challenge doesn't specify what base the output must be in
And there are some nice algorithms for finding pi in base 2 or base 16.
 
not sure how would that make things golfier
 
Not sure if it would either, but it'd be interesting.
 
@SimplyBeautifulArt it's not "2 or 16", it's a spigot algorithm for base 16 (which automatically gives you a spigot algorithm for base 2^k)
I guess it's not really appropriate to even say it's base 16, it's just any power of 2, so maybe it's more natural to think of it as a binary algorithm
Nobody knows whether there's a decimal equivalent, but an answer either way would probably be very interesting
 
6:40 PM
Verbosity makes you hate it so much :P You have to define a STDOUT variable before printing any output :P
 
lol
@cairdcoinheringaahing not always though
 
what
what "always"
 
:-/
Maybe idk what I'm talking about, so ignore me
 
@SimplyBeautifulArt Yes, always. You can't output unless you have Output:DeclareVariable<name; 0> beforehand
 
6:55 PM
FWIW, this is the golfed Hello, World! in Verbosity :P
 
@cairdcoinheringaahing excessive whitespace?
 
@EriktheOutgolfer Nope. That's required :P
 
0
Q: Find the center through this alternating grid

MixxiphoidIntroduction I was trying to find a way to calculate the shortest amount of moves for a path through a grid where the adjacent tiles alternate between two colors, white and red. Also this is my first question, if I there is anything wrong with my question or something to improve, please let me k...

 
Welp, just gave Calvin's Hobbies another gold badge :P
 
0
A: Sandbox for Proposed Challenges

MixxiphoidI already posted this but was adviced to use the Sandbox because it is my first question here. Sorry for switching the order. Find the center through this alternating grid Introduction I was trying to find a way to calculate the shortest amount of steps for a path through a grid where the adj...

 
7:42 PM
> The introduction of the page says you are allowed to ask questions "Q&A for programming puzzle enthusiasts and code golfers" so I thought it would fit here.
yet another reason why that thing needs changing :/
 
 
2 hours later…
9:45 PM
CMP: What should I call a programming language which uses this program structure?
 
No idea how you're supposed to read this "structure"
 
@cairdcoinheringaahing shouldn't the 5th line be divide(line 3, line 4) or am I misunderstanding the idea?
 
@dzaima Yes, it should. Sorry
@Fatalize Basically, it works by each line either returning a constant value, or returning a value dependant on the argument(s) it's given, and the operand between them. If the line begins with a single > it returns a value and the characters 0-9 are interpreted as numbers, otherwise they are seen as line references.
So a Hello World would be:
> "Hello, World!"
> Output 3
(Lines with Input and Output are exceptions to the reference rule, and always reference lines)
 
10:33 PM
Allusion
 
@cairdcoinheringaahing "Unexplainable" because I didn't understand anything
 
It creates references to every statement's return value
one per line
So it's like a conversation with a lot of in-jokes
call it The Implication
Innuendo
 
Also, can someone familiar with Python RegEx explain why this doesn't make a match?
@Fatalize That could be an option :P I'm not very good at explaining things :P
@FrownyFrog Yeah, that's basically it in a nutshell
 
11:11 PM
@cairdcoinheringaahing missing a ? after the comma
 
11:42 PM
@FrownyFrog I figured it out, but thanks anyway!
 

« first day (2492 days earlier)      last day (2354 days later) »