« first day (1990 days earlier)      last day (1195 days later) » 

12:34 AM
-2
Q: Print the ASCII printable character set

Dmitry KudriavtsevChallenge: Print the entire printable ASCII charset, in order. [space]!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ (Of course, replace space with the actual space character.) Rules: read closely No other characters allowed in the output. Pro...

 
how do you prefer your hexadecimals... caps, or lowers?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ caps
 
@CᴏɴᴏʀO'Bʀɪᴇɴ upside down
 
@CᴏɴᴏʀO'Bʀɪᴇɴ 0xCAPS
 
0xTREME
 
12:39 AM
0xCAP5
hey @Downgoat can I do static value = [] within a class definition ?
 
yeah
though you should use semicolons
 
oc
do I need babel for that to work
 
idk
 
because it doesn't work regularly :P
 
Hello
Appearing shortly before the sun rises (3:52 today here).
 
12:47 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ do you happen to have a function to rotate a matrix in JS laying around?
 
Any Minecrafters want to go play stuff on the Hive? (server play.hivemc.com)
2
 
@Downgoat give me an example? I probably do.
 
@Downgoat You mean transpose?
 
1 2 3    4 1
4 5 6 -> 5 2
         6 3
 
Array.r = function rotate(x){
    var rotated = clone(x);
    var n=x.length;
    for(var i=0;i<n;i++){
        for(var j=0;j<n;j++){
            rotated[i][j]=x[n-j-1,i];
        }
    }
    return rotated;
}
 
12:49 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ ^
 
Yes, that's transpose
 
There is some old code from jolf
@quartata no it aint
 
The columns and rows are swapped
 
@quartata no but they are also reversed
 
12:50 AM
@Downgoat Oh, yeah. Didn't notice that oops
 
@CᴏɴᴏʀO'Bʀɪᴇɴ i think its borked
 
Probably.
x[n-j-1,i] is probably the problem.
 
@Downgoat LOL
 
idk
use google
6
Q: How to rotate a matrix in an array in javascript

