« first day (2349 days earlier)      last day (2497 days later) » 

5:00 PM
@Adám Why do we need mods if we have computers like Dennis?
 
oh great now i'm out-golfed by cjam
 
@EriktheOutgolfer What's the policy on questions that need to be closed? Fix them first, and then close?
 
you don't aim to close you aim to fix
you only close if you can't easily fix or it takes time or something like that
 
@EriktheOutgolfer So it's a poorly written dupe, then what? :P
 
5:01 PM
meanwhile jelly is sitting at the top with half the amount of bytes o0
 
@StepHen then it's a dupe that's unfixable
 
@totallyhuman Makes sense, twice as many chars = half as much code
 
> Don't polish turds!
 
That Jelly answer is really clever though
 
Jeff Atwood
 
5:02 PM
@EriktheOutgolfer So if there is a dupe with missing code-golf tag, should I tag it code-golf before dupe hammering it?
 
yes because that's a case where you would use your dupe hammer validly
 
@EriktheOutgolfer But then you're polishing a turd because you're fixing it a bit by adding a missing tag
 
@BusinessCat huh? when I read it I just wonder why I didn't think of it...
 
Can anyone give me some (possibly final) feedback on this: codegolf.meta.stackexchange.com/questions/2140/…? I know I should leave it longer in the sandbox, but I do not know if I will be able to spend a lot of time on PPCG the days to follow, and hence want to post it today. Additionally, PeterTaylor and Shaggy have seen it, so I am pretty confident it is ok.
 
@EriktheOutgolfer OK, if there is a KC dupe missing its KC tag, should I tag it KC before CV it?
 
5:03 PM
basically you put the tag in so that your hammer works
that is, well, not really turd polishing
 
@EriktheOutgolfer Tag the turd so you can step on it
 
i don't think you want to step in it
 
tag the turd so you can get rid of it in a better way of course ;)
 
@Mr.Xcoder I don't get it. How is that any different from determining which list of ints≤9 has a higher average, albeit with an awkward input format?
 
@Adám Integers lower than 9?! You have to handle 993826789 for example.
All the ints ≤ 9 have the densities equal to themselves.
 
5:07 PM
@Mr.Xcoder 993826789 is just an awkward input format for [9,9,3,8,2,6,7,8,9].
 
@Adám You have to sum them and divide by their count.
 
umm...isn't that definition of average?
 
@Mr.Xcoder ^
 
So, sum(list(str(number)))/len(list(str(number)))
@EriktheOutgolfer What do you mean? Is it too trivial?
 
@Mr.Xcoder It is a mixture of two unrelated challenges, find the avg, and compare two numbers. Both are trivial and probably dupes.
 
5:08 PM
imo it's just cmp(average(base(x, 10)), average(base(y, 10)))
 
@Mr.Xcoder At a minimum you way overcomplicated it
 
@EriktheOutgolfer IMO, it's just cmp(average(x), average(base(y)) with a very strange input format.
 
Simplified: Compare the "average" of two numbers, and output 3 values for 3 cases.
@StepHen What in the world is overcomplicated?
 
@Mr.Xcoder too trivial imo
 
Not IMO
 
5:10 PM
@Mr.Xcoder make (something) more complicated than necessary.
 
@Mr.Xcoder Simplified: compare the average of two lists each given in the specific format of a single integer.
 
@StepHen With the comparison?
@Adám Yes, somehow
 
hard enough for it to be impossible in my language o0
 
@Mr.Xcoder -1 for awkward input format.
 
@Adám Awkward?!
 
5:11 PM
@Mr.Xcoder No, the challenge is what Adam said, and you're talking about densities and all that, stuff that isn't really relevant when you can use words like "average" to mean what you are trying to say
 
Ok, then, I'll do that.
 
*works on improving his language*
 
I simplify it
 
@Mr.Xcoder Yes, most challenges allow list input as lists or matrices or JSON or something normal like that.
 
