« first day (2741 days earlier)      last day (2088 days later) » 

12:45 AM
"Java is to JavaScript as Fun is to Funeral"
 
1:06 AM
@Pavel you got that the wrong way around
 
I did not
 
@Pavel are you absolutely 100% sure
if so then could you kindly please explain
 
JavaScript actually has a lot in common with funerals now that I think about it
 
@quartata wait wat
 
Sure. Writing for it is depressing and yet done with an odd sense of urgency, a creepy industry of jobs and tools and traditions has sprung up around it, ...
Really take your pick here
 
1:12 AM
@quartata that's only true for a javascript job
sane people don't use bad tools and traditions
 
And ultimately it's something that everyone has to do.
We all write JavaScript, and we all die
And we have no choice
 
@quartata that's death not funerals though
 
Really? That's your response to me comparing a programming language of all things to the dark foreboding feelings of death and suffering and how ill-equipped humans are at handling it
not that I'm being a dunce whose gotten a sugar high off of an entire container of Tic-Tacs?
 
@quartata well it is an apt comparison for almost all of the javascript out in the wilds
 
true but I am high on breath mints right now so agreeing with me looks bad
(I only had 2 but it's still comparable)
 
1:17 AM
@quartata you need to send your breath mints to a top secret chemical analysis lab for analysis
 
First though I need to make a skybox texture with 4 suns consisting of Italian Elon Musk's forehead
This is the stuff my followers force me to do. Don't ever use Twitter.
 
I can't tell if this is a bug or a new feature (I get insider builds, so for all I know, it is a feature), my taskbar became transparent showing icons over my desktop background:
I hope it stays that way
 
@Pavel this is amazing
well i have my taskbar permanently disabled so i won't ever see that
oh well
 
 
1 hour later…
2:35 AM
13
Q: Why did the format of full-form URLs to answers change?

Sonic the Inclusive HedgehogAs I pointed out in this answer, the URL scheme for full-form links to answers has changed from: https://site/questions/question-id/question-title/answer-id#answer-id to: https://site/questions/question-id/question-title#answer-id Pretty much every link that redirects to an answer, includin...

4
So, for everyone (1) remember to sort sandbox by active (2) If it's no longer on the first page, old-style link /answer#answer still works.
 
I noticed the same thing, thanks for finding the meta question about it
 
 
4 hours later…
6:50 AM
posted on August 01, 2018 by DLosc

DRAW me a picture: A QBasic metagolf challenge metagolf test-battery graphical-output binary-matrix The DRAW command in QBasic takes a string argument, consisting of instructions for moving the cursor and drawing line segments, and produces the appropriate line segments on the screen. The syntax of the instructions is very terse--perfect for a metagolf challenge! The challenge Write a p

 
 
1 hour later…
8:40 AM
posted on August 01, 2018 by sundar

RTA (Reverse-Then-Add) root of a number code-golf number math The reverse-then-add sequence is a sequence obtained by adding a number to its reverse, and repeating the process on the result. For eg., $$ 5 + 5 = 10 \Rightarrow 10 + 01 = 11 \Rightarrow 11 + 11 = 22 \Rightarrow 22 + 22 = 44 \Rightarrow\text{ }... $$ Thus, 5's RTA sequence contains 10, 11, 22, 44, etc. The RTA root of

 
9:31 AM
Any advice?
2
A: Sandbox for Proposed Challenges

Beta DecayStack Exchange Stock Exchange - V3 king-of-the-hill Introduction Good evening, traders! You are all traders for the golfing company PPCG. Your task is to make as much money as possible. Challenge Write a program that buys and sells shares on the Stack Exchange Stock Exchange with the aim of...

 
10:30 AM
posted on August 01, 2018 by sundar

Sort by what the digit pairs describe code-golf number sequence math Given a positive integer, we can form a new number that's described by its digits taken pairwise (with a leading 0 added for numbers with odd number of digits). For eg., 1234 can be read as one 2, three 4s - so, the output for 1234 is 2444. 643 has an odd number of digits, so a leading zero is added to make it even.

 
11:10 AM
JavaScript: Where "It works!" is just an illusion
 
11:48 AM
0
Q: Help me with my polyrhythms

AJFaradayA polyrhythm occurs in music (and in nature) when two events (claps, notes, fireflies flashing etc.) are occurring at two different regular intervals. The two kinds of event happen a different number of times in the same interval. If I tap with my left hand twice, and with my right hand 3 times,...

0
Q: Optimize Compilator for simple Reverse Polish Notation Programing Language

Андрей ЛомакинDescription Imaginary programming language (IPL) use Polish Reverse Notation. It have following commands: i -- input number and push it to stack o -- non-destructive output top of the stack (number stays on stack) d -- discard top of stack integer number -- push this number to stack +-* -- po...

 
12:07 PM
@Riker poor boss
 
 
1 hour later…
1:33 PM
so, uh, all of my "no longer needed" flags have been retroactively changed to "not relevant"...no thanks
 
1:49 PM
@EriktheOutgolfer That's because No longer needed implies it was once needed, but not relevant works for something that was never needed
 
I don't like the retroactive change
I cast flags using this text in the past, I don't want history to be changed
 
i agree with erik on this one
 
It's not like anything is different. They're just using different text for the same flag
 
that's something that is different
:]
 