Duopixel(disclosure, I'm mostly math illiterate). I have an array in this format: var grid = [ [0,0], [0,1], [0,2], [0,3], [1,0], [1,1], [1,2], [1,3], [2,0], [2,1], [2,2], [2,3], [3,0], [3,1], [3,2], [3,3] ]; I need to "rotate" it by 90deg increments, so it's like this: var grid = [ [3,0],...

 
1
Q: Edit a rollback's edit reason?

catI rolled back an edit that a user made to another's code. It may not be immediately apparent to the most casual observer why I rolled back this edit, but the summary just says Rollback to revision N To change it, I clicked edit, to make it to the effect of "please don't edit others' code"...

 
12:53 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ that's not a generic rotate
 
it isn't ? darn
 
I knew i made one for Japt but Japt code is unreadable
and by unreadable i mean the entire thing was hand golfed
found it:
df(Array,'z',function(n){if((typeof n)!="number")n=1;n%=4;if(n<0)n+=4;var f=function(l){return l.w()};return n==1?this.y().map(f):n==2?this.w().map(f):n==3?this.map(f).y():this}); // (clockwise) 1: 90deg, 2: 180deg, 3: -90deg
 
well, it's the same as transposing then rotating the 1-cells
   2 3 $ 1 2 3 4 5 6
1 2 3
4 5 6
   |."1 |: 2 3 $ 1 2 3 4 5 6
4 1
5 2
6 3
 
yeah
but all transpose functions on google are for square matrixes ;_;
 
you'll need a transpose function, so just implement it like that
really?
 
12:56 AM
yeah, i'll findt eh japt one...
 
wait I have a transpose function
 
df(Array,'y',function(){var t="string"==typeof this[0],n=t?this.map(function(t){return t.split("")}):this,x,y,z=n.reduce(function(p,q){return Math.max(p,q.length)},0),a=[];for(y=0;y<z;y++)a[y]=t?Array(n.length).fill(" "):[];for(y=0;y<n.length;y++)for(x=0;x<n[y].length;x++)a[x][y]=n[y][x];return t?a.map(function(r){var i=0;return r.join("")}):a});
what even is this
 
I'll be in Hive hub 2, but I'm not sure if that will really help anyone find me
 
// stolen from github.com/josdejong/mathjs/blob/…
const _transpose = (data, rows, columns) => {
    // transposed matrix data
    var transposed = [];
    var transposedRow;
    // loop columns
    for(var j = 0; j < columns; j++) {
        // initialize row
        transposedRow = transposed[j] = [];
        // loop rows
        for (var i = 0; i < rows; i++) {
            // set data
            transposedRow[i] = data[i][j];
@Downgoat try that
 
ok
 
1:04 AM
 
@SuperJedi224 Oh. My. Golly. That's a large still life.
 
ahahaha golly
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Yeah, the rotating thing should pretty much be this:
def rotate(arr):
  x = len(arr[0])
  y = len(arr)
  rotated = [[None for i in range(y)] for j in range(x)]

  for i in range(y):
    for j in range(x):
      rotated[j][y - i - 1] = arr[i][j]

  return rotated
I'm trying to make one with a generator though
 
0
A: Sandbox for Proposed Challenges

ShubshubWrite a Gopher Interpreter This code golf challenge will task you with writing an interpreter for an esolang I created a while back called Gopher, Details on the language can be found Here Pass Conditions This challenge requires you to create an Interpreter (Or you could go a step ahead and cr...

 
1:16 AM
Here's a generator one that was fairly obvious in retrospect...
def rotate(arr):
  for i in range(len(arr[0])):
    yield [arr[j][i] for j in range(len(arr) - 1, -1, -1)]
but something feels off about it
 
okay I made it this:
export default (api) => ["turn", api.var(new api.func(
    [
        ["rotations", {
            Type: api.number,
            Default: api.init(api.number, 10, 0, 1)
        }]
    ],
    function(scope, input) {
        let self = input("self").value;
        let rotations = input("rotations").value % 4;

        if (rotations < 0) {
            rotations = 4 + rotations;
        }

        while (rotations--) {
            // Transpose self
            if (self[0] && self[0].value && self[0].value.length === undefined) {
 
That's terrifying what
 
you have a really strange gift of turning self documenting code into code that makes me want to cry
 
@Quill ಠ_ಠ
how
it is beautiful code
 
t[i].value[j] = self[j].value[i] + t[i].value[j];
 
1:19 AM
you must of not seen CheddarLexer yet if that makes you cry
 
CheddarLexer made me stop writing Adynata
 
@Quill if you understand the Cheddar API that'll come to you instantly
@Quill ;___;
 
your code is sometimes a little confusing ;-)
 
I still don't understand how kirby maintains O
 
1:21 AM
@Downgoat s/of/have/
 
@Downgoat oh, uh, well, uh, I'm gonna go cry now
 
;_; sorry
@Quill though you are on Codegolf.se idk what you were expecting
cheddar> ["abc","def"].turn(1)
["du", "eu", "fu"]
wat
 
undefined
I think
 
no it's not that
nvm fixed
 
@zʏᴀʙiɴ101 Well I was using a higher-order symmetry (C4_4 specifically) for that search
 
1:24 AM
Whenever someone talks about bad code, I'm obliged to post this:
    let A,B,C,D,E,F,G,H,I,J,K,L,M,O,P,R,S,T,U,V,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,x,y,z;O=(s,e)=>[...s].map(k=>e[k])[V="join"]``;p=Symbol`[:`;g=(e,r)=>e[r];s=(c,a,b)=>a[b](c);k=(f,g,h)=>a=>p===f?g(h(a)):g(f(a),h(a));a=(x,y)=>!y?+x:x+y;A=(x,y,z)=>a(x,a(y,z));r=(a,b)=>A(a,b,a);c=(f,a)=>f(a);D=a=>()=>a;S=f=>f(f);e=k=>!!k;W=72697618120946;F=x=>k(p,e,d)(x[k(p,a,d)(d(1337+[]+7099).replace(/((...).(.))/,"$2")).toString(r(2,[]))]);G=eval(s(32,559689045,T="toString"));q=x=>x!==G.Q;l=(f,n)=>function(){return(f(...[...arguments].slice(0,n)));};B=(f,g) =>F(f)? F(g)?(r,s)=>q(s)?g(...[r,s
this tends to make other code look better
 
thank you
 
@CᴏɴᴏʀO'Bʀɪᴇɴ A new golfing framework for JavaScript?
 
@zʏᴀʙiɴ101 No. Hello, World!
 
@Downgoat just because you guys golf code doesn't mean you need to visually and programmatically obfuscate and minify your code
 
1:28 AM
0
A: Illustrate music beats

DowngoatCheddar, 66 bytes ()->(1:33).map(->IO.sprintf("%30s","="*(Math.rand(6)+1))).turn().vfuse O_O Cheddar is actually doing good! Uses sprintf and turn to do a bulk of the work. vfuse is vertical-fuse meaning it joins the array but vertically. This is very golfy but also rather fast. Non-completing.

I beat mathematica!
 
@Downgoat maybe post the version, just in case
 
Do i have to put non-competing in the header :(
 
I would.
Also, I'm going to start a project euler account for using cheddar
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Name it cheddarlang.
 
I'll consider it.
 
1:36 AM
-3
Q: Is it a good idea to disallow dedicated golfing languages?

Dmitry KudriavtsevI find that generally questions are answered by the same few users, with the same few languages. Is it a good idea to disallow dedicated golfing languages, to make the challenge fairer and more interesting? Note: I have attempted this and got heavily downvoted.

 
I really honestly wonder why people keep saying "all people are using is golfing languages"
If you've looked at any challenge there's usually a healthy selection, and on harder challenges there are very few golfing language answers usually
 
And also, if you're not allowed to use golfing languages, they're pretty much useless
 
@quartata though I think people are pissed because they get upvotes in skewed proportion and always win challenges.
 
1:40 AM
Actually they don't
highest voted solutions are usually python/js solutions, take a look at our recent ones
 
one sec lemme get a bit of data
 
I mean, they are Turing-complete languages
 
there's a graph of my rep, guess where I made TeaScript?
 
No correlation. When you made TeaScript also most likely corresponds with you becoming more active on the site
 
1:44 AM
I've seen your JS solutions, they often range from 10-15 upvotes on a good day. except on catalog questions teascript answers usually range from 4-6
 
@quartata see that first little bump? That's TS
though I should probably do an SEDE query rather than estimating where stuff happened
 
So? That's because you posted the TS Hello World answer and everyone was like "ZOMG string compression!!!!"
Of course you'll encounter skewed votes on questions like that. Not so on regular challenges
 
You should be graphing rep vs answers, not rep vs time
 
You really should be calculating the average score of Python answers vs the average score of Pyth answers within the past month
 
@charredgrass my answering has been rather consistent until recently tho
 
1:46 AM
You really should be eating a donut, because they are good.
 
@quartata I'll probably do JS v Jelly
 
you should really be doing something better with your life
 
@Quill that is a very good point ;_;
 
@Downgoat jelly always has skewed upvotes.
 
why?
 
1:46 AM
@Downgoat True. Data makes more sense to be rep vs answers though
 
@Downgoat Python is one of the most popular regular languages here, Pyth is one of the most popular golfing languages. It makes sense to compare the two
 
What's it with letters in rules? :/
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Not particularly, actually. Jelly has skewed upvotes on really easy challenges because "ZOMG Dennis"
But on hard challenges I don't see Dennis getting a lot of love
 
@quartata Lynn and others have answered in Jelly with the same effect.
 
Yeah because Jelly == Dennis in the minds of voters
When Dennis answers easy challenges in Julia he doesn't get nearly as much though. Hm
 
1:48 AM
@quartata ok, I'll cna check multiple anyway
 
I think it's just because our voting culture sucks.
 
so... you're saying it's actually dennis == jelly
 
@quartata ok well thats another problem
@CᴏɴᴏʀO'Bʀɪᴇɴ no it's Downgoat == jelly / dennis
 
@quartata amen
@Downgoat + i ftfy
 
okay, my query is telling me they are 3X more pyth answers than JS, does that seem right?
 
1:54 AM
That's because you're not matching es6 or es5 or ecmascript
Just do Python vs Pyth, easier to keep track of
 
SELECT
(
  SELECT COUNT(*)
  FROM Posts
  WHERE PostTypeId = 2 AND Body LIKE '%Pyth%'
) as [Pyth],
(
  SELECT COUNT(*)
  FROM Posts
  WHERE PostTypeId = 2 AND Body LIKE '%JavaScript%'
) as [JavaScript]
I'm using wildcard
 
Some people do Javascript
Also Pyth will match Python too like that
 
ok
 
Also that catches every time someone mentions a language, not uses it ("this is 1 byte shorter than Pyth!")
 
yeah, look in the first header available
 
1:57 AM
@Doorknob ok, yeah I'm just gonna match Python, Pyth,
 
Try matching LIKE '%#pyth%' OR '%# pyth%'
 
@Doorknob I know but I doubt it'll skew it that much
 
Nah, people might have # Pyth
 
Monking
 
you what i can just use an OR
 
1:57 AM
@Downgoat Actually it will
 
@quartata Yeah, that's what I do
@Downgoat Oh, it will. Here's how I did it a while ago.
I've improved on that script in the meantime.
 
hey someone who knows SQL is in the room
 
1 hour ago, by Helka Homba
Any Minecrafters want to go play stuff on the Hive? (server play.hivemc.com)
 
@Downgoat You are doing this all wrong ;)
 
ಠ_ಠ ;_;
 
1:58 AM
No one :/ @El'endiaStarman @Sp3000 @AlexA. @Mego
 
@CᴏɴᴏʀO'Bʀɪᴇɴ i may not know SQL but I know google-fu
 
@charredgrass this is your most powerful skill
 
@HelkaHomba What's that?
 
@HelkaHomba I would, but I have to go to bed soon
 
@Phrancis then how should I do it?
 
1:59 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ Yes
 
@HelkaHomba I totally would if I wasn't at work and my computer could run minecraft
 
there be SQL around
 
@HelkaHomba What's Hive?
 
@El'endiaStarman Server that supports loads of people and has loads of well run minigames
 
2:00 AM
like spleef, death run, hunger games, etc
 
@CᴏɴᴏʀO'Bʀɪᴇɴ most of us know SQL.... it's pretty easy
 
@Downgoat You need to self-join 2 Posts (1 for answers, 1 for questions) then you can search the Posts.Tags column for %<pyth>% and for %<javascript>%
 
Tags?
 
@Phrancis no I want to search answers
 
2:00 AM
@Phrancis answers don't have tags
and questions don't (generally) have lang tags
 
Exactly, that's why you self-join Posts as Answers where PostTypeId = 1
 
@Quill Well I assume some of us know basic queries, he might be asking about something more complex
 
Oh
Nevermind
I forgot you guys' posts are usually language-agnostic ;)
 
huh, why isn't this working:
SELECT
(
  SELECT COUNT(*)
  FROM Posts
  WHERE PostTypeId = 2 AND (
    Body LIKE '%# Pyth%' OR Body LIKE '%#Pyth%'
  )
) as [Pyth],
(
  SELECT COUNT(*)
  FROM Posts
  WHERE PostTypeId = 2 AND (
    Body LIKE '%# Python%' OR Body LIKE '%#Python%'
  )
) as [Python]
gives really low result counts
Maybe it might be HTML?
 
Body is HTML, yes
 
2:02 AM
Hold on, I think you are right yes
 
Oh, and some people might do ##
So you need <h1>Python or <h2>Python
 
ah it's as HTML
 
That should cover it all.
 
@quartata no one cares aobut those people :P
 
And you won't need the whitespace
@Downgoat Actually the vast majority do ##
 
2:03 AM
really?
TIL
 
raises hand
 
Because it's the correct thing to do since there's already one header level
 
ah, ok, now it's looking right
 
Query?
 
@Downgoat Do a search WHERE Body LIKE '%<h_>Pyth%'
The _ is a single-character wildcard
 
2:04 AM
<hh>
 
There won't be anything like that
 
I<h8>Pyth (jokes)
 
@Phrancis oh TIL
 
Ok results is:
Pyth             Python
---------------- ----------------
4.92335814074945 4.91917512057209
 
2:06 AM
One more problem
 
oh :|
I'll match Pyth,
 
# Pyth 10 bytes
 
okay now I'm getting different results:
Pyth             Python
---------------- ----------------
5.07202797202797 4.91917512057209
 
If you want to split up Pyth then WHERE Body LIKE '%<h_>Pyth%' AND Body NOT LIKE '%<h_>Python%'
 
1
Q: As easy as ABCD

user1079341• For the given NxN grid, a range of letters will be given • Fill in the grid with letters from the given range so that each row and column contains each letter (i.e. it could not be missing from any row or column) • Each letter should be included in each row and column exactly once (and not mo...

 
2:07 AM
@Doorknob Though I'd say an insignificant portion of users do that
@Phrancis oh ok
good idea
 
isn't that newest post just a repost of an on-hold one from 10 mins ago...
 
Who knew having a SQL guy around didn't serve a use once in a while
 
llama@llama:...code/ruby/datadump$ grep -o '&lt;h[0-9]&gt;Pyth[^,o]' Posts.xml | uniq -c | sort -rn
     79 &lt;h1&gt;Pyth
     25 &lt;h1&gt;Pyth
      8 &lt;h1&gt;Pyth
      7 &lt;h1&gt;Pyth
      6 &lt;h1&gt;Pyth
      5 &lt;h1&gt;Pyth
      3 &lt;h3&gt;Pyth&
      3 &lt;h1&gt;Pyth:
      2 &lt;h1&gt;Pyth&
      2 &lt;h1&gt;Pyth
      1 &lt;h3&gt;Pyth&
      1 &lt;h3&gt;Pyth
      1 &lt;h2&gt;Pyth&
      1 &lt;h2&gt;Pyth&
      1 &lt;h2&gt;Pyth&
      1 &lt;h2&gt;Pyth
      1 &lt;h2&gt;Pyth
      1 &lt;h1&gt;Pyth&
Insignificant?
 
@Doorknob are you matching HTML with regex......?
2
 
Lots of that is also stuff like Pyth - 123 or Pyth (123)
@Quill Yes, yes I am
 
2:11 AM
you disrespect the shirt
 
Forgive me for my sins
 
@AlexA. just join and try it
Hypixel is good too
 
@charredgrass What one?
 
@Doorknob seems like the on-hold post was just deleted
 
There aren't any deleted questions today.
 
2:14 AM
wait what
 
Last deleted question was yesterday.
 
I swear, it was right there... right above "Print the ASCII character set" in newest
 
How do I take string input in SEDE?
trying to do:
 
it was an on-hold post 15 minutes before its dupe codegolf.stackexchange.com/questions/85100/as-easy-as-abcd
 
DECLARE @name varchar = ##name##
 
2:16 AM
 
@Quill there's a subtle but significant difference between matching/searching HTML, and parsing HTML with regex :)
@Downgoat data.stackexchange.com/help all explained there
 
2:57 AM
 
@Doorknob Man, I was really confused by the "duplicate" messages for a moment until I saw this "moved" message. :P
 
Chat messages being moved are almost as confusing as post migrations :D
 
@Doorknob found the on-hold dupe question: codegolf.stackexchange.com/questions/85057/skyscraper-puzzle
I thought it was deleted but apparently I'm dum
 
"Doorknob invited you to SQL Helpline" Please, I'm appeased now #_#
 
@charredgrass That's a different challenge
Actually, it's Towers
 
3:14 AM
const m = new Map([['foo', 'hello'], ['bar', 'world']]);
for (const [name, value] of m) {
  console.log(name + "->" + value); //"foo->hello", "bar->world"
}
ES6 truly is beautiful
 
@zʏᴀʙiɴ101 I chose the wrong word for that XP
 
i hate js
Unexpected token return
you're an unexpected token
 
@charredgrass, need a hand?
 
nah dont worry, I probably just need coffee
like, the caffeinated kind, not coffeescript
 
@Doorknob 81? Holy crap.
 
3:30 AM
@DrGreenEggsandIronMan 82 it is.
 
Is anyone else having trouble with CloudFlare / PPCG?
 
network graph looks relatively normal, maybe it's local-to-you-cloudflare-problems?
 
Nah, even more local. I had PPCG's IP hardcoded in my hosts file.
Lots of DNS issues.
 
@HelkaHomba Working atm, sorry
 
@Dennis Didn't they migrate from CloudFlare to Fastly or something?
 
3:42 AM
Maybe. That would certainly explain the problems, as the IP I had in mt hosts file was probably CloudFlare's.
 
the advertising agency I'm interning at just charged a client $200 for my "Html set up production" aka me messing with html code
 
Jun 6 at 23:48, by Quill
Stack Overflow and Stack Exchange have now moved to Fastly. If you see any issues, please let us know.
 
@Quill 10/10 maps
 
Do I win an award for the "most unnecessarily longest regex to do a simple task"? (?:P(?:h(?:one)*)*)*(?:N(?:umber)*)*[ ]*([\d\-]+)
 
Jul 8 at 0:24, by Downgoat
>:| You're a malformed token!
 
3:47 AM
@Downgoat glad I'm not the only one who talks back to their error messages
 
@Quill what why that's horrible. Why would a code reviewer like u do that D:? Though im sure it can be golfed
 
For a good time call ^/(.*\d.*){10,}$/
 
@Downgoat just because I review code, doesn't mean I'm naturally great at writing it
 
@Quill PhoneonehonehoneoneonePPhhhhoneonehonePNNNumberumberumberNumberNNN -0345-1212----235-34210919--
 
3:58 AM
@Quill [ ]->` *`
 
string.replace(/[^x\d\+ \-\(\)\#]+/g, '').replace(/(-{2,})/g, '').trim()
 

« first day (1990 days earlier)      last day (1195 days later) »