« first day (1794 days earlier)      last day (3195 days later) » 

1:05 AM
Type must be a type provided by the runtime.
wtf .NET?
 
@Telastyn Code, or it didn't happen.
 
I can't paste the entire code for this one...
 
How about the line that's causing the error?
 
var ctorFn = typeLookup[ctor.EffectiveType].GetConstructor(invoke.Bindings.FunctionDefinition‌​.Takes.Where(pp => !pp.IsIdentifier).Select(pp => typeLookup[pp.Parameter.Returns]).ToArray());
which.. totally seems like the sort of line to cause an error.
 
This translates it as "You can't reflect over a type that hasn't been created yet."
 
1:14 AM
yeah
the message itself isn't very helpful though.
looks like I was trying to get the ctor of something like List<T>
 
1:30 AM
@Telastyn It does look like that. In the past, I've solved certain problems like this by using an Interface instead of a Class. Interfaces seem more amenable to being passed around and worked on as a T, because they don't have to be instantiated.
 
? that... doesn't make much sense to me.

Either way, I'm working on getting partial generic specialization working in my compiler. So I was literally trying to get the constructor for a generic type where T was not a concrete type - it was a generic placeholder to something else.
 
 
4 hours later…
 
4 hours later…
10:14 AM
@ivan_pozdeev This question would be closed on Programmers as "too broad" for the same reasons it was here. It's basically asking us to design his entire app for him with almost no information. — Ixrec 31 secs ago
 
 
8 hours later…
user55340
6:04 PM
 
user55340
7:00 PM
Sometimes bits are just easy.
 
user55340
final public class Cards {
    /*
     3         2         1         0
    10987654321098765432109876543210
    QJAKT987QJAKT987QJAKT987QJAKT987
    D      DH      HS      SC      C
     */

    final static int QUEEN    = 0x80808080;
    final static int JACK     = 0x40404040;
    final static int ACE      = 0x20202020;
    final static int TEN      = 0x10101010;
    final static int DIAMONDS = 0xFF000000;
    final static int HEARTS   = 0x00FF0000;
    final static int SPADES   = 0x0000FF00;
    final static int CLUBS    = 0x000000FF;
 
@MichaelT dare I ask what FAIL does?
 
 
1 hour later…
8:31 PM
Welcome on StackOverflow. Well good thoughs, but wrong site. Maybe this in on topic on Programmers, but not here since it is opinion based. — rekire 1 min ago
 
8:47 PM
@rekire Programmers.SE doesn't do opinion-based questions either, and we have a custom close reason specifically for language/tool/library recommendations like this one. — Ixrec 1 min ago
@rekire That's bad advice, since this question would be immediately closed on Programmers. Programmers.SE is about conceptual questions on software development, not for “soft questions”. Questions like this are explicitly off-topic. As an aside, opinion-based questions are off-topic anywhere in the Stack Exchange network, since these are questions and answer sites, not discussion forums. Good questions elicit objective answers, not opinions. — amon 28 secs ago
 
was I not harsh enough?
 
I prefer to drop links to the help/on-topic in cases of blatant ignorance. Also, I had written up such a lovely rant before seing your comment that I didn't want it to go to waste.
 
That is correct -- during the transition from "failing" to "passing", your concern is having all the tests pass. Afterwards, you worry about the implementation. This question is too general to answer (it would probably be a better fit for programmers Stack Exchange), but basically, start with a the simple cases and work up to more complex ones. What happens when your input file doesn't exist? What happens if the file is empty? What happens if the file contains one letter? The first test might be "I can instantiate this class and get a valid instance"/ — Daniel Mann just now
 
9:47 PM
@amit I feel like there is a lot of overlap between what's considered on-topic at Stack Overflow ("a software algorithm"), Computer Science ("algorithms, models of computation"), and Programmers ("algorithm and data structure concepts"), all quoted from their "on-topic" pages. In my opinion, if you can't tag a question with either a programming language (e.g. C), or environment (e.g. POSIX), then it's better suited for on of the other sites. This question could be answered and proven without writing a single line of code ("programming"). — Jonathon Reinhart 42 secs ago
@JonathonReinhart If I was asking this myself, I would pick Programmers, but I don't think there's any need to migrate this off SO. — Ixrec 48 secs ago
 
10:44 PM
@MichaelT meh. Just because it fits doesn't mean it's a good idea. And even if it is a good idea, seeing code like that would raise my "clever" alarm. This instance of "clever" might be obvious and manageable, but what about the next 50?
 
@MetaFight is the purpose of FAIL obvious to everyone but me?
 
@Ixrec nah, I don't get it either.
I assume it's part of the rules of the game.... mixed into the encoding of the deck.
 
You can lead a programmer to a white board, but you can't make him draw.
Majority of *pure* programmers are graphically challenged, I've noticed.
 
11:02 PM
what's a pure programmer?
 
@MetaFight a JIT virtual machine
all it does is reprogram your code to make it better and nothing else
 
@MetaFight Pure programmer is a person who have done only coding throughout his career, and not much else. So, for example, a person who is writing code for the last 7 years, but was an optics engineer for the 7 years before that is not a pure programmer.
I could use the term purebred instead of pure.
 
11:31 PM
I think your usage of the word "pure" is very odd.
 
user55340
Sheepshead or Sheephead is a trick-taking card game related to the Skat family of games. It is the Americanized version of a card game that originated in Central Europe in the late 18th century under the German name Schafkopf. Sheepshead is most commonly played by five players, but variants exist to allow for two to eight players. There are also many other variants to the game rules, and many slang terms used with the game. Although Schafkopf literally means "sheepshead," it has nothing to do with sheep; the term probably was derived and translated incorrectly from Middle High German and referred...
 
user55340
 
gotcha
 
user55340
Its just part of the term of the game.
 
@MichaelT have you got downvotes left?
 
user55340
11:33 PM
I'll also point out that this isn't for playing the game, but rather part of a monte carlo simulation I want to do on hands dealt.
 
user55340
@durron597 Yep.
 
user55340
So, I deal out hands to 5 players, and then test for "is there anyone who has no ace, no face, and no trump" - which is the shenanigans test.
 
user55340
Or "Queen, Jack (or better), and another trump card" - often considered the minimum picking hand.
 
@MichaelT 1 2 3 4 5 6 7
 
user55340
So I'm going deal out the cards. Set the bits in an integer, and then do a series of hand & TEST tests.
 
user55340
11:36 PM
@durron597 0'ed.
 
@MichaelT ty
 
user55340
So, the quick deal, set bits, and do bitwise tests are very much something that clearly and cleanly maps to the model.
 
user55340
That it happens to be 32 cards in the deck matching a 32 bit integer is just gravy.
 
user55340
When I get it all done, I'll toss it on code review to see what they say over there.
 
user55340
Other tests like "will a given ace walk if called by the strongest hand"
 
user55340
11:40 PM
Or the "chance of all three fail aces in one hand" - thats happened twice at our table. Its an oddball rule.
 
user55340
Chance of a laydown hand...
 
user55340
So I want to run 10k or so hands dealt and check to see what percentage of the times these things happen.
 
11:58 PM
cool. makes sense now :)
 

« first day (1794 days earlier)      last day (3195 days later) »