« first day (2376 days earlier)      last day (2458 days later) » 

6:00 PM
@Downgoat Huh. Apparently you and I are the only ones with the Booster badge on Meta.
I wonder which of us will get Publicist first.
 
Capped 2 days in a row and today I got 20 rep :( Should do sth about it
 
@AdmBorkBork oh huh :D
 
@DJMcMayhem Thanks, I'll accept that when I'm allowed to. How can I make it ignore the first and third lines? (don't include that in the answer as it's only relevant here)
 
@Mr.Xcoder what's a "sth"
 
@StepHen "sth" is short for "Something"
 
6:01 PM
aha nvm found it in the question
 
oh, so just like "smth"
 
sneaky little detail
 
or whatever it is
I don't like those :P
 
Yea
@StepHen You speak good English :)
I mean, aren't you from the US?
 
@Mr.Xcoder I wouldn't say that, more like I only speak English
yeah
 
6:02 PM
@StepHen BTW nice Fibonacci picture.
 
Too many layers of abstraction: functions -> tokenizer -> preprocessor -> mode_selector -> interpreter
And now I need interpreter -> function ಠ_ಠ
 
How can I only print the second line of input in Bash?
 
@Mr.Xcoder thanks, I ripped it off of google
 
@MDXF head -2 | tail -1
 
@Mr.Xcoder You'd be surprised how many native English speakers can barely speak it
3
 
6:03 PM
@HyperNeutrino what's wrong with interpeter -> parser -> lexer
 
I really like codegolf.stackexchange.com/questions/137066/zippered-paragraph but Im frustrated I cannot solve it
@BusinessCat I know that already. Some are terrible
 
what's the ascii value of EOF?
 
@StepHen that's for people who know how to make languages
 
@HyperNeutrino I don't, really
 
6:04 PM
@totallyhuman Python
 
I just found a tutorial on interpreters and did half of it
 
and now I can write interpreters
 
@Mr.Xcoder what?
 
@Mr.Xcoder halp chr(Python) doesn't work
 
6:04 PM
with ASTs, and lexer parser interpreter
 
Oh, I should stop doing this >>>
 
lol Positron is what happens when I try to do that without knowing how to do things
 
See, I probably should do that, but instead my interpreter is a large jumble of closures
 
@HyperNeutrino that makes it print the first and second line
 
really?
 
6:05 PM
yep
 
@MDXF so what do we have to put in the cell on EOF
 
not for me...
$ printf 'hello\nworld\nhi\nplace\n' | head -2 | tail -1
world
 
@totallyhuman I guess it's 69, 79, 70
 
@HyperNeutrino Aha, tail -1 not tail -l
@totallyhuman -1
 
6:06 PM
lol
 
ok
'cause that apparently varies
 
@HyperNeutrino I now am level 3 on JHT :)
 
1 I l, what's the difference really
 
@Mr.Xcoder nice \o/
@StepHen one's a number, one's an uppercase letter, one's a lowercase letter
facepalm I don't need to reverse-import things
I just need to pass all necessary components down the chain through function arguments lol
 
@HyperNeutrino you know when everything's in the same file everything is easier :P
 
6:08 PM
@MDXF You could change the regex to s/\v.*\n.{32}(.{-})".*\n.*/\1 (that includes removing the %)
 
@StepHen not really
 
and when all of your functions are methods of your interpreter, it makes life easier
 
Last time I tried (anyfix) I couldn't read anything anymore
@StepHen They're all lambdas of stack, arguments lol
 
Maybe I don't quite understand stack-based interpreters
 
and I have a bunch of tacit things fluent interfaces function compositions
 
6:09 PM
@MDXF Or you could add -c '1d|2d' at the beginning
 
@StepHen If you don't understand stack-based interpreters, good luck understanding Anyfix-based interpreters :P
 
Wait........................ MATL is reverse polish?!
 
@HyperNeutrino the interpreter shouldn't care if it's Anyfix or not
@HyperNeutrino that's the parser's job
 
um not quite
 
The parser just makes the ASTs
Lexer does chars -> tokens
Parser does tokens -> ASTs
 
6:10 PM
ASTs can't be constructed in Anyfix without previous knowledge of the number of elements pushed by each function, which can be variable
 
phew that was a lot of bytes
 
