« first day (1895 days earlier)      last day (2949 days later) » 

10:00 PM
avoMad avoSad avoKad avoLad avoCad
Did I get it? :P
 
@EᴀsᴛᴇʀʟʏIʀᴋ perfect +1
 
._.
@QPaysTaxes have you seen tips for golding in ruby?
 
42
Q: Tips for golfing in Ruby

grokusWhat general tips do you have for golfing in Ruby? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Ruby (e.g. "remove comments" is not an answer). Please post one tip per answer. -- borrowed from marcog's idea ;)

O_o Ruby's syntax is almost as... odd... as Pythons...
c=->n{/(\d)\1/=~n.to_s}
wat.
In Cheddar, how should tokens be associated with their classes?
 
10:04 PM
@Downgoat What's wrong with that?
Seems fairly straightforward
 
._. not really. It looks like perl
 
->n{ } is a lambda
/(\d)\1/ is a regex
=~ applies the regex
 
@quartata okay, nvm that's kinda like Cheddar's syntax then
 
n.to_s takes n and converts it to a string
 
@QPaysTaxes and others - if anyone is interested in site editing stats, just wrote this crap code today
5
Q: Top 10 editors partitioned by year

PhrancisI wanted to get some stats on who has done the most edits on Code Review, so I wrote the following query on SE Data Explorer. All improvement suggestions are welcome. Note that I used a cursor to partition top users by year because at first there was a fundamental flaw in my logic trying to get...

 
10:06 PM
@Phrancis -(-1) not enough code golf
 
D:
CR is still good.
 
@QPaysTaxes good for you
 
lol
SQL is always too long
 
0
Q: Triangular wave

Andrea993The Challenge In this challenge I want to propose to calculate an array of coefficients of a triangle wave. The triangular wave should have a period of 2pi and an amplitude of 2, from -1 to 1 Winner To win this challenge you have to write the highest performing code

 
@QPaysTaxes what?
 
10:07 PM
Cheddar's source code isn't golfed though
just the tokenizer is 37KB
@QPaysTaxes pls link
 
10 secs ago, by QPaysTaxes
I don't give enough of a shit to explain.
 
let's not bring that up pls
;-;
 
what do I searcg for
 
@Phrancis D: D: D: I'm not on there
 
10:08 PM
@Downgoat
in The 2nd Monitor, May 30 '15 at 14:38, by rolfl
Hang on, let me just kick @QPaysTaxes and @EthanBierlein ....
 
^ proof code reviewers are evil
 
This LuisMendo person is pwning @MartinBüttner in edits this year, so far
 
no results
 
I'm sorry, I did not mean for this to come up @QPaysTaxes
 
@QPaysTaxes I am sorry about that.
 
10:10 PM
@QPaysTaxes D: that sucks...
 
Let's not get into this. It's old history
 
^
 
@QPaysTaxes wut
 
^
and so true
BUT BEAUTIFUL
 
10:11 PM
@QPaysTaxes beautiful
 
3 mins ago, by Quill
let's not bring that up pls
 
^
 
why bother rehashing negative experiences ;-;
 
10:12 PM
@QPaysTaxes +1 for actually using regex for primality checking
 
@QPaysTaxes I can't keep up with this room, like ever
 
@QPaysTaxes what does this do?
 
I should setup a basic Cheddar REPL now that expressions are actually working!
 
@Downgoat yes pls
wuold help but can't really right now Q_Q
bai to go get work done.
 
10:14 PM
bai!
 
It's kinda sad you can't really golf in Java... by the time you're written public static void main(String[] args){} you probably already lost to most people
 
@Phrancis you can post a function
 
^^ right
 
45
A: The Many Memes of PPCG

Sp3000Meme: Java Origin: Java's existence Cultural Height: Always Background: The go-to example of a verbose language. It can be used in many contexts. For comfort: A: My golf is too long :( B: At least it's not Java As a red flag: A: Uh oh, my golf is almost as long as Java's B: Clearly, you'r...

 
nodejs docs are so helpful...
they are the worst...
Does anyone know nodejs?
 
10:19 PM
npm are giving away socks for PRs on their docs
 