@Adám JSON is more normal than an Integer? On which Earth?!
 
5:12 PM
@StepHen as lists
 
imo not really the best challenge it just combines base(x, 10) average and cmp...
 
OH I get it
 
@Mr.Xcoder I've seen lists written as JSON many times. I've never seen tiny-int lists stored as digits of a large int.
 
@Mr.Xcoder For the challenge, two lists of chars would be how people would want to take input.
 
@StepHen I'd want input as two lists of ints.
 
5:14 PM
^
 
Well, I now hate the phrase Missing value run
 
@Zacharý wut
 
@Zacharý Fortress?
 
@Adám Yeah.
 
Why are you messing with Fortress in the first place when Java is something that industry uses
 
5:16 PM
@StepHen Because Fortress is beautiful while Java is, well, Java.
2
 
@Adám But it's kinda hard to make a living writing Fortress, AFAIK
 
@StepHen There are other reasons to program than making a living.
 
Done, simplified. Can you please take a look?
 
I know, I'm just fooling around with it.
Why do people mess with Jelly? It's not used in industry.
 
If anyone can improve the introduction, feel free.
 
5:18 PM
All the Java hate :(
 
@Mr.Xcoder Why do you keep calling the inputs integers? Just call them lists, and in the I/O section specify that you may take the list as a single int. (Who would want to anyway?)
 
Okx
@Xanderhall I use Java whenever I'm not golfing.
 
On PPCG, it's because Java is notoriously bad for golfing.
 
@Okx Poor you.
 
Okx
Although I still use Java occasionally while golfing, iff it outgolfs python
 
5:19 PM
@Adám Oh, I forgot to update that part, editing now
 
Okx
@Adám What? Java's a great language if you give it a chance.
 
He's saying APL > Java.
Most likely.
 
@Okx APL is a great language even if you don't give it a chance.
 
Okx
biases
 
@Zacharý Java's bad for golfing?
 
5:21 PM
@Xanderhall It is very rare to see Java being the shortest.
 
Java is horrible at golfing.
 
No non-golfing language is gonna be the shortest
 
APL.
J.
PYTHON
 
@Zacharý Actually, Java may offer lots of opportunities to golf. It just won't compete in code length with other languages.
 
5:22 PM
I haven't seen GolfScript in years months
 
@Adám that
Java's fantastic to golf in, mostly because it's satisfying to shave off huge chunks of code
Whereas in something like Jelly you're shaving off a byte at a time
 
apl is great if you don't have to give your phone number and address for download for apparently no reason...
 
@Xanderhall As opposed to APL, where the obvious solution is often the shortest.
@EriktheOutgolfer You don't have to. There is an unregistered version.
 
I use linux
 
Java also got a lot better to golf in after the convention was set that lambdas are allowed
 
5:24 PM
also I need latest version for code golf
of course there's tio
 
This is the fortress program for APL iota I got to work (in ASCII): f(n)=array[\ZZ32\](n).fill(fn(x)=>x)
 
but what about stuff impossible in tio?
 
@Zacharý Monadic ?
@EriktheOutgolfer Like what?
 
file io, animation output etc
 
@Adám Monadic ⍳ on a scalar. IO=0
 
5:26 PM
file io is actually possible on tio
 
@EriktheOutgolfer File I/O is included on TIO's Dyalog APL. Animation? Like timing. I've used that on TIO.
 
internet access however...
 
@Adám what if I wanna see results after execution?
also by animation I mean text animation
 
@EriktheOutgolfer You don't have that in the stand-alone version either. Built-in graphics are only on Windows (so far).
@EriktheOutgolfer Ah, actually, you may be able to change text in-place in a terminal. Never done it though.
 
Quad SX?
(Can't remember what the name was)
 
5:29 PM
Are there any good references for changes in country borders over time?
 
@Adám escape codes to the rescue...?
 
That is, a single source where I can get this information
 
@Zacharý ⎕SM
 
Yeah ... don't use that though.
 
@EriktheOutgolfer Yeah, I've done challenges where I output escape codes. I can inspect them myself to see if they are correct, even if I can't actually see a real terminal.
@Zacharý ;-)
 
5:31 PM
@Adám and what about animation with sleeping in-between? total time isn't so reliable...
 
@EriktheOutgolfer I just replace ⎕← with function called ∆_ which outputs the desired output next to a time stamp.
 
@Adám Done now.
 
Why not
 
@Mr.Xcoder In principle you could screen scrape the Dyalog Linux binaries from TIO…
 
@Adám ?
 
5:33 PM
@Zacharý Because ∆_ preserves the number of characters.
 
Sorry, I meant . Stupid unicode look-alikes.
 
again same reason(?)
 
@Mr.Xcoder The entire Dyalog setup is on TIO, so you could cat all the files and copy-paste them into an editor, save, and you have Linux Dyalog APL for free (=stolen).
 
@Adám Why would you ping me? And why do we talk about APL, I don't even know APL
I was saying I'm done editing my sandbox post.
 
@Adám 128k limit
 
5:36 PM
@Mr.Xcoder I'm sorry I misunderstood. I thought it was a response to my msg.
@EriktheOutgolfer cat pieces. (gory!)
 
hmm...I love slicing cats for free especially if they're nuisance only
 
@EriktheOutgolfer You are too sadistic.
 
well there's the reward behind, I can't just refrain from it just for a few cats ;)
 