I don't see why that matters
 
2:10 PM
@DJMcMayhem the intent of the flag has changed slightly. it's not a large change in this case but suppose the text changed to "i think this person is a stupid idiot head". now the perceived reason you flagged something is completely different from the actual reason you flagged that thing
In the javascript regex flavor is it possible to check to see if a capture group successfully captured something within the regex
 
Ok sure. But Not needed and not relevant are basically the exact same thing. The only meaningful change is the removal of longer, which I think is a good thing
 
@Poke Now I kinda want that to be an actual flag reason ...
 
hello
im back again
i finally found out how to transpile my golfing language to python, now the only thing left is adding many functions
 
2:40 PM
@DJMcMayhem yup. i think erik and i are more concerned with the general principle in this case
@AdmBorkBork i'd use it :P
 
why did noone care about me
 
I mean
You're not that active
No one really knows you
 
i used to be very active but then went on a long hiatus
 
2:58 PM
@gnu-nobody: Where's your language?
I just finished one myself, if anyone is interested: esolangs.org/wiki/Mu6
(it's not a golfing language though ^^)
 
it has nearly no functions now
like
literally
it has currently 3 functions and 4th is currently being implemented
 
A new eso-lang emerges: Rockstar
 
btw, how can i do n-fold function composition in python
like, g(f,5,4) will return f(f(f(f(f(4)))))
how can i implement the g here
hey
 
def g(fun, count, arg):
	for i in range(count):
		arg = fun(arg)
	return arg
 
3:06 PM
hmm
thanks
 
Actually I like @OMᗺ's more
 
i can not understand that
 
It's not better per say, it just looks fancier
 
@Pavel Guido doesn't though :)
 
ALthough since reduce is implemented in C it's probably faster
 
3:08 PM
It probably comes from using Haskell too much
 
i use python 3 tho
 
from functools import reduce
 
hmm
wait
seems like i understood it
reduce takes 3 arguments, the first a lambda, second a list and the third the starting value, this reduces [f,f,f,f,...,f] with lambda a,f: f(a) with the initial a being x
wow
this is clever
but how can i make this take 2 arguments and return a function?
 
Move the x one layer to lambda f,n: lambda x:...?
 
@gnu-nobody g_ = lambda fun, count: (lambda arg: g(fun, count, arg))
 
3:13 PM
0
Q: Is this number evil?

AmphibologicalIntroduction In number theory, a number is considered evil if there are an even number of 1's in it's binary representation. In today's challenge, you will be identifying whether or not a given number is evil. Challenge Your job is to write a full program or function which accepts a single, no...

 
@Pavel thanks!
 
All of this reminds me of how I neglected actually properly looking at Coconut..
 
i have seen that before
 
It has partial application ;)
 
python has too:
`import functools`
`def plus(x,y):`
`return x+y`
`print(functools.partial(plus,5)(4))`
 
3:18 PM
Coconut is great and I wish I could use it in production
@gnu-nobody No markdown in multiline messages
 