Interpreter does ASTs -> functionality
 
1
A: Trivial Brainf**k Substitution Interpreter

totallyhumanPython 2, 447 bytes import re,sys def f(b,r,a,i,n,f,u,c,k): d,e,g,m=[0]*30000,0,0,'' for n in re.finditer('|'.join(r'(?P<%s>%s)'%m for m in[(j,re.escape(l))for j,l in zip('rlidoswen',[r,a,i,n,f,u,c,k,'.'])]),b): m+=' '*g+{'r':'e+=1','l':'e-=1','i':'d[e]+=1','d':'d[e]-=1','o':'sys.stdout.wr...

 
@MDXF sed offers a nice solution to only applying the substitutions on the second line
 
Who on this site knows MATL except for Suever and Luis? The same question about 05AB1E with Adnan, Erik and Jonathan
 
6:10 PM
How can I remove the last X bytes from a string (bash) ?
 
i implemented a golfed tokenizer ffs
 
@Mr.Xcoder Emigna for 05AB1E I think
 
@StepHen Yeah, you're right
And Martin I think
 
@totallyhuman Good job
 
And Dennis
 
6:11 PM
@Mr.Xcoder Dennis knows everything
 
@Mr.Xcoder I know MATL. And Flawr does too
 
@totallyhuman can you shorten 30000 with e?
 
Poll: What should I learn next – 05AB1E or MATL?
 
@MDXF s/.\{X\}$//
 
I've never seen Martin or Dennis use 05AB1E
 
6:12 PM
@DJMcMayhem Thanks
 
where X is an integer
 
@BusinessCat They did
 
@Mr.Xcoder I like MATL a lot, but 05AB1E is definitely golfier
 
@Mr.Xcoder Why not both?
 
@Mr.Xcoder you gotta keep up with the Jones's: learn GolfScript
 
6:13 PM
@wizzwizz4 It's painful to learn 4 golfing languages at the same time
 
@MDXF echo 'hello' | rev | cut -c 4- | rev
 
@DJMcMayhem @wizzwizz4 @StepHen Thanks for the feedback
 
If you're really wanting to keep up with the times, learn MUMPS. Very golfy and modern. :P
 
@HyperNeutrino I just used cut -c -4 instead lol
 
@StepHen it returns a float so no
i did try
 
6:14 PM
@MDXF lol
oh right
i'm dumb
that works
 
@DJMcMayhem Hm, I don't think so
 
@Mr.Xcoder cQuents isn't that difficult to learn since it's infix
 
@Mr.Xcoder Drop Perl. It's only golfy with a base-4 to base-256 converter.
 
(Because only 4 symbols are used in Perl...)
 
6:16 PM
5K REP :D
 
@MDXF Congrats
 
@wizzwizz4 sounds like JSF
 
Who voted for Java?
 
@Mr.Xcoder guilty, it's actually useful
 
@Mr.Xcoder me
 
6:17 PM
2 hours ago, by Business Cat
OK Perl is an esolang confirmed
 
I actually know (a bit) of Java
 
@Mr.Xcoder if it's a mandatory strawpool, you are mandated to obey it
 
{"success":"failed","errors":[[{"LanguageID":0,"PhraseID":null,"IsHtmlText":true,"Phrase":null,"IsMock":false,"IsToDo":true,"Language":null,"PreformattedText":"Please check the box or enter the text seen above.","Args":[],"IsEmpty":false}]]}
 
@StepHen Too elaborate wording for my taste
 
Strawpoll doesn't like bots me. :-(
 
6:18 PM
@wizzwizz4 It's got a captcha
 
No one voted for 05AB1E nor MATL :(
 
@Mr.Xcoder wait, you preloaded it with votes?
 
@StepHen My point still stands.
 
@StepHen Yes
 
@Mr.Xcoder I would personally recommend finishing your Jelly Training at least until Level 4 but I wouldn't say it's necessary
 
6:19 PM
well you're the only level 4 person :P
 
@HyperNeutrino Stack-based langs are easy... I can do them all at once
 
@Cowsquack I am 3 now, gettin' close
 
@Cowsquack true :P
At least I'm not the only person above level 2 anymore :P
 
@HyperNeutrino Haha
 
6:19 PM
@HyperNeutrino I'll probably start hypertraining once the summer's over and I have free time
 
I'm going to continue until I can get to Level 5 :P Not sure if that's possible, cuz it hasn't been done yet xD
@StepHen That's the opposite way around for me :P
anyway brb
 
Remember there are Erik and LEAKY!
Lol
TIL what Erik's chat description means...
 
How can I cut away the last 15 bytes of standard input? (bash)
 
@MDXF cut -c 15- |?
 
@MDXF why do you want to use a hammer, when you could just use a knife
 
6:23 PM
Anyway, gotta go
 
any feedback for this sandbox?
 
@Mr.Xcoder that does the first 15
@StepHen ok, how would you recommend I do it?
 
@dzaima I made recently
 
@MDXF sed 's/.\{15\}$//'
 
@MDXF "First, install Windows"
 
6:24 PM
@StepHen that reminded me of that sandbox
 
@dzaima oh, ignore me then :P
 
@StepHen -_-
 
Idea: I need to make a postprocessor for Ceres sometime
not enough layers of abstraction yet
 
sed is amazing
 
@StepHen does that tag apply as there is no actual sliding going on in that challenge except that it's named after a sliding puzzle game?
 
6:26 PM
@dzaima actually, probably not
 
but that snippet removes the last 15 characters of each line, if you want to remove the last 15 characters of all of input, then use this: sed ':a;$!N;ta;s/.\{15\}$//'
 
@Cowsquack @HyperNeutrino thanks for the help
 
no problem :)
 
I think you can golf using sed, gimme a minute
 
Cool
 
6:36 PM
sed '6!d' instead of head -6|tail -1
(translation: on every line that is not the sixth line, delete)
 
hi all
 
@Cowsquack Updated, thanks
 
I was wondering if anyone could help me a with a simple fastest-code challenge. I want to write a challenge to take the product of an array of complex numbers
the problems are a) timing it and b) giving the input
does anyone have any ideas?
 
