11
votes
0answers
277 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 (...
7
votes
0answers
251 views

How do I associate command objects with the right receiver?

I tried to use Command Pattern for implementing Undo and Redo in my project public abstract class Command { protected Form Receiver { set; get; } protected HtmlElement Element { set; get; } ...
6
votes
0answers
384 views

Object Constraint Language (OCL) for Stack in java.util package

I have an exam coming up and I'm looking at past papers to get some ideas of what to expect. I'm a bit stuck on the following one and would really appreciate if someone could give some example ...
5
votes
0answers
220 views

What lambda function optimizations, if any, are planned for Java 9 and beyond?

I'm working on a high-performance project where Java 8's lambda functions are enormously useful. I've found, however, that they're memory inefficient when used en masse. For example, suppose I need to ...
5
votes
0answers
71 views

How does the Free monad and Reactive Extensions correlate?

I come from a C# background, where LINQ evolved into Rx.NET, but always had some interest in FP. After some introduction to monads and some side-projects in F#, I was ready to try and step to the next ...
5
votes
0answers
105 views

Generating sort keys when reordering items

We have a number of items which the end user will be able to organize into a desired order. The set of items is unordered, but each item contains a sort key which can be modified. We're looking for ...
5
votes
0answers
170 views

Using Haskell type classes to enforce commutativity

I want to define a type class for geometric objects that can be intersected together: class Intersect a b c | a b -> c where intersect :: a -> b -> c -- Language extensions: -...
5
votes
0answers
306 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 wait-...
5
votes
0answers
2k views

How to parse multipart field/file data separately?

I want to parse a multipart form twice: Once to grab the incoming fields, and later to process the file upload. I am trying to maintain a proper separation of concerns within my Node app: ...
5
votes
0answers
789 views

Who invented the otpauth:// URI scheme?

It seems really simple, but who invented the commonly-used otpauth:// scheme (used by Google Authenticator and other TOTP soft tokens by scanning QR codes)? When?
4
votes
0answers
54 views

Branches, builds, releases and multi-platforms

I'd like to check what best practices are avail out there. I have the following requirements: I have a repo which is used for development (master and develop branches). I would like to keep track of ...
4
votes
0answers
92 views

Does it make sense to apply the principles in Redux to OO languages?

Redux is essentially functional programming, and it makes a lot of sense. As I move back to a non-javascript OOP language in a different project I would like to apply the same principles such as ...
4
votes
0answers
39 views

Why does Mongo check for order of keys when matching embedded documents?

https://docs.mongodb.com/v3.0/reference/method/db.collection.find/#query-exact-matches-on-embedded-documents The following operation returns documents in the bios collection where the embedded ...
4
votes
0answers
40 views

Is this a correct JWT authentication implementation?

I've created a Flask RESTful API which requires an email / password and Facebook login flow. This will probably need to be extended in the future to support more social logins. I've chosen to ...
4
votes
0answers
83 views

possible to achieve Rust's ownership model with a generic C++ wrapper?

Looking through this article on Rust's concurrency safety: http://blog.rust-lang.org/2015/04/10/Fearless-Concurrency.html I was wondering how many of these ideas can be achieved in C++11 (or newer)....
4
votes
0answers
68 views

Distributed Calculation of Geometric Distance between vectors

I am looking at a large scale low latency way to calculate the geometric distance between vectors. Let's say I have a vector A. It has size 128 and of type 32 bit float. I want to get it's geometric ...
4
votes
0answers
58 views

Estimate if benchmark sampling difference is significative

In order to estimate the fastest function in various cases in a non fully deterministic context, I'm running an experiment calling one or the other at random and recording the duration of the ...
4
votes
0answers
76 views

Modelling a complex schedule of work

I've got a real-world problem that I'm trying to represent and automate. I've simplified and abstracted it down to the following: There are n places of work (P1, P2, ..., Pn). Each place, Pn has a ...
4
votes
0answers
103 views

Is the observer pattern suitable when the observers are not independent of each other?

I have a class Car which has 2 properties: int price and boolean inStock. It also holds a List of abstract class State (empty class). There are 2 states which can be applied on the car and each is ...
4
votes
0answers
105 views

Using mysql 5.7 Json Columns for EAV

I am developing an e-commerce product and I have been able to implement all functionality and am left with allowing users to create additional attributes for a product. Right Now I have two options. ...
4
votes
0answers
131 views

Is there a simpler way to help testers push code to a testing branch?

I'm a amateur programmer, I'm not used to working with Git. It's my job to help test new code, for a while now this has included pulling the branch containing the issue, merging it with the main ...
4
votes
0answers
391 views

Multiple Oauth2 access tokens

I have an API that uses oAuth2 and my own mobile apps that use this API as their backend. Since users can be logged on via multiple devices (i.e iphone, ipad, android tablet or android phone) at the ...
4
votes
0answers
72 views

Conditional CSS based on external modifier class - good practice?

Introduction / background: CSS components For a relatively large website we are working with SASS, and trying to manage CSS in components. The basic idea of components is that a component should look ...
4
votes
0answers
263 views

How can unums emulate IEEE's negative zero?

I am currently reading "The End of Error - Unum Computing" by John Gustafson (Youtube). What I am still not sure about is how the cases handled in IEEE by negatively signed zero are handled with unums....
4
votes
0answers
216 views

inserting json document with `.` in key to mongodb

Firstly, this is more of a design question than a programming question. I am creating an application where I have to fetch existing json data and insert it into mongoDB. I found that some of the the ...
4
votes
0answers
71 views

Seeking opinions on using device tree for I/O definition

I've been working ELLCC, a clang/LLVM based development tool chain targeting ARM, Mips, Microblaze, PowerPC, and x86 targets. The tool chain is pretty complete and runs on Linux, Windows, and Mac OS X....
4
votes
0answers
369 views

What is the relationship between “flux” and pure functional reactive programming?

Flux, as far as I understood, is a technique about dealing with the dataflow of an application unidirectionally, keeping state isolated from the rest of the program in read-only, self-contained "...
4
votes
0answers
300 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 ...
4
votes
0answers
153 views

How should private dependency links be handled in setup.py

At work we use a private pypi server. This pypi server is specified as a dependency link: ... from setuptools import setup config = ConfigParser.ConfigParser() rc = os.path.join(os.path.expanduser('~...
4
votes
0answers
191 views

Design for an application framework that will allow each implementation to customize parts of the UI

I am tasked with designing an application framework that will allow each implementation to customize parts of the user interface. One such example would be that the implementation (let's call it ...
4
votes
0answers
534 views

Dynamic programming in Bin packing

Problem: Given a list L of objects of possible sizes from set S={1,2,4,8} and unlimited supply of bins of sizes 16 each and we have to use minimum possible numbers of bins to pack all objects of L. I ...
4
votes
0answers
188 views

Diagram to show code responsibility

Does anyone know how to visually diagram the ways in which the flow of control in code passes between code produced by different groups and how that affects the amount of code that needs to be ...
4
votes
0answers
242 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 ...
4
votes
0answers
313 views

Facebook authentication with an Authoritative Server for a Flash Game

I'm working on a multiplatform game in Flash. This game utilizes Photon Server for authoritative physics and user statistics tracking. I'm looking to leverage Facebook authentication as an alternative ...
4
votes
0answers
290 views

Help/suggestions for Parallel assembly line scheduling (Dynamic programming)

I am working on a problem similar to the assembly line scheduling by dynamic programming.The issue is that unlike the classic problem where we have predefined stations now I only have information ...
4
votes
0answers
371 views

Is this any form of service pattern, some other pattern, SOA or just an anti-pattern?

I'm going to set out a scenario/pattern I've encountered and then I have a few questions pertaining to it. During an MVC request in a web framework (PHP, Laravel in my case), if I have an abstract ...
4
votes
0answers
197 views

RSpec + Selenium tests for .NET on Windows

I'm a Rails developer doing TDD on a Mac with RSpec, Capybara and Selenium webdriver. Now I have been asked by my company to use this approach for a .NET on Windows environment. What is the best way ...
4
votes
0answers
122 views

Script language native extensions - avoiding name collisions and cluttering others' namespace

I have developed a small scripting language and I've just started writing the very first native library bindings. This is practically the first time I'm writing a native extension to a script language,...
4
votes
0answers
438 views

Implement FBP / Dataflow programming in VBA?

Intrigued by Flow Based Programming a la J Paul Morrison. I wonder if one can implement FBP in Excel/VBA. I searched quite a bit for a Basic-Lang FBP implementation to no avail. I've looked at some ...
4
votes
0answers
120 views

Acceptable dependencies in a service-oriented architecture, internal to a team

In a service-oriented architecture, subsystems can depend on each other in different levels: Database level => Foreign keys to enforce data integrity across services on deletions and updates (...
4
votes
0answers
135 views

How can I best organise a Jekyll + Bootstrap + Git site?

So after many many many years of building sites from scratch (and doing a lot of the lifting myself) I've dipped my toes into two projects that have been around for a few years that I've been avoiding:...
4
votes
0answers
291 views

I want to write a data processing & analysis programming language that compiles to SAS. How to go about choosing a language to write my compiler in?

As a side project I wrote a simple macro in SAS to add syntatic sugar to SAS code. I hate how verbose SAS is sometimes! So my macro looks like this %macro md(code); /* expects a superquoted ...
4
votes
0answers
177 views

Web revisioning and the Accept-Datetime header

I have been in the process of generating documentation for an upcoming project. One of the features of the data available in this project is that it will be revisioned (or at least large parts of it ...
4
votes
0answers
644 views

Fluent interface implementation and reflection. Case study

I hope I picked the right group for this question... I have this little framework I want to implement and I would like to have an opinion on it. In particular I am more concerned about the ...
4
votes
0answers
61 views

When connecting to a server using the DRDA protocol, is it true that the first Client-To-Server command MUST be EXCSAT chained with ACCSEC?

When connecting to a server using the DRDA protocol, is it true that the first Client-To-Server command MUST be EXCSAT chained with ACCSEC? I found 2 different answers when I googled it. If you look ...
4
votes
0answers
202 views

Open Grid Engine or Akka/Something more fault tolerant?

My use case is that I have a pipeline of independent, stand alone programs, that I want to execute in a certain order on specific pieces of data that are output from previous pipeline stages. The ...
4
votes
0answers
107 views

XDIME for Mobile Applications

I'm involved in a project that requires to mobile-enable some previously developed Portlets. The Portlets are deployed in WebSphere Portal, and the container offers a technology called IBM Mobile ...
4
votes
0answers
526 views

Design thoughts on a schema based request object for CXF endpoint

Trying to seek design suggestion on a schema based request object for a CXF endpoint. I've created a CXF SOAP endpoint which takes the following object as an input. The request object will have ...
3
votes
0answers
69 views

Monitor.Enter() when a thread is of highest priority

Background Okay, so let's say I have some high priority (ThreadPriority.Highest) thread t which needs to enter a critical region in order to consume some data. I will use the following code snippet ...
3
votes
0answers
57 views

How to manage (nightly) builds in repos for many platforms

at the moment I have one repo (git) for my project and I use branching techniques for development. This is a very new project and I wanted to get things right from the very beginning. I will create ...

15 30 50 per page