Skip to content

Instantly share code, notes, and snippets.

@psibi
psibi / HSbouncycastle-0.1.0.0.jar
Created January 22, 2017 14:25
/home/sibi/github/bouncycastle/dist/build/HSbouncycastle-0.1.0.0.jar
M Filemode Length Date Time File
- ---------- -------- ----------- -------- -------------------------------------------------------------------------------------------------------
-rw-rw-rw- 1559 22-Jan-2017 12:09:08 bouncycastlezm0zi1zi0zi0/ThreeFishEngine$getLong.class
-rw-rw-rw- 735 22-Jan-2017 12:09:08 bouncycastlezm0zi1zi0zi0/ThreeFishEngine$threeFishProcessBlock.class
-rw-rw-rw- 1286 22-Jan-2017 12:09:08 bouncycastlezm0zi1zi0zi0/ThreeFishEngine$zdLr2YKa.class
-rw-rw-rw- 668 22-Jan-2017 12:09:08 bouncycastlezm0zi1zi0zi0/ThreeFishEngine$zdwccall.class
-rw-rw-rw- 799 22-Jan-2017 12:09:08 bouncycastlezm0zi1zi0zi0/ThreeFishEngine.class
-rw-rw-rw- 448 22-Jan-2017 12:09:08 eta/bouncycastle/Utils.class
-rw-rw-rw- 5865 22-Dec-2016 12:21:40 meta-inf/bckey.dsa
-rw-rw-rw- 367678 22-Dec-2016 12:21:40 meta-inf/bckey.sf
@psibi
psibi / error-codec-jvm
Created January 19, 2017 03:47
Stack1 error message
@sibi::jane { ~/github/codec-jvm }-> java Stack1
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.VerifyError: Inconsistent stackmap frames at branch target 28
Exception Details:
Location:
Stack1.main([Ljava/lang/String;)V @15: goto
Reason:
Current frame's stack size doesn't match stackmap.
Current Frame:
bci: @15
@psibi
psibi / error.log
Created January 13, 2017 16:56
aeson-eta.error
Preprocessing executable 'eta-ffi' for eta-ffi-0.1.0.0...
Running eta-ffi...
Exception in thread "main" java.lang.VerifyError: Inconsistent stackmap frames at branch target 513
Exception Details:
Location:
aesonzm1zi1zi0zi0/data/aeson/types/Internal$zdwzdszdwupdateOrSnocWithKey.enter(Leta/runtime/stg/StgContext;)V @175: goto
Reason:
Current frame's stack size doesn't match stackmap.
Current Frame:
bci: @175
@psibi
psibi / error.log
Created November 24, 2016 16:32
error.log
sibi::casey { ~/github/smafia/yesod-server }-> stack exec -- yesod devel
Yesod devel server. Type 'quit' to quit
Application can be accessed at:
http://localhost:3000
https://localhost:3443
If you wish to test https capabilities, you should set the following variable:
export APPROOT=https://localhost:3443
@psibi
psibi / read.hs
Last active November 8, 2016 16:16
Sample Haskell FFI read
foreign import ccall unsafe "read" c_read :: CInt -> Ptr () -> CSize -> IO CSsize
read :: Int -- ^ file descriptor
-> Int64 -- ^ Bytes to allocate
-> Word64 -- ^ Read upto this many bytes
-> IO (ByteString, Int64)
read fd bytes len = do
(ptr :: Ptr ()) <- mallocBytes (fromIntegral bytes)
size <- c_read (fromIntegral fd) ptr (fromIntegral len)
bstring <- packCString (castPtr ptr)
@psibi
psibi / Time.hs
Last active October 23, 2016 10:53
eta port for oldtime
{-#LANGUAGE ScopedTypeVariables#-}
{-#LANGUAGE MagicHash#-}
-----------------------------------------------------------------------------
-- |
-- Module : System.Time
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/old-time/LICENSE)
--
-- Maintainer : libraries@haskell.org
@psibi
psibi / Utils.java
Created October 22, 2016 06:29
Utils
package ghcvm.oldtime;
import java.util.Date;
import java.util.Calendar;
import java.util.TimeZone;
import java.text.SimpleDateFormat;
public class Utils {
public static long getClockTimePrim() {
@psibi
psibi / YesodServantExample.hs
Created September 14, 2016 02:47
Code showing Subsite doesn't handle authentication
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
these derivations will be built:
/nix/store/hjl2pj0l8hp4q8qjdz25ysa3zpgdn6f8-ghc-7.10.2.drv
building path(s) ‘/nix/store/xcskd8vlbfalyj45az1c3x44wv0fgzby-ghc-7.10.2’
collision between `/nix/store/9ch1py7iv3id2fyn0rz0sd28sdhhgnlq-persistent-2.2/lib/ghc-7.10.2/persistent-2.2.2/libHSpersistent-2.2.2-JLgfajdmTC3AD8guoyGkEF-ghc7.10.2.so' and `/nix/store/dzlk7m2gs0jd89f69vbyfph2v7daxslv-persistent-2.2.2/lib/ghc-7.10.2/persistent-2.2.2/libHSpersistent-2.2.2-JLgfajdmTC3AD8guoyGkEF-ghc7.10.2.so'
builder for ‘/nix/store/hjl2pj0l8hp4q8qjdz25ysa3zpgdn6f8-ghc-7.10.2.drv’ failed with exit code 2
error: build of ‘/nix/store/hjl2pj0l8hp4q8qjdz25ysa3zpgdn6f8-ghc-7.10.2.drv’ failed
/home/sibi/.nix-profile/bin/nix-shell: failed to build all dependencies
@psibi
psibi / mockMigrationTest.hs
Created July 27, 2015 22:05
Mock Migration
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
import Control.Monad.IO.Class (liftIO)