added an explanation
 
if the array is small then timing seems tricky
and it if very large giving the input seems hard
 
6:41 PM
that was really tedious to ungolf o0
 
yay bash is now winning
 
That's not something you see every day
 
where?
 
1
A: What's my name?

MD XFBash, 120 112 106 bytes -8 bytes because wget is smart enough to redirect HTTP to HTTPS when necessary -6 bytes thanks to another sed suggestion from Cows quack wget codegolf.stackexchange.com/users/$1 2>y cat $1|sed '6!d'|cut -c 13-|cut -d '&' -f1|sed 's/.\{15\}$//' No TIO link since the T...

 
aw man you guys were having your own fun while i was doing that
gimme that challenge
 
6:43 PM
All yours :P
 
gah python's done
 
Yeah and good luck beating it
 
mm
i dunno if the api might be shorter
 
hmm..ppcg chat room isn't what it used to be :)
 
API URL is //api.stackexchange.com/users/USERID?site=codegolf
Non-API URL is //stackexchange.com/users/USERID
wow those lined up nicely
 
6:46 PM
oh hey that should be much nicer
 
@Lembik What's different about it?
 
@wizzwizz4 people used to help me with challenges :)
when I asked nicely
that is help me when writing challenges
 
@Lembik well... said people are in the middle of a conversation about something else :P
 
o wat
 
6:47 PM
@StepHen true ;)
 
@Lembik Just wait a bit.
 
it's longer
 
will do
 
teh fa
 
?
 
6:47 PM
@totallyhuman Please don't spam.
 
sorry
 
@MDXF sed 's/.\{23\}&.*//' is shorter than cut -d '&' -f1|sed 's/.\{15\}$//'
 
One sec, working on a Cubically answer
 
How do people even code in Seed? Is there some secret I don't know about the Mersenne Twister?
 
Yeah
Reverse engineering
 
6:50 PM
Don't you have to brute force it, or is it fairly easy?
 
You know, this is actually being discussed in the Cubically chat room
in Cubically, 58 secs ago, by TehPers
Python's random number generator is pretty simple once you wrap your head around it. I still haven't completely reversed it though, since the first key value is just assumed to be 0 rather than actually being calculated (it works for some reason though?)
 
@MDXF Oh xD I was asking because he posted it on my question :P
 
Oh lol
 
