30
votes
0answers
3k views

Why (or why not) are existential types considered bad practice in functional programming?

What are some techniques I might use to consistently refactor code removing the reliance on existential types? Typically these are used to disqualify undesired constructions of your type as well as to ...
11
votes
0answers
503 views

How to implement a branch-and-bound in a functional programming language?

I am trying to write a branch and bound search on the set of all functions f: D -> R, where the domain size is small (|D| ~ 20) and the range is much bigger (|R| ~ 2^20). Initially, I came up with the ...
8
votes
0answers
762 views

Ideal data structure/techniques for storing generic scheduler data in C#

I am trying to implement a generic scheduler object in C# 4 which will output a table in HTML. Basic aim is to show some object along with various attributes, and whether it was doing something in a ...
7
votes
0answers
216 views

Using uniqueness types to implement safe parallelism

I've been interested in uniqueness types as an alternative to monads in pure functional languages for some time; unfortunately, this is kind of an esoteric area of CS research and online resources ...
5
votes
0answers
99 views

When we say a monad 'encapsulates a computation' - is this just saying 'wraps a functional transformation of data'?

When I think of the word 'computation' - my mind jumps to lambda calculus or operations on a state machine representing a CPU. It is quite a broad definition. Now some people talk about monads as ...
4
votes
0answers
90 views

Best way to deal with Floors and Ceiling when using substitution method to solve Recurrences

I'm currently using substitution method to solve recurrences. The problem I'm having is dealing with T(n) that have either ceilings or floors. For example in the following example see example here. ...
4
votes
0answers
370 views

Why does the new ADT create a static inner class Fragment by default?

Honestly, I can't help but feel that this is done merely to confuse newcomers. Most of the errors on Stack Overflow by complete Android newbies mostly stem from that they have a static inner class ...
4
votes
0answers
150 views

How to represent hard-to-calculate “properties” of “objects” in functional code?