hey do any filesystems allow for commata to be in the file extension?
blah.,,,
 
5:38 PM
what?
they should
it's operating systems which may not allow them
 
oh ye my bad
 
@Christopher Sure, but what does it do?
 
Regarding cats, how do you make your computer literally pronounce "Meow"?
 
@Mr.Xcoder Stick it in a band saw.
 
5:40 PM
@Dennis explanation?
i already know how jelly works is magic but...
 
Yes, that's what I'm asking for.
 
@Adám I though about running a Mac Bash Terminal program: say "Meow"...
 
probably some weird a behavior
 
@Dennis yeah good point. Anyway you like my jelly code? — Christopher 11 mins ago
@EriktheOutgolfer Weird? Jelly? Never!
 
I mean, look 'ma, weird jelly!
 
5:42 PM
@Dennis No, not even the language itself is weird, no, never...
 
*goes to atoms page*
 
@EriktheOutgolfer "Shut up and eat it, son!"
 
probably vectorization stuff
 
m Modular; return every y th element of x. If y is zero, mirror: prepend x to its reverse.
 
(bleh who thought ldepth=0 was a good idea it should've implemented some special depth)
 
5:43 PM
a Logical AND. Vectorizes with depth 0.
g Greatest common divisor (GCD, HCF).
i Find the first index of element y in list x, or 0.
c Combinations; compute xCy.
 
and the c is the most complex
ninja'd :/
 
tfw you still don't get what it does
 
@totallyhuman That's me :/
 
guys it's so trivial
 
@EriktheOutgolfer we don't know jelly
:P
 
5:45 PM
sorry can't think in alternate universe
 
hmm there are alternate universes in the multiverse (if that's true) where people can't think
 
I'm just human why you expect me to teleport think?
 
ok lemme try and break it down
 
@totallyhuman The universe where Java is the best golfing language... I cannot think of it...
 
@Mr.Xcoder BLEEEEEH!
 
5:46 PM
all of them are dyads
 
yes true...
 
so where do m and c get the other argument from?
 
and then each dyad does something and passes the returned result to the next
@totallyhuman there's a little something in many golfing languages called implicit input (sorry I'm from other universe can't think into universe where nobody knows jelly :P)
 
oh ok
 
@EriktheOutgolfer I can't think into a universe where I know Jelly :P
 
5:49 PM
there are rumors that going into my universe is too hard or something?! :P
 
every_yth_element_of_x(input(), dunno)
 
@EriktheOutgolfer I could do it through a black hole (learn Pyth first)
 
where dunno is...
 
@totallyhuman magic!
 
input() of course what did you expect I just don't get it...
 
5:50 PM
@Mr.Xcoder no it's actually agic :P
 
people please! you're making fun of Jelly but you're gonna eat revenge
 
we've already eaten revenge from jelly :P
 
hi.. could someone help me please. I want to use discrete_log which is listed here docs.sympy.org/dev/modules/ntheory.html but it doesn't seem to exist in sympy 1.0. How can I access that discrete_log function?
 
update your software
 
use sympy <version that has discrete_log> :P
 
5:52 PM
@totallyhuman countless times actually
 
ooh i can make my message bigger
 
@totallyhuman I tried pip install sympy -U --pre
but that didn't help
@EriktheOutgolfer how do you upgrade to a dev version?
@totallyhuman how! :)
 
by using <these tags> apparently
 
@Lembik well...
 
makes my messages taller
:o both martin and dennis are on the starboard
is it going to explode?
 
5:54 PM
I don't see either
 
2 hours ago, by Martin Ender
you could have tried a bit harder with the tags ;)
 
