« first day (2847 days earlier)      last day (2004 days later) » 

12:01 AM
> Creatures bred for speed grow really tall and generate high velocities by falling over
 
not as good as
> Robot hand pretending to grasp an object by moving between the camera and the object
is this proof that pannenkoek is an AI?
 
what is pannenhoek?
> In an artificial life simulation where survival required energy but giving birth had no energy cost, one species evolved a sedentary lifestyle that consisted mostly of mating in order to produce new children which could be eaten (or used as mates to produce more edible children).
this is dark
 
The Skynet is real.
 
> Since the AIs were more likely to get ”killed” if they lost a game, being able to crash the game was an advantage for the genetic selection process. Therefore, several AIs developed ways to crash the game.
 
12:28 AM
@LeakyNun see here
 
@Riker :/ he don't like memes, I think...
@Riker How unrelated?
 
 
1 hour later…
1:40 AM
@LeakyNun a Super Mario 64 TASer
 
@mınxomaτ “In an artificial life simulation where survival required energy but giving birth had no energy cost, one species evolved a sedentary lifestyle that consisted mostly of mating in order to produce new children which could be eaten (or used as mates to produce more edible children). “ Wow.
 
 
2 hours later…
3:22 AM
Just curious - my comment on this question telling the OP to keep the question in the sandbox for about 2 days was deleted. Was that not accurate information?
 
@Quintec There were too many comments on that question, and once the OP had read yours, it had served its purpose.
 
3:47 AM
Got it, thanks for the response
 
Anonymous
4:22 AM
@Quintec That's an episode of Rick and Morty...
 
4:46 AM
I totally tried that strat in NetHack before realizing laying eggs costs nutrition
 
5:08 AM
by exactly the nutrition value of an egg. it looks it up in the object table
the dev team is very into conservation of energy
 
I've been gone for like a year now, but code golf still interests me. Could someone who's really active tell me the current state of the sport?
In particular, what new languages are there, and what languages typically win different kinds of challenges?
 
Anonymous
Jelly still wins most things because Dennis is OP and we refuse to nerf hm
 
Anonymous
The community has transitioned more towards refining existing golflangs and making weirder esolangs
 
@DJMcMayhem XD
@Mego weirder?
> refining existing golflangs
really wonder if it's time for Charcoal v2 yet
 
Anonymous
5:27 AM
@ASCII-only I started (but never finished) ibmf, Martin made Wumpus, wastl made Reflections and 2DFuck...
 
oh yeah, ibmf XD
 
Anonymous
Also I made a more-readable version of Actually (using "nice names" instead of CP437 symbols)
 
Huh
 
@Mego you what
 
Jelly when it came out seemed like a big innovation in code golf
I didn't think it would still be winning 2 years later
 
Anonymous
5:36 AM
@ASCII-only I know, it's such a crime
 
@Mego link pls
 
Anonymous
@ASCII-only It's just the -n compiler flag: tio.run/##S0wuKU3Myan8/99CIS0xuSS/KDMx5////7p5AA
 
nice
 
So the philosophy that Jelly has of minimizing structural bytes using trains of monadic/dyadic functions is still a winning combination? Or has it introduced some new paradigms?
 
5:38 AM
i'm planning to transpile from JS to Charcoal for Charcoal v2. thoughts?
 
Anonymous
@lirtosiast That's basically it
 
Interesting
 
well when you think about it, trains are a very concise, very flexible way to express functions
 
Yeah
 
uhh
1
A: Tips for golfing in JavaScript

JBDouble05Use the simplest shortening method available - your variable declaration! var myName = "Jack"; Obviously is very long compared to: m="Jack" It's a whole 12 characters shorter. You have all 64 of these single-character variable names available: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST...

:|
 
5:45 AM
The only thing I think could beat trains is some sophisticated method of enumerating likely function tree shapes, and storing a compressed version of that with a compressed list of functions you use
but I'm not sure how much that would gain if at all
 
CMC: Given a multi-dimensional Boolean array, convert the true values to their enumeration. E.g. [[[false,true,true,false],[true,false,false,true],[true,false,true,false]],[[tr‌​ue,true,false,true],[true,true,true,false],[true,true,false,true]]][[[false,1,2,false],[3,false,false,4],[5,false,6,false]],[[7,8,false,9],[10,11,‌​12,false],[13,14,false,15]]] (you may take the number of dimensions as additional argument if you want)
 