I have a polyline "class" in my Clojure program, which is represented by a vector of points. (It's not really a class or anything.) The polyline's length (in the geometric sense) is something that is ...
3
votes
0answers
75 views

Tracking internal builds versus public builds

At our office, we use JIRA to track issues reported by our QA teams. We also have Bamboo which builds each time we commit to our Git (Stash) repository. QA picks a build from Bamboo and they work with ...
3
votes
0answers
29 views

Does Optimistic Concurrency per object imply Serializability if a transaction will never span multiple objects?

Given a system which provides: Optimistic concurrency control / versioning per object (using CAS - Check-and-Set) Transactions that never need to span more then a single object. Snapshot Isolation ...
3
votes
0answers
47 views

Factors for choosing between using a wrapper library or issuing command line process from my web application

I have a Java web application that makes use of certain libraries for example: Ghost Script for converting PDFs to TIFFs and Tesseract for OCR. There are java wrappers for both of these: Ghost4J and ...
3
votes
0answers
131 views

JavaScript Combination Inheritance Pattern

In the chapter of Professional JavaScript for Web Developers on OOP, Nicholas Zachas describes a JavaScript inheritance pattern which he refers to as combination inheritance. The basic idea is that ...
3
votes
0answers
50 views

Broadcasting - Listening to replies

We use JS by the way, but I think it's language agnostic. I'm open to ideas. We have this "pub-sub" framework that we use at work to fix the problem of tightly-coupled code. Works fine. Modules ...
3
votes
0answers
201 views

MVVM - Master Detail interaction scenarios - Implementing when MasterVm has partial data, and Detail has to pull whole entity

I primarily work with .Net WPF MVVM applications. I've used several frameworks, MVVM Light, Prism, etc, and I've been able to break the implementation of CRUD MVVM into three scenarios. Scenario 1: ...
3
votes
0answers
261 views

Redex and reduction strategies

I'm studying Types and Programming Languages, and have some trouble getting my head around the concepts of the 5th chapter, The Untyped Lambda Calculus. Specifically, redex, reduction and the various ...
3
votes
0answers
223 views

Identity Design ASP.NET

I am trying to design a system with the below features, and am currently trying to figure out best way to handle Identity : There will be multiple decoupled parts of the system, with same customers ...
3
votes
0answers
875 views

Passing a Context around with dependency injection

In the project I'm working on, I'm using Guice and trying to do as much as possible with Dependency Injection. However, there's one little snag; many of my objects rely on an object Context. This is ...
3
votes
0answers
115 views

How to associate a new/modified changeset with an existing review in VisualStudio 2012

I'm trying out the new Code Review tool in Visual Studio 2012. Which seems okay for the most part, but I've hit a wall in regards to when changes are required. How should this be handled in a code ...
2
votes
0answers
58 views

moving around virtual keyboard

I'm creating virtual keyboard using javascript/html/css. And I can't find a good algorithm for moving from one button to another in different directions (top-bottom, left-right). Lets say I ...
2
votes
0answers
40 views

OAuth shared Authorization server for multiple apps

At my shop we have a couple .NET Web APIs that use OAuth tokens for authentication. Currently, each web API is both authorization and resource server. Users authenticate to all of these APIs using ...
2
votes
0answers
33 views

Calling Web API vs adding reference to underlying dlls

This is more of an Architecture question, and I want to know all the possible pros and cons of the approach. In my org, we have an ASP.NET Application say "A", a Web API Project say "W", and ...
2
votes
0answers
53 views

Advantages and drawbacks of different ways using Either-types

I am writing software for compiling programs. Therefore have a Compiler that compiles a given sourcecode. It then returns a CompileResult that is similiar to an Either type (it is actually internally ...
2
votes
0answers
24 views

Evaluating concurrent application design approaches on Linux

Working on relatively low-speed hardware, I need to grab a snapshot of a rapidly changing datastream and then post-process the snapshot data and save it to disk. I need help with designing the ...
2
votes
0answers
61 views

Data structure well suited for duplicate entries

I'm in the process of getting to know (modern) filesystems. As part of it, I came across log structured filesystems that also handle allocations in a log structured way. I wonder how they handle ...
2
votes
0answers
32 views

Breaking a table over multiple lines in Sphinx

Lets say I have the following function with a docstring: def foo(*args): """ do some fooness +----------------------------+----------------------------------------------------+ | ...
2
votes
0answers
53 views

Micro-services architecture and reporting services?

as I understand it micro-services are autonomous and have complete control over their own data and therefor each micro-service has a dedicated database. I was wondering what would be the approach to ...
2
votes
0answers
46 views

Mono: C call into managed with COM Interop

I am trying to design a managed library to implement -what appear to be- unmanaged VST3 plugins. The VST3 plugin interface is a C/C++ interface-based API that is compatible with COM (ref-counting, ...
2
votes
0answers
116 views

Moving my ASP.NET MVC application to Amazon AWS

I built an ASP.NET MVC application, and now I want to move it to Amazon AWS from my development server. My question is: How does one migrate an ASP.NET application to Amazon AWS? Here is what I have ...
2
votes
0answers
81 views

Which type of query do wide column stores optimize

I have some experience with document based stores (MongoDB and CouchDB) and I am interested in exploring wide column databases. Based on my initial exploration I can grasp a basic understanding of ...
2
votes
0answers
295 views

Why does the .NET framework have no concept of classes as first-class types?

It's well known to those familiar with the history that C# and the .NET framework started out as essentially "Delphi rewritten to feel like Java," architected by the chief developer behind Delphi, ...
2
votes
0answers
70 views

In WPF, should I base my converters on types or use-cases?

I'm looking for some advice on how to write my WPF value converters. The way I'm currently writing them, they are very specific, like (bool?,bool) => Brush, i.e. I'm writing each converter for a ...
2
votes
0answers
160 views

Scheduling a few CPU-intensive tasks

I need to schedule a small number of CPU-intensive tasks to run every so often, reading from shared data and writing to dedicated buffers. I don't necessarily want to roll my own scheduling, but am ...
2
votes
0answers
133 views

Micro-services and data replication

I am building a new application and was reading about micro-services architecture. The architecture itself makes lot of sense from a development, deployment and life cycle management point of view. ...
2
votes
0answers
106 views

Passing Anonymous Type to a Bound Control

Generally speaking, I'm fairly opposed to the use of anonymous types in real-world code (except in LINQ and some other specific scenarios), but I'm looking right now at a situation where I need to ...
2
votes
0answers
34 views

API Server Client Setup

Suppose you have a setup where there is an API Server and all interaction revolve around the API. There is the admin, public and third party components that interact with the API server. Suppose we ...
2
votes
0answers
86 views

Why do Haskell functors only have derived types in their target category?

In Haskell, the Functor typeclass functor is defined as follows (see e.g. Haskell wiki): class Functor (f :: * -> *) where fmap :: (a -> b) -> f a -> f b As far as I understand ...
2
votes
0answers
73 views

Do Rails Join Models Get Controllers?

I have a rails app where my users can buddy up with other users. Since that relationship can have a status (approved/rejected/pending), I decided to go with a join model (UserRelationship) so now I ...
2
votes
0answers
107 views

The inheritance argument of zope.interface (providedby vs isinstance)

What limitations does inheritance of an interface through an abstract base class present that are addressed by zope.interface? In the following talk given in 2010 by Jeff Rush about interfaces, at ...
2
votes
0answers
87 views

What's the proper way to merge two projects in source control software

I'm using Fossil-SCM to maintain my projects. Since I don't work in a team I usually have just a very linear branch of development: 1.0 -> 1.1 -> 1.2 I'm wondering what the procedure is when you have ...
2
votes
0answers
111 views

Is there a theory for “transactional” sequences of failing and no-fail actions?

My question is about writing transaction-like functions that execute sequences of actions, some of which may fail. It is related to the general C++ principle "destructors can't throw," no-fail ...
2
votes
0answers
73 views

Managing setTimeouts and setInterval in a distributed environment

I am building a turnbased game on nodejs using socket.io and redis as the datastore. I am planning on hosting the game on AWS opsworks with the ability to scale by adding more nodes. How should I ...
2
votes
0answers
126 views

How can I make a universal construction more efficient?

A "universal construction" is a wrapper class for a sequential object that enables it to be linearized (a strong consistency condition for concurrent objects). For instance, here's an adapted ...
2
votes
0answers
158 views

MVC 5 - Best practice for handling dates inside and outside the USA

I have an MVC 5 application that will be used world wide. A number of the pages in the app will require users to enter dates. I'll be using the jQuery datetimepicker plug-in to allow the user to ...
2
votes
0answers
57 views

Core Data: is performing NSFetches in transient property code bad? Why?

In Core Data, we can put transient properties in our entity objects (or categories on our entities). These transient properties can calculate transient data based on actual entity properties. Is ...
2
votes
0answers
97 views

How to build child classes as parent configuration?

I'm using Codeigniter PHP Framework for developing a web application, and when developing an admin zone, I've ended building a generic parent class called AdminController which is extended by the ...
2
votes
0answers
307 views

Creating an automated test framework for UI smoke testing

I am doing my thesis on the subject of automated UI testing at a company that applies continuous integration to their projects. The company builds intranets in Microsoft SharePoint 2013 and my task is ...
2
votes
0answers
115 views

What's best for a client library: userland code or schema files?

I'm building a client library that consumes a collection of OpenStack API services. I know that as time goes on more services will be added - so I want to come up with a clean and neat way of ...
2
votes
0answers
244 views

An efficient way of starting an arbitrary number of consumer threads?

I have a Producer/Consumer implementation where the number of consumers is configurable (this is a form of configurable throttling). The producer and consumer are kicked off like this: var cts = new ...
2
votes
0answers
461 views

Entity Framework - Loading Related Entities Explicitly

I have been using Entity Framework for a few years. I have flip-flopped between calling out to repositories in my business logic or using lazy loading to retrieve data as I work my way through the ...
2
votes
0answers
61 views

Get License Information for all Used nuget Packages

To keep our house in order, I want to automatically assemble licenses for project dependencies in our documentation, rather than having to add them manually. Does anybody know a simple way to ...

15 30 50 per page