@Quill makes sense because they suck so much.
 
@Downgoat for some values of know
 
but goats don't wear socks...
 
they have little wombats on them
 
@Quill how tak stdin, i tri for thiree minut and no input ;-;
 
10:20 PM
there's a prompt package on npm, but I don't think that counts
  process.stdin.resume();
  process.stdin.setEncoding('utf8');
  var util = require('util');

  process.stdin.on('data', function (text) {
    console.log('received data:', util.inspect(text));
    if (text === 'quit\n') {
      done();
    }
  });

  function done() {
    console.log('Now that process.stdin is paused, there is nothing more to do.');
    process.exit();
  }
 
tank you
@Quill so how would I write a repl?
 
There's a readline package also
 
user image
3
 
@Downgoat If I knew that, I wouldn't have a certain issue still open on my chat terminal repo
 
10:22 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ ^^^^
 
But I agree it's dumb that you have to have a package just to do it
 
@Dennis wow. nice.
@quartata it's dumb because it's JavaScript
 
ah right
But see Node.JS is a special kind of dumb
 
I'm going to wallow in my former victory :P
 
10:23 PM
yes
but it also a special kind of beautiful
 
@Downgoat Probably suboptimal.
 
@Downgoat uh no event loops are ugly
 
look at that es6. it's beautiful
@quartata event lops?
 
@Downgoat The reason why people like node.js
the .on thing
 
10:25 PM
you mean all the lambdas?
 
No
The .on
 
@Downgoat are you having a conversation with yourself in code comments?
 
@Quill I think he's having a conversation with @MarsUltor
 
@Quill No, it is with @MarsUltor because for some reason we aren't using chat
1 min ago, by Downgoat
look at that es6. it's beautiful
 
Extra Salty 6
 
10:25 PM
ES6
@QPaysTaxes ಠ_______________________________________________________________ಠ
 
Why is your mouth so wide?
 
@Rainbolt it's a goat thing
@QPaysTaxes ಠ_ಠ
brb, editing...
-1 not enough edits done in quick succession.
 
@Downgoat its been 2 minutes already…
 
D: :P
not done in quick succession.
 
͡ಠ _ ͡ಠ
 
10:29 PM
I can't type either
 
@Quill ¯\_( ͡ಠ ͜ʖ ͡ಠ) _/¯
 
@CᴏɴᴏʀO'Bʀɪᴇɴ dat edit
 
if I put one finger hoof on the + wire coming out of a battery and another hoof on the -. Will it electrocute me?
 
maybe if you're sitting in the bath
 
@Downgoat probably not
 
10:31 PM
okay, just making sure
 
depends on how conductive goats are
 
( ͡° ͜ʖ ͡°) oh okay
 
MARKER ON YOU FACE
 
D:
 
so apparently, no studies have been done on the conductivity of goats, but tons have on the conductivity of goat milk
 
10:32 PM
@QPaysTaxes THESE STAINS, THEY WILL NOT GO
 
s/conductivity/nutrition of cooked/
 
@QPaysTaxes how did you know!?
 
thank you google
@Quill ಠ_ಠ O___O .______.
 
@Downgoat fur isn't what matters
 
10:33 PM
oops...
 
the electricity has to go all the way through your body to your other dfinger
 
@QPaysTaxes my sed skills aren't that great
 
@Maltysen I don't think hooves are very conductive though
> It is squirrel! - Evil Fur Kills Resistance - Spew?
wtf google
@QPaysTaxes oh shit. I'm having surgery right now... better put my electricity away...
 
yay biology
 
Chat poll: in-built or built-in?
 
10:35 PM
@ZachGates neither
 
@ZachGates in-built-in
 
built-in
 
@ZachGates built-in
 
@QPaysTaxes Just in general
 
@Quill how did you get user input in your caht node thing. I need to do it for Cheddar's REPL
oh wait.. you already said you don't know how...
nevermind
 
10:38 PM
I have user input, but it works once
 
tell me how you did it
 
@QPays node.js
because the prompt thing isn't async, I can't fetch a prompt after the prompt is done
the terminal thing has so many issues caused by the technical stack. I should just ditch node for Python
 