well, dzaima and I were planning on doing something very similar
a stack-based language, with each function hamming-coded based on previous functions used
 
does it work?
 
theoretically, it could, i was too lazy/lost interest/busy with Charcoal. now that i think about it, it can probably be automatically optimized. somehow.
 
What about builtins? Are there any dedicated golf languages with 1000+ builtins?
 
5:51 AM
1000+? there are certainly those that use 10-bit codepages
 
ooh, such as?
 
although i very much doubt they're anywhere close to filled yet
it's abandoned, sadly :(
 
@Adám f=(a,n=[1])=>a.map(i=>!!i==i?i&&n[0]++:f(i,n))
 
@Downgoat you what. i was going to do it in JS but thought it would be too long O_o
@Downgoat also why not (a,n=[1])???
 
@ASCII-only idk what you're talking about
 
5:58 AM
now, no more \n
@Downgoat must've been hallucinating
 
curious if shorter alternative to !!i==i
 
@Downgoat i^!i or i|!i i think
 
@ASCII-only still would return truthy for arrays with positive values
 
@Downgoat e.g.?
 
i=[3]
 
6:07 AM
:/ true
then no
oh yeah @Downgoat should i write charcoal v2 in js. and transpile from and (optionally) to JS
 
@ASCII-only hm maybe write in Rust I have been using rust it is very interesting language.
Issues with JS I've been having is major portability issues
 
portability?
 
because node javascript is pretty different from browser JS
so might as well just use something like Rust which supports emscripten and webassembly pretty well
 
browserify
 
browserify did a really crap job on VSL :P
 
6:09 AM
well
 
or VSL is almost finished just wrapping up some memory management stuff but should have data structures working by end of year
 
i only need browserify for third party modules (brotli and lzma compression)
oh wait crap. i also need pcre regex module
 
also for large project like VSL types would have been very helpful and Flow/TypeScript are honestly pretty crap
 
@Downgoat :OOOOOOOOOOOOO
 
only took like four years :P
 
6:11 AM
wait 4 years????
i thought it was newer than charcoal
oh also wasm is nice but load times are insanely slow
 
uhh lemme check commit
@ASCII-only load times?
you mean time to download?
 
yeah
oh wait
hmmmmmm
 
True just the very basic memory WASM for VSL is 330Kb: github.com/vsl-lang/vsl-wasm/blob/master/memory.wast
though the bitcode version I assume would be a lot smaller
 
ok that's not a problem. real problem is browsers without asm.js support
will make it super slow
clearly i should work on terrible language first and write charcoal v2 in that
 
@ASCII-only asm.js =/= wasm?
most major browser support wasm
 
6:14 AM
hmm. i guess that's good enough
now. time to develop charcoal v2 on TIO
 
another issue we have is WASM still needs JS to talk to
 
well ofc
how else are you going to put it on a webpage >_>
 
@Downgoat Try APL!
 
as in like everytime I want to talk to DOM I have to do like: instance.exports.getDocument = function() { return document }; instance.exports.querySelectorAll = function(self, ...args) { return self.querySelectorAll(...args); }
e.g. for console print I had to do: github.com/vsl-lang/VSL/blob/master/wasm.js#L21
 
6:20 AM
@Adám ⊢×⍴⍴+\∘,
is this what you were looking for?
or am I missing something?
 
@lirtosiast Yes, but at half the number of bytes.
 
half O_o
 
@ASCII-only Yup, I can do it in 4. You could almost brute-force the solution…
 
I may have it
 
Actually, I have two different (but equivalent) solutions.
 
6:28 AM
+\@+
I'm not used to using @ yet
 
@lirtosiast Perfect. + can of course be any identity function, so is preferable.
 
Is the other solution that or is it meaningfully different?
Also
 
0
Q: Hide the buildings

Vedant KandoiShorter version of Skyscrapers Challenge Task Given an array of building heights and a positive integer k, find all the permutations(without duplicates) of the heights such that exactly k buildings are visible. Any building will hide all shorter or equal height buildings behind it. Any format...

 
why does +` flatten when combined with @`?
 