why
then how was your comment with the function
 
nobody knows why
if everything in the comment is code it's an exception
ctrl-K adds the formatting then
 
wow this coconut thing has some very big compiler
my tokenizer+compiler is about 40 lines max lol
 
It's almost like coconut is an actual practical languages
 
and the rest is fully defining functions for the language
 
3:21 PM
Has anyone else found Wikipedia making full page appeals for donations?
 
Wait till you find out how big the python interpreter is
 
isnt it like 20 mb
 
@gnu-nobody Well it supports 3-4 functions whereas coconut is an actual language.
 
@BetaDecay lol we dont even have wikipedia here
@OMᗺ the functions take more space than the tokenizer+compiler
i literally replace formatted code but who cares
 
@gnu-nobody Oh wow. Where are you?
 
3:24 PM
@Pavel Probably tiny compared to GHC :p
 
ghc is like 180 mb iirc
 
@gnu-nobody All of Haskell is like 2 gigabytes
Haskell is huge
 
i know a bit haskell
 
3:40 PM
@gnu-nobody It's my favourite language :)
 
it is my favorite lang too except im not very good at it because of time limitations
 
I'm more of an F# person
Pure functional doesn't really work for me
 
@gnu-nobody Feel free to join Of Monads and Men, if you have any questions!
@Pavel Why not?
I don't know F# at all -.-
 
i dont either
 
@OMᗺ The vast majority of code I write isn't pure.
F# is like a cross between Haskell and C#. You can do all the same cool Haskell things, but you can also write a for loop if you really want to.
 
3:44 PM
@Pavel Right, then I would probably not want to use Haskell either..
 
uhh
for loop
bad
 
I try to avoid them as much as possible even in C# tbh
But F# also supports if/else, mutable variables, exceptions, and everything else C# supports.
 
i dont like mutable variables either
 
@gnu-nobody In that case, why did you choose python to implement your programmering-lang?
 
because its the only language i have a good knowledge except c(++)
 
3:49 PM
They're useful sometimes. Say I want to keep track of how many times a function is called for diagnostic purposes.
 
@Pavel TemplateHaskell to the rescue :P
 
@OMᗺ Not if it can't be determined at compile time
 
I think there was a rule that brainfuck doesn't need to output numbers if they are in the tape, but I can't find it
 
53
A: Default for Code Golf: Input/Output methods

SuperJedi224The contents of the tape post-execution may be used as a Turing machine's output

 
@dzaima Thank you
If Pepe has 2 stacks and 1 is filled with the output, does the rule count?
 
4:15 PM
2
A: Sandbox for Proposed Challenges

OMᗺWhat associativity was it again Tags: code-golf, balanced-string, parsing, parentheses, parsing, string Non-associative operators (for example the subtraction-operator) often are either left- or right associative, such that one has to write less parentheses. Consider for example the following...

Any last calls for this ^ ?
@Soaku Idk Brain-Flak does this, however it has a notion of active and inactive stack and prints the active one at the end..
 
4:42 PM
@OMᗺ it's funny cause the docs refer to them as left and right but there's literally no difference
 
4:59 PM
@DJMcMayhem: What I meant to say, is that there is always one of the two in focus/active/current something like that
 
Yeah, I understood that.
I was just remarking that it's really funny how there it there are L+R stacks, but there's really just two nameless stacks
 
Initially I forgot I mentioned Brain-Flak and thought you were talking about the left/right testcases of that challenge - thought I ended up putting the same ones twice ^^
@DJMcMayhem You should give them proper names like Alice and Bob or sth.
6
 
2
Q: Is this number evil?

AmphibologicalIntroduction In number theory, a number is considered evil if there are an even number of 1's in it's binary representation. In today's challenge, you will be identifying whether or not a given number is evil. Challenge Your job is to write a full program or function which accepts a single, no...

^ Can it be done without the ability to convert a decimal number to binary?
 
5:16 PM
PyCharm on my PC consumes 600-800 RAM with no Python scripts running... Well, it keeps falling (?), but still seems quite high.
 
I mean, PyCharm is a pretty big IDE
Visual Studio is using 400 MB right now without doing anything.
Woah. Chrome is using 1.1 GB. Is that normal? o_O
 