Someone give me a whale so I can slap whoever designed node.js's I/O with it
 
@QPaysTaxes Yeah, that's the prompt plugin I use
@Downgoat it's not necessarily Node's IO, JavaScript isn't async, like most standard I/O systems are
 
10:41 PM
@Dennis ._______. how... @CᴏɴᴏʀO'Bʀɪᴇɴ @Maltysen ^^^^
 
that said, a prompt plugin that keeps going would be nice
 
FML
FML FML FML AHHHHHHHHHHH
 
Node.js: where taking input is harder than making a programming language
 
arguments.process[0]?
Yes.
 
@QPaysTaxes yes
 
10:42 PM
here
 
there
 
@Downgoat Every number with digit sum 6 is also divisible by 3 and therefore not prime. That means the only conditions we have to check is the digit sum and that the last digit is 1.
 
@Dennis :o nice observation
 
^ ^^
 
Jolf, down to 13 bytes ~I&=1g§H=6uHx
This problem came from my MathCounts worksheet :P
 
10:46 PM
@CᴏɴᴏʀO'Bʀɪᴇɴ 1 more!
@CᴏɴᴏʀO'Bʀɪᴇɴ ohey, you do math competetions?
 
@EᴀsᴛᴇʀʟʏIʀᴋ No, but I follow them
 
I am doing Mathcounts next year.
 
@EᴀsᴛᴇʀʟʏIʀᴋ Is jelly at 12?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ cool.
@CᴏɴᴏʀO'Bʀɪᴇɴ pyth.
and yeah.
 
10:47 PM
14 i think.
wait that can't be right
sssshhh
don't say anything.
 
:o golfed it down to 12
~I&=1gH=6uHx
11! :D ~I&=1g§H=6uH
 
Does ~I&=1gH=6uH work?
damnit ninja'ed
 
@Dennis Jolf hit 11.
@CᴏɴᴏʀO'Bʀɪᴇɴ :3
@CᴏɴᴏʀO'Bʀɪᴇɴ you should try the PPCG discord chat, or skype.
 
I followed @quartata's suggestion for adding implicit input as x
 
10:50 PM
Find first match is currently a bit clumsy in Jelly. I should work on that.
 
no thx, is good as is.
@CᴏɴᴏʀO'Bʀɪᴇɴ what state are you in?
 
@QPaysTaxes What's wrong with it?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ do you have a skype?
 
10:51 PM
Yes, I do
@EᴀsᴛᴇʀʟʏIʀᴋ HUGS NOT DRUGS
^^ that's right
 
@CᴏɴᴏʀO'Bʀɪᴇɴ totally not what we are. For real.
We like speedrunning video games and beaches.
 
Oh, sounds fun
 
@CᴏɴᴏʀO'Bʀɪᴇɴ can i has skype contact info
 
@EᴀsᴛᴇʀʟʏIʀᴋ maybe
 
I gives to yous
Riker Wachtler
last time I checked, I am the only Riker Wachtler on skype.
 
10:53 PM
looking
 
@Dennis 11 possible
 
@QPaysTaxes Yes, that is correct.
 
replace 10 with ;
 
@Maltysen pls no help him
 
> Global value of innermost lambda's first variable.
 
10:55 PM
I'm about to get it down to 9
 
@Dennis ya that means you access T's original value, which is 10
 
@QPaysTaxes With what input value?
 
Jolf is still at 11.
 
The Pyth code? It should finish almost instantly.
(And does for me.)
 
@CᴏɴᴏʀO'Bʀɪᴇɴ still can't find Conor O'Brien in skype. I tried english and small caps.
 
10:57 PM
@EᴀsᴛᴇʀʟʏIʀᴋ c_o_n_o_robrien
 
@EᴀsᴛᴇʀʟʏIʀᴋ is small caps not english?
 
2 mins ago, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
I'm about to get it down to 9
 
Size can't be 3 if you only have two checks...
 
@Dennis how does your code work it looks magic
oh nvm I get it
 
It computes (digit sum) ^ (last digit) == 6.
 

« first day (1895 days earlier)      last day (2949 days later) »