I'm using the subprocess module to start a subprocess and connect to it's output stream (stdout). I want to be able to execute non-blocking reads on its stdout. Is there a way to make .readline non-blocking or to check if there is data on the stream before I invoke .readline? I'd like this to be ...
@MartinBüttner for my new bracket numbers solution, I think I want to keep track of the minimum and maximum operation at the outer level of each best representation for a number.
the bracketing increment operation makes an atomic container, but every other non-parenthetical operation is important.
I can't put unbracketed addition or multiplication on the right side of an exponentiation
I can't put unbracketed exponentiation on the left side of an exponentiation
Modern Fortran seems a bit overloaded to me though, with the object oriented stuff and all, so I decided I'd just write a language heavily influenced by Fortran that is really close to the machine but easier to debug and maintain
because I'm even more of an idiot than I was before
so it's not because there is a massive legacy code-base and the only people working on them are from the 70s themselves, or eager sci grads who don't know how to program yet?
Sadly FORTRAN 77 is still around. Lots of younger people have become aware of how sadly out of date and easily destroyable F77 is, so we build things on F90+
Also, doing a Google search for "Introduction to Modern Fortran Jonathan Dursi" returns two 120+ PDF presentations from an expert in Computational Astrophysics & SO answerer
for each number, I'm going to have a heap. that heap will be a list of representations sorted by length, also tagged by the minimum and maximum operations used outside brackets in the representation
when I need a representation for a number to substitute into another representation, I'll walk through the heap from shortest to longest until I find one that meets the current context's operation restrictions
Kakuro Combinations
I'd have thought something like this would have already been asked, but I can't find anything that looks like a duplicate, I'm not the best person at searching for things though.
For those of you who know Kakuro, this isn't as interesting as it might sound - is there a bette...
it's not nearly that interesting, but I do struggle with the arithmetic and I thought it'd be good fun, I was surprised there wasn't something like it already
I'm not sure KotHs will work well when split up into two challenges. Because all the submission do need to be tested together in a single run. I don't see how splitting it up helps here, except that you can declare one winner on each team.
This seems easier with code-challenges where each challenge simply serves to generate some more test data for the other challenge.
@VisualMelon match.Complete gets called in the lambda action. the play/complete sequence is wrapped in a try/finally so even if the play method were throwing.
@VisualMelon matches have a "source" added to them when they're instantiated. That Source is the matchGenerator. Match.IsCompleted calls Source.CompleteMatch(this);
its circular because once the match is yield'd out of the generator, it needs a way to call back into the generator to let it now that player have become available
Dice Throw Bot, C#
Just Random
using System;
using Microsoft.CSharp;
using Microsoft.Win32.SafeHandles;
using System.Collections.Generic;
using System.Linq;
public static void Main (string[] args)
{
var computerPlay = GetRandomOption(gameGestures);
IList<Gesture> gameGestures = GetGest...
Traders
You are a foreign trader, hoping to make a profit. There are 5 goods people wish to trade: Apricots, Boars, Canaries, Daffodils, and Earwigs. Starting in the winter, you need to decide what to produce. Then, in the fall, you travel and spend your days trading for a profit.
Gameplay
...