Clojure error reporting is a problem. This gist contains examples of missed opportunities for a clear error message. Let's discuss how common scenarios can be improved, and get some "patch welcome" tickets out there with clearly defined expectations.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
from functools import wraps | |
from django.conf import settings | |
from django.shortcuts import redirect | |
from django.core.urlresolvers import reverse | |
from django.utils.decorators import available_attrs | |
from django.contrib.auth import REDIRECT_FIELD_NAME | |
from django.contrib.auth.views import redirect_to_login | |
from django.contrib.auth.decorators import login_required | |
from facepy import GraphAPI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import uuid | |
import wtforms_json | |
from sqlalchemy import not_ | |
from sqlalchemy.dialects.postgresql import UUID | |
from wtforms import Form | |
from wtforms.fields import FormField, FieldList | |
from wtforms.validators import Length | |
from flask import current_app as app | |
from flask import request, json, jsonify, abort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns chan-test.core | |
(:gen-class) | |
(:require [clojure.core.async :as async] | |
[kuroshio.core :as k])) | |
(defn create-string [] | |
(apply str (take 10000 (repeat ".\r\n")))) | |
(defn println-err [& args] | |
(binding [*out* *err*] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IP="127.0.0.1" | |
PORT="8877" | |
SHARED_SECRET="shared secret" | |
OPENSSL="/usr/local/opt/libressl/bin/openssl" | |
OPENSSL_CMD="$OPENSSL enc -a -A -aes-256-gcm" | |
while IFS= read -r MSG; do | |
echo "$MSG" | $OPENSSL_CMD -e -k "$SHARED_SECRET" | |
echo |
This is a practice project to test Common Lisp + C with CFFI.
CFFI is a protocal for common lisp, and most popular impl like sbcl,ccl,cmucl,ecl and abcl have to this. So We can eazy to access C code from Common Lisp.
just only write for Linux(Unix) and need a lisp impl with cffi package. I pratice it with sbcl. You can install it with Roswell, or you can also ues more friendly env - cl-repl which also can install by roswell.
- OS: Linux(Unix)
- A Common lisp impl with cffi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ███████╗███╗░░░███╗░█████╗░░█████╗░░██████╗ | |
-- ██╔════╝████╗░████║██╔══██╗██╔══██╗██╔════╝ | |
-- █████╗░░██╔████╔██║███████║██║░░╚═╝╚█████╗░ | |
-- ██╔══╝░░██║╚██╔╝██║██╔══██║██║░░██╗░╚═══██╗ | |
-- ███████╗██║░╚═╝░██║██║░░██║╚█████╔╝██████╔╝ | |
-- ╚══════╝╚═╝░░░░░╚═╝╚═╝░░╚═╝░╚════╝░╚═════╝░ | |
-- | |
-- Open this script with 'Script Editor' on MacOS, then save it | |
-- inside /Applications as an 'Application', not 'Script'. |