HN user

cammsaul

194 karma

Chief Architect @ Metabase http://www.metabase.com/

Clojure, C++, Objective-C, JavaScript, Perl, Emacs Lisp, Python, Assembly

Posts22
Comments20
View on HN
www.youtube.com 1y ago

Getting 50k Companies on Board with Clojure

cammsaul
3pts2
camsaul.com 6y ago

Intro to Emacs Lisp: Adding Live Previews When Editing Markdown Files

cammsaul
2pts0
github.com 6y ago

Porting some of the better parts of the CLOS to Clojure

cammsaul
2pts0
github.com 9y ago

Toucan: high-level Clojure library for defining application models and DB access

cammsaul
3pts1
github.com 9y ago

Toucan, a high-level Clojure lib for defining models and working with your DB

cammsaul
2pts1
github.com 9y ago

Buggy support for branches whose names are an emoji in GitHub

cammsaul
2pts0
hyperallergic.com 10y ago

ISIS Announces Venice Art Festival Boat Where Visitors Can Destroy Art

cammsaul
5pts0
www.bbc.com 10y ago

The odd world of Victorian Easter cards

cammsaul
1pts0
arstechnica.com 10y ago

Cartoons from XKCD creator will appear in high school science textbooks

cammsaul
1pts0
github.com 10y ago

Dear NPM: Remove unpublish

cammsaul
1pts0
github.com 11y ago

Leiningen Plugin to Generate Cheatsheet for Your Clojure Projects and Dependencies

cammsaul
2pts0
www.itworld.com 11y ago

It has been decided: opening curly brackets don't get their own line

cammsaul
1pts0
pypi.python.org 11y ago

Django REST Params 1.0

cammsaul
1pts0
pypi.python.org 11y ago

Django REST Params

cammsaul
1pts0
github.com 11y ago

Getting started with x64_64 NASM assembly on OS X

cammsaul
4pts0
github.com 11y ago

Security Middleware for Crow C++ Web Framework

cammsaul
1pts0
github.com 12y ago

Move over, Clojure Grimore: The Next-Level Clojure Reference

cammsaul
1pts0
www.economist.com 13y ago

A new study suggests alcohol is more harmful than heroin or crack

cammsaul
46pts52
github.com 13y ago

Yet Another Tool To Help Clojure Hackers Run Circles Around Everyone Else

cammsaul
2pts0
www.camsaul.com 13y ago

Let Regexes Write Your Code For You

cammsaul
7pts5
www.camsaul.com 13y ago

Caps Lock Key Has No Place on a Modern Keyboard

cammsaul
31pts69
www.camsaul.com 13y ago

Sudoku Solver in 25 Lines of Clojure

cammsaul
5pts0

Hi, Toucan library author here.

+1 on avoiding side effects from business logic. This applies not just to Toucan, but to database code in general. Toucan is there to give you a way to define behaviors when interacting with your application database, for example transforming certain columns when you fetch rows from a certain table from the database. It's that plus utility functions for interacting with your database. Not really an ORM.

Either way, Toucan 2 is out now: https://github.com/camsaul/toucan2 I'm still working on fully documenting it but it's already being used in the wild and Toucan 1 will probably be archived soon

Most of these are clang specific but I tend to do something like

-pipe

-std=c++11

-gfull # generate correct debugging symbols for dead code stripping

-stdlib=libc++

-Ofast # fast, aggressive optimizations (clang-specific)

-fvectorize # enable loop autovectorizer

-fdiagnostics-show-template-tree (clang: print C++ template error as a tree instead of on a single line)

-Weverything # clang specific: enable every single warning

-Werror

-Wfatal-errors # die after the first error encountered

-Wno-c++98-compat

-Wno-c++98-compat-pedantic

-Wno-global-constructors

-Wno-exit-time-destructors

-ffast-math # enable some floating point optimizations that break IEEE754 compliance but usually work

-funroll-loops # enable loop unrolling

-fstrict-aliasing # make more aggressive assumptions about whether pointers can point to the same objects

-fatal_warnings # treat linker warnings as fatal

-flto # enable link-time optimization

-dead_strip # enable dead code stripping

-Wno-error=deprecated # like being able to put __attribute((deprecated)) in code as a note to self

-Wno-error=#warnings # same thing goes for #warnings

clang has -Weverything, I prefer to start with that and do #pragma clang diagnostic push/ignored/pop as needed and only turn off the really obnoxious ones, like -W-c++98-compat-pedantic

Worth a mention: In Objective-C with ARC, the compiler treats every pointer to an Obj-C object as a std::shared_ptr or std::unique_ptr (static analysis is used to optimize out unnecessary reference counting), unless it's marked otherwise with keywords such as __weak, __unsafe_unretained, etc.