@Downgoat hmm. but i was thinking of transpiling from JS as well
 
6:41 AM
@ASCII-only JS => WASM?
 
no JS -> Charcoal
 
O_o is that possibl
hmm
you could do but would likely mean having all JS std functions in charcoal
definetly possible with babylon or acorn
 
well. first i'd just let it only transpile charcoal functions
 
example?
 
like: for (i of 9) { body }
 
6:44 AM
and that would be convert to charcoal?
 
that transpiles to <for> <9> <body>
 
oh i see
what if I had like let a = 8; for(i of a) { body }
 
<assign> <8> <a> <for> <a> <body>
mostly doing this for free operator parsing
 
hmmm v intrest idea
if u want to do this then definetly JS would be best option to write in
 
i mean, source doesn't have to be js. but js has added bonus of easy embedding in webpage
 
6:46 AM
we could use flow types: babeljs.io/docs/en/babel-preset-flow but I tried to use with VSL and they are not that great but has probably gotten better recently
 
:| time to design webpage
but too lazy so will do it later i guess?
 
@ASCII-only do u have repo
or c9
 
wait wat is glitch
 
like c9 but just for js/node and instant
hmm. i guess i can use es6, bc i'll be using BigInt anyway
 
6:58 AM
@lirtosiast It is the same. I thought of using instead of \, but didn't think of using any identity function, so '\⍀'∘.{'+'⍺'@'⍵}'+×|⌈⌊⊣⊢⌷' are all solutions.
@lirtosiast @⊢ finds all the elements as indicated by . It has to just provide a list of them, since they could be from all over and not make up an orthogonal array. That list is then given to +\ and the result is distributed back to the original locations.
 
Ah, that makes sense
 
7:54 AM
BigInt is ESNext feature in rigorous speaking but anyway
Hope BigInt become standard soon so that Cordova apps can use BigInt for no cost
 
yeah what i mean is that since i'm using bigint, no need to stick to ES5 syntax
 
@ShieruAsakoto I mean Bigint is stage 3 and is already natively supported by beta safari and latest chrome
 
ff is still lagging behind? :P
 
8:30 AM
@Downgoat wait you're still awake?
 
9:03 AM
0
A: Sandbox for Proposed Challenges

Vedant KandoiSplit the bill Task Given the names, the amount they had to pay n and the amount they actually paidk, find out who owes whom how much. Rules Input and output can be in any convenient format. Names can be a string of any length, will contain only lower case alphabets and will be unique. You ...

 
9:32 AM
@Downgoat wait what -- safari already finished its implementation?
I've been using BigInt on chrome for quite a time tho
 
@ASCII-only >_>
@ShieruAsakoto available on Technical Preview
 
wow thats great because it is a sign its near to proceed
 
9:51 AM
1
Q: Sort by Largest Digit(s)

Kevin CruijssenChallenge: Given a list of integer, sort descending by their single largest digit(s). The order for numbers with the same largest digit are then sorted by second largest digit, etc. We ignore duplicated digits in numbers. And if all digits in a number are the same, the order of those numbers in ...

 
10:22 AM
needless needles
 
The fact that there are still 3 messages on the starboard from october is a testament to the increasing inactivity of TNB and PPCG in general
 
Or because people dont star much.
 
2 years ago you would struggle finding a message on the starboard from 3 days ago
 
@Fatalize I know what starred messages are, but what is the starboard?
 
@Adám The list on the right with recently starred messages
 
10:31 AM
@Adám The board containing the starred messages?
(actually it looks like a list?)
Also it depends on the screen resolution. On my screen only top 4 messages are displayed.
 
@Fatalize You analyse how many messages have not been pushed off the bottom of the list yet. That might be a valid approach if the list had a fixed size, but it is dynamically resized.
@user202729 Exactly my point.
 
I have had the same resolution for years
So that's irrelevent
 
To measure activity, wouldn't it be better to look at the number of messages per week over time?
Or the time span of each page on the full starred list.
 
Sure. I'm sure we would observe the same
 
10:48 AM
hi all
 
11:50 AM
@Adám Jelly, 4 bytes: FÄṁ×
 
12:06 PM
@EriktheOutgolfer So that's ⊢×⍴⍴+\∘,
 
