« first day (1311 days earlier)      last day (3523 days later) » 
00:00 - 18:0018:00 - 00:00

6:04 PM
@MartinBüttner I started working on it but I forgot to commit so I haven't made any progress at home.
 
6:20 PM
@Rainbolt k... so far I couldn't be bothered yet to start work on the controller... but the day has a few more hours...
 
Ruler golem :)
 
@hobbs levenshtein distance way too large :P
 
Anyone have any better ideas?
 
I'll let you know when I do
Looks like I lost my shot at this one: codegolf.stackexchange.com/a/37136/8478 ... but would anyone like to help me figure out where I went wrong (and subsequently post the correct key)?
The denominator in d and e can be an integer in the range [2,51], giving 50 independent values for each of them.
 
Catalan Sequence and Catalan Ship. kinda a stretch
 
6:34 PM
The denominator in f can be anything, but for sufficiently large atan2, f won't differ by a significant amount of digits. so I picked an integer range [-400,400] for the denominator.
Then I converted each of these integer ranges into a double range (using 180-360.0/n) and just applied his final four lines (translated to mathematica) to the outer product of the three resulting lists.
 
What was your mathematica translation of his code?
 
this pure function:
If[Abs[# + #2 + #3 - 360] < .1,
  FromDigits[(ToString /@ IntegerPart[{##}]) <> ""], 1] &
basically, this was my script for getting the final result:
d = 180. - 360/Range[2, 51];
e = 180. - 360/Range[2, 51];
f = 180. - 360/DeleteCases[Range[-398, 401], 0];
Length@Union@Flatten@Outer[If[Abs[# + #2 + #3 - 360] < .1,
      FromDigits[(ToString /@ IntegerPart[{##}]) <> ""], 1] &, d, e,
    f]
 
this seems like something brute-forcable
 
I think the only mistake I could have made is in the parameters to Range
 
user55340
I know some people like writing code contests... stumbled across one that I've poked at before but didn't do anything with... Arithmetical Croquet based on a game invented by Lewis Carroll.
 
6:39 PM
Well, @MartinBüttner , despite your efforts, the search party question seems dead
 
@EricTressler yup :(
(as does Domino Circuits)
 
I had several other ideas for questions, but not sure whether I should post any of them now
 
although the latter is certainly more understandable
 
In Java, does Math.sin() use degrees by default?
 
that would be horrible
 
user55340
> Parameters:
a - an angle, in radians.
 
okay
 
If it were in degrees, Math.sin(a * 60) would only give 3 possible values.
 
user55340
of note, there's a toDegrees(double angrad) and a toRadians(double angdeg) functions in Math
 
6:42 PM
@PhiNotPi yes, but it's not, so I think 2^32 different values should get me all the 50 possible integers at some point
 
if a is an integer, then it would give 5 possible values
 
@EricTressler it is
 
oh
nevermind, 3 is correct; I was thinking of 45 in there, not 60.
 
yeah
okay, so I guess my assumption for atan2 must be wrong?
 
I have satellite internet here, and something on Steam auto-updated and killed my quota, and now my internet is capped at like 6 kbps
what was your assumption
 
6:45 PM
"The denominator in f can be anything, but for sufficiently large atan2, f won't differ by a significant amount of digits. so I picked an integer range [-400,400] for the denominator."
 
I think it can be anything, but why let it vary outside of [-pi/2,pi/2]?
 
oh
atan
lol
 
oh, god. i need caffeine
 
I was thinking tan for some reason (which doesn't make sense for two outputs whatsoever)
but it should vary in [-pi,pi]
okay, that should make things a bit simpler
 
for atan2, the input is anything, and the output is in (-pi/2,pi/2), i think
 
6:48 PM
@EricTressler definitely, -pi to pi
you need a 2pi range
(and I looked up which range it is in the java docs)
okay, that gives me an integer range of [-158,162] ... doesn't change my result of 121
 
i was thinking of the c++ version
also apparently atan, not atan2
I forgot, atan2 is the nice one
 
ah yes
okay, so the only things that could be wrong: 1) my mathematica implementation of his java code 2) the assumption that every integer in those ranges will be hit
 
the arctangent function has range [-pi/2,pi/2], but atan2 automatically deals with the quadrants and gives you the right quadrant as well
 
oooohhh
 
what are you working on?
 
6:52 PM
assumption 2 is wrong
since atan2 uses a as x, not every combination of d and f will be hit.
for positive a you can't get |atan2| > pi/2
the opposite for negative a
for a = 0, there are only two values of f
 
hm. interesting
I kind of want to try cracking the one posted by @COTO
 
@EricTressler it looks like some mad recursive function
I've added a fully indented version in the comments
 
I saw that, but I don't even understand the code yet
I mean, syntactically
what is function z(y,_,$) ? Is $ a regular variable name, or does it have some other significance in JS
 
no, $ and _ are valid variable names
it's just the function taking the integers and returning some other integer
 
alright
 
7:03 PM
actually, I don't think my assumption was wrong
positive a do limit the possible values of f but they don't limit the possible values of d
 
7:27 PM
well, I can't crack this (at least, it's evident that it would take hours of work, if it's even possible), but I thought of a good idea for a submission
 
0
A: Sandbox for Proposed Challenges

PhiNotPiWhat's Average Anyways? code-golf When people use the term "average," they generally mean the arithmetic mean, which is the sum of the numbers divided by the number of numbers. There are, however, many more meanings to the word "mean," including the harmonic mean, the geometric mean, the arith...

 
7:48 PM
Hey guys. We've got a question on Code Review that no one really know how to review. We don't see much . I thought maybe there's an expert here who might like to take a crack at it.
24
Q: FizzBuzz in Brainfuck

Simon André ForsbergInspired a bit by a previous Brainfuck question and the recent fizzbuzz invasion, I decided to make FizzBuzz in Brainfuck. The code is entirely my own, except for the inclusion of the Printing a number algorithm that I found on StackOverflow. My code is divided into several parts. Setup Const...

 
@RubberDuck I'm sure there's a lot of people here who could take a look.
 
@NewSandboxedPosts @PhiNotPi sounds like just the challenge for Mathematica :)
 
@MartinBüttner The answers will probably be pretty short in any language.
 
yeah I have no illusions that mathematica would win this, but it should be fun to write
 
8:07 PM
I'm sure OP would appreciate it @PhiNotPi.
 
8:22 PM
I sort of want to write something in Shakespeare and post it on codereview. But I suppose that's trolling
 
8:35 PM
I wish I knew how to tell what assembly language my computer uses.
 
why do you want to program in assembly in the first place?
 
For fun of course
 
To the extent your question makes sense, you're probably using an x86 chip and so you could use x86 assembly
 
Ah, but how can I find that?
(for future reference)
I know that my processor is an intel processor...
 
It just refers to your CPU's instruction set
 
8:43 PM
Okay, so how can I find my CPU's instruction set?
 
Google?
AMD and Intel both manufacture chips that use the x86 instruction set, so you'd want to use x86 assembly
The x86 instruction set has been extended several times, introducing wider registers and datatypes as well as new functionality == x86 integer instructions == This is the full 8086/8088 instruction set, most, if not all of these instructions are available in 32-bit mode, they just operate on 32-bit registers (eax, ebx, etc.) and values instead of their 16-bit (ax, bx, etc.) counterparts. See also x86 assembly language for a quick tutorial for this processor family. The updated instruction set is also grouped according to architecture (i386, i486, i686) and more generally is referred to as x86_32...
There are several major downsides to using assembly, mostly that 1) You can't optimize as well as a C compiler and 2) your code is by definition not portable
 
I'm fully aware of that.
 
Alright, well, then that's what you want.
 
But I think it would be great fun to write lousy compilers for simple languages. And to simply program in assembly.
I'm a little annoyed that I didn't get the results you did when I googled.... I guess I need to keep working on my googling skills.
 
The GNU Assembler, commonly known as gas or simply as, its executable name, is the assembler used by the GNU Project. It is the default back-end of GCC. It is used to assemble the GNU operating system and the Linux kernel, and various other software. It is a part of the GNU Binutils package. The GAS executable is named as, the standard name for a Unix assembler. GAS is cross-platform, and both runs on and assembles for a number of different computer architectures. Released under the GNU General Public License v3, GAS is free software. == General syntax == GAS supports a general syntax that works...
is worth checking out as well; it says that it can be targeted to multiple platforms
 
8:48 PM
Okay. Time to create a new bookmarks folder on my cluttered bookmarks "bar" (more like dropdown list; most of the bookmarks aren't on the bar)
Whoa. I just learned that I can select multiple tabs on my browser when I want to do tab rearranging.
I feel dumb for not knowing that before.
 
question:
is there a way to get multiple rows of tabs in Firefox?
 
Hmm. This is not easy for me to answer. I've used chrome for the last 8 years or so.
Wait, now I want to know if I can do that in chrome...
Okay, I decided not to worry about it in chrome. I'll just pull the tabs out into new windows like I already do.
 
9:18 PM
Agh, someone posted a solution to the multiply with restrictions problem that is the same as the one I was working on
 
9:32 PM
Updates on CodeBots KOTH
I got the Java version working
It has a GUI, its super fast and awesome
@Sparr @githubphagocyte @PhiNotPi
 
@NathanMerrill I'll check it out when I can. might be a day or three. moving headaches here
glad to hear that it's faster. more runs should reduce variance a lot.
 
I've been on vacation
its seriously so much faster
and it allows you to track a bot
and view the lines modified, and its current line
 
Also, your bounty on Traders to the Death expired.
 
I know
I tried to get it set, but I didn't have time before I had wifi
(there was no wifi there)
 
It's okay.
I was just wondering... I made a change to my Trader bot and wanted to see if performance improved.
 
9:36 PM
I will definitely run them again
not right now, just at a pit stop while traveling home
Accepted answer will always be assigned to the highest scorer
 
9:47 PM
in The 2nd Monitor, 28 secs ago, by Mat's Mug
But can't possibly make a good question. I think hope.
Heh, should we prove them wrong? >:D
 
@NathanMerrill I started the spec for Code Bots 3.
 
: Rise of the Machines
It won't be as good as Code Bots 2
 
What's Code Bots 2 going to be, exactly?
 
Does anyone here know anything about the .wav format? I'm taking on an incredibly silly project and I'd like to know if .wav files have a minimum sample rate.
 
I wonder if you could easily set up a very simple arena in Quake
and host a server, and have people submit their bots by logging on
 
9:56 PM
The lowest sample rate I've seen personally is 8000. I'm hoping I can have one that's like, two.
 
Regarding CB3: Rise of the Machines, is there anything that should be added from a usability standpoint? Do the line labels make sense?
 
I have no idea; I didn't participate in the original one
 
It looks like VLC is happy with a sample rate of 2. The problem is that it doesn't play any sound. I'll have to read up on how the data bytes in .wav files are formatted.
 
I'm sure it is playing sound
it's just a bit low to hear
 
Just very slowly.
 
10:05 PM
I wouldn't be surprised if there was a problem, I made the file my hand in a hex editor.
The data bytes are "FF 00 00 FF".
I was hoping to hear half a second of any sound at all, a second of silence, and then that sound again.
But I don't think that's how it works.
 
The extreme lower limit of human hearing is about 20 Hz.
 
@undergroundmonorail you are effectively positioning the speaker, and it is the motion of the speaker that creates pressure waves in the air that is the sound
 
It probably is not playing sound; your speakers have a lower limit on their response rate
 
and as implied by @PhiNotPi, you will have a fun time hearing much without a sample rate >40Hz
 
10:07 PM
@PhiNotPi I think @NathanMerrill said CB2 would be in 3D
 
Okay, I misunderstood how that worked.
Does that imply that sample rate is correlated with maximum pitch of the sound, as well?
 
I reckon so, but I'm less than informed on the matter
 
Hm. I'm trying to make this easy on myself because my end goal is to output .wav files from brainfuck. That's why I wanted a low sample rate: Less work when I write that.
 
(my reckoning would be if you want a 20Hz wave, you need atleast 40Hz sample rate, and you get a (horrible) triangle wave or whatever it is actually called)
 
All the sound needs to do is alternate between on and off audibly
 
10:10 PM
you'll need a lot of samples then
 
@undergroundmonorail to capture X signal frequency you need 2*X sample frequency, minimum
 
I see. Thanks :)
 
more if you want accurate amplitude, as well
In the field of digital signal processing, the sampling theorem is a fundamental bridge between continuous signals (analog domain) and discrete signals (digital domain). Strictly speaking, it only applies to a class of mathematical functions whose Fourier transforms are zero outside of a finite region of frequencies (see Fig 1). The analytical extension to actual signals, which can only approximate that condition, is provided by the discrete-time Fourier transform, a version of the Poisson summation formula. Intuitively we expect that when one reduces a continuous function to a discrete sequence...
 
@Doorknob GCD is a good one. There's no really clean way of doing it in GS, but you can pick one approach and ask whether it can be improved.
BTW could one of the people who voted to reopen codegolf.stackexchange.com/questions/36802/… , and thus presumably thinks it's clear what the question is, answer the questions in the comments?
 
10:51 PM
Does anyone think my What's Average, Anyways? sandbox thing could make a good challenge?
 
I can't figure out why this .wav file won't play. It should be 1 second of an 80hz tone. VLC can figure out that it's 1 second long, but just plays silence.
This should work. It does not.
(I'm getting my info from here btw)
 
Normally when that happens to me it's because I bodged the endianness and it's too quiet to hear.
Have a look at it in Audacity.
 
Huh. Yep, there's data there. It worked.
I just don't know why it's so quiet! :P
 
00:00 - 18:0018:00 - 00:00

« first day (1311 days earlier)      last day (3523 days later) »