All Questions
7,309
questions with no upvoted or accepted answers
34
votes
0
answers
1k
views
Making a generic NSMapTable replacement written in Swift thread-safe
This is a follow-up to this question.
While discussing some details about the code I posted there, I came upon a problem with thread-safety. After searching and trying different things, I reached a ...
30
votes
0
answers
724
views
Definitional Returns. Solved. Mostly
I have made the bold claim that a longstanding problem in Rebol is "now solved"...that of "definitional returns".
But of course, such claims need some peer review, and there's always some new trick ...
27
votes
0
answers
923
views
Pacman implemented in OOP VBA
What?, Why?
I have been inspired by several other posts on the topic of OOP implementations in VBA to try and create a Pacman clone. I think this task is not all that hard in most languages; but, I ...
24
votes
0
answers
400
views
Rubik's cube mode for emacs
Following is a dumb implementation of Rubik's cube for Emacs. I am not well versed in writing (e)lisp, so I ask for a review and corrections.
...
24
votes
0
answers
4k
views
Repository pattern in Rust
I'm looking to add a thin layer of abstraction for database interaction in my application. I'm not really looking for a full blown ORM or advanced query builder.
I am familiar with Diesel, but its ...
23
votes
0
answers
388
views
Mucheck - a mutation analysis tool for Haskell programs
We have been working on a mutation analysis tool for Haskell tests called MuCheck. It accepts any Haskell source file, and a function name to mutate, applies a defined set of mutation operators on it, ...
22
votes
0
answers
531
views
Multiplying big numbers using Karatsuba's method
The Karatsuba algorithm, first published in 1962, aims to speed up the multiplication of big numbers by reducing the number of 'single-digit-multiplications' involved.
Because of its complexity (...
19
votes
0
answers
5k
views
How to stream data directly from the database through a 3 tier architecture
The problem: generating a CSV file that is too large be stored in memory in a 3 tier architecture, without the complexity of saving the file to storage.
The solution: I've managed to write something ...
19
votes
0
answers
189
views
Timeoutable computations module
Defines a simple module for timeoutable computations, with the ability to return
arbitrary intermediary results on timeout or the final value otherwise. It also
allows default return values.
The ...
18
votes
0
answers
722
views
Progress Bar for Excel
Any future updates can be found at Excel-VBA-ProgressBar
What I've been using so far
For the last 6 years I've been using a progress form which I wrote in VBA using just Windows API calls. The code (...
18
votes
0
answers
365
views
Modularizing a Game Scene in Sprite Kit
I am trying to modularize the main SKScene of my strategy game. I am not sure that my approach is correct so I would love to get a review of the following code.
...
18
votes
0
answers
450
views
Shepard Tone stream generation in Clojure
This is my work to generate an infinite Shepard Tone. It is written in Clojure and works by generating repeating streams of incrementing frequencies, converting those to values on a sine wave and then ...
18
votes
0
answers
1k
views
PowerShell module for formatting objects using Razor
I managed to get something up and running, but I've no idea whether there are better ways to do this. I've spent all morning trying to figure out the best way to use parameters (allowing objects from ...
17
votes
0
answers
985
views
Autotools detect C++ language standard support
I have been updating my build tools to optionally use autotools (autoconfig/automake/libtool etc.).
As part of this change I have written a couple of M4 macros. This not being something I have done ...
16
votes
0
answers
3k
views
Realtime concurrent Haskell MIDI buffer
Problem Background
MIDI is a serial representation of control signals to a sound generator. Typically, a noteOn message initiates the attack phase of a sound at a given pitch. The note will ...
16
votes
0
answers
189
views
Encoding the problem domain of products and prices into the typesystem in F#
I'm trying to design a model for purchasing amounts of products in F#, following the ideas for designing for correctness (source). The idea is to use the type system to capture the different legal ...
15
votes
0
answers
211
views
Download files in parallel
This module has a ensure_downloaded function which takes a slice of Urls. It downloads all of the urls to a local downloads ...
14
votes
0
answers
537
views
BattleShip - Ships & Players
I'm making a full-blown OOP Battleship game in VBA (previous post: Battleship Grid), and I want this code to be as good as it gets - and better, if I can.
I've refactored a few things, introduced a <...
14
votes
0
answers
809
views
Let's register that Django user
Short intro
So, I've been using Django for a while now and thought it would be nice to start a simple application. In an ideal World, each app must have a way of letting its users register and that's ...
14
votes
0
answers
942
views
Django on virtual machine - watching changes in static files and autocompiling LESS without inotify
I'm setting up a Django development environment using Vagrant to run an Ubuntu virtual machine on VirtualBox. As this is a student project run mostly by very amateur coders and I want everyone to be ...
13
votes
0
answers
319
views
Code to fill PE import address table
I wrote a program to test AV engines against encryption. When it runs, it will compute some key, decrypt an executable it has in its data section and copy it to the locations where the executable ...
13
votes
0
answers
3k
views
Socket application using TPL
This is an application I wrote that allows multiple TCP clients to share a single TCP connection to a remote server (hosted project, and a demo). Traffic generated by the server is forwarded to all ...
12
votes
0
answers
197
views
Multithreaded Groovy Mandelbrot
Seeing as it's October, I thought I'd do the community challenge. Due to my inexperience coding in Groovy, I decided to give Groovy a go. I'm not sure how well I followed Groovy conventions, and the ...
12
votes
0
answers
451
views
Idiomatic way to implement `tail -f` in clojure
Disclaimer: This is just an educational task to learn how to program in Clojure and switch brain to immutable state-way of developing (the provided snipped has some unused variables which I didn't ...
11
votes
0
answers
337
views
Host-Agnostic Model-View-ViewModel Infrastructure
I've written an API that unlocks some serious MVVM capabilities with VBA's MSForms UI framework.
This is the complete code-behind for an example ...
11
votes
0
answers
3k
views
Sending notifications with Django channels
I have project on Django wich use Django Channels. I use Django Channel for sending notifications to users who are subscribed to articles changes (adding/editing/deleting comments on article).
So I'...
11
votes
0
answers
2k
views
Function to conect to Firebase Rest API via Access VBA
This is the application for small school, which will store students' info in Firebase and also retrieve data from Firebase. I am using JSON Parser to parse the data and save the same in Access tables.
...
10
votes
0
answers
1k
views
Private VBA Class Initializer called from Factory #2
About
This is a follow-up of a previous question Private VBA Class Initializer called from Factory. I've decided to create a new question instead of answering my old question because I would like the ...
10
votes
0
answers
1k
views
Geode Contents Predictor StardewValley Mod
The goal
I really enjoy the game Stardew Valley. One of the things that the game has are geodes. Much like real-world geodes, these geodes can be cracked open, and you can find some fun things inside....
10
votes
0
answers
1k
views
Cyther: The Cross Platform Cython/Python Compiler (Take 2)
I recently posted an earlier version of this code on Code Review, and now with the given suggestions and many other improvements, I am back. I included the description of exactly what Cyther is ...
10
votes
0
answers
676
views
Sieve32FastV2 - A fast parallel Sieve of Eratosthenes
I’ve created a much cleaner, better designed version to my parallel sieve. I’ve implemented most of EBrown’s micro-optimizations but also revamped the code on my own (that is not in direct response ...
9
votes
0
answers
511
views
Hunt the Wumpus GUI (FLTK)
I used the code from the text based hunt the wumpus game discussed here: Text based game “Hunt the Wumpus” Version 3 to create a gui Version based on excercises from PPP by Stroustrup.
For the GUI i ...
9
votes
1
answer
956
views
Function that recursively downloads entire directory is slow
I created this function to recursively copy an entire directory from an FTP server. It works just fine except that it is about 4 times slower than using FileZilla to do the same operation. It takes ...
8
votes
0
answers
326
views
A VBA program to quantify the performance of code execution timers
Motivation
I am interested in optimising the execution time of code with short (fast) execution times on the order of microseconds (µs), but that will be used with high frequency (e.g. like ...
8
votes
0
answers
684
views
A simple Qt + MQTT doorbell application
So I built a house recently and didn't want to rely on "privacy-questionnable" systems like Google Home or Amazon whatever so I decided to build a doorbell system myself.
Hardware
I use a ...
8
votes
0
answers
261
views
Implementing GSL synchronized_value
Core Guidelines mention a type synchronized_value<T>, which supposedly pairs std::mutex with the internal value. I couldn'...
8
votes
0
answers
140
views
Calculation of independence test statistic
This code (~30lines) detects independence between variables in a dataset, by using a bootstrap of a statistic. This is fully-broadcasted, but it's still long.
Reading it, or making it run, do you ...
8
votes
0
answers
3k
views
Responding to Events of Dynamically added Controls
I was asked for an example of a class to wrap dynamically added controls as I suggested in this Answer. Although it is out of the context of a Code Review, I thought that it would make an interesting ...
8
votes
0
answers
738
views
Battleship MVC Architecture
The entry point is the Macros module, which - for now - includes only a single procedure, at a very high abstraction level - I'm quite happy with this:
...
8
votes
0
answers
1k
views
IndexedArray Class: Uses a Dictionary Keys to Index a 2 Dimensional Array of Values
This class encapsulates a 2D Array and a Scripting Dictionary. Values are add or returned from to the Array using a Key and a ColumnIndex, e.g. ...
8
votes
0
answers
2k
views
Bringing The System.Text.StringBuilder Up To Lightning Speed In The VBA
After having to swap the feature rich System.Text.StringBuilder for the very fast but very vanilla A lightning-fast StringBuilder, I decided it was time create a ...
8
votes
0
answers
2k
views
Small Virtual Machine executing its own byte-code
I want present to you my little Virtual Machine. It nothing really sophisticated. It is an stack only virtual machine with the exception for some 'global' variables which i would count as registers ...
8
votes
0
answers
526
views
Simple, intuitive and (hopefully) safe EventDispatcher
For my own game engine I need an event system. I tried to avoid the single-huge-enum-approach for minimizing compile times.
The BasicEventListener is the (...
8
votes
0
answers
326
views
C++ constexpr trampoline
For fun, I implemented a trampoline function for C++ constexpr functions, since the recursion limit for constexpr functions is ...
8
votes
0
answers
348
views
STTCL FSM framework based on the GoF State Pattern, Part I: The basic interfaces
Preface
I have decided to let my pet project created some years ago to undergo a code review here.
The review will be broken into parts according to meta question Multiple reviews or one big review?...
8
votes
0
answers
554
views
Kattis problem Amanda Lounges
I wrote this solution to Kattis problem Amanda Lounges in Scala. TL;DR: It's a graph theory problem where I read in a list of edges from stdin and try to compute the minimum number of nodes that ...
8
votes
0
answers
322
views
.NET DLL Injector in C++
I built a DLL Injector with User-Interface.
The program lists all processes, the user chooses one of them and a DLL, and inject it.
It's my first project in C++, and I know it's not exactly C++ ...
8
votes
1
answer
2k
views
Joystick to mouse/keyboard mapping program
I've been working on a project to map a joystick (in my case Logitech Extreme 3D) to mouse and keyboard so I can use it for web games that don't support gamesticks. My design goals are:
Flexibility - ...
8
votes
1
answer
2k
views
Improving the Flask cache decorator
In my rumblings developing flask applications I found the caching decorator. The decorator is a short and well-written piece of code, but I feel like it misses the few points bellow:
It only caches ...
8
votes
0
answers
7k
views
I am using boost::process to call an external process, and using stdout, stderr, and stdin to supply/retrieve data
I have some program which takes input via stdin, writes output to stdout, and errors to stderr. I would like to call that program from another program, supplying data via stdin, and capturing output/...