Am I doing stupid or would dot product for a vector be product(a => sum)
I am doing that but it is not working
 
Wouldn't it be the sum of the products
 
6:53 PM
:| yes it would shit
CMC: given a list of vectors. See if any two vectors have correlation |r|>.9
 
no it would not shit
it is not capable
 
-_-
 
@Downgoat does that mean their lengths should be more than .9?
 
@BusinessCat 🤔 hmm who could these be
@Cowsquack abs(correlation) > .9
 
I don't know what that means, could you give an example?
 
6:59 PM
f(
    [1, 2, 3],
    [3, 2, 1],
    [2, 3, 4]
) => true ([1,2,3],[2,3,4]) have correlation, r = 1
 
how do you find the correlation?
 
ouch.
 
I take it n is the length of the vector?
 
7:03 PM
its not too bad when you think it as matrix, [a_1, a_2, ..., a_n] + pi + sigma notate
 
What's the maximum length of a PPCG username?
 
36 on a hunch
 
there's only one way to find out
 
not again ಠ_ಠ
 
7:09 PM
Cool thanks
 
please don't make your username a random 30-character string
also I made a Fibonacci sequence program in Ceres :D
Unfortunately it's longer than Oasis, but hopefully it should be more versatile
@StepHen What's the Fibonacci program in cQuents?
 
@HyperNeutrino =1:z+y
not very golfy
to start with 0
=0,1:z+y
 
darn it beats me by 1 :P
 
really? 0.o
 
to require starting with 0 I win though
 
7:11 PM
 
1-indexed starting with 1: ₁₂+≺3 1
 
big pi = dot product
so all you need to do is the things but hard part is efficient finding which thing correlate
 
wait I can golf that
 
So, someone answered my challenge with an answer that has to go through the JavaScript interpreter twice to work
1
A: Hello, World! with semi-common characters

Ra8Double JavaScript, 318 bytes I'm not sure if that's allowed, I couldn't do it using the JavaScript interpreter once. It's similar to use eval() but instead I'm using the interpreter twice: `\`\\x${0xA*0xA&0xC}${0xA&0xC}\\x${0xA*0xF&0xF}${0xB*0xF&0xF}\\x${0xA*0xF&0xF}C\\x${0xA*0xF&0xF}C\\x${0x...

 
@HyperNeutrino It's 7 bytes to get the nth Fibonacci?
 
7:12 PM
@BusinessCat the built-in doesn't exist yet :P
 
@HyperNeutrino why would you builtin that...
 
because why not
 
Gaia does it in 6 and it's not made for sequences ಠ_ಠ
 
I'll make it an AE verb to avoid wasting too many things
 
because you're supposed to make the sequence with what the language offers, not just a builtin
:P
 
7:13 PM
@BusinessCat well actually 6 bytes now
@StepHen ¯\_(ツ)_/¯ I might not make it. If I feel like using up some bytes cuz I have unused 2-byte spaces I might just make one for fun
 
I guess I have to add SBCS to be competitive :/
 
Also 1≻2₁₂+
 
@HyperNeutrino hm, builtins like that would go against how cQuents work, so I won't add them
 
Ah I see :P
 
cQuents is, each thing to the right of the mode generates the next item in the sequence
so I guess I could have a builtin but that's just stupid
 
7:14 PM
oh okay
My intention was to be more versatile and golfable than Oasis and cQuents for harder sequences, not to outgolf you in Fibonacci xD
 
I have a long builtin for OEIS number but that's just because I'm cataloging OEISs
 
So I'll probably not implement the built-in unless I need it later on
anyway gtg now o/
 
@HyperNeutrino oh really? because cQuents gets better the harder the sequence gets, once I get all the builtins I want
@HyperNeutrino ok bye
 
uhh rubber duck
    public static boolean hasOddDigit(int n) {
        while (n > 0) {
            if ((n % 10) % 2 == 1) {
                return true;
            }

            n = n % 10;
        }

        return false;
    }
what is wrong with this code
 
infinite loop?
 
7:25 PM
I feel so dumb failing to do this basic school programming task
@StepHen why would it?
 
n % 10 will never be <= 0...
 
while (n > 0)
>
 
unless it's already divisible by 10
4 % 10 == 4
 
1 % 10 == 1
 
