« first day (2233 days earlier)      last day (2625 days later) » 

3:13 PM
Which value is uninitialized?
It all looks fine to me.
 
hi all
 
@NickClifford Try looking again ;)
Or have the compiler look for you.
I'm trying to make an ML compiler and realized one situation is really tricky.
If I have something like let x = (print_string "h"; []) in (3::x, true::x)
Then x has two different types, int list and bool list.
 
posted codegolf.stackexchange.com/questions/112649/… . Any quick comments very gladly received
 
But if I naively compile the whole expression for x twice, I get two prints, which is wrong.
So how do I do this...
Maybe I will just duplicate the expression for x since doing it correctly would be a ton of work and yet rarely used.
 
@ETHproductions Hi .. are you here?
 
3:24 PM
@Lembik Yes
 
@ETHproductions but then it becomes a fastest code challenge
and it has to run on my machine
 
Yes, that's the problem...
 
I have done a lot of those
but I was hoping to avoid it this time
 
Because it's possible to write a solution that's completely optimal, the challenge is basically a race to write the optimal solution
 
@ETHproductions well no because you won't output anything
 
3:26 PM
I'm not sure what you mean...
 
0
Q: Count how many output arrays are far from all other arrays

LembikLet P be a binary string of length n and T be a binary string of length 2n-1. We can compute the n Hamming distances between P and every n-length substring of T and put them into an array (or list). Now let's consider two such arrays of Hamming distances. Say x = (0, 2, 2, 3, 0) and y = (2, 1, ...

 
@Lembik Why won't it output anything?
 
Hmm, maybe a correct way to compile it would to replace all polymorphic expressions with an n-tuple containing the correct value for each of the n types the let binding is instantiated with.
 
sorry I have to dash
 
This could get very hairy if the let expression's type has multiple free variables...
Maybe instead I could do a hack where one instantiation is compiled with the functions that have external side effects included, and in the other ones those functions are replaced with no-ops.
 