it's using 400 mb for me
 
@DJMcMayhem it's chrome, what did you expect
 
Not that much
 
@DJMcMayhem Should have seen my chrome usage a few days ago
 
5:20 PM
wow
 
Why is everything in K?
 
Windows 7?
t'was a simpler time
 
Meanwhile, Vim uses just 4 MB. That's beautiful
 
I don't like that the thing 2nd to the actual browsers RAM usage is adblock though
@DJMcMayhem you know there wouldn't be that many chrome eating ram memes if it didn't actually eat your ram
 
Edge uses 160. Geez, I never thought I might be seriously considering using Reskinned IE Edge.
 
5:26 PM
Edge isn't bad
 
@DJMcMayhem It's pretty different under the hood.
 
I think Chrome is better, but Edge isn't bad
 
@Pavel Since I'm rethinking my life decisions, what are the pros and cons in your opinion?
 
Chrome has been around longer, so its compatibility is (slightly?) better
 
@DJMcMayhem Extension support, the UI, standards compliance
UI is totally subjective though
 
5:28 PM
as long as I'm not running at 0% available ram I'm fine with things using a lot of it if it means better usability
 
Yeah - I like the UI of Edge better. That's what I use on my personal laptop.
 
On the other hand, Edge has the advantages of better integration with Windows/Cortana (if you care about that), lower RAM usage, a couple of neat features like inking, and Microsoft literally pays you to use it.
(Microsoft Rewards)
 
Woah woah woah, hold the phone. What's that last one?
 
Used to be called Bing Rewards
 
@DJMcMayhem Same reason I use Bing. You get MR points for browsing with edge and searching with bing, which you can redeem for amazon gift cards and other goodies.
 
5:30 PM
Microsoft Rewards has been around for a while, used to be Bing Rewards, people botted the crap out of it
also last I checked not available in the UK
 
US only
Bing is pretty much unusable outside of the US
Even just the normal search results go to shit once you cross the border
(Might be Canada too, IDK)
 
Edge is still backwards in new JS/CSS
 
Not worse than Safari though
And much, much better than IE
 
@Poke Reddit is blocked, what is it?
 
> TL;DR: If you signed up after 2007 and don't have advertising emails from Reddit between June 3-17 2018, you're fine. Otherwise, reset your password and enable 2FA and you'll probably be fine.
> TL;DR: A hacker broke into a few of Reddit’s systems and managed to access some user data, including some current email addresses and a 2007 database backup containing old salted and hashed passwords. Since then we’ve been conducting a painstaking investigation to figure out just what was accessed, and to improve our systems and processes to prevent this from happening again.
 
Yay, I'm fine
 
^ If you signed up during or before 2007, they have your salted hashed password and email from 2007. If you had readers digest emails enabled between june 3-17 this year, they have your username and email linked, and could potentially use that to cross-reference leaks from other sites
 
I'm fine too.
 
5:54 PM
the breach was caused by an SMS intercept to bypass 2FA on staff accounts for hosting providers
the attackers gained read-only access to backup data (from 2007) and source-code and logs (including logs of the emails during the above timeframe)
Depending on how much source code and such they saw, it's possible they could use that info to find new attack vectors in the future
 
@Pavel definetly worse it's flexbox still doesn't work
 
1
Q: What associativity was it again

OMᗺNon-associative operators (for example the subtraction-operator) often are either left- or right associative, such that one has to write less parentheses. Consider for example the following: $$ a-b-c $$ Probably everybody read that as \$(a-b)-c\$, by default (usually) subtraction is left-associ...

 
Alice & Bob is a minimalist esolang based on Brain-Flak: It replaces the left stack and right stack by Alice's stack that behaves as usual and Bob's queue. Since Bob is a bit different he interprets 0 as truthy and anything else as falsy, thus {code} will loop while 0 is the first element in the queue.
CMP: Should Alice and Bob take turns, making this a turning tarpit?
 
@OMᗺ Take turns how? When do they switch?
 
After evaluating every monad/nilad :S
 
6:08 PM
Every inner atom, or outer atom?
 
