31
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
535 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
124 views

Message Queue for RTOS for microcontrollers

I'm currently writing an RTOS for microcontrollers. The whole thing is written in C++11 - if anyone is interested, and the link to the repository is at the bottom. Currently I'm writing a class that ...
7
votes
0answers
230 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 ...
4
votes
0answers
107 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
171 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
45 views

How to model Aggregate Roots for this music event system?

Let's say I am modeling a music event system. I have: music events listing events (the items in a lineup) - a listing event has acts (the artists playing in an item in the lineup - these can be ...
3
votes
0answers
123 views

How to handle a memory consuming member variable

Suppose multiple objects of the same class should do something which takes a memory consuming resource. Which of the following approaches is recommended to define and use the resource by the objects? ...
3
votes
0answers
111 views

What is the advantage of 'SwingUtilities.invokeLater()' method?

For the below sample GUI program using javax.swing, public class UnResponsiveUI extends JFrame{ private boolean stop = false; private JTextField tfCount; private int count = 1; /* ...
3
votes
0answers
86 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
31 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
52 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
153 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
218 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
386 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
229 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
118 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
48 views

How do I create a modal service with AngularJS?

I'm trying to make a service that's polymorphic based upon what mode is specified in the URL. If the char param in the route is set to 'p', I want to use a PresentMode service. If the char param is ...
2
votes
0answers
30 views

Recommend an approach to decouple Product and Access code constructs, in order to simplify Product testing

I have some code that tightly couples Product specific code and Product-Access code. I am not sure how to untangle it. So for example, for testing Product, I have to mock up Access objects. And ...
2
votes
0answers
86 views

how does CC licenses (0,BY,BY-SA) affect proprietary/closed source applications?

I think this question is specific to indie developers be concerned about. Think about it as a "license clarification" or a "license practical use case". I need to know how must be my project basic ...
2
votes
0answers
36 views

Merge directed acyclic graphs minimizing number of nodes

I have some DAGs (directed acylic graphs) and I want to merge them in order to minimize the number of nodes (we could say that every node has a cost, while edges are free). These four different DAGs ...
2
votes
0answers
68 views

What is the best way to format complex SQL queries in Node?

I am using node-mysql to query a MySQL database via Express and Node. My queries are getting fairly complex and I want to format them across multiple lines. However, the only way I could accomplish ...
2
votes
0answers
31 views

Is there a reasonable way for a typescript class to derive from a dojo/dijit class?

DefinitelyTyped has a dojo solution which uses named modules and may work with legacy dojo and explicit typing, but these declarations do not facilitate typescript import since there are no anonymous ...
2
votes
0answers
63 views

Sharing constructor code between classes that do not inherit from each other

There is a PHP library of classes (generated from a WSDL) that cannot be changed. These look like the below for simplicity. class System extends \SoapClient { public function __construct(array ...
2
votes
0answers
74 views

In a mutual credit network, how would you program an automatic jubilee?

A little explanation might be needed. I mean mutual credit the way that it's defined here: a type of alternative currency in which the currency used in a transaction can be created at the time of ...
2
votes
0answers
99 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
44 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
57 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
37 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
68 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
34 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
67 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
35 views

Directory access from PHP script

Introduction I'm creating an Android app for webpage that runs on Joomla 1.5. Yes I know that it's an old version etc. but it's not my site and I can't do anything about it. So basically I'm creating ...
2
votes
0answers
48 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
154 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
108 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
321 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
75 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
85 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
93 views

Splitting up a Rails/Ruby app onto multiple servers

We recently moved a large application to two machines, both running the same codebase. I. Machine A Web server for public facing application Receives web hook call backs from our ESP Handles a ...
2
votes
0answers
170 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
145 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
115 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
35 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
90 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
81 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
112 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
94 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
87 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 ...

15 30 50 per page