those are trichoplax and mego
 
12 hours ago, by Dennis
I searched for Jelly, 4 bytes user:me.
 
do you have very tall resolution?
 
@EriktheOutgolfer no actually very small
 
5:55 PM
1366x768 neither of them are visible
 
are you in other rooms?
i have 1366x768 as well
 
that explains it
 
hmm...yeah I just clicked see more
 
whoops
 
uninstalling on linux breaks a lot of stuff
 
anything preinstalled with linux better stays there
 
@Downgoat yes I do :)
 
@totallyhuman Not all Linux distros come with Python 2 by default. Fedora 25 doesn't.
 
How should one read a list as input in Pyth?
 
6:04 PM
@Dennis ¯\_(ツ)_/¯ I ended up with Python 2 within minutes, perhaps as a dependency of some package I installed.
 
@Dennis ubuntu has a million dependents on python o0
 
Probably, yes.
It shows RedHat's efforts to finally make Python 2 obsolete though. Outside of code golf, there's really no excuse reason to use it anymore.
 
mm but that's hard to make happen
@totallyhuman weird sentence construction
 
It's a long process, but not really hard. All core packages of Fedora 25 have been ported to Python 3. It's only a matter of time before the rest falls in line.
 
Why do I like Fortress? ι(n)=array⟦ℤ32⟧(n).fill(fn(x)⇒x) or repl.it/JOy4/2, which one looks better?
 
6:11 PM
1
Q: Compare the averages of my lists

Mr. XcoderGetting the average of a list (e.g [2,6,7]) Get the length of the list: [2,6,7] -> 3 Sum the umbers in the list: 2 + 6 + 7 = 15. Divide the sum by their count: 15 / 3 = 5. You should compare the averages of two lists of positive integers N and M, by returning a value if N has a higher averag...

 
@Dennis Sadly Fedora isn't the only distro out there, you have those like CentOS which don't have Python 3.
 
Which is also RedHat, so I suspect it to gradually obsolete Python 2 in the next releases.
 
They don't even have Python 3 in the repos. Switching Python 2 to 3 would be a pretty huge change.
 
@Dennis Is there a reason it's taken nearly 10 years for this to start?
 
Don't ask me.
 
6:15 PM
the quine challenge on ppcg is under-specified
 
Question: is there native way to unzip (.zip file -> folder) in python?
 
is trailing whitespace allowed?
or wait... maybe i should check the standard quine rules
 
Output and code must match byte per byte.
 
11
Q: Write program which verifies Erdős–Straus conjecture

SomniumWrite program, which verifies Erdős–Straus conjecture. Program should take as input one integern (3 <= n <= 1 000 000) and print triple of integers satisfying identity 4/n = 1/x + 1/y + 1/z, 0 < x < y < z. Shortest code wins. Some examples: 3 => {1, 4, 12} 4 => {2, 3, 6} 5 => {2, 4, 20} 1009 =>...

 
@Dennis does this mean I should not write install script in python2 :|
 