Idk, just a random thought since they usually take turns when they are messaging.
 
As in, would (()) push to current then toggle, or toggle while evaluating the inner ()?
 
Probably the latter one would be more distracting, but I'm not sure.
 
Although if you're only toggling on the highest level, then it's pretty easy since a bunch of brain-flak programs can be written with very few atoms at the top level
 
And one could always insert <><> too
 
6:12 PM
What would <> even do
 
no-op
 
A NOP since it toggles, and then implicitly toggles :P
 
I think this is a bad idea..
 
To toggle you'd need ()[()] or <()()> since those both have an odd number of atoms and a value of 0
 
Yeah that would work, I'm not sure what I was thinking that <><> should behave differently :S
 
6:16 PM
<<><>>
 
6:26 PM
<(*.*<)
Anytime someone starts communicating in Brain-Flak, all I see is a dancing Kirby
 
What is the chance that a cube dice will roll (1 or 2) 11 times? I don't really understand all the articles on probability and stuff...
 
11 times in a row? That would be 1/3^11
 
Thanks
So that'd be one in 177,147 times?
 
Yep
CMMC: (Chat mini math challenge): If you select a numbers with replacement from the set [1, b], what are the odds that no two numbers are equal?
 
0
Q: Number converter polyglot

bace1000Write a program that is a polyglot is 2 programming languages that converts an input integer, from 0 to 100 inclusive, to words, each in a different human language. For example, given the input "3": when running your program as Python code, it would output "three" (English) when running your ...

 
6:43 PM
@DJMcMayhem generalized birthday problem?
 
Yes, exactly. :D
On my own, I came up with spoiler, but apparently that can be simplified
 
@DJMcMayhem I think it's 1/b + (a-1)/b * (2/b + (a-2)/b * (3/b + (a-3)/b * ( ... * ((a-1)/b) ... )))?
First run over, not simplified at all
 
7:00 PM
@DJMcMayhem Mathematica "simplifies" it to (b! b^(-a))/((b - a)!)
 
ngn
7:10 PM
@Pavel that's just V(b,a) / b^a where V is variations
or, expressed in terms of combinations (aka binomial coefficients): a! * C(b,a) / b^a
@Zacharý I guess factorial must be ¡n! in Spanish :)
 
7:29 PM
I thought factorial in Spanish was ¡a!
15
 
ngn
@AdmBorkBork or it might even be ¡ñ!
 
0
Q: When and only when life gives you lemons, make lemonade

Jared KGolf a program that has no output (or outputs the empty string) when given any string other than "lemons". When and only when given the string "lemons" it will output "lemonade".

 
@LeakyNun I don't think that was quite the correct dupe target
 
hmm, which one is?
 
IDK
 
7:42 PM
 
But the output isn't constant
 
what do you mean?
 
@Pavel the task looks basically exactly the same between the two
I was going to suggest Don't google "google", but Leaky's is right on the mark
 
nvm ignore me
 
Wait, why was Don't google "google" closed as unclear?
 
7:45 PM
Why was Do indeed.
 
Please forgive my fat finger going for the apostrophe and Enter keys simultaneously
 
@ETHproductions just to be curious, how did you find don't google google?
 
@LeakyNun I have an extensive catalog of challenges in my brain, although many are missing most of their details
 
7:48 PM
lol same here
 
I just remembered "hey, there was this one challenge similar to this one... about google I think"
I was here when it came out, but not for the Answer to life challenge, which is mainly why I didn't think of that one
 
> just to be curious
 
hey, they can be whatever they want to be
 
@quartata pure gold
@EriktheOutgolfer what should I have said
 
it's not that any grammar is wrong, but that it seems like you're trying to make yourself curious...
 
7:53 PM
@LeakyNun Just out of curiosity
 
I see
 
don't worry, I guess learning English while your mother tongue is Cantonese isn't very easy
 
Apparantly English is considered an official language in Hong Kong
 
nothing to do with mother tongues ;)
 
CMMC: (Chat mini math challenge): Find a pair of functions so that f(g(x)) is always bigger than g(f(x)). Neither of the functions may be constant
 
8:07 PM
f=lambda x:abs(x)or 1
g=lambda x:-f(x)
 