@Adám yep, nice parsing over there :P
well, it's technically ×⍨ instead of ×, but yeah
 
@EriktheOutgolfer It is just that APL reads much nicer from left to right than Jelly does: Itself multiplied by its shape reshaping the sum applied cumulatively to the flattened data vs Flatten, then sum cumulatively, then mould into its original shape
 
Any pythoners here?
 
I have several expressions such as x = x0 + sum(sin(n*y)*cosh(n*w)) for n = 1..4. What would the most pythonic way of doing this be? x0, y, w are known constants.
 
12:11 PM
I assume you've ran from math import* first?
 
That was pseudo-code.
 
ah, I see
so, you want an array of 4 elements there?
 
sum([sin(n*y)*cosh(n*w)) for n in range(1,5)])?
No, I want the sum of the four elements.
@EriktheOutgolfer Is it? len(range(1,5)) = 4
 
x←x0++/1 6×.○y w∘.×⍳4?
 
first of all, (1,2,3,4) is shorter than range(1,5)
@StewieGriffin
so, it looks like you want something like x0+sum(sin(n*y)*cosh(n*w)for n in(1,2,3,4))
@StewieGriffin shorter in bytes :P
 
12:17 PM
Pythonic, not golfy :)
 
so, you want to put that somewhere?
 
@StewieGriffin Use Py'n'APL and my expression :-P
 
Pythonicness of ^: 0/∞ :P
 
I'm writing a simple UTM to lat/long converter.
 
actually, using a list comprehension like what you've suggested is pretty pythonic
 
12:20 PM
This is actually an example of where the trigonometric functions being selector-arguments to a single function is pretty cool. I don't think I've ever used ×.○ before…
 
1
Q: Largest and Smallest Possible Number

Vedant KandoiTask Given an array of non-negative numbers, output the largest and smallest possible number that can be formed by joining them. Rules Input,Output can be in any convenient format. The array may have at most 1 decimal number. Examples input:[22,33,44,55.55,33] output:4433332255.55,55.552233...

 
Porting it to VBA afterwards, but I figured I'd do it in Python first as a reference...
numpy or math for this by the way?
 
whatever you like :-)
that is, if it has the functions you want... :-P
 
How can I remove all items in array except for the first and last one in js?
Example [1,2,3] => [1,3]
 
12:38 PM
@LuisfelipeDejesusMunoz _=>_=[_[0],_.slice(-1)[0]]
 
@LuisfelipeDejesusMunoz Something like this?
 
1:23 PM
@Adám That'is how I had it but it was too long
@Emigna Yep, something like that =D But anyway I found a shorter method. Doing a pairing with the reverse and taking the first array
I mean [1,2,3] => [[1,3],[2,2],[3,1]] => [1,3]
 
ngn
@LuisfelipeDejesusMunoz how?
a=[a[0],eval(0+a)] // assuming it's an array of numbers
 
@ngn That could potentially be very resource consuming ⍨
Also, gosh, the shortest way in JS to get the last number in a numeric array is eval(0+a)!!!
 
ngn
@Adám who cares, as long as it's byte-efficient :)
 
1:39 PM
@ngn More fun: eval(a+a)
 
_=>[_[0],[..._].pop()]?
remove the [...] if you don't mind mutating _ of course
 
Oh, Im sorry, I forgot to say that I was using Japt.
 
ah, the troubles of Japt...
 
2:02 PM
0
A: Sandbox for Proposed Challenges

l4m2Win 2048 Win 2048. You can decide where to summon block of 2(no 4), and how you move. The output would be [place, place, move, place, move, ..., place, move](finally you reach 2048). Shortest code win. SN: Similar to Play a perfect game of 2048 ?

 
2:50 PM
2
Q: Strange Addition

mdahmouneChallenge Calculate the strange sum of two natural numbers (also known as lunar addition): Given A=... a2 a1 a0 and B=... b2 b1 b0 two natural numbers written in the decimal base, the strange sum is defined, based on the maximum operation, as: A+B=... max(a2,b2) max(a1,b1) max(a0,b0) ... ...

 
3:05 PM
0
Q: Largest Number in Brainfuck BigInt up to 50 instructions

