28
votes
0answers
2k 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
456 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 ...
7
votes
0answers
199 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 ...
7
votes
0answers
669 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 ...
5
votes
0answers
81 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
120 views

How do browsers paint a render tree to the screen?

I'm interested in building a browser-like rendering engine. I understand a bit about how OpenGL and GUI toolkits work. But how do browsers actually put pixels on the screen? Are they like software ...
4
votes
0answers
266 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
144 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
73 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. ...
3
votes
0answers
92 views

Are promises suitable for Model Controller communication?

I have an Express app built with the Yeoman Angular fullstack generator to build an API to send JSON to Angular. I'm trying to work out the best way to pass back information from my model to my ...
3
votes
0answers
185 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
217 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
814 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
112 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 ...
3
votes
0answers
352 views

What is a good tag management system?

I work for a publishing company where we have to track converts, etc. Suffice to say we have tags for different areas of the world, and the list can get very large. We need to find a systemt that can ...
2
votes
0answers
47 views

Which data structures and algorithms should I consider for a directed rooted tree that has high churn?

I need to represent a directed rooted tree in memory. What would be a good data structure and algorithms for performing main actions, given the particulars listed below? Size: ~40,000 nodes. But ...
2
votes
0answers
74 views

How to efficiently implement this background processing chain?

I am working on an audio software that uses The EchoNest web service to identify and retrieve metadata about audio songs and I would like to have some advice on implementing a background processing ...
2
votes
0answers
43 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 ...
2
votes
0answers
38 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
79 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
276 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
64 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
48 views

Erlang function naming conventions

I understand the general Erlang conventions for functions are using snake case or camel case, but what about exported functions? For example, say I have a gen_server module that defines a check to ...
2
votes
0answers
146 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
103 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
100 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
101 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 ...
2
votes
0answers
84 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
46 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 ...
2
votes
0answers
65 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
98 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
79 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
105 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
64 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
117 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
143 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
49 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
84 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
249 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
199 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
419 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
57 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 ...
2
votes
0answers
105 views

Why isn't there parallel reduction in the Standard Template Library?

Alexander Stepanov stated in talks and interviews that his realization that eventually lead him to generic programming and the Standard Template Library, was from the case of the parallel reduction ...
2
votes
0answers
104 views

Mobile IOS Application to Server interaction design?

I've built a set of what will be server-side programs in python. Essentially they crawl the net and index news articles. The iOS mobile application will be what the user interacts with. So it needs ...
2
votes
0answers
59 views

Performance consideration and code reduction for Templates

I'm trying to decide if this might be a good idea to help reduce the size of some of my xaml resource dictionaries on a large project. Except I'm concerned about any potential performance issues going ...
2
votes
0answers
97 views

Video conferencing server architecture

I am developing a video conference application with the following requirements: Audio works like call conference, where all participants may talk at the same time. However, video works like ...
2
votes
0answers
309 views

How Add/Create* commands should be handled in CQRS + Event Sourcing architecture

I want to implement my first application using CQRS pattern along with Event Sourcing. I am wondering how creation of aggregate roots should be handled properly. Let's say someone sends CreateItem ...
2
votes
0answers
160 views

Are Calls to a WCF Service via JSONP Secure?

I am looking at developing a complete HTML5/JS mobile app that can be deployed to Android, iOS and Windows platforms. I am using DevExtreme tools to help me do that. I already have a WCF service that ...
2
votes
0answers
212 views

scaffolding a multi-angular-app portal with usersystem

I'm trying to find the best way of developing a portal that a user can log in to and then be presented with a range of different apps (angular). They should share the same api-backend. I think that ...

15 30 50 per page