f=lambda x:2+abs(x)
g=lambda x:1/x
 
ngn
f=lambda x:1+x
g=lambda x:-x
 
@Pavel That's closest to my approach
 
f=abs
g=lambda x:-abs(x+1)
@OMᗺ Can you stuck that in a Github repo so Dennis can TIO it?
 
8:17 PM
OK, harder challenge: Find a pair of functions so that f(g(x)) is always bigger than g(f(x)). Neither function may be constant, and both functions must be differentiable at every point.
Although I guess ngn already got that...
 
I think ngn wins tbh
 
ngn
is this code golf?
 
Not really.
 
Your solution is just "nicer"
 
8:21 PM
I was thinking of math functions rather than code functions anyway
 
CMCs don't actually have OWC...
 
What about f(x) = x^2 + 1, g(x) = -(x^2)?
 
what is x, and how is n handled?...ninja
 
f(x) must be bigger than g(x) if the lowest output of f(x) is greater than the greatest output of g(x)
 
@ETHproductions That one's nice
 
8:24 PM
f(g(x)) = x^4 + 1, g(f(x)) = -x^4 - 2x^2 - 1
 
@Pavel Sure, though this is the one w/o automatically swapping the stack/queue
Not sure if I should add that though..
 
Why not both?
 
Actually why not yeah
 
Just need a new name
 
Ah, I was thinking about just adding a flag
 
8:32 PM
It makes it a way different language, even if the difference in invokation is just a flag
The only difference between broccoli and cauliflower on TIO is the -c flag
 
@OMᗺ cabal build is the command, right?
 
Yup
Should be the same as nameless-lang or Functoid
 
Now we just need HW
 
HW?
 
8:37 PM
Hello, World!
 
HW is HW?
 
...does it do ASCII output?
 
Yes, -a flag. For this one the usual Brain-Flak HW should do the trick
usage: alice-bob (-e expr | file) [-a] INPUTS
 
@OMᗺ Is default Alice or Bob?
 
0
Q: Test if a string is parenthesly balanced

ibrahim mahrirWe call a parens group the open paren (, the close paren ) and everything inside them. A parens group or string is called parenthesly balanced if it contains either nothing or only 2 parenthesly balanced parens groups. For example: The string "(()())()" is parenthesly balanced ...

 
8:43 PM
@DJMcMayhem: You mean no swapping of stack/queue?
 
No, I mean does the "Active storage unit" start on the stack or the queue?
 
Ah sry, misread or as and.. Alice (stack) is the initially active one
 
Is there a meta consensus of what a dupe is?
 
@BetaDecay i think if there's ever a question, someone just takes it to meta
there are a few one-off metaposts for specific challenges
 
So woukd you say this is a dupe?
7
Q: Is this number evil?

AmphibologicalIntroduction In number theory, a number is considered evil if there are an even number of 1's in it's binary representation. In today's challenge, you will be identifying whether or not a given number is evil. Challenge Your job is to write a full program or function which accepts a single, no...

The OP wants to see a meta consensus
 
9:02 PM
I vote no, because as the OP points out, there's no need to actually count the bits to get the correct answer
 
@Zacharý Yes, in Spanish we use those. Also mín, sen (for sin). It feels more natural
 
Ok, I decided to name it Carol & Dave - initially I wanted to name it with some C&D which are both mean (like swapping stack/queue) but apparently that doesn't exist.
I'm not exactly sure if it's the right thing how I handle swapping C&D now: Every nilad/monad (nested or not) swaps it, though if we have a {abc}x loop it will swap after a, b, c (possibly again: a,b,c etc.) then it will swap it for {..} and then with x.
 
4
Q: What IS a duplicate?

tuskiomiI've seen many challenges get marked as duplicates on this stack. Most I see as fair, some, not so much. What qualifies as a duplicate question? Consider challenges where: Entries from a will be valid for b , and entries from b will be valid for a Entries from a will be valid for b , but en...

Marked as duplicate--ironic
 
(Extremely poorly golfed)
 
Indeed that works!
Well you don't need to golf it for the TIO example..
 
9:13 PM
Yep!
 