7:27 PM
ninja'd
 
gah why didn't I notice
thanks
 
@totallyhuman (n % 10) % 2 == n % 2, just for optimization
 
mm yeah tthanks
 
in general (n % km) % m == n % m
 
@orlp thanks for the generalization
 
7:28 PM
unless it's n%km
 
@JohnDvorak what?
 
    public static boolean hasOddDigit(int n) {
        do {
            if (n % 2 == 1) {
                return true;
            }

            n = n / 10;
        } while (n > 10);

        return false;
    }
fixed
 
or you can put while (n > 0) at the beginning and get rid with the do ... while syntax
and you can use n /= 10 instead of n = n / 10
 
Leaky's motto: Golf all the code!
 
And all the whitespace is unnecessary
 
7:32 PM
Very lengthy function name, too
 
Does Java do falsy zeroes?
 
@JohnDvorak no
 
Fail
 
in Java, integer and boolean do not mix at all
like, at all
 
In Ruby you can condition on anything but only nil and false are falsy
 
7:34 PM
@LeakyNun Meanwhile in Python: True + 1 == 2
 
CMC: is n a sum of consecutive squares?
 
@JohnDvorak In PowerShell you can condition on anything, too, but we have a wider selection -- 0, $null, empty string, empty array, and $false ... everything else is truthy
 
@LeakyNun 2 consecutive squares? Any consecutive squares? Does a square count? (The sum of one consecutive square)
 
@DJMcMayhem yes, yes, yes.
 
7:41 PM
bye
 
what's the slowdown you get from running code in a VM guest?
 
CMC: figure out what 'cancer risk per MM' means?
 
@LeakyNun Gaia, 6 bytes: s¦ḋΣ¦Ė
 
@LeakyNun Jelly, 6 bytes: R²ẆS€i returns a positive integer or 0
 
CMC: output if input contains an odd digit
:P
 
7:43 PM
will input ever be empty?
 
if input can't be empty, then /[13579]/d will work in sed, it outputs an empty string for a truthy testcase, or does nothing to the input if it is falsey
 
I just realized that Ceres is in no way sequence-specialized
 
@totallyhuman Gaia, 5 bytes: $r¦ỵ!
 
@StepHen I don't know, your sequence language will probably end up beating mine because I noticed that mine isn't really sequence-specialized :P It just has a bit more control flow that something like 05AB1E
 
7:46 PM
I just got access to /site-analytics and the Traffic section is hilarious
There's just a huge 20k drop every weekend
What happened on June 7th?
 
I think there might have been an SE fail-back/fall-back/?
 
Everything spiked
 
oh nvm then
 
Its not a very large spike
I think it might just be noise
 
yeah it doesn't look particularly impressive
 
7:49 PM
I wonder what happened on May 31, 2012
Just a random spike to almost 10x the traffic
 
@MagicOctopusUrn quite the struggle there huh?
 
0
A: Sandbox for Proposed Challenges

Nathan MerrillIs this 2048 board valid? Some 2048 boards are impossible to get into. For example, 2 _ _ 2 _ _ _ _ _ _ _ _ 2 _ _ 2 will never occur in a 2048 game. Additionally, these are all impossible: 8 _ _ 8 8 _ _ _ 2 2 2 2 _ _ _ _ _ 8 _ _ 2 2 _ _ _ _ _ _ _ _ _ _ _ _ _ _ 8 _ _ _ ...

 
Idk whether to be proud of this or totally sad.
@StepHen I couldn't even use quotes, so there was literally 0 other ways I could think of lmao.
At first I was thinking replace numbers with letters... Then, nope, can't use strings.
 
Remember, today you learned that Perl > 05AB1E, at least at golfing. 05AB1E is probably still more practical.
 
I'm pretty proud still that I managed that question using only 7 unique characters lmao.
When half the characters I was allowed to use were like q = quit program, w = wait 1 second, y = current value in loop, etc...
 
7:59 PM
If you guys like these restricted source type of challenges, I have a much better challenge idea that I don't know how to implement: codegolf.meta.stackexchange.com/a/12784/65836
All I need is the Stack queries and I'm golden
But I really don't know how to do those
 
Oh man restricted source is fun.
 

« first day (2376 days earlier)      last day (2458 days later) »