« first day (2867 days earlier)      last day (2273 days later) » 
00:00 - 21:0021:00 - 00:00

21:01
not gonna bother looking whats wrong with the initializing code though
21:24
0
Q: Is code restricted to having to pass a linter a valid answer for golf?

trichoplaxIf someone answers a code-golf challenge in, for example, JavaScript, and as an additional challenge restricts to only code that is approved by http://www.jslint.com/ would that answer be acceptable? Would that count as insufficient effort at golfing, or would it be seen as a different language ...

21:52
@trichoplax I don't see anything about whitespace. I think that that point is critical to mention in your post
OK golfed too much - will retry... :)
Also, I'm totally on the fence on your question. I think that interpreters are critical for allowing people to "prove" that it works (or to prove that certain code doesn't work).
that said, if we set a bar of requiring an interpreter, then it might never happen
I really like the core idea of linter-golf (especially because it's a great alternative to people that want challenges that emphasize readable code)
ooh
thats a great idea
if you standardize which linters are okay for use
golfing languages are going to be out anyways so
I'm also on the fence, and keen to see what the community decides. It's a decision between allowing a 2 step proof or insisting on a 1 step proof
@quartata What kind of reasons might there be for excluding a linter?
@quartata If linter golf catches on then I'm sure someone will start writing golf-lang-linters...
@trichoplax im sure broken linters that dont do validation exist. the fundamental problem is that a linter can be broken and the code still work, which isnt true for a given interpreter
22:00
@NathanMerrill If the community requires an interpreter, at least that isn't a difficult thing to produce, and once one is written lots of people can use it to post answers...
to an extent. There are lots of options for many linters
why would you exclude for-loops (as suggested by jslint?)
@flawr Why would you insist on whitespace?
@flawr really?
do they recommend foreach
because foreach is so slow
It's just some arbitrary restrictions, but if someone finds them an interesting challenge then why not
22:02
I thought it was based on recommendations how to write nice code
Yes they do recommend foreach. JSLint is optimised for reading rather than running
There should totally be a speed-linter
"There are too many nested for-loops here"
@flawr This is their reasoning: jslint.com/help.html#for (or lack of it...)
"This language doesn't unwind tail-call recursion. Don't do it here"
it would be useful for interprwted languages
where structural things start to matter a bit more
22:05
I don't personally see the readability problem with for. Especially in JS, where foreach includes an extra function to read
ok the array-method reasoning makes sense as I think it is just less error prone
So I can't be off by one?
does JS-lint recommend a specific indentation, or simply a consistent indentation?
Specific spaces only indentation
so, you must indent by 4 or whatever? You can't indent everything by 2?
22:07
Including indenting ternary if over 5 lines
Must be by 4, must be spaces, must follow set rules of what indents and when
@trichoplax I agree
@NathanMerrill pep8 also does this
yeah, I'm considering posting an answer, but it'd be rather useful if there was a linter that allowed you to chose
I'd love to see pep8 golf
because you could say "You still have to golf within the bounds of the linter: those 2 extra spaces aren't actually necessary because X linter allows indentation by 2"
@trichoplax it is a hard ass
22:09
Makes it a good challenge...
@NathanMerrill If I was going to try linter-golf, I'd want to do it with all the default settings
You know...if linter + language becomes an interpreter, you could potentially use the linter behavior in the challenge itself
This is all secretly so I can write code postable on both PPCG and Code Review
2
like, if there's a source-layout that says something like "Your code cannot work if you rearrange it" or whatever, the linter would come in mighty handy
@NathanMerrill Is this a linter that corrects your code rather than just complaining about it?
oooh, yes there is! like Go!
22:12
And clang format for C
So you can post short code that doesn't work until the linter adds in the extra code for you...
i think there are some BASIC answers like this
The only BASIC trick I know like that is omitting the closing quotes
why aren't more languages doing that? I can already automatically get semicolons inserted, why aren't languages automatically inserting closing quotes and parenthesis?
thats TI-BASIC
22:14
yeah, and it's all been downhill from there
i think QBASIC is the one with like "autocomplete" for identifiers
wait, really? That's crazy.
its one of them
So if you mistype a variable name it'll use the closest it can find??
I assume it'll find the variable that starts with the name you typed
22:16
let me find the meta post
so if you have var networkCallAdapter = Something(), you can simply do network.call() or whatever
10
Q: How to count bytes in languages with autoformatters

DLoscIn QBasic, VBA, AppleScript, etc., there is an autoformatter that adds spaces and expands some syntactic sugar. For example, if I type this code: ?x*2 QBasic will expand it to PRINT x * 2 Should I count this code as 4 bytes or 11? Edit: Nathan Merrill brings up How to count bytes in macr...

the obvious question is "Why not just call it network in the first place :)
i think this is what i remembered
@quartata only a modified version
22:18
What do you mean, modified? My calculator absolutely did this
but I think it only works on ti 83 or so
yeah, that's what I had
im doing it right now on an 84
and I actually did it, because space was important back then
as far as I remember it doesnt' work on the 92 / 92+ / v200 / and the nspires
23:18
0
A: Sandbox for Proposed Challenges

QuintecSatisfying Rounding You know when you're in science class, and asked to round to 2 sig figs, but your answer is 5.2501...? You should round to 5.3, but that's just so unsatisfying! By rounding to 5.3, you're off by a whole 0.05, which is a large amount compared to 0.1 (the place value you're rou...

00:00 - 21:0021:00 - 00:00

« first day (2867 days earlier)      last day (2273 days later) »