6:18 PM
hmm then
the quine in common lisp out-golfs my golfing language?!
 
@Downgoat That's exactly what it means, yes.
 
is this a valid quine?
 
LOL.
 
@Dennis :/ well not everyone has python3 so brb writing in node.js :P
 
not everybody has node..?
 
6:20 PM
@Downgoat Writing Python code that runs in both isn't exactly difficult.
 
Just use parens, list() around some stuff, and a try-catch for input.
 
oh you need to deal with the imports as well
 
@totallyhuman I have a node app (VSL) which has a 'subapp' (vsl-bindgen) which is written in C++ so I want to have vsl bindgen install install & make vsl-bindgen which is where difficulty comes from. but anyway I can assume they already have node instaleld
 
from __future__ is the solution you seek...
 
also Python does not have package manager like NPM where you can do npm i and get all deps, which really sucks
 
6:22 PM
why not just make a function like this one?
def version():
    try:
        raw_input
        return 2
    except:
        return 3
of course it assumes you haven't set anything to raw_input
 
Quick question: can you theoretically do import * in Python, and if so, why don't people do that for golfing
 
@Zacharý well i need to also download & unzip a the download and those capabilities seem to be limit to python3
 
@StepHen no
 
@StepHen no throws syntax error
 
it's syntax error
 
6:24 PM
@Downgoat Sure it does. Don't you know pip?
 
@Dennis yea you have to do one by one
trying to automate and seem to overcomplicate if I am installing things here and there globally
 
I've attempted making code compatible with Python 0.9.1, Python 2, and Python 3.
 
is python 0 a thing? o_o
 
hmm... I think I am being really dumb. discrete_log says "Compute the discrete logarithm of a to the base b modulo n" So if n = 7 and we want the discrete log of 2**3 with the base of 2 shouldn't we get 3 ?
 
Python0.9.1 is found on a part of the python site that I can't remember...
Multiplication doesn't work ...
 
Question: does windows have make command or some way to execute makefile?
 
@Downgoat Not without MinGW or Cygwin
 
I use cygwin and it's really annoying
if can avoid it, please do
 
Although some programs come with their own make, it's still usually MinGW's make.
 
is there anyway to compile a C++ project then on windows?
 
6:28 PM
visual C++?
 
Microsoft's Visual C++ uses their own format iirc, and it's not Make.
@Downgoat Basically, download Visual Studio.
 
can you link me to relevent resource?
 
or use ubuntu in windows :)
which is what I also do
 
@Phoenix :O idea: precompile for windows
brb
 
6:29 PM
@Downgoat I've done that before.
 
@EriktheOutgolfer Why not sys.version_info.major?
 
@EriktheOutgolfer Eww. Try import sys; sys.version
Oh wow, ninja'd
 
Too straightforward.
 
@Downgoat Were you trying to ship software that users had to build themseleves..?
 
@DJMcMayhem you mean __import__('sys').version :P
 
6:30 PM
Eww
 
That doesn't work out well, especially not with C++
 
wait wtf __import__ is actually a thing O_O
 
Yeah, it is.
 
@DJMcMayhem import sys;lambda:int(sys.version[0])
 
hm they need clang installed though
 
6:31 PM
@Downgoat If you didn't know that was a thing, Why'd you recommend it?
 
@Downgoat Most people on Windows do not have clang.
 
I joke about __print__("python 123") and __init__ etc.
 
@Downgoat Isn't it?
 
You know what they need to do ... not use windows, honestly.
 
@Zacharý Fine. lambda:3+int(-1/2)
 
6:32 PM
:3
 
@Downgoat My Linux doesn't even have clang
 
@Downgoat __print__("foo") doesn't work
 
hi
 