Just sprinkled the original Brain-Flak one with <<><>>?
 
@BetaDecay This is the closest I can find (which, really, puts the Evil Numbers challenge as right on the line of dupe/non-dupe: answers can be copied over with slight modification, but whether that modification is competitive depends on the language)
 
Today I published 3 esolangs instead of studying for exams -.-
 
@EriktheOutgolfer Are you going to post a language of the month? I can post about SMBF if you want, since I golfed in it more than most people.
 
9:16 PM
@OMᗺ I ran echo <BF-HW> | perl -pe 's/(]\)}>)/$1<<><>>/g'
.oO(IDK why my mind went to Perl substitution operator and not Sed)
 
Very good, we both had the same idea of how the swapping should behave, guess that's fine then.
Sed would have been shorter, hehe
 
For all I know Sed does something weird, I don't understand what regex flavor it uses
 
Is this an interesting challenge? Recursively replace all 1-element sub-arrays with their content, e.g. [[[[1],2,[[3,4]],[5,[6]]]],7][[1,2,[3,4],[5,6]],7]
 
Same with grep, tbh. Once I need more than static text I switch to ack and use Perl regex
@Adám I'd say yes
 
@Adám Sure, doesn't seem like there's a trivial regex-based solution
 
9:25 PM
s/\[(\d+)\]/\1
s/^\d+$/[&]
(well, sorta, you also need recursion here)
 
@ETHproductions do you know how to extend generators? GeneratorFunction.prototype doesn't work
 
@Adám perl -p, 35 bytes: s/\[(\d+)\]/$1/g while$_=~/\[\d+\]/
 
@Pavel doesn't seem to convert the [[3,4]] to [3,4]
 
Okx
[3,4] is not one-element
 
@Okx but [[3,4]] is, it's one and only element is [3,4]
 
9:30 PM
2
A: How to extend the Generator class?

PointyWith the traditional caveat that extending built-in prototypes is not necessarily the best idea, and that it's something to be done with caution, you can get the generator function prototype with const genproto = Object.getPrototypeOf(function*(){}); With that you could add a filter() capabili...

Haven't tried this solution, but I did find it weird that Generator.prototype.smth = ... doesn't work
 
@Adám what about [1,[[[2]]],3]? is that [1,2,3] or [1,[[2]],3]?
 
@dzaima [1,2,3]
 
@ETHproductions How do you do it without counting bits?
 
@BetaDecay repeatedly do n = n>>1 ^ n&1 until the result is 0 or 1
 
9:46 PM
you get the opposite answer right?
 
right, you'll need to negate it by the current rules of the challenge
 
if the input is a 32-element list, you can xnor it instead
since there is even number of bits
the parity is the same
that's how I did evil numbers on anarchy
since J would pad all numbers to 10 bits
If they required e.g. 800 numbers instead of 400 it wouldn't work
I also stumbled on it by accident and didnt understand for weeks why it works
 
@ETHproductions Oh. I thought I could answer in Noether
 
@mbomb007 question: would you like for your name to be added to SMBF's ping list?
(LotM post)
 
10:02 PM
0
Q: I'd like to determine sub-triangle by checking as few lines as possible

brian stonelakeI posted this on the math exchange, and was told that maybe it would fit better here. Given an arbitrary point on the triangle pictured below, what is the "best" way to determine which of the 60 sub triangles it lies within? Suppose I have the coordinates for all sub-triangle vertices. "Best" ...

 
10:12 PM
(ping list might be added later)
also, yay, I managed to post that in August 1 despite me being busy all day :P
 
10:25 PM
@EriktheOutgolfer sorta
 
actually, I did, for the purposes of SE...yeah, it's already August 2 here too
 
2
Q: Language of the Month for August 2018: Self-modifying Brainfuck

Erik the OutgolferIn accordance with our meta agreement to have a Language of the Month, and since the list of nominations had a single highest-voted entry at the beginning of August, we have a new featured language! Throughout August 2018, our Language of the Month, nominated by myself, will be: Self-modifyin...

 
11:29 PM
I just bought Sublime Text and I'm not sure why
 

« first day (2741 days earlier)      last day (2088 days later) »