« first day (2466 days earlier)      last day (2370 days later) » 

12:01 AM
Is the Brainfuck just ignored?
 
So the main idea is to create a programming language that doesn't use any of the 8 BF instructions?
 
that's not the main idea, it's just a necessary component of it
"The brackets of the if and else clauses correspond to exactly the same control structures in brainfuck code, which is the point of the annotation."
i think it's useful, at least
@ATaco parsed, but ignored by the interpreter
unmatched brackets, for example, will raise a syntax error
 
Took me a long time to figure out that excl was not a print command.
 
every example ends with one, maybe not the best choice
 
12:26 AM
@Jonah Thank you for this. Just earlier this evening, I wrote an email suggesting the addition to APL of what is essentially L:. But I wasn't aware that L: existed until you just made me aware now. Anyway, it shouldn't be necessary for scalar functions.
 
Anonymous
@ThomasWard If you want, I can change my avatar to laser-eyed penguin :P (but you have to make it)
 
1:02 AM
lol sorry no
 
@Adám yw. on the subject of APL / J crossovers, is there a translation of your answer here to J? The only way I can think to do it in J is: 1&|.@{. , }. which isn't quite as nice as saying "apply the verb to this index"
 
@Jonah I don't think there is a neat way like that. APL's new @ is very nice indeed.
 
@Adám is that a Dyalog only feature?
 
@Jonah Yes, it was added with version 16.0 this summer. In general, no APLs other than Dyalog and NARS have added any new primitives to APL in the last 25 years.
 
@Adám if i wanted to learn a bit of modern APL, what would recommend? Would Iverson's "A Programming Language" be dated or still the first source?
 
1:19 AM
@Jonah Iverson's paper doesn't even resemble APL! I would definitely go for Dyalog, and if you want a book, then Mastering Dyalog APL is the best. Dyalog has added a few things since the book came out, but they are mostly from J, so you should have an easy time picking those up.
 
@Adám do you think that original paper is still worth reading, just because?
 
@Jonah Not if you're trying to learn APL; it will just confuse you by using entirely different symbols and notations. It does have historic interest, if you're interested in how APL/J became what they are.
 
@HyperNeutrino Because 1 number only have 1 representation, unlike normal base (e.g., base 10) when a number (e.g., 5) have multiple representation (5, 05, 005, 0005, etc.)
 
@Adám does Mastering Dyalog APL explain how you can type the symbols in a normal text editor like vim?
 
@user202729 ah okay, thanks that makes sense
 
1:24 AM
@Jonah It is somewhat Windows-centric. Have a look here instead.
 
> a normal text editor like vim?
 
> normal
as much as vim is great and all it's not impressively "normal" :P
 
@HyperNeutrino *for some definition of normal :)
 
sure :P
 
Well, a^x=x^b can be solved with ProductLog function.
 
1:30 AM
The most asked vim question is, "How do I close vim"
 
CMC: Solve a^x=x^b in a golfing language.
 
Given inputs a and b?
 
@ATaco that's their first mistake. they should have asked, "How do I keep vim always open and do all my computing in it?"
@Adám ty, perfect
 
@ATaco Yes.
 
Quote from my friend: I once used Vim for 2 months. It took me 2 months to figure out how to close Vim.
 
1:33 AM
@user202729 Not as hard as I initially thought.
 
Shame I suck at solving this form of equation.
 
Only 1 root is required.
It is harder than I just though. This doesn't just work.
 
That's the solution.
(Now find a golf lang with the ProductLog function)
Or, write the function yourself with:
 
1:52 AM
what
infinite sums? nah I'm out lol
 
Does Mathematica count as a golf-lang..?
 
@ATaco Well, you can post a Mathematica solution, but it is not very interesting (expect downvote). Golfing language can't be defined objectively anyway.
 
it seems pretty golfy thanks to its 5000 (ಠ_ಠ) builtins
 
Hey, I'm not just planing to do Solve[...] :P
 
@user202729 Jelly solution which should work: tio.run/##ARsA5P9qZWxsef//bMKzw5figbQKw4fDkEz///8z/zI . Still shorter than Mathematica.
 
