10,687 reputation
23862
bio website
location
age
visits member for 3 years, 4 months
seen Dec 23 at 18:27

C# developer, pretty standard stuff. SOLID and other such principles drive everything I do for the most part. Other than that, polyglot lover of functional programming in Haskell, F#, Erlang, and javascript. Player of each, master of none.

  • Monads are like buckets, that's what they say anyway.
  • Monoids are easy! I guess?
  • Comonads are just objects... however that works O_o
  • Cartography has nothing to do with these things.

Cheers.


Dec
19
awarded  Enlightened
Dec
8
comment Is there an equivalent of lambda calculus for object oriented languages?
the object is a part of the type system though, like I said. So if you can describe the "object" concept you refer to it would go a long way in demystifying what kind of formalism you're looking for. Just because you can model OO systems with lambda calculus doesn't stand to reason that is a good formalism. You can also model lambda calculus with OO languages, it's a turing tar pit standpoint. Either you're interested in formalisms that are very similar to the OO type system, or imperative computation, or you're asking about ??
Dec
8
comment Is there an equivalent of lambda calculus for object oriented languages?
You're not talking about types, but the type system is the defining characteristic of "OO", without the type system you're talking about procedural programming... so which is it? Procedural/imperative programming, or the OO type system? If it's just procedural/imperative then you just want a calculi that models imperative computation to which monadic composition is the best model I'm familiar with, though there are surely others.
Dec
8
comment Is there an equivalent of lambda calculus for object oriented languages?
Perhaps you should start by identifying a calculus that models imperative computations, I'm not familiar with one. If you just mean a type system algebra that meshes with the object concept, I would encourage you to define the characteristics of the OO type system you want to know of an algebra that resembles. Many people find different parts of OO type systems intrinsic to the universal concept of "OO", so identifying your concept of it would help.
Dec
3
comment Extend, wrap, or both to add generics to a class that should have had them?
@MikePartridge yeah I get that, but it's not well described how that is a problem. I suspect that may be solvable in a different fashion than described here
Dec
3
comment Extend, wrap, or both to add generics to a class that should have had them?
Sounds like you're having an X/Y problem: You're asking for a solution in the form of X but actually need a solution in the form of Y. The solution to X/Y problems is to describe your actual problem and people will then be able to show you the solution which is Y even though you're not aware Y exists. Maybe what you're asking for here is the correct solution, but I think you should give an apt definition of your problem first otherwise you'll get a crappy solution. (It doesn't sound like you have a problem to me - why do you care how a library's type is implemented?)
Dec
3
awarded  Nice Answer
Dec
3
comment Which are the cases when 'uint' and 'short' datatypes are a better fit than the standard int(32)?
@amon I was being a bit silly in the examples but hopefully this clears up those points. I agree arbitrary restriction is not good but there's no reason not to do it for things that are guaranteed not to go over a size, and I don't mean sort of guaranteed. There's many things which are more likely to have a future where they're put through IO under load than a future where they outgrow a given range.
Dec
3
revised Which are the cases when 'uint' and 'short' datatypes are a better fit than the standard int(32)?
added 2 characters in body
Dec
3
revised Which are the cases when 'uint' and 'short' datatypes are a better fit than the standard int(32)?
added 83 characters in body
Dec
3
revised Which are the cases when 'uint' and 'short' datatypes are a better fit than the standard int(32)?
added 4 characters in body
Dec
3
answered Which are the cases when 'uint' and 'short' datatypes are a better fit than the standard int(32)?
Dec
3
comment Creating a sort of 'in-language compiler'
I was with you up to "don't gimme the code, just...gimme..eh..coOode... y'know?" If you edit this question to ask about whether work like this is a good idea, and if your approach is good, or if there are other known approaches to your problem (giving users queryability of your dataset is a very common problem many people have run into and probably have insights on how to solve). Then I'd remove my close vote. As it stands, it's not really asking an answerable question so much as for help writing code..
Dec
1
comment Is doing Parent.call from the child object a right way to implement Inheritance in JavaScript?
@Hey what I describe is an approach to get similar benefits to inheritance, but not to use it. I think there should be no prototypal or subtypal inheritance relationships as I find them to be footguns. As I mention above, it is an opinion, and is written in comments because it's not an answer to the asked question. Just a comment to share a different perspective on this problem with folks - one that says: Just don't solve this problem as it's been invented by a faulty solution (subtypal inheritance) to begin with. That's just my opinion
Oct
31
comment What is the best way to initialize a child's reference to its parent?
@Telastyn I can't help but read that as tongue in cheek, and it's hilarious. Also completely dead bloody accurate. Steven, the term to look into is "acyclic" as there's plenty of literature out there on why you should make graphs acyclic if at all possible.
Oct
29
comment Better to keep JScript.NET dll or try converting JScript.NET code to C#?
why is relying on a JScript.NET assembly in any way not desirable? Sounds like a 3rd party library that works perfectly well for your very narrow use case. I don't see the downside. If you really have some bone to pick with the idea a non-homogenous system (pressing for homogeny over pragmatism is the cause of many terrible systems in the world), you can just use ILSpy or Reflector to reverse the IL in the dll to C#, then refactor it as you like into something that looks less disassembled...
Oct
28
comment How to get a one-way hash function that is collision safe for about 1 million unique inputs?
@PeriataBreatta the answer in that question goes into extreme detail of analysis on the uniqueness and distribution of various hashing algorithms. It should have more than enough information to help the asker here choose an algorithm with a good distribution.
Oct
28
awarded  Enlightened
Oct
28
awarded  Nice Answer
Oct
21
comment Data structure for traversing hierarchical hostnames
this was fun dotnetfiddle.net/ihB8FQ <-- functional approach