alan2hereWhat is the largest finite number you can get BrainFuck programs of given lengths to contain in memory. We must use one of the BF versions that uses big integers for the cells rather than byte values as not to be capped at 255. Do not use negative positions and values in memory. Do not use the B...

 
3:16 PM
@user202729 that was answered by the link I gave, if you read the full thing (I believe)
it was not fully unrelated
 
While reviewing the sandbox:
> You haven't voted on questions for a while - questions need votes too!
 
true, the sandbox may trigger that more often than usual over SE
 
 
2 hours later…
5:12 PM
@Adám perl -p, 16 bytes: $i=0;s/1/$i++/ge, using 1 and 0 as true and false.
Sorry, $i=1
 
5:39 PM
@ASCII-only oh god that. Thinking about it, stack-based is probably a bad idea for it since strictly typing a stack can only go so far before becoming crazy. No idea what other paradigm would be good for it though
 
5:54 PM
 
@DJMcMayhem I assume it can be shorter with 1/0?
although really not sure
 
Actually, not really
Unless I took an entirely different approach. Lemme see...
Ó1/ò
ÎAÛ
Íî
Almost works for 11
V, 13 bytes: Try it online! (2 bytes saved thanks to EriktheOutgolfer)
 
6:14 PM
yay
oh... yaaay
 
Not too bad for a language that has no concept of numbers or multidimensional arrays :P
(welll... little concept of numbers and no concept of multidimensional arrays)
(or any arrays)
 
@DJMcMayhem I think array operations are much harder than basic string substitution for this challenge
I'm surprised your V solution looks so different from my Perl solution, actually
 
my Jelly solution is mainly array operations :P
 
Jelly is special
Well, C# afaik doesn't even have a way to represent a multi-dimensional collection without the dimensions being known at compile-time, for example
Unless you store Objects and check the type at runtime
 
That wouldn't be too crazy of a class to write though.
a Level class that either contains more Levels or more T
 
6:25 PM
@NathanMerrill You could have indexing into the bottom level return another level containing only one element
And a .Value property to get the first T of the structure, maybe throwing NoSuchElementException if you're not at the bottom depth
 
When was the last time we needed ragged multi-dimensional arrays in a real environment?
like, seriously :)
 
I don't know, but I'm writing this class now.
 
@Pavel V and Perl are ridiculously different
The one thing they share in common is regex, but V's regex looks completely different because it's usually compressed
 
@DJMcMayhem Yeah but the both have s/foo/bar
 
Which is ófoo/bar in V
And also, I don't think s/foo/i++ is possible in V(im) unless you want to get super hacky and verbose
 
6:31 PM
Vim doesn't have computed substitution?
 
It does, but like I said... Painfully verbose
Also, there's no ++, and I don't think you can have multiple vimscript commands in a substitute, so i don't think that's possible anyway
 
Isn't <c-a> ++?
 
As a normal mode command, yeah
But vimscript =/= normal mode commands
In pseudocode, my V solution is:
while True:
    move to the next '1'
    replace it with the current line number and a newline

Join all lines
 
^ golfy computery game
 
7:09 PM
@flawr well there goes my productivity today
 
@Poke I've probably never learned as much in a video game in so little time!
(shoutout to scanlime, an electronics/modding/tearingthingsapart/withacat youtuber)
 
7:30 PM
it didn't tell me that my multi-but adder was optimal
but i only used 2 components :\
 
it is under development, there might be some bugs
 
@Poke that level doesn't seem to say anything about optimality, usually it'd either say it's optimal or not, not nothing
 
it makes me wonder: can we build a computer in blender's material editor?
 
@dzaima oh ok neat
 
7:52 PM
codegolf.stackexchange.com/a/176008/9207 is pretty awesome. I feel it deserves upvoting
the problem is not so simple
 
8:04 PM
0
Q: Golf some ones, and a program too

FireCubezIntroduction Busy Beavers are programs (specifically Turing Machine programs) that aim to output the most ones as possible, while having the least states as possible and halting. Challenge Your challenge is to make a busy beaver, which outputs as many ones as possible, but also outputs a sec...

 
I have some questions about that challenge that was just posted
Would something like (f=_=>[...Array(_)].map(a=>1).join``+&&(${f})(${_-1}))(1e3) be consider as an acceptable answer?
 