2:02 AM
-1 byte: l³×⁴µÐL
but nice
it seems to work very accurately 10/10
 
@HyperNeutrino that sounds low
 
no it's only ~5000 I think
 
But it is not guaranteed to terminate. (well it may be provable, but I can't prove it now)
 
yeah
I mean it kind of relies on floating-point inaccuracy
 
How does that work..?
 
2:04 AM
tested in M and it never stopped
 
@ATaco Fixed-point method for solving equation.
 
I've got a solution in Wolfram Language, but I have no idea how to get output on TIO.
 
TIO search can't find M or J language.
@ATaco Print. Or commandline -print flag.
 
You're close Wolfram, you're close.
 
Symbolic manipulation.
 
2:07 AM
I don't know Mathemtatica
I don't know what i'm doing wrong.
 
TIO link?
I kind of know Mathematica because OEIS challenge :P
 
_
(in function pattern definition you have to use Blank)
 
first of all you should be using [] for function calls I think
f[a_,b_]:=-(b ProductLog[-(log[a])/b])/(log[a])
 
And log should be Log. (Mathematica builtin are always title-case)
 
2:10 AM
(-4*ProductLog[-Log[3]/4])/Log[3]
 
well then
 
Need N to get numerical result.
 
oh ok
 
Or f=-N@(#2ProductLog[-Log@#/#2])/Log@#&, less bytes.
 
2:14 AM
oh it finished? I guess I'm just too impatient :P
 
Stares as math happens
 
lol
math is great
 
Or you find some inputs that makes the program not terminate.
 
oh yeah true
 
What was the input?
$$ a^x = x^b \iff x = b \times \log _a (x) $$
How does mathematical input works here?
 
2:15 AM
 
It doesn't.
 
So the program find the fixed-point of the function $$ x \mapsto b \times \log_a (x) $$
 
that looks approximately correct
 
By using ÐL. If the fixed-point happens to be unstable the program will run forever.
 
2:17 AM
yup
if it oscillates, ÐL still terminates after it's repeated, right?
 
Yes. ÐL will eventually terminate, but it will not give correct result in that case.
 
@HyperNeutrino Yes. ÐL and company run while the results are unique, not until a fixed point is encountered.
 
okay. cool
@user202729 ah okay.
hey cool I have a really rare gold meta badge :D
I just realized that it's not very common xD
 
(By the way, you can use This generator to make images from mathjax)
 
@HyperNeutrino Or TIO gets some problem.
 
2:21 AM
I closed it after like 10 seconds so I think I'm just too impatient :P
 
This input set also work. I conjecture that for all (a, b) pair such that there exist a solution, there exist a stable fixed point of the function.
 
The problem is really only 1-dimensional, right?
 
Yep
 
Since b log_a(x) = log_(a / log b) x or something like that.
 
a and b are knowns, and x is unknown.
 
2:29 AM
Yes I understand.
Maybe that should be log_(a ^ (1/b)) x
 
a^x == x^b => x = b log_a x
 
@feersum Correct.
What is the shortest way in Jelly to suppress output?
 
\n
Jelly will only implicitely output what's on the main (Last) chain.
 
You do need to have links on the last chain.
 
2:41 AM
So if you have links, it will prints? I don't really understand what you means.
 
Anonymous
CMC: given an integer N, run for N seconds (± 1 second) of wall clock time. Use of sleep and similar is forbidden.
 
@Mego Do X without Y? (I guess it's allowed in CMC)
 
Anonymous
@user202729 That's why it's a CMC and not a main site challenge.
 
Anonymous
It's also quite difficult and will likely require hardware-specific hacks
 
I guess you just need current = time(); while (time() < current + N) {}?
 
Anonymous
2:46 AM
@user202729 a) That probably should qualify under "sleep and similar". b) If CPU resources are being hogged by other processes, time may not have enough precision between calls to get within 1 second.
 
@Mego No sleep function is implemented so that it takes that much resource. Also if CPU resources are hogged the program may not have enough resource to exit either. (<- Didn't try in practice, may be wrong)
 
Creates an event to fire off a*1000 ms later. Funky stays alive whilst waiting for events of this nature to fire.
 
Or you buy some weird computer such that each instruction takes a particular fixed time, then do a simple loop.
 
s/weird/old
 
Old computer is not necessarily consistent.
 
2:52 AM
It's consistent across the same computer.
 
Anonymous
Hmm, unusable esolang idea: instead of different instructions, the language tries to execute the same set of instructions in a loop, and the commands control where in the loop breaks happen to get the desired output.
 
Anonymous
@ATaco I find that computers become very inconsistent when cats are allowed near their power cables
 
Probably. So you can write a program like int input; std::cin >> input; for (long long i = 0x12345678LL /* magic number for this computer only */ * input; i --> 0;);
 
Although a very different concept, I'm reminded of when I was writing Threead.
 
@ConorO'Brien I'm imagining JEOFF forgetting to switch from APL keyboard to regular layout one day...
All in all, an intresting enough short story.
 
why thank you
 
3:44 AM
> interesting
do you dare call that last line interesting
it's both glorious and horrifying
 
Anonymous
3:59 AM
@ConorO'Brien I approve
 
4:22 AM
@Mego C - Try it online!: main(a,b)char**b;{a=999999*atol(b[1]);for(;--a;)malloc(-1u);}
it works decently, but the margin of error increases as time increases. 30 as input lasts about 32 seconds
some finagling of the constants might be in order
 
4:51 AM
-1
Q: 11 year old-which progamming language suitable

IznaMy 11 year old son, wants to start programming. He has a 3 months holiday span. I have no idea how to start him or what program to start him with. He loves gaming and was asking me if possible how to program games. So here I am, asking advice from the experts in Programming on this platform. Tha...

 
 
4 hours later…
8:32 AM
1
Q: Can we encourage more users to ask questions?

Stewie GriffinRecently, the question rate on PPCG has dropped significantly. I haven't looked through the numbers all the way back, but we once had 9.9 questions per day. The number of questions per day is of course not the best measure since we want good question, not bad ones, and 90 % of everything is cra...

 
 
1 hour later…
9:58 AM
Community randomly bumps old unanswered posts (at least on SO), to attract attention. Would it be possible to randomly bump upvoted, but abandoned posts in the Sandbox? This is related to this old meta post by @MartinEnder.
I realize that we (most likely) can't have a bot do this, since it wouldn't pass "are you a human" test. But, can this be done in some other way?
I'm willing to write a comment on one (or a few) random old upvoted post(s) a few times a week, saying "Up for grabs" is added if OP doesn't reply within a week. Then edit it one week after, so that it gains attention and let someone finish the challenge if they want to.
 
 
3 hours later…
12:44 PM
@muddyfish Pyke : Group the list L into runs of equal adjacent elements. [1,1,1,4,5,6,6,7,7,3] -> [[1,1,1],[4],[5],[6,6],[7,7],[3]] (maybe it already exists but I couldn't find it.
 
CMC: Group a given list into runs of equal adjacent elements. [1,1,1,4,5,6,6,7,7,3] -> [[1,1,1],[4],[5],[6,6],[7,7],[3]]
 
:P
I was just adding that
 
But not all languages have concept of "list".
 
@user202729 / array / vector by default
@Adám Gaia (1 byte): , Jelly (2 bytes): Œg, 05AB1E (1 byte): γ
 
@Mr.Xcoder Can you do it in APL?
 
12:52 PM
Good question.
 
Mathematica 5 bytes Split
 
@Adám To make sure, this is not a built-in right?
 
@Mr.Xcoder No. I can do it with four primitives.
 
@Adám Where can I find the full list of what each char does? I think Primer doesn't suffice now.
(I feel like I've asked this before)
 
12:59 PM
Thank you!
@Adám I am pretty sure I gotta use , but can you please explain me the syntax (namely that Mv)?
@Adám Same for .
anyway gtg o/
 
1:15 PM
 
3
A: Sandbox for Proposed Challenges

Conor O'BrienConcatenative counting source-layout code-challenge number Your challenge is to write N snippets of code such that, when you concatenate the first K together, they produce the number K. The higher N, the better. Here's the catch: you may not use any character more than once across your snippets...

thinking about posting this
 
Hm good question. Let me think about that one for a bit.
@user202729 how about ṛ“”?
(using the thing I said I never use :D)
 
Yes I can't think of a shorter solution.
But if you make Enlist right-arg 2B this will be 4B.
 
yes
unless I make a 2 byte built-in to suppress output
yup made a 2-byte to suppress output
 
1:31 PM
Hello peoples o/
 
hi o/
 
@ConorO'Brien seems cool indeed
 
CMP: What should λ do in Enlist?
 
output a lambda
 
in APL, 3 mins ago, by Adám
⍺ ⊆ ⍵ begins a new partition in whenever the corresponding positive int in is greater than its left-hand neighbour. Zeros in omit their corresponding items in .
in APL, 1 min ago, by Adám
⍺ ⊂ ⍵ begins a new partition in whenever the corresponding Bool in is 1. Zeros in join their corresponding item in to the current partition, or drops them if there is none (i.e. the leftmost partition has not begun yet.)
 
1:43 PM
@HyperNeutrino Carmichael function (maybe as Æλ though)
 
maybe
 
@HyperNeutrino Split a list into two equal-length parts.
 
@ConorO'Brien ._.
@Adám hm interesting idea
 
@HyperNeutrino Actually, generalise it: Split a list into smallest-prime-possible equal-length lists.
CMC: Split a given list into smallest-prime-possible equal-length lists.
E.g. [1,2,3,4,5,6][[1,2,3],[4,5,6]]
[1,2,3,4,5,6,7,8,9][[1,2,3],[4,5,6],[7,8,9]]
 
Aren't those the greatest possible primes to split them in? I'd imagine [1,2,3,4,5,6] → [[1,2],[3,4],[5,6]] for the smallest possible prime (2)
 
1:50 PM
@J.Salle The smallest prime is for the number of lists, not for their lengths.
 
@Adám Oh, I see
 
Jelly 6 bytes Try it online!
 
@Adám still stuck in this CMC though >.>
 
@Adám Brachylog, 9 bytes: ~c.lᵐ=hṗ∧
(also slow)
 
0
A: Sandbox for Proposed Challenges

AdmBorkBorkFour Colors in Hex (Meta: this is pretty rough just so I get my idea down and don't forget it) Given a hexagonal tiling, change the characters' colors (via ANSI codes, image manipulation, etc.) so that the Four Color Theorem holds for your coloring. The twist is the middle of the hexagons (the ...

 
2:01 PM
@Adám so essentially, turn it into the "shortest" possible matrix (height)?
 
4
Q: Triangles of Hexagons

AdmBorkBorkSuppose an infinite tiling of hexagons composed of |/\ characters. / \ / \ / \ / \ | | | | | \ / \ / \ / \ / etc. | | | | \ / \ / \ / Given input n > 0, output a triangular portion of that tiling as depicted in the below examples, anchored with a _ in the middle of a hexa...

 
@HyperNeutrino Yeah.
 
2:18 PM
@Adám Pyke, 4 bytes, lPec, Try it here!
 
@muddyfish Fails on [1,2,3,4,5,6,7]
 
@Adám what's the correct answer meant to be?
 
@muddyfish [[1],[2],…
 
None of the other answers behave like that :P
 
Because 1 is not prime.
 
2:21 PM
@user202729 7 is
 
If 7 is the result should be [[1,2,3,4,5,6,7]] instead. (list size = 7)
 
@Adám Pyke, 4 bytes, lPhf, Try it here! then
 
Anyone can Jelly in ≤4 byte?
 
I have... 9 :(
 
39 mins ago, by user202729
Jelly 6 bytes Try it online!
 
2:30 PM
lol
first attempts from me are always like 1.5-2 times too long :P
oh yup I'm dumb 6 bytes
MD5 is 2d77335e46981d731e38df82ac84620e
huh different from yours by one byte :P
 
0
A: Sandbox for Proposed Challenges

Kevin CruijssenSymmetric Ladybugs code-golfascii-art Introduction: When we think about Ladybugs, we usually think of a red or dark orange bug with black spots. Although this isn't necessary true, since there are also black with red/orange spotted ladybugs, or ladybugs without spots at all, we mainly picture ...

 
@Adám stupid question, but should we assume that inputs will always be able to be split evenly? What if we get a list with 7 elements, that won't split evenly.
 
@ThomasWard There is always a smallest prime which a length can be evenly divided by.
 
@Adám except for low nuumber primes - if something has a count of 7 items it can't be divided evenly.
that's what i'm asking, should we make assumptions :p
 
Every number is either prime or a product of primes
 
2:35 PM
@Adám I.E. if [1,2,3,4,5,6,7] is passed, what should expected output be
 
@ThomasWard Yes it can. What is the smallest prime by which 7 can be evenly be divided?
 
@Pavel 0.5
 
@Adám itself.
7 is prime.
 
@ThomasWard 1 is not a prime.
 
@HyperNeutrino *Integer
 
2:36 PM
:P
 
@Adám but then i'm confused, so if the length of the list is prime, then it should just return itself?
 
@ThomasWard No, it should split the list! In length-1 pieces if necessary.
 
it should split a list of length k into min(prime_factors(k)) slices
 
@Adám But 1 is not prime.
 
now i'm confused.
 
2:38 PM
@user202729 but that doesn't matter; the number of lists is prime, not the sizes
 
@HyperNeutrino min
 
thanks
 
@HyperNeutrino Exactly.
 
So I read the specification wrong at the beginning.
 
2:39 PM
> CMC: Split a given list into smallest-prime-possible equal-length lists.
 
And my Jelly code is wrong too.
 
if the lengtho f the list is prime, then you can't get equal-length lists unless we assume 1 is prime
 
@ThomasWard the sizes of the lists have to be equal, but the number of lists has to be prime
@user202729 just flip the dot of the M :P :P
 
So I understood that the adjective prime applies to the noun length right after it.
 
ahhh, i see... that's not clear then.
E: Unclear CMC, should be written better next time
 
2:40 PM
CMC (Rephrased): Split a given list into equal-length lists with the smallest possible prime number of sublists.
 
Or use Sandbox for proposed CMC.
 
^ that
 
CMC: Split a given list into as few equal-length lists as possible (minimum 2).
 
is that a thing o_O
 
@HyperNeutrino Still wrong for prime-length. The Æf returns [7].
 
2:41 PM
huh
but how is that wrong then
@Adám Jelly, 6 bytes, TIO, MD5 = 3a97bd4f4aaba0d4b242e637265632fa
1 byte off of my jelly submission to the last CMC :P :P :P
 
@HyperNeutrino Excessive emoticon?
 
meh
it's inline so it doesn't clutter chatroom too much. excessive is more so when someone posts like 3+ messages only containing emoticons which takes up vertical space
I've never had my messages trashed for having 5 emoticons in one line (as long as I still make sense) or for posting a single ":P" on one line (which I've done at least like 500 times :P)
 
@HyperNeutrino yes
 
3:24 PM
Cmc: Given an int array representing a polynomial (e.g. -7x^5+4x^3-x^2+17x-4 => [-7,0,4,-1,17,-4]) output an array representing its derivative.
Test case: [-7, 0, 4, -1, 17, -4] => [-35, 0, 12, -2, 17]
 
Jelly, 5 bytes: Try it online!
 
Today I was checking whether two implementations of the same algorithm were giving the same results. One was in Python, the other in x86 assembly. They didn't agree. After a while I found a bug in the one in Python...
 
@NieDzejkob Have you read my previous message?
 
yeah, I recall that
the one about that OEIS sequence
Actually, you've got me thinking. How does one divide a triangle with 6 nodes with those rules?
 
nice SSL certificate microsoft
 
3:38 PM
@NieDzejkob 6 nodes has 52 triangulations, too much for iterating manually.
 
OEIS offset sais that is for 9 nodes
 
@orlp I think that's some deprecated webpage
 
@NieDzejkob Either OEIS was wrong, or it also counts the outer vertices.
 
yeah, I was thinking about the count with outer vertices
 
(first item is just a triangle, second item is a triangle with a point inside connect to 3 vertices)
and there is no way to use 5 nodes.
 
3:42 PM
and then there is a triangle inside a triangle?
 
imgur.com/a/dvlFG @NieDzejkob Yes correct.
 
4:05 PM
3
Q: Magic email transformation! Or: help the NSA extract your metadata from your email address

LangeHaareGiven an email address, the result of a transformation applied to that email address, and a second email address, return the output of the same transformation applied to the second email address. The email addresses will all have the following structure: A string of positive length containing a...

-1
Q: What is happening in for loop?

Mohmmed AsifBelow is my c-code int main() { int a =20,i; for (i = 5; i >= 1; i --) { int a= a; //why not throwing the error here. // Printf("hello"); Printf("A: %d\n", a);// why am I not able to access the a variable from the main function why filling with garbage value } } Why is my code compilin...

 
4:16 PM
Someone downvoted every answer to build-a-working-game-of-tetris-in-conways-game-of-life. They must really not like fun stuff
 
@Pavel It’s p.. in J but the order of coefficients is reversed
So 7 bytes
 
@muddyfish Huh, part 5 wasn't
 
weird
 
Hmm, Mego didn't get downvoted, but everyone else did. Very weird
 
@muddyfish I'd not worry much about it
 
4:21 PM
Mego sock confirmed. ;-)
 
ಠ_ಠ The user who posted this has a 2 year old SO account, and a ~2 year old PPCG account, and still posts that as his first question here
 
357
A: Should 'drive by' downvoting be more effectively caught?

Tim PostThe answer was down voted because I lost my keys. Please, stay with me, let me explain this odd chain of events. Earlier today I couldn't get to the store on time because I could not find my keys. That caused me to miss the opportunity to run over a golf ball, which would have bounced between a...

 
4:36 PM
Q: How do you make a GitHub wiki publicly writable?
 
A: It is by default.
I'm pretty sure, anyways.
 
I don't think so
 
oh ok thanks
 
4:43 PM
(imgur is blocked)
 
Oh
That's too bad.
Settings > Options > Features > Restrict editing to collaborators only
Which I just unchecked for brain-flak haha
 
Way to solve controller preference issues.
Except it's square...
 
@HelkaHomba Does it have a Nintendo DS option?
 
yay cool done, thanks :D
 
That looks amazingly uncomfortable
 
4:48 PM
@cairdcoinheringaahing Not sure. This is some old product from a list of worst controllers
 
That looks uglier than a gamecube controller D:
 
I can see it being useful for people with disabilities
 
Help writing the wiki for Enlist's functions and operators would be appreciated :D
 
Putting the triggers and bumpers on the face of the controller especially
 
@HyperNeutrino How many of those are the same as the Jelly version?
 
4:50 PM
@AdmBorkBork yeah that basically forces you to either use only your thumbs or put your hands in a very unnatural position
 
about like 75% probably lol
 
@HyperNeutrino I would, but I'm currently working on completing the wikis for all my languages :P
 
ah ok :P
 
@J.Salle Well, unnatural only in the sense that it's unusual. I've seen people with disabilities play one-handed with palming the right analog stick and a "claw" style grip on the face buttons and bumpers
 
@AdmBorkBork Yeah, 'unnatural' was maybe a poor choice of words. It's unusual, indeed.
@HyperNeutrino What's the difference between "=": (2, u_(operator.eq)) and "e": (2, vecdyadboth(u_(operator.eq)))?
(not a python guy >.>)
 
4:55 PM
@J.Salle My guess is that = doesn't vectorise
 
caird is right
 
Okay, I see
So, whatever has vec vectorizes?
 
yup
there's vecmonad, vecdyadleft, vecdyadright, and vecdyadboth
 
@HyperNeutrino What about vecnilad?
 
4:57 PM
that doesn't make sense
 
Yeah it does. 100 pushes 100 one hundred times :P
 
ಠ_ಠ
> pushes
what do you think this is, a stack-based language???
 
Yeah that wouldn't overflow at all >.>
 
Also, what about vectorising for different depths?
@J.Salle Its Python, it rarely overflows :P
 
maxlayer_offset and layers IIRC
 
4:59 PM
@cairdcoinheringaahing oh well, as I said, not a python guy hahahahah
 

« first day (2466 days earlier)      last day (2370 days later) »