« first day (1884 days earlier)      last day (2945 days later) » 

12:00 AM
Mathematica 10.1.0 for Linux x86 (64-bit)
Copyright 1988-2015 Wolfram Research, Inc.

In[1]:= DSolve[{h'[x] == 1/g'[x], g[x] h[x] == 1}, g[x], x]

DSolve::overdet:
   There are fewer dependent variables than equations, so the system is
    overdetermined.

                           1
Out[1]= DSolve[{h'[x] == -----, g[x] h[x] == 1}, g[x], x]
                         g'[x]
:(
(Note that f(x)=g'(x))
 
12:43 AM
0
Q: Code Golf: Open the book!

Oliver NiWrite a program or function that takes in a positive integer. If the integer is even, print _.-'\ _.-' \ ,-' \ ( \ \ \ \ \ \ \ \ \ \ _.-; \ \ _.-' : \ \,-' _.-' \( _.-' `--' If it is odd, ...

 
12:53 AM
0
Q: Code Golf: Happy Easter!

Oliver NiYour task is to print the following: _ _ _______ _ | | | | (_______) _ | | | |__ | | ____ ____ ____ _ _ _____ ____ ___| |_ ____ ____| | | __)| |/ _ | _ \| _ \| | | | | __...

1
Q: Code Golf: Mirror it!

Oliver NiMirror it! Your task: Given a piece of ascii-art, composed of only underscores, slashes, and pipelines, (_, /, \, |), mirror it upside-down. Example: ____ _____ | | | | | | | |____| |____ | | | | | | | | | | | | | |____ ...

 
1:20 AM
Hey, is anyone doing the HackerRank Lambda Calculi contest? I'm having a lot of fun with it, and you still have about 28 hours left to submit.
4
Granted, it's a language-restricted contest (you can only enter with a handful of FP languages), but if you are familiar with the permitted languages, it's quite a cool challenge.
 
@ChrisJester-Young I have an account there, and I know a bit of F#...
 
@Downgoat accidentally voted for chedar instead of scrython
 
@LegionMammal978 Do it. :-D
 
scrython I think is much better...
 
@Dennis Can you please pull 05AB1E?
 
1:34 AM
@NewMainPosts I've been meaning to post a meta post on these trivial kolmogorov complexity challenges where the only "difference" lies in what the output is
 
I don't get the problem
open System

[<EntryPoint>]
let main argv =
    for i = 1 to Int32.Parse(Console.ReadLine()) do
        printfn "%d" i
Doesn't compile
 
@quartata We already have that on meta
 
@AlexA. We do?
Oops
 
Yeah
 
der
What was the consensus?
 
1:36 AM
@quartata want to help test my chat bot in bbm
 
I have to eat but I'm sure downgoat will be your lab rat
 
@quartata s/rat/goat/
 
1:59 AM
@AandN Pulled.
Aaaand pulled.
 
2:15 AM
I just discovered that the first software I ever wrote (and released) is also the most used (3,086 users). I invested like 5 minutes in that thing.
It's a really crappy editor for BASIC, but the review makes this sound like the best thing ever :D
 
@mınxomaτ download?
 
@epicTCK What?
 
oh its the same website nvm
 
It won't work on modern Windows. It was designed for Windows versions with a 16bit Emulator (<=Win Vista (or Win7 with XP Mode).
 
@mınxomaτ oh ok
im on win10 rn
 
2:27 AM
g'night
 
2:40 AM
night
TIL QBasic is an acronym.
 
@EasterlyIrk It is? I thought it was just a stripped-down version of QuickBASIC.
 
Quick Beginners All purpose Symbolic Instruction Code
 
@ChrisJester-Young QBASIC != QuickBASIC
 
@mınxomaτ I did say QBasic is a stripped down version of QuickBASIC.
That implies the two are not equal.
 
oh wait
 
2:43 AM
Oh I thought stripped down was referring to the name.
 
you are the original mod dude @ChrisJester-Young?
 
For example, QuickBASIC programs can be compiled to .exes. QBasic programs cannot.
@EasterlyIrk Yes.
 
And the first human to chat in this room.
 
@EasterlyIrk Yes.
 
Yes.
Much wow.
 
2:45 AM
Lol. I also grabbed userid 3, because I wanted a low userid. :-P (I also have userid 13 on SO.)
 
woah
 
It's a pretty impressive feat for a civilian. (I didn't work for the company until 2015. I don't work there any more.)
 
Second existing userid.
 
Not counting community.
 
2:46 AM
Community is cheating.
 
Community isn't even a real user.
 
It's just a row in the Users table so that code-based processes can set UserId = -1 without breaking foreign keys. :-P
 
This poor user posted 3 questions in a row and all were met with downvotes.
 
@EasterlyIrk People need to learn to use the Sandbox, y'know?
 
2:49 AM
I'knows.
 
Considering that I recently dealt with someone on C.SE who asked 14 poorly-received questions in 10 days, I think the Sandbox is an amazing thing.
 
People post with thinking about it sometimes.
 
s/with/without/?
 
what's the term for taking a number and fitting it to a range?
 
How do you mean?
 
2:58 AM
@NathanMerrill I no understand.
 
like, if my range was 0-5, and my number was 6
then, it would return 5
but if my number was 3, then would return 3
 
Oh, clamping.
 
thanks
 
c.se == christianity.se ? true : code review? true: false;
nvm that wouldnt work
that was the stupidist bit of psudocode i have ever written
:P
@El'endiaStarman which one is c.se
 
....what other SE site do I talk about all the time?
 
3:00 AM
@epicTCK El'endia is a Christianity.SE mod.
 
yes thats what i assumed...
but hey assuming can really screw you up sometimes...
 
@Fatalize: It's drawn onto a canvas, so it's blurry if you zoom in
 
3:20 AM
given a list, partition the list, where partitions have a minimum size M, a maximum size N, and preferred size P.
and do it in O(N)
 
What's the point of M and N? Why wouldn't they just do it with partition size P?
 
@MyHamDJ Because what if the list is length PK + P/2, and P/2 is out of range of [M..N]?
 
say you have a list of size 7, and a preferred size of 5
 
(K is an arbitrary integer)
 
Are you given the length of the list as an input too?
or is len(l) acceptable?
 
3:24 AM
len() is fine
 
Is this for a challenge?
 
considering it
also, if your preferred chunk size was 6, its better to have two chunks of size 5, than a chunk of size 6 and one of size 4
 
What about inputs like len = 7, M = 4, N = 6, and P = 5?
As far as I can tell, that has no valid answer.
 
impossible
which is fine
 
So that doesn't have to be handled?
 
3:27 AM
What should the output be?
 
the chunkified list: [a,b,c,d,e,f,g], 3,4,5 -> [[a,b,c,d],[e,f,g]]
 
I meant for when the input is impossible
 
eh, -1?
empty list?
not sure
 
I think an empty list
 
Or, you could just say that invalid inputs won't be given. I think that makes challenge writing easier.
 
3:32 AM
@NathanMerrill Preferred can be larger than the maximum?
 
It is in that message
 
@ZachGates oh, I was ordering it min, preferred, max
 
Oh, okay; cool
@NathanMerrill Can they be equal? To either min or max
 
3:37 AM
What if I did [a,b,c,d,e,f,g, h], 3,4,5 -> [[a,b,c],[d,e,f,g,h]]
Is that an invalid output? How is that determined?
Or scored?
 
its wrong
 
How is that objectively determined?
 
you need to minimize the sum of the (partition size difference +1)^2
 
The difference between the smallest partition and the largest partition? so this would be a score of [2 + 1]^ 2 == 9?
 
no, the difference between partition and the preferred size
actually, it needs to be the average, not the sum
 
3:43 AM
Okay. So ([1 + 1] ^ 2 + [1 + 1] ^ 2) / 2 == 4?
 
yes, except that it needs to be average
so, it'd be 2
 
Can input be taken as [a,b,c,d], [3,4,5]?
 
That is the average.
 
oh, my bad
@ZachGates probably
 
sum (8) over num (2)
 
3:44 AM
I need to sleep, but I'll be posting it tomorrow
 
4:02 AM
12 candidates now, who dropped out?
Oh, muddyfish I think
 
Why did downgoat drop?
 
@NathanMerrill bai
 
@HelkaHomba muddyfish, Chris, Downgoat, Oliver Ni, VTC
 
I did a thing
0
A: Golfing Class of a language

Alex A.K-means clustering by code length My approach here was to get all answers to code golf challenges without bonuses that had (at least somewhat) appropriately formatted post headers, parse out the language name and byte count from the header, perform k-means clustering on the sizes with 6 groups, ...

 
4:12 AM
> a thing
s/a/an epic/
 
s/a epic/an epic/ :P
 
@AlexA. Labyrinth, Prelude, Fission, Brainfuck
 
@Sp3000 Yes?
 
@AlexA. C# is worse than Java? o_O
 
lol that's what happens when people only post answers when the task is short in that language
 
4:13 AM
true
 
Yeah
 
and where is lenguage? That should be dead last.
 
Any languages used fewer than 10 times on the site were excluded
 
@Sp3000 I thought the same. Minkolang is in class 1 as well, despite being longer than CJam (in general) for the same tasks.
 
Group 1 has a lot.
 
4:14 AM
lol the downvote
 
^
bai for the night guys
 
bai
 
Well I think if anything those stats tell us more about how people use the language than how concise the language actually is, which is interesting
 
@AlexA. Brainfuck is golfier than CJam? o_O
 
¯\_(ツ)_/¯
 
4:16 AM
@AlexA. Hmm. It probably would've been better to collect data on relative ordering, in the sense that you look at questions that have both (say) Minkolang and CJam answers, and compare their lengths then.
 
@El'endiaStarman
 
@El'endiaStarman I agree that would have been better. I spent way too much time on this as it is so chances are I won't do that though :P
 
@HelkaHomba ?
 
I think he was hoping it would autocomplete to
 
Oh, that would make sense.
 
4:20 AM
hahaha
 
@AlexA. Say, shouldn't you be exploding in glee or something since Bernie won Wash?
 
@HelkaHomba WOOO.
I disagree though: it's not so much that you were wrong, it's more like you didn't pick the best method, but that would've been hard to know beforehand.
 
Who's Bernie von Wash?
2
 
@HelkaHomba They declared him the winner with like 20% reporting! He's at 72% now with 96% reporting. A pretty ridiculous margin.
@El'endiaStarman I wonder if that's why it got a downvote.
@Dennis His full name is Bernard von Washingmachine
 
@AlexA. Which is great! Means more delegates.
 
4:23 AM
Yes!
 
@Dennis Also known as "Colonel" Sanders.
 
@AlexA. There is no way that Rust is in the same class as JS
 
¯\_(ツ)_/¯ Blame kmeans()
And my super shitty preprocessing
 
Have we tried an Elo-based scheme?
 
I think there's some bias here. I'd guess that languages with fewer occurrences are more niche-specific
and therefore, have a lower class
@PhiNotPi I just implemented an Elo system :P
 
4:27 AM
Maybe I could try weighting based on the number of posts in each language
Idk
 
I don't know how you account for that bias
 
@NathanMerrill For the KOTH thing?
 
@AlexA. I don't think that would solve anything. A 1000 byte answer to challenge A and a 10 byte answer to challenge B are simply not comparable.
 
Yeah
 
4:29 AM
Did you ever implement the maximize affirmed majorities scheme?
 
With random tiebreaker?
 
well, I initially did a random ordering for the tiebreaker
 
I think, we could look at language ranking by asking the question "given a random golf question, what is the expected percentile ranking of the language?"
 
but I realized that I could just use Random() instead
hmm, that wasn't very clear. For example, there are a couple of spots that use the random ballot
I scrapped the whole "random ballot", and anywhere that uses a ballot, simply call an RNG
 
4:32 AM
Or maybe... "what is the % chance the given language will win (or be in the top 3, or something)"
 
@NathanMerrill I think that's reasonable.
 
I think so too, and made my code much cleaner
 
@HelkaHomba Ha!
 
@NathanMerrill If you wanted, you could try it out on some real KOTH data, to see how much influence the rand() has. It shouldn't make a difference in almost all cases.
 
4:38 AM
@PhiNotPi Right now, I'm still coding under the vise of "everything works"
is that how you spell it?
vise?
 
Is it just me or is "first" way more proper than "1st" here?
 
I'd agree, and they even use "first" in the first 1st sentence. :P
 
"first" would be more formal than "1st" in that situation.
 
(so many news stories with bad writing >:|)
 
@NathanMerrill I suppose "vise" works, but it seems odd, and "vice" makes less sense.
 
4:41 AM
its not vise
its guise
 
ohhh, that works better
 
I think 1st would be okay if they abbreviated the rest of their title.
 
man, the new Java 8 stream stuff is epic:
List<Player> losers = scores.stream()
                        .map(Scoreboard::playerAggregates)
                        .map(i -> i.subList(winnerCount, i.size()))
                        .flatMap(Collection::stream).map(Pair::first)
                        .collect(Collectors.toList());
that used to be like, 8 lines of code
 
and now it's 5
 
and shorter lines
 
4:45 AM
What's the equivalent of .stream() in a language like Python or JS?
 
they do things differently?
python has a map() function, and uses list comprehension
 
Hmm. What does .stream() do?
 
its an interface mostly to allow parallel execution of tasks on elements in a collection
For example, if they had just put a map() function on Collection itself
then it would have to return a collection
which means lots and lots of putting things back and forth in collections
so, a stream simply is a set of objects going through a series of operations
does that make sense?
 
I guess it does. I think the thing I'm not getting is why it's so hard/tedious otherwise. I don't know Java, and I essentially "grew up" with Python (and Blitz 2D/3D), so I tend to see some capabilities of languages like Python as something all languages ought to have because it's just too hard otherwise.
 
well, python has amazing syntax.
so, java is just trying to play catchup
 
4:58 AM
That's basically what it seemed like to me. "Oh, these other languages have this awesome feature. Let's add it."
 
given, its under a different set of constraints, due to differences in the language, but each iteration provides better shorthands
oh, absolutely
I mean, I haven't heard of "streams" as an abstract concept (maybe C# uses them?)
but, as far as using java as a functional language (which is basically what streams does), its not a new concept at all
 
@Sp3000 I'm curious: Why 57>?
 
Just happened to give better results - trying b now though
 
5:54 AM
@ProgramFOX I'm surprised you aren't running in the election, considering you ran in the informal election last August.
 
@AlexA. Well, I saw that I actually didn't have any activity the past few months, so that's why I decided not to run now.
 
Ah, okay.
 
6:38 AM
 
Those are incredible
 
Wow, that was surprisingly good and not at all horrific.
Also TIL SUSE is not pronounced like "Suzie."
 
@ChrisJester-Young Ooh, I would if I was familiar in any of those languages, but I don't think I can finish Learn You a Haskell and submit in under 23 hours.
 
@AlexA. It's a German distro, so I'd pronounce it zoo-zeh.
 
6:50 AM
TIL SUSE is German
 
TIL people dont always star what they like
:(
 
Tell that to my Trump emojis.
@AlexA. SuSE initially stand for Software und System-Entwicklung (software and system development).
 
@Dennis TIL people dont always star what they like
 
haha
@Dennis TIL SuSE ... yeah you get it
 
Hm, I just noticed that this election is for only four moderator posts this round. I wanted to vote for most of the remaining 12, darn it :D
 
6:57 AM
Look, the highest-voted two answers here have score 128 and 64:
43
Q: Why are hex editors called binary editors?

Joseph A.Hex and binary are two different bases. Hex, in my understanding, is simply an easier to use version of binary and more convenient. However, I hear a lot that hex editors are binary editors. If you actually search for "binary editor" on Google, you get hex editors. Why is that? What is the conn...

Someone needs to upvote the third best answer to 32 :P
 
7:29 AM
Hello
 
Hello
 
 
1 hour later…
8:34 AM
Thanks anonymous bold text
:P
 
stop doing that
 
Just spent a solid 4 hours fixing my Mac which had no reason to stop working...
 
8:53 AM
@LegionMammal978 I wanted to emphasize the equality as functions, that measn the the function you get on the right hand side is always constant.
@El'endiaStarman Nope, I really have no clue, I just came up with this while doing something totally unrelated=)
@Dennis Are you sure?
I just thought about choosing f(x) = e^(x) which would work for LHS = -1.
 
@flawr OH if we allowe complex functions then f(x) = e^(i*x) is a solution!
 
9:14 AM
anyone here know C?
 
a bit
 
int a = 2;
int b = a || 3;
is that correct?
 
I do not think so
 
how do I use OR in variable assignments?
 
Well you're applying OR to integers, what do you expect?
 
9:17 AM
int a = 2;
 
that's JS
:D
 
If both are booleans that would be ok
 
I don't think that C allows that..
i might be wrong as long time no C
 
@Optimizer Actually js is var a = 2
 
int *p1 = &a;
int *p2 = NULL;

int *p3 = p1 || p2;
 
9:18 AM
@Solver oh please. you know what i meant
 
@Optimizer :D
 
@JesterTran Why the hell do you want to OR integers???
 
I'm allergic to C.
 
It's a common golfing mechanism
 
@flawr I gave you new code
 
9:19 AM
I use it a lot in Python and Pyth
 
@isaacg allergy to C?
can't agree more.
 
ORing integers
 
@JesterTran I just want to know why you would want to do this.
 
@flawr To golf!
 
@flawr Do u know what I'm doing?
 
9:21 AM
Nope, that is what I'm asking.
 
ven
hey
 
@isaacg But you cannot use OR on integers in C.
 
ven
@JesterTran no
 
That's too bad then.
 
What do you expect from a fucntion that is not defined??
 
9:21 AM
int a = 2;
int *p1 = &a;
int *p2 = NULL;

int *p3 = p1 || p2;
I mean
int *p3 = p2 || p1;
 
As always, why do you want to OR numbers? That will not work even with pointers.
OR is defined as a function taking two booleans!
sigh
 
I've found myself answer elsewhere, thanks
 
An answer other than mine?
 
ven
C's or is bool-correct
 
@flawr It's a perfectly nice function, I don't know what you're talking about
|| is defined for ints.
 
9:25 AM
What are your favourite languages, anyway?
Mine is JS
 
Pyth
 
@Solver German!
 
ven
APL best
Which reminds le... I have an answer to post
 
9:42 AM
@flawr :)
 
 
1 hour later…
11:06 AM
12
A: Square root function in F#

Jon SkeetF# already has a sqrt function defined, so you should just be able to use: sqrt x where x is the value you wish to find the root of.

Wait, since when did Jon Skeet know F#?
 
Probably learnt it in the 3 minutes between the question being posted and Jon Skeet posting the response
2
 
^
I guess that's what I get for questioning Jon Skeet
 
@Dennis Thanks :)
 
Two edits to make that link work.
 
ven
11:56 AM
mmh, can I request the help from some experienced APLer? trying to generate some indices
 
The JVM class file format's magic number is 0xCAFEBABE
Is it just me, or does that spell "café babe"?
 
@LegionMammal978 The latter.
 
Somebody must have been having fun...
 
> 0xCAFEBABE ("cafe babe") is used by Plan 9's libc as a poison value for memory pools. It is also used by Mach-O to identify Universal object files, and by the Java programming language to identify Java bytecode class files. It was originally created by NeXTSTEP developers as a reference to the baristas at Peet's Coffee & Tea.
Yeah, was working on a big list of magic numbers for different file formats
7z:	37 7A BC AF 27 1C	(7z..'.)	@ 000000
class:	CA FE BA BE		(....)		@ 000000
ELF:	7F 45 4C 46		(.ELF)		@ 000000
GZIP:	1F 8B			(..)		@ 000000
MZ:	4D 5A			(MZ)		@ 000000
PE:	50 45 00 00		(PE..)		@ 00003C
tar:	75 73 74 61 72		(ustar)		@ 000101
ZIP:	50 4B			(PK)		@ 000000
(Sorry if the tabs don't render correctly)
 
12:06 PM
Er... I do remember there being one of those lists on the internet already
 
Where?
 
Since people need it for file forensics
 
Well, I couldn't find one expansive enough
 
Look up "file signature"
 
12:07 PM
Just looking at that
 
ven
@zyabin101 The latte*
 
Oh well, I've been stupid before ;p
 
@ven lol
0x90A7 means "goat" in Hexspeak.
Now to get "down" and "chat" to Hexspeak...
 
ven
0x9047 :P
 
12:54 PM
@zyabin101 Lol, the program I just wrote says that it's 0xCCAC (GOAt)
 
@LegionMammal978 Get "down" and "chat" to Hexspeak using your program.
I bet it will be DCCC and CCAC.
 
1:09 PM
@ChrisJester-Young I'd totally be up for that if I knew more than a bit of very basic Haskell and had more than 17 hours left ;)
 
@zyabin101 Too bad, deleted it already
 
1:49 PM
Test
 
@LegionMammal978 Test what?
 
Trying to make my chatbot work
It doesn't, currently
 
!help
Maybe we can continue testing your chatbot in Beep Boop Maggot?
 
@AlexA. regarding the programming language classification, your Gist isn't public.
 
2:25 PM
@PhiNotPi Which gist?
 
The one at the bottom of this post: meta.codegolf.stackexchange.com/a/8802/2867
Commenting on it probably would have been more effective than a chat ping.
 
I got bored, and am now writing a C# interpreter for this
 
2:40 PM
@flawr If the LHS is positive, f is continuous and defined on a non-degenerate, real interval, yes.
 
0
Q: Code Golf: Is it a palindrome?

Oliver NiWrite a program or function that takes in a string. If the string is a palindrome, return true. Otherwise, return false. A palindrome is a sequence of characters that is the same when it is read forward or backwards. Spaces and punctuation do not count in the sequence. For example, racecar an...

 
1FL
 

« first day (1884 days earlier)      last day (2945 days later) »