@NewMainPosts Retina 0.8.2, 0 bytes, score=∞: wait... not so easy
@NewMainPosts Retina 0.8.2, 1 byte, score=∞: ^
(∞/1=∞)
 
8:48 PM
I meant the answer is awesome, not the question :)
 
Ok. I want a computer that runs off a RAM disk, with a battery backup. This means you get blazing fast speeds, you've mitigated data loss, and only costs you thousands of dollars :)
 
9:12 PM
@NathanMerrill tens of
 
@Adám pretty sure that's not the weird part... :-P
 
I mean technically, "tens of dollars" is true as well
 
Is the performance improvement over something like NVMe really that much worth it?
I mean, $5000 for a desktop computer can buy you a lot of SSD.
 
the performance improvement for the cost doesn't sound that much more of an advantage
(speaking of cost of system,s I just had to buy a new computer >.>)
 
I don't know for sure, but Wikipedia says: "The performance of a RAM drive is in general orders of magnitude faster than other forms of storage media, such as an SSD, hard drive, tape drive, or optical drive"
The "in general" is the troublesome phrase there
 
9:27 PM
It's true. Good DDR4 RAM is about 50ns in access latency, while SSDs are around 100 times slower than that.
Their bandwidth is roughly equivalent at this point, though.
The "slower than that" is still ridiculously fast.
 
^ this
... does that apply to NVMe SSDs though?
i thought the NVMe / M.2 channel speeds are roughly RAM-like?
 
Fast, yes, but still not DDR4 fast
Iirc, NVMe is like 2.5 microseconds
 
still pretty fast
compared to SATA SSDs :P
 
10:04 PM
0
Q: Number letter counts

Anony MousIf the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. Output how many letters would be used if all the numbers from 1 to 1000 (one thousand) inclusive were written out in words. NOTE: Do not count spaces or hyph...

 
11:00 PM
@flawr I just finished ALU but it's suboptimal. Did you finish it optimally?
 
0
Q: Quaternion square root

BubblerBackground Quaternion is a number system that extends complex numbers. A quaternion has the following form $$ a + bi + cj + dk $$ where \$ a,b,c,d \$ are real numbers and \$ i,j,k \$ are three fundamental quaternion units. The units have the following properties: $$ i^2 = j^2 = k^2 = -1 $$ $$...

 
11:22 PM
@Poke Don't forget you have access to Unary ALU
 
@Poke what's this
@dzaima no need to strictly type though. but i get what you mean
 
@ASCII-only hamming-coded?
 
@Downgoat yeah what about it
wait
 
@ASCII-only nandgame.com.
 
wrong term. ignore me >_>
 
11:25 PM
@ASCII-only what is a hamming-coded mean
 
huffman
 
oh lol
 
i just do a stupid
 
@Zacharý yeah i used 2 of those right off the bat. one on each input
i have 7 components
 
Use a third one for the final inversion.
 
11:28 PM
ooo
 
@ASCII-only so the most recently used commands would be, say, 4 bits, other used commands would be 5-8 and commands used for the first time would be, say, 9-12?
 
@Zacharý good call! that did it
 
11:40 PM
@lirtosiast not really "most recently used", more "most likely based on existing data"
ideally impossible next commands are also removed from the possibilities, but it shouldn't affect length much either way
 
oh
Why not just combine Huffman coding and trains then?
 
@flawr Wow this is great. Taken up 3 hours of my time and counting
 
^ Same (not that number, but you get the idea)
 
See - I always knew everything could be built from a nand gate, but it took me far too much time to actually build it lol
 
@lirtosiast sounds like it could work, but... how much data do trains give in their first command? or would it be possible to somehow reorder trains so the... topmost? function is first in the code
 
11:52 PM
Why do we need to determine how much data trains give in their first command?
 
> Anony Mous
@lirtosiast not enough data = less good at guessing next command = huffman less efficient
 
are you thinking of something more sophisticated than Huffman coding using weights derived from both a large Jelly sample and the frequency of past Jelly tokens in the program itslef?
 
@Quintec I literally was thinking about code-golfing using NAND gates before I knew of this game.
 
it's different from mathematica solution
oh wait mathematica uses stupid integer naming convention
 

« first day (2847 days earlier)      last day (2004 days later) »