3:47 PM
I should probably start actually posting bubblegum answers to kolmogorov questions... :-) (as CWs, don't worry) — Jan Dvorak 20 secs ago
 
@feersum I'm not sure what there is to see. The smaz_compress function is defined in a header and output and len are both defined.
 
@NickClifford output is defined?
 
>char* output = "";
Might need to refresh the page, since I just added the empty string bit.
 
That's rude to change the question without warning.
 
Whoops
Question still stands, though
 
4:00 PM
So now output is initialized, but to a value which is entirely inappropriate for how it appears to be used.
 
>`int smaz_compress(char *in, int inlen, char *out, int outlen);`
From the header file
 
With an unforgiving language like C, it's good to learn the basics before trying to use it.
You're not going to get a helpful and informative error when you make mistakes.
 
No kidding. Segmentation Fault is C's BSOD.
 
Learn about pointers, memory allocation, etc
 
Hmm, alright
I thought I understood pointers, but I guess not
 
4:08 PM
26
A: How should Community Wikis be used?

DennisCommunity wiki is not a rep waiver I've mentioned that from time to time in the past. Community wiki doesn't just mean that you cannot earn rep from a post. Yes, it does have that side effect, but the community wiki option is for posts that can be edited by anyone without worrying about post ow...

 
Seems appropriate -- it's an answer that involves no programming or other work.
 
The problem isn't getting rep from no-effort answers. The problem is that they shouldn't be upvoted in the first place.
 
The latter problem isn't actionable.
 
If anything, making it CW will attract more upvotes. A few undeserved internet points don't matter. What matters is that these posts shouldn't sit at the top.
 
Ah, I see, I just had to figure out memory allocation
 
4:17 PM
@Dennis I take it I should take credit for - and reap reputation by - feeding the question input into gzip? I can do that.
 
It's arguably more work than posting an answer that consists of a single built-in...
 
Do you have stats on how much CW vs. non-CW affects the vote count?
I could argue that answering with builtins is just as cw-worthy as a bubblegum answer.
 
It's just as undeserving of rep. I'm arguing that CW isn't a rep waiver and, at least in my opinion, shouldn't be used as one.
CW is meant to be used for answers that can be improved by the whole community. There's no room for improvement in a 1-byte answer, so CW doesn't serve its purpose.
 
there should be another answer category :P
 
@JanDvorak Hard to do. Most CW answers belong to very old or very popular questions.
 
4:24 PM
Let's do a randomized controlled trial.
 
is CW even being used for its intended purpose?
 
on some questions, yes
 
Yes, the Showcase of Languages is our most prominent CW thread.
 
@Mendeleev You don't need to ping me with every reply. As a matter of fact, I'd prefer it if you didn't ping me with every reply
Unless you are replying much later like I am
 
4:48 PM
Could someone answer the newest question? I have so much I want to do but I can't answer because I was the most recent answerer.
11
Q: Answer-Chaining - Positive divisors of a number

Mr. XcoderThis an open answer-chaining challenge, so your answer depends on the one before yours. Task: Print all the positive divisors of a number x taken as input. Input: A single number x which is the number (in base 10) whose positive divisors should be computed. Output: All the positive divi...

 
5:00 PM
@WheatWizard I'll look into it later today. I'm not positive I'll be able to answer it, but I'll definitely try
 
Thanks
 
But if I have leftover edits, I'll remove brackets. :P
(jk of course)
 
5:12 PM
@WheatWizard I probably won't have the language that I was planning to do done before the bounty expires, just FYI
 
Ok, too bad. I was hoping to see it before the bounty expired. You still have 2 days though so GL. And if its really good I might start another bounty
 
thanks! rn I'm doing some research for the program
 
5:37 PM
@WheatWizard I might have a go at your challenge.
IDK if it will be done in time. What's the bounty grace period?
 
24 hours
 
yeah I strongly doubt my ability to come up with anthing good within the next 2 days or so
Got an exam on Tuesday as well.
 
good luck!
 
6:26 PM
@WheatWizard What's with all the s?
What character are they?
 
What s?
 
On my screen, there is a box there
Can you see this character?: ""
 
Oh its a carriage return
It doesn't appear for me
its just a special type of whitespace
 
Ah, got it
 
it doesnt appear for me too, googling it shows "?"
 
6:29 PM
Why does your del|m|t answer have so many at the beginning?
 
Thats the code.
 
@betseg Vim shows it as "^O"
 
I used carriage returns because the question says they don't count towards the difference
 
Ah, got it
 
They are delimited by spaces
 
6:30 PM
That makes it easy, I guess
It confused me, because you added so many
 
just noticed that command<C-O> in a terminal runs the command
 
Newlines count as whitespace, yes?
 
> In computer science, white space is any character or series of characters that represent horizontal or vertical space in typography.
so, yeah
 
What is the zero-width word joiner then?
 
6:50 PM
Question: does this or this design look better?
(just talking about icon colors)
 
blue star is strange
 
I like the first link's colors (yellow star) better
But you should line up the icons with the left
 
does purple fork look weird?
 
@Downgoat That logo...
 
I think it is probably fine
 
6:52 PM
But I like the second one better
 
I think information density might be too much
 
I meant the first one
 
Should it be "0 <star icon>", or should I keep it the way it is now ("<star icon> 0")
0 being the number of stars
 
I would put it 0 <star> because that way the stars will line up, even if the numbers are different sizes
 
ok, good idea
 
6:57 PM
Apparently, Befunge-98 treats carriage returns as reflectors
But normal Befunge doesn't
 
@Downgoat I think it would be better if you give more importance to the name of the repo than the person who owns it
 
@KritixiLithos hm, ok, will fix
 
Hm, this could mean you won't see the username (only avatar) if repo name is really long, is that OK?
 
Possibly tap on icon to see author
I think it's fine
 
7:05 PM
Or to keep it constant, why not remove the username totally, so that only the avatar and repo name will be visible. And ^^
 
@MistahFiggins oh, that is good idea too
 
About two weeks ago someone introduced me to the [code-bowling] tag and I was pretty intrigued but I was sad to see that almost all of the code-bowling challenges that had been proposed had been closed for various reasons.

Typically these reasons were because the post was too broad, allows for almost every answer to be ∞ bytes, lacked a clear scoring system, had unenforceable/vague rules, etc.

I'd like there to be more code-bowling challenges on CG but it seems that there are very few resources for how rules should be defined in a systematic manner, what style challenges should be propose
 
0
Q: Code Bowling Index

Albert Renshaw Author's note: This is a meta post tagged with discussion. The goal of this post it to create a community-wiki for Code-Bowling. Please post suggestions / concerns as answers and feel free to utilize the comments section on this post as well as on answers to discuss the topics at hand. (For ex...

6
 
how he pronounces nitrogen bugs me
or soft gs in general
 
hi all
operation rescue-question starting :)
 