Since Clang is a dependency, I can just add a clang.dll right?
question: does anyone know where dll go in window for an executable
 
Just made an unreasonably complicated question
It's in the sandbox
@Downgoat context
 
6:34 PM
docs say "GetSystemDirectory" but ;_; i don't have windows to see what that is
 
I realized that if someone from __future__ import s something before they run my interpreter ... it might break.
 
@Zacharý If you're gonna chose between Python 2 and Python 3, why pick Python 2
 
Never mind, I was just misremembering how I implemented it.
I didn't choose. I have compatibility between both.
 
@StepHen When you're golfing, it can make printing shorter by 1 byte
 
@ckjbgames *when writing an interpreter
 
6:36 PM
@StepHen oh. idk
 
And of course the big ones: mixing spaces and tabs, not having to put list(...) around every map, filter, and you have reduce.
 
0
A: Sandbox for Proposed Challenges

ckjbgamesMake a Quiz Parser code-golfparsing Your task is to create a program that will take an input of multiple 4-choice questions (A, B, C, D) in the format shown below, display each question (format also shown below) and its 4 answer choices, get the user's answer to each question, and, at the end of...

@Zacharý True.
 
@Downgoat You could bundle a Cmake installer and run it automatically if Cmake isn't detected.
 
Anyone know a codepage where the byte 00 encodes the character 0?
 
why..?
 
6:41 PM
1
A: Sandbox for Proposed Challenges

ckjbgamesMake a Quiz Parser code-golfparsing Your task is to create a program that will take an input of multiple 4-choice questions (A, B, C, D) in the format shown below, display each question (format also shown below) and its 4 answer choices, get the user's answer to each question, and, at the end of...

 
When golfing, yes pick Python 2 almost all the time. When writing real code I'd usually go for Python 3 but it's really up to preference
 
@Zacharý well for 8 bits ints that's how it is, right? but that's not what you're asking
 
*throws sand at NSP*
 
For the golfing language (MY). 00 pushes 0 to the stack.
 
@Zacharý What can I say, make your own codepage.
 
6:45 PM
@Zacharý Those can often be shortened with an [<expression with x> for x in spam] statement
@Zacharý what does 001 do, then?
 
@Zacharý Who would mix tabs and spaces in real code
@ckjbgames It's hexadecimal, 001 doesn't exist, it's 01
 
(HEX) 01 pushes 1.
 
Is it acceptable to post two answers in the same language if I outgolf my old answer in a completely different way?
Or should I simply edit away the old answer?
Or, add the new solution to the old answer?
 
@StepHen right
 
@musicman523 Yes
 
6:50 PM
@musicman523 All three work, I would suggest against the second though
 
No one really does it, but there isn't anything wrong with it.
 
I think I'll go with the third, thanks both of you
 
1
A: Sandbox for Proposed Challenges

ckjbgamesMake a Quiz Parser code-golfparsing Your task is to create a program that will take an input of multiple 4-choice questions (A, B, C, D) in the format shown below, display each question (format also shown below) and its 4 answer choices, get the user's answer to each question, and, at the end of...

Feedback?
 
This was the offending answer if you're interested
 
Glitched image time!
 
6:55 PM
0
A: Sandbox for Proposed Challenges

Step HenNinjas in a Chat Log code-golf (other tags?) Often in chat, someone will ask a question, and multiple people will answer it at the same time. Usually, the person who was beaten to the gun will say "ninja'd", creating even more unnecessary chat. Given a chat log similar to the following: Commu...

 
cool
 
Does this spam normally happen?
 
@Zacharý What spam?
 
Sandbox posts.
 
how is that spam?
 
6:57 PM
Well you aren't usually supposed to onebox your own Sandbox post twice within 30 minutes of your posting (in addition to NSP) but other than that it's normalish
 
Sorry... was combining both @ckjbgames and the New Sandbox Post feeds
 

« first day (2349 days earlier)      last day (2497 days later) »