worst idea of the day: #define in java
 
That is an excellent idea, what are you talking about?
 
>_> I told him about my new language which is basically ^^
 
7:43 PM
hi @ETHproductions
are you about?
 
No, it would totally be awesome.
 
Okay, made some tweaks to repo view, hopefully looks good
 
Yeah, looks good.
Still a lot of empty space on the bottom
 
Some I'm not a fan of all those screenshot oneboxes
 
7:46 PM
@Riker this is good idea, but make sure to make it new MacroFactory(new MacroTypeFactory().getMacroTypeFactoryFromString().newMacro("define")).setName("‌​MAIN").setValue("public static void main")
@ГригорийПерельман yeah, will replace with README
 
how do you search for everything said by a person?
it seems you can search for something specific said by a person in chat
 
Anyone have the link to Starman's TNB Data Explorer?
 
but how do you search for everything?
 
@Lembik I believe you'll have to use the TNB Data explorer
 
I have no idea what that is :(
 
7:49 PM
SQL
 
@Downgoat Maybe 1 watching instead of 1 watchers (not worried about the s btw)
 
it's an sql client that searches TNB messages
 
@KritixiLithos oh good idea, screw pluralization
 
I just want to see something ETHproductions wrote to me
 
@Lembik oh
go to ETHProduction's chat profile
 
7:50 PM
> Chat ID
 
thanks!
@Downgoat hmm.. does that only give me one page?
 
looks like it :(
 
@Lembik add &page=2 to end of url to go to page 2
 
also @Lembik was it a reply/ping to you? then you can try chat.stackexchange.com/…
chat search for "@Lembik" by ETH
 
7:53 PM
sadly I don't think he/she added @lembik every time
 
0
A: Sandbox for Proposed Challenges

LiamMonitor your ARP table This is code-golf The Address Resolution Protocol is used to associate IP addresses on the local network with hardware addresses (aka MAC addresses). In its most basic form, ARP can be very insecure in the sense that your computer will believe anyone on the local network ...

 
ok here is my new improved question codegolf.stackexchange.com/q/112649/9206
please take a look
any upvotes hugely appreciated :) I fear the negative numbers
 
Is there a way to filter pull requests on GitHub by if they were merged or rejected?
 
I'm sorry, asking for upvotes simply doesn't fly here on SE...
 
@JanDvorak I completely understand. I wasn't being serious but I still won't do it again. I was just joking about how sad negative scores make me
 
8:02 PM
i feel like this might be a dup: codegolf.stackexchange.com/q/112663/31343
but can't find anything
 
@JanDvorak but I would hugely appreciated detailed comments on the question
I have tried to make it clear
 
1
Q: Random substring generator

ashGenerate random substring of length k from a given string with equal probability. For example, string tree has 7 substrings with length of two, tr, te, ee, rt, et, re, er. The function should return any one of them with the probability of 1/7

 
8:21 PM
@flawr r/MURICA
some language
 
I hope people reread my question now it is fixed.
Or maybe I should delete it and repost?
 
I feel like this website uses Material Design really, really well
 
user image
9
@Mendeleev yeah
 
@Riker similarfor switzerland: /r/BUENZLI
 
@Riker that cursor
 
8:46 PM
@flawr you know haskell right?
 
@ConorO'Brien A little bit, yes.
 
@fergusq or for num in {1..5}; do ...; done
 
ok, so I'm just learning haskell, and am trying to reverse the input. I have the following, but this adds quotes. I tried print, putStr, etc. instead, but none have worked. What might I use instead?
f s = reverse s
main = interact (show . f)
 
Hm I'm a bit rusty, let me check.
 
@ConorO'Brien Hint: what does showing a string do?
 
8:53 PM
@JanDvorak it outputs the representation of a string
 
What is the string representation of a string?
 
a string?
oh
oh ok
interact outputs for you, lol
 
interact :: (String -> String) -> IO()
 
@ConorO'Brien this?
 
putStr is the most basic one - just string -> IO(), and print = putStr.show
 
8:58 PM
And yes, the show is not necesssary as you already get a string from reverse
f = reverse
main = interact (unlines. map f . lines)
 
ohhh ok
thanks @Jan @flawr
 
does anyone know a faster way to get a permutation of 1..n than fisher yates?
it doesn't have to be perfect, i'm just using it to statistically simulate an algortihm
 
@Maltysen Isn't fisher yates O(n)?
 
->x{x}, AKA :itself.to_proc
 
@flawr yeah, but doesn't need to be asymptotically faster
maybe something without as many rand() calls or something
 
9:00 PM
Ah well rand() is usually quite slow, why don't you just implement your own rand?
 
You could try computing the rand(n!)-th permutation
 
is linear congruential good enough?
@JanDvorak hmm?
 
@Maltysen Depends on what you want....
 
true... I'm just simulating an algo to get expected storage use
and shuffling it to get kinda the input for each run
 
I think then it should be sufficient.
@ConorO'Brien You could also use getLine instead.
 
9:43 PM
>>> print(a + b + " = " + c)
ab = 0
>>> exec(a + b + " = " + c)
>>> print(exec(a + b))
None
am i doing something wrong?
 
exec does the thing and outputs None, same as print
 
oh
 
@Betseg your profile image
That is a crime
 
lol
 
-1
Q: How to rotate a matrix clock-wise in place by ninety degrees

the_proleI asked this question in both the SO and Comp Sci stack exchanges and got shot down for being too open ended in the former, and not using pseudo code in the latter. Hopefully this is the right exchange! So the question is: Given an NxN matrix represented by nested arrays, write a method w...

 
10:01 PM
@Newmainposts i edited it to make it a real challenge if the edit is accepted that would be enough to reopen i think
 
@DownChristopher Then it would be closed as duplicate instead of off-topic.
 
@ГригорийПерельман Little better
 
What if I can polish them into a gem?
 
Feel free to, but this one isn't salvageable.
 
10:08 PM
:P I tried my best. I am trying to make it look a little better so if it is found by google or something it would look better on the community
 
reddit.com/r/SubredditSimulator/comments/5ys067/… oh shit shut r/SubredditSimulator down
 
@betseg I can't access reddit, what is it?
 
Funny stuff
 
Top Democrat sent letter to president Donald Trump of violating the constitution
links to a screenshot of a tweet by Scott Dworkin
 
Who's Scott Dworkin?
 
10:14 PM
Guys wth this yt video only loads in 720p hd 60 fps... I have crap net
 
It's a subreddit that only bots can post. That bot posted "Top Democrat sent letter to president Donald Trump Of Violating The Constitution", with an image of Scott Dworkin's tweet about Trump's removal of Obama's heathcare
 
seems like the head of some democratic PAC
 
I know what /r/SS is
But that's pretty good.
 
@ГригорийПерельман :s
 
@DownChristopher first world problem...
 
10:17 PM
@JanDvorak I KNOW THIS IS A REAL PROBLEM please halp
 
Buy a smaller monitor
3
 
@DownChristopher tfw i can load 480p if im lucky ;_;
 
Is there a way to force it into 30 FPS? I want higher resolution but I don't particularly need the higher frame rate.
 
10:18 PM
Youtube+ can disable 60fps
 
The only resolution available is 720p hd 60fps so i can't change anything
 
Hm, I'll look into it.
 
@DownChristopher impressive, but the screenrip ruins it.
 
but yeah, videos from photorealistic games should definitely be in FullHD at least.
 
10:23 PM
@JanDvorak *Buys 7 inch 4K monitor*
 
@ГригорийПерельман it's called an iPad mini
 
Is it actually 4K?
I thought I was being satirical.
 
it certainly has way more DPI than is practical
Retina displays have so much screen resolution that the OS has to pretend to the apps it's only half as much, otherwise everything would be unuseably tiny
 
Yeah if i need a microscope to view pixels I CAN'T TELL THE DIFFERENCE IF THEY ARE EVEN SMALLER
 
10:29 PM
@JanDvorak But then what's the point of having so much screen resolution in the first place, if you're just going to display at half that?
 
The real trick is to have black and white pixels spaced about 10nm apart, a laser shining onto it and a really good GPU
 
@ГригорийПерельман the apps that know about retina have a special command to say "hey, stop pretending"
the UI is still positioned using 2x coordinates, but the render buffers are four times as big. Unless I'm inventing stuff incorrectly.
The UI components are still crisper on retina displays, even if their user app doesn't know that.
I tried looking at the wiki article but without success regarding the technology
> Apple introduced the 2012 MacBook Pro with a resolution of 2880×1800 or 5.2 megapixels - doubling the pixel density in both dimensions.[2] The laptop shipped with a version of OS X that provided support to scale the user interface twice as big as it has been previously been.
In other words, it just scales up the UI components twice as big.
 
Oh, I remember that! Apparently the GPU would thermal throttle even without needing to open any apps.
 
Sounds fun. I'd rather buy an actual hair dryer
 
10:45 PM
does anyone happen to have a repo on GitHub w/o a readme
 
0
A: Sandbox for Proposed Challenges

PhiNotPiQuandle Quandary Episode I: Identifying Finite Quandles Write a program that will determine if a given matrix represents a quandle. A quandle is a set equipped with a single (non-commutative, non-associative) operation ◃ which obeys the following axioms: The operation is closed, meaning that ...

 
Does the app work with different kinds of READMEs?
 
meaning?
 
README{,.md,.txt} etc
I've seen different kinds of README extensions on GitHub
 
do you have link to a readme.txt by any chance?
 
I don't think it cares about the extension, just that the name is readme
 
GitHub doesn't care, maybe the app does
 
Yeah, that's what I meant
 
10:55 PM
well it works
but it doesn't monospace
I think I can blame github for that though
 
Why?
All plain text files are monospace on GH
 
if it has no extension how do I know what it is?
 
No extension is plain text?
(or a binary)
But that one had an extension, .txt
 
Oh, I meant that GitHub's rendering API doesn't give me it back in monospace
 
Oh, it has a rendering API?
I did not know that.
 
10:57 PM
@quartata for example torvalds/linux has README but is markdown
 
@Downgoat That's not Markdown.
Oh wait
Yeah no it's RST
 
it is not rendered as monospace but it is a rich text format
 
Not sure what it's doing in there actually
Pretty much everything in there is plain text so that's actually somewhat strange
Let me take a look at the commit history
 
I googled readme.rst, this showed up, does this work on the app? github.com/jakubroztocil/httpie
 

« first day (2233 days earlier)      last day (2625 days later) »